ragbits-chat 1.4.0.dev202512090236__py3-none-any.whl → 1.4.0.dev202512100237__py3-none-any.whl

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.
Files changed (22) hide show
  1. ragbits/chat/ui-build/assets/{AuthGuard--P1u3yIa.js → AuthGuard-B326tmZN.js} +1 -1
  2. ragbits/chat/ui-build/assets/{ChatHistory-s8UFt7jW.js → ChatHistory-Cp_DhrUx.js} +2 -2
  3. ragbits/chat/ui-build/assets/{ChatOptionsForm-Db-m9ZpY.js → ChatOptionsForm-CNjzbIqN.js} +1 -1
  4. ragbits/chat/ui-build/assets/{FeedbackForm-BW_PtJr5.js → FeedbackForm-CmRSbYPS.js} +1 -1
  5. ragbits/chat/ui-build/assets/{Login-CGl7weVn.js → Login-Djq6QJ18.js} +1 -1
  6. ragbits/chat/ui-build/assets/{LogoutButton-DwL4EOOH.js → LogoutButton-Cn2L63Hk.js} +1 -1
  7. ragbits/chat/ui-build/assets/{ShareButton--44vJ5JO.js → ShareButton-lYj0v67r.js} +1 -1
  8. ragbits/chat/ui-build/assets/{UsageButton-D3NhCn7k.js → UsageButton-B-N1J-sZ.js} +1 -1
  9. ragbits/chat/ui-build/assets/{authStore-CbDysRVy.js → authStore-DATNN-ps.js} +1 -1
  10. ragbits/chat/ui-build/assets/{chunk-IGSAU2ZA-DfTuHXe-.js → chunk-IGSAU2ZA-CsJAveMU.js} +1 -1
  11. ragbits/chat/ui-build/assets/{chunk-SSA7SXE4-cjg6s25G.js → chunk-SSA7SXE4-BJI2Gxdq.js} +1 -1
  12. ragbits/chat/ui-build/assets/{index-BixzHh6U.js → index-B3hlerKe.js} +6 -6
  13. ragbits/chat/ui-build/assets/{index-BGJ5ZWe3.js → index-B7bSwAmw.js} +2 -2
  14. ragbits/chat/ui-build/assets/index-C_JcEI3R.js +1 -0
  15. ragbits/chat/ui-build/assets/{index-CP2l1eVy.js → index-v15bx9Do.js} +1 -1
  16. ragbits/chat/ui-build/assets/{useMenuTriggerState-CjQzpbr7.js → useMenuTriggerState-CTz3KfPq.js} +1 -1
  17. ragbits/chat/ui-build/assets/{useSelectableItem-D-4fhfDo.js → useSelectableItem-DK6eABKK.js} +1 -1
  18. ragbits/chat/ui-build/index.html +1 -1
  19. {ragbits_chat-1.4.0.dev202512090236.dist-info → ragbits_chat-1.4.0.dev202512100237.dist-info}/METADATA +2 -2
  20. {ragbits_chat-1.4.0.dev202512090236.dist-info → ragbits_chat-1.4.0.dev202512100237.dist-info}/RECORD +21 -21
  21. ragbits/chat/ui-build/assets/index-g-_fwkPj.js +0 -1
  22. {ragbits_chat-1.4.0.dev202512090236.dist-info → ragbits_chat-1.4.0.dev202512100237.dist-info}/WHEEL +0 -0
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedbackForm-BW_PtJr5.js","assets/index-BGJ5ZWe3.js","assets/chunk-SSA7SXE4-cjg6s25G.js","assets/useMenuTriggerState-CjQzpbr7.js","assets/useSelectableItem-D-4fhfDo.js","assets/index-CP2l1eVy.js","assets/chunk-IGSAU2ZA-DfTuHXe-.js","assets/ChatOptionsForm-Db-m9ZpY.js","assets/ShareButton--44vJ5JO.js","assets/UsageButton-D3NhCn7k.js","assets/ChatHistory-s8UFt7jW.js","assets/Login-CGl7weVn.js","assets/authStore-CbDysRVy.js","assets/AuthGuard--P1u3yIa.js","assets/LogoutButton-DwL4EOOH.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedbackForm-CmRSbYPS.js","assets/index-B7bSwAmw.js","assets/chunk-SSA7SXE4-BJI2Gxdq.js","assets/useMenuTriggerState-CTz3KfPq.js","assets/useSelectableItem-DK6eABKK.js","assets/index-v15bx9Do.js","assets/chunk-IGSAU2ZA-CsJAveMU.js","assets/ChatOptionsForm-CNjzbIqN.js","assets/ShareButton-lYj0v67r.js","assets/UsageButton-B-N1J-sZ.js","assets/ChatHistory-Cp_DhrUx.js","assets/Login-Djq6QJ18.js","assets/authStore-DATNN-ps.js","assets/AuthGuard-B326tmZN.js","assets/LogoutButton-Cn2L63Hk.js"])))=>i.map(i=>d[i]);
2
2
  (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var ig=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zy={exports:{}},pp={},jy={exports:{}},ht={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -52,8 +52,8 @@ Error generating stack: `+C.message+`
52
52
  touch-action: pan-x pan-y pinch-zoom;
53
53
  }
54
54
  }
55
- `.trim(),W.head.prepend(G)},[b]),S.useEffect(()=>{let W=T.current;return()=>{var G;g||HS((G=W.target)!==null&&G!==void 0?G:void 0);for(let ee of W.disposables)ee();W.disposables=[]}},[g]),{isPressed:d||k,pressProps:Pn(x,B,{[XS]:!0})}}function Gx(e){return e.tagName==="A"&&e.hasAttribute("href")}function u0(e,t){const{key:n,code:r}=e,i=t,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof to(i).HTMLInputElement&&!ET(i,n)||i instanceof to(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&Gx(i))&&n!=="Enter")}function au(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function O5(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Gx(e)}function QS(e,t){return e instanceof HTMLInputElement?!ET(e,t):O5(e)}const z5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ET(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":z5.has(e.type)}let na=null,ih=new Set,jp=new Map,ku=!1,vb=!1;const j5={Tab:!0,Escape:!0};function Sv(e,t){for(let n of ih)n(e,t)}function B5(e){return!(e.metaKey||!wu()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Xg(e){ku=!0,B5(e)&&(na="keyboard",Sv("keyboard",e))}function wf(e){na="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(ku=!0,Sv("pointer",e))}function PT(e){DE(e)&&(ku=!0,na="virtual")}function TT(e){e.target===window||e.target===document||Yg||!e.isTrusted||(!ku&&!vb&&(na="virtual",Sv("virtual",e)),ku=!1,vb=!1)}function _T(){Yg||(ku=!1,vb=!0)}function Qg(e){if(typeof window>"u"||typeof document>"u"||jp.get(to(e)))return;const t=to(e),n=Dt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ku=!0,r.apply(this,arguments)},n.addEventListener("keydown",Xg,!0),n.addEventListener("keyup",Xg,!0),n.addEventListener("click",PT,!0),t.addEventListener("focus",TT,!0),t.addEventListener("blur",_T,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",wf,!0),n.addEventListener("pointermove",wf,!0),n.addEventListener("pointerup",wf,!0)),t.addEventListener("beforeunload",()=>{IT(e)},{once:!0}),jp.set(t,{focus:r})}const IT=(e,t)=>{const n=to(e),r=Dt(e);t&&r.removeEventListener("DOMContentLoaded",t),jp.has(n)&&(n.HTMLElement.prototype.focus=jp.get(n).focus,r.removeEventListener("keydown",Xg,!0),r.removeEventListener("keyup",Xg,!0),r.removeEventListener("click",PT,!0),n.removeEventListener("focus",TT,!0),n.removeEventListener("blur",_T,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",wf,!0),r.removeEventListener("pointermove",wf,!0),r.removeEventListener("pointerup",wf,!0)),jp.delete(n))};function V5(e){const t=Dt(e);let n;return t.readyState!=="loading"?Qg(e):(n=()=>{Qg(e)},t.addEventListener("DOMContentLoaded",n)),()=>IT(e,n)}typeof document<"u"&&V5();function qx(){return na!=="pointer"}function oh(){return na}function U5(e){na=e,Sv(e,null)}function HG(){Qg();let[e,t]=S.useState(na);return S.useEffect(()=>{let n=()=>{t(na)};return ih.add(n),()=>{ih.delete(n)}},[]),ph()?null:e}const K5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function W5(e,t,n){let r=Dt(n?.target);const i=typeof window<"u"?to(n?.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?to(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?to(n?.target).HTMLElement:HTMLElement,c=typeof window<"u"?to(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!K5.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof a&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof c&&!j5[n.key])}function H5(e,t,n){Qg(),S.useEffect(()=>{let r=(i,s)=>{W5(!!n?.isTextInput,i,s)&&e(qx())};return ih.add(r),()=>{ih.delete(r)}},t)}function Cu(e){const t=Dt(e),n=zr(t);if(oh()==="virtual"){let r=n;$E(()=>{zr(t)===r&&e.isConnected&&tl(e)})}else tl(e)}function $T(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const s=S.useCallback(d=>{if(d.target===d.currentTarget)return r&&r(d),i&&i(!1),!0},[r,i]),a=kT(s),c=S.useCallback(d=>{const h=Dt(d.target),m=h?zr(h):zr();d.target===d.currentTarget&&m===En(d.nativeEvent)&&(n&&n(d),i&&i(!0),a(d))},[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?c:void 0,onBlur:!t&&(r||i)?s:void 0}}}function JS(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function G5(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:JS(e.onKeyDown),onKeyUp:JS(e.onKeyUp)}}}let q5=He.createContext(null);function Y5(e){let t=S.useContext(q5)||{};RE(t,e);let{ref:n,...r}=t;return r}function xh(e,t){let{focusProps:n}=$T(e),{keyboardProps:r}=G5(e),i=Pn(n,r),s=Y5(t),a=e.isDisabled?{}:s,c=S.useRef(e.autoFocus);S.useEffect(()=>{c.current&&t.current&&Cu(t.current),c.current=!1},[t]);let d=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(d=void 0),{focusableProps:Pn({...i,tabIndex:d},a)}}function X5({children:e}){let t=S.useMemo(()=>({register:()=>{}}),[]);return He.createElement(Hx.Provider,{value:t},e)}function kv(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=S.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:c}=cx(),d=S.useCallback(g=>{g.currentTarget.contains(g.target)&&s.current.isFocusWithin&&!g.currentTarget.contains(g.relatedTarget)&&(s.current.isFocusWithin=!1,c(),n&&n(g),i&&i(!1))},[n,i,s,c]),h=kT(d),m=S.useCallback(g=>{if(!g.currentTarget.contains(g.target))return;const b=Dt(g.target),x=zr(b);if(!s.current.isFocusWithin&&x===En(g.nativeEvent)){r&&r(g),i&&i(!0),s.current.isFocusWithin=!0,h(g);let k=g.currentTarget;a(b,"focus",P=>{if(s.current.isFocusWithin&&!ai(k,P.target)){let T=new b.defaultView.FocusEvent("blur",{relatedTarget:P.target});ST(T,k);let _=Wx(T);d(_)}},{capture:!0})}},[r,i,h,a,d]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:m,onBlur:d}}}let yb=!1,c0=0;function Q5(){yb=!0,setTimeout(()=>{yb=!1},50)}function ZS(e){e.pointerType==="touch"&&Q5()}function J5(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",ZS),c0++,()=>{c0--,!(c0>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",ZS)}}function Eu(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,a]=S.useState(!1),c=S.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;S.useEffect(J5,[]);let{addGlobalListener:d,removeAllGlobalListeners:h}=cx(),{hoverProps:m,triggerHoverEnd:g}=S.useMemo(()=>{let b=(P,T)=>{if(c.pointerType=T,i||T==="touch"||c.isHovered||!P.currentTarget.contains(P.target))return;c.isHovered=!0;let _=P.currentTarget;c.target=_,d(Dt(P.target),"pointerover",A=>{c.isHovered&&c.target&&!ai(c.target,A.target)&&x(A,A.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:_,pointerType:T}),n&&n(!0),a(!0)},x=(P,T)=>{let _=c.target;c.pointerType="",c.target=null,!(T==="touch"||!c.isHovered||!_)&&(c.isHovered=!1,h(),r&&r({type:"hoverend",target:_,pointerType:T}),n&&n(!1),a(!1))},k={};return typeof PointerEvent<"u"&&(k.onPointerEnter=P=>{yb&&P.pointerType==="mouse"||b(P,P.pointerType)},k.onPointerLeave=P=>{!i&&P.currentTarget.contains(P.target)&&x(P,P.pointerType)}),{hoverProps:k,triggerHoverEnd:x}},[t,n,r,i,c,d,h]);return S.useEffect(()=>{i&&g({currentTarget:c.target},c.pointerType)},[i]),{hoverProps:m,isHovered:s}}function Z5(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,s=S.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=jn(d=>{n&&ek(d,t)&&(i&&i(d),s.current.isPointerDown=!0)}),c=jn(d=>{n&&n(d)});S.useEffect(()=>{let d=s.current;if(r)return;const h=t.current,m=Dt(h);if(typeof PointerEvent<"u"){let g=b=>{d.isPointerDown&&ek(b,t)&&c(b),d.isPointerDown=!1};return m.addEventListener("pointerdown",a,!0),m.addEventListener("click",g,!0),()=>{m.removeEventListener("pointerdown",a,!0),m.removeEventListener("click",g,!0)}}},[t,r,a,c])}function ek(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const tk=He.createContext(null),bb="react-aria-focus-scope-restore";let Qt=null;function eF(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,s=S.useRef(null),a=S.useRef(null),c=S.useRef([]),{parentNode:d}=S.useContext(tk)||{},h=S.useMemo(()=>new wb({scopeRef:c}),[c]);sn(()=>{let b=d||Ln.root;if(Ln.getTreeNode(b.scopeRef)&&Qt&&!Jg(Qt,b.scopeRef)){let x=Ln.getTreeNode(Qt);x&&(b=x)}b.addChild(h),Ln.addNode(h)},[h,d]),sn(()=>{let b=Ln.getTreeNode(c);b&&(b.contain=!!n)},[n]),sn(()=>{var b;let x=(b=s.current)===null||b===void 0?void 0:b.nextSibling,k=[],P=T=>T.stopPropagation();for(;x&&x!==a.current;)k.push(x),x.addEventListener(bb,P),x=x.nextSibling;return c.current=k,()=>{for(let T of k)T.removeEventListener(bb,P)}},[t]),oF(c,r,n),nF(c,n),sF(c,r,n),iF(c,i),S.useEffect(()=>{const b=zr(Dt(c.current?c.current[0]:void 0));let x=null;if(ro(b,c.current)){for(let k of Ln.traverse())k.scopeRef&&ro(b,k.scopeRef.current)&&(x=k);x===Ln.getTreeNode(c)&&(Qt=x.scopeRef)}},[c]),sn(()=>()=>{var b,x,k;let P=(k=(x=Ln.getTreeNode(c))===null||x===void 0||(b=x.parent)===null||b===void 0?void 0:b.scopeRef)!==null&&k!==void 0?k:null;(c===Qt||Jg(c,Qt))&&(!P||Ln.getTreeNode(P))&&(Qt=P),Ln.removeTreeNode(c)},[c]);let m=S.useMemo(()=>tF(c),[]),g=S.useMemo(()=>({focusManager:m,parentNode:h}),[h,m]);return He.createElement(tk.Provider,{value:g},He.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:s}),t,He.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function tF(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||zr(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[0].previousElementSibling,m=vu(n),g=Js(m,{tabbable:i,accept:a},n);g.currentNode=ro(d,n)?d:h;let b=g.nextNode();return!b&&s&&(g.currentNode=h,b=g.nextNode()),b&&Qs(b,!0),b},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||zr(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[n.length-1].nextElementSibling,m=vu(n),g=Js(m,{tabbable:i,accept:a},n);g.currentNode=ro(d,n)?d:h;let b=g.previousNode();return!b&&s&&(g.currentNode=h,b=g.previousNode()),b&&Qs(b,!0),b},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=vu(n),a=Js(s,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let c=a.nextNode();return c&&Qs(c,!0),c},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=vu(n),a=Js(s,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let c=a.previousNode();return c&&Qs(c,!0),c}}}function vu(e){return e[0].parentElement}function Ap(e){let t=Ln.getTreeNode(Qt);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function nF(e,t){let n=S.useRef(void 0),r=S.useRef(void 0);sn(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const s=Dt(i?i[0]:void 0);let a=h=>{if(h.key!=="Tab"||h.altKey||h.ctrlKey||h.metaKey||!Ap(e)||h.isComposing)return;let m=zr(s),g=e.current;if(!g||!ro(m,g))return;let b=vu(g),x=Js(b,{tabbable:!0},g);if(!m)return;x.currentNode=m;let k=h.shiftKey?x.previousNode():x.nextNode();k||(x.currentNode=h.shiftKey?g[g.length-1].nextElementSibling:g[0].previousElementSibling,k=h.shiftKey?x.previousNode():x.nextNode()),h.preventDefault(),k&&Qs(k,!0)},c=h=>{(!Qt||Jg(Qt,e))&&ro(En(h),e.current)?(Qt=e,n.current=En(h)):Ap(e)&&!Qa(En(h),e)?n.current?n.current.focus():Qt&&Qt.current&&xb(Qt.current):Ap(e)&&(n.current=En(h))},d=h=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let m=oh(),g=(m==="virtual"||m===null)&&lx()&&TE(),b=zr(s);if(!g&&b&&Ap(e)&&!Qa(b,e)){Qt=e;let k=En(h);if(k&&k.isConnected){var x;n.current=k,(x=n.current)===null||x===void 0||x.focus()}else Qt.current&&xb(Qt.current)}})};return s.addEventListener("keydown",a,!1),s.addEventListener("focusin",c,!1),i?.forEach(h=>h.addEventListener("focusin",c,!1)),i?.forEach(h=>h.addEventListener("focusout",d,!1)),()=>{s.removeEventListener("keydown",a,!1),s.removeEventListener("focusin",c,!1),i?.forEach(h=>h.removeEventListener("focusin",c,!1)),i?.forEach(h=>h.removeEventListener("focusout",d,!1))}},[e,t]),sn(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function AT(e){return Qa(e)}function ro(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Qa(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Ln.traverse(Ln.getTreeNode(t)))if(n&&ro(e,n.current))return!0;return!1}function rF(e){return Qa(e,Qt)}function Jg(e,t){var n;let r=(n=Ln.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Qs(e,t=!1){if(e!=null&&!t)try{Cu(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function RT(e,t=!0){let n=e[0].previousElementSibling,r=vu(e),i=Js(r,{tabbable:t},e);i.currentNode=n;let s=i.nextNode();return t&&!s&&(r=vu(e),i=Js(r,{tabbable:!1},e),i.currentNode=n,s=i.nextNode()),s}function xb(e,t=!0){Qs(RT(e,t))}function iF(e,t){const n=He.useRef(t);S.useEffect(()=>{if(n.current){Qt=e;const r=Dt(e.current?e.current[0]:void 0);!ro(zr(r),Qt.current)&&e.current&&xb(e.current)}n.current=!1},[e])}function oF(e,t,n){sn(()=>{if(t||n)return;let r=e.current;const i=Dt(r?r[0]:void 0);let s=a=>{let c=En(a);ro(c,e.current)?Qt=e:AT(c)||(Qt=null)};return i.addEventListener("focusin",s,!1),r?.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{i.removeEventListener("focusin",s,!1),r?.forEach(a=>a.removeEventListener("focusin",s,!1))}},[e,t,n])}function nk(e){let t=Ln.getTreeNode(Qt);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function sF(e,t,n){const r=S.useRef(typeof document<"u"?zr(Dt(e.current?e.current[0]:void 0)):null);sn(()=>{let i=e.current;const s=Dt(i?i[0]:void 0);if(!t||n)return;let a=()=>{(!Qt||Jg(Qt,e))&&ro(zr(s),e.current)&&(Qt=e)};return s.addEventListener("focusin",a,!1),i?.forEach(c=>c.addEventListener("focusin",a,!1)),()=>{s.removeEventListener("focusin",a,!1),i?.forEach(c=>c.removeEventListener("focusin",a,!1))}},[e,n]),sn(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!Ap(e)||a.isComposing)return;let c=i.activeElement;if(!Qa(c,e)||!nk(e))return;let d=Ln.getTreeNode(e);if(!d)return;let h=d.nodeToRestore,m=Js(i.body,{tabbable:!0});m.currentNode=c;let g=a.shiftKey?m.previousNode():m.nextNode();if((!h||!h.isConnected||h===i.body)&&(h=void 0,d.nodeToRestore=void 0),(!g||!Qa(g,e))&&h){m.currentNode=h;do g=a.shiftKey?m.previousNode():m.nextNode();while(Qa(g,e));a.preventDefault(),a.stopPropagation(),g?Qs(g,!0):AT(h)?Qs(h,!0):c.blur()}};return n||i.addEventListener("keydown",s,!0),()=>{n||i.removeEventListener("keydown",s,!0)}},[e,t,n]),sn(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=Ln.getTreeNode(e);if(s){var a;return s.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let c=Ln.getTreeNode(e);if(!c)return;let d=c.nodeToRestore,h=zr(i);if(t&&d&&(h&&Qa(h,e)||h===i.body&&nk(e))){let m=Ln.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let g=m.getTreeNode(e);for(;g;){if(g.nodeToRestore&&g.nodeToRestore.isConnected){rk(g.nodeToRestore);return}g=g.parent}for(g=m.getTreeNode(e);g;){if(g.scopeRef&&g.scopeRef.current&&Ln.getTreeNode(g.scopeRef)){let b=RT(g.scopeRef.current,!0);rk(b);return}g=g.parent}}})}}}},[e,t])}function rk(e){e.dispatchEvent(new CustomEvent(bb,{bubbles:!0,cancelable:!0}))&&Qs(e)}function Js(e,t,n){let r=t?.tabbable?TM:zE,i=e?.nodeType===Node.ELEMENT_NODE?e:null,s=Dt(i),a=iM(s,e||s,NodeFilter.SHOW_ELEMENT,{acceptNode(c){var d;return!(t==null||(d=t.from)===null||d===void 0)&&d.contains(c)?NodeFilter.FILTER_REJECT:r(c)&&wT(c)&&(!n||ro(c,n))&&(!t?.accept||t.accept(c))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}class Yx{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let s=new wb({scopeRef:t});i.addChild(s),s.parent=i,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&ro(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Yx;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new wb({scopeRef:null}),this.fastMap.set(null,this.root)}}class wb{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Ln=new Yx;function Pu(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=S.useRef({isFocused:!1,isFocusVisible:t||qx()}),[s,a]=S.useState(!1),[c,d]=S.useState(()=>i.current.isFocused&&i.current.isFocusVisible),h=S.useCallback(()=>d(i.current.isFocused&&i.current.isFocusVisible),[]),m=S.useCallback(x=>{i.current.isFocused=x,a(x),h()},[h]);H5(x=>{i.current.isFocusVisible=x,h()},[],{isTextInput:n});let{focusProps:g}=$T({isDisabled:r,onFocusChange:m}),{focusWithinProps:b}=kv({isDisabled:!r,onFocusWithinChange:m});return{isFocused:s,isFocusVisible:c,focusProps:r?b:g}}function aF(e){let t=cF(Dt(e));t!==e&&(t&&lF(t,e),e&&uF(e,t))}function lF(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function uF(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function cF(e){let t=zr(e),n=t?.getAttribute("aria-activedescendant");return n&&e.getElementById(n)||t}const f0=typeof document<"u"&&window.visualViewport,fF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let gg=0,d0;function dF(e={}){let{isDisabled:t}=e;sn(()=>{if(!t)return gg++,gg===1&&(vv()?d0=hF():d0=pF()),()=>{gg--,gg===0&&d0()}},[t])}function pF(){let e=window.innerWidth-document.documentElement.clientWidth;return Tf(e>0&&("scrollbarGutter"in document.documentElement.style?yu(document.documentElement,"scrollbarGutter","stable"):yu(document.documentElement,"paddingRight",`${e}px`)),yu(document.documentElement,"overflow","hidden"))}function hF(){let e,t,n=h=>{e=LE(h.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=yu(e,"overscrollBehavior","contain"))},r=h=>{if(!e||e===document.documentElement||e===document.body){h.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&h.preventDefault()},i=()=>{t&&t()},s=h=>{let m=h.target;mF(m)&&(c(),m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",f0&&(f0.height<window.innerHeight?requestAnimationFrame(()=>{ik(m)}):f0.addEventListener("resize",()=>ik(m),{once:!0}))}))},a=null,c=()=>{if(a)return;let h=()=>{window.scrollTo(0,0)},m=window.pageXOffset,g=window.pageYOffset;a=Tf(gp(window,"scroll",h),yu(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),yu(document.documentElement,"overflow","hidden"),yu(document.body,"marginTop",`-${g}px`),()=>{window.scrollTo(m,g)}),window.scrollTo(0,0)},d=Tf(gp(document,"touchstart",n,{passive:!1,capture:!0}),gp(document,"touchmove",r,{passive:!1,capture:!0}),gp(document,"touchend",i,{passive:!1,capture:!0}),gp(document,"focus",s,!0));return()=>{t?.(),a?.(),d()}}function yu(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function gp(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ik(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let r=LE(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,s=n.getBoundingClientRect().top;s>i+n.clientHeight&&(r.scrollTop+=s-i)}n=r.parentElement}}function mF(e){return e instanceof HTMLInputElement&&!fF.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const gF=S.createContext({});function LT(){var e;return(e=S.useContext(gF))!==null&&e!==void 0?e:{}}const Sb=He.createContext(null);function vF(e){let{children:t}=e,n=S.useContext(Sb),[r,i]=S.useState(0),s=S.useMemo(()=>({parent:n,modalCount:r,addModal(){i(a=>a+1),n&&n.addModal()},removeModal(){i(a=>a-1),n&&n.removeModal()}}),[n,r]);return He.createElement(Sb.Provider,{value:s},t)}function yF(){let e=S.useContext(Sb);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function bF(e){let{modalProviderProps:t}=yF();return He.createElement("div",{"data-overlay-container":!0,...e,...t})}function MT(e){return He.createElement(vF,null,He.createElement(bF,e))}function ok(e){let t=ph(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=LT();if(!e.portalContainer&&i&&(n=i()),He.useEffect(()=>{if(n?.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let s=He.createElement(MT,r);return OE.createPortal(s,n)}var DT={};DT={dismiss:"تجاهل"};var NT={};NT={dismiss:"Отхвърляне"};var FT={};FT={dismiss:"Odstranit"};var OT={};OT={dismiss:"Luk"};var zT={};zT={dismiss:"Schließen"};var jT={};jT={dismiss:"Απόρριψη"};var BT={};BT={dismiss:"Dismiss"};var VT={};VT={dismiss:"Descartar"};var UT={};UT={dismiss:"Lõpeta"};var KT={};KT={dismiss:"Hylkää"};var WT={};WT={dismiss:"Rejeter"};var HT={};HT={dismiss:"התעלם"};var GT={};GT={dismiss:"Odbaci"};var qT={};qT={dismiss:"Elutasítás"};var YT={};YT={dismiss:"Ignora"};var XT={};XT={dismiss:"閉じる"};var QT={};QT={dismiss:"무시"};var JT={};JT={dismiss:"Atmesti"};var ZT={};ZT={dismiss:"Nerādīt"};var e_={};e_={dismiss:"Lukk"};var t_={};t_={dismiss:"Negeren"};var n_={};n_={dismiss:"Zignoruj"};var r_={};r_={dismiss:"Descartar"};var i_={};i_={dismiss:"Dispensar"};var o_={};o_={dismiss:"Revocare"};var s_={};s_={dismiss:"Пропустить"};var a_={};a_={dismiss:"Zrušiť"};var l_={};l_={dismiss:"Opusti"};var u_={};u_={dismiss:"Odbaci"};var c_={};c_={dismiss:"Avvisa"};var f_={};f_={dismiss:"Kapat"};var d_={};d_={dismiss:"Скасувати"};var p_={};p_={dismiss:"取消"};var h_={};h_={dismiss:"關閉"};var m_={};m_={"ar-AE":DT,"bg-BG":NT,"cs-CZ":FT,"da-DK":OT,"de-DE":zT,"el-GR":jT,"en-US":BT,"es-ES":VT,"et-EE":UT,"fi-FI":KT,"fr-FR":WT,"he-IL":HT,"hr-HR":GT,"hu-HU":qT,"it-IT":YT,"ja-JP":XT,"ko-KR":QT,"lt-LT":JT,"lv-LV":ZT,"nb-NO":e_,"nl-NL":t_,"pl-PL":n_,"pt-BR":r_,"pt-PT":i_,"ro-RO":o_,"ru-RU":s_,"sk-SK":a_,"sl-SI":l_,"sr-SP":u_,"sv-SE":c_,"tr-TR":f_,"uk-UA":d_,"zh-CN":p_,"zh-TW":h_};const sk={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function xF(e={}){let{style:t,isFocusable:n}=e,[r,i]=S.useState(!1),{focusWithinProps:s}=kv({isDisabled:!n,onFocusWithinChange:c=>i(c)}),a=S.useMemo(()=>r?t:t?{...sk,...t}:sk,[r]);return{visuallyHiddenProps:{...s,style:a}}}function wF(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...s}=e,{visuallyHiddenProps:a}=xF(e);return He.createElement(n,Pn(s,a),t)}function SF(e){return e&&e.__esModule?e.default:e}function ak(e){let{onDismiss:t,...n}=e,r=GL(SF(m_),"@react-aria/overlays"),i=AE(n,r.format("dismiss")),s=()=>{t&&t()};return He.createElement(wF,null,He.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}let vp=new WeakMap,Qi=[];function kF(e,t=document.body){let n=new Set(e),r=new Set,i=d=>{for(let b of d.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(b);let h=b=>{if(n.has(b)||b.parentElement&&r.has(b.parentElement)&&b.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let x of n)if(b.contains(x))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},m=document.createTreeWalker(d,NodeFilter.SHOW_ELEMENT,{acceptNode:h}),g=h(d);if(g===NodeFilter.FILTER_ACCEPT&&s(d),g!==NodeFilter.FILTER_REJECT){let b=m.nextNode();for(;b!=null;)s(b),b=m.nextNode()}},s=d=>{var h;let m=(h=vp.get(d))!==null&&h!==void 0?h:0;d.getAttribute("aria-hidden")==="true"&&m===0||(m===0&&d.setAttribute("aria-hidden","true"),r.add(d),vp.set(d,m+1))};Qi.length&&Qi[Qi.length-1].disconnect(),i(t);let a=new MutationObserver(d=>{for(let h of d)if(!(h.type!=="childList"||h.addedNodes.length===0)&&![...n,...r].some(m=>m.contains(h.target))){for(let m of h.removedNodes)m instanceof Element&&(n.delete(m),r.delete(m));for(let m of h.addedNodes)(m instanceof HTMLElement||m instanceof SVGElement)&&(m.dataset.liveAnnouncer==="true"||m.dataset.reactAriaTopLayer==="true")?n.add(m):m instanceof Element&&i(m)}});a.observe(t,{childList:!0,subtree:!0});let c={visibleNodes:n,hiddenNodes:r,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Qi.push(c),()=>{a.disconnect();for(let d of r){let h=vp.get(d);h!=null&&(h===1?(d.removeAttribute("aria-hidden"),vp.delete(d)):vp.set(d,h-1))}c===Qi[Qi.length-1]?(Qi.pop(),Qi.length&&Qi[Qi.length-1].observe()):Qi.splice(Qi.indexOf(c),1)}}const g_=He.createContext(null);function CF(e){let t=ph(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,s]=S.useState(!1),a=S.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:c}=LT();if(!e.portalContainer&&c&&(n=c()),!n)return null;let d=e.children;return e.disableFocusManagement||(d=He.createElement(eF,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},d)),d=He.createElement(g_.Provider,{value:a},He.createElement(X5,null,d)),OE.createPortal(d,n)}function v_(){let e=S.useContext(g_),t=e?.setContain;sn(()=>{t?.(!0)},[t])}var EF=({children:e,navigate:t,disableAnimation:n,useHref:r,disableRipple:i=!1,skipFramerMotionAnimations:s=n,reducedMotion:a="never",validationBehavior:c,locale:d="en-US",labelPlacement:h,defaultDates:m,createCalendar:g,spinnerVariant:b,...x})=>{let k=e;t&&(k=D.jsx(gM,{navigate:t,useHref:r,children:k}));const P=S.useMemo(()=>(n&&s&&(fs.skipAnimations=!0),{createCalendar:g,defaultDates:m,disableAnimation:n,disableRipple:i,validationBehavior:c,labelPlacement:h,spinnerVariant:b}),[g,m?.maxDate,m?.minDate,n,i,c,h,b]);return D.jsx(TL,{value:P,children:D.jsx(zL,{locale:d,children:D.jsx(B3,{reducedMotion:a,children:D.jsx(MT,{...x,children:k})})})})};function GG(e){const t=ci(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function PF(e){const t=ci(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function jr(e){return S.forwardRef(e)}var oa=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((i,s)=>s in e?{...i,[s]:e[s]}:i,{});return n?[Object.keys(e).filter(s=>!t.includes(s)).reduce((s,a)=>({...s,[a]:e[a]}),{}),r]:[e,r]},TF={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},_F={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"},IF={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger"},$F={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500"},AF={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger"},RF={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger"},LF={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger"},Te={solid:TF,shadow:_F,bordered:IF,flat:$F,faded:AF,light:RF,ghost:LF},MF={".spinner-bar-animation":{"animation-delay":"calc(-1.2s + (0.1s * var(--bar-index)))",transform:"rotate(calc(30deg * var(--bar-index)))translate(140%)"},".spinner-dot-animation":{"animation-delay":"calc(250ms * var(--dot-index))"},".spinner-dot-blink-animation":{"animation-delay":"calc(200ms * var(--dot-index))"}},DF={".leading-inherit":{"line-height":"inherit"},".bg-img-inherit":{"background-image":"inherit"},".bg-clip-inherit":{"background-clip":"inherit"},".text-fill-inherit":{"-webkit-text-fill-color":"inherit"},".tap-highlight-transparent":{"-webkit-tap-highlight-color":"transparent"},".input-search-cancel-button-none":{"&::-webkit-search-cancel-button":{"-webkit-appearance":"none"}}},NF={".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},FF={".text-tiny":{"font-size":"var(--heroui-font-size-tiny)","line-height":"var(--heroui-line-height-tiny)"},".text-small":{"font-size":"var(--heroui-font-size-small)","line-height":"var(--heroui-line-height-small)"},".text-medium":{"font-size":"var(--heroui-font-size-medium)","line-height":"var(--heroui-line-height-medium)"},".text-large":{"font-size":"var(--heroui-font-size-large)","line-height":"var(--heroui-line-height-large)"}},is="250ms",OF={".transition-background":{"transition-property":"background","transition-timing-function":"ease","transition-duration":is},".transition-colors-opacity":{"transition-property":"color, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":is},".transition-width":{"transition-property":"width","transition-timing-function":"ease","transition-duration":is},".transition-height":{"transition-property":"height","transition-timing-function":"ease","transition-duration":is},".transition-size":{"transition-property":"width, height","transition-timing-function":"ease","transition-duration":is},".transition-left":{"transition-property":"left","transition-timing-function":"ease","transition-duration":is},".transition-transform-opacity":{"transition-property":"transform, scale, opacity rotate","transition-timing-function":"ease","transition-duration":is},".transition-transform-background":{"transition-property":"transform, scale, background","transition-timing-function":"ease","transition-duration":is},".transition-transform-colors":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke","transition-timing-function":"ease","transition-duration":is},".transition-transform-colors-opacity":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":is}},zF={...DF,...OF,...NF,...FF,...MF},vg=["small","medium","large"],kb={theme:{spacing:["divider"],radius:vg},classGroups:{shadow:[{shadow:vg}],opacity:[{opacity:["disabled"]}],"font-size":[{text:["tiny",...vg]}],"border-w":[{border:vg}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"],transition:Object.keys(zF).filter(e=>e.includes(".transition")).map(e=>e.replace(".",""))}},lk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,oi=e=>!e||typeof e!="object"||Object.keys(e).length===0,jF=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function y_(e,t){e.forEach(function(n){Array.isArray(n)?y_(n,t):t.push(n)})}function b_(e){let t=[];return y_(e,t),t}var x_=(...e)=>b_(e).filter(Boolean),w_=(e,t)=>{let n={},r=Object.keys(e),i=Object.keys(t);for(let s of r)if(i.includes(s)){let a=e[s],c=t[s];Array.isArray(a)||Array.isArray(c)?n[s]=x_(c,a):typeof a=="object"&&typeof c=="object"?n[s]=w_(a,c):n[s]=c+" "+a}else n[s]=e[s];for(let s of i)r.includes(s)||(n[s]=t[s]);return n},uk=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const Xx="-",BF=e=>{const t=UF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const c=a.split(Xx);return c[0]===""&&c.length!==1&&c.shift(),S_(c,t)||VF(a)},getConflictingClassGroupIds:(a,c)=>{const d=n[a]||[];return c&&r[a]?[...d,...r[a]]:d}}},S_=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?S_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Xx);return t.validators.find(({validator:a})=>a(s))?.classGroupId},ck=/^\[(.+)\]$/,VF=e=>{if(ck.test(e)){const t=ck.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},UF=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)Cb(n[i],r,i,t);return r},Cb=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:fk(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(KF(i)){Cb(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{Cb(a,fk(t,s),n,r)})})},fk=(e,t)=>{let n=e;return t.split(Xx).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},KF=e=>e.isThemeGetter,WF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},Eb="!",Pb=":",HF=Pb.length,GF=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,c=0,d=0,h;for(let k=0;k<i.length;k++){let P=i[k];if(a===0&&c===0){if(P===Pb){s.push(i.slice(d,k)),d=k+HF;continue}if(P==="/"){h=k;continue}}P==="["?a++:P==="]"?a--:P==="("?c++:P===")"&&c--}const m=s.length===0?i:i.substring(d),g=qF(m),b=g!==m,x=h&&h>d?h-d:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:g,maybePostfixModifierPosition:x}};if(t){const i=t+Pb,s=r;r=a=>a.startsWith(i)?s(a.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},qF=e=>e.endsWith(Eb)?e.substring(0,e.length-1):e.startsWith(Eb)?e.substring(1):e,YF=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(i.push(...s.sort(),a),s=[]):s.push(a)}),i.push(...s.sort()),i}},XF=e=>({cache:WF(e.cacheSize),parseClassName:GF(e),sortModifiers:YF(e),...BF(e)}),QF=/\s+/,JF=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],c=e.trim().split(QF);let d="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:g,modifiers:b,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:P}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let T=!!P,_=r(T?k.substring(0,P):k);if(!_){if(!T){d=m+(d.length>0?" "+d:d);continue}if(_=r(k),!_){d=m+(d.length>0?" "+d:d);continue}T=!1}const A=s(b).join(":"),L=x?A+Eb:A,O=L+_;if(a.includes(O))continue;a.push(O);const j=i(_,T);for(let $=0;$<j.length;++$){const Y=j[$];a.push(L+Y)}d=m+(d.length>0?" "+d:d)}return d};function ZF(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=k_(t))&&(r&&(r+=" "),r+=n);return r}const k_=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=k_(e[r]))&&(n&&(n+=" "),n+=t);return n};function Tb(e,...t){let n,r,i,s=a;function a(d){const h=t.reduce((m,g)=>g(m),e());return n=XF(h),r=n.cache.get,i=n.cache.set,s=c,c(d)}function c(d){const h=r(d);if(h)return h;const m=JF(d,n);return i(d,m),m}return function(){return s(ZF.apply(null,arguments))}}const Jn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},C_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,E_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eO=/^\d+\/\d+$/,tO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,iO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sf=e=>eO.test(e),yt=e=>!!e&&!Number.isNaN(Number(e)),lu=e=>!!e&&Number.isInteger(Number(e)),dk=e=>e.endsWith("%")&&yt(e.slice(0,-1)),Ga=e=>tO.test(e),sO=()=>!0,aO=e=>nO.test(e)&&!rO.test(e),Qx=()=>!1,lO=e=>iO.test(e),uO=e=>oO.test(e),cO=e=>!je(e)&&!Be(e),fO=e=>Of(e,__,Qx),je=e=>C_.test(e),uu=e=>Of(e,I_,aO),p0=e=>Of(e,SO,yt),dO=e=>Of(e,P_,Qx),pO=e=>Of(e,T_,uO),hO=e=>Of(e,Qx,lO),Be=e=>E_.test(e),yg=e=>zf(e,I_),mO=e=>zf(e,kO),gO=e=>zf(e,P_),vO=e=>zf(e,__),yO=e=>zf(e,T_),bO=e=>zf(e,CO,!0),Of=(e,t,n)=>{const r=C_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},zf=(e,t,n=!1)=>{const r=E_.exec(e);return r?r[1]?t(r[1]):n:!1},P_=e=>e==="position",xO=new Set(["image","url"]),T_=e=>xO.has(e),wO=new Set(["length","size","percentage"]),__=e=>wO.has(e),I_=e=>e==="length",SO=e=>e==="number",kO=e=>e==="family-name",CO=e=>e==="shadow",_b=()=>{const e=Jn("color"),t=Jn("font"),n=Jn("text"),r=Jn("font-weight"),i=Jn("tracking"),s=Jn("leading"),a=Jn("breakpoint"),c=Jn("container"),d=Jn("spacing"),h=Jn("radius"),m=Jn("shadow"),g=Jn("inset-shadow"),b=Jn("drop-shadow"),x=Jn("blur"),k=Jn("perspective"),P=Jn("aspect"),T=Jn("ease"),_=Jn("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],$=()=>[Be,je,d],Y=()=>[sf,"full","auto",...$()],te=()=>[lu,"none","subgrid",Be,je],ie=()=>["auto",{span:["full",lu,Be,je]},Be,je],B=()=>[lu,"auto",Be,je],W=()=>["auto","min","max","fr",Be,je],G=()=>["start","end","center","between","around","evenly","stretch","baseline"],ee=()=>["start","end","center","stretch"],H=()=>["auto",...$()],le=()=>[sf,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],J=()=>[e,Be,je],X=()=>[dk,uu],V=()=>["","none","full",h,Be,je],ae=()=>["",yt,yg,uu],M=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["","none",x,Be,je],z=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be,je],me=()=>["none",yt,Be,je],Ce=()=>["none",yt,Be,je],ye=()=>[yt,Be,je],Oe=()=>[sf,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ga],breakpoint:[Ga],color:[sO],container:[Ga],"drop-shadow":[Ga],ease:["in","out","in-out"],font:[cO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ga],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ga],shadow:[Ga],spacing:["px",yt],text:[Ga],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sf,je,Be,P]}],container:["container"],columns:[{columns:[yt,je,Be,c]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...L(),je,Be]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{start:Y()}],end:[{end:Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[lu,"auto",Be,je]}],basis:[{basis:[sf,"full","auto",c,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[yt,sf,"auto","initial","none",je]}],grow:[{grow:["",yt,Be,je]}],shrink:[{shrink:["",yt,Be,je]}],order:[{order:[lu,"first","last","none",Be,je]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...ee(),"baseline"]}],"align-self":[{self:["auto",...ee(),"baseline"]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:le()}],w:[{w:[c,"screen",...le()]}],"min-w":[{"min-w":[c,"screen","none",...le()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...le()]}],h:[{h:["screen",...le()]}],"min-h":[{"min-h":["screen","none",...le()]}],"max-h":[{"max-h":["screen",...le()]}],"font-size":[{text:["base",n,yg,uu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Be,p0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dk,je]}],"font-family":[{font:[mO,je,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Be,je]}],"line-clamp":[{"line-clamp":[yt,"none",Be,p0]}],leading:[{leading:[s,...$()]}],"list-image":[{"list-image":["none",Be,je]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Be,je]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[yt,"from-font","auto",Be,uu]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[yt,"auto",Be,je]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be,je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Be,je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),gO,dO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",vO,fO]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},lu,Be,je],radial:["",Be,je],conic:[lu,Be,je]},yO,pO]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[yt,Be,je]}],"outline-w":[{outline:["",yt,yg,uu]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",m,bO,hO]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",Be,je,g]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[yt,uu]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":J()}],opacity:[{opacity:[yt,Be,je]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none",Be,je]}],blur:[{blur:oe()}],brightness:[{brightness:[yt,Be,je]}],contrast:[{contrast:[yt,Be,je]}],"drop-shadow":[{"drop-shadow":["","none",b,Be,je]}],grayscale:[{grayscale:["",yt,Be,je]}],"hue-rotate":[{"hue-rotate":[yt,Be,je]}],invert:[{invert:["",yt,Be,je]}],saturate:[{saturate:[yt,Be,je]}],sepia:[{sepia:["",yt,Be,je]}],"backdrop-filter":[{"backdrop-filter":["","none",Be,je]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[yt,Be,je]}],"backdrop-contrast":[{"backdrop-contrast":[yt,Be,je]}],"backdrop-grayscale":[{"backdrop-grayscale":["",yt,Be,je]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[yt,Be,je]}],"backdrop-invert":[{"backdrop-invert":["",yt,Be,je]}],"backdrop-opacity":[{"backdrop-opacity":[yt,Be,je]}],"backdrop-saturate":[{"backdrop-saturate":[yt,Be,je]}],"backdrop-sepia":[{"backdrop-sepia":["",yt,Be,je]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Be,je]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[yt,"initial",Be,je]}],ease:[{ease:["linear","initial",T,Be,je]}],delay:[{delay:[yt,Be,je]}],animate:[{animate:["none",_,Be,je]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,Be,je]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[Be,je,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],accent:[{accent:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be,je]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Be,je]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[yt,yg,uu,p0]}],stroke:[{stroke:["none",...J()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},EO=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:s={}})=>(Rp(e,"cacheSize",t),Rp(e,"prefix",n),Rp(e,"experimentalParseClassName",r),bg(e.theme,s.theme),bg(e.classGroups,s.classGroups),bg(e.conflictingClassGroups,s.conflictingClassGroups),bg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),Rp(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),xg(e.theme,i.theme),xg(e.classGroups,i.classGroups),xg(e.conflictingClassGroups,i.conflictingClassGroups),xg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),$_(e,i,"orderSensitiveModifiers"),e),Rp=(e,t,n)=>{n!==void 0&&(e[t]=n)},bg=(e,t)=>{if(t)for(const n in t)Rp(e,n,t[n])},xg=(e,t)=>{if(t)for(const n in t)$_(e,t,n)},$_=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},A_=(e,...t)=>typeof e=="function"?Tb(_b,e,...t):Tb(()=>EO(_b(),e),...t),PO=Tb(_b);var TO={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},R_=e=>e||void 0,sh=(...e)=>R_(b_(e).filter(Boolean).join(" ")),h0=null,Xs={},Ib=!1,yp=(...e)=>t=>t.twMerge?((!h0||Ib)&&(Ib=!1,h0=oi(Xs)?PO:A_({...Xs,extend:{theme:Xs.theme,classGroups:Xs.classGroups,conflictingClassGroupModifiers:Xs.conflictingClassGroupModifiers,conflictingClassGroups:Xs.conflictingClassGroups,...Xs.extend}})),R_(h0(sh(e)))):sh(e),pk=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=sh(e[n],t[n]):e[n]=t[n];return e},_O=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:s=[],compoundSlots:a=[],defaultVariants:c={}}=e,d={...TO,...t},h=n!=null&&n.base?sh(n.base,e?.base):e?.base,m=n!=null&&n.variants&&!oi(n.variants)?w_(i,n.variants):i,g=n!=null&&n.defaultVariants&&!oi(n.defaultVariants)?{...n.defaultVariants,...c}:c;!oi(d.twMergeConfig)&&!jF(d.twMergeConfig,Xs)&&(Ib=!0,Xs=d.twMergeConfig);let b=oi(n?.slots),x=oi(r)?{}:{base:sh(e?.base,b&&n?.base),...r},k=b?x:pk({...n?.slots},oi(x)?{base:e?.base}:x),P=oi(n?.compoundVariants)?s:x_(n?.compoundVariants,s),T=A=>{if(oi(m)&&oi(r)&&b)return yp(h,A?.class,A?.className)(d);if(P&&!Array.isArray(P))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof P}`);if(a&&!Array.isArray(a))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof a}`);let L=(G,ee,H=[],le)=>{let J=H;if(typeof ee=="string")J=J.concat(uk(ee).split(" ").map(X=>`${G}:${X}`));else if(Array.isArray(ee))J=J.concat(ee.reduce((X,V)=>X.concat(`${G}:${V}`),[]));else if(typeof ee=="object"&&typeof le=="string"){for(let X in ee)if(ee.hasOwnProperty(X)&&X===le){let V=ee[X];if(V&&typeof V=="string"){let ae=uk(V);J[le]?J[le]=J[le].concat(ae.split(" ").map(M=>`${G}:${M}`)):J[le]=ae.split(" ").map(M=>`${G}:${M}`)}else Array.isArray(V)&&V.length>0&&(J[le]=V.reduce((ae,M)=>ae.concat(`${G}:${M}`),[]))}}return J},O=(G,ee=m,H=null,le=null)=>{var J;let X=ee[G];if(!X||oi(X))return null;let V=(J=le?.[G])!=null?J:A?.[G];if(V===null)return null;let ae=lk(V),M=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,U=g?.[G],oe=[];if(typeof ae=="object"&&M)for(let[Ce,ye]of Object.entries(ae)){let Oe=X[ye];if(Ce==="initial"){U=ye;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(Ce)||(oe=L(Ce,Oe,oe,H))}let z=ae!=null&&typeof ae!="object"?ae:lk(U),me=X[z||"false"];return typeof oe=="object"&&typeof H=="string"&&oe[H]?pk(oe,me):oe.length>0?(oe.push(me),H==="base"?oe.join(" "):oe):me},j=()=>m?Object.keys(m).map(G=>O(G,m)):null,$=(G,ee)=>{if(!m||typeof m!="object")return null;let H=new Array;for(let le in m){let J=O(le,m,G,ee),X=G==="base"&&typeof J=="string"?J:J&&J[G];X&&(H[H.length]=X)}return H},Y={};for(let G in A)A[G]!==void 0&&(Y[G]=A[G]);let te=(G,ee)=>{var H;let le=typeof A?.[G]=="object"?{[G]:(H=A[G])==null?void 0:H.initial}:{};return{...g,...Y,...le,...ee}},ie=(G=[],ee)=>{let H=[];for(let{class:le,className:J,...X}of G){let V=!0;for(let[ae,M]of Object.entries(X)){let U=te(ae,ee)[ae];if(Array.isArray(M)){if(!M.includes(U)){V=!1;break}}else{let oe=z=>z==null||z===!1;if(oe(M)&&oe(U))continue;if(U!==M){V=!1;break}}}V&&(le&&H.push(le),J&&H.push(J))}return H},B=G=>{let ee=ie(P,G);if(!Array.isArray(ee))return ee;let H={};for(let le of ee)if(typeof le=="string"&&(H.base=yp(H.base,le)(d)),typeof le=="object")for(let[J,X]of Object.entries(le))H[J]=yp(H[J],X)(d);return H},W=G=>{if(a.length<1)return null;let ee={};for(let{slots:H=[],class:le,className:J,...X}of a){if(!oi(X)){let V=!0;for(let ae of Object.keys(X)){let M=te(ae,G)[ae];if(M===void 0||(Array.isArray(X[ae])?!X[ae].includes(M):X[ae]!==M)){V=!1;break}}if(!V)continue}for(let V of H)ee[V]=ee[V]||[],ee[V].push([le,J])}return ee};if(!oi(r)||!b){let G={};if(typeof k=="object"&&!oi(k))for(let ee of Object.keys(k))G[ee]=H=>{var le,J;return yp(k[ee],$(ee,H),((le=B(H))!=null?le:[])[ee],((J=W(H))!=null?J:[])[ee],H?.class,H?.className)(d)};return G}return yp(h,j(),ie(P),A?.class,A?.className)(d)},_=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return T.variantKeys=_(),T.extend=n,T.base=h,T.slots=k,T.variants=m,T.defaultVariants=g,T.compoundSlots=a,T.compoundVariants=P,T},Zn=(e,t)=>{var n,r,i;return _O(e,{...t,twMerge:(n=t?.twMerge)!=null?n:!0,twMergeConfig:{...t?.twMergeConfig,theme:{...(r=t?.twMergeConfig)==null?void 0:r.theme,...kb.theme},classGroups:{...(i=t?.twMergeConfig)==null?void 0:i.classGroups,...kb.classGroups}}})},hk=Zn({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",label:"text-foreground dark:text-foreground-dark font-regular",circle1:"absolute w-full h-full rounded-full",circle2:"absolute w-full h-full rounded-full",dots:"relative rounded-full mx-auto",spinnerBars:["absolute","animate-fade-out","rounded-full","w-[25%]","h-[8%]","left-[calc(37.5%)]","top-[calc(46%)]","spinner-bar-animation"]},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",dots:"size-1",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",dots:"size-1.5",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",dots:"size-2",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current",dots:"bg-current",spinnerBars:"bg-current"},white:{circle1:"border-b-white",circle2:"border-b-white",dots:"bg-white",spinnerBars:"bg-white"},default:{circle1:"border-b-default",circle2:"border-b-default",dots:"bg-default",spinnerBars:"bg-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary",dots:"bg-primary",spinnerBars:"bg-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary",dots:"bg-secondary",spinnerBars:"bg-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success",dots:"bg-success",spinnerBars:"bg-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning",dots:"bg-warning",spinnerBars:"bg-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger",dots:"bg-danger",spinnerBars:"bg-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}},variant:{default:{circle1:["animate-spinner-ease-spin","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["opacity-75","animate-spinner-linear-spin","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"]},gradient:{circle1:["border-0","bg-gradient-to-b","from-transparent","via-transparent","to-primary","animate-spinner-linear-spin","[animation-duration:1s]","[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]"],circle2:["hidden"]},wave:{wrapper:"translate-y-3/4",dots:["animate-sway","spinner-dot-animation"]},dots:{wrapper:"translate-y-2/4",dots:["animate-blink","spinner-dot-blink-animation"]},spinner:{},simple:{wrapper:"text-foreground h-5 w-5 animate-spin",circle1:"opacity-25",circle2:"opacity-75"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground",variant:"default"},compoundVariants:[{variant:"gradient",color:"current",class:{circle1:"to-current"}},{variant:"gradient",color:"white",class:{circle1:"to-white"}},{variant:"gradient",color:"default",class:{circle1:"to-default"}},{variant:"gradient",color:"primary",class:{circle1:"to-primary"}},{variant:"gradient",color:"secondary",class:{circle1:"to-secondary"}},{variant:"gradient",color:"success",class:{circle1:"to-success"}},{variant:"gradient",color:"warning",class:{circle1:"to-warning"}},{variant:"gradient",color:"danger",class:{circle1:"to-danger"}},{variant:"wave",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"wave",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"wave",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"dots",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"dots",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"dots",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"simple",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"simple",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",color:"current",class:{wrapper:"text-current"}},{variant:"simple",color:"white",class:{wrapper:"text-white"}},{variant:"simple",color:"default",class:{wrapper:"text-default"}},{variant:"simple",color:"primary",class:{wrapper:"text-primary"}},{variant:"simple",color:"secondary",class:{wrapper:"text-secondary"}},{variant:"simple",color:"success",class:{wrapper:"text-success"}},{variant:"simple",color:"warning",class:{wrapper:"text-warning"}},{variant:"simple",color:"danger",class:{wrapper:"text-danger"}}]}),wh=["outline-hidden","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],L_=["outline-hidden","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],IO=["outline-hidden","ring-2","ring-focus","ring-offset-2","ring-offset-background"],af={default:["[&+.border-medium.border-default]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(var(--heroui-border-width-medium)*-1)]"]},$O=["font-inherit","text-[100%]","leading-[1.15]","m-0","p-0","overflow-visible","box-border","absolute","top-0","w-full","h-full","opacity-[0.0001]","z-[1]","cursor-pointer","disabled:cursor-default"],mk=Zn({slots:{base:["z-0","relative","bg-transparent","before:content-['']","before:hidden","before:z-[-1]","before:absolute","before:rotate-45","before:w-2.5","before:h-2.5","before:rounded-sm","data-[arrow=true]:before:block","data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top]:before:left-1/2","data-[placement=top]:before:-translate-x-1/2","data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-start]:before:left-3","data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-end]:before:right-3","data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom]:before:left-1/2","data-[placement=bottom]:before:-translate-x-1/2","data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-start]:before:left-3","data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-end]:before:right-3","data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=left]:before:top-1/2","data-[placement=left]:before:-translate-y-1/2","data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-start]:before:top-1/4","data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-end]:before:bottom-1/4","data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=right]:before:top-1/2","data-[placement=right]:before:-translate-y-1/2","data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-start]:before:top-1/4","data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-end]:before:bottom-1/4",...wh],content:["z-10","px-2.5","py-1","w-full","inline-flex","flex-col","items-center","justify-center","box-border","subpixel-antialiased","outline-hidden","box-border"],trigger:["z-10"],backdrop:["hidden"],arrow:[]},variants:{size:{sm:{content:"text-tiny"},md:{content:"text-small"},lg:{content:"text-medium"}},color:{default:{base:"before:bg-content1 before:shadow-small",content:"bg-content1"},foreground:{base:"before:bg-foreground",content:Te.solid.foreground},primary:{base:"before:bg-primary",content:Te.solid.primary},secondary:{base:"before:bg-secondary",content:Te.solid.secondary},success:{base:"before:bg-success",content:Te.solid.success},warning:{base:"before:bg-warning",content:Te.solid.warning},danger:{base:"before:bg-danger",content:Te.solid.danger}},radius:{none:{content:"rounded-none"},sm:{content:"rounded-small"},md:{content:"rounded-medium"},lg:{content:"rounded-large"},full:{content:"rounded-full"}},shadow:{none:{content:"shadow-none"},sm:{content:"shadow-small"},md:{content:"shadow-medium"},lg:{content:"shadow-large"}},backdrop:{transparent:{},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"}},triggerScaleOnOpen:{true:{trigger:["aria-expanded:scale-[0.97]","aria-expanded:opacity-70","subpixel-antialiased"]},false:{}},disableAnimation:{true:{base:"animate-none"}},isTriggerDisabled:{true:{trigger:"opacity-disabled pointer-events-none"},false:{}}},defaultVariants:{color:"default",radius:"lg",size:"md",shadow:"md",backdrop:"transparent",triggerScaleOnOpen:!0},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"block w-full h-full fixed inset-0 -z-30"}}]});Zn({slots:{base:"flex flex-col gap-2 w-full",label:"",labelWrapper:"flex justify-between",value:"",track:"z-0 relative bg-default-300/50 overflow-hidden rtl:rotate-180",indicator:"h-full"},variants:{color:{default:{indicator:"bg-default-400"},primary:{indicator:"bg-primary"},secondary:{indicator:"bg-secondary"},success:{indicator:"bg-success"},warning:{indicator:"bg-warning"},danger:{indicator:"bg-danger"}},size:{sm:{label:"text-small",value:"text-small",track:"h-1"},md:{label:"text-medium",value:"text-medium",track:"h-3"},lg:{label:"text-large",value:"text-large",track:"h-5"}},radius:{none:{track:"rounded-none",indicator:"rounded-none"},sm:{track:"rounded-small",indicator:"rounded-small"},md:{track:"rounded-medium",indicator:"rounded-medium"},lg:{track:"rounded-large",indicator:"rounded-large"},full:{track:"rounded-full",indicator:"rounded-full"}},isStriped:{true:{indicator:"bg-stripe-gradient-default bg-stripe-size"}},isIndeterminate:{true:{indicator:["absolute","w-full","origin-left","animate-indeterminate-bar"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-transform !duration-500"}}},defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{indicator:"!transition-none motion-reduce:transition-none"}},{color:"primary",isStriped:!0,class:{indicator:"bg-stripe-gradient-primary bg-stripe-size"}},{color:"secondary",isStriped:!0,class:{indicator:"bg-stripe-gradient-secondary bg-stripe-size"}},{color:"success",isStriped:!0,class:{indicator:"bg-stripe-gradient-success bg-stripe-size"}},{color:"warning",isStriped:!0,class:{indicator:"bg-stripe-gradient-warning bg-stripe-size"}},{color:"danger",isStriped:!0,class:{indicator:"bg-stripe-gradient-danger bg-stripe-size"}}]},{twMerge:!0});var gk=Zn({slots:{base:"flex flex-col justify-center gap-1 max-w-fit items-center",label:"",svgWrapper:"relative block",svg:"z-0 relative overflow-hidden",track:"h-full stroke-default-300/50",indicator:"h-full stroke-current",value:"absolute font-normal inset-0 flex items-center justify-center"},variants:{color:{default:{svg:"text-default-400"},primary:{svg:"text-primary"},secondary:{svg:"text-secondary"},success:{svg:"text-success"},warning:{svg:"text-warning"},danger:{svg:"text-danger"}},size:{sm:{svg:"w-8 h-8",label:"text-small",value:"text-[0.5rem]"},md:{svg:"w-10 h-10",label:"text-small",value:"text-[0.55rem]"},lg:{svg:"w-12 h-12",label:"text-medium",value:"text-[0.6rem]"}},isIndeterminate:{true:{svg:"animate-spinner-ease-spin"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-all !duration-500"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{svg:"!transition-none motion-reduce:transition-none"}}]}),AO=["data-[top-scroll=true]:[mask-image:linear-gradient(0deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[bottom-scroll=true]:[mask-image:linear-gradient(180deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[top-bottom-scroll=true]:[mask-image:linear-gradient(#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],RO=["data-[left-scroll=true]:[mask-image:linear-gradient(270deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[right-scroll=true]:[mask-image:linear-gradient(90deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[left-right-scroll=true]:[mask-image:linear-gradient(to_right,#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],vk=Zn({base:[],variants:{orientation:{vertical:["overflow-y-auto",...AO],horizontal:["overflow-x-auto",...RO]},hideScrollBar:{true:"scrollbar-hide",false:""}},defaultVariants:{orientation:"vertical",hideScrollBar:!1}}),yk=Zn({slots:{base:["group","relative","overflow-hidden","bg-content3 dark:bg-content2","pointer-events-none","before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2","data-[loaded=true]:pointer-events-auto","data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent","data-[loaded=true]:before:opacity-0 data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0"],content:["opacity-0","group-data-[loaded=true]:opacity-100"]},variants:{disableAnimation:{true:{base:"before:animate-none before:transition-none after:transition-none",content:"transition-none"},false:{base:"transition-background !duration-300",content:"transition-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{}}),bk=Zn({slots:{base:"group flex flex-col data-[hidden=true]:hidden",label:["absolute","z-10","pointer-events-none","origin-top-left","shrink-0","rtl:origin-top-right","subpixel-antialiased","block","text-small","text-foreground-500"],mainWrapper:"h-full",inputWrapper:"relative w-full inline-flex tap-highlight-transparent flex-row items-center shadow-xs px-3 gap-3",innerWrapper:"inline-flex w-full items-center h-full box-border",input:["w-full font-normal bg-transparent !outline-hidden placeholder:text-foreground-500 focus-visible:outline-hidden","data-[has-start-content=true]:ps-1.5","data-[has-end-content=true]:pe-1.5","data-[type=color]:rounded-none","file:cursor-pointer file:bg-transparent file:border-0","autofill:bg-transparent bg-clip-text"],clearButton:["p-2","-m-2","z-10","absolute","end-3","start-auto","pointer-events-none","appearance-none","outline-hidden","select-none","opacity-0","cursor-pointer","active:!opacity-70","rounded-full",...wh],helperWrapper:"hidden group-data-[has-helper=true]:flex p-1 relative flex-col gap-1.5",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{inputWrapper:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"]},faded:{inputWrapper:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 focus-within:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground"},bordered:{inputWrapper:["border-medium","border-default-200","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground"]},underlined:{inputWrapper:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","group-data-[focus=true]:after:w-full"],innerWrapper:"pb-1",label:"group-data-[filled-within=true]:text-foreground"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{label:"text-tiny",inputWrapper:"h-8 min-h-8 px-2 rounded-small",input:"text-small",clearButton:"text-medium"},md:{inputWrapper:"h-10 min-h-10 rounded-medium",input:"text-small",clearButton:"text-large hover:!opacity-100"},lg:{label:"text-medium",inputWrapper:"h-12 min-h-12 rounded-large",input:"text-medium",clearButton:"text-large hover:!opacity-100"}},radius:{none:{inputWrapper:"rounded-none"},sm:{inputWrapper:"rounded-small"},md:{inputWrapper:"rounded-medium"},lg:{inputWrapper:"rounded-large"},full:{inputWrapper:"rounded-full"}},labelPlacement:{outside:{mainWrapper:"flex flex-col"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:items-start",inputWrapper:"flex-1",mainWrapper:"flex flex-col",label:"relative text-foreground pe-2 ps-2 pointer-events-auto"},"outside-top":{mainWrapper:"flex flex-col",label:"relative text-foreground pb-2 pointer-events-auto"},inside:{label:"cursor-text",inputWrapper:"flex-col items-start justify-center gap-0",innerWrapper:"group-data-[has-label=true]:items-end"}},fullWidth:{true:{base:"w-full"},false:{}},isClearable:{true:{input:"peer pe-6 input-search-cancel-button-none",clearButton:["peer-data-[filled=true]:pointer-events-auto","peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block","peer-data-[filled=true]:scale-100"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",inputWrapper:"pointer-events-none",label:"pointer-events-none"}},isInvalid:{true:{label:"!text-danger",input:"!placeholder:text-danger !text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ms-0.5"}},isMultiline:{true:{label:"relative",inputWrapper:"!h-auto",innerWrapper:"items-start group-data-[has-label=true]:items-start",input:"resize-none data-[hide-scroll=true]:scrollbar-hide",clearButton:"absolute top-2 right-2 rtl:right-auto rtl:left-2 z-10"}},disableAnimation:{true:{input:"transition-none",inputWrapper:"transition-none",label:"transition-none"},false:{inputWrapper:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","!duration-200","!ease-out","motion-reduce:transition-none","transition-[transform,color,left,opacity,translate,scale]"],clearButton:["scale-90","ease-out","duration-150","transition-[opacity,transform]","motion-reduce:transition-none","motion-reduce:scale-100"]}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,isDisabled:!1,isMultiline:!1},compoundVariants:[{variant:"flat",color:"default",class:{input:"group-data-[has-value=true]:text-default-foreground"}},{variant:"flat",color:"primary",class:{inputWrapper:["bg-primary-100","data-[hover=true]:bg-primary-50","text-primary","group-data-[focus=true]:bg-primary-50","placeholder:text-primary"],input:"placeholder:text-primary",label:"text-primary"}},{variant:"flat",color:"secondary",class:{inputWrapper:["bg-secondary-100","text-secondary","data-[hover=true]:bg-secondary-50","group-data-[focus=true]:bg-secondary-50","placeholder:text-secondary"],input:"placeholder:text-secondary",label:"text-secondary"}},{variant:"flat",color:"success",class:{inputWrapper:["bg-success-100","text-success-600","dark:text-success","placeholder:text-success-600","dark:placeholder:text-success","data-[hover=true]:bg-success-50","group-data-[focus=true]:bg-success-50"],input:"placeholder:text-success-600 dark:placeholder:text-success",label:"text-success-600 dark:text-success"}},{variant:"flat",color:"warning",class:{inputWrapper:["bg-warning-100","text-warning-600","dark:text-warning","placeholder:text-warning-600","dark:placeholder:text-warning","data-[hover=true]:bg-warning-50","group-data-[focus=true]:bg-warning-50"],input:"placeholder:text-warning-600 dark:placeholder:text-warning",label:"text-warning-600 dark:text-warning"}},{variant:"flat",color:"danger",class:{inputWrapper:["bg-danger-100","text-danger","dark:text-danger-500","placeholder:text-danger","dark:placeholder:text-danger-500","data-[hover=true]:bg-danger-50","group-data-[focus=true]:bg-danger-50"],input:"placeholder:text-danger dark:placeholder:text-danger-500",label:"text-danger dark:text-danger-500"}},{variant:"faded",color:"primary",class:{label:"text-primary",inputWrapper:"data-[hover=true]:border-primary focus-within:border-primary"}},{variant:"faded",color:"secondary",class:{label:"text-secondary",inputWrapper:"data-[hover=true]:border-secondary focus-within:border-secondary"}},{variant:"faded",color:"success",class:{label:"text-success",inputWrapper:"data-[hover=true]:border-success focus-within:border-success"}},{variant:"faded",color:"warning",class:{label:"text-warning",inputWrapper:"data-[hover=true]:border-warning focus-within:border-warning"}},{variant:"faded",color:"danger",class:{label:"text-danger",inputWrapper:"data-[hover=true]:border-danger focus-within:border-danger"}},{variant:"underlined",color:"default",class:{input:"group-data-[has-value=true]:text-foreground"}},{variant:"underlined",color:"primary",class:{inputWrapper:"after:bg-primary",label:"text-primary"}},{variant:"underlined",color:"secondary",class:{inputWrapper:"after:bg-secondary",label:"text-secondary"}},{variant:"underlined",color:"success",class:{inputWrapper:"after:bg-success",label:"text-success"}},{variant:"underlined",color:"warning",class:{inputWrapper:"after:bg-warning",label:"text-warning"}},{variant:"underlined",color:"danger",class:{inputWrapper:"after:bg-danger",label:"text-danger"}},{variant:"bordered",color:"primary",class:{inputWrapper:"group-data-[focus=true]:border-primary",label:"text-primary"}},{variant:"bordered",color:"secondary",class:{inputWrapper:"group-data-[focus=true]:border-secondary",label:"text-secondary"}},{variant:"bordered",color:"success",class:{inputWrapper:"group-data-[focus=true]:border-success",label:"text-success"}},{variant:"bordered",color:"warning",class:{inputWrapper:"group-data-[focus=true]:border-warning",label:"text-warning"}},{variant:"bordered",color:"danger",class:{inputWrapper:"group-data-[focus=true]:border-danger",label:"text-danger"}},{labelPlacement:"inside",color:"default",class:{label:"group-data-[filled-within=true]:text-default-600"}},{labelPlacement:"outside",color:"default",class:{label:"group-data-[filled-within=true]:text-foreground"}},{radius:"full",size:["sm"],class:{inputWrapper:"px-3"}},{radius:"full",size:"md",class:{inputWrapper:"px-4"}},{radius:"full",size:"lg",class:{inputWrapper:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{inputWrapper:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{inputWrapper:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{inputWrapper:[...L_]}},{isInvalid:!0,variant:"flat",class:{inputWrapper:["!bg-danger-50","data-[hover=true]:!bg-danger-100","group-data-[focus=true]:!bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{inputWrapper:"!border-danger group-data-[focus=true]:!border-danger"}},{isInvalid:!0,variant:"underlined",class:{inputWrapper:"after:!bg-danger"}},{labelPlacement:"inside",size:"sm",class:{inputWrapper:"h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{inputWrapper:"h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{inputWrapper:"h-16 py-2.5 gap-0"}},{labelPlacement:"inside",size:"sm",variant:["bordered","faded"],class:{inputWrapper:"py-1"}},{labelPlacement:["inside","outside"],class:{label:["group-data-[filled-within=true]:pointer-events-auto"]}},{labelPlacement:"outside",isMultiline:!1,class:{base:"relative justify-end",label:["pb-0","z-20","top-1/2","-translate-y-1/2","group-data-[filled-within=true]:start-0"]}},{labelPlacement:["inside"],class:{label:["group-data-[filled-within=true]:scale-85"]}},{labelPlacement:["inside"],variant:"flat",class:{innerWrapper:"pb-0.5"}},{variant:"underlined",size:"sm",class:{innerWrapper:"pb-1"}},{variant:"underlined",size:["md","lg"],class:{innerWrapper:"pb-1.5"}},{labelPlacement:"inside",size:["sm","md"],class:{label:"text-small"}},{labelPlacement:"inside",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]"]}},{labelPlacement:"inside",variant:"underlined",size:"lg",isMultiline:!1,class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]"]}},{labelPlacement:"outside",size:"sm",isMultiline:!1,class:{label:["start-2","text-tiny","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-tiny)/2_+_16px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]"}},{labelPlacement:"outside",size:"md",isMultiline:!1,class:{label:["start-3","end-auto","text-small","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]"}},{labelPlacement:"outside",size:"lg",isMultiline:!1,class:{label:["start-3","end-auto","text-medium","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]"}},{labelPlacement:"outside-left",size:"sm",class:{label:"group-data-[has-helper=true]:pt-2"}},{labelPlacement:"outside-left",size:"md",class:{label:"group-data-[has-helper=true]:pt-3"}},{labelPlacement:"outside-left",size:"lg",class:{label:"group-data-[has-helper=true]:pt-4"}},{labelPlacement:["outside","outside-left"],isMultiline:!0,class:{inputWrapper:"py-2"}},{labelPlacement:"outside",isMultiline:!0,class:{label:"pb-1.5"}},{labelPlacement:"inside",isMultiline:!0,class:{label:"pb-0.5",input:"pt-0"}},{isMultiline:!0,disableAnimation:!1,class:{input:"transition-height !duration-100 motion-reduce:transition-none"}},{labelPlacement:["inside","outside"],class:{label:["pe-2","max-w-full","text-ellipsis","overflow-hidden"]}},{isMultiline:!0,radius:"full",class:{inputWrapper:"data-[has-multiple-rows=true]:rounded-large"}},{isClearable:!0,isMultiline:!0,class:{clearButton:["group-data-[has-value=true]:opacity-70 group-data-[has-value=true]:block","group-data-[has-value=true]:scale-100","group-data-[has-value=true]:pointer-events-auto"]}}]}),xk=Zn({slots:{wrapper:["flex","w-screen","h-[100dvh]","fixed","inset-0","z-50","overflow-x-auto","justify-center","h-[--visual-viewport-height]"],base:["flex","flex-col","relative","bg-white","z-50","w-full","box-border","bg-content1","outline-hidden","mx-1","my-1","sm:mx-6","sm:my-16"],backdrop:"z-50",header:"flex py-4 px-6 flex-initial text-large font-semibold",body:"flex flex-1 flex-col gap-3 px-6 py-2",footer:"flex flex-row gap-2 px-6 py-4 justify-end",closeButton:["absolute","appearance-none","outline-hidden","select-none","top-1","end-1","p-2","text-foreground-500","rounded-full","hover:bg-default-100","active:bg-default-200","tap-highlight-transparent",...wh]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},placement:{auto:{wrapper:"items-end sm:items-center"},center:{wrapper:"items-center sm:items-center"},top:{wrapper:"items-start sm:items-start"},"top-center":{wrapper:"items-start sm:items-center"},bottom:{wrapper:"items-end sm:items-end"},"bottom-center":{wrapper:"items-end sm:items-center"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"hidden"},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-md backdrop-saturate-150 bg-overlay/30"}},scrollBehavior:{normal:{base:"overflow-y-hidden"},inside:{base:"max-h-[calc(100%_-_8rem)]",body:"overflow-y-auto"},outside:{wrapper:"items-start sm:items-start overflow-y-auto",base:"my-16"}},disableAnimation:{false:{wrapper:["[--scale-enter:100%]","[--scale-exit:100%]","[--slide-enter:0px]","[--slide-exit:80px]","sm:[--scale-enter:100%]","sm:[--scale-exit:103%]","sm:[--slide-enter:0px]","sm:[--slide-exit:0px]"]}}},defaultVariants:{size:"md",radius:"lg",shadow:"sm",placement:"auto",backdrop:"opaque",scrollBehavior:"normal"},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"w-screen h-screen fixed inset-0"}}]}),LO=Zn({base:"shrink-0 bg-divider border-none",variants:{orientation:{horizontal:"w-full h-divider",vertical:"h-full w-divider"}},defaultVariants:{orientation:"horizontal"}}),MO=Zn({base:"flex flex-col gap-2 items-start"}),wk=Zn({slots:{wrapper:"relative shadow-black/5",zoomedWrapper:"relative overflow-hidden rounded-inherit",img:"relative z-10 opacity-0 shadow-black/5 data-[loaded=true]:opacity-100",blurredImg:["absolute","z-0","inset-0","w-full","h-full","object-cover","filter","blur-lg","scale-105","saturate-150","opacity-30","translate-y-1"]},variants:{radius:{none:{},sm:{},md:{},lg:{},full:{}},shadow:{none:{wrapper:"shadow-none",img:"shadow-none"},sm:{wrapper:"shadow-small",img:"shadow-small"},md:{wrapper:"shadow-medium",img:"shadow-medium"},lg:{wrapper:"shadow-large",img:"shadow-large"}},isZoomed:{true:{img:["object-cover","transform","hover:scale-125"]}},showSkeleton:{true:{wrapper:["group","relative","overflow-hidden","bg-content3 dark:bg-content2"],img:"opacity-0"}},disableAnimation:{true:{img:"transition-none"},false:{img:"transition-transform-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{radius:"lg",shadow:"none",isZoomed:!1,isBlurred:!1,showSkeleton:!1},compoundVariants:[{showSkeleton:!0,disableAnimation:!1,class:{wrapper:["before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2"]}}],compoundSlots:[{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"none",class:"rounded-none"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"full",class:"rounded-full"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"sm",class:"rounded-small"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"md",class:"rounded-md"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"lg",class:"rounded-large"}]}),DO=Zn({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-hidden","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","transform-gpu data-[pressed=true]:scale-[0.97]","cursor-pointer",...wh],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none data-[pressed=true]:scale-100",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:Te.solid.default},{variant:"solid",color:"primary",class:Te.solid.primary},{variant:"solid",color:"secondary",class:Te.solid.secondary},{variant:"solid",color:"success",class:Te.solid.success},{variant:"solid",color:"warning",class:Te.solid.warning},{variant:"solid",color:"danger",class:Te.solid.danger},{variant:"shadow",color:"default",class:Te.shadow.default},{variant:"shadow",color:"primary",class:Te.shadow.primary},{variant:"shadow",color:"secondary",class:Te.shadow.secondary},{variant:"shadow",color:"success",class:Te.shadow.success},{variant:"shadow",color:"warning",class:Te.shadow.warning},{variant:"shadow",color:"danger",class:Te.shadow.danger},{variant:"bordered",color:"default",class:Te.bordered.default},{variant:"bordered",color:"primary",class:Te.bordered.primary},{variant:"bordered",color:"secondary",class:Te.bordered.secondary},{variant:"bordered",color:"success",class:Te.bordered.success},{variant:"bordered",color:"warning",class:Te.bordered.warning},{variant:"bordered",color:"danger",class:Te.bordered.danger},{variant:"flat",color:"default",class:Te.flat.default},{variant:"flat",color:"primary",class:Te.flat.primary},{variant:"flat",color:"secondary",class:Te.flat.secondary},{variant:"flat",color:"success",class:Te.flat.success},{variant:"flat",color:"warning",class:Te.flat.warning},{variant:"flat",color:"danger",class:Te.flat.danger},{variant:"faded",color:"default",class:Te.faded.default},{variant:"faded",color:"primary",class:Te.faded.primary},{variant:"faded",color:"secondary",class:Te.faded.secondary},{variant:"faded",color:"success",class:Te.faded.success},{variant:"faded",color:"warning",class:Te.faded.warning},{variant:"faded",color:"danger",class:Te.faded.danger},{variant:"light",color:"default",class:[Te.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[Te.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[Te.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[Te.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[Te.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[Te.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:[Te.ghost.default,"data-[hover=true]:!bg-default"]},{variant:"ghost",color:"primary",class:[Te.ghost.primary,"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]},{variant:"ghost",color:"secondary",class:[Te.ghost.secondary,"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]},{variant:"ghost",color:"success",class:[Te.ghost.success,"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]},{variant:"ghost",color:"warning",class:[Te.ghost.warning,"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]},{variant:"ghost",color:"danger",class:[Te.ghost.danger,"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:af.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:af.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:af.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:af.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:af.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:af.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]});Zn({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var NO=Zn({slots:{base:"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none",wrapper:["relative","inline-flex","items-center","justify-center","shrink-0","overflow-hidden","before:content-['']","before:absolute","before:inset-0","before:border-solid","before:border-2","before:box-border","before:border-default","after:content-['']","after:absolute","after:inset-0","after:scale-50","after:opacity-0","after:origin-center","group-data-[selected=true]:after:scale-100","group-data-[selected=true]:after:opacity-100","group-data-[hover=true]:before:bg-default-100",...L_],hiddenInput:$O,icon:"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none",label:"relative text-foreground select-none"},variants:{color:{default:{wrapper:"after:bg-default after:text-default-foreground text-default-foreground"},primary:{wrapper:"after:bg-primary after:text-primary-foreground text-primary-foreground"},secondary:{wrapper:"after:bg-secondary after:text-secondary-foreground text-secondary-foreground"},success:{wrapper:"after:bg-success after:text-success-foreground text-success-foreground"},warning:{wrapper:"after:bg-warning after:text-warning-foreground text-warning-foreground"},danger:{wrapper:"after:bg-danger after:text-danger-foreground text-danger-foreground"}},size:{sm:{wrapper:["w-4 h-4 me-2","rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"],label:"text-small",icon:"w-3 h-2"},md:{wrapper:["w-5 h-5 me-2","rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"],label:"text-medium",icon:"w-4 h-3"},lg:{wrapper:["w-6 h-6 me-2","rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"],label:"text-large",icon:"w-5 h-4"}},radius:{none:{wrapper:"rounded-none before:rounded-none after:rounded-none"},sm:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"]},md:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"]},lg:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"]},full:{wrapper:"rounded-full before:rounded-full after:rounded-full"}},lineThrough:{true:{label:["inline-flex","items-center","justify-center","before:content-['']","before:absolute","before:bg-foreground","before:w-0","before:h-0.5","group-data-[selected=true]:opacity-60","group-data-[selected=true]:before:w-full"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isInvalid:{true:{wrapper:"before:border-danger",label:"text-danger"}},disableAnimation:{true:{wrapper:"transition-none",icon:"transition-none",label:"transition-none"},false:{wrapper:["before:transition-colors","group-data-[pressed=true]:scale-95","transition-transform","after:transition-transform-opacity","after:!ease-linear","after:!duration-200","motion-reduce:transition-none"],icon:"transition-opacity motion-reduce:transition-none",label:"transition-colors-opacity before:transition-width motion-reduce:transition-none"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1,lineThrough:!1}});Zn({slots:{base:"relative flex flex-col gap-2",label:"relative text-medium text-foreground-500",wrapper:"flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row",description:"text-small text-foreground-400",errorMessage:"text-small text-danger"},variants:{isRequired:{true:{label:"after:content-['*'] after:text-danger after:ml-0.5"}},isInvalid:{true:{description:"text-danger"}},disableAnimation:{true:{},false:{description:"transition-colors !duration-150 motion-reduce:transition-none"}}},defaultVariants:{isInvalid:!1,isRequired:!1}});var Sk=Zn({slots:{base:["relative","max-w-fit","min-w-min","inline-flex","items-center","justify-between","box-border","whitespace-nowrap"],content:"flex-1 text-inherit font-normal",dot:["w-2","h-2","ml-1","rounded-full"],avatar:"shrink-0",closeButton:["z-10","appearance-none","outline-hidden","select-none","transition-opacity","opacity-70","hover:opacity-100","cursor-pointer","active:opacity-disabled","tap-highlight-transparent"]},variants:{variant:{solid:{},bordered:{base:"border-medium bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-medium"},shadow:{},dot:{base:"border-medium border-default text-foreground bg-transparent"}},color:{default:{dot:"bg-default-400"},primary:{dot:"bg-primary"},secondary:{dot:"bg-secondary"},success:{dot:"bg-success"},warning:{dot:"bg-warning"},danger:{dot:"bg-danger"}},size:{sm:{base:"px-1 h-6 text-tiny",content:"px-1",closeButton:"text-medium",avatar:"w-4 h-4"},md:{base:"px-1 h-7 text-small",content:"px-2",closeButton:"text-large",avatar:"w-5 h-5"},lg:{base:"px-2 h-8 text-medium",content:"px-2",closeButton:"text-xl",avatar:"w-6 h-6"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isOneChar:{true:{},false:{}},isCloseable:{true:{},false:{}},hasStartContent:{true:{}},hasEndContent:{true:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isCloseButtonFocusVisible:{true:{closeButton:[...IO,"ring-1","rounded-full"]}}},defaultVariants:{variant:"solid",color:"default",size:"md",radius:"full",isDisabled:!1},compoundVariants:[{variant:"solid",color:"default",class:{base:Te.solid.default}},{variant:"solid",color:"primary",class:{base:Te.solid.primary}},{variant:"solid",color:"secondary",class:{base:Te.solid.secondary}},{variant:"solid",color:"success",class:{base:Te.solid.success}},{variant:"solid",color:"warning",class:{base:Te.solid.warning}},{variant:"solid",color:"danger",class:{base:Te.solid.danger}},{variant:"shadow",color:"default",class:{base:Te.shadow.default}},{variant:"shadow",color:"primary",class:{base:Te.shadow.primary}},{variant:"shadow",color:"secondary",class:{base:Te.shadow.secondary}},{variant:"shadow",color:"success",class:{base:Te.shadow.success}},{variant:"shadow",color:"warning",class:{base:Te.shadow.warning}},{variant:"shadow",color:"danger",class:{base:Te.shadow.danger}},{variant:"bordered",color:"default",class:{base:Te.bordered.default}},{variant:"bordered",color:"primary",class:{base:Te.bordered.primary}},{variant:"bordered",color:"secondary",class:{base:Te.bordered.secondary}},{variant:"bordered",color:"success",class:{base:Te.bordered.success}},{variant:"bordered",color:"warning",class:{base:Te.bordered.warning}},{variant:"bordered",color:"danger",class:{base:Te.bordered.danger}},{variant:"flat",color:"default",class:{base:Te.flat.default}},{variant:"flat",color:"primary",class:{base:Te.flat.primary}},{variant:"flat",color:"secondary",class:{base:Te.flat.secondary}},{variant:"flat",color:"success",class:{base:Te.flat.success}},{variant:"flat",color:"warning",class:{base:Te.flat.warning}},{variant:"flat",color:"danger",class:{base:Te.flat.danger}},{variant:"faded",color:"default",class:{base:Te.faded.default}},{variant:"faded",color:"primary",class:{base:Te.faded.primary}},{variant:"faded",color:"secondary",class:{base:Te.faded.secondary}},{variant:"faded",color:"success",class:{base:Te.faded.success}},{variant:"faded",color:"warning",class:{base:Te.faded.warning}},{variant:"faded",color:"danger",class:{base:Te.faded.danger}},{variant:"light",color:"default",class:{base:Te.light.default}},{variant:"light",color:"primary",class:{base:Te.light.primary}},{variant:"light",color:"secondary",class:{base:Te.light.secondary}},{variant:"light",color:"success",class:{base:Te.light.success}},{variant:"light",color:"warning",class:{base:Te.light.warning}},{variant:"light",color:"danger",class:{base:Te.light.danger}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"sm",class:{base:"w-5 h-5 min-w-5 min-h-5"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"md",class:{base:"w-6 h-6 min-w-6 min-h-6"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"lg",class:{base:"w-7 h-7 min-w-7 min-h-7"}},{isOneChar:!0,isCloseable:!1,hasStartContent:!1,hasEndContent:!1,class:{base:"px-0 justify-center",content:"px-0 flex-none"}},{isOneChar:!0,isCloseable:!0,hasStartContent:!1,hasEndContent:!1,class:{base:"w-auto"}},{isOneChar:!0,variant:"dot",class:{base:"w-auto h-7 px-1 items-center",content:"px-2"}},{hasStartContent:!0,size:"sm",class:{content:"pl-0.5"}},{hasStartContent:!0,size:["md","lg"],class:{content:"pl-1"}},{hasEndContent:!0,size:"sm",class:{content:"pr-0.5"}},{hasEndContent:!0,size:["md","lg"],class:{content:"pr-1"}}]}),FO=Zn({base:"px-2",variants:{variant:{light:"",shadow:"px-4 shadow-medium rounded-medium bg-content1",bordered:"px-4 border-medium border-divider rounded-medium",splitted:"flex flex-col gap-2"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"light",fullWidth:!0}}),OO=Zn({slots:{base:"",heading:"",trigger:["flex py-4 w-full h-full gap-3 outline-hidden items-center tap-highlight-transparent",...wh],startContent:"shrink-0",indicator:"text-default-400",titleWrapper:"flex-1 flex flex-col text-start",title:"text-foreground text-medium",subtitle:"text-small text-foreground-500 font-normal",content:"py-2"},variants:{variant:{splitted:{base:"px-4 bg-content1 shadow-medium rounded-medium"}},isCompact:{true:{trigger:"py-2",title:"text-medium",subtitle:"text-small",indicator:"text-medium",content:"py-1"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},hideIndicator:{true:{indicator:"hidden"}},disableAnimation:{true:{content:"hidden data-[open=true]:block"},false:{indicator:"transition-transform",trigger:"transition-opacity"}},disableIndicatorAnimation:{true:{indicator:"transition-none"},false:{indicator:"rotate-0 data-[open=true]:-rotate-90 rtl:-rotate-180 rtl:data-[open=true]:-rotate-90"}}},defaultVariants:{size:"md",radius:"lg",isDisabled:!1,hideIndicator:!1,disableIndicatorAnimation:!1}});function M_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=M_(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function zO(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=M_(e))&&(r&&(r+=" "),r+=t);return r}var jO=A_({extend:kb});function yn(...e){return jO(zO(e))}const BO="modulepreload",VO=function(e){return"/"+e},kk={},io=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=a?.nonce||a?.getAttribute("nonce");i=d(n.map(h=>{if(h=VO(h),h in kk)return;kk[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":BO,m||(b.as="script"),b.crossOrigin="",b.href=h,c&&b.setAttribute("nonce",c),document.head.appendChild(b),m)return new Promise((x,k)=>{b.addEventListener("load",x),b.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return i.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};function UO(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button"}=e,T;n==="button"?T={type:P,disabled:r}:T={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:_,isPressed:A}=il({onPressStart:s,onPressEnd:a,onPressChange:d,onPress:i,onPressUp:c,onClick:g,isDisabled:r,preventFocusOnPress:h,ref:t}),{focusableProps:L}=xh(e,t);m&&(L.tabIndex=r?-1:L.tabIndex);let O=Pn(L,_,$u(e,{labelable:!0}));return{isPressed:A,buttonProps:Pn(T,O,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}function KO(e,t,n){let{item:r,isDisabled:i}=e,s=r.key,a=t.selectionManager,c=S.useId(),d=S.useId(),h=t.disabledKeys.has(r.key)||i;S.useEffect(()=>{s===t.focusedKey&&document.activeElement!==n.current&&n.current&&Cu(n.current)},[n,s,t.focusedKey]);let m=S.useCallback(P=>{a.canSelectItem(s)&&(a.select(s,P),t.toggleKey(s))},[s,a]);const g=S.useCallback(P=>{a.selectionBehavior==="replace"&&a.extendSelection(P),a.setFocusedKey(P)},[a]),b=S.useCallback(P=>{const _={ArrowDown:()=>{const A=t.collection.getKeyAfter(s);if(A&&t.disabledKeys.has(A)){const L=t.collection.getKeyAfter(A);L&&g(L)}else A&&g(A)},ArrowUp:()=>{const A=t.collection.getKeyBefore(s);if(A&&t.disabledKeys.has(A)){const L=t.collection.getKeyBefore(A);L&&g(L)}else A&&g(A)},Home:()=>{const A=t.collection.getFirstKey();A&&g(A)},End:()=>{const A=t.collection.getLastKey();A&&g(A)}}[P.key];_&&(P.preventDefault(),a.canSelectItem(s)&&_(P))},[s,a]);let{buttonProps:x}=UO({id:c,elementType:"button",isDisabled:h,onKeyDown:b,onPress:m},n),k=t.selectionManager.isSelected(r.key);return{buttonProps:{...x,"aria-expanded":k,"aria-controls":k?d:void 0},regionProps:{id:d,role:"region","aria-labelledby":c}}}function Ck(e){return hM()?e.altKey:e.ctrlKey}function Mg(e,t){var n,r;let i=`[data-key="${CSS.escape(String(t))}"]`,s=(n=e.current)===null||n===void 0?void 0:n.dataset.collection;return s&&(i=`[data-collection="${CSS.escape(s)}"]${i}`),(r=e.current)===null||r===void 0?void 0:r.querySelector(i)}const D_=new WeakMap;function WO(e){let t=Pf();return D_.set(e,t),t}function qG(e){return D_.get(e)}const HO=1e3;function GO(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=S.useRef({search:"",timeout:void 0}).current,s=a=>{let c=qO(a.key);if(!(!c||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(c===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=c,t.getKeyForSearch!=null){let d=t.getKeyForSearch(i.search,n.focusedKey);d==null&&(d=t.getKeyForSearch(i.search)),d!=null&&(n.setFocusedKey(d),r&&r(d))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},HO)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:void 0}}}function qO(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function YO(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:a=!1,disallowSelectAll:c=!1,escapeKeyBehavior:d="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:g,allowsTabNavigation:b=!1,isVirtualized:x,scrollRef:k=r,linkBehavior:P="action"}=e,{direction:T}=hh(),_=ux(),A=X=>{var V;if(X.altKey&&X.key==="Tab"&&X.preventDefault(),!(!((V=r.current)===null||V===void 0)&&V.contains(X.target)))return;const ae=(Ie,mt)=>{if(Ie!=null){if(t.isLink(Ie)&&P==="selection"&&h&&!Ck(X)){FE.flushSync(()=>{t.setFocusedKey(Ie,mt)});let pt=Mg(r,Ie),Ut=t.getItemProps(Ie);pt&&_.open(pt,X,Ut.href,Ut.routerOptions);return}if(t.setFocusedKey(Ie,mt),t.isLink(Ie)&&P==="override")return;X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&!Ck(X)&&t.replaceSelection(Ie)}};switch(X.key){case"ArrowDown":if(n.getKeyBelow){var M,U,oe;let Ie=t.focusedKey!=null?(M=n.getKeyBelow)===null||M===void 0?void 0:M.call(n,t.focusedKey):(U=n.getFirstKey)===null||U===void 0?void 0:U.call(n);Ie==null&&s&&(Ie=(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"ArrowUp":if(n.getKeyAbove){var z,me,Ce;let Ie=t.focusedKey!=null?(z=n.getKeyAbove)===null||z===void 0?void 0:z.call(n,t.focusedKey):(me=n.getLastKey)===null||me===void 0?void 0:me.call(n);Ie==null&&s&&(Ie=(Ce=n.getLastKey)===null||Ce===void 0?void 0:Ce.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"ArrowLeft":if(n.getKeyLeftOf){var ye,Oe,Ne;let Ie=t.focusedKey!=null?(ye=n.getKeyLeftOf)===null||ye===void 0?void 0:ye.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=T==="rtl"?(Oe=n.getFirstKey)===null||Oe===void 0?void 0:Oe.call(n,t.focusedKey):(Ne=n.getLastKey)===null||Ne===void 0?void 0:Ne.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie,T==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var _e,Qe,at;let Ie=t.focusedKey!=null?(_e=n.getKeyRightOf)===null||_e===void 0?void 0:_e.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=T==="rtl"?(Qe=n.getLastKey)===null||Qe===void 0?void 0:Qe.call(n,t.focusedKey):(at=n.getFirstKey)===null||at===void 0?void 0:at.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie,T==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&X.shiftKey)return;X.preventDefault();let Ie=n.getFirstKey(t.focusedKey,hp(X));t.setFocusedKey(Ie),Ie!=null&&(hp(X)&&X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&X.shiftKey)return;X.preventDefault();let Ie=n.getLastKey(t.focusedKey,hp(X));t.setFocusedKey(Ie),Ie!=null&&(hp(X)&&X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let Ie=n.getKeyPageBelow(t.focusedKey);Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let Ie=n.getKeyPageAbove(t.focusedKey);Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"a":hp(X)&&t.selectionMode==="multiple"&&c!==!0&&(X.preventDefault(),t.selectAll());break;case"Escape":d==="clearSelection"&&!a&&t.selectedKeys.size!==0&&(X.stopPropagation(),X.preventDefault(),t.clearSelection());break;case"Tab":if(!b){if(X.shiftKey)r.current.focus();else{let Ie=Js(r.current,{tabbable:!0}),mt,pt;do pt=Ie.lastChild(),pt&&(mt=pt);while(pt);mt&&!mt.contains(document.activeElement)&&tl(mt)}break}}},L=S.useRef({top:0,left:0});lg(k,"scroll",x?void 0:()=>{var X,V,ae,M;L.current={top:(ae=(X=k.current)===null||X===void 0?void 0:X.scrollTop)!==null&&ae!==void 0?ae:0,left:(M=(V=k.current)===null||V===void 0?void 0:V.scrollLeft)!==null&&M!==void 0?M:0}});let O=X=>{if(t.isFocused){X.currentTarget.contains(X.target)||t.setFocused(!1);return}if(X.currentTarget.contains(X.target)){if(t.setFocused(!0),t.focusedKey==null){var V,ae;let oe=me=>{me!=null&&(t.setFocusedKey(me),h&&!t.isSelected(me)&&t.replaceSelection(me))},z=X.relatedTarget;var M,U;z&&X.currentTarget.compareDocumentPosition(z)&Node.DOCUMENT_POSITION_FOLLOWING?oe((M=t.lastSelectedKey)!==null&&M!==void 0?M:(V=n.getLastKey)===null||V===void 0?void 0:V.call(n)):oe((U=t.firstSelectedKey)!==null&&U!==void 0?U:(ae=n.getFirstKey)===null||ae===void 0?void 0:ae.call(n))}else!x&&k.current&&(k.current.scrollTop=L.current.top,k.current.scrollLeft=L.current.left);if(t.focusedKey!=null&&k.current){let oe=Mg(r,t.focusedKey);oe instanceof HTMLElement&&(!oe.contains(document.activeElement)&&!g&&tl(oe),oh()==="keyboard"&&E1(oe,{containingElement:r.current}))}}},j=X=>{X.currentTarget.contains(X.relatedTarget)||t.setFocused(!1)},$=S.useRef(!1);lg(r,CM,g?X=>{let{detail:V}=X;X.stopPropagation(),t.setFocused(!0),V?.focusStrategy==="first"&&($.current=!0)}:void 0);let Y=jn(()=>{var X,V;let ae=(V=(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n))!==null&&V!==void 0?V:null;ae==null?(aF(r.current),t.collection.size>0&&($.current=!1)):(t.setFocusedKey(ae),$.current=!1)});S1(()=>{$.current&&Y()},[t.collection,Y]);let te=jn(()=>{t.collection.size>0&&($.current=!1)});S1(()=>{te()},[t.focusedKey,te]),lg(r,kM,g?X=>{var V;X.stopPropagation(),t.setFocused(!1),!((V=X.detail)===null||V===void 0)&&V.clearFocusKey&&t.setFocusedKey(null)}:void 0);const ie=S.useRef(i),B=S.useRef(!1);S.useEffect(()=>{if(ie.current){var X,V;let U=null;var ae;i==="first"&&(U=(ae=(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n))!==null&&ae!==void 0?ae:null);var M;i==="last"&&(U=(M=(V=n.getLastKey)===null||V===void 0?void 0:V.call(n))!==null&&M!==void 0?M:null);let oe=t.selectedKeys;if(oe.size){for(let z of oe)if(t.canSelectItem(z)){U=z;break}}t.setFocused(!0),t.setFocusedKey(U),U==null&&!g&&r.current&&Cu(r.current),t.collection.size>0&&(ie.current=!1,B.current=!0)}});let W=S.useRef(t.focusedKey),G=S.useRef(null);S.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==W.current||B.current)&&k.current&&r.current){let X=oh(),V=Mg(r,t.focusedKey);if(!(V instanceof HTMLElement))return;(X==="keyboard"||B.current)&&(G.current&&cancelAnimationFrame(G.current),G.current=requestAnimationFrame(()=>{k.current&&(ME(k.current,V),X!=="virtual"&&E1(V,{containingElement:r.current}))}))}!g&&t.isFocused&&t.focusedKey==null&&W.current!=null&&r.current&&Cu(r.current),W.current=t.focusedKey,B.current=!1}),S.useEffect(()=>()=>{G.current&&cancelAnimationFrame(G.current)},[]),lg(r,"react-aria-focus-scope-restore",X=>{X.preventDefault(),t.setFocused(!0)});let ee={onKeyDown:A,onFocus:O,onBlur:j,onMouseDown(X){k.current===X.target&&X.preventDefault()}},{typeSelectProps:H}=GO({keyboardDelegate:n,selectionManager:t});m||(ee=Pn(H,ee));let le;g||(le=t.focusedKey==null?0:-1);let J=WO(t.collection);return{collectionProps:Pn(ee,{tabIndex:le,"data-collection":J})}}class Ek{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?Mg(this.ref,t):null;if(!r)return null;let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();return{x:s.left-i.left+n.scrollLeft,y:s.top-i.top+n.scrollTop,width:s.width,height:s.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t?.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t?.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,i,s;return{x:(n=t?.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t?.scrollTop)!==null&&r!==void 0?r:0,width:(i=t?.offsetWidth)!==null&&i!==void 0?i:0,height:(s=t?.offsetHeight)!==null&&s!==void 0?s:0}}constructor(t){this.ref=t}}class XO{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if(i?.type==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let i=t,s=this.layoutDelegate.getItemRect(i);if(!s||i==null)return null;let a=s;do{if(i=n(i),i==null)break;s=this.layoutDelegate.getItemRect(i)}while(s&&r(a,s)&&i!=null);return i}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let s=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let s=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<s&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<s&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(t,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let s=r.getItem(i);if(!s)return null;let a=s.textValue.slice(0,t.length);if(s.textValue&&this.collator.compare(a,t)===0)return i;i=this.getNextKey(i)}return null}constructor(...t){if(t.length===1){let n=t[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new Ek(n.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new Ek(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function QO(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:s,layoutDelegate:a}=e,c=RM({usage:"search",sensitivity:"base"}),d=t.disabledBehavior,h=S.useMemo(()=>s||new XO({collection:n,disabledKeys:r,disabledBehavior:d,ref:i,collator:c,layoutDelegate:a}),[s,a,n,r,i,c,d]),{collectionProps:m}=YO({...e,ref:i,selectionManager:t,keyboardDelegate:h});return{listProps:m}}function JO(e,t,n){let{listProps:r}=QO({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:n});return delete r.onKeyDownCapture,{accordionProps:{...r,tabIndex:void 0}}}function ZO(e){var t,n;const r=ci(),{ref:i,as:s,item:a,onFocusChange:c}=e,{state:d,className:h,indicator:m,children:g,title:b,subtitle:x,startContent:k,motionProps:P,focusedKey:T,variant:_,isCompact:A=!1,classNames:L={},isDisabled:O=!1,hideIndicator:j=!1,disableAnimation:$=(t=r?.disableAnimation)!=null?t:!1,keepContentMounted:Y=!1,disableIndicatorAnimation:te=!1,HeadingComponent:ie=s||"h2",onPress:B,onPressStart:W,onPressEnd:G,onPressChange:ee,onPressUp:H,onClick:le,...J}=e,X=s||"div",V=typeof X=="string",ae=Ii(i),M=d.disabledKeys.has(a.key)||O,U=d.selectionManager.isSelected(a.key),{buttonProps:oe,regionProps:z}=KO({item:a,isDisabled:M},{...d,focusedKey:T},ae),{onFocus:me,onBlur:Ce,...ye}=oe,{isFocused:Oe,isFocusVisible:Ne,focusProps:_e}=Pu({autoFocus:(n=a.props)==null?void 0:n.autoFocus}),{isHovered:Qe,hoverProps:at}=Eu({isDisabled:M}),{pressProps:Ie,isPressed:mt}=il({ref:ae,isDisabled:M,onPress:B,onPressStart:W,onPressEnd:G,onPressChange:ee,onPressUp:H}),pt=S.useCallback(()=>{c?.(!0,a.key)},[]),Ut=S.useCallback(()=>{c?.(!1,a.key)},[]),Ue=S.useMemo(()=>({...L}),[ds(L)]),it=S.useMemo(()=>OO({isCompact:A,isDisabled:M,hideIndicator:j,disableAnimation:$,disableIndicatorAnimation:te,variant:_}),[A,M,j,$,te,_]),Kt=Bt(Ue?.base,h),er=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"base",className:it.base({class:Kt}),...nn(Ef(J,{enabled:V}),pe)}),[Kt,V,J,it,a.props,U,M]),an=(pe={})=>{var Se,ze;return{ref:ae,"data-open":Ae(U),"data-focus":Ae(Oe),"data-focus-visible":Ae(Ne),"data-disabled":Ae(M),"data-hover":Ae(Qe),"data-pressed":Ae(mt),"data-slot":"trigger",className:it.trigger({class:Ue?.trigger}),onFocus:d1(pt,me,_e.onFocus,J.onFocus,(Se=a.props)==null?void 0:Se.onFocus),onBlur:d1(Ut,Ce,_e.onBlur,J.onBlur,(ze=a.props)==null?void 0:ze.onBlur),...nn(ye,at,Ie,pe,{onClick:el(Ie.onClick,le)})}},_t=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"content",className:it.content({class:Ue?.content}),...nn(z,pe)}),[it,Ue,z,U,M,Ue?.content]),Rt=S.useCallback((pe={})=>({"aria-hidden":Ae(!0),"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"indicator",className:it.indicator({class:Ue?.indicator}),...pe}),[it,Ue?.indicator,U,M,Ue?.indicator]),Tn=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"heading",className:it.heading({class:Ue?.heading}),...pe}),[it,Ue?.heading,U,M,Ue?.heading]),Er=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"title",className:it.title({class:Ue?.title}),...pe}),[it,Ue?.title,U,M,Ue?.title]),Nt=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"subtitle",className:it.subtitle({class:Ue?.subtitle}),...pe}),[it,Ue,U,M,Ue?.subtitle]);return{Component:X,HeadingComponent:ie,item:a,slots:it,classNames:Ue,domRef:ae,indicator:m,children:g,title:b,subtitle:x,startContent:k,isOpen:U,isDisabled:M,hideIndicator:j,keepContentMounted:Y,disableAnimation:$,motionProps:P,getBaseProps:er,getHeadingProps:Tn,getButtonProps:an,getContentProps:_t,getIndicatorProps:Rt,getTitleProps:Er,getSubtitleProps:Nt}}var Pk=e=>D.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:D.jsx("path",{d:"M15.5 19l-7-7 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),N_=e=>D.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:D.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),e6=e=>{const{isSelected:t,isIndeterminate:n,disableAnimation:r,...i}=e;return D.jsx("svg",{"aria-hidden":"true",className:"fill-current",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",...i,children:D.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})},Bp={ease:[.36,.66,.4,1]},Zg={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:Bp.ease}},exit:{opacity:0,transition:{duration:.3,ease:Bp.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},Tk=()=>io(()=>import("./index-g-_fwkPj.js"),[]).then(e=>e.default),F_=jr((e,t)=>{const{Component:n,HeadingComponent:r,classNames:i,slots:s,indicator:a,children:c,title:d,subtitle:h,startContent:m,isOpen:g,isDisabled:b,hideIndicator:x,keepContentMounted:k,disableAnimation:P,motionProps:T,getBaseProps:_,getHeadingProps:A,getButtonProps:L,getTitleProps:O,getSubtitleProps:j,getContentProps:$,getIndicatorProps:Y}=ZO({...e,ref:t}),te=v5(),B=S.useMemo(()=>typeof a=="function"?a({indicator:D.jsx(Pk,{}),isOpen:g,isDisabled:b}):a||null,[a,g,b])||D.jsx(Pk,{}),W=S.useMemo(()=>{if(P)return k?D.jsx("div",{...$(),children:c}):g&&D.jsx("div",{...$(),children:c});const G={exit:{...Zg.collapse.exit,overflowY:"hidden"},enter:{...Zg.collapse.enter,overflowY:"unset"}};return k?D.jsx($f,{features:Tk,children:D.jsx(Af.section,{animate:g?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:te},variants:G,onKeyDown:ee=>{ee.stopPropagation()},...T,children:D.jsx("div",{...$(),children:c})},"accordion-content")}):D.jsx(ol,{initial:!1,children:g&&D.jsx($f,{features:Tk,children:D.jsx(Af.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:te},variants:G,onKeyDown:ee=>{ee.stopPropagation()},...T,children:D.jsx("div",{...$(),children:c})},"accordion-content")})})},[g,P,k,c,T]);return D.jsxs(n,{..._(),children:[D.jsx(r,{...A(),children:D.jsxs("button",{...L(),children:[m&&D.jsx("div",{className:s.startContent({class:i?.startContent}),children:m}),D.jsxs("div",{className:s.titleWrapper({class:i?.titleWrapper}),children:[d&&D.jsx("span",{...O(),children:d}),h&&D.jsx("span",{...j(),children:h})]}),!x&&B&&D.jsx("span",{...Y(),children:B})]})}),W]})});F_.displayName="HeroUI.AccordionItem";var t6=F_;class n6{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,n=n||new Set;let r=c=>{if(this.keyMap.set(c.key,c),c.childNodes&&(c.type==="section"||n.has(c.key)))for(let d of c.childNodes)r(d)};for(let c of t)r(c);let i=null,s=0;for(let[c,d]of this.keyMap)i?(i.nextKey=c,d.prevKey=i.key):(this.firstKey=c,d.prevKey=void 0),d.type==="item"&&(d.index=s++),i=d,i.nextKey=void 0;var a;this.lastKey=(a=i?.key)!==null&&a!==void 0?a:null}}class Po extends Set{constructor(t,n,r){super(t),t instanceof Po?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function r6(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function i6(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=e,a=S.useRef(!1),[,c]=S.useState(!1),d=S.useRef(null),h=S.useRef(null),[,m]=S.useState(null),g=S.useMemo(()=>_k(e.selectedKeys),[e.selectedKeys]),b=S.useMemo(()=>_k(e.defaultSelectedKeys,new Po),[e.defaultSelectedKeys]),[x,k]=Au(g,b,e.onSelectionChange),P=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[T,_]=S.useState(i);i==="replace"&&T==="toggle"&&typeof x=="object"&&x.size===0&&_("replace");let A=S.useRef(i);return S.useEffect(()=>{i!==A.current&&(_(i),A.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:T,setSelectionBehavior:_,get isFocused(){return a.current},setFocused(L){a.current=L,c(L)},get focusedKey(){return d.current},get childFocusStrategy(){return h.current},setFocusedKey(L,O="first"){d.current=L,h.current=O,m(L)},selectedKeys:x,setSelectedKeys(L){(r||!r6(L,x))&&k(L)},disabledKeys:P,disabledBehavior:s}}function _k(e,t){return e?e==="all"?"all":new Po(e):t}function O_(e){return null}O_.getCollectionNode=function*(t,n){let{childItems:r,title:i,children:s}=t,a=t.title||t.children,c=t.textValue||(typeof a=="string"?a:"")||t["aria-label"]||"";!c&&n?.suppressTextValueWarning,yield{type:"item",props:t,rendered:a,textValue:c,"aria-label":t["aria-label"],hasChildNodes:o6(t),*childNodes(){if(r)for(let d of r)yield{type:"item",value:d};else if(i){let d=[];He.Children.forEach(s,h=>{d.push({type:"item",element:h})}),yield*d}}}};function o6(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&He.Children.count(e.children)>0)}let s6=O_;class a6{build(t,n){return this.context=n,Ik(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(He.isValidElement(n)&&n.type===He.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let s of r)yield*this.getFullNode({value:s,index:i},{renderer:n}),i++}else{let i=[];He.Children.forEach(n,a=>{a&&i.push(a)});let s=0;for(let a of i){let c=this.getFullNode({element:a,index:s},{});for(let d of c)s++,yield d}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let s=n.value;if(s!=null){var a;let c=(a=s.key)!==null&&a!==void 0?a:s.id;if(c==null)throw new Error("No key found for item");return c}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){if(He.isValidElement(t.element)&&t.element.type===He.Fragment){let T=[];He.Children.forEach(t.element.props.children,A=>{T.push(A)});var s;let _=(s=t.index)!==null&&s!==void 0?s:0;for(const A of T)yield*this.getFullNode({element:A,index:_++},n,r,i);return}let a=t.element;if(!a&&t.value&&n&&n.renderer){let T=this.cache.get(t.value);if(T&&(!T.shouldInvalidate||!T.shouldInvalidate(this.context))){T.index=t.index,T.parentKey=i?i.key:null,yield T;return}a=n.renderer(t.value)}if(He.isValidElement(a)){let T=a.type;if(typeof T!="function"&&typeof T.getCollectionNode!="function"){let O=a.type;throw new Error(`Unknown element <${O}> in collection.`)}let _=T.getCollectionNode(a.props,this.context);var c;let A=(c=t.index)!==null&&c!==void 0?c:0,L=_.next();for(;!L.done&&L.value;){let O=L.value;t.index=A;var d;let j=(d=O.key)!==null&&d!==void 0?d:null;j==null&&(j=O.element?null:this.getKey(a,t,n,r));let Y=[...this.getFullNode({...O,key:j,index:A,wrapper:l6(t.wrapper,O.wrapper)},this.getChildState(n,O),r?`${r}${a.key}`:a.key,i)];for(let te of Y){var h,m;te.value=(m=(h=O.value)!==null&&h!==void 0?h:t.value)!==null&&m!==void 0?m:null,te.value&&this.cache.set(te.value,te);var g;if(t.type&&te.type!==t.type)throw new Error(`Unsupported type <${m0(te.type)}> in <${m0((g=i?.type)!==null&&g!==void 0?g:"unknown parent type")}>. Only <${m0(t.type)}> is supported.`);A++,yield te}L=_.next(Y)}return}if(t.key==null||t.type==null)return;let b=this;var x,k;let P={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(x=t.value)!==null&&x!==void 0?x:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(k=t.textValue)!==null&&k!==void 0?k:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:Ik(function*(){if(!t.hasChildNodes||!t.childNodes)return;let T=0;for(let _ of t.childNodes()){_.key!=null&&(_.key=`${P.key}${_.key}`);let A=b.getFullNode({..._,index:T},b.getChildState(n,_),P.key,P);for(let L of A)T++,yield L}})};yield P}constructor(){this.cache=new WeakMap}}function Ik(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function l6(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function m0(e){return e[0].toUpperCase()+e.slice(1)}function u6(e,t,n){let r=S.useMemo(()=>new a6,[]),{children:i,items:s,collection:a}=e;return S.useMemo(()=>{if(a)return a;let d=r.build({children:i,items:s},n);return t(d)},[r,i,s,a,n,t])}function c6(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function f6(e){return d6(e,0)}function d6(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function YG(e){let t;for(let n of e)t=n;return t}function g0(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...$k(e,t),t],i=[...$k(e,n),n],s=r.slice(0,i.length).findIndex((a,c)=>a!==i[c]);return s!==-1?(t=r[s],n=i[s],t.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===t)>=0,-1)}function $k(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}class Jx{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&g0(this.collection,i,t)<0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&g0(this.collection,i,t)>0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Po([n],n,n);else{let a=this.state.selectedKeys;var i;let c=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new Po(a,c,n);var s;for(let d of this.getKeyRange(c,(s=a.currentKey)!==null&&s!==void 0?s:n))r.delete(d);for(let d of this.getKeyRange(n,c))this.canSelectItem(d)&&r.add(d)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?g0(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let i=[],s=t;for(;s!=null;){let a=this.collection.getItem(s);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(s),s===n)return i;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new Po(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new Po([n],n,n):new Po;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Po;for(let r of t){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);a?.type==="item"&&t.push(r);var s;a?.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((s=(i=f6(c6(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Po)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}withCollection(t){return new Jx(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r?.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null}}function p6(e){let{onExpandedChange:t}=e,[n,r]=Au(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=i6(e),s=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=u6(e,S.useCallback(d=>new n6(d,{expandedKeys:n}),[n]),null);return S.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:s,toggleKey:d=>{r(h6(n,d))},setExpandedKeys:r,selectionManager:new Jx(a,i)}}function h6(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function m6(e){var t;const n=ci(),{ref:r,as:i,className:s,items:a,variant:c,motionProps:d,expandedKeys:h,disabledKeys:m,selectedKeys:g,children:b,defaultExpandedKeys:x,selectionMode:k="single",selectionBehavior:P="toggle",keepContentMounted:T=!1,disallowEmptySelection:_,defaultSelectedKeys:A,onExpandedChange:L,onSelectionChange:O,dividerProps:j={},isCompact:$=!1,isDisabled:Y=!1,showDivider:te=!0,hideIndicator:ie=!1,disableAnimation:B=(t=n?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:W=!1,itemClasses:G,...ee}=e,[H,le]=S.useState(null),J=i||"div",X=typeof J=="string",V=Ii(r),ae=S.useMemo(()=>FO({variant:c,className:s}),[c,s]),U={children:S.useMemo(()=>{let _e=[];return He.Children.map(b,Qe=>{var at;if(He.isValidElement(Qe)&&typeof((at=Qe.props)==null?void 0:at.children)!="string"){const Ie=He.cloneElement(Qe,{hasChildItems:!1});_e.push(Ie)}else _e.push(Qe)}),_e},[b]),items:a},oe={expandedKeys:h,defaultExpandedKeys:x,onExpandedChange:L},z={disabledKeys:m,selectedKeys:g,selectionMode:k,selectionBehavior:P,disallowEmptySelection:_,defaultSelectedKeys:A??x,onSelectionChange:O,...U,...oe},me=p6(z);me.selectionManager.setFocusedKey=_e=>{le(_e)};const{accordionProps:Ce}=JO({...U,...oe},me,V),ye=S.useMemo(()=>({state:me,focusedKey:H,motionProps:d,isCompact:$,isDisabled:Y,hideIndicator:ie,disableAnimation:B,keepContentMounted:T,disableIndicatorAnimation:W}),[H,$,Y,ie,g,B,T,me?.expandedKeys.values,W,me.expandedKeys.size,me.disabledKeys.size,d]),Oe=S.useCallback((_e={})=>({ref:V,className:ae,"data-orientation":"vertical",...nn(Ce,Ef(ee,{enabled:X}),_e)}),[]),Ne=S.useCallback((_e,Qe)=>{_e&&le(Qe)},[]);return{Component:J,values:ye,state:me,focusedKey:H,getBaseProps:Oe,isSplitted:c==="splitted",classNames:ae,showDivider:te,dividerProps:j,disableAnimation:B,handleFocusChanged:Ne,itemClasses:G}}function g6(e){let t=Ef(e,{enabled:typeof e.elementType=="string"}),n;return e.orientation==="vertical"&&(n="vertical"),e.elementType!=="hr"?{separatorProps:{...t,role:"separator","aria-orientation":n}}:{separatorProps:t}}function v6(e){const{as:t,className:n,orientation:r,...i}=e;let s=t||"hr";s==="hr"&&r==="vertical"&&(s="div");const{separatorProps:a}=g6({elementType:typeof s=="string"?s:"hr",orientation:r}),c=S.useMemo(()=>LO({orientation:r,className:n}),[r,n]),d=S.useCallback((h={})=>({className:c,role:"separator","data-orientation":r,...a,...i,...h}),[c,r,a,i]);return{Component:s,getDividerProps:d}}var z_=jr((e,t)=>{const{Component:n,getDividerProps:r}=v6({...e});return D.jsx(n,{ref:t,...r()})});z_.displayName="HeroUI.Divider";var y6=z_,j_=jr((e,t)=>{const{Component:n,values:r,state:i,isSplitted:s,showDivider:a,getBaseProps:c,disableAnimation:d,handleFocusChanged:h,itemClasses:m,dividerProps:g}=m6({...e,ref:t}),b=S.useCallback((k,P)=>h(k,P),[h]),x=S.useMemo(()=>[...i.collection].map((k,P)=>{const T={...m,...k.props.classNames||{}};return D.jsxs(S.Fragment,{children:[D.jsx(t6,{item:k,variant:e.variant,onFocusChange:b,...r,...k.props,classNames:T}),!k.props.hidden&&!s&&a&&P<i.collection.size-1&&D.jsx(y6,{...g})]},k.key)}),[r,m,b,s,a,i.collection]);return D.jsx(n,{...c(),children:d?x:D.jsx(O3,{children:x})})});j_.displayName="HeroUI.Accordion";var Ak=j_,b6=e=>{const t={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return t?.[e]||{}},x6=e=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[e],XG=(e,t)=>{if(t.includes("-")){const[n]=t.split("-");if(n.includes(e))return!1}return!0},Rk=(e,t)=>{if(t.includes("-")){const[,n]=t.split("-");return`${e}-${n}`}return e},w6=s6,bp=w6,Sh=globalThis?.document?S.useLayoutEffect:S.useEffect;function S6(e={}){const{onLoad:t,onError:n,ignoreFallback:r,src:i,crossOrigin:s,srcSet:a,sizes:c,loading:d,shouldBypassImageLoad:h=!1}=e,m=kL(),g=S.useRef(m?new Image:null),[b,x]=S.useState("pending");S.useEffect(()=>{g.current&&(g.current.onload=T=>{k(),x("loaded"),t?.(T)},g.current.onerror=T=>{k(),x("failed"),n?.(T)})},[g.current]);const k=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)},P=S.useCallback(()=>{if(!i)return"pending";if(r||h)return"loaded";const T=new Image;return T.src=i,s&&(T.crossOrigin=s),a&&(T.srcset=a),c&&(T.sizes=c),d&&(T.loading=d),g.current=T,T.complete&&T.naturalWidth?"loaded":"loading"},[i,s,a,c,t,n,d,h]);return Sh(()=>{m&&x(P())},[m,P]),r?"loaded":b}var[QG,k6]=pv({name:"ButtonGroupContext",strict:!1});function B_(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button",allowTextSelectionOnPress:T}=e,_;n==="button"?_={type:P,disabled:r}:_={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:A,isPressed:L}=il({onClick:g,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,onPress:i,isDisabled:r,preventFocusOnPress:h,allowTextSelectionOnPress:T,ref:t}),{focusableProps:O}=xh(e,t);m&&(O.tabIndex=r?-1:O.tabIndex);let j=Pn(O,A,$u(e,{labelable:!0}));return{isPressed:L,buttonProps:Pn(_,j,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}var C6=()=>io(()=>import("./index-g-_fwkPj.js"),[]).then(e=>e.default),V_=e=>{const{ripples:t=[],motionProps:n,color:r="currentColor",style:i,onClear:s}=e;return D.jsx(D.Fragment,{children:t.map(a=>{const c=yL(.01*a.size,.2,a.size>100?.75:.5);return D.jsx($f,{features:C6,children:D.jsx(ol,{mode:"popLayout",children:D.jsx(Af.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:r,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:a.y,left:a.x,width:`${a.size}px`,height:`${a.size}px`,...i},transition:{duration:c},onAnimationComplete:()=>{s(a.key)},...n})})},a.key)})})};V_.displayName="HeroUI.Ripple";var E6=V_;function P6(e={}){const[t,n]=S.useState([]),r=S.useCallback(s=>{const a=s.target,c=Math.max(a.clientWidth,a.clientHeight);n(d=>[...d,{key:vL(d.length.toString()),size:c,x:s.x-c/2,y:s.y-c/2}])},[]),i=S.useCallback(s=>{n(a=>a.filter(c=>c.key!==s))},[]);return{ripples:t,onClear:i,onPress:r,...e}}function T6(e){var t,n,r,i,s,a,c,d,h;const m=k6(),g=ci(),b=!!m,{ref:x,as:k,children:P,startContent:T,endContent:_,autoFocus:A,className:L,spinner:O,isLoading:j=!1,disableRipple:$=!1,fullWidth:Y=(t=m?.fullWidth)!=null?t:!1,radius:te=m?.radius,size:ie=(n=m?.size)!=null?n:"md",color:B=(r=m?.color)!=null?r:"default",variant:W=(i=m?.variant)!=null?i:"solid",disableAnimation:G=(a=(s=m?.disableAnimation)!=null?s:g?.disableAnimation)!=null?a:!1,isDisabled:ee=(c=m?.isDisabled)!=null?c:!1,isIconOnly:H=(d=m?.isIconOnly)!=null?d:!1,spinnerPlacement:le="start",onPress:J,onClick:X,...V}=e,ae=k||"button",M=typeof ae=="string",U=Ii(x),oe=(h=$||g?.disableRipple)!=null?h:G,{isFocusVisible:z,isFocused:me,focusProps:Ce}=Pu({autoFocus:A}),ye=ee||j,Oe=S.useMemo(()=>DO({size:ie,color:B,variant:W,radius:te,fullWidth:Y,isDisabled:ye,isInGroup:b,disableAnimation:G,isIconOnly:H,className:L}),[ie,B,W,te,Y,ye,b,H,G,L]),{onPress:Ne,onClear:_e,ripples:Qe}=P6(),at=S.useCallback(Rt=>{oe||ye||G||U.current&&Ne(Rt)},[oe,ye,G,U,Ne]),{buttonProps:Ie,isPressed:mt}=B_({elementType:k,isDisabled:ye,onPress:el(J,at),onClick:X,...V},U),{isHovered:pt,hoverProps:Ut}=Eu({isDisabled:ye}),Ue=S.useCallback((Rt={})=>({"data-disabled":Ae(ye),"data-focus":Ae(me),"data-pressed":Ae(mt),"data-focus-visible":Ae(z),"data-hover":Ae(pt),"data-loading":Ae(j),...nn(Ie,Ce,Ut,Ef(V,{enabled:M}),Ef(Rt)),className:Oe}),[j,ye,me,mt,M,z,pt,Ie,Ce,Ut,V,Oe]),it=Rt=>S.isValidElement(Rt)?S.cloneElement(Rt,{"aria-hidden":!0,focusable:!1}):null,Kt=it(T),er=it(_),an=S.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[ie],[ie]),_t=S.useCallback(()=>({ripples:Qe,onClear:_e}),[Qe,_e]);return{Component:ae,children:P,domRef:U,spinner:O,styles:Oe,startContent:Kt,endContent:er,isLoading:j,spinnerPlacement:le,spinnerSize:an,disableRipple:oe,getButtonProps:Ue,getRippleProps:_t,isIconOnly:H}}function _6(e){var t,n;const[r,i]=oa(e,hk.variantKeys),s=ci(),a=(n=(t=e?.variant)!=null?t:s?.spinnerVariant)!=null?n:"default",{children:c,className:d,classNames:h,label:m,...g}=r,b=S.useMemo(()=>hk({...i}),[ds(i)]),x=Bt(h?.base,d),k=m||c,P=S.useMemo(()=>k&&typeof k=="string"?k:g["aria-label"]?"":"Loading",[c,k,g["aria-label"]]),T=S.useCallback(()=>({"aria-label":P,className:b.base({class:x}),...g}),[P,b,x,g]);return{label:k,slots:b,classNames:h,variant:a,getSpinnerProps:T}}var U_=jr((e,t)=>{const{slots:n,classNames:r,label:i,variant:s,getSpinnerProps:a}=_6({...e});return s==="wave"||s==="dots"?D.jsxs("div",{ref:t,...a(),children:[D.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(3)].map((c,d)=>D.jsx("i",{className:n.dots({class:r?.dots}),style:{"--dot-index":d}},`dot-${d}`))}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="simple"?D.jsxs("div",{ref:t,...a(),children:[D.jsxs("svg",{className:n.wrapper({class:r?.wrapper}),fill:"none",viewBox:"0 0 24 24",children:[D.jsx("circle",{className:n.circle1({class:r?.circle1}),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),D.jsx("path",{className:n.circle2({class:r?.circle2}),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"})]}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="spinner"?D.jsxs("div",{ref:t,...a(),children:[D.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(12)].map((c,d)=>D.jsx("i",{className:n.spinnerBars({class:r?.spinnerBars}),style:{"--bar-index":d}},`star-${d}`))}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):D.jsxs("div",{ref:t,...a(),children:[D.jsxs("div",{className:n.wrapper({class:r?.wrapper}),children:[D.jsx("i",{className:n.circle1({class:r?.circle1})}),D.jsx("i",{className:n.circle2({class:r?.circle2})})]}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]})});U_.displayName="HeroUI.Spinner";var I6=U_,K_=jr((e,t)=>{const{Component:n,domRef:r,children:i,spinnerSize:s,spinner:a=D.jsx(I6,{color:"current",size:s}),spinnerPlacement:c,startContent:d,endContent:h,isLoading:m,disableRipple:g,getButtonProps:b,getRippleProps:x,isIconOnly:k}=T6({...e,ref:t});return D.jsxs(n,{ref:r,...b(),children:[d,m&&c==="start"&&a,m&&k?null:i,m&&c==="end"&&a,h,!g&&D.jsx(E6,{...x()})]})});K_.displayName="HeroUI.Button";var wr=K_;function $6(e){const[t,n]=oa(e,Sk.variantKeys),{ref:r,as:i,children:s,avatar:a,startContent:c,endContent:d,onClose:h,classNames:m,className:g,...b}=t,x=i||"div",k=Ii(r),P=Bt(m?.base,g),T=!!h,_=e.variant==="dot",{focusProps:A,isFocusVisible:L}=Pu(),O=S.useMemo(()=>typeof s=="string"&&s?.length===1,[s]),j=S.useMemo(()=>!!a||!!c,[a,c]),$=S.useMemo(()=>!!d||T,[d,T]),Y=S.useMemo(()=>Sk({...n,hasStartContent:j,hasEndContent:$,isOneChar:O,isCloseable:T,isCloseButtonFocusVisible:L}),[ds(n),L,j,$,O,T]),{pressProps:te}=il({isDisabled:!!e?.isDisabled,onPress:h}),ie=()=>({ref:k,className:Y.base({class:P}),...b}),B=()=>({role:"button",tabIndex:0,className:Y.closeButton({class:m?.closeButton}),"aria-label":"close chip",...nn(te,A)}),W=ee=>S.isValidElement(ee)?S.cloneElement(ee,{className:Y.avatar({class:m?.avatar})}):null,G=ee=>S.isValidElement(ee)?S.cloneElement(ee,{className:Bt("max-h-[80%]",ee.props.className)}):null;return{Component:x,children:s,slots:Y,classNames:m,isDot:_,isCloseable:T,startContent:W(a)||G(c),endContent:G(d),getCloseButtonProps:B,getChipProps:ie}}var W_=jr((e,t)=>{const{Component:n,children:r,slots:i,classNames:s,isDot:a,isCloseable:c,startContent:d,endContent:h,getCloseButtonProps:m,getChipProps:g}=$6({...e,ref:t}),b=S.useMemo(()=>a&&!d?D.jsx("span",{className:i.dot({class:s?.dot})}):d,[i,d,a]),x=S.useMemo(()=>c?D.jsx("span",{...m(),children:h||D.jsx(N_,{})}):h,[h,c,m]);return D.jsxs(n,{...g(),children:[b,D.jsx("span",{className:i.content({class:s?.content}),children:r}),x]})});W_.displayName="HeroUI.Chip";var wg=W_;const H_={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},G_={...H_,customError:!0,valid:!1},ff={isInvalid:!1,validationDetails:H_,validationErrors:[]},q_=S.createContext({}),ev="__formValidationState"+Date.now();function Zx(e){if(e[ev]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}=e[ev];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}}return A6(e)}function A6(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:s,validate:a,validationBehavior:c="aria"}=e;n&&(t||(t=n==="invalid"));let d=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:G_}:null,h=S.useMemo(()=>{if(!a||i==null)return null;let B=R6(a,i);return Lk(B)},[a,i]);s?.validationDetails.valid&&(s=void 0);let m=S.useContext(q_),g=S.useMemo(()=>r?Array.isArray(r)?r.flatMap(B=>$b(m[B])):$b(m[r]):[],[m,r]),[b,x]=S.useState(m),[k,P]=S.useState(!1);m!==b&&(x(m),P(!1));let T=S.useMemo(()=>Lk(k?[]:g),[k,g]),_=S.useRef(ff),[A,L]=S.useState(ff),O=S.useRef(ff),j=()=>{if(!$)return;Y(!1);let B=h||s||_.current;v0(B,O.current)||(O.current=B,L(B))},[$,Y]=S.useState(!1);return S.useEffect(j),{realtimeValidation:d||T||h||s||ff,displayValidation:c==="native"?d||T||A:d||T||h||s||A,updateValidation(B){c==="aria"&&!v0(A,B)?L(B):_.current=B},resetValidation(){let B=ff;v0(B,O.current)||(O.current=B,L(B)),c==="native"&&Y(!1),P(!0)},commitValidation(){c==="native"&&Y(!0),P(!0)}}}function $b(e){return e?Array.isArray(e)?e:[e]:[]}function R6(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return $b(n)}return[]}function Lk(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:G_}:null}function v0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function Y_(e,t,n){let{validationBehavior:r,focus:i}=e;sn(()=>{if(r==="native"&&n?.current&&!n.current.disabled){let d=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(d),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(M6(n.current))}});let s=jn(()=>{t.resetValidation()}),a=jn(d=>{var h;t.displayValidation.isInvalid||t.commitValidation();let m=n==null||(h=n.current)===null||h===void 0?void 0:h.form;if(!d.defaultPrevented&&n&&m&&D6(m)===n.current){var g;i?i():(g=n.current)===null||g===void 0||g.focus(),U5("keyboard")}d.preventDefault()}),c=jn(()=>{t.commitValidation()});S.useEffect(()=>{let d=n?.current;if(!d)return;let h=d.form;return d.addEventListener("invalid",a),d.addEventListener("change",c),h?.addEventListener("reset",s),()=>{d.removeEventListener("invalid",a),d.removeEventListener("change",c),h?.removeEventListener("reset",s)}},[n,a,c,s,r])}function L6(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function M6(e){return{isInvalid:!e.validity.valid,validationDetails:L6(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function D6(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}function N6(e,t,n){let{isDisabled:r=!1,isReadOnly:i=!1,value:s,name:a,children:c,"aria-label":d,"aria-labelledby":h,validationState:m="valid",isInvalid:g}=e,b=O=>{O.stopPropagation(),t.setSelected(O.target.checked)},{pressProps:x,isPressed:k}=il({isDisabled:r}),{pressProps:P,isPressed:T}=il({onPress(){var O;t.toggle(),(O=n.current)===null||O===void 0||O.focus()},isDisabled:r||i}),{focusableProps:_}=xh(e,n),A=Pn(x,_),L=$u(e,{labelable:!0});return NE(n,t.isSelected,t.setSelected),{labelProps:Pn(P,{onClick:O=>O.preventDefault()}),inputProps:Pn(L,{"aria-invalid":g||m==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":i||void 0,onChange:b,disabled:r,...s==null?{}:{value:s},name:a,type:"checkbox",...A}),isSelected:t.isSelected,isPressed:k||T,isDisabled:r,isReadOnly:i,isInvalid:g||m==="invalid"}}function X_(e,t,n){let r=Zx({...e,value:t.isSelected}),{isInvalid:i,validationErrors:s,validationDetails:a}=r.displayValidation,{labelProps:c,inputProps:d,isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b}=N6({...e,isInvalid:i},t,n);Y_(e,r,n);let{isIndeterminate:x,isRequired:k,validationBehavior:P="aria"}=e;S.useEffect(()=>{n.current&&(n.current.indeterminate=!!x)});let{pressProps:T}=il({isDisabled:g||b,onPress(){let{[ev]:_}=e,{commitValidation:A}=_||r;A()}});return{labelProps:Pn(c,T),inputProps:{...d,checked:h,"aria-required":k&&P==="aria"||void 0,required:k&&P==="native"},isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b,isInvalid:i,validationErrors:s,validationDetails:a}}const F6=new WeakMap;function Q_(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:s="label"}=e;t=Pf(t);let a=Pf(),c={};n&&(r=r?`${a} ${r}`:a,c={id:a,htmlFor:s==="label"?t:void 0});let d=AE({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:c,fieldProps:d}}function O6(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:s,fieldProps:a}=Q_(e),c=W0([!!t,!!n,r,i]),d=W0([!!t,!!n,r,i]);return a=Pn(a,{"aria-describedby":[c,d,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:s,fieldProps:a,descriptionProps:{id:c},errorMessageProps:{id:d}}}function J_(e={}){let{isReadOnly:t}=e,[n,r]=Au(e.isSelected,e.defaultSelected||!1,e.onChange);function i(a){t||r(a)}function s(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:s}}function z6(e,t,n){const r=J_({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),onChange(T){T?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(T)}});let{name:i,descriptionId:s,errorMessageId:a,validationBehavior:c}=F6.get(t);var d;c=(d=e.validationBehavior)!==null&&d!==void 0?d:c;let{realtimeValidation:h}=Zx({...e,value:r.isSelected,name:void 0,validationBehavior:"aria"}),m=S.useRef(ff),g=()=>{t.setInvalid(e.value,h.isInvalid?h:m.current)};S.useEffect(g);let b=t.realtimeValidation.isInvalid?t.realtimeValidation:h,x=c==="native"?t.displayValidation:b;var k;let P=X_({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,isRequired:(k=e.isRequired)!==null&&k!==void 0?k:t.isRequired,validationBehavior:c,[ev]:{realtimeValidation:b,displayValidation:x,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(T){m.current=T,g()}}},r,n);return{...P,inputProps:{...P.inputProps,"aria-describedby":[e["aria-describedby"],t.isInvalid?a:null,s].filter(Boolean).join(" ")||void 0}}}var Mk=Symbol("default");function j6(e){const t=S.useRef(null),n=S.useRef(void 0),r=S.useCallback(i=>{if(typeof e=="function"){const s=e,a=s(i);return()=>{typeof a=="function"?a():s(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return S.useMemo(()=>({get current(){return t.current},set current(i){t.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}function ew(e,t){let n=S.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(s=>`"${s}"`));if(!t&&!n.slots[Mk])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=t||Mk;if(!n.slots[i])throw new Error(`Invalid slot "${t}". Valid slot names are ${r}.`);return n.slots[i]}return n}function B6(e,t,n){let r=ew(n,e.slot)||{},{ref:i,...s}=r,a=j6(S.useMemo(()=>gE(t,i),[t,i])),c=nn(s,e);return"style"in s&&s.style&&"style"in e&&e.style&&(typeof s.style=="function"||typeof e.style=="function"?c.style=d=>{let h=typeof s.style=="function"?s.style(d):s.style,m={...d.defaultStyle,...h},g=typeof e.style=="function"?e.style({...d,defaultStyle:m}):e.style;return{...m,...g}}:c.style={...s.style,...e.style}),[c,a]}var tv=S.createContext(null),V6=S.forwardRef(function(t,n){[t,n]=B6(t,n,tv);let{validationErrors:r,validationBehavior:i="native",children:s,className:a,...c}=t;const d=S.useMemo(()=>MO({className:a}),[a]);return D.jsx("form",{noValidate:i!=="native",...c,ref:n,className:d,children:D.jsx(tv.Provider,{value:{...t,validationBehavior:i},children:D.jsx(q_.Provider,{value:r??{},children:s})})})}),U6=S.forwardRef(function(t,n){var r,i;const s=ci(),a=(i=(r=t.validationBehavior)!=null?r:s?.validationBehavior)!=null?i:"native";return D.jsx(V6,{...t,ref:n,validationBehavior:a})}),[JG,K6]=pv({name:"CheckboxGroupContext",strict:!1});function W6(e){const{isSelected:t,disableAnimation:n,...r}=e;return D.jsx("svg",{"aria-hidden":"true",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,style:!n&&t?{transition:"stroke-dashoffset 250ms linear 0.2s"}:{},viewBox:"0 0 17 18",...r,children:D.jsx("polyline",{points:"1 9 7 14 15 4"})})}function H6(e){const{isSelected:t,disableAnimation:n,...r}=e;return D.jsx("svg",{stroke:"currentColor",strokeWidth:3,viewBox:"0 0 24 24",...r,children:D.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function G6(e){const{isIndeterminate:t,...n}=e,r=t?H6:W6;return D.jsx(r,{...n})}function Ab(e,t=[]){const n=S.useRef(e);return Sh(()=>{n.current=e}),S.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function q6(e={}){var t,n,r,i,s,a,c,d;const h=ci(),m=K6(),{validationBehavior:g}=ew(tv)||{},b=!!m,{as:x,ref:k,value:P="",children:T,icon:_,name:A,isRequired:L,isReadOnly:O=!1,autoFocus:j=!1,isSelected:$,size:Y=(t=m?.size)!=null?t:"md",color:te=(n=m?.color)!=null?n:"primary",radius:ie=m?.radius,lineThrough:B=(r=m?.lineThrough)!=null?r:!1,isDisabled:W=(i=m?.isDisabled)!=null?i:!1,disableAnimation:G=(a=(s=m?.disableAnimation)!=null?s:h?.disableAnimation)!=null?a:!1,validationState:ee,isInvalid:H=ee?ee==="invalid":(c=m?.isInvalid)!=null?c:!1,isIndeterminate:le=!1,validationBehavior:J=b?m.validationBehavior:(d=g??h?.validationBehavior)!=null?d:"native",defaultSelected:X,classNames:V,className:ae,onValueChange:M,validate:U,...oe}=e,z=x||"label",me=S.useRef(null),Ce=S.useRef(null);let ye=e.onChange;b&&(ye=el(()=>{m.groupState.resetValidation()},ye));const Oe=S.useId(),Ne=S.useMemo(()=>({name:A,value:P,children:T,autoFocus:j,defaultSelected:X,isIndeterminate:le,isRequired:L,isInvalid:H,isSelected:$,isDisabled:W,isReadOnly:O,"aria-label":mE(oe["aria-label"],T),"aria-labelledby":oe["aria-labelledby"]||Oe,onChange:M}),[A,P,T,j,X,le,L,H,$,W,O,oe["aria-label"],oe["aria-labelledby"],Oe,M]),_e=J_(Ne),Qe={isInvalid:H,isRequired:L,validate:U,validationState:ee,validationBehavior:J},{inputProps:at,isSelected:Ie,isDisabled:mt,isReadOnly:pt,isPressed:Ut,isInvalid:Ue}=b?z6({...Ne,...Qe},m.groupState,Ce):X_({...Ne,...Qe},_e,Ce),it=mt||pt,Kt=ee==="invalid"||H||Ue,er=it?!1:Ut,{hoverProps:an,isHovered:_t}=Eu({isDisabled:at.disabled}),{focusProps:Rt,isFocused:Tn,isFocusVisible:Er}=Pu({autoFocus:at.autoFocus}),Nt=S.useMemo(()=>NO({color:te,size:Y,radius:ie,isInvalid:Kt,lineThrough:B,isDisabled:mt,disableAnimation:G}),[te,Y,ie,Kt,B,mt,G]);Sh(()=>{if(!Ce.current)return;const Pt=!!Ce.current.checked;_e.setSelected(Pt)},[Ce.current]);const pe=Ab(ye),Se=S.useCallback(Pt=>{if(pt||mt){Pt.preventDefault();return}pe?.(Pt)},[pt,mt,pe]),ze=Bt(V?.base,ae),nt=S.useCallback(()=>({ref:me,className:Nt.base({class:ze}),"data-disabled":Ae(mt),"data-selected":Ae(Ie||le),"data-invalid":Ae(Kt),"data-hover":Ae(_t),"data-focus":Ae(Tn),"data-pressed":Ae(er),"data-readonly":Ae(at.readOnly),"data-focus-visible":Ae(Er),"data-indeterminate":Ae(le),...nn(an,oe)}),[Nt,ze,mt,Ie,le,Kt,_t,Tn,er,at.readOnly,Er,an,oe]),lt=S.useCallback((Pt={})=>({...Pt,"aria-hidden":!0,className:Bt(Nt.wrapper({class:Bt(V?.wrapper,Pt?.className)}))}),[Nt,V?.wrapper]),Wt=S.useCallback(()=>({ref:vE(Ce,k),...nn(at,Rt),className:Nt.hiddenInput({class:V?.hiddenInput}),onChange:el(at.onChange,Se)}),[at,Rt,Se,V?.hiddenInput]),Bn=S.useCallback(()=>({id:Oe,className:Nt.label({class:V?.label})}),[Nt,V?.label,mt,Ie,Kt]),Jt=S.useCallback(()=>({isSelected:Ie,isIndeterminate:le,disableAnimation:G,className:Nt.icon({class:V?.icon})}),[Nt,V?.icon,Ie,le,G]);return{Component:z,icon:_,children:T,isSelected:Ie,isDisabled:mt,isInvalid:Kt,isFocused:Tn,isHovered:_t,isFocusVisible:Er,getBaseProps:nt,getWrapperProps:lt,getInputProps:Wt,getLabelProps:Bn,getIconProps:Jt}}var Z_=jr((e,t)=>{const{Component:n,children:r,icon:i=D.jsx(G6,{}),getBaseProps:s,getWrapperProps:a,getInputProps:c,getIconProps:d,getLabelProps:h}=q6({...e,ref:t}),m=typeof i=="function"?i(d()):S.cloneElement(i,d());return D.jsxs(n,{...s(),children:[D.jsx("input",{...c()}),D.jsx("span",{...a(),children:m}),r&&D.jsx("span",{...h(),children:r})]})});Z_.displayName="HeroUI.Checkbox";var e2=Z_;function t2(e){let[t,n]=Au(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=S.useCallback(()=>{n(!0)},[n]),i=S.useCallback(()=>{n(!1)},[n]),s=S.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:s}}const Y6=1500,Dk=500;let cu={},X6=0,xp=!1,qs=null,fu=null;function Q6(e={}){let{delay:t=Y6,closeDelay:n=Dk}=e,{isOpen:r,open:i,close:s}=t2(e),a=S.useMemo(()=>`${++X6}`,[]),c=S.useRef(null),d=S.useRef(s),h=()=>{cu[a]=b},m=()=>{for(let k in cu)k!==a&&(cu[k](!0),delete cu[k])},g=()=>{c.current&&clearTimeout(c.current),c.current=null,m(),h(),xp=!0,i(),qs&&(clearTimeout(qs),qs=null),fu&&(clearTimeout(fu),fu=null)},b=k=>{k||n<=0?(c.current&&clearTimeout(c.current),c.current=null,d.current()):c.current||(c.current=setTimeout(()=>{c.current=null,d.current()},n)),qs&&(clearTimeout(qs),qs=null),xp&&(fu&&clearTimeout(fu),fu=setTimeout(()=>{delete cu[a],fu=null,xp=!1},Math.max(Dk,n)))},x=()=>{m(),h(),!r&&!qs&&!xp?qs=setTimeout(()=>{qs=null,xp=!0,g()},t):r||g()};return S.useEffect(()=>{d.current=s},[s]),S.useEffect(()=>()=>{c.current&&clearTimeout(c.current),cu[a]&&delete cu[a]},[a]),{isOpen:r,open:k=>{!k&&t>0&&!c.current?x():g()},close:b}}function J6(e,t){let n=$u(e,{labelable:!0}),{hoverProps:r}=Eu({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:Pn(n,r,{role:"tooltip"})}}function Z6(e,t,n){let{isDisabled:r,trigger:i}=e,s=Pf(),a=S.useRef(!1),c=S.useRef(!1),d=()=>{(a.current||c.current)&&t.open(c.current)},h=_=>{!a.current&&!c.current&&t.close(_)};S.useEffect(()=>{let _=A=>{n&&n.current&&A.key==="Escape"&&(A.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",_,!0),()=>{document.removeEventListener("keydown",_,!0)}},[n,t]);let m=()=>{i!=="focus"&&(oh()==="pointer"?a.current=!0:a.current=!1,d())},g=()=>{i!=="focus"&&(c.current=!1,a.current=!1,h())},b=()=>{c.current=!1,a.current=!1,h(!0)},x=()=>{qx()&&(c.current=!0,d())},k=()=>{c.current=!1,a.current=!1,h(!0)},{hoverProps:P}=Eu({isDisabled:r,onHoverStart:m,onHoverEnd:g}),{focusableProps:T}=xh({isDisabled:r,onFocus:x,onBlur:k},n);return{triggerProps:{"aria-describedby":t.isOpen?s:void 0,...Pn(T,P,{onPointerDown:b,onKeyDown:b,tabIndex:void 0})},tooltipProps:{id:s}}}var Ys=[];function n2(e,t){const{disableOutsideEvents:n=!0,isDismissable:r=!1,isKeyboardDismissDisabled:i=!1,isOpen:s,onClose:a,shouldCloseOnBlur:c,shouldCloseOnInteractOutside:d}=e;S.useEffect(()=>(s&&Ys.push(t),()=>{const P=Ys.indexOf(t);P>=0&&Ys.splice(P,1)}),[s,t]);const h=()=>{Ys[Ys.length-1]===t&&a&&a()},m=P=>{(!d||d(P.target))&&(Ys[Ys.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),P.pointerType!=="touch"&&h())},g=P=>{P.pointerType==="touch"&&(!d||d(P.target))&&(Ys[Ys.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),h())},b=P=>{P.key==="Escape"&&!i&&!P.nativeEvent.isComposing&&(P.stopPropagation(),P.preventDefault(),h())};Z5({isDisabled:!(r&&s),onInteractOutside:r&&s?g:void 0,onInteractOutsideStart:m,ref:t});const{focusWithinProps:x}=kv({isDisabled:!c,onBlurWithin:P=>{!P.relatedTarget||rF(P.relatedTarget)||(!d||d(P.relatedTarget))&&h()}}),k=P=>{P.target===P.currentTarget&&P.preventDefault()};return{overlayProps:{onKeyDown:b,...x},underlayProps:{onPointerDown:k}}}function ez(e){var t,n;const r=ci(),[i,s]=oa(e,mk.variantKeys),{ref:a,as:c,isOpen:d,content:h,children:m,defaultOpen:g,onOpenChange:b,isDisabled:x,trigger:k,shouldFlip:P=!0,containerPadding:T=12,placement:_="top",delay:A=0,closeDelay:L=500,showArrow:O=!1,offset:j=7,crossOffset:$=0,isDismissable:Y,shouldCloseOnBlur:te=!0,portalContainer:ie,isKeyboardDismissDisabled:B=!1,updatePositionDeps:W=[],shouldCloseOnInteractOutside:G,className:ee,onClose:H,motionProps:le,classNames:J,...X}=i,V=c||"div",ae=(n=(t=e?.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,M=Q6({delay:A,closeDelay:L,isDisabled:x,defaultOpen:g,isOpen:d,onOpenChange:Ue=>{b?.(Ue),Ue||H?.()}}),U=S.useRef(null),oe=S.useRef(null),z=S.useId(),me=M.isOpen&&!x;S.useImperativeHandle(a,()=>fL(oe));const{triggerProps:Ce,tooltipProps:ye}=Z6({isDisabled:x,trigger:k},M,U),{tooltipProps:Oe}=J6({isOpen:me,...nn(i,ye)},M),{overlayProps:Ne,placement:_e,updatePosition:Qe}=T5({isOpen:me,targetRef:U,placement:x6(_),overlayRef:oe,offset:O?j+3:j,crossOffset:$,shouldFlip:P,containerPadding:T});Sh(()=>{W.length&&Qe()},W);const{overlayProps:at}=n2({isOpen:me,onClose:M.close,isDismissable:Y,shouldCloseOnBlur:te,isKeyboardDismissDisabled:B,shouldCloseOnInteractOutside:G},oe),Ie=S.useMemo(()=>{var Ue,it,Kt;return mk({...s,disableAnimation:ae,radius:(Ue=e?.radius)!=null?Ue:"md",size:(it=e?.size)!=null?it:"md",shadow:(Kt=e?.shadow)!=null?Kt:"sm"})},[ds(s),ae,e?.radius,e?.size,e?.shadow]),mt=S.useCallback((Ue={},it=null)=>({...nn(Ce,Ue),ref:vE(it,U),"aria-describedby":me?z:void 0}),[Ce,me,z,M]),pt=S.useCallback(()=>({ref:oe,"data-slot":"base","data-open":Ae(me),"data-arrow":Ae(O),"data-disabled":Ae(x),"data-placement":Rk(_e||"top",_),...nn(Oe,at,X),style:nn(Ne.style,X.style,i.style),className:Ie.base({class:J?.base}),id:z}),[Ie,me,O,x,_e,_,Oe,at,X,Ne,i,z]),Ut=S.useCallback(()=>({"data-slot":"content","data-open":Ae(me),"data-arrow":Ae(O),"data-disabled":Ae(x),"data-placement":Rk(_e||"top",_),className:Ie.content({class:Bt(J?.content,ee)})}),[Ie,me,O,x,_e,_,J]);return{Component:V,content:h,children:m,isOpen:me,triggerRef:U,showArrow:O,portalContainer:ie,placement:_,disableAnimation:ae,isDisabled:x,motionProps:le,getTooltipContentProps:Ut,getTriggerProps:mt,getTooltipProps:pt}}var tz=()=>io(()=>import("./index-g-_fwkPj.js"),[]).then(e=>e.default),r2=jr((e,t)=>{var n;const{Component:r,children:i,content:s,isOpen:a,portalContainer:c,placement:d,disableAnimation:h,motionProps:m,getTriggerProps:g,getTooltipProps:b,getTooltipContentProps:x}=ez({...e,ref:t});let k;try{if(S.Children.count(i)!==1)throw new Error;if(!S.isValidElement(i))k=D.jsx("p",{...g(),children:i});else{const j=i,$=(n=j.props.ref)!=null?n:j.ref;k=S.cloneElement(j,g(j.props,$))}}catch{k=D.jsx("span",{}),xL("Tooltip must have only one child node. Please, check your code.")}const{ref:P,id:T,style:_,...A}=b(),L=D.jsx("div",{ref:P,id:T,style:_,children:D.jsx(Af.div,{animate:"enter",exit:"exit",initial:"exit",variants:Zg.scaleSpring,...nn(m,A),style:{...b6(d)},children:D.jsx(r,{...x(),children:s})},`${T}-tooltip-inner`)},`${T}-tooltip-content`);return D.jsxs(D.Fragment,{children:[k,h?a&&D.jsx(ok,{portalContainer:c,children:D.jsx("div",{ref:P,id:T,style:_,...A,children:D.jsx(r,{...x(),children:s})})}):D.jsx($f,{features:tz,children:D.jsx(ol,{children:a&&D.jsx(ok,{portalContainer:c,children:L})})})]})});r2.displayName="HeroUI.Tooltip";var nz=r2;function rz(e={}){const{rerender:t=!1,delay:n=0}=e,r=S.useRef(!1),[i,s]=S.useState(!1);return S.useEffect(()=>{r.current=!0;let a=null;return t&&(n>0?a=setTimeout(()=>{s(!0)},n):s(!0)),()=>{r.current=!1,t&&s(!1),a&&clearTimeout(a)}},[t]),[S.useCallback(()=>r.current,[]),i]}function iz(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:s,formatOptions:a={style:"percent"}}=e,c=$u(e,{labelable:!0}),{labelProps:d,fieldProps:h}=Q_({...e,labelElementType:"span"});t=Bg(t,n,r);let m=(t-n)/(r-n),g=AM(a);if(!s&&!i){let b=a.style==="percent"?m:t;i=g.format(b)}return{progressBarProps:Pn(c,{...h,"aria-valuenow":s?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":s?void 0:i,role:"progressbar"}),labelProps:d}}function oz(e){var t,n,r;const i=ci(),[s,a]=oa(e,gk.variantKeys),{ref:c,as:d,id:h,className:m,classNames:g,label:b,valueLabel:x,value:k=void 0,minValue:P=0,maxValue:T=100,strokeWidth:_,showValueLabel:A=!1,formatOptions:L={style:"percent"},...O}=s,j=d||"div",$=Ii(c),Y=Bt(g?.base,m),[,te]=rz({rerender:!0,delay:100}),ie=((t=e.isIndeterminate)!=null?t:!0)&&k===void 0,B=(r=(n=e.disableAnimation)!=null?n:i?.disableAnimation)!=null?r:!1,{progressBarProps:W,labelProps:G}=iz({id:h,label:b,value:k,minValue:P,maxValue:T,valueLabel:x,formatOptions:L,isIndeterminate:ie,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"]}),ee=S.useMemo(()=>gk({...a,disableAnimation:B,isIndeterminate:ie}),[ds(a),B,ie]),H=B?!0:te,le=16,J=_||(e.size==="sm"?2:3),X=16-J,V=2*X*Math.PI,ae=S.useMemo(()=>H?ie?.25:k?bL((k-P)/(T-P),1):0:0,[H,k,P,T,ie]),M=V-ae*V,U=S.useCallback((ye={})=>({ref:$,"data-indeterminate":Ae(ie),"data-disabled":Ae(e.isDisabled),className:ee.base({class:Y}),...nn(W,O,ye)}),[$,ee,ie,e.isDisabled,Y,W,O]),oe=S.useCallback((ye={})=>({className:ee.label({class:g?.label}),...nn(G,ye)}),[ee,g,G]),z=S.useCallback((ye={})=>({viewBox:"0 0 32 32",fill:"none",strokeWidth:J,className:ee.svg({class:g?.svg}),...ye}),[J,ee,g]),me=S.useCallback((ye={})=>({cx:le,cy:le,r:X,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:M,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ee.indicator({class:g?.indicator}),...ye}),[ee,g,M,V,X]),Ce=S.useCallback((ye={})=>({cx:le,cy:le,r:X,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:0,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ee.track({class:g?.track}),...ye}),[ee,g,V,X]);return{Component:j,domRef:$,slots:ee,classNames:g,label:b,showValueLabel:A,getProgressBarProps:U,getLabelProps:oe,getSvgProps:z,getIndicatorProps:me,getTrackProps:Ce}}var i2=jr((e,t)=>{const{Component:n,slots:r,classNames:i,label:s,showValueLabel:a,getProgressBarProps:c,getLabelProps:d,getSvgProps:h,getIndicatorProps:m,getTrackProps:g}=oz({ref:t,...e}),b=c();return D.jsxs(n,{...b,children:[D.jsxs("div",{className:r.svgWrapper({class:i?.svgWrapper}),children:[D.jsxs("svg",{...h(),children:[D.jsx("circle",{...g()}),D.jsx("circle",{...m()})]}),a&&D.jsx("span",{className:r.value({class:i?.value}),children:b["aria-valuetext"]})]}),s&&D.jsx("span",{...d(),children:s})]})});i2.displayName="HeroUI.CircularProgress";var o2=i2;function sz(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:s=!1,type:a="text",validationBehavior:c="aria"}=e,[d,h]=Au(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=xh(e,t),g=Zx({...e,value:d}),{isInvalid:b,validationErrors:x,validationDetails:k}=g.displayValidation,{labelProps:P,fieldProps:T,descriptionProps:_,errorMessageProps:A}=O6({...e,isInvalid:b,errorMessage:e.errorMessage||x}),L=$u(e,{labelable:!0});const O={type:a,pattern:e.pattern};return NE(t,d,h),Y_(e,g,t),S.useEffect(()=>{if(t.current instanceof to(t.current).HTMLTextAreaElement){let j=t.current;Object.defineProperty(j,"defaultValue",{get:()=>j.value,set:()=>{},configurable:!0})}},[t]),{labelProps:P,inputProps:Pn(L,n==="input"?O:void 0,{disabled:r,readOnly:s,required:i&&c==="native","aria-required":i&&c==="aria"||void 0,"aria-invalid":b||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:d,onChange:j=>h(j.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(He.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,...T}),descriptionProps:_,errorMessageProps:A,isInvalid:b,validationErrors:x,validationDetails:k}}function az(e){var t,n,r,i,s,a,c;const d=ci(),{validationBehavior:h}=ew(tv)||{},[m,g]=oa(e,bk.variantKeys),{ref:b,as:x,type:k,label:P,baseRef:T,wrapperRef:_,description:A,className:L,classNames:O,autoFocus:j,startContent:$,endContent:Y,onClear:te,onChange:ie,validationState:B,validationBehavior:W=(t=h??d?.validationBehavior)!=null?t:"native",innerWrapperRef:G,onValueChange:ee=()=>{},...H}=m,le=S.useCallback(Xe=>{ee(Xe??"")},[ee]),[J,X]=S.useState(!1),V=x||"div",ae=(r=(n=e.disableAnimation)!=null?n:d?.disableAnimation)!=null?r:!1,M=Ii(b),U=Ii(T),oe=Ii(_),z=Ii(G),[me,Ce]=Au(m.value,(i=m.defaultValue)!=null?i:"",le),ye=k==="file",Oe=((c=(a=(s=M?.current)==null?void 0:s.files)==null?void 0:a.length)!=null?c:0)>0,Ne=["date","time","month","week","range"].includes(k),_e=!hL(me)||Ne||Oe,Qe=_e||J,at=k==="hidden",Ie=e.isMultiline,mt=Bt(O?.base,L,_e?"is-filled":""),pt=S.useCallback(()=>{var Xe;ye?M.current.value="":Ce(""),te?.(),(Xe=M.current)==null||Xe.focus()},[Ce,te,ye]);Sh(()=>{M.current&&Ce(M.current.value)},[M.current]);const{labelProps:Ut,inputProps:Ue,isInvalid:it,validationErrors:Kt,validationDetails:er,descriptionProps:an,errorMessageProps:_t}=sz({...e,validationBehavior:W,autoCapitalize:e.autoCapitalize,value:me,"aria-label":e.label?e["aria-label"]:mE(e["aria-label"],e.placeholder),inputElementType:Ie?"textarea":"input",onChange:Ce},M);ye&&(delete Ue.value,delete Ue.onChange);const{isFocusVisible:Rt,isFocused:Tn,focusProps:Er}=Pu({autoFocus:j,isTextInput:!0}),{isHovered:Nt,hoverProps:pe}=Eu({isDisabled:!!e?.isDisabled}),{isHovered:Se,hoverProps:ze}=Eu({isDisabled:!!e?.isDisabled}),{focusProps:nt,isFocusVisible:lt}=Pu(),{focusWithinProps:Wt}=kv({onFocusWithinChange:X}),{pressProps:Bn}=il({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:pt}),Jt=B==="invalid"||it,Pt=PF({labelPlacement:e.labelPlacement,label:P}),Pr=typeof m.errorMessage=="function"?m.errorMessage({isInvalid:Jt,validationErrors:Kt,validationDetails:er}):m.errorMessage||Kt?.join(" "),Ft=!!te||e.isClearable,tr=!!P||!!A||!!Pr,ln=!!m.placeholder,aa=!!P,ms=!!A||!!Pr,di=Pt==="outside-left",pi=Pt==="outside-top",ul=Pt==="outside"||di||pi,Mu=Pt==="inside",gs=M.current?(!M.current.value||M.current.value===""||!me||me==="")&&ln:!1,Vr=!!$,cl=ul?di||pi||ln||Pt==="outside"&&Vr:!1,fl=Pt==="outside"&&!ln&&!Vr,Zt=S.useMemo(()=>bk({...g,isInvalid:Jt,labelPlacement:Pt,isClearable:Ft,disableAnimation:ae}),[ds(g),Jt,Pt,Ft,Vr,ae]),vs=S.useCallback((Xe={})=>({ref:U,className:Zt.base({class:mt}),"data-slot":"base","data-filled":Ae(_e||ln||Vr||gs||ye),"data-filled-within":Ae(Qe||ln||Vr||gs||ye),"data-focus-within":Ae(J),"data-focus-visible":Ae(Rt),"data-readonly":Ae(e.isReadOnly),"data-focus":Ae(Tn),"data-hover":Ae(Nt||Se),"data-required":Ae(e.isRequired),"data-invalid":Ae(Jt),"data-disabled":Ae(e.isDisabled),"data-has-elements":Ae(tr),"data-has-helper":Ae(ms),"data-has-label":Ae(aa),"data-has-value":Ae(!gs),"data-hidden":Ae(at),...Wt,...Xe}),[Zt,mt,_e,Tn,Nt,Se,Jt,ms,aa,tr,gs,Vr,J,Rt,Qe,ln,Wt,at,e.isReadOnly,e.isRequired,e.isDisabled]),ys=S.useCallback((Xe={})=>({"data-slot":"label",className:Zt.label({class:O?.label}),...nn(Ut,ze,Xe)}),[Zt,Se,Ut,O?.label]),Ro=S.useCallback(Xe=>{Xe.key==="Escape"&&me&&(Ft||te)&&!e.isReadOnly&&(Ce(""),te?.())},[me,Ce,te,Ft,e.isReadOnly]),dl=S.useCallback((Xe={})=>({"data-slot":"input","data-filled":Ae(_e),"data-filled-within":Ae(Qe),"data-has-start-content":Ae(Vr),"data-has-end-content":Ae(!!Y),"data-type":k,className:Zt.input({class:Bt(O?.input,_e?"is-filled":"",Ie?"pe-0":"",k==="password"?"[&::-ms-reveal]:hidden":"")}),...nn(Er,Ue,Ef(H,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(Ue))}),Xe),"aria-readonly":Ae(e.isReadOnly),onChange:el(Ue.onChange,ie),onKeyDown:el(Ue.onKeyDown,Xe.onKeyDown,Ro),ref:M}),[Zt,me,Er,Ue,H,_e,Qe,Vr,Y,O?.input,e.isReadOnly,e.isRequired,ie,Ro]),bs=S.useCallback((Xe={})=>({ref:oe,"data-slot":"input-wrapper","data-hover":Ae(Nt||Se),"data-focus-visible":Ae(Rt),"data-focus":Ae(Tn),className:Zt.inputWrapper({class:Bt(O?.inputWrapper,_e?"is-filled":"")}),...nn(Xe,pe),onClick:so=>{M.current&&so.currentTarget===so.target&&M.current.focus()},style:{cursor:"text",...Xe.style}}),[Zt,Nt,Se,Rt,Tn,me,O?.inputWrapper]),la=S.useCallback((Xe={})=>({...Xe,ref:z,"data-slot":"inner-wrapper",onClick:so=>{M.current&&so.currentTarget===so.target&&M.current.focus()},className:Zt.innerWrapper({class:Bt(O?.innerWrapper,Xe?.className)})}),[Zt,O?.innerWrapper]),ua=S.useCallback((Xe={})=>({...Xe,"data-slot":"main-wrapper",className:Zt.mainWrapper({class:Bt(O?.mainWrapper,Xe?.className)})}),[Zt,O?.mainWrapper]),pl=S.useCallback((Xe={})=>({...Xe,"data-slot":"helper-wrapper",className:Zt.helperWrapper({class:Bt(O?.helperWrapper,Xe?.className)})}),[Zt,O?.helperWrapper]),Kf=S.useCallback((Xe={})=>({...Xe,...an,"data-slot":"description",className:Zt.description({class:Bt(O?.description,Xe?.className)})}),[Zt,O?.description]),Wf=S.useCallback((Xe={})=>({...Xe,..._t,"data-slot":"error-message",className:Zt.errorMessage({class:Bt(O?.errorMessage,Xe?.className)})}),[Zt,_t,O?.errorMessage]),Hf=S.useCallback((Xe={})=>({...Xe,type:"button",tabIndex:-1,disabled:e.isDisabled,"aria-label":"clear input","data-slot":"clear-button","data-focus-visible":Ae(lt),className:Zt.clearButton({class:Bt(O?.clearButton,Xe?.className)}),...nn(Bn,nt)}),[Zt,lt,Bn,nt,O?.clearButton]);return{Component:V,classNames:O,domRef:M,label:P,description:A,startContent:$,endContent:Y,labelPlacement:Pt,isClearable:Ft,hasHelper:ms,hasStartContent:Vr,isLabelOutside:cl,isOutsideLeft:di,isOutsideTop:pi,isLabelOutsideAsPlaceholder:fl,shouldLabelBeOutside:ul,shouldLabelBeInside:Mu,hasPlaceholder:ln,isInvalid:Jt,errorMessage:Pr,getBaseProps:vs,getLabelProps:ys,getInputProps:dl,getMainWrapperProps:ua,getInputWrapperProps:bs,getInnerWrapperProps:la,getHelperWrapperProps:pl,getDescriptionProps:Kf,getErrorMessageProps:Wf,getClearButtonProps:Hf}}function Rb(){return Rb=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},Rb.apply(null,arguments)}function lz(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}var uz=S.useLayoutEffect,cz=function(t){var n=He.useRef(t);return uz(function(){n.current=t}),n},Nk=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},fz=function(t,n){var r=He.useRef();return He.useCallback(function(i){t.current=i,r.current&&Nk(r.current,null),r.current=n,n&&Nk(n,i)},[n])},Fk={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},dz=function(t){Object.keys(Fk).forEach(function(n){t.style.setProperty(n,Fk[n],"important")})},Ok=dz,Dr=null,zk=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function pz(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Dr||(Dr=document.createElement("textarea"),Dr.setAttribute("tabindex","-1"),Dr.setAttribute("aria-hidden","true"),Ok(Dr)),Dr.parentNode===null&&document.body.appendChild(Dr);var i=e.paddingSize,s=e.borderSize,a=e.sizingStyle,c=a.boxSizing;Object.keys(a).forEach(function(b){var x=b;Dr.style[x]=a[x]}),Ok(Dr),Dr.value=t;var d=zk(Dr,e);Dr.value=t,d=zk(Dr,e),Dr.value="x";var h=Dr.scrollHeight-i,m=h*n;c==="border-box"&&(m=m+i+s),d=Math.max(m,d);var g=h*r;return c==="border-box"&&(g=g+i+s),d=Math.min(g,d),[d,h]}var jk=function(){},hz=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},mz=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],gz=!!document.documentElement.currentStyle,vz=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=hz(mz,n),i=r.boxSizing;if(i==="")return null;gz&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var s=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:s,borderSize:a}},yz=vz;function tw(e,t,n){var r=cz(n);S.useLayoutEffect(function(){var i=function(a){return r.current(a)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var bz=function(t,n){tw(document.body,"reset",function(r){t.current.form===r.target&&n(r)})},xz=function(t){tw(window,"resize",t)},wz=function(t){tw(document.fonts,"loadingdone",t)},Sz=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],kz=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,s=t.minRows,a=t.onChange,c=a===void 0?jk:a,d=t.onHeightChange,h=d===void 0?jk:d,m=lz(t,Sz),g=m.value!==void 0,b=S.useRef(null),x=fz(b,n),k=S.useRef(0),P=S.useRef(),T=function(){var L=b.current,O=r&&P.current?P.current:yz(L);if(O){P.current=O;var j=pz(O,L.value||L.placeholder||"x",s,i),$=j[0],Y=j[1];k.current!==$&&(k.current=$,L.style.setProperty("height",$+"px","important"),h($,{rowHeight:Y}))}},_=function(L){g||T(),c(L)};return S.useLayoutEffect(T),bz(b,function(){if(!g){var A=b.current.value;requestAnimationFrame(function(){var L=b.current;L&&A!==L.value&&T()})}}),xz(T),wz(T),S.createElement("textarea",Rb({},m,{onChange:_,ref:x}))},Cz=S.forwardRef(kz),s2=jr(({style:e,minRows:t=3,maxRows:n=8,cacheMeasurements:r=!1,disableAutosize:i=!1,onHeightChange:s,...a},c)=>{const{Component:d,label:h,description:m,startContent:g,endContent:b,hasHelper:x,shouldLabelBeOutside:k,shouldLabelBeInside:P,isInvalid:T,errorMessage:_,getBaseProps:A,getLabelProps:L,getInputProps:O,getInnerWrapperProps:j,getInputWrapperProps:$,getHelperWrapperProps:Y,getDescriptionProps:te,getErrorMessageProps:ie,isClearable:B,getClearButtonProps:W}=az({...a,ref:c,isMultiline:!0}),[G,ee]=S.useState(t>1),[H,le]=S.useState(!1),J=h?D.jsx("label",{...L(),children:h}):null,X=O(),V=(me,Ce)=>{if(t===1&&ee(me>=Ce.rowHeight*2),n>t){const ye=me>=n*Ce.rowHeight;le(ye)}s?.(me,Ce)},ae=i?D.jsx("textarea",{...X,style:nn(X.style,e??{})}):D.jsx(Cz,{...X,cacheMeasurements:r,"data-hide-scroll":Ae(!H),maxRows:n,minRows:t,style:nn(X.style,e??{}),onHeightChange:V}),M=S.useMemo(()=>B?D.jsx("button",{...W(),children:D.jsx(N_,{})}):null,[B,W]),U=S.useMemo(()=>g||b?D.jsxs("div",{...j(),children:[g,ae,b]}):D.jsx("div",{...j(),children:ae}),[g,X,b,j]),oe=T&&_,z=oe||m;return D.jsxs(d,{...A(),children:[k?J:null,D.jsxs("div",{...$(),"data-has-multiple-rows":Ae(G),children:[P?J:null,U,M]}),x&&z?D.jsx("div",{...Y(),children:oe?D.jsx("div",{...ie(),children:_}):D.jsx("div",{...te(),children:m})}):null]})});s2.displayName="HeroUI.Textarea";var Ez=s2;function Pz(e,t){let{role:n="dialog"}=e,r=W0();r=e["aria-label"]?void 0:r;let i=S.useRef(!1);return S.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){Cu(t.current);let s=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),Cu(t.current)),i.current=!1)},500);return()=>{clearTimeout(s)}}},[t]),v_(),{dialogProps:{...$u(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:s=>{i.current&&s.stopPropagation()}},titleProps:{id:r}}}function Tz(e){var t,n;const r=ci(),[i,s]=oa(e,wk.variantKeys),{ref:a,as:c,src:d,className:h,classNames:m,loading:g,isBlurred:b,fallbackSrc:x,isLoading:k,disableSkeleton:P=!!x,removeWrapper:T=!1,onError:_,onLoad:A,srcSet:L,sizes:O,crossOrigin:j,...$}=i,Y=S6({src:d,loading:g,onError:_,onLoad:A,ignoreFallback:!1,srcSet:L,sizes:O,crossOrigin:j,shouldBypassImageLoad:c!==void 0}),te=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,ie=Y==="loaded"&&!k,B=Y==="loading"||k,W=e.isZoomed,G=c||"img",ee=Ii(a),{w:H,h:le}=S.useMemo(()=>({w:i.width?typeof i.width=="number"?`${i.width}px`:i.width:"fit-content",h:i.height?typeof i.height=="number"?`${i.height}px`:i.height:"auto"}),[i?.width,i?.height]),J=(!d||!ie)&&!!x,X=B&&!P,V=S.useMemo(()=>wk({...s,disableAnimation:te,showSkeleton:X}),[ds(s),te,X]),ae=Bt(h,m?.img),M=(z={})=>{const me=Bt(ae,z?.className);return{src:d,ref:ee,"data-loaded":Ae(ie),className:V.img({class:me}),loading:g,srcSet:L,sizes:O,crossOrigin:j,...$,style:{...$?.height&&{height:le},...z.style,...$.style}}},U=S.useCallback(()=>{const z=J?{backgroundImage:`url(${x})`}:{};return{className:V.wrapper({class:m?.wrapper}),style:{...z,maxWidth:H}}},[V,J,x,m?.wrapper,H]),oe=S.useCallback(()=>({src:d,"aria-hidden":Ae(!0),className:V.blurredImg({class:m?.blurredImg})}),[V,d,m?.blurredImg]);return{Component:G,domRef:ee,slots:V,classNames:m,isBlurred:b,disableSkeleton:P,fallbackSrc:x,removeWrapper:T,isZoomed:W,isLoading:B,getImgProps:M,getWrapperProps:U,getBlurredImgProps:oe}}var a2=jr((e,t)=>{const{Component:n,domRef:r,slots:i,classNames:s,isBlurred:a,isZoomed:c,fallbackSrc:d,removeWrapper:h,disableSkeleton:m,getImgProps:g,getWrapperProps:b,getBlurredImgProps:x}=Tz({...e,ref:t}),k=D.jsx(n,{ref:r,...g()});if(h)return k;const P=D.jsx("div",{className:i.zoomedWrapper({class:s?.zoomedWrapper}),children:k});return a?D.jsxs("div",{...b(),children:[c?P:k,S.cloneElement(k,x())]}):c||!m||d?D.jsxs("div",{...b(),children:[" ",c?P:k]}):k});a2.displayName="HeroUI.Image";var y0=a2,[_z,l2]=pv({name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"}),u2=jr((e,t)=>{const{as:n,children:r,className:i,...s}=e,{slots:a,classNames:c,bodyId:d,setBodyMounted:h}=l2(),m=Ii(t),g=n||"div";return S.useEffect(()=>(h(!0),()=>h(!1)),[h]),D.jsx(g,{ref:m,className:a.body({class:Bt(c?.body,i)}),id:d,...s,children:r})});u2.displayName="HeroUI.ModalBody";var Iz=u2,$z={enter:{scale:"var(--scale-enter)",y:"var(--slide-enter)",opacity:1,willChange:"auto",transition:{scale:{duration:.4,ease:Bp.ease},opacity:{duration:.4,ease:Bp.ease},y:{type:"spring",bounce:0,duration:.6}}},exit:{scale:"var(--scale-exit)",y:"var(--slide-exit)",opacity:0,willChange:"transform",transition:{duration:.3,ease:Bp.ease}}},ss=typeof document<"u"&&window.visualViewport,Az=He.createContext(!1);function Rz(){return!1}function Lz(){return!0}function Mz(e){return()=>{}}function Dz(){return typeof He.useSyncExternalStore=="function"?He.useSyncExternalStore(Mz,Rz,Lz):S.useContext(Az)}function Nz(){let e=Dz(),[t,n]=S.useState(()=>e?{width:0,height:0}:Bk());return S.useEffect(()=>{let r=()=>{n(i=>{let s=Bk();return s.width===i.width&&s.height===i.height?i:s})};return ss?ss.addEventListener("resize",r):window.addEventListener("resize",r),()=>{ss?ss.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function Bk(){return{width:ss&&ss?.width||window.innerWidth,height:ss&&ss?.height||window.innerHeight}}var Vk=()=>io(()=>import("./index-g-_fwkPj.js"),[]).then(e=>e.default),c2=e=>{const{as:t,children:n,role:r="dialog",...i}=e,{Component:s,domRef:a,slots:c,classNames:d,motionProps:h,backdrop:m,closeButton:g,hideCloseButton:b,disableAnimation:x,getDialogProps:k,getBackdropProps:P,getCloseButtonProps:T,onClose:_}=l2(),A=t||s||"div",L=Nz(),{dialogProps:O}=Pz({role:r},a),j=S.isValidElement(g)?S.cloneElement(g,T()):D.jsx("button",{...T(),children:D.jsx(e6,{})}),$=S.useCallback(G=>{G.key==="Tab"&&G.nativeEvent.isComposing&&(G.stopPropagation(),G.preventDefault())},[]),Y=k(nn(O,i)),te=D.jsxs(A,{...Y,onKeyDown:el(Y.onKeyDown,$),children:[D.jsx(ak,{onDismiss:_}),!b&&j,typeof n=="function"?n(_):n,D.jsx(ak,{onDismiss:_})]}),ie=S.useMemo(()=>m==="transparent"?null:x?D.jsx("div",{...P()}):D.jsx($f,{features:Vk,children:D.jsx(Af.div,{animate:"enter",exit:"exit",initial:"exit",variants:Zg.fade,...P()})}),[m,x,P]),B={"--visual-viewport-height":L.height+"px"},W=x?D.jsx("div",{className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",style:B,children:te}):D.jsx($f,{features:Vk,children:D.jsx(Af.div,{animate:"enter",className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",exit:"exit",initial:"exit",variants:$z,...h,style:B,children:te})});return D.jsxs("div",{tabIndex:-1,children:[ie,W]})};c2.displayName="HeroUI.ModalContent";var Fz=c2;function Oz(e={shouldBlockScroll:!0},t,n){let{overlayProps:r,underlayProps:i}=n2({...e,isOpen:t.isOpen,onClose:t.close},n);return dF({isDisabled:!t.isOpen||!e.shouldBlockScroll}),v_(),S.useEffect(()=>{if(t.isOpen&&n.current)return kF([n.current])},[t.isOpen,n]),{modalProps:Pn(r),underlayProps:i}}function zz(e){var t,n,r;const i=ci(),[s,a]=oa(e,xk.variantKeys),{ref:c,as:d,className:h,classNames:m,isOpen:g,defaultOpen:b,onOpenChange:x,motionProps:k,closeButton:P,isDismissable:T=!0,hideCloseButton:_=!1,shouldBlockScroll:A=!0,portalContainer:L,isKeyboardDismissDisabled:O=!1,onClose:j,...$}=s,Y=d||"section",te=Ii(c),ie=S.useRef(null),[B,W]=S.useState(!1),[G,ee]=S.useState(!1),H=(n=(t=e.disableAnimation)!=null?t:i?.disableAnimation)!=null?n:!1,le=S.useId(),J=S.useId(),X=S.useId(),V=t2({isOpen:g,defaultOpen:b,onOpenChange:_e=>{x?.(_e),_e||j?.()}}),{modalProps:ae,underlayProps:M}=Oz({isDismissable:T,shouldBlockScroll:A,isKeyboardDismissDisabled:O},V,te),{buttonProps:U}=B_({onPress:V.close},ie),{isFocusVisible:oe,focusProps:z}=Pu(),me=Bt(m?.base,h),Ce=S.useMemo(()=>xk({...a,disableAnimation:H}),[ds(a),H]),ye=(_e={},Qe=null)=>{var at;return{ref:gE(Qe,te),...nn(ae,$,_e),className:Ce.base({class:Bt(me,_e.className)}),id:le,"data-open":Ae(V.isOpen),"data-dismissable":Ae(T),"aria-modal":Ae(!0),"data-placement":(at=e?.placement)!=null?at:"right","aria-labelledby":B?J:void 0,"aria-describedby":G?X:void 0}},Oe=S.useCallback((_e={})=>({className:Ce.backdrop({class:m?.backdrop}),...M,..._e}),[Ce,m,M]),Ne=()=>({role:"button",tabIndex:0,"aria-label":"Close","data-focus-visible":Ae(oe),className:Ce.closeButton({class:m?.closeButton}),...nn(U,z)});return{Component:Y,slots:Ce,domRef:te,headerId:J,bodyId:X,motionProps:k,classNames:m,isDismissable:T,closeButton:P,hideCloseButton:_,portalContainer:L,shouldBlockScroll:A,backdrop:(r=e.backdrop)!=null?r:"opaque",isOpen:V.isOpen,onClose:V.close,disableAnimation:H,setBodyMounted:ee,setHeaderMounted:W,getDialogProps:ye,getBackdropProps:Oe,getCloseButtonProps:Ne}}var f2=jr((e,t)=>{const{children:n,...r}=e,i=zz({...r,ref:t}),s=D.jsx(CF,{portalContainer:i.portalContainer,children:n});return D.jsx(_z,{value:i,children:i.disableAnimation&&i.isOpen?s:D.jsx(ol,{children:i.isOpen?s:null})})});f2.displayName="HeroUI.Modal";var jz=f2;function Bz(e={}){const{id:t,defaultOpen:n,isOpen:r,onClose:i,onOpen:s,onChange:a=()=>{}}=e,c=Ab(s),d=Ab(i),[h,m]=Au(r,n||!1,a),g=S.useId(),b=t||g,x=r!==void 0,k=S.useCallback(()=>{x||m(!1),d?.()},[x,d]),P=S.useCallback(()=>{x||m(!0),c?.()},[x,c]),T=S.useCallback(()=>{(h?k:P)()},[h,P,k]);return{isOpen:!!h,onOpen:P,onClose:k,onOpenChange:T,isControlled:x,getButtonProps:(_={})=>({..._,"aria-expanded":h,"aria-controls":b,onClick:Tf(_.onClick,T)}),getDisclosureProps:(_={})=>({..._,hidden:!h,id:b})}}function Vz(e){var t,n;const r=ci(),[i,s]=oa(e,yk.variantKeys),{as:a,children:c,isLoaded:d=!1,className:h,classNames:m,...g}=i,b=a||"div",x=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,k=S.useMemo(()=>yk({...s,disableAnimation:x}),[ds(s),x,c]),P=Bt(m?.base,h);return{Component:b,children:c,slots:k,classNames:m,getSkeletonProps:(A={})=>({"data-loaded":Ae(d),className:k.base({class:Bt(P,A?.className)}),...g}),getContentProps:(A={})=>({className:k.content({class:Bt(m?.content,A?.className)})})}}var d2=jr((e,t)=>{const{Component:n,children:r,getSkeletonProps:i,getContentProps:s}=Vz({...e});return D.jsx(n,{ref:t,...i(),children:D.jsx("div",{...s(),children:r})})});d2.displayName="HeroUI.Skeleton";var Uz=d2;function Kz(e={}){const{domRef:t,isEnabled:n=!0,overflowCheck:r="vertical",visibility:i="auto",offset:s=0,onVisibilityChange:a,updateDeps:c=[]}=e,d=S.useRef(i);S.useEffect(()=>{const h=t?.current;if(!h||!n)return;const m=(x,k,P,T,_)=>{if(i==="auto"){const A=`${T}${gL(_)}Scroll`;k&&P?(h.dataset[A]="true",h.removeAttribute(`data-${T}-scroll`),h.removeAttribute(`data-${_}-scroll`)):(h.dataset[`${T}Scroll`]=k.toString(),h.dataset[`${_}Scroll`]=P.toString(),h.removeAttribute(`data-${T}-${_}-scroll`))}else{const A=k&&P?"both":k?T:P?_:"none";A!==d.current&&(a?.(A),d.current=A)}},g=()=>{var x,k;const P=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],T=h.querySelector('ul[data-slot="list"]'),_=+((x=T?.getAttribute("data-virtual-scroll-height"))!=null?x:h.scrollHeight),A=+((k=T?.getAttribute("data-virtual-scroll-top"))!=null?k:h.scrollTop);for(const{type:L,prefix:O,suffix:j}of P)if(r===L||r==="both"){const $=L==="vertical"?A>s:h.scrollLeft>s,Y=L==="vertical"?A+h.clientHeight+s<_:h.scrollLeft+h.clientWidth+s<h.scrollWidth;m(L,$,Y,O,j)}},b=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(x=>{h.removeAttribute(`data-${x}-scroll`)})};return g(),h.addEventListener("scroll",g,!0),i!=="auto"&&(b(),i==="both"?(h.dataset.topBottomScroll=String(r==="vertical"),h.dataset.leftRightScroll=String(r==="horizontal")):(h.dataset.topBottomScroll="false",h.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(x=>{h.dataset[`${x}Scroll`]=String(i===x)}))),()=>{h.removeEventListener("scroll",g,!0),b()}},[...c,n,i,r,a,t])}function Wz(e){var t;const[n,r]=oa(e,vk.variantKeys),{ref:i,as:s,children:a,className:c,style:d,size:h=40,offset:m=0,visibility:g="auto",isEnabled:b=!0,onVisibilityChange:x,...k}=n,P=s||"div",T=Ii(i);Kz({domRef:T,offset:m,visibility:g,isEnabled:b,onVisibilityChange:x,updateDeps:[a],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const _=S.useMemo(()=>vk({...r,className:c}),[ds(r),c]);return{Component:P,styles:_,domRef:T,children:a,getBaseProps:(L={})=>{var O;return{ref:T,className:_,"data-orientation":(O=e.orientation)!=null?O:"vertical",style:{"--scroll-shadow-size":`${h}px`,...d,...L.style},...k,...L}}}}var p2=jr((e,t)=>{const{Component:n,children:r,getBaseProps:i}=Wz({...e,ref:t});return D.jsx(n,{...i(),children:r})});p2.displayName="HeroUI.ScrollShadow";var h2=p2;const ZG={Like:"like",Dislike:"dislike"},Hz={Start:"START"},Sf={User:"user",Assistant:"assistant"},lf={Pending:"pending",InProgress:"in_progress",Completed:"completed"};class m2{constructor(t={}){if(this.chunkQueue=new Map,this.baseUrl=t.baseUrl??"",this.auth=t.auth,this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.slice(0,-1)),!!this.baseUrl)try{new URL(this.baseUrl)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}. Please provide a valid URL.`)}}getBaseUrl(){return this.baseUrl}_buildApiUrl(t){return`${this.baseUrl}${t}`}async _makeRequest(t,n={}){const i={...{"Content-Type":"application/json"},...this.normalizeHeaders(n.headers)};this.auth?.getToken&&(i.Authorization=`Bearer ${this.auth.getToken()}`);const s=await fetch(t,{...n,headers:i});if(s.status===401&&this.auth?.onUnauthorized?.(),!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s}async makeRequest(t,...n){const r=n[0],{method:i="GET",body:s,pathParams:a,queryParams:c,headers:d={},...h}=r||{},m={method:i,headers:d,...h};s&&i!=="GET"&&(m.body=typeof s=="string"?s:JSON.stringify(s));let g=t.toString();if(a&&(g=g.replace(/:([^/]+)/g,(x,k)=>{if(k in a){const P=a[k];return encodeURIComponent(String(P))}else throw new Error(`Path parameter ${k} is required`)})),c&&Object.keys(c).length>0){const x=new URLSearchParams;for(const[k,P]of Object.entries(c))P!=null&&x.append(k,String(P));g+=`?${x.toString()}`}return g=this._buildApiUrl(g),(await this._makeRequest(g,m)).json()}makeStreamRequest(t,n,r,i,s){let a=!1;const c=async h=>{const m=h.body?.pipeThrough(new TextDecoderStream).getReader();if(!m)throw new Error("Response body is null");let g="";for(;!a&&!i?.aborted;)try{const{value:b,done:x}=await m.read();if(x){r.onClose?.();break}g+=b;const k=g.split(`
56
- `);g=k.pop()??"";for(const P of k)if(P.startsWith("data: "))try{const T=P.replace("data: ","").trim(),_=JSON.parse(T);if(_.type==="chunked_content"){this.handleChunkedContent(_,r);continue}await r.onMessage(_),await new Promise(A=>setTimeout(A,0))}catch(T){console.error("Error parsing JSON:",T),await r.onError(new Error("Error processing server response"))}}catch(b){if(i?.aborted)return;console.error("Stream error:",b),await r.onError(new Error("Error reading stream"));break}},d=async()=>{try{const m={...{"Content-Type":"application/json",Accept:"text/event-stream"},...s};this.auth?.getToken&&(m.Authorization=`Bearer ${this.auth.getToken()}`);const g=await fetch(this._buildApiUrl(t.toString()),{method:"POST",headers:m,body:JSON.stringify(n),signal:i});if(g.status===401&&this.auth?.onUnauthorized?.(),!g.ok)throw new Error(`HTTP error! status: ${g.status}`);await c(g)}catch(h){if(i?.aborted)return;console.error("Request error:",h);const m=h instanceof Error?h.message:"Error connecting to server";await r.onError(new Error(m))}};try{d()}catch(h){const m=h instanceof Error?h.message:"Failed to start stream";r.onError(new Error(m))}return()=>{a=!0}}normalizeHeaders(t){return t?t instanceof Headers?Object.fromEntries(t.entries()):Array.isArray(t)?Object.fromEntries(t):t:{}}async handleChunkedContent(t,n){const i=t.content,{content_type:s,id:a,chunk_index:c,total_chunks:d,mime_type:h,data:m}=i;this.chunkQueue.has(a)||this.chunkQueue.set(a,{chunks:new Map,totalChunks:d,mimeType:h});const g=this.chunkQueue.get(a);if(g.chunks.set(c,m),g.chunks.size!==d)return;const x=Array.from({length:d},(k,P)=>g.chunks.get(P)).join("");try{atob(x)}catch(k){this.chunkQueue.delete(a),console.error("❌ Invalid base64 data: ",k),await n.onError(new Error("Error reading stream"))}if(s==="image"){const k={type:"image",content:{id:a,url:`${g.mimeType},${x}`}};await n.onMessage(k)}this.chunkQueue.delete(a)}}const g2=S.createContext(null);function Gz({children:e,...t}){const n=S.useMemo(()=>new m2(t),[t]),r=S.useMemo(()=>({client:n}),[n]);return D.jsx(g2.Provider,{value:r,children:e})}function nw(){const e=S.useContext(g2);if(!e)throw new Error("useRagbitsContext must be used within a RagbitsProvider");return e}function qz(e,t){const{client:n}=nw(),[r,i]=S.useState(null),[s,a]=S.useState(null),[c,d]=S.useState(!1),h=S.useRef(null),m=S.useCallback(()=>{if(!h.current)return null;h.current.abort(),h.current=null,d(!1)},[]),g=S.useCallback(async(...x)=>{const k=x[0];h.current&&c&&h.current.abort();const P=new AbortController;h.current=P,d(!0),a(null);try{const _={...{...t,...k||{},headers:{...t?.headers,...k?.headers||{}}},signal:P.signal},A=await n.makeRequest(e,_);return P.signal.aborted||(i(A),h.current=null),A}catch(T){if(!P.signal.aborted){const _=T instanceof Error?T:new Error("API call failed");throw a(_),h.current=null,_}throw T}finally{P.signal.aborted||d(!1)}},[n,e,t,c]),b=S.useCallback(()=>{m(),i(null),a(null),d(!1)},[m]);return{data:r,error:s,isLoading:c,call:g,reset:b,abort:m}}var To=(e=>(e.LIGHT="light",e.DARK="dark",e))(To||{});const v2=S.createContext(null),Yz="🐰",Xz="Ragbits Chat",Qz="by deepsense.ai",Jz="Loading...",y2="";function Zz(){return window.matchMedia("(prefers-color-scheme: dark)").matches?To.DARK:To.LIGHT}function Uk(){const e=window.localStorage.getItem("theme");return e===To.DARK||e===To.LIGHT?e:Zz()}function e8(e){return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}const t8=({children:e})=>{const t=S.useSyncExternalStore(e8,Uk,Uk),n=S.useRef(!1),r=new m2({baseUrl:y2});S.useEffect(()=>{if(n.current)return;(async()=>{try{const c=r.getBaseUrl(),d=await fetch(`${c}/api/theme`);if(d.ok){const h=await d.text(),m=document.getElementById("heroui-custom-theme");m&&m.remove();const g=document.createElement("style");g.id="heroui-custom-theme",g.textContent=h,document.head.appendChild(g),console.log("Custom HeroUI theme loaded successfully"),n.current=!0}}catch(c){console.warn("No custom theme available:",c),n.current=!0}})()},[]),S.useEffect(()=>{document.documentElement.classList.toggle("dark",t===To.DARK)},[t]);const i=S.useCallback(a=>{window.localStorage.setItem("theme",a),window.dispatchEvent(new Event("storage"))},[]),s=S.useMemo(()=>({theme:t,setTheme:i}),[t,i]);return D.jsx(v2.Provider,{value:s,children:e})},b2=Object.freeze({left:0,top:0,width:16,height:16}),nv=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),rw=Object.freeze({...b2,...nv}),Lb=Object.freeze({...rw,body:"",hidden:!1});function n8(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Kk(e,t){const n=n8(e,t);for(const r in Lb)r in nv?r in e&&!(r in n)&&(n[r]=nv[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function r8(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const c=r[a]&&r[a].parent,d=c&&s(c);d&&(i[a]=[c].concat(d))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(s),i}function i8(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function a(c){s=Kk(r[c]||i[c],s)}return a(t),n.forEach(a),Kk(e,s)}function x2(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=r8(e);for(const i in r){const s=r[i];s&&(t(i,i8(e,i,s)),n.push(i))}return n}const o8={provider:"",aliases:{},not_found:{},...b2};function b0(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function w2(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!b0(e,o8))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i||typeof s.body!="string"||!b0(s,Lb))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],a=s.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!b0(s,Lb))return null}return t}const S2=/^[a-z0-9]+(-[a-z0-9]+)*$/,Cv=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const c=i.pop(),d=i.pop(),h={provider:i.length>0?i[0]:r,prefix:d,name:c};return t&&!Dg(h)?null:h}const s=i[0],a=s.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Dg(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!Dg(c,n)?null:c}return null},Dg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Wk=Object.create(null);function s8(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Rf(e,t){const n=Wk[e]||(Wk[e]=Object.create(null));return n[t]||(n[t]=s8(e,t))}function k2(e,t){return w2(t)?x2(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function a8(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let ah=!1;function C2(e){return typeof e=="boolean"&&(ah=e),ah}function Hk(e){const t=typeof e=="string"?Cv(e,!0,ah):e;if(t){const n=Rf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function l8(e,t){const n=Cv(e,!0,ah);if(!n)return!1;const r=Rf(n.provider,n.prefix);return t?a8(r,n.name,t):(r.missing.add(n.name),!0)}function u8(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ah&&!t&&!e.prefix){let i=!1;return w2(e)&&(e.prefix="",x2(e,(s,a)=>{l8(s,a)&&(i=!0)})),i}const n=e.prefix;if(!Dg({prefix:n,name:"a"}))return!1;const r=Rf(t,n);return!!k2(r,e)}const E2=Object.freeze({width:null,height:null}),P2=Object.freeze({...E2,...nv}),c8=/(-?[0-9.]*[0-9]+[0-9.]*)/g,f8=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Gk(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(c8);if(r===null||!r.length)return e;const i=[];let s=r.shift(),a=f8.test(s);for(;;){if(a){const c=parseFloat(s);isNaN(c)?i.push(s):i.push(Math.ceil(c*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");a=!a}}function d8(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),s=e.indexOf("</"+t);if(i===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;n+=e.slice(i+1,s).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function p8(e,t){return e?"<defs>"+e+"</defs>"+t:t}function h8(e,t,n){const r=d8(e);return p8(r.defs,t+r.content+n)}const m8=e=>e==="unset"||e==="undefined"||e==="none";function g8(e,t){const n={...rw,...e},r={...P2,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(P=>{const T=[],_=P.hFlip,A=P.vFlip;let L=P.rotate;_?A?L+=2:(T.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),T.push("scale(-1 1)"),i.top=i.left=0):A&&(T.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),T.push("scale(1 -1)"),i.top=i.left=0);let O;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:O=i.height/2+i.top,T.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:T.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:O=i.width/2+i.left,T.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}L%2===1&&(i.left!==i.top&&(O=i.left,i.left=i.top,i.top=O),i.width!==i.height&&(O=i.width,i.width=i.height,i.height=O)),T.length&&(s=h8(s,'<g transform="'+T.join(" ")+'">',"</g>"))});const a=r.width,c=r.height,d=i.width,h=i.height;let m,g;a===null?(g=c===null?"1em":c==="auto"?h:c,m=Gk(g,d/h)):(m=a==="auto"?d:a,g=c===null?Gk(m,h/d):c==="auto"?h:c);const b={},x=(P,T)=>{m8(T)||(b[P]=T.toString())};x("width",m),x("height",g);const k=[i.left,i.top,d,h];return b.viewBox=k.join(" "),{attributes:b,viewBox:k,body:s}}const v8=/\sid="(\S+)"/g,y8="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let b8=0;function x8(e,t=y8){const n=[];let r;for(;r=v8.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof t=="function"?t(s):t+(b8++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const Mb=Object.create(null);function w8(e,t){Mb[e]=t}function Db(e){return Mb[e]||Mb[""]}function iw(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ow=Object.create(null),wp=["https://api.simplesvg.com","https://api.unisvg.com"],Ng=[];for(;wp.length>0;)wp.length===1||Math.random()>.5?Ng.push(wp.shift()):Ng.push(wp.pop());ow[""]=iw({resources:["https://api.iconify.design"].concat(Ng)});function S8(e,t){const n=iw(t);return n===null?!1:(ow[e]=n,!0)}function sw(e){return ow[e]}const k8=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let qk=k8();function C8(e,t){const n=sw(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function E8(e){return e===404}const P8=(e,t,n)=>{const r=[],i=C8(e,t),s="icons";let a={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((d,h)=>{c+=d.length+1,c>=i&&h>0&&(r.push(a),a={type:s,provider:e,prefix:t,icons:[]},c=d.length),a.icons.push(d)}),r.push(a),r};function T8(e){if(typeof e=="string"){const t=sw(e);if(t)return t.path}return"/"}const _8=(e,t,n)=>{if(!qk){n("abort",424);return}let r=T8(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),d=new URLSearchParams({icons:c});r+=s+".json?"+d.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;qk(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(E8(a)?"abort":"next",a)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},I8={prepare:P8,send:_8};function $8(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,a=i.prefix,c=i.name,d=n[s]||(n[s]=Object.create(null)),h=d[a]||(d[a]=Rf(s,a));let m;c in h.icons?m=t.loaded:a===""||h.missing.has(c)?m=t.missing:m=t.pending;const g={provider:s,prefix:a,name:c};m.push(g)}),t}function T2(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function A8(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const a=s.icons,c=a.pending.length;a.pending=a.pending.filter(d=>{if(d.prefix!==i)return!0;const h=d.name;if(e.icons[h])a.loaded.push({provider:r,prefix:i,name:h});else if(e.missing.has(h))a.missing.push({provider:r,prefix:i,name:h});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||T2([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let R8=0;function L8(e,t,n){const r=R8++,i=T2.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),i}function M8(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?Cv(i,t,n):i;s&&r.push(s)}),r}var D8={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function N8(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let $=e.resources.slice(0);for(a=[];$.length>1;){const Y=Math.floor(Math.random()*$.length);a.push($[Y]),$=$.slice(0,Y).concat($.slice(Y+1))}a=a.concat($)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let d="pending",h=0,m,g=null,b=[],x=[];typeof r=="function"&&x.push(r);function k(){g&&(clearTimeout(g),g=null)}function P(){d==="pending"&&(d="aborted"),k(),b.forEach($=>{$.status==="pending"&&($.status="aborted")}),b=[]}function T($,Y){Y&&(x=[]),typeof $=="function"&&x.push($)}function _(){return{startTime:c,payload:t,status:d,queriesSent:h,queriesPending:b.length,subscribe:T,abort:P}}function A(){d="failed",x.forEach($=>{$(void 0,m)})}function L(){b.forEach($=>{$.status==="pending"&&($.status="aborted")}),b=[]}function O($,Y,te){const ie=Y!=="success";switch(b=b.filter(B=>B!==$),d){case"pending":break;case"failed":if(ie||!e.dataAfterTimeout)return;break;default:return}if(Y==="abort"){m=te,A();return}if(ie){m=te,b.length||(a.length?j():A());return}if(k(),L(),!e.random){const B=e.resources.indexOf($.resource);B!==-1&&B!==e.index&&(e.index=B)}d="completed",x.forEach(B=>{B(te)})}function j(){if(d!=="pending")return;k();const $=a.shift();if($===void 0){if(b.length){g=setTimeout(()=>{k(),d==="pending"&&(L(),A())},e.timeout);return}A();return}const Y={status:"pending",resource:$,callback:(te,ie)=>{O(Y,te,ie)}};b.push(Y),h++,g=setTimeout(j,e.rotate),n($,t,Y.callback)}return setTimeout(j),_}function _2(e){const t={...D8,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function i(c,d,h){const m=N8(t,c,d,(g,b)=>{r(),h&&h(g,b)});return n.push(m),m}function s(c){return n.find(d=>c(d))||null}return{query:i,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Yk(){}const x0=Object.create(null);function F8(e){if(!x0[e]){const t=sw(e);if(!t)return;const n=_2(t),r={config:t,redundancy:n};x0[e]=r}return x0[e]}function O8(e,t,n){let r,i;if(typeof e=="string"){const s=Db(e);if(!s)return n(void 0,424),Yk;i=s.send;const a=F8(e);a&&(r=a.redundancy)}else{const s=iw(e);if(s){r=_2(s);const a=e.resources?e.resources[0]:"",c=Db(a);c&&(i=c.send)}}return!r||!i?(n(void 0,424),Yk):r.query(t,i,n)().abort}function Xk(){}function z8(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,A8(e)}))}function j8(e){const t=[],n=[];return e.forEach(r=>{(r.match(S2)?t:n).push(r)}),{valid:t,invalid:n}}function Sp(e,t,n){function r(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(n&&typeof n=="object")try{if(!k2(e,n).length){r();return}}catch(i){console.error(i)}r(),z8(e)}function Qk(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function B8(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const s=e.loadIcon;if(e.loadIcons&&(i.length>1||!s)){Qk(e.loadIcons(i,r,n),m=>{Sp(e,i,m)});return}if(s){i.forEach(m=>{const g=s(m,r,n);Qk(g,b=>{const x=b?{prefix:r,icons:{[m]:b}}:null;Sp(e,[m],x)})});return}const{valid:a,invalid:c}=j8(i);if(c.length&&Sp(e,c,null),!a.length)return;const d=r.match(S2)?Db(n):null;if(!d){Sp(e,a,null);return}d.prepare(n,r,a).forEach(m=>{O8(n,m,g=>{Sp(e,m.icons,g)})})}))}const I2=(e,t)=>{const n=M8(e,!0,C2()),r=$8(n);if(!r.pending.length){let d=!0;return t&&setTimeout(()=>{d&&t(r.loaded,r.missing,r.pending,Xk)}),()=>{d=!1}}const i=Object.create(null),s=[];let a,c;return r.pending.forEach(d=>{const{provider:h,prefix:m}=d;if(m===c&&h===a)return;a=h,c=m,s.push(Rf(h,m));const g=i[h]||(i[h]=Object.create(null));g[m]||(g[m]=[])}),r.pending.forEach(d=>{const{provider:h,prefix:m,name:g}=d,b=Rf(h,m),x=b.pendingIcons||(b.pendingIcons=new Set);x.has(g)||(x.add(g),i[h][m].push(g))}),s.forEach(d=>{const h=i[d.provider][d.prefix];h.length&&B8(d,h)}),t?L8(t,r,s):Xk};function V8(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in E2?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const U8=/[\s,]+/;function K8(e,t){t.split(U8).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function W8(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function H8(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function G8(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function q8(e){return"data:image/svg+xml,"+G8(e)}function Y8(e){return'url("'+q8(e)+'")'}let Vp;function X8(){try{Vp=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Vp=null}}function Q8(e){return Vp===void 0&&X8(),Vp?Vp.createHTML(e):e}const $2={...P2,inline:!1},J8={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Z8={display:"inline-block"},Nb={backgroundColor:"currentColor"},A2={backgroundColor:"transparent"},Jk={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Zk={WebkitMask:Nb,mask:Nb,background:A2};for(const e in Zk){const t=Zk[e];for(const n in Jk)t[e+n]=Jk[n]}const e7={...$2,inline:!0};function eC(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const t7=(e,t,n)=>{const r=t.inline?e7:$2,i=V8(r,t),s=t.mode||"svg",a={},c=t.style||{},d={...s==="svg"?J8:{}};if(n){const T=Cv(n,!1,!0);if(T){const _=["iconify"],A=["provider","prefix"];for(const L of A)T[L]&&_.push("iconify--"+T[L]);d.className=_.join(" ")}}for(let T in t){const _=t[T];if(_!==void 0)switch(T){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":d.ref=_;break;case"className":d[T]=(d[T]?d[T]+" ":"")+_;break;case"inline":case"hFlip":case"vFlip":i[T]=_===!0||_==="true"||_===1;break;case"flip":typeof _=="string"&&K8(i,_);break;case"color":a.color=_;break;case"rotate":typeof _=="string"?i[T]=W8(_):typeof _=="number"&&(i[T]=_);break;case"ariaHidden":case"aria-hidden":_!==!0&&_!=="true"&&delete d["aria-hidden"];break;default:r[T]===void 0&&(d[T]=_)}}const h=g8(e,i),m=h.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),s==="svg"){d.style={...a,...c},Object.assign(d,m);let T=0,_=t.id;return typeof _=="string"&&(_=_.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:Q8(x8(h.body,_?()=>_+"ID"+T++:"iconifyReact"))},S.createElement("svg",d)}const{body:g,width:b,height:x}=e,k=s==="mask"||(s==="bg"?!1:g.indexOf("currentColor")!==-1),P=H8(g,{...m,width:b+"",height:x+""});return d.style={...a,"--svg":Y8(P),width:eC(m.width),height:eC(m.height),...Z8,...k?Nb:A2,...c},S.createElement("span",d)};C2(!0);w8("",I8);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!u8(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;S8(n,i)||console.error(r)}catch{console.error(r)}}}}function R2(e){const[t,n]=S.useState(!!e.ssr),[r,i]=S.useState({});function s(x){if(x){const k=e.icon;if(typeof k=="object")return{name:"",data:k};const P=Hk(k);if(P)return{name:k,data:P}}return{name:""}}const[a,c]=S.useState(s(!!e.ssr));function d(){const x=r.callback;x&&(x(),i({}))}function h(x){if(JSON.stringify(a)!==JSON.stringify(x))return d(),c(x),!0}function m(){var x;const k=e.icon;if(typeof k=="object"){h({name:"",data:k});return}const P=Hk(k);if(h({name:k,data:P}))if(P===void 0){const T=I2([k],m);i({callback:T})}else P&&((x=e.onLoad)===null||x===void 0||x.call(e,k))}S.useEffect(()=>(n(!0),d),[]),S.useEffect(()=>{t&&m()},[e.icon,t]);const{name:g,data:b}=a;return b?t7({...rw,...b},e,g):e.children?e.children:e.fallback?e.fallback:S.createElement("span",{})}const ui=S.forwardRef((e,t)=>R2({...e,_ref:t}));S.forwardRef((e,t)=>R2({inline:!0,...e,_ref:t}));var Lp={exports:{}};/**
55
+ `.trim(),W.head.prepend(G)},[b]),S.useEffect(()=>{let W=T.current;return()=>{var G;g||HS((G=W.target)!==null&&G!==void 0?G:void 0);for(let ee of W.disposables)ee();W.disposables=[]}},[g]),{isPressed:d||k,pressProps:Pn(x,B,{[XS]:!0})}}function Gx(e){return e.tagName==="A"&&e.hasAttribute("href")}function u0(e,t){const{key:n,code:r}=e,i=t,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof to(i).HTMLInputElement&&!ET(i,n)||i instanceof to(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&Gx(i))&&n!=="Enter")}function au(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function O5(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Gx(e)}function QS(e,t){return e instanceof HTMLInputElement?!ET(e,t):O5(e)}const z5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ET(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":z5.has(e.type)}let na=null,ih=new Set,jp=new Map,ku=!1,vb=!1;const j5={Tab:!0,Escape:!0};function Sv(e,t){for(let n of ih)n(e,t)}function B5(e){return!(e.metaKey||!wu()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Xg(e){ku=!0,B5(e)&&(na="keyboard",Sv("keyboard",e))}function wf(e){na="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(ku=!0,Sv("pointer",e))}function PT(e){DE(e)&&(ku=!0,na="virtual")}function TT(e){e.target===window||e.target===document||Yg||!e.isTrusted||(!ku&&!vb&&(na="virtual",Sv("virtual",e)),ku=!1,vb=!1)}function _T(){Yg||(ku=!1,vb=!0)}function Qg(e){if(typeof window>"u"||typeof document>"u"||jp.get(to(e)))return;const t=to(e),n=Dt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ku=!0,r.apply(this,arguments)},n.addEventListener("keydown",Xg,!0),n.addEventListener("keyup",Xg,!0),n.addEventListener("click",PT,!0),t.addEventListener("focus",TT,!0),t.addEventListener("blur",_T,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",wf,!0),n.addEventListener("pointermove",wf,!0),n.addEventListener("pointerup",wf,!0)),t.addEventListener("beforeunload",()=>{IT(e)},{once:!0}),jp.set(t,{focus:r})}const IT=(e,t)=>{const n=to(e),r=Dt(e);t&&r.removeEventListener("DOMContentLoaded",t),jp.has(n)&&(n.HTMLElement.prototype.focus=jp.get(n).focus,r.removeEventListener("keydown",Xg,!0),r.removeEventListener("keyup",Xg,!0),r.removeEventListener("click",PT,!0),n.removeEventListener("focus",TT,!0),n.removeEventListener("blur",_T,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",wf,!0),r.removeEventListener("pointermove",wf,!0),r.removeEventListener("pointerup",wf,!0)),jp.delete(n))};function V5(e){const t=Dt(e);let n;return t.readyState!=="loading"?Qg(e):(n=()=>{Qg(e)},t.addEventListener("DOMContentLoaded",n)),()=>IT(e,n)}typeof document<"u"&&V5();function qx(){return na!=="pointer"}function oh(){return na}function U5(e){na=e,Sv(e,null)}function HG(){Qg();let[e,t]=S.useState(na);return S.useEffect(()=>{let n=()=>{t(na)};return ih.add(n),()=>{ih.delete(n)}},[]),ph()?null:e}const K5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function W5(e,t,n){let r=Dt(n?.target);const i=typeof window<"u"?to(n?.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?to(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?to(n?.target).HTMLElement:HTMLElement,c=typeof window<"u"?to(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!K5.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof a&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof c&&!j5[n.key])}function H5(e,t,n){Qg(),S.useEffect(()=>{let r=(i,s)=>{W5(!!n?.isTextInput,i,s)&&e(qx())};return ih.add(r),()=>{ih.delete(r)}},t)}function Cu(e){const t=Dt(e),n=zr(t);if(oh()==="virtual"){let r=n;$E(()=>{zr(t)===r&&e.isConnected&&tl(e)})}else tl(e)}function $T(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const s=S.useCallback(d=>{if(d.target===d.currentTarget)return r&&r(d),i&&i(!1),!0},[r,i]),a=kT(s),c=S.useCallback(d=>{const h=Dt(d.target),m=h?zr(h):zr();d.target===d.currentTarget&&m===En(d.nativeEvent)&&(n&&n(d),i&&i(!0),a(d))},[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?c:void 0,onBlur:!t&&(r||i)?s:void 0}}}function JS(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function G5(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:JS(e.onKeyDown),onKeyUp:JS(e.onKeyUp)}}}let q5=He.createContext(null);function Y5(e){let t=S.useContext(q5)||{};RE(t,e);let{ref:n,...r}=t;return r}function xh(e,t){let{focusProps:n}=$T(e),{keyboardProps:r}=G5(e),i=Pn(n,r),s=Y5(t),a=e.isDisabled?{}:s,c=S.useRef(e.autoFocus);S.useEffect(()=>{c.current&&t.current&&Cu(t.current),c.current=!1},[t]);let d=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(d=void 0),{focusableProps:Pn({...i,tabIndex:d},a)}}function X5({children:e}){let t=S.useMemo(()=>({register:()=>{}}),[]);return He.createElement(Hx.Provider,{value:t},e)}function kv(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=S.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:c}=cx(),d=S.useCallback(g=>{g.currentTarget.contains(g.target)&&s.current.isFocusWithin&&!g.currentTarget.contains(g.relatedTarget)&&(s.current.isFocusWithin=!1,c(),n&&n(g),i&&i(!1))},[n,i,s,c]),h=kT(d),m=S.useCallback(g=>{if(!g.currentTarget.contains(g.target))return;const b=Dt(g.target),x=zr(b);if(!s.current.isFocusWithin&&x===En(g.nativeEvent)){r&&r(g),i&&i(!0),s.current.isFocusWithin=!0,h(g);let k=g.currentTarget;a(b,"focus",P=>{if(s.current.isFocusWithin&&!ai(k,P.target)){let T=new b.defaultView.FocusEvent("blur",{relatedTarget:P.target});ST(T,k);let _=Wx(T);d(_)}},{capture:!0})}},[r,i,h,a,d]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:m,onBlur:d}}}let yb=!1,c0=0;function Q5(){yb=!0,setTimeout(()=>{yb=!1},50)}function ZS(e){e.pointerType==="touch"&&Q5()}function J5(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",ZS),c0++,()=>{c0--,!(c0>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",ZS)}}function Eu(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,a]=S.useState(!1),c=S.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;S.useEffect(J5,[]);let{addGlobalListener:d,removeAllGlobalListeners:h}=cx(),{hoverProps:m,triggerHoverEnd:g}=S.useMemo(()=>{let b=(P,T)=>{if(c.pointerType=T,i||T==="touch"||c.isHovered||!P.currentTarget.contains(P.target))return;c.isHovered=!0;let _=P.currentTarget;c.target=_,d(Dt(P.target),"pointerover",A=>{c.isHovered&&c.target&&!ai(c.target,A.target)&&x(A,A.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:_,pointerType:T}),n&&n(!0),a(!0)},x=(P,T)=>{let _=c.target;c.pointerType="",c.target=null,!(T==="touch"||!c.isHovered||!_)&&(c.isHovered=!1,h(),r&&r({type:"hoverend",target:_,pointerType:T}),n&&n(!1),a(!1))},k={};return typeof PointerEvent<"u"&&(k.onPointerEnter=P=>{yb&&P.pointerType==="mouse"||b(P,P.pointerType)},k.onPointerLeave=P=>{!i&&P.currentTarget.contains(P.target)&&x(P,P.pointerType)}),{hoverProps:k,triggerHoverEnd:x}},[t,n,r,i,c,d,h]);return S.useEffect(()=>{i&&g({currentTarget:c.target},c.pointerType)},[i]),{hoverProps:m,isHovered:s}}function Z5(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,s=S.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=jn(d=>{n&&ek(d,t)&&(i&&i(d),s.current.isPointerDown=!0)}),c=jn(d=>{n&&n(d)});S.useEffect(()=>{let d=s.current;if(r)return;const h=t.current,m=Dt(h);if(typeof PointerEvent<"u"){let g=b=>{d.isPointerDown&&ek(b,t)&&c(b),d.isPointerDown=!1};return m.addEventListener("pointerdown",a,!0),m.addEventListener("click",g,!0),()=>{m.removeEventListener("pointerdown",a,!0),m.removeEventListener("click",g,!0)}}},[t,r,a,c])}function ek(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const tk=He.createContext(null),bb="react-aria-focus-scope-restore";let Qt=null;function eF(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,s=S.useRef(null),a=S.useRef(null),c=S.useRef([]),{parentNode:d}=S.useContext(tk)||{},h=S.useMemo(()=>new wb({scopeRef:c}),[c]);sn(()=>{let b=d||Ln.root;if(Ln.getTreeNode(b.scopeRef)&&Qt&&!Jg(Qt,b.scopeRef)){let x=Ln.getTreeNode(Qt);x&&(b=x)}b.addChild(h),Ln.addNode(h)},[h,d]),sn(()=>{let b=Ln.getTreeNode(c);b&&(b.contain=!!n)},[n]),sn(()=>{var b;let x=(b=s.current)===null||b===void 0?void 0:b.nextSibling,k=[],P=T=>T.stopPropagation();for(;x&&x!==a.current;)k.push(x),x.addEventListener(bb,P),x=x.nextSibling;return c.current=k,()=>{for(let T of k)T.removeEventListener(bb,P)}},[t]),oF(c,r,n),nF(c,n),sF(c,r,n),iF(c,i),S.useEffect(()=>{const b=zr(Dt(c.current?c.current[0]:void 0));let x=null;if(ro(b,c.current)){for(let k of Ln.traverse())k.scopeRef&&ro(b,k.scopeRef.current)&&(x=k);x===Ln.getTreeNode(c)&&(Qt=x.scopeRef)}},[c]),sn(()=>()=>{var b,x,k;let P=(k=(x=Ln.getTreeNode(c))===null||x===void 0||(b=x.parent)===null||b===void 0?void 0:b.scopeRef)!==null&&k!==void 0?k:null;(c===Qt||Jg(c,Qt))&&(!P||Ln.getTreeNode(P))&&(Qt=P),Ln.removeTreeNode(c)},[c]);let m=S.useMemo(()=>tF(c),[]),g=S.useMemo(()=>({focusManager:m,parentNode:h}),[h,m]);return He.createElement(tk.Provider,{value:g},He.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:s}),t,He.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function tF(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||zr(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[0].previousElementSibling,m=vu(n),g=Js(m,{tabbable:i,accept:a},n);g.currentNode=ro(d,n)?d:h;let b=g.nextNode();return!b&&s&&(g.currentNode=h,b=g.nextNode()),b&&Qs(b,!0),b},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||zr(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[n.length-1].nextElementSibling,m=vu(n),g=Js(m,{tabbable:i,accept:a},n);g.currentNode=ro(d,n)?d:h;let b=g.previousNode();return!b&&s&&(g.currentNode=h,b=g.previousNode()),b&&Qs(b,!0),b},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=vu(n),a=Js(s,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let c=a.nextNode();return c&&Qs(c,!0),c},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=vu(n),a=Js(s,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let c=a.previousNode();return c&&Qs(c,!0),c}}}function vu(e){return e[0].parentElement}function Ap(e){let t=Ln.getTreeNode(Qt);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function nF(e,t){let n=S.useRef(void 0),r=S.useRef(void 0);sn(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const s=Dt(i?i[0]:void 0);let a=h=>{if(h.key!=="Tab"||h.altKey||h.ctrlKey||h.metaKey||!Ap(e)||h.isComposing)return;let m=zr(s),g=e.current;if(!g||!ro(m,g))return;let b=vu(g),x=Js(b,{tabbable:!0},g);if(!m)return;x.currentNode=m;let k=h.shiftKey?x.previousNode():x.nextNode();k||(x.currentNode=h.shiftKey?g[g.length-1].nextElementSibling:g[0].previousElementSibling,k=h.shiftKey?x.previousNode():x.nextNode()),h.preventDefault(),k&&Qs(k,!0)},c=h=>{(!Qt||Jg(Qt,e))&&ro(En(h),e.current)?(Qt=e,n.current=En(h)):Ap(e)&&!Qa(En(h),e)?n.current?n.current.focus():Qt&&Qt.current&&xb(Qt.current):Ap(e)&&(n.current=En(h))},d=h=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let m=oh(),g=(m==="virtual"||m===null)&&lx()&&TE(),b=zr(s);if(!g&&b&&Ap(e)&&!Qa(b,e)){Qt=e;let k=En(h);if(k&&k.isConnected){var x;n.current=k,(x=n.current)===null||x===void 0||x.focus()}else Qt.current&&xb(Qt.current)}})};return s.addEventListener("keydown",a,!1),s.addEventListener("focusin",c,!1),i?.forEach(h=>h.addEventListener("focusin",c,!1)),i?.forEach(h=>h.addEventListener("focusout",d,!1)),()=>{s.removeEventListener("keydown",a,!1),s.removeEventListener("focusin",c,!1),i?.forEach(h=>h.removeEventListener("focusin",c,!1)),i?.forEach(h=>h.removeEventListener("focusout",d,!1))}},[e,t]),sn(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function AT(e){return Qa(e)}function ro(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Qa(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Ln.traverse(Ln.getTreeNode(t)))if(n&&ro(e,n.current))return!0;return!1}function rF(e){return Qa(e,Qt)}function Jg(e,t){var n;let r=(n=Ln.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Qs(e,t=!1){if(e!=null&&!t)try{Cu(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function RT(e,t=!0){let n=e[0].previousElementSibling,r=vu(e),i=Js(r,{tabbable:t},e);i.currentNode=n;let s=i.nextNode();return t&&!s&&(r=vu(e),i=Js(r,{tabbable:!1},e),i.currentNode=n,s=i.nextNode()),s}function xb(e,t=!0){Qs(RT(e,t))}function iF(e,t){const n=He.useRef(t);S.useEffect(()=>{if(n.current){Qt=e;const r=Dt(e.current?e.current[0]:void 0);!ro(zr(r),Qt.current)&&e.current&&xb(e.current)}n.current=!1},[e])}function oF(e,t,n){sn(()=>{if(t||n)return;let r=e.current;const i=Dt(r?r[0]:void 0);let s=a=>{let c=En(a);ro(c,e.current)?Qt=e:AT(c)||(Qt=null)};return i.addEventListener("focusin",s,!1),r?.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{i.removeEventListener("focusin",s,!1),r?.forEach(a=>a.removeEventListener("focusin",s,!1))}},[e,t,n])}function nk(e){let t=Ln.getTreeNode(Qt);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function sF(e,t,n){const r=S.useRef(typeof document<"u"?zr(Dt(e.current?e.current[0]:void 0)):null);sn(()=>{let i=e.current;const s=Dt(i?i[0]:void 0);if(!t||n)return;let a=()=>{(!Qt||Jg(Qt,e))&&ro(zr(s),e.current)&&(Qt=e)};return s.addEventListener("focusin",a,!1),i?.forEach(c=>c.addEventListener("focusin",a,!1)),()=>{s.removeEventListener("focusin",a,!1),i?.forEach(c=>c.removeEventListener("focusin",a,!1))}},[e,n]),sn(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!Ap(e)||a.isComposing)return;let c=i.activeElement;if(!Qa(c,e)||!nk(e))return;let d=Ln.getTreeNode(e);if(!d)return;let h=d.nodeToRestore,m=Js(i.body,{tabbable:!0});m.currentNode=c;let g=a.shiftKey?m.previousNode():m.nextNode();if((!h||!h.isConnected||h===i.body)&&(h=void 0,d.nodeToRestore=void 0),(!g||!Qa(g,e))&&h){m.currentNode=h;do g=a.shiftKey?m.previousNode():m.nextNode();while(Qa(g,e));a.preventDefault(),a.stopPropagation(),g?Qs(g,!0):AT(h)?Qs(h,!0):c.blur()}};return n||i.addEventListener("keydown",s,!0),()=>{n||i.removeEventListener("keydown",s,!0)}},[e,t,n]),sn(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=Ln.getTreeNode(e);if(s){var a;return s.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let c=Ln.getTreeNode(e);if(!c)return;let d=c.nodeToRestore,h=zr(i);if(t&&d&&(h&&Qa(h,e)||h===i.body&&nk(e))){let m=Ln.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let g=m.getTreeNode(e);for(;g;){if(g.nodeToRestore&&g.nodeToRestore.isConnected){rk(g.nodeToRestore);return}g=g.parent}for(g=m.getTreeNode(e);g;){if(g.scopeRef&&g.scopeRef.current&&Ln.getTreeNode(g.scopeRef)){let b=RT(g.scopeRef.current,!0);rk(b);return}g=g.parent}}})}}}},[e,t])}function rk(e){e.dispatchEvent(new CustomEvent(bb,{bubbles:!0,cancelable:!0}))&&Qs(e)}function Js(e,t,n){let r=t?.tabbable?TM:zE,i=e?.nodeType===Node.ELEMENT_NODE?e:null,s=Dt(i),a=iM(s,e||s,NodeFilter.SHOW_ELEMENT,{acceptNode(c){var d;return!(t==null||(d=t.from)===null||d===void 0)&&d.contains(c)?NodeFilter.FILTER_REJECT:r(c)&&wT(c)&&(!n||ro(c,n))&&(!t?.accept||t.accept(c))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}class Yx{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let s=new wb({scopeRef:t});i.addChild(s),s.parent=i,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&ro(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Yx;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new wb({scopeRef:null}),this.fastMap.set(null,this.root)}}class wb{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Ln=new Yx;function Pu(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=S.useRef({isFocused:!1,isFocusVisible:t||qx()}),[s,a]=S.useState(!1),[c,d]=S.useState(()=>i.current.isFocused&&i.current.isFocusVisible),h=S.useCallback(()=>d(i.current.isFocused&&i.current.isFocusVisible),[]),m=S.useCallback(x=>{i.current.isFocused=x,a(x),h()},[h]);H5(x=>{i.current.isFocusVisible=x,h()},[],{isTextInput:n});let{focusProps:g}=$T({isDisabled:r,onFocusChange:m}),{focusWithinProps:b}=kv({isDisabled:!r,onFocusWithinChange:m});return{isFocused:s,isFocusVisible:c,focusProps:r?b:g}}function aF(e){let t=cF(Dt(e));t!==e&&(t&&lF(t,e),e&&uF(e,t))}function lF(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function uF(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function cF(e){let t=zr(e),n=t?.getAttribute("aria-activedescendant");return n&&e.getElementById(n)||t}const f0=typeof document<"u"&&window.visualViewport,fF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let gg=0,d0;function dF(e={}){let{isDisabled:t}=e;sn(()=>{if(!t)return gg++,gg===1&&(vv()?d0=hF():d0=pF()),()=>{gg--,gg===0&&d0()}},[t])}function pF(){let e=window.innerWidth-document.documentElement.clientWidth;return Tf(e>0&&("scrollbarGutter"in document.documentElement.style?yu(document.documentElement,"scrollbarGutter","stable"):yu(document.documentElement,"paddingRight",`${e}px`)),yu(document.documentElement,"overflow","hidden"))}function hF(){let e,t,n=h=>{e=LE(h.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=yu(e,"overscrollBehavior","contain"))},r=h=>{if(!e||e===document.documentElement||e===document.body){h.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&h.preventDefault()},i=()=>{t&&t()},s=h=>{let m=h.target;mF(m)&&(c(),m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",f0&&(f0.height<window.innerHeight?requestAnimationFrame(()=>{ik(m)}):f0.addEventListener("resize",()=>ik(m),{once:!0}))}))},a=null,c=()=>{if(a)return;let h=()=>{window.scrollTo(0,0)},m=window.pageXOffset,g=window.pageYOffset;a=Tf(gp(window,"scroll",h),yu(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),yu(document.documentElement,"overflow","hidden"),yu(document.body,"marginTop",`-${g}px`),()=>{window.scrollTo(m,g)}),window.scrollTo(0,0)},d=Tf(gp(document,"touchstart",n,{passive:!1,capture:!0}),gp(document,"touchmove",r,{passive:!1,capture:!0}),gp(document,"touchend",i,{passive:!1,capture:!0}),gp(document,"focus",s,!0));return()=>{t?.(),a?.(),d()}}function yu(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function gp(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ik(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let r=LE(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,s=n.getBoundingClientRect().top;s>i+n.clientHeight&&(r.scrollTop+=s-i)}n=r.parentElement}}function mF(e){return e instanceof HTMLInputElement&&!fF.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const gF=S.createContext({});function LT(){var e;return(e=S.useContext(gF))!==null&&e!==void 0?e:{}}const Sb=He.createContext(null);function vF(e){let{children:t}=e,n=S.useContext(Sb),[r,i]=S.useState(0),s=S.useMemo(()=>({parent:n,modalCount:r,addModal(){i(a=>a+1),n&&n.addModal()},removeModal(){i(a=>a-1),n&&n.removeModal()}}),[n,r]);return He.createElement(Sb.Provider,{value:s},t)}function yF(){let e=S.useContext(Sb);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function bF(e){let{modalProviderProps:t}=yF();return He.createElement("div",{"data-overlay-container":!0,...e,...t})}function MT(e){return He.createElement(vF,null,He.createElement(bF,e))}function ok(e){let t=ph(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=LT();if(!e.portalContainer&&i&&(n=i()),He.useEffect(()=>{if(n?.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let s=He.createElement(MT,r);return OE.createPortal(s,n)}var DT={};DT={dismiss:"تجاهل"};var NT={};NT={dismiss:"Отхвърляне"};var FT={};FT={dismiss:"Odstranit"};var OT={};OT={dismiss:"Luk"};var zT={};zT={dismiss:"Schließen"};var jT={};jT={dismiss:"Απόρριψη"};var BT={};BT={dismiss:"Dismiss"};var VT={};VT={dismiss:"Descartar"};var UT={};UT={dismiss:"Lõpeta"};var KT={};KT={dismiss:"Hylkää"};var WT={};WT={dismiss:"Rejeter"};var HT={};HT={dismiss:"התעלם"};var GT={};GT={dismiss:"Odbaci"};var qT={};qT={dismiss:"Elutasítás"};var YT={};YT={dismiss:"Ignora"};var XT={};XT={dismiss:"閉じる"};var QT={};QT={dismiss:"무시"};var JT={};JT={dismiss:"Atmesti"};var ZT={};ZT={dismiss:"Nerādīt"};var e_={};e_={dismiss:"Lukk"};var t_={};t_={dismiss:"Negeren"};var n_={};n_={dismiss:"Zignoruj"};var r_={};r_={dismiss:"Descartar"};var i_={};i_={dismiss:"Dispensar"};var o_={};o_={dismiss:"Revocare"};var s_={};s_={dismiss:"Пропустить"};var a_={};a_={dismiss:"Zrušiť"};var l_={};l_={dismiss:"Opusti"};var u_={};u_={dismiss:"Odbaci"};var c_={};c_={dismiss:"Avvisa"};var f_={};f_={dismiss:"Kapat"};var d_={};d_={dismiss:"Скасувати"};var p_={};p_={dismiss:"取消"};var h_={};h_={dismiss:"關閉"};var m_={};m_={"ar-AE":DT,"bg-BG":NT,"cs-CZ":FT,"da-DK":OT,"de-DE":zT,"el-GR":jT,"en-US":BT,"es-ES":VT,"et-EE":UT,"fi-FI":KT,"fr-FR":WT,"he-IL":HT,"hr-HR":GT,"hu-HU":qT,"it-IT":YT,"ja-JP":XT,"ko-KR":QT,"lt-LT":JT,"lv-LV":ZT,"nb-NO":e_,"nl-NL":t_,"pl-PL":n_,"pt-BR":r_,"pt-PT":i_,"ro-RO":o_,"ru-RU":s_,"sk-SK":a_,"sl-SI":l_,"sr-SP":u_,"sv-SE":c_,"tr-TR":f_,"uk-UA":d_,"zh-CN":p_,"zh-TW":h_};const sk={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function xF(e={}){let{style:t,isFocusable:n}=e,[r,i]=S.useState(!1),{focusWithinProps:s}=kv({isDisabled:!n,onFocusWithinChange:c=>i(c)}),a=S.useMemo(()=>r?t:t?{...sk,...t}:sk,[r]);return{visuallyHiddenProps:{...s,style:a}}}function wF(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...s}=e,{visuallyHiddenProps:a}=xF(e);return He.createElement(n,Pn(s,a),t)}function SF(e){return e&&e.__esModule?e.default:e}function ak(e){let{onDismiss:t,...n}=e,r=GL(SF(m_),"@react-aria/overlays"),i=AE(n,r.format("dismiss")),s=()=>{t&&t()};return He.createElement(wF,null,He.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}let vp=new WeakMap,Qi=[];function kF(e,t=document.body){let n=new Set(e),r=new Set,i=d=>{for(let b of d.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(b);let h=b=>{if(n.has(b)||b.parentElement&&r.has(b.parentElement)&&b.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let x of n)if(b.contains(x))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},m=document.createTreeWalker(d,NodeFilter.SHOW_ELEMENT,{acceptNode:h}),g=h(d);if(g===NodeFilter.FILTER_ACCEPT&&s(d),g!==NodeFilter.FILTER_REJECT){let b=m.nextNode();for(;b!=null;)s(b),b=m.nextNode()}},s=d=>{var h;let m=(h=vp.get(d))!==null&&h!==void 0?h:0;d.getAttribute("aria-hidden")==="true"&&m===0||(m===0&&d.setAttribute("aria-hidden","true"),r.add(d),vp.set(d,m+1))};Qi.length&&Qi[Qi.length-1].disconnect(),i(t);let a=new MutationObserver(d=>{for(let h of d)if(!(h.type!=="childList"||h.addedNodes.length===0)&&![...n,...r].some(m=>m.contains(h.target))){for(let m of h.removedNodes)m instanceof Element&&(n.delete(m),r.delete(m));for(let m of h.addedNodes)(m instanceof HTMLElement||m instanceof SVGElement)&&(m.dataset.liveAnnouncer==="true"||m.dataset.reactAriaTopLayer==="true")?n.add(m):m instanceof Element&&i(m)}});a.observe(t,{childList:!0,subtree:!0});let c={visibleNodes:n,hiddenNodes:r,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Qi.push(c),()=>{a.disconnect();for(let d of r){let h=vp.get(d);h!=null&&(h===1?(d.removeAttribute("aria-hidden"),vp.delete(d)):vp.set(d,h-1))}c===Qi[Qi.length-1]?(Qi.pop(),Qi.length&&Qi[Qi.length-1].observe()):Qi.splice(Qi.indexOf(c),1)}}const g_=He.createContext(null);function CF(e){let t=ph(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,s]=S.useState(!1),a=S.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:c}=LT();if(!e.portalContainer&&c&&(n=c()),!n)return null;let d=e.children;return e.disableFocusManagement||(d=He.createElement(eF,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},d)),d=He.createElement(g_.Provider,{value:a},He.createElement(X5,null,d)),OE.createPortal(d,n)}function v_(){let e=S.useContext(g_),t=e?.setContain;sn(()=>{t?.(!0)},[t])}var EF=({children:e,navigate:t,disableAnimation:n,useHref:r,disableRipple:i=!1,skipFramerMotionAnimations:s=n,reducedMotion:a="never",validationBehavior:c,locale:d="en-US",labelPlacement:h,defaultDates:m,createCalendar:g,spinnerVariant:b,...x})=>{let k=e;t&&(k=D.jsx(gM,{navigate:t,useHref:r,children:k}));const P=S.useMemo(()=>(n&&s&&(fs.skipAnimations=!0),{createCalendar:g,defaultDates:m,disableAnimation:n,disableRipple:i,validationBehavior:c,labelPlacement:h,spinnerVariant:b}),[g,m?.maxDate,m?.minDate,n,i,c,h,b]);return D.jsx(TL,{value:P,children:D.jsx(zL,{locale:d,children:D.jsx(B3,{reducedMotion:a,children:D.jsx(MT,{...x,children:k})})})})};function GG(e){const t=ci(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function PF(e){const t=ci(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function jr(e){return S.forwardRef(e)}var oa=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((i,s)=>s in e?{...i,[s]:e[s]}:i,{});return n?[Object.keys(e).filter(s=>!t.includes(s)).reduce((s,a)=>({...s,[a]:e[a]}),{}),r]:[e,r]},TF={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},_F={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"},IF={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger"},$F={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500"},AF={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger"},RF={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger"},LF={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger"},Te={solid:TF,shadow:_F,bordered:IF,flat:$F,faded:AF,light:RF,ghost:LF},MF={".spinner-bar-animation":{"animation-delay":"calc(-1.2s + (0.1s * var(--bar-index)))",transform:"rotate(calc(30deg * var(--bar-index)))translate(140%)"},".spinner-dot-animation":{"animation-delay":"calc(250ms * var(--dot-index))"},".spinner-dot-blink-animation":{"animation-delay":"calc(200ms * var(--dot-index))"}},DF={".leading-inherit":{"line-height":"inherit"},".bg-img-inherit":{"background-image":"inherit"},".bg-clip-inherit":{"background-clip":"inherit"},".text-fill-inherit":{"-webkit-text-fill-color":"inherit"},".tap-highlight-transparent":{"-webkit-tap-highlight-color":"transparent"},".input-search-cancel-button-none":{"&::-webkit-search-cancel-button":{"-webkit-appearance":"none"}}},NF={".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},FF={".text-tiny":{"font-size":"var(--heroui-font-size-tiny)","line-height":"var(--heroui-line-height-tiny)"},".text-small":{"font-size":"var(--heroui-font-size-small)","line-height":"var(--heroui-line-height-small)"},".text-medium":{"font-size":"var(--heroui-font-size-medium)","line-height":"var(--heroui-line-height-medium)"},".text-large":{"font-size":"var(--heroui-font-size-large)","line-height":"var(--heroui-line-height-large)"}},is="250ms",OF={".transition-background":{"transition-property":"background","transition-timing-function":"ease","transition-duration":is},".transition-colors-opacity":{"transition-property":"color, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":is},".transition-width":{"transition-property":"width","transition-timing-function":"ease","transition-duration":is},".transition-height":{"transition-property":"height","transition-timing-function":"ease","transition-duration":is},".transition-size":{"transition-property":"width, height","transition-timing-function":"ease","transition-duration":is},".transition-left":{"transition-property":"left","transition-timing-function":"ease","transition-duration":is},".transition-transform-opacity":{"transition-property":"transform, scale, opacity rotate","transition-timing-function":"ease","transition-duration":is},".transition-transform-background":{"transition-property":"transform, scale, background","transition-timing-function":"ease","transition-duration":is},".transition-transform-colors":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke","transition-timing-function":"ease","transition-duration":is},".transition-transform-colors-opacity":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":is}},zF={...DF,...OF,...NF,...FF,...MF},vg=["small","medium","large"],kb={theme:{spacing:["divider"],radius:vg},classGroups:{shadow:[{shadow:vg}],opacity:[{opacity:["disabled"]}],"font-size":[{text:["tiny",...vg]}],"border-w":[{border:vg}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"],transition:Object.keys(zF).filter(e=>e.includes(".transition")).map(e=>e.replace(".",""))}},lk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,oi=e=>!e||typeof e!="object"||Object.keys(e).length===0,jF=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function y_(e,t){e.forEach(function(n){Array.isArray(n)?y_(n,t):t.push(n)})}function b_(e){let t=[];return y_(e,t),t}var x_=(...e)=>b_(e).filter(Boolean),w_=(e,t)=>{let n={},r=Object.keys(e),i=Object.keys(t);for(let s of r)if(i.includes(s)){let a=e[s],c=t[s];Array.isArray(a)||Array.isArray(c)?n[s]=x_(c,a):typeof a=="object"&&typeof c=="object"?n[s]=w_(a,c):n[s]=c+" "+a}else n[s]=e[s];for(let s of i)r.includes(s)||(n[s]=t[s]);return n},uk=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const Xx="-",BF=e=>{const t=UF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const c=a.split(Xx);return c[0]===""&&c.length!==1&&c.shift(),S_(c,t)||VF(a)},getConflictingClassGroupIds:(a,c)=>{const d=n[a]||[];return c&&r[a]?[...d,...r[a]]:d}}},S_=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?S_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Xx);return t.validators.find(({validator:a})=>a(s))?.classGroupId},ck=/^\[(.+)\]$/,VF=e=>{if(ck.test(e)){const t=ck.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},UF=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)Cb(n[i],r,i,t);return r},Cb=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:fk(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(KF(i)){Cb(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{Cb(a,fk(t,s),n,r)})})},fk=(e,t)=>{let n=e;return t.split(Xx).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},KF=e=>e.isThemeGetter,WF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},Eb="!",Pb=":",HF=Pb.length,GF=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,c=0,d=0,h;for(let k=0;k<i.length;k++){let P=i[k];if(a===0&&c===0){if(P===Pb){s.push(i.slice(d,k)),d=k+HF;continue}if(P==="/"){h=k;continue}}P==="["?a++:P==="]"?a--:P==="("?c++:P===")"&&c--}const m=s.length===0?i:i.substring(d),g=qF(m),b=g!==m,x=h&&h>d?h-d:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:g,maybePostfixModifierPosition:x}};if(t){const i=t+Pb,s=r;r=a=>a.startsWith(i)?s(a.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},qF=e=>e.endsWith(Eb)?e.substring(0,e.length-1):e.startsWith(Eb)?e.substring(1):e,YF=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(i.push(...s.sort(),a),s=[]):s.push(a)}),i.push(...s.sort()),i}},XF=e=>({cache:WF(e.cacheSize),parseClassName:GF(e),sortModifiers:YF(e),...BF(e)}),QF=/\s+/,JF=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],c=e.trim().split(QF);let d="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:g,modifiers:b,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:P}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let T=!!P,_=r(T?k.substring(0,P):k);if(!_){if(!T){d=m+(d.length>0?" "+d:d);continue}if(_=r(k),!_){d=m+(d.length>0?" "+d:d);continue}T=!1}const A=s(b).join(":"),L=x?A+Eb:A,O=L+_;if(a.includes(O))continue;a.push(O);const j=i(_,T);for(let $=0;$<j.length;++$){const Y=j[$];a.push(L+Y)}d=m+(d.length>0?" "+d:d)}return d};function ZF(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=k_(t))&&(r&&(r+=" "),r+=n);return r}const k_=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=k_(e[r]))&&(n&&(n+=" "),n+=t);return n};function Tb(e,...t){let n,r,i,s=a;function a(d){const h=t.reduce((m,g)=>g(m),e());return n=XF(h),r=n.cache.get,i=n.cache.set,s=c,c(d)}function c(d){const h=r(d);if(h)return h;const m=JF(d,n);return i(d,m),m}return function(){return s(ZF.apply(null,arguments))}}const Jn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},C_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,E_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eO=/^\d+\/\d+$/,tO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,iO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sf=e=>eO.test(e),yt=e=>!!e&&!Number.isNaN(Number(e)),lu=e=>!!e&&Number.isInteger(Number(e)),dk=e=>e.endsWith("%")&&yt(e.slice(0,-1)),Ga=e=>tO.test(e),sO=()=>!0,aO=e=>nO.test(e)&&!rO.test(e),Qx=()=>!1,lO=e=>iO.test(e),uO=e=>oO.test(e),cO=e=>!je(e)&&!Be(e),fO=e=>Of(e,__,Qx),je=e=>C_.test(e),uu=e=>Of(e,I_,aO),p0=e=>Of(e,SO,yt),dO=e=>Of(e,P_,Qx),pO=e=>Of(e,T_,uO),hO=e=>Of(e,Qx,lO),Be=e=>E_.test(e),yg=e=>zf(e,I_),mO=e=>zf(e,kO),gO=e=>zf(e,P_),vO=e=>zf(e,__),yO=e=>zf(e,T_),bO=e=>zf(e,CO,!0),Of=(e,t,n)=>{const r=C_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},zf=(e,t,n=!1)=>{const r=E_.exec(e);return r?r[1]?t(r[1]):n:!1},P_=e=>e==="position",xO=new Set(["image","url"]),T_=e=>xO.has(e),wO=new Set(["length","size","percentage"]),__=e=>wO.has(e),I_=e=>e==="length",SO=e=>e==="number",kO=e=>e==="family-name",CO=e=>e==="shadow",_b=()=>{const e=Jn("color"),t=Jn("font"),n=Jn("text"),r=Jn("font-weight"),i=Jn("tracking"),s=Jn("leading"),a=Jn("breakpoint"),c=Jn("container"),d=Jn("spacing"),h=Jn("radius"),m=Jn("shadow"),g=Jn("inset-shadow"),b=Jn("drop-shadow"),x=Jn("blur"),k=Jn("perspective"),P=Jn("aspect"),T=Jn("ease"),_=Jn("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],$=()=>[Be,je,d],Y=()=>[sf,"full","auto",...$()],te=()=>[lu,"none","subgrid",Be,je],ie=()=>["auto",{span:["full",lu,Be,je]},Be,je],B=()=>[lu,"auto",Be,je],W=()=>["auto","min","max","fr",Be,je],G=()=>["start","end","center","between","around","evenly","stretch","baseline"],ee=()=>["start","end","center","stretch"],H=()=>["auto",...$()],le=()=>[sf,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],J=()=>[e,Be,je],X=()=>[dk,uu],V=()=>["","none","full",h,Be,je],ae=()=>["",yt,yg,uu],M=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["","none",x,Be,je],z=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be,je],me=()=>["none",yt,Be,je],Ce=()=>["none",yt,Be,je],ye=()=>[yt,Be,je],Oe=()=>[sf,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ga],breakpoint:[Ga],color:[sO],container:[Ga],"drop-shadow":[Ga],ease:["in","out","in-out"],font:[cO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ga],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ga],shadow:[Ga],spacing:["px",yt],text:[Ga],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sf,je,Be,P]}],container:["container"],columns:[{columns:[yt,je,Be,c]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...L(),je,Be]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{start:Y()}],end:[{end:Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[lu,"auto",Be,je]}],basis:[{basis:[sf,"full","auto",c,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[yt,sf,"auto","initial","none",je]}],grow:[{grow:["",yt,Be,je]}],shrink:[{shrink:["",yt,Be,je]}],order:[{order:[lu,"first","last","none",Be,je]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...ee(),"baseline"]}],"align-self":[{self:["auto",...ee(),"baseline"]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:le()}],w:[{w:[c,"screen",...le()]}],"min-w":[{"min-w":[c,"screen","none",...le()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...le()]}],h:[{h:["screen",...le()]}],"min-h":[{"min-h":["screen","none",...le()]}],"max-h":[{"max-h":["screen",...le()]}],"font-size":[{text:["base",n,yg,uu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Be,p0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dk,je]}],"font-family":[{font:[mO,je,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Be,je]}],"line-clamp":[{"line-clamp":[yt,"none",Be,p0]}],leading:[{leading:[s,...$()]}],"list-image":[{"list-image":["none",Be,je]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Be,je]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[yt,"from-font","auto",Be,uu]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[yt,"auto",Be,je]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be,je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Be,je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),gO,dO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",vO,fO]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},lu,Be,je],radial:["",Be,je],conic:[lu,Be,je]},yO,pO]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[yt,Be,je]}],"outline-w":[{outline:["",yt,yg,uu]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",m,bO,hO]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",Be,je,g]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[yt,uu]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":J()}],opacity:[{opacity:[yt,Be,je]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none",Be,je]}],blur:[{blur:oe()}],brightness:[{brightness:[yt,Be,je]}],contrast:[{contrast:[yt,Be,je]}],"drop-shadow":[{"drop-shadow":["","none",b,Be,je]}],grayscale:[{grayscale:["",yt,Be,je]}],"hue-rotate":[{"hue-rotate":[yt,Be,je]}],invert:[{invert:["",yt,Be,je]}],saturate:[{saturate:[yt,Be,je]}],sepia:[{sepia:["",yt,Be,je]}],"backdrop-filter":[{"backdrop-filter":["","none",Be,je]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[yt,Be,je]}],"backdrop-contrast":[{"backdrop-contrast":[yt,Be,je]}],"backdrop-grayscale":[{"backdrop-grayscale":["",yt,Be,je]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[yt,Be,je]}],"backdrop-invert":[{"backdrop-invert":["",yt,Be,je]}],"backdrop-opacity":[{"backdrop-opacity":[yt,Be,je]}],"backdrop-saturate":[{"backdrop-saturate":[yt,Be,je]}],"backdrop-sepia":[{"backdrop-sepia":["",yt,Be,je]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Be,je]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[yt,"initial",Be,je]}],ease:[{ease:["linear","initial",T,Be,je]}],delay:[{delay:[yt,Be,je]}],animate:[{animate:["none",_,Be,je]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,Be,je]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[Be,je,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],accent:[{accent:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be,je]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Be,je]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[yt,yg,uu,p0]}],stroke:[{stroke:["none",...J()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},EO=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:s={}})=>(Rp(e,"cacheSize",t),Rp(e,"prefix",n),Rp(e,"experimentalParseClassName",r),bg(e.theme,s.theme),bg(e.classGroups,s.classGroups),bg(e.conflictingClassGroups,s.conflictingClassGroups),bg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),Rp(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),xg(e.theme,i.theme),xg(e.classGroups,i.classGroups),xg(e.conflictingClassGroups,i.conflictingClassGroups),xg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),$_(e,i,"orderSensitiveModifiers"),e),Rp=(e,t,n)=>{n!==void 0&&(e[t]=n)},bg=(e,t)=>{if(t)for(const n in t)Rp(e,n,t[n])},xg=(e,t)=>{if(t)for(const n in t)$_(e,t,n)},$_=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},A_=(e,...t)=>typeof e=="function"?Tb(_b,e,...t):Tb(()=>EO(_b(),e),...t),PO=Tb(_b);var TO={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},R_=e=>e||void 0,sh=(...e)=>R_(b_(e).filter(Boolean).join(" ")),h0=null,Xs={},Ib=!1,yp=(...e)=>t=>t.twMerge?((!h0||Ib)&&(Ib=!1,h0=oi(Xs)?PO:A_({...Xs,extend:{theme:Xs.theme,classGroups:Xs.classGroups,conflictingClassGroupModifiers:Xs.conflictingClassGroupModifiers,conflictingClassGroups:Xs.conflictingClassGroups,...Xs.extend}})),R_(h0(sh(e)))):sh(e),pk=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=sh(e[n],t[n]):e[n]=t[n];return e},_O=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:s=[],compoundSlots:a=[],defaultVariants:c={}}=e,d={...TO,...t},h=n!=null&&n.base?sh(n.base,e?.base):e?.base,m=n!=null&&n.variants&&!oi(n.variants)?w_(i,n.variants):i,g=n!=null&&n.defaultVariants&&!oi(n.defaultVariants)?{...n.defaultVariants,...c}:c;!oi(d.twMergeConfig)&&!jF(d.twMergeConfig,Xs)&&(Ib=!0,Xs=d.twMergeConfig);let b=oi(n?.slots),x=oi(r)?{}:{base:sh(e?.base,b&&n?.base),...r},k=b?x:pk({...n?.slots},oi(x)?{base:e?.base}:x),P=oi(n?.compoundVariants)?s:x_(n?.compoundVariants,s),T=A=>{if(oi(m)&&oi(r)&&b)return yp(h,A?.class,A?.className)(d);if(P&&!Array.isArray(P))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof P}`);if(a&&!Array.isArray(a))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof a}`);let L=(G,ee,H=[],le)=>{let J=H;if(typeof ee=="string")J=J.concat(uk(ee).split(" ").map(X=>`${G}:${X}`));else if(Array.isArray(ee))J=J.concat(ee.reduce((X,V)=>X.concat(`${G}:${V}`),[]));else if(typeof ee=="object"&&typeof le=="string"){for(let X in ee)if(ee.hasOwnProperty(X)&&X===le){let V=ee[X];if(V&&typeof V=="string"){let ae=uk(V);J[le]?J[le]=J[le].concat(ae.split(" ").map(M=>`${G}:${M}`)):J[le]=ae.split(" ").map(M=>`${G}:${M}`)}else Array.isArray(V)&&V.length>0&&(J[le]=V.reduce((ae,M)=>ae.concat(`${G}:${M}`),[]))}}return J},O=(G,ee=m,H=null,le=null)=>{var J;let X=ee[G];if(!X||oi(X))return null;let V=(J=le?.[G])!=null?J:A?.[G];if(V===null)return null;let ae=lk(V),M=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,U=g?.[G],oe=[];if(typeof ae=="object"&&M)for(let[Ce,ye]of Object.entries(ae)){let Oe=X[ye];if(Ce==="initial"){U=ye;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(Ce)||(oe=L(Ce,Oe,oe,H))}let z=ae!=null&&typeof ae!="object"?ae:lk(U),me=X[z||"false"];return typeof oe=="object"&&typeof H=="string"&&oe[H]?pk(oe,me):oe.length>0?(oe.push(me),H==="base"?oe.join(" "):oe):me},j=()=>m?Object.keys(m).map(G=>O(G,m)):null,$=(G,ee)=>{if(!m||typeof m!="object")return null;let H=new Array;for(let le in m){let J=O(le,m,G,ee),X=G==="base"&&typeof J=="string"?J:J&&J[G];X&&(H[H.length]=X)}return H},Y={};for(let G in A)A[G]!==void 0&&(Y[G]=A[G]);let te=(G,ee)=>{var H;let le=typeof A?.[G]=="object"?{[G]:(H=A[G])==null?void 0:H.initial}:{};return{...g,...Y,...le,...ee}},ie=(G=[],ee)=>{let H=[];for(let{class:le,className:J,...X}of G){let V=!0;for(let[ae,M]of Object.entries(X)){let U=te(ae,ee)[ae];if(Array.isArray(M)){if(!M.includes(U)){V=!1;break}}else{let oe=z=>z==null||z===!1;if(oe(M)&&oe(U))continue;if(U!==M){V=!1;break}}}V&&(le&&H.push(le),J&&H.push(J))}return H},B=G=>{let ee=ie(P,G);if(!Array.isArray(ee))return ee;let H={};for(let le of ee)if(typeof le=="string"&&(H.base=yp(H.base,le)(d)),typeof le=="object")for(let[J,X]of Object.entries(le))H[J]=yp(H[J],X)(d);return H},W=G=>{if(a.length<1)return null;let ee={};for(let{slots:H=[],class:le,className:J,...X}of a){if(!oi(X)){let V=!0;for(let ae of Object.keys(X)){let M=te(ae,G)[ae];if(M===void 0||(Array.isArray(X[ae])?!X[ae].includes(M):X[ae]!==M)){V=!1;break}}if(!V)continue}for(let V of H)ee[V]=ee[V]||[],ee[V].push([le,J])}return ee};if(!oi(r)||!b){let G={};if(typeof k=="object"&&!oi(k))for(let ee of Object.keys(k))G[ee]=H=>{var le,J;return yp(k[ee],$(ee,H),((le=B(H))!=null?le:[])[ee],((J=W(H))!=null?J:[])[ee],H?.class,H?.className)(d)};return G}return yp(h,j(),ie(P),A?.class,A?.className)(d)},_=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return T.variantKeys=_(),T.extend=n,T.base=h,T.slots=k,T.variants=m,T.defaultVariants=g,T.compoundSlots=a,T.compoundVariants=P,T},Zn=(e,t)=>{var n,r,i;return _O(e,{...t,twMerge:(n=t?.twMerge)!=null?n:!0,twMergeConfig:{...t?.twMergeConfig,theme:{...(r=t?.twMergeConfig)==null?void 0:r.theme,...kb.theme},classGroups:{...(i=t?.twMergeConfig)==null?void 0:i.classGroups,...kb.classGroups}}})},hk=Zn({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",label:"text-foreground dark:text-foreground-dark font-regular",circle1:"absolute w-full h-full rounded-full",circle2:"absolute w-full h-full rounded-full",dots:"relative rounded-full mx-auto",spinnerBars:["absolute","animate-fade-out","rounded-full","w-[25%]","h-[8%]","left-[calc(37.5%)]","top-[calc(46%)]","spinner-bar-animation"]},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",dots:"size-1",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",dots:"size-1.5",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",dots:"size-2",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current",dots:"bg-current",spinnerBars:"bg-current"},white:{circle1:"border-b-white",circle2:"border-b-white",dots:"bg-white",spinnerBars:"bg-white"},default:{circle1:"border-b-default",circle2:"border-b-default",dots:"bg-default",spinnerBars:"bg-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary",dots:"bg-primary",spinnerBars:"bg-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary",dots:"bg-secondary",spinnerBars:"bg-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success",dots:"bg-success",spinnerBars:"bg-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning",dots:"bg-warning",spinnerBars:"bg-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger",dots:"bg-danger",spinnerBars:"bg-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}},variant:{default:{circle1:["animate-spinner-ease-spin","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["opacity-75","animate-spinner-linear-spin","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"]},gradient:{circle1:["border-0","bg-gradient-to-b","from-transparent","via-transparent","to-primary","animate-spinner-linear-spin","[animation-duration:1s]","[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]"],circle2:["hidden"]},wave:{wrapper:"translate-y-3/4",dots:["animate-sway","spinner-dot-animation"]},dots:{wrapper:"translate-y-2/4",dots:["animate-blink","spinner-dot-blink-animation"]},spinner:{},simple:{wrapper:"text-foreground h-5 w-5 animate-spin",circle1:"opacity-25",circle2:"opacity-75"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground",variant:"default"},compoundVariants:[{variant:"gradient",color:"current",class:{circle1:"to-current"}},{variant:"gradient",color:"white",class:{circle1:"to-white"}},{variant:"gradient",color:"default",class:{circle1:"to-default"}},{variant:"gradient",color:"primary",class:{circle1:"to-primary"}},{variant:"gradient",color:"secondary",class:{circle1:"to-secondary"}},{variant:"gradient",color:"success",class:{circle1:"to-success"}},{variant:"gradient",color:"warning",class:{circle1:"to-warning"}},{variant:"gradient",color:"danger",class:{circle1:"to-danger"}},{variant:"wave",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"wave",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"wave",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"dots",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"dots",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"dots",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"simple",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"simple",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",color:"current",class:{wrapper:"text-current"}},{variant:"simple",color:"white",class:{wrapper:"text-white"}},{variant:"simple",color:"default",class:{wrapper:"text-default"}},{variant:"simple",color:"primary",class:{wrapper:"text-primary"}},{variant:"simple",color:"secondary",class:{wrapper:"text-secondary"}},{variant:"simple",color:"success",class:{wrapper:"text-success"}},{variant:"simple",color:"warning",class:{wrapper:"text-warning"}},{variant:"simple",color:"danger",class:{wrapper:"text-danger"}}]}),wh=["outline-hidden","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],L_=["outline-hidden","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],IO=["outline-hidden","ring-2","ring-focus","ring-offset-2","ring-offset-background"],af={default:["[&+.border-medium.border-default]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(var(--heroui-border-width-medium)*-1)]"]},$O=["font-inherit","text-[100%]","leading-[1.15]","m-0","p-0","overflow-visible","box-border","absolute","top-0","w-full","h-full","opacity-[0.0001]","z-[1]","cursor-pointer","disabled:cursor-default"],mk=Zn({slots:{base:["z-0","relative","bg-transparent","before:content-['']","before:hidden","before:z-[-1]","before:absolute","before:rotate-45","before:w-2.5","before:h-2.5","before:rounded-sm","data-[arrow=true]:before:block","data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top]:before:left-1/2","data-[placement=top]:before:-translate-x-1/2","data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-start]:before:left-3","data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-end]:before:right-3","data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom]:before:left-1/2","data-[placement=bottom]:before:-translate-x-1/2","data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-start]:before:left-3","data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-end]:before:right-3","data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=left]:before:top-1/2","data-[placement=left]:before:-translate-y-1/2","data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-start]:before:top-1/4","data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-end]:before:bottom-1/4","data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=right]:before:top-1/2","data-[placement=right]:before:-translate-y-1/2","data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-start]:before:top-1/4","data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-end]:before:bottom-1/4",...wh],content:["z-10","px-2.5","py-1","w-full","inline-flex","flex-col","items-center","justify-center","box-border","subpixel-antialiased","outline-hidden","box-border"],trigger:["z-10"],backdrop:["hidden"],arrow:[]},variants:{size:{sm:{content:"text-tiny"},md:{content:"text-small"},lg:{content:"text-medium"}},color:{default:{base:"before:bg-content1 before:shadow-small",content:"bg-content1"},foreground:{base:"before:bg-foreground",content:Te.solid.foreground},primary:{base:"before:bg-primary",content:Te.solid.primary},secondary:{base:"before:bg-secondary",content:Te.solid.secondary},success:{base:"before:bg-success",content:Te.solid.success},warning:{base:"before:bg-warning",content:Te.solid.warning},danger:{base:"before:bg-danger",content:Te.solid.danger}},radius:{none:{content:"rounded-none"},sm:{content:"rounded-small"},md:{content:"rounded-medium"},lg:{content:"rounded-large"},full:{content:"rounded-full"}},shadow:{none:{content:"shadow-none"},sm:{content:"shadow-small"},md:{content:"shadow-medium"},lg:{content:"shadow-large"}},backdrop:{transparent:{},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"}},triggerScaleOnOpen:{true:{trigger:["aria-expanded:scale-[0.97]","aria-expanded:opacity-70","subpixel-antialiased"]},false:{}},disableAnimation:{true:{base:"animate-none"}},isTriggerDisabled:{true:{trigger:"opacity-disabled pointer-events-none"},false:{}}},defaultVariants:{color:"default",radius:"lg",size:"md",shadow:"md",backdrop:"transparent",triggerScaleOnOpen:!0},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"block w-full h-full fixed inset-0 -z-30"}}]});Zn({slots:{base:"flex flex-col gap-2 w-full",label:"",labelWrapper:"flex justify-between",value:"",track:"z-0 relative bg-default-300/50 overflow-hidden rtl:rotate-180",indicator:"h-full"},variants:{color:{default:{indicator:"bg-default-400"},primary:{indicator:"bg-primary"},secondary:{indicator:"bg-secondary"},success:{indicator:"bg-success"},warning:{indicator:"bg-warning"},danger:{indicator:"bg-danger"}},size:{sm:{label:"text-small",value:"text-small",track:"h-1"},md:{label:"text-medium",value:"text-medium",track:"h-3"},lg:{label:"text-large",value:"text-large",track:"h-5"}},radius:{none:{track:"rounded-none",indicator:"rounded-none"},sm:{track:"rounded-small",indicator:"rounded-small"},md:{track:"rounded-medium",indicator:"rounded-medium"},lg:{track:"rounded-large",indicator:"rounded-large"},full:{track:"rounded-full",indicator:"rounded-full"}},isStriped:{true:{indicator:"bg-stripe-gradient-default bg-stripe-size"}},isIndeterminate:{true:{indicator:["absolute","w-full","origin-left","animate-indeterminate-bar"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-transform !duration-500"}}},defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{indicator:"!transition-none motion-reduce:transition-none"}},{color:"primary",isStriped:!0,class:{indicator:"bg-stripe-gradient-primary bg-stripe-size"}},{color:"secondary",isStriped:!0,class:{indicator:"bg-stripe-gradient-secondary bg-stripe-size"}},{color:"success",isStriped:!0,class:{indicator:"bg-stripe-gradient-success bg-stripe-size"}},{color:"warning",isStriped:!0,class:{indicator:"bg-stripe-gradient-warning bg-stripe-size"}},{color:"danger",isStriped:!0,class:{indicator:"bg-stripe-gradient-danger bg-stripe-size"}}]},{twMerge:!0});var gk=Zn({slots:{base:"flex flex-col justify-center gap-1 max-w-fit items-center",label:"",svgWrapper:"relative block",svg:"z-0 relative overflow-hidden",track:"h-full stroke-default-300/50",indicator:"h-full stroke-current",value:"absolute font-normal inset-0 flex items-center justify-center"},variants:{color:{default:{svg:"text-default-400"},primary:{svg:"text-primary"},secondary:{svg:"text-secondary"},success:{svg:"text-success"},warning:{svg:"text-warning"},danger:{svg:"text-danger"}},size:{sm:{svg:"w-8 h-8",label:"text-small",value:"text-[0.5rem]"},md:{svg:"w-10 h-10",label:"text-small",value:"text-[0.55rem]"},lg:{svg:"w-12 h-12",label:"text-medium",value:"text-[0.6rem]"}},isIndeterminate:{true:{svg:"animate-spinner-ease-spin"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-all !duration-500"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{svg:"!transition-none motion-reduce:transition-none"}}]}),AO=["data-[top-scroll=true]:[mask-image:linear-gradient(0deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[bottom-scroll=true]:[mask-image:linear-gradient(180deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[top-bottom-scroll=true]:[mask-image:linear-gradient(#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],RO=["data-[left-scroll=true]:[mask-image:linear-gradient(270deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[right-scroll=true]:[mask-image:linear-gradient(90deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[left-right-scroll=true]:[mask-image:linear-gradient(to_right,#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],vk=Zn({base:[],variants:{orientation:{vertical:["overflow-y-auto",...AO],horizontal:["overflow-x-auto",...RO]},hideScrollBar:{true:"scrollbar-hide",false:""}},defaultVariants:{orientation:"vertical",hideScrollBar:!1}}),yk=Zn({slots:{base:["group","relative","overflow-hidden","bg-content3 dark:bg-content2","pointer-events-none","before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2","data-[loaded=true]:pointer-events-auto","data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent","data-[loaded=true]:before:opacity-0 data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0"],content:["opacity-0","group-data-[loaded=true]:opacity-100"]},variants:{disableAnimation:{true:{base:"before:animate-none before:transition-none after:transition-none",content:"transition-none"},false:{base:"transition-background !duration-300",content:"transition-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{}}),bk=Zn({slots:{base:"group flex flex-col data-[hidden=true]:hidden",label:["absolute","z-10","pointer-events-none","origin-top-left","shrink-0","rtl:origin-top-right","subpixel-antialiased","block","text-small","text-foreground-500"],mainWrapper:"h-full",inputWrapper:"relative w-full inline-flex tap-highlight-transparent flex-row items-center shadow-xs px-3 gap-3",innerWrapper:"inline-flex w-full items-center h-full box-border",input:["w-full font-normal bg-transparent !outline-hidden placeholder:text-foreground-500 focus-visible:outline-hidden","data-[has-start-content=true]:ps-1.5","data-[has-end-content=true]:pe-1.5","data-[type=color]:rounded-none","file:cursor-pointer file:bg-transparent file:border-0","autofill:bg-transparent bg-clip-text"],clearButton:["p-2","-m-2","z-10","absolute","end-3","start-auto","pointer-events-none","appearance-none","outline-hidden","select-none","opacity-0","cursor-pointer","active:!opacity-70","rounded-full",...wh],helperWrapper:"hidden group-data-[has-helper=true]:flex p-1 relative flex-col gap-1.5",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{inputWrapper:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"]},faded:{inputWrapper:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 focus-within:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground"},bordered:{inputWrapper:["border-medium","border-default-200","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground"]},underlined:{inputWrapper:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","group-data-[focus=true]:after:w-full"],innerWrapper:"pb-1",label:"group-data-[filled-within=true]:text-foreground"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{label:"text-tiny",inputWrapper:"h-8 min-h-8 px-2 rounded-small",input:"text-small",clearButton:"text-medium"},md:{inputWrapper:"h-10 min-h-10 rounded-medium",input:"text-small",clearButton:"text-large hover:!opacity-100"},lg:{label:"text-medium",inputWrapper:"h-12 min-h-12 rounded-large",input:"text-medium",clearButton:"text-large hover:!opacity-100"}},radius:{none:{inputWrapper:"rounded-none"},sm:{inputWrapper:"rounded-small"},md:{inputWrapper:"rounded-medium"},lg:{inputWrapper:"rounded-large"},full:{inputWrapper:"rounded-full"}},labelPlacement:{outside:{mainWrapper:"flex flex-col"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:items-start",inputWrapper:"flex-1",mainWrapper:"flex flex-col",label:"relative text-foreground pe-2 ps-2 pointer-events-auto"},"outside-top":{mainWrapper:"flex flex-col",label:"relative text-foreground pb-2 pointer-events-auto"},inside:{label:"cursor-text",inputWrapper:"flex-col items-start justify-center gap-0",innerWrapper:"group-data-[has-label=true]:items-end"}},fullWidth:{true:{base:"w-full"},false:{}},isClearable:{true:{input:"peer pe-6 input-search-cancel-button-none",clearButton:["peer-data-[filled=true]:pointer-events-auto","peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block","peer-data-[filled=true]:scale-100"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",inputWrapper:"pointer-events-none",label:"pointer-events-none"}},isInvalid:{true:{label:"!text-danger",input:"!placeholder:text-danger !text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ms-0.5"}},isMultiline:{true:{label:"relative",inputWrapper:"!h-auto",innerWrapper:"items-start group-data-[has-label=true]:items-start",input:"resize-none data-[hide-scroll=true]:scrollbar-hide",clearButton:"absolute top-2 right-2 rtl:right-auto rtl:left-2 z-10"}},disableAnimation:{true:{input:"transition-none",inputWrapper:"transition-none",label:"transition-none"},false:{inputWrapper:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","!duration-200","!ease-out","motion-reduce:transition-none","transition-[transform,color,left,opacity,translate,scale]"],clearButton:["scale-90","ease-out","duration-150","transition-[opacity,transform]","motion-reduce:transition-none","motion-reduce:scale-100"]}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,isDisabled:!1,isMultiline:!1},compoundVariants:[{variant:"flat",color:"default",class:{input:"group-data-[has-value=true]:text-default-foreground"}},{variant:"flat",color:"primary",class:{inputWrapper:["bg-primary-100","data-[hover=true]:bg-primary-50","text-primary","group-data-[focus=true]:bg-primary-50","placeholder:text-primary"],input:"placeholder:text-primary",label:"text-primary"}},{variant:"flat",color:"secondary",class:{inputWrapper:["bg-secondary-100","text-secondary","data-[hover=true]:bg-secondary-50","group-data-[focus=true]:bg-secondary-50","placeholder:text-secondary"],input:"placeholder:text-secondary",label:"text-secondary"}},{variant:"flat",color:"success",class:{inputWrapper:["bg-success-100","text-success-600","dark:text-success","placeholder:text-success-600","dark:placeholder:text-success","data-[hover=true]:bg-success-50","group-data-[focus=true]:bg-success-50"],input:"placeholder:text-success-600 dark:placeholder:text-success",label:"text-success-600 dark:text-success"}},{variant:"flat",color:"warning",class:{inputWrapper:["bg-warning-100","text-warning-600","dark:text-warning","placeholder:text-warning-600","dark:placeholder:text-warning","data-[hover=true]:bg-warning-50","group-data-[focus=true]:bg-warning-50"],input:"placeholder:text-warning-600 dark:placeholder:text-warning",label:"text-warning-600 dark:text-warning"}},{variant:"flat",color:"danger",class:{inputWrapper:["bg-danger-100","text-danger","dark:text-danger-500","placeholder:text-danger","dark:placeholder:text-danger-500","data-[hover=true]:bg-danger-50","group-data-[focus=true]:bg-danger-50"],input:"placeholder:text-danger dark:placeholder:text-danger-500",label:"text-danger dark:text-danger-500"}},{variant:"faded",color:"primary",class:{label:"text-primary",inputWrapper:"data-[hover=true]:border-primary focus-within:border-primary"}},{variant:"faded",color:"secondary",class:{label:"text-secondary",inputWrapper:"data-[hover=true]:border-secondary focus-within:border-secondary"}},{variant:"faded",color:"success",class:{label:"text-success",inputWrapper:"data-[hover=true]:border-success focus-within:border-success"}},{variant:"faded",color:"warning",class:{label:"text-warning",inputWrapper:"data-[hover=true]:border-warning focus-within:border-warning"}},{variant:"faded",color:"danger",class:{label:"text-danger",inputWrapper:"data-[hover=true]:border-danger focus-within:border-danger"}},{variant:"underlined",color:"default",class:{input:"group-data-[has-value=true]:text-foreground"}},{variant:"underlined",color:"primary",class:{inputWrapper:"after:bg-primary",label:"text-primary"}},{variant:"underlined",color:"secondary",class:{inputWrapper:"after:bg-secondary",label:"text-secondary"}},{variant:"underlined",color:"success",class:{inputWrapper:"after:bg-success",label:"text-success"}},{variant:"underlined",color:"warning",class:{inputWrapper:"after:bg-warning",label:"text-warning"}},{variant:"underlined",color:"danger",class:{inputWrapper:"after:bg-danger",label:"text-danger"}},{variant:"bordered",color:"primary",class:{inputWrapper:"group-data-[focus=true]:border-primary",label:"text-primary"}},{variant:"bordered",color:"secondary",class:{inputWrapper:"group-data-[focus=true]:border-secondary",label:"text-secondary"}},{variant:"bordered",color:"success",class:{inputWrapper:"group-data-[focus=true]:border-success",label:"text-success"}},{variant:"bordered",color:"warning",class:{inputWrapper:"group-data-[focus=true]:border-warning",label:"text-warning"}},{variant:"bordered",color:"danger",class:{inputWrapper:"group-data-[focus=true]:border-danger",label:"text-danger"}},{labelPlacement:"inside",color:"default",class:{label:"group-data-[filled-within=true]:text-default-600"}},{labelPlacement:"outside",color:"default",class:{label:"group-data-[filled-within=true]:text-foreground"}},{radius:"full",size:["sm"],class:{inputWrapper:"px-3"}},{radius:"full",size:"md",class:{inputWrapper:"px-4"}},{radius:"full",size:"lg",class:{inputWrapper:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{inputWrapper:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{inputWrapper:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{inputWrapper:[...L_]}},{isInvalid:!0,variant:"flat",class:{inputWrapper:["!bg-danger-50","data-[hover=true]:!bg-danger-100","group-data-[focus=true]:!bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{inputWrapper:"!border-danger group-data-[focus=true]:!border-danger"}},{isInvalid:!0,variant:"underlined",class:{inputWrapper:"after:!bg-danger"}},{labelPlacement:"inside",size:"sm",class:{inputWrapper:"h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{inputWrapper:"h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{inputWrapper:"h-16 py-2.5 gap-0"}},{labelPlacement:"inside",size:"sm",variant:["bordered","faded"],class:{inputWrapper:"py-1"}},{labelPlacement:["inside","outside"],class:{label:["group-data-[filled-within=true]:pointer-events-auto"]}},{labelPlacement:"outside",isMultiline:!1,class:{base:"relative justify-end",label:["pb-0","z-20","top-1/2","-translate-y-1/2","group-data-[filled-within=true]:start-0"]}},{labelPlacement:["inside"],class:{label:["group-data-[filled-within=true]:scale-85"]}},{labelPlacement:["inside"],variant:"flat",class:{innerWrapper:"pb-0.5"}},{variant:"underlined",size:"sm",class:{innerWrapper:"pb-1"}},{variant:"underlined",size:["md","lg"],class:{innerWrapper:"pb-1.5"}},{labelPlacement:"inside",size:["sm","md"],class:{label:"text-small"}},{labelPlacement:"inside",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]"]}},{labelPlacement:"inside",variant:"underlined",size:"lg",isMultiline:!1,class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]"]}},{labelPlacement:"outside",size:"sm",isMultiline:!1,class:{label:["start-2","text-tiny","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-tiny)/2_+_16px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]"}},{labelPlacement:"outside",size:"md",isMultiline:!1,class:{label:["start-3","end-auto","text-small","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]"}},{labelPlacement:"outside",size:"lg",isMultiline:!1,class:{label:["start-3","end-auto","text-medium","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]"}},{labelPlacement:"outside-left",size:"sm",class:{label:"group-data-[has-helper=true]:pt-2"}},{labelPlacement:"outside-left",size:"md",class:{label:"group-data-[has-helper=true]:pt-3"}},{labelPlacement:"outside-left",size:"lg",class:{label:"group-data-[has-helper=true]:pt-4"}},{labelPlacement:["outside","outside-left"],isMultiline:!0,class:{inputWrapper:"py-2"}},{labelPlacement:"outside",isMultiline:!0,class:{label:"pb-1.5"}},{labelPlacement:"inside",isMultiline:!0,class:{label:"pb-0.5",input:"pt-0"}},{isMultiline:!0,disableAnimation:!1,class:{input:"transition-height !duration-100 motion-reduce:transition-none"}},{labelPlacement:["inside","outside"],class:{label:["pe-2","max-w-full","text-ellipsis","overflow-hidden"]}},{isMultiline:!0,radius:"full",class:{inputWrapper:"data-[has-multiple-rows=true]:rounded-large"}},{isClearable:!0,isMultiline:!0,class:{clearButton:["group-data-[has-value=true]:opacity-70 group-data-[has-value=true]:block","group-data-[has-value=true]:scale-100","group-data-[has-value=true]:pointer-events-auto"]}}]}),xk=Zn({slots:{wrapper:["flex","w-screen","h-[100dvh]","fixed","inset-0","z-50","overflow-x-auto","justify-center","h-[--visual-viewport-height]"],base:["flex","flex-col","relative","bg-white","z-50","w-full","box-border","bg-content1","outline-hidden","mx-1","my-1","sm:mx-6","sm:my-16"],backdrop:"z-50",header:"flex py-4 px-6 flex-initial text-large font-semibold",body:"flex flex-1 flex-col gap-3 px-6 py-2",footer:"flex flex-row gap-2 px-6 py-4 justify-end",closeButton:["absolute","appearance-none","outline-hidden","select-none","top-1","end-1","p-2","text-foreground-500","rounded-full","hover:bg-default-100","active:bg-default-200","tap-highlight-transparent",...wh]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},placement:{auto:{wrapper:"items-end sm:items-center"},center:{wrapper:"items-center sm:items-center"},top:{wrapper:"items-start sm:items-start"},"top-center":{wrapper:"items-start sm:items-center"},bottom:{wrapper:"items-end sm:items-end"},"bottom-center":{wrapper:"items-end sm:items-center"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"hidden"},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-md backdrop-saturate-150 bg-overlay/30"}},scrollBehavior:{normal:{base:"overflow-y-hidden"},inside:{base:"max-h-[calc(100%_-_8rem)]",body:"overflow-y-auto"},outside:{wrapper:"items-start sm:items-start overflow-y-auto",base:"my-16"}},disableAnimation:{false:{wrapper:["[--scale-enter:100%]","[--scale-exit:100%]","[--slide-enter:0px]","[--slide-exit:80px]","sm:[--scale-enter:100%]","sm:[--scale-exit:103%]","sm:[--slide-enter:0px]","sm:[--slide-exit:0px]"]}}},defaultVariants:{size:"md",radius:"lg",shadow:"sm",placement:"auto",backdrop:"opaque",scrollBehavior:"normal"},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"w-screen h-screen fixed inset-0"}}]}),LO=Zn({base:"shrink-0 bg-divider border-none",variants:{orientation:{horizontal:"w-full h-divider",vertical:"h-full w-divider"}},defaultVariants:{orientation:"horizontal"}}),MO=Zn({base:"flex flex-col gap-2 items-start"}),wk=Zn({slots:{wrapper:"relative shadow-black/5",zoomedWrapper:"relative overflow-hidden rounded-inherit",img:"relative z-10 opacity-0 shadow-black/5 data-[loaded=true]:opacity-100",blurredImg:["absolute","z-0","inset-0","w-full","h-full","object-cover","filter","blur-lg","scale-105","saturate-150","opacity-30","translate-y-1"]},variants:{radius:{none:{},sm:{},md:{},lg:{},full:{}},shadow:{none:{wrapper:"shadow-none",img:"shadow-none"},sm:{wrapper:"shadow-small",img:"shadow-small"},md:{wrapper:"shadow-medium",img:"shadow-medium"},lg:{wrapper:"shadow-large",img:"shadow-large"}},isZoomed:{true:{img:["object-cover","transform","hover:scale-125"]}},showSkeleton:{true:{wrapper:["group","relative","overflow-hidden","bg-content3 dark:bg-content2"],img:"opacity-0"}},disableAnimation:{true:{img:"transition-none"},false:{img:"transition-transform-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{radius:"lg",shadow:"none",isZoomed:!1,isBlurred:!1,showSkeleton:!1},compoundVariants:[{showSkeleton:!0,disableAnimation:!1,class:{wrapper:["before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2"]}}],compoundSlots:[{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"none",class:"rounded-none"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"full",class:"rounded-full"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"sm",class:"rounded-small"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"md",class:"rounded-md"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"lg",class:"rounded-large"}]}),DO=Zn({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-hidden","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","transform-gpu data-[pressed=true]:scale-[0.97]","cursor-pointer",...wh],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none data-[pressed=true]:scale-100",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:Te.solid.default},{variant:"solid",color:"primary",class:Te.solid.primary},{variant:"solid",color:"secondary",class:Te.solid.secondary},{variant:"solid",color:"success",class:Te.solid.success},{variant:"solid",color:"warning",class:Te.solid.warning},{variant:"solid",color:"danger",class:Te.solid.danger},{variant:"shadow",color:"default",class:Te.shadow.default},{variant:"shadow",color:"primary",class:Te.shadow.primary},{variant:"shadow",color:"secondary",class:Te.shadow.secondary},{variant:"shadow",color:"success",class:Te.shadow.success},{variant:"shadow",color:"warning",class:Te.shadow.warning},{variant:"shadow",color:"danger",class:Te.shadow.danger},{variant:"bordered",color:"default",class:Te.bordered.default},{variant:"bordered",color:"primary",class:Te.bordered.primary},{variant:"bordered",color:"secondary",class:Te.bordered.secondary},{variant:"bordered",color:"success",class:Te.bordered.success},{variant:"bordered",color:"warning",class:Te.bordered.warning},{variant:"bordered",color:"danger",class:Te.bordered.danger},{variant:"flat",color:"default",class:Te.flat.default},{variant:"flat",color:"primary",class:Te.flat.primary},{variant:"flat",color:"secondary",class:Te.flat.secondary},{variant:"flat",color:"success",class:Te.flat.success},{variant:"flat",color:"warning",class:Te.flat.warning},{variant:"flat",color:"danger",class:Te.flat.danger},{variant:"faded",color:"default",class:Te.faded.default},{variant:"faded",color:"primary",class:Te.faded.primary},{variant:"faded",color:"secondary",class:Te.faded.secondary},{variant:"faded",color:"success",class:Te.faded.success},{variant:"faded",color:"warning",class:Te.faded.warning},{variant:"faded",color:"danger",class:Te.faded.danger},{variant:"light",color:"default",class:[Te.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[Te.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[Te.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[Te.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[Te.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[Te.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:[Te.ghost.default,"data-[hover=true]:!bg-default"]},{variant:"ghost",color:"primary",class:[Te.ghost.primary,"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]},{variant:"ghost",color:"secondary",class:[Te.ghost.secondary,"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]},{variant:"ghost",color:"success",class:[Te.ghost.success,"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]},{variant:"ghost",color:"warning",class:[Te.ghost.warning,"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]},{variant:"ghost",color:"danger",class:[Te.ghost.danger,"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:af.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:af.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:af.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:af.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:af.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:af.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]});Zn({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var NO=Zn({slots:{base:"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none",wrapper:["relative","inline-flex","items-center","justify-center","shrink-0","overflow-hidden","before:content-['']","before:absolute","before:inset-0","before:border-solid","before:border-2","before:box-border","before:border-default","after:content-['']","after:absolute","after:inset-0","after:scale-50","after:opacity-0","after:origin-center","group-data-[selected=true]:after:scale-100","group-data-[selected=true]:after:opacity-100","group-data-[hover=true]:before:bg-default-100",...L_],hiddenInput:$O,icon:"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none",label:"relative text-foreground select-none"},variants:{color:{default:{wrapper:"after:bg-default after:text-default-foreground text-default-foreground"},primary:{wrapper:"after:bg-primary after:text-primary-foreground text-primary-foreground"},secondary:{wrapper:"after:bg-secondary after:text-secondary-foreground text-secondary-foreground"},success:{wrapper:"after:bg-success after:text-success-foreground text-success-foreground"},warning:{wrapper:"after:bg-warning after:text-warning-foreground text-warning-foreground"},danger:{wrapper:"after:bg-danger after:text-danger-foreground text-danger-foreground"}},size:{sm:{wrapper:["w-4 h-4 me-2","rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"],label:"text-small",icon:"w-3 h-2"},md:{wrapper:["w-5 h-5 me-2","rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"],label:"text-medium",icon:"w-4 h-3"},lg:{wrapper:["w-6 h-6 me-2","rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"],label:"text-large",icon:"w-5 h-4"}},radius:{none:{wrapper:"rounded-none before:rounded-none after:rounded-none"},sm:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"]},md:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"]},lg:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"]},full:{wrapper:"rounded-full before:rounded-full after:rounded-full"}},lineThrough:{true:{label:["inline-flex","items-center","justify-center","before:content-['']","before:absolute","before:bg-foreground","before:w-0","before:h-0.5","group-data-[selected=true]:opacity-60","group-data-[selected=true]:before:w-full"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isInvalid:{true:{wrapper:"before:border-danger",label:"text-danger"}},disableAnimation:{true:{wrapper:"transition-none",icon:"transition-none",label:"transition-none"},false:{wrapper:["before:transition-colors","group-data-[pressed=true]:scale-95","transition-transform","after:transition-transform-opacity","after:!ease-linear","after:!duration-200","motion-reduce:transition-none"],icon:"transition-opacity motion-reduce:transition-none",label:"transition-colors-opacity before:transition-width motion-reduce:transition-none"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1,lineThrough:!1}});Zn({slots:{base:"relative flex flex-col gap-2",label:"relative text-medium text-foreground-500",wrapper:"flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row",description:"text-small text-foreground-400",errorMessage:"text-small text-danger"},variants:{isRequired:{true:{label:"after:content-['*'] after:text-danger after:ml-0.5"}},isInvalid:{true:{description:"text-danger"}},disableAnimation:{true:{},false:{description:"transition-colors !duration-150 motion-reduce:transition-none"}}},defaultVariants:{isInvalid:!1,isRequired:!1}});var Sk=Zn({slots:{base:["relative","max-w-fit","min-w-min","inline-flex","items-center","justify-between","box-border","whitespace-nowrap"],content:"flex-1 text-inherit font-normal",dot:["w-2","h-2","ml-1","rounded-full"],avatar:"shrink-0",closeButton:["z-10","appearance-none","outline-hidden","select-none","transition-opacity","opacity-70","hover:opacity-100","cursor-pointer","active:opacity-disabled","tap-highlight-transparent"]},variants:{variant:{solid:{},bordered:{base:"border-medium bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-medium"},shadow:{},dot:{base:"border-medium border-default text-foreground bg-transparent"}},color:{default:{dot:"bg-default-400"},primary:{dot:"bg-primary"},secondary:{dot:"bg-secondary"},success:{dot:"bg-success"},warning:{dot:"bg-warning"},danger:{dot:"bg-danger"}},size:{sm:{base:"px-1 h-6 text-tiny",content:"px-1",closeButton:"text-medium",avatar:"w-4 h-4"},md:{base:"px-1 h-7 text-small",content:"px-2",closeButton:"text-large",avatar:"w-5 h-5"},lg:{base:"px-2 h-8 text-medium",content:"px-2",closeButton:"text-xl",avatar:"w-6 h-6"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isOneChar:{true:{},false:{}},isCloseable:{true:{},false:{}},hasStartContent:{true:{}},hasEndContent:{true:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isCloseButtonFocusVisible:{true:{closeButton:[...IO,"ring-1","rounded-full"]}}},defaultVariants:{variant:"solid",color:"default",size:"md",radius:"full",isDisabled:!1},compoundVariants:[{variant:"solid",color:"default",class:{base:Te.solid.default}},{variant:"solid",color:"primary",class:{base:Te.solid.primary}},{variant:"solid",color:"secondary",class:{base:Te.solid.secondary}},{variant:"solid",color:"success",class:{base:Te.solid.success}},{variant:"solid",color:"warning",class:{base:Te.solid.warning}},{variant:"solid",color:"danger",class:{base:Te.solid.danger}},{variant:"shadow",color:"default",class:{base:Te.shadow.default}},{variant:"shadow",color:"primary",class:{base:Te.shadow.primary}},{variant:"shadow",color:"secondary",class:{base:Te.shadow.secondary}},{variant:"shadow",color:"success",class:{base:Te.shadow.success}},{variant:"shadow",color:"warning",class:{base:Te.shadow.warning}},{variant:"shadow",color:"danger",class:{base:Te.shadow.danger}},{variant:"bordered",color:"default",class:{base:Te.bordered.default}},{variant:"bordered",color:"primary",class:{base:Te.bordered.primary}},{variant:"bordered",color:"secondary",class:{base:Te.bordered.secondary}},{variant:"bordered",color:"success",class:{base:Te.bordered.success}},{variant:"bordered",color:"warning",class:{base:Te.bordered.warning}},{variant:"bordered",color:"danger",class:{base:Te.bordered.danger}},{variant:"flat",color:"default",class:{base:Te.flat.default}},{variant:"flat",color:"primary",class:{base:Te.flat.primary}},{variant:"flat",color:"secondary",class:{base:Te.flat.secondary}},{variant:"flat",color:"success",class:{base:Te.flat.success}},{variant:"flat",color:"warning",class:{base:Te.flat.warning}},{variant:"flat",color:"danger",class:{base:Te.flat.danger}},{variant:"faded",color:"default",class:{base:Te.faded.default}},{variant:"faded",color:"primary",class:{base:Te.faded.primary}},{variant:"faded",color:"secondary",class:{base:Te.faded.secondary}},{variant:"faded",color:"success",class:{base:Te.faded.success}},{variant:"faded",color:"warning",class:{base:Te.faded.warning}},{variant:"faded",color:"danger",class:{base:Te.faded.danger}},{variant:"light",color:"default",class:{base:Te.light.default}},{variant:"light",color:"primary",class:{base:Te.light.primary}},{variant:"light",color:"secondary",class:{base:Te.light.secondary}},{variant:"light",color:"success",class:{base:Te.light.success}},{variant:"light",color:"warning",class:{base:Te.light.warning}},{variant:"light",color:"danger",class:{base:Te.light.danger}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"sm",class:{base:"w-5 h-5 min-w-5 min-h-5"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"md",class:{base:"w-6 h-6 min-w-6 min-h-6"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"lg",class:{base:"w-7 h-7 min-w-7 min-h-7"}},{isOneChar:!0,isCloseable:!1,hasStartContent:!1,hasEndContent:!1,class:{base:"px-0 justify-center",content:"px-0 flex-none"}},{isOneChar:!0,isCloseable:!0,hasStartContent:!1,hasEndContent:!1,class:{base:"w-auto"}},{isOneChar:!0,variant:"dot",class:{base:"w-auto h-7 px-1 items-center",content:"px-2"}},{hasStartContent:!0,size:"sm",class:{content:"pl-0.5"}},{hasStartContent:!0,size:["md","lg"],class:{content:"pl-1"}},{hasEndContent:!0,size:"sm",class:{content:"pr-0.5"}},{hasEndContent:!0,size:["md","lg"],class:{content:"pr-1"}}]}),FO=Zn({base:"px-2",variants:{variant:{light:"",shadow:"px-4 shadow-medium rounded-medium bg-content1",bordered:"px-4 border-medium border-divider rounded-medium",splitted:"flex flex-col gap-2"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"light",fullWidth:!0}}),OO=Zn({slots:{base:"",heading:"",trigger:["flex py-4 w-full h-full gap-3 outline-hidden items-center tap-highlight-transparent",...wh],startContent:"shrink-0",indicator:"text-default-400",titleWrapper:"flex-1 flex flex-col text-start",title:"text-foreground text-medium",subtitle:"text-small text-foreground-500 font-normal",content:"py-2"},variants:{variant:{splitted:{base:"px-4 bg-content1 shadow-medium rounded-medium"}},isCompact:{true:{trigger:"py-2",title:"text-medium",subtitle:"text-small",indicator:"text-medium",content:"py-1"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},hideIndicator:{true:{indicator:"hidden"}},disableAnimation:{true:{content:"hidden data-[open=true]:block"},false:{indicator:"transition-transform",trigger:"transition-opacity"}},disableIndicatorAnimation:{true:{indicator:"transition-none"},false:{indicator:"rotate-0 data-[open=true]:-rotate-90 rtl:-rotate-180 rtl:data-[open=true]:-rotate-90"}}},defaultVariants:{size:"md",radius:"lg",isDisabled:!1,hideIndicator:!1,disableIndicatorAnimation:!1}});function M_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=M_(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function zO(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=M_(e))&&(r&&(r+=" "),r+=t);return r}var jO=A_({extend:kb});function yn(...e){return jO(zO(e))}const BO="modulepreload",VO=function(e){return"/"+e},kk={},io=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=a?.nonce||a?.getAttribute("nonce");i=d(n.map(h=>{if(h=VO(h),h in kk)return;kk[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":BO,m||(b.as="script"),b.crossOrigin="",b.href=h,c&&b.setAttribute("nonce",c),document.head.appendChild(b),m)return new Promise((x,k)=>{b.addEventListener("load",x),b.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return i.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};function UO(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button"}=e,T;n==="button"?T={type:P,disabled:r}:T={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:_,isPressed:A}=il({onPressStart:s,onPressEnd:a,onPressChange:d,onPress:i,onPressUp:c,onClick:g,isDisabled:r,preventFocusOnPress:h,ref:t}),{focusableProps:L}=xh(e,t);m&&(L.tabIndex=r?-1:L.tabIndex);let O=Pn(L,_,$u(e,{labelable:!0}));return{isPressed:A,buttonProps:Pn(T,O,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}function KO(e,t,n){let{item:r,isDisabled:i}=e,s=r.key,a=t.selectionManager,c=S.useId(),d=S.useId(),h=t.disabledKeys.has(r.key)||i;S.useEffect(()=>{s===t.focusedKey&&document.activeElement!==n.current&&n.current&&Cu(n.current)},[n,s,t.focusedKey]);let m=S.useCallback(P=>{a.canSelectItem(s)&&(a.select(s,P),t.toggleKey(s))},[s,a]);const g=S.useCallback(P=>{a.selectionBehavior==="replace"&&a.extendSelection(P),a.setFocusedKey(P)},[a]),b=S.useCallback(P=>{const _={ArrowDown:()=>{const A=t.collection.getKeyAfter(s);if(A&&t.disabledKeys.has(A)){const L=t.collection.getKeyAfter(A);L&&g(L)}else A&&g(A)},ArrowUp:()=>{const A=t.collection.getKeyBefore(s);if(A&&t.disabledKeys.has(A)){const L=t.collection.getKeyBefore(A);L&&g(L)}else A&&g(A)},Home:()=>{const A=t.collection.getFirstKey();A&&g(A)},End:()=>{const A=t.collection.getLastKey();A&&g(A)}}[P.key];_&&(P.preventDefault(),a.canSelectItem(s)&&_(P))},[s,a]);let{buttonProps:x}=UO({id:c,elementType:"button",isDisabled:h,onKeyDown:b,onPress:m},n),k=t.selectionManager.isSelected(r.key);return{buttonProps:{...x,"aria-expanded":k,"aria-controls":k?d:void 0},regionProps:{id:d,role:"region","aria-labelledby":c}}}function Ck(e){return hM()?e.altKey:e.ctrlKey}function Mg(e,t){var n,r;let i=`[data-key="${CSS.escape(String(t))}"]`,s=(n=e.current)===null||n===void 0?void 0:n.dataset.collection;return s&&(i=`[data-collection="${CSS.escape(s)}"]${i}`),(r=e.current)===null||r===void 0?void 0:r.querySelector(i)}const D_=new WeakMap;function WO(e){let t=Pf();return D_.set(e,t),t}function qG(e){return D_.get(e)}const HO=1e3;function GO(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=S.useRef({search:"",timeout:void 0}).current,s=a=>{let c=qO(a.key);if(!(!c||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(c===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=c,t.getKeyForSearch!=null){let d=t.getKeyForSearch(i.search,n.focusedKey);d==null&&(d=t.getKeyForSearch(i.search)),d!=null&&(n.setFocusedKey(d),r&&r(d))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},HO)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:void 0}}}function qO(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function YO(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:a=!1,disallowSelectAll:c=!1,escapeKeyBehavior:d="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:g,allowsTabNavigation:b=!1,isVirtualized:x,scrollRef:k=r,linkBehavior:P="action"}=e,{direction:T}=hh(),_=ux(),A=X=>{var V;if(X.altKey&&X.key==="Tab"&&X.preventDefault(),!(!((V=r.current)===null||V===void 0)&&V.contains(X.target)))return;const ae=(Ie,mt)=>{if(Ie!=null){if(t.isLink(Ie)&&P==="selection"&&h&&!Ck(X)){FE.flushSync(()=>{t.setFocusedKey(Ie,mt)});let pt=Mg(r,Ie),Ut=t.getItemProps(Ie);pt&&_.open(pt,X,Ut.href,Ut.routerOptions);return}if(t.setFocusedKey(Ie,mt),t.isLink(Ie)&&P==="override")return;X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&!Ck(X)&&t.replaceSelection(Ie)}};switch(X.key){case"ArrowDown":if(n.getKeyBelow){var M,U,oe;let Ie=t.focusedKey!=null?(M=n.getKeyBelow)===null||M===void 0?void 0:M.call(n,t.focusedKey):(U=n.getFirstKey)===null||U===void 0?void 0:U.call(n);Ie==null&&s&&(Ie=(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"ArrowUp":if(n.getKeyAbove){var z,me,Ce;let Ie=t.focusedKey!=null?(z=n.getKeyAbove)===null||z===void 0?void 0:z.call(n,t.focusedKey):(me=n.getLastKey)===null||me===void 0?void 0:me.call(n);Ie==null&&s&&(Ie=(Ce=n.getLastKey)===null||Ce===void 0?void 0:Ce.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"ArrowLeft":if(n.getKeyLeftOf){var ye,Oe,Ne;let Ie=t.focusedKey!=null?(ye=n.getKeyLeftOf)===null||ye===void 0?void 0:ye.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=T==="rtl"?(Oe=n.getFirstKey)===null||Oe===void 0?void 0:Oe.call(n,t.focusedKey):(Ne=n.getLastKey)===null||Ne===void 0?void 0:Ne.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie,T==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var _e,Qe,at;let Ie=t.focusedKey!=null?(_e=n.getKeyRightOf)===null||_e===void 0?void 0:_e.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=T==="rtl"?(Qe=n.getLastKey)===null||Qe===void 0?void 0:Qe.call(n,t.focusedKey):(at=n.getFirstKey)===null||at===void 0?void 0:at.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie,T==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&X.shiftKey)return;X.preventDefault();let Ie=n.getFirstKey(t.focusedKey,hp(X));t.setFocusedKey(Ie),Ie!=null&&(hp(X)&&X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&X.shiftKey)return;X.preventDefault();let Ie=n.getLastKey(t.focusedKey,hp(X));t.setFocusedKey(Ie),Ie!=null&&(hp(X)&&X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let Ie=n.getKeyPageBelow(t.focusedKey);Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let Ie=n.getKeyPageAbove(t.focusedKey);Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"a":hp(X)&&t.selectionMode==="multiple"&&c!==!0&&(X.preventDefault(),t.selectAll());break;case"Escape":d==="clearSelection"&&!a&&t.selectedKeys.size!==0&&(X.stopPropagation(),X.preventDefault(),t.clearSelection());break;case"Tab":if(!b){if(X.shiftKey)r.current.focus();else{let Ie=Js(r.current,{tabbable:!0}),mt,pt;do pt=Ie.lastChild(),pt&&(mt=pt);while(pt);mt&&!mt.contains(document.activeElement)&&tl(mt)}break}}},L=S.useRef({top:0,left:0});lg(k,"scroll",x?void 0:()=>{var X,V,ae,M;L.current={top:(ae=(X=k.current)===null||X===void 0?void 0:X.scrollTop)!==null&&ae!==void 0?ae:0,left:(M=(V=k.current)===null||V===void 0?void 0:V.scrollLeft)!==null&&M!==void 0?M:0}});let O=X=>{if(t.isFocused){X.currentTarget.contains(X.target)||t.setFocused(!1);return}if(X.currentTarget.contains(X.target)){if(t.setFocused(!0),t.focusedKey==null){var V,ae;let oe=me=>{me!=null&&(t.setFocusedKey(me),h&&!t.isSelected(me)&&t.replaceSelection(me))},z=X.relatedTarget;var M,U;z&&X.currentTarget.compareDocumentPosition(z)&Node.DOCUMENT_POSITION_FOLLOWING?oe((M=t.lastSelectedKey)!==null&&M!==void 0?M:(V=n.getLastKey)===null||V===void 0?void 0:V.call(n)):oe((U=t.firstSelectedKey)!==null&&U!==void 0?U:(ae=n.getFirstKey)===null||ae===void 0?void 0:ae.call(n))}else!x&&k.current&&(k.current.scrollTop=L.current.top,k.current.scrollLeft=L.current.left);if(t.focusedKey!=null&&k.current){let oe=Mg(r,t.focusedKey);oe instanceof HTMLElement&&(!oe.contains(document.activeElement)&&!g&&tl(oe),oh()==="keyboard"&&E1(oe,{containingElement:r.current}))}}},j=X=>{X.currentTarget.contains(X.relatedTarget)||t.setFocused(!1)},$=S.useRef(!1);lg(r,CM,g?X=>{let{detail:V}=X;X.stopPropagation(),t.setFocused(!0),V?.focusStrategy==="first"&&($.current=!0)}:void 0);let Y=jn(()=>{var X,V;let ae=(V=(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n))!==null&&V!==void 0?V:null;ae==null?(aF(r.current),t.collection.size>0&&($.current=!1)):(t.setFocusedKey(ae),$.current=!1)});S1(()=>{$.current&&Y()},[t.collection,Y]);let te=jn(()=>{t.collection.size>0&&($.current=!1)});S1(()=>{te()},[t.focusedKey,te]),lg(r,kM,g?X=>{var V;X.stopPropagation(),t.setFocused(!1),!((V=X.detail)===null||V===void 0)&&V.clearFocusKey&&t.setFocusedKey(null)}:void 0);const ie=S.useRef(i),B=S.useRef(!1);S.useEffect(()=>{if(ie.current){var X,V;let U=null;var ae;i==="first"&&(U=(ae=(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n))!==null&&ae!==void 0?ae:null);var M;i==="last"&&(U=(M=(V=n.getLastKey)===null||V===void 0?void 0:V.call(n))!==null&&M!==void 0?M:null);let oe=t.selectedKeys;if(oe.size){for(let z of oe)if(t.canSelectItem(z)){U=z;break}}t.setFocused(!0),t.setFocusedKey(U),U==null&&!g&&r.current&&Cu(r.current),t.collection.size>0&&(ie.current=!1,B.current=!0)}});let W=S.useRef(t.focusedKey),G=S.useRef(null);S.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==W.current||B.current)&&k.current&&r.current){let X=oh(),V=Mg(r,t.focusedKey);if(!(V instanceof HTMLElement))return;(X==="keyboard"||B.current)&&(G.current&&cancelAnimationFrame(G.current),G.current=requestAnimationFrame(()=>{k.current&&(ME(k.current,V),X!=="virtual"&&E1(V,{containingElement:r.current}))}))}!g&&t.isFocused&&t.focusedKey==null&&W.current!=null&&r.current&&Cu(r.current),W.current=t.focusedKey,B.current=!1}),S.useEffect(()=>()=>{G.current&&cancelAnimationFrame(G.current)},[]),lg(r,"react-aria-focus-scope-restore",X=>{X.preventDefault(),t.setFocused(!0)});let ee={onKeyDown:A,onFocus:O,onBlur:j,onMouseDown(X){k.current===X.target&&X.preventDefault()}},{typeSelectProps:H}=GO({keyboardDelegate:n,selectionManager:t});m||(ee=Pn(H,ee));let le;g||(le=t.focusedKey==null?0:-1);let J=WO(t.collection);return{collectionProps:Pn(ee,{tabIndex:le,"data-collection":J})}}class Ek{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?Mg(this.ref,t):null;if(!r)return null;let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();return{x:s.left-i.left+n.scrollLeft,y:s.top-i.top+n.scrollTop,width:s.width,height:s.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t?.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t?.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,i,s;return{x:(n=t?.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t?.scrollTop)!==null&&r!==void 0?r:0,width:(i=t?.offsetWidth)!==null&&i!==void 0?i:0,height:(s=t?.offsetHeight)!==null&&s!==void 0?s:0}}constructor(t){this.ref=t}}class XO{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if(i?.type==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let i=t,s=this.layoutDelegate.getItemRect(i);if(!s||i==null)return null;let a=s;do{if(i=n(i),i==null)break;s=this.layoutDelegate.getItemRect(i)}while(s&&r(a,s)&&i!=null);return i}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let s=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let s=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<s&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<s&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(t,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let s=r.getItem(i);if(!s)return null;let a=s.textValue.slice(0,t.length);if(s.textValue&&this.collator.compare(a,t)===0)return i;i=this.getNextKey(i)}return null}constructor(...t){if(t.length===1){let n=t[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new Ek(n.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new Ek(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function QO(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:s,layoutDelegate:a}=e,c=RM({usage:"search",sensitivity:"base"}),d=t.disabledBehavior,h=S.useMemo(()=>s||new XO({collection:n,disabledKeys:r,disabledBehavior:d,ref:i,collator:c,layoutDelegate:a}),[s,a,n,r,i,c,d]),{collectionProps:m}=YO({...e,ref:i,selectionManager:t,keyboardDelegate:h});return{listProps:m}}function JO(e,t,n){let{listProps:r}=QO({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:n});return delete r.onKeyDownCapture,{accordionProps:{...r,tabIndex:void 0}}}function ZO(e){var t,n;const r=ci(),{ref:i,as:s,item:a,onFocusChange:c}=e,{state:d,className:h,indicator:m,children:g,title:b,subtitle:x,startContent:k,motionProps:P,focusedKey:T,variant:_,isCompact:A=!1,classNames:L={},isDisabled:O=!1,hideIndicator:j=!1,disableAnimation:$=(t=r?.disableAnimation)!=null?t:!1,keepContentMounted:Y=!1,disableIndicatorAnimation:te=!1,HeadingComponent:ie=s||"h2",onPress:B,onPressStart:W,onPressEnd:G,onPressChange:ee,onPressUp:H,onClick:le,...J}=e,X=s||"div",V=typeof X=="string",ae=Ii(i),M=d.disabledKeys.has(a.key)||O,U=d.selectionManager.isSelected(a.key),{buttonProps:oe,regionProps:z}=KO({item:a,isDisabled:M},{...d,focusedKey:T},ae),{onFocus:me,onBlur:Ce,...ye}=oe,{isFocused:Oe,isFocusVisible:Ne,focusProps:_e}=Pu({autoFocus:(n=a.props)==null?void 0:n.autoFocus}),{isHovered:Qe,hoverProps:at}=Eu({isDisabled:M}),{pressProps:Ie,isPressed:mt}=il({ref:ae,isDisabled:M,onPress:B,onPressStart:W,onPressEnd:G,onPressChange:ee,onPressUp:H}),pt=S.useCallback(()=>{c?.(!0,a.key)},[]),Ut=S.useCallback(()=>{c?.(!1,a.key)},[]),Ue=S.useMemo(()=>({...L}),[ds(L)]),it=S.useMemo(()=>OO({isCompact:A,isDisabled:M,hideIndicator:j,disableAnimation:$,disableIndicatorAnimation:te,variant:_}),[A,M,j,$,te,_]),Kt=Bt(Ue?.base,h),er=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"base",className:it.base({class:Kt}),...nn(Ef(J,{enabled:V}),pe)}),[Kt,V,J,it,a.props,U,M]),an=(pe={})=>{var Se,ze;return{ref:ae,"data-open":Ae(U),"data-focus":Ae(Oe),"data-focus-visible":Ae(Ne),"data-disabled":Ae(M),"data-hover":Ae(Qe),"data-pressed":Ae(mt),"data-slot":"trigger",className:it.trigger({class:Ue?.trigger}),onFocus:d1(pt,me,_e.onFocus,J.onFocus,(Se=a.props)==null?void 0:Se.onFocus),onBlur:d1(Ut,Ce,_e.onBlur,J.onBlur,(ze=a.props)==null?void 0:ze.onBlur),...nn(ye,at,Ie,pe,{onClick:el(Ie.onClick,le)})}},_t=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"content",className:it.content({class:Ue?.content}),...nn(z,pe)}),[it,Ue,z,U,M,Ue?.content]),Rt=S.useCallback((pe={})=>({"aria-hidden":Ae(!0),"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"indicator",className:it.indicator({class:Ue?.indicator}),...pe}),[it,Ue?.indicator,U,M,Ue?.indicator]),Tn=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"heading",className:it.heading({class:Ue?.heading}),...pe}),[it,Ue?.heading,U,M,Ue?.heading]),Er=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"title",className:it.title({class:Ue?.title}),...pe}),[it,Ue?.title,U,M,Ue?.title]),Nt=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(M),"data-slot":"subtitle",className:it.subtitle({class:Ue?.subtitle}),...pe}),[it,Ue,U,M,Ue?.subtitle]);return{Component:X,HeadingComponent:ie,item:a,slots:it,classNames:Ue,domRef:ae,indicator:m,children:g,title:b,subtitle:x,startContent:k,isOpen:U,isDisabled:M,hideIndicator:j,keepContentMounted:Y,disableAnimation:$,motionProps:P,getBaseProps:er,getHeadingProps:Tn,getButtonProps:an,getContentProps:_t,getIndicatorProps:Rt,getTitleProps:Er,getSubtitleProps:Nt}}var Pk=e=>D.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:D.jsx("path",{d:"M15.5 19l-7-7 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),N_=e=>D.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:D.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),e6=e=>{const{isSelected:t,isIndeterminate:n,disableAnimation:r,...i}=e;return D.jsx("svg",{"aria-hidden":"true",className:"fill-current",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",...i,children:D.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})},Bp={ease:[.36,.66,.4,1]},Zg={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:Bp.ease}},exit:{opacity:0,transition:{duration:.3,ease:Bp.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},Tk=()=>io(()=>import("./index-C_JcEI3R.js"),[]).then(e=>e.default),F_=jr((e,t)=>{const{Component:n,HeadingComponent:r,classNames:i,slots:s,indicator:a,children:c,title:d,subtitle:h,startContent:m,isOpen:g,isDisabled:b,hideIndicator:x,keepContentMounted:k,disableAnimation:P,motionProps:T,getBaseProps:_,getHeadingProps:A,getButtonProps:L,getTitleProps:O,getSubtitleProps:j,getContentProps:$,getIndicatorProps:Y}=ZO({...e,ref:t}),te=v5(),B=S.useMemo(()=>typeof a=="function"?a({indicator:D.jsx(Pk,{}),isOpen:g,isDisabled:b}):a||null,[a,g,b])||D.jsx(Pk,{}),W=S.useMemo(()=>{if(P)return k?D.jsx("div",{...$(),children:c}):g&&D.jsx("div",{...$(),children:c});const G={exit:{...Zg.collapse.exit,overflowY:"hidden"},enter:{...Zg.collapse.enter,overflowY:"unset"}};return k?D.jsx($f,{features:Tk,children:D.jsx(Af.section,{animate:g?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:te},variants:G,onKeyDown:ee=>{ee.stopPropagation()},...T,children:D.jsx("div",{...$(),children:c})},"accordion-content")}):D.jsx(ol,{initial:!1,children:g&&D.jsx($f,{features:Tk,children:D.jsx(Af.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:te},variants:G,onKeyDown:ee=>{ee.stopPropagation()},...T,children:D.jsx("div",{...$(),children:c})},"accordion-content")})})},[g,P,k,c,T]);return D.jsxs(n,{..._(),children:[D.jsx(r,{...A(),children:D.jsxs("button",{...L(),children:[m&&D.jsx("div",{className:s.startContent({class:i?.startContent}),children:m}),D.jsxs("div",{className:s.titleWrapper({class:i?.titleWrapper}),children:[d&&D.jsx("span",{...O(),children:d}),h&&D.jsx("span",{...j(),children:h})]}),!x&&B&&D.jsx("span",{...Y(),children:B})]})}),W]})});F_.displayName="HeroUI.AccordionItem";var t6=F_;class n6{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,n=n||new Set;let r=c=>{if(this.keyMap.set(c.key,c),c.childNodes&&(c.type==="section"||n.has(c.key)))for(let d of c.childNodes)r(d)};for(let c of t)r(c);let i=null,s=0;for(let[c,d]of this.keyMap)i?(i.nextKey=c,d.prevKey=i.key):(this.firstKey=c,d.prevKey=void 0),d.type==="item"&&(d.index=s++),i=d,i.nextKey=void 0;var a;this.lastKey=(a=i?.key)!==null&&a!==void 0?a:null}}class Po extends Set{constructor(t,n,r){super(t),t instanceof Po?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function r6(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function i6(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=e,a=S.useRef(!1),[,c]=S.useState(!1),d=S.useRef(null),h=S.useRef(null),[,m]=S.useState(null),g=S.useMemo(()=>_k(e.selectedKeys),[e.selectedKeys]),b=S.useMemo(()=>_k(e.defaultSelectedKeys,new Po),[e.defaultSelectedKeys]),[x,k]=Au(g,b,e.onSelectionChange),P=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[T,_]=S.useState(i);i==="replace"&&T==="toggle"&&typeof x=="object"&&x.size===0&&_("replace");let A=S.useRef(i);return S.useEffect(()=>{i!==A.current&&(_(i),A.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:T,setSelectionBehavior:_,get isFocused(){return a.current},setFocused(L){a.current=L,c(L)},get focusedKey(){return d.current},get childFocusStrategy(){return h.current},setFocusedKey(L,O="first"){d.current=L,h.current=O,m(L)},selectedKeys:x,setSelectedKeys(L){(r||!r6(L,x))&&k(L)},disabledKeys:P,disabledBehavior:s}}function _k(e,t){return e?e==="all"?"all":new Po(e):t}function O_(e){return null}O_.getCollectionNode=function*(t,n){let{childItems:r,title:i,children:s}=t,a=t.title||t.children,c=t.textValue||(typeof a=="string"?a:"")||t["aria-label"]||"";!c&&n?.suppressTextValueWarning,yield{type:"item",props:t,rendered:a,textValue:c,"aria-label":t["aria-label"],hasChildNodes:o6(t),*childNodes(){if(r)for(let d of r)yield{type:"item",value:d};else if(i){let d=[];He.Children.forEach(s,h=>{d.push({type:"item",element:h})}),yield*d}}}};function o6(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&He.Children.count(e.children)>0)}let s6=O_;class a6{build(t,n){return this.context=n,Ik(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(He.isValidElement(n)&&n.type===He.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let s of r)yield*this.getFullNode({value:s,index:i},{renderer:n}),i++}else{let i=[];He.Children.forEach(n,a=>{a&&i.push(a)});let s=0;for(let a of i){let c=this.getFullNode({element:a,index:s},{});for(let d of c)s++,yield d}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let s=n.value;if(s!=null){var a;let c=(a=s.key)!==null&&a!==void 0?a:s.id;if(c==null)throw new Error("No key found for item");return c}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){if(He.isValidElement(t.element)&&t.element.type===He.Fragment){let T=[];He.Children.forEach(t.element.props.children,A=>{T.push(A)});var s;let _=(s=t.index)!==null&&s!==void 0?s:0;for(const A of T)yield*this.getFullNode({element:A,index:_++},n,r,i);return}let a=t.element;if(!a&&t.value&&n&&n.renderer){let T=this.cache.get(t.value);if(T&&(!T.shouldInvalidate||!T.shouldInvalidate(this.context))){T.index=t.index,T.parentKey=i?i.key:null,yield T;return}a=n.renderer(t.value)}if(He.isValidElement(a)){let T=a.type;if(typeof T!="function"&&typeof T.getCollectionNode!="function"){let O=a.type;throw new Error(`Unknown element <${O}> in collection.`)}let _=T.getCollectionNode(a.props,this.context);var c;let A=(c=t.index)!==null&&c!==void 0?c:0,L=_.next();for(;!L.done&&L.value;){let O=L.value;t.index=A;var d;let j=(d=O.key)!==null&&d!==void 0?d:null;j==null&&(j=O.element?null:this.getKey(a,t,n,r));let Y=[...this.getFullNode({...O,key:j,index:A,wrapper:l6(t.wrapper,O.wrapper)},this.getChildState(n,O),r?`${r}${a.key}`:a.key,i)];for(let te of Y){var h,m;te.value=(m=(h=O.value)!==null&&h!==void 0?h:t.value)!==null&&m!==void 0?m:null,te.value&&this.cache.set(te.value,te);var g;if(t.type&&te.type!==t.type)throw new Error(`Unsupported type <${m0(te.type)}> in <${m0((g=i?.type)!==null&&g!==void 0?g:"unknown parent type")}>. Only <${m0(t.type)}> is supported.`);A++,yield te}L=_.next(Y)}return}if(t.key==null||t.type==null)return;let b=this;var x,k;let P={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(x=t.value)!==null&&x!==void 0?x:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(k=t.textValue)!==null&&k!==void 0?k:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:Ik(function*(){if(!t.hasChildNodes||!t.childNodes)return;let T=0;for(let _ of t.childNodes()){_.key!=null&&(_.key=`${P.key}${_.key}`);let A=b.getFullNode({..._,index:T},b.getChildState(n,_),P.key,P);for(let L of A)T++,yield L}})};yield P}constructor(){this.cache=new WeakMap}}function Ik(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function l6(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function m0(e){return e[0].toUpperCase()+e.slice(1)}function u6(e,t,n){let r=S.useMemo(()=>new a6,[]),{children:i,items:s,collection:a}=e;return S.useMemo(()=>{if(a)return a;let d=r.build({children:i,items:s},n);return t(d)},[r,i,s,a,n,t])}function c6(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function f6(e){return d6(e,0)}function d6(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function YG(e){let t;for(let n of e)t=n;return t}function g0(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...$k(e,t),t],i=[...$k(e,n),n],s=r.slice(0,i.length).findIndex((a,c)=>a!==i[c]);return s!==-1?(t=r[s],n=i[s],t.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===t)>=0,-1)}function $k(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}class Jx{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&g0(this.collection,i,t)<0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&g0(this.collection,i,t)>0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Po([n],n,n);else{let a=this.state.selectedKeys;var i;let c=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new Po(a,c,n);var s;for(let d of this.getKeyRange(c,(s=a.currentKey)!==null&&s!==void 0?s:n))r.delete(d);for(let d of this.getKeyRange(n,c))this.canSelectItem(d)&&r.add(d)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?g0(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let i=[],s=t;for(;s!=null;){let a=this.collection.getItem(s);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(s),s===n)return i;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new Po(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new Po([n],n,n):new Po;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Po;for(let r of t){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);a?.type==="item"&&t.push(r);var s;a?.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((s=(i=f6(c6(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Po)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}withCollection(t){return new Jx(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r?.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null}}function p6(e){let{onExpandedChange:t}=e,[n,r]=Au(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=i6(e),s=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=u6(e,S.useCallback(d=>new n6(d,{expandedKeys:n}),[n]),null);return S.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:s,toggleKey:d=>{r(h6(n,d))},setExpandedKeys:r,selectionManager:new Jx(a,i)}}function h6(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function m6(e){var t;const n=ci(),{ref:r,as:i,className:s,items:a,variant:c,motionProps:d,expandedKeys:h,disabledKeys:m,selectedKeys:g,children:b,defaultExpandedKeys:x,selectionMode:k="single",selectionBehavior:P="toggle",keepContentMounted:T=!1,disallowEmptySelection:_,defaultSelectedKeys:A,onExpandedChange:L,onSelectionChange:O,dividerProps:j={},isCompact:$=!1,isDisabled:Y=!1,showDivider:te=!0,hideIndicator:ie=!1,disableAnimation:B=(t=n?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:W=!1,itemClasses:G,...ee}=e,[H,le]=S.useState(null),J=i||"div",X=typeof J=="string",V=Ii(r),ae=S.useMemo(()=>FO({variant:c,className:s}),[c,s]),U={children:S.useMemo(()=>{let _e=[];return He.Children.map(b,Qe=>{var at;if(He.isValidElement(Qe)&&typeof((at=Qe.props)==null?void 0:at.children)!="string"){const Ie=He.cloneElement(Qe,{hasChildItems:!1});_e.push(Ie)}else _e.push(Qe)}),_e},[b]),items:a},oe={expandedKeys:h,defaultExpandedKeys:x,onExpandedChange:L},z={disabledKeys:m,selectedKeys:g,selectionMode:k,selectionBehavior:P,disallowEmptySelection:_,defaultSelectedKeys:A??x,onSelectionChange:O,...U,...oe},me=p6(z);me.selectionManager.setFocusedKey=_e=>{le(_e)};const{accordionProps:Ce}=JO({...U,...oe},me,V),ye=S.useMemo(()=>({state:me,focusedKey:H,motionProps:d,isCompact:$,isDisabled:Y,hideIndicator:ie,disableAnimation:B,keepContentMounted:T,disableIndicatorAnimation:W}),[H,$,Y,ie,g,B,T,me?.expandedKeys.values,W,me.expandedKeys.size,me.disabledKeys.size,d]),Oe=S.useCallback((_e={})=>({ref:V,className:ae,"data-orientation":"vertical",...nn(Ce,Ef(ee,{enabled:X}),_e)}),[]),Ne=S.useCallback((_e,Qe)=>{_e&&le(Qe)},[]);return{Component:J,values:ye,state:me,focusedKey:H,getBaseProps:Oe,isSplitted:c==="splitted",classNames:ae,showDivider:te,dividerProps:j,disableAnimation:B,handleFocusChanged:Ne,itemClasses:G}}function g6(e){let t=Ef(e,{enabled:typeof e.elementType=="string"}),n;return e.orientation==="vertical"&&(n="vertical"),e.elementType!=="hr"?{separatorProps:{...t,role:"separator","aria-orientation":n}}:{separatorProps:t}}function v6(e){const{as:t,className:n,orientation:r,...i}=e;let s=t||"hr";s==="hr"&&r==="vertical"&&(s="div");const{separatorProps:a}=g6({elementType:typeof s=="string"?s:"hr",orientation:r}),c=S.useMemo(()=>LO({orientation:r,className:n}),[r,n]),d=S.useCallback((h={})=>({className:c,role:"separator","data-orientation":r,...a,...i,...h}),[c,r,a,i]);return{Component:s,getDividerProps:d}}var z_=jr((e,t)=>{const{Component:n,getDividerProps:r}=v6({...e});return D.jsx(n,{ref:t,...r()})});z_.displayName="HeroUI.Divider";var y6=z_,j_=jr((e,t)=>{const{Component:n,values:r,state:i,isSplitted:s,showDivider:a,getBaseProps:c,disableAnimation:d,handleFocusChanged:h,itemClasses:m,dividerProps:g}=m6({...e,ref:t}),b=S.useCallback((k,P)=>h(k,P),[h]),x=S.useMemo(()=>[...i.collection].map((k,P)=>{const T={...m,...k.props.classNames||{}};return D.jsxs(S.Fragment,{children:[D.jsx(t6,{item:k,variant:e.variant,onFocusChange:b,...r,...k.props,classNames:T}),!k.props.hidden&&!s&&a&&P<i.collection.size-1&&D.jsx(y6,{...g})]},k.key)}),[r,m,b,s,a,i.collection]);return D.jsx(n,{...c(),children:d?x:D.jsx(O3,{children:x})})});j_.displayName="HeroUI.Accordion";var Ak=j_,b6=e=>{const t={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return t?.[e]||{}},x6=e=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[e],XG=(e,t)=>{if(t.includes("-")){const[n]=t.split("-");if(n.includes(e))return!1}return!0},Rk=(e,t)=>{if(t.includes("-")){const[,n]=t.split("-");return`${e}-${n}`}return e},w6=s6,bp=w6,Sh=globalThis?.document?S.useLayoutEffect:S.useEffect;function S6(e={}){const{onLoad:t,onError:n,ignoreFallback:r,src:i,crossOrigin:s,srcSet:a,sizes:c,loading:d,shouldBypassImageLoad:h=!1}=e,m=kL(),g=S.useRef(m?new Image:null),[b,x]=S.useState("pending");S.useEffect(()=>{g.current&&(g.current.onload=T=>{k(),x("loaded"),t?.(T)},g.current.onerror=T=>{k(),x("failed"),n?.(T)})},[g.current]);const k=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)},P=S.useCallback(()=>{if(!i)return"pending";if(r||h)return"loaded";const T=new Image;return T.src=i,s&&(T.crossOrigin=s),a&&(T.srcset=a),c&&(T.sizes=c),d&&(T.loading=d),g.current=T,T.complete&&T.naturalWidth?"loaded":"loading"},[i,s,a,c,t,n,d,h]);return Sh(()=>{m&&x(P())},[m,P]),r?"loaded":b}var[QG,k6]=pv({name:"ButtonGroupContext",strict:!1});function B_(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button",allowTextSelectionOnPress:T}=e,_;n==="button"?_={type:P,disabled:r}:_={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:A,isPressed:L}=il({onClick:g,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,onPress:i,isDisabled:r,preventFocusOnPress:h,allowTextSelectionOnPress:T,ref:t}),{focusableProps:O}=xh(e,t);m&&(O.tabIndex=r?-1:O.tabIndex);let j=Pn(O,A,$u(e,{labelable:!0}));return{isPressed:L,buttonProps:Pn(_,j,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}var C6=()=>io(()=>import("./index-C_JcEI3R.js"),[]).then(e=>e.default),V_=e=>{const{ripples:t=[],motionProps:n,color:r="currentColor",style:i,onClear:s}=e;return D.jsx(D.Fragment,{children:t.map(a=>{const c=yL(.01*a.size,.2,a.size>100?.75:.5);return D.jsx($f,{features:C6,children:D.jsx(ol,{mode:"popLayout",children:D.jsx(Af.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:r,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:a.y,left:a.x,width:`${a.size}px`,height:`${a.size}px`,...i},transition:{duration:c},onAnimationComplete:()=>{s(a.key)},...n})})},a.key)})})};V_.displayName="HeroUI.Ripple";var E6=V_;function P6(e={}){const[t,n]=S.useState([]),r=S.useCallback(s=>{const a=s.target,c=Math.max(a.clientWidth,a.clientHeight);n(d=>[...d,{key:vL(d.length.toString()),size:c,x:s.x-c/2,y:s.y-c/2}])},[]),i=S.useCallback(s=>{n(a=>a.filter(c=>c.key!==s))},[]);return{ripples:t,onClear:i,onPress:r,...e}}function T6(e){var t,n,r,i,s,a,c,d,h;const m=k6(),g=ci(),b=!!m,{ref:x,as:k,children:P,startContent:T,endContent:_,autoFocus:A,className:L,spinner:O,isLoading:j=!1,disableRipple:$=!1,fullWidth:Y=(t=m?.fullWidth)!=null?t:!1,radius:te=m?.radius,size:ie=(n=m?.size)!=null?n:"md",color:B=(r=m?.color)!=null?r:"default",variant:W=(i=m?.variant)!=null?i:"solid",disableAnimation:G=(a=(s=m?.disableAnimation)!=null?s:g?.disableAnimation)!=null?a:!1,isDisabled:ee=(c=m?.isDisabled)!=null?c:!1,isIconOnly:H=(d=m?.isIconOnly)!=null?d:!1,spinnerPlacement:le="start",onPress:J,onClick:X,...V}=e,ae=k||"button",M=typeof ae=="string",U=Ii(x),oe=(h=$||g?.disableRipple)!=null?h:G,{isFocusVisible:z,isFocused:me,focusProps:Ce}=Pu({autoFocus:A}),ye=ee||j,Oe=S.useMemo(()=>DO({size:ie,color:B,variant:W,radius:te,fullWidth:Y,isDisabled:ye,isInGroup:b,disableAnimation:G,isIconOnly:H,className:L}),[ie,B,W,te,Y,ye,b,H,G,L]),{onPress:Ne,onClear:_e,ripples:Qe}=P6(),at=S.useCallback(Rt=>{oe||ye||G||U.current&&Ne(Rt)},[oe,ye,G,U,Ne]),{buttonProps:Ie,isPressed:mt}=B_({elementType:k,isDisabled:ye,onPress:el(J,at),onClick:X,...V},U),{isHovered:pt,hoverProps:Ut}=Eu({isDisabled:ye}),Ue=S.useCallback((Rt={})=>({"data-disabled":Ae(ye),"data-focus":Ae(me),"data-pressed":Ae(mt),"data-focus-visible":Ae(z),"data-hover":Ae(pt),"data-loading":Ae(j),...nn(Ie,Ce,Ut,Ef(V,{enabled:M}),Ef(Rt)),className:Oe}),[j,ye,me,mt,M,z,pt,Ie,Ce,Ut,V,Oe]),it=Rt=>S.isValidElement(Rt)?S.cloneElement(Rt,{"aria-hidden":!0,focusable:!1}):null,Kt=it(T),er=it(_),an=S.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[ie],[ie]),_t=S.useCallback(()=>({ripples:Qe,onClear:_e}),[Qe,_e]);return{Component:ae,children:P,domRef:U,spinner:O,styles:Oe,startContent:Kt,endContent:er,isLoading:j,spinnerPlacement:le,spinnerSize:an,disableRipple:oe,getButtonProps:Ue,getRippleProps:_t,isIconOnly:H}}function _6(e){var t,n;const[r,i]=oa(e,hk.variantKeys),s=ci(),a=(n=(t=e?.variant)!=null?t:s?.spinnerVariant)!=null?n:"default",{children:c,className:d,classNames:h,label:m,...g}=r,b=S.useMemo(()=>hk({...i}),[ds(i)]),x=Bt(h?.base,d),k=m||c,P=S.useMemo(()=>k&&typeof k=="string"?k:g["aria-label"]?"":"Loading",[c,k,g["aria-label"]]),T=S.useCallback(()=>({"aria-label":P,className:b.base({class:x}),...g}),[P,b,x,g]);return{label:k,slots:b,classNames:h,variant:a,getSpinnerProps:T}}var U_=jr((e,t)=>{const{slots:n,classNames:r,label:i,variant:s,getSpinnerProps:a}=_6({...e});return s==="wave"||s==="dots"?D.jsxs("div",{ref:t,...a(),children:[D.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(3)].map((c,d)=>D.jsx("i",{className:n.dots({class:r?.dots}),style:{"--dot-index":d}},`dot-${d}`))}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="simple"?D.jsxs("div",{ref:t,...a(),children:[D.jsxs("svg",{className:n.wrapper({class:r?.wrapper}),fill:"none",viewBox:"0 0 24 24",children:[D.jsx("circle",{className:n.circle1({class:r?.circle1}),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),D.jsx("path",{className:n.circle2({class:r?.circle2}),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"})]}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="spinner"?D.jsxs("div",{ref:t,...a(),children:[D.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(12)].map((c,d)=>D.jsx("i",{className:n.spinnerBars({class:r?.spinnerBars}),style:{"--bar-index":d}},`star-${d}`))}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):D.jsxs("div",{ref:t,...a(),children:[D.jsxs("div",{className:n.wrapper({class:r?.wrapper}),children:[D.jsx("i",{className:n.circle1({class:r?.circle1})}),D.jsx("i",{className:n.circle2({class:r?.circle2})})]}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]})});U_.displayName="HeroUI.Spinner";var I6=U_,K_=jr((e,t)=>{const{Component:n,domRef:r,children:i,spinnerSize:s,spinner:a=D.jsx(I6,{color:"current",size:s}),spinnerPlacement:c,startContent:d,endContent:h,isLoading:m,disableRipple:g,getButtonProps:b,getRippleProps:x,isIconOnly:k}=T6({...e,ref:t});return D.jsxs(n,{ref:r,...b(),children:[d,m&&c==="start"&&a,m&&k?null:i,m&&c==="end"&&a,h,!g&&D.jsx(E6,{...x()})]})});K_.displayName="HeroUI.Button";var wr=K_;function $6(e){const[t,n]=oa(e,Sk.variantKeys),{ref:r,as:i,children:s,avatar:a,startContent:c,endContent:d,onClose:h,classNames:m,className:g,...b}=t,x=i||"div",k=Ii(r),P=Bt(m?.base,g),T=!!h,_=e.variant==="dot",{focusProps:A,isFocusVisible:L}=Pu(),O=S.useMemo(()=>typeof s=="string"&&s?.length===1,[s]),j=S.useMemo(()=>!!a||!!c,[a,c]),$=S.useMemo(()=>!!d||T,[d,T]),Y=S.useMemo(()=>Sk({...n,hasStartContent:j,hasEndContent:$,isOneChar:O,isCloseable:T,isCloseButtonFocusVisible:L}),[ds(n),L,j,$,O,T]),{pressProps:te}=il({isDisabled:!!e?.isDisabled,onPress:h}),ie=()=>({ref:k,className:Y.base({class:P}),...b}),B=()=>({role:"button",tabIndex:0,className:Y.closeButton({class:m?.closeButton}),"aria-label":"close chip",...nn(te,A)}),W=ee=>S.isValidElement(ee)?S.cloneElement(ee,{className:Y.avatar({class:m?.avatar})}):null,G=ee=>S.isValidElement(ee)?S.cloneElement(ee,{className:Bt("max-h-[80%]",ee.props.className)}):null;return{Component:x,children:s,slots:Y,classNames:m,isDot:_,isCloseable:T,startContent:W(a)||G(c),endContent:G(d),getCloseButtonProps:B,getChipProps:ie}}var W_=jr((e,t)=>{const{Component:n,children:r,slots:i,classNames:s,isDot:a,isCloseable:c,startContent:d,endContent:h,getCloseButtonProps:m,getChipProps:g}=$6({...e,ref:t}),b=S.useMemo(()=>a&&!d?D.jsx("span",{className:i.dot({class:s?.dot})}):d,[i,d,a]),x=S.useMemo(()=>c?D.jsx("span",{...m(),children:h||D.jsx(N_,{})}):h,[h,c,m]);return D.jsxs(n,{...g(),children:[b,D.jsx("span",{className:i.content({class:s?.content}),children:r}),x]})});W_.displayName="HeroUI.Chip";var wg=W_;const H_={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},G_={...H_,customError:!0,valid:!1},ff={isInvalid:!1,validationDetails:H_,validationErrors:[]},q_=S.createContext({}),ev="__formValidationState"+Date.now();function Zx(e){if(e[ev]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}=e[ev];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}}return A6(e)}function A6(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:s,validate:a,validationBehavior:c="aria"}=e;n&&(t||(t=n==="invalid"));let d=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:G_}:null,h=S.useMemo(()=>{if(!a||i==null)return null;let B=R6(a,i);return Lk(B)},[a,i]);s?.validationDetails.valid&&(s=void 0);let m=S.useContext(q_),g=S.useMemo(()=>r?Array.isArray(r)?r.flatMap(B=>$b(m[B])):$b(m[r]):[],[m,r]),[b,x]=S.useState(m),[k,P]=S.useState(!1);m!==b&&(x(m),P(!1));let T=S.useMemo(()=>Lk(k?[]:g),[k,g]),_=S.useRef(ff),[A,L]=S.useState(ff),O=S.useRef(ff),j=()=>{if(!$)return;Y(!1);let B=h||s||_.current;v0(B,O.current)||(O.current=B,L(B))},[$,Y]=S.useState(!1);return S.useEffect(j),{realtimeValidation:d||T||h||s||ff,displayValidation:c==="native"?d||T||A:d||T||h||s||A,updateValidation(B){c==="aria"&&!v0(A,B)?L(B):_.current=B},resetValidation(){let B=ff;v0(B,O.current)||(O.current=B,L(B)),c==="native"&&Y(!1),P(!0)},commitValidation(){c==="native"&&Y(!0),P(!0)}}}function $b(e){return e?Array.isArray(e)?e:[e]:[]}function R6(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return $b(n)}return[]}function Lk(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:G_}:null}function v0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function Y_(e,t,n){let{validationBehavior:r,focus:i}=e;sn(()=>{if(r==="native"&&n?.current&&!n.current.disabled){let d=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(d),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(M6(n.current))}});let s=jn(()=>{t.resetValidation()}),a=jn(d=>{var h;t.displayValidation.isInvalid||t.commitValidation();let m=n==null||(h=n.current)===null||h===void 0?void 0:h.form;if(!d.defaultPrevented&&n&&m&&D6(m)===n.current){var g;i?i():(g=n.current)===null||g===void 0||g.focus(),U5("keyboard")}d.preventDefault()}),c=jn(()=>{t.commitValidation()});S.useEffect(()=>{let d=n?.current;if(!d)return;let h=d.form;return d.addEventListener("invalid",a),d.addEventListener("change",c),h?.addEventListener("reset",s),()=>{d.removeEventListener("invalid",a),d.removeEventListener("change",c),h?.removeEventListener("reset",s)}},[n,a,c,s,r])}function L6(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function M6(e){return{isInvalid:!e.validity.valid,validationDetails:L6(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function D6(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}function N6(e,t,n){let{isDisabled:r=!1,isReadOnly:i=!1,value:s,name:a,children:c,"aria-label":d,"aria-labelledby":h,validationState:m="valid",isInvalid:g}=e,b=O=>{O.stopPropagation(),t.setSelected(O.target.checked)},{pressProps:x,isPressed:k}=il({isDisabled:r}),{pressProps:P,isPressed:T}=il({onPress(){var O;t.toggle(),(O=n.current)===null||O===void 0||O.focus()},isDisabled:r||i}),{focusableProps:_}=xh(e,n),A=Pn(x,_),L=$u(e,{labelable:!0});return NE(n,t.isSelected,t.setSelected),{labelProps:Pn(P,{onClick:O=>O.preventDefault()}),inputProps:Pn(L,{"aria-invalid":g||m==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":i||void 0,onChange:b,disabled:r,...s==null?{}:{value:s},name:a,type:"checkbox",...A}),isSelected:t.isSelected,isPressed:k||T,isDisabled:r,isReadOnly:i,isInvalid:g||m==="invalid"}}function X_(e,t,n){let r=Zx({...e,value:t.isSelected}),{isInvalid:i,validationErrors:s,validationDetails:a}=r.displayValidation,{labelProps:c,inputProps:d,isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b}=N6({...e,isInvalid:i},t,n);Y_(e,r,n);let{isIndeterminate:x,isRequired:k,validationBehavior:P="aria"}=e;S.useEffect(()=>{n.current&&(n.current.indeterminate=!!x)});let{pressProps:T}=il({isDisabled:g||b,onPress(){let{[ev]:_}=e,{commitValidation:A}=_||r;A()}});return{labelProps:Pn(c,T),inputProps:{...d,checked:h,"aria-required":k&&P==="aria"||void 0,required:k&&P==="native"},isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b,isInvalid:i,validationErrors:s,validationDetails:a}}const F6=new WeakMap;function Q_(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:s="label"}=e;t=Pf(t);let a=Pf(),c={};n&&(r=r?`${a} ${r}`:a,c={id:a,htmlFor:s==="label"?t:void 0});let d=AE({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:c,fieldProps:d}}function O6(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:s,fieldProps:a}=Q_(e),c=W0([!!t,!!n,r,i]),d=W0([!!t,!!n,r,i]);return a=Pn(a,{"aria-describedby":[c,d,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:s,fieldProps:a,descriptionProps:{id:c},errorMessageProps:{id:d}}}function J_(e={}){let{isReadOnly:t}=e,[n,r]=Au(e.isSelected,e.defaultSelected||!1,e.onChange);function i(a){t||r(a)}function s(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:s}}function z6(e,t,n){const r=J_({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),onChange(T){T?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(T)}});let{name:i,descriptionId:s,errorMessageId:a,validationBehavior:c}=F6.get(t);var d;c=(d=e.validationBehavior)!==null&&d!==void 0?d:c;let{realtimeValidation:h}=Zx({...e,value:r.isSelected,name:void 0,validationBehavior:"aria"}),m=S.useRef(ff),g=()=>{t.setInvalid(e.value,h.isInvalid?h:m.current)};S.useEffect(g);let b=t.realtimeValidation.isInvalid?t.realtimeValidation:h,x=c==="native"?t.displayValidation:b;var k;let P=X_({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,isRequired:(k=e.isRequired)!==null&&k!==void 0?k:t.isRequired,validationBehavior:c,[ev]:{realtimeValidation:b,displayValidation:x,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(T){m.current=T,g()}}},r,n);return{...P,inputProps:{...P.inputProps,"aria-describedby":[e["aria-describedby"],t.isInvalid?a:null,s].filter(Boolean).join(" ")||void 0}}}var Mk=Symbol("default");function j6(e){const t=S.useRef(null),n=S.useRef(void 0),r=S.useCallback(i=>{if(typeof e=="function"){const s=e,a=s(i);return()=>{typeof a=="function"?a():s(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return S.useMemo(()=>({get current(){return t.current},set current(i){t.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}function ew(e,t){let n=S.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(s=>`"${s}"`));if(!t&&!n.slots[Mk])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=t||Mk;if(!n.slots[i])throw new Error(`Invalid slot "${t}". Valid slot names are ${r}.`);return n.slots[i]}return n}function B6(e,t,n){let r=ew(n,e.slot)||{},{ref:i,...s}=r,a=j6(S.useMemo(()=>gE(t,i),[t,i])),c=nn(s,e);return"style"in s&&s.style&&"style"in e&&e.style&&(typeof s.style=="function"||typeof e.style=="function"?c.style=d=>{let h=typeof s.style=="function"?s.style(d):s.style,m={...d.defaultStyle,...h},g=typeof e.style=="function"?e.style({...d,defaultStyle:m}):e.style;return{...m,...g}}:c.style={...s.style,...e.style}),[c,a]}var tv=S.createContext(null),V6=S.forwardRef(function(t,n){[t,n]=B6(t,n,tv);let{validationErrors:r,validationBehavior:i="native",children:s,className:a,...c}=t;const d=S.useMemo(()=>MO({className:a}),[a]);return D.jsx("form",{noValidate:i!=="native",...c,ref:n,className:d,children:D.jsx(tv.Provider,{value:{...t,validationBehavior:i},children:D.jsx(q_.Provider,{value:r??{},children:s})})})}),U6=S.forwardRef(function(t,n){var r,i;const s=ci(),a=(i=(r=t.validationBehavior)!=null?r:s?.validationBehavior)!=null?i:"native";return D.jsx(V6,{...t,ref:n,validationBehavior:a})}),[JG,K6]=pv({name:"CheckboxGroupContext",strict:!1});function W6(e){const{isSelected:t,disableAnimation:n,...r}=e;return D.jsx("svg",{"aria-hidden":"true",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,style:!n&&t?{transition:"stroke-dashoffset 250ms linear 0.2s"}:{},viewBox:"0 0 17 18",...r,children:D.jsx("polyline",{points:"1 9 7 14 15 4"})})}function H6(e){const{isSelected:t,disableAnimation:n,...r}=e;return D.jsx("svg",{stroke:"currentColor",strokeWidth:3,viewBox:"0 0 24 24",...r,children:D.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function G6(e){const{isIndeterminate:t,...n}=e,r=t?H6:W6;return D.jsx(r,{...n})}function Ab(e,t=[]){const n=S.useRef(e);return Sh(()=>{n.current=e}),S.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function q6(e={}){var t,n,r,i,s,a,c,d;const h=ci(),m=K6(),{validationBehavior:g}=ew(tv)||{},b=!!m,{as:x,ref:k,value:P="",children:T,icon:_,name:A,isRequired:L,isReadOnly:O=!1,autoFocus:j=!1,isSelected:$,size:Y=(t=m?.size)!=null?t:"md",color:te=(n=m?.color)!=null?n:"primary",radius:ie=m?.radius,lineThrough:B=(r=m?.lineThrough)!=null?r:!1,isDisabled:W=(i=m?.isDisabled)!=null?i:!1,disableAnimation:G=(a=(s=m?.disableAnimation)!=null?s:h?.disableAnimation)!=null?a:!1,validationState:ee,isInvalid:H=ee?ee==="invalid":(c=m?.isInvalid)!=null?c:!1,isIndeterminate:le=!1,validationBehavior:J=b?m.validationBehavior:(d=g??h?.validationBehavior)!=null?d:"native",defaultSelected:X,classNames:V,className:ae,onValueChange:M,validate:U,...oe}=e,z=x||"label",me=S.useRef(null),Ce=S.useRef(null);let ye=e.onChange;b&&(ye=el(()=>{m.groupState.resetValidation()},ye));const Oe=S.useId(),Ne=S.useMemo(()=>({name:A,value:P,children:T,autoFocus:j,defaultSelected:X,isIndeterminate:le,isRequired:L,isInvalid:H,isSelected:$,isDisabled:W,isReadOnly:O,"aria-label":mE(oe["aria-label"],T),"aria-labelledby":oe["aria-labelledby"]||Oe,onChange:M}),[A,P,T,j,X,le,L,H,$,W,O,oe["aria-label"],oe["aria-labelledby"],Oe,M]),_e=J_(Ne),Qe={isInvalid:H,isRequired:L,validate:U,validationState:ee,validationBehavior:J},{inputProps:at,isSelected:Ie,isDisabled:mt,isReadOnly:pt,isPressed:Ut,isInvalid:Ue}=b?z6({...Ne,...Qe},m.groupState,Ce):X_({...Ne,...Qe},_e,Ce),it=mt||pt,Kt=ee==="invalid"||H||Ue,er=it?!1:Ut,{hoverProps:an,isHovered:_t}=Eu({isDisabled:at.disabled}),{focusProps:Rt,isFocused:Tn,isFocusVisible:Er}=Pu({autoFocus:at.autoFocus}),Nt=S.useMemo(()=>NO({color:te,size:Y,radius:ie,isInvalid:Kt,lineThrough:B,isDisabled:mt,disableAnimation:G}),[te,Y,ie,Kt,B,mt,G]);Sh(()=>{if(!Ce.current)return;const Pt=!!Ce.current.checked;_e.setSelected(Pt)},[Ce.current]);const pe=Ab(ye),Se=S.useCallback(Pt=>{if(pt||mt){Pt.preventDefault();return}pe?.(Pt)},[pt,mt,pe]),ze=Bt(V?.base,ae),nt=S.useCallback(()=>({ref:me,className:Nt.base({class:ze}),"data-disabled":Ae(mt),"data-selected":Ae(Ie||le),"data-invalid":Ae(Kt),"data-hover":Ae(_t),"data-focus":Ae(Tn),"data-pressed":Ae(er),"data-readonly":Ae(at.readOnly),"data-focus-visible":Ae(Er),"data-indeterminate":Ae(le),...nn(an,oe)}),[Nt,ze,mt,Ie,le,Kt,_t,Tn,er,at.readOnly,Er,an,oe]),lt=S.useCallback((Pt={})=>({...Pt,"aria-hidden":!0,className:Bt(Nt.wrapper({class:Bt(V?.wrapper,Pt?.className)}))}),[Nt,V?.wrapper]),Wt=S.useCallback(()=>({ref:vE(Ce,k),...nn(at,Rt),className:Nt.hiddenInput({class:V?.hiddenInput}),onChange:el(at.onChange,Se)}),[at,Rt,Se,V?.hiddenInput]),Bn=S.useCallback(()=>({id:Oe,className:Nt.label({class:V?.label})}),[Nt,V?.label,mt,Ie,Kt]),Jt=S.useCallback(()=>({isSelected:Ie,isIndeterminate:le,disableAnimation:G,className:Nt.icon({class:V?.icon})}),[Nt,V?.icon,Ie,le,G]);return{Component:z,icon:_,children:T,isSelected:Ie,isDisabled:mt,isInvalid:Kt,isFocused:Tn,isHovered:_t,isFocusVisible:Er,getBaseProps:nt,getWrapperProps:lt,getInputProps:Wt,getLabelProps:Bn,getIconProps:Jt}}var Z_=jr((e,t)=>{const{Component:n,children:r,icon:i=D.jsx(G6,{}),getBaseProps:s,getWrapperProps:a,getInputProps:c,getIconProps:d,getLabelProps:h}=q6({...e,ref:t}),m=typeof i=="function"?i(d()):S.cloneElement(i,d());return D.jsxs(n,{...s(),children:[D.jsx("input",{...c()}),D.jsx("span",{...a(),children:m}),r&&D.jsx("span",{...h(),children:r})]})});Z_.displayName="HeroUI.Checkbox";var e2=Z_;function t2(e){let[t,n]=Au(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=S.useCallback(()=>{n(!0)},[n]),i=S.useCallback(()=>{n(!1)},[n]),s=S.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:s}}const Y6=1500,Dk=500;let cu={},X6=0,xp=!1,qs=null,fu=null;function Q6(e={}){let{delay:t=Y6,closeDelay:n=Dk}=e,{isOpen:r,open:i,close:s}=t2(e),a=S.useMemo(()=>`${++X6}`,[]),c=S.useRef(null),d=S.useRef(s),h=()=>{cu[a]=b},m=()=>{for(let k in cu)k!==a&&(cu[k](!0),delete cu[k])},g=()=>{c.current&&clearTimeout(c.current),c.current=null,m(),h(),xp=!0,i(),qs&&(clearTimeout(qs),qs=null),fu&&(clearTimeout(fu),fu=null)},b=k=>{k||n<=0?(c.current&&clearTimeout(c.current),c.current=null,d.current()):c.current||(c.current=setTimeout(()=>{c.current=null,d.current()},n)),qs&&(clearTimeout(qs),qs=null),xp&&(fu&&clearTimeout(fu),fu=setTimeout(()=>{delete cu[a],fu=null,xp=!1},Math.max(Dk,n)))},x=()=>{m(),h(),!r&&!qs&&!xp?qs=setTimeout(()=>{qs=null,xp=!0,g()},t):r||g()};return S.useEffect(()=>{d.current=s},[s]),S.useEffect(()=>()=>{c.current&&clearTimeout(c.current),cu[a]&&delete cu[a]},[a]),{isOpen:r,open:k=>{!k&&t>0&&!c.current?x():g()},close:b}}function J6(e,t){let n=$u(e,{labelable:!0}),{hoverProps:r}=Eu({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:Pn(n,r,{role:"tooltip"})}}function Z6(e,t,n){let{isDisabled:r,trigger:i}=e,s=Pf(),a=S.useRef(!1),c=S.useRef(!1),d=()=>{(a.current||c.current)&&t.open(c.current)},h=_=>{!a.current&&!c.current&&t.close(_)};S.useEffect(()=>{let _=A=>{n&&n.current&&A.key==="Escape"&&(A.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",_,!0),()=>{document.removeEventListener("keydown",_,!0)}},[n,t]);let m=()=>{i!=="focus"&&(oh()==="pointer"?a.current=!0:a.current=!1,d())},g=()=>{i!=="focus"&&(c.current=!1,a.current=!1,h())},b=()=>{c.current=!1,a.current=!1,h(!0)},x=()=>{qx()&&(c.current=!0,d())},k=()=>{c.current=!1,a.current=!1,h(!0)},{hoverProps:P}=Eu({isDisabled:r,onHoverStart:m,onHoverEnd:g}),{focusableProps:T}=xh({isDisabled:r,onFocus:x,onBlur:k},n);return{triggerProps:{"aria-describedby":t.isOpen?s:void 0,...Pn(T,P,{onPointerDown:b,onKeyDown:b,tabIndex:void 0})},tooltipProps:{id:s}}}var Ys=[];function n2(e,t){const{disableOutsideEvents:n=!0,isDismissable:r=!1,isKeyboardDismissDisabled:i=!1,isOpen:s,onClose:a,shouldCloseOnBlur:c,shouldCloseOnInteractOutside:d}=e;S.useEffect(()=>(s&&Ys.push(t),()=>{const P=Ys.indexOf(t);P>=0&&Ys.splice(P,1)}),[s,t]);const h=()=>{Ys[Ys.length-1]===t&&a&&a()},m=P=>{(!d||d(P.target))&&(Ys[Ys.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),P.pointerType!=="touch"&&h())},g=P=>{P.pointerType==="touch"&&(!d||d(P.target))&&(Ys[Ys.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),h())},b=P=>{P.key==="Escape"&&!i&&!P.nativeEvent.isComposing&&(P.stopPropagation(),P.preventDefault(),h())};Z5({isDisabled:!(r&&s),onInteractOutside:r&&s?g:void 0,onInteractOutsideStart:m,ref:t});const{focusWithinProps:x}=kv({isDisabled:!c,onBlurWithin:P=>{!P.relatedTarget||rF(P.relatedTarget)||(!d||d(P.relatedTarget))&&h()}}),k=P=>{P.target===P.currentTarget&&P.preventDefault()};return{overlayProps:{onKeyDown:b,...x},underlayProps:{onPointerDown:k}}}function ez(e){var t,n;const r=ci(),[i,s]=oa(e,mk.variantKeys),{ref:a,as:c,isOpen:d,content:h,children:m,defaultOpen:g,onOpenChange:b,isDisabled:x,trigger:k,shouldFlip:P=!0,containerPadding:T=12,placement:_="top",delay:A=0,closeDelay:L=500,showArrow:O=!1,offset:j=7,crossOffset:$=0,isDismissable:Y,shouldCloseOnBlur:te=!0,portalContainer:ie,isKeyboardDismissDisabled:B=!1,updatePositionDeps:W=[],shouldCloseOnInteractOutside:G,className:ee,onClose:H,motionProps:le,classNames:J,...X}=i,V=c||"div",ae=(n=(t=e?.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,M=Q6({delay:A,closeDelay:L,isDisabled:x,defaultOpen:g,isOpen:d,onOpenChange:Ue=>{b?.(Ue),Ue||H?.()}}),U=S.useRef(null),oe=S.useRef(null),z=S.useId(),me=M.isOpen&&!x;S.useImperativeHandle(a,()=>fL(oe));const{triggerProps:Ce,tooltipProps:ye}=Z6({isDisabled:x,trigger:k},M,U),{tooltipProps:Oe}=J6({isOpen:me,...nn(i,ye)},M),{overlayProps:Ne,placement:_e,updatePosition:Qe}=T5({isOpen:me,targetRef:U,placement:x6(_),overlayRef:oe,offset:O?j+3:j,crossOffset:$,shouldFlip:P,containerPadding:T});Sh(()=>{W.length&&Qe()},W);const{overlayProps:at}=n2({isOpen:me,onClose:M.close,isDismissable:Y,shouldCloseOnBlur:te,isKeyboardDismissDisabled:B,shouldCloseOnInteractOutside:G},oe),Ie=S.useMemo(()=>{var Ue,it,Kt;return mk({...s,disableAnimation:ae,radius:(Ue=e?.radius)!=null?Ue:"md",size:(it=e?.size)!=null?it:"md",shadow:(Kt=e?.shadow)!=null?Kt:"sm"})},[ds(s),ae,e?.radius,e?.size,e?.shadow]),mt=S.useCallback((Ue={},it=null)=>({...nn(Ce,Ue),ref:vE(it,U),"aria-describedby":me?z:void 0}),[Ce,me,z,M]),pt=S.useCallback(()=>({ref:oe,"data-slot":"base","data-open":Ae(me),"data-arrow":Ae(O),"data-disabled":Ae(x),"data-placement":Rk(_e||"top",_),...nn(Oe,at,X),style:nn(Ne.style,X.style,i.style),className:Ie.base({class:J?.base}),id:z}),[Ie,me,O,x,_e,_,Oe,at,X,Ne,i,z]),Ut=S.useCallback(()=>({"data-slot":"content","data-open":Ae(me),"data-arrow":Ae(O),"data-disabled":Ae(x),"data-placement":Rk(_e||"top",_),className:Ie.content({class:Bt(J?.content,ee)})}),[Ie,me,O,x,_e,_,J]);return{Component:V,content:h,children:m,isOpen:me,triggerRef:U,showArrow:O,portalContainer:ie,placement:_,disableAnimation:ae,isDisabled:x,motionProps:le,getTooltipContentProps:Ut,getTriggerProps:mt,getTooltipProps:pt}}var tz=()=>io(()=>import("./index-C_JcEI3R.js"),[]).then(e=>e.default),r2=jr((e,t)=>{var n;const{Component:r,children:i,content:s,isOpen:a,portalContainer:c,placement:d,disableAnimation:h,motionProps:m,getTriggerProps:g,getTooltipProps:b,getTooltipContentProps:x}=ez({...e,ref:t});let k;try{if(S.Children.count(i)!==1)throw new Error;if(!S.isValidElement(i))k=D.jsx("p",{...g(),children:i});else{const j=i,$=(n=j.props.ref)!=null?n:j.ref;k=S.cloneElement(j,g(j.props,$))}}catch{k=D.jsx("span",{}),xL("Tooltip must have only one child node. Please, check your code.")}const{ref:P,id:T,style:_,...A}=b(),L=D.jsx("div",{ref:P,id:T,style:_,children:D.jsx(Af.div,{animate:"enter",exit:"exit",initial:"exit",variants:Zg.scaleSpring,...nn(m,A),style:{...b6(d)},children:D.jsx(r,{...x(),children:s})},`${T}-tooltip-inner`)},`${T}-tooltip-content`);return D.jsxs(D.Fragment,{children:[k,h?a&&D.jsx(ok,{portalContainer:c,children:D.jsx("div",{ref:P,id:T,style:_,...A,children:D.jsx(r,{...x(),children:s})})}):D.jsx($f,{features:tz,children:D.jsx(ol,{children:a&&D.jsx(ok,{portalContainer:c,children:L})})})]})});r2.displayName="HeroUI.Tooltip";var nz=r2;function rz(e={}){const{rerender:t=!1,delay:n=0}=e,r=S.useRef(!1),[i,s]=S.useState(!1);return S.useEffect(()=>{r.current=!0;let a=null;return t&&(n>0?a=setTimeout(()=>{s(!0)},n):s(!0)),()=>{r.current=!1,t&&s(!1),a&&clearTimeout(a)}},[t]),[S.useCallback(()=>r.current,[]),i]}function iz(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:s,formatOptions:a={style:"percent"}}=e,c=$u(e,{labelable:!0}),{labelProps:d,fieldProps:h}=Q_({...e,labelElementType:"span"});t=Bg(t,n,r);let m=(t-n)/(r-n),g=AM(a);if(!s&&!i){let b=a.style==="percent"?m:t;i=g.format(b)}return{progressBarProps:Pn(c,{...h,"aria-valuenow":s?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":s?void 0:i,role:"progressbar"}),labelProps:d}}function oz(e){var t,n,r;const i=ci(),[s,a]=oa(e,gk.variantKeys),{ref:c,as:d,id:h,className:m,classNames:g,label:b,valueLabel:x,value:k=void 0,minValue:P=0,maxValue:T=100,strokeWidth:_,showValueLabel:A=!1,formatOptions:L={style:"percent"},...O}=s,j=d||"div",$=Ii(c),Y=Bt(g?.base,m),[,te]=rz({rerender:!0,delay:100}),ie=((t=e.isIndeterminate)!=null?t:!0)&&k===void 0,B=(r=(n=e.disableAnimation)!=null?n:i?.disableAnimation)!=null?r:!1,{progressBarProps:W,labelProps:G}=iz({id:h,label:b,value:k,minValue:P,maxValue:T,valueLabel:x,formatOptions:L,isIndeterminate:ie,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"]}),ee=S.useMemo(()=>gk({...a,disableAnimation:B,isIndeterminate:ie}),[ds(a),B,ie]),H=B?!0:te,le=16,J=_||(e.size==="sm"?2:3),X=16-J,V=2*X*Math.PI,ae=S.useMemo(()=>H?ie?.25:k?bL((k-P)/(T-P),1):0:0,[H,k,P,T,ie]),M=V-ae*V,U=S.useCallback((ye={})=>({ref:$,"data-indeterminate":Ae(ie),"data-disabled":Ae(e.isDisabled),className:ee.base({class:Y}),...nn(W,O,ye)}),[$,ee,ie,e.isDisabled,Y,W,O]),oe=S.useCallback((ye={})=>({className:ee.label({class:g?.label}),...nn(G,ye)}),[ee,g,G]),z=S.useCallback((ye={})=>({viewBox:"0 0 32 32",fill:"none",strokeWidth:J,className:ee.svg({class:g?.svg}),...ye}),[J,ee,g]),me=S.useCallback((ye={})=>({cx:le,cy:le,r:X,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:M,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ee.indicator({class:g?.indicator}),...ye}),[ee,g,M,V,X]),Ce=S.useCallback((ye={})=>({cx:le,cy:le,r:X,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:0,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ee.track({class:g?.track}),...ye}),[ee,g,V,X]);return{Component:j,domRef:$,slots:ee,classNames:g,label:b,showValueLabel:A,getProgressBarProps:U,getLabelProps:oe,getSvgProps:z,getIndicatorProps:me,getTrackProps:Ce}}var i2=jr((e,t)=>{const{Component:n,slots:r,classNames:i,label:s,showValueLabel:a,getProgressBarProps:c,getLabelProps:d,getSvgProps:h,getIndicatorProps:m,getTrackProps:g}=oz({ref:t,...e}),b=c();return D.jsxs(n,{...b,children:[D.jsxs("div",{className:r.svgWrapper({class:i?.svgWrapper}),children:[D.jsxs("svg",{...h(),children:[D.jsx("circle",{...g()}),D.jsx("circle",{...m()})]}),a&&D.jsx("span",{className:r.value({class:i?.value}),children:b["aria-valuetext"]})]}),s&&D.jsx("span",{...d(),children:s})]})});i2.displayName="HeroUI.CircularProgress";var o2=i2;function sz(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:s=!1,type:a="text",validationBehavior:c="aria"}=e,[d,h]=Au(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=xh(e,t),g=Zx({...e,value:d}),{isInvalid:b,validationErrors:x,validationDetails:k}=g.displayValidation,{labelProps:P,fieldProps:T,descriptionProps:_,errorMessageProps:A}=O6({...e,isInvalid:b,errorMessage:e.errorMessage||x}),L=$u(e,{labelable:!0});const O={type:a,pattern:e.pattern};return NE(t,d,h),Y_(e,g,t),S.useEffect(()=>{if(t.current instanceof to(t.current).HTMLTextAreaElement){let j=t.current;Object.defineProperty(j,"defaultValue",{get:()=>j.value,set:()=>{},configurable:!0})}},[t]),{labelProps:P,inputProps:Pn(L,n==="input"?O:void 0,{disabled:r,readOnly:s,required:i&&c==="native","aria-required":i&&c==="aria"||void 0,"aria-invalid":b||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:d,onChange:j=>h(j.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(He.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,...T}),descriptionProps:_,errorMessageProps:A,isInvalid:b,validationErrors:x,validationDetails:k}}function az(e){var t,n,r,i,s,a,c;const d=ci(),{validationBehavior:h}=ew(tv)||{},[m,g]=oa(e,bk.variantKeys),{ref:b,as:x,type:k,label:P,baseRef:T,wrapperRef:_,description:A,className:L,classNames:O,autoFocus:j,startContent:$,endContent:Y,onClear:te,onChange:ie,validationState:B,validationBehavior:W=(t=h??d?.validationBehavior)!=null?t:"native",innerWrapperRef:G,onValueChange:ee=()=>{},...H}=m,le=S.useCallback(Xe=>{ee(Xe??"")},[ee]),[J,X]=S.useState(!1),V=x||"div",ae=(r=(n=e.disableAnimation)!=null?n:d?.disableAnimation)!=null?r:!1,M=Ii(b),U=Ii(T),oe=Ii(_),z=Ii(G),[me,Ce]=Au(m.value,(i=m.defaultValue)!=null?i:"",le),ye=k==="file",Oe=((c=(a=(s=M?.current)==null?void 0:s.files)==null?void 0:a.length)!=null?c:0)>0,Ne=["date","time","month","week","range"].includes(k),_e=!hL(me)||Ne||Oe,Qe=_e||J,at=k==="hidden",Ie=e.isMultiline,mt=Bt(O?.base,L,_e?"is-filled":""),pt=S.useCallback(()=>{var Xe;ye?M.current.value="":Ce(""),te?.(),(Xe=M.current)==null||Xe.focus()},[Ce,te,ye]);Sh(()=>{M.current&&Ce(M.current.value)},[M.current]);const{labelProps:Ut,inputProps:Ue,isInvalid:it,validationErrors:Kt,validationDetails:er,descriptionProps:an,errorMessageProps:_t}=sz({...e,validationBehavior:W,autoCapitalize:e.autoCapitalize,value:me,"aria-label":e.label?e["aria-label"]:mE(e["aria-label"],e.placeholder),inputElementType:Ie?"textarea":"input",onChange:Ce},M);ye&&(delete Ue.value,delete Ue.onChange);const{isFocusVisible:Rt,isFocused:Tn,focusProps:Er}=Pu({autoFocus:j,isTextInput:!0}),{isHovered:Nt,hoverProps:pe}=Eu({isDisabled:!!e?.isDisabled}),{isHovered:Se,hoverProps:ze}=Eu({isDisabled:!!e?.isDisabled}),{focusProps:nt,isFocusVisible:lt}=Pu(),{focusWithinProps:Wt}=kv({onFocusWithinChange:X}),{pressProps:Bn}=il({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:pt}),Jt=B==="invalid"||it,Pt=PF({labelPlacement:e.labelPlacement,label:P}),Pr=typeof m.errorMessage=="function"?m.errorMessage({isInvalid:Jt,validationErrors:Kt,validationDetails:er}):m.errorMessage||Kt?.join(" "),Ft=!!te||e.isClearable,tr=!!P||!!A||!!Pr,ln=!!m.placeholder,aa=!!P,ms=!!A||!!Pr,di=Pt==="outside-left",pi=Pt==="outside-top",ul=Pt==="outside"||di||pi,Mu=Pt==="inside",gs=M.current?(!M.current.value||M.current.value===""||!me||me==="")&&ln:!1,Vr=!!$,cl=ul?di||pi||ln||Pt==="outside"&&Vr:!1,fl=Pt==="outside"&&!ln&&!Vr,Zt=S.useMemo(()=>bk({...g,isInvalid:Jt,labelPlacement:Pt,isClearable:Ft,disableAnimation:ae}),[ds(g),Jt,Pt,Ft,Vr,ae]),vs=S.useCallback((Xe={})=>({ref:U,className:Zt.base({class:mt}),"data-slot":"base","data-filled":Ae(_e||ln||Vr||gs||ye),"data-filled-within":Ae(Qe||ln||Vr||gs||ye),"data-focus-within":Ae(J),"data-focus-visible":Ae(Rt),"data-readonly":Ae(e.isReadOnly),"data-focus":Ae(Tn),"data-hover":Ae(Nt||Se),"data-required":Ae(e.isRequired),"data-invalid":Ae(Jt),"data-disabled":Ae(e.isDisabled),"data-has-elements":Ae(tr),"data-has-helper":Ae(ms),"data-has-label":Ae(aa),"data-has-value":Ae(!gs),"data-hidden":Ae(at),...Wt,...Xe}),[Zt,mt,_e,Tn,Nt,Se,Jt,ms,aa,tr,gs,Vr,J,Rt,Qe,ln,Wt,at,e.isReadOnly,e.isRequired,e.isDisabled]),ys=S.useCallback((Xe={})=>({"data-slot":"label",className:Zt.label({class:O?.label}),...nn(Ut,ze,Xe)}),[Zt,Se,Ut,O?.label]),Ro=S.useCallback(Xe=>{Xe.key==="Escape"&&me&&(Ft||te)&&!e.isReadOnly&&(Ce(""),te?.())},[me,Ce,te,Ft,e.isReadOnly]),dl=S.useCallback((Xe={})=>({"data-slot":"input","data-filled":Ae(_e),"data-filled-within":Ae(Qe),"data-has-start-content":Ae(Vr),"data-has-end-content":Ae(!!Y),"data-type":k,className:Zt.input({class:Bt(O?.input,_e?"is-filled":"",Ie?"pe-0":"",k==="password"?"[&::-ms-reveal]:hidden":"")}),...nn(Er,Ue,Ef(H,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(Ue))}),Xe),"aria-readonly":Ae(e.isReadOnly),onChange:el(Ue.onChange,ie),onKeyDown:el(Ue.onKeyDown,Xe.onKeyDown,Ro),ref:M}),[Zt,me,Er,Ue,H,_e,Qe,Vr,Y,O?.input,e.isReadOnly,e.isRequired,ie,Ro]),bs=S.useCallback((Xe={})=>({ref:oe,"data-slot":"input-wrapper","data-hover":Ae(Nt||Se),"data-focus-visible":Ae(Rt),"data-focus":Ae(Tn),className:Zt.inputWrapper({class:Bt(O?.inputWrapper,_e?"is-filled":"")}),...nn(Xe,pe),onClick:so=>{M.current&&so.currentTarget===so.target&&M.current.focus()},style:{cursor:"text",...Xe.style}}),[Zt,Nt,Se,Rt,Tn,me,O?.inputWrapper]),la=S.useCallback((Xe={})=>({...Xe,ref:z,"data-slot":"inner-wrapper",onClick:so=>{M.current&&so.currentTarget===so.target&&M.current.focus()},className:Zt.innerWrapper({class:Bt(O?.innerWrapper,Xe?.className)})}),[Zt,O?.innerWrapper]),ua=S.useCallback((Xe={})=>({...Xe,"data-slot":"main-wrapper",className:Zt.mainWrapper({class:Bt(O?.mainWrapper,Xe?.className)})}),[Zt,O?.mainWrapper]),pl=S.useCallback((Xe={})=>({...Xe,"data-slot":"helper-wrapper",className:Zt.helperWrapper({class:Bt(O?.helperWrapper,Xe?.className)})}),[Zt,O?.helperWrapper]),Kf=S.useCallback((Xe={})=>({...Xe,...an,"data-slot":"description",className:Zt.description({class:Bt(O?.description,Xe?.className)})}),[Zt,O?.description]),Wf=S.useCallback((Xe={})=>({...Xe,..._t,"data-slot":"error-message",className:Zt.errorMessage({class:Bt(O?.errorMessage,Xe?.className)})}),[Zt,_t,O?.errorMessage]),Hf=S.useCallback((Xe={})=>({...Xe,type:"button",tabIndex:-1,disabled:e.isDisabled,"aria-label":"clear input","data-slot":"clear-button","data-focus-visible":Ae(lt),className:Zt.clearButton({class:Bt(O?.clearButton,Xe?.className)}),...nn(Bn,nt)}),[Zt,lt,Bn,nt,O?.clearButton]);return{Component:V,classNames:O,domRef:M,label:P,description:A,startContent:$,endContent:Y,labelPlacement:Pt,isClearable:Ft,hasHelper:ms,hasStartContent:Vr,isLabelOutside:cl,isOutsideLeft:di,isOutsideTop:pi,isLabelOutsideAsPlaceholder:fl,shouldLabelBeOutside:ul,shouldLabelBeInside:Mu,hasPlaceholder:ln,isInvalid:Jt,errorMessage:Pr,getBaseProps:vs,getLabelProps:ys,getInputProps:dl,getMainWrapperProps:ua,getInputWrapperProps:bs,getInnerWrapperProps:la,getHelperWrapperProps:pl,getDescriptionProps:Kf,getErrorMessageProps:Wf,getClearButtonProps:Hf}}function Rb(){return Rb=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},Rb.apply(null,arguments)}function lz(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}var uz=S.useLayoutEffect,cz=function(t){var n=He.useRef(t);return uz(function(){n.current=t}),n},Nk=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},fz=function(t,n){var r=He.useRef();return He.useCallback(function(i){t.current=i,r.current&&Nk(r.current,null),r.current=n,n&&Nk(n,i)},[n])},Fk={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},dz=function(t){Object.keys(Fk).forEach(function(n){t.style.setProperty(n,Fk[n],"important")})},Ok=dz,Dr=null,zk=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function pz(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Dr||(Dr=document.createElement("textarea"),Dr.setAttribute("tabindex","-1"),Dr.setAttribute("aria-hidden","true"),Ok(Dr)),Dr.parentNode===null&&document.body.appendChild(Dr);var i=e.paddingSize,s=e.borderSize,a=e.sizingStyle,c=a.boxSizing;Object.keys(a).forEach(function(b){var x=b;Dr.style[x]=a[x]}),Ok(Dr),Dr.value=t;var d=zk(Dr,e);Dr.value=t,d=zk(Dr,e),Dr.value="x";var h=Dr.scrollHeight-i,m=h*n;c==="border-box"&&(m=m+i+s),d=Math.max(m,d);var g=h*r;return c==="border-box"&&(g=g+i+s),d=Math.min(g,d),[d,h]}var jk=function(){},hz=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},mz=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],gz=!!document.documentElement.currentStyle,vz=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=hz(mz,n),i=r.boxSizing;if(i==="")return null;gz&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var s=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:s,borderSize:a}},yz=vz;function tw(e,t,n){var r=cz(n);S.useLayoutEffect(function(){var i=function(a){return r.current(a)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var bz=function(t,n){tw(document.body,"reset",function(r){t.current.form===r.target&&n(r)})},xz=function(t){tw(window,"resize",t)},wz=function(t){tw(document.fonts,"loadingdone",t)},Sz=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],kz=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,s=t.minRows,a=t.onChange,c=a===void 0?jk:a,d=t.onHeightChange,h=d===void 0?jk:d,m=lz(t,Sz),g=m.value!==void 0,b=S.useRef(null),x=fz(b,n),k=S.useRef(0),P=S.useRef(),T=function(){var L=b.current,O=r&&P.current?P.current:yz(L);if(O){P.current=O;var j=pz(O,L.value||L.placeholder||"x",s,i),$=j[0],Y=j[1];k.current!==$&&(k.current=$,L.style.setProperty("height",$+"px","important"),h($,{rowHeight:Y}))}},_=function(L){g||T(),c(L)};return S.useLayoutEffect(T),bz(b,function(){if(!g){var A=b.current.value;requestAnimationFrame(function(){var L=b.current;L&&A!==L.value&&T()})}}),xz(T),wz(T),S.createElement("textarea",Rb({},m,{onChange:_,ref:x}))},Cz=S.forwardRef(kz),s2=jr(({style:e,minRows:t=3,maxRows:n=8,cacheMeasurements:r=!1,disableAutosize:i=!1,onHeightChange:s,...a},c)=>{const{Component:d,label:h,description:m,startContent:g,endContent:b,hasHelper:x,shouldLabelBeOutside:k,shouldLabelBeInside:P,isInvalid:T,errorMessage:_,getBaseProps:A,getLabelProps:L,getInputProps:O,getInnerWrapperProps:j,getInputWrapperProps:$,getHelperWrapperProps:Y,getDescriptionProps:te,getErrorMessageProps:ie,isClearable:B,getClearButtonProps:W}=az({...a,ref:c,isMultiline:!0}),[G,ee]=S.useState(t>1),[H,le]=S.useState(!1),J=h?D.jsx("label",{...L(),children:h}):null,X=O(),V=(me,Ce)=>{if(t===1&&ee(me>=Ce.rowHeight*2),n>t){const ye=me>=n*Ce.rowHeight;le(ye)}s?.(me,Ce)},ae=i?D.jsx("textarea",{...X,style:nn(X.style,e??{})}):D.jsx(Cz,{...X,cacheMeasurements:r,"data-hide-scroll":Ae(!H),maxRows:n,minRows:t,style:nn(X.style,e??{}),onHeightChange:V}),M=S.useMemo(()=>B?D.jsx("button",{...W(),children:D.jsx(N_,{})}):null,[B,W]),U=S.useMemo(()=>g||b?D.jsxs("div",{...j(),children:[g,ae,b]}):D.jsx("div",{...j(),children:ae}),[g,X,b,j]),oe=T&&_,z=oe||m;return D.jsxs(d,{...A(),children:[k?J:null,D.jsxs("div",{...$(),"data-has-multiple-rows":Ae(G),children:[P?J:null,U,M]}),x&&z?D.jsx("div",{...Y(),children:oe?D.jsx("div",{...ie(),children:_}):D.jsx("div",{...te(),children:m})}):null]})});s2.displayName="HeroUI.Textarea";var Ez=s2;function Pz(e,t){let{role:n="dialog"}=e,r=W0();r=e["aria-label"]?void 0:r;let i=S.useRef(!1);return S.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){Cu(t.current);let s=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),Cu(t.current)),i.current=!1)},500);return()=>{clearTimeout(s)}}},[t]),v_(),{dialogProps:{...$u(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:s=>{i.current&&s.stopPropagation()}},titleProps:{id:r}}}function Tz(e){var t,n;const r=ci(),[i,s]=oa(e,wk.variantKeys),{ref:a,as:c,src:d,className:h,classNames:m,loading:g,isBlurred:b,fallbackSrc:x,isLoading:k,disableSkeleton:P=!!x,removeWrapper:T=!1,onError:_,onLoad:A,srcSet:L,sizes:O,crossOrigin:j,...$}=i,Y=S6({src:d,loading:g,onError:_,onLoad:A,ignoreFallback:!1,srcSet:L,sizes:O,crossOrigin:j,shouldBypassImageLoad:c!==void 0}),te=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,ie=Y==="loaded"&&!k,B=Y==="loading"||k,W=e.isZoomed,G=c||"img",ee=Ii(a),{w:H,h:le}=S.useMemo(()=>({w:i.width?typeof i.width=="number"?`${i.width}px`:i.width:"fit-content",h:i.height?typeof i.height=="number"?`${i.height}px`:i.height:"auto"}),[i?.width,i?.height]),J=(!d||!ie)&&!!x,X=B&&!P,V=S.useMemo(()=>wk({...s,disableAnimation:te,showSkeleton:X}),[ds(s),te,X]),ae=Bt(h,m?.img),M=(z={})=>{const me=Bt(ae,z?.className);return{src:d,ref:ee,"data-loaded":Ae(ie),className:V.img({class:me}),loading:g,srcSet:L,sizes:O,crossOrigin:j,...$,style:{...$?.height&&{height:le},...z.style,...$.style}}},U=S.useCallback(()=>{const z=J?{backgroundImage:`url(${x})`}:{};return{className:V.wrapper({class:m?.wrapper}),style:{...z,maxWidth:H}}},[V,J,x,m?.wrapper,H]),oe=S.useCallback(()=>({src:d,"aria-hidden":Ae(!0),className:V.blurredImg({class:m?.blurredImg})}),[V,d,m?.blurredImg]);return{Component:G,domRef:ee,slots:V,classNames:m,isBlurred:b,disableSkeleton:P,fallbackSrc:x,removeWrapper:T,isZoomed:W,isLoading:B,getImgProps:M,getWrapperProps:U,getBlurredImgProps:oe}}var a2=jr((e,t)=>{const{Component:n,domRef:r,slots:i,classNames:s,isBlurred:a,isZoomed:c,fallbackSrc:d,removeWrapper:h,disableSkeleton:m,getImgProps:g,getWrapperProps:b,getBlurredImgProps:x}=Tz({...e,ref:t}),k=D.jsx(n,{ref:r,...g()});if(h)return k;const P=D.jsx("div",{className:i.zoomedWrapper({class:s?.zoomedWrapper}),children:k});return a?D.jsxs("div",{...b(),children:[c?P:k,S.cloneElement(k,x())]}):c||!m||d?D.jsxs("div",{...b(),children:[" ",c?P:k]}):k});a2.displayName="HeroUI.Image";var y0=a2,[_z,l2]=pv({name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"}),u2=jr((e,t)=>{const{as:n,children:r,className:i,...s}=e,{slots:a,classNames:c,bodyId:d,setBodyMounted:h}=l2(),m=Ii(t),g=n||"div";return S.useEffect(()=>(h(!0),()=>h(!1)),[h]),D.jsx(g,{ref:m,className:a.body({class:Bt(c?.body,i)}),id:d,...s,children:r})});u2.displayName="HeroUI.ModalBody";var Iz=u2,$z={enter:{scale:"var(--scale-enter)",y:"var(--slide-enter)",opacity:1,willChange:"auto",transition:{scale:{duration:.4,ease:Bp.ease},opacity:{duration:.4,ease:Bp.ease},y:{type:"spring",bounce:0,duration:.6}}},exit:{scale:"var(--scale-exit)",y:"var(--slide-exit)",opacity:0,willChange:"transform",transition:{duration:.3,ease:Bp.ease}}},ss=typeof document<"u"&&window.visualViewport,Az=He.createContext(!1);function Rz(){return!1}function Lz(){return!0}function Mz(e){return()=>{}}function Dz(){return typeof He.useSyncExternalStore=="function"?He.useSyncExternalStore(Mz,Rz,Lz):S.useContext(Az)}function Nz(){let e=Dz(),[t,n]=S.useState(()=>e?{width:0,height:0}:Bk());return S.useEffect(()=>{let r=()=>{n(i=>{let s=Bk();return s.width===i.width&&s.height===i.height?i:s})};return ss?ss.addEventListener("resize",r):window.addEventListener("resize",r),()=>{ss?ss.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function Bk(){return{width:ss&&ss?.width||window.innerWidth,height:ss&&ss?.height||window.innerHeight}}var Vk=()=>io(()=>import("./index-C_JcEI3R.js"),[]).then(e=>e.default),c2=e=>{const{as:t,children:n,role:r="dialog",...i}=e,{Component:s,domRef:a,slots:c,classNames:d,motionProps:h,backdrop:m,closeButton:g,hideCloseButton:b,disableAnimation:x,getDialogProps:k,getBackdropProps:P,getCloseButtonProps:T,onClose:_}=l2(),A=t||s||"div",L=Nz(),{dialogProps:O}=Pz({role:r},a),j=S.isValidElement(g)?S.cloneElement(g,T()):D.jsx("button",{...T(),children:D.jsx(e6,{})}),$=S.useCallback(G=>{G.key==="Tab"&&G.nativeEvent.isComposing&&(G.stopPropagation(),G.preventDefault())},[]),Y=k(nn(O,i)),te=D.jsxs(A,{...Y,onKeyDown:el(Y.onKeyDown,$),children:[D.jsx(ak,{onDismiss:_}),!b&&j,typeof n=="function"?n(_):n,D.jsx(ak,{onDismiss:_})]}),ie=S.useMemo(()=>m==="transparent"?null:x?D.jsx("div",{...P()}):D.jsx($f,{features:Vk,children:D.jsx(Af.div,{animate:"enter",exit:"exit",initial:"exit",variants:Zg.fade,...P()})}),[m,x,P]),B={"--visual-viewport-height":L.height+"px"},W=x?D.jsx("div",{className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",style:B,children:te}):D.jsx($f,{features:Vk,children:D.jsx(Af.div,{animate:"enter",className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",exit:"exit",initial:"exit",variants:$z,...h,style:B,children:te})});return D.jsxs("div",{tabIndex:-1,children:[ie,W]})};c2.displayName="HeroUI.ModalContent";var Fz=c2;function Oz(e={shouldBlockScroll:!0},t,n){let{overlayProps:r,underlayProps:i}=n2({...e,isOpen:t.isOpen,onClose:t.close},n);return dF({isDisabled:!t.isOpen||!e.shouldBlockScroll}),v_(),S.useEffect(()=>{if(t.isOpen&&n.current)return kF([n.current])},[t.isOpen,n]),{modalProps:Pn(r),underlayProps:i}}function zz(e){var t,n,r;const i=ci(),[s,a]=oa(e,xk.variantKeys),{ref:c,as:d,className:h,classNames:m,isOpen:g,defaultOpen:b,onOpenChange:x,motionProps:k,closeButton:P,isDismissable:T=!0,hideCloseButton:_=!1,shouldBlockScroll:A=!0,portalContainer:L,isKeyboardDismissDisabled:O=!1,onClose:j,...$}=s,Y=d||"section",te=Ii(c),ie=S.useRef(null),[B,W]=S.useState(!1),[G,ee]=S.useState(!1),H=(n=(t=e.disableAnimation)!=null?t:i?.disableAnimation)!=null?n:!1,le=S.useId(),J=S.useId(),X=S.useId(),V=t2({isOpen:g,defaultOpen:b,onOpenChange:_e=>{x?.(_e),_e||j?.()}}),{modalProps:ae,underlayProps:M}=Oz({isDismissable:T,shouldBlockScroll:A,isKeyboardDismissDisabled:O},V,te),{buttonProps:U}=B_({onPress:V.close},ie),{isFocusVisible:oe,focusProps:z}=Pu(),me=Bt(m?.base,h),Ce=S.useMemo(()=>xk({...a,disableAnimation:H}),[ds(a),H]),ye=(_e={},Qe=null)=>{var at;return{ref:gE(Qe,te),...nn(ae,$,_e),className:Ce.base({class:Bt(me,_e.className)}),id:le,"data-open":Ae(V.isOpen),"data-dismissable":Ae(T),"aria-modal":Ae(!0),"data-placement":(at=e?.placement)!=null?at:"right","aria-labelledby":B?J:void 0,"aria-describedby":G?X:void 0}},Oe=S.useCallback((_e={})=>({className:Ce.backdrop({class:m?.backdrop}),...M,..._e}),[Ce,m,M]),Ne=()=>({role:"button",tabIndex:0,"aria-label":"Close","data-focus-visible":Ae(oe),className:Ce.closeButton({class:m?.closeButton}),...nn(U,z)});return{Component:Y,slots:Ce,domRef:te,headerId:J,bodyId:X,motionProps:k,classNames:m,isDismissable:T,closeButton:P,hideCloseButton:_,portalContainer:L,shouldBlockScroll:A,backdrop:(r=e.backdrop)!=null?r:"opaque",isOpen:V.isOpen,onClose:V.close,disableAnimation:H,setBodyMounted:ee,setHeaderMounted:W,getDialogProps:ye,getBackdropProps:Oe,getCloseButtonProps:Ne}}var f2=jr((e,t)=>{const{children:n,...r}=e,i=zz({...r,ref:t}),s=D.jsx(CF,{portalContainer:i.portalContainer,children:n});return D.jsx(_z,{value:i,children:i.disableAnimation&&i.isOpen?s:D.jsx(ol,{children:i.isOpen?s:null})})});f2.displayName="HeroUI.Modal";var jz=f2;function Bz(e={}){const{id:t,defaultOpen:n,isOpen:r,onClose:i,onOpen:s,onChange:a=()=>{}}=e,c=Ab(s),d=Ab(i),[h,m]=Au(r,n||!1,a),g=S.useId(),b=t||g,x=r!==void 0,k=S.useCallback(()=>{x||m(!1),d?.()},[x,d]),P=S.useCallback(()=>{x||m(!0),c?.()},[x,c]),T=S.useCallback(()=>{(h?k:P)()},[h,P,k]);return{isOpen:!!h,onOpen:P,onClose:k,onOpenChange:T,isControlled:x,getButtonProps:(_={})=>({..._,"aria-expanded":h,"aria-controls":b,onClick:Tf(_.onClick,T)}),getDisclosureProps:(_={})=>({..._,hidden:!h,id:b})}}function Vz(e){var t,n;const r=ci(),[i,s]=oa(e,yk.variantKeys),{as:a,children:c,isLoaded:d=!1,className:h,classNames:m,...g}=i,b=a||"div",x=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,k=S.useMemo(()=>yk({...s,disableAnimation:x}),[ds(s),x,c]),P=Bt(m?.base,h);return{Component:b,children:c,slots:k,classNames:m,getSkeletonProps:(A={})=>({"data-loaded":Ae(d),className:k.base({class:Bt(P,A?.className)}),...g}),getContentProps:(A={})=>({className:k.content({class:Bt(m?.content,A?.className)})})}}var d2=jr((e,t)=>{const{Component:n,children:r,getSkeletonProps:i,getContentProps:s}=Vz({...e});return D.jsx(n,{ref:t,...i(),children:D.jsx("div",{...s(),children:r})})});d2.displayName="HeroUI.Skeleton";var Uz=d2;function Kz(e={}){const{domRef:t,isEnabled:n=!0,overflowCheck:r="vertical",visibility:i="auto",offset:s=0,onVisibilityChange:a,updateDeps:c=[]}=e,d=S.useRef(i);S.useEffect(()=>{const h=t?.current;if(!h||!n)return;const m=(x,k,P,T,_)=>{if(i==="auto"){const A=`${T}${gL(_)}Scroll`;k&&P?(h.dataset[A]="true",h.removeAttribute(`data-${T}-scroll`),h.removeAttribute(`data-${_}-scroll`)):(h.dataset[`${T}Scroll`]=k.toString(),h.dataset[`${_}Scroll`]=P.toString(),h.removeAttribute(`data-${T}-${_}-scroll`))}else{const A=k&&P?"both":k?T:P?_:"none";A!==d.current&&(a?.(A),d.current=A)}},g=()=>{var x,k;const P=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],T=h.querySelector('ul[data-slot="list"]'),_=+((x=T?.getAttribute("data-virtual-scroll-height"))!=null?x:h.scrollHeight),A=+((k=T?.getAttribute("data-virtual-scroll-top"))!=null?k:h.scrollTop);for(const{type:L,prefix:O,suffix:j}of P)if(r===L||r==="both"){const $=L==="vertical"?A>s:h.scrollLeft>s,Y=L==="vertical"?A+h.clientHeight+s<_:h.scrollLeft+h.clientWidth+s<h.scrollWidth;m(L,$,Y,O,j)}},b=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(x=>{h.removeAttribute(`data-${x}-scroll`)})};return g(),h.addEventListener("scroll",g,!0),i!=="auto"&&(b(),i==="both"?(h.dataset.topBottomScroll=String(r==="vertical"),h.dataset.leftRightScroll=String(r==="horizontal")):(h.dataset.topBottomScroll="false",h.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(x=>{h.dataset[`${x}Scroll`]=String(i===x)}))),()=>{h.removeEventListener("scroll",g,!0),b()}},[...c,n,i,r,a,t])}function Wz(e){var t;const[n,r]=oa(e,vk.variantKeys),{ref:i,as:s,children:a,className:c,style:d,size:h=40,offset:m=0,visibility:g="auto",isEnabled:b=!0,onVisibilityChange:x,...k}=n,P=s||"div",T=Ii(i);Kz({domRef:T,offset:m,visibility:g,isEnabled:b,onVisibilityChange:x,updateDeps:[a],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const _=S.useMemo(()=>vk({...r,className:c}),[ds(r),c]);return{Component:P,styles:_,domRef:T,children:a,getBaseProps:(L={})=>{var O;return{ref:T,className:_,"data-orientation":(O=e.orientation)!=null?O:"vertical",style:{"--scroll-shadow-size":`${h}px`,...d,...L.style},...k,...L}}}}var p2=jr((e,t)=>{const{Component:n,children:r,getBaseProps:i}=Wz({...e,ref:t});return D.jsx(n,{...i(),children:r})});p2.displayName="HeroUI.ScrollShadow";var h2=p2;const ZG={Like:"like",Dislike:"dislike"},Hz={Start:"START"},Sf={User:"user",Assistant:"assistant"},lf={Pending:"pending",InProgress:"in_progress",Completed:"completed"};class m2{constructor(t={}){if(this.chunkQueue=new Map,this.baseUrl=t.baseUrl??"",this.auth=t.auth,this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.slice(0,-1)),!!this.baseUrl)try{new URL(this.baseUrl)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}. Please provide a valid URL.`)}}getBaseUrl(){return this.baseUrl}_buildApiUrl(t){return`${this.baseUrl}${t}`}async _makeRequest(t,n={}){const i={...{"Content-Type":"application/json"},...this.normalizeHeaders(n.headers)};this.auth?.getToken&&(i.Authorization=`Bearer ${this.auth.getToken()}`);const s=await fetch(t,{...n,headers:i});if(s.status===401&&this.auth?.onUnauthorized?.(),!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s}async makeRequest(t,...n){const r=n[0],{method:i="GET",body:s,pathParams:a,queryParams:c,headers:d={},...h}=r||{},m={method:i,headers:d,...h};s&&i!=="GET"&&(m.body=typeof s=="string"?s:JSON.stringify(s));let g=t.toString();if(a&&typeof a=="object"&&(g=g.replace(/:([^/]+)/g,(x,k)=>{if(k in a){const P=a[k];return encodeURIComponent(String(P))}else throw new Error(`Path parameter ${k} is required`)})),c&&Object.keys(c).length>0){const x=new URLSearchParams;for(const[k,P]of Object.entries(c))P!=null&&x.append(k,String(P));g+=`?${x.toString()}`}return g=this._buildApiUrl(g),(await this._makeRequest(g,m)).json()}makeStreamRequest(t,n,r,i,s){let a=!1;const c=async h=>{const m=h.body?.pipeThrough(new TextDecoderStream).getReader();if(!m)throw new Error("Response body is null");let g="";for(;!a&&!i?.aborted;)try{const{value:b,done:x}=await m.read();if(x){r.onClose?.();break}g+=b;const k=g.split(`
56
+ `);g=k.pop()??"";for(const P of k)if(P.startsWith("data: "))try{const T=P.replace("data: ","").trim(),_=JSON.parse(T);if(!this.isChatResponse(_)){console.warn("Received response that isn't ChatResponse, skipping.",_);continue}if(_.type==="chunked_content"){this.handleChunkedContent(_,r);continue}await r.onMessage(_),await new Promise(A=>setTimeout(A,0))}catch(T){console.error("Error parsing JSON:",T),await r.onError(new Error("Error processing server response"))}}catch(b){if(i?.aborted)return;console.error("Stream error:",b),await r.onError(new Error("Error reading stream"));break}},d=async()=>{try{const m={...{"Content-Type":"application/json",Accept:"text/event-stream"},...s};this.auth?.getToken&&(m.Authorization=`Bearer ${this.auth.getToken()}`);const g=await fetch(this._buildApiUrl(t.toString()),{method:"POST",headers:m,body:JSON.stringify(n),signal:i});if(g.status===401&&this.auth?.onUnauthorized?.(),!g.ok)throw new Error(`HTTP error! status: ${g.status}`);await c(g)}catch(h){if(i?.aborted)return;console.error("Request error:",h);const m=h instanceof Error?h.message:"Error connecting to server";await r.onError(new Error(m))}};try{d()}catch(h){const m=h instanceof Error?h.message:"Failed to start stream";r.onError(new Error(m))}return()=>{a=!0}}isChatResponse(t){return t!==null&&typeof t=="object"&&"type"in t&&"content"in t}normalizeHeaders(t){return t?t instanceof Headers?Object.fromEntries(t.entries()):Array.isArray(t)?Object.fromEntries(t):t:{}}async handleChunkedContent(t,n){const i=t.content,{content_type:s,id:a,chunk_index:c,total_chunks:d,mime_type:h,data:m}=i;this.chunkQueue.has(a)||this.chunkQueue.set(a,{chunks:new Map,totalChunks:d,mimeType:h});const g=this.chunkQueue.get(a);if(g.chunks.set(c,m),g.chunks.size!==d)return;const x=Array.from({length:d},(k,P)=>g.chunks.get(P)).join("");try{atob(x)}catch(k){this.chunkQueue.delete(a),console.error("❌ Invalid base64 data: ",k),await n.onError(new Error("Error reading stream"))}if(s==="image"){const k={type:"image",content:{id:a,url:`${g.mimeType},${x}`}};await n.onMessage(k)}this.chunkQueue.delete(a)}}const g2=S.createContext(null);function Gz({children:e,...t}){const n=S.useMemo(()=>new m2(t),[t]),r=S.useMemo(()=>({client:n}),[n]);return D.jsx(g2.Provider,{value:r,children:e})}function nw(){const e=S.useContext(g2);if(!e)throw new Error("useRagbitsContext must be used within a RagbitsProvider");return e}function qz(e,t){const{client:n}=nw(),[r,i]=S.useState(null),[s,a]=S.useState(null),[c,d]=S.useState(!1),h=S.useRef(null),m=S.useCallback(()=>{if(!h.current)return null;h.current.abort(),h.current=null,d(!1)},[]),g=S.useCallback(async(...x)=>{const k=x[0];h.current&&c&&h.current.abort();const P=new AbortController;h.current=P,d(!0),a(null);try{const _={...{...t,...k||{},headers:{...t?.headers,...k?.headers||{}}},signal:P.signal},A=await n.makeRequest(e,_);return P.signal.aborted||(i(A),h.current=null),A}catch(T){if(!P.signal.aborted){const _=T instanceof Error?T:new Error("API call failed");throw a(_),h.current=null,_}throw T}finally{P.signal.aborted||d(!1)}},[n,e,t,c]),b=S.useCallback(()=>{m(),i(null),a(null),d(!1)},[m]);return{data:r,error:s,isLoading:c,call:g,reset:b,abort:m}}var To=(e=>(e.LIGHT="light",e.DARK="dark",e))(To||{});const v2=S.createContext(null),Yz="🐰",Xz="Ragbits Chat",Qz="by deepsense.ai",Jz="Loading...",y2="http://127.0.0.1:8000";function Zz(){return window.matchMedia("(prefers-color-scheme: dark)").matches?To.DARK:To.LIGHT}function Uk(){const e=window.localStorage.getItem("theme");return e===To.DARK||e===To.LIGHT?e:Zz()}function e8(e){return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}const t8=({children:e})=>{const t=S.useSyncExternalStore(e8,Uk,Uk),n=S.useRef(!1),r=new m2({baseUrl:y2});S.useEffect(()=>{if(n.current)return;(async()=>{try{const c=r.getBaseUrl(),d=await fetch(`${c}/api/theme`);if(d.ok){const h=await d.text(),m=document.getElementById("heroui-custom-theme");m&&m.remove();const g=document.createElement("style");g.id="heroui-custom-theme",g.textContent=h,document.head.appendChild(g),console.log("Custom HeroUI theme loaded successfully"),n.current=!0}}catch(c){console.warn("No custom theme available:",c),n.current=!0}})()},[]),S.useEffect(()=>{document.documentElement.classList.toggle("dark",t===To.DARK)},[t]);const i=S.useCallback(a=>{window.localStorage.setItem("theme",a),window.dispatchEvent(new Event("storage"))},[]),s=S.useMemo(()=>({theme:t,setTheme:i}),[t,i]);return D.jsx(v2.Provider,{value:s,children:e})},b2=Object.freeze({left:0,top:0,width:16,height:16}),nv=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),rw=Object.freeze({...b2,...nv}),Lb=Object.freeze({...rw,body:"",hidden:!1});function n8(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Kk(e,t){const n=n8(e,t);for(const r in Lb)r in nv?r in e&&!(r in n)&&(n[r]=nv[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function r8(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const c=r[a]&&r[a].parent,d=c&&s(c);d&&(i[a]=[c].concat(d))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(s),i}function i8(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function a(c){s=Kk(r[c]||i[c],s)}return a(t),n.forEach(a),Kk(e,s)}function x2(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=r8(e);for(const i in r){const s=r[i];s&&(t(i,i8(e,i,s)),n.push(i))}return n}const o8={provider:"",aliases:{},not_found:{},...b2};function b0(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function w2(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!b0(e,o8))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i||typeof s.body!="string"||!b0(s,Lb))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],a=s.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!b0(s,Lb))return null}return t}const S2=/^[a-z0-9]+(-[a-z0-9]+)*$/,Cv=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const c=i.pop(),d=i.pop(),h={provider:i.length>0?i[0]:r,prefix:d,name:c};return t&&!Dg(h)?null:h}const s=i[0],a=s.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Dg(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!Dg(c,n)?null:c}return null},Dg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Wk=Object.create(null);function s8(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Rf(e,t){const n=Wk[e]||(Wk[e]=Object.create(null));return n[t]||(n[t]=s8(e,t))}function k2(e,t){return w2(t)?x2(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function a8(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let ah=!1;function C2(e){return typeof e=="boolean"&&(ah=e),ah}function Hk(e){const t=typeof e=="string"?Cv(e,!0,ah):e;if(t){const n=Rf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function l8(e,t){const n=Cv(e,!0,ah);if(!n)return!1;const r=Rf(n.provider,n.prefix);return t?a8(r,n.name,t):(r.missing.add(n.name),!0)}function u8(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ah&&!t&&!e.prefix){let i=!1;return w2(e)&&(e.prefix="",x2(e,(s,a)=>{l8(s,a)&&(i=!0)})),i}const n=e.prefix;if(!Dg({prefix:n,name:"a"}))return!1;const r=Rf(t,n);return!!k2(r,e)}const E2=Object.freeze({width:null,height:null}),P2=Object.freeze({...E2,...nv}),c8=/(-?[0-9.]*[0-9]+[0-9.]*)/g,f8=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Gk(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(c8);if(r===null||!r.length)return e;const i=[];let s=r.shift(),a=f8.test(s);for(;;){if(a){const c=parseFloat(s);isNaN(c)?i.push(s):i.push(Math.ceil(c*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");a=!a}}function d8(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),s=e.indexOf("</"+t);if(i===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;n+=e.slice(i+1,s).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function p8(e,t){return e?"<defs>"+e+"</defs>"+t:t}function h8(e,t,n){const r=d8(e);return p8(r.defs,t+r.content+n)}const m8=e=>e==="unset"||e==="undefined"||e==="none";function g8(e,t){const n={...rw,...e},r={...P2,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(P=>{const T=[],_=P.hFlip,A=P.vFlip;let L=P.rotate;_?A?L+=2:(T.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),T.push("scale(-1 1)"),i.top=i.left=0):A&&(T.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),T.push("scale(1 -1)"),i.top=i.left=0);let O;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:O=i.height/2+i.top,T.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:T.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:O=i.width/2+i.left,T.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}L%2===1&&(i.left!==i.top&&(O=i.left,i.left=i.top,i.top=O),i.width!==i.height&&(O=i.width,i.width=i.height,i.height=O)),T.length&&(s=h8(s,'<g transform="'+T.join(" ")+'">',"</g>"))});const a=r.width,c=r.height,d=i.width,h=i.height;let m,g;a===null?(g=c===null?"1em":c==="auto"?h:c,m=Gk(g,d/h)):(m=a==="auto"?d:a,g=c===null?Gk(m,h/d):c==="auto"?h:c);const b={},x=(P,T)=>{m8(T)||(b[P]=T.toString())};x("width",m),x("height",g);const k=[i.left,i.top,d,h];return b.viewBox=k.join(" "),{attributes:b,viewBox:k,body:s}}const v8=/\sid="(\S+)"/g,y8="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let b8=0;function x8(e,t=y8){const n=[];let r;for(;r=v8.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof t=="function"?t(s):t+(b8++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const Mb=Object.create(null);function w8(e,t){Mb[e]=t}function Db(e){return Mb[e]||Mb[""]}function iw(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ow=Object.create(null),wp=["https://api.simplesvg.com","https://api.unisvg.com"],Ng=[];for(;wp.length>0;)wp.length===1||Math.random()>.5?Ng.push(wp.shift()):Ng.push(wp.pop());ow[""]=iw({resources:["https://api.iconify.design"].concat(Ng)});function S8(e,t){const n=iw(t);return n===null?!1:(ow[e]=n,!0)}function sw(e){return ow[e]}const k8=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let qk=k8();function C8(e,t){const n=sw(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function E8(e){return e===404}const P8=(e,t,n)=>{const r=[],i=C8(e,t),s="icons";let a={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((d,h)=>{c+=d.length+1,c>=i&&h>0&&(r.push(a),a={type:s,provider:e,prefix:t,icons:[]},c=d.length),a.icons.push(d)}),r.push(a),r};function T8(e){if(typeof e=="string"){const t=sw(e);if(t)return t.path}return"/"}const _8=(e,t,n)=>{if(!qk){n("abort",424);return}let r=T8(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),d=new URLSearchParams({icons:c});r+=s+".json?"+d.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;qk(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(E8(a)?"abort":"next",a)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},I8={prepare:P8,send:_8};function $8(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,a=i.prefix,c=i.name,d=n[s]||(n[s]=Object.create(null)),h=d[a]||(d[a]=Rf(s,a));let m;c in h.icons?m=t.loaded:a===""||h.missing.has(c)?m=t.missing:m=t.pending;const g={provider:s,prefix:a,name:c};m.push(g)}),t}function T2(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function A8(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const a=s.icons,c=a.pending.length;a.pending=a.pending.filter(d=>{if(d.prefix!==i)return!0;const h=d.name;if(e.icons[h])a.loaded.push({provider:r,prefix:i,name:h});else if(e.missing.has(h))a.missing.push({provider:r,prefix:i,name:h});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||T2([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let R8=0;function L8(e,t,n){const r=R8++,i=T2.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),i}function M8(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?Cv(i,t,n):i;s&&r.push(s)}),r}var D8={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function N8(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let $=e.resources.slice(0);for(a=[];$.length>1;){const Y=Math.floor(Math.random()*$.length);a.push($[Y]),$=$.slice(0,Y).concat($.slice(Y+1))}a=a.concat($)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let d="pending",h=0,m,g=null,b=[],x=[];typeof r=="function"&&x.push(r);function k(){g&&(clearTimeout(g),g=null)}function P(){d==="pending"&&(d="aborted"),k(),b.forEach($=>{$.status==="pending"&&($.status="aborted")}),b=[]}function T($,Y){Y&&(x=[]),typeof $=="function"&&x.push($)}function _(){return{startTime:c,payload:t,status:d,queriesSent:h,queriesPending:b.length,subscribe:T,abort:P}}function A(){d="failed",x.forEach($=>{$(void 0,m)})}function L(){b.forEach($=>{$.status==="pending"&&($.status="aborted")}),b=[]}function O($,Y,te){const ie=Y!=="success";switch(b=b.filter(B=>B!==$),d){case"pending":break;case"failed":if(ie||!e.dataAfterTimeout)return;break;default:return}if(Y==="abort"){m=te,A();return}if(ie){m=te,b.length||(a.length?j():A());return}if(k(),L(),!e.random){const B=e.resources.indexOf($.resource);B!==-1&&B!==e.index&&(e.index=B)}d="completed",x.forEach(B=>{B(te)})}function j(){if(d!=="pending")return;k();const $=a.shift();if($===void 0){if(b.length){g=setTimeout(()=>{k(),d==="pending"&&(L(),A())},e.timeout);return}A();return}const Y={status:"pending",resource:$,callback:(te,ie)=>{O(Y,te,ie)}};b.push(Y),h++,g=setTimeout(j,e.rotate),n($,t,Y.callback)}return setTimeout(j),_}function _2(e){const t={...D8,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function i(c,d,h){const m=N8(t,c,d,(g,b)=>{r(),h&&h(g,b)});return n.push(m),m}function s(c){return n.find(d=>c(d))||null}return{query:i,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Yk(){}const x0=Object.create(null);function F8(e){if(!x0[e]){const t=sw(e);if(!t)return;const n=_2(t),r={config:t,redundancy:n};x0[e]=r}return x0[e]}function O8(e,t,n){let r,i;if(typeof e=="string"){const s=Db(e);if(!s)return n(void 0,424),Yk;i=s.send;const a=F8(e);a&&(r=a.redundancy)}else{const s=iw(e);if(s){r=_2(s);const a=e.resources?e.resources[0]:"",c=Db(a);c&&(i=c.send)}}return!r||!i?(n(void 0,424),Yk):r.query(t,i,n)().abort}function Xk(){}function z8(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,A8(e)}))}function j8(e){const t=[],n=[];return e.forEach(r=>{(r.match(S2)?t:n).push(r)}),{valid:t,invalid:n}}function Sp(e,t,n){function r(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(n&&typeof n=="object")try{if(!k2(e,n).length){r();return}}catch(i){console.error(i)}r(),z8(e)}function Qk(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function B8(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const s=e.loadIcon;if(e.loadIcons&&(i.length>1||!s)){Qk(e.loadIcons(i,r,n),m=>{Sp(e,i,m)});return}if(s){i.forEach(m=>{const g=s(m,r,n);Qk(g,b=>{const x=b?{prefix:r,icons:{[m]:b}}:null;Sp(e,[m],x)})});return}const{valid:a,invalid:c}=j8(i);if(c.length&&Sp(e,c,null),!a.length)return;const d=r.match(S2)?Db(n):null;if(!d){Sp(e,a,null);return}d.prepare(n,r,a).forEach(m=>{O8(n,m,g=>{Sp(e,m.icons,g)})})}))}const I2=(e,t)=>{const n=M8(e,!0,C2()),r=$8(n);if(!r.pending.length){let d=!0;return t&&setTimeout(()=>{d&&t(r.loaded,r.missing,r.pending,Xk)}),()=>{d=!1}}const i=Object.create(null),s=[];let a,c;return r.pending.forEach(d=>{const{provider:h,prefix:m}=d;if(m===c&&h===a)return;a=h,c=m,s.push(Rf(h,m));const g=i[h]||(i[h]=Object.create(null));g[m]||(g[m]=[])}),r.pending.forEach(d=>{const{provider:h,prefix:m,name:g}=d,b=Rf(h,m),x=b.pendingIcons||(b.pendingIcons=new Set);x.has(g)||(x.add(g),i[h][m].push(g))}),s.forEach(d=>{const h=i[d.provider][d.prefix];h.length&&B8(d,h)}),t?L8(t,r,s):Xk};function V8(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in E2?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const U8=/[\s,]+/;function K8(e,t){t.split(U8).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function W8(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function H8(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function G8(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function q8(e){return"data:image/svg+xml,"+G8(e)}function Y8(e){return'url("'+q8(e)+'")'}let Vp;function X8(){try{Vp=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Vp=null}}function Q8(e){return Vp===void 0&&X8(),Vp?Vp.createHTML(e):e}const $2={...P2,inline:!1},J8={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Z8={display:"inline-block"},Nb={backgroundColor:"currentColor"},A2={backgroundColor:"transparent"},Jk={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Zk={WebkitMask:Nb,mask:Nb,background:A2};for(const e in Zk){const t=Zk[e];for(const n in Jk)t[e+n]=Jk[n]}const e7={...$2,inline:!0};function eC(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const t7=(e,t,n)=>{const r=t.inline?e7:$2,i=V8(r,t),s=t.mode||"svg",a={},c=t.style||{},d={...s==="svg"?J8:{}};if(n){const T=Cv(n,!1,!0);if(T){const _=["iconify"],A=["provider","prefix"];for(const L of A)T[L]&&_.push("iconify--"+T[L]);d.className=_.join(" ")}}for(let T in t){const _=t[T];if(_!==void 0)switch(T){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":d.ref=_;break;case"className":d[T]=(d[T]?d[T]+" ":"")+_;break;case"inline":case"hFlip":case"vFlip":i[T]=_===!0||_==="true"||_===1;break;case"flip":typeof _=="string"&&K8(i,_);break;case"color":a.color=_;break;case"rotate":typeof _=="string"?i[T]=W8(_):typeof _=="number"&&(i[T]=_);break;case"ariaHidden":case"aria-hidden":_!==!0&&_!=="true"&&delete d["aria-hidden"];break;default:r[T]===void 0&&(d[T]=_)}}const h=g8(e,i),m=h.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),s==="svg"){d.style={...a,...c},Object.assign(d,m);let T=0,_=t.id;return typeof _=="string"&&(_=_.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:Q8(x8(h.body,_?()=>_+"ID"+T++:"iconifyReact"))},S.createElement("svg",d)}const{body:g,width:b,height:x}=e,k=s==="mask"||(s==="bg"?!1:g.indexOf("currentColor")!==-1),P=H8(g,{...m,width:b+"",height:x+""});return d.style={...a,"--svg":Y8(P),width:eC(m.width),height:eC(m.height),...Z8,...k?Nb:A2,...c},S.createElement("span",d)};C2(!0);w8("",I8);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!u8(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;S8(n,i)||console.error(r)}catch{console.error(r)}}}}function R2(e){const[t,n]=S.useState(!!e.ssr),[r,i]=S.useState({});function s(x){if(x){const k=e.icon;if(typeof k=="object")return{name:"",data:k};const P=Hk(k);if(P)return{name:k,data:P}}return{name:""}}const[a,c]=S.useState(s(!!e.ssr));function d(){const x=r.callback;x&&(x(),i({}))}function h(x){if(JSON.stringify(a)!==JSON.stringify(x))return d(),c(x),!0}function m(){var x;const k=e.icon;if(typeof k=="object"){h({name:"",data:k});return}const P=Hk(k);if(h({name:k,data:P}))if(P===void 0){const T=I2([k],m);i({callback:T})}else P&&((x=e.onLoad)===null||x===void 0||x.call(e,k))}S.useEffect(()=>(n(!0),d),[]),S.useEffect(()=>{t&&m()},[e.icon,t]);const{name:g,data:b}=a;return b?t7({...rw,...b},e,g):e.children?e.children:e.fallback?e.fallback:S.createElement("span",{})}const ui=S.forwardRef((e,t)=>R2({...e,_ref:t}));S.forwardRef((e,t)=>R2({inline:!0,...e,_ref:t}));var Lp={exports:{}};/**
57
57
  * @license
58
58
  * Lodash <https://lodash.com/>
59
59
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
@@ -79,7 +79,7 @@ __p += '`),xt&&(we+=`' +
79
79
  function print() { __p += __j.call(arguments, '') }
80
80
  `:`;
81
81
  `)+we+`return __p
82
- }`;var dt=e1(function(){return wt(F,Ke+"return "+we).apply(n,q)});if(dt.source=we,_y(dt))throw dt;return dt}function cR(u){return At(u).toLowerCase()}function fR(u){return At(u).toUpperCase()}function dR(u,f,y){if(u=At(u),u&&(y||f===n))return Zh(u);if(!u||!(f=vr(f)))return u;var E=_r(u),I=_r(f),F=em(E,I),q=fd(E,I)+1;return bo(E,F,q).join("")}function pR(u,f,y){if(u=At(u),u&&(y||f===n))return u.slice(0,Ju(u)+1);if(!u||!(f=vr(f)))return u;var E=_r(u),I=fd(E,_r(f))+1;return bo(E,0,I).join("")}function hR(u,f,y){if(u=At(u),u&&(y||f===n))return u.replace(dl,"");if(!u||!(f=vr(f)))return u;var E=_r(u),I=em(E,_r(f));return bo(E,I).join("")}function mR(u,f){var y=B,E=W;if(fn(f)){var I="separator"in f?f.separator:I;y="length"in f?ct(f.length):y,E="omission"in f?vr(f.omission):E}u=At(u);var F=u.length;if(ya(u)){var q=_r(u);F=q.length}if(y>=F)return u;var Z=y-Cs(E);if(Z<1)return E;var se=q?bo(q,0,Z).join(""):u.slice(0,Z);if(I===n)return se+E;if(q&&(Z+=se.length-Z),Iy(I)){if(u.slice(Z).search(I)){var ge,ve=se;for(I.global||(I=Sl(I.source,At(so.exec(I))+"g")),I.lastIndex=0;ge=I.exec(ve);)var we=ge.index;se=se.slice(0,we===n?Z:we)}}else if(u.indexOf(vr(I),Z)!=Z){var $e=se.lastIndexOf(I);$e>-1&&(se=se.slice(0,$e))}return se+E}function gR(u){return u=At(u),u&&ul.test(u)?u.replace(di,om):u}var vR=Fs(function(u,f,y){return u+(y?" ":"")+f.toUpperCase()}),Ry=Fd("toUpperCase");function Zw(u,f,y){return u=At(u),f=y?n:f,f===n?Zv(u)?ry(u):Xv(u):u.match(f)||[]}var e1=ut(function(u,f){try{return rr(u,n,f)}catch(y){return _y(y)?y:new rt(y)}}),yR=Gi(function(u,f){return Vn(f,function(y){y=wi(y),ji(u,y,ke(u[y],u))}),u});function bR(u){var f=u==null?0:u.length,y=qe();return u=f?Lt(u,function(E){if(typeof E[1]!="function")throw new Kr(a);return[y(E[0]),E[1]]}):[],ut(function(E){for(var I=-1;++I<f;){var F=u[I];if(rr(F[0],this,E))return rr(F[1],this,E)}})}function xR(u){return bm(gr(u,g))}function Ly(u){return function(){return u}}function wR(u,f){return u==null||u!==u?f:u}var SR=Ac(),kR=Ac(!0);function ri(u){return u}function My(u){return La(typeof u=="function"?u:gr(u,g))}function CR(u){return xc(gr(u,g))}function ER(u,f){return qt(u,gr(f,g))}var PR=ut(function(u,f){return function(y){return Yr(y,u,f)}}),TR=ut(function(u,f){return function(y){return Yr(u,y,f)}});function Dy(u,f,y){var E=Xn(f),I=Aa(f,E);y==null&&!(fn(f)&&(I.length||!E.length))&&(y=f,f=u,u=this,I=Aa(f,Xn(f)));var F=!(fn(y)&&"chain"in y)||!!y.chain,q=Ws(u);return Vn(I,function(Z){var se=f[Z];u[Z]=se,q&&(u.prototype[Z]=function(){var ge=this.__chain__;if(F||ge){var ve=u(this.__wrapped__),we=ve.__actions__=or(this.__actions__);return we.push({func:se,args:arguments,thisArg:u}),ve.__chain__=ge,ve}return se.apply(u,Oo([this.value()],arguments))})}),u}function _R(){return Gt._===this&&(Gt._=lm),this}function Ny(){}function IR(u){return u=ct(u),ut(function(f){return wc(f,u)})}var $R=Rc(Lt),AR=Rc(rd),RR=Rc(sd);function t1(u){return Me(u)?ld(wi(u)):en(u)}function LR(u){return function(f){return u==null?n:ho(u,f)}}var MR=zd(),DR=zd(!0);function Fy(){return[]}function Oy(){return!1}function NR(){return{}}function FR(){return""}function OR(){return!0}function zR(u,f){if(u=ct(u),u<1||u>V)return[];var y=U,E=Un(u,U);f=qe(f),u-=U;for(var I=cd(E,f);++y<u;)f(y);return I}function jR(u){return st(u)?Lt(u,wi):Ci(u)?[u]:or(Qd(At(u)))}function BR(u){var f=++wa;return At(u)+f}var VR=Ul(function(u,f){return u+f},0),UR=Nn("ceil"),KR=Ul(function(u,f){return u/f},1),WR=Nn("floor");function HR(u){return u&&u.length?Rs(u,ri,Go):n}function GR(u,f){return u&&u.length?Rs(u,qe(f,2),Go):n}function qR(u){return Qh(u,ri)}function YR(u,f){return Qh(u,qe(f,2))}function XR(u){return u&&u.length?Rs(u,ri,qo):n}function QR(u,f){return u&&u.length?Rs(u,qe(f,2),qo):n}var JR=Ul(function(u,f){return u*f},1),ZR=Nn("round"),eL=Ul(function(u,f){return u-f},0);function tL(u){return u&&u.length?ud(u,ri):0}function nL(u,f){return u&&u.length?ud(u,qe(f,2)):0}return N.after=Q,N.ary=de,N.assign=fA,N.assignIn=Hw,N.assignInWith=rg,N.assignWith=dA,N.at=pA,N.before=xe,N.bind=ke,N.bindAll=yR,N.bindKey=be,N.castArray=N$,N.chain=qc,N.chunk=jc,N.compact=Jd,N.concat=Zr,N.cond=bR,N.conforms=xR,N.constant=Ly,N.countBy=Xm,N.create=hA,N.curry=Le,N.curryRight=De,N.debounce=Fe,N.defaults=mA,N.defaultsDeep=gA,N.defer=cn,N.delay=ue,N.difference=bt,N.differenceBy=In,N.differenceWith=mn,N.drop=zn,N.dropRight=Lr,N.dropRightWhile=Ka,N.dropWhile=xn,N.fill=Jl,N.filter=Qc,N.flatMap=cp,N.flatMapDeep=ky,N.flatMapDepth=Zm,N.flatten=Bc,N.flattenDeep=eu,N.flattenDepth=yr,N.flip=ne,N.flow=SR,N.flowRight=kR,N.fromPairs=Zd,N.functions=kA,N.functionsIn=CA,N.groupBy=fp,N.initial=Vc,N.intersection=ep,N.intersectionBy=Zo,N.intersectionWith=Uc,N.invert=PA,N.invertBy=TA,N.invokeMap=eg,N.iteratee=My,N.keyBy=Cy,N.keys=Xn,N.keysIn=ni,N.map=Ks,N.mapKeys=IA,N.mapValues=$A,N.matches=CR,N.matchesProperty=ER,N.memoize=ce,N.merge=AA,N.mergeWith=Gw,N.method=PR,N.methodOf=TR,N.mixin=Dy,N.negate=Ee,N.nthArg=IR,N.omit=RA,N.omitBy=LA,N.once=Ve,N.orderBy=Ey,N.over=$R,N.overArgs=Ge,N.overEvery=AR,N.overSome=RR,N.partial=We,N.partialRight=Je,N.partition=iu,N.pick=MA,N.pickBy=qw,N.property=t1,N.propertyOf=LR,N.pull=Kc,N.pullAll=nu,N.pullAllBy=ur,N.pullAllWith=ts,N.pullAt=Si,N.range=MR,N.rangeRight=DR,N.rearg=$n,N.reject=o,N.remove=br,N.rest=kt,N.reverse=Wc,N.sampleSize=p,N.set=NA,N.setWith=FA,N.shuffle=v,N.slice=np,N.sortBy=R,N.sortedUniq=op,N.sortedUniqBy=Bs,N.split=sR,N.spread=rs,N.tail=Um,N.take=Km,N.takeRight=sp,N.takeRightWhile=Hc,N.takeWhile=py,N.tap=xy,N.throttle=Ty,N.thru=ki,N.toArray=Uw,N.toPairs=Yw,N.toPairsIn=Xw,N.toPath=jR,N.toPlainObject=Ww,N.transform=OA,N.unary=M$,N.union=hy,N.unionBy=Wm,N.unionWith=Hm,N.uniq=Vs,N.uniqBy=my,N.uniqWith=Wa,N.unset=zA,N.unzip=Gc,N.unzipWith=tn,N.update=jA,N.updateWith=BA,N.values=rf,N.valuesIn=VA,N.without=gy,N.words=Zw,N.wrap=D$,N.xor=Gm,N.xorBy=vy,N.xorWith=yy,N.zip=qm,N.zipObject=Ym,N.zipObjectDeep=by,N.zipWith=ei,N.entries=Yw,N.entriesIn=Xw,N.extend=Hw,N.extendWith=rg,Dy(N,N),N.add=VR,N.attempt=e1,N.camelCase=HA,N.capitalize=Qw,N.ceil=UR,N.clamp=UA,N.clone=F$,N.cloneDeep=z$,N.cloneDeepWith=j$,N.cloneWith=O$,N.conformsTo=B$,N.deburr=Jw,N.defaultTo=wR,N.divide=KR,N.endsWith=GA,N.eq=ko,N.escape=qA,N.escapeRegExp=YA,N.every=Qm,N.find=Jc,N.findIndex=Jo,N.findKey=vA,N.findLast=Jm,N.findLastIndex=Zl,N.findLastKey=yA,N.floor=WR,N.forEach=Zc,N.forEachRight=ru,N.forIn=bA,N.forInRight=xA,N.forOwn=wA,N.forOwnRight=SA,N.get=$y,N.gt=V$,N.gte=U$,N.has=EA,N.hasIn=Ay,N.head=zs,N.identity=ri,N.includes=ef,N.indexOf=So,N.inRange=KA,N.invoke=_A,N.isArguments=ou,N.isArray=st,N.isArrayBuffer=K$,N.isArrayLike=ti,N.isArrayLikeObject=wn,N.isBoolean=W$,N.isBuffer=Ha,N.isDate=H$,N.isElement=G$,N.isEmpty=q$,N.isEqual=Y$,N.isEqualWith=X$,N.isError=_y,N.isFinite=Q$,N.isFunction=Ws,N.isInteger=zw,N.isLength=tg,N.isMap=jw,N.isMatch=J$,N.isMatchWith=Z$,N.isNaN=eA,N.isNative=tA,N.isNil=rA,N.isNull=nA,N.isNumber=Bw,N.isObject=fn,N.isObjectLike=gn,N.isPlainObject=dp,N.isRegExp=Iy,N.isSafeInteger=iA,N.isSet=Vw,N.isString=ng,N.isSymbol=Ci,N.isTypedArray=nf,N.isUndefined=oA,N.isWeakMap=sA,N.isWeakSet=aA,N.join=es,N.kebabCase=XA,N.last=lr,N.lastIndexOf=tu,N.lowerCase=QA,N.lowerFirst=JA,N.lt=lA,N.lte=uA,N.max=HR,N.maxBy=GR,N.mean=qR,N.meanBy=YR,N.min=XR,N.minBy=QR,N.stubArray=Fy,N.stubFalse=Oy,N.stubObject=NR,N.stubString=FR,N.stubTrue=OR,N.multiply=JR,N.nth=tp,N.noConflict=_R,N.noop=Ny,N.now=K,N.pad=ZA,N.padEnd=eR,N.padStart=tR,N.parseInt=nR,N.random=WA,N.reduce=Py,N.reduceRight=tf,N.repeat=rR,N.replace=iR,N.result=DA,N.round=ZR,N.runInContext=re,N.sample=l,N.size=w,N.snakeCase=oR,N.some=C,N.sortedIndex=rp,N.sortedIndexBy=dy,N.sortedIndexOf=ns,N.sortedLastIndex=Vm,N.sortedLastIndexBy=ip,N.sortedLastIndexOf=js,N.startCase=aR,N.startsWith=lR,N.subtract=eL,N.sum=tL,N.sumBy=nL,N.template=uR,N.times=zR,N.toFinite=Hs,N.toInteger=ct,N.toLength=Kw,N.toLower=cR,N.toNumber=Yi,N.toSafeInteger=cA,N.toString=At,N.toUpper=fR,N.trim=dR,N.trimEnd=pR,N.trimStart=hR,N.truncate=mR,N.unescape=gR,N.uniqueId=BR,N.upperCase=vR,N.upperFirst=Ry,N.each=Zc,N.eachRight=ru,N.first=zs,Dy(N,function(){var u={};return Ar(N,function(f,y){St.call(N.prototype,y)||(u[y]=f)}),u}(),{chain:!1}),N.VERSION=r,Vn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){N[u].placeholder=N}),Vn(["drop","take"],function(u,f){ot.prototype[u]=function(y){y=y===n?1:hn(ct(y),0);var E=this.__filtered__&&!f?new ot(this):this.clone();return E.__filtered__?E.__takeCount__=Un(y,E.__takeCount__):E.__views__.push({size:Un(y,U),type:u+(E.__dir__<0?"Right":"")}),E},ot.prototype[u+"Right"]=function(y){return this.reverse()[u](y).reverse()}}),Vn(["filter","map","takeWhile"],function(u,f){var y=f+1,E=y==H||y==J;ot.prototype[u]=function(I){var F=this.clone();return F.__iteratees__.push({iteratee:qe(I,3),type:y}),F.__filtered__=F.__filtered__||E,F}}),Vn(["head","last"],function(u,f){var y="take"+(f?"Right":"");ot.prototype[u]=function(){return this[y](1).value()[0]}}),Vn(["initial","tail"],function(u,f){var y="drop"+(f?"":"Right");ot.prototype[u]=function(){return this.__filtered__?new ot(this):this[y](1)}}),ot.prototype.compact=function(){return this.filter(ri)},ot.prototype.find=function(u){return this.filter(u).head()},ot.prototype.findLast=function(u){return this.reverse().find(u)},ot.prototype.invokeMap=ut(function(u,f){return typeof u=="function"?new ot(this):this.map(function(y){return Yr(y,u,f)})}),ot.prototype.reject=function(u){return this.filter(Ee(qe(u)))},ot.prototype.slice=function(u,f){u=ct(u);var y=this;return y.__filtered__&&(u>0||f<0)?new ot(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),f!==n&&(f=ct(f),y=f<0?y.dropRight(-f):y.take(f-u)),y)},ot.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},ot.prototype.toArray=function(){return this.take(U)},Ar(ot.prototype,function(u,f){var y=/^(?:filter|find|map|reject)|While$/.test(f),E=/^(?:head|last)$/.test(f),I=N[E?"take"+(f=="last"?"Right":""):f],F=E||/^find/.test(f);I&&(N.prototype[f]=function(){var q=this.__wrapped__,Z=E?[1]:arguments,se=q instanceof ot,ge=Z[0],ve=se||st(q),we=function(gt){var xt=I.apply(N,Oo([gt],Z));return E&&$e?xt[0]:xt};ve&&y&&typeof ge=="function"&&ge.length!=1&&(se=ve=!1);var $e=this.__chain__,Ke=!!this.__actions__.length,Ze=F&&!$e,dt=se&&!Ke;if(!F&&ve){q=dt?q:new ot(this);var et=u.apply(q,Z);return et.__actions__.push({func:ki,args:[we],thisArg:n}),new Kn(et,$e)}return Ze&&dt?u.apply(this,Z):(et=this.thru(we),Ze?E?et.value()[0]:et.value():et)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(u){var f=lo[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",E=/^(?:pop|shift)$/.test(u);N.prototype[u]=function(){var I=arguments;if(E&&!this.__chain__){var F=this.value();return f.apply(st(F)?F:[],I)}return this[y](function(q){return f.apply(st(q)?q:[],I)})}}),Ar(ot.prototype,function(u,f){var y=N[f];if(y){var E=y.name+"";St.call(Ea,E)||(Ea[E]=[]),Ea[E].push({name:f,func:y})}}),Ea[ja(n,_).name]=[{name:"wrapper",func:n}],ot.prototype.clone=uc,ot.prototype.reverse=yd,ot.prototype.value=_a,N.prototype.at=Yc,N.prototype.chain=Us,N.prototype.commit=Xc,N.prototype.next=ap,N.prototype.plant=wy,N.prototype.reverse=up,N.prototype.toJSON=N.prototype.valueOf=N.prototype.value=Sy,N.prototype.first=N.prototype.head,co&&(N.prototype[co]=lp),N},ba=iy();Mi?((Mi.exports=ba)._=ba,xl._=ba):Gt._=ba}).call(n7)}(Lp,Lp.exports)),Lp.exports}var L2=r7();class i7{plugins={};activePlugins=[];listeners=new Set;register(t){this.plugins[t.name]={isActivated:!1,config:t},this.notify()}activate(t){const n=this.plugins[t];!n||n.isActivated||(n.isActivated=!0,n.config.onActivate&&n.config.onActivate(),this.produceActivePlugins(),this.notify())}deactivate(t){const n=this.plugins[t];!n||!n.isActivated||(n.isActivated=!1,n.config.onDeactivate&&n.config.onDeactivate(),this.produceActivePlugins(),this.notify())}isPluginActivated(t){const n=this.plugins[t];return!!n&&n.isActivated}getPlugin(t){const n=this.plugins[t];return!n||!n.isActivated?null:n}getActivePlugins(){return this.activePlugins}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}produceActivePlugins(){this.activePlugins=L2.transform(this.plugins,(t,n)=>{n.isActivated&&t.push(n.config)},[])}}const xr=new i7;const M2="FeedbackFormPlugin",D2={name:M2,components:{FeedbackForm:S.lazy(()=>io(()=>import("./FeedbackForm-BW_PtJr5.js"),__vite__mapDeps([0,1,2,3,4,5,6])))}},N2="ChatOptionsPlugin",F2={name:N2,components:{ChatOptionsForm:S.lazy(()=>io(()=>import("./ChatOptionsForm-Db-m9ZpY.js"),__vite__mapDeps([7,1,2,3,4,5,6])))}},O2=S.createContext(void 0),z2="SharePluginName",j2={name:z2,components:{ShareButton:S.lazy(()=>io(()=>import("./ShareButton--44vJ5JO.js"),__vite__mapDeps([8,6])))}},nC=e=>{let t;const n=new Set,r=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const b=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(x=>x(t,b))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,i,c);return c},rC=e=>e?nC(e):nC,o7=e=>e;function B2(e,t=o7){const n=He.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return He.useDebugValue(n),n}const cr=[];for(let e=0;e<256;++e)cr.push((e+256).toString(16).slice(1));function s7(e,t=0){return(cr[e[t+0]]+cr[e[t+1]]+cr[e[t+2]]+cr[e[t+3]]+"-"+cr[e[t+4]]+cr[e[t+5]]+"-"+cr[e[t+6]]+cr[e[t+7]]+"-"+cr[e[t+8]]+cr[e[t+9]]+"-"+cr[e[t+10]]+cr[e[t+11]]+cr[e[t+12]]+cr[e[t+13]]+cr[e[t+14]]+cr[e[t+15]]).toLowerCase()}let w0;const a7=new Uint8Array(16);function l7(){if(!w0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");w0=crypto.getRandomValues.bind(crypto)}return w0(a7)}const u7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),iC={randomUUID:u7};function V2(e,t,n){if(iC.randomUUID&&!e)return iC.randomUUID();e=e||{};const r=e.random??e.rng?.()??l7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,s7(r)}function oC(e){return Object.values(e).map(t=>({role:t.role,content:t.content,extra:t.extra||null}))}var U2=Symbol.for("immer-nothing"),sC=Symbol.for("immer-draftable"),Ai=Symbol.for("immer-state");function _o(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Lf=Object.getPrototypeOf;function Mf(e){return!!e&&!!e[Ai]}function Tu(e){return e?K2(e)||Array.isArray(e)||!!e[sC]||!!e.constructor?.[sC]||Pv(e)||Tv(e):!1}var c7=Object.prototype.constructor.toString();function K2(e){if(!e||typeof e!="object")return!1;const t=Lf(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===c7}function rv(e,t){Ev(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ev(e){const t=e[Ai];return t?t.type_:Array.isArray(e)?1:Pv(e)?2:Tv(e)?3:0}function Fb(e,t){return Ev(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function W2(e,t,n){const r=Ev(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function f7(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Pv(e){return e instanceof Map}function Tv(e){return e instanceof Set}function hu(e){return e.copy_||e.base_}function Ob(e,t){if(Pv(e))return new Map(e);if(Tv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=K2(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ai];let i=Reflect.ownKeys(r);for(let s=0;s<i.length;s++){const a=i[s],c=r[a];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[a]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[a]})}return Object.create(Lf(e),r)}else{const r=Lf(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function aw(e,t=!1){return _v(e)||Mf(e)||!Tu(e)||(Ev(e)>1&&(e.set=e.add=e.clear=e.delete=d7),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>aw(r,!0))),e}function d7(){_o(2)}function _v(e){return Object.isFrozen(e)}var p7={};function _u(e){const t=p7[e];return t||_o(0,e),t}var lh;function H2(){return lh}function h7(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function aC(e,t){t&&(_u("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zb(e){jb(e),e.drafts_.forEach(m7),e.drafts_=null}function jb(e){e===lh&&(lh=e.parent_)}function lC(e){return lh=h7(lh,e)}function m7(e){const t=e[Ai];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function uC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ai].modified_&&(zb(t),_o(4)),Tu(e)&&(e=iv(t,e),t.parent_||ov(t,e)),t.patches_&&_u("Patches").generateReplacementPatches_(n[Ai].base_,e,t.patches_,t.inversePatches_)):e=iv(t,n,[]),zb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==U2?e:void 0}function iv(e,t,n){if(_v(t))return t;const r=t[Ai];if(!r)return rv(t,(i,s)=>cC(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ov(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,a=!1;r.type_===3&&(s=new Set(i),i.clear(),a=!0),rv(s,(c,d)=>cC(e,r,i,c,d,n,a)),ov(e,i,!1),n&&e.patches_&&_u("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function cC(e,t,n,r,i,s,a){if(Mf(i)){const c=s&&t&&t.type_!==3&&!Fb(t.assigned_,r)?s.concat(r):void 0,d=iv(e,i,c);if(W2(n,r,d),Mf(d))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(Tu(i)&&!_v(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;iv(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ov(e,i)}}function ov(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&aw(t,n)}function g7(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:H2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=lw;n&&(i=[r],s=uh);const{revoke:a,proxy:c}=Proxy.revocable(i,s);return r.draft_=c,r.revoke_=a,c}var lw={get(e,t){if(t===Ai)return e;const n=hu(e);if(!Fb(n,t))return v7(e,n,t);const r=n[t];return e.finalized_||!Tu(r)?r:r===S0(e.base_,t)?(k0(e),e.copy_[t]=Vb(r,e)):r},has(e,t){return t in hu(e)},ownKeys(e){return Reflect.ownKeys(hu(e))},set(e,t,n){const r=G2(hu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=S0(hu(e),t),s=i?.[Ai];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(f7(n,i)&&(n!==void 0||Fb(e.base_,t)))return!0;k0(e),Bb(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return S0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,k0(e),Bb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=hu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){_o(11)},getPrototypeOf(e){return Lf(e.base_)},setPrototypeOf(){_o(12)}},uh={};rv(lw,(e,t)=>{uh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});uh.deleteProperty=function(e,t){return uh.set.call(this,e,t,void 0)};uh.set=function(e,t,n){return lw.set.call(this,e[0],t,n,e[0])};function S0(e,t){const n=e[Ai];return(n?hu(n):e)[t]}function v7(e,t,n){const r=G2(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function G2(e,t){if(!(t in e))return;let n=Lf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Lf(n)}}function Bb(e){e.modified_||(e.modified_=!0,e.parent_&&Bb(e.parent_))}function k0(e){e.copy_||(e.copy_=Ob(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var y7=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(d=s,...h){return a.produce(d,m=>n.call(this,m,...h))}}typeof n!="function"&&_o(6),r!==void 0&&typeof r!="function"&&_o(7);let i;if(Tu(t)){const s=lC(this),a=Vb(t,void 0);let c=!0;try{i=n(a),c=!1}finally{c?zb(s):jb(s)}return aC(s,r),uC(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===U2&&(i=void 0),this.autoFreeze_&&aw(i,!0),r){const s=[],a=[];_u("Patches").generateReplacementPatches_(t,i,s,a),r(s,a)}return i}else _o(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,d=>t(d,...c));let r,i;return[this.produce(t,n,(a,c)=>{r=a,i=c}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Tu(e)||_o(8),Mf(e)&&(e=b7(e));const t=lC(this),n=Vb(e,void 0);return n[Ai].isManual_=!0,jb(t),n}finishDraft(e,t){const n=e&&e[Ai];(!n||!n.isManual_)&&_o(9);const{scope_:r}=n;return aC(r,t),uC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=_u("Patches").applyPatches_;return Mf(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Vb(e,t){const n=Pv(e)?_u("MapSet").proxyMap_(e,t):Tv(e)?_u("MapSet").proxySet_(e,t):g7(e,t);return(t?t.scope_:H2()).drafts_.push(n),n}function b7(e){return Mf(e)||_o(10,e),q2(e)}function q2(e){if(!Tu(e)||_v(e))return e;const t=e[Ai];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ob(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ob(e,!0);return rv(n,(r,i)=>{W2(n,r,q2(i))}),t&&(t.finalized_=!1),n}var Ri=new y7,kh=Ri.produce;Ri.produceWithPatches.bind(Ri);Ri.setAutoFreeze.bind(Ri);Ri.setUseStrictShallowCopy.bind(Ri);Ri.applyPatches.bind(Ri);Ri.createDraft.bind(Ri);Ri.finishDraft.bind(Ri);const x7=e=>(t,n,r)=>(r.setState=(i,s,...a)=>{const c=typeof i=="function"?kh(i):i;return t(c,s,...a)},e(r.setState,n,r)),w7=x7,S7=({content:e},t)=>{t.serverState=e},k7=({content:e},t,n)=>{const r=n.conversationIdRef.current;return t.conversationId=e.conversation_id,n.conversationIdRef.current=e.conversation_id,{originalConversationId:r}},C7=(e,t,{originalConversationId:n,conversationIdRef:r})=>{const i=t.conversations[n];if(!i)throw new Error("Received events for non-existent conversation");t.conversations[r.current]=i,t.currentConversation===n&&(t.currentConversation=r.current),delete t.conversations[n]},E7=({content:e},t)=>{t.followupMessages=e.messages},P7=({content:e},t)=>{t.summary=e.summary},T7=(e,t,n)=>{const r=t.history[n.messageId];r.hasConfirmationBreak&&(r.hasConfirmationBreak=!1,r.content.endsWith(`
82
+ }`;var dt=e1(function(){return wt(F,Ke+"return "+we).apply(n,q)});if(dt.source=we,_y(dt))throw dt;return dt}function cR(u){return At(u).toLowerCase()}function fR(u){return At(u).toUpperCase()}function dR(u,f,y){if(u=At(u),u&&(y||f===n))return Zh(u);if(!u||!(f=vr(f)))return u;var E=_r(u),I=_r(f),F=em(E,I),q=fd(E,I)+1;return bo(E,F,q).join("")}function pR(u,f,y){if(u=At(u),u&&(y||f===n))return u.slice(0,Ju(u)+1);if(!u||!(f=vr(f)))return u;var E=_r(u),I=fd(E,_r(f))+1;return bo(E,0,I).join("")}function hR(u,f,y){if(u=At(u),u&&(y||f===n))return u.replace(dl,"");if(!u||!(f=vr(f)))return u;var E=_r(u),I=em(E,_r(f));return bo(E,I).join("")}function mR(u,f){var y=B,E=W;if(fn(f)){var I="separator"in f?f.separator:I;y="length"in f?ct(f.length):y,E="omission"in f?vr(f.omission):E}u=At(u);var F=u.length;if(ya(u)){var q=_r(u);F=q.length}if(y>=F)return u;var Z=y-Cs(E);if(Z<1)return E;var se=q?bo(q,0,Z).join(""):u.slice(0,Z);if(I===n)return se+E;if(q&&(Z+=se.length-Z),Iy(I)){if(u.slice(Z).search(I)){var ge,ve=se;for(I.global||(I=Sl(I.source,At(so.exec(I))+"g")),I.lastIndex=0;ge=I.exec(ve);)var we=ge.index;se=se.slice(0,we===n?Z:we)}}else if(u.indexOf(vr(I),Z)!=Z){var $e=se.lastIndexOf(I);$e>-1&&(se=se.slice(0,$e))}return se+E}function gR(u){return u=At(u),u&&ul.test(u)?u.replace(di,om):u}var vR=Fs(function(u,f,y){return u+(y?" ":"")+f.toUpperCase()}),Ry=Fd("toUpperCase");function Zw(u,f,y){return u=At(u),f=y?n:f,f===n?Zv(u)?ry(u):Xv(u):u.match(f)||[]}var e1=ut(function(u,f){try{return rr(u,n,f)}catch(y){return _y(y)?y:new rt(y)}}),yR=Gi(function(u,f){return Vn(f,function(y){y=wi(y),ji(u,y,ke(u[y],u))}),u});function bR(u){var f=u==null?0:u.length,y=qe();return u=f?Lt(u,function(E){if(typeof E[1]!="function")throw new Kr(a);return[y(E[0]),E[1]]}):[],ut(function(E){for(var I=-1;++I<f;){var F=u[I];if(rr(F[0],this,E))return rr(F[1],this,E)}})}function xR(u){return bm(gr(u,g))}function Ly(u){return function(){return u}}function wR(u,f){return u==null||u!==u?f:u}var SR=Ac(),kR=Ac(!0);function ri(u){return u}function My(u){return La(typeof u=="function"?u:gr(u,g))}function CR(u){return xc(gr(u,g))}function ER(u,f){return qt(u,gr(f,g))}var PR=ut(function(u,f){return function(y){return Yr(y,u,f)}}),TR=ut(function(u,f){return function(y){return Yr(u,y,f)}});function Dy(u,f,y){var E=Xn(f),I=Aa(f,E);y==null&&!(fn(f)&&(I.length||!E.length))&&(y=f,f=u,u=this,I=Aa(f,Xn(f)));var F=!(fn(y)&&"chain"in y)||!!y.chain,q=Ws(u);return Vn(I,function(Z){var se=f[Z];u[Z]=se,q&&(u.prototype[Z]=function(){var ge=this.__chain__;if(F||ge){var ve=u(this.__wrapped__),we=ve.__actions__=or(this.__actions__);return we.push({func:se,args:arguments,thisArg:u}),ve.__chain__=ge,ve}return se.apply(u,Oo([this.value()],arguments))})}),u}function _R(){return Gt._===this&&(Gt._=lm),this}function Ny(){}function IR(u){return u=ct(u),ut(function(f){return wc(f,u)})}var $R=Rc(Lt),AR=Rc(rd),RR=Rc(sd);function t1(u){return Me(u)?ld(wi(u)):en(u)}function LR(u){return function(f){return u==null?n:ho(u,f)}}var MR=zd(),DR=zd(!0);function Fy(){return[]}function Oy(){return!1}function NR(){return{}}function FR(){return""}function OR(){return!0}function zR(u,f){if(u=ct(u),u<1||u>V)return[];var y=U,E=Un(u,U);f=qe(f),u-=U;for(var I=cd(E,f);++y<u;)f(y);return I}function jR(u){return st(u)?Lt(u,wi):Ci(u)?[u]:or(Qd(At(u)))}function BR(u){var f=++wa;return At(u)+f}var VR=Ul(function(u,f){return u+f},0),UR=Nn("ceil"),KR=Ul(function(u,f){return u/f},1),WR=Nn("floor");function HR(u){return u&&u.length?Rs(u,ri,Go):n}function GR(u,f){return u&&u.length?Rs(u,qe(f,2),Go):n}function qR(u){return Qh(u,ri)}function YR(u,f){return Qh(u,qe(f,2))}function XR(u){return u&&u.length?Rs(u,ri,qo):n}function QR(u,f){return u&&u.length?Rs(u,qe(f,2),qo):n}var JR=Ul(function(u,f){return u*f},1),ZR=Nn("round"),eL=Ul(function(u,f){return u-f},0);function tL(u){return u&&u.length?ud(u,ri):0}function nL(u,f){return u&&u.length?ud(u,qe(f,2)):0}return N.after=Q,N.ary=de,N.assign=fA,N.assignIn=Hw,N.assignInWith=rg,N.assignWith=dA,N.at=pA,N.before=xe,N.bind=ke,N.bindAll=yR,N.bindKey=be,N.castArray=N$,N.chain=qc,N.chunk=jc,N.compact=Jd,N.concat=Zr,N.cond=bR,N.conforms=xR,N.constant=Ly,N.countBy=Xm,N.create=hA,N.curry=Le,N.curryRight=De,N.debounce=Fe,N.defaults=mA,N.defaultsDeep=gA,N.defer=cn,N.delay=ue,N.difference=bt,N.differenceBy=In,N.differenceWith=mn,N.drop=zn,N.dropRight=Lr,N.dropRightWhile=Ka,N.dropWhile=xn,N.fill=Jl,N.filter=Qc,N.flatMap=cp,N.flatMapDeep=ky,N.flatMapDepth=Zm,N.flatten=Bc,N.flattenDeep=eu,N.flattenDepth=yr,N.flip=ne,N.flow=SR,N.flowRight=kR,N.fromPairs=Zd,N.functions=kA,N.functionsIn=CA,N.groupBy=fp,N.initial=Vc,N.intersection=ep,N.intersectionBy=Zo,N.intersectionWith=Uc,N.invert=PA,N.invertBy=TA,N.invokeMap=eg,N.iteratee=My,N.keyBy=Cy,N.keys=Xn,N.keysIn=ni,N.map=Ks,N.mapKeys=IA,N.mapValues=$A,N.matches=CR,N.matchesProperty=ER,N.memoize=ce,N.merge=AA,N.mergeWith=Gw,N.method=PR,N.methodOf=TR,N.mixin=Dy,N.negate=Ee,N.nthArg=IR,N.omit=RA,N.omitBy=LA,N.once=Ve,N.orderBy=Ey,N.over=$R,N.overArgs=Ge,N.overEvery=AR,N.overSome=RR,N.partial=We,N.partialRight=Je,N.partition=iu,N.pick=MA,N.pickBy=qw,N.property=t1,N.propertyOf=LR,N.pull=Kc,N.pullAll=nu,N.pullAllBy=ur,N.pullAllWith=ts,N.pullAt=Si,N.range=MR,N.rangeRight=DR,N.rearg=$n,N.reject=o,N.remove=br,N.rest=kt,N.reverse=Wc,N.sampleSize=p,N.set=NA,N.setWith=FA,N.shuffle=v,N.slice=np,N.sortBy=R,N.sortedUniq=op,N.sortedUniqBy=Bs,N.split=sR,N.spread=rs,N.tail=Um,N.take=Km,N.takeRight=sp,N.takeRightWhile=Hc,N.takeWhile=py,N.tap=xy,N.throttle=Ty,N.thru=ki,N.toArray=Uw,N.toPairs=Yw,N.toPairsIn=Xw,N.toPath=jR,N.toPlainObject=Ww,N.transform=OA,N.unary=M$,N.union=hy,N.unionBy=Wm,N.unionWith=Hm,N.uniq=Vs,N.uniqBy=my,N.uniqWith=Wa,N.unset=zA,N.unzip=Gc,N.unzipWith=tn,N.update=jA,N.updateWith=BA,N.values=rf,N.valuesIn=VA,N.without=gy,N.words=Zw,N.wrap=D$,N.xor=Gm,N.xorBy=vy,N.xorWith=yy,N.zip=qm,N.zipObject=Ym,N.zipObjectDeep=by,N.zipWith=ei,N.entries=Yw,N.entriesIn=Xw,N.extend=Hw,N.extendWith=rg,Dy(N,N),N.add=VR,N.attempt=e1,N.camelCase=HA,N.capitalize=Qw,N.ceil=UR,N.clamp=UA,N.clone=F$,N.cloneDeep=z$,N.cloneDeepWith=j$,N.cloneWith=O$,N.conformsTo=B$,N.deburr=Jw,N.defaultTo=wR,N.divide=KR,N.endsWith=GA,N.eq=ko,N.escape=qA,N.escapeRegExp=YA,N.every=Qm,N.find=Jc,N.findIndex=Jo,N.findKey=vA,N.findLast=Jm,N.findLastIndex=Zl,N.findLastKey=yA,N.floor=WR,N.forEach=Zc,N.forEachRight=ru,N.forIn=bA,N.forInRight=xA,N.forOwn=wA,N.forOwnRight=SA,N.get=$y,N.gt=V$,N.gte=U$,N.has=EA,N.hasIn=Ay,N.head=zs,N.identity=ri,N.includes=ef,N.indexOf=So,N.inRange=KA,N.invoke=_A,N.isArguments=ou,N.isArray=st,N.isArrayBuffer=K$,N.isArrayLike=ti,N.isArrayLikeObject=wn,N.isBoolean=W$,N.isBuffer=Ha,N.isDate=H$,N.isElement=G$,N.isEmpty=q$,N.isEqual=Y$,N.isEqualWith=X$,N.isError=_y,N.isFinite=Q$,N.isFunction=Ws,N.isInteger=zw,N.isLength=tg,N.isMap=jw,N.isMatch=J$,N.isMatchWith=Z$,N.isNaN=eA,N.isNative=tA,N.isNil=rA,N.isNull=nA,N.isNumber=Bw,N.isObject=fn,N.isObjectLike=gn,N.isPlainObject=dp,N.isRegExp=Iy,N.isSafeInteger=iA,N.isSet=Vw,N.isString=ng,N.isSymbol=Ci,N.isTypedArray=nf,N.isUndefined=oA,N.isWeakMap=sA,N.isWeakSet=aA,N.join=es,N.kebabCase=XA,N.last=lr,N.lastIndexOf=tu,N.lowerCase=QA,N.lowerFirst=JA,N.lt=lA,N.lte=uA,N.max=HR,N.maxBy=GR,N.mean=qR,N.meanBy=YR,N.min=XR,N.minBy=QR,N.stubArray=Fy,N.stubFalse=Oy,N.stubObject=NR,N.stubString=FR,N.stubTrue=OR,N.multiply=JR,N.nth=tp,N.noConflict=_R,N.noop=Ny,N.now=K,N.pad=ZA,N.padEnd=eR,N.padStart=tR,N.parseInt=nR,N.random=WA,N.reduce=Py,N.reduceRight=tf,N.repeat=rR,N.replace=iR,N.result=DA,N.round=ZR,N.runInContext=re,N.sample=l,N.size=w,N.snakeCase=oR,N.some=C,N.sortedIndex=rp,N.sortedIndexBy=dy,N.sortedIndexOf=ns,N.sortedLastIndex=Vm,N.sortedLastIndexBy=ip,N.sortedLastIndexOf=js,N.startCase=aR,N.startsWith=lR,N.subtract=eL,N.sum=tL,N.sumBy=nL,N.template=uR,N.times=zR,N.toFinite=Hs,N.toInteger=ct,N.toLength=Kw,N.toLower=cR,N.toNumber=Yi,N.toSafeInteger=cA,N.toString=At,N.toUpper=fR,N.trim=dR,N.trimEnd=pR,N.trimStart=hR,N.truncate=mR,N.unescape=gR,N.uniqueId=BR,N.upperCase=vR,N.upperFirst=Ry,N.each=Zc,N.eachRight=ru,N.first=zs,Dy(N,function(){var u={};return Ar(N,function(f,y){St.call(N.prototype,y)||(u[y]=f)}),u}(),{chain:!1}),N.VERSION=r,Vn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){N[u].placeholder=N}),Vn(["drop","take"],function(u,f){ot.prototype[u]=function(y){y=y===n?1:hn(ct(y),0);var E=this.__filtered__&&!f?new ot(this):this.clone();return E.__filtered__?E.__takeCount__=Un(y,E.__takeCount__):E.__views__.push({size:Un(y,U),type:u+(E.__dir__<0?"Right":"")}),E},ot.prototype[u+"Right"]=function(y){return this.reverse()[u](y).reverse()}}),Vn(["filter","map","takeWhile"],function(u,f){var y=f+1,E=y==H||y==J;ot.prototype[u]=function(I){var F=this.clone();return F.__iteratees__.push({iteratee:qe(I,3),type:y}),F.__filtered__=F.__filtered__||E,F}}),Vn(["head","last"],function(u,f){var y="take"+(f?"Right":"");ot.prototype[u]=function(){return this[y](1).value()[0]}}),Vn(["initial","tail"],function(u,f){var y="drop"+(f?"":"Right");ot.prototype[u]=function(){return this.__filtered__?new ot(this):this[y](1)}}),ot.prototype.compact=function(){return this.filter(ri)},ot.prototype.find=function(u){return this.filter(u).head()},ot.prototype.findLast=function(u){return this.reverse().find(u)},ot.prototype.invokeMap=ut(function(u,f){return typeof u=="function"?new ot(this):this.map(function(y){return Yr(y,u,f)})}),ot.prototype.reject=function(u){return this.filter(Ee(qe(u)))},ot.prototype.slice=function(u,f){u=ct(u);var y=this;return y.__filtered__&&(u>0||f<0)?new ot(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),f!==n&&(f=ct(f),y=f<0?y.dropRight(-f):y.take(f-u)),y)},ot.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},ot.prototype.toArray=function(){return this.take(U)},Ar(ot.prototype,function(u,f){var y=/^(?:filter|find|map|reject)|While$/.test(f),E=/^(?:head|last)$/.test(f),I=N[E?"take"+(f=="last"?"Right":""):f],F=E||/^find/.test(f);I&&(N.prototype[f]=function(){var q=this.__wrapped__,Z=E?[1]:arguments,se=q instanceof ot,ge=Z[0],ve=se||st(q),we=function(gt){var xt=I.apply(N,Oo([gt],Z));return E&&$e?xt[0]:xt};ve&&y&&typeof ge=="function"&&ge.length!=1&&(se=ve=!1);var $e=this.__chain__,Ke=!!this.__actions__.length,Ze=F&&!$e,dt=se&&!Ke;if(!F&&ve){q=dt?q:new ot(this);var et=u.apply(q,Z);return et.__actions__.push({func:ki,args:[we],thisArg:n}),new Kn(et,$e)}return Ze&&dt?u.apply(this,Z):(et=this.thru(we),Ze?E?et.value()[0]:et.value():et)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(u){var f=lo[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",E=/^(?:pop|shift)$/.test(u);N.prototype[u]=function(){var I=arguments;if(E&&!this.__chain__){var F=this.value();return f.apply(st(F)?F:[],I)}return this[y](function(q){return f.apply(st(q)?q:[],I)})}}),Ar(ot.prototype,function(u,f){var y=N[f];if(y){var E=y.name+"";St.call(Ea,E)||(Ea[E]=[]),Ea[E].push({name:f,func:y})}}),Ea[ja(n,_).name]=[{name:"wrapper",func:n}],ot.prototype.clone=uc,ot.prototype.reverse=yd,ot.prototype.value=_a,N.prototype.at=Yc,N.prototype.chain=Us,N.prototype.commit=Xc,N.prototype.next=ap,N.prototype.plant=wy,N.prototype.reverse=up,N.prototype.toJSON=N.prototype.valueOf=N.prototype.value=Sy,N.prototype.first=N.prototype.head,co&&(N.prototype[co]=lp),N},ba=iy();Mi?((Mi.exports=ba)._=ba,xl._=ba):Gt._=ba}).call(n7)}(Lp,Lp.exports)),Lp.exports}var L2=r7();class i7{plugins={};activePlugins=[];listeners=new Set;register(t){this.plugins[t.name]={isActivated:!1,config:t},this.notify()}activate(t){const n=this.plugins[t];!n||n.isActivated||(n.isActivated=!0,n.config.onActivate&&n.config.onActivate(),this.produceActivePlugins(),this.notify())}deactivate(t){const n=this.plugins[t];!n||!n.isActivated||(n.isActivated=!1,n.config.onDeactivate&&n.config.onDeactivate(),this.produceActivePlugins(),this.notify())}isPluginActivated(t){const n=this.plugins[t];return!!n&&n.isActivated}getPlugin(t){const n=this.plugins[t];return!n||!n.isActivated?null:n}getActivePlugins(){return this.activePlugins}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}produceActivePlugins(){this.activePlugins=L2.transform(this.plugins,(t,n)=>{n.isActivated&&t.push(n.config)},[])}}const xr=new i7;const M2="FeedbackFormPlugin",D2={name:M2,components:{FeedbackForm:S.lazy(()=>io(()=>import("./FeedbackForm-CmRSbYPS.js"),__vite__mapDeps([0,1,2,3,4,5,6])))}},N2="ChatOptionsPlugin",F2={name:N2,components:{ChatOptionsForm:S.lazy(()=>io(()=>import("./ChatOptionsForm-CNjzbIqN.js"),__vite__mapDeps([7,1,2,3,4,5,6])))}},O2=S.createContext(void 0),z2="SharePluginName",j2={name:z2,components:{ShareButton:S.lazy(()=>io(()=>import("./ShareButton-lYj0v67r.js"),__vite__mapDeps([8,6])))}},nC=e=>{let t;const n=new Set,r=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const b=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(x=>x(t,b))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,i,c);return c},rC=e=>e?nC(e):nC,o7=e=>e;function B2(e,t=o7){const n=He.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return He.useDebugValue(n),n}const cr=[];for(let e=0;e<256;++e)cr.push((e+256).toString(16).slice(1));function s7(e,t=0){return(cr[e[t+0]]+cr[e[t+1]]+cr[e[t+2]]+cr[e[t+3]]+"-"+cr[e[t+4]]+cr[e[t+5]]+"-"+cr[e[t+6]]+cr[e[t+7]]+"-"+cr[e[t+8]]+cr[e[t+9]]+"-"+cr[e[t+10]]+cr[e[t+11]]+cr[e[t+12]]+cr[e[t+13]]+cr[e[t+14]]+cr[e[t+15]]).toLowerCase()}let w0;const a7=new Uint8Array(16);function l7(){if(!w0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");w0=crypto.getRandomValues.bind(crypto)}return w0(a7)}const u7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),iC={randomUUID:u7};function V2(e,t,n){if(iC.randomUUID&&!e)return iC.randomUUID();e=e||{};const r=e.random??e.rng?.()??l7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,s7(r)}function oC(e){return Object.values(e).map(t=>({role:t.role,content:t.content,extra:t.extra||null}))}var U2=Symbol.for("immer-nothing"),sC=Symbol.for("immer-draftable"),Ai=Symbol.for("immer-state");function _o(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Lf=Object.getPrototypeOf;function Mf(e){return!!e&&!!e[Ai]}function Tu(e){return e?K2(e)||Array.isArray(e)||!!e[sC]||!!e.constructor?.[sC]||Pv(e)||Tv(e):!1}var c7=Object.prototype.constructor.toString();function K2(e){if(!e||typeof e!="object")return!1;const t=Lf(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===c7}function rv(e,t){Ev(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ev(e){const t=e[Ai];return t?t.type_:Array.isArray(e)?1:Pv(e)?2:Tv(e)?3:0}function Fb(e,t){return Ev(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function W2(e,t,n){const r=Ev(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function f7(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Pv(e){return e instanceof Map}function Tv(e){return e instanceof Set}function hu(e){return e.copy_||e.base_}function Ob(e,t){if(Pv(e))return new Map(e);if(Tv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=K2(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ai];let i=Reflect.ownKeys(r);for(let s=0;s<i.length;s++){const a=i[s],c=r[a];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[a]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[a]})}return Object.create(Lf(e),r)}else{const r=Lf(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function aw(e,t=!1){return _v(e)||Mf(e)||!Tu(e)||(Ev(e)>1&&(e.set=e.add=e.clear=e.delete=d7),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>aw(r,!0))),e}function d7(){_o(2)}function _v(e){return Object.isFrozen(e)}var p7={};function _u(e){const t=p7[e];return t||_o(0,e),t}var lh;function H2(){return lh}function h7(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function aC(e,t){t&&(_u("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zb(e){jb(e),e.drafts_.forEach(m7),e.drafts_=null}function jb(e){e===lh&&(lh=e.parent_)}function lC(e){return lh=h7(lh,e)}function m7(e){const t=e[Ai];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function uC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ai].modified_&&(zb(t),_o(4)),Tu(e)&&(e=iv(t,e),t.parent_||ov(t,e)),t.patches_&&_u("Patches").generateReplacementPatches_(n[Ai].base_,e,t.patches_,t.inversePatches_)):e=iv(t,n,[]),zb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==U2?e:void 0}function iv(e,t,n){if(_v(t))return t;const r=t[Ai];if(!r)return rv(t,(i,s)=>cC(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ov(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,a=!1;r.type_===3&&(s=new Set(i),i.clear(),a=!0),rv(s,(c,d)=>cC(e,r,i,c,d,n,a)),ov(e,i,!1),n&&e.patches_&&_u("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function cC(e,t,n,r,i,s,a){if(Mf(i)){const c=s&&t&&t.type_!==3&&!Fb(t.assigned_,r)?s.concat(r):void 0,d=iv(e,i,c);if(W2(n,r,d),Mf(d))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(Tu(i)&&!_v(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;iv(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ov(e,i)}}function ov(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&aw(t,n)}function g7(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:H2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=lw;n&&(i=[r],s=uh);const{revoke:a,proxy:c}=Proxy.revocable(i,s);return r.draft_=c,r.revoke_=a,c}var lw={get(e,t){if(t===Ai)return e;const n=hu(e);if(!Fb(n,t))return v7(e,n,t);const r=n[t];return e.finalized_||!Tu(r)?r:r===S0(e.base_,t)?(k0(e),e.copy_[t]=Vb(r,e)):r},has(e,t){return t in hu(e)},ownKeys(e){return Reflect.ownKeys(hu(e))},set(e,t,n){const r=G2(hu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=S0(hu(e),t),s=i?.[Ai];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(f7(n,i)&&(n!==void 0||Fb(e.base_,t)))return!0;k0(e),Bb(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return S0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,k0(e),Bb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=hu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){_o(11)},getPrototypeOf(e){return Lf(e.base_)},setPrototypeOf(){_o(12)}},uh={};rv(lw,(e,t)=>{uh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});uh.deleteProperty=function(e,t){return uh.set.call(this,e,t,void 0)};uh.set=function(e,t,n){return lw.set.call(this,e[0],t,n,e[0])};function S0(e,t){const n=e[Ai];return(n?hu(n):e)[t]}function v7(e,t,n){const r=G2(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function G2(e,t){if(!(t in e))return;let n=Lf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Lf(n)}}function Bb(e){e.modified_||(e.modified_=!0,e.parent_&&Bb(e.parent_))}function k0(e){e.copy_||(e.copy_=Ob(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var y7=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(d=s,...h){return a.produce(d,m=>n.call(this,m,...h))}}typeof n!="function"&&_o(6),r!==void 0&&typeof r!="function"&&_o(7);let i;if(Tu(t)){const s=lC(this),a=Vb(t,void 0);let c=!0;try{i=n(a),c=!1}finally{c?zb(s):jb(s)}return aC(s,r),uC(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===U2&&(i=void 0),this.autoFreeze_&&aw(i,!0),r){const s=[],a=[];_u("Patches").generateReplacementPatches_(t,i,s,a),r(s,a)}return i}else _o(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,d=>t(d,...c));let r,i;return[this.produce(t,n,(a,c)=>{r=a,i=c}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Tu(e)||_o(8),Mf(e)&&(e=b7(e));const t=lC(this),n=Vb(e,void 0);return n[Ai].isManual_=!0,jb(t),n}finishDraft(e,t){const n=e&&e[Ai];(!n||!n.isManual_)&&_o(9);const{scope_:r}=n;return aC(r,t),uC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=_u("Patches").applyPatches_;return Mf(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Vb(e,t){const n=Pv(e)?_u("MapSet").proxyMap_(e,t):Tv(e)?_u("MapSet").proxySet_(e,t):g7(e,t);return(t?t.scope_:H2()).drafts_.push(n),n}function b7(e){return Mf(e)||_o(10,e),q2(e)}function q2(e){if(!Tu(e)||_v(e))return e;const t=e[Ai];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ob(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ob(e,!0);return rv(n,(r,i)=>{W2(n,r,q2(i))}),t&&(t.finalized_=!1),n}var Ri=new y7,kh=Ri.produce;Ri.produceWithPatches.bind(Ri);Ri.setAutoFreeze.bind(Ri);Ri.setUseStrictShallowCopy.bind(Ri);Ri.applyPatches.bind(Ri);Ri.createDraft.bind(Ri);Ri.finishDraft.bind(Ri);const x7=e=>(t,n,r)=>(r.setState=(i,s,...a)=>{const c=typeof i=="function"?kh(i):i;return t(c,s,...a)},e(r.setState,n,r)),w7=x7,S7=({content:e},t)=>{t.serverState=e},k7=({content:e},t,n)=>{const r=n.conversationIdRef.current;return t.conversationId=e.conversation_id,n.conversationIdRef.current=e.conversation_id,{originalConversationId:r}},C7=(e,t,{originalConversationId:n,conversationIdRef:r})=>{const i=t.conversations[n];if(!i)throw new Error("Received events for non-existent conversation");t.conversations[r.current]=i,t.currentConversation===n&&(t.currentConversation=r.current),delete t.conversations[n]},E7=({content:e},t)=>{t.followupMessages=e.messages},P7=({content:e},t)=>{t.summary=e.summary},T7=(e,t,n)=>{const r=t.history[n.messageId];r.hasConfirmationBreak&&(r.hasConfirmationBreak=!1,r.content.endsWith(`
83
83
 
84
84
  `)||(r.content+=`
85
85
 
@@ -122,8 +122,8 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
122
122
  `))+1))}const a="#".repeat(i),c=n.enter("headingAtx"),d=n.enter("phrasing");s.move(a+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
123
123
  `,...s.current()});return/^[\t ]/.test(h)&&(h=dh(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),d(),c(),h}n$.peek=IW;function n$(e){return e.value||""}function IW(){return"<"}r$.peek=$W;function r$(e,t,n,r){const i=Lw(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${s}`),h+=d.move(" "+i),h+=d.move(n.safe(e.title,{before:h,after:i,...d.current()})),h+=d.move(i),c()),h+=d.move(")"),a(),h}function $W(){return"!"}i$.peek=AW;function i$(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const h=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return a(),n.stack=m,s(),i==="full"||!h||h!==g?d+=c.move(g+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function AW(){return"!"}o$.peek=RW;function o$(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],c=n.compilePattern(a);let d;if(a.atBreak)for(;d=c.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return i+r+i}function RW(){return"`"}function s$(e,t){const n=Cw(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}a$.peek=LW;function a$(e,t,n,r){const i=Lw(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let c,d;if(s$(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let g=a.move("<");return g+=a.move(n.containerPhrasing(e,{before:g,after:">",...a.current()})),g+=a.move(">"),c(),n.stack=m,g}c=n.enter("link"),d=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,{before:h,after:"](",...a.current()})),h+=a.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,{before:h,after:">",...a.current()})),h+=a.move(">")):(d=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,{before:h,after:e.title?" ":")",...a.current()}))),d(),e.title&&(d=n.enter(`title${s}`),h+=a.move(" "+i),h+=a.move(n.safe(e.title,{before:h,after:i,...a.current()})),h+=a.move(i),d()),h+=a.move(")"),c(),h}function LW(e,t,n){return s$(e,n)?"<":"["}l$.peek=MW;function l$(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return a(),n.stack=m,s(),i==="full"||!h||h!==g?d+=c.move(g+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function MW(){return"["}function Mw(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function DW(e){const t=Mw(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function NW(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function u$(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function FW(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?NW(n):Mw(n);const c=e.ordered?a==="."?")":".":DW(n);let d=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),u$(n)===a&&m){let g=-1;for(;++g<e.children.length;){const b=e.children[g];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(a=c),n.bulletCurrent=a;const h=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),h}function OW(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function zW(e,t,n,r){const i=OW(n);let s=n.bulletCurrent||Mw(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(r);c.move(s+" ".repeat(a-s.length)),c.shift(a);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return d(),h;function m(g,b,x){return b?(x?"":" ".repeat(a))+g:(x?s:s+" ".repeat(a-s.length))+g}}function jW(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const BW=Nv(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function VW(e,t,n,r){return(e.children.some(function(a){return BW(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function UW(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}c$.peek=KW;function c$(e,t,n,r){const i=UW(n),s=n.enter("strong"),a=n.createTracker(r),c=a.move(i+i);let d=a.move(n.containerPhrasing(e,{after:i,before:c,...a.current()}));const h=d.charCodeAt(0),m=cv(r.before.charCodeAt(r.before.length-1),h,i);m.inside&&(d=dh(h)+d.slice(1));const g=d.charCodeAt(d.length-1),b=cv(r.after.charCodeAt(0),g,i);b.inside&&(d=d.slice(0,-1)+dh(g));const x=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+d+x}function KW(e,t,n){return n.options.strong||"*"}function WW(e,t,n,r){return n.safe(e.value,r)}function HW(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function GW(e,t,n){const r=(u$(n)+(n.options.ruleSpaces?" ":"")).repeat(HW(n));return n.options.ruleSpaces?r.slice(0,-1):r}const f$={blockquote:gW,break:iE,code:SW,definition:CW,emphasis:t$,hardBreak:iE,heading:_W,html:n$,image:r$,imageReference:i$,inlineCode:o$,link:a$,linkReference:l$,list:FW,listItem:zW,paragraph:jW,root:VW,strong:c$,text:WW,thematicBreak:GW};function qW(){return{enter:{table:YW,tableData:oE,tableHeader:oE,tableRow:QW},exit:{codeText:JW,table:XW,tableData:U0,tableHeader:U0,tableRow:U0}}}function YW(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function XW(e){this.exit(e),this.data.inTable=void 0}function QW(e){this.enter({type:"tableRow",children:[]},e)}function U0(e){this.exit(e)}function oE(e){this.enter({type:"tableCell",children:[]},e)}function JW(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ZW));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ZW(e,t){return t==="|"?t:e}function eH(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
124
124
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:a,tableCell:d,tableRow:c}};function a(x,k,P,T){return h(m(x,P,T),x.align)}function c(x,k,P,T){const _=g(x,P,T),A=h([_]);return A.slice(0,A.indexOf(`
125
- `))}function d(x,k,P,T){const _=P.enter("tableCell"),A=P.enter("phrasing"),L=P.containerPhrasing(x,{...T,before:s,after:s});return A(),_(),L}function h(x,k){return hW(x,{align:k,alignDelimiters:r,padding:n,stringLength:i})}function m(x,k,P){const T=x.children;let _=-1;const A=[],L=k.enter("table");for(;++_<T.length;)A[_]=g(T[_],k,P);return L(),A}function g(x,k,P){const T=x.children;let _=-1;const A=[],L=k.enter("tableRow");for(;++_<T.length;)A[_]=d(T[_],x,k,P);return L(),A}function b(x,k,P){let T=f$.inlineCode(x,k,P);return P.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function tH(){return{exit:{taskListCheckValueChecked:sE,taskListCheckValueUnchecked:sE,paragraph:rH}}}function nH(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:iH}}}function sE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function rH(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const c=i[s];if(c.type==="paragraph"){a=c;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function iH(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);s&&c.move(a);let d=f$.listItem(e,t,n,{...r,...c.current()});return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(m){return m+a}}function oH(){return[FK(),iW(),lW(),qW(),tH()]}function sH(e){return{extensions:[OK(),oW(e),uW(),eH(e),nH()]}}const aH={tokenize:pH,partial:!0},d$={tokenize:hH,partial:!0},p$={tokenize:mH,partial:!0},h$={tokenize:gH,partial:!0},lH={tokenize:vH,partial:!0},m$={name:"wwwAutolink",tokenize:fH,previous:v$},g$={name:"protocolAutolink",tokenize:dH,previous:y$},sa={name:"emailAutolink",tokenize:cH,previous:b$},ps={};function uH(){return{text:ps}}let du=48;for(;du<123;)ps[du]=sa,du++,du===58?du=65:du===91&&(du=97);ps[43]=sa;ps[45]=sa;ps[46]=sa;ps[95]=sa;ps[72]=[sa,g$];ps[104]=[sa,g$];ps[87]=[sa,m$];ps[119]=[sa,m$];function cH(e,t,n){const r=this;let i,s;return a;function a(g){return!nx(g)||!b$.call(r,r.previous)||Dw(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return nx(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(lH,m,h)(g):g===45||g===95||kr(g)?(s=!0,e.consume(g),d):m(g)}function h(g){return e.consume(g),i=!0,d}function m(g){return s&&i&&Fr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function fH(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!v$.call(r,r.previous)||Dw(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(aH,e.attempt(d$,e.attempt(p$,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function dH(e,t,n){const r=this;let i="",s=!1;return a;function a(g){return(g===72||g===104)&&y$.call(r,r.previous)&&!Dw(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(Fr(g)&&i.length<5)return i+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const b=i.toLowerCase();if(b==="http"||b==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),s?h:(s=!0,d)):n(g)}function h(g){return g===null||av(g)||Vt(g)||Iu(g)||Lv(g)?n(g):e.attempt(d$,e.attempt(p$,m),n)(g)}function m(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function pH(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function hH(e,t,n){let r,i,s;return a;function a(h){return h===46||h===95?e.check(h$,d,c)(h):h===null||Vt(h)||Iu(h)||h!==45&&Lv(h)?d(h):(s=!0,e.consume(h),a)}function c(h){return h===95?r=!0:(i=r,r=void 0),e.consume(h),a}function d(h){return i||r||!s?n(h):t(h)}}function mH(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(h$,t,s)(a):a===null||Vt(a)||Iu(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function gH(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),s):c===93?(e.consume(c),i):c===60||c===null||Vt(c)||Iu(c)?t(c):n(c)}function i(c){return c===null||c===40||c===91||Vt(c)||Iu(c)?t(c):r(c)}function s(c){return Fr(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),r):Fr(c)?(e.consume(c),a):n(c)}}function vH(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return kr(s)?n(s):t(s)}}function v$(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Vt(e)}function y$(e){return!Fr(e)}function b$(e){return!(e===47||nx(e))}function nx(e){return e===43||e===45||e===46||e===95||kr(e)}function Dw(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const yH={tokenize:PH,partial:!0};function bH(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:kH,continuation:{tokenize:CH},exit:EH}},text:{91:{name:"gfmFootnoteCall",tokenize:SH},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:xH,resolveTo:wH}}}}function xH(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const d=r.events[i][1];if(d.type==="labelImage"){a=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!a||!a._balanced)return n(d);const h=Io(r.sliceSerialize({start:a.end,end:r.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function wH(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function SH(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(s>999||g===93&&!a||g===null||g===91||Vt(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return i.includes(Io(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return Vt(g)||(a=!0),s++,e.consume(g),g===92?m:h}function m(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}}function kH(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,c;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(k)}function m(k){if(a>999||k===93&&!c||k===null||k===91||Vt(k))return n(k);if(k===93){e.exit("chunkString");const P=e.exit("gfmFootnoteDefinitionLabelString");return s=Io(r.sliceSerialize(P)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Vt(k)||(c=!0),a++,e.consume(k),k===92?g:m}function g(k){return k===91||k===92||k===93?(e.consume(k),a++,m):m(k)}function b(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ct(e,x,"gfmFootnoteDefinitionWhitespace")):n(k)}function x(k){return t(k)}}function CH(e,t,n){return e.check(Th,t,e.attempt(yH,t,n))}function EH(e){e.exit("gfmFootnoteDefinition")}function PH(e,t,n){const r=this;return Ct(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function TH(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,c){let d=-1;for(;++d<a.length;)if(a[d][0]==="enter"&&a[d][1].type==="strikethroughSequenceTemporary"&&a[d][1]._close){let h=d;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[d][1].end.offset-a[d][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[d][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[d][1].end)},g={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[d][1].start)},b=[["enter",m,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",g,c]],x=c.parser.constructs.insideSpan.null;x&&$i(b,b.length,0,Mv(x,a.slice(h+1,d),c)),$i(b,b.length,0,[["exit",g,c],["enter",a[d][1],c],["exit",a[d][1],c],["exit",m,c]]),$i(a,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<a.length;)a[d][1].type==="strikethroughSequenceTemporary"&&(a[d][1].type="data");return a}function s(a,c,d){const h=this.previous,m=this.events;let g=0;return b;function b(k){return h===126&&m[m.length-1][1].type!=="characterEscape"?d(k):(a.enter("strikethroughSequenceTemporary"),x(k))}function x(k){const P=Df(h);if(k===126)return g>1?d(k):(a.consume(k),g++,x);if(g<2&&!n)return d(k);const T=a.exit("strikethroughSequenceTemporary"),_=Df(k);return T._open=!_||_===2&&!!P,T._close=!P||P===2&&!!_,c(k)}}}class _H{constructor(){this.map=[]}add(t,n,r){IH(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function IH(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function $H(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function AH(){return{flow:{null:{name:"table",tokenize:RH,resolveAll:LH}}}}function RH(e,t,n){const r=this;let i=0,s=0,a;return c;function c(B){let W=r.events.length-1;for(;W>-1;){const H=r.events[W][1].type;if(H==="lineEnding"||H==="linePrefix")W--;else break}const G=W>-1?r.events[W][1].type:null,ee=G==="tableHead"||G==="tableRow"?$:d;return ee===$&&r.parser.lazy[r.now().line]?n(B):ee(B)}function d(B){return e.enter("tableHead"),e.enter("tableRow"),h(B)}function h(B){return B===124||(a=!0,s+=1),m(B)}function m(B){return B===null?n(B):Ye(B)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),x):n(B):vt(B)?Ct(e,m,"whitespace")(B):(s+=1,a&&(a=!1,i+=1),B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),g(B)))}function g(B){return B===null||B===124||Vt(B)?(e.exit("data"),m(B)):(e.consume(B),B===92?b:g)}function b(B){return B===92||B===124?(e.consume(B),g):g(B)}function x(B){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(B):(e.enter("tableDelimiterRow"),a=!1,vt(B)?Ct(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):k(B))}function k(B){return B===45||B===58?T(B):B===124?(a=!0,e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),P):j(B)}function P(B){return vt(B)?Ct(e,T,"whitespace")(B):T(B)}function T(B){return B===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),_):B===45?(s+=1,_(B)):B===null||Ye(B)?O(B):j(B)}function _(B){return B===45?(e.enter("tableDelimiterFiller"),A(B)):j(B)}function A(B){return B===45?(e.consume(B),A):B===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(B))}function L(B){return vt(B)?Ct(e,O,"whitespace")(B):O(B)}function O(B){return B===124?k(B):B===null||Ye(B)?!a||i!==s?j(B):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(B)):j(B)}function j(B){return n(B)}function $(B){return e.enter("tableRow"),Y(B)}function Y(B){return B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),Y):B===null||Ye(B)?(e.exit("tableRow"),t(B)):vt(B)?Ct(e,Y,"whitespace")(B):(e.enter("data"),te(B))}function te(B){return B===null||B===124||Vt(B)?(e.exit("data"),Y(B)):(e.consume(B),B===92?ie:te)}function ie(B){return B===92||B===124?(e.consume(B),te):te(B)}}function LH(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],c=!1,d=0,h,m,g;const b=new _H;for(;++n<e.length;){const x=e[n],k=x[1];x[0]==="enter"?k.type==="tableHead"?(c=!1,d!==0&&(aE(b,t,d,h,m),m=void 0,d=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",m,t]])),i=k.type==="tableDelimiterRow"?2:m?3:1):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],g=Pg(b,t,s,i,void 0,g),s=[0,0,0,0]),a[2]=n)):k.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],g=Pg(b,t,s,i,void 0,g)),s=a,a=[s[1],n,0,0])):k.type==="tableHead"?(c=!0,d=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(d=n,s[1]!==0?(a[0]=a[1],g=Pg(b,t,s,i,n,g)):a[1]!==0&&(g=Pg(b,t,a,i,n,g)),i=0):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(a[3]=n)}for(d!==0&&aE(b,t,d,h,m),b.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=$H(t.events,n))}return e}function Pg(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(s.end=Object.assign({},df(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const d=df(t.events,n[1]);if(s={type:a,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const h=df(t.events,n[2]),m=df(t.events,n[3]),g={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",g,t]]),r!==2){const b=t.events[n[2]],x=t.events[n[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,P=n[3]-n[2]-1;e.add(k,P,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return i!==void 0&&(s.end=Object.assign({},df(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function aE(e,t,n,r,i){const s=[],a=df(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function df(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const MH={name:"tasklistCheck",tokenize:NH};function DH(){return{text:{91:MH}}}function NH(e,t,n){const r=this;return i;function i(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return Vt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),a):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),a):n(d)}function a(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Ye(d)?t(d):vt(d)?e.check({tokenize:FH},t,n)(d):n(d)}}function FH(e,t,n){return Ct(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function OH(e){return $I([uH(),bH(),TH(e),AH(),DH()])}const zH={};function Gp(e){const t=this,n=e||zH,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(OH(n)),s.push(oH()),a.push(sH(n))}const lE=e=>Symbol.iterator in e,uE=e=>"entries"in e,cE=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[i,s]of n)if(!Object.is(s,r.get(i)))return!1;return!0},jH=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let i=n.next(),s=r.next();for(;!i.done&&!s.done;){if(!Object.is(i.value,s.value))return!1;i=n.next(),s=r.next()}return!!i.done&&!!s.done};function BH(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:lE(e)&&lE(t)?uE(e)&&uE(t)?cE(e,t):jH(e,t):cE({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function Ih(e){const t=He.useRef(void 0);return n=>{const r=e(n);return BH(t.current,r)?t.current:t.current=r}}const hs=e=>{const t=S.useContext(J2);if(!t||!t.store)throw new Error("useHistoryStore must be used within a HistoryStoreContextProvider");return B2(t.store,e)},Nw=()=>hs(e=>e.actions),tq=()=>hs(e=>e.primitives),Za=e=>hs(Ih(t=>e(t.primitives.getCurrentConversation()))),x$=e=>hs(t=>e?t.primitives.getCurrentConversation().history[e]:void 0),VH=()=>hs(Ih(e=>Object.keys(e.primitives.getCurrentConversation().history))),UH=()=>hs(Ih(e=>Object.values(e.primitives.getCurrentConversation().history))),KH=()=>hs(e=>{const t=e.primitives.getCurrentConversation().history;return Object.values(t).some(n=>n.confirmationStates&&Object.values(n.confirmationStates).some(r=>r==="pending"))}),fE=({content:e,classNames:t})=>D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-900 max-w-full",t),remarkPlugins:[Gp],components:{pre:({children:n})=>D.jsx("pre",{className:"bg-default text-default-900 mt-2 mb-2 max-w-full overflow-auto rounded p-2 font-mono text-[90%] font-normal",children:n}),code:({children:n})=>D.jsx("code",{className:"bg-default text-default-900 rounded px-1 py-0.5 font-mono text-[85%] font-normal",children:n})},children:e}),WH=2;function HH({duration:e,className:t,children:n}){return D.jsx(Zs.div,{className:yn("from-default-600 via-default-200 to-default-600 relative inline-block bg-gradient-to-r bg-clip-text text-transparent",t),initial:{backgroundPosition:"200% 0%"},animate:{backgroundPosition:"-200% 0%"},transition:{duration:e??WH,repeat:1/0,ease:"linear"},style:{backgroundSize:"400% 100%"},children:n})}function GH({shouldShimmer:e,liveUpdates:t,classNames:n}){const[r,i]=S.useState(!1),s=Object.values(t),a=S.useCallback(()=>i(g=>!g),[]),c=s.length>1,d=s[s.length-1],h=s.slice(0,-1),m=Math.max((d.description??"").length,d.label.length)/10;return D.jsxs("div",{className:yn("flex flex-col",c&&"cursor-pointer"),onClick:a,children:[D.jsx(Zs.div,{initial:!1,animate:{height:r?"auto":0,opacity:r?1:0,marginBottom:r?"0.5rem":0},transition:{duration:.3,ease:"easeInOut"},style:{overflow:"hidden"},children:D.jsx("div",{className:"flex flex-col gap-2",children:h.map((g,b)=>D.jsxs(Zs.div,{initial:{opacity:0,y:-10},animate:{opacity:r?1:0,y:r?0:-10},transition:{duration:.3},style:{pointerEvents:r?"auto":"none"},children:[D.jsx("div",{className:"text-default-500",children:g.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-400 max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:g.description})]},b))})}),D.jsxs("div",{className:"flex items-center gap-4",children:[D.jsx("div",{className:"relative overflow-hidden bg-transparent",children:e?D.jsxs(HH,{duration:m,children:[D.jsx("div",{children:d.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:d.description})]}):D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"text-default-500",children:d.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-400 max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:d.description})]})}),c&&D.jsx(wr,{variant:"light",isIconOnly:!0,onPress:a,"data-testid":"live-updates-expand",children:D.jsx(Zs.div,{initial:{rotate:0},animate:{rotate:r?180:0},transition:{duration:.3},children:D.jsx(ui,{icon:"heroicons:chevron-down"})})})]})]})}const qH=({images:e})=>{const{isOpen:t,onOpen:n,onClose:r}=Bz(),[i,s]=S.useState(0),a=Object.entries(e).map(([m,g])=>({src:g,alt:m})),c=m=>{s(m),n()},d=S.useCallback(()=>{s(m=>m===0?a.length-1:m-1)},[a.length]),h=S.useCallback(()=>{s(m=>m===a.length-1?0:m+1)},[a.length]);return S.useEffect(()=>{if(!t)return;const m=g=>{switch(g.key){case"ArrowLeft":g.preventDefault(),d();break;case"ArrowRight":g.preventDefault(),h();break;case"Escape":g.preventDefault(),r();break}};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t,d,h,r]),D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"xs:grid-cols-4 grid grid-cols-3 gap-2 sm:grid-cols-6 md:grid-cols-8 lg:grid-cols-12",children:a.map((m,g)=>D.jsx("div",{className:"relative aspect-square cursor-pointer overflow-hidden rounded-lg",onClick:()=>c(g),children:D.jsx(y0,{src:m.src,alt:m.alt,className:"h-full w-full rounded-lg object-cover transition-transform hover:scale-125",classNames:{wrapper:"h-full w-full",img:"h-full w-full object-cover"}})},m.alt))}),D.jsx(jz,{isOpen:t,onClose:r,size:"full",hideCloseButton:!0,classNames:{backdrop:"bg-black/90",wrapper:"p-0",base:"bg-transparent shadow-none m-0",body:"p-0"},children:D.jsx(Fz,{children:D.jsxs(Iz,{className:"relative flex min-h-screen items-center justify-center p-4",children:[D.jsx(wr,{isIconOnly:!0,variant:"flat",className:"absolute top-4 right-4 z-50 bg-black/50 text-white",onPress:r,children:D.jsx(ui,{icon:"heroicons:x-mark",className:"h-6 w-6"})}),a.length>1&&D.jsxs(D.Fragment,{children:[D.jsx(wr,{isIconOnly:!0,variant:"flat",className:"absolute top-1/2 left-4 z-50 -translate-y-1/2 bg-black/50 text-white",onPress:d,children:D.jsx(ui,{icon:"heroicons:chevron-left",className:"h-6 w-6"})}),D.jsx(wr,{isIconOnly:!0,variant:"flat",className:"absolute top-1/2 right-4 z-50 -translate-y-1/2 bg-black/50 text-white",onPress:h,children:D.jsx(ui,{icon:"heroicons:chevron-right",className:"h-6 w-6"})})]}),D.jsx("div",{className:"relative flex max-h-[90vh] max-w-[90vw] items-center justify-center",children:D.jsx(y0,{src:a[i]?.src,alt:a[i]?.alt,className:"max-h-full max-w-full object-contain",classNames:{wrapper:"max-w-full max-h-full",img:"max-w-full max-h-full object-contain"}})}),a.length>1&&D.jsx("div",{className:"absolute bottom-16 left-1/2 flex max-w-[90vw] -translate-x-1/2 gap-2 overflow-x-auto rounded bg-black/30 p-2",children:a.map((m,g)=>D.jsx("button",{onClick:()=>s(g),className:yn("flex-shrink-0 overflow-hidden border-2 border-transparent transition-all",g===i?"z-10 scale-125":"hover:scale-110"),children:D.jsx(y0,{src:m.src,alt:m.alt,className:"h-12 w-12 rounded-lg object-cover",classNames:{wrapper:"w-12 h-12",img:"w-12 h-12 object-cover"}})},m.alt))}),a.length>1&&D.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full bg-black/50 px-4 py-2",children:D.jsxs("span",{className:"text-sm font-medium text-white",children:[i+1," / ",a.length]})})]})})})]})},YH=({references:e})=>D.jsx("div",{className:"text-default-500 text-xs italic",children:D.jsx("ul",{className:"list-disc pl-4",children:e.map((t,n)=>D.jsx("li",{children:D.jsx("a",{href:t.url??void 0,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:t.title})},n))})}),jg=e=>D.jsx(nz,{delay:300,closeDelay:0,...e}),w$=e=>{const t=r=>xr.subscribe(r),n=()=>xr.getPlugin(e);return S.useSyncExternalStore(t,n)},Cf=({plugin:e,component:t,skeletonSize:n,disableSkeleton:r,componentProps:i})=>{const s=w$(e.name),a=n?{width:n.width,height:n.height}:{};if(!s)return null;const c=s.config.components[t];try{return D.jsx(S.Suspense,{fallback:r?null:D.jsx(Uz,{className:"rounded-lg",style:a}),children:D.jsx(c,{...i||{}})})}catch(d){return console.error(d),null}},S$="UsagePluginName",k$={name:S$,components:{UsageButton:S.lazy(()=>io(()=>import("./UsageButton-D3NhCn7k.js"),__vite__mapDeps([9,4,5,6])))}},XH=({content:e,serverId:t,message:n})=>{const[r,i]=S.useState("heroicons:clipboard"),s=S.useRef(null),a=async()=>{await navigator.clipboard.writeText(e),i("heroicons:check"),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{i("heroicons:clipboard")},2e3)};return D.jsxs("div",{className:"flex items-center gap-2",children:[n.usage&&Object.keys(n.usage).length>=1&&D.jsx(Cf,{plugin:k$,component:"UsageButton",componentProps:{usage:n.usage},skeletonSize:{width:"88px",height:"40px"}}),D.jsx(jg,{content:"Copy",placement:"bottom",children:D.jsx(wr,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Copy message",onPress:a,children:D.jsx(ui,{icon:r,"data-testid":"chat-message-copy-icon","data-icon":r})})}),t&&D.jsx(Cf,{plugin:D2,component:"FeedbackForm",componentProps:{message:n},skeletonSize:{width:"88px",height:"40px"}})]})},QH=()=>D.jsx("div",{className:"text-default-500 flex items-center gap-2",children:D.jsx(ui,{icon:"heroicons:arrow-path",className:"animate-spin","data-testid":"loading-indicator"})}),JH=({confirmationRequests:e,confirmationStates:t,onConfirm:n,onSkip:r,onBulkConfirm:i,onBulkSkip:s,isLoading:a})=>{const[c,d]=S.useState(new Set),h=Object.values(e),m=j=>{const $=Object.entries(j);return $.length===0?"":$.slice(0,3).map(([Y,te])=>{const ie=typeof te=="string"?te.length>30?`${te.substring(0,30)}...`:te:JSON.stringify(te);return`${Y}: ${ie}`}).join(", ")},g=j=>{if(j.tool_description)return j.tool_description;const $=j.arguments,Y=j.tool_name.replace(/_/g," "),te=$.email||$.to||$.name||$.id||$.event_id;return te?`${Y}: ${te}`:`Execute ${Y}`},b=h.filter(j=>t[j.confirmation_id]==="pending"),x=b.length>0,k=c.size>0,P=j=>{d($=>{const Y=new Set($);return Y.has(j)?Y.delete(j):Y.add(j),Y})},T=()=>{const j=b.map($=>$.confirmation_id);i(j),d(new Set)},_=()=>{const j=b.map($=>$.confirmation_id);s(j),d(new Set)},A=()=>{const j=Array.from(c).filter($=>t[$]==="pending");i(j),d(new Set)},L=j=>{n(j),d($=>{const Y=new Set($);return Y.delete(j),Y})},O=j=>{r(j),d($=>{const Y=new Set($);return Y.delete(j),Y})};return D.jsx(ol,{children:D.jsxs(Zs.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:"my-2 flex flex-col gap-3",children:[x&&D.jsxs("div",{role:"status","aria-live":"polite",className:"sr-only",children:[b.length," confirmation",b.length>1?"s":""," pending"]}),x&&D.jsxs("div",{className:"flex flex-wrap gap-2",children:[D.jsxs(wr,{size:"sm",color:"success",variant:"solid",onPress:T,isDisabled:a,"aria-label":`Confirm all ${b.length} pending actions`,children:["✓ Confirm All (",b.length,")"]}),D.jsx(wr,{size:"sm",color:"default",variant:"bordered",onPress:_,isDisabled:a,"aria-label":`Skip all ${b.length} pending actions`,children:"⏭ Skip All"}),k&&D.jsxs(wr,{size:"sm",color:"success",variant:"flat",onPress:A,isDisabled:a,"aria-label":`Confirm ${c.size} selected actions`,children:["✓ Confirm Selected (",c.size,")"]})]}),D.jsx("div",{className:`flex flex-col gap-2 ${h.length>3?"max-h-[400px] overflow-y-auto pr-2":""}`,children:h.map(j=>{const $=t[j.confirmation_id]||"pending",Y=$==="pending",te=$==="skipped",ie=g(j),B=m(j.arguments),W=c.has(j.confirmation_id);return D.jsxs(Zs.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.2},className:`rounded-medium border-small flex items-center gap-3 p-3 ${te?"border-default bg-default-100/50 opacity-60 grayscale":Y?"border-warning bg-warning-50/50":$==="confirmed"?"border-success bg-success-50/50":"border-danger bg-danger-50/50"}`,children:[Y&&D.jsx(e2,{isSelected:W,onValueChange:()=>P(j.confirmation_id),size:"sm",className:"shrink-0",isDisabled:a}),D.jsxs("div",{className:"min-w-0 flex-1",children:[D.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[$==="pending"&&D.jsx(wg,{size:"sm",color:"warning",variant:"flat",children:"⚠️ Confirmation needed"}),$==="confirmed"&&D.jsx(wg,{size:"sm",color:"success",variant:"flat",children:"✅ Confirmed"}),$==="declined"&&D.jsx(wg,{size:"sm",color:"default",variant:"flat",children:"❌ Declined"}),$==="skipped"&&D.jsx(wg,{size:"sm",color:"default",variant:"flat",children:"⏭️ Handled naturally"})]}),D.jsx("p",{className:"text-small text-default-700 font-medium",children:ie}),B&&Y&&D.jsx("p",{className:"text-tiny text-default-500 mt-1 truncate",id:`conf-args-${j.confirmation_id}`,children:B})]}),Y&&D.jsxs("div",{className:"flex shrink-0 gap-2",children:[D.jsx(wr,{size:"sm",color:"success",variant:"solid",onPress:()=>L(j.confirmation_id),isDisabled:a,"aria-label":`Confirm ${j.tool_name}: ${ie}`,"aria-describedby":B?`conf-args-${j.confirmation_id}`:void 0,children:"Do it"}),D.jsx(wr,{size:"sm",color:"default",variant:"bordered",onPress:()=>O(j.confirmation_id),isDisabled:a,"aria-label":`Skip ${j.tool_name}: ${ie}`,children:"Skip"})]})]},j.confirmation_id)})})]},"confirmation-dialogs")})};class ZH{nodes=new Map;roots=[];constructor(t){this.buildTree(t)}buildTree(t){for(const n of t)this.nodes.set(n.id,{...n,children:[]});for(const n of this.nodes.values())if(n.parent_id){const r=this.nodes.get(n.parent_id);r?(r.children.push(n),r.children.sort((i,s)=>i.order-s.order)):(this.roots.push(n),this.roots.sort((i,s)=>i.order-s.order))}else this.roots.push(n),this.roots.sort((r,i)=>r.order-i.order)}*iterate(){function*t(n){for(const r of n)yield r,yield*t(r.children)}yield*t(this.roots)}get(t){return this.nodes.get(t)}update(t,n){const r=this.nodes.get(t);r&&(Object.assign(r,n),n.order!==void 0&&(r.parent_id?this.nodes.get(r.parent_id)?.children.sort((s,a)=>s.order-a.order):this.roots.sort((i,s)=>i.order-s.order)),n.status==="completed"&&this.completeChildren(r))}completeChildren(t){for(const n of t.children)n.status="completed",this.completeChildren(n)}getRoots(){return this.roots}}function C$({tasks:e,depth:t=0}){const n=new ZH(e);return D.jsx("div",{className:"space-y-2","data-testid":`todo-list-root-${t}`,children:n.getRoots().map(({id:r,description:i,status:s,summary:a,children:c})=>{const d=D.jsx(o2,{size:"sm",color:"primary","aria-label":"Task is in progress",className:"m-0 p-0",classNames:{svg:"w-4 h-4"}});return D.jsxs("div",{"data-testid":`todo-task-${r}`,children:[D.jsx("div",{children:D.jsxs(e2,{isSelected:s===lf.Completed,disabled:!0,className:"block",icon:s===lf.InProgress?()=>d:void 0,classNames:{hiddenInput:"cursor-default",wrapper:yn(s===lf.InProgress&&"before:border-none"),base:"pointer-events-none hover:bg-transparent",label:yn("transition-colors",s===lf.Completed&&"line-through text-default-400",s===lf.InProgress&&"text-primary italic",s===lf.Pending&&"text-default-900")},children:[i,a&&D.jsx("p",{className:"ml-7",children:a})]})}),c.length>0&&D.jsx("div",{style:{marginLeft:`${(t+1)*.5}rem`},"data-testid":`todo-children-wrapper-${r}`,children:D.jsx(C$,{tasks:c,depth:t+1})})]},`${r}-${s}`)})})}const eG=S.forwardRef(({messageId:e,classNames:t},n)=>{const r=Za(le=>le.lastMessageId),i=Za(le=>le.isLoading),s=x$(e),a=hs(le=>le.actions.sendSilentConfirmation),{client:c}=nw();if(!s)throw new Error("Tried to render non-existent message");const{serverId:d,content:h,role:m,references:g,liveUpdates:b,images:x,confirmationRequests:k,confirmationStates:P,error:T}=s,_=m===Sf.User,A=i&&m===Sf.Assistant&&e===r,[L,O]=S.useState(!1),j=A&&!b&&!h.length,$=!A,Y=!A&&x&&Object.keys(x).length>0,te=!A&&g&&g.length>0,ie=b&&Object.keys(b).length>0,B=k&&Object.keys(k).length>0,W=async le=>{try{await a(e,le,!0,c)}catch(J){console.error(J)}},G=async le=>{try{await a(e,le,!1,c)}catch(J){console.error(J)}},ee=async le=>{const J=k?Object.keys(k):[],X=J.reduce((V,ae)=>({...V,[ae]:le.includes(ae)}),{});try{await a(e,J,X,c)}catch(V){console.error(V)}},H=async le=>{const X=(k?Object.keys(k):[]).reduce((V,ae)=>({...V,[ae]:!1}),{});try{await a(e,le,X,c)}catch(V){console.error(V)}};return D.jsx("div",{ref:n,"data-testid":"chat-message-wrapper",className:yn("flex gap-3",{"flex-row-reverse":_},t?.wrapper),children:D.jsx("div",{className:yn(!L&&"motion-safe:animate-pop-in","flex flex-col gap-4",_&&"max-w-[75%]",!_&&"w-full"),onAnimationEnd:()=>O(!0),children:D.jsx("div",{className:yn("rounded-medium text-default relative px-4 py-3",_&&"bg-default-100",t?.innerWrapper),children:_?D.jsx(fE,{content:h,classNames:t?.content}):D.jsxs("div",{className:"flex flex-col gap-2",children:[j&&D.jsx(QH,{}),ie&&D.jsx(GH,{shouldShimmer:A,liveUpdates:b,classNames:{liveUpdates:t?.liveUpdates}}),s.tasks&&s.tasks.length>0&&D.jsx(ol,{children:D.jsxs(Zs.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"rounded-medium text-large text-default-900 border-default flex w-fit flex-col gap-2 border p-4",children:[D.jsx("p",{children:"Execution plan"}),D.jsx(C$,{tasks:s.tasks})]},`${s.id}-execution-plan`)}),B&&P&&D.jsx(JH,{confirmationRequests:k,confirmationStates:P,onConfirm:W,onSkip:G,onBulkConfirm:ee,onBulkSkip:H,isLoading:A}),s.hasConfirmationBreak&&D.jsx("div",{className:"border-divider my-2 border-t"}),D.jsx(fE,{content:h,classNames:t?.content}),T&&D.jsxs("div",{"data-testid":"message-error",className:"bg-danger-50 border-danger-200 text-danger-700 rounded-medium flex items-center gap-2 border px-3 py-2",role:"alert",children:[D.jsx(ui,{icon:"heroicons:exclamation-triangle",className:"text-danger h-5 w-5 flex-shrink-0"}),D.jsx("span",{className:"text-small",children:T})]}),Y&&D.jsx(qH,{images:x}),te&&D.jsx(YH,{references:g}),$&&D.jsx(XH,{content:h,serverId:d,message:s})]})})})})}),tG=S.forwardRef(({classNames:e={},...t},n)=>D.jsx(Ez,{ref:n,className:"min-h-[50px]",classNames:e,...t}));function nG({isVisible:e,actions:t,sendMessage:n}){return D.jsx(ol,{children:e&&D.jsx(Zs.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{overflow:"hidden",opacity:0,height:0},transition:{type:"tween",ease:"easeInOut",duration:.3},children:D.jsx(h2,{className:yn("flex flex-nowrap gap-2 py-2 transition-all"),orientation:"horizontal",role:"group","aria-label":"Predefined message actions","aria-roledescription":"Horizontal scrollable list","data-testid":"horizontal-actions",children:D.jsx("div",{className:"m-auto flex gap-2",children:t.map((r,i)=>D.jsx(wr,{className:"flex",variant:"flat",onPress:()=>n(r),"aria-label":`Send message: ${r}`,children:D.jsx("p",{children:r})},i))})})},"horizontal-actions")})}function rG(){const e=s=>{const a=window.getComputedStyle(s),c=document.createElement("div");return c.style.whiteSpace="pre-wrap",c.style.wordWrap="break-word",c.style.position="absolute",c.style.visibility="hidden",c.style.font=a.font,c.style.lineHeight=a.lineHeight,c.style.padding=a.padding,c.style.border=a.border,c.style.boxSizing=a.boxSizing,c.style.width=`${s.clientWidth}px`,c},t=S.useCallback(s=>{const a=s.value.slice(0,s.selectionStart),c=e(s),d=window.getComputedStyle(s),h=document.createElement("span");h.textContent="​",c.textContent=a,c.appendChild(h),document.body.appendChild(c);const m=h.offsetTop,g=parseFloat(d.lineHeight||"16"),b=Math.round(m/g);return document.body.removeChild(c),b},[]),n=S.useCallback(s=>{const a=e(s),c=window.getComputedStyle(s);let d=s.value;(d.endsWith(`
126
- `)||d==="")&&(d+="​"),a.textContent=d,document.body.appendChild(a);const h=a.offsetHeight,m=parseFloat(c.lineHeight||"16"),g=Math.round(h/m);return document.body.removeChild(a),g},[]),r=S.useCallback(s=>t(s)===0,[t]),i=S.useCallback(s=>{const a=t(s),c=n(s);return a===c-1},[t,n]);return{isCaretInFirstLine:r,isCaretInLastLine:i}}const iG=({followupMessages:e,submit:t,stopAnswering:n,isLoading:r,formProps:i,inputProps:s,sendButtonProps:a,customSendIcon:c,customStopIcon:d,history:h,isDisabled:m=!1})=>{const[g,b]=S.useState(""),[x,k]=S.useState([]),P=S.useRef(null),T=S.useRef(null),{isCaretInFirstLine:_,isCaretInLastLine:A}=rG(),L=S.useRef(Math.max(x.length-1,0)),O=S.useCallback(()=>{const G=x[L.current];b(G)},[x]),j=S.useCallback(()=>{L.current=Math.max(L.current-1,0),O()},[O]),$=S.useCallback(()=>{L.current=Math.min(x.length-1,L.current+1),O()},[x,O]),Y=S.useCallback(G=>{!g&&!G||m||(n(),t(G??g),k(ee=>{const H=ee.slice(0,-1);return H.push(G??g),H}),b(""),T?.current?.focus())},[g,n,t,m]),te=S.useCallback(G=>{G.target===P.current&&(G.preventDefault(),Y())},[Y]),ie=S.useCallback(G=>{if(T.current){if(G.key==="ArrowUp"){if(!_(T.current))return;G.preventDefault(),j()}if(G.key==="ArrowDown"){if(!A(T.current))return;G.preventDefault(),$()}G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),Y())}},[Y,_,A,$,j]),B=S.useCallback(()=>{n(),T?.current?.focus()},[n]),W=S.useCallback(G=>{k(ee=>{const H=[...ee];return H[L.current]=G,H}),b(G)},[]);return S.useEffect(()=>{const G=(h??[]).filter(ee=>ee.role===Sf.User).map(ee=>ee.content);x.length-1!==G.length&&(G.push(""),L.current=Math.max(G.length-1,0),k(G))},[h,x.length]),D.jsxs("div",{className:"rounded-medium",children:[D.jsx(nG,{isVisible:!!e,actions:e??[],sendMessage:G=>Y(G)}),D.jsxs(U6,{className:"rounded-medium bg-default-100 dark:bg-default-100 flex w-full flex-row items-center pr-2 pl-0",validationBehavior:"native",onSubmit:te,ref:P,...i,children:[D.jsx(tG,{ref:T,"aria-label":"Message to the chat",classNames:{input:"text-medium text-default-foreground",inputWrapper:"!bg-transparent shadow-none group-data-[focus-visible=true]:ring-0 group-data-[focus-visible=true]:ring-offset-0 py-4"},name:"message",placeholder:m?"Please respond to pending confirmation...":"Enter a message here",autoFocus:!0,maxRows:16,minRows:1,value:g,onKeyDown:ie,onValueChange:W,"data-testid":"prompt-input-input","data-value":g,isDisabled:m,...s}),D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx(Cf,{plugin:F2,component:"ChatOptionsForm",skeletonSize:{width:"40px",height:"40px"}}),D.jsx(wr,{isIconOnly:!0,"aria-label":r?"Stop answering":"Send message to the chat",color:!r&&!g?"default":"primary",isDisabled:!r&&(!g||m),radius:"full",size:"sm",type:r?"button":"submit",onPress:r?B:void 0,"data-testid":"send-message",...a,children:D.jsxs(D.Fragment,{children:[!r&&(c??D.jsx(ui,{className:yn(g?"text-primary-foreground":"text-default-600"),icon:"heroicons:arrow-up","data-testid":"prompt-input-send-icon",width:20})),r&&(d??D.jsx(ui,{className:"text-primary-foreground",icon:"heroicons:stop","data-testid":"prompt-input-stop-icon",width:20}))]})})]})]})]})};function oG({...e}){const t=UH();return D.jsx(iG,{...e,history:t})}const Fw=()=>{const e=S.useContext(O2);if(!e)throw new Error("useChat must be used within a ConfigContextProvider");return e};function rx(){const{config:{customization:e}}=Fw(),t=VH(),n=Za($=>$.lastMessageId),r=x$(n),i=Za($=>$.isLoading),s=Za($=>$.followupMessages),a=KH(),{sendMessage:c,stopAnswering:d}=Nw(),[h,m]=S.useState(!1),[g,b]=S.useState(!0),x=S.useRef(null),k=S.useMemo(()=>t.length>0,[t.length]),{client:P}=nw(),T=$=>{c($,P)},_=S.useCallback(()=>{if(!x.current)return;const te=x.current,ie=te.scrollHeight-te.scrollTop-te.clientHeight;m(ie>100),b(!1),ie>25?b(!1):b(!0)},[]);S.useEffect(()=>{b(!0),t.length===0&&m(!1)},[t.length]),S.useEffect(()=>{if(x.current&&g){const $=x.current;$.scrollTop=$.scrollHeight}},[_,r,g]),S.useEffect(()=>{const $=x.current;return $?.addEventListener("scroll",_),()=>{$?.removeEventListener("scroll",_)}},[_,k]);const A=S.useCallback(()=>{x.current&&(x.current.scrollTo({top:x.current.scrollHeight,behavior:"smooth"}),b(!0))},[]),L=S.useMemo(()=>D.jsx(h2,{className:"relative flex h-full flex-col gap-6 pb-8",ref:x,children:t.map($=>D.jsx(eG,{messageId:$},$))}),[t]),O=D.jsx("div",{className:"flex h-full w-full items-center justify-center",children:D.jsxs("div",{className:"flex w-full max-w-[600px] flex-col gap-4",children:[e?.welcome_message&&D.jsx(Hp,{className:"text-large text-default-900 text-center",remarkPlugins:[Gp],children:e?.welcome_message}),D.jsx("div",{className:"text-small text-default-500 text-center",children:"You can start a conversation by typing in the input box below."})]})}),j=k?L:O;return D.jsxs("div",{className:"relative flex h-full flex-col overflow-y-auto p-6 pb-8",children:[j,D.jsxs("div",{className:"relative mt-auto flex max-w-full flex-col gap-2 px-6",children:[D.jsx(wr,{variant:"solid",onPress:A,className:yn("absolute -top-16 left-1/2 z-10 -translate-x-1/2 transition-all duration-200 ease-out",h&&k?"opacity-100":"pointer-events-none opacity-0"),tabIndex:-1,startContent:D.jsx(ui,{icon:"heroicons:arrow-down"}),children:"Scroll to bottom"}),D.jsx(oG,{isLoading:i,submit:T,stopAnswering:d,followupMessages:s,isDisabled:a})]})]})}function sG(){const t=aI().conversationId;if(!t||typeof t!="string")throw new Error("HistoryRoute expects `conversationId` param to be present in the URL.");return D.jsx(rx,{})}function aG(e){return`/conversation/${e}`}function lG({children:e}){const t=pw(),n=hs(Ih(c=>Object.keys(c.conversations))),{selectConversation:r}=Nw(),s=aI().conversationId,a=s&&typeof s=="string"&&n.includes(s);return S.useEffect(()=>{if(a){r(s);return}const c=n.at(-1);if(!c)throw new Error("No conversation to navigate to");r(c),t(aG(c),{replace:!0})},[n,a,t,r,s]),e}const Ow="ChatHistoryPlugin",E$={name:Ow,components:{ChatHistory:S.lazy(()=>io(()=>import("./ChatHistory-s8UFt7jW.js"),__vite__mapDeps([10,3,4,2])))},routes:[{target:"/",path:"/conversation/:conversationId",element:D.jsx(sG,{})}],routeWrappers:[{target:"/",wrapper:e=>D.jsx(lG,{children:e})}]},uG=S.lazy(()=>io(()=>import("./Login-CGl7weVn.js"),__vite__mapDeps([11,12,2])));function cG(){return D.jsx(S.Suspense,{children:D.jsx(uG,{})})}const fG=S.lazy(()=>io(()=>import("./AuthGuard--P1u3yIa.js"),__vite__mapDeps([13,12])));function dG({children:e}){return D.jsx(S.Suspense,{children:D.jsx(fG,{children:e})})}const P$="AuthPlugin",T$={name:P$,components:{LogoutButton:S.lazy(()=>io(()=>import("./LogoutButton-DwL4EOOH.js"),__vite__mapDeps([14,12])))},routes:[{path:"/login",element:D.jsx(cG,{})}],routeWrappers:[{target:"global",wrapper:e=>D.jsx(dG,{children:e})}]};function pG(){return D.jsx("div",{className:yn("bg-background flex h-screen w-screen items-start justify-center"),children:D.jsxs("div",{className:"text-default-900 m-auto flex flex-col items-center gap-4",children:[D.jsx("p",{className:"text-large",children:"Something went wrong during chat initialization."}),D.jsx("p",{className:"text-small text-default-500",children:"Try refreshing the page."})]})})}function hG({children:e}){const{call:t,...n}=qz("/api/config"),r=S.useMemo(()=>n.data?{config:n.data}:null,[n.data]);return S.useEffect(()=>{if(!n.data)return;const{feedback:i,user_settings:s,conversation_history:a,authentication:c,show_usage:d}=n.data;(i.like.enabled||i.dislike.enabled)&&xr.activate(M2),s.form&&xr.activate(N2),a&&xr.activate(Ow),c.enabled&&xr.activate(P$),d&&xr.activate(S$),xr.activate(z2)},[n.data]),!n.data&&!n.error&&!n.isLoading&&t(),S.useEffect(()=>{document.title=Jz},[]),n.isLoading?D.jsx(Z2,{}):n.error||!r?D.jsx(pG,{}):D.jsx(O2.Provider,{value:r,children:D.jsx(G7,{shouldStoreHistory:r.config.conversation_history,children:e})})}function mG(e,t){return kh(e,n=>{for(const r of t)for(const i of r.routes??[]){if(!i.target){n.push(i);continue}const s=_$(n,i.target);if(!s){console.warn(`Target route "${i.target}" not found`);continue}s.children||(s.children=[]),s.children.push({path:i.path,element:i.element,children:i.children})}})}function _$(e,t){for(const n of e){if(n.path===t)return n;if(n.children){const r=_$(n.children,t);if(r)return r}}}function gG(e,t){const n=r=>r.map(i=>{const s=i.path??"",a=t.filter(h=>h.target==="global"||h.target===s);let c=i.element;for(const{wrapper:h}of a)c=h(c);const d={...i,element:c};return i.children&&(d.children=n(i.children)),d});return n(e)}function vG(){const e=n=>xr.subscribe(n),t=()=>xr.getActivePlugins();return S.useSyncExternalStore(e,t)}function yG(){const e=S.useContext(v2);if(!e)throw new Error("useThemeContext must be used within a ThemeContextProvider");return e}const bG=e=>typeof e=="boolean"||e instanceof Boolean,xG=e=>typeof e=="number"||e instanceof Number,wG=e=>typeof e=="bigint"||e instanceof BigInt,I$=e=>!!e&&e instanceof Date,SG=e=>typeof e=="string"||e instanceof String,kG=e=>Array.isArray(e),CG=e=>typeof e=="object"&&e!==null,$$=e=>!!e&&e instanceof Object&&typeof e=="function";function fv(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function EG(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function A$(e){let{field:t,value:n,data:r,lastElement:i,openBracket:s,closeBracket:a,level:c,style:d,shouldExpandNode:h,clickToExpandNode:m,outerRef:g,beforeExpandChange:b}=e;const x=S.useRef(!1),[k,P]=S.useState(()=>h(c,n,t)),T=S.useRef(null);S.useEffect(()=>{x.current?P(h(c,n,t)):x.current=!0},[h]);const _=S.useId();if(r.length===0)return PG({field:t,openBracket:s,closeBracket:a,lastElement:i,style:d});const A=k?d.collapseIcon:d.expandIcon,L=k?d.ariaLables.collapseJson:d.ariaLables.expandJson,O=c+1,j=r.length-1,$=ie=>{k!==ie&&(!b||b({level:c,value:n,field:t,newExpandValue:ie}))&&P(ie)},Y=ie=>{if(ie.key==="ArrowRight"||ie.key==="ArrowLeft")ie.preventDefault(),$(ie.key==="ArrowRight");else if(ie.key==="ArrowUp"||ie.key==="ArrowDown"){ie.preventDefault();const B=ie.key==="ArrowUp"?-1:1;if(!g.current)return;const W=g.current.querySelectorAll("[role=button]");let G=-1;for(let H=0;H<W.length;H++)if(W[H].tabIndex===0){G=H;break}if(G<0)return;const ee=(G+B+W.length)%W.length;W[G].tabIndex=-1,W[ee].tabIndex=0,W[ee].focus()}},te=()=>{var ie;$(!k);const B=T.current;if(!B)return;const W=(ie=g.current)===null||ie===void 0?void 0:ie.querySelector('[role=button][tabindex="0"]');W&&(W.tabIndex=-1),B.tabIndex=0,B.focus()};return S.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":k,"aria-selected":void 0},S.createElement("span",{className:A,onClick:te,onKeyDown:Y,role:"button","aria-label":L,"aria-expanded":k,"aria-controls":k?_:void 0,ref:T,tabIndex:c===0?0:-1}),(t||t==="")&&(m?S.createElement("span",{className:d.clickableLabel,onClick:te,onKeyDown:Y},fv(t,d.quotesForFieldNames),":"):S.createElement("span",{className:d.label},fv(t,d.quotesForFieldNames),":")),S.createElement("span",{className:d.punctuation},s),k?S.createElement("ul",{id:_,role:"group",className:d.childFieldsContainer},r.map((ie,B)=>S.createElement(R$,{key:ie[0]||B,field:ie[0],value:ie[1],style:d,lastElement:B===j,level:O,shouldExpandNode:h,clickToExpandNode:m,outerRef:g}))):S.createElement("span",{className:d.collapsedContent,onClick:te,onKeyDown:Y}),S.createElement("span",{className:d.punctuation},a),!i&&S.createElement("span",{className:d.punctuation},","))}function PG(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:s}=e;return S.createElement("div",{className:s.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:s.label},fv(t,s.quotesForFieldNames),":"),S.createElement("span",{className:s.punctuation},n),S.createElement("span",{className:s.punctuation},r),!i&&S.createElement("span",{className:s.punctuation},","))}function TG(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:s,clickToExpandNode:a,level:c,outerRef:d,beforeExpandChange:h}=e;return A$({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:s,clickToExpandNode:a,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:d,beforeExpandChange:h})}function _G(e){let{field:t,value:n,style:r,lastElement:i,level:s,shouldExpandNode:a,clickToExpandNode:c,outerRef:d,beforeExpandChange:h}=e;return A$({field:t,value:n,lastElement:i||!1,level:s,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:c,data:n.map(m=>[void 0,m]),outerRef:d,beforeExpandChange:h})}function IG(e){let{field:t,value:n,style:r,lastElement:i}=e,s,a=r.otherValue;return n===null?(s="null",a=r.nullValue):n===void 0?(s="undefined",a=r.undefinedValue):SG(n)?(s=EG(n,!r.noQuotesForStringValues,r.stringifyStringValues),a=r.stringValue):bG(n)?(s=n?"true":"false",a=r.booleanValue):xG(n)?(s=n.toString(),a=r.numberValue):wG(n)?(s=`${n.toString()}n`,a=r.numberValue):I$(n)?s=n.toISOString():$$(n)?s="function() { }":s=n.toString(),S.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:r.label},fv(t,r.quotesForFieldNames),":"),S.createElement("span",{className:a},s),!i&&S.createElement("span",{className:r.punctuation},","))}function R$(e){const t=e.value;return kG(t)?S.createElement(_G,Object.assign({},e)):CG(t)&&!I$(t)&&!$$(t)?S.createElement(TG,Object.assign({},e)):S.createElement(IG,Object.assign({},e))}var Nr={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const $G={collapseJson:"collapse JSON",expandJson:"expand JSON"},Zi={container:Nr["container-light"],basicChildStyle:Nr["basic-element-style"],childFieldsContainer:Nr["child-fields-container"],label:Nr["label-light"],clickableLabel:Nr["clickable-label-light"],nullValue:Nr["value-null-light"],undefinedValue:Nr["value-undefined-light"],stringValue:Nr["value-string-light"],booleanValue:Nr["value-boolean-light"],numberValue:Nr["value-number-light"],otherValue:Nr["value-other-light"],punctuation:Nr["punctuation-light"],collapseIcon:Nr["collapse-icon-light"],expandIcon:Nr["expand-icon-light"],collapsedContent:Nr["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:$G,stringifyStringValues:!1},Mp=()=>!0,Tg=e=>{let{data:t,style:n=Zi,shouldExpandNode:r=Mp,clickToExpandNode:i=!1,beforeExpandChange:s,...a}=e;const c=S.useRef(null);return S.createElement("div",Object.assign({"aria-label":"JSON view"},a,{className:n.container,ref:c,role:"tree"}),S.createElement(R$,{value:t,style:{...Zi,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:c,beforeExpandChange:s}))};function AG(e){return typeof e=="string"?e:`map:${String(e)}`}function Ja(e,t=new WeakSet){if(e===null||typeof e!="object")return typeof e=="bigint"?e.toString():typeof e>"u"||typeof e=="function"?void 0:e;if(t.has(e))return"[Circular]";if(t.add(e),e instanceof Date)return e.toISOString();if(e instanceof Map){const r={};for(const[i,s]of e.entries())r[AG(i)]=Ja(s,t);return r}if(e instanceof Set)return Array.from(e).map(r=>Ja(r,t));if(Array.isArray(e))return e.map(r=>Ja(r,t));const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=Ja(e[r],t);i!==void 0&&(n[r]=i)}return n}const _g={container:"max-w-full overflow-auto rounded bg-default p-2 font-mono font-normal",label:`${Zi.label} !text-default-900`,collapseIcon:`${Zi.collapseIcon} !text-default-900`,expandIcon:`${Zi.expandIcon} !text-default-900`,collapsedContent:`${Zi.collapsedContent} !text-default-900`,punctuation:"!text-default-900",stringValue:`${Zi.stringValue} !text-green-600`,otherValue:`${Zi.otherValue} !text-purple-500`,numberValue:`${Zi.numberValue}`,nullValue:`${Zi.nullValue}`,booleanValue:`${Zi.booleanValue} !text-yellow-600`,undefinedValue:`${Zi.undefinedValue}`};function RG({isOpen:e}){const t=Za(s=>s.history),n=Za(s=>s.followupMessages),r=Za(s=>s.eventsLog),i=hs(Ih(s=>s.computed.getContext()));return D.jsx(ol,{children:e&&D.jsx(Zs.div,{initial:{scale:.6,opacity:0,width:0},animate:{scale:1,opacity:1,width:"100%"},exit:{scale:.6,opacity:0,width:0},className:"w-full max-w-[33%] overflow-hidden px-4",children:D.jsxs("div",{className:"rounded-medium border-small border-divider mr-4 h-full overflow-auto","data-testid":"debug-panel",children:[D.jsx("div",{className:"border-b-small border-divider min-h-16 p-4 text-lg font-bold",children:D.jsx("span",{children:"Debug"})}),D.jsxs(Ak,{className:"max-h-full",children:[D.jsx(bp,{"aria-label":"Context",title:"Context",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Tg,{data:Ja(i)??{},shouldExpandNode:Mp,style:_g})})},"context"),D.jsx(bp,{"aria-label":"History",title:"History",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Tg,{data:Ja(t)??{},shouldExpandNode:Mp,style:_g})})},"history"),D.jsx(bp,{"aria-label":"Followup messages",title:"Followup messages",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Tg,{data:Ja(n)??{},shouldExpandNode:Mp,style:_g})})},"folowup-messages"),D.jsx(bp,{"aria-label":"Events",title:"Events",children:r.length===0?D.jsx("p",{children:"No events in the log"}):D.jsx(Ak,{children:r.map((s,a)=>D.jsx(bp,{"aria-label":`Events for response number ${a+1}`,title:`Events for response number ${a+1}`,children:D.jsx(Tg,{data:Ja(s)??{},shouldExpandNode:Mp,style:_g})},`events-${a+1}`))})},"events")]})]})})})}function L$(e){return LG(e)?!0:DG(e)&&MG(e)}function LG(e){try{return new URL(e),!0}catch{return!1}}function MG(e){try{const t="http://base.local";return new URL(e,t),!0}catch{return!1}}function DG(e){return/^[./~\w%-][\w./~%-]*$/.test(e)}function NG({children:e,title:t,subTitle:n,logo:r,classNames:i}){const s=w$(Ow),{config:a}=Fw(),{newConversation:c,stopAnswering:d}=Nw(),{setTheme:h,theme:m}=yG(),[g,b]=S.useState(!1),x=()=>{h(m===To.DARK?To.LIGHT:To.DARK)},k=S.useCallback(()=>{d(),c()},[c,d]),P=s?.isActivated;return D.jsxs("div",{className:"flex h-full min-h-[48rem] justify-center py-4",children:[D.jsx(Cf,{plugin:E$,component:"ChatHistory",disableSkeleton:!0}),D.jsxs("div",{className:yn("flex grow flex-col px-4 sm:max-w-[1200px]",P&&"pl-0"),children:[D.jsxs("header",{className:yn("border-small border-divider flex h-16 min-h-16 items-center justify-between gap-2 rounded-none px-4 py-3",i?.header,P?"rounded-tr-medium":"rounded-t-medium"),children:[D.jsxs("div",{className:"flex w-full items-center gap-2",children:[L$(r)?D.jsx("img",{src:r,className:"h-8 w-8",width:32,height:32}):D.jsx("div",{className:"bg-foreground flex h-8 w-8 items-center justify-center rounded-full",children:r}),D.jsxs("div",{className:"w-full min-w-[120px] sm:w-auto",children:[D.jsx("div",{className:yn("text-small text-foreground truncate leading-5 font-semibold",i?.title),children:t}),D.jsx("div",{className:yn("text-small text-default-500 truncate leading-5 font-normal",i?.subTitle),children:n})]})]}),D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx(Cf,{plugin:T$,component:"LogoutButton",skeletonSize:{width:"40px",height:"40px"}}),D.jsx(Cf,{plugin:j2,component:"ShareButton",skeletonSize:{width:"40px",height:"40px"}}),!P&&D.jsx(jg,{content:"Clear chat",placement:"bottom",children:D.jsx(wr,{isIconOnly:!0,"aria-label":"Clear chat",variant:"ghost",onPress:k,"data-testid":"layout-clear-chat-button",children:D.jsx(ui,{icon:"heroicons:arrow-path"})})}),D.jsx(jg,{content:"Change theme",placement:"bottom",children:D.jsx(wr,{isIconOnly:!0,"aria-label":`Change theme to ${m===To.DARK?"light":"dark"}`,variant:"ghost",onPress:x,"data-testid":"layout-toggle-theme-button",children:m===To.DARK?D.jsx(ui,{icon:"heroicons:sun"}):D.jsx(ui,{icon:"heroicons:moon"})})}),a.debug_mode&&D.jsx(jg,{content:"Toggle debug panel",placement:"bottom",children:D.jsxs(wr,{isIconOnly:!0,"aria-label":`${g?"Open":"Close"} debug panel`,variant:"ghost",onPress:()=>b(T=>!T),"data-testid":"layout-debug-button",children:[D.jsx(ui,{icon:"heroicons:bug-ant"}),g&&D.jsx("div",{className:"bg-default-500 absolute top-1/2 right-0 left-0 h-0.5 -rotate-45"})]})})]})]}),D.jsx("main",{className:"flex h-full overflow-hidden",children:D.jsx("div",{className:yn("border-divider flex h-full w-full flex-col gap-4 rounded-none border-0 border-r border-b border-l py-3",i?.container,P?"rounded-br-medium":"rounded-b-medium"),children:e})})]}),D.jsx(RG,{isOpen:g})]})}const dE="generated-favicon";function FG(){const{config:{customization:e}}=Fw(),t=S.useMemo(()=>e?.header?.logo??Yz,[e?.header?.logo]),n=S.useMemo(()=>e?.header?.title??Xz,[e?.header?.title]),r=S.useMemo(()=>e?.header?.subtitle??Qz,[e?.header?.subtitle]),i=S.useMemo(()=>e?.meta?.favicon??t,[e?.meta?.favicon,t]),s=S.useMemo(()=>e?.meta?.page_title??n,[e?.meta?.page_title,n]);S.useLayoutEffect(()=>{document.title=s},[s]);const a=c=>{const d=document.createElement("link");d.rel="icon",d.href=c,d.id=dE,document.head.appendChild(d)};return S.useLayoutEffect(()=>{if(document.querySelectorAll("link[rel*='icon']").forEach(d=>d.remove()),L$(i))a(i);else{const d=`
125
+ `))}function d(x,k,P,T){const _=P.enter("tableCell"),A=P.enter("phrasing"),L=P.containerPhrasing(x,{...T,before:s,after:s});return A(),_(),L}function h(x,k){return hW(x,{align:k,alignDelimiters:r,padding:n,stringLength:i})}function m(x,k,P){const T=x.children;let _=-1;const A=[],L=k.enter("table");for(;++_<T.length;)A[_]=g(T[_],k,P);return L(),A}function g(x,k,P){const T=x.children;let _=-1;const A=[],L=k.enter("tableRow");for(;++_<T.length;)A[_]=d(T[_],x,k,P);return L(),A}function b(x,k,P){let T=f$.inlineCode(x,k,P);return P.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function tH(){return{exit:{taskListCheckValueChecked:sE,taskListCheckValueUnchecked:sE,paragraph:rH}}}function nH(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:iH}}}function sE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function rH(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const c=i[s];if(c.type==="paragraph"){a=c;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function iH(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);s&&c.move(a);let d=f$.listItem(e,t,n,{...r,...c.current()});return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(m){return m+a}}function oH(){return[FK(),iW(),lW(),qW(),tH()]}function sH(e){return{extensions:[OK(),oW(e),uW(),eH(e),nH()]}}const aH={tokenize:pH,partial:!0},d$={tokenize:hH,partial:!0},p$={tokenize:mH,partial:!0},h$={tokenize:gH,partial:!0},lH={tokenize:vH,partial:!0},m$={name:"wwwAutolink",tokenize:fH,previous:v$},g$={name:"protocolAutolink",tokenize:dH,previous:y$},sa={name:"emailAutolink",tokenize:cH,previous:b$},ps={};function uH(){return{text:ps}}let du=48;for(;du<123;)ps[du]=sa,du++,du===58?du=65:du===91&&(du=97);ps[43]=sa;ps[45]=sa;ps[46]=sa;ps[95]=sa;ps[72]=[sa,g$];ps[104]=[sa,g$];ps[87]=[sa,m$];ps[119]=[sa,m$];function cH(e,t,n){const r=this;let i,s;return a;function a(g){return!nx(g)||!b$.call(r,r.previous)||Dw(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return nx(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(lH,m,h)(g):g===45||g===95||kr(g)?(s=!0,e.consume(g),d):m(g)}function h(g){return e.consume(g),i=!0,d}function m(g){return s&&i&&Fr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function fH(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!v$.call(r,r.previous)||Dw(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(aH,e.attempt(d$,e.attempt(p$,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function dH(e,t,n){const r=this;let i="",s=!1;return a;function a(g){return(g===72||g===104)&&y$.call(r,r.previous)&&!Dw(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(Fr(g)&&i.length<5)return i+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const b=i.toLowerCase();if(b==="http"||b==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),s?h:(s=!0,d)):n(g)}function h(g){return g===null||av(g)||Vt(g)||Iu(g)||Lv(g)?n(g):e.attempt(d$,e.attempt(p$,m),n)(g)}function m(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function pH(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function hH(e,t,n){let r,i,s;return a;function a(h){return h===46||h===95?e.check(h$,d,c)(h):h===null||Vt(h)||Iu(h)||h!==45&&Lv(h)?d(h):(s=!0,e.consume(h),a)}function c(h){return h===95?r=!0:(i=r,r=void 0),e.consume(h),a}function d(h){return i||r||!s?n(h):t(h)}}function mH(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(h$,t,s)(a):a===null||Vt(a)||Iu(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function gH(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),s):c===93?(e.consume(c),i):c===60||c===null||Vt(c)||Iu(c)?t(c):n(c)}function i(c){return c===null||c===40||c===91||Vt(c)||Iu(c)?t(c):r(c)}function s(c){return Fr(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),r):Fr(c)?(e.consume(c),a):n(c)}}function vH(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return kr(s)?n(s):t(s)}}function v$(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Vt(e)}function y$(e){return!Fr(e)}function b$(e){return!(e===47||nx(e))}function nx(e){return e===43||e===45||e===46||e===95||kr(e)}function Dw(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const yH={tokenize:PH,partial:!0};function bH(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:kH,continuation:{tokenize:CH},exit:EH}},text:{91:{name:"gfmFootnoteCall",tokenize:SH},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:xH,resolveTo:wH}}}}function xH(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const d=r.events[i][1];if(d.type==="labelImage"){a=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!a||!a._balanced)return n(d);const h=Io(r.sliceSerialize({start:a.end,end:r.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function wH(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function SH(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(s>999||g===93&&!a||g===null||g===91||Vt(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return i.includes(Io(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return Vt(g)||(a=!0),s++,e.consume(g),g===92?m:h}function m(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}}function kH(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,c;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(k)}function m(k){if(a>999||k===93&&!c||k===null||k===91||Vt(k))return n(k);if(k===93){e.exit("chunkString");const P=e.exit("gfmFootnoteDefinitionLabelString");return s=Io(r.sliceSerialize(P)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Vt(k)||(c=!0),a++,e.consume(k),k===92?g:m}function g(k){return k===91||k===92||k===93?(e.consume(k),a++,m):m(k)}function b(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ct(e,x,"gfmFootnoteDefinitionWhitespace")):n(k)}function x(k){return t(k)}}function CH(e,t,n){return e.check(Th,t,e.attempt(yH,t,n))}function EH(e){e.exit("gfmFootnoteDefinition")}function PH(e,t,n){const r=this;return Ct(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function TH(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,c){let d=-1;for(;++d<a.length;)if(a[d][0]==="enter"&&a[d][1].type==="strikethroughSequenceTemporary"&&a[d][1]._close){let h=d;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[d][1].end.offset-a[d][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[d][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[d][1].end)},g={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[d][1].start)},b=[["enter",m,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",g,c]],x=c.parser.constructs.insideSpan.null;x&&$i(b,b.length,0,Mv(x,a.slice(h+1,d),c)),$i(b,b.length,0,[["exit",g,c],["enter",a[d][1],c],["exit",a[d][1],c],["exit",m,c]]),$i(a,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<a.length;)a[d][1].type==="strikethroughSequenceTemporary"&&(a[d][1].type="data");return a}function s(a,c,d){const h=this.previous,m=this.events;let g=0;return b;function b(k){return h===126&&m[m.length-1][1].type!=="characterEscape"?d(k):(a.enter("strikethroughSequenceTemporary"),x(k))}function x(k){const P=Df(h);if(k===126)return g>1?d(k):(a.consume(k),g++,x);if(g<2&&!n)return d(k);const T=a.exit("strikethroughSequenceTemporary"),_=Df(k);return T._open=!_||_===2&&!!P,T._close=!P||P===2&&!!_,c(k)}}}class _H{constructor(){this.map=[]}add(t,n,r){IH(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function IH(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function $H(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function AH(){return{flow:{null:{name:"table",tokenize:RH,resolveAll:LH}}}}function RH(e,t,n){const r=this;let i=0,s=0,a;return c;function c(B){let W=r.events.length-1;for(;W>-1;){const H=r.events[W][1].type;if(H==="lineEnding"||H==="linePrefix")W--;else break}const G=W>-1?r.events[W][1].type:null,ee=G==="tableHead"||G==="tableRow"?$:d;return ee===$&&r.parser.lazy[r.now().line]?n(B):ee(B)}function d(B){return e.enter("tableHead"),e.enter("tableRow"),h(B)}function h(B){return B===124||(a=!0,s+=1),m(B)}function m(B){return B===null?n(B):Ye(B)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),x):n(B):vt(B)?Ct(e,m,"whitespace")(B):(s+=1,a&&(a=!1,i+=1),B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),g(B)))}function g(B){return B===null||B===124||Vt(B)?(e.exit("data"),m(B)):(e.consume(B),B===92?b:g)}function b(B){return B===92||B===124?(e.consume(B),g):g(B)}function x(B){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(B):(e.enter("tableDelimiterRow"),a=!1,vt(B)?Ct(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):k(B))}function k(B){return B===45||B===58?T(B):B===124?(a=!0,e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),P):j(B)}function P(B){return vt(B)?Ct(e,T,"whitespace")(B):T(B)}function T(B){return B===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),_):B===45?(s+=1,_(B)):B===null||Ye(B)?O(B):j(B)}function _(B){return B===45?(e.enter("tableDelimiterFiller"),A(B)):j(B)}function A(B){return B===45?(e.consume(B),A):B===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(B))}function L(B){return vt(B)?Ct(e,O,"whitespace")(B):O(B)}function O(B){return B===124?k(B):B===null||Ye(B)?!a||i!==s?j(B):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(B)):j(B)}function j(B){return n(B)}function $(B){return e.enter("tableRow"),Y(B)}function Y(B){return B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),Y):B===null||Ye(B)?(e.exit("tableRow"),t(B)):vt(B)?Ct(e,Y,"whitespace")(B):(e.enter("data"),te(B))}function te(B){return B===null||B===124||Vt(B)?(e.exit("data"),Y(B)):(e.consume(B),B===92?ie:te)}function ie(B){return B===92||B===124?(e.consume(B),te):te(B)}}function LH(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],c=!1,d=0,h,m,g;const b=new _H;for(;++n<e.length;){const x=e[n],k=x[1];x[0]==="enter"?k.type==="tableHead"?(c=!1,d!==0&&(aE(b,t,d,h,m),m=void 0,d=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",m,t]])),i=k.type==="tableDelimiterRow"?2:m?3:1):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],g=Pg(b,t,s,i,void 0,g),s=[0,0,0,0]),a[2]=n)):k.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],g=Pg(b,t,s,i,void 0,g)),s=a,a=[s[1],n,0,0])):k.type==="tableHead"?(c=!0,d=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(d=n,s[1]!==0?(a[0]=a[1],g=Pg(b,t,s,i,n,g)):a[1]!==0&&(g=Pg(b,t,a,i,n,g)),i=0):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(a[3]=n)}for(d!==0&&aE(b,t,d,h,m),b.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=$H(t.events,n))}return e}function Pg(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(s.end=Object.assign({},df(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const d=df(t.events,n[1]);if(s={type:a,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const h=df(t.events,n[2]),m=df(t.events,n[3]),g={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",g,t]]),r!==2){const b=t.events[n[2]],x=t.events[n[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,P=n[3]-n[2]-1;e.add(k,P,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return i!==void 0&&(s.end=Object.assign({},df(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function aE(e,t,n,r,i){const s=[],a=df(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function df(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const MH={name:"tasklistCheck",tokenize:NH};function DH(){return{text:{91:MH}}}function NH(e,t,n){const r=this;return i;function i(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return Vt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),a):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),a):n(d)}function a(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Ye(d)?t(d):vt(d)?e.check({tokenize:FH},t,n)(d):n(d)}}function FH(e,t,n){return Ct(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function OH(e){return $I([uH(),bH(),TH(e),AH(),DH()])}const zH={};function Gp(e){const t=this,n=e||zH,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(OH(n)),s.push(oH()),a.push(sH(n))}const lE=e=>Symbol.iterator in e,uE=e=>"entries"in e,cE=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[i,s]of n)if(!Object.is(s,r.get(i)))return!1;return!0},jH=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let i=n.next(),s=r.next();for(;!i.done&&!s.done;){if(!Object.is(i.value,s.value))return!1;i=n.next(),s=r.next()}return!!i.done&&!!s.done};function BH(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:lE(e)&&lE(t)?uE(e)&&uE(t)?cE(e,t):jH(e,t):cE({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function Ih(e){const t=He.useRef(void 0);return n=>{const r=e(n);return BH(t.current,r)?t.current:t.current=r}}const hs=e=>{const t=S.useContext(J2);if(!t||!t.store)throw new Error("useHistoryStore must be used within a HistoryStoreContextProvider");return B2(t.store,e)},Nw=()=>hs(e=>e.actions),tq=()=>hs(e=>e.primitives),Za=e=>hs(Ih(t=>e(t.primitives.getCurrentConversation()))),x$=e=>hs(t=>e?t.primitives.getCurrentConversation().history[e]:void 0),VH=()=>hs(Ih(e=>Object.keys(e.primitives.getCurrentConversation().history))),UH=()=>hs(Ih(e=>Object.values(e.primitives.getCurrentConversation().history))),KH=()=>hs(e=>{const t=e.primitives.getCurrentConversation().history;return Object.values(t).some(n=>n.confirmationStates&&Object.values(n.confirmationStates).some(r=>r==="pending"))}),fE=({content:e,classNames:t})=>D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-900 max-w-full",t),remarkPlugins:[Gp],components:{pre:({children:n})=>D.jsx("pre",{className:"bg-default text-default-900 mt-2 mb-2 max-w-full overflow-auto rounded p-2 font-mono text-[90%] font-normal",children:n}),code:({children:n})=>D.jsx("code",{className:"bg-default text-default-900 rounded px-1 py-0.5 font-mono text-[85%] font-normal",children:n})},children:e}),WH=2;function HH({duration:e,className:t,children:n}){return D.jsx(Zs.div,{className:yn("from-default-600 via-default-200 to-default-600 relative inline-block bg-gradient-to-r bg-clip-text text-transparent",t),initial:{backgroundPosition:"200% 0%"},animate:{backgroundPosition:"-200% 0%"},transition:{duration:e??WH,repeat:1/0,ease:"linear"},style:{backgroundSize:"400% 100%"},children:n})}function GH({shouldShimmer:e,liveUpdates:t,classNames:n}){const[r,i]=S.useState(!1),s=Object.values(t),a=S.useCallback(()=>i(g=>!g),[]),c=s.length>1,d=s[s.length-1],h=s.slice(0,-1),m=Math.max((d.description??"").length,d.label.length)/10;return D.jsxs("div",{className:yn("flex flex-col",c&&"cursor-pointer"),onClick:a,children:[D.jsx(Zs.div,{initial:!1,animate:{height:r?"auto":0,opacity:r?1:0,marginBottom:r?"0.5rem":0},transition:{duration:.3,ease:"easeInOut"},style:{overflow:"hidden"},children:D.jsx("div",{className:"flex flex-col gap-2",children:h.map((g,b)=>D.jsxs(Zs.div,{initial:{opacity:0,y:-10},animate:{opacity:r?1:0,y:r?0:-10},transition:{duration:.3},style:{pointerEvents:r?"auto":"none"},children:[D.jsx("div",{className:"text-default-500",children:g.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-400 max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:g.description})]},b))})}),D.jsxs("div",{className:"flex items-center gap-4",children:[D.jsx("div",{className:"relative overflow-hidden bg-transparent",children:e?D.jsxs(HH,{duration:m,children:[D.jsx("div",{children:d.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:d.description})]}):D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"text-default-500",children:d.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-400 max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:d.description})]})}),c&&D.jsx(wr,{variant:"light",isIconOnly:!0,onPress:a,"data-testid":"live-updates-expand",children:D.jsx(Zs.div,{initial:{rotate:0},animate:{rotate:r?180:0},transition:{duration:.3},children:D.jsx(ui,{icon:"heroicons:chevron-down"})})})]})]})}const qH=({images:e})=>{const{isOpen:t,onOpen:n,onClose:r}=Bz(),[i,s]=S.useState(0),a=Object.entries(e).map(([m,g])=>({src:g,alt:m})),c=m=>{s(m),n()},d=S.useCallback(()=>{s(m=>m===0?a.length-1:m-1)},[a.length]),h=S.useCallback(()=>{s(m=>m===a.length-1?0:m+1)},[a.length]);return S.useEffect(()=>{if(!t)return;const m=g=>{switch(g.key){case"ArrowLeft":g.preventDefault(),d();break;case"ArrowRight":g.preventDefault(),h();break;case"Escape":g.preventDefault(),r();break}};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t,d,h,r]),D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"xs:grid-cols-4 grid grid-cols-3 gap-2 sm:grid-cols-6 md:grid-cols-8 lg:grid-cols-12",children:a.map((m,g)=>D.jsx("div",{className:"relative aspect-square cursor-pointer overflow-hidden rounded-lg",onClick:()=>c(g),children:D.jsx(y0,{src:m.src,alt:m.alt,className:"h-full w-full rounded-lg object-cover transition-transform hover:scale-125",classNames:{wrapper:"h-full w-full",img:"h-full w-full object-cover"}})},m.alt))}),D.jsx(jz,{isOpen:t,onClose:r,size:"full",hideCloseButton:!0,classNames:{backdrop:"bg-black/90",wrapper:"p-0",base:"bg-transparent shadow-none m-0",body:"p-0"},children:D.jsx(Fz,{children:D.jsxs(Iz,{className:"relative flex min-h-screen items-center justify-center p-4",children:[D.jsx(wr,{isIconOnly:!0,variant:"flat",className:"absolute top-4 right-4 z-50 bg-black/50 text-white",onPress:r,children:D.jsx(ui,{icon:"heroicons:x-mark",className:"h-6 w-6"})}),a.length>1&&D.jsxs(D.Fragment,{children:[D.jsx(wr,{isIconOnly:!0,variant:"flat",className:"absolute top-1/2 left-4 z-50 -translate-y-1/2 bg-black/50 text-white",onPress:d,children:D.jsx(ui,{icon:"heroicons:chevron-left",className:"h-6 w-6"})}),D.jsx(wr,{isIconOnly:!0,variant:"flat",className:"absolute top-1/2 right-4 z-50 -translate-y-1/2 bg-black/50 text-white",onPress:h,children:D.jsx(ui,{icon:"heroicons:chevron-right",className:"h-6 w-6"})})]}),D.jsx("div",{className:"relative flex max-h-[90vh] max-w-[90vw] items-center justify-center",children:D.jsx(y0,{src:a[i]?.src,alt:a[i]?.alt,className:"max-h-full max-w-full object-contain",classNames:{wrapper:"max-w-full max-h-full",img:"max-w-full max-h-full object-contain"}})}),a.length>1&&D.jsx("div",{className:"absolute bottom-16 left-1/2 flex max-w-[90vw] -translate-x-1/2 gap-2 overflow-x-auto rounded bg-black/30 p-2",children:a.map((m,g)=>D.jsx("button",{onClick:()=>s(g),className:yn("flex-shrink-0 overflow-hidden border-2 border-transparent transition-all",g===i?"z-10 scale-125":"hover:scale-110"),children:D.jsx(y0,{src:m.src,alt:m.alt,className:"h-12 w-12 rounded-lg object-cover",classNames:{wrapper:"w-12 h-12",img:"w-12 h-12 object-cover"}})},m.alt))}),a.length>1&&D.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full bg-black/50 px-4 py-2",children:D.jsxs("span",{className:"text-sm font-medium text-white",children:[i+1," / ",a.length]})})]})})})]})},YH=({references:e})=>D.jsx("div",{className:"text-default-500 text-xs italic",children:D.jsx("ul",{className:"list-disc pl-4",children:e.map((t,n)=>D.jsx("li",{children:D.jsx("a",{href:t.url??void 0,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:t.title})},n))})}),jg=e=>D.jsx(nz,{delay:300,closeDelay:0,...e}),w$=e=>{const t=r=>xr.subscribe(r),n=()=>xr.getPlugin(e);return S.useSyncExternalStore(t,n)},Cf=({plugin:e,component:t,skeletonSize:n,disableSkeleton:r,componentProps:i})=>{const s=w$(e.name),a=n?{width:n.width,height:n.height}:{};if(!s)return null;const c=s.config.components[t];try{return D.jsx(S.Suspense,{fallback:r?null:D.jsx(Uz,{className:"rounded-lg",style:a}),children:D.jsx(c,{...i||{}})})}catch(d){return console.error(d),null}},S$="UsagePluginName",k$={name:S$,components:{UsageButton:S.lazy(()=>io(()=>import("./UsageButton-B-N1J-sZ.js"),__vite__mapDeps([9,4,5,6])))}},XH=({content:e,serverId:t,message:n})=>{const[r,i]=S.useState("heroicons:clipboard"),s=S.useRef(null),a=async()=>{await navigator.clipboard.writeText(e),i("heroicons:check"),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{i("heroicons:clipboard")},2e3)};return D.jsxs("div",{className:"flex items-center gap-2",children:[n.usage&&Object.keys(n.usage).length>=1&&D.jsx(Cf,{plugin:k$,component:"UsageButton",componentProps:{usage:n.usage},skeletonSize:{width:"88px",height:"40px"}}),D.jsx(jg,{content:"Copy",placement:"bottom",children:D.jsx(wr,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Copy message",onPress:a,children:D.jsx(ui,{icon:r,"data-testid":"chat-message-copy-icon","data-icon":r})})}),t&&D.jsx(Cf,{plugin:D2,component:"FeedbackForm",componentProps:{message:n},skeletonSize:{width:"88px",height:"40px"}})]})},QH=()=>D.jsx("div",{className:"text-default-500 flex items-center gap-2",children:D.jsx(ui,{icon:"heroicons:arrow-path",className:"animate-spin","data-testid":"loading-indicator"})}),JH=({confirmationRequests:e,confirmationStates:t,onConfirm:n,onSkip:r,onBulkConfirm:i,onBulkSkip:s,isLoading:a})=>{const[c,d]=S.useState(new Set),h=Object.values(e),m=j=>{const $=Object.entries(j);return $.length===0?"":$.slice(0,3).map(([Y,te])=>{const ie=typeof te=="string"?te.length>30?`${te.substring(0,30)}...`:te:JSON.stringify(te);return`${Y}: ${ie}`}).join(", ")},g=j=>{if(j.tool_description)return j.tool_description;const $=j.arguments,Y=j.tool_name.replace(/_/g," "),te=$.email||$.to||$.name||$.id||$.event_id;return te?`${Y}: ${te}`:`Execute ${Y}`},b=h.filter(j=>t[j.confirmation_id]==="pending"),x=b.length>0,k=c.size>0,P=j=>{d($=>{const Y=new Set($);return Y.has(j)?Y.delete(j):Y.add(j),Y})},T=()=>{const j=b.map($=>$.confirmation_id);i(j),d(new Set)},_=()=>{const j=b.map($=>$.confirmation_id);s(j),d(new Set)},A=()=>{const j=Array.from(c).filter($=>t[$]==="pending");i(j),d(new Set)},L=j=>{n(j),d($=>{const Y=new Set($);return Y.delete(j),Y})},O=j=>{r(j),d($=>{const Y=new Set($);return Y.delete(j),Y})};return D.jsx(ol,{children:D.jsxs(Zs.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:"my-2 flex flex-col gap-3",children:[x&&D.jsxs("div",{role:"status","aria-live":"polite",className:"sr-only",children:[b.length," confirmation",b.length>1?"s":""," pending"]}),x&&D.jsxs("div",{className:"flex flex-wrap gap-2",children:[D.jsxs(wr,{size:"sm",color:"success",variant:"solid",onPress:T,isDisabled:a,"aria-label":`Confirm all ${b.length} pending actions`,children:["✓ Confirm All (",b.length,")"]}),D.jsx(wr,{size:"sm",color:"default",variant:"bordered",onPress:_,isDisabled:a,"aria-label":`Skip all ${b.length} pending actions`,children:"⏭ Skip All"}),k&&D.jsxs(wr,{size:"sm",color:"success",variant:"flat",onPress:A,isDisabled:a,"aria-label":`Confirm ${c.size} selected actions`,children:["✓ Confirm Selected (",c.size,")"]})]}),D.jsx("div",{className:`flex flex-col gap-2 ${h.length>3?"max-h-[400px] overflow-y-auto pr-2":""}`,children:h.map(j=>{const $=t[j.confirmation_id]||"pending",Y=$==="pending",te=$==="skipped",ie=g(j),B=m(j.arguments),W=c.has(j.confirmation_id);return D.jsxs(Zs.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.2},className:`rounded-medium border-small flex items-center gap-3 p-3 ${te?"border-default bg-default-100/50 opacity-60 grayscale":Y?"border-warning bg-warning-50/50":$==="confirmed"?"border-success bg-success-50/50":"border-danger bg-danger-50/50"}`,children:[Y&&D.jsx(e2,{isSelected:W,onValueChange:()=>P(j.confirmation_id),size:"sm",className:"shrink-0",isDisabled:a}),D.jsxs("div",{className:"min-w-0 flex-1",children:[D.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[$==="pending"&&D.jsx(wg,{size:"sm",color:"warning",variant:"flat",children:"⚠️ Confirmation needed"}),$==="confirmed"&&D.jsx(wg,{size:"sm",color:"success",variant:"flat",children:"✅ Confirmed"}),$==="declined"&&D.jsx(wg,{size:"sm",color:"default",variant:"flat",children:"❌ Declined"}),$==="skipped"&&D.jsx(wg,{size:"sm",color:"default",variant:"flat",children:"⏭️ Handled naturally"})]}),D.jsx("p",{className:"text-small text-default-700 font-medium",children:ie}),B&&Y&&D.jsx("p",{className:"text-tiny text-default-500 mt-1 truncate",id:`conf-args-${j.confirmation_id}`,children:B})]}),Y&&D.jsxs("div",{className:"flex shrink-0 gap-2",children:[D.jsx(wr,{size:"sm",color:"success",variant:"solid",onPress:()=>L(j.confirmation_id),isDisabled:a,"aria-label":`Confirm ${j.tool_name}: ${ie}`,"aria-describedby":B?`conf-args-${j.confirmation_id}`:void 0,children:"Do it"}),D.jsx(wr,{size:"sm",color:"default",variant:"bordered",onPress:()=>O(j.confirmation_id),isDisabled:a,"aria-label":`Skip ${j.tool_name}: ${ie}`,children:"Skip"})]})]},j.confirmation_id)})})]},"confirmation-dialogs")})};class ZH{nodes=new Map;roots=[];constructor(t){this.buildTree(t)}buildTree(t){for(const n of t)this.nodes.set(n.id,{...n,children:[]});for(const n of this.nodes.values())if(n.parent_id){const r=this.nodes.get(n.parent_id);r?(r.children.push(n),r.children.sort((i,s)=>i.order-s.order)):(this.roots.push(n),this.roots.sort((i,s)=>i.order-s.order))}else this.roots.push(n),this.roots.sort((r,i)=>r.order-i.order)}*iterate(){function*t(n){for(const r of n)yield r,yield*t(r.children)}yield*t(this.roots)}get(t){return this.nodes.get(t)}update(t,n){const r=this.nodes.get(t);r&&(Object.assign(r,n),n.order!==void 0&&(r.parent_id?this.nodes.get(r.parent_id)?.children.sort((s,a)=>s.order-a.order):this.roots.sort((i,s)=>i.order-s.order)),n.status==="completed"&&this.completeChildren(r))}completeChildren(t){for(const n of t.children)n.status="completed",this.completeChildren(n)}getRoots(){return this.roots}}function C$({tasks:e,depth:t=0}){const n=new ZH(e);return D.jsx("div",{className:"space-y-2","data-testid":`todo-list-root-${t}`,children:n.getRoots().map(({id:r,description:i,status:s,summary:a,children:c})=>{const d=D.jsx(o2,{size:"sm",color:"primary","aria-label":"Task is in progress",className:"m-0 p-0",classNames:{svg:"w-4 h-4"}});return D.jsxs("div",{"data-testid":`todo-task-${r}`,children:[D.jsx("div",{children:D.jsxs(e2,{isSelected:s===lf.Completed,disabled:!0,className:"block",icon:s===lf.InProgress?()=>d:void 0,classNames:{hiddenInput:"cursor-default",wrapper:yn(s===lf.InProgress&&"before:border-none"),base:"pointer-events-none hover:bg-transparent",label:yn("transition-colors",s===lf.Completed&&"line-through text-default-400",s===lf.InProgress&&"text-primary italic",s===lf.Pending&&"text-default-900")},children:[i,a&&D.jsx("p",{className:"ml-7",children:a})]})}),c.length>0&&D.jsx("div",{style:{marginLeft:`${(t+1)*.5}rem`},"data-testid":`todo-children-wrapper-${r}`,children:D.jsx(C$,{tasks:c,depth:t+1})})]},`${r}-${s}`)})})}const eG=S.forwardRef(({messageId:e,classNames:t},n)=>{const r=Za(le=>le.lastMessageId),i=Za(le=>le.isLoading),s=x$(e),a=hs(le=>le.actions.sendSilentConfirmation),{client:c}=nw();if(!s)throw new Error("Tried to render non-existent message");const{serverId:d,content:h,role:m,references:g,liveUpdates:b,images:x,confirmationRequests:k,confirmationStates:P,error:T}=s,_=m===Sf.User,A=i&&m===Sf.Assistant&&e===r,[L,O]=S.useState(!1),j=A&&!b&&!h.length,$=!A,Y=!A&&x&&Object.keys(x).length>0,te=!A&&g&&g.length>0,ie=b&&Object.keys(b).length>0,B=k&&Object.keys(k).length>0,W=async le=>{try{await a(e,le,!0,c)}catch(J){console.error(J)}},G=async le=>{try{await a(e,le,!1,c)}catch(J){console.error(J)}},ee=async le=>{const J=k?Object.keys(k):[],X=J.reduce((V,ae)=>({...V,[ae]:le.includes(ae)}),{});try{await a(e,J,X,c)}catch(V){console.error(V)}},H=async le=>{const X=(k?Object.keys(k):[]).reduce((V,ae)=>({...V,[ae]:!1}),{});try{await a(e,le,X,c)}catch(V){console.error(V)}};return D.jsx("div",{ref:n,"data-testid":"chat-message-wrapper",className:yn("flex gap-3",{"flex-row-reverse":_},t?.wrapper),children:D.jsx("div",{className:yn(!L&&"motion-safe:animate-pop-in","flex flex-col gap-4",_&&"max-w-[75%]",!_&&"w-full"),onAnimationEnd:()=>O(!0),children:D.jsx("div",{className:yn("rounded-medium text-default relative px-4 py-3",_&&"bg-default-100",t?.innerWrapper),children:_?D.jsx(fE,{content:h,classNames:t?.content}):D.jsxs("div",{className:"flex flex-col gap-2",children:[j&&D.jsx(QH,{}),ie&&D.jsx(GH,{shouldShimmer:A,liveUpdates:b,classNames:{liveUpdates:t?.liveUpdates}}),s.tasks&&s.tasks.length>0&&D.jsx(ol,{children:D.jsxs(Zs.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"rounded-medium text-large text-default-900 border-default flex w-fit flex-col gap-2 border p-4",children:[D.jsx("p",{children:"Execution plan"}),D.jsx(C$,{tasks:s.tasks})]},`${s.id}-execution-plan`)}),B&&P&&D.jsx(JH,{confirmationRequests:k,confirmationStates:P,onConfirm:W,onSkip:G,onBulkConfirm:ee,onBulkSkip:H,isLoading:A}),s.hasConfirmationBreak&&D.jsx("div",{className:"border-divider my-2 border-t"}),D.jsx(fE,{content:h,classNames:t?.content}),T&&D.jsxs("div",{"data-testid":"message-error",className:"bg-danger-50 border-danger-200 text-danger-700 rounded-medium flex items-center gap-2 border px-3 py-2",role:"alert",children:[D.jsx(ui,{icon:"heroicons:exclamation-triangle",className:"text-danger h-5 w-5 flex-shrink-0"}),D.jsx("span",{className:"text-small",children:T})]}),Y&&D.jsx(qH,{images:x}),te&&D.jsx(YH,{references:g}),$&&D.jsx(XH,{content:h,serverId:d,message:s})]})})})})}),tG=S.forwardRef(({classNames:e={},...t},n)=>D.jsx(Ez,{ref:n,className:"min-h-[50px]",classNames:e,...t}));function nG({isVisible:e,actions:t,sendMessage:n}){return D.jsx(ol,{children:e&&D.jsx(Zs.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{overflow:"hidden",opacity:0,height:0},transition:{type:"tween",ease:"easeInOut",duration:.3},children:D.jsx(h2,{className:yn("flex flex-nowrap gap-2 py-2 transition-all"),orientation:"horizontal",role:"group","aria-label":"Predefined message actions","aria-roledescription":"Horizontal scrollable list","data-testid":"horizontal-actions",children:D.jsx("div",{className:"m-auto flex gap-2",children:t.map((r,i)=>D.jsx(wr,{className:"flex",variant:"flat",onPress:()=>n(r),"aria-label":`Send message: ${r}`,children:D.jsx("p",{children:r})},i))})})},"horizontal-actions")})}function rG(){const e=s=>{const a=window.getComputedStyle(s),c=document.createElement("div");return c.style.whiteSpace="pre-wrap",c.style.wordWrap="break-word",c.style.position="absolute",c.style.visibility="hidden",c.style.font=a.font,c.style.lineHeight=a.lineHeight,c.style.padding=a.padding,c.style.border=a.border,c.style.boxSizing=a.boxSizing,c.style.width=`${s.clientWidth}px`,c},t=S.useCallback(s=>{const a=s.value.slice(0,s.selectionStart),c=e(s),d=window.getComputedStyle(s),h=document.createElement("span");h.textContent="​",c.textContent=a,c.appendChild(h),document.body.appendChild(c);const m=h.offsetTop,g=parseFloat(d.lineHeight||"16"),b=Math.round(m/g);return document.body.removeChild(c),b},[]),n=S.useCallback(s=>{const a=e(s),c=window.getComputedStyle(s);let d=s.value;(d.endsWith(`
126
+ `)||d==="")&&(d+="​"),a.textContent=d,document.body.appendChild(a);const h=a.offsetHeight,m=parseFloat(c.lineHeight||"16"),g=Math.round(h/m);return document.body.removeChild(a),g},[]),r=S.useCallback(s=>t(s)===0,[t]),i=S.useCallback(s=>{const a=t(s),c=n(s);return a===c-1},[t,n]);return{isCaretInFirstLine:r,isCaretInLastLine:i}}const iG=({followupMessages:e,submit:t,stopAnswering:n,isLoading:r,formProps:i,inputProps:s,sendButtonProps:a,customSendIcon:c,customStopIcon:d,history:h,isDisabled:m=!1})=>{const[g,b]=S.useState(""),[x,k]=S.useState([]),P=S.useRef(null),T=S.useRef(null),{isCaretInFirstLine:_,isCaretInLastLine:A}=rG(),L=S.useRef(Math.max(x.length-1,0)),O=S.useCallback(()=>{const G=x[L.current];b(G)},[x]),j=S.useCallback(()=>{L.current=Math.max(L.current-1,0),O()},[O]),$=S.useCallback(()=>{L.current=Math.min(x.length-1,L.current+1),O()},[x,O]),Y=S.useCallback(G=>{!g&&!G||m||(n(),t(G??g),k(ee=>{const H=ee.slice(0,-1);return H.push(G??g),H}),b(""),T?.current?.focus())},[g,n,t,m]),te=S.useCallback(G=>{G.target===P.current&&(G.preventDefault(),Y())},[Y]),ie=S.useCallback(G=>{if(T.current){if(G.key==="ArrowUp"){if(!_(T.current))return;G.preventDefault(),j()}if(G.key==="ArrowDown"){if(!A(T.current))return;G.preventDefault(),$()}G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),Y())}},[Y,_,A,$,j]),B=S.useCallback(()=>{n(),T?.current?.focus()},[n]),W=S.useCallback(G=>{k(ee=>{const H=[...ee];return H[L.current]=G,H}),b(G)},[]);return S.useEffect(()=>{const G=(h??[]).filter(ee=>ee.role===Sf.User).map(ee=>ee.content);x.length-1!==G.length&&(G.push(""),L.current=Math.max(G.length-1,0),k(G))},[h,x.length]),D.jsxs("div",{className:"rounded-medium",children:[D.jsx(nG,{isVisible:!!e,actions:e??[],sendMessage:G=>Y(G)}),D.jsxs(U6,{className:"rounded-medium bg-default-100 dark:bg-default-100 flex w-full flex-row items-center pr-2 pl-0",validationBehavior:"native",onSubmit:te,ref:P,...i,children:[D.jsx(tG,{ref:T,"aria-label":"Message to the chat",classNames:{input:"text-medium text-default-foreground",inputWrapper:"!bg-transparent shadow-none group-data-[focus-visible=true]:ring-0 group-data-[focus-visible=true]:ring-offset-0 py-4"},name:"message",placeholder:m?"Please respond to pending confirmation...":"Enter a message here",autoFocus:!0,maxRows:16,minRows:1,value:g,onKeyDown:ie,onValueChange:W,"data-testid":"prompt-input-input","data-value":g,isDisabled:m,...s}),D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx(Cf,{plugin:F2,component:"ChatOptionsForm",skeletonSize:{width:"40px",height:"40px"}}),D.jsx(wr,{isIconOnly:!0,"aria-label":r?"Stop answering":"Send message to the chat",color:!r&&!g?"default":"primary",isDisabled:!r&&(!g||m),radius:"full",size:"sm",type:r?"button":"submit",onPress:r?B:void 0,"data-testid":"send-message",...a,children:D.jsxs(D.Fragment,{children:[!r&&(c??D.jsx(ui,{className:yn(g?"text-primary-foreground":"text-default-600"),icon:"heroicons:arrow-up","data-testid":"prompt-input-send-icon",width:20})),r&&(d??D.jsx(ui,{className:"text-primary-foreground",icon:"heroicons:stop","data-testid":"prompt-input-stop-icon",width:20}))]})})]})]})]})};function oG({...e}){const t=UH();return D.jsx(iG,{...e,history:t})}const Fw=()=>{const e=S.useContext(O2);if(!e)throw new Error("useChat must be used within a ConfigContextProvider");return e};function rx(){const{config:{customization:e}}=Fw(),t=VH(),n=Za($=>$.lastMessageId),r=x$(n),i=Za($=>$.isLoading),s=Za($=>$.followupMessages),a=KH(),{sendMessage:c,stopAnswering:d}=Nw(),[h,m]=S.useState(!1),[g,b]=S.useState(!0),x=S.useRef(null),k=S.useMemo(()=>t.length>0,[t.length]),{client:P}=nw(),T=$=>{c($,P)},_=S.useCallback(()=>{if(!x.current)return;const te=x.current,ie=te.scrollHeight-te.scrollTop-te.clientHeight;m(ie>100),b(!1),ie>25?b(!1):b(!0)},[]);S.useEffect(()=>{b(!0),t.length===0&&m(!1)},[t.length]),S.useEffect(()=>{if(x.current&&g){const $=x.current;$.scrollTop=$.scrollHeight}},[_,r,g]),S.useEffect(()=>{const $=x.current;return $?.addEventListener("scroll",_),()=>{$?.removeEventListener("scroll",_)}},[_,k]);const A=S.useCallback(()=>{x.current&&(x.current.scrollTo({top:x.current.scrollHeight,behavior:"smooth"}),b(!0))},[]),L=S.useMemo(()=>D.jsx(h2,{className:"relative flex h-full flex-col gap-6 pb-8",ref:x,children:t.map($=>D.jsx(eG,{messageId:$},$))}),[t]),O=D.jsx("div",{className:"flex h-full w-full items-center justify-center",children:D.jsxs("div",{className:"flex w-full max-w-[600px] flex-col gap-4",children:[e?.welcome_message&&D.jsx(Hp,{className:"text-large text-default-900 text-center",remarkPlugins:[Gp],children:e?.welcome_message}),D.jsx("div",{className:"text-small text-default-500 text-center",children:"You can start a conversation by typing in the input box below."})]})}),j=k?L:O;return D.jsxs("div",{className:"relative flex h-full flex-col overflow-y-auto p-6 pb-8",children:[j,D.jsxs("div",{className:"relative mt-auto flex max-w-full flex-col gap-2 px-6",children:[D.jsx(wr,{variant:"solid",onPress:A,className:yn("absolute -top-16 left-1/2 z-10 -translate-x-1/2 transition-all duration-200 ease-out",h&&k?"opacity-100":"pointer-events-none opacity-0"),tabIndex:-1,startContent:D.jsx(ui,{icon:"heroicons:arrow-down"}),children:"Scroll to bottom"}),D.jsx(oG,{isLoading:i,submit:T,stopAnswering:d,followupMessages:s,isDisabled:a})]})]})}function sG(){const t=aI().conversationId;if(!t||typeof t!="string")throw new Error("HistoryRoute expects `conversationId` param to be present in the URL.");return D.jsx(rx,{})}function aG(e){return`/conversation/${e}`}function lG({children:e}){const t=pw(),n=hs(Ih(c=>Object.keys(c.conversations))),{selectConversation:r}=Nw(),s=aI().conversationId,a=s&&typeof s=="string"&&n.includes(s);return S.useEffect(()=>{if(a){r(s);return}const c=n.at(-1);if(!c)throw new Error("No conversation to navigate to");r(c),t(aG(c),{replace:!0})},[n,a,t,r,s]),e}const Ow="ChatHistoryPlugin",E$={name:Ow,components:{ChatHistory:S.lazy(()=>io(()=>import("./ChatHistory-Cp_DhrUx.js"),__vite__mapDeps([10,3,4,2])))},routes:[{target:"/",path:"/conversation/:conversationId",element:D.jsx(sG,{})}],routeWrappers:[{target:"/",wrapper:e=>D.jsx(lG,{children:e})}]},uG=S.lazy(()=>io(()=>import("./Login-Djq6QJ18.js"),__vite__mapDeps([11,12,2])));function cG(){return D.jsx(S.Suspense,{children:D.jsx(uG,{})})}const fG=S.lazy(()=>io(()=>import("./AuthGuard-B326tmZN.js"),__vite__mapDeps([13,12])));function dG({children:e}){return D.jsx(S.Suspense,{children:D.jsx(fG,{children:e})})}const P$="AuthPlugin",T$={name:P$,components:{LogoutButton:S.lazy(()=>io(()=>import("./LogoutButton-Cn2L63Hk.js"),__vite__mapDeps([14,12])))},routes:[{path:"/login",element:D.jsx(cG,{})}],routeWrappers:[{target:"global",wrapper:e=>D.jsx(dG,{children:e})}]};function pG(){return D.jsx("div",{className:yn("bg-background flex h-screen w-screen items-start justify-center"),children:D.jsxs("div",{className:"text-default-900 m-auto flex flex-col items-center gap-4",children:[D.jsx("p",{className:"text-large",children:"Something went wrong during chat initialization."}),D.jsx("p",{className:"text-small text-default-500",children:"Try refreshing the page."})]})})}function hG({children:e}){const{call:t,...n}=qz("/api/config"),r=S.useMemo(()=>n.data?{config:n.data}:null,[n.data]);return S.useEffect(()=>{if(!n.data)return;const{feedback:i,user_settings:s,conversation_history:a,authentication:c,show_usage:d}=n.data;(i.like.enabled||i.dislike.enabled)&&xr.activate(M2),s.form&&xr.activate(N2),a&&xr.activate(Ow),c.enabled&&xr.activate(P$),d&&xr.activate(S$),xr.activate(z2)},[n.data]),!n.data&&!n.error&&!n.isLoading&&t(),S.useEffect(()=>{document.title=Jz},[]),n.isLoading?D.jsx(Z2,{}):n.error||!r?D.jsx(pG,{}):D.jsx(O2.Provider,{value:r,children:D.jsx(G7,{shouldStoreHistory:r.config.conversation_history,children:e})})}function mG(e,t){return kh(e,n=>{for(const r of t)for(const i of r.routes??[]){if(!i.target){n.push(i);continue}const s=_$(n,i.target);if(!s){console.warn(`Target route "${i.target}" not found`);continue}s.children||(s.children=[]),s.children.push({path:i.path,element:i.element,children:i.children})}})}function _$(e,t){for(const n of e){if(n.path===t)return n;if(n.children){const r=_$(n.children,t);if(r)return r}}}function gG(e,t){const n=r=>r.map(i=>{const s=i.path??"",a=t.filter(h=>h.target==="global"||h.target===s);let c=i.element;for(const{wrapper:h}of a)c=h(c);const d={...i,element:c};return i.children&&(d.children=n(i.children)),d});return n(e)}function vG(){const e=n=>xr.subscribe(n),t=()=>xr.getActivePlugins();return S.useSyncExternalStore(e,t)}function yG(){const e=S.useContext(v2);if(!e)throw new Error("useThemeContext must be used within a ThemeContextProvider");return e}const bG=e=>typeof e=="boolean"||e instanceof Boolean,xG=e=>typeof e=="number"||e instanceof Number,wG=e=>typeof e=="bigint"||e instanceof BigInt,I$=e=>!!e&&e instanceof Date,SG=e=>typeof e=="string"||e instanceof String,kG=e=>Array.isArray(e),CG=e=>typeof e=="object"&&e!==null,$$=e=>!!e&&e instanceof Object&&typeof e=="function";function fv(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function EG(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function A$(e){let{field:t,value:n,data:r,lastElement:i,openBracket:s,closeBracket:a,level:c,style:d,shouldExpandNode:h,clickToExpandNode:m,outerRef:g,beforeExpandChange:b}=e;const x=S.useRef(!1),[k,P]=S.useState(()=>h(c,n,t)),T=S.useRef(null);S.useEffect(()=>{x.current?P(h(c,n,t)):x.current=!0},[h]);const _=S.useId();if(r.length===0)return PG({field:t,openBracket:s,closeBracket:a,lastElement:i,style:d});const A=k?d.collapseIcon:d.expandIcon,L=k?d.ariaLables.collapseJson:d.ariaLables.expandJson,O=c+1,j=r.length-1,$=ie=>{k!==ie&&(!b||b({level:c,value:n,field:t,newExpandValue:ie}))&&P(ie)},Y=ie=>{if(ie.key==="ArrowRight"||ie.key==="ArrowLeft")ie.preventDefault(),$(ie.key==="ArrowRight");else if(ie.key==="ArrowUp"||ie.key==="ArrowDown"){ie.preventDefault();const B=ie.key==="ArrowUp"?-1:1;if(!g.current)return;const W=g.current.querySelectorAll("[role=button]");let G=-1;for(let H=0;H<W.length;H++)if(W[H].tabIndex===0){G=H;break}if(G<0)return;const ee=(G+B+W.length)%W.length;W[G].tabIndex=-1,W[ee].tabIndex=0,W[ee].focus()}},te=()=>{var ie;$(!k);const B=T.current;if(!B)return;const W=(ie=g.current)===null||ie===void 0?void 0:ie.querySelector('[role=button][tabindex="0"]');W&&(W.tabIndex=-1),B.tabIndex=0,B.focus()};return S.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":k,"aria-selected":void 0},S.createElement("span",{className:A,onClick:te,onKeyDown:Y,role:"button","aria-label":L,"aria-expanded":k,"aria-controls":k?_:void 0,ref:T,tabIndex:c===0?0:-1}),(t||t==="")&&(m?S.createElement("span",{className:d.clickableLabel,onClick:te,onKeyDown:Y},fv(t,d.quotesForFieldNames),":"):S.createElement("span",{className:d.label},fv(t,d.quotesForFieldNames),":")),S.createElement("span",{className:d.punctuation},s),k?S.createElement("ul",{id:_,role:"group",className:d.childFieldsContainer},r.map((ie,B)=>S.createElement(R$,{key:ie[0]||B,field:ie[0],value:ie[1],style:d,lastElement:B===j,level:O,shouldExpandNode:h,clickToExpandNode:m,outerRef:g}))):S.createElement("span",{className:d.collapsedContent,onClick:te,onKeyDown:Y}),S.createElement("span",{className:d.punctuation},a),!i&&S.createElement("span",{className:d.punctuation},","))}function PG(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:s}=e;return S.createElement("div",{className:s.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:s.label},fv(t,s.quotesForFieldNames),":"),S.createElement("span",{className:s.punctuation},n),S.createElement("span",{className:s.punctuation},r),!i&&S.createElement("span",{className:s.punctuation},","))}function TG(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:s,clickToExpandNode:a,level:c,outerRef:d,beforeExpandChange:h}=e;return A$({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:s,clickToExpandNode:a,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:d,beforeExpandChange:h})}function _G(e){let{field:t,value:n,style:r,lastElement:i,level:s,shouldExpandNode:a,clickToExpandNode:c,outerRef:d,beforeExpandChange:h}=e;return A$({field:t,value:n,lastElement:i||!1,level:s,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:c,data:n.map(m=>[void 0,m]),outerRef:d,beforeExpandChange:h})}function IG(e){let{field:t,value:n,style:r,lastElement:i}=e,s,a=r.otherValue;return n===null?(s="null",a=r.nullValue):n===void 0?(s="undefined",a=r.undefinedValue):SG(n)?(s=EG(n,!r.noQuotesForStringValues,r.stringifyStringValues),a=r.stringValue):bG(n)?(s=n?"true":"false",a=r.booleanValue):xG(n)?(s=n.toString(),a=r.numberValue):wG(n)?(s=`${n.toString()}n`,a=r.numberValue):I$(n)?s=n.toISOString():$$(n)?s="function() { }":s=n.toString(),S.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:r.label},fv(t,r.quotesForFieldNames),":"),S.createElement("span",{className:a},s),!i&&S.createElement("span",{className:r.punctuation},","))}function R$(e){const t=e.value;return kG(t)?S.createElement(_G,Object.assign({},e)):CG(t)&&!I$(t)&&!$$(t)?S.createElement(TG,Object.assign({},e)):S.createElement(IG,Object.assign({},e))}var Nr={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const $G={collapseJson:"collapse JSON",expandJson:"expand JSON"},Zi={container:Nr["container-light"],basicChildStyle:Nr["basic-element-style"],childFieldsContainer:Nr["child-fields-container"],label:Nr["label-light"],clickableLabel:Nr["clickable-label-light"],nullValue:Nr["value-null-light"],undefinedValue:Nr["value-undefined-light"],stringValue:Nr["value-string-light"],booleanValue:Nr["value-boolean-light"],numberValue:Nr["value-number-light"],otherValue:Nr["value-other-light"],punctuation:Nr["punctuation-light"],collapseIcon:Nr["collapse-icon-light"],expandIcon:Nr["expand-icon-light"],collapsedContent:Nr["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:$G,stringifyStringValues:!1},Mp=()=>!0,Tg=e=>{let{data:t,style:n=Zi,shouldExpandNode:r=Mp,clickToExpandNode:i=!1,beforeExpandChange:s,...a}=e;const c=S.useRef(null);return S.createElement("div",Object.assign({"aria-label":"JSON view"},a,{className:n.container,ref:c,role:"tree"}),S.createElement(R$,{value:t,style:{...Zi,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:c,beforeExpandChange:s}))};function AG(e){return typeof e=="string"?e:`map:${String(e)}`}function Ja(e,t=new WeakSet){if(e===null||typeof e!="object")return typeof e=="bigint"?e.toString():typeof e>"u"||typeof e=="function"?void 0:e;if(t.has(e))return"[Circular]";if(t.add(e),e instanceof Date)return e.toISOString();if(e instanceof Map){const r={};for(const[i,s]of e.entries())r[AG(i)]=Ja(s,t);return r}if(e instanceof Set)return Array.from(e).map(r=>Ja(r,t));if(Array.isArray(e))return e.map(r=>Ja(r,t));const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=Ja(e[r],t);i!==void 0&&(n[r]=i)}return n}const _g={container:"max-w-full overflow-auto rounded bg-default p-2 font-mono font-normal",label:`${Zi.label} !text-default-900`,collapseIcon:`${Zi.collapseIcon} !text-default-900`,expandIcon:`${Zi.expandIcon} !text-default-900`,collapsedContent:`${Zi.collapsedContent} !text-default-900`,punctuation:"!text-default-900",stringValue:`${Zi.stringValue} !text-green-600`,otherValue:`${Zi.otherValue} !text-purple-500`,numberValue:`${Zi.numberValue}`,nullValue:`${Zi.nullValue}`,booleanValue:`${Zi.booleanValue} !text-yellow-600`,undefinedValue:`${Zi.undefinedValue}`};function RG({isOpen:e}){const t=Za(s=>s.history),n=Za(s=>s.followupMessages),r=Za(s=>s.eventsLog),i=hs(Ih(s=>s.computed.getContext()));return D.jsx(ol,{children:e&&D.jsx(Zs.div,{initial:{scale:.6,opacity:0,width:0},animate:{scale:1,opacity:1,width:"100%"},exit:{scale:.6,opacity:0,width:0},className:"w-full max-w-[33%] overflow-hidden px-4",children:D.jsxs("div",{className:"rounded-medium border-small border-divider mr-4 h-full overflow-auto","data-testid":"debug-panel",children:[D.jsx("div",{className:"border-b-small border-divider min-h-16 p-4 text-lg font-bold",children:D.jsx("span",{children:"Debug"})}),D.jsxs(Ak,{className:"max-h-full",children:[D.jsx(bp,{"aria-label":"Context",title:"Context",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Tg,{data:Ja(i)??{},shouldExpandNode:Mp,style:_g})})},"context"),D.jsx(bp,{"aria-label":"History",title:"History",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Tg,{data:Ja(t)??{},shouldExpandNode:Mp,style:_g})})},"history"),D.jsx(bp,{"aria-label":"Followup messages",title:"Followup messages",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Tg,{data:Ja(n)??{},shouldExpandNode:Mp,style:_g})})},"folowup-messages"),D.jsx(bp,{"aria-label":"Events",title:"Events",children:r.length===0?D.jsx("p",{children:"No events in the log"}):D.jsx(Ak,{children:r.map((s,a)=>D.jsx(bp,{"aria-label":`Events for response number ${a+1}`,title:`Events for response number ${a+1}`,children:D.jsx(Tg,{data:Ja(s)??{},shouldExpandNode:Mp,style:_g})},`events-${a+1}`))})},"events")]})]})})})}function L$(e){return LG(e)?!0:DG(e)&&MG(e)}function LG(e){try{return new URL(e),!0}catch{return!1}}function MG(e){try{const t="http://base.local";return new URL(e,t),!0}catch{return!1}}function DG(e){return/^[./~\w%-][\w./~%-]*$/.test(e)}function NG({children:e,title:t,subTitle:n,logo:r,classNames:i}){const s=w$(Ow),{config:a}=Fw(),{newConversation:c,stopAnswering:d}=Nw(),{setTheme:h,theme:m}=yG(),[g,b]=S.useState(!1),x=()=>{h(m===To.DARK?To.LIGHT:To.DARK)},k=S.useCallback(()=>{d(),c()},[c,d]),P=s?.isActivated;return D.jsxs("div",{className:"flex h-full min-h-[48rem] justify-center py-4",children:[D.jsx(Cf,{plugin:E$,component:"ChatHistory",disableSkeleton:!0}),D.jsxs("div",{className:yn("flex grow flex-col px-4 sm:max-w-[1200px]",P&&"pl-0"),children:[D.jsxs("header",{className:yn("border-small border-divider flex h-16 min-h-16 items-center justify-between gap-2 rounded-none px-4 py-3",i?.header,P?"rounded-tr-medium":"rounded-t-medium"),children:[D.jsxs("div",{className:"flex w-full items-center gap-2",children:[L$(r)?D.jsx("img",{src:r,className:"h-8 w-8",width:32,height:32}):D.jsx("div",{className:"bg-foreground flex h-8 w-8 items-center justify-center rounded-full",children:r}),D.jsxs("div",{className:"w-full min-w-[120px] sm:w-auto",children:[D.jsx("div",{className:yn("text-small text-foreground truncate leading-5 font-semibold",i?.title),children:t}),D.jsx("div",{className:yn("text-small text-default-500 truncate leading-5 font-normal",i?.subTitle),children:n})]})]}),D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx(Cf,{plugin:T$,component:"LogoutButton",skeletonSize:{width:"40px",height:"40px"}}),D.jsx(Cf,{plugin:j2,component:"ShareButton",skeletonSize:{width:"40px",height:"40px"}}),!P&&D.jsx(jg,{content:"Clear chat",placement:"bottom",children:D.jsx(wr,{isIconOnly:!0,"aria-label":"Clear chat",variant:"ghost",onPress:k,"data-testid":"layout-clear-chat-button",children:D.jsx(ui,{icon:"heroicons:arrow-path"})})}),D.jsx(jg,{content:"Change theme",placement:"bottom",children:D.jsx(wr,{isIconOnly:!0,"aria-label":`Change theme to ${m===To.DARK?"light":"dark"}`,variant:"ghost",onPress:x,"data-testid":"layout-toggle-theme-button",children:m===To.DARK?D.jsx(ui,{icon:"heroicons:sun"}):D.jsx(ui,{icon:"heroicons:moon"})})}),a.debug_mode&&D.jsx(jg,{content:"Toggle debug panel",placement:"bottom",children:D.jsxs(wr,{isIconOnly:!0,"aria-label":`${g?"Open":"Close"} debug panel`,variant:"ghost",onPress:()=>b(T=>!T),"data-testid":"layout-debug-button",children:[D.jsx(ui,{icon:"heroicons:bug-ant"}),g&&D.jsx("div",{className:"bg-default-500 absolute top-1/2 right-0 left-0 h-0.5 -rotate-45"})]})})]})]}),D.jsx("main",{className:"flex h-full overflow-hidden",children:D.jsx("div",{className:yn("border-divider flex h-full w-full flex-col gap-4 rounded-none border-0 border-r border-b border-l py-3",i?.container,P?"rounded-br-medium":"rounded-b-medium"),children:e})})]}),D.jsx(RG,{isOpen:g})]})}const dE="generated-favicon";function FG(){const{config:{customization:e}}=Fw(),t=S.useMemo(()=>e?.header?.logo??Yz,[e?.header?.logo]),n=S.useMemo(()=>e?.header?.title??Xz,[e?.header?.title]),r=S.useMemo(()=>e?.header?.subtitle??Qz,[e?.header?.subtitle]),i=S.useMemo(()=>e?.meta?.favicon??t,[e?.meta?.favicon,t]),s=S.useMemo(()=>e?.meta?.page_title??n,[e?.meta?.page_title,n]);S.useLayoutEffect(()=>{document.title=s},[s]);const a=c=>{const d=document.createElement("link");d.rel="icon",d.href=c,d.id=dE,document.head.appendChild(d)};return S.useLayoutEffect(()=>{if(document.querySelectorAll("link[rel*='icon']").forEach(d=>d.remove()),L$(i))a(i);else{const d=`
127
127
  <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64">
128
128
  <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle"
129
129
  font-family="sans-serif" font-size="48">${i}</text>