@kingsimba/nc-ui 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var kt=Object.defineProperty;var Ct=(n,e,t)=>e in n?kt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var H=(n,e,t)=>Ct(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),g=require("react"),we=require("react-dom"),W=require("./GeneratedIcons-ngKoQh-9.cjs"),jt=require("./clsx-C11secjj.cjs");function Pe({size:n="default",color:e,overlay:t=!1,className:s=""}){const r=d.jsx("svg",{className:`nc-activity-indicator nc-${n} ${s}`,viewBox:"0 0 50 50",style:e?{color:e}:void 0,children:d.jsx("circle",{className:"nc-activity-indicator-circle",cx:"25",cy:"25",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round"})});return t?d.jsx("div",{className:"nc-activity-indicator-overlay",children:r}):r}function X({variant:n="default",block:e,size:t="default",className:s,disabled:r,textSelectable:i,loading:o,onClick:a,children:l,...u}){const f=["nc-button",n!=="default"?`nc-${n}`:"",e?"nc-block":"",t==="small"?"nc-small":"",t==="large"?"nc-large":"",r||o?"nc-disabled":"",i?"nc-text-selectable":"",o?"nc-loading":"",s??""].filter(Boolean).join(" "),h=c=>{if(!o){if(i){const p=window.getSelection();if(p&&p.toString().length>0)return}a==null||a(c)}};return d.jsxs("button",{className:f,disabled:r||o,onClick:h,...u,children:[o&&d.jsx(Pe,{size:"small",className:"nc-button-spinner",color:n!=="default"&&n!=="ghost"?"white":void 0}),l]})}function Lt({code:n,text:e,type:t,button:s,onAction:r}){return d.jsxs("div",{className:`nc-alert nc-${t}`,children:[d.jsxs("span",{className:`nc-alert-message nc-${t}`,children:[d.jsx("span",{className:"nc-alert-code",children:n}),e]}),s&&d.jsx("span",{className:"nc-alert-action",children:d.jsx(X,{size:"small",variant:s.variant??(t==="error"?"danger":"warning"),onClick:r,children:s.text})})]})}function Rt({percentage:n=.5,status:e="discharging",darkMode:t=!1,colored:s=!1}){const r=Math.max(0,Math.min(1,Number(n)||0));let i;s?r<.1?i="var(--nc-danger)":r<.2?i="var(--nc-warning)":i="var(--nc-success)":i=t?"#ffffff":"#000000";const o=t?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.2)",a=24,l=14,u=2,f=0,h=12,c=0,p=0,b=0,x=a,m=l,S=m-c*2,w=x-c*2,A=Math.max(1,Math.min(4,m/4)),y=r===0?0:.05+r*.95,k=a+u+h,N=20,v=.65,$=Math.max(l,N*v),L=a+u+1,M=(l-N*v)/2;return d.jsxs("svg",{className:"nc-battery",width:k,height:$,viewBox:`0 0 ${k} ${$}`,role:"img","aria-label":`Battery ${r===0?"-":Math.round(r*100)+"%"} ${e}`,children:[d.jsxs("defs",{children:[d.jsx("mask",{id:`nc-battery-fill-mask-${r}`,children:d.jsx("rect",{x:"0",y:"0",width:w*y,height:S,fill:"white"})}),d.jsxs("mask",{id:`nc-battery-text-mask-${r}`,children:[d.jsx("rect",{x:"0",y:"0",width:k,height:$,fill:"white"}),d.jsx("text",{x:p+x/2,y:l-3,fontSize:11,fontWeight:"bold",fill:"black",textAnchor:"middle",children:r===0?"-":Math.round(r*100)})]})]}),d.jsxs("g",{mask:`url(#nc-battery-text-mask-${r})`,children:[d.jsx("rect",{x:p,y:b,rx:A,ry:A,width:x,height:m,fill:o}),d.jsx("rect",{x:p+c,y:b+c,width:w,height:S,fill:i,rx:A,ry:A,mask:`url(#nc-battery-fill-mask-${r})`}),d.jsx("rect",{x:a+f,y:l*.26,width:u,height:l*.48,rx:.8,ry:.8,fill:r===1?i:o}),e==="charging"?d.jsx("g",{transform:`translate(${L}, ${M}) scale(${v})`,fill:i,children:d.jsx("path",{d:"M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z"})}):null]})]})}function At({value:n,onChange:e,options:t,disabled:s,labels:r,size:i="default"}){return d.jsx("div",{className:`nc-button-group ${i==="small"?"nc-small":""}`,children:t.map((o,a)=>d.jsx("button",{className:`nc-button-group-item ${n===o?"nc-active":""} ${a<t.length-1?"nc-has-border":""}`,onClick:()=>!s&&e(o),disabled:s,children:r&&r[o]?r[o]:o},o))})}function $t({size:n}){return d.jsx("svg",{className:`nc-checkbox-icon ${n==="small"?"nc-small":""}`,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d.jsx("path",{d:"M2 6L5 9L10 3",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function It({checked:n,onChange:e,disabled:t,label:s,size:r="default",labelColor:i,style:o,className:a=""}){const l=r==="small";return d.jsxs("label",{className:`nc-checkbox-label ${l?"nc-small":""} ${t?"nc-disabled":""} ${a}`.trim(),style:o,onClick:u=>{t||(u.preventDefault(),e(!n))},children:[d.jsx("span",{role:"checkbox","aria-checked":n,tabIndex:0,className:`nc-checkbox-box ${l?"nc-small":""} ${n?"nc-checked":""}`,onKeyDown:u=>{t||(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),e(!n))},children:n&&d.jsx($t,{size:r})}),s&&d.jsx("span",{className:"nc-checkbox-text",style:i?{color:i}:void 0,children:s})]})}function Pt(){if(console&&console.warn){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];ee(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const Ve={};function je(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];ee(e[0])&&Ve[e[0]]||(ee(e[0])&&(Ve[e[0]]=new Date),Pt(...e))}const it=(n,e)=>()=>{if(n.isInitialized)e();else{const t=()=>{setTimeout(()=>{n.off("initialized",t)},0),e()};n.on("initialized",t)}},He=(n,e,t)=>{n.loadNamespaces(e,it(n,t))},Ue=(n,e,t,s)=>{ee(t)&&(t=[t]),t.forEach(r=>{n.options.ns.indexOf(r)<0&&n.options.ns.push(r)}),n.loadLanguages(e,it(n,s))},Ot=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=e.languages[0],r=e.options?e.options.fallbackLng:!1,i=e.languages[e.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=e.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};return t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!o(e.isLanguageChangingTo,n)?!1:!!(e.hasResourceBundle(s,n)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||o(s,n)&&(!r||o(i,n)))},Et=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(je("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(n,{lng:t.lng,precheck:(r,i)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,n))return!1}}):Ot(n,e,t)},ee=n=>typeof n=="string",Tt=n=>typeof n=="object"&&n!==null,Mt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,zt={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Dt=n=>zt[n],Ft=n=>n.replace(Mt,Dt);let Bt={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Ft};const Vt=()=>Bt;let Ht;const Ut=()=>Ht,Kt=g.createContext();class Wt{constructor(){H(this,"getUsedNamespaces",()=>Object.keys(this.usedNamespaces));this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}}const Gt=(n,e)=>{const t=g.useRef();return g.useEffect(()=>{t.current=n},[n,e]),t.current},ot=(n,e,t,s)=>n.getFixedT(e,t,s),Jt=(n,e,t,s)=>g.useCallback(ot(n,e,t,s),[n,e,t,s]),Z=function(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:t}=e,{i18n:s,defaultNS:r}=g.useContext(Kt)||{},i=t||s||Ut();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new Wt),!i){je("You will need to pass in an i18next instance by using initReactI18next");const y=(N,v)=>ee(v)?v:Tt(v)&&ee(v.defaultValue)?v.defaultValue:Array.isArray(N)?N[N.length-1]:N,k=[y,{},!1];return k.t=y,k.i18n={},k.ready=!1,k}i.options.react&&i.options.react.wait!==void 0&&je("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...Vt(),...i.options.react,...e},{useSuspense:a,keyPrefix:l}=o;let u=r||i.options&&i.options.defaultNS;u=ee(u)?[u]:u||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(u);const f=(i.isInitialized||i.initializedStoreOnce)&&u.every(y=>Et(y,i,o)),h=Jt(i,e.lng||null,o.nsMode==="fallback"?u:u[0],l),c=()=>h,p=()=>ot(i,e.lng||null,o.nsMode==="fallback"?u:u[0],l),[b,x]=g.useState(c);let m=u.join();e.lng&&(m=`${e.lng}${m}`);const S=Gt(m),w=g.useRef(!0);g.useEffect(()=>{const{bindI18n:y,bindI18nStore:k}=o;w.current=!0,!f&&!a&&(e.lng?Ue(i,e.lng,u,()=>{w.current&&x(p)}):He(i,u,()=>{w.current&&x(p)})),f&&S&&S!==m&&w.current&&x(p);const N=()=>{w.current&&x(p)};return y&&i&&i.on(y,N),k&&i&&i.store.on(k,N),()=>{w.current=!1,y&&i&&y.split(" ").forEach(v=>i.off(v,N)),k&&i&&k.split(" ").forEach(v=>i.store.off(v,N))}},[i,m]),g.useEffect(()=>{w.current&&f&&x(c)},[i,l,f]);const A=[b,i,f];if(A.t=b,A.i18n=i,A.ready=f,f||!f&&!a)return A;throw new Promise(y=>{e.lng?Ue(i,e.lng,u,()=>y()):He(i,u,()=>y())})};function Yt({option:n,onChange:e,selected:t,highlighted:s,small:r}){const i=g.useRef(null),{t:o}=Z();return g.useEffect(()=>{s&&i.current&&i.current.scrollIntoView({block:"nearest"})},[s]),d.jsxs("div",{ref:i,className:`nc-combo-dropdown-option ${r?"nc-small":""} ${s?"nc-highlighted":""}`,role:"option",onMouseDown:()=>e(n.value),"aria-selected":t,style:{cursor:"pointer",background:s?"rgba(59,130,246,0.18)":t?"rgba(59,130,246,0.12)":void 0},children:[n.label,n.default&&d.jsxs("span",{style:{fontSize:"0.85em",color:"var(--nc-text-weak)",marginLeft:6},children:["(",o("common.default"),")"]})]})}function qt({isOpen:n,options:e,onSelect:t,selectedValue:s,placement:r="bottom",anchorRef:i,small:o,highlightedIndex:a=-1}){const[l,u]=g.useState({top:0,left:0,width:0}),[f,h]=g.useState(r),{t:c}=Z();if(g.useEffect(()=>{if(n&&i.current){const b=i.current.getBoundingClientRect();let x=r;if(r==="bottom"){const m=window.innerHeight-b.bottom,S=b.top;m<320&&S>m&&(x="top")}h(x),u({top:x==="top"?b.top-4:b.bottom+4,left:b.left,width:b.width})}},[n,i,r]),!n)return null;const p=d.jsx("div",{className:"nc-combo-dropdown",style:{position:"fixed",top:f==="top"?void 0:l.top,bottom:f==="top"?window.innerHeight-l.top:void 0,left:l.left,width:l.width,zIndex:1e3,maxHeight:300,overflowY:"auto"},children:e.length===0?d.jsx("div",{className:`nc-combo-dropdown-option nc-no-results ${o?"nc-small":""}`,children:c("common.noResults")}):e.map((b,x)=>d.jsx(Yt,{option:b,onChange:t,selected:b.value===s,highlighted:x===a,small:o},b.value))});return we.createPortal(p,document.body)}function Qt({onClick:n,small:e}){return d.jsx("button",{className:`nc-button nc-ghost nc-combo-button nc-combo-clear ${e?"nc-small":""}`,onClick:n,onMouseDown:t=>t.stopPropagation(),"aria-label":"Clear selection",children:"✕"})}function Xt({open:n,onClick:e,small:t}){return d.jsx("button",{className:`nc-button nc-ghost nc-combo-button nc-combo-toggle ${t?"nc-small":""} ${n?"nc-open":""}`,onClick:e,onMouseDown:s=>s.stopPropagation(),"aria-label":n?"Close":"Open",children:"▾"})}function Zt({value:n,onChange:e,placeholder:t="Select…",options:s,disabled:r,label:i,clearable:o=!0,allowTyping:a=!1,placement:l="bottom",size:u="default",style:f,className:h}){const[c,p]=g.useState(!1),[b,x]=g.useState(""),[m,S]=g.useState(-1),w=g.useRef(null),A=g.useRef(null),y=u==="small",{t:k}=Z(),N=g.useMemo(()=>{const R=b.toLowerCase();return a?s.filter(P=>P.label.toLowerCase().includes(R)):s},[s,b,a]);g.useEffect(()=>{c&&S(-1)},[c,N]),g.useEffect(()=>{if(!o&&!n&&s.length>0&&e){const R=s.find(P=>P.default)||s[0];e(R.value)}},[o,n,s,e]),g.useEffect(()=>{function R(P){var E;P.target instanceof Node&&w.current&&((E=w.current.parentElement)!=null&&E.contains(P.target)||p(!1))}return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[]);const v=s.find(R=>R.value===n),$=v&&o,L=!r&&!$,M=!(c&&a)&&!!v,T=(R,P=!1)=>{var E;e==null||e(R),p(!1),x(""),P&&((E=w.current)==null||E.blur())},I=()=>{e==null||e(void 0),x(""),p(!1)},G=R=>{if(!c){(R.key==="ArrowDown"||R.key==="ArrowUp")&&(p(!0),R.preventDefault());return}switch(R.key){case"ArrowDown":R.preventDefault(),S(P=>{const E=P+1;return E>=N.length?0:E});break;case"ArrowUp":R.preventDefault(),S(P=>{const E=P-1;return E<0?N.length-1:E});break;case"Enter":R.preventDefault(),m>=0&&m<N.length&&T(N[m].value,!0);break;case"Escape":R.preventDefault(),p(!1),x("");break}};return d.jsxs("div",{className:`nc-combo-container ${h||""}`.trim(),style:{position:"relative",...f},children:[i&&d.jsx("span",{className:`nc-label ${y?"nc-small":""}`,children:i}),d.jsxs("div",{ref:A,style:{position:"relative",display:"flex",alignItems:"center"},onMouseDown:R=>{r||a&&R.target===w.current||(p(P=>(!P&&a&&v&&x(v.label),!P)),a&&!c&&setTimeout(()=>{var P,E;(P=w.current)==null||P.focus(),(E=w.current)==null||E.select()},0))},children:[d.jsx("input",{ref:w,className:`nc-input ${y?"nc-small":""}`,placeholder:t,onFocus:()=>{var R;!r&&a&&(p(!0),v&&(x(v.label),setTimeout(()=>{var P;return(P=w.current)==null?void 0:P.select()},0))),a||(R=w.current)==null||R.blur()},onChange:R=>a&&x(R.target.value),onKeyDown:G,value:c&&a?b:(v==null?void 0:v.label)||"",readOnly:r||!a,style:{width:"100%",paddingRight:L||$?y?32:44:12,caretColor:a?void 0:"transparent",cursor:a?void 0:"pointer",userSelect:a?void 0:"none",color:M?"transparent":"var(--nc-text)"}}),M&&d.jsxs("div",{"aria-hidden":!0,style:{position:"absolute",left:y?8:12,right:L||$?y?12:24:y?8:12,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",display:"flex",alignItems:"center",gap:6,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[d.jsx("span",{className:`nc-combo-overlay-text ${y?"nc-small":""}`,children:v==null?void 0:v.label}),(v==null?void 0:v.default)&&d.jsxs("span",{className:`nc-combo-overlay-default ${y?"nc-small":""}`,children:["(",k("common.default"),")"]})]}),$&&d.jsx(Qt,{onClick:I,small:y}),L&&d.jsx(Xt,{open:c,onClick:()=>p(R=>!R),small:y})]}),d.jsx(qt,{isOpen:c,options:N,onSelect:T,selectedValue:n,placement:l,anchorRef:A,small:y,highlightedIndex:m})]})}function _t({onClick:n,loading:e=!1,disabled:t=!1,size:s="default",title:r,"aria-label":i}){const o=s==="small"?14:s==="large"?20:18,a=e?"Refreshing...":"Refresh",l=e?"Refreshing":"Refresh";return d.jsx("button",{className:"nc-icon-button",onClick:n,disabled:t||e,title:r??a,"aria-label":i??l,"data-size":s,children:d.jsx(W.RefreshIcon,{size:o,className:e?"nc-spinning":""})})}function Oe({onClick:n,disabled:e=!1,size:t="default",title:s="Close","aria-label":r="Close"}){const i=t==="small"?14:t==="large"?20:18;return d.jsx("button",{className:"nc-icon-button nc-icon-button-close",onClick:n,disabled:e,title:s,"aria-label":r,"data-size":t,children:d.jsx(W.CloseIcon,{size:i})})}function en({onClick:n,disabled:e=!1,size:t="default",title:s="Edit","aria-label":r="Edit"}){const i=t==="small"?14:t==="large"?20:18;return d.jsx("button",{className:"nc-icon-button nc-icon-button-edit",onClick:n,disabled:e,title:s,"aria-label":r,"data-size":t,children:d.jsx(W.EditIcon,{size:i})})}function tn({onClick:n,disabled:e=!1,size:t="default",title:s="Delete","aria-label":r="Delete"}){const i=t==="small"?14:t==="large"?20:18;return d.jsx("button",{className:"nc-icon-button nc-icon-button-trash",onClick:n,disabled:e,title:s,"aria-label":r,"data-size":t,children:d.jsx(W.TrashIcon,{size:i})})}function nn({onClick:n,disabled:e=!1,children:t,title:s,"aria-label":r,size:i="default"}){return d.jsx("button",{className:"nc-hyperlink",onClick:n,disabled:e,title:s,"aria-label":r,"data-size":i,children:t})}function sn({open:n,onClose:e,options:t,anchorRef:s,anchor:r,preferredDirection:i="down"}){const o=g.useRef(null),[a,l]=g.useState({top:0,left:0}),u=r||(s==null?void 0:s.current);if(g.useEffect(()=>{if(!n||!u||!o.current)return;const h=u.getBoundingClientRect(),c=o.current.getBoundingClientRect(),p=window.innerHeight,b=h.bottom+8,x=b+c.height<=p-8;let m=i;(!x&&i==="down"||i==="up"&&x)&&(m="up");let S;m==="down"?S=b:S=h.top-c.height-8;const w=h.left;l({top:Math.max(8,S),left:Math.max(8,w)})},[n,u,i]),g.useEffect(()=>{if(!n)return;const h=p=>{o.current&&!o.current.contains(p.target)&&u&&!u.contains(p.target)&&e()},c=p=>{p.key==="Escape"&&e()};return document.addEventListener("mousedown",h),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",c)}},[n,e,u]),!n)return null;const f=h=>{h.disabled||(h.onClick(),e())};return we.createPortal(d.jsx("div",{ref:o,className:"nc-context-menu",style:{position:"fixed",top:`${a.top}px`,left:`${a.left}px`,zIndex:1e4},role:"menu",children:t.map(h=>d.jsxs("button",{className:`nc-context-menu-item ${h.variant==="danger"?"nc-danger":""} ${h.disabled?"nc-disabled":""}`,onClick:()=>f(h),disabled:h.disabled,role:"menuitem",children:[h.icon&&d.jsx("span",{className:"nc-context-menu-icon",children:h.icon}),d.jsx("span",{className:"nc-context-menu-label",children:h.label})]},h.id))}),document.body)}const at=g.createContext(null);function lt(){const n=g.useContext(at);if(!n)throw new Error("useDialog must be used inside a Dialog component");return n}function _({children:n,onClick:e,...t}){const{close:s}=lt(),{t:r}=Z(),i=o=>{e==null||e(o),s()};return d.jsx(X,{onClick:i,...t,children:n??r("common.close")})}function se(n){if(n!==void 0)return typeof n=="number"?`${n}px`:n}function rn({open:n,onClose:e,title:t,children:s,width:r=360,height:i,minWidth:o,minHeight:a,maxWidth:l="95vw",maxHeight:u="95vh",footerType:f="ok-cancel",footer:h,onOk:c,onSave:p,onDelete:b,onCancel:x,onConnect:m,closeOnOverlay:S=!0,primaryDisabled:w=!1,fullScreen:A=!1,hideTitleBar:y=!1}){const k=g.useRef(null),{t:N}=Z(),v={close:e},$=T=>{S&&T.target===T.currentTarget&&e()};if(g.useEffect(()=>{n&&k.current&&k.current.focus()},[n]),!n)return null;const L=()=>{switch(f){case"ok":return d.jsx("div",{className:"nc-dialog-footer",children:d.jsx(X,{variant:"primary",onClick:c??e,disabled:w,children:N("common.ok")})});case"ok-cancel":return d.jsxs("div",{className:"nc-dialog-footer",children:[d.jsx(X,{variant:"primary",onClick:c??e,disabled:w,children:N("common.ok")}),d.jsx(_,{variant:"ghost",onClick:x,children:N("common.cancel")})]});case"save-cancel":return d.jsxs("div",{className:"nc-dialog-footer",children:[d.jsx(X,{variant:"primary",onClick:p,disabled:w,children:N("common.save")}),d.jsx(_,{variant:"ghost",onClick:x,children:N("common.cancel")})]});case"delete-cancel":return d.jsxs("div",{className:"nc-dialog-footer",children:[d.jsx(X,{variant:"danger",onClick:b,disabled:w,children:N("common.delete")}),d.jsx(_,{variant:"ghost",onClick:x,children:N("common.cancel")})]});case"connect":return d.jsxs("div",{className:"nc-dialog-footer",children:[d.jsx(X,{variant:"primary",onClick:m,disabled:w,children:N("common.connect")}),d.jsx(_,{variant:"ghost",onClick:x,children:N("common.cancel")})]});case"close":return d.jsx("div",{className:"nc-dialog-footer",children:d.jsx(_,{variant:"primary"})});case"gotit":return d.jsx("div",{className:"nc-dialog-footer",children:d.jsx(_,{variant:"primary",children:N("common.gotit")})});case"custom":return d.jsx("div",{className:"nc-dialog-footer",children:h});case"none":return null;default:return null}},M=d.jsx(at.Provider,{value:v,children:d.jsx("div",{className:`nc-dialog-overlay${A?" nc-fullscreen":""}`,onClick:$,children:d.jsxs("div",{ref:k,className:"nc-dialog-container",style:{width:se(r),height:se(i),minWidth:se(o),minHeight:se(a),maxWidth:se(l),maxHeight:se(u)},tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":y?void 0:"nc-dialog-title",children:[!y&&d.jsxs("div",{className:"nc-dialog-header",children:[d.jsx("h3",{id:"nc-dialog-title",className:"nc-dialog-title",children:t}),d.jsx(Oe,{onClick:e,"aria-label":"Close dialog"})]}),d.jsx("div",{className:"nc-dialog-content",children:s}),L()]})})});return A?we.createPortal(M,document.body):M}function on({onClick:n,size:e="default",rightOffset:t=4}){const s=e==="small"?28:34;return d.jsx("button",{className:"nc-button nc-ghost",onClick:n,onMouseDown:r=>r.stopPropagation(),tabIndex:-1,"aria-label":"Clear input",style:{position:"absolute",right:t,padding:0,minHeight:0,height:s,width:s,border:"none",display:"flex",alignItems:"center",justifyContent:"center",fontSize:e==="small"?"12px":"14px"},children:"✕"})}function an({visible:n,onClick:e,size:t="default"}){const s=t==="small"?28:34,r=t==="small"?16:18;return d.jsx("button",{className:"nc-button nc-ghost",onClick:e,onMouseDown:i=>i.stopPropagation(),tabIndex:-1,"aria-label":n?"Hide password":"Show password",style:{position:"absolute",right:4,padding:0,minHeight:0,height:s,width:s,border:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:n?d.jsx(W.EyeHiddenIcon,{size:r}):d.jsx(W.ViewIcon,{size:r})})}function ln({value:n="",onChange:e,onEnter:t,onClear:s,placeholder:r,disabled:i,label:o,clearable:a=!0,type:l="text",className:u="",size:f="default",style:h,showPasswordToggle:c=!1,multiline:p=!1,rows:b=3}){const x=g.useRef(null),m=g.useRef(null),[S,w]=g.useState(!1),A=l==="password",y=A&&c&&!i&&!p,k=a&&n&&!i,N=f==="small"?32:44;let v=12;k&&y?v=N*2:(k||y)&&(v=N);const $=()=>{var I,G;e==null||e(""),s==null||s(),p?(I=m.current)==null||I.focus():(G=x.current)==null||G.focus()},L=I=>{I.key==="Enter"&&!p&&(t==null||t())},M=I=>{e==null||e(I.target.value)},T=`nc-input ${f==="small"?"nc-small ":""} ${u}`;return d.jsxs("div",{className:"nc-col",style:{position:"relative",flex:1,...h},children:[o&&d.jsx("span",{className:"nc-label",children:o}),d.jsxs("div",{style:{position:"relative",display:"flex",alignItems:p?"flex-start":"center"},children:[p?d.jsx("textarea",{ref:m,className:T,placeholder:r,value:n,onChange:M,onKeyDown:L,disabled:i,rows:b,style:{width:"100%",paddingRight:v,resize:"vertical"}}):d.jsx("input",{ref:x,type:A&&S?"text":l,className:T,placeholder:r,value:n,onChange:M,onKeyDown:L,disabled:i,style:{width:"100%",paddingRight:v}}),k&&d.jsx(on,{onClick:$,size:f,rightOffset:y?N+4:4}),y&&d.jsx(an,{visible:S,onClick:()=>w(!S),size:f})]})]})}function cn({children:n,onClick:e,showBorder:t=!0,selectable:s=!1,style:r}){const[i,o]=g.useState(!1),a=l=>{if(e){if(s){const u=window.getSelection();if(u&&u.toString().length>0)return}e(l)}};return d.jsx("div",{onClick:a,onMouseDown:()=>e&&o(!0),onMouseUp:()=>o(!1),onMouseLeave:()=>o(!1),style:{cursor:e?"pointer":"default",userSelect:s?"text":void 0,borderBottom:t?void 0:"none",...r},className:`nc-list-group-item ${e?"nc-list-group-item-clickable":""} ${i?"nc-list-group-item-active":""}`,children:d.jsx("div",{style:{flex:1},children:n})})}function un({title:n,titleTools:e,children:t,style:s}){return d.jsxs("div",{className:"nc-list-group",style:s,children:[(n||e)&&d.jsxs("div",{className:"nc-list-group-title",children:[d.jsx("div",{children:n}),e&&d.jsx("div",{className:"nc-list-group-title-tools",children:e})]}),d.jsx("div",{className:"nc-list-group-content",children:t})]})}function dn({values:n,onChange:e,options:t,placeholder:s="Select…",label:r}){const[i,o]=g.useState(!1),[a,l]=g.useState(""),u=g.useRef(null),f=g.useMemo(()=>t.filter(c=>c.label.toLowerCase().includes(a.toLowerCase())),[t,a]);g.useEffect(()=>{function c(p){!(p.target instanceof Node)||!u.current||u.current.contains(p.target)||o(!1)}return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]);const h=c=>{n.includes(c)?e(n.filter(p=>p!==c)):e([...n,c])};return d.jsxs("div",{ref:u,className:"nc-col",style:{position:"relative"},children:[r&&d.jsx("span",{className:"nc-label",children:r}),d.jsxs("div",{className:"nc-row",style:{flexWrap:"wrap",gap:6,minHeight:42,alignItems:"center",border:"1px solid var(--nc-button-border)",borderRadius:8,background:"var(--nc-button-bg)",padding:"4px 8px"},children:[n.length===0&&d.jsx("span",{className:"nc-label",children:s}),n.map(c=>{const p=t.find(b=>b.value===c);return p?d.jsxs("span",{style:{padding:"4px 8px",borderRadius:6,display:"inline-flex",alignItems:"center",gap:4,background:"var(--nc-button-bg)",border:"1px solid var(--nc-button-border)"},children:[p.label,d.jsx("button",{className:"nc-button nc-ghost",style:{padding:0,minHeight:0,height:20,width:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none"},onClick:()=>h(c),"aria-label":`Remove ${p.label}`,children:"✕"})]},c):null}),d.jsx("input",{className:"nc-input",value:a,onChange:c=>l(c.target.value),onFocus:()=>o(!0),style:{minWidth:50,border:"none",background:"transparent",padding:4,minHeight:32,flex:1}})]}),i&&d.jsxs("div",{className:"nc-combo-dropdown",style:{position:"absolute",top:"100%",left:0,right:0,zIndex:10,marginTop:4,boxShadow:"0 4px 12px var(--nc-shadow)"},children:[f.map(c=>{const p=n.includes(c.value);return d.jsxs("div",{className:"nc-section nc-row",style:{justifyContent:"space-between",cursor:"pointer",padding:12},onMouseDown:()=>h(c.value),children:[d.jsx("span",{children:c.label}),d.jsx("span",{children:p?"✔️":""})]},c.value)}),f.length===0&&d.jsx("div",{className:"nc-section nc-label",children:"No results"})]})]})}function fn({value:n,onChange:e,min:t,max:s,step:r=1,label:i,disabled:o,size:a="default"}){const l=a==="small",u=()=>{const c=n-r;t!==void 0&&c<t||e(parseFloat(c.toFixed(10)))},f=()=>{const c=n+r;s!==void 0&&c>s||e(parseFloat(c.toFixed(10)))},h=c=>{const p=parseFloat(c.target.value);isNaN(p)||t!==void 0&&p<t||s!==void 0&&p>s||e(p)};return d.jsxs("div",{className:`nc-col nc-number-input-col ${l?"nc-small":""}`,children:[i&&d.jsx("span",{className:`nc-label ${l?"nc-small":""}`,children:i}),d.jsxs("div",{className:`nc-number-input-container ${l?"nc-small":""}`,children:[d.jsx("input",{className:`nc-input nc-number-input ${l?"nc-small":""}`,type:"number",value:n,onChange:h,min:t,max:s,step:r,disabled:o}),d.jsx("button",{className:`nc-button nc-ghost nc-number-input-button ${l?"nc-small":""}`,onClick:u,disabled:o||t!==void 0&&n<=t,children:"−"}),d.jsx("button",{className:`nc-button nc-ghost nc-number-input-button ${l?"nc-small":""}`,onClick:f,disabled:o||s!==void 0&&n>=s,children:"+"})]})]})}function pn({value:n,onChange:e,min:t=0,max:s=100,step:r=1,label:i,disabled:o,showValue:a=!0,formatValue:l=f=>f.toString(),width:u=200}){const f=c=>{const p=parseFloat(c.target.value);e(p)},h=(n-t)/(s-t)*100;return d.jsxs("div",{className:"nc-col",style:{gap:6},children:[i&&d.jsx("span",{className:"nc-label",children:i}),d.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[d.jsx("input",{type:"range",className:"nc-slider",value:n,onChange:f,min:t,max:s,step:r,disabled:o,style:{width:u,"--nc-slider-percentage":`${h}%`}}),a&&d.jsx("span",{style:{color:"var(--nc-text)",fontFamily:"monospace",fontSize:14,minWidth:60,textAlign:"right"},children:l(n)})]})]})}const hn=({size:n=24,className:e,style:t})=>d.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:e,style:t,children:d.jsx("polyline",{points:"18 15 12 9 6 15"})});function gn({tabs:n,active:e,onChange:t,className:s,toolbar:r,multiline:i,orientation:o="horizontal",style:a}){const l=g.useRef(null),[u,f]=g.useState(!1),[h,c]=g.useState(!1),p=o==="verticalLeft"||o==="verticalRight",b=g.useRef(!1),x=g.useRef(0),m=g.useRef(0),S=g.useRef(!1);g.useEffect(()=>{const v=()=>{if(l.current)if(p){const{scrollTop:L,scrollHeight:M,clientHeight:T}=l.current;f(L>1),c(L<M-T-1)}else{const{scrollLeft:L,scrollWidth:M,clientWidth:T}=l.current;f(L>1),c(L<M-T-1)}},$=l.current;if($)return v(),$.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{$.removeEventListener("scroll",v),window.removeEventListener("resize",v)}},[n,p]);const w=v=>{l.current&&(b.current=!0,S.current=!1,x.current=p?v.clientY:v.clientX,m.current=p?l.current.scrollTop:l.current.scrollLeft,l.current.style.cursor="grabbing",l.current.style.userSelect="none")},A=v=>{if(!b.current||!l.current)return;const $=p?v.clientY:v.clientX,L=x.current-$;Math.abs(L)>3&&(S.current=!0),p?l.current.scrollTop=m.current+L:l.current.scrollLeft=m.current+L},y=()=>{l.current&&(b.current=!1,l.current.style.cursor="",l.current.style.userSelect="")},k=()=>{y()};g.useEffect(()=>{const v=l.current;if(!v||p)return;const $=L=>{L.deltaY!==0&&(L.preventDefault(),v.scrollLeft+=L.deltaY*.3)};return v.addEventListener("wheel",$,{passive:!1}),()=>{v.removeEventListener("wheel",$)}},[p]);const N=v=>{S.current||t(v)};return d.jsxs("div",{className:`nc-tab-container ${p?`nc-vertical nc-${o}`:""} ${s||""}`,style:a,children:[d.jsxs("div",{className:"nc-tab-scroll-wrapper",children:[u&&d.jsx("div",{className:`nc-tab-scroll-indicator ${p?"nc-top":"nc-left"}`,children:p?d.jsx(hn,{size:16}):d.jsx(W.ChevronLeftIcon,{size:16})}),d.jsx("div",{ref:l,className:`nc-tab-scroll ${i?"nc-multiline":""}`,onMouseDown:w,onMouseMove:A,onMouseUp:y,onMouseLeave:k,style:{cursor:"grab"},children:n.map(v=>d.jsx("div",{className:`nc-tab-item ${e===v?"nc-active":""}`,onClick:()=>N(v),role:"button",tabIndex:0,onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&t(v)},children:p?v:v.toUpperCase()},v))}),h&&d.jsx("div",{className:`nc-tab-scroll-indicator ${p?"nc-bottom":"nc-right"}`,children:p?d.jsx(W.ChevronDownIcon,{size:16}):d.jsx(W.ChevronRightIcon,{size:16})})]}),r&&d.jsx("div",{className:"nc-tab-toolbar",children:r})]})}function mn({checked:n,onChange:e,disabled:t,label:s}){return d.jsxs("label",{className:"nc-row",style:{gap:10,alignItems:"center",cursor:t?"not-allowed":"pointer"},children:[s&&d.jsx("span",{className:"nc-label",children:s}),d.jsx("span",{role:"switch","aria-checked":n,tabIndex:0,onKeyDown:r=>{t||(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),e(!n))},onClick:()=>!t&&e(!n),style:{position:"relative",width:56,height:30,borderRadius:18,padding:4,display:"inline-flex",alignItems:"center",justifyContent:"flex-start",border:`2px solid ${n?"var(--nc-primary)":"var(--nc-button-border)"}`,background:n?"rgba(99,102,241,0.08)":"transparent",transition:"border-color 160ms, background 160ms"},children:d.jsx("span",{style:{width:22,height:22,borderRadius:12,background:n?"var(--nc-text)":"var(--nc-muted)",transform:`translateX(${n?24:0}px)`,transition:"transform 160ms, background 160ms",boxShadow:n?"0 2px 6px rgba(99,102,241,0.28)":"0 1px 2px rgba(0,0,0,0.08)",border:"none"}})})]})}let te={notifications:[]};const Le=new Set,Ke=new Map;function Re(){const n=te.notifications.slice();for(const e of Array.from(Le))try{e(n)}catch{}}function bn(n){Le.add(n);try{n(te.notifications.slice())}catch{}return()=>{Le.delete(n)}}function xn(n){const e=`notification-${Date.now()}-${Math.random()}`,t={id:e,dismissible:!0,lastingTime:5e3,...n};return te.notifications=[t,...te.notifications],Re(),t.lastingTime&&t.lastingTime>0&&setTimeout(()=>{ct(e)},t.lastingTime),e}function ct(n){const e=te.notifications.find(s=>s.id===n);if(!e)return;e.isRemoving=!0,Re();const t=window.setTimeout(()=>{te.notifications=te.notifications.filter(s=>s.id!==n),Re(),Ke.delete(n)},300);Ke.set(n,t)}function ut({notification:n}){const{t:e}=Z(),t=()=>{if(n.title)return n.title;switch(n.type){case"success":return e("common.success");case"danger":return e("common.error");case"warning":return e("common.warning");default:return e("common.info")}},s=()=>{ct(n.id)};return d.jsx("div",{className:`nc-notification nc-notification-${n.type||"info"}`,children:d.jsxs("div",{className:"nc-notification-content",children:[d.jsxs("div",{className:"nc-notification-body",style:{paddingRight:n.dismissible?"8px":"0"},children:[d.jsx("div",{className:"nc-notification-title",children:t()}),d.jsx("div",{className:"nc-notification-message",children:n.message})]}),n.dismissible&&d.jsx("button",{className:"nc-notification-dismiss",onClick:s,children:d.jsx(W.CloseIcon,{size:16})})]})})}function vn(){const[n,e]=g.useState([]),[t,s]=g.useState(new Map),[r,i]=g.useState(new Set),o=g.useRef(null),a=g.useRef([]);return g.useEffect(()=>bn(u=>{const f=new Set(a.current.map(c=>c.id)),h=u.filter(c=>!f.has(c.id)).map(c=>c.id);h.length>0?(e(u),i(new Set(h)),requestAnimationFrame(()=>{requestAnimationFrame(()=>{i(new Set)})})):e(u),a.current=u}),[]),g.useEffect(()=>{if(!o.current)return;const l=new Map;let u=0;const f=o.current.children;n.forEach((h,c)=>{if(l.set(h.id,u),f[c]){const p=f[c].offsetHeight;h.isRemoving||(u+=p+12)}}),s(l)},[n]),d.jsx("div",{style:{position:"fixed",top:"16px",left:"16px",zIndex:9999,pointerEvents:"none"},children:d.jsx("div",{ref:o,style:{pointerEvents:"auto",position:"relative"},children:n.map(l=>{const u=r.has(l.id),f=l.isRemoving,h=t.get(l.id)||0;return d.jsx("div",{style:{position:"absolute",top:0,left:0,transform:u?"translateY(-120px)":`translateY(${h}px)`,transition:f?"opacity 300ms ease-out":"transform 300ms ease-out, opacity 300ms ease-out",opacity:f?0:1,width:"100%"},children:d.jsx(ut,{notification:l})},l.id)})})})}const yn={show:n=>xn(n)},C=n=>typeof n=="string",ce=()=>{let n,e;const t=new Promise((s,r)=>{n=s,e=r});return t.resolve=n,t.reject=e,t},We=n=>n==null?"":""+n,wn=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},Sn=/###/g,Ge=n=>n&&n.indexOf("###")>-1?n.replace(Sn,"."):n,Je=n=>!n||C(n),fe=(n,e,t)=>{const s=C(e)?e.split("."):e;let r=0;for(;r<s.length-1;){if(Je(n))return{};const i=Ge(s[r]);!n[i]&&t&&(n[i]=new t),Object.prototype.hasOwnProperty.call(n,i)?n=n[i]:n={},++r}return Je(n)?{}:{obj:n,k:Ge(s[r])}},Ye=(n,e,t)=>{const{obj:s,k:r}=fe(n,e,Object);if(s!==void 0||e.length===1){s[r]=t;return}let i=e[e.length-1],o=e.slice(0,e.length-1),a=fe(n,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=fe(n,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=t},Nn=(n,e,t,s)=>{const{obj:r,k:i}=fe(n,e,Object);r[i]=r[i]||[],r[i].push(t)},be=(n,e)=>{const{obj:t,k:s}=fe(n,e);if(t)return t[s]},kn=(n,e,t)=>{const s=be(n,t);return s!==void 0?s:be(e,t)},dt=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?C(n[s])||n[s]instanceof String||C(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):dt(n[s],e[s],t):n[s]=e[s]);return n},re=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Cn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const jn=n=>C(n)?n.replace(/[&<>"'\/]/g,e=>Cn[e]):n;class Ln{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const Rn=[" ",",","?","!",";"],An=new Ln(20),$n=(n,e,t)=>{e=e||"",t=t||"";const s=Rn.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(s.length===0)return!0;const r=An.getRegExp(`(${s.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!r.test(n);if(!i){const o=n.indexOf(t);o>0&&!r.test(n.substring(0,o))&&(i=!0)}return i},Ae=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const s=e.split(t);let r=n;for(let i=0;i<s.length;){if(!r||typeof r!="object")return;let o,a="";for(let l=i;l<s.length;++l)if(l!==i&&(a+=t),a+=s[l],o=r[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<s.length-1)continue;i+=l-i+1;break}r=o}return r},xe=n=>n&&n.replace("_","-"),In={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class ve{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||In,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,r){return r&&!this.debug?null:(C(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ve(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ve(this.logger,e)}}var U=new ve;class Se{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const r=this.observers[s].get(t)||0;this.observers[s].set(t,r+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),r=1;r<t;r++)s[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[a,l]=o;for(let u=0;u<l;u++)a(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,l]=o;for(let u=0;u<l;u++)a.apply(a,[e,...s])})}}class qe extends Se{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,o=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],s&&(Array.isArray(s)?a.push(...s):C(s)&&i?a.push(...s.split(i)):a.push(s)));const l=be(this.data,a);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=a[0],t=a[1],s=a.slice(2).join(".")),l||!o||!C(s)?l:Ae(this.data&&this.data[e]&&this.data[e][t],s,i)}addResource(e,t,s,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,t];s&&(a=a.concat(o?s.split(o):s)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Ye(this.data,a,r),i.silent||this.emit("added",e,t,s,r)}addResources(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in s)(C(s[i])||Array.isArray(s[i]))&&this.addResource(e,t,i,s[i],{silent:!0});r.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,r,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=s,s=t,t=a[1]),this.addNamespaces(t);let l=be(this.data,a)||{};o.skipCopy||(s=JSON.parse(JSON.stringify(s))),r?dt(l,s,i):l={...l,...s},Ye(this.data,a,l),o.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(r=>t[r]&&Object.keys(t[r]).length>0)}toJSON(){return this.data}}var ft={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,s,r){return n.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,t,s,r))}),e}};const Qe={};class ye extends Se{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),wn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=U.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const s=this.resolve(e,t);return s&&s.res!==void 0}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=s&&e.indexOf(s)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!$n(e,s,r);if(o&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:C(i)?[i]:i};const u=e.split(s);(s!==r||s===r&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(r)}return{key:e,namespaces:C(i)?[i]:i}}translate(e,t,s){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],u=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const y=t.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${y}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${y}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:o}const h=this.resolve(e,t);let c=h&&h.res;const p=h&&h.usedKey||o,b=h&&h.exactUsedKey||o,x=Object.prototype.toString.apply(c),m=["[object Number]","[object Function]","[object RegExp]"],S=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,A=!C(c)&&typeof c!="boolean"&&typeof c!="number";if(w&&c&&A&&m.indexOf(x)<0&&!(C(S)&&Array.isArray(c))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,c,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(h.res=y,h.usedParams=this.getUsedParamsDetails(t),h):y}if(i){const y=Array.isArray(c),k=y?[]:{},N=y?b:p;for(const v in c)if(Object.prototype.hasOwnProperty.call(c,v)){const $=`${N}${i}${v}`;k[v]=this.translate($,{...t,joinArrays:!1,ns:a}),k[v]===$&&(k[v]=c[v])}c=k}}else if(w&&C(S)&&Array.isArray(c))c=c.join(S),c&&(c=this.extendTranslation(c,e,t,s));else{let y=!1,k=!1;const N=t.count!==void 0&&!C(t.count),v=ye.hasDefaultValue(t),$=N?this.pluralResolver.getSuffix(u,t.count,t):"",L=t.ordinal&&N?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",M=N&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),T=M&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${$}`]||t[`defaultValue${L}`]||t.defaultValue;!this.isValidLookup(c)&&v&&(y=!0,c=T),this.isValidLookup(c)||(k=!0,c=o);const G=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:c,R=v&&T!==c&&this.options.updateMissing;if(k||y||R){if(this.logger.log(R?"updateKey":"missingKey",u,l,o,R?T:c),i){const z=this.resolve(o,{...t,keySeparator:!1});z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let P=[];const E=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&E&&E[0])for(let z=0;z<E.length;z++)P.push(E[z]);else this.options.saveMissingTo==="all"?P=this.languageUtils.toResolveHierarchy(t.lng||this.language):P.push(t.lng||this.language);const le=(z,F,Y)=>{const B=v&&Y!==c?Y:G;this.options.missingKeyHandler?this.options.missingKeyHandler(z,l,F,B,R,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(z,l,F,B,R,t),this.emit("missingKey",z,l,F,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&N?P.forEach(z=>{const F=this.pluralResolver.getSuffixes(z,t);M&&t[`defaultValue${this.options.pluralSeparator}zero`]&&F.indexOf(`${this.options.pluralSeparator}zero`)<0&&F.push(`${this.options.pluralSeparator}zero`),F.forEach(Y=>{le([z],o+Y,t[`defaultValue${Y}`]||T)})}):le(P,o,T))}c=this.extendTranslation(c,e,t,h,s),k&&c===o&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${o}`),(k||y)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,y?c:void 0):c=this.options.parseMissingKeyHandler(c))}return r?(h.res=c,h.usedParams=this.getUsedParamsDetails(t),h):c}extendTranslation(e,t,s,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const u=C(e)&&(s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const c=e.match(this.interpolator.nestingRegexp);f=c&&c.length}let h=s.replace&&!C(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,s.lng||this.language||r.usedLng,s),u){const c=e.match(this.interpolator.nestingRegexp),p=c&&c.length;f<p&&(s.nest=!1)}!s.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(s.lng=this.language||r.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var c=arguments.length,p=new Array(c),b=0;b<c;b++)p[b]=arguments[b];return i&&i[0]===p[0]&&!s.context?(o.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`),null):o.translate(...p,t)},s)),s.interpolation&&this.interpolator.reset()}const a=s.postProcess||this.options.postProcess,l=C(a)?[a]:a;return e!=null&&l&&l.length&&s.applyPostProcessor!==!1&&(e=ft.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,r,i,o,a;return C(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(l,t),f=u.key;r=f;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const c=t.count!==void 0&&!C(t.count),p=c&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),b=t.context!==void 0&&(C(t.context)||typeof t.context=="number")&&t.context!=="",x=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(m=>{this.isValidLookup(s)||(a=m,!Qe[`${x[0]}-${m}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Qe[`${x[0]}-${m}`]=!0,this.logger.warn(`key "${r}" for languages "${x.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),x.forEach(S=>{if(this.isValidLookup(s))return;o=S;const w=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,S,m,t);else{let y;c&&(y=this.pluralResolver.getSuffix(S,t.count,t));const k=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(w.push(f+y),t.ordinal&&y.indexOf(N)===0&&w.push(f+y.replace(N,this.options.pluralSeparator)),p&&w.push(f+k)),b){const v=`${f}${this.options.contextSeparator}${t.context}`;w.push(v),c&&(w.push(v+y),t.ordinal&&y.indexOf(N)===0&&w.push(v+y.replace(N,this.options.pluralSeparator)),p&&w.push(v+k))}}let A;for(;A=w.pop();)this.isValidLookup(s)||(i=A,s=this.getResource(S,m,A,t))}))})}),{res:s,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,s,r):this.resourceStore.getResource(e,t,s,r)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!C(e.replace);let r=s?e.replace:e;if(s&&typeof e.count<"u"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!s){r={...r};for(const i of t)delete r[i]}return r}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&e[s]!==void 0)return!0;return!1}}const Ne=n=>n.charAt(0).toUpperCase()+n.slice(1);class Xe{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=U.create("languageUtils")}getScriptPartFromCode(e){if(e=xe(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=xe(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(C(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let r=Intl.getCanonicalLocales(e)[0];if(r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r)return r}catch{}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let s=e.split("-");return this.options.lowerCaseLng?s=s.map(r=>r.toLowerCase()):s.length===2?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=Ne(s[1].toLowerCase()))):s.length===3&&(s[0]=s[0].toLowerCase(),s[1].length===2&&(s[1]=s[1].toUpperCase()),s[0]!=="sgn"&&s[2].length===2&&(s[2]=s[2].toUpperCase()),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=Ne(s[1].toLowerCase())),t.indexOf(s[2].toLowerCase())>-1&&(s[2]=Ne(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(s=>{if(t)return;const r=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const r=this.getLanguagePartFromCode(s);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(i=>{if(i===r)return i;if(!(i.indexOf("-")<0&&r.indexOf("-")<0)&&(i.indexOf("-")>0&&r.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===r||i.indexOf(r)===0&&r.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),C(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],i=o=>{o&&(this.isSupportedCode(o)?r.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return C(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):C(e)&&i(this.formatLanguageCode(e)),s.forEach(o=>{r.indexOf(o)<0&&i(this.formatLanguageCode(o))}),r}}let Pn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],On={1:n=>+(n>1),2:n=>+(n!=1),3:n=>0,4:n=>n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,5:n=>n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5,6:n=>n==1?0:n>=2&&n<=4?1:2,7:n=>n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,8:n=>n==1?0:n==2?1:n!=8&&n!=11?2:3,9:n=>+(n>=2),10:n=>n==1?0:n==2?1:n<7?2:n<11?3:4,11:n=>n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3,12:n=>+(n%10!=1||n%100==11),13:n=>+(n!==0),14:n=>n==1?0:n==2?1:n==3?2:3,15:n=>n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2,16:n=>n%10==1&&n%100!=11?0:n!==0?1:2,17:n=>n==1||n%10==1&&n%100!=11?0:1,18:n=>n==0?0:n==1?1:2,19:n=>n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3,20:n=>n==1?0:n==0||n%100>0&&n%100<20?1:2,21:n=>n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0,22:n=>n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3};const En=["v1","v2","v3"],Tn=["v4"],Ze={zero:0,one:1,two:2,few:3,many:4,other:5},Mn=()=>{const n={};return Pn.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:On[e.fc]}})}),n};class zn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=U.create("pluralResolver"),(!this.options.compatibilityJSON||Tn.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Mn(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const s=xe(e==="dev"?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:s,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(s,{type:r})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,t)}return this.pluralRulesCache[i]=o,o}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}getPluralFormsOfKey(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,s).map(r=>`${t}${r}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort((r,i)=>Ze[r]-Ze[i]).map(r=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${r}`):s.numbers.map(r=>this.getSuffix(e,r,t)):[]}getSuffix(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,s);return r?this.shouldUseIntlApi()?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const s=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[s];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}shouldUseIntlApi(){return!En.includes(this.options.compatibilityJSON)}}const _e=function(n,e,t){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=kn(n,e,t);return!i&&r&&C(t)&&(i=Ae(n,t,s),i===void 0&&(i=Ae(e,t,s))),i},ke=n=>n.replace(/\$/g,"$$$$");class Dn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=U.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:f,unescapePrefix:h,nestingPrefix:c,nestingPrefixEscaped:p,nestingSuffix:b,nestingSuffixEscaped:x,nestingOptionsSeparator:m,maxReplaces:S,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:jn,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=i?re(i):o||"{{",this.suffix=a?re(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=c?re(c):p||re("$t("),this.nestingSuffix=b?re(b):x||re(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=S||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>t&&t.source===s?(t.lastIndex=0,t):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,s,r){let i,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const S=_e(t,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(S,void 0,s,{...r,...t,interpolationkey:p}):S}const b=p.split(this.formatSeparator),x=b.shift().trim(),m=b.join(this.formatSeparator).trim();return this.format(_e(t,l,x,this.options.keySeparator,this.options.ignoreJSONStructure),m,s,{...r,...t,interpolationkey:x})};this.resetRegExp();const f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>ke(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?ke(this.escape(p)):ke(p)}].forEach(p=>{for(a=0;i=p.regex.exec(e);){const b=i[1].trim();if(o=u(b),o===void 0)if(typeof f=="function"){const m=f(e,i,r);o=C(m)?m:""}else if(r&&Object.prototype.hasOwnProperty.call(r,b))o="";else if(h){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${e}`),o="";else!C(o)&&!this.useRawValueToEscape&&(o=We(o));const x=p.safeValue(o);if(e=e.replace(i[0],x),h?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,o;const a=(l,u)=>{const f=this.nestingOptionsSeparator;if(l.indexOf(f)<0)return l;const h=l.split(new RegExp(`${f}[ ]*{`));let c=`{${h[1]}`;l=h[0],c=this.interpolate(c,o);const p=c.match(/'/g),b=c.match(/"/g);(p&&p.length%2===0&&!b||b.length%2!==0)&&(c=c.replace(/'/g,'"'));try{o=JSON.parse(c),u&&(o={...u,...o})}catch(x){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,x),`${l}${f}${c}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;r=this.nestingRegexp.exec(e);){let l=[];o={...s},o=o.replace&&!C(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const f=r[1].split(this.formatSeparator).map(h=>h.trim());r[1]=f.shift(),l=f,u=!0}if(i=t(a.call(this,r[1].trim(),o),o),i&&r[0]===e&&!C(i))return i;C(i)||(i=We(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),u&&(i=l.reduce((f,h)=>this.format(f,h,s.lng,{...s,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}}const Fn=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const s=n.split("(");e=s[0].toLowerCase().trim();const r=s[1].substring(0,s[1].length-1);e==="currency"&&r.indexOf(":")<0?t.currency||(t.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?t.range||(t.range=r.trim()):r.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),f=a.trim();t[f]||(t[f]=u),u==="false"&&(t[f]=!1),u==="true"&&(t[f]=!0),isNaN(u)||(t[f]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},ie=n=>{const e={};return(t,s,r)=>{let i=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(i={...i,[r.interpolationkey]:void 0});const o=s+JSON.stringify(i);let a=e[o];return a||(a=n(xe(s),r),e[o]=a),a(t)}};class Bn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=U.create("formatter"),this.options=e,this.formats={number:ie((t,s)=>{const r=new Intl.NumberFormat(t,{...s});return i=>r.format(i)}),currency:ie((t,s)=>{const r=new Intl.NumberFormat(t,{...s,style:"currency"});return i=>r.format(i)}),datetime:ie((t,s)=>{const r=new Intl.DateTimeFormat(t,{...s});return i=>r.format(i)}),relativetime:ie((t,s)=>{const r=new Intl.RelativeTimeFormat(t,{...s});return i=>r.format(i,s.range||"day")}),list:ie((t,s)=>{const r=new Intl.ListFormat(t,{...s});return i=>r.format(i)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ie(t)}format(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,l)=>{const{formatName:u,formatOptions:f}=Fn(l);if(this.formats[u]){let h=a;try{const c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},p=c.locale||c.lng||r.locale||r.lng||s;h=this.formats[u](a,p,{...f,...r,...c})}catch(c){this.logger.warn(c)}return h}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}const Vn=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class Hn extends Se{constructor(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=r,this.logger=U.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(s,r.backend,r)}queueLoad(e,t,s,r){const i={},o={},a={},l={};return e.forEach(u=>{let f=!0;t.forEach(h=>{const c=`${u}|${h}`;!s.reload&&this.store.hasResourceBundle(u,h)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?o[c]===void 0&&(o[c]=!0):(this.state[c]=1,f=!1,o[c]===void 0&&(o[c]=!0),i[c]===void 0&&(i[c]=!0),l[h]===void 0&&(l[h]=!0)))}),f||(a[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&s&&this.store.addResourceBundle(i,o,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const a={};this.queue.forEach(l=>{Nn(l.loaded,[i],o),Vn(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const f=l.loaded[u];f.length&&f.forEach(h=>{a[u][h]===void 0&&(a[u][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:r,wait:i,callback:o});return}this.readingCalls++;const a=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&f&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,r+1,i*2,o)},i);return}o(u,f)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(f=>a(null,f)).catch(a):a(null,u)}catch(u){a(u)}return}return l(e,t,a)}prepareLoading(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();C(e)&&(e=this.languageUtils.toResolveHierarchy(e)),C(t)&&(t=[t]);const i=this.queueLoad(e,t,s,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const s=e.split("|"),r=s[0],i=s[1];this.read(r,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,o,a)})}saveMissing(e,t,s,r,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(e,t,s,r,l):f=u(e,t,s,r),f&&typeof f.then=="function"?f.then(h=>a(null,h)).catch(a):a(null,f)}catch(f){a(f)}else u(e,t,s,r,a,l)}!e||!e[0]||this.store.addResource(e[0],t,s,r)}}}const et=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),C(n[1])&&(e.defaultValue=n[1]),C(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),tt=n=>(C(n.ns)&&(n.ns=[n.ns]),C(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),C(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),he=()=>{},Un=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class pe extends Se{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=tt(e),this.services={},this.logger=U,this.modules={external:[]},Un(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(C(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=et();this.options={...r,...this.options,...tt(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?U.init(i(this.modules.logger),this.options):U.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=Bn);const h=new Xe(this.options);this.store=new qe(this.options.resources,this.options);const c=this.services;c.logger=U,c.resourceStore=this.store,c.languageUtils=h,c.pluralResolver=new zn(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(c.formatter=i(f),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Dn(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new Hn(i(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(p){for(var b=arguments.length,x=new Array(b>1?b-1:0),m=1;m<b;m++)x[m-1]=arguments[m];e.emit(p,...x)}),this.modules.languageDetector&&(c.languageDetector=i(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=i(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new ye(this.services,this.options),this.translator.on("*",function(p){for(var b=arguments.length,x=new Array(b>1?b-1:0),m=1;m<b;m++)x[m-1]=arguments[m];e.emit(p,...x)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,s||(s=he),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const l=ce(),u=()=>{const f=(h,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(c),s(h,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;const r=C(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const i=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(a)})}else s(null)}reloadResources(e,t,s){const r=ce();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=he),this.services.backendConnector.reload(e,t,i=>{r.resolve(),s(i)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&ft.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const s=this.languages[t];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}changeLanguage(e,t){var s=this;this.isLanguageChangingTo=e;const r=ce();this.emit("languageChanging",e);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve(function(){return s.t(...arguments)}),t&&t(l,function(){return s.t(...arguments)})},a=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=C(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{o(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),r}getFixedT(e,t,s){var r=this;const i=function(o,a){let l;if(typeof a!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),h=2;h<u;h++)f[h-2]=arguments[h];l=r.options.overloadTranslationOptionHandler([o,a].concat(f))}else l={...a};l.lng=l.lng||i.lng,l.lngs=l.lngs||i.lngs,l.ns=l.ns||i.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||s||i.keyPrefix);const c=r.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(o)?p=o.map(b=>`${l.keyPrefix}${c}${b}`):p=l.keyPrefix?`${l.keyPrefix}${c}${o}`:o,r.t(p,l)};return C(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=s,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(s,e)&&(!r||o(i,e)))}loadNamespaces(e,t){const s=ce();return this.options.ns?(C(e)&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{s.resolve(),t&&t(r)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=ce();C(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(o=>r.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=r.concat(i),this.loadResources(o=>{s.resolve(),t&&t(o)}),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=this.services&&this.services.languageUtils||new Xe(et());return t.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new pe(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;const s=e.forkResourceStore;s&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new pe(r);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},s&&(i.store=new qe(this.store.data,r),i.services.resourceStore=i.store),i.translator=new ye(i.services,r),i.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),f=1;f<l;f++)u[f-1]=arguments[f];i.emit(a,...u)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const D=pe.createInstance();D.createInstance=pe.createInstance;D.createInstance;D.dir;D.init;D.loadResources;D.reloadResources;D.use;D.changeLanguage;D.getFixedT;D.t;D.exists;D.setDefaultNamespace;D.hasLoadedNamespace;D.loadNamespaces;D.loadLanguages;function Kn(n){const e=D.createInstance(),t={};for(const r in n)t[r]={translation:n[r]};const s=typeof document<"u"&&document.documentElement.lang||"en";return e.init({resources:t,lng:s,fallbackLng:"en",interpolation:{escapeValue:!1}}),typeof MutationObserver<"u"&&typeof document<"u"&&new MutationObserver(i=>{for(const o of i)if(o.type==="attributes"&&o.attributeName==="lang"){const a=document.documentElement.lang||"en";e.changeLanguage(a)}}).observe(document.documentElement,{attributes:!0}),e}class Wn{constructor(){H(this,"apps",new Map)}register(e){this.apps.has(e.id)&&console.warn(`App "${e.id}" is already registered. Overwriting.`),this.apps.set(e.id,{...e,width:e.width??400,padding:e.padding??0})}unregister(e){this.apps.delete(e)}get(e){return this.apps.get(e)}list(){return Array.from(this.apps.values())}has(e){return this.apps.has(e)}}const ne=new Wn,nt="nc-ui-app-state";class Gn{constructor(){H(this,"state");H(this,"listeners",new Map);this.state=this.loadState()}loadState(){try{const e=localStorage.getItem(nt);if(e)return JSON.parse(e)}catch{}return{activeAppId:null}}saveState(){try{localStorage.setItem(nt,JSON.stringify(this.state))}catch{}}getActiveAppId(){return this.state.activeAppId}_setActiveAppId(e){this.state.activeAppId!==e&&(this.state.activeAppId=e,this.saveState(),this.notify("activeAppId",e))}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{var s;(s=this.listeners.get(e))==null||s.delete(t)}}notify(e,t){var s;(s=this.listeners.get(e))==null||s.forEach(r=>r(t))}}const K=new Gn;class Jn{constructor(){H(this,"handlers",[])}register(e,t,s){return this.handlers=this.handlers.filter(r=>r.id!==e),this.handlers.push({id:e,priority:t,handler:s}),this.handlers.sort((r,i)=>i.priority-r.priority),()=>{this.handlers=this.handlers.filter(r=>r.id!==e)}}handleBack(){for(const{handler:e}of this.handlers)if(e())return!0;return!1}unregister(e){this.handlers=this.handlers.filter(t=>t.id!==e)}}const Ee=new Jn;function $e(n){if(typeof window<"u"&&window.history){const e=new URL(window.location.href);e.searchParams.set("app",n),window.history.pushState({app:n},"",e.toString())}}function pt(){if(typeof window<"u"&&window.history){const n=new URL(window.location.href);n.searchParams.delete("app"),window.history.replaceState({},"",n.toString())}}class Yn{constructor(){H(this,"apps",[]);H(this,"activeAppId",null);H(this,"listeners",new Set);H(this,"refReadyResolvers",new Map)}async launchApp(e,t){const{launchInBackground:s=!1}=t||{};if(!ne.has(e))return console.error(`Cannot launch app "${e}": not registered`),null;const r=this.apps.find(o=>o.appId===e);if(r)return s||(this.setActiveApp(e),K._setActiveAppId(e)),r.ref?r:this.waitForRef(e);const i={appId:e,launchedAt:Date.now()};return this.apps.push(i),s||(this.activeAppId=e,K._setActiveAppId(e),$e(e)),this.notify(),this.waitForRef(e)}waitForRef(e){return new Promise(t=>{const s=this.refReadyResolvers.get(e)||[];s.push(t),this.refReadyResolvers.set(e,s)})}setAppRef(e,t){const s=this.apps.find(i=>i.appId===e);if(!s){console.warn(`Cannot set ref for app "${e}": not running`);return}s.ref=t;const r=this.refReadyResolvers.get(e);r&&(r.forEach(i=>i(s)),this.refReadyResolvers.delete(e))}getApp(e){return this.apps.find(t=>t.appId===e)}closeApp(e){const t=this.apps.findIndex(r=>r.appId===e);if(t===-1)return;const s=this.apps[t];if(s.ref&&(s.ref=void 0),this.apps.splice(t,1),this.activeAppId===e){const r=window.innerWidth>=768;this.activeAppId=r&&this.apps.length>0?this.apps[this.apps.length-1].appId:null,K._setActiveAppId(this.activeAppId),this.activeAppId?$e(this.activeAppId):pt()}this.notify()}setActiveApp(e){if(e!==null&&!this.apps.find(t=>t.appId===e)){console.warn(`Cannot activate app "${e}": not running`);return}this.activeAppId!==e&&(this.activeAppId=e,this.notify(),K._setActiveAppId(e))}toggleApp(e){this.activeAppId===e?this.setActiveApp(null):this.launchApp(e)}getActiveAppId(){return this.activeAppId}getActiveApp(){return this.activeAppId?ne.get(this.activeAppId)??null:null}getRunningApps(){return[...this.apps]}isRunning(e){return this.apps.some(t=>t.appId===e)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(){this.listeners.forEach(e=>e())}}const V=new Yn,Te=g.createContext(null);function ht(){const n=g.useContext(Te);if(!n)throw new Error("useApp must be used inside an App");return n}function qn({size:n=16}){return d.jsxs("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"M19 12H5"}),d.jsx("path",{d:"M12 19l-7-7 7-7"})]})}function gt({title:n,onClose:e,onBack:t,toolbar:s,hideBackButton:r}){const i=t&&!r;return d.jsxs("div",{className:"nc-app-title-bar",children:[d.jsxs("div",{className:"nc-app-title-bar-left",children:[i&&d.jsx("button",{className:"nc-app-title-bar-back",onClick:t,title:"Back","aria-label":"Go back",children:d.jsx(qn,{size:16})}),d.jsx("span",{className:"nc-app-title-bar-title",children:n})]}),d.jsxs("div",{className:"nc-app-title-bar-right",children:[s&&d.jsx("div",{className:"nc-app-title-bar-toolbar",children:s}),d.jsx(Oe,{onClick:e,"aria-label":"Close application"})]})]})}class Qn extends g.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`Error loading app ${this.props.appId}:`,e,t)}render(){return this.state.hasError?d.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,flexDirection:"column",gap:"16px",padding:"20px",textAlign:"center",color:"var(--text-secondary)"},children:[d.jsx("div",{children:"Failed to load app"}),this.state.error&&d.jsx("div",{style:{fontSize:"12px",opacity:.7},children:this.state.error.message})]}):this.props.children}}function Me({appId:n,isActive:e,onClose:t}){const{t:s}=Z(),r=ne.get(n),[i,o]=g.useState(""),[a,l]=g.useState(null),[u,f]=g.useState(null),[h,c]=g.useState(!1),[p,b]=g.useState(!1);g.useEffect(()=>{r!=null&&r.titleKey&&o(s(r.titleKey))},[r,s]),g.useEffect(()=>{if(e)return Ee.register(`app-${n}`,50,()=>a?(a(),!0):(t(),!0))},[e,a,t,n]);const x=g.useCallback(L=>{o(L)},[]),m=g.useCallback(L=>{l(()=>L)},[]),S=g.useCallback(()=>{l(null)},[]),w=g.useCallback(L=>{f(L)},[]),A=g.useCallback(()=>{f(null)},[]),y=g.useCallback(L=>{c(L)},[]),k=g.useCallback(L=>{b(L)},[]),N=g.useMemo(()=>({setTitle:x,setBackHandler:m,clearBackHandler:S,setToolbar:w,clearToolbar:A,setHideBackButton:y,setHideTitleBar:k,close:t}),[x,m,S,w,A,y,k,t]);if(!r)return null;const v=r.component,$=!r.hideTitleBar&&!p;return d.jsxs("div",{style:{display:e?"flex":"none",flexDirection:"column",flex:1,minHeight:0},children:[$&&d.jsx(gt,{title:i,onClose:t,onBack:a??void 0,toolbar:u,hideBackButton:h}),d.jsx("div",{className:$?"nc-app-content-wrapper":"",style:{padding:r.padding,flex:1,minHeight:0,display:"flex",flexDirection:"column",backgroundColor:"var(--nc-bg-secondary)",position:"relative"},children:d.jsx(Te.Provider,{value:N,children:d.jsx(Qn,{appId:n,children:d.jsx(g.Suspense,{fallback:d.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flex:1},children:d.jsx(Pe,{})}),children:d.jsx(v,{})})})})})]})}const ge=768,me=1024,mt={isMobile:!1,isTablet:!1,isDesktop:!0,width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768},bt=g.createContext(mt);function Xn({children:n}){const[e,t]=g.useState(()=>{if(typeof window>"u")return mt;const s=window.innerWidth,r=window.innerHeight;return{isMobile:s<ge,isTablet:s>=ge&&s<me,isDesktop:s>=me,width:s,height:r}});return g.useEffect(()=>{const s=()=>{const r=window.innerWidth,i=window.innerHeight;t({isMobile:r<ge,isTablet:r>=ge&&r<me,isDesktop:r>=me,width:r,height:i})};return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),d.jsx(bt.Provider,{value:e,children:n})}function ze(){return g.useContext(bt)}function Zn(){const{isMobile:n}=ze(),[e,t]=g.useState(()=>K.getActiveAppId()),[s,r]=g.useState(()=>V.getRunningApps());g.useEffect(()=>{const h=K.subscribe("activeAppId",c=>{t(c)});return()=>{h()}},[]),g.useEffect(()=>V.subscribe(()=>{r(V.getRunningApps())}),[]),g.useEffect(()=>{if(!new URLSearchParams(window.location.search).has("app")){const p=K.getActiveAppId();p&&!V.isRunning(p)&&V.launchApp(p)}},[]);const i=h=>{V.closeApp(h)},o=e?ne.get(e):null,l=(o==null?void 0:o.width)??400,u=e!==null,f={overflow:"hidden",width:u?n?"100%":l:0,flexShrink:0,display:u?"flex":"none",flexDirection:"column",position:n&&u?"absolute":"relative",top:n&&u?0:void 0,left:n&&u?0:void 0,right:n&&u?0:void 0,bottom:n&&u?56:void 0,zIndex:n&&u?10:void 0,maxHeight:n&&u?"calc(100% - 56px)":"100%",borderRight:u&&!n?"1px solid var(--nc-border)":void 0};return d.jsx("div",{className:"panel",style:f,children:s.map(h=>d.jsx(Me,{appId:h.appId,isActive:e===h.appId,onClose:()=>i(h.appId)},h.appId))})}function _n({pinnedAppIds:n,className:e=""}){const{isMobile:t}=ze(),[s,r]=g.useState(()=>K.getActiveAppId()),[i,o]=g.useState(()=>V.getRunningApps());g.useEffect(()=>{const c=K.subscribe("activeAppId",p=>{r(p)});return()=>{c()}},[]),g.useEffect(()=>V.subscribe(()=>{o(V.getRunningApps())}),[]);const a=c=>{s===c?V.setActiveApp(null):V.launchApp(c)},l=n.map(c=>ne.get(c)).filter(c=>!!c),u=i.filter(c=>!n.includes(c.appId)).map(c=>({running:c,def:ne.get(c.appId)})).filter(c=>!!c.def),f=c=>i.some(p=>p.appId===c),h=t?24:28;return d.jsxs("div",{className:`nc-app-taskbar ${t?"nc-mobile":"nc-desktop"} ${e}`,children:[l.map(c=>{const p=c.icon,b=s===c.id,x=f(c.id);return d.jsxs("button",{className:`nc-app-taskbar-button ${b?"nc-active":""} ${x?"nc-running":""}`,onClick:()=>a(c.id),title:c.titleKey||c.id,children:[d.jsx(p,{size:h}),x&&d.jsx("span",{className:"nc-app-taskbar-indicator"})]},c.id)}),u.length>0&&d.jsx("div",{className:"nc-app-taskbar-separator"}),u.map(({running:c,def:p})=>{const b=p.icon,x=s===c.appId;return d.jsxs("button",{className:`nc-app-taskbar-button ${x?"nc-active":""} nc-running`,onClick:()=>a(c.appId),title:p.titleKey||p.id,children:[d.jsx(b,{size:h}),d.jsx("span",{className:"nc-app-taskbar-indicator"})]},c.appId)})]})}function es({appId:n,open:e,onClose:t,closeOnBackdrop:s=!1,className:r="",maxWidth:i=1200,maxHeight:o=900}){const a=u=>{s&&u.target===u.currentTarget&&t()};if(g.useEffect(()=>{if(!e)return;const u=`app-dialog-${n}-${Date.now()}`;return Ee.register(u,100,()=>(t(),!0))},[e,t,n]),!e)return null;const l=d.jsx("div",{className:"nc-dialog-overlay nc-fullscreen",onClick:a,children:d.jsx("div",{className:`nc-app-dialog-container ${r}`,style:{maxWidth:`${i}px`,maxHeight:`${o}px`},onClick:u=>u.stopPropagation(),children:d.jsx(Me,{appId:n,isActive:!0,onClose:t})})});return we.createPortal(l,document.body)}const De=g.createContext(null),xt=g.createContext(null);function ts(){const n=g.useContext(De);if(!n)throw new Error("useNavStack must be used within a NavStackProvider");return n}function ns(){const n=g.useContext(xt);if(!n)throw new Error("useNavView must be used within NavStack");return n}const Fe=g.createContext(null);function ss({rootView:n,children:e}){const{t}=Z(),s=ht(),[r,i]=g.useState([n]),[o,a]=g.useState([null]),l=g.useCallback((y,k)=>{a(N=>{const v=[...N];return v[y]=k,v})},[]),u=g.useCallback(y=>{a(k=>{const N=[...k];return N[y]=null,N})},[]),f=g.useCallback(y=>{i(k=>[...k,y]),a(k=>[...k,null])},[]),h=g.useCallback(()=>{i(y=>y.length<=1?y:y.slice(0,-1)),a(y=>y.slice(0,-1))},[]),c=g.useCallback(()=>{i([n]),a([null])},[n]),p=r.length,b=p>1,x=r.length-1,m=r[r.length-1],S=m!=null&&m.titleKey?t(m.titleKey):(m==null?void 0:m.title)??"";g.useEffect(()=>{s.setTitle(S)},[S,s]),g.useEffect(()=>{b?s.setBackHandler(h):s.clearBackHandler()},[b,h,s]),g.useEffect(()=>{const y=o[o.length-1];y?s.setToolbar(y):s.clearToolbar()},[o,s]);const w={push:f,pop:h,reset:c,depth:p,canGoBack:b,currentTitle:S},A={stack:r,toolbarStack:o,updateToolbar:l,clearToolbarAt:u,topIndex:x};return d.jsx(De.Provider,{value:w,children:d.jsx(Fe.Provider,{value:A,children:e})})}function rs({index:n,children:e}){const t=g.useContext(Fe);if(!t)throw new Error("NavViewProvider must be used within NavStackProvider");const{updateToolbar:s,clearToolbarAt:r,topIndex:i}=t,o=g.useCallback(u=>{n===i&&s(n,u)},[n,i,s]),a=g.useCallback(()=>{n===i&&r(n)},[n,i,r]),l={setToolbar:o,clearToolbar:a};return d.jsx(xt.Provider,{value:l,children:e})}function is(){const n=g.useContext(De),e=g.useContext(Fe);if(!n||!e)throw new Error("NavStackContainer must be used within a NavStackProvider");const{stack:t}=e;return d.jsx("div",{className:"nav-stack-container",children:d.jsx("div",{className:"nav-stack-content",children:t.map((s,r)=>{const i=r===t.length-1;return d.jsx(rs,{index:r,children:d.jsx("div",{style:{display:i?"flex":"none",flexDirection:"column",height:"100%"},children:s.component})},s.id)})})})}const Be="-",os=n=>{const e=ls(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:o=>{const a=o.split(Be);return a[0]===""&&a.length!==1&&a.shift(),vt(a,e)||as(o)},getConflictingClassGroupIds:(o,a)=>{const l=t[o]||[];return a&&s[o]?[...l,...s[o]]:l}}},vt=(n,e)=>{var o;if(n.length===0)return e.classGroupId;const t=n[0],s=e.nextPart.get(t),r=s?vt(n.slice(1),s):void 0;if(r)return r;if(e.validators.length===0)return;const i=n.join(Be);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},st=/^\[(.+)\]$/,as=n=>{if(st.test(n)){const e=st.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},ls=n=>{const{theme:e,prefix:t}=n,s={nextPart:new Map,validators:[]};return us(Object.entries(n.classGroups),t).forEach(([i,o])=>{Ie(o,s,i,e)}),s},Ie=(n,e,t,s)=>{n.forEach(r=>{if(typeof r=="string"){const i=r===""?e:rt(e,r);i.classGroupId=t;return}if(typeof r=="function"){if(cs(r)){Ie(r(s),e,t,s);return}e.validators.push({validator:r,classGroupId:t});return}Object.entries(r).forEach(([i,o])=>{Ie(o,rt(e,i),t,s)})})},rt=(n,e)=>{let t=n;return e.split(Be).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},cs=n=>n.isThemeGetter,us=(n,e)=>e?n.map(([t,s])=>{const r=s.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[t,r]}):n,ds=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,s=new Map;const r=(i,o)=>{t.set(i,o),e++,e>n&&(e=0,s=t,t=new Map)};return{get(i){let o=t.get(i);if(o!==void 0)return o;if((o=s.get(i))!==void 0)return r(i,o),o},set(i,o){t.has(i)?t.set(i,o):r(i,o)}}},yt="!",fs=n=>{const{separator:e,experimentalParseClassName:t}=n,s=e.length===1,r=e[0],i=e.length,o=a=>{const l=[];let u=0,f=0,h;for(let m=0;m<a.length;m++){let S=a[m];if(u===0){if(S===r&&(s||a.slice(m,m+i)===e)){l.push(a.slice(f,m)),f=m+i;continue}if(S==="/"){h=m;continue}}S==="["?u++:S==="]"&&u--}const c=l.length===0?a:a.substring(f),p=c.startsWith(yt),b=p?c.substring(1):c,x=h&&h>f?h-f:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:x}};return t?a=>t({className:a,parseClassName:o}):o},ps=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(s=>{s[0]==="["?(e.push(...t.sort(),s),t=[]):t.push(s)}),e.push(...t.sort()),e},hs=n=>({cache:ds(n.cacheSize),parseClassName:fs(n),...os(n)}),gs=/\s+/,ms=(n,e)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:r}=e,i=[],o=n.trim().split(gs);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:f,hasImportantModifier:h,baseClassName:c,maybePostfixModifierPosition:p}=t(u);let b=!!p,x=s(b?c.substring(0,p):c);if(!x){if(!b){a=u+(a.length>0?" "+a:a);continue}if(x=s(c),!x){a=u+(a.length>0?" "+a:a);continue}b=!1}const m=ps(f).join(":"),S=h?m+yt:m,w=S+x;if(i.includes(w))continue;i.push(w);const A=r(x,b);for(let y=0;y<A.length;++y){const k=A[y];i.push(S+k)}a=u+(a.length>0?" "+a:a)}return a};function bs(){let n=0,e,t,s="";for(;n<arguments.length;)(e=arguments[n++])&&(t=wt(e))&&(s&&(s+=" "),s+=t);return s}const wt=n=>{if(typeof n=="string")return n;let e,t="";for(let s=0;s<n.length;s++)n[s]&&(e=wt(n[s]))&&(t&&(t+=" "),t+=e);return t};function xs(n,...e){let t,s,r,i=o;function o(l){const u=e.reduce((f,h)=>h(f),n());return t=hs(u),s=t.cache.get,r=t.cache.set,i=a,a(l)}function a(l){const u=s(l);if(u)return u;const f=ms(l,t);return r(l,f),f}return function(){return i(bs.apply(null,arguments))}}const O=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},St=/^\[(?:([a-z-]+):)?(.+)\]$/i,vs=/^\d+\/\d+$/,ys=new Set(["px","full","screen"]),ws=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ss=/\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$/,Ns=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ks=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cs=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,J=n=>oe(n)||ys.has(n)||vs.test(n),q=n=>ae(n,"length",Os),oe=n=>!!n&&!Number.isNaN(Number(n)),Ce=n=>ae(n,"number",oe),ue=n=>!!n&&Number.isInteger(Number(n)),js=n=>n.endsWith("%")&&oe(n.slice(0,-1)),j=n=>St.test(n),Q=n=>ws.test(n),Ls=new Set(["length","size","percentage"]),Rs=n=>ae(n,Ls,Nt),As=n=>ae(n,"position",Nt),$s=new Set(["image","url"]),Is=n=>ae(n,$s,Ts),Ps=n=>ae(n,"",Es),de=()=>!0,ae=(n,e,t)=>{const s=St.exec(n);return s?s[1]?typeof e=="string"?s[1]===e:e.has(s[1]):t(s[2]):!1},Os=n=>Ss.test(n)&&!Ns.test(n),Nt=()=>!1,Es=n=>ks.test(n),Ts=n=>Cs.test(n),Ms=()=>{const n=O("colors"),e=O("spacing"),t=O("blur"),s=O("brightness"),r=O("borderColor"),i=O("borderRadius"),o=O("borderSpacing"),a=O("borderWidth"),l=O("contrast"),u=O("grayscale"),f=O("hueRotate"),h=O("invert"),c=O("gap"),p=O("gradientColorStops"),b=O("gradientColorStopPositions"),x=O("inset"),m=O("margin"),S=O("opacity"),w=O("padding"),A=O("saturate"),y=O("scale"),k=O("sepia"),N=O("skew"),v=O("space"),$=O("translate"),L=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",j,e],I=()=>[j,e],G=()=>["",J,q],R=()=>["auto",oe,j],P=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["solid","dashed","dotted","double","none"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",j],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[oe,j];return{cacheSize:500,separator:":",theme:{colors:[de],spacing:[J,q],blur:["none","",Q,j],brightness:B(),borderColor:[n],borderRadius:["none","","full",Q,j],borderSpacing:I(),borderWidth:G(),contrast:B(),grayscale:F(),hueRotate:B(),invert:F(),gap:I(),gradientColorStops:[n],gradientColorStopPositions:[js,q],inset:T(),margin:T(),opacity:B(),padding:I(),saturate:B(),scale:B(),sepia:F(),skew:B(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[Q]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"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"],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:[...P(),j]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ue,j]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",ue,j]}],"grid-cols":[{"grid-cols":[de]}],"col-start-end":[{col:["auto",{span:["full",ue,j]},j]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[de]}],"row-start-end":[{row:["auto",{span:[ue,j]},j]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[c]}],"gap-x":[{"gap-x":[c]}],"gap-y":[{"gap-y":[c]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[v]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[v]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,e]}],"min-w":[{"min-w":[j,e,"min","max","fit"]}],"max-w":[{"max-w":[j,e,"none","full","min","max","fit","prose",{screen:[Q]},Q]}],h:[{h:[j,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Q,q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ce]}],"font-family":[{font:[de]}],"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:["tighter","tight","normal","wide","wider","widest",j]}],"line-clamp":[{"line-clamp":["none",oe,Ce]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",J,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...E(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",J,q]}],"underline-offset":[{"underline-offset":["auto",J,j]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],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",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...P(),As]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Rs]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Is]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...E(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:E()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...E()]}],"outline-offset":[{"outline-offset":[J,j]}],"outline-w":[{outline:[J,q]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[J,q]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Q,Ps]}],"shadow-color":[{shadow:[de]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":le()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[s]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Q,j]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[A]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[ue,j]}],"translate-x":[{"translate-x":[$]}],"translate-y":[{"translate-y":[$]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],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",j]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",j]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[J,q,Ce]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"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"],"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"]}}},zs=xs(Ms);function Ds(...n){return zs(jt.clsx(n))}exports.ActivityIndicator=Pe;exports.Alert=Lt;exports.AppContainer=Me;exports.AppContext=Te;exports.AppDialog=es;exports.AppPanel=Zn;exports.AppTaskbar=_n;exports.AppTitleBar=gt;exports.Battery=Rt;exports.Button=X;exports.ButtonGroup=At;exports.Checkbox=It;exports.CloseButton=Oe;exports.ComboBox=Zt;exports.ContextMenu=sn;exports.Dialog=rn;exports.DialogClose=_;exports.EditButton=en;exports.Hyperlink=nn;exports.Input=ln;exports.ListGroup=un;exports.ListGroupItem=cn;exports.MultiSelect=dn;exports.NavStackContainer=is;exports.NavStackProvider=ss;exports.Notification=ut;exports.NotificationContainer=vn;exports.NumberInput=fn;exports.RefreshButton=_t;exports.Slider=pn;exports.Tabs=gn;exports.Toggle=mn;exports.TrashButton=tn;exports.ViewportProvider=Xn;exports.appRegistry=ne;exports.appStateStore=K;exports.backHandlerRegistry=Ee;exports.clearAppInUrl=pt;exports.cn=Ds;exports.createAppI18nFactory=Kn;exports.notificationManager=yn;exports.runningAppsStore=V;exports.setAppInUrl=$e;exports.useApp=ht;exports.useDialog=lt;exports.useNavStack=ts;exports.useNavView=ns;exports.useViewport=ze;
1
+ "use strict";var Fe=Object.defineProperty;var Ue=(e,t,n)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var O=(e,t,n)=>Ue(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),u=require("react"),se=require("react-dom"),U=require("react-i18next"),W=require("./GeneratedIcons-HAHchVYC.cjs"),Ke=require("i18next"),qe=require("./clsx-C11secjj.cjs");function he({size:e="default",color:t,overlay:n=!1,className:r=""}){const o=s.jsx("svg",{className:`nc-activity-indicator nc-${e} ${r}`,viewBox:"0 0 50 50",style:t?{color:t}:void 0,children:s.jsx("circle",{className:"nc-activity-indicator-circle",cx:"25",cy:"25",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round"})});return n?s.jsx("div",{className:"nc-activity-indicator-overlay",children:o}):o}function D({variant:e="default",block:t,size:n="default",className:r,disabled:o,textSelectable:i,loading:c,onClick:a,children:d,...f}){const m=["nc-button",e!=="default"?`nc-${e}`:"",t?"nc-block":"",n==="small"?"nc-small":"",n==="large"?"nc-large":"",o||c?"nc-disabled":"",i?"nc-text-selectable":"",c?"nc-loading":"",r??""].filter(Boolean).join(" "),h=l=>{if(!c){if(i){const p=window.getSelection();if(p&&p.toString().length>0)return}a==null||a(l)}};return s.jsxs("button",{className:m,disabled:o||c,onClick:h,...f,children:[c&&s.jsx(he,{size:"small",className:"nc-button-spinner",color:e!=="default"&&e!=="ghost"?"white":void 0}),d]})}function _e({code:e,text:t,type:n,button:r,onAction:o}){return s.jsxs("div",{className:`nc-alert nc-${n}`,children:[s.jsxs("span",{className:`nc-alert-message nc-${n}`,children:[s.jsx("span",{className:"nc-alert-code",children:e}),t]}),r&&s.jsx("span",{className:"nc-alert-action",children:s.jsx(D,{size:"small",variant:r.variant??(n==="error"?"danger":"warning"),onClick:o,children:r.text})})]})}function Je({percentage:e=.5,status:t="discharging",darkMode:n=!1,colored:r=!1}){const o=Math.max(0,Math.min(1,Number(e)||0));let i;r?o<.1?i="var(--nc-danger)":o<.2?i="var(--nc-warning)":i="var(--nc-success)":i=n?"#ffffff":"#000000";const c=n?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.2)",a=24,d=14,f=2,m=0,h=12,l=0,p=0,g=0,b=a,x=d,y=x-l*2,j=b-l*2,R=Math.max(1,Math.min(4,x/4)),w=o===0?0:.05+o*.95,A=a+f+h,S=20,v=.65,C=Math.max(d,S*v),k=a+f+1,E=(d-S*v)/2;return s.jsxs("svg",{className:"nc-battery",width:A,height:C,viewBox:`0 0 ${A} ${C}`,role:"img","aria-label":`Battery ${o===0?"-":Math.round(o*100)+"%"} ${t}`,children:[s.jsxs("defs",{children:[s.jsx("mask",{id:`nc-battery-fill-mask-${o}`,children:s.jsx("rect",{x:"0",y:"0",width:j*w,height:y,fill:"white"})}),s.jsxs("mask",{id:`nc-battery-text-mask-${o}`,children:[s.jsx("rect",{x:"0",y:"0",width:A,height:C,fill:"white"}),s.jsx("text",{x:p+b/2,y:d-3,fontSize:11,fontWeight:"bold",fill:"black",textAnchor:"middle",children:o===0?"-":Math.round(o*100)})]})]}),s.jsxs("g",{mask:`url(#nc-battery-text-mask-${o})`,children:[s.jsx("rect",{x:p,y:g,rx:R,ry:R,width:b,height:x,fill:c}),s.jsx("rect",{x:p+l,y:g+l,width:j,height:y,fill:i,rx:R,ry:R,mask:`url(#nc-battery-fill-mask-${o})`}),s.jsx("rect",{x:a+m,y:d*.26,width:f,height:d*.48,rx:.8,ry:.8,fill:o===1?i:c}),t==="charging"?s.jsx("g",{transform:`translate(${k}, ${E}) scale(${v})`,fill:i,children:s.jsx("path",{d:"M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z"})}):null]})]})}function Xe({value:e,onChange:t,options:n,disabled:r,labels:o,size:i="default"}){return s.jsx("div",{className:`nc-button-group ${i==="small"?"nc-small":""}`,children:n.map((c,a)=>s.jsx("button",{className:`nc-button-group-item ${e===c?"nc-active":""} ${a<n.length-1?"nc-has-border":""}`,onClick:()=>!r&&t(c),disabled:r,children:o&&o[c]?o[c]:c},c))})}function Qe({size:e}){return s.jsx("svg",{className:`nc-checkbox-icon ${e==="small"?"nc-small":""}`,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M2 6L5 9L10 3",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ze({checked:e,onChange:t,disabled:n,label:r,size:o="default",labelColor:i,style:c,className:a=""}){const d=o==="small";return s.jsxs("label",{className:`nc-checkbox-label ${d?"nc-small":""} ${n?"nc-disabled":""} ${a}`.trim(),style:c,onClick:f=>{n||(f.preventDefault(),t(!e))},children:[s.jsx("span",{role:"checkbox","aria-checked":e,tabIndex:0,className:`nc-checkbox-box ${d?"nc-small":""} ${e?"nc-checked":""}`,onKeyDown:f=>{n||(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),t(!e))},children:e&&s.jsx(Qe,{size:o})}),r&&s.jsx("span",{className:"nc-checkbox-text",style:i?{color:i}:void 0,children:r})]})}function et({option:e,onChange:t,selected:n,highlighted:r,small:o}){const i=u.useRef(null),{t:c}=U.useTranslation();return u.useEffect(()=>{r&&i.current&&i.current.scrollIntoView({block:"nearest"})},[r]),s.jsxs("div",{ref:i,className:`nc-combo-dropdown-option ${o?"nc-small":""} ${r?"nc-highlighted":""}`,role:"option",onMouseDown:()=>t(e.value),"aria-selected":n,style:{cursor:"pointer",background:r?"rgba(59,130,246,0.18)":n?"rgba(59,130,246,0.12)":void 0},children:[e.label,e.default&&s.jsxs("span",{style:{fontSize:"0.85em",color:"var(--nc-text-weak)",marginLeft:6},children:["(",c("common.default"),")"]})]})}function tt({isOpen:e,options:t,onSelect:n,selectedValue:r,placement:o="bottom",anchorRef:i,small:c,highlightedIndex:a=-1}){const[d,f]=u.useState({top:0,left:0,width:0}),[m,h]=u.useState(o),{t:l}=U.useTranslation();if(u.useEffect(()=>{if(e&&i.current){const g=i.current.getBoundingClientRect();let b=o;if(o==="bottom"){const x=window.innerHeight-g.bottom,y=g.top;x<320&&y>x&&(b="top")}h(b),f({top:b==="top"?g.top-4:g.bottom+4,left:g.left,width:g.width})}},[e,i,o]),!e)return null;const p=s.jsx("div",{className:"nc-combo-dropdown",style:{position:"fixed",top:m==="top"?void 0:d.top,bottom:m==="top"?window.innerHeight-d.top:void 0,left:d.left,width:d.width,zIndex:1e3,maxHeight:300,overflowY:"auto"},children:t.length===0?s.jsx("div",{className:`nc-combo-dropdown-option nc-no-results ${c?"nc-small":""}`,children:l("common.noResults")}):t.map((g,b)=>s.jsx(et,{option:g,onChange:n,selected:g.value===r,highlighted:b===a,small:c},g.value))});return se.createPortal(p,document.body)}function nt({onClick:e,small:t}){return s.jsx("button",{className:`nc-button nc-ghost nc-combo-button nc-combo-clear ${t?"nc-small":""}`,onClick:e,onMouseDown:n=>n.stopPropagation(),"aria-label":"Clear selection",children:"✕"})}function rt({open:e,onClick:t,small:n}){return s.jsx("button",{className:`nc-button nc-ghost nc-combo-button nc-combo-toggle ${n?"nc-small":""} ${e?"nc-open":""}`,onClick:t,onMouseDown:r=>r.stopPropagation(),"aria-label":e?"Close":"Open",children:"▾"})}function st({value:e,onChange:t,placeholder:n="Select…",options:r,disabled:o,label:i,clearable:c=!0,allowTyping:a=!1,placement:d="bottom",size:f="default",style:m,className:h}){const[l,p]=u.useState(!1),[g,b]=u.useState(""),[x,y]=u.useState(-1),j=u.useRef(null),R=u.useRef(null),w=f==="small",{t:A}=U.useTranslation(),S=u.useMemo(()=>{const I=g.toLowerCase();return a?r.filter($=>$.label.toLowerCase().includes(I)):r},[r,g,a]);u.useEffect(()=>{l&&y(-1)},[l,S]),u.useEffect(()=>{if(!c&&!e&&r.length>0&&t){const I=r.find($=>$.default)||r[0];t(I.value)}},[c,e,r,t]),u.useEffect(()=>{function I($){var P;$.target instanceof Node&&j.current&&((P=j.current.parentElement)!=null&&P.contains($.target)||p(!1))}return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[]);const v=r.find(I=>I.value===e),C=v&&c,k=!o&&!C,E=!(l&&a)&&!!v,T=(I,$=!1)=>{var P;t==null||t(I),p(!1),b(""),$&&((P=j.current)==null||P.blur())},M=()=>{t==null||t(void 0),b(""),p(!1)},B=I=>{if(!l){(I.key==="ArrowDown"||I.key==="ArrowUp")&&(p(!0),I.preventDefault());return}switch(I.key){case"ArrowDown":I.preventDefault(),y($=>{const P=$+1;return P>=S.length?0:P});break;case"ArrowUp":I.preventDefault(),y($=>{const P=$-1;return P<0?S.length-1:P});break;case"Enter":I.preventDefault(),x>=0&&x<S.length&&T(S[x].value,!0);break;case"Escape":I.preventDefault(),p(!1),b("");break}};return s.jsxs("div",{className:`nc-combo-container ${h||""}`.trim(),style:{position:"relative",...m},children:[i&&s.jsx("span",{className:`nc-label ${w?"nc-small":""}`,children:i}),s.jsxs("div",{ref:R,style:{position:"relative",display:"flex",alignItems:"center"},onMouseDown:I=>{o||a&&I.target===j.current||(p($=>(!$&&a&&v&&b(v.label),!$)),a&&!l&&setTimeout(()=>{var $,P;($=j.current)==null||$.focus(),(P=j.current)==null||P.select()},0))},children:[s.jsx("input",{ref:j,className:`nc-input ${w?"nc-small":""}`,placeholder:n,onFocus:()=>{var I;!o&&a&&(p(!0),v&&(b(v.label),setTimeout(()=>{var $;return($=j.current)==null?void 0:$.select()},0))),a||(I=j.current)==null||I.blur()},onChange:I=>a&&b(I.target.value),onKeyDown:B,value:l&&a?g:(v==null?void 0:v.label)||"",readOnly:o||!a,style:{width:"100%",paddingRight:k||C?w?32:44:12,caretColor:a?void 0:"transparent",cursor:a?void 0:"pointer",userSelect:a?void 0:"none",color:E?"transparent":"var(--nc-text)"}}),E&&s.jsxs("div",{"aria-hidden":!0,style:{position:"absolute",left:w?8:12,right:k||C?w?12:24:w?8:12,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",display:"flex",alignItems:"center",gap:6,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[s.jsx("span",{className:`nc-combo-overlay-text ${w?"nc-small":""}`,children:v==null?void 0:v.label}),(v==null?void 0:v.default)&&s.jsxs("span",{className:`nc-combo-overlay-default ${w?"nc-small":""}`,children:["(",A("common.default"),")"]})]}),C&&s.jsx(nt,{onClick:M,small:w}),k&&s.jsx(rt,{open:l,onClick:()=>p(I=>!I),small:w})]}),s.jsx(tt,{isOpen:l,options:S,onSelect:T,selectedValue:e,placement:d,anchorRef:R,small:w,highlightedIndex:x})]})}function ot({onClick:e,loading:t=!1,disabled:n=!1,size:r="default",title:o,"aria-label":i}){const c=r==="small"?14:r==="large"?20:18,a=t?"Refreshing...":"Refresh",d=t?"Refreshing":"Refresh";return s.jsx("button",{className:"nc-icon-button",onClick:e,disabled:n||t,title:o??a,"aria-label":i??d,"data-size":r,children:s.jsx(W.RefreshIcon,{size:c,className:t?"nc-spinning":""})})}function me({onClick:e,disabled:t=!1,size:n="default",title:r="Close","aria-label":o="Close"}){const i=n==="small"?14:n==="large"?20:18;return s.jsx("button",{className:"nc-icon-button nc-icon-button-close",onClick:e,disabled:t,title:r,"aria-label":o,"data-size":n,children:s.jsx(W.CloseIcon,{size:i})})}function it({onClick:e,disabled:t=!1,size:n="default",title:r="Edit","aria-label":o="Edit"}){const i=n==="small"?14:n==="large"?20:18;return s.jsx("button",{className:"nc-icon-button nc-icon-button-edit",onClick:e,disabled:t,title:r,"aria-label":o,"data-size":n,children:s.jsx(W.EditIcon,{size:i})})}function at({onClick:e,disabled:t=!1,size:n="default",title:r="Delete","aria-label":o="Delete"}){const i=n==="small"?14:n==="large"?20:18;return s.jsx("button",{className:"nc-icon-button nc-icon-button-trash",onClick:e,disabled:t,title:r,"aria-label":o,"data-size":n,children:s.jsx(W.TrashIcon,{size:i})})}function ct({onClick:e,disabled:t=!1,children:n,title:r,"aria-label":o,size:i="default"}){return s.jsx("button",{className:"nc-hyperlink",onClick:e,disabled:t,title:r,"aria-label":o,"data-size":i,children:n})}function lt({open:e,onClose:t,options:n,anchorRef:r,anchor:o,preferredDirection:i="down"}){const c=u.useRef(null),[a,d]=u.useState({top:0,left:0}),f=o||(r==null?void 0:r.current);if(u.useEffect(()=>{if(!e||!f||!c.current)return;const h=f.getBoundingClientRect(),l=c.current.getBoundingClientRect(),p=window.innerHeight,g=window.innerWidth,b=h.bottom+8,x=b+l.height<=p-8;let y=i;(!x&&i==="down"||i==="up"&&x)&&(y="up");let j;y==="down"?j=b:j=h.top-l.height-8;let R=h.left;R+l.width>g-8&&(R=h.right-l.width),d({top:Math.max(8,j),left:Math.max(8,R)})},[e,f,i]),u.useEffect(()=>{if(!e)return;const h=p=>{c.current&&!c.current.contains(p.target)&&f&&!f.contains(p.target)&&t()},l=p=>{p.key==="Escape"&&t()};return document.addEventListener("mousedown",h),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",l)}},[e,t,f]),!e)return null;const m=h=>{h.disabled||(h.onClick(),t())};return se.createPortal(s.jsx("div",{ref:c,className:"nc-context-menu",style:{position:"fixed",top:`${a.top}px`,left:`${a.left}px`,zIndex:1e4},role:"menu",children:n.map(h=>s.jsxs("button",{className:`nc-context-menu-item ${h.variant==="danger"?"nc-danger":""} ${h.disabled?"nc-disabled":""}`,onClick:()=>m(h),disabled:h.disabled,role:"menuitem",children:[h.icon&&s.jsx("span",{className:"nc-context-menu-icon",children:h.icon}),s.jsx("span",{className:"nc-context-menu-label",children:h.label})]},h.id))}),document.body)}const Re=u.createContext(null);function Ee(){const e=u.useContext(Re);if(!e)throw new Error("useDialog must be used inside a Dialog component");return e}function K({children:e,onClick:t,...n}){const{close:r}=Ee(),{t:o}=U.useTranslation(),i=c=>{t==null||t(c),r()};return s.jsx(D,{onClick:i,...n,children:e??o("common.close")})}function J(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}function dt({open:e,onClose:t,title:n,children:r,width:o=360,height:i,minWidth:c,minHeight:a,maxWidth:d="95vw",maxHeight:f="95vh",footerType:m="ok-cancel",footer:h,onOk:l,onSave:p,onDelete:g,onCancel:b,onConnect:x,closeOnOverlay:y=!0,primaryDisabled:j=!1,fullScreen:R=!1,hideTitleBar:w=!1}){const A=u.useRef(null),{t:S}=U.useTranslation(),v={close:t},C=T=>{y&&T.target===T.currentTarget&&t()};if(u.useEffect(()=>{e&&A.current&&A.current.focus()},[e]),!e)return null;const k=()=>{switch(m){case"ok":return s.jsx("div",{className:"nc-dialog-footer",children:s.jsx(D,{variant:"primary",onClick:l??t,disabled:j,children:S("common.ok")})});case"ok-cancel":return s.jsxs("div",{className:"nc-dialog-footer",children:[s.jsx(D,{variant:"primary",onClick:l??t,disabled:j,children:S("common.ok")}),s.jsx(K,{variant:"ghost",onClick:b,children:S("common.cancel")})]});case"save-cancel":return s.jsxs("div",{className:"nc-dialog-footer",children:[s.jsx(D,{variant:"primary",onClick:p,disabled:j,children:S("common.save")}),s.jsx(K,{variant:"ghost",onClick:b,children:S("common.cancel")})]});case"delete-cancel":return s.jsxs("div",{className:"nc-dialog-footer",children:[s.jsx(D,{variant:"danger",onClick:g,disabled:j,children:S("common.delete")}),s.jsx(K,{variant:"ghost",onClick:b,children:S("common.cancel")})]});case"connect":return s.jsxs("div",{className:"nc-dialog-footer",children:[s.jsx(D,{variant:"primary",onClick:x,disabled:j,children:S("common.connect")}),s.jsx(K,{variant:"ghost",onClick:b,children:S("common.cancel")})]});case"close":return s.jsx("div",{className:"nc-dialog-footer",children:s.jsx(K,{variant:"primary"})});case"gotit":return s.jsx("div",{className:"nc-dialog-footer",children:s.jsx(K,{variant:"primary",children:S("common.gotit")})});case"custom":return s.jsx("div",{className:"nc-dialog-footer",children:h});case"none":return null;default:return null}},E=s.jsx(Re.Provider,{value:v,children:s.jsx("div",{className:`nc-dialog-overlay${R?" nc-fullscreen":""}`,onClick:C,children:s.jsxs("div",{ref:A,className:"nc-dialog-container",style:{width:J(o),height:J(i),minWidth:J(c),minHeight:J(a),maxWidth:J(d),maxHeight:J(f)},tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":w?void 0:"nc-dialog-title",children:[!w&&s.jsxs("div",{className:"nc-dialog-header",children:[s.jsx("h3",{id:"nc-dialog-title",className:"nc-dialog-title",children:n}),s.jsx(me,{onClick:t,"aria-label":"Close dialog"})]}),s.jsx("div",{className:"nc-dialog-content",children:r}),k()]})})});return R?se.createPortal(E,document.body):E}function ut({onClick:e,size:t="default",rightOffset:n=4}){const r=t==="small"?28:34;return s.jsx("button",{className:"nc-button nc-ghost",onClick:e,onMouseDown:o=>o.stopPropagation(),tabIndex:-1,"aria-label":"Clear input",style:{position:"absolute",right:n,padding:0,minHeight:0,height:r,width:r,border:"none",display:"flex",alignItems:"center",justifyContent:"center",fontSize:t==="small"?"12px":"14px"},children:"✕"})}function pt({visible:e,onClick:t,size:n="default"}){const r=n==="small"?28:34,o=n==="small"?16:18;return s.jsx("button",{className:"nc-button nc-ghost",onClick:t,onMouseDown:i=>i.stopPropagation(),tabIndex:-1,"aria-label":e?"Hide password":"Show password",style:{position:"absolute",right:4,padding:0,minHeight:0,height:r,width:r,border:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:e?s.jsx(W.EyeHiddenIcon,{size:o}):s.jsx(W.ViewIcon,{size:o})})}function ft({value:e="",onChange:t,onEnter:n,onClear:r,placeholder:o,disabled:i,label:c,clearable:a=!0,type:d="text",className:f="",size:m="default",style:h,showPasswordToggle:l=!1,multiline:p=!1,rows:g=3,validator:b,showErrorMessage:x=!0}){const y=u.useRef(null),j=u.useRef(null),[R,w]=u.useState(!1),A=b?b(e):null,S=!!A,v=d==="password",C=v&&l&&!i&&!p,k=a&&e&&!i,E=m==="small"?32:44;let T=12;k&&C?T=E*2:(k||C)&&(T=E);const M=()=>{var P,Z;t==null||t(""),r==null||r(),p?(P=j.current)==null||P.focus():(Z=y.current)==null||Z.focus()},B=P=>{P.key==="Enter"&&!p&&(n==null||n())},I=P=>{t==null||t(P.target.value)},$=`nc-input ${m==="small"?"nc-small ":""} ${S?"nc-error ":""}${f}`;return s.jsxs("div",{className:"nc-col",style:{position:"relative",flex:1,...h},children:[c&&s.jsx("span",{className:"nc-label",children:c}),s.jsxs("div",{style:{position:"relative",display:"flex",alignItems:p?"flex-start":"center"},children:[p?s.jsx("textarea",{ref:j,className:$,placeholder:o,value:e,onChange:I,onKeyDown:B,disabled:i,rows:g,style:{width:"100%",paddingRight:T,resize:"vertical"}}):s.jsx("input",{ref:y,type:v&&R?"text":d,className:$,placeholder:o,value:e,onChange:I,onKeyDown:B,disabled:i,style:{width:"100%",paddingRight:T}}),k&&s.jsx(ut,{onClick:M,size:m,rightOffset:C?E+4:4}),C&&s.jsx(pt,{visible:R,onClick:()=>w(!R),size:m})]}),S&&x&&s.jsx("span",{className:"nc-error-message",children:A})]})}function ht({children:e,onClick:t,showBorder:n=!0,selectable:r=!1,style:o}){const[i,c]=u.useState(!1),a=d=>{if(t){if(r){const f=window.getSelection();if(f&&f.toString().length>0)return}t(d)}};return s.jsx("div",{onClick:a,onMouseDown:()=>t&&c(!0),onMouseUp:()=>c(!1),onMouseLeave:()=>c(!1),style:{cursor:t?"pointer":"default",userSelect:r?"text":void 0,borderBottom:n?void 0:"none",...o},className:`nc-list-group-item ${t?"nc-list-group-item-clickable":""} ${i?"nc-list-group-item-active":""}`,children:s.jsx("div",{style:{flex:1},children:e})})}function mt({title:e,titleTools:t,children:n,style:r}){return s.jsxs("div",{className:"nc-list-group",style:r,children:[(e||t)&&s.jsxs("div",{className:"nc-list-group-title",children:[s.jsx("div",{children:e}),t&&s.jsx("div",{className:"nc-list-group-title-tools",children:t})]}),s.jsx("div",{className:"nc-list-group-content",children:n})]})}function gt({values:e,onChange:t,options:n,placeholder:r="Select…",label:o}){const[i,c]=u.useState(!1),[a,d]=u.useState(""),f=u.useRef(null),m=u.useMemo(()=>n.filter(l=>l.label.toLowerCase().includes(a.toLowerCase())),[n,a]);u.useEffect(()=>{function l(p){!(p.target instanceof Node)||!f.current||f.current.contains(p.target)||c(!1)}return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]);const h=l=>{e.includes(l)?t(e.filter(p=>p!==l)):t([...e,l])};return s.jsxs("div",{ref:f,className:"nc-col",style:{position:"relative"},children:[o&&s.jsx("span",{className:"nc-label",children:o}),s.jsxs("div",{className:"nc-row",style:{flexWrap:"wrap",gap:6,minHeight:42,alignItems:"center",border:"1px solid var(--nc-button-border)",borderRadius:8,background:"var(--nc-button-bg)",padding:"4px 8px"},children:[e.length===0&&s.jsx("span",{className:"nc-label",children:r}),e.map(l=>{const p=n.find(g=>g.value===l);return p?s.jsxs("span",{style:{padding:"4px 8px",borderRadius:6,display:"inline-flex",alignItems:"center",gap:4,background:"var(--nc-button-bg)",border:"1px solid var(--nc-button-border)"},children:[p.label,s.jsx("button",{className:"nc-button nc-ghost",style:{padding:0,minHeight:0,height:20,width:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none"},onClick:()=>h(l),"aria-label":`Remove ${p.label}`,children:"✕"})]},l):null}),s.jsx("input",{className:"nc-input",value:a,onChange:l=>d(l.target.value),onFocus:()=>c(!0),style:{minWidth:50,border:"none",background:"transparent",padding:4,minHeight:32,flex:1}})]}),i&&s.jsxs("div",{className:"nc-combo-dropdown",style:{position:"absolute",top:"100%",left:0,right:0,zIndex:10,marginTop:4,boxShadow:"0 4px 12px var(--nc-shadow)"},children:[m.map(l=>{const p=e.includes(l.value);return s.jsxs("div",{className:"nc-section nc-row",style:{justifyContent:"space-between",cursor:"pointer",padding:12},onMouseDown:()=>h(l.value),children:[s.jsx("span",{children:l.label}),s.jsx("span",{children:p?"✔️":""})]},l.value)}),m.length===0&&s.jsx("div",{className:"nc-section nc-label",children:"No results"})]})]})}const bt=["January","February","March","April","May","June","July","August","September","October","November","December"];function oe(e){if(!e)return null;const t=/^\d{2}-\d{1,2}$/,n=/^\d{4}-\d{1,2}$/;if(!t.test(e)&&!n.test(e))return"Format must be YY-M(M) or YYYY-M(M)";const r=e.split("-"),o=parseInt(r[1],10);return o<1||o>12?"Month must be between 1 and 12":null}function re(e){if(!e)return"";const t=e.split("-");if(t.length!==2)return e;let n=t[0];const r=t[1].padStart(2,"0");if(n.length===2){const o=parseInt(n,10);n=String(o<50?2e3+o:1900+o)}return`${n}-${r}`}function ke(e){if(!e)return"";const t=re(e);if(!/^\d{4}-\d{2}$/.test(t))return e;const[n,r]=t.split("-"),o=parseInt(r,10)-1;return`${bt[o]} ${n}`}function Ne(){const e=new Date,t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0");return`${t}-${n}`}function xt({startMonth:e,endMonth:t,onChange:n,label:r,className:o="",disabled:i=!1}){const[c,a]=u.useState(!1),[d,f]=u.useState(""),[m,h]=u.useState(""),[l,p]=u.useState({top:0,left:0,width:0}),g=u.useRef(null),b=u.useRef(null);u.useEffect(()=>{if(c&&g.current){const E=g.current.getBoundingClientRect();p({top:E.bottom+4,left:E.left,width:E.width})}},[c]),u.useEffect(()=>{if(!c)return;const E=T=>{g.current&&!g.current.contains(T.target)&&b.current&&!b.current.contains(T.target)&&a(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[c]);const x=()=>{f(e||Ne()),h(t||Ne()),a(!0)},y=()=>{a(!1)},j=()=>{const E=oe(d),T=oe(m);if(E||T)return;const M=re(d),B=re(m);M&&B&&(n==null||n(M,B)),a(!1)},R=e&&t?`${ke(e)} - ${ke(t)}`:"Select month range",w=oe(d),A=oe(m),S=re(d),v=re(m),C=S&&v&&S>v,k=c?se.createPortal(s.jsx("div",{ref:b,className:"nc-month-range-picker-popup",style:{position:"fixed",top:l.top,left:l.left,width:Math.max(l.width,400),zIndex:1e3},children:s.jsxs("div",{className:"nc-month-range-picker-content",children:[s.jsxs("div",{className:"nc-month-range-picker-row",children:[s.jsxs("div",{className:"nc-month-range-picker-column",children:[s.jsx("label",{className:"nc-label",children:"Start Month"}),s.jsx("input",{type:"text",className:`nc-month-input ${w?"nc-error":""}`,value:d,onChange:E=>f(E.target.value),placeholder:"YY-M(M) or YYYY-M(M)"}),w&&s.jsx("div",{className:"nc-month-error-text",children:w})]}),s.jsxs("div",{className:"nc-month-range-picker-column",children:[s.jsx("label",{className:"nc-label",children:"End Month"}),s.jsx("input",{type:"text",className:`nc-month-input ${A?"nc-error":""}`,value:m,onChange:E=>h(E.target.value),placeholder:"YY-M(M) or YYYY-M(M)"}),A&&s.jsx("div",{className:"nc-month-error-text",children:A})]})]}),C&&!w&&!A&&s.jsx("div",{className:"nc-month-range-error",children:"End month must be after or equal to start month"}),s.jsxs("div",{className:"nc-month-range-picker-footer",children:[s.jsx(D,{variant:"primary",onClick:j,disabled:!d||!m||!!w||!!A||!!C,children:"Apply"}),s.jsx(D,{variant:"ghost",onClick:y,children:"Cancel"})]})]})}),document.body):null;return s.jsxs("div",{className:`nc-month-range-picker ${o}`,children:[r&&s.jsx("label",{className:"nc-label",children:r}),s.jsx("button",{ref:g,className:"nc-month-range-picker-input",onClick:x,disabled:i,children:R}),k]})}function vt({value:e,onChange:t,min:n,max:r,step:o=1,label:i,disabled:c,size:a="default"}){const d=a==="small",f=()=>{const l=e-o;n!==void 0&&l<n||t(parseFloat(l.toFixed(10)))},m=()=>{const l=e+o;r!==void 0&&l>r||t(parseFloat(l.toFixed(10)))},h=l=>{const p=parseFloat(l.target.value);isNaN(p)||n!==void 0&&p<n||r!==void 0&&p>r||t(p)};return s.jsxs("div",{className:`nc-col nc-number-input-col ${d?"nc-small":""}`,children:[i&&s.jsx("span",{className:`nc-label ${d?"nc-small":""}`,children:i}),s.jsxs("div",{className:`nc-number-input-container ${d?"nc-small":""}`,children:[s.jsx("input",{className:`nc-input nc-number-input ${d?"nc-small":""}`,type:"number",value:e,onChange:h,min:n,max:r,step:o,disabled:c}),s.jsx("button",{className:`nc-button nc-ghost nc-number-input-button ${d?"nc-small":""}`,onClick:f,disabled:c||n!==void 0&&e<=n,children:"−"}),s.jsx("button",{className:`nc-button nc-ghost nc-number-input-button ${d?"nc-small":""}`,onClick:m,disabled:c||r!==void 0&&e>=r,children:"+"})]})]})}function wt({value:e,onChange:t,min:n=0,max:r=100,step:o=1,label:i,disabled:c,showValue:a=!0,formatValue:d=m=>m.toString(),width:f=200}){const m=l=>{const p=parseFloat(l.target.value);t(p)},h=(e-n)/(r-n)*100;return s.jsxs("div",{className:"nc-col",style:{gap:6},children:[i&&s.jsx("span",{className:"nc-label",children:i}),s.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[s.jsx("input",{type:"range",className:"nc-slider",value:e,onChange:m,min:n,max:r,step:o,disabled:c,style:{width:f,"--nc-slider-percentage":`${h}%`}}),a&&s.jsx("span",{style:{color:"var(--nc-text)",fontFamily:"monospace",fontSize:14,minWidth:60,textAlign:"right"},children:d(e)})]})]})}const yt=({size:e=24,className:t,style:n})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:s.jsx("polyline",{points:"18 15 12 9 6 15"})});function jt({tabs:e,active:t,onChange:n,className:r,toolbar:o,multiline:i,orientation:c="horizontal",style:a}){const d=u.useRef(null),[f,m]=u.useState(!1),[h,l]=u.useState(!1),p=c==="verticalLeft"||c==="verticalRight",g=u.useRef(!1),b=u.useRef(0),x=u.useRef(0),y=u.useRef(!1);u.useEffect(()=>{const v=()=>{if(d.current)if(p){const{scrollTop:k,scrollHeight:E,clientHeight:T}=d.current;m(k>1),l(k<E-T-1)}else{const{scrollLeft:k,scrollWidth:E,clientWidth:T}=d.current;m(k>1),l(k<E-T-1)}},C=d.current;if(C)return v(),C.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{C.removeEventListener("scroll",v),window.removeEventListener("resize",v)}},[e,p]);const j=v=>{d.current&&(g.current=!0,y.current=!1,b.current=p?v.clientY:v.clientX,x.current=p?d.current.scrollTop:d.current.scrollLeft,d.current.style.cursor="grabbing",d.current.style.userSelect="none")},R=v=>{if(!g.current||!d.current)return;const C=p?v.clientY:v.clientX,k=b.current-C;Math.abs(k)>3&&(y.current=!0),p?d.current.scrollTop=x.current+k:d.current.scrollLeft=x.current+k},w=()=>{d.current&&(g.current=!1,d.current.style.cursor="",d.current.style.userSelect="")},A=()=>{w()};u.useEffect(()=>{const v=d.current;if(!v||p)return;const C=k=>{k.deltaY!==0&&(k.preventDefault(),v.scrollLeft+=k.deltaY*.3)};return v.addEventListener("wheel",C,{passive:!1}),()=>{v.removeEventListener("wheel",C)}},[p]);const S=v=>{y.current||n(v)};return s.jsxs("div",{className:`nc-tab-container ${p?`nc-vertical nc-${c}`:""} ${r||""}`,style:a,children:[s.jsxs("div",{className:"nc-tab-scroll-wrapper",children:[f&&s.jsx("div",{className:`nc-tab-scroll-indicator ${p?"nc-top":"nc-left"}`,children:p?s.jsx(yt,{size:16}):s.jsx(W.ChevronLeftIcon,{size:16})}),s.jsx("div",{ref:d,className:`nc-tab-scroll ${i?"nc-multiline":""}`,onMouseDown:j,onMouseMove:R,onMouseUp:w,onMouseLeave:A,style:{cursor:"grab"},children:e.map(v=>s.jsx("div",{className:`nc-tab-item ${t===v?"nc-active":""}`,onClick:()=>S(v),role:"button",tabIndex:0,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&n(v)},children:p?v:v.toUpperCase()},v))}),h&&s.jsx("div",{className:`nc-tab-scroll-indicator ${p?"nc-bottom":"nc-right"}`,children:p?s.jsx(W.ChevronDownIcon,{size:16}):s.jsx(W.ChevronRightIcon,{size:16})})]}),o&&s.jsx("div",{className:"nc-tab-toolbar",children:o})]})}function kt({checked:e,onChange:t,disabled:n,label:r}){return s.jsxs("label",{className:"nc-row",style:{gap:10,alignItems:"center",cursor:n?"not-allowed":"pointer"},children:[r&&s.jsx("span",{className:"nc-label",children:r}),s.jsx("span",{role:"switch","aria-checked":e,tabIndex:0,onKeyDown:o=>{n||(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),t(!e))},onClick:()=>!n&&t(!e),style:{position:"relative",width:56,height:30,borderRadius:18,padding:4,display:"inline-flex",alignItems:"center",justifyContent:"flex-start",border:`2px solid ${e?"var(--nc-primary)":"var(--nc-button-border)"}`,background:e?"rgba(99,102,241,0.08)":"transparent",transition:"border-color 160ms, background 160ms"},children:s.jsx("span",{style:{width:22,height:22,borderRadius:12,background:e?"var(--nc-text)":"var(--nc-muted)",transform:`translateX(${e?24:0}px)`,transition:"transform 160ms, background 160ms",boxShadow:e?"0 2px 6px rgba(99,102,241,0.28)":"0 1px 2px rgba(0,0,0,0.08)",border:"none"}})})]})}let q={notifications:[]};const de=new Set,Se=new Map;function ue(){const e=q.notifications.slice();for(const t of Array.from(de))try{t(e)}catch{}}function Nt(e){de.add(e);try{e(q.notifications.slice())}catch{}return()=>{de.delete(e)}}function St(e){const t=`notification-${Date.now()}-${Math.random()}`,n={id:t,dismissible:!0,lastingTime:5e3,...e};return q.notifications=[n,...q.notifications],ue(),n.lastingTime&&n.lastingTime>0&&setTimeout(()=>{Me(t)},n.lastingTime),t}function Me(e){const t=q.notifications.find(r=>r.id===e);if(!t)return;t.isRemoving=!0,ue();const n=window.setTimeout(()=>{q.notifications=q.notifications.filter(r=>r.id!==e),ue(),Se.delete(e)},300);Se.set(e,n)}function $e({notification:e}){const{t}=U.useTranslation(),n=()=>{if(e.title)return e.title;switch(e.type){case"success":return t("common.success");case"danger":return t("common.error");case"warning":return t("common.warning");default:return t("common.info")}},r=()=>{Me(e.id)};return s.jsx("div",{className:`nc-notification nc-notification-${e.type||"info"}`,children:s.jsxs("div",{className:"nc-notification-content",children:[s.jsxs("div",{className:"nc-notification-body",style:{paddingRight:e.dismissible?"8px":"0"},children:[s.jsx("div",{className:"nc-notification-title",children:n()}),s.jsx("div",{className:"nc-notification-message",children:e.message})]}),e.dismissible&&s.jsx("button",{className:"nc-notification-dismiss",onClick:r,children:s.jsx(W.CloseIcon,{size:16})})]})})}function At(){const[e,t]=u.useState([]),[n,r]=u.useState(new Map),[o,i]=u.useState(new Set),c=u.useRef(null),a=u.useRef([]);return u.useEffect(()=>Nt(f=>{const m=new Set(a.current.map(l=>l.id)),h=f.filter(l=>!m.has(l.id)).map(l=>l.id);h.length>0?(t(f),i(new Set(h)),requestAnimationFrame(()=>{requestAnimationFrame(()=>{i(new Set)})})):t(f),a.current=f}),[]),u.useEffect(()=>{if(!c.current)return;const d=new Map;let f=0;const m=c.current.children;e.forEach((h,l)=>{if(d.set(h.id,f),m[l]){const p=m[l].offsetHeight;h.isRemoving||(f+=p+12)}}),r(d)},[e]),s.jsx("div",{style:{position:"fixed",top:"16px",left:"16px",zIndex:9999,pointerEvents:"none"},children:s.jsx("div",{ref:c,style:{pointerEvents:"auto",position:"relative"},children:e.map(d=>{const f=o.has(d.id),m=d.isRemoving,h=n.get(d.id)||0;return s.jsx("div",{style:{position:"absolute",top:0,left:0,transform:f?"translateY(-120px)":`translateY(${h}px)`,transition:m?"opacity 300ms ease-out":"transform 300ms ease-out, opacity 300ms ease-out",opacity:m?0:1,width:"100%"},children:s.jsx($e,{notification:d})},d.id)})})})}const Ct={show:e=>St(e)};function It(e){const t=Ke.createInstance(),n={};for(const o in e)n[o]={translation:e[o]};const r=typeof document<"u"&&document.documentElement.lang||"en";return t.init({resources:n,lng:r,fallbackLng:"en",interpolation:{escapeValue:!1}}),typeof MutationObserver<"u"&&typeof document<"u"&&new MutationObserver(i=>{for(const c of i)if(c.type==="attributes"&&c.attributeName==="lang"){const a=document.documentElement.lang||"en";t.changeLanguage(a)}}).observe(document.documentElement,{attributes:!0}),t}class Rt{constructor(){O(this,"apps",new Map)}register(t){this.apps.has(t.id)&&console.warn(`App "${t.id}" is already registered. Overwriting.`),this.apps.set(t.id,{...t,width:t.width??400,padding:t.padding??0})}unregister(t){this.apps.delete(t)}get(t){return this.apps.get(t)}list(){return Array.from(this.apps.values())}has(t){return this.apps.has(t)}}const _=new Rt,Ae="nc-ui-app-state";class Et{constructor(){O(this,"state");O(this,"listeners",new Map);this.state=this.loadState()}loadState(){try{const t=localStorage.getItem(Ae);if(t)return JSON.parse(t)}catch{}return{activeAppId:null}}saveState(){try{localStorage.setItem(Ae,JSON.stringify(this.state))}catch{}}getActiveAppId(){return this.state.activeAppId}_setActiveAppId(t){this.state.activeAppId!==t&&(this.state.activeAppId=t,this.saveState(),this.notify("activeAppId",t))}subscribe(t,n){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n),()=>{var r;(r=this.listeners.get(t))==null||r.delete(n)}}notify(t,n){var r;(r=this.listeners.get(t))==null||r.forEach(o=>o(n))}}const H=new Et;class Mt{constructor(){O(this,"handlers",[])}register(t,n,r){return this.handlers=this.handlers.filter(o=>o.id!==t),this.handlers.push({id:t,priority:n,handler:r}),this.handlers.sort((o,i)=>i.priority-o.priority),()=>{this.handlers=this.handlers.filter(o=>o.id!==t)}}handleBack(){for(const{handler:t}of this.handlers)if(t())return!0;return!1}unregister(t){this.handlers=this.handlers.filter(n=>n.id!==t)}}const ge=new Mt;function pe(e){if(typeof window<"u"&&window.history){const t=new URL(window.location.href);t.searchParams.set("app",e),window.history.pushState({app:e},"",t.toString())}}function Pe(){if(typeof window<"u"&&window.history){const e=new URL(window.location.href);e.searchParams.delete("app"),window.history.replaceState({},"",e.toString())}}class $t{constructor(){O(this,"apps",[]);O(this,"activeAppId",null);O(this,"listeners",new Set);O(this,"refReadyResolvers",new Map)}async launchApp(t,n){const{launchInBackground:r=!1}=n||{};if(!_.has(t))return console.error(`Cannot launch app "${t}": not registered`),null;const o=this.apps.find(c=>c.appId===t);if(o)return r||(this.setActiveApp(t),H._setActiveAppId(t)),o.ref?o:this.waitForRef(t);const i={appId:t,launchedAt:Date.now()};return this.apps.push(i),r||(this.activeAppId=t,H._setActiveAppId(t),pe(t)),this.notify(),this.waitForRef(t)}waitForRef(t){return new Promise(n=>{const r=this.refReadyResolvers.get(t)||[];r.push(n),this.refReadyResolvers.set(t,r)})}setAppRef(t,n){const r=this.apps.find(i=>i.appId===t);if(!r){console.warn(`Cannot set ref for app "${t}": not running`);return}r.ref=n;const o=this.refReadyResolvers.get(t);o&&(o.forEach(i=>i(r)),this.refReadyResolvers.delete(t))}getApp(t){return this.apps.find(n=>n.appId===t)}closeApp(t){const n=this.apps.findIndex(o=>o.appId===t);if(n===-1)return;const r=this.apps[n];if(r.ref&&(r.ref=void 0),this.apps.splice(n,1),this.activeAppId===t){const o=window.innerWidth>=768;this.activeAppId=o&&this.apps.length>0?this.apps[this.apps.length-1].appId:null,H._setActiveAppId(this.activeAppId),this.activeAppId?pe(this.activeAppId):Pe()}this.notify()}setActiveApp(t){if(t!==null&&!this.apps.find(n=>n.appId===t)){console.warn(`Cannot activate app "${t}": not running`);return}this.activeAppId!==t&&(this.activeAppId=t,this.notify(),H._setActiveAppId(t))}toggleApp(t){this.activeAppId===t?this.setActiveApp(null):this.launchApp(t)}getActiveAppId(){return this.activeAppId}getActiveApp(){return this.activeAppId?_.get(this.activeAppId)??null:null}getRunningApps(){return[...this.apps]}isRunning(t){return this.apps.some(n=>n.appId===t)}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}notify(){this.listeners.forEach(t=>t())}}const L=new $t,be=u.createContext(null);function ze(){const e=u.useContext(be);if(!e)throw new Error("useApp must be used inside an App");return e}function Pt({size:e=16}){return s.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M19 12H5"}),s.jsx("path",{d:"M12 19l-7-7 7-7"})]})}function Te({title:e,onClose:t,onBack:n,toolbar:r,hideBackButton:o}){const i=n&&!o;return s.jsxs("div",{className:"nc-app-title-bar",children:[s.jsxs("div",{className:"nc-app-title-bar-left",children:[i&&s.jsx("button",{className:"nc-app-title-bar-back",onClick:n,title:"Back","aria-label":"Go back",children:s.jsx(Pt,{size:16})}),s.jsx("span",{className:"nc-app-title-bar-title",children:e})]}),s.jsxs("div",{className:"nc-app-title-bar-right",children:[r&&s.jsx("div",{className:"nc-app-title-bar-toolbar",children:r}),s.jsx(me,{onClick:t,"aria-label":"Close application"})]})]})}class zt extends u.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error(`Error loading app ${this.props.appId}:`,t,n)}render(){return this.state.hasError?s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,flexDirection:"column",gap:"16px",padding:"20px",textAlign:"center",color:"var(--text-secondary)"},children:[s.jsx("div",{children:"Failed to load app"}),this.state.error&&s.jsx("div",{style:{fontSize:"12px",opacity:.7},children:this.state.error.message})]}):this.props.children}}function xe({appId:e,isActive:t,onClose:n}){const{t:r}=U.useTranslation(),o=_.get(e),[i,c]=u.useState(""),[a,d]=u.useState(null),[f,m]=u.useState(null),[h,l]=u.useState(!1),[p,g]=u.useState(!1);u.useEffect(()=>{o!=null&&o.titleKey&&c(r(o.titleKey))},[o,r]),u.useEffect(()=>{if(t)return ge.register(`app-${e}`,50,()=>a?(a(),!0):(n(),!0))},[t,a,n,e]);const b=u.useCallback(k=>{c(k)},[]),x=u.useCallback(k=>{d(()=>k)},[]),y=u.useCallback(()=>{d(null)},[]),j=u.useCallback(k=>{m(k)},[]),R=u.useCallback(()=>{m(null)},[]),w=u.useCallback(k=>{l(k)},[]),A=u.useCallback(k=>{g(k)},[]),S=u.useMemo(()=>({setTitle:b,setBackHandler:x,clearBackHandler:y,setToolbar:j,clearToolbar:R,setHideBackButton:w,setHideTitleBar:A,close:n}),[b,x,y,j,R,w,A,n]);if(!o)return null;const v=o.component,C=!o.hideTitleBar&&!p;return s.jsxs("div",{style:{display:t?"flex":"none",flexDirection:"column",flex:1,minHeight:0},children:[C&&s.jsx(Te,{title:i,onClose:n,onBack:a??void 0,toolbar:f,hideBackButton:h}),s.jsx("div",{className:C?"nc-app-content-wrapper":"",style:{padding:o.padding,flex:1,minHeight:0,display:"flex",flexDirection:"column",backgroundColor:"var(--nc-bg-secondary)",position:"relative"},children:s.jsx(be.Provider,{value:S,children:s.jsx(zt,{appId:e,children:s.jsx(u.Suspense,{fallback:s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flex:1},children:s.jsx(he,{})}),children:s.jsx(v,{})})})})})]})}function Tt({autoWidth:e=!0,className:t,style:n}){const[r,o]=u.useState(()=>H.getActiveAppId()),[i,c]=u.useState(()=>L.getRunningApps());u.useEffect(()=>{const g=H.subscribe("activeAppId",b=>{o(b)});return()=>{g()}},[]),u.useEffect(()=>L.subscribe(()=>{c(L.getRunningApps())}),[]),u.useEffect(()=>{if(!new URLSearchParams(window.location.search).has("app")){const x=H.getActiveAppId();x&&!L.isRunning(x)&&L.launchApp(x)}},[]);const a=g=>{L.closeApp(g)},d=r?_.get(r):null,m=(d==null?void 0:d.width)??400,h=r!==null,p={...{overflow:"hidden",display:h?"flex":"none",flexDirection:"column",flexShrink:0,...e&&h?{width:m}:{}},...n};return s.jsx("div",{className:t,style:p,children:i.map(g=>s.jsx(xe,{appId:g.appId,isActive:r===g.appId,onClose:()=>a(g.appId)},g.appId))})}const ie=768,ae=1024,Le={isMobile:!1,isTablet:!1,isDesktop:!0,width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768},Be=u.createContext(Le);function Lt({children:e}){const[t,n]=u.useState(()=>{if(typeof window>"u")return Le;const r=window.innerWidth,o=window.innerHeight;return{isMobile:r<ie,isTablet:r>=ie&&r<ae,isDesktop:r>=ae,width:r,height:o}});return u.useEffect(()=>{const r=()=>{const o=window.innerWidth,i=window.innerHeight;n({isMobile:o<ie,isTablet:o>=ie&&o<ae,isDesktop:o>=ae,width:o,height:i})};return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),s.jsx(Be.Provider,{value:t,children:e})}function De(){return u.useContext(Be)}function Bt({pinnedAppIds:e,className:t=""}){const{isMobile:n}=De(),[r,o]=u.useState(()=>H.getActiveAppId()),[i,c]=u.useState(()=>L.getRunningApps());u.useEffect(()=>{const l=H.subscribe("activeAppId",p=>{o(p)});return()=>{l()}},[]),u.useEffect(()=>L.subscribe(()=>{c(L.getRunningApps())}),[]);const a=l=>{r===l?L.setActiveApp(null):L.launchApp(l)},d=e.map(l=>_.get(l)).filter(l=>!!l),f=i.filter(l=>!e.includes(l.appId)).map(l=>({running:l,def:_.get(l.appId)})).filter(l=>!!l.def),m=l=>i.some(p=>p.appId===l),h=n?24:28;return s.jsxs("div",{className:`nc-app-taskbar ${n?"nc-mobile":"nc-desktop"} ${t}`,children:[d.map(l=>{const p=l.icon,g=r===l.id,b=m(l.id);return s.jsxs("button",{className:`nc-app-taskbar-button ${g?"nc-active":""} ${b?"nc-running":""}`,onClick:()=>a(l.id),title:l.titleKey||l.id,children:[s.jsx(p,{size:h}),b&&s.jsx("span",{className:"nc-app-taskbar-indicator"})]},l.id)}),f.length>0&&s.jsx("div",{className:"nc-app-taskbar-separator"}),f.map(({running:l,def:p})=>{const g=p.icon,b=r===l.appId;return s.jsxs("button",{className:`nc-app-taskbar-button ${b?"nc-active":""} nc-running`,onClick:()=>a(l.appId),title:p.titleKey||p.id,children:[s.jsx(g,{size:h}),s.jsx("span",{className:"nc-app-taskbar-indicator"})]},l.appId)})]})}function Dt({appId:e,open:t,onClose:n,closeOnBackdrop:r=!1,className:o="",maxWidth:i=1200,maxHeight:c=900}){const a=f=>{r&&f.target===f.currentTarget&&n()};if(u.useEffect(()=>{if(!t)return;const f=`app-dialog-${e}-${Date.now()}`;return ge.register(f,100,()=>(n(),!0))},[t,n,e]),!t)return null;const d=s.jsx("div",{className:"nc-dialog-overlay nc-fullscreen",onClick:a,children:s.jsx("div",{className:`nc-app-dialog-container ${o}`,style:{maxWidth:`${i}px`,maxHeight:`${c}px`},onClick:f=>f.stopPropagation(),children:s.jsx(xe,{appId:e,isActive:!0,onClose:n})})});return se.createPortal(d,document.body)}const ve=u.createContext(null),He=u.createContext(null);function Ht(){const e=u.useContext(ve);if(!e)throw new Error("useNavStack must be used within a NavStackProvider");return e}function Wt(){const e=u.useContext(He);if(!e)throw new Error("useNavView must be used within NavStack");return e}const we=u.createContext(null);function Gt({rootView:e,children:t}){const{t:n}=U.useTranslation(),r=ze(),[o,i]=u.useState([e]),[c,a]=u.useState([null]),d=u.useCallback((w,A)=>{a(S=>{const v=[...S];return v[w]=A,v})},[]),f=u.useCallback(w=>{a(A=>{const S=[...A];return S[w]=null,S})},[]),m=u.useCallback(w=>{i(A=>[...A,w]),a(A=>[...A,null])},[]),h=u.useCallback(()=>{i(w=>w.length<=1?w:w.slice(0,-1)),a(w=>w.slice(0,-1))},[]),l=u.useCallback(()=>{i([e]),a([null])},[e]),p=o.length,g=p>1,b=o.length-1,x=o[o.length-1],y=x!=null&&x.titleKey?n(x.titleKey):(x==null?void 0:x.title)??"";u.useEffect(()=>{r.setTitle(y)},[y,r]),u.useEffect(()=>{g?r.setBackHandler(h):r.clearBackHandler()},[g,h,r]),u.useEffect(()=>{const w=c[c.length-1];w?r.setToolbar(w):r.clearToolbar()},[c,r]);const j={push:m,pop:h,reset:l,depth:p,canGoBack:g,currentTitle:y},R={stack:o,toolbarStack:c,updateToolbar:d,clearToolbarAt:f,topIndex:b};return s.jsx(ve.Provider,{value:j,children:s.jsx(we.Provider,{value:R,children:t})})}function Ot({index:e,children:t}){const n=u.useContext(we);if(!n)throw new Error("NavViewProvider must be used within NavStackProvider");const{updateToolbar:r,clearToolbarAt:o,topIndex:i}=n,c=u.useCallback(f=>{e===i&&r(e,f)},[e,i,r]),a=u.useCallback(()=>{e===i&&o(e)},[e,i,o]),d={setToolbar:c,clearToolbar:a};return s.jsx(He.Provider,{value:d,children:t})}function Vt(){const e=u.useContext(ve),t=u.useContext(we);if(!e||!t)throw new Error("NavStackContainer must be used within a NavStackProvider");const{stack:n}=t;return s.jsx("div",{className:"nav-stack-container",children:s.jsx("div",{className:"nav-stack-content",children:n.map((r,o)=>{const i=o===n.length-1;return s.jsx(Ot,{index:o,children:s.jsx("div",{style:{display:i?"flex":"none",flexDirection:"column",height:"100%"},children:r.component})},r.id)})})})}const ye="-",Yt=e=>{const t=Ut(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{const a=c.split(ye);return a[0]===""&&a.length!==1&&a.shift(),We(a,t)||Ft(c)},getConflictingClassGroupIds:(c,a)=>{const d=n[c]||[];return a&&r[c]?[...d,...r[c]]:d}}},We=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?We(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(ye);return(c=t.validators.find(({validator:a})=>a(i)))==null?void 0:c.classGroupId},Ce=/^\[(.+)\]$/,Ft=e=>{if(Ce.test(e)){const t=Ce.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Ut=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return qt(Object.entries(e.classGroups),n).forEach(([i,c])=>{fe(c,r,i,t)}),r},fe=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Ie(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Kt(o)){fe(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,c])=>{fe(c,Ie(t,i),n,r)})})},Ie=(e,t)=>{let n=e;return t.split(ye).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Kt=e=>e.isThemeGetter,qt=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([c,a])=>[t+c,a])):i);return[n,o]}):e,_t=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,c)=>{n.set(i,c),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let c=n.get(i);if(c!==void 0)return c;if((c=r.get(i))!==void 0)return o(i,c),c},set(i,c){n.has(i)?n.set(i,c):o(i,c)}}},Ge="!",Jt=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,c=a=>{const d=[];let f=0,m=0,h;for(let x=0;x<a.length;x++){let y=a[x];if(f===0){if(y===o&&(r||a.slice(x,x+i)===t)){d.push(a.slice(m,x)),m=x+i;continue}if(y==="/"){h=x;continue}}y==="["?f++:y==="]"&&f--}const l=d.length===0?a:a.substring(m),p=l.startsWith(Ge),g=p?l.substring(1):l,b=h&&h>m?h-m:void 0;return{modifiers:d,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:b}};return n?a=>n({className:a,parseClassName:c}):c},Xt=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Qt=e=>({cache:_t(e.cacheSize),parseClassName:Jt(e),...Yt(e)}),Zt=/\s+/,en=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],c=e.trim().split(Zt);let a="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{modifiers:m,hasImportantModifier:h,baseClassName:l,maybePostfixModifierPosition:p}=n(f);let g=!!p,b=r(g?l.substring(0,p):l);if(!b){if(!g){a=f+(a.length>0?" "+a:a);continue}if(b=r(l),!b){a=f+(a.length>0?" "+a:a);continue}g=!1}const x=Xt(m).join(":"),y=h?x+Ge:x,j=y+b;if(i.includes(j))continue;i.push(j);const R=o(b,g);for(let w=0;w<R.length;++w){const A=R[w];i.push(y+A)}a=f+(a.length>0?" "+a:a)}return a};function tn(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Oe(t))&&(r&&(r+=" "),r+=n);return r}const Oe=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Oe(e[r]))&&(n&&(n+=" "),n+=t);return n};function nn(e,...t){let n,r,o,i=c;function c(d){const f=t.reduce((m,h)=>h(m),e());return n=Qt(f),r=n.cache.get,o=n.cache.set,i=a,a(d)}function a(d){const f=r(d);if(f)return f;const m=en(d,n);return o(d,m),m}return function(){return i(tn.apply(null,arguments))}}const z=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ve=/^\[(?:([a-z-]+):)?(.+)\]$/i,rn=/^\d+\/\d+$/,sn=new Set(["px","full","screen"]),on=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,an=/\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$/,cn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ln=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,V=e=>X(e)||sn.has(e)||rn.test(e),Y=e=>Q(e,"length",xn),X=e=>!!e&&!Number.isNaN(Number(e)),le=e=>Q(e,"number",X),te=e=>!!e&&Number.isInteger(Number(e)),un=e=>e.endsWith("%")&&X(e.slice(0,-1)),N=e=>Ve.test(e),F=e=>on.test(e),pn=new Set(["length","size","percentage"]),fn=e=>Q(e,pn,Ye),hn=e=>Q(e,"position",Ye),mn=new Set(["image","url"]),gn=e=>Q(e,mn,wn),bn=e=>Q(e,"",vn),ne=()=>!0,Q=(e,t,n)=>{const r=Ve.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},xn=e=>an.test(e)&&!cn.test(e),Ye=()=>!1,vn=e=>ln.test(e),wn=e=>dn.test(e),yn=()=>{const e=z("colors"),t=z("spacing"),n=z("blur"),r=z("brightness"),o=z("borderColor"),i=z("borderRadius"),c=z("borderSpacing"),a=z("borderWidth"),d=z("contrast"),f=z("grayscale"),m=z("hueRotate"),h=z("invert"),l=z("gap"),p=z("gradientColorStops"),g=z("gradientColorStopPositions"),b=z("inset"),x=z("margin"),y=z("opacity"),j=z("padding"),R=z("saturate"),w=z("scale"),A=z("sepia"),S=z("skew"),v=z("space"),C=z("translate"),k=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",N,t],M=()=>[N,t],B=()=>["",V,Y],I=()=>["auto",X,N],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],P=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>["start","end","center","between","around","evenly","stretch"],ee=()=>["","0",N],je=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[X,N];return{cacheSize:500,separator:":",theme:{colors:[ne],spacing:[V,Y],blur:["none","",F,N],brightness:G(),borderColor:[e],borderRadius:["none","","full",F,N],borderSpacing:M(),borderWidth:B(),contrast:G(),grayscale:ee(),hueRotate:G(),invert:ee(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[un,Y],inset:T(),margin:T(),opacity:G(),padding:M(),saturate:G(),scale:G(),sepia:ee(),skew:G(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[F]}],"break-after":[{"break-after":je()}],"break-before":[{"break-before":je()}],"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"],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:[...$(),N]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",te,N]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:ee()}],shrink:[{shrink:ee()}],order:[{order:["first","last","none",te,N]}],"grid-cols":[{"grid-cols":[ne]}],"col-start-end":[{col:["auto",{span:["full",te,N]},N]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[ne]}],"row-start-end":[{row:["auto",{span:[te,N]},N]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[l]}],"gap-x":[{"gap-x":[l]}],"gap-y":[{"gap-y":[l]}],"justify-content":[{justify:["normal",...ce()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ce(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ce(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[j]}],px:[{px:[j]}],py:[{py:[j]}],ps:[{ps:[j]}],pe:[{pe:[j]}],pt:[{pt:[j]}],pr:[{pr:[j]}],pb:[{pb:[j]}],pl:[{pl:[j]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[v]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[v]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,t]}],"min-w":[{"min-w":[N,t,"min","max","fit"]}],"max-w":[{"max-w":[N,t,"none","full","min","max","fit","prose",{screen:[F]},F]}],h:[{h:[N,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,t,"auto","min","max","fit"]}],"font-size":[{text:["base",F,Y]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",le]}],"font-family":[{font:[ne]}],"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:["tighter","tight","normal","wide","wider","widest",N]}],"line-clamp":[{"line-clamp":["none",X,le]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",V,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...P(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",V,Y]}],"underline-offset":[{"underline-offset":["auto",V,N]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],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",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),hn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",fn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...P(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:P()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...P()]}],"outline-offset":[{"outline-offset":[V,N]}],"outline-w":[{outline:[V,Y]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[V,Y]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",F,bn]}],"shadow-color":[{shadow:[ne]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",F,N]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[h]}],saturate:[{saturate:[R]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[R]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[te,N]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",N]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",N]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[V,Y,le]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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"],"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"]}}},jn=nn(yn);function kn(...e){return jn(qe.clsx(e))}exports.ActivityIndicator=he;exports.Alert=_e;exports.AppContainer=xe;exports.AppContext=be;exports.AppDialog=Dt;exports.AppPanel=Tt;exports.AppTaskbar=Bt;exports.AppTitleBar=Te;exports.Battery=Je;exports.Button=D;exports.ButtonGroup=Xe;exports.Checkbox=Ze;exports.CloseButton=me;exports.ComboBox=st;exports.ContextMenu=lt;exports.Dialog=dt;exports.DialogClose=K;exports.EditButton=it;exports.Hyperlink=ct;exports.Input=ft;exports.ListGroup=mt;exports.ListGroupItem=ht;exports.MonthRangePicker=xt;exports.MultiSelect=gt;exports.NavStackContainer=Vt;exports.NavStackProvider=Gt;exports.Notification=$e;exports.NotificationContainer=At;exports.NumberInput=vt;exports.RefreshButton=ot;exports.Slider=wt;exports.Tabs=jt;exports.Toggle=kt;exports.TrashButton=at;exports.ViewportProvider=Lt;exports.appRegistry=_;exports.appStateStore=H;exports.backHandlerRegistry=ge;exports.clearAppInUrl=Pe;exports.cn=kn;exports.createAppI18nFactory=It;exports.notificationManager=Ct;exports.runningAppsStore=L;exports.setAppInUrl=pe;exports.useApp=ze;exports.useDialog=Ee;exports.useNavStack=Ht;exports.useNavView=Wt;exports.useViewport=De;
2
2
  //# sourceMappingURL=index.cjs.map