@medixdeck/ui 0.1.22 → 0.1.23
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/README.md +48 -53
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +189 -137
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -348,22 +348,22 @@
|
|
|
348
348
|
${w}px !important;
|
|
349
349
|
${F}px !important;
|
|
350
350
|
}
|
|
351
|
-
`),()=>{var P;(P=l.current)==null||P.removeAttribute("data-motion-pop-id"),C.contains(B)&&C.removeChild(B)}},[t]),i.jsx(Zx,{isPresent:t,childRef:l,sizeRef:u,pop:s,children:s===!1?e:be.cloneElement(e,{ref:h})})}const Qx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:a,anchorX:l,anchorY:u,root:c})=>{const d=as(e0),h=S.useId();let p=!0,m=S.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:o,onExitComplete:g=>{d.set(g,!0);for(const x of d.values())if(!x)return;r&&r()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,r]);return s&&p&&(m={...m}),S.useMemo(()=>{d.forEach((g,x)=>d.set(x,!1))},[n]),be.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=i.jsx(Jx,{pop:a==="popLayout",isPresent:n,anchorX:l,anchorY:u,root:c,children:e}),i.jsx(co.Provider,{value:m,children:e})};function e0(){return new Map}function Hd(e=!0){const t=S.useContext(co);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=S.useId();S.useEffect(()=>{if(e)return o(s)},[e]);const a=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const Tr=e=>e.key||"";function Tl(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const lr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:a=!1,anchorX:l="left",anchorY:u="top",root:c})=>{const[d,h]=Hd(a),p=S.useMemo(()=>Tl(e),[e]),m=a&&!d?[]:p.map(Tr),g=S.useRef(!0),x=S.useRef(p),y=as(()=>new Map),v=S.useRef(new Set),[j,w]=S.useState(p),[F,B]=S.useState(p);gu(()=>{g.current=!1,x.current=p;for(let A=0;A<F.length;A++){const E=Tr(F[A]);m.includes(E)?(y.delete(E),v.current.delete(E)):y.get(E)!==!0&&y.set(E,!1)}},[F,m.length,m.join("-")]);const C=[];if(p!==j){let A=[...p];for(let E=0;E<F.length;E++){const L=F[E],R=Tr(L);m.includes(R)||(A.splice(E,0,L),C.push(L))}return s==="wait"&&C.length&&(A=C),B(Tl(A)),w(p),null}process.env.NODE_ENV!=="production"&&s==="wait"&&F.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:P}=S.useContext(ss);return i.jsx(i.Fragment,{children:F.map(A=>{const E=Tr(A),L=a&&!d?!1:p===F||m.includes(E),R=()=>{if(v.current.has(E))return;if(y.has(E))v.current.add(E),y.set(E,!0);else return;let D=!0;y.forEach(N=>{N||(D=!1)}),D&&(P==null||P(),B(x.current),a&&(h==null||h()),r&&r())};return i.jsx(Qx,{isPresent:L,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:c,onExitComplete:L?void 0:R,anchorX:l,anchorY:u,children:A},E)})})},Ud=S.createContext({strict:!1}),Bl={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 El=!1;function t0(){if(El)return;const e={};for(const t in Bl)e[t]={isEnabled:n=>Bl[t].some(r=>!!n[r])};bd(e),El=!0}function $d(){return t0(),_g()}function n0(e){const t=$d();for(const n in e)t[n]={...t[n],...e[n]};bd(t)}const r0=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 eo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||r0.has(e)}let Gd=e=>!eo(e);function o0(e){typeof e=="function"&&(Gd=t=>t.startsWith("on")?!eo(t):e(t))}try{o0(require("@emotion/is-prop-valid").default)}catch{}function i0(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||Oe(e[o])||(Gd(o)||n===!0&&eo(o)||!t&&!eo(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const po=S.createContext({});function s0(e,t){if(ho(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sr(n)?n:void 0,animate:sr(r)?r:void 0}}return e.inherit!==!1?t:{}}function a0(e){const{initial:t,animate:n}=s0(e,S.useContext(po));return S.useMemo(()=>({initial:t,animate:n}),[Fl(t),Fl(n)])}function Fl(e){return Array.isArray(e)?e.join(" "):e}const Ds=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Yd(e,t,n){for(const r in t)!Oe(t[r])&&!Td(r,n)&&(e[r]=t[r])}function l0({transformTemplate:e},t){return S.useMemo(()=>{const n=Ds();return As(n,t,e),Object.assign({},n.vars,n.style)},[t])}function c0(e,t){const n=e.style||{},r={};return Yd(r,n,e),Object.assign(r,l0(e,t)),r}function u0(e,t){const n={},r=c0(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const Kd=()=>({...Ds(),attrs:{}});function d0(e,t,n,r){const o=S.useMemo(()=>{const s=Kd();return Bd(s,t,Fd(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Yd(s,e.style,e),o.style={...s,...o.style}}return o}const f0=["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 Rs(e){return typeof e!="string"||e.includes("-")?!1:!!(f0.indexOf(e)>-1||/[A-Z]/u.test(e))}function h0(e,t,n,{latestValues:r},o,s=!1,a){const u=(a??Rs(e)?d0:u0)(t,r,o,e),c=i0(t,typeof e=="string",s),d=e!==S.Fragment?{...c,...u,ref:n}:{},{children:h}=t,p=S.useMemo(()=>Oe(h)?h.get():h,[h]);return S.createElement(e,{...d,children:p})}function p0({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:m0(n,r,o,e),renderState:t()}}function m0(e,t,n,r){const o={},s=r(e,{});for(const p in s)o[p]=Wr(s[p]);let{initial:a,animate:l}=e;const u=ho(e),c=xd(e);t&&c&&!u&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const h=d?l:a;if(h&&typeof h!="boolean"&&!fo(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const g=ws(e,p[m]);if(g){const{transitionEnd:x,transition:y,...v}=g;for(const j in v){let w=v[j];if(Array.isArray(w)){const F=d?w.length-1:0;w=w[F]}w!==null&&(o[j]=w)}for(const j in x)o[j]=x[j]}}}return o}const qd=e=>(t,n)=>{const r=S.useContext(po),o=S.useContext(co),s=()=>p0(e,t,r,o);return n?s():as(s)},g0=qd({scrapeMotionValuesFromProps:Ls,createRenderState:Ds}),x0=qd({scrapeMotionValuesFromProps:Ad,createRenderState:Kd}),y0=Symbol.for("motionComponentSymbol");function b0(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(s=>{var l;s&&((l=e.onMount)==null||l.call(e,s));const a=r.current;if(typeof a=="function")if(s){const u=a(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):a(s);else a&&(a.current=s);t&&(s?t.mount(s):t.unmount())},[t])}const Xd=S.createContext({});function yn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function v0(e,t,n,r,o,s){var w,F;const{visualElement:a}=S.useContext(po),l=S.useContext(Ud),u=S.useContext(co),c=S.useContext(Is),d=c.reducedMotion,h=c.skipAnimations,p=S.useRef(null),m=S.useRef(!1);r=r||l.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:s}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const g=p.current,x=S.useContext(Xd);g&&!g.projection&&o&&(g.type==="html"||g.type==="svg")&&k0(p.current,n,o,x);const y=S.useRef(!1);S.useInsertionEffect(()=>{g&&y.current&&g.update(n,u)});const v=n[od],j=S.useRef(!!v&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,v))&&((F=window.MotionHasOptimisedAnimation)==null?void 0:F.call(window,v)));return gu(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),j.current&&g.animationState&&g.animationState.animateChanges())}),S.useEffect(()=>{g&&(!j.current&&g.animationState&&g.animationState.animateChanges(),j.current&&(queueMicrotask(()=>{var B;(B=window.MotionHandoffMarkAsComplete)==null||B.call(window,v)}),j.current=!1),g.enteringChildren=void 0)}),g}function k0(e,t,n,r){const{layoutId:o,layout:s,drag:a,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zd(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!a||l&&yn(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}function Zd(e){if(e)return e.options.allowProjection!==!1?e.projection:Zd(e.parent)}function _o(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&n0(r);const s=n?n==="svg":Rs(e),a=s?x0:g0;function l(c,d){let h;const p={...S.useContext(Is),...c,layoutId:w0(c)},{isStatic:m}=p,g=a0(c),x=a(c,m);if(!m&&typeof window<"u"){S0(p,r);const y=C0(p);h=y.MeasureLayout,g.visualElement=v0(e,x,p,o,y.ProjectionNode,s)}return i.jsxs(po.Provider,{value:g,children:[h&&g.visualElement?i.jsx(h,{visualElement:g.visualElement,...p}):null,h0(e,c,b0(x,g.visualElement,d),x,m,t,s)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=S.forwardRef(l);return u[y0]=e,u}function w0({layoutId:e}){const t=S.useContext(ss).id;return t&&e!==void 0?t+"-"+e:e}function S0(e,t){const n=S.useContext(Ud).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Fn(!1,r,"lazy-strict-mode"):Ft(!1,r,"lazy-strict-mode")}}function C0(e){const t=$d(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function j0(e,t){if(typeof Proxy>"u")return _o;const n=new Map,r=(s,a)=>_o(s,a,e,t),o=(s,a)=>(process.env.NODE_ENV!=="production"&&us(!1,"motion() is deprecated. Use motion.create() instead."),r(s,a));return new Proxy(o,{get:(s,a)=>a==="create"?r:(n.has(a)||n.set(a,_o(a,void 0,e,t)),n.get(a))})}const T0=(e,t)=>t.isSVG??Rs(e)?new nx(t):new Xg(t,{allowProjection:e!==S.Fragment});class B0 extends Nt{constructor(t){super(t),t.animationState||(t.animationState=ax(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();fo(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 E0=0;class F0 extends Nt{constructor(){super(...arguments),this.id=E0++,this.isExitComplete=!1}update(){var s;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:a,custom:l}=this.node.getProps();if(typeof a=="string"){const u=Qt(this.node,a,l);if(u){const{transition:c,transitionEnd:d,...h}=u;for(const p in h)(s=this.node.getValue(p))==null||s.jump(h[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.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 A0={animation:{Feature:B0},exit:{Feature:F0}};function pr(e){return{point:{x:e.pageX,y:e.pageY}}}const L0=e=>t=>Ts(t)&&e(t,pr(t));function er(e,t,n,r){return ar(e,t,L0(n),r)}const Jd=({current:e})=>e?e.ownerDocument.defaultView:null,Al=(e,t)=>Math.abs(e-t);function I0(e,t){const n=Al(e.x,t.x),r=Al(e.y,t.y);return Math.sqrt(n**2+r**2)}const Ll=new Set(["auto","scroll"]);class Qd{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:a=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=Br(this.lastRawMoveEventInfo,this.transformPagePoint));const m=No(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=I0(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;const{point:y}=m,{timestamp:v}=Pe;this.history.push({...y,timestamp:v});const{onStart:j,onMove:w}=this.handlers;g||(j&&j(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Br(g,this.transformPagePoint),ge.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:x,onSessionEnd:y,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const j=No(m.type==="pointercancel"?this.lastMoveEventInfo:Br(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,j),y&&y(m,j)},!Ts(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const u=pr(t),c=Br(u,this.transformPagePoint),{point:d}=c,{timestamp:h}=Pe;this.history=[{...d,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,No(c,this.history)),this.removeListeners=dr(er(this.contextWindow,"pointermove",this.handlePointerMove),er(this.contextWindow,"pointerup",this.handlePointerUp),er(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Ll.has(r.overflowX)||Ll.has(r.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 r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),ge.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),_t(this.updatePoint)}}function Br(e,t){return t?{point:t(e.point)}:e}function Il(e,t){return{x:e.x-t.x,y:e.y-t.y}}function No({point:e},t){return{point:e,delta:Il(e,ef(t)),offset:Il(e,D0(t)),velocity:R0(t,.1)}}function D0(e){return e[0]}function ef(e){return e[e.length-1]}function R0(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ef(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ke(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>Ke(t)*2&&(r=e[1]);const s=it(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function M0(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ye(n,e,r.max):Math.min(e,n)),e}function Dl(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 P0(e,{top:t,left:n,bottom:r,right:o}){return{x:Dl(e.x,n,o),y:Dl(e.y,t,r)}}function Rl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function O0(e,t){return{x:Rl(e.x,t.x),y:Rl(e.y,t.y)}}function z0(e,t){let n=.5;const r=He(e),o=He(t);return o>r?n=or(t.min,t.max-r,e.min):r>o&&(n=or(e.min,e.max-o,t.min)),jt(0,1,n)}function _0(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 Ii=.35;function N0(e=Ii){return e===!1?e=0:e===!0&&(e=Ii),{x:Ml(e,"left","right"),y:Ml(e,"top","bottom")}}function Ml(e,t,n){return{min:Pl(e,t),max:Pl(e,n)}}function Pl(e,t){return typeof e=="number"?e:e[t]||0}const V0=new WeakMap;class W0{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=Fe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=h=>{n&&this.snapToCursor(pr(h).point),this.stopAnimation()},a=(h,p)=>{const{drag:m,dragPropagation:g,onDragStart:x}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mg(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),yt(v=>{let j=this.getAxisMotionValue(v).get()||0;if(St.test(j)){const{projection:w}=this.visualElement;if(w&&w.layout){const F=w.layout.layoutBox[v];F&&(j=He(F)*(parseFloat(j)/100))}}this.originPoint[v]=j}),x&&ge.update(()=>x(h,p),!1,!0),Si(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:x,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=p;if(g&&this.currentDirection===null){this.currentDirection=U0(v),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",p.point,v),this.updateAxis("y",p.point,v),this.visualElement.render(),y&&ge.update(()=>y(h,p),!1,!0)},u=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new Qd(t,{onSessionStart:s,onStart:a,onMove:l,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Jd(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:l}=this.getProps();l&&ge.postRender(()=>l(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&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,r){const{drag:o}=this.getProps();if(!r||!Er(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=M0(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&yn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=P0(r.layoutBox,t):this.constraints=!1,this.elastic=N0(n),o!==this.constraints&&!yn(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&yt(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=_0(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!yn(t))return!1;const r=t.current;Ft(r!==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:o}=this.visualElement;if(!o||!o.layout)return!1;const s=Ug(r,o.root,this.visualElement.getTransformPagePoint());let a=O0(o.layout.layoutBox,s);if(n){const l=n(Vg(a));this.hasMutatedConstraints=!!l,l&&(a=kd(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},c=yt(d=>{if(!Er(d,n,this.currentDirection))return;let h=u&&u[d]||{};(a===!0||a===d)&&(h={min:0,max:0});const p=o?200:1e6,m=o?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...h};return this.startAxisValueAnimation(d,g)});return Promise.all(c).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Si(this.visualElement,t),r.start(ks(t,r,0,n,this.visualElement,!1))}stopAnimation(){yt(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){yt(n=>{const{drag:r}=this.getProps();if(!Er(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:l}=o.layout.layoutBox[n],u=s.get()||0;s.set(t[n]-ye(a,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!yn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};yt(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const u=l.get();o[a]=z0({min:u,max:u},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),yt(a=>{if(!Er(a,t,null))return;const l=this.getAxisMotionValue(a),{min:u,max:c}=this.constraints[a];l.set(ye(u,c,o[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;V0.set(this.visualElement,this);const t=this.visualElement.current,n=er(t,"pointerdown",c=>{const{drag:d,dragListener:h=!0}=this.getProps(),p=c.target,m=p!==t&&kg(p);d&&h&&!m&&this.start(c)});let r;const o=()=>{const{dragConstraints:c}=this.getProps();yn(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=H0(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,a=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ge.read(o);const l=ar(window,"resize",()=>this.scalePositionWithinConstraints()),u=s.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(yt(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=c[h].translate,p.set(p.get()+c[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),a(),u&&u(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:a=Ii,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:a,dragMomentum:l}}}function Ol(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function H0(e,t,n){const r=Ua(e,Ol(n)),o=Ua(t,Ol(n));return()=>{r(),o()}}function Er(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function U0(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $0 extends Nt{constructor(t){super(t),this.removeGroupControls=st,this.removeListeners=st,this.controls=new W0(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||st}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 Vo=e=>(t,n)=>{e&&ge.update(()=>e(t,n),!1,!0)};class G0 extends Nt{constructor(){super(...arguments),this.removePointerDownListener=st}onPointerDown(t){this.session=new Qd(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jd(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Vo(t),onStart:Vo(n),onMove:Vo(r),onEnd:(s,a)=>{delete this.session,o&&ge.postRender(()=>o(s,a))}}}mount(){this.removePointerDownListener=er(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 Wo=!1;class Y0 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),Wo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Hr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:a}=r;return a&&(a.isPresent=s,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),Wo=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||ge.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),js.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Wo=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function tf(e){const[t,n]=Hd(),r=S.useContext(ss);return i.jsx(Y0,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Xd),isPresent:t,safeToRemove:n})}const K0={pan:{Feature:G0},drag:{Feature:$0,ProjectionNode:Wd,MeasureLayout:tf}};function zl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&ge.postRender(()=>s(t,pr(t)))}class q0 extends Nt{mount(){const{current:t}=this.node;t&&(this.unmount=xg(t,(n,r)=>(zl(this.node,r,"Start"),o=>zl(this.node,o,"End"))))}unmount(){}}class X0 extends Nt{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=dr(ar(this.node.current,"focus",()=>this.onFocus()),ar(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function _l(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&ge.postRender(()=>s(t,pr(t)))}class Z0 extends Nt{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=Sg(t,(o,s)=>(_l(this.node,s,"Start"),(a,{success:l})=>_l(this.node,a,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Di=new WeakMap,Ho=new WeakMap,J0=e=>{const t=Di.get(e.target);t&&t(e)},Q0=e=>{e.forEach(J0)};function e2({root:e,...t}){const n=e||document;Ho.has(n)||Ho.set(n,{});const r=Ho.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Q0,{root:e,...t})),r[o]}function t2(e,t,n){const r=e2(t);return Di.set(e,n),r.observe(e),()=>{Di.delete(e),r.unobserve(e)}}const n2={some:0,all:1};class r2 extends Nt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var u;(u=this.stopObserver)==null||u.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:n2[o]},l=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,s&&!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(c)};this.stopObserver=t2(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(o2(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function o2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const i2={inView:{Feature:r2},tap:{Feature:Z0},focus:{Feature:X0},hover:{Feature:q0}},s2={layout:{ProjectionNode:Wd,MeasureLayout:tf}},a2={...A0,...i2,...K0,...s2},tt=j0(a2,T0);function Ct({label:e,children:t,placement:n="top",...r}){const[o,s]=S.useState(!1),a=S.useRef(null),l=S.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(pointer: coarse)").matches,[]);S.useEffect(()=>{if(!l||!o)return;const c=d=>{a.current&&!a.current.contains(d.target)&&s(!1)};return document.addEventListener("mousedown",c),document.addEventListener("touchstart",c,{passive:!0}),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("touchstart",c)}},[l,o]);const u=c=>{l&&(c.preventDefault(),c.stopPropagation(),s(d=>!d))};return i.jsxs(f.Tooltip.Root,{positioning:{placement:n},open:l?o:void 0,onOpenChange:l?c=>s(c.open):void 0,...r,children:[i.jsx(f.Tooltip.Trigger,{asChild:!0,children:i.jsx("span",{ref:a,style:{display:"inline-flex"},onClick:u,children:t})}),i.jsx(f.Tooltip.Positioner,{children:i.jsx(f.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"gray.700",boxShadow:"none",children:e})})]})}const l2={BASE_URL:"/",DEV:!1,MODE:"production",PACKAGE_VERSION:"0.1.22",PROD:!0,SSR:!1,VITE_STORYBOOK_URL:"https://medixdeck-ui.vercel.app",VITE_WHATSAPP_COMMUNITY_LINK:"https://medixdeck.com/whatsapp"},c2={blue:{solid:"#0685FF",hoverBgLight:"rgba(6,133,255,0.08)",hoverBgDark:"rgba(6,133,255,0.12)",activeBgLight:"rgba(6,133,255,0.10)",activeBgDark:"rgba(6,133,255,0.15)",activeBgDarkStrong:"rgba(6,133,255,0.18)",chakraToken:"blue.500"},purple:{solid:"#7700CC",hoverBgLight:"rgba(119,0,204,0.08)",hoverBgDark:"rgba(119,0,204,0.12)",activeBgLight:"rgba(119,0,204,0.10)",activeBgDark:"rgba(119,0,204,0.15)",activeBgDarkStrong:"rgba(119,0,204,0.18)",chakraToken:"purple.500"}},kt="#EF4444",Ri="rgba(239,68,68,0.08)",nf=()=>i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),i.jsx("path",{d:"M9 3v18"}),i.jsx("path",{d:"m14 9-3 3 3 3"})]}),rf=()=>i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),i.jsx("path",{d:"M9 3v18"}),i.jsx("path",{d:"m12 15 3-3-3-3"})]}),u2=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),i.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),i.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),d2=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),of=({open:e})=>i.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:i.jsx("polyline",{points:"6 9 12 15 18 9"})}),Mi=()=>i.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),i.jsx("polyline",{points:"16 17 21 12 16 7"}),i.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),f2=()=>i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),i.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),h2=()=>i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"3"}),i.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"})]}),p2=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"4"}),i.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),i.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),i.jsx("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),i.jsx("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),i.jsx("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),i.jsx("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),i.jsx("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),i.jsx("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),m2=()=>i.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),g2=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),i.jsx("line",{x1:"8",y1:"20",x2:"16",y2:"20"}),i.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"20"})]}),x2=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M10 2v7.31a2 2 0 0 1-.37 1.17L4.22 18A3 3 0 0 0 6.78 22h10.44a3 3 0 0 0 2.56-4l-5.41-7.52A2 2 0 0 1 14 9.31V2"}),i.jsx("line",{x1:"8.5",y1:"2",x2:"15.5",y2:"2"}),i.jsx("path",{d:"M8.5 14h7"})]}),y2=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),i.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),i.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),b2=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.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"}),i.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),i.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),v2=()=>i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),k2=(e,t)=>i.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function w2(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const Nl={warning:{bg:"#FFFBEB",border:"#FDE68A",text:"#92400E",darkBg:"rgba(245,158,11,0.12)",darkBorder:"rgba(245,158,11,0.25)",darkText:"#FDE68A",badgeBg:"#F59E0B",badgeColor:"#FFFFFF"},info:{bg:"#EFF6FF",border:"#BFDBFE",text:"#1E40AF",darkBg:"rgba(6,133,255,0.12)",darkBorder:"rgba(6,133,255,0.25)",darkText:"#93C5FD",badgeBg:"#0685FF",badgeColor:"#FFFFFF"},error:{bg:"#FEF2F2",border:"#FECACA",text:"#991B1B",darkBg:"rgba(239,68,68,0.12)",darkBorder:"rgba(239,68,68,0.25)",darkText:"#FCA5A5",badgeBg:"#EF4444",badgeColor:"#FFFFFF"},neutral:{bg:"bg.surface",border:"var(--chakra-colors-border)",text:"text.body",darkBg:"bg.surface",darkBorder:"var(--chakra-colors-border)",darkText:"text.heading",badgeBg:"#6B7280",badgeColor:"#FFFFFF"}};function S2(e){if(e&&e!=="auto")return{isNonProduction:e!=="production"&&e!=="live",detectedEnv:e};try{if(typeof process<"u"&&process&&process.env){const t=process.env.NODE_ENV,n=process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,r=process.env.MEDIX_ENV||process.env.NEXT_PUBLIC_MEDIX_ENV||process.env.PUBLIC_MEDIX_ENV,o=process.env.CONTEXT;if(r){const s=String(r).toLowerCase();if(s==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"};if(s==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(s==="test")return{isNonProduction:!0,detectedEnv:"test"};if(s==="dev"||s==="development")return{isNonProduction:!0,detectedEnv:"development"};if(s==="production"||s==="live")return{isNonProduction:!1,detectedEnv:"production"}}if(n==="preview")return{isNonProduction:!0,detectedEnv:"preview"};if(n==="development")return{isNonProduction:!0,detectedEnv:"development"};if(o==="deploy-preview"||o==="branch-deploy")return{isNonProduction:!0,detectedEnv:"preview"};if(t==="development")return{isNonProduction:!0,detectedEnv:"development"};if(t==="test")return{isNonProduction:!0,detectedEnv:"test"}}}catch{}try{if(typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:dn&&dn.tagName.toUpperCase()==="SCRIPT"&&dn.src||new URL("index.cjs",document.baseURI).href}<"u"&&{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:dn&&dn.tagName.toUpperCase()==="SCRIPT"&&dn.src||new URL("index.cjs",document.baseURI).href}&&l2){const t="production"}}catch{}if(typeof window<"u"&&window.location&&window.location.hostname){const t=window.location.hostname.toLowerCase();if(t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t==="0.0.0.0"||t.endsWith(".local")||t.endsWith(".test")||t.endsWith(".internal")||t.includes(".ngrok")||t.includes(".loca.lt"))return{isNonProduction:!0,detectedEnv:"development"};if(t.endsWith(".vercel.app")||t.endsWith(".netlify.app")||t.endsWith(".pages.dev")||t.endsWith(".amplifyapp.com")||t.endsWith(".onrender.com")||t.endsWith(".fly.dev")||t.endsWith(".azurestaticapps.net"))return{isNonProduction:!0,detectedEnv:"preview"};if(t.startsWith("sandbox.")||t.includes("-sandbox."))return{isNonProduction:!0,detectedEnv:"sandbox"};if(t.startsWith("staging.")||t.startsWith("stage.")||t.includes("-staging."))return{isNonProduction:!0,detectedEnv:"staging"};if(t.startsWith("test.")||t.startsWith("qa.")||t.includes("-test."))return{isNonProduction:!0,detectedEnv:"test"};if(t.startsWith("dev.")||t.includes("-dev."))return{isNonProduction:!0,detectedEnv:"development"}}return{isNonProduction:!1,detectedEnv:"production"}}function C2(e){switch(e){case"sandbox":return"SANDBOX ENVIRONMENT";case"staging":return"STAGING ENVIRONMENT";case"test":return"TEST ENVIRONMENT";case"preview":return"PREVIEW DEPLOYMENT";case"development":return"DEVELOPMENT MODE";default:return"NON-PRODUCTION ENVIRONMENT"}}function j2({detectedEnv:e,config:t,onDismiss:n}){const r=t.status??(e==="staging"||e==="preview"?"info":e==="test"?"error":"warning"),o=Nl[r]??Nl.warning,s=t.badgeLabel??C2(e),a=t.message??"You are in a non-production test/sandbox environment. Simulated patient records, transactions, and actions will not affect live data.",l=r==="info"?i.jsx(y2,{}):r==="error"?i.jsx(b2,{}):i.jsx(x2,{});return i.jsxs(f.Box,{as:"aside",role:"status","aria-live":"polite","aria-label":`${s}: ${a}`,position:"sticky",top:"0",zIndex:"banner",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"3",px:{base:"3",md:"5"},py:"2",minH:"36px",borderBottom:"1px solid",borderColor:o.border,bg:o.bg,color:o.text,_dark:{bg:o.darkBg,borderColor:o.darkBorder,color:o.darkText},transition:"background 0.2s ease, border-color 0.2s ease",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2.5",minW:"0",flex:"1",children:[i.jsx(f.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:o.badgeBg,children:l}),i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"2",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",fontFamily:"var(--font-body)",lineHeight:"1",flexShrink:0,style:{background:o.badgeBg,color:o.badgeColor},children:s}),i.jsx(f.Box,{as:"span",fontSize:"xs",fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",color:"inherit",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},display:{base:"none",sm:"inline-block"},children:a})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2.5",flexShrink:0,children:[t.action,t.dismissible&&i.jsx(f.Box,{as:"button",type:"button",onClick:n,"aria-label":"Dismiss environment banner",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"6",h:"6",borderRadius:"md",border:"none",bg:"transparent",color:"inherit",cursor:"pointer",opacity:.8,_hover:{opacity:1,bg:"blackAlpha.100"},_dark:{_hover:{bg:"whiteAlpha.100"}},_focusVisible:{outline:"2px solid",outlineColor:o.badgeBg,outlineOffset:"1px"},transition:"background 0.15s ease, opacity 0.15s ease",children:i.jsx(v2,{})})]})]})}const Fr=[{value:"light",label:"Light mode",shortLabel:"Light",icon:i.jsx(p2,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:i.jsx(m2,{})},{value:"system",label:"System theme",shortLabel:"System",icon:i.jsx(g2,{})}];function T2({scheme:e}){const{mounted:t,themeMode:n,themeSetting:r,setThemeMode:o}=ur(),[s,a]=S.useState(!1),l=S.useRef(null),u=t?r:void 0,c=Fr.find(p=>p.value===u)||Fr[0];S.useEffect(()=>{const p=m=>{l.current&&!l.current.contains(m.target)&&a(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const d=i.jsx(f.Box,{display:{base:"none",md:"flex"},alignItems:"center",gap:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"full",p:"1","aria-label":"Theme mode switcher",children:Fr.map(p=>{const m=u===p.value,g=p.value==="dark"?e.activeBgDarkStrong:p.value==="system"?e.hoverBgDark:e.hoverBgLight;return i.jsxs(f.Box,{as:"button",onClick:()=>{t&&o(p.value)},"aria-pressed":m,"aria-label":p.label,title:t&&p.value==="system"?`System theme (currently ${n})`:p.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:"3",borderRadius:"full",border:"none",bg:m?g:"transparent",color:m?e.chakraToken:"text.muted",opacity:t?1:.6,cursor:t?"pointer":"default",transition:"background 0.18s ease, color 0.18s ease, opacity 0.18s ease",_hover:t?{bg:m?g:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:e.chakraToken,outlineOffset:"2px"},children:[i.jsx(f.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:p.icon}),i.jsx(f.Box,{as:"span",fontSize:"xs",fontWeight:m?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:p.shortLabel})]},p.value)})}),h=i.jsxs(f.Box,{display:{base:"block",md:"none"},position:"relative",ref:l,children:[i.jsx(f.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:e.chakraToken,cursor:t?"pointer":"default",opacity:t?1:.6,_hover:t?{bg:"bg"}:void 0,onClick:()=>{t&&a(p=>!p)},"aria-label":"Theme mode switcher","aria-expanded":s,"aria-haspopup":"menu",children:c.icon}),s&&t&&i.jsx(f.Box,{role:"menu",position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"150px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:Fr.map(p=>{const m=u===p.value;return i.jsxs(f.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:m?e.hoverBgLight:"transparent",color:m?e.chakraToken:"text.body",cursor:"pointer",textAlign:"left",onClick:()=>{o(p.value),a(!1)},_hover:{bg:e.hoverBgLight,color:e.chakraToken},_dark:{bg:m?e.hoverBgDark:"transparent",_hover:{bg:e.hoverBgDark}},children:[i.jsx(f.Box,{flexShrink:0,children:p.icon}),i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:m?"600":"500",fontFamily:"var(--font-body)",children:p.label})]},p.value)})})]});return i.jsxs(i.Fragment,{children:[d,h]})}function Pi({item:e,renderLink:t,onClick:n,scheme:r,isCollapsed:o=!1}){var F;const[s,a]=S.useState(!1),[l,u]=S.useState(!1),[c,d]=S.useState(!1),h=S.useRef(null),p=e.isActive??!1,m=((F=e.subItems)==null?void 0:F.some(B=>B.isActive))??!1,[g,x]=S.useState(p||m),y=!!(e.subItems&&e.subItems.length>0),v=S.useId();S.useEffect(()=>{x(p||m)},[p,m]),S.useEffect(()=>{if(!c)return;const B=P=>{h.current&&!h.current.contains(P.target)&&d(!1)},C=P=>{P.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",B),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",B),document.removeEventListener("keydown",C)}},[c]);const j=p;if(o){if(y){const C=i.jsxs(f.Box,{as:"button","aria-label":e.label,"aria-haspopup":"menu","aria-expanded":c,onClick:()=>d(P=>!P),onFocus:P=>u(P.currentTarget.matches(":focus-visible")),onBlur:()=>u(!1),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",cursor:"pointer",position:"relative",style:{background:p||m?r.activeBgLight:s||c?r.hoverBgLight:"transparent",outline:l?`2px solid ${r.solid}`:void 0,outlineOffset:l?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:p||m?r.activeBgDark:s||c?r.hoverBgDark:"transparent"},children:[e.icon&&i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:p||m?r.solid:void 0,opacity:p||m?1:s||c?.85:.6},color:p||m?r.chakraToken:"text.body",children:e.icon}),m&&i.jsx(f.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:r.solid},"aria-hidden":"true"})]});return i.jsxs(f.Box,{position:"relative",ref:h,my:"0.5",display:"flex",justifyContent:"center",style:{zIndex:c?100:1},children:[c?C:i.jsx(Ct,{label:e.label,placement:"right",children:C}),c&&i.jsx(tt.div,{initial:{opacity:0,x:-6,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-4,scale:.98},transition:{duration:.16,ease:[0,0,.2,1]},style:{position:"absolute",left:"calc(100% + 8px)",top:0,zIndex:1500},children:i.jsxs(f.Box,{role:"menu","aria-label":e.label,bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"card",boxShadow:"none",py:"1.5",minW:"200px",maxW:"260px",children:[i.jsxs(f.Box,{px:"3.5",py:"1.5",fontSize:"xs",fontWeight:"700",color:"text.muted",fontFamily:"var(--font-heading)",borderBottom:"1px solid",borderColor:"border",mb:"1",display:"flex",alignItems:"center",gap:"2",children:[e.icon&&i.jsx(f.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",color:r.chakraToken,children:e.icon}),i.jsx(f.Box,{as:"span",children:e.label})]}),i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",px:"1",children:e.subItems.map(P=>i.jsx(Pi,{item:P,renderLink:t,onClick:()=>{d(!1),n==null||n()},scheme:r,isCollapsed:!1},P.href))})]})})]})}const B=i.jsx(Ct,{label:e.label,placement:"right",children:i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",my:"0.5",borderRadius:"lg",position:"relative","aria-label":e.label,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:n,style:{background:p?r.activeBgLight:s?r.hoverBgLight:"transparent",outline:l?`2px solid ${r.solid}`:void 0,outlineOffset:l?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:p?r.activeBgDark:s?r.hoverBgDark:"transparent"},children:[e.icon&&i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:j?r.solid:void 0,opacity:j?1:s?.85:.6},color:j?r.chakraToken:"text.body",children:e.icon}),typeof e.badge=="number"&&i.jsx(f.Box,{as:"span",position:"absolute",top:"-2px",right:"-2px",minW:"16px",h:"16px",px:"1",borderRadius:"full",fontSize:"9px",fontWeight:"700",lineHeight:"1",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{background:r.solid,color:"#fff"},children:e.badge>99?"99+":e.badge}),e.hasDot&&i.jsx(f.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:kt},"aria-label":"New notification"})]})});return t(e,B)}const w=i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",py:"2.5",borderRadius:"lg",borderLeftRadius:y?"lg":"none",borderTopLeftRadius:y?"lg":"none",borderBottomLeftRadius:y?"lg":"none",position:"relative",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:y?void 0:n,style:{background:p?r.activeBgLight:s?r.hoverBgLight:"transparent",boxShadow:p&&!y?`inset 3px 0 0 ${r.solid}`:void 0,outline:l?`2px solid ${r.solid}`:void 0,outlineOffset:l?"2px":void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:p?r.activeBgDark:s?r.hoverBgDark:"transparent"},children:[e.icon&&i.jsx(f.Box,{flexShrink:0,style:{color:j?r.solid:void 0,opacity:j?1:s?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:j?r.chakraToken:"text.body",children:e.icon}),i.jsx(f.Box,{as:"span",flex:"1",fontSize:"sm",fontWeight:j?"600":"500",fontFamily:"var(--font-body)",style:{color:j?r.solid:void 0,transition:"color 0.15s ease"},color:j?r.chakraToken:"text.body",children:e.label}),typeof e.badge=="number"&&!y&&i.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:r.solid,color:"#fff"},children:e.badge}),e.hasDot&&!y&&i.jsx(f.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:kt},"aria-label":"New notification"}),y&&i.jsx(f.Box,{flexShrink:0,color:"text.muted",children:i.jsx(of,{open:g})})]});return i.jsxs(i.Fragment,{children:[y?i.jsx("button",{type:"button","aria-expanded":g,"aria-controls":v,onClick:()=>x(B=>!B),onFocus:B=>{u(B.currentTarget.matches(":focus-visible"))},onBlur:()=>u(!1),style:{display:"block",width:"100%",background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:w}):t(e,w),y&&i.jsx(tt.div,{id:v,initial:!1,animate:g?{height:"auto",opacity:1}:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},style:{overflow:"hidden"},"aria-hidden":!g,children:i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"9",mt:"0.5",mb:"1",children:e.subItems.map(B=>i.jsx(Pi,{item:B,renderLink:t,onClick:n,scheme:r,isCollapsed:!1},B.href))})})]})}let Vl=!1;function B2(){if(typeof document>"u"||Vl)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
|
|
351
|
+
`),()=>{var P;(P=l.current)==null||P.removeAttribute("data-motion-pop-id"),C.contains(B)&&C.removeChild(B)}},[t]),i.jsx(Zx,{isPresent:t,childRef:l,sizeRef:u,pop:s,children:s===!1?e:be.cloneElement(e,{ref:h})})}const Qx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:a,anchorX:l,anchorY:u,root:c})=>{const d=as(e0),h=S.useId();let p=!0,m=S.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:o,onExitComplete:g=>{d.set(g,!0);for(const x of d.values())if(!x)return;r&&r()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,r]);return s&&p&&(m={...m}),S.useMemo(()=>{d.forEach((g,x)=>d.set(x,!1))},[n]),be.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=i.jsx(Jx,{pop:a==="popLayout",isPresent:n,anchorX:l,anchorY:u,root:c,children:e}),i.jsx(co.Provider,{value:m,children:e})};function e0(){return new Map}function Hd(e=!0){const t=S.useContext(co);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=S.useId();S.useEffect(()=>{if(e)return o(s)},[e]);const a=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const Tr=e=>e.key||"";function Tl(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const lr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:a=!1,anchorX:l="left",anchorY:u="top",root:c})=>{const[d,h]=Hd(a),p=S.useMemo(()=>Tl(e),[e]),m=a&&!d?[]:p.map(Tr),g=S.useRef(!0),x=S.useRef(p),y=as(()=>new Map),v=S.useRef(new Set),[j,w]=S.useState(p),[F,B]=S.useState(p);gu(()=>{g.current=!1,x.current=p;for(let A=0;A<F.length;A++){const E=Tr(F[A]);m.includes(E)?(y.delete(E),v.current.delete(E)):y.get(E)!==!0&&y.set(E,!1)}},[F,m.length,m.join("-")]);const C=[];if(p!==j){let A=[...p];for(let E=0;E<F.length;E++){const L=F[E],R=Tr(L);m.includes(R)||(A.splice(E,0,L),C.push(L))}return s==="wait"&&C.length&&(A=C),B(Tl(A)),w(p),null}process.env.NODE_ENV!=="production"&&s==="wait"&&F.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:P}=S.useContext(ss);return i.jsx(i.Fragment,{children:F.map(A=>{const E=Tr(A),L=a&&!d?!1:p===F||m.includes(E),R=()=>{if(v.current.has(E))return;if(y.has(E))v.current.add(E),y.set(E,!0);else return;let D=!0;y.forEach(N=>{N||(D=!1)}),D&&(P==null||P(),B(x.current),a&&(h==null||h()),r&&r())};return i.jsx(Qx,{isPresent:L,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:c,onExitComplete:L?void 0:R,anchorX:l,anchorY:u,children:A},E)})})},Ud=S.createContext({strict:!1}),Bl={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 El=!1;function t0(){if(El)return;const e={};for(const t in Bl)e[t]={isEnabled:n=>Bl[t].some(r=>!!n[r])};bd(e),El=!0}function $d(){return t0(),_g()}function n0(e){const t=$d();for(const n in e)t[n]={...t[n],...e[n]};bd(t)}const r0=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 eo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||r0.has(e)}let Gd=e=>!eo(e);function o0(e){typeof e=="function"&&(Gd=t=>t.startsWith("on")?!eo(t):e(t))}try{o0(require("@emotion/is-prop-valid").default)}catch{}function i0(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||Oe(e[o])||(Gd(o)||n===!0&&eo(o)||!t&&!eo(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const po=S.createContext({});function s0(e,t){if(ho(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sr(n)?n:void 0,animate:sr(r)?r:void 0}}return e.inherit!==!1?t:{}}function a0(e){const{initial:t,animate:n}=s0(e,S.useContext(po));return S.useMemo(()=>({initial:t,animate:n}),[Fl(t),Fl(n)])}function Fl(e){return Array.isArray(e)?e.join(" "):e}const Ds=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Yd(e,t,n){for(const r in t)!Oe(t[r])&&!Td(r,n)&&(e[r]=t[r])}function l0({transformTemplate:e},t){return S.useMemo(()=>{const n=Ds();return As(n,t,e),Object.assign({},n.vars,n.style)},[t])}function c0(e,t){const n=e.style||{},r={};return Yd(r,n,e),Object.assign(r,l0(e,t)),r}function u0(e,t){const n={},r=c0(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const Kd=()=>({...Ds(),attrs:{}});function d0(e,t,n,r){const o=S.useMemo(()=>{const s=Kd();return Bd(s,t,Fd(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Yd(s,e.style,e),o.style={...s,...o.style}}return o}const f0=["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 Rs(e){return typeof e!="string"||e.includes("-")?!1:!!(f0.indexOf(e)>-1||/[A-Z]/u.test(e))}function h0(e,t,n,{latestValues:r},o,s=!1,a){const u=(a??Rs(e)?d0:u0)(t,r,o,e),c=i0(t,typeof e=="string",s),d=e!==S.Fragment?{...c,...u,ref:n}:{},{children:h}=t,p=S.useMemo(()=>Oe(h)?h.get():h,[h]);return S.createElement(e,{...d,children:p})}function p0({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:m0(n,r,o,e),renderState:t()}}function m0(e,t,n,r){const o={},s=r(e,{});for(const p in s)o[p]=Wr(s[p]);let{initial:a,animate:l}=e;const u=ho(e),c=xd(e);t&&c&&!u&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const h=d?l:a;if(h&&typeof h!="boolean"&&!fo(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const g=ws(e,p[m]);if(g){const{transitionEnd:x,transition:y,...v}=g;for(const j in v){let w=v[j];if(Array.isArray(w)){const F=d?w.length-1:0;w=w[F]}w!==null&&(o[j]=w)}for(const j in x)o[j]=x[j]}}}return o}const qd=e=>(t,n)=>{const r=S.useContext(po),o=S.useContext(co),s=()=>p0(e,t,r,o);return n?s():as(s)},g0=qd({scrapeMotionValuesFromProps:Ls,createRenderState:Ds}),x0=qd({scrapeMotionValuesFromProps:Ad,createRenderState:Kd}),y0=Symbol.for("motionComponentSymbol");function b0(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(s=>{var l;s&&((l=e.onMount)==null||l.call(e,s));const a=r.current;if(typeof a=="function")if(s){const u=a(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):a(s);else a&&(a.current=s);t&&(s?t.mount(s):t.unmount())},[t])}const Xd=S.createContext({});function yn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function v0(e,t,n,r,o,s){var w,F;const{visualElement:a}=S.useContext(po),l=S.useContext(Ud),u=S.useContext(co),c=S.useContext(Is),d=c.reducedMotion,h=c.skipAnimations,p=S.useRef(null),m=S.useRef(!1);r=r||l.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:s}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const g=p.current,x=S.useContext(Xd);g&&!g.projection&&o&&(g.type==="html"||g.type==="svg")&&k0(p.current,n,o,x);const y=S.useRef(!1);S.useInsertionEffect(()=>{g&&y.current&&g.update(n,u)});const v=n[od],j=S.useRef(!!v&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,v))&&((F=window.MotionHasOptimisedAnimation)==null?void 0:F.call(window,v)));return gu(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),j.current&&g.animationState&&g.animationState.animateChanges())}),S.useEffect(()=>{g&&(!j.current&&g.animationState&&g.animationState.animateChanges(),j.current&&(queueMicrotask(()=>{var B;(B=window.MotionHandoffMarkAsComplete)==null||B.call(window,v)}),j.current=!1),g.enteringChildren=void 0)}),g}function k0(e,t,n,r){const{layoutId:o,layout:s,drag:a,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zd(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!a||l&&yn(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}function Zd(e){if(e)return e.options.allowProjection!==!1?e.projection:Zd(e.parent)}function _o(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&n0(r);const s=n?n==="svg":Rs(e),a=s?x0:g0;function l(c,d){let h;const p={...S.useContext(Is),...c,layoutId:w0(c)},{isStatic:m}=p,g=a0(c),x=a(c,m);if(!m&&typeof window<"u"){S0(p,r);const y=C0(p);h=y.MeasureLayout,g.visualElement=v0(e,x,p,o,y.ProjectionNode,s)}return i.jsxs(po.Provider,{value:g,children:[h&&g.visualElement?i.jsx(h,{visualElement:g.visualElement,...p}):null,h0(e,c,b0(x,g.visualElement,d),x,m,t,s)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=S.forwardRef(l);return u[y0]=e,u}function w0({layoutId:e}){const t=S.useContext(ss).id;return t&&e!==void 0?t+"-"+e:e}function S0(e,t){const n=S.useContext(Ud).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Fn(!1,r,"lazy-strict-mode"):Ft(!1,r,"lazy-strict-mode")}}function C0(e){const t=$d(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function j0(e,t){if(typeof Proxy>"u")return _o;const n=new Map,r=(s,a)=>_o(s,a,e,t),o=(s,a)=>(process.env.NODE_ENV!=="production"&&us(!1,"motion() is deprecated. Use motion.create() instead."),r(s,a));return new Proxy(o,{get:(s,a)=>a==="create"?r:(n.has(a)||n.set(a,_o(a,void 0,e,t)),n.get(a))})}const T0=(e,t)=>t.isSVG??Rs(e)?new nx(t):new Xg(t,{allowProjection:e!==S.Fragment});class B0 extends Nt{constructor(t){super(t),t.animationState||(t.animationState=ax(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();fo(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 E0=0;class F0 extends Nt{constructor(){super(...arguments),this.id=E0++,this.isExitComplete=!1}update(){var s;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:a,custom:l}=this.node.getProps();if(typeof a=="string"){const u=Qt(this.node,a,l);if(u){const{transition:c,transitionEnd:d,...h}=u;for(const p in h)(s=this.node.getValue(p))==null||s.jump(h[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.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 A0={animation:{Feature:B0},exit:{Feature:F0}};function pr(e){return{point:{x:e.pageX,y:e.pageY}}}const L0=e=>t=>Ts(t)&&e(t,pr(t));function er(e,t,n,r){return ar(e,t,L0(n),r)}const Jd=({current:e})=>e?e.ownerDocument.defaultView:null,Al=(e,t)=>Math.abs(e-t);function I0(e,t){const n=Al(e.x,t.x),r=Al(e.y,t.y);return Math.sqrt(n**2+r**2)}const Ll=new Set(["auto","scroll"]);class Qd{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:a=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=Br(this.lastRawMoveEventInfo,this.transformPagePoint));const m=No(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=I0(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;const{point:y}=m,{timestamp:v}=Pe;this.history.push({...y,timestamp:v});const{onStart:j,onMove:w}=this.handlers;g||(j&&j(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Br(g,this.transformPagePoint),ge.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:x,onSessionEnd:y,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const j=No(m.type==="pointercancel"?this.lastMoveEventInfo:Br(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,j),y&&y(m,j)},!Ts(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const u=pr(t),c=Br(u,this.transformPagePoint),{point:d}=c,{timestamp:h}=Pe;this.history=[{...d,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,No(c,this.history)),this.removeListeners=dr(er(this.contextWindow,"pointermove",this.handlePointerMove),er(this.contextWindow,"pointerup",this.handlePointerUp),er(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Ll.has(r.overflowX)||Ll.has(r.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 r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),ge.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),_t(this.updatePoint)}}function Br(e,t){return t?{point:t(e.point)}:e}function Il(e,t){return{x:e.x-t.x,y:e.y-t.y}}function No({point:e},t){return{point:e,delta:Il(e,ef(t)),offset:Il(e,D0(t)),velocity:R0(t,.1)}}function D0(e){return e[0]}function ef(e){return e[e.length-1]}function R0(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ef(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ke(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>Ke(t)*2&&(r=e[1]);const s=it(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function M0(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ye(n,e,r.max):Math.min(e,n)),e}function Dl(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 P0(e,{top:t,left:n,bottom:r,right:o}){return{x:Dl(e.x,n,o),y:Dl(e.y,t,r)}}function Rl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function O0(e,t){return{x:Rl(e.x,t.x),y:Rl(e.y,t.y)}}function z0(e,t){let n=.5;const r=He(e),o=He(t);return o>r?n=or(t.min,t.max-r,e.min):r>o&&(n=or(e.min,e.max-o,t.min)),jt(0,1,n)}function _0(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 Ii=.35;function N0(e=Ii){return e===!1?e=0:e===!0&&(e=Ii),{x:Ml(e,"left","right"),y:Ml(e,"top","bottom")}}function Ml(e,t,n){return{min:Pl(e,t),max:Pl(e,n)}}function Pl(e,t){return typeof e=="number"?e:e[t]||0}const V0=new WeakMap;class W0{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=Fe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=h=>{n&&this.snapToCursor(pr(h).point),this.stopAnimation()},a=(h,p)=>{const{drag:m,dragPropagation:g,onDragStart:x}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mg(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),yt(v=>{let j=this.getAxisMotionValue(v).get()||0;if(St.test(j)){const{projection:w}=this.visualElement;if(w&&w.layout){const F=w.layout.layoutBox[v];F&&(j=He(F)*(parseFloat(j)/100))}}this.originPoint[v]=j}),x&&ge.update(()=>x(h,p),!1,!0),Si(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:x,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=p;if(g&&this.currentDirection===null){this.currentDirection=U0(v),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",p.point,v),this.updateAxis("y",p.point,v),this.visualElement.render(),y&&ge.update(()=>y(h,p),!1,!0)},u=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new Qd(t,{onSessionStart:s,onStart:a,onMove:l,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Jd(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:l}=this.getProps();l&&ge.postRender(()=>l(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&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,r){const{drag:o}=this.getProps();if(!r||!Er(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=M0(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&yn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=P0(r.layoutBox,t):this.constraints=!1,this.elastic=N0(n),o!==this.constraints&&!yn(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&yt(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=_0(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!yn(t))return!1;const r=t.current;Ft(r!==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:o}=this.visualElement;if(!o||!o.layout)return!1;const s=Ug(r,o.root,this.visualElement.getTransformPagePoint());let a=O0(o.layout.layoutBox,s);if(n){const l=n(Vg(a));this.hasMutatedConstraints=!!l,l&&(a=kd(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},c=yt(d=>{if(!Er(d,n,this.currentDirection))return;let h=u&&u[d]||{};(a===!0||a===d)&&(h={min:0,max:0});const p=o?200:1e6,m=o?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...h};return this.startAxisValueAnimation(d,g)});return Promise.all(c).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Si(this.visualElement,t),r.start(ks(t,r,0,n,this.visualElement,!1))}stopAnimation(){yt(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){yt(n=>{const{drag:r}=this.getProps();if(!Er(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:l}=o.layout.layoutBox[n],u=s.get()||0;s.set(t[n]-ye(a,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!yn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};yt(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const u=l.get();o[a]=z0({min:u,max:u},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),yt(a=>{if(!Er(a,t,null))return;const l=this.getAxisMotionValue(a),{min:u,max:c}=this.constraints[a];l.set(ye(u,c,o[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;V0.set(this.visualElement,this);const t=this.visualElement.current,n=er(t,"pointerdown",c=>{const{drag:d,dragListener:h=!0}=this.getProps(),p=c.target,m=p!==t&&kg(p);d&&h&&!m&&this.start(c)});let r;const o=()=>{const{dragConstraints:c}=this.getProps();yn(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=H0(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,a=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ge.read(o);const l=ar(window,"resize",()=>this.scalePositionWithinConstraints()),u=s.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(yt(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=c[h].translate,p.set(p.get()+c[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),a(),u&&u(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:a=Ii,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:a,dragMomentum:l}}}function Ol(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function H0(e,t,n){const r=Ua(e,Ol(n)),o=Ua(t,Ol(n));return()=>{r(),o()}}function Er(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function U0(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $0 extends Nt{constructor(t){super(t),this.removeGroupControls=st,this.removeListeners=st,this.controls=new W0(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||st}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 Vo=e=>(t,n)=>{e&&ge.update(()=>e(t,n),!1,!0)};class G0 extends Nt{constructor(){super(...arguments),this.removePointerDownListener=st}onPointerDown(t){this.session=new Qd(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jd(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Vo(t),onStart:Vo(n),onMove:Vo(r),onEnd:(s,a)=>{delete this.session,o&&ge.postRender(()=>o(s,a))}}}mount(){this.removePointerDownListener=er(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 Wo=!1;class Y0 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),Wo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Hr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:a}=r;return a&&(a.isPresent=s,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),Wo=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||ge.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),js.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Wo=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function tf(e){const[t,n]=Hd(),r=S.useContext(ss);return i.jsx(Y0,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Xd),isPresent:t,safeToRemove:n})}const K0={pan:{Feature:G0},drag:{Feature:$0,ProjectionNode:Wd,MeasureLayout:tf}};function zl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&ge.postRender(()=>s(t,pr(t)))}class q0 extends Nt{mount(){const{current:t}=this.node;t&&(this.unmount=xg(t,(n,r)=>(zl(this.node,r,"Start"),o=>zl(this.node,o,"End"))))}unmount(){}}class X0 extends Nt{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=dr(ar(this.node.current,"focus",()=>this.onFocus()),ar(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function _l(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&ge.postRender(()=>s(t,pr(t)))}class Z0 extends Nt{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=Sg(t,(o,s)=>(_l(this.node,s,"Start"),(a,{success:l})=>_l(this.node,a,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Di=new WeakMap,Ho=new WeakMap,J0=e=>{const t=Di.get(e.target);t&&t(e)},Q0=e=>{e.forEach(J0)};function ey({root:e,...t}){const n=e||document;Ho.has(n)||Ho.set(n,{});const r=Ho.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Q0,{root:e,...t})),r[o]}function ty(e,t,n){const r=ey(t);return Di.set(e,n),r.observe(e),()=>{Di.delete(e),r.unobserve(e)}}const ny={some:0,all:1};class ry extends Nt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var u;(u=this.stopObserver)==null||u.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:ny[o]},l=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,s&&!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(c)};this.stopObserver=ty(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(oy(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function oy({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const iy={inView:{Feature:ry},tap:{Feature:Z0},focus:{Feature:X0},hover:{Feature:q0}},sy={layout:{ProjectionNode:Wd,MeasureLayout:tf}},ay={...A0,...iy,...K0,...sy},tt=j0(ay,T0);function Ct({label:e,children:t,placement:n="top",...r}){const[o,s]=S.useState(!1),a=S.useRef(null),l=S.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(pointer: coarse)").matches,[]);S.useEffect(()=>{if(!l||!o)return;const c=d=>{a.current&&!a.current.contains(d.target)&&s(!1)};return document.addEventListener("mousedown",c),document.addEventListener("touchstart",c,{passive:!0}),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("touchstart",c)}},[l,o]);const u=c=>{l&&(c.preventDefault(),c.stopPropagation(),s(d=>!d))};return i.jsxs(f.Tooltip.Root,{positioning:{placement:n},open:l?o:void 0,onOpenChange:l?c=>s(c.open):void 0,...r,children:[i.jsx(f.Tooltip.Trigger,{asChild:!0,children:i.jsx("span",{ref:a,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},onClick:u,children:t})}),i.jsx(f.Tooltip.Positioner,{children:i.jsx(f.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"gray.700",boxShadow:"none",children:e})})]})}const ly={BASE_URL:"/",DEV:!1,MODE:"production",PACKAGE_VERSION:"0.1.23",PROD:!0,SSR:!1,VITE_STORYBOOK_URL:"https://medixdeck-ui.vercel.app",VITE_WHATSAPP_COMMUNITY_LINK:"https://medixdeck.com/whatsapp"},cy={blue:{solid:"#0685FF",hoverBgLight:"rgba(6,133,255,0.08)",hoverBgDark:"rgba(6,133,255,0.12)",activeBgLight:"rgba(6,133,255,0.10)",activeBgDark:"rgba(6,133,255,0.15)",activeBgDarkStrong:"rgba(6,133,255,0.18)",chakraToken:"blue.500"},purple:{solid:"#7700CC",hoverBgLight:"rgba(119,0,204,0.08)",hoverBgDark:"rgba(119,0,204,0.12)",activeBgLight:"rgba(119,0,204,0.10)",activeBgDark:"rgba(119,0,204,0.15)",activeBgDarkStrong:"rgba(119,0,204,0.18)",chakraToken:"purple.500"}},kt="#EF4444",Ri="rgba(239,68,68,0.08)",nf=()=>i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),i.jsx("path",{d:"M9 3v18"}),i.jsx("path",{d:"m14 9-3 3 3 3"})]}),rf=()=>i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),i.jsx("path",{d:"M9 3v18"}),i.jsx("path",{d:"m12 15 3-3-3-3"})]}),uy=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),i.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),i.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),dy=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),of=({open:e})=>i.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:i.jsx("polyline",{points:"6 9 12 15 18 9"})}),Mi=()=>i.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),i.jsx("polyline",{points:"16 17 21 12 16 7"}),i.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),fy=()=>i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),i.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),hy=()=>i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"3"}),i.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"})]}),py=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"4"}),i.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),i.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),i.jsx("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),i.jsx("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),i.jsx("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),i.jsx("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),i.jsx("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),i.jsx("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),my=()=>i.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),gy=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),i.jsx("line",{x1:"8",y1:"20",x2:"16",y2:"20"}),i.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"20"})]}),xy=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M10 2v7.31a2 2 0 0 1-.37 1.17L4.22 18A3 3 0 0 0 6.78 22h10.44a3 3 0 0 0 2.56-4l-5.41-7.52A2 2 0 0 1 14 9.31V2"}),i.jsx("line",{x1:"8.5",y1:"2",x2:"15.5",y2:"2"}),i.jsx("path",{d:"M8.5 14h7"})]}),yy=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),i.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),i.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),by=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.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"}),i.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),i.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),vy=()=>i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),ky=(e,t)=>i.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function wy(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const Nl={warning:{bg:"#FFFBEB",border:"#FDE68A",text:"#92400E",darkBg:"rgba(245,158,11,0.12)",darkBorder:"rgba(245,158,11,0.25)",darkText:"#FDE68A",badgeBg:"#F59E0B",badgeColor:"#FFFFFF"},info:{bg:"#EFF6FF",border:"#BFDBFE",text:"#1E40AF",darkBg:"rgba(6,133,255,0.12)",darkBorder:"rgba(6,133,255,0.25)",darkText:"#93C5FD",badgeBg:"#0685FF",badgeColor:"#FFFFFF"},error:{bg:"#FEF2F2",border:"#FECACA",text:"#991B1B",darkBg:"rgba(239,68,68,0.12)",darkBorder:"rgba(239,68,68,0.25)",darkText:"#FCA5A5",badgeBg:"#EF4444",badgeColor:"#FFFFFF"},neutral:{bg:"bg.surface",border:"var(--chakra-colors-border)",text:"text.body",darkBg:"bg.surface",darkBorder:"var(--chakra-colors-border)",darkText:"text.heading",badgeBg:"#6B7280",badgeColor:"#FFFFFF"}};function Sy(e){if(e&&e!=="auto")return{isNonProduction:e!=="production"&&e!=="live",detectedEnv:e};try{if(typeof process<"u"&&process&&process.env){const t=process.env.NODE_ENV,n=process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,r=process.env.MEDIX_ENV||process.env.NEXT_PUBLIC_MEDIX_ENV||process.env.PUBLIC_MEDIX_ENV,o=process.env.CONTEXT;if(r){const s=String(r).toLowerCase();if(s==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"};if(s==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(s==="test")return{isNonProduction:!0,detectedEnv:"test"};if(s==="dev"||s==="development")return{isNonProduction:!0,detectedEnv:"development"};if(s==="production"||s==="live")return{isNonProduction:!1,detectedEnv:"production"}}if(n==="preview")return{isNonProduction:!0,detectedEnv:"preview"};if(n==="development")return{isNonProduction:!0,detectedEnv:"development"};if(o==="deploy-preview"||o==="branch-deploy")return{isNonProduction:!0,detectedEnv:"preview"};if(t==="development")return{isNonProduction:!0,detectedEnv:"development"};if(t==="test")return{isNonProduction:!0,detectedEnv:"test"}}}catch{}try{if(typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:dn&&dn.tagName.toUpperCase()==="SCRIPT"&&dn.src||new URL("index.cjs",document.baseURI).href}<"u"&&{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:dn&&dn.tagName.toUpperCase()==="SCRIPT"&&dn.src||new URL("index.cjs",document.baseURI).href}&&ly){const t="production"}}catch{}if(typeof window<"u"&&window.location&&window.location.hostname){const t=window.location.hostname.toLowerCase();if(t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t==="0.0.0.0"||t.endsWith(".local")||t.endsWith(".test")||t.endsWith(".internal")||t.includes(".ngrok")||t.includes(".loca.lt"))return{isNonProduction:!0,detectedEnv:"development"};if(t.endsWith(".vercel.app")||t.endsWith(".netlify.app")||t.endsWith(".pages.dev")||t.endsWith(".amplifyapp.com")||t.endsWith(".onrender.com")||t.endsWith(".fly.dev")||t.endsWith(".azurestaticapps.net"))return{isNonProduction:!0,detectedEnv:"preview"};if(t.startsWith("sandbox.")||t.includes("-sandbox."))return{isNonProduction:!0,detectedEnv:"sandbox"};if(t.startsWith("staging.")||t.startsWith("stage.")||t.includes("-staging."))return{isNonProduction:!0,detectedEnv:"staging"};if(t.startsWith("test.")||t.startsWith("qa.")||t.includes("-test."))return{isNonProduction:!0,detectedEnv:"test"};if(t.startsWith("dev.")||t.includes("-dev."))return{isNonProduction:!0,detectedEnv:"development"}}return{isNonProduction:!1,detectedEnv:"production"}}function Cy(e){switch(e){case"sandbox":return"SANDBOX ENVIRONMENT";case"staging":return"STAGING ENVIRONMENT";case"test":return"TEST ENVIRONMENT";case"preview":return"PREVIEW DEPLOYMENT";case"development":return"DEVELOPMENT MODE";default:return"NON-PRODUCTION ENVIRONMENT"}}function jy({detectedEnv:e,config:t,onDismiss:n}){const r=t.status??(e==="staging"||e==="preview"?"info":e==="test"?"error":"warning"),o=Nl[r]??Nl.warning,s=t.badgeLabel??Cy(e),a=t.message??"You are in a non-production test/sandbox environment. Simulated patient records, transactions, and actions will not affect live data.",l=r==="info"?i.jsx(yy,{}):r==="error"?i.jsx(by,{}):i.jsx(xy,{});return i.jsxs(f.Box,{as:"aside",role:"status","aria-live":"polite","aria-label":`${s}: ${a}`,position:"sticky",top:"0",zIndex:"banner",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"3",px:{base:"3",md:"5"},py:"2",minH:"36px",borderBottom:"1px solid",borderColor:o.border,bg:o.bg,color:o.text,_dark:{bg:o.darkBg,borderColor:o.darkBorder,color:o.darkText},transition:"background 0.2s ease, border-color 0.2s ease",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2.5",minW:"0",flex:"1",children:[i.jsx(f.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:o.badgeBg,children:l}),i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"2",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",fontFamily:"var(--font-body)",lineHeight:"1",flexShrink:0,style:{background:o.badgeBg,color:o.badgeColor},children:s}),i.jsx(f.Box,{as:"span",fontSize:"xs",fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",color:"inherit",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},display:{base:"none",sm:"inline-block"},children:a})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2.5",flexShrink:0,children:[t.action,t.dismissible&&i.jsx(f.Box,{as:"button",type:"button",onClick:n,"aria-label":"Dismiss environment banner",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"6",h:"6",borderRadius:"md",border:"none",bg:"transparent",color:"inherit",cursor:"pointer",opacity:.8,_hover:{opacity:1,bg:"blackAlpha.100"},_dark:{_hover:{bg:"whiteAlpha.100"}},_focusVisible:{outline:"2px solid",outlineColor:o.badgeBg,outlineOffset:"1px"},transition:"background 0.15s ease, opacity 0.15s ease",children:i.jsx(vy,{})})]})]})}const Fr=[{value:"light",label:"Light mode",shortLabel:"Light",icon:i.jsx(py,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:i.jsx(my,{})},{value:"system",label:"System theme",shortLabel:"System",icon:i.jsx(gy,{})}];function Ty({scheme:e}){const{mounted:t,themeMode:n,themeSetting:r,setThemeMode:o}=ur(),[s,a]=S.useState(!1),l=S.useRef(null),u=t?r:void 0,c=Fr.find(p=>p.value===u)||Fr[0];S.useEffect(()=>{const p=m=>{l.current&&!l.current.contains(m.target)&&a(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const d=i.jsx(f.Box,{display:{base:"none",md:"flex"},alignItems:"center",gap:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"full",p:"1","aria-label":"Theme mode switcher",children:Fr.map(p=>{const m=u===p.value,g=p.value==="dark"?e.activeBgDarkStrong:p.value==="system"?e.hoverBgDark:e.hoverBgLight;return i.jsxs(f.Box,{as:"button",onClick:()=>{t&&o(p.value)},"aria-pressed":m,"aria-label":p.label,title:t&&p.value==="system"?`System theme (currently ${n})`:p.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:"3",borderRadius:"full",border:"none",bg:m?g:"transparent",color:m?e.chakraToken:"text.muted",opacity:t?1:.6,cursor:t?"pointer":"default",transition:"background 0.18s ease, color 0.18s ease, opacity 0.18s ease",_hover:t?{bg:m?g:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:e.chakraToken,outlineOffset:"2px"},children:[i.jsx(f.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:p.icon}),i.jsx(f.Box,{as:"span",fontSize:"xs",fontWeight:m?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:p.shortLabel})]},p.value)})}),h=i.jsxs(f.Box,{display:{base:"block",md:"none"},position:"relative",ref:l,children:[i.jsx(f.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:e.chakraToken,cursor:t?"pointer":"default",opacity:t?1:.6,_hover:t?{bg:"bg"}:void 0,onClick:()=>{t&&a(p=>!p)},"aria-label":"Theme mode switcher","aria-expanded":s,"aria-haspopup":"menu",children:c.icon}),s&&t&&i.jsx(f.Box,{role:"menu",position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"150px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:Fr.map(p=>{const m=u===p.value;return i.jsxs(f.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:m?e.hoverBgLight:"transparent",color:m?e.chakraToken:"text.body",cursor:"pointer",textAlign:"left",onClick:()=>{o(p.value),a(!1)},_hover:{bg:e.hoverBgLight,color:e.chakraToken},_dark:{bg:m?e.hoverBgDark:"transparent",_hover:{bg:e.hoverBgDark}},children:[i.jsx(f.Box,{flexShrink:0,children:p.icon}),i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:m?"600":"500",fontFamily:"var(--font-body)",children:p.label})]},p.value)})})]});return i.jsxs(i.Fragment,{children:[d,h]})}function Pi({item:e,renderLink:t,onClick:n,scheme:r,isCollapsed:o=!1}){var F;const[s,a]=S.useState(!1),[l,u]=S.useState(!1),[c,d]=S.useState(!1),h=S.useRef(null),p=e.isActive??!1,m=((F=e.subItems)==null?void 0:F.some(B=>B.isActive))??!1,[g,x]=S.useState(p||m),y=!!(e.subItems&&e.subItems.length>0),v=S.useId();S.useEffect(()=>{x(p||m)},[p,m]),S.useEffect(()=>{if(!c)return;const B=P=>{h.current&&!h.current.contains(P.target)&&d(!1)},C=P=>{P.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",B),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",B),document.removeEventListener("keydown",C)}},[c]);const j=p;if(o){if(y){const C=i.jsxs(f.Box,{as:"button","aria-label":e.label,"aria-haspopup":"menu","aria-expanded":c,onClick:()=>d(P=>!P),onFocus:P=>u(P.currentTarget.matches(":focus-visible")),onBlur:()=>u(!1),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",cursor:"pointer",position:"relative",style:{background:p||m?r.activeBgLight:s||c?r.hoverBgLight:"transparent",outline:l?`2px solid ${r.solid}`:void 0,outlineOffset:l?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:p||m?r.activeBgDark:s||c?r.hoverBgDark:"transparent"},children:[e.icon&&i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:p||m?r.solid:void 0,opacity:p||m?1:s||c?.85:.6},color:p||m?r.chakraToken:"text.body",children:e.icon}),m&&i.jsx(f.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:r.solid},"aria-hidden":"true"})]});return i.jsxs(f.Box,{position:"relative",ref:h,my:"0.5",display:"flex",justifyContent:"center",style:{zIndex:c?100:1},children:[c?C:i.jsx(Ct,{label:e.label,placement:"right",children:C}),c&&i.jsx(tt.div,{initial:{opacity:0,x:-6,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-4,scale:.98},transition:{duration:.16,ease:[0,0,.2,1]},style:{position:"absolute",left:"calc(100% + 8px)",top:0,zIndex:1500},children:i.jsxs(f.Box,{role:"menu","aria-label":e.label,bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"card",boxShadow:"none",py:"1.5",minW:"200px",maxW:"260px",children:[i.jsxs(f.Box,{px:"3.5",py:"1.5",fontSize:"xs",fontWeight:"700",color:"text.muted",fontFamily:"var(--font-heading)",borderBottom:"1px solid",borderColor:"border",mb:"1",display:"flex",alignItems:"center",gap:"2",children:[e.icon&&i.jsx(f.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",color:r.chakraToken,children:e.icon}),i.jsx(f.Box,{as:"span",children:e.label})]}),i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",px:"1",children:e.subItems.map(P=>i.jsx(Pi,{item:P,renderLink:t,onClick:()=>{d(!1),n==null||n()},scheme:r,isCollapsed:!1},P.href))})]})})]})}const B=i.jsx(f.Box,{display:"flex",justifyContent:"center",alignItems:"center",w:"full",children:i.jsx(Ct,{label:e.label,placement:"right",children:i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",my:"0.5",borderRadius:"lg",position:"relative","aria-label":e.label,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:n,style:{background:p?r.activeBgLight:s?r.hoverBgLight:"transparent",outline:l?`2px solid ${r.solid}`:void 0,outlineOffset:l?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:p?r.activeBgDark:s?r.hoverBgDark:"transparent"},children:[e.icon&&i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:j?r.solid:void 0,opacity:j?1:s?.85:.6},color:j?r.chakraToken:"text.body",children:e.icon}),typeof e.badge=="number"&&i.jsx(f.Box,{as:"span",position:"absolute",top:"-2px",right:"-2px",minW:"16px",h:"16px",px:"1",borderRadius:"full",fontSize:"9px",fontWeight:"700",lineHeight:"1",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{background:r.solid,color:"#fff"},children:e.badge>99?"99+":e.badge}),e.hasDot&&i.jsx(f.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:kt},"aria-label":"New notification"})]})})});return t(e,B)}const w=i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",py:"2.5",borderRadius:"lg",borderLeftRadius:y?"lg":"none",borderTopLeftRadius:y?"lg":"none",borderBottomLeftRadius:y?"lg":"none",position:"relative",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:y?void 0:n,style:{background:p?r.activeBgLight:s?r.hoverBgLight:"transparent",boxShadow:p&&!y?`inset 3px 0 0 ${r.solid}`:void 0,outline:l?`2px solid ${r.solid}`:void 0,outlineOffset:l?"2px":void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:p?r.activeBgDark:s?r.hoverBgDark:"transparent"},children:[e.icon&&i.jsx(f.Box,{flexShrink:0,style:{color:j?r.solid:void 0,opacity:j?1:s?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:j?r.chakraToken:"text.body",children:e.icon}),i.jsx(f.Box,{as:"span",flex:"1",fontSize:"sm",fontWeight:j?"600":"500",fontFamily:"var(--font-body)",style:{color:j?r.solid:void 0,transition:"color 0.15s ease"},color:j?r.chakraToken:"text.body",children:e.label}),typeof e.badge=="number"&&!y&&i.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:r.solid,color:"#fff"},children:e.badge}),e.hasDot&&!y&&i.jsx(f.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:kt},"aria-label":"New notification"}),y&&i.jsx(f.Box,{flexShrink:0,color:"text.muted",children:i.jsx(of,{open:g})})]});return i.jsxs(i.Fragment,{children:[y?i.jsx("button",{type:"button","aria-expanded":g,"aria-controls":v,onClick:()=>x(B=>!B),onFocus:B=>{u(B.currentTarget.matches(":focus-visible"))},onBlur:()=>u(!1),style:{display:"block",width:"100%",background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:w}):t(e,w),y&&i.jsx(tt.div,{id:v,initial:!1,animate:g?{height:"auto",opacity:1}:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},style:{overflow:"hidden"},"aria-hidden":!g,children:i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"9",mt:"0.5",mb:"1",children:e.subItems.map(B=>i.jsx(Pi,{item:B,renderLink:t,onClick:n,scheme:r,isCollapsed:!1},B.href))})})]})}let Vl=!1;function By(){if(typeof document>"u"||Vl)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
|
|
352
352
|
@keyframes medixMobileNavIn {
|
|
353
353
|
from { transform: translateY(100%); opacity: 0; }
|
|
354
354
|
to { transform: translateY(0); opacity: 1; }
|
|
355
355
|
}
|
|
356
|
-
`,document.head.appendChild(e),Vl=!0}function E2({items:e,renderLink:t,scheme:n}){return S.useEffect(()=>{B2()},[]),i.jsx(f.Box,{as:"nav","aria-label":"Mobile bottom navigation",display:{base:"flex",md:"none"},position:"fixed",bottom:"0",left:"0",right:"0",zIndex:"docked",bg:"bg",borderTop:"1px solid",borderColor:"border",alignItems:"center",style:{minHeight:64,paddingBottom:"env(safe-area-inset-bottom, 0px)",boxShadow:"none",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",animation:"medixMobileNavIn 0.42s cubic-bezier(0.22,1,0.36,1) both"},children:e.slice(0,5).map(r=>{const o=r.isActive??!1,s=i.jsxs(tt.div,{whileTap:{scale:.82},transition:{type:"spring",stiffness:500,damping:30,mass:.7},style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,height:"100%",padding:"6px 4px 4px",cursor:"pointer",position:"relative",gap:4,textDecoration:"none",WebkitTapHighlightColor:"transparent"},children:[i.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:7,left:"50%",width:44,height:28,borderRadius:14,background:n.activeBgLight,transform:`translateX(-50%) scaleX(${o?1:0})`,opacity:o?1:0,transition:"transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.2s ease",pointerEvents:"none"}}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",zIndex:1,color:o?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",opacity:o?1:.6},children:[r.icon,typeof r.badge=="number"&&r.badge>0&&i.jsx("span",{"aria-label":`${r.badge} unread`,style:{position:"absolute",top:-5,right:-6,minWidth:16,height:16,borderRadius:8,background:n.solid,color:"#fff",fontSize:9,fontWeight:700,fontFamily:"var(--font-body)",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0 3px",lineHeight:1,boxShadow:"0 0 0 2px var(--chakra-colors-bg, #fff)",pointerEvents:"none"},children:r.badge>99?"99+":r.badge})]}),i.jsx(f.Box,{as:"span",fontSize:"2xs",fontWeight:o?"700":"500",fontFamily:"var(--font-body)",textAlign:"center",lineHeight:"1",position:"relative",zIndex:1,color:o?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",letterSpacing:o?"-0.01em":"0"},children:r.label})]}),a={label:r.label,href:r.href,isActive:r.isActive};return i.jsx(f.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},children:t(a,s)},r.href)})})}const F2={bronze:{label:"Bronze Clinician",color:"#92400E",ring:"#D97706",bg:"rgba(217,119,6,0.10)"},silver:{label:"Silver Clinician",color:"#475569",ring:"#94A3B8",bg:"rgba(148,163,184,0.10)"},gold:{label:"Gold Clinician",color:"#D97706",ring:"#F59E0B",bg:"rgba(245,158,11,0.10)"},platinum:{label:"Platinum Clinician",color:"#0284C7",ring:"#38BDF8",bg:"rgba(56,189,248,0.10)"},diamond:{label:"Diamond Clinician",color:"#7C3AED",ring:"#A78BFA",bg:"rgba(167,139,250,0.10)"}},A2=({color:e})=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"8",r:"6"}),i.jsx("path",{d:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11"})]}),L2=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("polyline",{points:"9 18 15 12 9 6"})});function I2({data:e,renderLink:t,isCollapsed:n=!1}){const r=F2[e.tier],o=e.name.split(" ").map(a=>a[0]).join("").slice(0,2).toUpperCase();if(n){const a=i.jsx(Ct,{label:`${e.role} — ${e.name} (${r.label}, ${e.medixScore} pts)`,placement:"right",children:i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",my:"3",mx:"auto","aria-label":`${e.role} ${e.name}`,cursor:e.link?"pointer":"default",children:i.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${r.ring}, ${r.color})`},children:e.avatarSrc?i.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx("div",{style:{width:36,height:36,borderRadius:"50%",background:r.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:r.color,fontFamily:"var(--font-heading)"},children:o})})})});return e.link?i.jsx(i.Fragment,{children:t({label:e.role,href:e.link},a)}):i.jsx(i.Fragment,{children:a})}const s=i.jsxs(f.Box,{mx:"3",my:"4",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",style:{cursor:e.link?"pointer":"default"},_hover:e.link?{borderColor:r.ring,boxShadow:`0 0 0 1px ${r.ring}40`}:void 0,transition:"border-color 0.15s ease, box-shadow 0.15s ease",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",pt:"3",pb:"2.5",children:[i.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${r.ring}, ${r.color})`},children:e.avatarSrc?i.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:r.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:r.color,fontFamily:"var(--font-heading)"},children:o})}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",color:"text.heading",lineHeight:"1.2",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.role}),i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",lineHeight:"1.3",mt:"0.5",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.name})]}),e.link&&i.jsx(f.Box,{color:"text.muted",flexShrink:0,children:i.jsx(L2,{})})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border"}),i.jsxs(f.Box,{px:"3",pt:"2",pb:"2.5",children:[i.jsx(f.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[i.jsx(A2,{color:r.color}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:r.color,whiteSpace:"nowrap"},children:r.label}),i.jsxs(f.Box,{fontSize:"sm",fontWeight:"500",color:"text.heading",fontFamily:"var(--font-body)",ml:"1",style:{whiteSpace:"nowrap"},children:[e.medixScore.toLocaleString()," ",Number(e.medixScore)===1?"pt":"pts"]})]})]})]});return e.link?i.jsx(i.Fragment,{children:t({label:e.role,href:e.link},s)}):i.jsx(i.Fragment,{children:s})}function D2({logo:e,collapsedLogo:t,navGroups:n,isOpen:r,onClose:o,onLogout:s,renderLink:a,sidebarWidth:l,collapsedSidebarWidth:u,isCollapsed:c,collapsible:d,onToggleCollapse:h,collapseTogglePlacement:p,scheme:m,scoreCard:g}){const[x,y]=S.useState(!1);return i.jsxs(i.Fragment,{children:[r&&i.jsx(f.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:o,"aria-hidden":"true"}),i.jsxs(f.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:{base:`${l}px`,md:`${c?u:l}px`},zIndex:{base:"modal",md:c?1200:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:r?"translateX(0)":`translateX(-${l+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1), width 0.22s cubic-bezier(0.2,0,0,1)",children:[i.jsxs(f.Box,{h:c?{base:"16",md:"auto"}:"16",minH:c?{base:"16",md:"84px"}:"16",px:c?{base:"5",md:"2"}:"5",py:c?{base:"0",md:"3"}:"0",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",children:[i.jsxs(f.Box,{display:{base:"none",md:c?"flex":"none"},flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2",w:"full",children:[i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:t??i.jsx(tn,{type:"icon",variant:m.chakraToken==="blue.500"?"blue":"purple",height:26})}),d&&(p==="sidebar-header"||p==="both")&&i.jsx(Ct,{label:"Expand sidebar",placement:"right",children:i.jsx(f.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:h,"aria-label":"Expand sidebar",transition:"background 0.15s ease, color 0.15s ease",children:i.jsx(rf,{})})})]}),i.jsxs(f.Box,{display:{base:"flex",md:c?"none":"flex"},alignItems:"center",justifyContent:"space-between",w:"full",minW:"0",children:[i.jsx(f.Box,{flex:"1",minW:"0",overflow:"hidden",children:e}),d&&(p==="sidebar-header"||p==="both")&&i.jsx(Ct,{label:"Collapse sidebar",placement:"bottom",children:i.jsx(f.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:h,"aria-label":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:i.jsx(nf,{})})})]})]}),g&&i.jsx(f.Box,{display:{base:"none",md:"block"},flexShrink:0,pt:c?"1":"3",children:i.jsx(I2,{data:g,renderLink:a,isCollapsed:c})}),i.jsx(f.Box,{flex:"1",overflowY:c?"visible":"auto",overflowX:c?"visible":"hidden",position:"relative",py:"3",px:c?"2":"3",children:n.map((v,j)=>i.jsxs(f.Box,{mb:c?"2":"4",children:[v.groupLabel&&(c?j>0?i.jsx(f.Box,{h:"1px",bg:"border",mx:"2",my:"2"}):null:i.jsx(f.Box,{px:"3",pb:"2",pt:j>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:v.groupLabel})),i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:c?"1.5":"0.5",children:v.items.map(w=>i.jsx(Pi,{item:w,renderLink:a,onClick:o,scheme:m,isCollapsed:c},w.href))})]},j))}),i.jsx(f.Box,{px:c?"2":"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",children:c?i.jsx(Ct,{label:"Log out",placement:"right",children:i.jsx(f.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"full",h:"10",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onClick:()=>{o(),s==null||s()},style:{background:x?Ri:"transparent",color:kt,transition:"background 0.15s ease"},children:i.jsx(f.Box,{flexShrink:0,style:{color:kt},children:i.jsx(Mi,{})})})}):i.jsxs(f.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"3",w:"full",px:"3",py:"2.5",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onClick:()=>{o(),s==null||s()},style:{background:x?Ri:"transparent",color:kt,transition:"background 0.15s ease"},children:[i.jsx(f.Box,{flexShrink:0,style:{color:kt},children:i.jsx(Mi,{})}),i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:kt},children:"Log out"})]})})]})]})}function R2({user:e,greeting:t,greetingSubtext:n,isSidebarOpen:r,onMenuToggle:o,sidebarWidth:s,topBarSlot:a,dropdownItems:l,onLogout:u,scheme:c,collapsible:d=!0,isCollapsed:h=!1,onToggleCollapse:p,collapseTogglePlacement:m="sidebar-header"}){const[g,x]=S.useState(!1),y=S.useRef(null),v=S.useId(),j=`user-menu-button-${v}`,w=`user-menu-dropdown-${v}`;return S.useEffect(()=>{const F=B=>{y.current&&!y.current.contains(B.target)&&x(!1)};return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[]),i.jsxs(f.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",minH:"16",maxH:"16",flexShrink:0,display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[i.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":r?"Close navigation menu":"Open navigation menu","aria-expanded":r,children:r?i.jsx(d2,{}):i.jsx(u2,{})}),d&&(m==="topbar"||m==="both")&&i.jsx(Ct,{label:h?"Expand sidebar":"Collapse sidebar",placement:"bottom",children:i.jsx(f.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:p,"aria-label":h?"Expand sidebar":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:h?i.jsx(rf,{}):i.jsx(nf,{})})}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",i.jsx(f.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),n&&i.jsx(f.Box,{as:"p",fontSize:{base:"2xs",md:"xs"},fontWeight:"400",fontFamily:"var(--font-body)",color:"text.heading",mt:"0.5",lineHeight:"1.4",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n})]}),a,i.jsx(T2,{scheme:c}),i.jsxs(f.Box,{position:"relative",ref:y,children:[i.jsxs(f.Box,{as:"button",id:j,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>x(F=>!F),"aria-haspopup":"menu","aria-expanded":g,"aria-controls":g?w:void 0,"aria-label":"User menu",children:[i.jsx(lo,{name:e.name,src:e.avatarSrc,size:"sm"}),i.jsx(f.Box,{color:"text.muted",children:i.jsx(of,{open:g})})]}),g&&i.jsxs(f.Box,{role:"menu","aria-labelledby":j,id:w,position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"200px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:[i.jsxs(f.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!l&&i.jsxs(i.Fragment,{children:[i.jsx(Ar,{icon:i.jsx(f2,{}),label:"My Profile",onClick:()=>x(!1),scheme:c}),i.jsx(Ar,{icon:i.jsx(h2,{}),label:"Settings",onClick:()=>x(!1),scheme:c})]}),l==null?void 0:l.map((F,B)=>i.jsx(Ar,{icon:F.icon,label:F.label,isDanger:F.isDanger,onClick:()=>{var C;x(!1),(C=F.onClick)==null||C.call(F)},scheme:c},B)),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),i.jsx(Ar,{icon:i.jsx(Mi,{}),label:"Log out",isDanger:!0,onClick:()=>{x(!1),u==null||u()},scheme:c})]})]})]})}function Ar({icon:e,label:t,isDanger:n,onClick:r,scheme:o}){const[s,a]=S.useState(!1);return i.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:r,style:{background:s?n?Ri:o.hoverBgLight:"transparent",color:n?kt:void 0,transition:"background 0.12s ease"},children:[e&&i.jsx(f.Box,{flexShrink:0,style:{color:n?kt:void 0},color:"text.muted",children:e}),i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?kt:void 0},color:n?void 0:"text.body",children:t})]})}function sf({children:e,logo:t,navGroups:n,user:r,greeting:o,greetingSubtext:s,onLogout:a,renderLink:l=k2,dropdownItems:u,topBarSlot:c,sidebarWidth:d=220,collapsedSidebarWidth:h=68,collapsible:p=!0,defaultCollapsed:m=!1,isCollapsed:g,onCollapseChange:x,collapsedLogo:y,collapseTogglePlacement:v="sidebar-header",colorScheme:j="blue",mobileNavItems:w,scoreCard:F,environment:B="auto",showEnvironmentBanner:C,environmentBanner:P,environmentBannerSlot:A,...E}){const[L,R]=S.useState(!1),[D,N]=S.useState(m),[O,I]=S.useState(!1),[M,H]=S.useState(!1);S.useEffect(()=>{H(!0)},[]);const W=p&&(g!==void 0?g:D),$=()=>{if(!p)return;const ee=!W;g===void 0&&N(ee),x==null||x(ee)},b=c2[j],Y=!!(w&&w.length>0),oe=o??w2(),T=t??i.jsx(tn,{variant:j,height:26}),ie=y??i.jsx(tn,{type:"icon",variant:j,height:26}),se=P||{},X=se.environment||B,{isNonProduction:Z,detectedEnv:Q}=S2(X),ue=!O&&(C!==void 0?C:M?Z:X!=="production"&&X!=="live");return i.jsxs(f.Box,{display:"flex",minH:"100vh",bg:"bg",...E,children:[i.jsx(D2,{logo:T,collapsedLogo:ie,navGroups:n,isOpen:L,onClose:()=>R(!1),onLogout:a,renderLink:l,sidebarWidth:d,collapsedSidebarWidth:h,isCollapsed:W,collapsible:p,onToggleCollapse:$,collapseTogglePlacement:v,scheme:b,scoreCard:F}),i.jsxs(f.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${W?h:d}px`},transition:"margin-left 0.22s cubic-bezier(0.2,0,0,1)",children:[ue&&(A??i.jsx(j2,{detectedEnv:Q,config:se,onDismiss:()=>{var ee;I(!0),(ee=se.onDismiss)==null||ee.call(se)}})),i.jsx(R2,{user:r,greeting:oe,greetingSubtext:s,isSidebarOpen:L,onMenuToggle:()=>R(ee=>!ee),sidebarWidth:d,topBarSlot:c,dropdownItems:u,onLogout:a,scheme:b,collapsible:p,isCollapsed:W,onToggleCollapse:$,collapseTogglePlacement:v}),i.jsx(f.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:Y?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:e})]}),Y&&i.jsx(E2,{items:w,renderLink:l,scheme:b})]})}sf.displayName="MedixDashboardLayout";const to=[0,0,.2,1],Ms=[.4,0,1,1],Ps=[.22,1,.36,1],M2={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Ps}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Ms}}},P2={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},Wl={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:to}}},O2={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:to,delay:.18}}},z2={hidden:{opacity:0,y:-6,scale:.98,transformOrigin:"top"},visible:{opacity:1,y:0,scale:1,transformOrigin:"top",transition:{duration:.18,ease:Ps}},exit:{opacity:0,y:-4,scale:.98,transformOrigin:"top",transition:{duration:.12,ease:Ms}}},_2={hidden:{opacity:0,height:0,overflow:"hidden"},visible:{opacity:1,height:"auto",overflow:"hidden",transition:{duration:.22,ease:Ps}},exit:{opacity:0,height:0,overflow:"hidden",transition:{duration:.16,ease:Ms}}},N2={blue:{solid:"#0685FF",hover:"#0685FF",hoverBg:"blue.50",hoverBgDark:"rgba(6,133,255,0.12)",badgeBg:"#EFF6FF",badgeColor:"#0685FF",badgeBgDark:"rgba(6,133,255,0.20)",badgeColorDark:"#60A5FA"},purple:{solid:"#7700CC",hover:"#7700CC",hoverBg:"purple.50",hoverBgDark:"rgba(119,0,204,0.12)",badgeBg:"#FAF5FF",badgeColor:"#7700CC",badgeBgDark:"rgba(119,0,204,0.20)",badgeColorDark:"#C084FC"}},V2=()=>i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),i.jsx("polyline",{points:"7 7 17 7 17 17"})]});function af({isOpen:e}){return i.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 cubic-bezier(0.22, 1, 0.36, 1)",transform:e?"rotate(180deg)":"rotate(0deg)",flexShrink:0},children:i.jsx("polyline",{points:"6 9 12 15 18 9"})})}function no(){return i.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.65,flexShrink:0},children:[i.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),i.jsx("polyline",{points:"15 3 21 3 21 9"}),i.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function W2({color:e}){return i.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),i.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function H2({color:e}){return i.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),i.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"})]})}const U2=(e,t)=>{const n=e.href??"#",r=e.target??(e.isExternal?"_blank":void 0),o=e.rel??(e.isExternal?"noopener noreferrer":void 0);return n==="#"&&!e.onClick?i.jsx("span",{style:{textDecoration:"none",display:"contents"},children:t}):i.jsx("a",{href:n,target:r,rel:o,onClick:e.onClick,style:{textDecoration:"none",display:"contents"},children:t})};function jn({badge:e,scheme:t}){return e?S.isValidElement(e)?e:i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"1.5",py:"0.5",fontSize:"10px",fontWeight:"semibold",lineHeight:"1",borderRadius:"badge",bg:t.badgeBg,color:t.badgeColor,_dark:{bg:t.badgeBgDark,color:t.badgeColorDark},border:"1px solid",borderColor:t.badgeColor,style:{borderColor:"currentColor",opacity:.9},children:e}):null}function $2({item:e,scheme:t,renderLink:n}){var d;const[r,o]=S.useState(!1),s=S.useRef(null),a=S.useRef(null),l=!!(e.children&&e.children.length>0);S.useEffect(()=>{if(!r)return;function h(m){s.current&&!s.current.contains(m.target)&&o(!1)}function p(m){m.key==="Escape"&&o(!1)}return document.addEventListener("mousedown",h),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",p)}},[r]);const u=()=>{a.current&&(clearTimeout(a.current),a.current=null),l&&o(!0)},c=()=>{l&&(a.current=setTimeout(()=>{o(!1)},150))};return l?i.jsxs(f.Box,{as:"li",ref:s,listStyleType:"none",position:"relative",onMouseEnter:u,onMouseLeave:c,children:[i.jsxs(f.Box,{as:"button","aria-haspopup":"menu","aria-expanded":r,onClick:()=>o(!r),display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||r?t.hover:"text.body",bg:r?t.hoverBg:"transparent",_dark:{color:e.isActive||r?t.hover:"text.body",bg:r?t.hoverBgDark:"transparent",_hover:{color:t.hover,bg:t.hoverBgDark}},borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},children:[e.icon&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),i.jsx("span",{children:e.label}),i.jsx(jn,{badge:e.badge,scheme:t}),i.jsx(af,{isOpen:r})]}),i.jsx(lr,{children:r&&i.jsx(tt.div,{variants:z2,initial:"hidden",animate:"visible",exit:"exit",style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:1e3},children:i.jsx(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"2",minW:"260px",maxW:"380px",display:"flex",flexDirection:"column",gap:"1",role:"menu","aria-label":e.label,children:(d=e.children)==null?void 0:d.map((h,p)=>i.jsx(f.Box,{as:"div",role:"none",children:n(h,i.jsxs(f.Box,{as:"span",role:"menuitem",display:"flex",alignItems:"flex-start",gap:"3",p:"2.5",borderRadius:"md",cursor:"pointer",transition:"all 0.15s ease",color:"text.heading",_hover:{bg:t.hoverBg,color:t.hover},_dark:{color:"text.heading",_hover:{bg:t.hoverBgDark,color:t.hover}},onClick:()=>o(!1),children:[h.icon&&i.jsx(f.Box,{as:"span",w:"8",h:"8",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:h.icon}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",justifyContent:"space-between",children:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",children:[i.jsx("span",{children:h.label}),h.isExternal&&i.jsx(no,{})]}),i.jsx(jn,{badge:h.badge,scheme:t})]}),h.description&&i.jsx(f.Box,{as:"span",display:"block",fontSize:"xs",color:"text.muted",_dark:{color:"text.muted"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.4",children:h.description})]})]}))},h.href||`${h.label}-${p}`))})})})]}):i.jsx(f.Box,{as:"li",listStyleType:"none",children:n(e,i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{bg:t.hoverBgDark,color:t.hover}},borderRadius:"md",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},cursor:"pointer",children:[e.icon&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),i.jsx("span",{children:e.label}),i.jsx(jn,{badge:e.badge,scheme:t}),e.isExternal&&i.jsx(no,{})]}))})}function G2({item:e,scheme:t,renderLink:n,onCloseMenu:r}){var l;const[o,s]=S.useState(!1);return!(e.children&&e.children.length>0)?i.jsx(tt.li,{variants:Wl,children:n(e,i.jsxs(f.Box,{as:"span",display:"flex",alignItems:"center",justifyContent:"space-between",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:r,children:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),i.jsx("span",{children:e.label})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[i.jsx(jn,{badge:e.badge,scheme:t}),e.isExternal&&i.jsx(no,{})]})]}))}):i.jsxs(tt.li,{variants:Wl,style:{listStyle:"none"},children:[i.jsxs(f.Box,{as:"button",onClick:()=>s(!o),"aria-expanded":o,display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||o?t.hover:"text.body",bg:o?"bg.subtle":"transparent",_dark:{color:e.isActive||o?t.hover:"text.body",bg:o?"bg.subtle":"transparent",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",border:"none",cursor:"pointer",textAlign:"left",transition:"background 0.15s ease, color 0.15s ease",_hover:{color:t.hover,bg:"bg.subtle"},children:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),i.jsx("span",{children:e.label})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[i.jsx(jn,{badge:e.badge,scheme:t}),i.jsx(af,{isOpen:o})]})]}),i.jsx(lr,{children:o&&i.jsx(tt.div,{variants:_2,initial:"hidden",animate:"visible",exit:"exit",children:i.jsx(f.Box,{pl:"4",pr:"2",py:"1.5",display:"flex",flexDirection:"column",gap:"1",borderLeft:"2px solid",borderColor:"border",ml:"4",my:"1",children:(l=e.children)==null?void 0:l.map((u,c)=>i.jsx(f.Box,{as:"div",children:n(u,i.jsxs(f.Box,{as:"span",display:"flex",alignItems:"flex-start",gap:"2.5",px:"2.5",py:"2",borderRadius:"md",color:"text.body",_dark:{color:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:r,children:[u.icon&&i.jsx(f.Box,{as:"span",w:"6",h:"6",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:u.icon}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1",children:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-heading)",children:[i.jsx("span",{children:u.label}),u.isExternal&&i.jsx(no,{})]}),i.jsx(jn,{badge:u.badge,scheme:t})]}),u.description&&i.jsx(f.Box,{as:"span",display:"block",fontSize:"xs",color:"text.muted",_dark:{color:"text.muted"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.3",children:u.description})]})]}))},u.href||`${u.label}-${c}`))})})})]})}function Y2({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:r="Get Started",ctaHref:o,onCtaClick:s,ctaIconHref:a,onCtaIconClick:l,secondaryCtaLabel:u,secondaryCtaHref:c,onSecondaryCtaClick:d,ctaSlot:h,renderLink:p=U2,isSticky:m=!1,colorScheme:g="blue",variant:x="solid",...y}){const[v,j]=S.useState(!1),w=N2[g],F=a??o,B=l??s,C=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},P=({mobile:A=!1})=>i.jsxs(f.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:A?"column":"row",children:[u&&i.jsx(Ye,{as:c?"a":"button",href:c,variant:A?"outline":"ghost",colorScheme:g,size:A?"md":"sm",onClick:()=>{d==null||d(),A&&j(!1)},style:A?{width:"100%"}:void 0,children:u}),i.jsx(Ye,{as:o?"a":"button",href:o,variant:"solid",colorScheme:g,size:A?"md":"sm",onClick:()=>{s==null||s(),A&&j(!1)},style:A?{width:"100%"}:void 0,children:r}),!A&&i.jsx(Ye,{as:F?"a":"button",href:F,target:F&&F!==o?"_blank":void 0,rel:F&&F!==o?"noopener noreferrer":void 0,variant:"solid",colorScheme:g,size:"sm",onClick:B,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:i.jsx(V2,{})})]});return i.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:m?"sticky":"relative",top:m?"0":void 0,zIndex:m?"sticky":40,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",...y,children:[i.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:[i.jsx(f.Box,{flexShrink:0,children:e??i.jsx(tn,{variant:g==="blue"?"blue":"purple",height:28})}),i.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((A,E)=>i.jsx($2,{item:A,scheme:w,renderLink:p},A.href||`${A.label}-${E}`))}),i.jsx(f.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:h??i.jsx(P,{})}),i.jsx(f.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>j(!v),"aria-label":v?"Close menu":"Open menu","aria-expanded":v,position:"relative",width:"32px",height:"32px",flexShrink:0,children:i.jsx(lr,{mode:"wait",initial:!1,children:v?i.jsx(tt.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:to},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:i.jsx(H2,{color:w.solid})},"close"):i.jsx(tt.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:to},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:i.jsx(W2,{color:w.solid})},"hamburger")})})]}),i.jsx(lr,{children:v&&i.jsx(tt.div,{variants:M2,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:i.jsxs(f.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[i.jsx(tt.ul,{variants:P2,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map((A,E)=>i.jsx(G2,{item:A,scheme:w,renderLink:p,onCloseMenu:()=>j(!1)},A.href||`${A.label}-${E}`))}),i.jsx(tt.div,{variants:O2,initial:"hidden",animate:"visible",children:i.jsx(f.Box,{mt:"4",children:h??i.jsx(P,{mobile:!0})})})]})},"mobile-menu")})]})}const K2={blue:{solid:"#0685FF",solidHover:"#0066CC",token:"blue.500",focusRing:"var(--chakra-colors-blue-500)"},purple:{solid:"#7700CC",solidHover:"#5C00A3",token:"purple.500",focusRing:"var(--chakra-colors-purple-500)"}},q2=e=>({facebook:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_192)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_192",children:i.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_186)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_186",children:i.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_198)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_198",children:i.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_183)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_183",children:i.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_195)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_195",children:i.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_189)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_189",children:i.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),whatsapp:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:i.jsx("path",{d:"M13.601 2.326A10.454 10.454 0 0 0 3.17 12.784c0 1.896.496 3.743 1.442 5.378L3 24l5.968-1.564a10.428 10.428 0 0 0 4.633 1.082c5.76 0 10.44-4.683 10.44-10.446a10.45 10.45 0 0 0-10.44-10.746zm0 17.584c-1.579 0-3.125-.425-4.48-1.228l-.322-.191-3.332.874.887-3.25-.21-.334A8.75 8.75 0 0 1 4.843 12.78c0-4.832 3.93-8.766 8.761-8.766 2.342 0 4.542.912 6.196 2.569 1.654 1.657 2.566 3.86 2.566 6.205 0 4.836-3.931 8.769-8.765 8.769zm4.811-6.577c-.264-.132-1.564-.772-1.807-.86-.242-.088-.419-.132-.596.132-.176.264-.683.86-.838 1.036-.154.176-.309.198-.573.066-1.545-.774-2.73-1.874-3.593-3.32-.11-.186.11-.176.368-.693.088-.176.044-.33-.022-.462-.066-.132-.596-1.436-.816-1.966-.214-.515-.433-.445-.596-.453-.154-.008-.33-.01-.507-.01-.176 0-.463.066-.705.33-.242.264-.925.904-.925 2.204 0 1.3.947 2.556 1.08 2.732.132.176 1.862 2.844 4.512 3.987 1.84.795 2.52.848 3.424.717.925-.134 2.835-1.157 3.232-2.274.396-1.117.396-2.072.275-2.274-.12-.202-.44-.323-.705-.455z",fill:"white"})})]}),tiktok:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:i.jsx("path",{d:"M19.589 6.686a4.793 4.793 0 0 1-3.77-4.245V2h-3.445v13.672a2.896 2.896 0 0 1-2.891 2.89 2.895 2.895 0 0 1-2.892-2.89 2.895 2.895 0 0 1 2.892-2.89 2.87 2.87 0 0 1 1.002.18V9.45a6.335 6.335 0 0 0-1.002-.08 6.336 6.336 0 0 0-6.336 6.336 6.336 6.336 0 0 0 6.336 6.336 6.336 6.336 0 0 0 6.336-6.336V8.514a8.216 8.216 0 0 0 4.768 1.512V6.581a4.819 4.819 0 0 1-.998.105z",fill:"white"})})]})}),X2="Nigeria's leading digital platform for specialist healthcare. Bridging the gap between expert care and patient convenience.",Z2=[{title:"COMPANY",links:[{label:"About",href:"/about"},{label:"Team",href:"/team"},{label:"Careers",href:"/careers"},{label:"Contact",href:"/contact"}]},{title:"PRODUCT",links:[{label:"For Doctors",href:"/doctors"},{label:"For Businesses",href:"/business"},{label:"For Patients",href:"/patients"},{label:"Homecare",href:"/homecare"}]},{title:"RESOURCES",links:[{label:"Blog",href:"/blog"}]}],J2=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"whatsapp",href:"https://medixdeck.com/whatsapp"},{platform:"threads",href:"https://threads.net/@medixdeck"},{platform:"facebook",href:"https://facebook.com/medixdeck"},{platform:"youtube",href:"https://youtube.com/@medixdeck"},{platform:"tiktok",href:"https://tiktok.com/@medixdeck"},{platform:"linkedin",href:"https://linkedin.com/company/medixdeck"}],Q2=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],ey=(e,t)=>i.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function lf({description:e=X2,logo:t,sections:n=Z2,socialLinks:r=J2,copyright:o,bottomLinks:s=Q2,newsletter:a,renderLink:l=ey,colorScheme:u="blue",certifications:c,...d}){const h=new Date().getFullYear(),p=o??`© ${h} MedixDeck Health Solutions Ltd. All Rights Reserved.`,[m,g]=S.useState(""),[x,y]=S.useState(!1),[v,j]=S.useState(!1),w=K2[u],{mounted:F,themeMode:B,toggleThemeMode:C}=ur(),P=A=>{A.preventDefault(),a!=null&&a.onSubmit&&m&&(a.onSubmit(m),g(""))};return i.jsx(f.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...d,children:i.jsxs(f.Container,{maxWidth:"7xl",children:[i.jsxs(f.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[i.jsxs(f.Box,{children:[i.jsx(f.Box,{mb:4,children:i.jsx(f.Link,{href:"/",children:t??i.jsx(tn,{variant:u==="blue"?"blue":"purple",height:28})})}),i.jsx(f.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),i.jsx(f.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const A=q2(w.solid);return r.map(E=>i.jsx(f.Link,{href:E.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:E.platform,"aria-label":E.platform,children:A[E.platform]},E.platform))})()})]}),i.jsx(f.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(A=>i.jsxs(f.Box,{children:[i.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:A.title}),i.jsx(f.VStack,{align:"flex-start",gap:3,children:A.links.map(E=>i.jsx(f.Box,{w:"full",children:l(E,i.jsx(f.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:w.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:E.label}))},E.label))})]},A.title))}),!(a!=null&&a.hide)&&i.jsx(f.Box,{children:i.jsxs(f.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[i.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(a==null?void 0:a.title)??"Newsletter"}),i.jsx(f.Text,{fontSize:"sm",color:"text.body",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(a==null?void 0:a.description)??"Get monthly health tips from our verified specialists."}),i.jsxs(f.Box,{as:"form",onSubmit:P,position:"relative",display:"flex",children:[i.jsx(f.Box,{as:"input",type:"email",value:m,onChange:A=>g(A.target.value),placeholder:(a==null?void 0:a.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.body"},_focus:{outline:"none",borderColor:w.token,boxShadow:`0 0 0 1px ${w.solid}`},transition:"all 0.2s",required:!0}),i.jsx("button",{type:"submit",style:{position:"absolute",right:"4px",top:"4px",bottom:"4px",width:"36px",height:"36px",padding:0,background:x?w.solidHover:w.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:v?`0 0 0 3px ${w.focusRing}`:"none",transition:"background 0.2s ease, box-shadow 0.2s ease"},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onFocus:()=>j(!0),onBlur:()=>j(!1),"aria-label":"Subscribe",children:(a==null?void 0:a.buttonIcon)??i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),i.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:i.jsxs(f.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[i.jsx(f.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:p}),i.jsxs(f.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[s.map(A=>i.jsx(f.Box,{children:l(A,i.jsx(f.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:A.label}))},A.label)),F&&i.jsx(f.Box,{as:"button",onClick:C,display:"inline-flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:"text.body",_hover:{color:"text.heading",bg:"bg"},cursor:"pointer",transition:"all 0.2s","aria-label":"Toggle theme",ml:2,children:B==="dark"?i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"5"}),i.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),i.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),i.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),i.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),i.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),i.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),i.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),i.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})}),c&&c.length>0&&i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:i.jsx(f.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:c.map(A=>{const E=i.jsxs(f.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:A.href?"pointer":"default"},children:[A.imageSrc?i.jsx("img",{src:A.imageSrc,alt:A.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):i.jsx(f.Box,{color:"text.muted",flexShrink:0,children:i.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})})}),i.jsx(f.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:A.name})]},A.name);return A.href?i.jsx(f.Box,{children:l({href:A.href,isExternal:A.isExternal??!0},E)},A.name):i.jsx(f.Box,{children:E},A.name)})})})]})})}lf.displayName="MedixFooter";const ty=i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:i.jsx("path",{d:"m9 18 6-6-6-6"})}),ny=(e,t)=>e.href?i.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):i.jsx(i.Fragment,{children:t});function ry({items:e,separator:t=ty,renderLink:n=ny,...r}){return i.jsx(f.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",...r,children:e.map((o,s)=>{const a=s===e.length-1;return i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(o,i.jsx(f.Box,{as:"span",display:"inline-block",lineHeight:"1.2",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:a?"medium":"normal",color:a?"text.heading":"text.muted",_hover:a?void 0:{color:"blue.500"},cursor:!a&&o.href?"pointer":"default",transition:"color 0.15s",wordBreak:"break-word",whiteSpace:a?"normal":"nowrap",children:o.label})),!a&&i.jsx(f.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},s)})})}const oy={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function iy({tabs:e,defaultActiveId:t,activeId:n,onChange:r,variant:o="line",size:s="md",renderContent:a=!0,...l}){var g;const[u,c]=S.useState(t??((g=e[0])==null?void 0:g.id)),d=n??u,h=x=>{c(x),r==null||r(x)},p=e.find(x=>x.id===d),m=oy[s];return i.jsxs(f.Box,{...l,children:[i.jsx(f.Box,{role:"tablist",display:"flex",gap:o==="pill"?"1":"0",borderBottom:o==="line"?"1px solid":"none",border:o==="pill"?"1px solid":"none",borderColor:"border",bg:o==="pill"?"bg.subtle":"transparent",p:o==="pill"?"1":"0",borderRadius:o==="pill"?"full":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(x=>{const y=x.id===d;return i.jsxs(f.Box,{role:"tab","aria-selected":y,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onClick:()=>!x.disabled&&h(x.id),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&!x.disabled&&h(x.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:o==="pill"?"4":m.px,py:o==="pill"?"3":m.py,fontFamily:"var(--font-body)",fontWeight:y?"semibold":"medium",fontSize:o==="pill"?"sm":m.fontSize,color:x.disabled?"text.muted":o==="pill"?y?"text.heading":"text.body":y?"blue.500":"text.body",cursor:x.disabled?"not-allowed":"pointer",opacity:x.disabled?.5:1,transition:"all 0.2s ease",whiteSpace:"nowrap",flex:o==="pill"?"1":void 0,flexShrink:o==="pill"?1:0,bg:o==="pill"?y?"bg":"bg.surface":"transparent",borderRadius:o==="pill"?"full":"none",boxShadow:"none",borderBottom:o==="line"?"2px solid":"none",borderColor:o==="line"?y?"blue.500":"transparent":void 0,mb:o==="line"?"-1px":"0",_hover:x.disabled?void 0:o==="line"?{color:"blue.500"}:{bg:y?"bg":"bg.subtle",color:"text.heading"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:o==="pill"?"full":"sm"},children:[i.jsx(f.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:x.label}),x.badge!==void 0&&i.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:o==="pill"?y?"bg.subtle":"bg":y?"blue.100":"bg.subtle",color:o==="pill"?y?"text.heading":"text.muted":y?"blue.700":"text.muted",children:x.badge})]},x.id)})}),a&&(p==null?void 0:p.content)&&i.jsx(f.Box,{role:"tabpanel",mt:"4",children:p.content})]})}function sy(e,t,n){if(n*2+5>=t)return Array.from({length:t},(u,c)=>c+1);const o=Math.max(e-n,1),s=Math.min(e+n,t),a=o>2,l=s<t-2;if(!a&&l){const u=3+2*n;return[...Array.from({length:u},(c,d)=>d+1),"...",t]}if(a&&!l){const u=3+2*n;return[1,"...",...Array.from({length:u},(c,d)=>t-u+1+d)]}return[1,"...",...Array.from({length:s-o+1},(u,c)=>o+c),"...",t]}function cf({total:e,pageSize:t=10,currentPage:n=1,onChange:r,siblingCount:o=1,showEdges:s=!0,compact:a=!1,...l}){const u=Math.ceil(e/t);if(u<=1)return null;const c=sy(n,u,o),d={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"semibold",cursor:"pointer",transition:"all 0.15s",border:"none",userSelect:"none"},h=({children:g,disabled:x,onClick:y,label:v,icon:j,isNext:w})=>i.jsxs(f.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"1.5",h:"8",px:"2",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",userSelect:"none",border:"none",bg:"transparent",color:"text.muted",opacity:x?.4:1,pointerEvents:x?"none":void 0,onClick:y,"aria-label":v,_hover:{color:"blue.500"},children:[!w&&j&&i.jsx(f.Box,{as:"span",display:"flex",alignItems:"center",children:j}),g,w&&j&&i.jsx(f.Box,{as:"span",display:"flex",alignItems:"center",children:j})]}),p=i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M15 18l-6-6 6-6"})}),m=i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M9 18l6-6-6-6"})});return i.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...l,children:[s&&i.jsx(h,{disabled:n===1,onClick:()=>r==null?void 0:r(1),label:"First page",icon:p,children:"First"}),i.jsx(h,{disabled:n===1,onClick:()=>r==null?void 0:r(n-1),label:"Previous page",icon:p,children:"Prev"}),!a&&c.map((g,x)=>g==="..."?i.jsx(f.Box,{...d,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${x}`):i.jsx(f.Box,{as:"button",...d,bg:n===g?"blue.500":"blue.100",color:n===g?"white":"blue.500",_dark:{bg:n===g?"blue.500":"rgba(6, 133, 255, 0.12)",color:n===g?"white":"blue.200"},onClick:()=>r==null?void 0:r(g),"aria-label":`Page ${g}`,"aria-current":n===g?"page":void 0,_hover:n!==g?{bg:"blue.200",_dark:{bg:"rgba(6, 133, 255, 0.2)"}}:void 0,children:g},g)),a&&i.jsxs(f.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",u]}),i.jsx(h,{disabled:n===u,onClick:()=>r==null?void 0:r(n+1),label:"Next page",icon:m,isNext:!0,children:"Next"}),s&&i.jsx(h,{disabled:n===u,onClick:()=>r==null?void 0:r(u),label:"Last page",icon:m,isNext:!0,children:"Last"})]})}const Hl=i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:i.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function ay({steps:e,currentStep:t,variant:n="default",orientation:r="horizontal",colorScheme:o="blue",...s}){const a=o==="blue"?"#0685FF":"#7700CC",l=o==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return r==="vertical"?i.jsx(f.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...s,children:e.map((c,d)=>{const h=d+1<t,p=d+1===t,m=d===e.length-1,g=h||p?a:"var(--chakra-colors-border, #E2E8F0)";return i.jsxs(f.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[i.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:h||p?a:"bg.subtle",border:"2px solid",borderColor:g,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:h?Hl:c.icon??d+1}),!m&&i.jsx(f.Box,{w:"2px",flex:"1",minH:"8",bg:h?a:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&i.jsxs(f.Box,{pt:"1",pb:m?"0":"8",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:p?"semibold":"medium",color:h||p?a:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:c.title}),c.description&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:c.description})]})]},c.id)})}):i.jsx(f.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...s,children:e.map((c,d)=>{const h=d+1<t,p=d+1===t,m=d+1>t,g=d===e.length-1,x=m?"bg.subtle":a,y=h?Hl:c.icon?c.icon:i.jsx(f.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:d+1}),v=!m&&n!=="compact",j=m?"text.muted":a;return i.jsxs(S.Fragment,{children:[i.jsx(f.Box,{role:"listitem","aria-current":p?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:v?"2":"0",py:v?"1.5":"0",bg:v?l:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[i.jsx(f.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:x,border:m?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:y}),n!=="compact"&&i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:p||h?"semibold":"medium",fontFamily:"var(--font-body)",color:j,whiteSpace:"nowrap",transition:"color 0.25s",children:c.title})]})}),!g&&i.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:i.jsx(f.Box,{h:"1.5px",w:"10",bg:h?a:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},c.id)})})}const ly=`
|
|
356
|
+
`,document.head.appendChild(e),Vl=!0}function Ey({items:e,renderLink:t,scheme:n}){return S.useEffect(()=>{By()},[]),i.jsx(f.Box,{as:"nav","aria-label":"Mobile bottom navigation",display:{base:"flex",md:"none"},position:"fixed",bottom:"0",left:"0",right:"0",zIndex:"docked",bg:"bg",borderTop:"1px solid",borderColor:"border",alignItems:"center",style:{minHeight:64,paddingBottom:"env(safe-area-inset-bottom, 0px)",boxShadow:"none",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",animation:"medixMobileNavIn 0.42s cubic-bezier(0.22,1,0.36,1) both"},children:e.slice(0,5).map(r=>{const o=r.isActive??!1,s=i.jsxs(tt.div,{whileTap:{scale:.82},transition:{type:"spring",stiffness:500,damping:30,mass:.7},style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,height:"100%",padding:"6px 4px 4px",cursor:"pointer",position:"relative",gap:4,textDecoration:"none",WebkitTapHighlightColor:"transparent"},children:[i.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:7,left:"50%",width:44,height:28,borderRadius:14,background:n.activeBgLight,transform:`translateX(-50%) scaleX(${o?1:0})`,opacity:o?1:0,transition:"transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.2s ease",pointerEvents:"none"}}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",zIndex:1,color:o?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",opacity:o?1:.6},children:[r.icon,typeof r.badge=="number"&&r.badge>0&&i.jsx("span",{"aria-label":`${r.badge} unread`,style:{position:"absolute",top:-5,right:-6,minWidth:16,height:16,borderRadius:8,background:n.solid,color:"#fff",fontSize:9,fontWeight:700,fontFamily:"var(--font-body)",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0 3px",lineHeight:1,boxShadow:"0 0 0 2px var(--chakra-colors-bg, #fff)",pointerEvents:"none"},children:r.badge>99?"99+":r.badge})]}),i.jsx(f.Box,{as:"span",fontSize:"2xs",fontWeight:o?"700":"500",fontFamily:"var(--font-body)",textAlign:"center",lineHeight:"1",position:"relative",zIndex:1,color:o?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",letterSpacing:o?"-0.01em":"0"},children:r.label})]}),a={label:r.label,href:r.href,isActive:r.isActive};return i.jsx(f.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},children:t(a,s)},r.href)})})}const Fy={bronze:{label:"Bronze Clinician",color:"#92400E",ring:"#D97706",bg:"rgba(217,119,6,0.10)"},silver:{label:"Silver Clinician",color:"#475569",ring:"#94A3B8",bg:"rgba(148,163,184,0.10)"},gold:{label:"Gold Clinician",color:"#D97706",ring:"#F59E0B",bg:"rgba(245,158,11,0.10)"},platinum:{label:"Platinum Clinician",color:"#0284C7",ring:"#38BDF8",bg:"rgba(56,189,248,0.10)"},diamond:{label:"Diamond Clinician",color:"#7C3AED",ring:"#A78BFA",bg:"rgba(167,139,250,0.10)"}},Ay=({color:e})=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"8",r:"6"}),i.jsx("path",{d:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11"})]}),Ly=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("polyline",{points:"9 18 15 12 9 6"})});function Iy({data:e,renderLink:t,isCollapsed:n=!1}){const r=Fy[e.tier],o=e.name.split(" ").map(a=>a[0]).join("").slice(0,2).toUpperCase();if(n){const a=i.jsx(f.Box,{display:"flex",justifyContent:"center",alignItems:"center",w:"full",my:"2",children:i.jsx(Ct,{label:`${e.role} — ${e.name} (${r.label}, ${e.medixScore} pts)`,placement:"right",children:i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"36px",h:"36px",mx:"auto","aria-label":`${e.role} ${e.name}`,cursor:e.link?"pointer":"default",children:i.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${r.ring}, ${r.color})`},children:e.avatarSrc?i.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx("div",{style:{width:36,height:36,borderRadius:"50%",background:r.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:r.color,fontFamily:"var(--font-heading)"},children:o})})})})});return e.link?i.jsx(i.Fragment,{children:t({label:e.role,href:e.link},a)}):i.jsx(i.Fragment,{children:a})}const s=i.jsxs(f.Box,{mx:"3",my:"4",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",style:{cursor:e.link?"pointer":"default"},_hover:e.link?{borderColor:r.ring,boxShadow:`0 0 0 1px ${r.ring}40`}:void 0,transition:"border-color 0.15s ease, box-shadow 0.15s ease",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",pt:"3",pb:"2.5",children:[i.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${r.ring}, ${r.color})`},children:e.avatarSrc?i.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:r.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:r.color,fontFamily:"var(--font-heading)"},children:o})}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",color:"text.heading",lineHeight:"1.2",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.role}),i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",lineHeight:"1.3",mt:"0.5",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.name})]}),e.link&&i.jsx(f.Box,{color:"text.muted",flexShrink:0,children:i.jsx(Ly,{})})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border"}),i.jsxs(f.Box,{px:"3",pt:"2",pb:"2.5",children:[i.jsx(f.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[i.jsx(Ay,{color:r.color}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:r.color,whiteSpace:"nowrap"},children:r.label}),i.jsxs(f.Box,{fontSize:"sm",fontWeight:"500",color:"text.heading",fontFamily:"var(--font-body)",ml:"1",style:{whiteSpace:"nowrap"},children:[e.medixScore.toLocaleString()," ",Number(e.medixScore)===1?"pt":"pts"]})]})]})]});return e.link?i.jsx(i.Fragment,{children:t({label:e.role,href:e.link},s)}):i.jsx(i.Fragment,{children:s})}function Dy({logo:e,collapsedLogo:t,navGroups:n,isOpen:r,onClose:o,onLogout:s,renderLink:a,sidebarWidth:l,collapsedSidebarWidth:u,isCollapsed:c,collapsible:d,onToggleCollapse:h,collapseTogglePlacement:p,scheme:m,scoreCard:g}){const[x,y]=S.useState(!1);return i.jsxs(i.Fragment,{children:[r&&i.jsx(f.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:o,"aria-hidden":"true"}),i.jsxs(f.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:{base:`${l}px`,md:`${c?u:l}px`},zIndex:{base:"modal",md:c?1200:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:r?"translateX(0)":`translateX(-${l+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1), width 0.22s cubic-bezier(0.2,0,0,1)",children:[i.jsxs(f.Box,{h:c?{base:"16",md:"auto"}:"16",minH:c?{base:"16",md:"84px"}:"16",px:c?{base:"5",md:"2"}:"5",py:c?{base:"0",md:"3"}:"0",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",children:[i.jsxs(f.Box,{display:{base:"none",md:c?"flex":"none"},flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2",w:"full",children:[i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:t??i.jsx(tn,{type:"icon",variant:m.chakraToken==="blue.500"?"blue":"purple",height:26})}),d&&(p==="sidebar-header"||p==="both")&&i.jsx(Ct,{label:"Expand sidebar",placement:"right",children:i.jsx(f.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:h,"aria-label":"Expand sidebar",transition:"background 0.15s ease, color 0.15s ease",children:i.jsx(rf,{})})})]}),i.jsxs(f.Box,{display:{base:"flex",md:c?"none":"flex"},alignItems:"center",justifyContent:"space-between",w:"full",minW:"0",children:[i.jsx(f.Box,{flex:"1",minW:"0",overflow:"hidden",children:e}),d&&(p==="sidebar-header"||p==="both")&&i.jsx(Ct,{label:"Collapse sidebar",placement:"bottom",children:i.jsx(f.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:h,"aria-label":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:i.jsx(nf,{})})})]})]}),g&&i.jsx(f.Box,{display:{base:"none",md:c?"flex":"block"},justifyContent:c?"center":void 0,alignItems:c?"center":void 0,w:"full",flexShrink:0,pt:c?"1":"3",children:i.jsx(Iy,{data:g,renderLink:a,isCollapsed:c})}),i.jsx(f.Box,{flex:"1",overflowY:c?"visible":"auto",overflowX:c?"visible":"hidden",position:"relative",py:"3",px:c?"2":"3",children:n.map((v,j)=>i.jsxs(f.Box,{mb:c?"2":"4",children:[v.groupLabel&&(c?j>0?i.jsx(f.Box,{h:"1px",bg:"border",mx:"2",my:"2"}):null:i.jsx(f.Box,{px:"3",pb:"2",pt:j>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:v.groupLabel})),i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:c?"1.5":"0.5",children:v.items.map(w=>i.jsx(Pi,{item:w,renderLink:a,onClick:o,scheme:m,isCollapsed:c},w.href))})]},j))}),i.jsx(f.Box,{px:c?"2":"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",display:c?"flex":"block",justifyContent:c?"center":void 0,alignItems:c?"center":void 0,w:"full",children:c?i.jsx(Ct,{label:"Log out",placement:"right",children:i.jsx(f.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onClick:()=>{o(),s==null||s()},style:{background:x?Ri:"transparent",color:kt,transition:"background 0.15s ease"},children:i.jsx(f.Box,{flexShrink:0,style:{color:kt},children:i.jsx(Mi,{})})})}):i.jsxs(f.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"3",w:"full",px:"3",py:"2.5",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onClick:()=>{o(),s==null||s()},style:{background:x?Ri:"transparent",color:kt,transition:"background 0.15s ease"},children:[i.jsx(f.Box,{flexShrink:0,style:{color:kt},children:i.jsx(Mi,{})}),i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:kt},children:"Log out"})]})})]})]})}function Ry({user:e,greeting:t,greetingSubtext:n,isSidebarOpen:r,onMenuToggle:o,sidebarWidth:s,topBarSlot:a,dropdownItems:l,onLogout:u,scheme:c,collapsible:d=!0,isCollapsed:h=!1,onToggleCollapse:p,collapseTogglePlacement:m="sidebar-header"}){const[g,x]=S.useState(!1),y=S.useRef(null),v=S.useId(),j=`user-menu-button-${v}`,w=`user-menu-dropdown-${v}`;return S.useEffect(()=>{const F=B=>{y.current&&!y.current.contains(B.target)&&x(!1)};return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[]),i.jsxs(f.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",minH:"16",maxH:"16",flexShrink:0,display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[i.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":r?"Close navigation menu":"Open navigation menu","aria-expanded":r,children:r?i.jsx(dy,{}):i.jsx(uy,{})}),d&&(m==="topbar"||m==="both")&&i.jsx(Ct,{label:h?"Expand sidebar":"Collapse sidebar",placement:"bottom",children:i.jsx(f.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:p,"aria-label":h?"Expand sidebar":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:h?i.jsx(rf,{}):i.jsx(nf,{})})}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",i.jsx(f.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),n&&i.jsx(f.Box,{as:"p",fontSize:{base:"2xs",md:"xs"},fontWeight:"400",fontFamily:"var(--font-body)",color:"text.heading",mt:"0.5",lineHeight:"1.4",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n})]}),a,i.jsx(Ty,{scheme:c}),i.jsxs(f.Box,{position:"relative",ref:y,children:[i.jsxs(f.Box,{as:"button",id:j,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>x(F=>!F),"aria-haspopup":"menu","aria-expanded":g,"aria-controls":g?w:void 0,"aria-label":"User menu",children:[i.jsx(lo,{name:e.name,src:e.avatarSrc,size:"sm"}),i.jsx(f.Box,{color:"text.muted",children:i.jsx(of,{open:g})})]}),g&&i.jsxs(f.Box,{role:"menu","aria-labelledby":j,id:w,position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"200px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:[i.jsxs(f.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!l&&i.jsxs(i.Fragment,{children:[i.jsx(Ar,{icon:i.jsx(fy,{}),label:"My Profile",onClick:()=>x(!1),scheme:c}),i.jsx(Ar,{icon:i.jsx(hy,{}),label:"Settings",onClick:()=>x(!1),scheme:c})]}),l==null?void 0:l.map((F,B)=>i.jsx(Ar,{icon:F.icon,label:F.label,isDanger:F.isDanger,onClick:()=>{var C;x(!1),(C=F.onClick)==null||C.call(F)},scheme:c},B)),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),i.jsx(Ar,{icon:i.jsx(Mi,{}),label:"Log out",isDanger:!0,onClick:()=>{x(!1),u==null||u()},scheme:c})]})]})]})}function Ar({icon:e,label:t,isDanger:n,onClick:r,scheme:o}){const[s,a]=S.useState(!1);return i.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:r,style:{background:s?n?Ri:o.hoverBgLight:"transparent",color:n?kt:void 0,transition:"background 0.12s ease"},children:[e&&i.jsx(f.Box,{flexShrink:0,style:{color:n?kt:void 0},color:"text.muted",children:e}),i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?kt:void 0},color:n?void 0:"text.body",children:t})]})}function sf({children:e,logo:t,navGroups:n,user:r,greeting:o,greetingSubtext:s,onLogout:a,renderLink:l=ky,dropdownItems:u,topBarSlot:c,sidebarWidth:d=220,collapsedSidebarWidth:h=68,collapsible:p=!0,defaultCollapsed:m=!1,isCollapsed:g,onCollapseChange:x,collapsedLogo:y,collapseTogglePlacement:v="sidebar-header",colorScheme:j="blue",mobileNavItems:w,scoreCard:F,environment:B="auto",showEnvironmentBanner:C,environmentBanner:P,environmentBannerSlot:A,...E}){const[L,R]=S.useState(!1),[D,N]=S.useState(m),[O,I]=S.useState(!1),[M,H]=S.useState(!1);S.useEffect(()=>{H(!0)},[]);const W=p&&(g!==void 0?g:D),$=()=>{if(!p)return;const ee=!W;g===void 0&&N(ee),x==null||x(ee)},b=cy[j],Y=!!(w&&w.length>0),oe=o??wy(),T=t??i.jsx(tn,{variant:j,height:26}),ie=y??i.jsx(tn,{type:"icon",variant:j,height:26}),se=P||{},X=se.environment||B,{isNonProduction:Z,detectedEnv:Q}=Sy(X),ue=!O&&(C!==void 0?C:M?Z:X!=="production"&&X!=="live");return i.jsxs(f.Box,{display:"flex",minH:"100vh",bg:"bg",...E,children:[i.jsx(Dy,{logo:T,collapsedLogo:ie,navGroups:n,isOpen:L,onClose:()=>R(!1),onLogout:a,renderLink:l,sidebarWidth:d,collapsedSidebarWidth:h,isCollapsed:W,collapsible:p,onToggleCollapse:$,collapseTogglePlacement:v,scheme:b,scoreCard:F}),i.jsxs(f.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${W?h:d}px`},transition:"margin-left 0.22s cubic-bezier(0.2,0,0,1)",children:[ue&&(A??i.jsx(jy,{detectedEnv:Q,config:se,onDismiss:()=>{var ee;I(!0),(ee=se.onDismiss)==null||ee.call(se)}})),i.jsx(Ry,{user:r,greeting:oe,greetingSubtext:s,isSidebarOpen:L,onMenuToggle:()=>R(ee=>!ee),sidebarWidth:d,topBarSlot:c,dropdownItems:u,onLogout:a,scheme:b,collapsible:p,isCollapsed:W,onToggleCollapse:$,collapseTogglePlacement:v}),i.jsx(f.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:Y?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:e})]}),Y&&i.jsx(Ey,{items:w,renderLink:l,scheme:b})]})}sf.displayName="MedixDashboardLayout";const to=[0,0,.2,1],Ms=[.4,0,1,1],Ps=[.22,1,.36,1],My={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Ps}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Ms}}},Py={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},Wl={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:to}}},Oy={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:to,delay:.18}}},zy={hidden:{opacity:0,y:-6,scale:.98,transformOrigin:"top"},visible:{opacity:1,y:0,scale:1,transformOrigin:"top",transition:{duration:.18,ease:Ps}},exit:{opacity:0,y:-4,scale:.98,transformOrigin:"top",transition:{duration:.12,ease:Ms}}},_y={hidden:{opacity:0,height:0,overflow:"hidden"},visible:{opacity:1,height:"auto",overflow:"hidden",transition:{duration:.22,ease:Ps}},exit:{opacity:0,height:0,overflow:"hidden",transition:{duration:.16,ease:Ms}}},Ny={blue:{solid:"#0685FF",hover:"#0685FF",hoverBg:"blue.50",hoverBgDark:"rgba(6,133,255,0.12)",badgeBg:"#EFF6FF",badgeColor:"#0685FF",badgeBgDark:"rgba(6,133,255,0.20)",badgeColorDark:"#60A5FA"},purple:{solid:"#7700CC",hover:"#7700CC",hoverBg:"purple.50",hoverBgDark:"rgba(119,0,204,0.12)",badgeBg:"#FAF5FF",badgeColor:"#7700CC",badgeBgDark:"rgba(119,0,204,0.20)",badgeColorDark:"#C084FC"}},Vy=()=>i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),i.jsx("polyline",{points:"7 7 17 7 17 17"})]});function af({isOpen:e}){return i.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 cubic-bezier(0.22, 1, 0.36, 1)",transform:e?"rotate(180deg)":"rotate(0deg)",flexShrink:0},children:i.jsx("polyline",{points:"6 9 12 15 18 9"})})}function no(){return i.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.65,flexShrink:0},children:[i.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),i.jsx("polyline",{points:"15 3 21 3 21 9"}),i.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function Wy({color:e}){return i.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),i.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Hy({color:e}){return i.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),i.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"})]})}const Uy=(e,t)=>{const n=e.href??"#",r=e.target??(e.isExternal?"_blank":void 0),o=e.rel??(e.isExternal?"noopener noreferrer":void 0);return n==="#"&&!e.onClick?i.jsx("span",{style:{textDecoration:"none",display:"contents"},children:t}):i.jsx("a",{href:n,target:r,rel:o,onClick:e.onClick,style:{textDecoration:"none",display:"contents"},children:t})};function jn({badge:e,scheme:t}){return e?S.isValidElement(e)?e:i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"1.5",py:"0.5",fontSize:"10px",fontWeight:"semibold",lineHeight:"1",borderRadius:"badge",bg:t.badgeBg,color:t.badgeColor,_dark:{bg:t.badgeBgDark,color:t.badgeColorDark},border:"1px solid",borderColor:t.badgeColor,style:{borderColor:"currentColor",opacity:.9},children:e}):null}function $y({item:e,scheme:t,renderLink:n}){var d;const[r,o]=S.useState(!1),s=S.useRef(null),a=S.useRef(null),l=!!(e.children&&e.children.length>0);S.useEffect(()=>{if(!r)return;function h(m){s.current&&!s.current.contains(m.target)&&o(!1)}function p(m){m.key==="Escape"&&o(!1)}return document.addEventListener("mousedown",h),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",p)}},[r]);const u=()=>{a.current&&(clearTimeout(a.current),a.current=null),l&&o(!0)},c=()=>{l&&(a.current=setTimeout(()=>{o(!1)},150))};return l?i.jsxs(f.Box,{as:"li",ref:s,listStyleType:"none",position:"relative",onMouseEnter:u,onMouseLeave:c,children:[i.jsxs(f.Box,{as:"button","aria-haspopup":"menu","aria-expanded":r,onClick:()=>o(!r),display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||r?t.hover:"text.body",bg:r?t.hoverBg:"transparent",_dark:{color:e.isActive||r?t.hover:"text.body",bg:r?t.hoverBgDark:"transparent",_hover:{color:t.hover,bg:t.hoverBgDark}},borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},children:[e.icon&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),i.jsx("span",{children:e.label}),i.jsx(jn,{badge:e.badge,scheme:t}),i.jsx(af,{isOpen:r})]}),i.jsx(lr,{children:r&&i.jsx(tt.div,{variants:zy,initial:"hidden",animate:"visible",exit:"exit",style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:1e3},children:i.jsx(f.Box,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"card",p:"2",minW:"260px",maxW:"380px",display:"flex",flexDirection:"column",gap:"1",role:"menu","aria-label":e.label,children:(d=e.children)==null?void 0:d.map((h,p)=>i.jsx(f.Box,{as:"div",role:"none",children:n(h,i.jsxs(f.Box,{as:"span",role:"menuitem",display:"flex",alignItems:"flex-start",gap:"3",p:"2.5",borderRadius:"md",cursor:"pointer",transition:"all 0.15s ease",color:"text.heading",_hover:{bg:t.hoverBg,color:t.hover},_dark:{color:"text.heading",_hover:{bg:t.hoverBgDark,color:t.hover}},onClick:()=>o(!1),children:[h.icon&&i.jsx(f.Box,{as:"span",w:"8",h:"8",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:h.icon}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",justifyContent:"space-between",children:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",children:[i.jsx("span",{children:h.label}),h.isExternal&&i.jsx(no,{})]}),i.jsx(jn,{badge:h.badge,scheme:t})]}),h.description&&i.jsx(f.Box,{as:"span",display:"block",fontSize:"xs",color:"text.body",_dark:{color:"text.body"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.4",children:h.description})]})]}))},h.href||`${h.label}-${p}`))})})})]}):i.jsx(f.Box,{as:"li",listStyleType:"none",children:n(e,i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{bg:t.hoverBgDark,color:t.hover}},borderRadius:"md",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},cursor:"pointer",children:[e.icon&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),i.jsx("span",{children:e.label}),i.jsx(jn,{badge:e.badge,scheme:t}),e.isExternal&&i.jsx(no,{})]}))})}function Gy({item:e,scheme:t,renderLink:n,onCloseMenu:r}){var l;const[o,s]=S.useState(!1);return!(e.children&&e.children.length>0)?i.jsx(tt.li,{variants:Wl,children:n(e,i.jsxs(f.Box,{as:"span",display:"flex",alignItems:"center",justifyContent:"space-between",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:r,children:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),i.jsx("span",{children:e.label})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[i.jsx(jn,{badge:e.badge,scheme:t}),e.isExternal&&i.jsx(no,{})]})]}))}):i.jsxs(tt.li,{variants:Wl,style:{listStyle:"none"},children:[i.jsxs(f.Box,{as:"button",onClick:()=>s(!o),"aria-expanded":o,display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||o?t.hover:"text.body",bg:o?"bg.subtle":"transparent",_dark:{color:e.isActive||o?t.hover:"text.body",bg:o?"bg.subtle":"transparent",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",border:"none",cursor:"pointer",textAlign:"left",transition:"background 0.15s ease, color 0.15s ease",_hover:{color:t.hover,bg:"bg.subtle"},children:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),i.jsx("span",{children:e.label})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[i.jsx(jn,{badge:e.badge,scheme:t}),i.jsx(af,{isOpen:o})]})]}),i.jsx(lr,{children:o&&i.jsx(tt.div,{variants:_y,initial:"hidden",animate:"visible",exit:"exit",children:i.jsx(f.Box,{pl:"4",pr:"2",py:"1.5",display:"flex",flexDirection:"column",gap:"1",borderLeft:"2px solid",borderColor:"border",ml:"4",my:"1",children:(l=e.children)==null?void 0:l.map((u,c)=>i.jsx(f.Box,{as:"div",children:n(u,i.jsxs(f.Box,{as:"span",display:"flex",alignItems:"flex-start",gap:"2.5",px:"2.5",py:"2",borderRadius:"md",color:"text.body",_dark:{color:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:r,children:[u.icon&&i.jsx(f.Box,{as:"span",w:"6",h:"6",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:u.icon}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1",children:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-heading)",children:[i.jsx("span",{children:u.label}),u.isExternal&&i.jsx(no,{})]}),i.jsx(jn,{badge:u.badge,scheme:t})]}),u.description&&i.jsx(f.Box,{as:"span",display:"block",fontSize:"xs",color:"text.muted",_dark:{color:"text.muted"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.3",children:u.description})]})]}))},u.href||`${u.label}-${c}`))})})})]})}function Yy({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:r="Get Started",ctaHref:o,onCtaClick:s,ctaIconHref:a,onCtaIconClick:l,secondaryCtaLabel:u,secondaryCtaHref:c,onSecondaryCtaClick:d,ctaSlot:h,renderLink:p=Uy,isSticky:m=!1,colorScheme:g="blue",variant:x="solid",...y}){const[v,j]=S.useState(!1),w=Ny[g],F=a??o,B=l??s,C=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},P=({mobile:A=!1})=>i.jsxs(f.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:A?"column":"row",children:[u&&i.jsx(Ye,{as:c?"a":"button",href:c,variant:A?"outline":"ghost",colorScheme:g,size:A?"md":"sm",onClick:()=>{d==null||d(),A&&j(!1)},style:A?{width:"100%"}:void 0,children:u}),i.jsx(Ye,{as:o?"a":"button",href:o,variant:"solid",colorScheme:g,size:A?"md":"sm",onClick:()=>{s==null||s(),A&&j(!1)},style:A?{width:"100%"}:void 0,children:r}),!A&&i.jsx(Ye,{as:F?"a":"button",href:F,target:F&&F!==o?"_blank":void 0,rel:F&&F!==o?"noopener noreferrer":void 0,variant:"solid",colorScheme:g,size:"sm",onClick:B,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:i.jsx(Vy,{})})]});return i.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:m?"sticky":"relative",top:m?"0":void 0,zIndex:m?"sticky":40,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",...y,children:[i.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:[i.jsx(f.Box,{flexShrink:0,children:e??i.jsx(tn,{variant:g==="blue"?"blue":"purple",height:28})}),i.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((A,E)=>i.jsx($y,{item:A,scheme:w,renderLink:p},A.href||`${A.label}-${E}`))}),i.jsx(f.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:h??i.jsx(P,{})}),i.jsx(f.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>j(!v),"aria-label":v?"Close menu":"Open menu","aria-expanded":v,position:"relative",width:"32px",height:"32px",flexShrink:0,children:i.jsx(lr,{mode:"wait",initial:!1,children:v?i.jsx(tt.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:to},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:i.jsx(Hy,{color:w.solid})},"close"):i.jsx(tt.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:to},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:i.jsx(Wy,{color:w.solid})},"hamburger")})})]}),i.jsx(lr,{children:v&&i.jsx(tt.div,{variants:My,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:i.jsxs(f.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[i.jsx(tt.ul,{variants:Py,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map((A,E)=>i.jsx(Gy,{item:A,scheme:w,renderLink:p,onCloseMenu:()=>j(!1)},A.href||`${A.label}-${E}`))}),i.jsx(tt.div,{variants:Oy,initial:"hidden",animate:"visible",children:i.jsx(f.Box,{mt:"4",children:h??i.jsx(P,{mobile:!0})})})]})},"mobile-menu")})]})}const Ky={blue:{solid:"#0685FF",solidHover:"#0066CC",token:"blue.500",focusRing:"var(--chakra-colors-blue-500)"},purple:{solid:"#7700CC",solidHover:"#5C00A3",token:"purple.500",focusRing:"var(--chakra-colors-purple-500)"}},qy=e=>({facebook:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_192)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_192",children:i.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_186)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_186",children:i.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_198)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_198",children:i.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_183)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_183",children:i.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_195)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_195",children:i.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_189)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_189",children:i.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),whatsapp:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:i.jsx("path",{d:"M13.601 2.326A10.454 10.454 0 0 0 3.17 12.784c0 1.896.496 3.743 1.442 5.378L3 24l5.968-1.564a10.428 10.428 0 0 0 4.633 1.082c5.76 0 10.44-4.683 10.44-10.446a10.45 10.45 0 0 0-10.44-10.746zm0 17.584c-1.579 0-3.125-.425-4.48-1.228l-.322-.191-3.332.874.887-3.25-.21-.334A8.75 8.75 0 0 1 4.843 12.78c0-4.832 3.93-8.766 8.761-8.766 2.342 0 4.542.912 6.196 2.569 1.654 1.657 2.566 3.86 2.566 6.205 0 4.836-3.931 8.769-8.765 8.769zm4.811-6.577c-.264-.132-1.564-.772-1.807-.86-.242-.088-.419-.132-.596.132-.176.264-.683.86-.838 1.036-.154.176-.309.198-.573.066-1.545-.774-2.73-1.874-3.593-3.32-.11-.186.11-.176.368-.693.088-.176.044-.33-.022-.462-.066-.132-.596-1.436-.816-1.966-.214-.515-.433-.445-.596-.453-.154-.008-.33-.01-.507-.01-.176 0-.463.066-.705.33-.242.264-.925.904-.925 2.204 0 1.3.947 2.556 1.08 2.732.132.176 1.862 2.844 4.512 3.987 1.84.795 2.52.848 3.424.717.925-.134 2.835-1.157 3.232-2.274.396-1.117.396-2.072.275-2.274-.12-.202-.44-.323-.705-.455z",fill:"white"})})]}),tiktok:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:i.jsx("path",{d:"M19.589 6.686a4.793 4.793 0 0 1-3.77-4.245V2h-3.445v13.672a2.896 2.896 0 0 1-2.891 2.89 2.895 2.895 0 0 1-2.892-2.89 2.895 2.895 0 0 1 2.892-2.89 2.87 2.87 0 0 1 1.002.18V9.45a6.335 6.335 0 0 0-1.002-.08 6.336 6.336 0 0 0-6.336 6.336 6.336 6.336 0 0 0 6.336 6.336 6.336 6.336 0 0 0 6.336-6.336V8.514a8.216 8.216 0 0 0 4.768 1.512V6.581a4.819 4.819 0 0 1-.998.105z",fill:"white"})})]})}),Xy="Nigeria's leading digital platform for specialist healthcare. Bridging the gap between expert care and patient convenience.",Zy=[{title:"COMPANY",links:[{label:"About",href:"/about"},{label:"Team",href:"/team"},{label:"Careers",href:"/careers"},{label:"Contact",href:"/contact"}]},{title:"PRODUCT",links:[{label:"For Doctors",href:"/doctors"},{label:"For Businesses",href:"/business"},{label:"For Patients",href:"/patients"},{label:"Homecare",href:"/homecare"}]},{title:"RESOURCES",links:[{label:"Blog",href:"/blog"}]}],Jy=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"whatsapp",href:"https://medixdeck.com/whatsapp"},{platform:"threads",href:"https://threads.net/@medixdeck"},{platform:"facebook",href:"https://facebook.com/medixdeck"},{platform:"youtube",href:"https://youtube.com/@medixdeck"},{platform:"tiktok",href:"https://tiktok.com/@medixdeck"},{platform:"linkedin",href:"https://linkedin.com/company/medixdeck"}],Qy=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],e2=(e,t)=>i.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function lf({description:e=Xy,logo:t,sections:n=Zy,socialLinks:r=Jy,copyright:o,bottomLinks:s=Qy,newsletter:a,renderLink:l=e2,colorScheme:u="blue",certifications:c,...d}){const h=new Date().getFullYear(),p=o??`© ${h} MedixDeck Health Solutions Ltd. All Rights Reserved.`,[m,g]=S.useState(""),[x,y]=S.useState(!1),[v,j]=S.useState(!1),w=Ky[u],{mounted:F,themeMode:B,toggleThemeMode:C}=ur(),P=A=>{A.preventDefault(),a!=null&&a.onSubmit&&m&&(a.onSubmit(m),g(""))};return i.jsx(f.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...d,children:i.jsxs(f.Container,{maxWidth:"7xl",children:[i.jsxs(f.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[i.jsxs(f.Box,{children:[i.jsx(f.Box,{mb:4,children:i.jsx(f.Link,{href:"/",children:t??i.jsx(tn,{variant:u==="blue"?"blue":"purple",height:28})})}),i.jsx(f.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),i.jsx(f.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const A=qy(w.solid);return r.map(E=>i.jsx(f.Link,{href:E.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:E.platform,"aria-label":E.platform,children:A[E.platform]},E.platform))})()})]}),i.jsx(f.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(A=>i.jsxs(f.Box,{children:[i.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:A.title}),i.jsx(f.VStack,{align:"flex-start",gap:3,children:A.links.map(E=>i.jsx(f.Box,{w:"full",children:l(E,i.jsx(f.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:w.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:E.label}))},E.label))})]},A.title))}),!(a!=null&&a.hide)&&i.jsx(f.Box,{children:i.jsxs(f.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[i.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(a==null?void 0:a.title)??"Newsletter"}),i.jsx(f.Text,{fontSize:"sm",color:"text.body",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(a==null?void 0:a.description)??"Get monthly health tips from our verified specialists."}),i.jsxs(f.Box,{as:"form",onSubmit:P,position:"relative",display:"flex",children:[i.jsx(f.Box,{as:"input",type:"email",value:m,onChange:A=>g(A.target.value),placeholder:(a==null?void 0:a.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.body"},_focus:{outline:"none",borderColor:w.token,boxShadow:`0 0 0 1px ${w.solid}`},transition:"all 0.2s",required:!0}),i.jsx("button",{type:"submit",style:{position:"absolute",right:"4px",top:"4px",bottom:"4px",width:"36px",height:"36px",padding:0,background:x?w.solidHover:w.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:v?`0 0 0 3px ${w.focusRing}`:"none",transition:"background 0.2s ease, box-shadow 0.2s ease"},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onFocus:()=>j(!0),onBlur:()=>j(!1),"aria-label":"Subscribe",children:(a==null?void 0:a.buttonIcon)??i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),i.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:i.jsxs(f.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[i.jsx(f.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:p}),i.jsxs(f.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[s.map(A=>i.jsx(f.Box,{children:l(A,i.jsx(f.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:A.label}))},A.label)),F&&i.jsx(f.Box,{as:"button",onClick:C,display:"inline-flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:"text.body",_hover:{color:"text.heading",bg:"bg"},cursor:"pointer",transition:"all 0.2s","aria-label":"Toggle theme",ml:2,children:B==="dark"?i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"5"}),i.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),i.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),i.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),i.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),i.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),i.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),i.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),i.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})}),c&&c.length>0&&i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:i.jsx(f.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:c.map(A=>{const E=i.jsxs(f.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:A.href?"pointer":"default"},children:[A.imageSrc?i.jsx("img",{src:A.imageSrc,alt:A.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):i.jsx(f.Box,{color:"text.muted",flexShrink:0,children:i.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})})}),i.jsx(f.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:A.name})]},A.name);return A.href?i.jsx(f.Box,{children:l({href:A.href,isExternal:A.isExternal??!0},E)},A.name):i.jsx(f.Box,{children:E},A.name)})})})]})})}lf.displayName="MedixFooter";const t2=i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:i.jsx("path",{d:"m9 18 6-6-6-6"})}),n2=(e,t)=>e.href?i.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):i.jsx(i.Fragment,{children:t});function r2({items:e,separator:t=t2,renderLink:n=n2,...r}){return i.jsx(f.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",...r,children:e.map((o,s)=>{const a=s===e.length-1;return i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(o,i.jsx(f.Box,{as:"span",display:"inline-block",lineHeight:"1.2",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:a?"medium":"normal",color:a?"text.heading":"text.muted",_hover:a?void 0:{color:"blue.500"},cursor:!a&&o.href?"pointer":"default",transition:"color 0.15s",wordBreak:"break-word",whiteSpace:a?"normal":"nowrap",children:o.label})),!a&&i.jsx(f.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},s)})})}const o2={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function i2({tabs:e,defaultActiveId:t,activeId:n,onChange:r,variant:o="line",size:s="md",renderContent:a=!0,...l}){var g;const[u,c]=S.useState(t??((g=e[0])==null?void 0:g.id)),d=n??u,h=x=>{c(x),r==null||r(x)},p=e.find(x=>x.id===d),m=o2[s];return i.jsxs(f.Box,{...l,children:[i.jsx(f.Box,{role:"tablist",display:"flex",gap:o==="pill"?"1":"0",borderBottom:o==="line"?"1px solid":"none",border:o==="pill"?"1px solid":"none",borderColor:"border",bg:o==="pill"?"bg.subtle":"transparent",p:o==="pill"?"1":"0",borderRadius:o==="pill"?"full":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(x=>{const y=x.id===d;return i.jsxs(f.Box,{role:"tab","aria-selected":y,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onClick:()=>!x.disabled&&h(x.id),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&!x.disabled&&h(x.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:o==="pill"?"4":m.px,py:o==="pill"?"3":m.py,fontFamily:"var(--font-body)",fontWeight:y?"semibold":"medium",fontSize:o==="pill"?"sm":m.fontSize,color:x.disabled?"text.muted":o==="pill"?y?"text.heading":"text.body":y?"blue.500":"text.body",cursor:x.disabled?"not-allowed":"pointer",opacity:x.disabled?.5:1,transition:"all 0.2s ease",whiteSpace:"nowrap",flex:o==="pill"?"1":void 0,flexShrink:o==="pill"?1:0,bg:o==="pill"?y?"bg":"bg.surface":"transparent",borderRadius:o==="pill"?"full":"none",boxShadow:"none",borderBottom:o==="line"?"2px solid":"none",borderColor:o==="line"?y?"blue.500":"transparent":void 0,mb:o==="line"?"-1px":"0",_hover:x.disabled?void 0:o==="line"?{color:"blue.500"}:{bg:y?"bg":"bg.subtle",color:"text.heading"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:o==="pill"?"full":"sm"},children:[i.jsx(f.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:x.label}),x.badge!==void 0&&i.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:o==="pill"?y?"bg.subtle":"bg":y?"blue.100":"bg.subtle",color:o==="pill"?y?"text.heading":"text.muted":y?"blue.700":"text.muted",children:x.badge})]},x.id)})}),a&&(p==null?void 0:p.content)&&i.jsx(f.Box,{role:"tabpanel",mt:"4",children:p.content})]})}function s2(e,t,n){if(n*2+5>=t)return Array.from({length:t},(u,c)=>c+1);const o=Math.max(e-n,1),s=Math.min(e+n,t),a=o>2,l=s<t-2;if(!a&&l){const u=3+2*n;return[...Array.from({length:u},(c,d)=>d+1),"...",t]}if(a&&!l){const u=3+2*n;return[1,"...",...Array.from({length:u},(c,d)=>t-u+1+d)]}return[1,"...",...Array.from({length:s-o+1},(u,c)=>o+c),"...",t]}function cf({total:e,pageSize:t=10,currentPage:n=1,onChange:r,siblingCount:o=1,showEdges:s=!0,compact:a=!1,...l}){const u=Math.ceil(e/t);if(u<=1)return null;const c=s2(n,u,o),d={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"semibold",cursor:"pointer",transition:"all 0.15s",border:"none",userSelect:"none"},h=({children:g,disabled:x,onClick:y,label:v,icon:j,isNext:w})=>i.jsxs(f.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"1.5",h:"8",px:"2",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",userSelect:"none",border:"none",bg:"transparent",color:"text.muted",opacity:x?.4:1,pointerEvents:x?"none":void 0,onClick:y,"aria-label":v,_hover:{color:"blue.500"},children:[!w&&j&&i.jsx(f.Box,{as:"span",display:"flex",alignItems:"center",children:j}),g,w&&j&&i.jsx(f.Box,{as:"span",display:"flex",alignItems:"center",children:j})]}),p=i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M15 18l-6-6 6-6"})}),m=i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M9 18l6-6-6-6"})});return i.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...l,children:[s&&i.jsx(h,{disabled:n===1,onClick:()=>r==null?void 0:r(1),label:"First page",icon:p,children:"First"}),i.jsx(h,{disabled:n===1,onClick:()=>r==null?void 0:r(n-1),label:"Previous page",icon:p,children:"Prev"}),!a&&c.map((g,x)=>g==="..."?i.jsx(f.Box,{...d,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${x}`):i.jsx(f.Box,{as:"button",...d,bg:n===g?"blue.500":"blue.100",color:n===g?"white":"blue.500",_dark:{bg:n===g?"blue.500":"rgba(6, 133, 255, 0.12)",color:n===g?"white":"blue.200"},onClick:()=>r==null?void 0:r(g),"aria-label":`Page ${g}`,"aria-current":n===g?"page":void 0,_hover:n!==g?{bg:"blue.200",_dark:{bg:"rgba(6, 133, 255, 0.2)"}}:void 0,children:g},g)),a&&i.jsxs(f.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",u]}),i.jsx(h,{disabled:n===u,onClick:()=>r==null?void 0:r(n+1),label:"Next page",icon:m,isNext:!0,children:"Next"}),s&&i.jsx(h,{disabled:n===u,onClick:()=>r==null?void 0:r(u),label:"Last page",icon:m,isNext:!0,children:"Last"})]})}const Hl=i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:i.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function a2({steps:e,currentStep:t,variant:n="default",orientation:r="horizontal",colorScheme:o="blue",...s}){const a=o==="blue"?"#0685FF":"#7700CC",l=o==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return r==="vertical"?i.jsx(f.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...s,children:e.map((c,d)=>{const h=d+1<t,p=d+1===t,m=d===e.length-1,g=h||p?a:"var(--chakra-colors-border, #E2E8F0)";return i.jsxs(f.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[i.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:h||p?a:"bg.subtle",border:"2px solid",borderColor:g,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:h?Hl:c.icon??d+1}),!m&&i.jsx(f.Box,{w:"2px",flex:"1",minH:"8",bg:h?a:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&i.jsxs(f.Box,{pt:"1",pb:m?"0":"8",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:p?"semibold":"medium",color:h||p?a:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:c.title}),c.description&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:c.description})]})]},c.id)})}):i.jsx(f.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...s,children:e.map((c,d)=>{const h=d+1<t,p=d+1===t,m=d+1>t,g=d===e.length-1,x=m?"bg.subtle":a,y=h?Hl:c.icon?c.icon:i.jsx(f.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:d+1}),v=!m&&n!=="compact",j=m?"text.muted":a;return i.jsxs(S.Fragment,{children:[i.jsx(f.Box,{role:"listitem","aria-current":p?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:v?"2":"0",py:v?"1.5":"0",bg:v?l:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[i.jsx(f.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:x,border:m?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:y}),n!=="compact"&&i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:p||h?"semibold":"medium",fontFamily:"var(--font-body)",color:j,whiteSpace:"nowrap",transition:"color 0.25s",children:c.title})]})}),!g&&i.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:i.jsx(f.Box,{h:"1.5px",w:"10",bg:h?a:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},c.id)})})}const l2=`
|
|
357
357
|
@keyframes medix-shimmer {
|
|
358
358
|
0% { transform: translateX(-100%); }
|
|
359
359
|
100% { transform: translateX(100%); }
|
|
360
360
|
}
|
|
361
|
-
`;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=
|
|
361
|
+
`;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=l2,document.head.appendChild(t)}}const Zt=S.forwardRef(({isLoaded:e=!1,children:t,...n},r)=>e?i.jsx(i.Fragment,{children:t}):i.jsx(f.Box,{ref:r,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}));Zt.displayName="MedixSkeleton";function uf({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...r}){return i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:t,...r,children:Array.from({length:e}).map((o,s)=>i.jsx(Zt,{h:"3",w:s===e-1?n:"100%",borderRadius:"full"},s))})}function c2({...e}){return i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[i.jsx(Zt,{h:"48",borderRadius:"md",mb:"4"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[i.jsx(Zt,{w:"10",h:"10",borderRadius:"full"}),i.jsxs(f.Box,{flex:"1",children:[i.jsx(Zt,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),i.jsx(Zt,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),i.jsx(uf,{lines:2})]})}const u2={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},d2={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=`
|
|
362
362
|
@keyframes medix-indeterminate {
|
|
363
363
|
0% { left: -40%; }
|
|
364
364
|
100% { left: 100%; }
|
|
365
365
|
}
|
|
366
|
-
`,document.head.appendChild(t)}}const df=S.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:r=!1,animated:o=!0,isIndeterminate:s=!1,...a},l)=>{const u=Math.min(100,Math.max(0,e)),c=
|
|
366
|
+
`,document.head.appendChild(t)}}const df=S.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:r=!1,animated:o=!0,isIndeterminate:s=!1,...a},l)=>{const u=Math.min(100,Math.max(0,e)),c=u2[t],d=d2[n];return i.jsxs(f.Box,{ref:l,w:"100%",...a,children:[r&&i.jsxs(f.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[i.jsx("span",{children:"Progress"}),i.jsxs("span",{children:[u,"%"]})]}),i.jsx(f.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:s?i.jsx(f.Box,{position:"absolute",h:"100%",w:"40%",bg:c,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):i.jsx(f.Box,{h:"100%",w:`${u}%`,bg:c,borderRadius:"full",transition:o?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});df.displayName="MedixProgress";const f2={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};let Ul=!1;function h2(){if(typeof document>"u"||Ul)return;const e=document.createElement("style");e.textContent=`
|
|
367
367
|
@keyframes medixBottomSheetIn {
|
|
368
368
|
from { transform: translateY(100%); }
|
|
369
369
|
to { transform: translateY(0); }
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
from { transform: translateY(0); }
|
|
373
373
|
to { transform: translateY(100%); }
|
|
374
374
|
}
|
|
375
|
-
`,document.head.appendChild(e),Ul=!0}function py({isOpen:e,onClose:t,title:n,description:r,size:o="md",closeOnOverlayClick:s=!0,closeOnEscape:a=!0,footer:l,children:u,mobileVariant:c="bottom-sheet"}){const d=!!(n||r);S.useEffect(()=>{hy()},[]);const h=c==="bottom-sheet";return i.jsxs(f.DialogRoot,{open:e,onOpenChange:p=>{p.open||t()},closeOnInteractOutside:s,closeOnEscape:a,size:fy[o],children:[i.jsx(f.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),i.jsx(f.DialogPositioner,{display:"flex",alignItems:h?{base:"flex-end",md:"center"}:"center",justifyContent:"center",children:i.jsxs(f.DialogContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",borderRadius:{base:h?"none":"modal",md:"modal"},w:{base:h?"full":void 0,md:void 0},borderTopRadius:h?{base:"modal",md:"modal"}:"modal",style:h?{"--bottom-sheet-animation":e?"medixBottomSheetIn 0.35s cubic-bezier(0.32,0.72,0,1) both":void 0}:void 0,children:[i.jsxs(f.DialogHeader,{borderBottom:d?"1px solid":"none",borderColor:"border",px:"6",py:"4",display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",position:"relative",minH:d?void 0:"12",children:[h&&i.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:10,left:"50%",transform:"translateX(-50%)",width:36,height:4,borderRadius:2,background:"var(--chakra-colors-border, #E2E8F0)",display:"none"},className:"medix-bs-handle"}),d&&i.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[n&&i.jsx(f.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),r&&i.jsx(f.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:r})]}),i.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","aria-label":"Close modal",type:"button",cursor:"pointer",children:i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),i.jsx(f.DialogBody,{px:"6",py:"5",children:u}),l&&i.jsx(f.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",style:h?{paddingBottom:"env(safe-area-inset-bottom, 16px)"}:void 0,children:l})]})})]})}function my({icon:e,title:t,description:n,actionLabel:r,onAction:o,secondaryLabel:s,onSecondaryAction:a,...l}){return i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...l,children:[e&&i.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}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&i.jsx(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(r||s)&&i.jsxs(f.Box,{display:"flex",gap:"3",mt:"2",children:[r&&i.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:o,children:r}),s&&i.jsx(Ye,{variant:"ghost",colorScheme:"blue",onClick:a,children:s})]})]})}function gy({title:e="Page Not Found",description:t="The page you are looking for doesn't exist or has been moved.",errorMessage:n,actionLabel:r="Go back home",onAction:o,secondaryLabel:s,onSecondaryAction:a,...l}){return i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[i.jsx(f.Box,{fontSize:"8xl",fontWeight:"bold",color:"blue.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),i.jsx(f.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),i.jsx(f.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&i.jsx(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",p:"3",mb:"8",maxW:"500px",w:"100%",textAlign:"left",overflowX:"auto",fontFamily:"var(--font-mono)",fontSize:"sm",color:"text.muted",children:n}),i.jsxs(f.Box,{display:"flex",gap:"4",children:[r&&i.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:o,children:r}),s&&i.jsx(Ye,{variant:"outline",colorScheme:"blue",onClick:a,children:s})]})]})}function xy({title:e="Something went wrong",description:t="An unexpected error occurred on our end. Please try again later.",errorMessage:n,actionLabel:r="Try again",onAction:o,secondaryLabel:s,onSecondaryAction:a,...l}){return i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[i.jsx(f.Box,{w:"20",h:"20",borderRadius:"full",bg:"red.50",_dark:{bg:"rgba(220, 38, 38, 0.1)"},display:"flex",alignItems:"center",justifyContent:"center",color:"red.500",mb:"6",children:i.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"10"}),i.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),i.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),i.jsx(f.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),i.jsx(f.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&i.jsx(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",p:"3",mb:"8",maxW:"500px",w:"100%",textAlign:"left",overflowX:"auto",fontFamily:"var(--font-mono)",fontSize:"sm",color:"text.muted",children:n}),i.jsxs(f.Box,{display:"flex",gap:"4",children:[r&&i.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:o,children:r}),s&&i.jsx(Ye,{variant:"outline",colorScheme:"blue",onClick:a,children:s})]})]})}const yy={left:"start",right:"end",top:"top",bottom:"bottom"};function by({isOpen:e,onClose:t,title:n,placement:r="right",size:o="md",closeOnOverlayClick:s=!0,closeOnEscape:a=!0,footer:l,children:u}){const c=yy[r]??"end";return i.jsxs(f.DrawerRoot,{open:e,onOpenChange:d=>{d.open||t()},placement:c,size:o,closeOnInteractOutside:s,closeOnEscape:a,children:[i.jsx(f.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),i.jsx(f.DrawerPositioner,{children:i.jsxs(f.DrawerContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",children:[i.jsxs(f.DrawerHeader,{borderBottom:n?"1px solid":"none",borderColor:"border",px:"6",py:"4",position:"relative",minH:n?void 0:"12",children:[n&&i.jsx(f.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",pr:"8",children:n}),i.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","aria-label":"Close drawer",type:"button",cursor:"pointer",children:i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),i.jsx(f.DrawerBody,{px:"6",py:"5",children:u}),l&&i.jsx(f.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:l})]})})]})}/*! js-cookie v3.0.5 | MIT */function Lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var vy={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Oi(e,t){function n(o,s,a){if(!(typeof document>"u")){a=Lr({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var u in a)a[u]&&(l+="; "+u,a[u]!==!0&&(l+="="+a[u].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+l}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],a={},l=0;l<s.length;l++){var u=s[l].split("="),c=u.slice(1).join("=");try{var d=decodeURIComponent(u[0]);if(a[d]=e.read(c,d),o===d)break}catch{}}return o?a[o]:a}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",Lr({},s,{expires:-1}))},withAttributes:function(o){return Oi(this.converter,Lr({},this.attributes,o))},withConverter:function(o){return Oi(Lr({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ro=Oi(vy,{path:"/"});const ky=({condition:e,wrapper:t,children:n})=>e?t(n):n,zi={TOP:"top",BOTTOM:"bottom"};var Os=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(Os||{});const _i={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},ff="CookieConsent",wy=({children:e,...t})=>S.createElement("button",{...t},e),Xn={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:zi.BOTTOM,visible:_i.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:ff,cookieValue:"true",declineCookieValue:"false",setDeclineCookie:!0,buttonText:"I understand",declineButtonText:"I decline",debug:!1,expires:365,containerClasses:"CookieConsent",contentClasses:"",buttonClasses:"",buttonWrapperClasses:"",declineButtonClasses:"",buttonId:"rcc-confirm-button",declineButtonId:"rcc-decline-button",extraCookieOptions:{},disableButtonStyles:!1,enableDeclineButton:!1,flipButtons:!1,sameSite:Os.LAX,ButtonComponent:wy,overlay:!1,overlayClasses:"",onOverlayClick:()=>{},acceptOnOverlayClick:!1,ariaAcceptLabel:"Accept cookies",ariaDeclineLabel:"Decline cookies",acceptOnScroll:!1,acceptOnScrollPercentage:25,customContentAttributes:{},customContainerAttributes:{},customButtonProps:{},customDeclineButtonProps:{},customButtonWrapperAttributes:{},style:{},buttonStyle:{},declineButtonStyle:{},contentStyle:{},overlayStyle:{}},Sy={visible:!1,style:{alignItems:"baseline",background:"#353535",color:"white",display:"flex",flexWrap:"wrap",justifyContent:"space-between",left:"0",position:"fixed",width:"100%",zIndex:"999"},buttonStyle:{background:"#ffd42d",border:"0",borderRadius:"0px",boxShadow:"none",color:"black",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},declineButtonStyle:{background:"#c12a2a",border:"0",borderRadius:"0px",boxShadow:"none",color:"#e5e5e5",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},contentStyle:{flex:"1 0 300px",margin:"15px"},overlayStyle:{position:"fixed",left:0,top:0,width:"100%",height:"100%",zIndex:"999",backgroundColor:"rgba(0,0,0,0.3)"}},Cy=(e=ff)=>{const t=ro.get(e);return t===void 0?ro.get(hf(e)):t},hf=e=>`${e}-legacy`,pf=class extends S.Component{constructor(){super(...arguments),this.state=Sy,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...Xn,...this.props},n=document.documentElement,r=document.body,o="scrollTop",s="scrollHeight";(n[o]||r[o])/((n[s]||r[s])-n.clientHeight)*100>t&&this.accept(!0)},this.removeScrollListener=()=>{const{acceptOnScroll:t}=this.props;t&&globalThis.removeEventListener("scroll",this.handleScroll)}}componentDidMount(){const{debug:t}=this.props;(this.getCookieValue()===void 0||t)&&(this.setState({visible:!0}),this.props.acceptOnScroll&&globalThis.addEventListener("scroll",this.handleScroll,{passive:!0}))}componentWillUnmount(){this.removeScrollListener()}accept(t=!1){const{cookieName:n,cookieValue:r,hideOnAccept:o,onAccept:s}={...Xn,...this.props};this.setCookie(n,r),s(t??!1),o&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:n}={...Xn,...this.props};t&&this.accept(),n()}decline(){const{cookieName:t,declineCookieValue:n,hideOnDecline:r,onDecline:o,setDeclineCookie:s}={...Xn,...this.props};s&&this.setCookie(t,n),o(),r&&this.setState({visible:!1})}setCookie(t,n){const{extraCookieOptions:r,expires:o,sameSite:s}=this.props;let{cookieSecurity:a}=this.props;a===void 0&&(a=globalThis.location?globalThis.location.protocol==="https:":!0);const l={expires:o,...r,sameSite:s,secure:a};s===Os.NONE&&ro.set(hf(t),n,l),ro.set(t,n,l)}getCookieValue(){const{cookieName:t}=this.props;return Cy(t)}render(){switch(this.props.visible){case _i.HIDDEN:return null;case _i.BY_COOKIE_VALUE:if(!this.state.visible)return null;break}const{location:t,style:n,buttonStyle:r,declineButtonStyle:o,contentStyle:s,disableStyles:a,buttonText:l,declineButtonText:u,containerClasses:c,contentClasses:d,buttonClasses:h,buttonWrapperClasses:p,declineButtonClasses:m,buttonId:g,declineButtonId:x,disableButtonStyles:y,enableDeclineButton:v,flipButtons:j,ButtonComponent:w,overlay:F,overlayClasses:B,overlayStyle:C,ariaAcceptLabel:P,ariaDeclineLabel:A,customContainerAttributes:E,customContentAttributes:L,customButtonProps:R,customDeclineButtonProps:D,customButtonWrapperAttributes:N}=this.props;let O={},I={},M={},H={},W={};switch(a?(O=Object.assign({},n),I=Object.assign({},r),M=Object.assign({},o),H=Object.assign({},s),W=Object.assign({},C)):(O=Object.assign({},{...this.state.style,...n}),H=Object.assign({},{...this.state.contentStyle,...s}),W=Object.assign({},{...this.state.overlayStyle,...C}),y?(I=Object.assign({},r),M=Object.assign({},o)):(I=Object.assign({},{...this.state.buttonStyle,...r}),M=Object.assign({},{...this.state.declineButtonStyle,...o}))),t){case zi.TOP:O.top="0";break;case zi.BOTTOM:O.bottom="0";break}const $=[];return v&&$.push(S.createElement(w,{key:"declineButton",style:M,className:m,id:x,"aria-label":A,onClick:()=>{this.decline()},...D},u)),$.push(S.createElement(w,{key:"acceptButton",style:I,className:h,id:g,"aria-label":P,onClick:()=>{this.accept()},...R},l)),j&&$.reverse(),S.createElement(ky,{condition:F,wrapper:b=>S.createElement("div",{style:W,className:B,onClick:()=>{this.overlayClick()},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},b)},S.createElement("div",{className:`${c}`,style:O,...E},S.createElement("div",{style:H,className:d,...L},this.props.children),S.createElement("div",{className:`${p}`,...N},$.map(b=>b))))}};pf.defaultProps=Xn;let jy=pf;function mf({title:e="We value your privacy",acceptText:t="Accept All",declineText:n="Reject Non-Essential",enableDeclineButton:r=!0,children:o,...s}){const a=es(),l=a?"#152035":"#F6F6F6",u=a?"#ABC0D6":"#3D4F63",c=a?"#1E3050":"#E4E8F0";return i.jsxs(i.Fragment,{children:[i.jsx("style",{children:`
|
|
375
|
+
`,document.head.appendChild(e),Ul=!0}function p2({isOpen:e,onClose:t,title:n,description:r,size:o="md",closeOnOverlayClick:s=!0,closeOnEscape:a=!0,footer:l,children:u,mobileVariant:c="bottom-sheet"}){const d=!!(n||r);S.useEffect(()=>{h2()},[]);const h=c==="bottom-sheet";return i.jsxs(f.DialogRoot,{open:e,onOpenChange:p=>{p.open||t()},closeOnInteractOutside:s,closeOnEscape:a,size:f2[o],children:[i.jsx(f.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),i.jsx(f.DialogPositioner,{display:"flex",alignItems:h?{base:"flex-end",md:"center"}:"center",justifyContent:"center",children:i.jsxs(f.DialogContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",borderRadius:{base:h?"none":"modal",md:"modal"},w:{base:h?"full":void 0,md:void 0},borderTopRadius:h?{base:"modal",md:"modal"}:"modal",style:h?{"--bottom-sheet-animation":e?"medixBottomSheetIn 0.35s cubic-bezier(0.32,0.72,0,1) both":void 0}:void 0,children:[i.jsxs(f.DialogHeader,{borderBottom:d?"1px solid":"none",borderColor:"border",px:"6",py:"4",display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",position:"relative",minH:d?void 0:"12",children:[h&&i.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:10,left:"50%",transform:"translateX(-50%)",width:36,height:4,borderRadius:2,background:"var(--chakra-colors-border, #E2E8F0)",display:"none"},className:"medix-bs-handle"}),d&&i.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[n&&i.jsx(f.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),r&&i.jsx(f.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:r})]}),i.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","aria-label":"Close modal",type:"button",cursor:"pointer",children:i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),i.jsx(f.DialogBody,{px:"6",py:"5",children:u}),l&&i.jsx(f.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",style:h?{paddingBottom:"env(safe-area-inset-bottom, 16px)"}:void 0,children:l})]})})]})}function m2({icon:e,title:t,description:n,actionLabel:r,onAction:o,secondaryLabel:s,onSecondaryAction:a,...l}){return i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...l,children:[e&&i.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}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&i.jsx(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(r||s)&&i.jsxs(f.Box,{display:"flex",gap:"3",mt:"2",children:[r&&i.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:o,children:r}),s&&i.jsx(Ye,{variant:"ghost",colorScheme:"blue",onClick:a,children:s})]})]})}function g2({title:e="Page Not Found",description:t="The page you are looking for doesn't exist or has been moved.",errorMessage:n,actionLabel:r="Go back home",onAction:o,secondaryLabel:s,onSecondaryAction:a,...l}){return i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[i.jsx(f.Box,{fontSize:"8xl",fontWeight:"bold",color:"blue.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),i.jsx(f.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),i.jsx(f.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&i.jsx(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",p:"3",mb:"8",maxW:"500px",w:"100%",textAlign:"left",overflowX:"auto",fontFamily:"var(--font-mono)",fontSize:"sm",color:"text.muted",children:n}),i.jsxs(f.Box,{display:"flex",gap:"4",children:[r&&i.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:o,children:r}),s&&i.jsx(Ye,{variant:"outline",colorScheme:"blue",onClick:a,children:s})]})]})}function x2({title:e="Something went wrong",description:t="An unexpected error occurred on our end. Please try again later.",errorMessage:n,actionLabel:r="Try again",onAction:o,secondaryLabel:s,onSecondaryAction:a,...l}){return i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[i.jsx(f.Box,{w:"20",h:"20",borderRadius:"full",bg:"red.50",_dark:{bg:"rgba(220, 38, 38, 0.1)"},display:"flex",alignItems:"center",justifyContent:"center",color:"red.500",mb:"6",children:i.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"10"}),i.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),i.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),i.jsx(f.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),i.jsx(f.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&i.jsx(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",p:"3",mb:"8",maxW:"500px",w:"100%",textAlign:"left",overflowX:"auto",fontFamily:"var(--font-mono)",fontSize:"sm",color:"text.muted",children:n}),i.jsxs(f.Box,{display:"flex",gap:"4",children:[r&&i.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:o,children:r}),s&&i.jsx(Ye,{variant:"outline",colorScheme:"blue",onClick:a,children:s})]})]})}const y2={left:"start",right:"end",top:"top",bottom:"bottom"};function b2({isOpen:e,onClose:t,title:n,placement:r="right",size:o="md",closeOnOverlayClick:s=!0,closeOnEscape:a=!0,footer:l,children:u}){const c=y2[r]??"end";return i.jsxs(f.DrawerRoot,{open:e,onOpenChange:d=>{d.open||t()},placement:c,size:o,closeOnInteractOutside:s,closeOnEscape:a,children:[i.jsx(f.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),i.jsx(f.DrawerPositioner,{children:i.jsxs(f.DrawerContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",children:[i.jsxs(f.DrawerHeader,{borderBottom:n?"1px solid":"none",borderColor:"border",px:"6",py:"4",position:"relative",minH:n?void 0:"12",children:[n&&i.jsx(f.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",pr:"8",children:n}),i.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","aria-label":"Close drawer",type:"button",cursor:"pointer",children:i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),i.jsx(f.DrawerBody,{px:"6",py:"5",children:u}),l&&i.jsx(f.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:l})]})})]})}/*! js-cookie v3.0.5 | MIT */function Lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var v2={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Oi(e,t){function n(o,s,a){if(!(typeof document>"u")){a=Lr({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var u in a)a[u]&&(l+="; "+u,a[u]!==!0&&(l+="="+a[u].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+l}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],a={},l=0;l<s.length;l++){var u=s[l].split("="),c=u.slice(1).join("=");try{var d=decodeURIComponent(u[0]);if(a[d]=e.read(c,d),o===d)break}catch{}}return o?a[o]:a}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",Lr({},s,{expires:-1}))},withAttributes:function(o){return Oi(this.converter,Lr({},this.attributes,o))},withConverter:function(o){return Oi(Lr({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ro=Oi(v2,{path:"/"});const k2=({condition:e,wrapper:t,children:n})=>e?t(n):n,zi={TOP:"top",BOTTOM:"bottom"};var Os=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(Os||{});const _i={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},ff="CookieConsent",w2=({children:e,...t})=>S.createElement("button",{...t},e),Xn={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:zi.BOTTOM,visible:_i.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:ff,cookieValue:"true",declineCookieValue:"false",setDeclineCookie:!0,buttonText:"I understand",declineButtonText:"I decline",debug:!1,expires:365,containerClasses:"CookieConsent",contentClasses:"",buttonClasses:"",buttonWrapperClasses:"",declineButtonClasses:"",buttonId:"rcc-confirm-button",declineButtonId:"rcc-decline-button",extraCookieOptions:{},disableButtonStyles:!1,enableDeclineButton:!1,flipButtons:!1,sameSite:Os.LAX,ButtonComponent:w2,overlay:!1,overlayClasses:"",onOverlayClick:()=>{},acceptOnOverlayClick:!1,ariaAcceptLabel:"Accept cookies",ariaDeclineLabel:"Decline cookies",acceptOnScroll:!1,acceptOnScrollPercentage:25,customContentAttributes:{},customContainerAttributes:{},customButtonProps:{},customDeclineButtonProps:{},customButtonWrapperAttributes:{},style:{},buttonStyle:{},declineButtonStyle:{},contentStyle:{},overlayStyle:{}},S2={visible:!1,style:{alignItems:"baseline",background:"#353535",color:"white",display:"flex",flexWrap:"wrap",justifyContent:"space-between",left:"0",position:"fixed",width:"100%",zIndex:"999"},buttonStyle:{background:"#ffd42d",border:"0",borderRadius:"0px",boxShadow:"none",color:"black",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},declineButtonStyle:{background:"#c12a2a",border:"0",borderRadius:"0px",boxShadow:"none",color:"#e5e5e5",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},contentStyle:{flex:"1 0 300px",margin:"15px"},overlayStyle:{position:"fixed",left:0,top:0,width:"100%",height:"100%",zIndex:"999",backgroundColor:"rgba(0,0,0,0.3)"}},C2=(e=ff)=>{const t=ro.get(e);return t===void 0?ro.get(hf(e)):t},hf=e=>`${e}-legacy`,pf=class extends S.Component{constructor(){super(...arguments),this.state=S2,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...Xn,...this.props},n=document.documentElement,r=document.body,o="scrollTop",s="scrollHeight";(n[o]||r[o])/((n[s]||r[s])-n.clientHeight)*100>t&&this.accept(!0)},this.removeScrollListener=()=>{const{acceptOnScroll:t}=this.props;t&&globalThis.removeEventListener("scroll",this.handleScroll)}}componentDidMount(){const{debug:t}=this.props;(this.getCookieValue()===void 0||t)&&(this.setState({visible:!0}),this.props.acceptOnScroll&&globalThis.addEventListener("scroll",this.handleScroll,{passive:!0}))}componentWillUnmount(){this.removeScrollListener()}accept(t=!1){const{cookieName:n,cookieValue:r,hideOnAccept:o,onAccept:s}={...Xn,...this.props};this.setCookie(n,r),s(t??!1),o&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:n}={...Xn,...this.props};t&&this.accept(),n()}decline(){const{cookieName:t,declineCookieValue:n,hideOnDecline:r,onDecline:o,setDeclineCookie:s}={...Xn,...this.props};s&&this.setCookie(t,n),o(),r&&this.setState({visible:!1})}setCookie(t,n){const{extraCookieOptions:r,expires:o,sameSite:s}=this.props;let{cookieSecurity:a}=this.props;a===void 0&&(a=globalThis.location?globalThis.location.protocol==="https:":!0);const l={expires:o,...r,sameSite:s,secure:a};s===Os.NONE&&ro.set(hf(t),n,l),ro.set(t,n,l)}getCookieValue(){const{cookieName:t}=this.props;return C2(t)}render(){switch(this.props.visible){case _i.HIDDEN:return null;case _i.BY_COOKIE_VALUE:if(!this.state.visible)return null;break}const{location:t,style:n,buttonStyle:r,declineButtonStyle:o,contentStyle:s,disableStyles:a,buttonText:l,declineButtonText:u,containerClasses:c,contentClasses:d,buttonClasses:h,buttonWrapperClasses:p,declineButtonClasses:m,buttonId:g,declineButtonId:x,disableButtonStyles:y,enableDeclineButton:v,flipButtons:j,ButtonComponent:w,overlay:F,overlayClasses:B,overlayStyle:C,ariaAcceptLabel:P,ariaDeclineLabel:A,customContainerAttributes:E,customContentAttributes:L,customButtonProps:R,customDeclineButtonProps:D,customButtonWrapperAttributes:N}=this.props;let O={},I={},M={},H={},W={};switch(a?(O=Object.assign({},n),I=Object.assign({},r),M=Object.assign({},o),H=Object.assign({},s),W=Object.assign({},C)):(O=Object.assign({},{...this.state.style,...n}),H=Object.assign({},{...this.state.contentStyle,...s}),W=Object.assign({},{...this.state.overlayStyle,...C}),y?(I=Object.assign({},r),M=Object.assign({},o)):(I=Object.assign({},{...this.state.buttonStyle,...r}),M=Object.assign({},{...this.state.declineButtonStyle,...o}))),t){case zi.TOP:O.top="0";break;case zi.BOTTOM:O.bottom="0";break}const $=[];return v&&$.push(S.createElement(w,{key:"declineButton",style:M,className:m,id:x,"aria-label":A,onClick:()=>{this.decline()},...D},u)),$.push(S.createElement(w,{key:"acceptButton",style:I,className:h,id:g,"aria-label":P,onClick:()=>{this.accept()},...R},l)),j&&$.reverse(),S.createElement(k2,{condition:F,wrapper:b=>S.createElement("div",{style:W,className:B,onClick:()=>{this.overlayClick()},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},b)},S.createElement("div",{className:`${c}`,style:O,...E},S.createElement("div",{style:H,className:d,...L},this.props.children),S.createElement("div",{className:`${p}`,...N},$.map(b=>b))))}};pf.defaultProps=Xn;let j2=pf;function mf({title:e="We value your privacy",acceptText:t="Accept All",declineText:n="Reject Non-Essential",enableDeclineButton:r=!0,children:o,...s}){const a=es(),l=a?"#152035":"#F6F6F6",u=a?"#ABC0D6":"#3D4F63",c=a?"#1E3050":"#E4E8F0";return i.jsxs(i.Fragment,{children:[i.jsx("style",{children:`
|
|
376
376
|
.medixdeck-cookie-banner {
|
|
377
377
|
background-color: ${l} !important;
|
|
378
378
|
color: ${u} !important;
|
|
@@ -409,9 +409,9 @@
|
|
|
409
409
|
align-items: center !important;
|
|
410
410
|
flex-wrap: wrap !important;
|
|
411
411
|
}
|
|
412
|
-
`}),i.jsx(
|
|
413
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oy(e,t){return Ry(e)||My(e,t)||zy(e,t)||Py()}function zy(e,t){if(e){if(typeof e=="string")return $l(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$l(e,t):void 0}}const yf=Object.entries,Gl=Object.setPrototypeOf,_y=Object.isFrozen,Ny=Object.getPrototypeOf,Vy=Object.getOwnPropertyDescriptor;let Ue=Object.freeze,at=Object.seal,bn=Object.create,bf=typeof Reflect<"u"&&Reflect,Ni=bf.apply,Vi=bf.construct;Ue||(Ue=function(t){return t});at||(at=function(t){return t});Ni||(Ni=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];return t.apply(n,o)});Vi||(Vi=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});const Gt=je(Array.prototype.forEach),Wy=je(Array.prototype.lastIndexOf),Yl=je(Array.prototype.pop),fn=je(Array.prototype.push),Hy=je(Array.prototype.splice),Ve=Array.isArray,Zn=je(String.prototype.toLowerCase),Uo=je(String.prototype.toString),Kl=je(String.prototype.match),hn=je(String.prototype.replace),ql=je(String.prototype.indexOf),Uy=je(String.prototype.trim),$y=je(Number.prototype.toString),Gy=je(Boolean.prototype.toString),Xl=typeof BigInt>"u"?null:je(BigInt.prototype.toString),Zl=typeof Symbol>"u"?null:je(Symbol.prototype.toString),ke=je(Object.prototype.hasOwnProperty),Wn=je(Object.prototype.toString),Me=je(RegExp.prototype.test),pn=Yy(TypeError);function je(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Ni(e,t,r)}}function Yy(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Vi(e,n)}}function ae(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zn;if(Gl&&Gl(e,null),!Ve(t))return e;let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const s=n(o);s!==o&&(_y(t)||(t[r]=s),o=s)}e[o]=!0}return e}function Ky(e){for(let t=0;t<e.length;t++)ke(e,t)||(e[t]=null);return e}function _e(e){const t=bn(null);for(const r of yf(e)){var n=Oy(r,2);const o=n[0],s=n[1];ke(e,o)&&(Ve(s)?t[o]=Ky(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=_e(s):t[o]=s)}return t}function qy(e){switch(typeof e){case"string":return e;case"number":return $y(e);case"boolean":return Gy(e);case"bigint":return Xl?Xl(e):"0";case"symbol":return Zl?Zl(e):"Symbol()";case"undefined":return Wn(e);case"function":case"object":{if(e===null)return Wn(e);const t=e,n=xt(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Wn(r)}return Wn(e)}default:return Wn(e)}}function xt(e,t){for(;e!==null;){const r=Vy(e,t);if(r){if(r.get)return je(r.get);if(typeof r.value=="function")return je(r.value)}e=Ny(e)}function n(){return null}return n}function Xy(e){try{return Me(e,""),!0}catch{return!1}}const Jl=Ue(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),$o=Ue(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Go=Ue(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Zy=Ue(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Yo=Ue(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Jy=Ue(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ql=Ue(["#text"]),ec=Ue(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ko=Ue(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),tc=Ue(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ir=Ue(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Qy=at(/{{[\w\W]*|^[\w\W]*}}/g),eb=at(/<%[\w\W]*|^[\w\W]*%>/g),tb=at(/\${[\w\W]*/g),nb=at(/^data-[\-\w.\u00B7-\uFFFF]+$/),rb=at(/^aria-[\-\w]+$/),nc=at(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ob=at(/^(?:\w+script|data):/i),ib=at(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sb=at(/^html$/i),ab=at(/^[a-z][.\w]*(-[.\w]+)+$/i),gt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},lb=function(){return typeof window>"u"?null:window},cb=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},rc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function vf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lb();const t=J=>vf(J);if(t.version="3.4.8",t.removed=[],!e||!e.document||e.document.nodeType!==gt.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,o=r.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,l=e.Element,u=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const d=e.DOMParser,h=e.trustedTypes,p=l.prototype,m=xt(p,"cloneNode"),g=xt(p,"remove"),x=xt(p,"nextSibling"),y=xt(p,"childNodes"),v=xt(p,"parentNode"),j=xt(p,"shadowRoot"),w=xt(p,"attributes"),F=a&&a.prototype?xt(a.prototype,"nodeType"):null,B=a&&a.prototype?xt(a.prototype,"nodeName"):null;if(typeof s=="function"){const J=n.createElement("template");J.content&&J.content.ownerDocument&&(n=J.content.ownerDocument)}let C,P="",A=0;const E=function(k){if(A>0)throw pn('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');A++;try{return C.createHTML(k)}finally{A--}},L=n,R=L.implementation,D=L.createNodeIterator,N=L.createDocumentFragment,O=L.getElementsByTagName,I=r.importNode;let M=rc();t.isSupported=typeof yf=="function"&&typeof v=="function"&&R&&R.createHTMLDocument!==void 0;const H=Qy,W=eb,$=tb,b=nb,Y=rb,oe=ob,T=ib,ie=ab;let se=nc,X=null;const Z=ae({},[...Jl,...$o,...Go,...Yo,...Ql]);let Q=null;const ue=ae({},[...ec,...Ko,...tc,...Ir]);let ee=Object.seal(bn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ze=null,Ae=null;const Je=Object.seal(bn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let xr=!0,rn=!0,Mn=!1,Pn=!0,ht=!1,At=!0,pt=!1,On=!1,zn=!1,Lt=!1,on=!1,sn=!1,z=!0,G=!1;const ne="user-content-";let le=!0,de=!1,Le={},Ie=null;const Qe=ae({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let It=null;const Dt=ae({},["audio","video","img","source","image","track"]);let Re=null;const Bt=ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",yr="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xhtml";let an=mt,yo=!1,bo=null;const lh=ae({},[$e,yr,mt],Uo);let vo=ae({},["mi","mo","mn","ms","mtext"]),ko=ae({},["annotation-xml"]);const ch=ae({},["title","style","font","a","script"]);let _n=null;const uh=["application/xhtml+xml","text/html"],dh="text/html";let we=null,ln=null;const fh=n.createElement("form"),Js=function(k){return k instanceof RegExp||k instanceof Function},wo=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ln&&ln===k)return;(!k||typeof k!="object")&&(k={}),k=_e(k),_n=uh.indexOf(k.PARSER_MEDIA_TYPE)===-1?dh:k.PARSER_MEDIA_TYPE,we=_n==="application/xhtml+xml"?Uo:Zn,X=ke(k,"ALLOWED_TAGS")&&Ve(k.ALLOWED_TAGS)?ae({},k.ALLOWED_TAGS,we):Z,Q=ke(k,"ALLOWED_ATTR")&&Ve(k.ALLOWED_ATTR)?ae({},k.ALLOWED_ATTR,we):ue,bo=ke(k,"ALLOWED_NAMESPACES")&&Ve(k.ALLOWED_NAMESPACES)?ae({},k.ALLOWED_NAMESPACES,Uo):lh,Re=ke(k,"ADD_URI_SAFE_ATTR")&&Ve(k.ADD_URI_SAFE_ATTR)?ae(_e(Bt),k.ADD_URI_SAFE_ATTR,we):Bt,It=ke(k,"ADD_DATA_URI_TAGS")&&Ve(k.ADD_DATA_URI_TAGS)?ae(_e(Dt),k.ADD_DATA_URI_TAGS,we):Dt,Ie=ke(k,"FORBID_CONTENTS")&&Ve(k.FORBID_CONTENTS)?ae({},k.FORBID_CONTENTS,we):Qe,ze=ke(k,"FORBID_TAGS")&&Ve(k.FORBID_TAGS)?ae({},k.FORBID_TAGS,we):_e({}),Ae=ke(k,"FORBID_ATTR")&&Ve(k.FORBID_ATTR)?ae({},k.FORBID_ATTR,we):_e({}),Le=ke(k,"USE_PROFILES")?k.USE_PROFILES&&typeof k.USE_PROFILES=="object"?_e(k.USE_PROFILES):k.USE_PROFILES:!1,xr=k.ALLOW_ARIA_ATTR!==!1,rn=k.ALLOW_DATA_ATTR!==!1,Mn=k.ALLOW_UNKNOWN_PROTOCOLS||!1,Pn=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ht=k.SAFE_FOR_TEMPLATES||!1,At=k.SAFE_FOR_XML!==!1,pt=k.WHOLE_DOCUMENT||!1,Lt=k.RETURN_DOM||!1,on=k.RETURN_DOM_FRAGMENT||!1,sn=k.RETURN_TRUSTED_TYPE||!1,zn=k.FORCE_BODY||!1,z=k.SANITIZE_DOM!==!1,G=k.SANITIZE_NAMED_PROPS||!1,le=k.KEEP_CONTENT!==!1,de=k.IN_PLACE||!1,se=Xy(k.ALLOWED_URI_REGEXP)?k.ALLOWED_URI_REGEXP:nc,an=typeof k.NAMESPACE=="string"?k.NAMESPACE:mt,vo=ke(k,"MATHML_TEXT_INTEGRATION_POINTS")&&k.MATHML_TEXT_INTEGRATION_POINTS&&typeof k.MATHML_TEXT_INTEGRATION_POINTS=="object"?_e(k.MATHML_TEXT_INTEGRATION_POINTS):ae({},["mi","mo","mn","ms","mtext"]),ko=ke(k,"HTML_INTEGRATION_POINTS")&&k.HTML_INTEGRATION_POINTS&&typeof k.HTML_INTEGRATION_POINTS=="object"?_e(k.HTML_INTEGRATION_POINTS):ae({},["annotation-xml"]);const _=ke(k,"CUSTOM_ELEMENT_HANDLING")&&k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING=="object"?_e(k.CUSTOM_ELEMENT_HANDLING):bn(null);if(ee=bn(null),ke(_,"tagNameCheck")&&Js(_.tagNameCheck)&&(ee.tagNameCheck=_.tagNameCheck),ke(_,"attributeNameCheck")&&Js(_.attributeNameCheck)&&(ee.attributeNameCheck=_.attributeNameCheck),ke(_,"allowCustomizedBuiltInElements")&&typeof _.allowCustomizedBuiltInElements=="boolean"&&(ee.allowCustomizedBuiltInElements=_.allowCustomizedBuiltInElements),ht&&(rn=!1),on&&(Lt=!0),Le&&(X=ae({},Ql),Q=bn(null),Le.html===!0&&(ae(X,Jl),ae(Q,ec)),Le.svg===!0&&(ae(X,$o),ae(Q,Ko),ae(Q,Ir)),Le.svgFilters===!0&&(ae(X,Go),ae(Q,Ko),ae(Q,Ir)),Le.mathMl===!0&&(ae(X,Yo),ae(Q,tc),ae(Q,Ir))),Je.tagCheck=null,Je.attributeCheck=null,ke(k,"ADD_TAGS")&&(typeof k.ADD_TAGS=="function"?Je.tagCheck=k.ADD_TAGS:Ve(k.ADD_TAGS)&&(X===Z&&(X=_e(X)),ae(X,k.ADD_TAGS,we))),ke(k,"ADD_ATTR")&&(typeof k.ADD_ATTR=="function"?Je.attributeCheck=k.ADD_ATTR:Ve(k.ADD_ATTR)&&(Q===ue&&(Q=_e(Q)),ae(Q,k.ADD_ATTR,we))),ke(k,"ADD_URI_SAFE_ATTR")&&Ve(k.ADD_URI_SAFE_ATTR)&&ae(Re,k.ADD_URI_SAFE_ATTR,we),ke(k,"FORBID_CONTENTS")&&Ve(k.FORBID_CONTENTS)&&(Ie===Qe&&(Ie=_e(Ie)),ae(Ie,k.FORBID_CONTENTS,we)),ke(k,"ADD_FORBID_CONTENTS")&&Ve(k.ADD_FORBID_CONTENTS)&&(Ie===Qe&&(Ie=_e(Ie)),ae(Ie,k.ADD_FORBID_CONTENTS,we)),le&&(X["#text"]=!0),pt&&ae(X,["html","head","body"]),X.table&&(ae(X,["tbody"]),delete ze.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw pn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const K=C;C=k.TRUSTED_TYPES_POLICY;try{P=E("")}catch(fe){throw C=K,fe}}else C===void 0&&k.TRUSTED_TYPES_POLICY!==null&&(C=cb(h,o)),C&&typeof P=="string"&&(P=E(""));(M.uponSanitizeElement.length>0||M.uponSanitizeAttribute.length>0)&&X===Z&&(X=_e(X)),M.uponSanitizeAttribute.length>0&&Q===ue&&(Q=_e(Q)),Ue&&Ue(k),ln=k},Qs=ae({},[...$o,...Go,...Zy]),ea=ae({},[...Yo,...Jy]),hh=function(k){let _=v(k);(!_||!_.tagName)&&(_={namespaceURI:an,tagName:"template"});const K=Zn(k.tagName),fe=Zn(_.tagName);return bo[k.namespaceURI]?k.namespaceURI===yr?_.namespaceURI===mt?K==="svg":_.namespaceURI===$e?K==="svg"&&(fe==="annotation-xml"||vo[fe]):!!Qs[K]:k.namespaceURI===$e?_.namespaceURI===mt?K==="math":_.namespaceURI===yr?K==="math"&&ko[fe]:!!ea[K]:k.namespaceURI===mt?_.namespaceURI===yr&&!ko[fe]||_.namespaceURI===$e&&!vo[fe]?!1:!ea[K]&&(ch[K]||!Qs[K]):!!(_n==="application/xhtml+xml"&&bo[k.namespaceURI]):!1},lt=function(k){fn(t.removed,{element:k});try{v(k).removeChild(k)}catch{g(k)}},Wt=function(k,_){try{fn(t.removed,{attribute:_.getAttributeNode(k),from:_})}catch{fn(t.removed,{attribute:null,from:_})}if(_.removeAttribute(k),k==="is")if(Lt||on)try{lt(_)}catch{}else try{_.setAttribute(k,"")}catch{}},ta=function(k){let _=null,K=null;if(zn)k="<remove></remove>"+k;else{const pe=Kl(k,/^[\r\n\t ]+/);K=pe&&pe[0]}_n==="application/xhtml+xml"&&an===mt&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const fe=C?E(k):k;if(an===mt)try{_=new d().parseFromString(fe,_n)}catch{}if(!_||!_.documentElement){_=R.createDocument(an,"template",null);try{_.documentElement.innerHTML=yo?P:fe}catch{}}const ce=_.body||_.documentElement;return k&&K&&ce.insertBefore(n.createTextNode(K),ce.childNodes[0]||null),an===mt?O.call(_,pt?"html":"body")[0]:pt?_.documentElement:ce},na=function(k){return D.call(k.ownerDocument||k,k,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},So=function(k){var _,K;k.normalize();const fe=D.call(k.ownerDocument||k,k,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let ce=fe.nextNode();for(;ce;){let Be=ce.data;Gt([H,W,$],rt=>{Be=hn(Be,rt," ")}),ce.data=Be,ce=fe.nextNode()}const pe=(_=(K=k.querySelectorAll)===null||K===void 0?void 0:K.call(k,"template"))!==null&&_!==void 0?_:[];Gt(Array.from(pe),Be=>{cn(Be.content)&&So(Be.content)})},br=function(k){const _=B?B(k):null;return typeof _!="string"||we(_)!=="form"?!1:typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||k.attributes!==w(k)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function"||k.nodeType!==F(k)||k.childNodes!==y(k)},cn=function(k){if(!F||typeof k!="object"||k===null)return!1;try{return F(k)===gt.documentFragment}catch{return!1}},vr=function(k){if(!F||typeof k!="object"||k===null)return!1;try{return typeof F(k)=="number"}catch{return!1}};function Et(J,k,_){Gt(J,K=>{K.call(t,k,_,ln)})}const ra=function(k){let _=null;if(Et(M.beforeSanitizeElements,k,null),br(k))return lt(k),!0;const K=we(B?B(k):k.nodeName);if(Et(M.uponSanitizeElement,k,{tagName:K,allowedTags:X}),At&&k.hasChildNodes()&&!vr(k.firstElementChild)&&Me(/<[/\w!]/g,k.innerHTML)&&Me(/<[/\w!]/g,k.textContent)||At&&k.namespaceURI===mt&&K==="style"&&vr(k.firstElementChild)||k.nodeType===gt.progressingInstruction||At&&k.nodeType===gt.comment&&Me(/<[/\w]/g,k.data))return lt(k),!0;if(ze[K]||!(Je.tagCheck instanceof Function&&Je.tagCheck(K))&&!X[K]){if(!ze[K]&&ia(K)&&(ee.tagNameCheck instanceof RegExp&&Me(ee.tagNameCheck,K)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(K)))return!1;if(le&&!Ie[K]){const ce=v(k),pe=y(k);if(pe&&ce){const Be=pe.length;for(let rt=Be-1;rt>=0;--rt){const ct=m(pe[rt],!0);ce.insertBefore(ct,x(k))}}}return lt(k),!0}return(F?F(k):k.nodeType)===gt.element&&!hh(k)||(K==="noscript"||K==="noembed"||K==="noframes")&&Me(/<\/no(script|embed|frames)/i,k.innerHTML)?(lt(k),!0):(ht&&k.nodeType===gt.text&&(_=k.textContent,Gt([H,W,$],ce=>{_=hn(_,ce," ")}),k.textContent!==_&&(fn(t.removed,{element:k.cloneNode()}),k.textContent=_)),Et(M.afterSanitizeElements,k,null),!1)},oa=function(k,_,K){if(Ae[_]||z&&(_==="id"||_==="name")&&(K in n||K in fh))return!1;const fe=Q[_]||Je.attributeCheck instanceof Function&&Je.attributeCheck(_,k);if(!(rn&&!Ae[_]&&Me(b,_))){if(!(xr&&Me(Y,_))){if(!fe||Ae[_]){if(!(ia(k)&&(ee.tagNameCheck instanceof RegExp&&Me(ee.tagNameCheck,k)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(k))&&(ee.attributeNameCheck instanceof RegExp&&Me(ee.attributeNameCheck,_)||ee.attributeNameCheck instanceof Function&&ee.attributeNameCheck(_,k))||_==="is"&&ee.allowCustomizedBuiltInElements&&(ee.tagNameCheck instanceof RegExp&&Me(ee.tagNameCheck,K)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(K))))return!1}else if(!Re[_]){if(!Me(se,hn(K,T,""))){if(!((_==="src"||_==="xlink:href"||_==="href")&&k!=="script"&&ql(K,"data:")===0&&It[k])){if(!(Mn&&!Me(oe,hn(K,T,"")))){if(K)return!1}}}}}}return!0},ph=ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ia=function(k){return!ph[Zn(k)]&&Me(ie,k)},sa=function(k){Et(M.beforeSanitizeAttributes,k,null);const _=k.attributes;if(!_||br(k))return;const K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let fe=_.length;for(;fe--;){const ce=_[fe],pe=ce.name,Be=ce.namespaceURI,rt=ce.value,ct=we(pe),Co=rt;let De=pe==="value"?Co:Uy(Co);if(K.attrName=ct,K.attrValue=De,K.keepAttr=!0,K.forceKeepAttr=void 0,Et(M.uponSanitizeAttribute,k,K),De=K.attrValue,G&&(ct==="id"||ct==="name")&&ql(De,ne)!==0&&(Wt(pe,k),De=ne+De),At&&Me(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,De)){Wt(pe,k);continue}if(ct==="attributename"&&Kl(De,"href")){Wt(pe,k);continue}if(K.forceKeepAttr)continue;if(!K.keepAttr){Wt(pe,k);continue}if(!Pn&&Me(/\/>/i,De)){Wt(pe,k);continue}ht&&Gt([H,W,$],la=>{De=hn(De,la," ")});const aa=we(k.nodeName);if(!oa(aa,ct,De)){Wt(pe,k);continue}if(C&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Be)switch(h.getAttributeType(aa,ct)){case"TrustedHTML":{De=E(De);break}case"TrustedScriptURL":{De=C.createScriptURL(De);break}}if(De!==Co)try{Be?k.setAttributeNS(Be,pe,De):k.setAttribute(pe,De),br(k)?lt(k):Yl(t.removed)}catch{Wt(pe,k)}}Et(M.afterSanitizeAttributes,k,null)},kr=function(k){let _=null;const K=na(k);for(Et(M.beforeSanitizeShadowDOM,k,null);_=K.nextNode();)if(Et(M.uponSanitizeShadowNode,_,null),ra(_),sa(_),cn(_.content)&&kr(_.content),(F?F(_):_.nodeType)===gt.element){const ce=j?j(_):_.shadowRoot;cn(ce)&&(un(ce),kr(ce))}Et(M.afterSanitizeShadowDOM,k,null)},un=function(k){const _=F?F(k):k.nodeType;if(_===gt.element){const ce=j?j(k):k.shadowRoot;cn(ce)&&(un(ce),kr(ce))}const K=y?y(k):k.childNodes;if(!K)return;const fe=[];Gt(K,ce=>{fn(fe,ce)});for(const ce of fe)un(ce);if(_===gt.element){const ce=B?B(k):null;if(typeof ce=="string"&&we(ce)==="template"){const pe=k.content;cn(pe)&&un(pe)}}};return t.sanitize=function(J){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,K=null,fe=null,ce=null;if(yo=!J,yo&&(J="<!-->"),typeof J!="string"&&!vr(J)&&(J=qy(J),typeof J!="string"))throw pn("dirty is not a string, aborting");if(!t.isSupported)return J;if(On||wo(k),t.removed=[],typeof J=="string"&&(de=!1),de){const rt=B?B(J):J.nodeName;if(typeof rt=="string"){const ct=we(rt);if(!X[ct]||ze[ct])throw pn("root node is forbidden and cannot be sanitized in-place")}if(br(J))throw pn("root node is clobbered and cannot be sanitized in-place");un(J)}else if(vr(J))_=ta("<!---->"),K=_.ownerDocument.importNode(J,!0),K.nodeType===gt.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?_=K:_.appendChild(K),un(K);else{if(!Lt&&!ht&&!pt&&J.indexOf("<")===-1)return C&&sn?E(J):J;if(_=ta(J),!_)return Lt?null:sn?P:""}_&&zn&<(_.firstChild);const pe=na(de?J:_);for(;fe=pe.nextNode();)ra(fe),sa(fe),cn(fe.content)&&kr(fe.content);if(de)return ht&&So(J),J;if(Lt){if(ht&&So(_),on)for(ce=N.call(_.ownerDocument);_.firstChild;)ce.appendChild(_.firstChild);else ce=_;return(Q.shadowroot||Q.shadowrootmode)&&(ce=I.call(r,ce,!0)),ce}let Be=pt?_.outerHTML:_.innerHTML;return pt&&X["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&Me(sb,_.ownerDocument.doctype.name)&&(Be="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
|
|
414
|
-
`+Be),ht&&Gt([H,W,$],rt=>{Be=hn(Be,rt," ")}),C&&sn?E(Be):Be},t.setConfig=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wo(J),On=!0},t.clearConfig=function(){ln=null,On=!1},t.isValidAttribute=function(J,k,_){ln||wo({});const K=we(J),fe=we(k);return oa(K,fe,_)},t.addHook=function(J,k){typeof k=="function"&&fn(M[J],k)},t.removeHook=function(J,k){if(k!==void 0){const _=Wy(M[J],k);return _===-1?void 0:Hy(M[J],_,1)[0]}return Yl(M[J])},t.removeHooks=function(J){M[J]=[]},t.removeAllHooks=function(){M=rc()},t}var Te=vf(),ub=Te;Te.sanitize.bind(Te);Te.isSupported;Te.addHook.bind(Te);Te.removeHook.bind(Te);Te.removeHooks.bind(Te);Te.removeAllHooks.bind(Te);Te.setConfig.bind(Te);Te.clearConfig.bind(Te);Te.isValidAttribute.bind(Te);Te.version;Te.removed;function db(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const fb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pb={};function oc(e,t){return(pb.jsx?hb:fb).test(e)}const mb=/[ \t\n\f\r]/g;function gb(e){return typeof e=="object"?e.type==="text"?ic(e.value):!1:ic(e)}function ic(e){return e.replace(mb,"")===""}class mr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}mr.prototype.normal={};mr.prototype.property={};mr.prototype.space=void 0;function kf(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new mr(n,r,t)}function Wi(e){return e.toLowerCase()}class Xe{constructor(t,n){this.attribute=n,this.property=t}}Xe.prototype.attribute="";Xe.prototype.booleanish=!1;Xe.prototype.boolean=!1;Xe.prototype.commaOrSpaceSeparated=!1;Xe.prototype.commaSeparated=!1;Xe.prototype.defined=!1;Xe.prototype.mustUseProperty=!1;Xe.prototype.number=!1;Xe.prototype.overloadedBoolean=!1;Xe.prototype.property="";Xe.prototype.spaceSeparated=!1;Xe.prototype.space=void 0;let xb=0;const re=nn(),Se=nn(),Hi=nn(),U=nn(),me=nn(),en=nn(),et=nn();function nn(){return 2**++xb}const Ui=Object.freeze(Object.defineProperty({__proto__:null,boolean:re,booleanish:Se,commaOrSpaceSeparated:et,commaSeparated:en,number:U,overloadedBoolean:Hi,spaceSeparated:me},Symbol.toStringTag,{value:"Module"})),qo=Object.keys(Ui);class zs extends Xe{constructor(t,n,r,o){let s=-1;if(super(t,n),sc(this,"space",o),typeof r=="number")for(;++s<qo.length;){const a=qo[s];sc(this,qo[s],(r&Ui[a])===Ui[a])}}}zs.prototype.defined=!0;function sc(e,t,n){n&&(e[t]=n)}function Dn(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const s=new zs(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Wi(r)]=r,n[Wi(s.attribute)]=r}return new mr(t,n,e.space)}const wf=Dn({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:me,ariaCurrent:null,ariaDescribedBy:me,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:me,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:me,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:me,ariaLevel:U,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:me,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:me,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Se,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sf(e,t){return t in e?e[t]:t}function Cf(e,t){return Sf(e,t.toLowerCase())}const yb=Dn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:en,acceptCharset:me,accessKey:me,action:null,allow:null,allowFullScreen:re,allowPaymentRequest:re,allowUserMedia:re,alpha:re,alt:null,as:null,async:re,autoCapitalize:null,autoComplete:me,autoFocus:re,autoPlay:re,blocking:me,capture:null,charSet:null,checked:re,cite:null,className:me,closedBy:null,colorSpace:null,cols:U,colSpan:U,command:null,commandFor:null,content:null,contentEditable:Se,controls:re,controlsList:me,coords:U|en,crossOrigin:null,data:null,dateTime:null,decoding:null,default:re,defer:re,dir:null,dirName:null,disabled:re,download:Hi,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:re,formTarget:null,headers:me,height:U,hidden:Hi,high:U,href:null,hrefLang:null,htmlFor:me,httpEquiv:me,id:null,imageSizes:null,imageSrcSet:null,inert:re,inputMode:null,integrity:null,is:null,isMap:re,itemId:null,itemProp:me,itemRef:me,itemScope:re,itemType:me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:re,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:re,muted:re,name:null,nonce:null,noModule:re,noValidate:re,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:re,optimum:U,pattern:null,ping:me,placeholder:null,playsInline:re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:re,referrerPolicy:null,rel:me,required:re,reversed:re,rows:U,rowSpan:U,sandbox:me,scope:null,scoped:re,seamless:re,selected:re,shadowRootClonable:re,shadowRootCustomElementRegistry:re,shadowRootDelegatesFocus:re,shadowRootMode:null,shadowRootSerializable:re,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:re,useMap:null,value:Se,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:me,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:re,declare:re,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:re,noHref:re,noShade:re,noWrap:re,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:re,disablePictureInPicture:re,disableRemotePlayback:re,exportParts:en,part:me,prefix:null,property:null,results:U,security:null,unselectable:null},space:"html",transform:Cf}),bb=Dn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:et,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:me,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:re,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:en,g2:en,glyphName:en,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:et,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:U,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:et,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:et,rev:et,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:et,requiredFeatures:et,requiredFonts:et,requiredFormats:et,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:et,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:et,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:et,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sf}),jf=Dn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Tf=Dn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Cf}),Bf=Dn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),vb={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},kb=/[A-Z]/g,ac=/-[a-z]/g,wb=/^data[-\w.:]+$/i;function Sb(e,t){const n=Wi(t);let r=t,o=Xe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wb.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(ac,jb);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!ac.test(s)){let a=s.replace(kb,Cb);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=zs}return new o(r,t)}function Cb(e){return"-"+e.toLowerCase()}function jb(e){return e.charAt(1).toUpperCase()}const Tb=kf([wf,yb,jf,Tf,Bf],"html"),_s=kf([wf,bb,jf,Tf,Bf],"svg");function Bb(e){return e.join(" ").trim()}function Ef(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mn={},Xo,lc;function Eb(){if(lc)return Xo;lc=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
412
|
+
`}),i.jsx(j2,{location:"bottom",buttonText:t,declineButtonText:n,enableDeclineButton:r,disableStyles:!0,containerClasses:"medixdeck-cookie-banner",contentClasses:"medixdeck-cookie-content",buttonWrapperClasses:"medixdeck-cookie-buttons",ButtonComponent:d=>i.jsx(Ye,{variant:"solid",colorScheme:"blue",size:"sm",onClick:d.onClick,id:d.id,children:d.children}),...s,children:i.jsxs(f.Box,{children:[e&&i.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:1,fontFamily:"var(--font-heading)",children:e}),i.jsx(f.Text,{fontSize:"sm",color:"text.heading",lineHeight:"1.5",children:o||`We use cookies to securely manage your session, enhance your browsing experience, and analyze our platform's performance. By clicking "Accept All", you consent to our use of cookies.`})]})})]})}mf.displayName="MedixCookieConsentBanner";const gf="medixdeck_pwa_dismissed",T2=14,B2=[.4,0,.2,1];function E2(){if(typeof window>"u")return!1;const e=window.matchMedia("(display-mode: standalone)").matches,t=window.navigator.standalone===!0;return e||t}function F2(){return typeof navigator>"u"?!1:/iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream}function A2(e){if(typeof localStorage>"u")return!1;try{const t=localStorage.getItem(gf);if(!t)return!1;const n=e*24*60*60*1e3;return Date.now()-Number(t)<n}catch{return!1}}function L2(){try{localStorage.setItem(gf,String(Date.now()))}catch{}}function I2({size:e=18,color:t="#0685FF"}){return i.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),i.jsx("polyline",{points:"16 6 12 2 8 6"}),i.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function D2(){return i.jsx(f.Box,{flexShrink:0,children:i.jsx(tn,{type:"icon",height:44})})}function xf({title:e="Install this app",description:t="Add this app to your home screen for faster access and a better experience.",installLabel:n="Install",dismissLabel:r="Not now",cooldownDays:o=T2,onInstall:s,onDismiss:a,appName:l="this app",icon:u,position:c="bottom",delaySeconds:d=0,forceVisible:h,forceIOS:p}){const m=es(),[g,x]=S.useState(!1),[y,v]=S.useState(!1),j=S.useRef(null),w=S.useRef(null);S.useEffect(()=>{const A=()=>{d>0?w.current=setTimeout(()=>x(!0),d*1e3):x(!0)},E=()=>{w.current&&clearTimeout(w.current)};if(h)return p&&v(!0),A(),E;if(E2()||A2(o))return E;if(F2())return v(!0),A(),E;const L=D=>{D.preventDefault(),j.current=D,A()};window.addEventListener("beforeinstallprompt",L);const R=()=>x(!1);return window.addEventListener("appinstalled",R),()=>{window.removeEventListener("beforeinstallprompt",L),window.removeEventListener("appinstalled",R),E()}},[o,d,h,p]);const F=S.useCallback(async()=>{if(j.current){try{await j.current.prompt(),(await j.current.userChoice).outcome==="accepted"&&(s==null||s())}catch{}j.current=null}x(!1)},[s]),B=S.useCallback(()=>{L2(),x(!1),a==null||a()},[a]),C=m?"#152035":"#FFFFFF",P=m?"#1E3050":"#E4E8F0";return i.jsx(lr,{children:g&&i.jsx(tt.div,{initial:{opacity:0,y:c==="bottom"?80:-80,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:c==="bottom"?80:-80,x:"-50%"},transition:{duration:.35,ease:B2},style:{position:"fixed",[c]:16,left:"50%",zIndex:1e4,width:"calc(100% - 32px)",maxWidth:480,pointerEvents:"auto"},children:i.jsx(f.Box,{borderRadius:"16px",p:{base:"4",md:"5"},style:{background:C,border:`1px solid ${P}`,boxShadow:"none"},children:i.jsxs(f.Flex,{gap:"4",align:"flex-start",children:[u??i.jsx(D2,{}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsx(f.Text,{fontWeight:"700",fontSize:"md",color:"text.heading",fontFamily:"var(--font-heading)",mb:"1",children:e}),y?i.jsxs(f.Box,{children:[i.jsxs(f.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:["To install ",l,", tap the"," ",i.jsx("span",{style:{display:"inline-flex",verticalAlign:"middle",margin:"0 2px"},children:i.jsx(I2,{size:16,color:m?"#70B6FF":"#0685FF"})})," ","Share button in Safari, then select"," ",i.jsx("span",{style:{fontWeight:700,color:m?"#F0F6FF":"#111926"},children:'"Add to Home Screen"'}),"."]}),i.jsx(f.Flex,{gap:"3",mb:"3",flexWrap:"wrap",children:[{step:"1",text:"Tap Share"},{step:"2",text:"Add to Home Screen"}].map(A=>i.jsxs(f.Flex,{align:"center",gap:"2",px:"3",py:"1.5",borderRadius:"8px",bg:"bg.subtle",children:[i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"20px",h:"20px",borderRadius:"full",flexShrink:0,style:{background:"#0685FF",color:"#FFFFFF",fontSize:"11px",fontWeight:700,fontFamily:"var(--font-body)"},children:A.step}),i.jsx(f.Text,{fontSize:"xs",fontWeight:"600",color:"text.body",fontFamily:"var(--font-body)",children:A.text})]},A.step))})]}):i.jsx(f.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:t}),i.jsxs(f.Flex,{gap:"3",align:"center",children:[!y&&i.jsx(Ye,{variant:"solid",colorScheme:"blue",size:"sm",onClick:F,children:n}),i.jsx(Ye,{variant:"ghost",colorScheme:"gray",size:"sm",onClick:B,children:y?"Got it":r})]})]}),i.jsx(f.Box,{as:"button","aria-label":"Close install prompt",onClick:B,display:"flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.subtle",color:"text.muted",flexShrink:0,cursor:"pointer",_hover:{color:"text.heading",bg:"bg.surface"},style:{border:"none",transition:"all 0.2s ease"},mt:"-1",children:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})})})}xf.displayName="MedixPWAInstallPrompt";/*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE */function $l(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R2(e){if(Array.isArray(e))return e}function M2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,a,l=[],u=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(u=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){c=!0,o=d}finally{try{if(!u&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}function P2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
413
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O2(e,t){return R2(e)||M2(e,t)||z2(e,t)||P2()}function z2(e,t){if(e){if(typeof e=="string")return $l(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$l(e,t):void 0}}const yf=Object.entries,Gl=Object.setPrototypeOf,_2=Object.isFrozen,N2=Object.getPrototypeOf,V2=Object.getOwnPropertyDescriptor;let Ue=Object.freeze,at=Object.seal,bn=Object.create,bf=typeof Reflect<"u"&&Reflect,Ni=bf.apply,Vi=bf.construct;Ue||(Ue=function(t){return t});at||(at=function(t){return t});Ni||(Ni=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];return t.apply(n,o)});Vi||(Vi=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});const Gt=je(Array.prototype.forEach),W2=je(Array.prototype.lastIndexOf),Yl=je(Array.prototype.pop),fn=je(Array.prototype.push),H2=je(Array.prototype.splice),Ve=Array.isArray,Zn=je(String.prototype.toLowerCase),Uo=je(String.prototype.toString),Kl=je(String.prototype.match),hn=je(String.prototype.replace),ql=je(String.prototype.indexOf),U2=je(String.prototype.trim),$2=je(Number.prototype.toString),G2=je(Boolean.prototype.toString),Xl=typeof BigInt>"u"?null:je(BigInt.prototype.toString),Zl=typeof Symbol>"u"?null:je(Symbol.prototype.toString),ke=je(Object.prototype.hasOwnProperty),Wn=je(Object.prototype.toString),Me=je(RegExp.prototype.test),pn=Y2(TypeError);function je(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Ni(e,t,r)}}function Y2(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Vi(e,n)}}function ae(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zn;if(Gl&&Gl(e,null),!Ve(t))return e;let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const s=n(o);s!==o&&(_2(t)||(t[r]=s),o=s)}e[o]=!0}return e}function K2(e){for(let t=0;t<e.length;t++)ke(e,t)||(e[t]=null);return e}function _e(e){const t=bn(null);for(const r of yf(e)){var n=O2(r,2);const o=n[0],s=n[1];ke(e,o)&&(Ve(s)?t[o]=K2(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=_e(s):t[o]=s)}return t}function q2(e){switch(typeof e){case"string":return e;case"number":return $2(e);case"boolean":return G2(e);case"bigint":return Xl?Xl(e):"0";case"symbol":return Zl?Zl(e):"Symbol()";case"undefined":return Wn(e);case"function":case"object":{if(e===null)return Wn(e);const t=e,n=xt(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Wn(r)}return Wn(e)}default:return Wn(e)}}function xt(e,t){for(;e!==null;){const r=V2(e,t);if(r){if(r.get)return je(r.get);if(typeof r.value=="function")return je(r.value)}e=N2(e)}function n(){return null}return n}function X2(e){try{return Me(e,""),!0}catch{return!1}}const Jl=Ue(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),$o=Ue(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Go=Ue(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Z2=Ue(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Yo=Ue(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),J2=Ue(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ql=Ue(["#text"]),ec=Ue(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ko=Ue(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),tc=Ue(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ir=Ue(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Q2=at(/{{[\w\W]*|^[\w\W]*}}/g),eb=at(/<%[\w\W]*|^[\w\W]*%>/g),tb=at(/\${[\w\W]*/g),nb=at(/^data-[\-\w.\u00B7-\uFFFF]+$/),rb=at(/^aria-[\-\w]+$/),nc=at(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ob=at(/^(?:\w+script|data):/i),ib=at(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sb=at(/^html$/i),ab=at(/^[a-z][.\w]*(-[.\w]+)+$/i),gt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},lb=function(){return typeof window>"u"?null:window},cb=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},rc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function vf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lb();const t=J=>vf(J);if(t.version="3.4.8",t.removed=[],!e||!e.document||e.document.nodeType!==gt.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,o=r.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,l=e.Element,u=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const d=e.DOMParser,h=e.trustedTypes,p=l.prototype,m=xt(p,"cloneNode"),g=xt(p,"remove"),x=xt(p,"nextSibling"),y=xt(p,"childNodes"),v=xt(p,"parentNode"),j=xt(p,"shadowRoot"),w=xt(p,"attributes"),F=a&&a.prototype?xt(a.prototype,"nodeType"):null,B=a&&a.prototype?xt(a.prototype,"nodeName"):null;if(typeof s=="function"){const J=n.createElement("template");J.content&&J.content.ownerDocument&&(n=J.content.ownerDocument)}let C,P="",A=0;const E=function(k){if(A>0)throw pn('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');A++;try{return C.createHTML(k)}finally{A--}},L=n,R=L.implementation,D=L.createNodeIterator,N=L.createDocumentFragment,O=L.getElementsByTagName,I=r.importNode;let M=rc();t.isSupported=typeof yf=="function"&&typeof v=="function"&&R&&R.createHTMLDocument!==void 0;const H=Q2,W=eb,$=tb,b=nb,Y=rb,oe=ob,T=ib,ie=ab;let se=nc,X=null;const Z=ae({},[...Jl,...$o,...Go,...Yo,...Ql]);let Q=null;const ue=ae({},[...ec,...Ko,...tc,...Ir]);let ee=Object.seal(bn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ze=null,Ae=null;const Je=Object.seal(bn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let xr=!0,rn=!0,Mn=!1,Pn=!0,ht=!1,At=!0,pt=!1,On=!1,zn=!1,Lt=!1,on=!1,sn=!1,z=!0,G=!1;const ne="user-content-";let le=!0,de=!1,Le={},Ie=null;const Qe=ae({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let It=null;const Dt=ae({},["audio","video","img","source","image","track"]);let Re=null;const Bt=ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",yr="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xhtml";let an=mt,yo=!1,bo=null;const lh=ae({},[$e,yr,mt],Uo);let vo=ae({},["mi","mo","mn","ms","mtext"]),ko=ae({},["annotation-xml"]);const ch=ae({},["title","style","font","a","script"]);let _n=null;const uh=["application/xhtml+xml","text/html"],dh="text/html";let we=null,ln=null;const fh=n.createElement("form"),Js=function(k){return k instanceof RegExp||k instanceof Function},wo=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ln&&ln===k)return;(!k||typeof k!="object")&&(k={}),k=_e(k),_n=uh.indexOf(k.PARSER_MEDIA_TYPE)===-1?dh:k.PARSER_MEDIA_TYPE,we=_n==="application/xhtml+xml"?Uo:Zn,X=ke(k,"ALLOWED_TAGS")&&Ve(k.ALLOWED_TAGS)?ae({},k.ALLOWED_TAGS,we):Z,Q=ke(k,"ALLOWED_ATTR")&&Ve(k.ALLOWED_ATTR)?ae({},k.ALLOWED_ATTR,we):ue,bo=ke(k,"ALLOWED_NAMESPACES")&&Ve(k.ALLOWED_NAMESPACES)?ae({},k.ALLOWED_NAMESPACES,Uo):lh,Re=ke(k,"ADD_URI_SAFE_ATTR")&&Ve(k.ADD_URI_SAFE_ATTR)?ae(_e(Bt),k.ADD_URI_SAFE_ATTR,we):Bt,It=ke(k,"ADD_DATA_URI_TAGS")&&Ve(k.ADD_DATA_URI_TAGS)?ae(_e(Dt),k.ADD_DATA_URI_TAGS,we):Dt,Ie=ke(k,"FORBID_CONTENTS")&&Ve(k.FORBID_CONTENTS)?ae({},k.FORBID_CONTENTS,we):Qe,ze=ke(k,"FORBID_TAGS")&&Ve(k.FORBID_TAGS)?ae({},k.FORBID_TAGS,we):_e({}),Ae=ke(k,"FORBID_ATTR")&&Ve(k.FORBID_ATTR)?ae({},k.FORBID_ATTR,we):_e({}),Le=ke(k,"USE_PROFILES")?k.USE_PROFILES&&typeof k.USE_PROFILES=="object"?_e(k.USE_PROFILES):k.USE_PROFILES:!1,xr=k.ALLOW_ARIA_ATTR!==!1,rn=k.ALLOW_DATA_ATTR!==!1,Mn=k.ALLOW_UNKNOWN_PROTOCOLS||!1,Pn=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ht=k.SAFE_FOR_TEMPLATES||!1,At=k.SAFE_FOR_XML!==!1,pt=k.WHOLE_DOCUMENT||!1,Lt=k.RETURN_DOM||!1,on=k.RETURN_DOM_FRAGMENT||!1,sn=k.RETURN_TRUSTED_TYPE||!1,zn=k.FORCE_BODY||!1,z=k.SANITIZE_DOM!==!1,G=k.SANITIZE_NAMED_PROPS||!1,le=k.KEEP_CONTENT!==!1,de=k.IN_PLACE||!1,se=X2(k.ALLOWED_URI_REGEXP)?k.ALLOWED_URI_REGEXP:nc,an=typeof k.NAMESPACE=="string"?k.NAMESPACE:mt,vo=ke(k,"MATHML_TEXT_INTEGRATION_POINTS")&&k.MATHML_TEXT_INTEGRATION_POINTS&&typeof k.MATHML_TEXT_INTEGRATION_POINTS=="object"?_e(k.MATHML_TEXT_INTEGRATION_POINTS):ae({},["mi","mo","mn","ms","mtext"]),ko=ke(k,"HTML_INTEGRATION_POINTS")&&k.HTML_INTEGRATION_POINTS&&typeof k.HTML_INTEGRATION_POINTS=="object"?_e(k.HTML_INTEGRATION_POINTS):ae({},["annotation-xml"]);const _=ke(k,"CUSTOM_ELEMENT_HANDLING")&&k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING=="object"?_e(k.CUSTOM_ELEMENT_HANDLING):bn(null);if(ee=bn(null),ke(_,"tagNameCheck")&&Js(_.tagNameCheck)&&(ee.tagNameCheck=_.tagNameCheck),ke(_,"attributeNameCheck")&&Js(_.attributeNameCheck)&&(ee.attributeNameCheck=_.attributeNameCheck),ke(_,"allowCustomizedBuiltInElements")&&typeof _.allowCustomizedBuiltInElements=="boolean"&&(ee.allowCustomizedBuiltInElements=_.allowCustomizedBuiltInElements),ht&&(rn=!1),on&&(Lt=!0),Le&&(X=ae({},Ql),Q=bn(null),Le.html===!0&&(ae(X,Jl),ae(Q,ec)),Le.svg===!0&&(ae(X,$o),ae(Q,Ko),ae(Q,Ir)),Le.svgFilters===!0&&(ae(X,Go),ae(Q,Ko),ae(Q,Ir)),Le.mathMl===!0&&(ae(X,Yo),ae(Q,tc),ae(Q,Ir))),Je.tagCheck=null,Je.attributeCheck=null,ke(k,"ADD_TAGS")&&(typeof k.ADD_TAGS=="function"?Je.tagCheck=k.ADD_TAGS:Ve(k.ADD_TAGS)&&(X===Z&&(X=_e(X)),ae(X,k.ADD_TAGS,we))),ke(k,"ADD_ATTR")&&(typeof k.ADD_ATTR=="function"?Je.attributeCheck=k.ADD_ATTR:Ve(k.ADD_ATTR)&&(Q===ue&&(Q=_e(Q)),ae(Q,k.ADD_ATTR,we))),ke(k,"ADD_URI_SAFE_ATTR")&&Ve(k.ADD_URI_SAFE_ATTR)&&ae(Re,k.ADD_URI_SAFE_ATTR,we),ke(k,"FORBID_CONTENTS")&&Ve(k.FORBID_CONTENTS)&&(Ie===Qe&&(Ie=_e(Ie)),ae(Ie,k.FORBID_CONTENTS,we)),ke(k,"ADD_FORBID_CONTENTS")&&Ve(k.ADD_FORBID_CONTENTS)&&(Ie===Qe&&(Ie=_e(Ie)),ae(Ie,k.ADD_FORBID_CONTENTS,we)),le&&(X["#text"]=!0),pt&&ae(X,["html","head","body"]),X.table&&(ae(X,["tbody"]),delete ze.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw pn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const K=C;C=k.TRUSTED_TYPES_POLICY;try{P=E("")}catch(fe){throw C=K,fe}}else C===void 0&&k.TRUSTED_TYPES_POLICY!==null&&(C=cb(h,o)),C&&typeof P=="string"&&(P=E(""));(M.uponSanitizeElement.length>0||M.uponSanitizeAttribute.length>0)&&X===Z&&(X=_e(X)),M.uponSanitizeAttribute.length>0&&Q===ue&&(Q=_e(Q)),Ue&&Ue(k),ln=k},Qs=ae({},[...$o,...Go,...Z2]),ea=ae({},[...Yo,...J2]),hh=function(k){let _=v(k);(!_||!_.tagName)&&(_={namespaceURI:an,tagName:"template"});const K=Zn(k.tagName),fe=Zn(_.tagName);return bo[k.namespaceURI]?k.namespaceURI===yr?_.namespaceURI===mt?K==="svg":_.namespaceURI===$e?K==="svg"&&(fe==="annotation-xml"||vo[fe]):!!Qs[K]:k.namespaceURI===$e?_.namespaceURI===mt?K==="math":_.namespaceURI===yr?K==="math"&&ko[fe]:!!ea[K]:k.namespaceURI===mt?_.namespaceURI===yr&&!ko[fe]||_.namespaceURI===$e&&!vo[fe]?!1:!ea[K]&&(ch[K]||!Qs[K]):!!(_n==="application/xhtml+xml"&&bo[k.namespaceURI]):!1},lt=function(k){fn(t.removed,{element:k});try{v(k).removeChild(k)}catch{g(k)}},Wt=function(k,_){try{fn(t.removed,{attribute:_.getAttributeNode(k),from:_})}catch{fn(t.removed,{attribute:null,from:_})}if(_.removeAttribute(k),k==="is")if(Lt||on)try{lt(_)}catch{}else try{_.setAttribute(k,"")}catch{}},ta=function(k){let _=null,K=null;if(zn)k="<remove></remove>"+k;else{const pe=Kl(k,/^[\r\n\t ]+/);K=pe&&pe[0]}_n==="application/xhtml+xml"&&an===mt&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const fe=C?E(k):k;if(an===mt)try{_=new d().parseFromString(fe,_n)}catch{}if(!_||!_.documentElement){_=R.createDocument(an,"template",null);try{_.documentElement.innerHTML=yo?P:fe}catch{}}const ce=_.body||_.documentElement;return k&&K&&ce.insertBefore(n.createTextNode(K),ce.childNodes[0]||null),an===mt?O.call(_,pt?"html":"body")[0]:pt?_.documentElement:ce},na=function(k){return D.call(k.ownerDocument||k,k,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},So=function(k){var _,K;k.normalize();const fe=D.call(k.ownerDocument||k,k,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let ce=fe.nextNode();for(;ce;){let Be=ce.data;Gt([H,W,$],rt=>{Be=hn(Be,rt," ")}),ce.data=Be,ce=fe.nextNode()}const pe=(_=(K=k.querySelectorAll)===null||K===void 0?void 0:K.call(k,"template"))!==null&&_!==void 0?_:[];Gt(Array.from(pe),Be=>{cn(Be.content)&&So(Be.content)})},br=function(k){const _=B?B(k):null;return typeof _!="string"||we(_)!=="form"?!1:typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||k.attributes!==w(k)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function"||k.nodeType!==F(k)||k.childNodes!==y(k)},cn=function(k){if(!F||typeof k!="object"||k===null)return!1;try{return F(k)===gt.documentFragment}catch{return!1}},vr=function(k){if(!F||typeof k!="object"||k===null)return!1;try{return typeof F(k)=="number"}catch{return!1}};function Et(J,k,_){Gt(J,K=>{K.call(t,k,_,ln)})}const ra=function(k){let _=null;if(Et(M.beforeSanitizeElements,k,null),br(k))return lt(k),!0;const K=we(B?B(k):k.nodeName);if(Et(M.uponSanitizeElement,k,{tagName:K,allowedTags:X}),At&&k.hasChildNodes()&&!vr(k.firstElementChild)&&Me(/<[/\w!]/g,k.innerHTML)&&Me(/<[/\w!]/g,k.textContent)||At&&k.namespaceURI===mt&&K==="style"&&vr(k.firstElementChild)||k.nodeType===gt.progressingInstruction||At&&k.nodeType===gt.comment&&Me(/<[/\w]/g,k.data))return lt(k),!0;if(ze[K]||!(Je.tagCheck instanceof Function&&Je.tagCheck(K))&&!X[K]){if(!ze[K]&&ia(K)&&(ee.tagNameCheck instanceof RegExp&&Me(ee.tagNameCheck,K)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(K)))return!1;if(le&&!Ie[K]){const ce=v(k),pe=y(k);if(pe&&ce){const Be=pe.length;for(let rt=Be-1;rt>=0;--rt){const ct=m(pe[rt],!0);ce.insertBefore(ct,x(k))}}}return lt(k),!0}return(F?F(k):k.nodeType)===gt.element&&!hh(k)||(K==="noscript"||K==="noembed"||K==="noframes")&&Me(/<\/no(script|embed|frames)/i,k.innerHTML)?(lt(k),!0):(ht&&k.nodeType===gt.text&&(_=k.textContent,Gt([H,W,$],ce=>{_=hn(_,ce," ")}),k.textContent!==_&&(fn(t.removed,{element:k.cloneNode()}),k.textContent=_)),Et(M.afterSanitizeElements,k,null),!1)},oa=function(k,_,K){if(Ae[_]||z&&(_==="id"||_==="name")&&(K in n||K in fh))return!1;const fe=Q[_]||Je.attributeCheck instanceof Function&&Je.attributeCheck(_,k);if(!(rn&&!Ae[_]&&Me(b,_))){if(!(xr&&Me(Y,_))){if(!fe||Ae[_]){if(!(ia(k)&&(ee.tagNameCheck instanceof RegExp&&Me(ee.tagNameCheck,k)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(k))&&(ee.attributeNameCheck instanceof RegExp&&Me(ee.attributeNameCheck,_)||ee.attributeNameCheck instanceof Function&&ee.attributeNameCheck(_,k))||_==="is"&&ee.allowCustomizedBuiltInElements&&(ee.tagNameCheck instanceof RegExp&&Me(ee.tagNameCheck,K)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(K))))return!1}else if(!Re[_]){if(!Me(se,hn(K,T,""))){if(!((_==="src"||_==="xlink:href"||_==="href")&&k!=="script"&&ql(K,"data:")===0&&It[k])){if(!(Mn&&!Me(oe,hn(K,T,"")))){if(K)return!1}}}}}}return!0},ph=ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ia=function(k){return!ph[Zn(k)]&&Me(ie,k)},sa=function(k){Et(M.beforeSanitizeAttributes,k,null);const _=k.attributes;if(!_||br(k))return;const K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let fe=_.length;for(;fe--;){const ce=_[fe],pe=ce.name,Be=ce.namespaceURI,rt=ce.value,ct=we(pe),Co=rt;let De=pe==="value"?Co:U2(Co);if(K.attrName=ct,K.attrValue=De,K.keepAttr=!0,K.forceKeepAttr=void 0,Et(M.uponSanitizeAttribute,k,K),De=K.attrValue,G&&(ct==="id"||ct==="name")&&ql(De,ne)!==0&&(Wt(pe,k),De=ne+De),At&&Me(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,De)){Wt(pe,k);continue}if(ct==="attributename"&&Kl(De,"href")){Wt(pe,k);continue}if(K.forceKeepAttr)continue;if(!K.keepAttr){Wt(pe,k);continue}if(!Pn&&Me(/\/>/i,De)){Wt(pe,k);continue}ht&&Gt([H,W,$],la=>{De=hn(De,la," ")});const aa=we(k.nodeName);if(!oa(aa,ct,De)){Wt(pe,k);continue}if(C&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Be)switch(h.getAttributeType(aa,ct)){case"TrustedHTML":{De=E(De);break}case"TrustedScriptURL":{De=C.createScriptURL(De);break}}if(De!==Co)try{Be?k.setAttributeNS(Be,pe,De):k.setAttribute(pe,De),br(k)?lt(k):Yl(t.removed)}catch{Wt(pe,k)}}Et(M.afterSanitizeAttributes,k,null)},kr=function(k){let _=null;const K=na(k);for(Et(M.beforeSanitizeShadowDOM,k,null);_=K.nextNode();)if(Et(M.uponSanitizeShadowNode,_,null),ra(_),sa(_),cn(_.content)&&kr(_.content),(F?F(_):_.nodeType)===gt.element){const ce=j?j(_):_.shadowRoot;cn(ce)&&(un(ce),kr(ce))}Et(M.afterSanitizeShadowDOM,k,null)},un=function(k){const _=F?F(k):k.nodeType;if(_===gt.element){const ce=j?j(k):k.shadowRoot;cn(ce)&&(un(ce),kr(ce))}const K=y?y(k):k.childNodes;if(!K)return;const fe=[];Gt(K,ce=>{fn(fe,ce)});for(const ce of fe)un(ce);if(_===gt.element){const ce=B?B(k):null;if(typeof ce=="string"&&we(ce)==="template"){const pe=k.content;cn(pe)&&un(pe)}}};return t.sanitize=function(J){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,K=null,fe=null,ce=null;if(yo=!J,yo&&(J="<!-->"),typeof J!="string"&&!vr(J)&&(J=q2(J),typeof J!="string"))throw pn("dirty is not a string, aborting");if(!t.isSupported)return J;if(On||wo(k),t.removed=[],typeof J=="string"&&(de=!1),de){const rt=B?B(J):J.nodeName;if(typeof rt=="string"){const ct=we(rt);if(!X[ct]||ze[ct])throw pn("root node is forbidden and cannot be sanitized in-place")}if(br(J))throw pn("root node is clobbered and cannot be sanitized in-place");un(J)}else if(vr(J))_=ta("<!---->"),K=_.ownerDocument.importNode(J,!0),K.nodeType===gt.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?_=K:_.appendChild(K),un(K);else{if(!Lt&&!ht&&!pt&&J.indexOf("<")===-1)return C&&sn?E(J):J;if(_=ta(J),!_)return Lt?null:sn?P:""}_&&zn&<(_.firstChild);const pe=na(de?J:_);for(;fe=pe.nextNode();)ra(fe),sa(fe),cn(fe.content)&&kr(fe.content);if(de)return ht&&So(J),J;if(Lt){if(ht&&So(_),on)for(ce=N.call(_.ownerDocument);_.firstChild;)ce.appendChild(_.firstChild);else ce=_;return(Q.shadowroot||Q.shadowrootmode)&&(ce=I.call(r,ce,!0)),ce}let Be=pt?_.outerHTML:_.innerHTML;return pt&&X["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&Me(sb,_.ownerDocument.doctype.name)&&(Be="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
|
|
414
|
+
`+Be),ht&&Gt([H,W,$],rt=>{Be=hn(Be,rt," ")}),C&&sn?E(Be):Be},t.setConfig=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wo(J),On=!0},t.clearConfig=function(){ln=null,On=!1},t.isValidAttribute=function(J,k,_){ln||wo({});const K=we(J),fe=we(k);return oa(K,fe,_)},t.addHook=function(J,k){typeof k=="function"&&fn(M[J],k)},t.removeHook=function(J,k){if(k!==void 0){const _=W2(M[J],k);return _===-1?void 0:H2(M[J],_,1)[0]}return Yl(M[J])},t.removeHooks=function(J){M[J]=[]},t.removeAllHooks=function(){M=rc()},t}var Te=vf(),ub=Te;Te.sanitize.bind(Te);Te.isSupported;Te.addHook.bind(Te);Te.removeHook.bind(Te);Te.removeHooks.bind(Te);Te.removeAllHooks.bind(Te);Te.setConfig.bind(Te);Te.clearConfig.bind(Te);Te.isValidAttribute.bind(Te);Te.version;Te.removed;function db(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const fb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pb={};function oc(e,t){return(pb.jsx?hb:fb).test(e)}const mb=/[ \t\n\f\r]/g;function gb(e){return typeof e=="object"?e.type==="text"?ic(e.value):!1:ic(e)}function ic(e){return e.replace(mb,"")===""}class mr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}mr.prototype.normal={};mr.prototype.property={};mr.prototype.space=void 0;function kf(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new mr(n,r,t)}function Wi(e){return e.toLowerCase()}class Xe{constructor(t,n){this.attribute=n,this.property=t}}Xe.prototype.attribute="";Xe.prototype.booleanish=!1;Xe.prototype.boolean=!1;Xe.prototype.commaOrSpaceSeparated=!1;Xe.prototype.commaSeparated=!1;Xe.prototype.defined=!1;Xe.prototype.mustUseProperty=!1;Xe.prototype.number=!1;Xe.prototype.overloadedBoolean=!1;Xe.prototype.property="";Xe.prototype.spaceSeparated=!1;Xe.prototype.space=void 0;let xb=0;const re=nn(),Se=nn(),Hi=nn(),U=nn(),me=nn(),en=nn(),et=nn();function nn(){return 2**++xb}const Ui=Object.freeze(Object.defineProperty({__proto__:null,boolean:re,booleanish:Se,commaOrSpaceSeparated:et,commaSeparated:en,number:U,overloadedBoolean:Hi,spaceSeparated:me},Symbol.toStringTag,{value:"Module"})),qo=Object.keys(Ui);class zs extends Xe{constructor(t,n,r,o){let s=-1;if(super(t,n),sc(this,"space",o),typeof r=="number")for(;++s<qo.length;){const a=qo[s];sc(this,qo[s],(r&Ui[a])===Ui[a])}}}zs.prototype.defined=!0;function sc(e,t,n){n&&(e[t]=n)}function Dn(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const s=new zs(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Wi(r)]=r,n[Wi(s.attribute)]=r}return new mr(t,n,e.space)}const wf=Dn({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:me,ariaCurrent:null,ariaDescribedBy:me,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:me,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:me,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:me,ariaLevel:U,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:me,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:me,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Se,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sf(e,t){return t in e?e[t]:t}function Cf(e,t){return Sf(e,t.toLowerCase())}const yb=Dn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:en,acceptCharset:me,accessKey:me,action:null,allow:null,allowFullScreen:re,allowPaymentRequest:re,allowUserMedia:re,alpha:re,alt:null,as:null,async:re,autoCapitalize:null,autoComplete:me,autoFocus:re,autoPlay:re,blocking:me,capture:null,charSet:null,checked:re,cite:null,className:me,closedBy:null,colorSpace:null,cols:U,colSpan:U,command:null,commandFor:null,content:null,contentEditable:Se,controls:re,controlsList:me,coords:U|en,crossOrigin:null,data:null,dateTime:null,decoding:null,default:re,defer:re,dir:null,dirName:null,disabled:re,download:Hi,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:re,formTarget:null,headers:me,height:U,hidden:Hi,high:U,href:null,hrefLang:null,htmlFor:me,httpEquiv:me,id:null,imageSizes:null,imageSrcSet:null,inert:re,inputMode:null,integrity:null,is:null,isMap:re,itemId:null,itemProp:me,itemRef:me,itemScope:re,itemType:me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:re,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:re,muted:re,name:null,nonce:null,noModule:re,noValidate:re,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:re,optimum:U,pattern:null,ping:me,placeholder:null,playsInline:re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:re,referrerPolicy:null,rel:me,required:re,reversed:re,rows:U,rowSpan:U,sandbox:me,scope:null,scoped:re,seamless:re,selected:re,shadowRootClonable:re,shadowRootCustomElementRegistry:re,shadowRootDelegatesFocus:re,shadowRootMode:null,shadowRootSerializable:re,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:re,useMap:null,value:Se,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:me,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:re,declare:re,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:re,noHref:re,noShade:re,noWrap:re,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:re,disablePictureInPicture:re,disableRemotePlayback:re,exportParts:en,part:me,prefix:null,property:null,results:U,security:null,unselectable:null},space:"html",transform:Cf}),bb=Dn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:et,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:me,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:re,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:en,g2:en,glyphName:en,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:et,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:U,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:et,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:et,rev:et,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:et,requiredFeatures:et,requiredFonts:et,requiredFormats:et,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:et,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:et,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:et,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sf}),jf=Dn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Tf=Dn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Cf}),Bf=Dn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),vb={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},kb=/[A-Z]/g,ac=/-[a-z]/g,wb=/^data[-\w.:]+$/i;function Sb(e,t){const n=Wi(t);let r=t,o=Xe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wb.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(ac,jb);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!ac.test(s)){let a=s.replace(kb,Cb);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=zs}return new o(r,t)}function Cb(e){return"-"+e.toLowerCase()}function jb(e){return e.charAt(1).toUpperCase()}const Tb=kf([wf,yb,jf,Tf,Bf],"html"),_s=kf([wf,bb,jf,Tf,Bf],"svg");function Bb(e){return e.join(" ").trim()}function Ef(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mn={},Xo,lc;function Eb(){if(lc)return Xo;lc=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
415
415
|
`,c="/",d="*",h="",p="comment",m="declaration";function g(y,v){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];v=v||{};var j=1,w=1;function F(O){var I=O.match(t);I&&(j+=I.length);var M=O.lastIndexOf(u);w=~M?O.length-M:w+O.length}function B(){var O={line:j,column:w};return function(I){return I.position=new C(O),E(),I}}function C(O){this.start=O,this.end={line:j,column:w},this.source=v.source}C.prototype.content=y;function P(O){var I=new Error(v.source+":"+j+":"+w+": "+O);if(I.reason=O,I.filename=v.source,I.line=j,I.column=w,I.source=y,!v.silent)throw I}function A(O){var I=O.exec(y);if(I){var M=I[0];return F(M),y=y.slice(M.length),I}}function E(){A(n)}function L(O){var I;for(O=O||[];I=R();)I!==!1&&O.push(I);return O}function R(){var O=B();if(!(c!=y.charAt(0)||d!=y.charAt(1))){for(var I=2;h!=y.charAt(I)&&(d!=y.charAt(I)||c!=y.charAt(I+1));)++I;if(I+=2,h===y.charAt(I-1))return P("End of comment missing");var M=y.slice(2,I-2);return w+=2,F(M),y=y.slice(I),w+=2,O({type:p,comment:M})}}function D(){var O=B(),I=A(r);if(I){if(R(),!A(o))return P("property missing ':'");var M=A(s),H=O({type:m,property:x(I[0].replace(e,h)),value:M?x(M[0].replace(e,h)):h});return A(a),H}}function N(){var O=[];L(O);for(var I;I=D();)I!==!1&&(O.push(I),L(O));return O}return E(),N()}function x(y){return y?y.replace(l,h):h}return Xo=g,Xo}var cc;function Fb(){if(cc)return mn;cc=1;var e=mn&&mn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mn,"__esModule",{value:!0}),mn.default=n;const t=e(Eb());function n(r,o){let s=null;if(!r||typeof r!="string")return s;const a=(0,t.default)(r),l=typeof o=="function";return a.forEach(u=>{if(u.type!=="declaration")return;const{property:c,value:d}=u;l?o(c,d,u):d&&(s=s||{},s[c]=d)}),s}return mn}var Hn={},uc;function Ab(){if(uc)return Hn;uc=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(c){return!c||n.test(c)||e.test(c)},a=function(c,d){return d.toUpperCase()},l=function(c,d){return"".concat(d,"-")},u=function(c,d){return d===void 0&&(d={}),s(c)?c:(c=c.toLowerCase(),d.reactCompat?c=c.replace(o,l):c=c.replace(r,l),c.replace(t,a))};return Hn.camelCase=u,Hn}var Un,dc;function Lb(){if(dc)return Un;dc=1;var e=Un&&Un.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Fb()),n=Ab();function r(o,s){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(l,u){l&&u&&(a[(0,n.camelCase)(l,s)]=u)}),a}return r.default=r,Un=r,Un}var Ib=Lb();const Db=Ef(Ib),Ff=Af("end"),Ns=Af("start");function Af(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Rb(e){const t=Ns(e),n=Ff(e);if(t&&n)return{start:t,end:n}}function tr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fc(e.position):"start"in e||"end"in e?fc(e):"line"in e||"column"in e?$i(e):""}function $i(e){return hc(e&&e.line)+":"+hc(e&&e.column)}function fc(e){return $i(e&&e.start)+"-"+$i(e&&e.end)}function hc(e){return e&&typeof e=="number"?e:1}class Ne extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?o=t:!s.cause&&t&&(a=!0,o=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=l?l.line:void 0,this.name=tr(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ne.prototype.file="";Ne.prototype.name="";Ne.prototype.reason="";Ne.prototype.message="";Ne.prototype.stack="";Ne.prototype.column=void 0;Ne.prototype.line=void 0;Ne.prototype.ancestors=void 0;Ne.prototype.cause=void 0;Ne.prototype.fatal=void 0;Ne.prototype.place=void 0;Ne.prototype.ruleId=void 0;Ne.prototype.source=void 0;const Vs={}.hasOwnProperty,Mb=new Map,Pb=/[A-Z]/g,Ob=new Set(["table","tbody","thead","tfoot","tr"]),zb=new Set(["td","th"]),Lf="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _b(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Yb(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Gb(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_s:Tb,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=If(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function If(e,t,n){if(t.type==="element")return Nb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Vb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Hb(e,t,n);if(t.type==="mdxjsEsm")return Wb(e,t);if(t.type==="root")return Ub(e,t,n);if(t.type==="text")return $b(e,t)}function Nb(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=_s,e.schema=o),e.ancestors.push(t);const s=Rf(e,t.tagName,!1),a=Kb(e,t);let l=Hs(e,t);return Ob.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!gb(u):!0})),Df(e,a,s,t),Ws(a,l),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Vb(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}cr(e,t.position)}function Wb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);cr(e,t.position)}function Hb(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=_s,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:Rf(e,t.name,!0),a=qb(e,t),l=Hs(e,t);return Df(e,a,s,t),Ws(a,l),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Ub(e,t,n){const r={};return Ws(r,Hs(e,t)),e.create(t,e.Fragment,r,n)}function $b(e,t){return t.value}function Df(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ws(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Gb(e,t,n){return r;function r(o,s,a,l){const c=Array.isArray(a.children)?n:t;return l?c(s,a,l):c(s,a)}}function Yb(e,t){return n;function n(r,o,s,a){const l=Array.isArray(s.children),u=Ns(r);return t(o,s,a,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Kb(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Vs.call(t.properties,o)){const s=Xb(e,o,t.properties[o]);if(s){const[a,l]=s;e.tableCellAlignToStyle&&a==="align"&&typeof l=="string"&&zb.has(t.tagName)?r=l:n[a]=l}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function qb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const l=a.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else cr(e,t.position);else{const o=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,s=e.evaluater.evaluateExpression(l.expression)}else cr(e,t.position);else s=r.value===null?!0:r.value;n[o]=s}return n}function Hs(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Mb;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const u=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(u){const c=o.get(u)||0;a=u+"-"+c,o.set(u,c+1)}}const l=If(e,s,a);l!==void 0&&n.push(l)}return n}function Xb(e,t,n){const r=Sb(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?db(n):Bb(n)),r.property==="style"){let o=typeof n=="object"?n:Zb(e,String(n));return e.stylePropertyNameCase==="css"&&(o=Jb(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?vb[r.property]||r.property:r.attribute,n]}}function Zb(e,t){try{return Db(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Ne("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Lf+"#cannot-parse-style-attribute",o}}function Rf(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let s=-1,a;for(;++s<o.length;){const l=oc(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};a=a?{type:"MemberExpression",object:a,property:l,computed:!!(s&&l.type==="Literal"),optional:!1}:l}r=a}else r=oc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Vs.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);cr(e)}function cr(e,t){const n=new Ne("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Lf+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Jb(e){const t={};let n;for(n in e)Vs.call(e,n)&&(t[Qb(n)]=e[n]);return t}function Qb(e){let t=e.replace(Pb,e5);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function e5(e){return"-"+e.toLowerCase()}const Zo={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},t5={};function n5(e,t){const n=t5,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Mf(e,r,o)}function Mf(e,t,n){if(r5(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return pc(e.children,t,n)}return Array.isArray(e)?pc(e,t,n):""}function pc(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Mf(e[o],t,n);return r.join("")}function r5(e){return!!(e&&typeof e=="object")}const mc=document.createElement("i");function Us(e){const t="&"+e+";";mc.innerHTML=t;const n=mc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Tt(e,t,n,r){const o=e.length;let s=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function ot(e,t){return e.length>0?(Tt(e,e.length,0,t),e):t}const gc={}.hasOwnProperty;function o5(e){const t={};let n=-1;for(;++n<e.length;)i5(t,e[n]);return t}function i5(e,t){let n;for(n in t){const o=(gc.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){gc.call(o,a)||(o[a]=[]);const l=s[a];s5(o[a],Array.isArray(l)?l:l?[l]:[])}}}function s5(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Tt(e,0,0,r)}function Pf(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Tn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wt=Vt(/[A-Za-z]/),nt=Vt(/[\dA-Za-z]/),a5=Vt(/[#-'*+\--9=?A-Z^-~]/);function Gi(e){return e!==null&&(e<32||e===127)}const Yi=Vt(/\d/),l5=Vt(/[\dA-Fa-f]/),c5=Vt(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function qe(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const u5=Vt(new RegExp("\\p{P}|\\p{S}","u")),d5=Vt(/\s/);function Vt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Rn(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&nt(e.charCodeAt(n+1))&&nt(e.charCodeAt(n+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const l=e.charCodeAt(n+1);s<56320&&l>56319&&l<57344?(a=String.fromCharCode(s,l),o=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function xe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(u){return he(u)?(e.enter(n),l(u)):t(u)}function l(u){return he(u)&&s++<o?(e.consume(u),l):(e.exit(n),t(u))}}const f5={tokenize:h5};function h5(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),xe(e,t,"linePrefix")}function o(l){return e.enter("paragraph"),s(l)}function s(l){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(l)}function a(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return te(l)?(e.consume(l),e.exit("chunkText"),s):(e.consume(l),a)}}const p5={tokenize:m5},xc={tokenize:g5};function m5(e){const t=this,n=[];let r=0,o,s,a;return l;function l(w){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,u,c)(w)}return c(w)}function u(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&j();const F=t.events.length;let B=F,C;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){C=t.events[B][1].end;break}v(r);let P=F;for(;P<t.events.length;)t.events[P][1].end={...C},P++;return Tt(t.events,B+1,0,t.events.slice(F)),t.events.length=P,c(w)}return l(w)}function c(w){if(r===n.length){if(!o)return p(w);if(o.currentConstruct&&o.currentConstruct.concrete)return g(w);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xc,d,h)(w)}function d(w){return o&&j(),v(r),p(w)}function h(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(w)}function p(w){return t.containerState={},e.attempt(xc,m,g)(w)}function m(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function g(w){if(w===null){o&&j(),v(0),e.consume(w);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),x(w)}function x(w){if(w===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(w);return}return te(w)?(e.consume(w),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(w),x)}function y(w,F){const B=t.sliceStream(w);if(F&&B.push(null),w.previous=s,s&&(s.next=w),s=w,o.defineSkip(w.start),o.write(B),t.parser.lazy[w.start.line]){let C=o.events.length;for(;C--;)if(o.events[C][1].start.offset<a&&(!o.events[C][1].end||o.events[C][1].end.offset>a))return;const P=t.events.length;let A=P,E,L;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(E){L=t.events[A][1].end;break}E=!0}for(v(r),C=P;C<t.events.length;)t.events[C][1].end={...L},C++;Tt(t.events,A+1,0,t.events.slice(P)),t.events.length=C}}function v(w){let F=n.length;for(;F-- >w;){const B=n[F];t.containerState=B[1],B[0].exit.call(t,e)}n.length=w}function j(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function g5(e,t,n){return xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function yc(e){if(e===null||qe(e)||d5(e))return 1;if(u5(e))return 2}function $s(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Ki={name:"attention",resolveAll:x5,tokenize:y5};function x5(e,t){let n=-1,r,o,s,a,l,u,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},p={...e[n][1].start};bc(h,-u),bc(p,u),a={type:u>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},s={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:u>1?"strong":"emphasis",start:{...a.start},end:{...l.end}},e[r][1].end={...a.start},e[n][1].start={...l.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ot(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=ot(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=ot(c,$s(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=ot(c,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=ot(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Tt(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function y5(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=yc(r);let s;return a;function a(u){return s=u,e.enter("attentionSequence"),l(u)}function l(u){if(u===s)return e.consume(u),l;const c=e.exit("attentionSequence"),d=yc(u),h=!d||d===2&&o||n.includes(u),p=!o||o===2&&d||n.includes(r);return c._open=!!(s===42?h:h&&(o||!p)),c._close=!!(s===42?p:p&&(d||!h)),t(u)}}function bc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const b5={name:"autolink",tokenize:v5};function v5(e,t,n){let r=0;return o;function o(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(m){return wt(m)?(e.consume(m),a):m===64?n(m):c(m)}function a(m){return m===43||m===45||m===46||nt(m)?(r=1,l(m)):c(m)}function l(m){return m===58?(e.consume(m),r=0,u):(m===43||m===45||m===46||nt(m))&&r++<32?(e.consume(m),l):(r=0,c(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Gi(m)?n(m):(e.consume(m),u)}function c(m){return m===64?(e.consume(m),d):a5(m)?(e.consume(m),c):n(m)}function d(m){return nt(m)?h(m):n(m)}function h(m){return m===46?(e.consume(m),r=0,d):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||nt(m))&&r++<63){const g=m===45?p:h;return e.consume(m),g}return n(m)}}const mo={partial:!0,tokenize:k5};function k5(e,t,n){return r;function r(s){return he(s)?xe(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||te(s)?t(s):n(s)}}const Of={continuation:{tokenize:S5},exit:C5,name:"blockQuote",tokenize:w5};function w5(e,t,n){const r=this;return o;function o(a){if(a===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return he(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function S5(e,t,n){const r=this;return o;function o(a){return he(a)?xe(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Of,t,n)(a)}}function C5(e){e.exit("blockQuote")}const zf={name:"characterEscape",tokenize:j5};function j5(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return c5(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const _f={name:"characterReference",tokenize:T5};function T5(e,t,n){const r=this;let o=0,s,a;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),u}function u(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,a=nt,d(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=l5,d):(e.enter("characterReferenceValue"),s=7,a=Yi,d(h))}function d(h){if(h===59&&o){const p=e.exit("characterReferenceValue");return a===nt&&!Us(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&o++<s?(e.consume(h),d):n(h)}}const vc={partial:!0,tokenize:E5},kc={concrete:!0,name:"codeFenced",tokenize:B5};function B5(e,t,n){const r=this,o={partial:!0,tokenize:B};let s=0,a=0,l;return u;function u(C){return c(C)}function c(C){const P=r.events[r.events.length-1];return s=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,l=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(C)}function d(C){return C===l?(a++,e.consume(C),d):a<3?n(C):(e.exit("codeFencedFenceSequence"),he(C)?xe(e,h,"whitespace")(C):h(C))}function h(C){return C===null||te(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(vc,x,F)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(C)):he(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,m,"whitespace")(C)):C===96&&C===l?n(C):(e.consume(C),p)}function m(C){return C===null||te(C)?h(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(C)):C===96&&C===l?n(C):(e.consume(C),g)}function x(C){return e.attempt(o,F,y)(C)}function y(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),v}function v(C){return s>0&&he(C)?xe(e,j,"linePrefix",s+1)(C):j(C)}function j(C){return C===null||te(C)?e.check(vc,x,F)(C):(e.enter("codeFlowValue"),w(C))}function w(C){return C===null||te(C)?(e.exit("codeFlowValue"),j(C)):(e.consume(C),w)}function F(C){return e.exit("codeFenced"),t(C)}function B(C,P,A){let E=0;return L;function L(I){return C.enter("lineEnding"),C.consume(I),C.exit("lineEnding"),R}function R(I){return C.enter("codeFencedFence"),he(I)?xe(C,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):D(I)}function D(I){return I===l?(C.enter("codeFencedFenceSequence"),N(I)):A(I)}function N(I){return I===l?(E++,C.consume(I),N):E>=a?(C.exit("codeFencedFenceSequence"),he(I)?xe(C,O,"whitespace")(I):O(I)):A(I)}function O(I){return I===null||te(I)?(C.exit("codeFencedFence"),P(I)):A(I)}}}function E5(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Jo={name:"codeIndented",tokenize:A5},F5={partial:!0,tokenize:L5};function A5(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),xe(e,s,"linePrefix",5)(c)}function s(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?u(c):te(c)?e.attempt(F5,a,u)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||te(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),l)}function u(c){return e.exit("codeIndented"),t(c)}}function L5(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):te(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):xe(e,s,"linePrefix",5)(a)}function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):te(a)?o(a):n(a)}}const I5={name:"codeText",previous:R5,resolve:D5,tokenize:M5};function D5(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function R5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function M5(e,t,n){let r=0,o,s;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),u(h))}function u(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),u):h===96?(s=e.enter("codeTextSequence"),o=0,d(h)):te(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||te(h)?(e.exit("codeTextData"),u(h)):(e.consume(h),c)}function d(h){return h===96?(e.consume(h),o++,d):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",c(h))}}class P5{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&$n(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),$n(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),$n(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);$n(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);$n(this.left,n.reverse())}}}function $n(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Nf(e){const t={};let n=-1,r,o,s,a,l,u,c;const d=new P5(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,s=0,s<u.length&&u[s][1].type==="lineEndingBlank"&&(s+=2),s<u.length&&u[s][1].type==="content"))for(;++s<u.length&&u[s][1].type!=="content";)u[s][1].type==="chunkText"&&(u[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,O5(d,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,o=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(d.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end={...d.get(o)[1].start},l=d.slice(o,n),l.unshift(r),d.splice(o,n-o+1,l))}}return Tt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function O5(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const l=a.events,u=[],c={};let d,h,p=-1,m=n,g=0,x=0;const y=[x];for(;m;){for(;e.get(++o)[1]!==m;);s.push(o),m._tokenizer||(d=r.sliceStream(m),m.next||d.push(null),h&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(x=p+1,y.push(x),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):y.pop(),p=y.length;p--;){const v=l.slice(y[p],y[p+1]),j=s.pop();u.push([j,j+v.length-1]),e.splice(j,2,v)}for(u.reverse(),p=-1;++p<u.length;)c[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return c}const z5={resolve:N5,tokenize:V5},_5={partial:!0,tokenize:W5};function N5(e){return Nf(e),e}function V5(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(l)}function o(l){return l===null?s(l):te(l)?e.check(_5,a,s)(l):(e.consume(l),o)}function s(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function a(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function W5(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),xe(e,s,"linePrefix")}function s(a){if(a===null||te(a))return n(a);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Vf(e,t,n,r,o,s,a,l,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return h;function h(v){return v===60?(e.enter(r),e.enter(o),e.enter(s),e.consume(v),e.exit(s),p):v===null||v===32||v===41||Gi(v)?n(v):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(v))}function p(v){return v===62?(e.enter(s),e.consume(v),e.exit(s),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===62?(e.exit("chunkString"),e.exit(l),p(v)):v===null||v===60||te(v)?n(v):(e.consume(v),v===92?g:m)}function g(v){return v===60||v===62||v===92?(e.consume(v),m):m(v)}function x(v){return!d&&(v===null||v===41||qe(v))?(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(v)):d<c&&v===40?(e.consume(v),d++,x):v===41?(e.consume(v),d--,x):v===null||v===32||v===40||Gi(v)?n(v):(e.consume(v),v===92?y:x)}function y(v){return v===40||v===41||v===92?(e.consume(v),x):x(v)}}function Wf(e,t,n,r,o,s){const a=this;let l=0,u;return c;function c(m){return e.enter(r),e.enter(o),e.consume(m),e.exit(o),e.enter(s),d}function d(m){return l>999||m===null||m===91||m===93&&!u||m===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(m):m===93?(e.exit(s),e.enter(o),e.consume(m),e.exit(o),e.exit(r),t):te(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===null||m===91||m===93||te(m)||l++>999?(e.exit("chunkString"),d(m)):(e.consume(m),u||(u=!he(m)),m===92?p:h)}function p(m){return m===91||m===92||m===93?(e.consume(m),l++,h):h(m)}}function Hf(e,t,n,r,o,s){let a;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,u):n(p)}function u(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):(e.enter(s),c(p))}function c(p){return p===a?(e.exit(s),u(a)):p===null?n(p):te(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),xe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===a||p===null||te(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?h:d)}function h(p){return p===a||p===92?(e.consume(p),d):d(p)}}function nr(e,t){let n;return r;function r(o){return te(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):he(o)?xe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const H5={name:"definition",tokenize:$5},U5={partial:!0,tokenize:G5};function $5(e,t,n){const r=this;let o;return s;function s(m){return e.enter("definition"),a(m)}function a(m){return Wf.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return o=Tn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):n(m)}function u(m){return qe(m)?nr(e,c)(m):c(m)}function c(m){return Vf(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(U5,h,h)(m)}function h(m){return he(m)?xe(e,p,"whitespace")(m):p(m)}function p(m){return m===null||te(m)?(e.exit("definition"),r.parser.defined.push(o),t(m)):n(m)}}function G5(e,t,n){return r;function r(l){return qe(l)?nr(e,o)(l):n(l)}function o(l){return Hf(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return he(l)?xe(e,a,"whitespace")(l):a(l)}function a(l){return l===null||te(l)?t(l):n(l)}}const Y5={name:"hardBreakEscape",tokenize:K5};function K5(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return te(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const q5={name:"headingAtx",resolve:X5,tokenize:Z5};function X5(e,t){let n=e.length-2,r=3,o,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Tt(e,r,n-r+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function Z5(e,t,n){let r=0;return o;function o(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||qe(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||te(d)?(e.exit("atxHeading"),t(d)):he(d)?xe(e,l,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),l(d))}function c(d){return d===null||d===35||qe(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),c)}}const J5=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],wc=["pre","script","style","textarea"],Q5={concrete:!0,name:"htmlFlow",resolveTo:nv,tokenize:rv},ev={partial:!0,tokenize:iv},tv={partial:!0,tokenize:ov};function nv(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function rv(e,t,n){const r=this;let o,s,a,l,u;return c;function c(T){return d(T)}function d(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),h}function h(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),s=!0,x):T===63?(e.consume(T),o=3,r.interrupt?t:b):wt(T)?(e.consume(T),a=String.fromCharCode(T),y):n(T)}function p(T){return T===45?(e.consume(T),o=2,m):T===91?(e.consume(T),o=5,l=0,g):wt(T)?(e.consume(T),o=4,r.interrupt?t:b):n(T)}function m(T){return T===45?(e.consume(T),r.interrupt?t:b):n(T)}function g(T){const ie="CDATA[";return T===ie.charCodeAt(l++)?(e.consume(T),l===ie.length?r.interrupt?t:D:g):n(T)}function x(T){return wt(T)?(e.consume(T),a=String.fromCharCode(T),y):n(T)}function y(T){if(T===null||T===47||T===62||qe(T)){const ie=T===47,se=a.toLowerCase();return!ie&&!s&&wc.includes(se)?(o=1,r.interrupt?t(T):D(T)):J5.includes(a.toLowerCase())?(o=6,ie?(e.consume(T),v):r.interrupt?t(T):D(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):s?j(T):w(T))}return T===45||nt(T)?(e.consume(T),a+=String.fromCharCode(T),y):n(T)}function v(T){return T===62?(e.consume(T),r.interrupt?t:D):n(T)}function j(T){return he(T)?(e.consume(T),j):L(T)}function w(T){return T===47?(e.consume(T),L):T===58||T===95||wt(T)?(e.consume(T),F):he(T)?(e.consume(T),w):L(T)}function F(T){return T===45||T===46||T===58||T===95||nt(T)?(e.consume(T),F):B(T)}function B(T){return T===61?(e.consume(T),C):he(T)?(e.consume(T),B):w(T)}function C(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),u=T,P):he(T)?(e.consume(T),C):A(T)}function P(T){return T===u?(e.consume(T),u=null,E):T===null||te(T)?n(T):(e.consume(T),P)}function A(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||qe(T)?B(T):(e.consume(T),A)}function E(T){return T===47||T===62||he(T)?w(T):n(T)}function L(T){return T===62?(e.consume(T),R):n(T)}function R(T){return T===null||te(T)?D(T):he(T)?(e.consume(T),R):n(T)}function D(T){return T===45&&o===2?(e.consume(T),M):T===60&&o===1?(e.consume(T),H):T===62&&o===4?(e.consume(T),Y):T===63&&o===3?(e.consume(T),b):T===93&&o===5?(e.consume(T),$):te(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(ev,oe,N)(T)):T===null||te(T)?(e.exit("htmlFlowData"),N(T)):(e.consume(T),D)}function N(T){return e.check(tv,O,oe)(T)}function O(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),I}function I(T){return T===null||te(T)?N(T):(e.enter("htmlFlowData"),D(T))}function M(T){return T===45?(e.consume(T),b):D(T)}function H(T){return T===47?(e.consume(T),a="",W):D(T)}function W(T){if(T===62){const ie=a.toLowerCase();return wc.includes(ie)?(e.consume(T),Y):D(T)}return wt(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),W):D(T)}function $(T){return T===93?(e.consume(T),b):D(T)}function b(T){return T===62?(e.consume(T),Y):T===45&&o===2?(e.consume(T),b):D(T)}function Y(T){return T===null||te(T)?(e.exit("htmlFlowData"),oe(T)):(e.consume(T),Y)}function oe(T){return e.exit("htmlFlow"),t(T)}}function ov(e,t,n){const r=this;return o;function o(a){return te(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function iv(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(mo,t,n)}}const sv={name:"htmlText",tokenize:av};function av(e,t,n){const r=this;let o,s,a;return l;function l(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),u}function u(b){return b===33?(e.consume(b),c):b===47?(e.consume(b),B):b===63?(e.consume(b),w):wt(b)?(e.consume(b),A):n(b)}function c(b){return b===45?(e.consume(b),d):b===91?(e.consume(b),s=0,g):wt(b)?(e.consume(b),j):n(b)}function d(b){return b===45?(e.consume(b),m):n(b)}function h(b){return b===null?n(b):b===45?(e.consume(b),p):te(b)?(a=h,H(b)):(e.consume(b),h)}function p(b){return b===45?(e.consume(b),m):h(b)}function m(b){return b===62?M(b):b===45?p(b):h(b)}function g(b){const Y="CDATA[";return b===Y.charCodeAt(s++)?(e.consume(b),s===Y.length?x:g):n(b)}function x(b){return b===null?n(b):b===93?(e.consume(b),y):te(b)?(a=x,H(b)):(e.consume(b),x)}function y(b){return b===93?(e.consume(b),v):x(b)}function v(b){return b===62?M(b):b===93?(e.consume(b),v):x(b)}function j(b){return b===null||b===62?M(b):te(b)?(a=j,H(b)):(e.consume(b),j)}function w(b){return b===null?n(b):b===63?(e.consume(b),F):te(b)?(a=w,H(b)):(e.consume(b),w)}function F(b){return b===62?M(b):w(b)}function B(b){return wt(b)?(e.consume(b),C):n(b)}function C(b){return b===45||nt(b)?(e.consume(b),C):P(b)}function P(b){return te(b)?(a=P,H(b)):he(b)?(e.consume(b),P):M(b)}function A(b){return b===45||nt(b)?(e.consume(b),A):b===47||b===62||qe(b)?E(b):n(b)}function E(b){return b===47?(e.consume(b),M):b===58||b===95||wt(b)?(e.consume(b),L):te(b)?(a=E,H(b)):he(b)?(e.consume(b),E):M(b)}function L(b){return b===45||b===46||b===58||b===95||nt(b)?(e.consume(b),L):R(b)}function R(b){return b===61?(e.consume(b),D):te(b)?(a=R,H(b)):he(b)?(e.consume(b),R):E(b)}function D(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),o=b,N):te(b)?(a=D,H(b)):he(b)?(e.consume(b),D):(e.consume(b),O)}function N(b){return b===o?(e.consume(b),o=void 0,I):b===null?n(b):te(b)?(a=N,H(b)):(e.consume(b),N)}function O(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||qe(b)?E(b):(e.consume(b),O)}function I(b){return b===47||b===62||qe(b)?E(b):n(b)}function M(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function H(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),W}function W(b){return he(b)?xe(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):$(b)}function $(b){return e.enter("htmlTextData"),a(b)}}const Gs={name:"labelEnd",resolveAll:dv,resolveTo:fv,tokenize:hv},lv={tokenize:pv},cv={tokenize:mv},uv={tokenize:gv};function dv(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Tt(e,0,e.length,n),e}function fv(e,t){let n=e.length,r=0,o,s,a,l;for(;n--;)if(o=e[n][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const u={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return l=[["enter",u,t],["enter",c,t]],l=ot(l,e.slice(s+1,s+r+3)),l=ot(l,[["enter",d,t]]),l=ot(l,$s(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),l=ot(l,[["exit",d,t],e[a-2],e[a-1],["exit",c,t]]),l=ot(l,e.slice(a+1)),l=ot(l,[["exit",u,t]]),Tt(e,s,e.length,l),e}function hv(e,t,n){const r=this;let o=r.events.length,s,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){s=r.events[o][1];break}return l;function l(p){return s?s._inactive?h(p):(a=r.parser.defined.includes(Tn(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(lv,d,a?d:h)(p):p===91?e.attempt(cv,d,a?c:h)(p):a?d(p):h(p)}function c(p){return e.attempt(uv,d,h)(p)}function d(p){return t(p)}function h(p){return s._balanced=!0,n(p)}}function pv(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),o}function o(h){return qe(h)?nr(e,s)(h):s(h)}function s(h){return h===41?d(h):Vf(e,a,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return qe(h)?nr(e,u)(h):d(h)}function l(h){return n(h)}function u(h){return h===34||h===39||h===40?Hf(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function c(h){return qe(h)?nr(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function mv(e,t,n){const r=this;return o;function o(l){return Wf.call(r,e,s,a,"reference","referenceMarker","referenceString")(l)}function s(l){return r.parser.defined.includes(Tn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function a(l){return n(l)}}function gv(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const xv={name:"labelStartImage",resolveAll:Gs.resolveAll,tokenize:yv};function yv(e,t,n){const r=this;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),s}function s(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),a):n(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const bv={name:"labelStartLink",resolveAll:Gs.resolveAll,tokenize:vv};function vv(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Qo={name:"lineEnding",tokenize:kv};function kv(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const Ur={name:"thematicBreak",tokenize:wv};function wv(e,t,n){let r=0,o;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return o=c,l(c)}function l(c){return c===o?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||te(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===o?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),he(c)?xe(e,l,"whitespace")(c):l(c))}}const Ge={continuation:{tokenize:Tv},exit:Ev,name:"list",tokenize:jv},Sv={partial:!0,tokenize:Fv},Cv={partial:!0,tokenize:Bv};function jv(e,t,n){const r=this,o=r.events[r.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return l;function l(m){const g=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Yi(m)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Ur,n,c)(m):c(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return n(m)}function u(m){return Yi(m)&&++a<10?(e.consume(m),u):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(mo,r.interrupt?n:d,e.attempt(Sv,p,h))}function d(m){return r.containerState.initialBlankLine=!0,s++,p(m)}function h(m){return he(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function Tv(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(mo,o,s);function o(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xe(e,t,"listItemIndent",r.containerState.size+1)(l)}function s(l){return r.containerState.furtherBlankLines||!he(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Cv,t,a)(l))}function a(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt(Ge,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Bv(e,t,n){const r=this;return xe(e,o,"listItemIndent",r.containerState.size+1);function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function Ev(e){e.exit(this.containerState.type)}function Fv(e,t,n){const r=this;return xe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const a=r.events[r.events.length-1];return!he(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Sc={name:"setextUnderline",resolveTo:Av,tokenize:Lv};function Av(e,t){let n=e.length,r,o,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Lv(e,t,n){const r=this;let o;return s;function s(c){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),o=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===o?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),he(c)?xe(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||te(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Iv={tokenize:Dv};function Dv(e){const t=this,n=e.attempt(mo,r,e.attempt(this.parser.constructs.flowInitial,o,xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(z5,o)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Rv={resolveAll:$f()},Mv=Uf("string"),Pv=Uf("text");function Uf(e){return{resolveAll:$f(e==="text"?Ov:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],s=n.attempt(o,a,l);return a;function a(d){return c(d)?s(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),s(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const h=o[d];let p=-1;if(h)for(;++p<h.length;){const m=h[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function $f(e){return t;function t(n,r){let o=-1,s;for(;++o<=n.length;)s===void 0?n[o]&&n[o][1].type==="data"&&(s=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==s+2&&(n[s][1].end=n[o-1][1].end,n.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(n,r):n}}function Ov(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let s=o.length,a=-1,l=0,u;for(;s--;){const c=o[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(c===-2)u=!0,l++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const c={type:n===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const zv={42:Ge,43:Ge,45:Ge,48:Ge,49:Ge,50:Ge,51:Ge,52:Ge,53:Ge,54:Ge,55:Ge,56:Ge,57:Ge,62:Of},_v={91:H5},Nv={[-2]:Jo,[-1]:Jo,32:Jo},Vv={35:q5,42:Ur,45:[Sc,Ur],60:Q5,61:Sc,95:Ur,96:kc,126:kc},Wv={38:_f,92:zf},Hv={[-5]:Qo,[-4]:Qo,[-3]:Qo,33:xv,38:_f,42:Ki,60:[b5,sv],91:bv,92:[Y5,zf],93:Gs,95:Ki,96:I5},Uv={null:[Ki,Rv]},$v={null:[42,95]},Gv={null:[]},Yv=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$v,contentInitial:_v,disable:Gv,document:zv,flow:Vv,flowInitial:Nv,insideSpan:Uv,string:Wv,text:Hv},Symbol.toStringTag,{value:"Module"}));function Kv(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},s=[];let a=[],l=[];const u={attempt:P(B),check:P(C),consume:j,enter:w,exit:F,interrupt:P(C,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:h};let d=t.tokenize.call(c,u);return t.resolveAll&&s.push(t),c;function h(R){return a=ot(a,R),y(),a[a.length-1]!==null?[]:(A(t,0),c.events=$s(s,c.events,c),c.events)}function p(R,D){return Xv(m(R),D)}function m(R){return qv(a,R)}function g(){const{_bufferIndex:R,_index:D,line:N,column:O,offset:I}=r;return{_bufferIndex:R,_index:D,line:N,column:O,offset:I}}function x(R){o[R.line]=R.column,L()}function y(){let R;for(;r._index<a.length;){const D=a[r._index];if(typeof D=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<D.length;)v(D.charCodeAt(r._bufferIndex));else v(D)}}function v(R){d=d(R)}function j(R){te(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,L()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=R}function w(R,D){const N=D||{};return N.type=R,N.start=g(),c.events.push(["enter",N,c]),l.push(N),N}function F(R){const D=l.pop();return D.end=g(),c.events.push(["exit",D,c]),D}function B(R,D){A(R,D.from)}function C(R,D){D.restore()}function P(R,D){return N;function N(O,I,M){let H,W,$,b;return Array.isArray(O)?oe(O):"tokenize"in O?oe([O]):Y(O);function Y(X){return Z;function Z(Q){const ue=Q!==null&&X[Q],ee=Q!==null&&X.null,ze=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(ee)?ee:ee?[ee]:[]];return oe(ze)(Q)}}function oe(X){return H=X,W=0,X.length===0?M:T(X[W])}function T(X){return Z;function Z(Q){return b=E(),$=X,X.partial||(c.currentConstruct=X),X.name&&c.parser.constructs.disable.null.includes(X.name)?se():X.tokenize.call(D?Object.assign(Object.create(c),D):c,u,ie,se)(Q)}}function ie(X){return R($,b),I}function se(X){return b.restore(),++W<H.length?T(H[W]):M}}}function A(R,D){R.resolveAll&&!s.includes(R)&&s.push(R),R.resolve&&Tt(c.events,D,c.events.length-D,R.resolve(c.events.slice(D),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function E(){const R=g(),D=c.previous,N=c.currentConstruct,O=c.events.length,I=Array.from(l);return{from:O,restore:M};function M(){r=R,c.previous=D,c.currentConstruct=N,c.events.length=O,l=I,L()}}function L(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function qv(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,s)];else{if(a=e.slice(n,o),r>-1){const l=a[0];typeof l=="string"?a[0]=l.slice(r):a.shift()}s>0&&a.push(e[o].slice(0,s))}return a}function Xv(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
|
|
416
416
|
`;break}case-3:{a=`\r
|
|
417
417
|
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(s)}o=s===-2,r.push(a)}return r.join("")}function Zv(e){const r={constructs:o5([Yv,...(e||{}).extensions||[]]),content:o(f5),defined:[],document:o(p5),flow:o(Iv),lazy:{},string:o(Mv),text:o(Pv)};return r;function o(s){return a;function a(l){return Kv(r,s,l)}}}function Jv(e){for(;!Nf(e););return e}const Cc=/[\0\t\n\r]/g;function Qv(){let e=1,t="",n=!0,r;return o;function o(s,a,l){const u=[];let c,d,h,p,m;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),h=0,t="",n&&(s.charCodeAt(0)===65279&&h++,n=void 0);h<s.length;){if(Cc.lastIndex=h,c=Cc.exec(s),p=c&&c.index!==void 0?c.index:s.length,m=s.charCodeAt(p),!c){t=s.slice(h);break}if(m===10&&h===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),h<p&&(u.push(s.slice(h,p)),e+=p-h),m){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return l&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const e4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function t4(e){return e.replace(e4,n4)}function n4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),s=o===120||o===88;return Pf(n.slice(s?2:1),s?16:10)}return Us(n)||e}const Gf={}.hasOwnProperty;function r4(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),o4(n)(Jv(Zv(n).document().write(Qv()(e,t,!0))))}function o4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(At),autolinkProtocol:E,autolinkEmail:E,atxHeading:s(rn),blockQuote:s(ee),characterEscape:E,characterReference:E,codeFenced:s(ze),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(ze,a),codeText:s(Ae,a),codeTextData:E,data:E,codeFlowValue:E,definition:s(Je),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(xr),hardBreakEscape:s(Mn),hardBreakTrailing:s(Mn),htmlFlow:s(Pn,a),htmlFlowData:E,htmlText:s(Pn,a),htmlTextData:E,image:s(ht),label:a,link:s(At),listItem:s(On),listItemValue:p,listOrdered:s(pt,h),listUnordered:s(pt),paragraph:s(zn),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(rn),strong:s(Lt),thematicBreak:s(sn)},exit:{atxHeading:u(),atxHeadingSequence:B,autolink:u(),autolinkEmail:ue,autolinkProtocol:Q,blockQuote:u(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:X,characterReference:Z,codeFenced:u(y),codeFencedFence:x,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:L,codeIndented:u(v),codeText:u(I),codeTextData:L,data:L,definition:u(),definitionDestinationString:F,definitionLabelString:j,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(D),hardBreakTrailing:u(D),htmlFlow:u(N),htmlFlowData:L,htmlText:u(O),htmlTextData:L,image:u(H),label:$,labelText:W,lineEnding:R,link:u(M),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ie,resourceDestinationString:b,resourceTitleString:Y,resource:oe,setextHeading:u(A),setextHeadingLineSequence:P,setextHeadingText:C,strong:u(),thematicBreak:u()}};Yf(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let G={type:"root",children:[]};const ne={stack:[G],tokenStack:[],config:t,enter:l,exit:c,buffer:a,resume:d,data:n},le=[];let de=-1;for(;++de<z.length;)if(z[de][1].type==="listOrdered"||z[de][1].type==="listUnordered")if(z[de][0]==="enter")le.push(de);else{const Le=le.pop();de=o(z,Le,de)}for(de=-1;++de<z.length;){const Le=t[z[de][0]];Gf.call(Le,z[de][1].type)&&Le[z[de][1].type].call(Object.assign({sliceSerialize:z[de][2].sliceSerialize},ne),z[de][1])}if(ne.tokenStack.length>0){const Le=ne.tokenStack[ne.tokenStack.length-1];(Le[1]||jc).call(ne,void 0,Le[0])}for(G.position={start:Rt(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Rt(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},de=-1;++de<t.transforms.length;)G=t.transforms[de](G)||G;return G}function o(z,G,ne){let le=G-1,de=-1,Le=!1,Ie,Qe,It,Dt;for(;++le<=ne;){const Re=z[le];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?de++:de--,Dt=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(Ie&&!Dt&&!de&&!It&&(It=le),Dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dt=void 0}if(!de&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||de===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(Ie){let Bt=le;for(Qe=void 0;Bt--;){const $e=z[Bt];if($e[1].type==="lineEnding"||$e[1].type==="lineEndingBlank"){if($e[0]==="exit")continue;Qe&&(z[Qe][1].type="lineEndingBlank",Le=!0),$e[1].type="lineEnding",Qe=Bt}else if(!($e[1].type==="linePrefix"||$e[1].type==="blockQuotePrefix"||$e[1].type==="blockQuotePrefixWhitespace"||$e[1].type==="blockQuoteMarker"||$e[1].type==="listItemIndent"))break}It&&(!Qe||It<Qe)&&(Ie._spread=!0),Ie.end=Object.assign({},Qe?z[Qe][1].start:Re[1].end),z.splice(Qe||le,0,["exit",Ie,Re[2]]),le++,ne++}if(Re[1].type==="listItemPrefix"){const Bt={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};Ie=Bt,z.splice(le,0,["enter",Bt,Re[2]]),le++,ne++,It=void 0,Dt=!0}}}return z[G][1]._spread=Le,ne}function s(z,G){return ne;function ne(le){l.call(this,z(le),le),G&&G.call(this,le)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(z,G,ne){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([G,ne||void 0]),z.position={start:Rt(G.start),end:void 0}}function u(z){return G;function G(ne){z&&z.call(this,ne),c.call(this,ne)}}function c(z,G){const ne=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==z.type&&(G?G.call(this,z,le[0]):(le[1]||jc).call(this,z,le[0]));else throw new Error("Cannot close `"+z.type+"` ("+tr({start:z.start,end:z.end})+"): it’s not open");ne.position.end=Rt(z.end)}function d(){return n5(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(z){if(this.data.expectingFirstListItemValue){const G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function m(){const z=this.resume(),G=this.stack[this.stack.length-1];G.lang=z}function g(){const z=this.resume(),G=this.stack[this.stack.length-1];G.meta=z}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z.replace(/(\r?\n|\r)$/g,"")}function j(z){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.label=G,ne.identifier=Tn(this.sliceSerialize(z)).toLowerCase()}function w(){const z=this.resume(),G=this.stack[this.stack.length-1];G.title=z}function F(){const z=this.resume(),G=this.stack[this.stack.length-1];G.url=z}function B(z){const G=this.stack[this.stack.length-1];if(!G.depth){const ne=this.sliceSerialize(z).length;G.depth=ne}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function P(z){const G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function E(z){const ne=this.stack[this.stack.length-1].children;let le=ne[ne.length-1];(!le||le.type!=="text")&&(le=on(),le.position={start:Rt(z.start),end:void 0},ne.push(le)),this.stack.push(le)}function L(z){const G=this.stack.pop();G.value+=this.sliceSerialize(z),G.position.end=Rt(z.end)}function R(z){const G=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=G.children[G.children.length-1];ne.position.end=Rt(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(G.type)&&(E.call(this,z),L.call(this,z))}function D(){this.data.atHardBreak=!0}function N(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function O(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function I(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function M(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=G,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function H(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=G,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function W(z){const G=this.sliceSerialize(z),ne=this.stack[this.stack.length-2];ne.label=t4(G),ne.identifier=Tn(G).toLowerCase()}function $(){const z=this.stack[this.stack.length-1],G=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const le=z.children;ne.children=le}else ne.alt=G}function b(){const z=this.resume(),G=this.stack[this.stack.length-1];G.url=z}function Y(){const z=this.resume(),G=this.stack[this.stack.length-1];G.title=z}function oe(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ie(z){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.label=G,ne.identifier=Tn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function se(z){this.data.characterReferenceType=z.type}function X(z){const G=this.sliceSerialize(z),ne=this.data.characterReferenceType;let le;ne?(le=Pf(G,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=Us(G);const de=this.stack[this.stack.length-1];de.value+=le}function Z(z){const G=this.stack.pop();G.position.end=Rt(z.end)}function Q(z){L.call(this,z);const G=this.stack[this.stack.length-1];G.url=this.sliceSerialize(z)}function ue(z){L.call(this,z);const G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize(z)}function ee(){return{type:"blockquote",children:[]}}function ze(){return{type:"code",lang:null,meta:null,value:""}}function Ae(){return{type:"inlineCode",value:""}}function Je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xr(){return{type:"emphasis",children:[]}}function rn(){return{type:"heading",depth:0,children:[]}}function Mn(){return{type:"break"}}function Pn(){return{type:"html",value:""}}function ht(){return{type:"image",title:null,url:"",alt:null}}function At(){return{type:"link",title:null,url:"",children:[]}}function pt(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function On(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function zn(){return{type:"paragraph",children:[]}}function Lt(){return{type:"strong",children:[]}}function on(){return{type:"text",value:""}}function sn(){return{type:"thematicBreak"}}}function Rt(e){return{line:e.line,column:e.column,offset:e.offset}}function Yf(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Yf(e,r):i4(e,r)}}function i4(e,t){let n;for(n in t)if(Gf.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function jc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tr({start:t.start,end:t.end})+") is still open")}function s4(e){const t=this;t.parser=n;function n(r){return r4(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function a4(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function l4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
@@ -424,5 +424,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
424
424
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
425
425
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
426
426
|
`}),n}function Dc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Rc(e,t){const n=Z4(e,t),r=n.one(e,void 0),o=N4(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
|
|
427
|
-
`},o),s}function n6(e,t){return e&&"run"in e?async function(n,r){const o=Rc(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Rc(n,{file:r,...e||t})}}function Mc(e){if(e)throw e}var ei,Pc;function r6(){if(Pc)return ei;Pc=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},s=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!h)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},a=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},l=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return ei=function u(){var c,d,h,p,m,g,x=arguments[0],y=1,v=arguments.length,j=!1;for(typeof x=="boolean"&&(j=x,x=arguments[1]||{},y=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});y<v;++y)if(c=arguments[y],c!=null)for(d in c)h=l(x,d),p=l(c,d),x!==p&&(j&&p&&(s(p)||(m=o(p)))?(m?(m=!1,g=h&&o(h)?h:[]):g=h&&s(h)?h:{},a(x,{name:d,newValue:u(j,g,p)})):typeof p<"u"&&a(x,{name:d,newValue:p}));return x},ei}var o6=r6();const ti=Ef(o6);function Xi(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function i6(){const e=[],t={run:n,use:r};return t;function n(...o){let s=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);l(null,...o);function l(u,...c){const d=e[++s];let h=-1;if(u){a(u);return}for(;++h<o.length;)(c[h]===null||c[h]===void 0)&&(c[h]=o[h]);o=c,d?s6(d,l)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function s6(e,t){let n;return r;function r(...a){const l=e.length>a.length;let u;l&&a.push(o);try{u=e.apply(this,a)}catch(c){const d=c;if(l&&n)throw d;return o(d)}l||(u&&u.then&&typeof u.then=="function"?u.then(s,o):u instanceof Error?o(u):s(u))}function o(a,...l){n||(n=!0,t(a,...l))}function s(a){o(null,a)}}const bt={basename:a6,dirname:l6,extname:c6,join:u6,sep:"/"};function a6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');gr(e);let n=0,r=-1,o=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){n=o+1;break}}else r<0&&(s=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,l=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){n=o+1;break}}else a<0&&(s=!0,a=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(r=o):(l=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function l6(e){if(gr(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function c6(e){gr(e);let t=e.length,n=-1,r=0,o=-1,s=0,a;for(;t--;){const l=e.codePointAt(t);if(l===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),l===46?o<0?o=t:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||n<0||s===0||s===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function u6(...e){let t=-1,n;for(;++t<e.length;)gr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":d6(n)}function d6(e){gr(e);const t=e.codePointAt(0)===47;let n=f6(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function f6(e,t){let n="",r=0,o=-1,s=0,a=-1,l,u;for(;++a<=e.length;){if(a<e.length)l=e.codePointAt(a);else{if(l===47)break;l=47}if(l===47){if(!(o===a-1||s===1))if(o!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),o=a,s=0;continue}}else if(n.length>0){n="",r=0,o=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,s=0}else l===46&&s>-1?s++:s=-1}return n}function gr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const h6={cwd:p6};function p6(){return"/"}function Zi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function m6(e){if(typeof e=="string")e=new URL(e);else if(!Zi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return g6(e)}function g6(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ni=["history","path","basename","stem","extname","dirname"];class nh{constructor(t){let n;t?Zi(t)?n={path:t}:typeof t=="string"||x6(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":h6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ni.length;){const s=ni[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let o;for(o in n)ni.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?bt.basename(this.path):void 0}set basename(t){oi(t,"basename"),ri(t,"basename"),this.path=bt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?bt.dirname(this.path):void 0}set dirname(t){Oc(this.basename,"dirname"),this.path=bt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?bt.extname(this.path):void 0}set extname(t){if(ri(t,"extname"),Oc(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=bt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Zi(t)&&(t=m6(t)),oi(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?bt.basename(this.path,this.extname):void 0}set stem(t){oi(t,"stem"),ri(t,"stem"),this.path=bt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Ne(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ri(e,t){if(e&&e.includes(bt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+bt.sep+"`")}function oi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Oc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function x6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const y6=(function(e){const r=this.constructor.prototype,o=r[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),b6={}.hasOwnProperty;class Zs extends y6{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=i6()}copy(){const t=new Zs;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ti(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ai("data",this.frozen),this.namespace[t]=n,this):b6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ai("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Mr(t),r=this.parser||this.Parser;return ii("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ii("process",this.parser||this.Parser),si("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(s,a){const l=Mr(t),u=r.parse(l);r.run(u,l,function(d,h,p){if(d||!h||!p)return c(d);const m=h,g=r.stringify(m,p);w6(g)?p.value=g:p.result=g,c(d,p)});function c(d,h){d||!h?a(d):s?s(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),ii("processSync",this.parser||this.Parser),si("processSync",this.compiler||this.Compiler),this.process(t,o),_c("processSync","process",n),r;function o(s,a){n=!0,Mc(s),r=a}}run(t,n,r){zc(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,l){const u=Mr(n);o.run(t,u,c);function c(d,h,p){const m=h||t;d?l(d):a?a(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,o;return this.run(t,n,s),_c("runSync","run",r),o;function s(a,l){Mc(a),o=l,r=!0}}stringify(t,n){this.freeze();const r=Mr(n),o=this.compiler||this.Compiler;return si("stringify",o),zc(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(ai("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...h]=c;u(d,h)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(o.settings=ti(!0,o.settings,c.settings))}function l(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const h=c[d];s(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===c){p=h;break}if(p===-1)r.push([c,...d]);else if(d.length>0){let[m,...g]=d;const x=r[p][1];Xi(x)&&Xi(m)&&(m=ti(!0,x,m)),r[p]=[c,m,...g]}}}}const v6=new Zs().freeze();function ii(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function si(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ai(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zc(e){if(!Xi(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _c(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Mr(e){return k6(e)?e:new nh(e)}function k6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function w6(e){return typeof e=="string"||S6(e)}function S6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const C6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Nc=[],Vc={allowDangerousHtml:!0},j6=/^(https?|ircs?|mailto|xmpp)$/i,T6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function B6(e){const t=E6(e),n=F6(e);return A6(t.runSync(t.parse(n),n),e)}function E6(e){const t=e.rehypePlugins||Nc,n=e.remarkPlugins||Nc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Vc}:Vc;return v6().use(s4).use(n).use(n6,r).use(t)}function F6(e){const t=e.children||"",n=new nh;return typeof t=="string"&&(n.value=t),n}function A6(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,s=t.disallowedElements,a=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||L6;for(const d of T6)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+C6+d.id,void 0);return th(e,c),_b(e,{Fragment:i.Fragment,components:o,ignoreInvalidStyle:!0,jsx:i.jsx,jsxs:i.jsxs,passKeys:!0,passNode:!0});function c(d,h,p){if(d.type==="raw"&&p&&typeof h=="number")return a?p.children.splice(h,1):p.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let m;for(m in Zo)if(Object.hasOwn(Zo,m)&&Object.hasOwn(d.properties,m)){const g=d.properties[m],x=Zo[m];(x===null||x.includes(d.tagName))&&(d.properties[m]=u(String(g||""),m,d))}}if(d.type==="element"){let m=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!m&&r&&typeof h=="number"&&(m=!r(d,h,p)),m&&p&&typeof h=="number")return l&&d.children?p.children.splice(h,1,...d.children):p.children.splice(h,1),h}}}function L6(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||j6.test(e.slice(0,t))?e:""}const I6={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function D6({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],colorScheme:r="blue",answerType:o="HTML",...s}){const a=I6[r],[l,u]=S.useState(new Set(n)),c=d=>{u(h=>{const p=new Set(h);return p.has(d)?p.delete(d):(t||p.clear(),p.add(d)),p})};return i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"4",...s,children:e.map(d=>{const h=l.has(d.id);return i.jsxs(f.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:h?a.ring:"border"},children:[i.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:()=>c(d.id),"aria-expanded":h,children:[i.jsx(f.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:d.question}),i.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:h?"none":"1.5px solid var(--medix-form-text)",background:h?a.solid:"transparent",color:h?"#ffffff":"inherit",flexShrink:0},children:h?i.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:i.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[i.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),i.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),i.jsx(f.Box,{overflow:"hidden",maxH:h?"800px":"0px",opacity:h?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:i.jsx(f.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:typeof d.answer=="string"?o==="MD"?i.jsx(B6,{children:d.answer}):i.jsx("span",{dangerouslySetInnerHTML:{__html:ub.sanitize(d.answer)}}):d.answer})})]},d.id)})})}function R6({quote:e,authorName:t,authorTitle:n,authorAvatar:r,rating:o,...s}){return i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"none",_dark:{boxShadow:"none"},...s,children:[o!==void 0&&i.jsx(f.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((a,l)=>i.jsx(f.Box,{as:"span",fontSize:"sm",color:l<o?"#F59E0B":"text.muted",children:"★"},l))}),i.jsxs(f.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[r?i.jsx("img",{src:r,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):i.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()}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}const M6={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function P6(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 O6({title:e,excerpt:t,category:n,date:r,coverImage:o,href:s,onClick:a,colorScheme:l="blue",...u}){const c=!!(s||a),d=P6(r),h=M6[l],p={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",textAlign:"left"},m=i.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,...u,children:[i.jsxs(f.Box,{position:"relative",overflow:"hidden",children:[o?i.jsx("img",{src:o,alt:e,style:{width:"100%",height:300,objectFit:"cover",display:"block",borderRadius:"20px"}}):i.jsx(f.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),d&&i.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",border:"1px solid",borderColor:"border",boxShadow:"none",children:[i.jsx(f.Box,{style:{fontSize:22,fontWeight:700,color:h.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:d.day}),i.jsx(f.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:d.weekday})]})]}),i.jsxs(f.Box,{px:"0",pt:"3",pb:"4",children:[n&&i.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:h.token,color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),i.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&i.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 s?i.jsx("a",{href:s,style:p,onClick:a,children:m}):a?i.jsx("button",{type:"button",style:p,onClick:a,children:m}):m}function z6({columns:e,data:t,rowKey:n="id",isLoading:r=!1,emptyMessage:o="No data available",sortable:s=!1,sortKey:a,sortDirection:l="asc",onSort:u,striped:c=!0,onRowClick:d,caption:h,enablePagination:p=!1,pageSize:m=10,page:g,onPageChange:x,enableSearch:y=!1,searchPlaceholder:v="Search table...",searchQuery:j,onSearchChange:w,style:F,className:B,stickyFirstColumn:C=!1}){const[P,A]=S.useState(""),E=j??P,[L,R]=S.useState(1),D=g??L,[N,O]=S.useState(a),[I,M]=S.useState(l),H=a??N,W=a?l:I,$=Z=>{A(Z),R(1),w==null||w(Z)},b=Z=>{const Q=H===Z&&W==="asc"?"desc":"asc";O(Z),M(Q),u==null||u(Z,Q)},Y=Z=>{R(Z),x==null||x(Z)},oe=S.useMemo(()=>{if(!E.trim())return t;const Z=E.toLowerCase().trim();return t.filter(Q=>e.some(ue=>{const ee=Q[ue.key];return ee==null?!1:String(ee).toLowerCase().includes(Z)}))},[t,e,E]),T=S.useMemo(()=>!H||u?oe:[...oe].sort((Z,Q)=>{const ue=Z[H],ee=Q[H],ze=String(ue??""),Ae=String(ee??""),Je=ze.localeCompare(Ae,void 0,{numeric:!0,sensitivity:"base"});return W==="asc"?Je:-Je}),[oe,H,W,u]),ie=T.length,se=S.useMemo(()=>{if(!p)return T;const Z=(D-1)*m;return T.slice(Z,Z+m)},[T,p,D,m]),X=({colKey:Z})=>H!==Z?i.jsx(f.Text,{as:"span",opacity:.3,ml:"1",fontSize:"xs",children:"↕"}):i.jsx(f.Text,{as:"span",ml:"1",color:"text.heading",fontSize:"xs",children:W==="asc"?"↑":"↓"});return i.jsxs(f.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"none",_dark:{boxShadow:"none"},style:F,className:B,children:[y&&i.jsx(f.Box,{p:"4",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:i.jsx(rs,{placeholder:v,value:E,onChange:Z=>$(Z.target.value),maxW:"360px"})}),i.jsx(f.Box,{overflowX:"auto",children:i.jsxs(f.Box,{as:"table",w:"full",style:{borderCollapse:"collapse"},"aria-label":h,children:[h&&i.jsx("caption",{style:{display:"none"},children:h}),i.jsx(f.Box,{as:"thead",children:i.jsx(f.Box,{as:"tr",bg:"bg.subtle",borderBottom:"1px solid",borderColor:"border",children:e.map((Z,Q)=>{const ue=C&&Q===0;return i.jsx(f.Box,{as:"th",py:"3",px:"4",textAlign:Z.align??"left",minW:Z.minWidth,fontSize:"xs",fontWeight:"600",letterSpacing:"0.05em",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",whiteSpace:"nowrap",userSelect:"none",cursor:Z.sortable||s?"pointer":"default",_hover:Z.sortable||s?{color:"text.heading"}:void 0,onClick:()=>Z.sortable||s?b(Z.key):void 0,"aria-sort":H===Z.key?W==="asc"?"ascending":"descending":void 0,position:ue?"sticky":void 0,left:ue?0:void 0,zIndex:ue?3:void 0,bg:ue?"bg.subtle":void 0,borderRight:ue?"1px solid":void 0,borderColor:ue?"border":void 0,boxShadow:ue?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:i.jsxs(f.Flex,{as:"span",align:"center",justify:Z.align==="right"?"flex-end":Z.align==="center"?"center":"flex-start",children:[Z.label,(Z.sortable||s)&&i.jsx(X,{colKey:Z.key})]})},Z.key)})})}),i.jsx(f.Box,{as:"tbody",children:r?Array.from({length:5}).map((Z,Q)=>i.jsx(f.Box,{as:"tr",borderBottom:"1px solid",borderColor:"border",children:e.map(ue=>i.jsx(f.Box,{as:"td",py:"3.5",px:"4",children:i.jsx(f.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},ue.key))},Q)):se.length===0?i.jsx(f.Box,{as:"tr",children:i.jsx("td",{colSpan:e.length,style:{textAlign:"center",padding:"48px 16px"},children:i.jsx(f.Text,{color:"text.muted",fontFamily:"var(--font-body)",fontSize:"sm",children:o})})}):se.map((Z,Q)=>{const ue=String(Z[n]??Q);return i.jsx(f.Box,{as:"tr",onClick:()=>d==null?void 0:d(Z,Q),bg:c&&Q%2===1?"bg.subtle":"transparent",borderBottom:"1px solid",borderColor:"border",cursor:d?"pointer":"default",transition:"background 0.15s ease",_hover:{bg:"bg.subtle"},children:e.map((ee,ze)=>{const Ae=C&&ze===0;return i.jsx(f.Box,{as:"td",py:"3.5",px:"4",textAlign:ee.align??"left",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",verticalAlign:"middle",position:Ae?"sticky":void 0,left:Ae?0:void 0,zIndex:Ae?2:void 0,bg:Ae?c&&Q%2===1?"bg.subtle":"bg.surface":void 0,borderRight:Ae?"1px solid":void 0,borderColor:Ae?"border":void 0,boxShadow:Ae?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:ee.render?ee.render(Z[ee.key],Z,Q):String(Z[ee.key]??"—")},ee.key)})},ue)})})]})}),p&&i.jsxs(f.Flex,{p:"4",borderTop:"1px solid",borderColor:"border",bg:"bg.surface",align:"center",justify:"space-between",flexWrap:"wrap",gap:"4",children:[i.jsxs(f.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:["Showing ",ie===0?0:(D-1)*m+1," to"," ",Math.min(D*m,ie)," of ",ie," entries"]}),i.jsx(cf,{total:ie,pageSize:m,currentPage:D,onChange:Y,compact:!0})]})]})}function _6({name:e,specialty:t,location:n,avatar:r,rating:o,reviewCount:s,experience:a,consultationFee:l,isVerified:u=!1,isAvailable:c=!1,availabilityLabel:d="Available",onBookClick:h,onViewClick:p,variant:m="standard",...g}){return m==="featured"?i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},display:"flex",flexDirection:"column",...g,children:[r?i.jsx("img",{src:r,alt:e,style:{width:"100%",height:240,objectFit:"cover",display:"block"}}):i.jsx(f.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:i.jsx(f.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),i.jsxs(f.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[i.jsxs(f.Box,{children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),u&&i.jsx(Ct,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},children:[i.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),i.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})})]}),i.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,n?` • ${n}`:""]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[c&&i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[i.jsx(f.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),c&&a&&i.jsx(f.Box,{w:"1px",h:"20px",bg:"border"}),a&&i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),i.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l&&i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),i.jsxs(f.Box,{display:"flex",gap:"3",alignItems:"center",children:[p&&i.jsx(f.Box,{as:"button",px:"3",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.body",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:"blue.500"},onClick:p,children:"view"}),h&&i.jsx(f.Box,{as:"button",px:"5",py:"2.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:h,children:"Consult Now"})]})]})]})]}):m==="compact"?i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...g,children:[i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[i.jsxs(f.Box,{display:"flex",gap:"4",children:[i.jsx(f.Box,{flexShrink:0,children:r?i.jsx("img",{src:r,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx(f.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),i.jsxs(f.Box,{pt:"1",children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),i.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n&&m!=="compact"?` • ${n}`:""]})]})]}),p&&i.jsx(f.Box,{as:"button",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"none",cursor:"pointer",_hover:{color:"blue.500"},onClick:p,pt:"1",children:"View"})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[i.jsx(f.Box,{as:"span",color:"status.warning",mt:"-2px",children:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),i.jsxs(f.Box,{as:"span",color:"text.heading",mr:"1",children:[(o==null?void 0:o.toFixed(1))||"New"," ",s?`(${s})`:""]}),n&&i.jsxs(f.Box,{as:"span",children:[" • ",n]}),a&&i.jsxs(f.Box,{as:"span",children:[" • ",a]})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),h&&i.jsx(f.Box,{as:"button",px:"5",py:"2.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:h,children:"Consult Now"})]})]}):i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...g,children:[i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[i.jsxs(f.Box,{display:"flex",gap:"4",minW:"0",flex:"1",children:[i.jsx(f.Box,{flexShrink:0,children:r?i.jsx("img",{src:r,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx(f.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),i.jsxs(f.Box,{pt:"1",minW:"0",flex:"1",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",minW:"0",children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minW:"0",flex:"1",children:e}),u&&i.jsx(Ct,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},children:[i.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),i.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})})]}),i.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:[t,n?` • ${n}`:""]})]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[i.jsx(f.Box,{as:"span",color:"status.warning",mt:"-2px",children:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),(o==null?void 0:o.toFixed(1))||"New"," ",s?i.jsxs(f.Box,{as:"span",color:"text.muted",children:["(",s,")"]}):null]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[c&&i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[i.jsx(f.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),c&&a&&i.jsx(f.Box,{w:"1px",h:"20px",bg:"border"}),a&&i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),i.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),i.jsxs(f.Box,{display:"flex",gap:"3",alignItems:"center",children:[p&&i.jsx(f.Box,{as:"button",px:"4",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"1px solid",borderColor:"border",borderRadius:"md",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:p,children:"view"}),h&&i.jsx(f.Box,{as:"button",px:"5",py:"2.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:h,children:"Consult Now"})]})]})]})}const N6={normal:{bg:"color-mix(in srgb, var(--chakra-colors-status-success) 8%, transparent)",indicator:"status.success",border:"color-mix(in srgb, var(--chakra-colors-status-success) 20%, transparent)",text:"status.success",ariaLabel:"Normal",icon:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[i.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"var(--chakra-colors-status-success)"}),i.jsx("path",{d:"M7 12.5l3.5 3.5 6.5-7",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]})},warning:{bg:"color-mix(in srgb, var(--chakra-colors-status-warning) 8%, transparent)",indicator:"status.warning",border:"color-mix(in srgb, var(--chakra-colors-status-warning) 20%, transparent)",text:"status.warning",ariaLabel:"Warning",icon:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[i.jsx("path",{d:"M12 2L2 21h20L12 2z",fill:"var(--chakra-colors-status-warning)"}),i.jsx("path",{d:"M12 9v5",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),i.jsx("circle",{cx:"12",cy:"17",r:"1",fill:"white"})]})},critical:{bg:"color-mix(in srgb, var(--chakra-colors-status-error) 8%, transparent)",indicator:"status.error",border:"color-mix(in srgb, var(--chakra-colors-status-error) 20%, transparent)",text:"status.error",ariaLabel:"Critical",icon:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[i.jsx("path",{d:"M8.5 2h7l6.5 6.5v7L15.5 22h-7L2 15.5v-7L8.5 2z",fill:"var(--chakra-colors-status-error)"}),i.jsx("path",{d:"M12 7v6",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),i.jsx("circle",{cx:"12",cy:"16.5",r:"1",fill:"white"})]})}};function V6({label:e,value:t,unit:n,status:r="normal",...o}){const s=N6[r];return i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:s.bg,border:"1px solid",borderColor:s.border,...o,children:[i.jsx("span",{"aria-label":s.ariaLabel,style:{display:"inline-flex",alignItems:"center",flexShrink:0},children:s.icon}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),i.jsxs(f.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[i.jsx(f.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&i.jsx(f.Box,{fontSize:"xs",color:s.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const W6={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function H6({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:r,time:o,type:s="video",status:a="upcoming",onCancel:l,onReschedule:u,onJoin:c,...d}){const h=W6[a];return i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?i.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.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)}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),i.jsx(ts,{status:h.color,size:"sm",children:h.label})]}),i.jsxs(f.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r})]}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:s==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),a==="upcoming"&&i.jsxs(f.Box,{display:"flex",gap:"2",children:[c&&i.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:c,children:"Join Call"}),u&&i.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:u,children:"Reschedule"}),l&&i.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"})]})]})}const U6={active:{label:"Active",bg:"color-mix(in srgb, var(--chakra-colors-status-success) 12%, transparent)",color:"var(--chakra-colors-status-success)"},expired:{label:"Expired",bg:"color-mix(in srgb, var(--chakra-colors-status-error) 10%, transparent)",color:"var(--chakra-colors-status-error)"},dispensed:{label:"Dispensed",bg:"color-mix(in srgb, var(--chakra-colors-blue-500) 10%, transparent)",color:"var(--chakra-colors-blue-500)"}},$6=()=>i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"}),i.jsx("path",{d:"m8.5 8.5 7 7"})]}),G6=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),i.jsx("polyline",{points:"7 10 12 15 17 10"}),i.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),Wc=()=>i.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),i.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),i.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),i.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]});function Y6({rxId:e,doctorName:t,doctorSpecialty:n,issuedDate:r,expiryDate:o,drugs:s,refillsRemaining:a,status:l="active",colorScheme:u="blue",onDownload:c,...d}){const h=U6[l],p=u==="purple"?"#7700CC":"#0685FF",m=u==="purple"?"color-mix(in srgb, #7700CC 8%, transparent)":"color-mix(in srgb, #0685FF 8%, transparent)";return i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",...d,children:[i.jsxs(f.Box,{px:"5",py:"3.5",display:"flex",alignItems:"center",justifyContent:"space-between",style:{borderBottom:"1px solid var(--chakra-colors-border)",background:m},children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[i.jsx(f.Box,{style:{color:p},children:i.jsx($6,{})}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",style:{color:p},children:"Prescription"}),e&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:e})]}),i.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:h.bg,color:h.color},children:[i.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:h.color,display:"inline-block"}}),h.label]})]}),i.jsxs(f.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"border",flexWrap:"wrap",gap:"2",children:[i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:t}),n&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]}),i.jsxs(f.Box,{display:"flex",gap:"4",children:[i.jsxs(f.Box,{children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[i.jsx(Wc,{}),i.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Issued"})]}),i.jsx(f.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r})]}),o&&i.jsxs(f.Box,{children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[i.jsx(Wc,{}),i.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Expires"})]}),i.jsx(f.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]})]})]}),i.jsx(f.Box,{px:"5",py:"4",display:"flex",flexDirection:"column",gap:"3",children:s.map((g,x)=>i.jsxs(f.Box,{display:"flex",alignItems:"flex-start",gap:"3",p:"3",borderRadius:"md",bg:"bg.subtle",border:"1px solid",borderColor:"border",children:[i.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:"50%",background:m,color:p,fontSize:11,fontWeight:700,fontFamily:"var(--font-heading)",flexShrink:0,marginTop:1},children:x+1}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:g.name}),i.jsx("span",{style:{padding:"1px 6px",borderRadius:4,fontSize:11,fontWeight:600,background:m,color:p,fontFamily:"var(--font-body)"},children:g.dosage})]}),i.jsxs(f.Box,{display:"flex",gap:"3",mt:"1",flexWrap:"wrap",children:[i.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["🕐 ",g.frequency]}),g.duration&&i.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["📅 ",g.duration]}),g.instructions&&i.jsxs(f.Box,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",fontStyle:"italic",children:["ℹ️ ",g.instructions]})]})]})]},x))}),i.jsxs(f.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderTop:"1px solid",borderColor:"border",children:[a!==void 0?i.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[i.jsx(f.Box,{as:"span",fontWeight:"semibold",color:"text.heading",children:a})," ","refill",a!==1?"s":""," remaining"]}):i.jsx(f.Box,{}),c&&i.jsxs("button",{onClick:c,"aria-label":"Download prescription",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",borderRadius:8,fontSize:12,fontWeight:600,fontFamily:"var(--font-body)",color:p,background:m,border:"none",cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:g=>{g.currentTarget.style.opacity="0.8"},onMouseLeave:g=>{g.currentTarget.style.opacity="1"},children:[i.jsx(G6,{}),"Download"]})]})]})}const K6={primary:{label:"Primary",bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",border:"color-mix(in srgb, #0685FF 25%, transparent)"},secondary:{label:"Secondary",bg:"color-mix(in srgb, #64748B 10%, transparent)",color:"#64748B",border:"color-mix(in srgb, #64748B 25%, transparent)"},chronic:{label:"Chronic",bg:"color-mix(in srgb, #F59E0B 10%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 25%, transparent)"},acute:{label:"Acute",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 25%, transparent)"}};function rh({code:e,description:t,category:n="primary",...r}){const o=K6[n];return i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",...r,children:[i.jsx("span",{title:t,"aria-label":`ICD-10 code ${e}${t?`: ${t}`:""}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:700,fontFamily:"var(--font-mono, monospace)",background:o.bg,color:o.color,border:`1px solid ${o.border}`,cursor:t?"help":"default",whiteSpace:"nowrap"},children:e}),t&&i.jsx(f.Box,{as:"span",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t})]})}function oh({bloodType:e,...t}){return i.jsx(f.Box,{display:"inline-flex",alignItems:"center",...t,children:i.jsxs("span",{"aria-label":`Blood type ${e}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 10px",borderRadius:4,fontSize:12,fontWeight:800,fontFamily:"var(--font-heading)",background:"color-mix(in srgb, #DC2626 12%, transparent)",color:"#DC2626",border:"1px solid color-mix(in srgb, #DC2626 30%, transparent)",letterSpacing:"0.02em"},children:[i.jsx("svg",{width:"10",height:"12",viewBox:"0 0 12 16",fill:"currentColor","aria-hidden":"true",children:i.jsx("path",{d:"M6 0C6 0 0 7.5 0 11a6 6 0 0 0 12 0C12 7.5 6 0 6 0z"})}),e]})})}const q6={mild:{label:"Mild",bg:"color-mix(in srgb, #F59E0B 8%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 30%, transparent)",icon:"⚠"},moderate:{label:"Moderate",bg:"color-mix(in srgb, #F97316 10%, transparent)",color:"#C2410C",border:"color-mix(in srgb, #F97316 30%, transparent)",icon:"⚠"},severe:{label:"Severe",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 30%, transparent)",icon:"🚫"},"life-threatening":{label:"Life-threatening",bg:"color-mix(in srgb, #7F1D1D 15%, transparent)",color:"#991B1B",border:"#DC2626",icon:"⛔"}};function ih({allergen:e,severity:t="mild",...n}){const r=q6[t];return i.jsx(f.Box,{display:"inline-flex",alignItems:"center",...n,children:i.jsxs("span",{"aria-label":`Allergy: ${e} — ${r.label} severity`,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:r.bg,color:r.color,border:`1px solid ${r.border}`,borderLeftWidth:t==="life-threatening"?3:1,whiteSpace:"nowrap"},children:[i.jsx("span",{"aria-hidden":"true",children:r.icon}),e,i.jsxs("span",{style:{opacity:.7,fontSize:10},children:["· ",r.label]})]})})}function X6({diagnoses:e,bloodType:t,allergies:n,direction:r="row",...o}){return i.jsxs(f.Box,{display:"flex",flexDirection:r,flexWrap:"wrap",gap:"2",alignItems:r==="row"?"center":"flex-start",...o,children:[t&&i.jsx(oh,{bloodType:t}),e==null?void 0:e.map((s,a)=>i.jsx(rh,{code:s.code,description:s.description,category:s.category},a)),n==null?void 0:n.map((s,a)=>i.jsx(ih,{allergen:s.allergen,severity:s.severity},a))]})}var sh={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Hc=S.createContext&&S.createContext(sh),Z6=["attr","size","title"];function J6(e,t){if(e==null)return{};var n,r,o=Q6(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Q6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},so.apply(null,arguments)}function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ao(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uc(Object(n),!0).forEach(function(r){e3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e3(e,t,n){return(t=t3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t3(e){var t=n3(e,"string");return typeof t=="symbol"?t:t+""}function n3(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ah(e){return e&&e.map((t,n)=>S.createElement(t.tag,ao({key:n},t.attr),ah(t.child)))}function Ze(e){return t=>S.createElement(r3,so({attr:ao({},e.attr)},t),ah(e.child))}function r3(e){var t=n=>{var{attr:r,size:o,title:s}=e,a=J6(e,Z6),l=o||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),S.createElement("svg",so({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:u,style:ao(ao({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),s&&S.createElement("title",null,s),e.children)};return Hc!==void 0?S.createElement(Hc.Consumer,null,n=>t(n)):t(sh)}function o3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"},child:[]},{tag:"rect",attr:{x:"2",y:"6",width:"14",height:"12",rx:"2"},child:[]}]})(e)}function i3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196"},child:[]},{tag:"path",attr:{d:"M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"m2 2 20 20"},child:[]}]})(e)}function s3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3"},child:[]},{tag:"path",attr:{d:"M8 21h8"},child:[]},{tag:"path",attr:{d:"M12 17v4"},child:[]},{tag:"path",attr:{d:"m17 8 5-5"},child:[]},{tag:"path",attr:{d:"M17 3h5v5"},child:[]}]})(e)}function a3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"},child:[]},{tag:"path",attr:{d:"m8.5 8.5 7 7"},child:[]}]})(e)}function l3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"},child:[]},{tag:"line",attr:{x1:"22",x2:"2",y1:"2",y2:"22"},child:[]}]})(e)}function c3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]},{tag:"path",attr:{d:"M14.05 2a9 9 0 0 1 8 7.94"},child:[]},{tag:"path",attr:{d:"M14.05 6A5 5 0 0 1 18 10"},child:[]}]})(e)}function u3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"},child:[]},{tag:"path",attr:{d:"M19 10v2a7 7 0 0 1-14 0v-2"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function d3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"2",x2:"22",y1:"2",y2:"22"},child:[]},{tag:"path",attr:{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"},child:[]},{tag:"path",attr:{d:"M5 10v2a7 7 0 0 0 12 5"},child:[]},{tag:"path",attr:{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"},child:[]},{tag:"path",attr:{d:"M9 9v3a3 3 0 0 0 5.12 2.12"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function f3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",x2:"9",y1:"12",y2:"12"},child:[]}]})(e)}function h3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 6v4"},child:[]},{tag:"path",attr:{d:"M14 14h-4"},child:[]},{tag:"path",attr:{d:"M14 18h-4"},child:[]},{tag:"path",attr:{d:"M14 8h-4"},child:[]},{tag:"path",attr:{d:"M18 12h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"M18 22V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v18"},child:[]}]})(e)}function p3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"},child:[]},{tag:"path",attr:{d:"M8.5 2h7"},child:[]},{tag:"path",attr:{d:"M7 16h10"},child:[]}]})(e)}function m3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},child:[]},{tag:"path",attr:{d:"M14 2v4a2 2 0 0 0 2 2h4"},child:[]},{tag:"path",attr:{d:"M10 9H8"},child:[]},{tag:"path",attr:{d:"M16 13H8"},child:[]},{tag:"path",attr:{d:"M16 17H8"},child:[]}]})(e)}function g3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]}]})(e)}function x3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"},child:[]}]})(e)}const y3=({muted:e})=>e?i.jsx(d3,{size:18,"aria-hidden":"true"}):i.jsx(u3,{size:18,"aria-hidden":"true"}),b3=({off:e})=>e?i.jsx(i3,{size:18,"aria-hidden":"true"}):i.jsx(o3,{size:18,"aria-hidden":"true"}),v3=({active:e})=>i.jsx(s3,{size:18,color:e?"var(--chakra-colors-status-success, #16A34A)":"currentColor","aria-hidden":"true"}),k3=()=>i.jsx(l3,{size:18,"aria-hidden":"true"});function w3({participantName:e,participantRole:t,participantAvatar:n,duration:r,isMuted:o=!1,isCameraOff:s=!1,isSharingScreen:a=!1,onToggleMute:l,onToggleCamera:u,onEndCall:c,onShareScreen:d,position:h="bottom",variant:p="adaptive",...m}){const[g,x]=S.useState(o),[y,v]=S.useState(s),j=p==="dark",w=()=>{x(C=>!C),l==null||l()},F=()=>{v(C=>!C),u==null||u()},B=({onClick:C,ariaLabel:P,active:A,isEndCall:E=!1,children:L})=>{let R=j?"rgba(255,255,255,0.1)":"var(--chakra-colors-bg-subtle, #F0F4F8)",D=j?"white":"var(--chakra-colors-text-heading, #111926)",N=j?"rgba(255,255,255,0.2)":"var(--chakra-colors-border, #E2E8F0)";return E?(R="var(--chakra-colors-status-error, #DC2626)",D="white",N="color-mix(in srgb, var(--chakra-colors-status-error, #DC2626) 85%, black)"):A&&(R="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",D="var(--chakra-colors-status-error, #DC2626)",N="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.25))"),i.jsx("button",{onClick:C,"aria-label":P,"aria-pressed":A,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:44,height:44,borderRadius:"50%",border:A?"1px solid var(--chakra-colors-status-error)":"1px solid transparent",cursor:"pointer",transition:"all 0.15s ease",background:R,color:D,WebkitTapHighlightColor:"transparent"},onMouseEnter:O=>{const I=O.currentTarget;I.style.background=N,I.style.transform="scale(1.06)"},onMouseLeave:O=>{const I=O.currentTarget;I.style.background=R,I.style.transform="scale(1)"},children:L})};return i.jsxs(f.Box,{position:"fixed",...h==="bottom"?{bottom:"0"}:{top:"0"},left:"0",right:"0",zIndex:"overlay",display:"flex",alignItems:"center",justifyContent:"space-between",px:{base:"4",md:"8"},flexWrap:"wrap",gap:"4",bg:j?void 0:"bg.surface",borderColor:"border",style:{minHeight:72,paddingTop:12,paddingBottom:h==="bottom"?"calc(12px + env(safe-area-inset-bottom, 0px))":12,background:j?"linear-gradient(135deg, #0A1220 0%, #0F1C2E 100%)":void 0,borderTop:h==="bottom"?"1px solid var(--chakra-colors-border)":"none",borderBottom:h==="top"?"1px solid var(--chakra-colors-border)":"none",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",transition:"background 0.2s ease, border-color 0.2s ease"},...m,children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",children:[i.jsx(lo,{src:n,name:e,size:"md"}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",color:j?"white":"text.heading",children:e}),t&&i.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",color:j?"rgba(255,255,255,0.6)":"text.muted",children:t})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",ml:"2",children:[i.jsxs("span",{"aria-label":"Live call",style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px",borderRadius:4,fontSize:10,fontWeight:700,background:"var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",color:"var(--chakra-colors-status-error, #DC2626)",fontFamily:"var(--font-body)",letterSpacing:"0.05em"},children:[i.jsx("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:"var(--chakra-colors-status-error, #DC2626)",display:"inline-block",animation:"medixPulse 1.5s ease-in-out infinite"}}),"LIVE"]}),r&&i.jsx(f.Box,{fontSize:"sm",fontFamily:"var(--font-mono, monospace)",fontWeight:"600",color:j?"rgba(255,255,255,0.8)":"text.heading",style:{letterSpacing:"0.05em"},children:r})]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[l&&i.jsx(B,{onClick:w,ariaLabel:g?"Unmute microphone":"Mute microphone",active:g,children:i.jsx(y3,{muted:g})}),u&&i.jsx(B,{onClick:F,ariaLabel:y?"Turn camera on":"Turn camera off",active:y,children:i.jsx(b3,{off:y})}),d&&i.jsx(B,{onClick:d,ariaLabel:a?"Stop sharing screen":"Share screen",active:a,children:i.jsx(v3,{active:a})}),c&&i.jsx(B,{onClick:c,ariaLabel:"End call",isEndCall:!0,children:i.jsx(k3,{})})]})]})}const S3={consultation:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF",icon:i.jsx(c3,{size:14,"aria-hidden":"true"})},lab:{bg:"color-mix(in srgb, #7700CC 12%, transparent)",color:"#7700CC",icon:i.jsx(p3,{size:14,"aria-hidden":"true"})},prescription:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:i.jsx(a3,{size:14,"aria-hidden":"true"})},vitals:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706",icon:i.jsx(x3,{size:14,"aria-hidden":"true"})},note:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B",icon:i.jsx(m3,{size:14,"aria-hidden":"true"})},admission:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444",icon:i.jsx(h3,{size:14,"aria-hidden":"true"})},discharge:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:i.jsx(f3,{size:14,"aria-hidden":"true"})},custom:{bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",icon:i.jsx(g3,{size:14,"aria-hidden":"true"})}},$c={success:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981"},warning:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706"},error:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444"},info:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF"},neutral:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B"}};function C3(){return i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",children:[i.jsxs(f.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[i.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",bg:"bg.subtle",style:{animation:"medix-shimmer 1.5s infinite"}}),i.jsx(f.Box,{w:"px",flex:"1",minH:"8",bg:"border",mt:"2"})]}),i.jsxs(f.Box,{flex:"1",pb:"6",children:[i.jsx(f.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:"40%",mb:"2",style:{animation:"medix-shimmer 1.5s infinite"}}),i.jsx(f.Box,{h:"3",bg:"bg.subtle",borderRadius:"full",w:"65%",style:{animation:"medix-shimmer 1.5s infinite"}})]})]})}function j3({events:e,compact:t=!1,isLoading:n=!1,loadingCount:r=4,colorScheme:o="blue",...s}){const a=o==="purple"?"var(--chakra-colors-purple-200, rgba(119,0,204,0.2))":"var(--chakra-colors-blue-200, rgba(6,133,255,0.2))";return n?i.jsx(f.Box,{...s,children:Array.from({length:r}).map((l,u)=>i.jsx(C3,{},u))}):i.jsx(f.Box,{...s,role:"feed","aria-label":"Patient medical timeline",children:e.map((l,u)=>{const c=S3[l.type],d=u===e.length-1;return i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",role:"article","aria-label":`${l.title} on ${l.date}`,children:[i.jsxs(f.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[i.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",style:{background:c.bg,color:c.color,border:`1.5px solid ${c.color}40`,cursor:l.onClick?"pointer":"default",transition:"transform 0.15s, box-shadow 0.15s",flexShrink:0},onClick:l.onClick,role:l.onClick?"button":void 0,tabIndex:l.onClick?0:void 0,onKeyDown:l.onClick?h=>{(h.key==="Enter"||h.key===" ")&&l.onClick()}:void 0,_hover:l.onClick?{transform:"scale(1.1)"}:void 0,children:l.icon??c.icon}),!d&&i.jsx(f.Box,{w:"1px",flex:"1",minH:"8",mt:"1",style:{background:a}})]}),i.jsxs(f.Box,{flex:"1",pb:d?"0":"5",cursor:l.onClick?"pointer":"default",onClick:l.onClick,_hover:l.onClick?{opacity:.85}:void 0,transition:"opacity 0.15s",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:l.title}),l.badgeLabel&&l.badgeStatus&&i.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"1px 7px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:$c[l.badgeStatus].bg,color:$c[l.badgeStatus].color},children:l.badgeLabel})]}),!t&&l.description&&i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l.description}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mt:"1",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l.date}),l.provider&&i.jsxs(i.Fragment,{children:[i.jsx(f.Box,{w:"1px",h:"3",style:{background:"var(--chakra-colors-border)"}}),i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l.provider})]})]})]})]},l.id)})})}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=D6;exports.Alert=Qi;exports.AllergyBadge=ih;exports.AppointmentCard=H6;exports.Avatar=lo;exports.AvatarGroup=Yh;exports.Badge=ts;exports.BlogCard=O6;exports.BloodTypeBadge=oh;exports.Breadcrumb=ry;exports.Button=Ye;exports.Calendar=os;exports.Card=fu;exports.CardBody=tm;exports.CardFooter=nm;exports.CardHeader=em;exports.Checkbox=lu;exports.Combobox=Lp;exports.Container=pu;exports.CookieConsentBanner=mf;exports.DashboardLayout=sf;exports.DataTable=z6;exports.DatePicker=Ep;exports.DateRangePicker=Fp;exports.Divider=iu;exports.DoctorCard=_6;exports.Drawer=by;exports.EmptyState=my;exports.FileUpload=Dp;exports.Footer=lf;exports.FormControl=fp;exports.FullPageSpinner=Kh;exports.ICD10Badge=rh;exports.IconButton=tu;exports.Input=ns;exports.Logo=tn;exports.MedicalRecordBadge=X6;exports.MedixProvider=_h;exports.Modal=py;exports.Navbar=Y2;exports.NotFoundPage=gy;exports.OTPInput=uu;exports.PWAInstallPrompt=xf;exports.Pagination=cf;exports.PatientTimeline=j3;exports.PhoneInput=vp;exports.PinInput=hp;exports.PrescriptionCard=Y6;exports.Progress=df;exports.RadioGroup=lp;exports.RichTextEditor=Qp;exports.RichTextInput=is;exports.SearchInput=rs;exports.SectionHeader=om;exports.Select=ap;exports.ServerErrorPage=xy;exports.Skeleton=Zt;exports.SkeletonCard=cy;exports.SkeletonText=uf;exports.Spinner=ru;exports.StatCard=hu;exports.Stepper=ay;exports.Switch=cu;exports.Tabs=iy;exports.Tag=ou;exports.TagInput=Rp;exports.TagsInput=du;exports.TelehealthCallBar=w3;exports.TestimonialCard=R6;exports.Textarea=su;exports.ThemeColorPalette=mu;exports.Toaster=eu;exports.Tooltip=Ct;exports.VitalBadge=V6;exports.colorTokens=V;exports.dismissToast=Ih;exports.htmlToMarkdown=Kn;exports.markdownToHtml=Yt;exports.medixConfig=Jc;exports.radiiTokens=Xc;exports.shadowTokens=Zc;exports.spacingTokens=qc;exports.system=Qc;exports.textStyleTokens=Kc;exports.toast=Yn;exports.typographyTokens=xn;exports.useColorScheme=Wh;exports.useIsDarkMode=es;exports.useThemeMode=ur;
|
|
427
|
+
`},o),s}function n6(e,t){return e&&"run"in e?async function(n,r){const o=Rc(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Rc(n,{file:r,...e||t})}}function Mc(e){if(e)throw e}var ei,Pc;function r6(){if(Pc)return ei;Pc=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},s=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!h)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},a=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},l=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return ei=function u(){var c,d,h,p,m,g,x=arguments[0],y=1,v=arguments.length,j=!1;for(typeof x=="boolean"&&(j=x,x=arguments[1]||{},y=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});y<v;++y)if(c=arguments[y],c!=null)for(d in c)h=l(x,d),p=l(c,d),x!==p&&(j&&p&&(s(p)||(m=o(p)))?(m?(m=!1,g=h&&o(h)?h:[]):g=h&&s(h)?h:{},a(x,{name:d,newValue:u(j,g,p)})):typeof p<"u"&&a(x,{name:d,newValue:p}));return x},ei}var o6=r6();const ti=Ef(o6);function Xi(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function i6(){const e=[],t={run:n,use:r};return t;function n(...o){let s=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);l(null,...o);function l(u,...c){const d=e[++s];let h=-1;if(u){a(u);return}for(;++h<o.length;)(c[h]===null||c[h]===void 0)&&(c[h]=o[h]);o=c,d?s6(d,l)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function s6(e,t){let n;return r;function r(...a){const l=e.length>a.length;let u;l&&a.push(o);try{u=e.apply(this,a)}catch(c){const d=c;if(l&&n)throw d;return o(d)}l||(u&&u.then&&typeof u.then=="function"?u.then(s,o):u instanceof Error?o(u):s(u))}function o(a,...l){n||(n=!0,t(a,...l))}function s(a){o(null,a)}}const bt={basename:a6,dirname:l6,extname:c6,join:u6,sep:"/"};function a6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');gr(e);let n=0,r=-1,o=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){n=o+1;break}}else r<0&&(s=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,l=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){n=o+1;break}}else a<0&&(s=!0,a=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(r=o):(l=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function l6(e){if(gr(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function c6(e){gr(e);let t=e.length,n=-1,r=0,o=-1,s=0,a;for(;t--;){const l=e.codePointAt(t);if(l===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),l===46?o<0?o=t:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||n<0||s===0||s===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function u6(...e){let t=-1,n;for(;++t<e.length;)gr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":d6(n)}function d6(e){gr(e);const t=e.codePointAt(0)===47;let n=f6(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function f6(e,t){let n="",r=0,o=-1,s=0,a=-1,l,u;for(;++a<=e.length;){if(a<e.length)l=e.codePointAt(a);else{if(l===47)break;l=47}if(l===47){if(!(o===a-1||s===1))if(o!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),o=a,s=0;continue}}else if(n.length>0){n="",r=0,o=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,s=0}else l===46&&s>-1?s++:s=-1}return n}function gr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const h6={cwd:p6};function p6(){return"/"}function Zi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function m6(e){if(typeof e=="string")e=new URL(e);else if(!Zi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return g6(e)}function g6(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ni=["history","path","basename","stem","extname","dirname"];class nh{constructor(t){let n;t?Zi(t)?n={path:t}:typeof t=="string"||x6(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":h6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ni.length;){const s=ni[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let o;for(o in n)ni.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?bt.basename(this.path):void 0}set basename(t){oi(t,"basename"),ri(t,"basename"),this.path=bt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?bt.dirname(this.path):void 0}set dirname(t){Oc(this.basename,"dirname"),this.path=bt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?bt.extname(this.path):void 0}set extname(t){if(ri(t,"extname"),Oc(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=bt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Zi(t)&&(t=m6(t)),oi(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?bt.basename(this.path,this.extname):void 0}set stem(t){oi(t,"stem"),ri(t,"stem"),this.path=bt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Ne(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ri(e,t){if(e&&e.includes(bt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+bt.sep+"`")}function oi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Oc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function x6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const y6=(function(e){const r=this.constructor.prototype,o=r[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),b6={}.hasOwnProperty;class Zs extends y6{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=i6()}copy(){const t=new Zs;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ti(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ai("data",this.frozen),this.namespace[t]=n,this):b6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ai("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Mr(t),r=this.parser||this.Parser;return ii("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ii("process",this.parser||this.Parser),si("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(s,a){const l=Mr(t),u=r.parse(l);r.run(u,l,function(d,h,p){if(d||!h||!p)return c(d);const m=h,g=r.stringify(m,p);w6(g)?p.value=g:p.result=g,c(d,p)});function c(d,h){d||!h?a(d):s?s(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),ii("processSync",this.parser||this.Parser),si("processSync",this.compiler||this.Compiler),this.process(t,o),_c("processSync","process",n),r;function o(s,a){n=!0,Mc(s),r=a}}run(t,n,r){zc(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,l){const u=Mr(n);o.run(t,u,c);function c(d,h,p){const m=h||t;d?l(d):a?a(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,o;return this.run(t,n,s),_c("runSync","run",r),o;function s(a,l){Mc(a),o=l,r=!0}}stringify(t,n){this.freeze();const r=Mr(n),o=this.compiler||this.Compiler;return si("stringify",o),zc(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(ai("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...h]=c;u(d,h)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(o.settings=ti(!0,o.settings,c.settings))}function l(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const h=c[d];s(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===c){p=h;break}if(p===-1)r.push([c,...d]);else if(d.length>0){let[m,...g]=d;const x=r[p][1];Xi(x)&&Xi(m)&&(m=ti(!0,x,m)),r[p]=[c,m,...g]}}}}const v6=new Zs().freeze();function ii(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function si(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ai(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zc(e){if(!Xi(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _c(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Mr(e){return k6(e)?e:new nh(e)}function k6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function w6(e){return typeof e=="string"||S6(e)}function S6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const C6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Nc=[],Vc={allowDangerousHtml:!0},j6=/^(https?|ircs?|mailto|xmpp)$/i,T6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function B6(e){const t=E6(e),n=F6(e);return A6(t.runSync(t.parse(n),n),e)}function E6(e){const t=e.rehypePlugins||Nc,n=e.remarkPlugins||Nc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Vc}:Vc;return v6().use(s4).use(n).use(n6,r).use(t)}function F6(e){const t=e.children||"",n=new nh;return typeof t=="string"&&(n.value=t),n}function A6(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,s=t.disallowedElements,a=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||L6;for(const d of T6)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+C6+d.id,void 0);return th(e,c),_b(e,{Fragment:i.Fragment,components:o,ignoreInvalidStyle:!0,jsx:i.jsx,jsxs:i.jsxs,passKeys:!0,passNode:!0});function c(d,h,p){if(d.type==="raw"&&p&&typeof h=="number")return a?p.children.splice(h,1):p.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let m;for(m in Zo)if(Object.hasOwn(Zo,m)&&Object.hasOwn(d.properties,m)){const g=d.properties[m],x=Zo[m];(x===null||x.includes(d.tagName))&&(d.properties[m]=u(String(g||""),m,d))}}if(d.type==="element"){let m=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!m&&r&&typeof h=="number"&&(m=!r(d,h,p)),m&&p&&typeof h=="number")return l&&d.children?p.children.splice(h,1,...d.children):p.children.splice(h,1),h}}}function L6(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||j6.test(e.slice(0,t))?e:""}const I6={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function D6({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],colorScheme:r="blue",answerType:o="HTML",...s}){const a=I6[r],[l,u]=S.useState(new Set(n)),c=d=>{u(h=>{const p=new Set(h);return p.has(d)?p.delete(d):(t||p.clear(),p.add(d)),p})};return i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"4",...s,children:e.map(d=>{const h=l.has(d.id);return i.jsxs(f.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:h?a.ring:"border"},children:[i.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:()=>c(d.id),"aria-expanded":h,children:[i.jsx(f.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:d.question}),i.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:h?"none":"1.5px solid var(--medix-form-text)",background:h?a.solid:"transparent",color:h?"#ffffff":"inherit",flexShrink:0},children:h?i.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:i.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[i.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),i.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),i.jsx(f.Box,{overflow:"hidden",maxH:h?"800px":"0px",opacity:h?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:i.jsx(f.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:typeof d.answer=="string"?o==="MD"?i.jsx(B6,{children:d.answer}):i.jsx("span",{dangerouslySetInnerHTML:{__html:ub.sanitize(d.answer)}}):d.answer})})]},d.id)})})}function R6({quote:e,authorName:t,authorTitle:n,authorAvatar:r,rating:o,...s}){return i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"none",_dark:{boxShadow:"none"},...s,children:[o!==void 0&&i.jsx(f.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((a,l)=>i.jsx(f.Box,{as:"span",fontSize:"sm",color:l<o?"#F59E0B":"text.muted",children:"★"},l))}),i.jsxs(f.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[r?i.jsx("img",{src:r,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):i.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()}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}const M6={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function P6(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 O6({title:e,excerpt:t,category:n,date:r,coverImage:o,href:s,onClick:a,colorScheme:l="blue",...u}){const c=!!(s||a),d=P6(r),h=M6[l],p={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",textAlign:"left"},m=i.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,...u,children:[i.jsxs(f.Box,{position:"relative",overflow:"hidden",children:[o?i.jsx("img",{src:o,alt:e,style:{width:"100%",height:300,objectFit:"cover",display:"block",borderRadius:"20px"}}):i.jsx(f.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),d&&i.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",border:"1px solid",borderColor:"border",boxShadow:"none",children:[i.jsx(f.Box,{style:{fontSize:22,fontWeight:700,color:h.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:d.day}),i.jsx(f.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:d.weekday})]})]}),i.jsxs(f.Box,{px:"0",pt:"3",pb:"4",children:[n&&i.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:h.token,color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),i.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&i.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 s?i.jsx("a",{href:s,style:p,onClick:a,children:m}):a?i.jsx("button",{type:"button",style:p,onClick:a,children:m}):m}function z6({columns:e,data:t,rowKey:n="id",isLoading:r=!1,emptyMessage:o="No data available",sortable:s=!1,sortKey:a,sortDirection:l="asc",onSort:u,striped:c=!0,onRowClick:d,caption:h,enablePagination:p=!1,pageSize:m=10,page:g,onPageChange:x,enableSearch:y=!1,searchPlaceholder:v="Search table...",searchQuery:j,onSearchChange:w,style:F,className:B,stickyFirstColumn:C=!1}){const[P,A]=S.useState(""),E=j??P,[L,R]=S.useState(1),D=g??L,[N,O]=S.useState(a),[I,M]=S.useState(l),H=a??N,W=a?l:I,$=Z=>{A(Z),R(1),w==null||w(Z)},b=Z=>{const Q=H===Z&&W==="asc"?"desc":"asc";O(Z),M(Q),u==null||u(Z,Q)},Y=Z=>{R(Z),x==null||x(Z)},oe=S.useMemo(()=>{if(!E.trim())return t;const Z=E.toLowerCase().trim();return t.filter(Q=>e.some(ue=>{const ee=Q[ue.key];return ee==null?!1:String(ee).toLowerCase().includes(Z)}))},[t,e,E]),T=S.useMemo(()=>!H||u?oe:[...oe].sort((Z,Q)=>{const ue=Z[H],ee=Q[H],ze=String(ue??""),Ae=String(ee??""),Je=ze.localeCompare(Ae,void 0,{numeric:!0,sensitivity:"base"});return W==="asc"?Je:-Je}),[oe,H,W,u]),ie=T.length,se=S.useMemo(()=>{if(!p)return T;const Z=(D-1)*m;return T.slice(Z,Z+m)},[T,p,D,m]),X=({colKey:Z})=>H!==Z?i.jsx(f.Text,{as:"span",opacity:.3,ml:"1",fontSize:"xs",children:"↕"}):i.jsx(f.Text,{as:"span",ml:"1",color:"text.heading",fontSize:"xs",children:W==="asc"?"↑":"↓"});return i.jsxs(f.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"none",_dark:{boxShadow:"none"},style:F,className:B,children:[y&&i.jsx(f.Box,{p:"4",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:i.jsx(rs,{placeholder:v,value:E,onChange:Z=>$(Z.target.value),maxW:"360px"})}),i.jsx(f.Box,{overflowX:"auto",children:i.jsxs(f.Box,{as:"table",w:"full",style:{borderCollapse:"collapse"},"aria-label":h,children:[h&&i.jsx("caption",{style:{display:"none"},children:h}),i.jsx(f.Box,{as:"thead",children:i.jsx(f.Box,{as:"tr",bg:"bg.subtle",borderBottom:"1px solid",borderColor:"border",children:e.map((Z,Q)=>{const ue=C&&Q===0;return i.jsx(f.Box,{as:"th",py:"3",px:"4",textAlign:Z.align??"left",minW:Z.minWidth,fontSize:"xs",fontWeight:"600",letterSpacing:"0.05em",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",whiteSpace:"nowrap",userSelect:"none",cursor:Z.sortable||s?"pointer":"default",_hover:Z.sortable||s?{color:"text.heading"}:void 0,onClick:()=>Z.sortable||s?b(Z.key):void 0,"aria-sort":H===Z.key?W==="asc"?"ascending":"descending":void 0,position:ue?"sticky":void 0,left:ue?0:void 0,zIndex:ue?3:void 0,bg:ue?"bg.subtle":void 0,borderRight:ue?"1px solid":void 0,borderColor:ue?"border":void 0,boxShadow:ue?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:i.jsxs(f.Flex,{as:"span",align:"center",justify:Z.align==="right"?"flex-end":Z.align==="center"?"center":"flex-start",children:[Z.label,(Z.sortable||s)&&i.jsx(X,{colKey:Z.key})]})},Z.key)})})}),i.jsx(f.Box,{as:"tbody",children:r?Array.from({length:5}).map((Z,Q)=>i.jsx(f.Box,{as:"tr",borderBottom:"1px solid",borderColor:"border",children:e.map(ue=>i.jsx(f.Box,{as:"td",py:"3.5",px:"4",children:i.jsx(f.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},ue.key))},Q)):se.length===0?i.jsx(f.Box,{as:"tr",children:i.jsx("td",{colSpan:e.length,style:{textAlign:"center",padding:"48px 16px"},children:i.jsx(f.Text,{color:"text.muted",fontFamily:"var(--font-body)",fontSize:"sm",children:o})})}):se.map((Z,Q)=>{const ue=String(Z[n]??Q);return i.jsx(f.Box,{as:"tr",onClick:()=>d==null?void 0:d(Z,Q),bg:c&&Q%2===1?"bg.subtle":"transparent",borderBottom:"1px solid",borderColor:"border",cursor:d?"pointer":"default",transition:"background 0.15s ease",_hover:{bg:"bg.subtle"},children:e.map((ee,ze)=>{const Ae=C&&ze===0;return i.jsx(f.Box,{as:"td",py:"3.5",px:"4",textAlign:ee.align??"left",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",verticalAlign:"middle",position:Ae?"sticky":void 0,left:Ae?0:void 0,zIndex:Ae?2:void 0,bg:Ae?c&&Q%2===1?"bg.subtle":"bg.surface":void 0,borderRight:Ae?"1px solid":void 0,borderColor:Ae?"border":void 0,boxShadow:Ae?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:ee.render?ee.render(Z[ee.key],Z,Q):String(Z[ee.key]??"—")},ee.key)})},ue)})})]})}),p&&i.jsxs(f.Flex,{p:"4",borderTop:"1px solid",borderColor:"border",bg:"bg.surface",align:"center",justify:"space-between",flexWrap:"wrap",gap:"4",children:[i.jsxs(f.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:["Showing ",ie===0?0:(D-1)*m+1," to"," ",Math.min(D*m,ie)," of ",ie," entries"]}),i.jsx(cf,{total:ie,pageSize:m,currentPage:D,onChange:Y,compact:!0})]})]})}function _6({name:e,specialty:t,location:n,avatar:r,rating:o,reviewCount:s,experience:a,consultationFee:l,isVerified:u=!1,isAvailable:c=!1,availabilityLabel:d="Available",onBookClick:h,onViewClick:p,variant:m="standard",...g}){return m==="featured"?i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},display:"flex",flexDirection:"column",...g,children:[r?i.jsx("img",{src:r,alt:e,style:{width:"100%",height:240,objectFit:"cover",display:"block"}}):i.jsx(f.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:i.jsx(f.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),i.jsxs(f.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[i.jsxs(f.Box,{children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),u&&i.jsx(Ct,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},children:[i.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),i.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})})]}),i.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,n?` • ${n}`:""]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[c&&i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[i.jsx(f.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),c&&a&&i.jsx(f.Box,{w:"1px",h:"20px",bg:"border"}),a&&i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),i.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l&&i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),i.jsxs(f.Box,{display:"flex",gap:"3",alignItems:"center",children:[p&&i.jsx(f.Box,{as:"button",px:"3",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.body",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:"blue.500"},onClick:p,children:"view"}),h&&i.jsx(f.Box,{as:"button",px:"5",py:"2.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:h,children:"Consult Now"})]})]})]})]}):m==="compact"?i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...g,children:[i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[i.jsxs(f.Box,{display:"flex",gap:"4",children:[i.jsx(f.Box,{flexShrink:0,children:r?i.jsx("img",{src:r,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx(f.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),i.jsxs(f.Box,{pt:"1",children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),i.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n&&m!=="compact"?` • ${n}`:""]})]})]}),p&&i.jsx(f.Box,{as:"button",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"none",cursor:"pointer",_hover:{color:"blue.500"},onClick:p,pt:"1",children:"View"})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[i.jsx(f.Box,{as:"span",color:"status.warning",mt:"-2px",children:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),i.jsxs(f.Box,{as:"span",color:"text.heading",mr:"1",children:[(o==null?void 0:o.toFixed(1))||"New"," ",s?`(${s})`:""]}),n&&i.jsxs(f.Box,{as:"span",children:[" • ",n]}),a&&i.jsxs(f.Box,{as:"span",children:[" • ",a]})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),h&&i.jsx(f.Box,{as:"button",px:"5",py:"2.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:h,children:"Consult Now"})]})]}):i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...g,children:[i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[i.jsxs(f.Box,{display:"flex",gap:"4",minW:"0",flex:"1",children:[i.jsx(f.Box,{flexShrink:0,children:r?i.jsx("img",{src:r,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx(f.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),i.jsxs(f.Box,{pt:"1",minW:"0",flex:"1",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",minW:"0",children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minW:"0",flex:"1",children:e}),u&&i.jsx(Ct,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},children:[i.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),i.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})})]}),i.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:[t,n?` • ${n}`:""]})]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[i.jsx(f.Box,{as:"span",color:"status.warning",mt:"-2px",children:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),(o==null?void 0:o.toFixed(1))||"New"," ",s?i.jsxs(f.Box,{as:"span",color:"text.muted",children:["(",s,")"]}):null]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[c&&i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[i.jsx(f.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),c&&a&&i.jsx(f.Box,{w:"1px",h:"20px",bg:"border"}),a&&i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),i.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),i.jsxs(f.Box,{display:"flex",gap:"3",alignItems:"center",children:[p&&i.jsx(f.Box,{as:"button",px:"4",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"1px solid",borderColor:"border",borderRadius:"md",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:p,children:"view"}),h&&i.jsx(f.Box,{as:"button",px:"5",py:"2.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:h,children:"Consult Now"})]})]})]})}const N6={normal:{bg:"color-mix(in srgb, var(--chakra-colors-status-success) 8%, transparent)",indicator:"status.success",border:"color-mix(in srgb, var(--chakra-colors-status-success) 20%, transparent)",text:"status.success",ariaLabel:"Normal",icon:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[i.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"var(--chakra-colors-status-success)"}),i.jsx("path",{d:"M7 12.5l3.5 3.5 6.5-7",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]})},warning:{bg:"color-mix(in srgb, var(--chakra-colors-status-warning) 8%, transparent)",indicator:"status.warning",border:"color-mix(in srgb, var(--chakra-colors-status-warning) 20%, transparent)",text:"status.warning",ariaLabel:"Warning",icon:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[i.jsx("path",{d:"M12 2L2 21h20L12 2z",fill:"var(--chakra-colors-status-warning)"}),i.jsx("path",{d:"M12 9v5",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),i.jsx("circle",{cx:"12",cy:"17",r:"1",fill:"white"})]})},critical:{bg:"color-mix(in srgb, var(--chakra-colors-status-error) 8%, transparent)",indicator:"status.error",border:"color-mix(in srgb, var(--chakra-colors-status-error) 20%, transparent)",text:"status.error",ariaLabel:"Critical",icon:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[i.jsx("path",{d:"M8.5 2h7l6.5 6.5v7L15.5 22h-7L2 15.5v-7L8.5 2z",fill:"var(--chakra-colors-status-error)"}),i.jsx("path",{d:"M12 7v6",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),i.jsx("circle",{cx:"12",cy:"16.5",r:"1",fill:"white"})]})}};function V6({label:e,value:t,unit:n,status:r="normal",...o}){const s=N6[r];return i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:s.bg,border:"1px solid",borderColor:s.border,...o,children:[i.jsx("span",{"aria-label":s.ariaLabel,style:{display:"inline-flex",alignItems:"center",flexShrink:0},children:s.icon}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),i.jsxs(f.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[i.jsx(f.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&i.jsx(f.Box,{fontSize:"xs",color:s.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const W6={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function H6({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:r,time:o,type:s="video",status:a="upcoming",onCancel:l,onReschedule:u,onJoin:c,...d}){const h=W6[a];return i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?i.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.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)}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),i.jsx(ts,{status:h.color,size:"sm",children:h.label})]}),i.jsxs(f.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r})]}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:s==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),a==="upcoming"&&i.jsxs(f.Box,{display:"flex",gap:"2",children:[c&&i.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:c,children:"Join Call"}),u&&i.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:u,children:"Reschedule"}),l&&i.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"})]})]})}const U6={active:{label:"Active",bg:"color-mix(in srgb, var(--chakra-colors-status-success) 12%, transparent)",color:"var(--chakra-colors-status-success)"},expired:{label:"Expired",bg:"color-mix(in srgb, var(--chakra-colors-status-error) 10%, transparent)",color:"var(--chakra-colors-status-error)"},dispensed:{label:"Dispensed",bg:"color-mix(in srgb, var(--chakra-colors-blue-500) 10%, transparent)",color:"var(--chakra-colors-blue-500)"}},$6=()=>i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"}),i.jsx("path",{d:"m8.5 8.5 7 7"})]}),G6=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),i.jsx("polyline",{points:"7 10 12 15 17 10"}),i.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),Wc=()=>i.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),i.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),i.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),i.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]});function Y6({rxId:e,doctorName:t,doctorSpecialty:n,issuedDate:r,expiryDate:o,drugs:s,refillsRemaining:a,status:l="active",colorScheme:u="blue",onDownload:c,...d}){const h=U6[l],p=u==="purple"?"#7700CC":"#0685FF",m=u==="purple"?"color-mix(in srgb, #7700CC 8%, transparent)":"color-mix(in srgb, #0685FF 8%, transparent)";return i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",...d,children:[i.jsxs(f.Box,{px:"5",py:"3.5",display:"flex",alignItems:"center",justifyContent:"space-between",style:{borderBottom:"1px solid var(--chakra-colors-border)",background:m},children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[i.jsx(f.Box,{style:{color:p},children:i.jsx($6,{})}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",style:{color:p},children:"Prescription"}),e&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:e})]}),i.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:h.bg,color:h.color},children:[i.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:h.color,display:"inline-block"}}),h.label]})]}),i.jsxs(f.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"border",flexWrap:"wrap",gap:"2",children:[i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:t}),n&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]}),i.jsxs(f.Box,{display:"flex",gap:"4",children:[i.jsxs(f.Box,{children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[i.jsx(Wc,{}),i.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Issued"})]}),i.jsx(f.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r})]}),o&&i.jsxs(f.Box,{children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[i.jsx(Wc,{}),i.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Expires"})]}),i.jsx(f.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]})]})]}),i.jsx(f.Box,{px:"5",py:"4",display:"flex",flexDirection:"column",gap:"3",children:s.map((g,x)=>i.jsxs(f.Box,{display:"flex",alignItems:"flex-start",gap:"3",p:"3",borderRadius:"md",bg:"bg.subtle",border:"1px solid",borderColor:"border",children:[i.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:"50%",background:m,color:p,fontSize:11,fontWeight:700,fontFamily:"var(--font-heading)",flexShrink:0,marginTop:1},children:x+1}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:g.name}),i.jsx("span",{style:{padding:"1px 6px",borderRadius:4,fontSize:11,fontWeight:600,background:m,color:p,fontFamily:"var(--font-body)"},children:g.dosage})]}),i.jsxs(f.Box,{display:"flex",gap:"3",mt:"1",flexWrap:"wrap",children:[i.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["🕐 ",g.frequency]}),g.duration&&i.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["📅 ",g.duration]}),g.instructions&&i.jsxs(f.Box,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",fontStyle:"italic",children:["ℹ️ ",g.instructions]})]})]})]},x))}),i.jsxs(f.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderTop:"1px solid",borderColor:"border",children:[a!==void 0?i.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[i.jsx(f.Box,{as:"span",fontWeight:"semibold",color:"text.heading",children:a})," ","refill",a!==1?"s":""," remaining"]}):i.jsx(f.Box,{}),c&&i.jsxs("button",{onClick:c,"aria-label":"Download prescription",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",borderRadius:8,fontSize:12,fontWeight:600,fontFamily:"var(--font-body)",color:p,background:m,border:"none",cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:g=>{g.currentTarget.style.opacity="0.8"},onMouseLeave:g=>{g.currentTarget.style.opacity="1"},children:[i.jsx(G6,{}),"Download"]})]})]})}const K6={primary:{label:"Primary",bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",border:"color-mix(in srgb, #0685FF 25%, transparent)"},secondary:{label:"Secondary",bg:"color-mix(in srgb, #64748B 10%, transparent)",color:"#64748B",border:"color-mix(in srgb, #64748B 25%, transparent)"},chronic:{label:"Chronic",bg:"color-mix(in srgb, #F59E0B 10%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 25%, transparent)"},acute:{label:"Acute",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 25%, transparent)"}};function rh({code:e,description:t,category:n="primary",...r}){const o=K6[n];return i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",...r,children:[i.jsx("span",{title:t,"aria-label":`ICD-10 code ${e}${t?`: ${t}`:""}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:700,fontFamily:"var(--font-mono, monospace)",background:o.bg,color:o.color,border:`1px solid ${o.border}`,cursor:t?"help":"default",whiteSpace:"nowrap"},children:e}),t&&i.jsx(f.Box,{as:"span",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t})]})}function oh({bloodType:e,...t}){return i.jsx(f.Box,{display:"inline-flex",alignItems:"center",...t,children:i.jsxs("span",{"aria-label":`Blood type ${e}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 10px",borderRadius:4,fontSize:12,fontWeight:800,fontFamily:"var(--font-heading)",background:"color-mix(in srgb, #DC2626 12%, transparent)",color:"#DC2626",border:"1px solid color-mix(in srgb, #DC2626 30%, transparent)",letterSpacing:"0.02em"},children:[i.jsx("svg",{width:"10",height:"12",viewBox:"0 0 12 16",fill:"currentColor","aria-hidden":"true",children:i.jsx("path",{d:"M6 0C6 0 0 7.5 0 11a6 6 0 0 0 12 0C12 7.5 6 0 6 0z"})}),e]})})}const q6={mild:{label:"Mild",bg:"color-mix(in srgb, #F59E0B 8%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 30%, transparent)",icon:"⚠"},moderate:{label:"Moderate",bg:"color-mix(in srgb, #F97316 10%, transparent)",color:"#C2410C",border:"color-mix(in srgb, #F97316 30%, transparent)",icon:"⚠"},severe:{label:"Severe",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 30%, transparent)",icon:"🚫"},"life-threatening":{label:"Life-threatening",bg:"color-mix(in srgb, #7F1D1D 15%, transparent)",color:"#991B1B",border:"#DC2626",icon:"⛔"}};function ih({allergen:e,severity:t="mild",...n}){const r=q6[t];return i.jsx(f.Box,{display:"inline-flex",alignItems:"center",...n,children:i.jsxs("span",{"aria-label":`Allergy: ${e} — ${r.label} severity`,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:r.bg,color:r.color,border:`1px solid ${r.border}`,borderLeftWidth:t==="life-threatening"?3:1,whiteSpace:"nowrap"},children:[i.jsx("span",{"aria-hidden":"true",children:r.icon}),e,i.jsxs("span",{style:{opacity:.7,fontSize:10},children:["· ",r.label]})]})})}function X6({diagnoses:e,bloodType:t,allergies:n,direction:r="row",...o}){return i.jsxs(f.Box,{display:"flex",flexDirection:r,flexWrap:"wrap",gap:"2",alignItems:r==="row"?"center":"flex-start",...o,children:[t&&i.jsx(oh,{bloodType:t}),e==null?void 0:e.map((s,a)=>i.jsx(rh,{code:s.code,description:s.description,category:s.category},a)),n==null?void 0:n.map((s,a)=>i.jsx(ih,{allergen:s.allergen,severity:s.severity},a))]})}var sh={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Hc=S.createContext&&S.createContext(sh),Z6=["attr","size","title"];function J6(e,t){if(e==null)return{};var n,r,o=Q6(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Q6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},so.apply(null,arguments)}function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ao(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uc(Object(n),!0).forEach(function(r){e3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e3(e,t,n){return(t=t3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t3(e){var t=n3(e,"string");return typeof t=="symbol"?t:t+""}function n3(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ah(e){return e&&e.map((t,n)=>S.createElement(t.tag,ao({key:n},t.attr),ah(t.child)))}function Ze(e){return t=>S.createElement(r3,so({attr:ao({},e.attr)},t),ah(e.child))}function r3(e){var t=n=>{var{attr:r,size:o,title:s}=e,a=J6(e,Z6),l=o||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),S.createElement("svg",so({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:u,style:ao(ao({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),s&&S.createElement("title",null,s),e.children)};return Hc!==void 0?S.createElement(Hc.Consumer,null,n=>t(n)):t(sh)}function o3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"},child:[]},{tag:"rect",attr:{x:"2",y:"6",width:"14",height:"12",rx:"2"},child:[]}]})(e)}function i3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196"},child:[]},{tag:"path",attr:{d:"M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"m2 2 20 20"},child:[]}]})(e)}function s3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3"},child:[]},{tag:"path",attr:{d:"M8 21h8"},child:[]},{tag:"path",attr:{d:"M12 17v4"},child:[]},{tag:"path",attr:{d:"m17 8 5-5"},child:[]},{tag:"path",attr:{d:"M17 3h5v5"},child:[]}]})(e)}function a3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"},child:[]},{tag:"path",attr:{d:"m8.5 8.5 7 7"},child:[]}]})(e)}function l3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"},child:[]},{tag:"line",attr:{x1:"22",x2:"2",y1:"2",y2:"22"},child:[]}]})(e)}function c3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]},{tag:"path",attr:{d:"M14.05 2a9 9 0 0 1 8 7.94"},child:[]},{tag:"path",attr:{d:"M14.05 6A5 5 0 0 1 18 10"},child:[]}]})(e)}function u3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"},child:[]},{tag:"path",attr:{d:"M19 10v2a7 7 0 0 1-14 0v-2"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function d3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"2",x2:"22",y1:"2",y2:"22"},child:[]},{tag:"path",attr:{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"},child:[]},{tag:"path",attr:{d:"M5 10v2a7 7 0 0 0 12 5"},child:[]},{tag:"path",attr:{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"},child:[]},{tag:"path",attr:{d:"M9 9v3a3 3 0 0 0 5.12 2.12"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function f3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",x2:"9",y1:"12",y2:"12"},child:[]}]})(e)}function h3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 6v4"},child:[]},{tag:"path",attr:{d:"M14 14h-4"},child:[]},{tag:"path",attr:{d:"M14 18h-4"},child:[]},{tag:"path",attr:{d:"M14 8h-4"},child:[]},{tag:"path",attr:{d:"M18 12h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"M18 22V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v18"},child:[]}]})(e)}function p3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"},child:[]},{tag:"path",attr:{d:"M8.5 2h7"},child:[]},{tag:"path",attr:{d:"M7 16h10"},child:[]}]})(e)}function m3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},child:[]},{tag:"path",attr:{d:"M14 2v4a2 2 0 0 0 2 2h4"},child:[]},{tag:"path",attr:{d:"M10 9H8"},child:[]},{tag:"path",attr:{d:"M16 13H8"},child:[]},{tag:"path",attr:{d:"M16 17H8"},child:[]}]})(e)}function g3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]}]})(e)}function x3(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"},child:[]}]})(e)}const y3=({muted:e})=>e?i.jsx(d3,{size:18,"aria-hidden":"true"}):i.jsx(u3,{size:18,"aria-hidden":"true"}),b3=({off:e})=>e?i.jsx(i3,{size:18,"aria-hidden":"true"}):i.jsx(o3,{size:18,"aria-hidden":"true"}),v3=({active:e})=>i.jsx(s3,{size:18,color:e?"var(--chakra-colors-status-success, #16A34A)":"currentColor","aria-hidden":"true"}),k3=()=>i.jsx(l3,{size:18,"aria-hidden":"true"});function w3({participantName:e,participantRole:t,participantAvatar:n,duration:r,isMuted:o=!1,isCameraOff:s=!1,isSharingScreen:a=!1,onToggleMute:l,onToggleCamera:u,onEndCall:c,onShareScreen:d,position:h="bottom",variant:p="adaptive",...m}){const[g,x]=S.useState(o),[y,v]=S.useState(s),j=p==="dark",w=()=>{x(C=>!C),l==null||l()},F=()=>{v(C=>!C),u==null||u()},B=({onClick:C,ariaLabel:P,active:A,isEndCall:E=!1,children:L})=>{let R=j?"rgba(255,255,255,0.1)":"var(--chakra-colors-bg-subtle, #F0F4F8)",D=j?"white":"var(--chakra-colors-text-heading, #111926)",N=j?"rgba(255,255,255,0.2)":"var(--chakra-colors-border, #E2E8F0)";return E?(R="var(--chakra-colors-status-error, #DC2626)",D="white",N="color-mix(in srgb, var(--chakra-colors-status-error, #DC2626) 85%, black)"):A&&(R="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",D="var(--chakra-colors-status-error, #DC2626)",N="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.25))"),i.jsx("button",{onClick:C,"aria-label":P,"aria-pressed":A,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:44,height:44,borderRadius:"50%",border:A?"1px solid var(--chakra-colors-status-error)":"1px solid transparent",cursor:"pointer",transition:"all 0.15s ease",background:R,color:D,WebkitTapHighlightColor:"transparent"},onMouseEnter:O=>{const I=O.currentTarget;I.style.background=N,I.style.transform="scale(1.06)"},onMouseLeave:O=>{const I=O.currentTarget;I.style.background=R,I.style.transform="scale(1)"},children:L})};return i.jsxs(f.Box,{position:"fixed",...h==="bottom"?{bottom:"0"}:{top:"0"},left:"0",right:"0",zIndex:"overlay",display:"flex",alignItems:"center",justifyContent:"space-between",px:{base:"4",md:"8"},flexWrap:"wrap",gap:"4",bg:j?void 0:"bg.surface",borderColor:"border",style:{minHeight:72,paddingTop:12,paddingBottom:h==="bottom"?"calc(12px + env(safe-area-inset-bottom, 0px))":12,background:j?"linear-gradient(135deg, #0A1220 0%, #0F1C2E 100%)":void 0,borderTop:h==="bottom"?"1px solid var(--chakra-colors-border)":"none",borderBottom:h==="top"?"1px solid var(--chakra-colors-border)":"none",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",transition:"background 0.2s ease, border-color 0.2s ease"},...m,children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",children:[i.jsx(lo,{src:n,name:e,size:"md"}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",color:j?"white":"text.heading",children:e}),t&&i.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",color:j?"rgba(255,255,255,0.6)":"text.muted",children:t})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",ml:"2",children:[i.jsxs("span",{"aria-label":"Live call",style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px",borderRadius:4,fontSize:10,fontWeight:700,background:"var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",color:"var(--chakra-colors-status-error, #DC2626)",fontFamily:"var(--font-body)",letterSpacing:"0.05em"},children:[i.jsx("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:"var(--chakra-colors-status-error, #DC2626)",display:"inline-block",animation:"medixPulse 1.5s ease-in-out infinite"}}),"LIVE"]}),r&&i.jsx(f.Box,{fontSize:"sm",fontFamily:"var(--font-mono, monospace)",fontWeight:"600",color:j?"rgba(255,255,255,0.8)":"text.heading",style:{letterSpacing:"0.05em"},children:r})]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[l&&i.jsx(B,{onClick:w,ariaLabel:g?"Unmute microphone":"Mute microphone",active:g,children:i.jsx(y3,{muted:g})}),u&&i.jsx(B,{onClick:F,ariaLabel:y?"Turn camera on":"Turn camera off",active:y,children:i.jsx(b3,{off:y})}),d&&i.jsx(B,{onClick:d,ariaLabel:a?"Stop sharing screen":"Share screen",active:a,children:i.jsx(v3,{active:a})}),c&&i.jsx(B,{onClick:c,ariaLabel:"End call",isEndCall:!0,children:i.jsx(k3,{})})]})]})}const S3={consultation:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF",icon:i.jsx(c3,{size:14,"aria-hidden":"true"})},lab:{bg:"color-mix(in srgb, #7700CC 12%, transparent)",color:"#7700CC",icon:i.jsx(p3,{size:14,"aria-hidden":"true"})},prescription:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:i.jsx(a3,{size:14,"aria-hidden":"true"})},vitals:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706",icon:i.jsx(x3,{size:14,"aria-hidden":"true"})},note:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B",icon:i.jsx(m3,{size:14,"aria-hidden":"true"})},admission:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444",icon:i.jsx(h3,{size:14,"aria-hidden":"true"})},discharge:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:i.jsx(f3,{size:14,"aria-hidden":"true"})},custom:{bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",icon:i.jsx(g3,{size:14,"aria-hidden":"true"})}},$c={success:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981"},warning:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706"},error:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444"},info:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF"},neutral:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B"}};function C3(){return i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",children:[i.jsxs(f.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[i.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",bg:"bg.subtle",style:{animation:"medix-shimmer 1.5s infinite"}}),i.jsx(f.Box,{w:"px",flex:"1",minH:"8",bg:"border",mt:"2"})]}),i.jsxs(f.Box,{flex:"1",pb:"6",children:[i.jsx(f.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:"40%",mb:"2",style:{animation:"medix-shimmer 1.5s infinite"}}),i.jsx(f.Box,{h:"3",bg:"bg.subtle",borderRadius:"full",w:"65%",style:{animation:"medix-shimmer 1.5s infinite"}})]})]})}function j3({events:e,compact:t=!1,isLoading:n=!1,loadingCount:r=4,colorScheme:o="blue",...s}){const a=o==="purple"?"var(--chakra-colors-purple-200, rgba(119,0,204,0.2))":"var(--chakra-colors-blue-200, rgba(6,133,255,0.2))";return n?i.jsx(f.Box,{...s,children:Array.from({length:r}).map((l,u)=>i.jsx(C3,{},u))}):i.jsx(f.Box,{...s,role:"feed","aria-label":"Patient medical timeline",children:e.map((l,u)=>{const c=S3[l.type],d=u===e.length-1;return i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",role:"article","aria-label":`${l.title} on ${l.date}`,children:[i.jsxs(f.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[i.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",style:{background:c.bg,color:c.color,border:`1.5px solid ${c.color}40`,cursor:l.onClick?"pointer":"default",transition:"transform 0.15s, box-shadow 0.15s",flexShrink:0},onClick:l.onClick,role:l.onClick?"button":void 0,tabIndex:l.onClick?0:void 0,onKeyDown:l.onClick?h=>{(h.key==="Enter"||h.key===" ")&&l.onClick()}:void 0,_hover:l.onClick?{transform:"scale(1.1)"}:void 0,children:l.icon??c.icon}),!d&&i.jsx(f.Box,{w:"1px",flex:"1",minH:"8",mt:"1",style:{background:a}})]}),i.jsxs(f.Box,{flex:"1",pb:d?"0":"5",cursor:l.onClick?"pointer":"default",onClick:l.onClick,_hover:l.onClick?{opacity:.85}:void 0,transition:"opacity 0.15s",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:l.title}),l.badgeLabel&&l.badgeStatus&&i.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"1px 7px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:$c[l.badgeStatus].bg,color:$c[l.badgeStatus].color},children:l.badgeLabel})]}),!t&&l.description&&i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l.description}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mt:"1",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l.date}),l.provider&&i.jsxs(i.Fragment,{children:[i.jsx(f.Box,{w:"1px",h:"3",style:{background:"var(--chakra-colors-border)"}}),i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l.provider})]})]})]})]},l.id)})})}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=D6;exports.Alert=Qi;exports.AllergyBadge=ih;exports.AppointmentCard=H6;exports.Avatar=lo;exports.AvatarGroup=Yh;exports.Badge=ts;exports.BlogCard=O6;exports.BloodTypeBadge=oh;exports.Breadcrumb=r2;exports.Button=Ye;exports.Calendar=os;exports.Card=fu;exports.CardBody=tm;exports.CardFooter=nm;exports.CardHeader=em;exports.Checkbox=lu;exports.Combobox=Lp;exports.Container=pu;exports.CookieConsentBanner=mf;exports.DashboardLayout=sf;exports.DataTable=z6;exports.DatePicker=Ep;exports.DateRangePicker=Fp;exports.Divider=iu;exports.DoctorCard=_6;exports.Drawer=b2;exports.EmptyState=m2;exports.FileUpload=Dp;exports.Footer=lf;exports.FormControl=fp;exports.FullPageSpinner=Kh;exports.ICD10Badge=rh;exports.IconButton=tu;exports.Input=ns;exports.Logo=tn;exports.MedicalRecordBadge=X6;exports.MedixProvider=_h;exports.Modal=p2;exports.Navbar=Yy;exports.NotFoundPage=g2;exports.OTPInput=uu;exports.PWAInstallPrompt=xf;exports.Pagination=cf;exports.PatientTimeline=j3;exports.PhoneInput=vp;exports.PinInput=hp;exports.PrescriptionCard=Y6;exports.Progress=df;exports.RadioGroup=lp;exports.RichTextEditor=Qp;exports.RichTextInput=is;exports.SearchInput=rs;exports.SectionHeader=om;exports.Select=ap;exports.ServerErrorPage=x2;exports.Skeleton=Zt;exports.SkeletonCard=c2;exports.SkeletonText=uf;exports.Spinner=ru;exports.StatCard=hu;exports.Stepper=a2;exports.Switch=cu;exports.Tabs=i2;exports.Tag=ou;exports.TagInput=Rp;exports.TagsInput=du;exports.TelehealthCallBar=w3;exports.TestimonialCard=R6;exports.Textarea=su;exports.ThemeColorPalette=mu;exports.Toaster=eu;exports.Tooltip=Ct;exports.VitalBadge=V6;exports.colorTokens=V;exports.dismissToast=Ih;exports.htmlToMarkdown=Kn;exports.markdownToHtml=Yt;exports.medixConfig=Jc;exports.radiiTokens=Xc;exports.shadowTokens=Zc;exports.spacingTokens=qc;exports.system=Qc;exports.textStyleTokens=Kc;exports.toast=Yn;exports.typographyTokens=xn;exports.useColorScheme=Wh;exports.useIsDarkMode=es;exports.useThemeMode=ur;
|
|
428
428
|
//# sourceMappingURL=index.cjs.map
|