texlite 0.9.4 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +64 -40
  2. package/README.zh-CN.md +56 -34
  3. package/dist/client/assets/{AdminUsers-B12FJUMy.js → AdminUsers-C7oU_1Y_.js} +1 -1
  4. package/dist/client/assets/{CitationLibraryDialog-BTmnCP4V.js → CitationLibraryDialog-CU2b0xtm.js} +1 -1
  5. package/dist/client/assets/{Dashboard-JA5_M3TK.js → Dashboard-BB4RO4x2.js} +2 -2
  6. package/dist/client/assets/{GitDialog--MoUIW0n.js → GitDialog-C2Np1i8v.js} +1 -1
  7. package/dist/client/assets/{HistoryDialog-LgKbjsTZ.js → HistoryDialog-CdoYeLyX.js} +1 -1
  8. package/dist/client/assets/{LatexEditor-Dj2zIaQm.js → LatexEditor-Dmy6_gqt.js} +1 -1
  9. package/dist/client/assets/{PdfPreview-C_W7w360.js → PdfPreview-fDxKh6hP.js} +1 -1
  10. package/dist/client/assets/{ProjectIconPickerDialog-GzRuM0oQ.js → ProjectIconPickerDialog-CsjMKq7h.js} +1 -1
  11. package/dist/client/assets/{ProjectNavigationDialogs-BiArHmQ9.js → ProjectNavigationDialogs-_JY0yVob.js} +1 -1
  12. package/dist/client/assets/{ProjectSettings-DgJohWUv.js → ProjectSettings-DXGA-lmB.js} +1 -1
  13. package/dist/client/assets/{ProjectWorkspace-C6sYiBF2.js → ProjectWorkspace-mCYjyc6e.js} +20 -20
  14. package/dist/client/assets/{SelectionHistoryDialog-Bpv6nvrC.js → SelectionHistoryDialog-D8CeqjLD.js} +1 -1
  15. package/dist/client/assets/{SystemMetricsDialog-hJQATmd4.js → SystemMetricsDialog-BZx7ZMQt.js} +1 -1
  16. package/dist/client/assets/{TagManagementDialog-BHC8qULq.js → TagManagementDialog-4R1Gs43j.js} +1 -1
  17. package/dist/client/assets/{WordCountDialog-DZhhO94k.js → WordCountDialog-C-MCscAu.js} +1 -1
  18. package/dist/client/assets/check-Jf8WBxDX.js +1 -0
  19. package/dist/client/assets/{hard-drive-BWZnOgnm.js → hard-drive-Bsk-RETn.js} +1 -1
  20. package/dist/client/assets/{index-p1NHkGGG.js → index-B6rP7QsM.js} +2 -2
  21. package/dist/client/assets/{index-kTamGfTl.js → index-Csp5J5aI.js} +1 -1
  22. package/dist/client/assets/index-DGZNAyxW.css +1 -0
  23. package/dist/client/assets/{key-round-CoDwyVJc.js → key-round-DqptHHKC.js} +1 -1
  24. package/dist/client/assets/{minimize-2-D100opW2.js → minimize-2-92UqFWI9.js} +1 -1
  25. package/dist/client/assets/{minus-DDTYB-Oz.js → minus-bx4ZLZnb.js} +1 -1
  26. package/dist/client/assets/{plus-BVXOlQXP.js → plus-DQg_bV50.js} +1 -1
  27. package/dist/client/assets/{refresh-cw-LtwnqlWh.js → refresh-cw-BoMEkk5J.js} +1 -1
  28. package/dist/client/assets/{search-DXo_aAp0.js → search-UZspmceH.js} +1 -1
  29. package/dist/client/assets/{sigma-BgvHGPto.js → sigma-C0IvFdKV.js} +1 -1
  30. package/dist/client/assets/{spellCheck-BtRppKcC.js → spellCheck-DyKIHf5C.js} +1 -1
  31. package/dist/client/assets/{tags-m9kppdi0.js → tags-BTUtvaAc.js} +1 -1
  32. package/dist/client/assets/{type-YO4aprqE.js → type-XvvfEJRs.js} +1 -1
  33. package/dist/client/assets/{user-plus-MRmKeDtX.js → user-plus-Chr9T97G.js} +1 -1
  34. package/dist/client/assets/{x-eisRQJv_.js → x-DlFXD9Vl.js} +1 -1
  35. package/dist/client/index.html +2 -2
  36. package/package.json +1 -1
  37. package/dist/client/assets/check-C1db8iNn.js +0 -1
  38. package/dist/client/assets/index-BiwJj0Np.css +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./PdfPreview-C_W7w360.js","./react-BVUjbTTn.js","./pdf-DUYcbPMK.js","./minus-DDTYB-Oz.js","./plus-BVXOlQXP.js","./ProjectWorkspace-C6sYiBF2.js","./check-C1db8iNn.js","./x-eisRQJv_.js","./search-DXo_aAp0.js","./user-plus-MRmKeDtX.js","./refresh-cw-LtwnqlWh.js","./Dashboard-JA5_M3TK.js","./hard-drive-BWZnOgnm.js","./sigma-BgvHGPto.js","./tags-m9kppdi0.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./PdfPreview-fDxKh6hP.js","./react-BVUjbTTn.js","./pdf-DUYcbPMK.js","./minus-bx4ZLZnb.js","./plus-DQg_bV50.js","./ProjectWorkspace-mCYjyc6e.js","./check-Jf8WBxDX.js","./x-DlFXD9Vl.js","./search-UZspmceH.js","./user-plus-Chr9T97G.js","./refresh-cw-BoMEkk5J.js","./Dashboard-BB4RO4x2.js","./hard-drive-Bsk-RETn.js","./sigma-C0IvFdKV.js","./tags-BTUtvaAc.js"])))=>i.map(i=>d[i]);
2
2
  import{i as sn,u as z,j as h,r as f,R as De,a as no,b as an,c as ln}from"./react-BVUjbTTn.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function t(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=t(r);fetch(r.href,i)}})();const cn="modulepreload",dn=function(o,e){return new URL(o,e).href},Ot={},ht=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let c=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const s=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");r=c(t.map(u=>{if(u=dn(u,n),u in Ot)return;Ot[u]=!0;const d=u.endsWith(".css"),m=d?'[rel="stylesheet"]':"";if(n)for(let p=s.length-1;p>=0;p--){const v=s[p];if(v.href===u&&(!d||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${m}`))return;const g=document.createElement("link");if(g.rel=d?"stylesheet":cn,d||(g.as="script"),g.crossOrigin="",g.href=u,l&&g.setAttribute("nonce",l),document.head.appendChild(g),d)return new Promise((p,v)=>{g.addEventListener("load",p),g.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return r.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return e().catch(i)})};var ze={};const x=o=>typeof o=="string",ge=()=>{let o,e;const t=new Promise((n,r)=>{o=n,e=r});return t.resolve=o,t.reject=e,t},Rt=o=>o==null?"":""+o,un=(o,e,t)=>{o.forEach(n=>{e[n]&&(t[n]=e[n])})},pn=/###/g,Ft=o=>o&&o.indexOf("###")>-1?o.replace(pn,"."):o,Lt=o=>!o||x(o),ve=(o,e,t)=>{const n=x(e)?e.split("."):e;let r=0;for(;r<n.length-1;){if(Lt(o))return{};const i=Ft(n[r]);!o[i]&&t&&(o[i]=new t),Object.prototype.hasOwnProperty.call(o,i)?o=o[i]:o={},++r}return Lt(o)?{}:{obj:o,k:Ft(n[r])}},Nt=(o,e,t)=>{const{obj:n,k:r}=ve(o,e,Object);if(n!==void 0||e.length===1){n[r]=t;return}let i=e[e.length-1],s=e.slice(0,e.length-1),a=ve(o,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=ve(o,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=t},fn=(o,e,t,n)=>{const{obj:r,k:i}=ve(o,e,Object);r[i]=r[i]||[],r[i].push(t)},$e=(o,e)=>{const{obj:t,k:n}=ve(o,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},hn=(o,e,t)=>{const n=$e(o,t);return n!==void 0?n:$e(e,t)},ro=(o,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in o?x(o[n])||o[n]instanceof String||x(e[n])||e[n]instanceof String?t&&(o[n]=e[n]):ro(o[n],e[n],t):o[n]=e[n]);return o},J=o=>o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var mn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const gn=o=>x(o)?o.replace(/[&<>"'\/]/g,e=>mn[e]):o;class yn{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 n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const wn=[" ",",","?","!",";"],vn=new yn(20),bn=(o,e,t)=>{e=e||"",t=t||"";const n=wn.filter(s=>e.indexOf(s)<0&&t.indexOf(s)<0);if(n.length===0)return!0;const r=vn.getRegExp(`(${n.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!r.test(o);if(!i){const s=o.indexOf(t);s>0&&!r.test(o.substring(0,s))&&(i=!0)}return i},ot=(o,e,t=".")=>{if(!o)return;if(o[e])return Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0;const n=e.split(t);let r=o;for(let i=0;i<n.length;){if(!r||typeof r!="object")return;let s,a="";for(let l=i;l<n.length;++l)if(l!==i&&(a+=t),a+=n[l],s=r[a],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&l<n.length-1)continue;i+=l-i+1;break}r=s}return r},Te=o=>o?.replace(/_/g,"-"),Cn={type:"logger",log(o){this.output("log",o)},warn(o){this.output("warn",o)},error(o){this.output("error",o)},output(o,e){console?.[o]?.apply?.(console,e)}};class Be{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Cn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(x(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Be(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Be(this.logger,e)}}var B=new Be;class Ve{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const r=this.observers[n].get(t)||0;this.observers[n].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,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([r,i])=>{for(let s=0;s<i;s++)r(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,i])=>{for(let s=0;s<i;s++)r.apply(r,[e,...t])})}}class It extends Ve{constructor(e,t={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,n,r={}){const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,s=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):x(n)&&i?a.push(...n.split(i)):a.push(n)));const l=$e(this.data,a);return!l&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),l||!s||!x(n)?l:ot(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(s?n.split(s):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Nt(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const i in n)(x(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i,s={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let l=$e(this.data,a)||{};s.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?ro(l,n,i):l={...l,...n},Nt(this.data,a,l),s.silent||this.emit("added",e,t,n)}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.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 io={processors:{},addPostProcessor(o){this.processors[o.name]=o},handle(o,e,t,n,r){return o.forEach(i=>{e=this.processors[i]?.process(e,t,n,r)??e}),e}};const so=Symbol("i18next/PATH_KEY");function Tn(){const o=[],e=Object.create(null);let t;return e.get=(n,r)=>(t?.revoke?.(),r===so?o:(o.push(r),t=Proxy.revocable(n,e),t.proxy)),Proxy.revocable(Object.create(null),e).proxy}function se(o,e){const{[so]:t}=o(Tn()),n=e?.keySeparator??".",r=e?.nsSeparator??":";if(t.length>1&&r){const i=e?.ns,s=Array.isArray(i)?i:null;if(s&&s.length>1&&s.slice(1).includes(t[0]))return`${t[0]}${r}${t.slice(1).join(n)}`}return t.join(n)}const jt={},Ge=o=>!x(o)&&typeof o!="boolean"&&typeof o!="number";class He extends Ve{constructor(e,t={}){super(),un(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=B.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(e==null)return!1;const r=this.resolve(e,n);if(r?.res===void 0)return!1;const i=Ge(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const s=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!bn(e,n,r);if(s&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:x(i)?[i]:i};const c=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),e=c.join(r)}return{key:e,namespaces:x(i)?[i]:i}}translate(e,t,n){let r=typeof t=="object"?{...t}:t;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";typeof e=="function"&&(e=se(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]),e=e.map(O=>typeof O=="function"?se(O,{...this.options,...r}):String(O));const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],r),c=l[l.length-1];let u=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const d=r.lng||this.language,m=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return m?i?{res:`${c}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:`${c}${u}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:a;const g=this.resolve(e,r);let p=g?.res;const v=g?.usedKey||a,b=g?.exactUsedKey||a,S=["[object Number]","[object Function]","[object RegExp]"],T=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,C=r.count!==void 0&&!x(r.count),w=He.hasDefaultValue(r),D=C?this.pluralResolver.getSuffix(d,r.count,r):"",E=r.ordinal&&C?this.pluralResolver.getSuffix(d,r.count,{ordinal:!1}):"",F=C&&!r.ordinal&&r.count===0,I=F&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${D}`]||r[`defaultValue${E}`]||r.defaultValue;let L=p;y&&!p&&w&&(L=I);const fe=Ge(L),P=Object.prototype.toString.apply(L);if(y&&L&&fe&&S.indexOf(P)<0&&!(x(T)&&Array.isArray(L))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,L,{...r,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(g.res=O,g.usedParams=this.getUsedParamsDetails(r),g):O}if(s){const O=Array.isArray(L),j=O?[]:{},ke=O?b:v;for(const $ in L)if(Object.prototype.hasOwnProperty.call(L,$)){const V=`${ke}${s}${$}`;w&&!p?j[$]=this.translate(V,{...r,defaultValue:Ge(I)?I[$]:void 0,joinArrays:!1,ns:l}):j[$]=this.translate(V,{...r,joinArrays:!1,ns:l}),j[$]===V&&(j[$]=L[$])}p=j}}else if(y&&x(T)&&Array.isArray(p))p=p.join(T),p&&(p=this.extendTranslation(p,e,r,n));else{let O=!1,j=!1;!this.isValidLookup(p)&&w&&(O=!0,p=I),this.isValidLookup(p)||(j=!0,p=a);const $=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:p,V=w&&I!==p&&this.options.updateMissing;if(j||O||V){if(this.logger.log(V?"updateKey":"missingKey",d,c,a,V?I:p),s){const A=this.resolve(a,{...r,keySeparator:!1});A&&A.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 he=[];const Pe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Pe&&Pe[0])for(let A=0;A<Pe.length;A++)he.push(Pe[A]);else this.options.saveMissingTo==="all"?he=this.languageUtils.toResolveHierarchy(r.lng||this.language):he.push(r.lng||this.language);const kt=(A,q,me)=>{const Pt=w&&me!==p?me:$;this.options.missingKeyHandler?this.options.missingKeyHandler(A,c,q,Pt,V,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(A,c,q,Pt,V,r),this.emit("missingKey",A,c,q,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?he.forEach(A=>{const q=this.pluralResolver.getSuffixes(A,r);F&&r[`defaultValue${this.options.pluralSeparator}zero`]&&q.indexOf(`${this.options.pluralSeparator}zero`)<0&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(me=>{kt([A],a+me,r[`defaultValue${me}`]||I)})}):kt(he,a,I))}p=this.extendTranslation(p,e,r,g,n),j&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${c}${u}${a}`),(j||O)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${a}`:a,O?p:void 0,r))}return i?(g.res=p,g.usedParams=this.getUsedParamsDetails(r),g):p}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=x(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let u=n.replace&&!x(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),l){const d=e.match(this.interpolator.nestingRegexp),m=d&&d.length;c<m&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>i?.[0]===d[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,a=x(s)?[s]:s;return e!=null&&a?.length&&n.applyPostProcessor!==!1&&(e=io.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,s,a;return x(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?se(l,{...this.options,...t}):l)),e.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,t),u=c.key;r=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const m=t.count!==void 0&&!x(t.count),g=m&&!t.ordinal&&t.count===0,p=t.context!==void 0&&(x(t.context)||typeof t.context=="number")&&t.context!=="",v=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(b=>{this.isValidLookup(n)||(a=b,!jt[`${v[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(jt[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${r}" for languages "${v.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!!!")),v.forEach(S=>{if(this.isValidLookup(n))return;s=S;const T=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(T,u,S,b,t);else{let C;m&&(C=this.pluralResolver.getSuffix(S,t.count,t));const w=`${this.options.pluralSeparator}zero`,D=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(t.ordinal&&C.indexOf(D)===0&&T.push(u+C.replace(D,this.options.pluralSeparator)),T.push(u+C),g&&T.push(u+w)),p){const E=`${u}${this.options.contextSeparator||"_"}${t.context}`;T.push(E),m&&(t.ordinal&&C.indexOf(D)===0&&T.push(E+C.replace(D,this.options.pluralSeparator)),T.push(E+C),g&&T.push(E+w))}}let y;for(;y=T.pop();)this.isValidLookup(n)||(i=y,n=this.getResource(S,b,y,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!x(e.replace);let r=n?e.replace:e;if(n&&typeof e.count<"u"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const i of t)delete r[i]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class At{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=B.create("languageUtils")}getScriptPartFromCode(e){if(e=Te(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=Te(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(x(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}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(n=>{if(t)return;const r=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const r=this.getScriptPartFromCode(n);if(this.isSupportedCode(r))return t=r;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),x(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=s=>{s&&(this.isSupportedCode(s)?r.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return x(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))):x(e)&&i(this.formatLanguageCode(e)),n.forEach(s=>{r.indexOf(s)<0&&i(this.formatLanguageCode(s))}),r}}const _t={zero:0,one:1,two:2,few:3,many:4,other:5},Mt={select:o=>o===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class xn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=B.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Te(e==="dev"?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Mt;if(!e.match(/-|_/))return Mt;const l=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(l,t)}return this.pluralRulesCache[i]=s,s}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(r=>`${t}${r}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((r,i)=>_t[r]-_t[i]).map(r=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Ut=(o,e,t,n=".",r=!0)=>{let i=hn(o,e,t);return!i&&r&&x(t)&&(i=ot(o,t,n),i===void 0&&(i=ot(e,t,n))),i},Ke=o=>o.replace(/\$/g,"$$$$");class $t{constructor(e={}){this.logger=B.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:m,nestingPrefixEscaped:g,nestingSuffix:p,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:S,alwaysFormat:T}=e.interpolation;this.escape=t!==void 0?t:gn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=i?J(i):s||"{{",this.suffix=a?J(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=m?J(m):g||J("$t("),this.nestingSuffix=p?J(p):v||J(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=S||1e3,this.alwaysFormat=T!==void 0?T:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>t?.source===n?(t.lastIndex=0,t):new RegExp(n,"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,n,r){let i,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(g.indexOf(this.formatSeparator)<0){const S=Ut(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(S,void 0,n,{...r,...t,interpolationkey:g}):S}const p=g.split(this.formatSeparator),v=p.shift().trim(),b=p.join(this.formatSeparator).trim();return this.format(Ut(t,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),b,n,{...r,...t,interpolationkey:v})};this.resetRegExp();const u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>Ke(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?Ke(this.escape(g)):Ke(g)}].forEach(g=>{for(a=0;i=g.regex.exec(e);){const p=i[1].trim();if(s=c(p),s===void 0)if(typeof u=="function"){const b=u(e,i,r);s=x(b)?b:""}else if(r&&Object.prototype.hasOwnProperty.call(r,p))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),s="";else!x(s)&&!this.useRawValueToEscape&&(s=Rt(s));const v=g.safeValue(s);if(e=e.replace(i[0],v),d?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=i[0].length):g.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,s;const a=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${J(u)}[ ]*{`));let m=`{${d[1]}`;l=d[0],m=this.interpolate(m,s);const g=m.match(/'/g),p=m.match(/"/g);((g?.length??0)%2===0&&!p||(p?.length??0)%2!==0)&&(m=m.replace(/'/g,'"'));try{s=JSON.parse(m),c&&(s={...c,...s})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${u}${m}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l};for(;r=this.nestingRegexp.exec(e);){let l=[];s={...n},s=s.replace&&!x(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(l=r[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(a.call(this,r[1].trim(),s),s),i&&r[0]===e&&!x(i))return i;x(i)||(i=Rt(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),l.length&&(i=l.reduce((u,d)=>this.format(u,d,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}}const Dn=o=>{let e=o.toLowerCase().trim();const t={};if(o.indexOf("(")>-1){const n=o.split("(");e=n[0].toLowerCase().trim();const r=n[1].substring(0,n[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(s=>{if(s){const[a,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();t[u]||(t[u]=c),c==="false"&&(t[u]=!1),c==="true"&&(t[u]=!0),isNaN(c)||(t[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Bt=o=>{const e={};return(t,n,r)=>{let i=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(i={...i,[r.interpolationkey]:void 0});const s=n+JSON.stringify(i);let a=e[s];return a||(a=o(Te(n),r),e[s]=a),a(t)}},Sn=o=>(e,t,n)=>o(Te(t),n)(e);class En{constructor(e={}){this.logger=B.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Bt:Sn;this.formats={number:n((r,i)=>{const s=new Intl.NumberFormat(r,{...i});return a=>s.format(a)}),currency:n((r,i)=>{const s=new Intl.NumberFormat(r,{...i,style:"currency"});return a=>s.format(a)}),datetime:n((r,i)=>{const s=new Intl.DateTimeFormat(r,{...i});return a=>s.format(a)}),relativetime:n((r,i)=>{const s=new Intl.RelativeTimeFormat(r,{...i});return a=>s.format(a,i.range||"day")}),list:n((r,i)=>{const s=new Intl.ListFormat(r,{...i});return a=>s.format(a)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Bt(t)}format(e,t,n,r={}){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:c,formatOptions:u}=Dn(l);if(this.formats[c]){let d=a;try{const m=r?.formatParams?.[r.interpolationkey]||{},g=m.locale||m.lng||r.locale||r.lng||n;d=this.formats[c](a,g,{...u,...r,...m})}catch(m){this.logger.warn(m)}return d}else this.logger.warn(`there was no format function for ${c}`);return a},e)}}const kn=(o,e)=>{o.pending[e]!==void 0&&(delete o.pending[e],o.pendingCount--)};class Pn extends Ve{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=B.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?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const i={},s={},a={},l={};return e.forEach(c=>{let u=!0;t.forEach(d=>{const m=`${c}|${d}`;!n.reload&&this.store.hasResourceBundle(c,d)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?s[m]===void 0&&(s[m]=!0):(this.state[m]=1,u=!1,s[m]===void 0&&(s[m]=!0),i[m]===void 0&&(i[m]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(a[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){const r=e.split("|"),i=r[0],s=r[1];t&&this.emit("failedLoading",i,s,t),!t&&n&&this.store.addResourceBundle(i,s,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(l=>{fn(l.loaded,[i],s),kn(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!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,n,r=0,i=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:s});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,s)},i);return}s(c,u)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(e,t);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(e,t,a)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();x(e)&&(e=this.languageUtils.toResolveHierarchy(e)),x(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,s),!s&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,s,a)})}saveMissing(e,t,n,r,i,s={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" 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(!(n==null||n==="")){if(this.backend?.create){const l={...s,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(e,t,n,r,l):u=c(e,t,n,r),u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}else c(e,t,n,r,a,l)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}}const Ye=()=>({debug:!1,initAsync:!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:o=>{let e={};if(typeof o[1]=="object"&&(e=o[1]),x(o[1])&&(e.defaultValue=o[1]),x(o[2])&&(e.tDescription=o[2]),typeof o[2]=="object"||typeof o[3]=="object"){const t=o[3]||o[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:o=>o,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ht=o=>(x(o.ns)&&(o.ns=[o.ns]),x(o.fallbackLng)&&(o.fallbackLng=[o.fallbackLng]),x(o.fallbackNS)&&(o.fallbackNS=[o.fallbackNS]),o.supportedLngs?.indexOf?.("cimode")<0&&(o.supportedLngs=o.supportedLngs.concat(["cimode"])),typeof o.initImmediate=="boolean"&&(o.initAsync=o.initImmediate),o),Oe=()=>{},On=o=>{Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach(t=>{typeof o[t]=="function"&&(o[t]=o[t].bind(o))})},ao="__i18next_supportNoticeShown",Rn=()=>!!(typeof globalThis<"u"&&globalThis[ao]||typeof process<"u"&&ze&&ze.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&ze),Fn=()=>{typeof globalThis<"u"&&(globalThis[ao]=!0)},Ln=o=>!!(o?.modules?.backend?.name?.indexOf("Locize")>0||o?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||o?.options?.backend?.backends&&o.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||o?.options?.backend?.projectId||o?.options?.backend?.backendOptions&&o.options.backend.backendOptions.some(e=>e?.projectId));class be extends Ve{constructor(e={},t){if(super(),this.options=Ht(e),this.services={},this.logger=B,this.modules={external:[]},On(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(x(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=Ye();this.options={...n,...this.options,...Ht(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Ln(this)&&!Rn()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),Fn());const r=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?B.init(r(this.modules.logger),this.options):B.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=En;const u=new At(this.options);this.store=new It(this.options.resources,this.options);const d=this.services;d.logger=B,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new xn(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(d.formatter=r(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new $t(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Pn(r(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(g,...p)=>{this.emit(g,...p)}),this.modules.languageDetector&&(d.languageDetector=r(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=r(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new He(this.services,this.options),this.translator.on("*",(g,...p)=>{this.emit(g,...p)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Oe),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const a=ge(),l=()=>{const c=(u,d)=>{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),a.resolve(d),t(u,d)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e,t=Oe){let n=t;const r=x(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)})};r?s(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload?.forEach?.(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,t,n){const r=ge();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Oe),this.services.backendConnector.reload(e,t,i=>{r.resolve(),n(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"&&io.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 n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=ge();this.emit("languageChanging",e);const r=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,l)=>{l?this.isLanguageChangingTo===e&&(r(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),t&&t(a,(...c)=>this.t(...c))},s=a=>{!e&&!a&&this.services.languageDetector&&(a=[]);const l=x(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(x(a)?[a]:a);c&&(this.language||r(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,u=>{i(u,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),n}getFixedT(e,t,n){const r=(i,s,...a)=>{let l;typeof s!="object"?l=this.options.overloadTranslationOptionHandler([i,s].concat(a)):l={...s},l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||r.keyPrefix);const c={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=se(l.keyPrefix,c));const u=this.options.keySeparator||".";let d;return l.keyPrefix&&Array.isArray(i)?d=i.map(m=>(typeof m=="function"&&(m=se(m,c)),`${l.keyPrefix}${u}${m}`)):(typeof i=="function"&&(i=se(i,c)),d=l.keyPrefix?`${l.keyPrefix}${u}${i}`:i),this.t(d,l)};return x(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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 n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(t.precheck){const a=t.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,e)&&(!r||s(i,e)))}loadNamespaces(e,t){const n=ge();return this.options.ns?(x(e)&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{n.resolve(),t&&t(r)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ge();x(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(s=>r.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=r.concat(i),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const r=new Intl.Locale(e);if(r&&r.getTextInfo){const i=r.getTextInfo();if(i&&i.direction)return i.direction}}catch{}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"],n=this.services?.languageUtils||new At(Ye());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new be(e,t);return n.createInstance=be.createInstance,n}cloneInstance(e={},t=Oe){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new be(r);if((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)},n){const a=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,d)=>(u[d]={...l[c][d]},u),l[c]),l),{});i.store=new It(a,r),i.services.resourceStore=i.store}if(e.interpolation){const l={...Ye().interpolation,...this.options.interpolation,...e.interpolation},c={...r,interpolation:l};i.services.interpolator=new $t(c)}return i.translator=new He(i.services,r),i.translator.on("*",(a,...l)=>{i.emit(a,...l)}),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 k=be.createInstance();k.createInstance;k.dir;k.init;k.loadResources;k.reloadResources;k.use;k.changeLanguage;k.getFixedT;k.t;k.exists;k.setDefaultNamespace;k.hasLoadedNamespace;k.loadNamespaces;k.loadLanguages;const{slice:Nn,forEach:In}=[];function jn(o){return In.call(Nn.call(arguments,1),e=>{if(e)for(const t in e)o[t]===void 0&&(o[t]=e[t])}),o}function An(o){return typeof o!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(o))}const Vt=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,_n=function(o,e){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},r=encodeURIComponent(e);let i=`${o}=${r}`;if(n.maxAge>0){const s=n.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(n.domain){if(!Vt.test(n.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${n.domain}`}if(n.path){if(!Vt.test(n.path))throw new TypeError("option path is invalid");i+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(i+="; Partitioned"),i},Wt={create(o,e,t,n){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+t*60*1e3)),n&&(r.domain=n),document.cookie=_n(o,e,r)},read(o){const e=`${o}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let r=t[n];for(;r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return r.substring(e.length,r.length)}return null},remove(o,e){this.create(o,"",-1,e)}};var Mn={name:"cookie",lookup(o){let{lookupCookie:e}=o;if(e&&typeof document<"u")return Wt.read(e)||void 0},cacheUserLanguage(o,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:r,cookieOptions:i}=e;t&&typeof document<"u"&&Wt.create(t,o,n,r,i)}},Un={name:"querystring",lookup(o){let{lookupQuerystring:e}=o,t;if(typeof window<"u"){let{search:n}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));const i=n.substring(1).split("&");for(let s=0;s<i.length;s++){const a=i[s].indexOf("=");a>0&&i[s].substring(0,a)===e&&(t=i[s].substring(a+1))}}return t}},$n={name:"hash",lookup(o){let{lookupHash:e,lookupFromHashIndex:t}=o,n;if(typeof window<"u"){const{hash:r}=window.location;if(r&&r.length>2){const i=r.substring(1);if(e){const s=i.split("&");for(let a=0;a<s.length;a++){const l=s[a].indexOf("=");l>0&&s[a].substring(0,l)===e&&(n=s[a].substring(l+1))}}if(n)return n;if(!n&&t>-1){const s=r.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof t=="number"?t:0]?.replace("/",""):void 0}}}return n}};let ee=null;const Xt=()=>{if(ee!==null)return ee;try{if(ee=typeof window<"u"&&window.localStorage!==null,!ee)return!1;const o="i18next.translate.boo";window.localStorage.setItem(o,"foo"),window.localStorage.removeItem(o)}catch{ee=!1}return ee};var Bn={name:"localStorage",lookup(o){let{lookupLocalStorage:e}=o;if(e&&Xt())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(o,e){let{lookupLocalStorage:t}=e;t&&Xt()&&window.localStorage.setItem(t,o)}};let te=null;const zt=()=>{if(te!==null)return te;try{if(te=typeof window<"u"&&window.sessionStorage!==null,!te)return!1;const o="i18next.translate.boo";window.sessionStorage.setItem(o,"foo"),window.sessionStorage.removeItem(o)}catch{te=!1}return te};var Hn={name:"sessionStorage",lookup(o){let{lookupSessionStorage:e}=o;if(e&&zt())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(o,e){let{lookupSessionStorage:t}=e;t&&zt()&&window.sessionStorage.setItem(t,o)}},Vn={name:"navigator",lookup(o){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:n,language:r}=navigator;if(t)for(let i=0;i<t.length;i++)e.push(t[i]);n&&e.push(n),r&&e.push(r)}return e.length>0?e:void 0}},Wn={name:"htmlTag",lookup(o){let{htmlTag:e}=o,t;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},Xn={name:"path",lookup(o){let{lookupFromPathIndex:e}=o;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof e=="number"?e:0]?.replace("/",""):void 0}},zn={name:"subdomain",lookup(o){let{lookupFromSubdomainIndex:e}=o;const t=typeof e=="number"?e+1:1,n=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};let lo=!1;try{document.cookie,lo=!0}catch{}const co=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];lo||co.splice(1,1);const Gn=()=>({order:co,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:o=>o});class uo{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=jn(t,this.options||{},Gn()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Mn),this.addDetector(Un),this.addDetector(Bn),this.addDetector(Hn),this.addDetector(Vn),this.addDetector(Wn),this.addDetector(Xn),this.addDetector(zn),this.addDetector($n)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(n=>{if(this.detectors[n]){let r=this.detectors[n].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(t=t.concat(r))}}),t=t.filter(n=>n!=null&&!An(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}uo.type="languageDetector";const Kn={cancel:"Cancel",create:"Create",add:"Add",remove:"Remove",delete:"Delete",close:"Close",user:"User",permission:"Permission",readOnly:"Read only",readWrite:"Read & write",settings:"Settings",comments:"Comments",files:"Files",outline:"Outline",version:"Version",loading:"Loading…",enabled:"Enabled",disabled:"Disabled",normal:"Active",admin:"Administrator",language:"Language",save:"Save",edit:"Edit",retry:"Retry",reload:"Reload page",languageEnglish:"English",languageChinese:"中文"},Yn={tagline:"A lightweight LaTeX writing environment",username:"Username",password:"Password",login:"Sign in",contact:"Need an account? Contact {{email}}",firstLogin:"Change your temporary password to continue",currentPassword:"Current password",newPassword:"New password",confirmPassword:"Confirm new password",updatePassword:"Update password",mismatch:"The new passwords do not match",passwordMinimum:"At least {{count}} characters",sessionExpired:"Your session has expired. Please sign in again.",logout:"Sign out"},qn={title:"Projects",subtitle:"Create, edit and share LaTeX documents",restricted:"You can access projects shared with you. Project creation requires administrator permission.",new:"New project",newDescription:"The project will use the configured default LaTeX engine.",name:"Project name",emptyTitle:"Let’s build something great",emptyDescription:"Create a project or upload an existing LaTeX archive to get started.",emptyRestricted:"Projects shared with you will appear here.",noMatches:"No projects match the current search or tag filter.",upload:"Upload project",uploadDescription:"Upload a ZIP archive. A single top-level folder is removed automatically. Maximum file size: {{size}} MB.",zipFile:"ZIP archive",import:"Import project",importing:"Importing…",search:"Search projects…",grid:"Grid",list:"List",scope:"Project status",active:"Active",archived:"Archived",archive:"Archive",unarchive:"Restore",noArchived:"No archived projects.",allTags:"All tags",sortBy:"Sort",sortModified:"Last modified",sortCreated:"Created",pagination:"Project pages",pageOf:"Page {{page}} of {{totalPages}} · {{count}} projects",previousPage:"Previous",nextPage:"Next",owner:"Owner",created:"Created",modified:"Last modified",mentionsColumn:"@",actions:"Actions",openProject:"Open {{project}}",projectActions:"Actions for {{project}}",relativeHoursPast:"{{hours}}h ago",relativeHoursMinutesPast:"{{hours}}h {{minutes}}m ago",relativeHoursFuture:"in {{hours}}h",relativeHoursMinutesFuture:"in {{hours}}h {{minutes}}m",relativeDaysPast:"{{days}}d ago",relativeDaysHoursPast:"{{days}}d {{hours}}h ago",relativeDaysFuture:"in {{days}}d",relativeDaysHoursFuture:"in {{days}}d {{hours}}h",comments:"Comments",unresolvedComments:"{{count}} unresolved comments",unresolvedCommentsTooltip:"{{unresolved}} unresolved / {{total}} total comments",allResolved:"All resolved ({{count}})",allCommentsResolvedTooltip:"All {{count}} comments resolved",noComments:"No comments",unresolvedCount:"{{count}} unresolved",unreadMentions:"{{count}} messages",unreadMentionsTooltip:"{{count}} unread messages",modifiedBy:"Modified by",byUser:"By {{user}}",modifiedByUser:"{{time}} · By {{user}}",deletedUser:"Deleted user",filterTags:"Filter by tag",rename:"Rename",renameTitle:"Rename project",duplicate:"Duplicate",duplicating:"Duplicating…",duplicateTitle:"Duplicate project",duplicateDescription:"Create an independent copy of {{project}}. Files and project settings are copied; members, comments, Git history and compile output are not.",transfer:"Transfer",transferOwnership:"Transfer ownership",transferDescription:"Choose a new owner for {{project}}.",newOwner:"New owner",chooseNewOwner:"Choose a user",noTransferUsers:"No other active users",transferWarning:"You will keep read/write access. Source files, history, comments and members remain; the saved GitHub token is removed so the new owner can add their own credential.",transferForbidden:"Only the current project owner can transfer ownership.",transferTargetInvalid:"Choose a new project owner.",transferSelf:"You already own this project.",download:"Download",deleteTitle:"Delete project",deleteDescription:"Permanently delete {{project}} and all of its files? This cannot be undone.",chooseZip:"Choose a ZIP project",dropZip:"Drag and drop a ZIP archive here",browse:"Browse files",selectedFileSize:"Selected · {{size}}",clearFile:"Clear selected file"},Jn={title:"Choose project icon",description:"Choose a visual marker for {{project}}. This shared setting can be changed by the project owner.",change:"Change project icon",search:"Search icons…",save:"Save icon",useInitial:"Use project initial",noMatches:"No icons match “{{query}}”.",advancedName:"Advanced: Lucide icon slug",advancedNamePlaceholder:"For example: file-text",advancedNameDescription:"Enter an official Lucide short name such as file-text. Values copied from Iconify as lucide:file-text also work. This is separate from the curated search above.",advancedPreview:"Advanced icon preview",browse:"Browse Lucide icons",icons:{"file-text":{name:"Document",keywords:"document paper manuscript article text"},"book-open":{name:"Book",keywords:"book reading reference literature"},"notebook-pen":{name:"Notebook",keywords:"notebook notes writing draft"},"book-marked":{name:"Bookmarked",keywords:"book bookmark reading literature"},"scroll-text":{name:"Scroll",keywords:"scroll text manuscript archive"},library:{name:"Library",keywords:"library references literature collection"},"graduation-cap":{name:"Thesis",keywords:"thesis dissertation degree academic"},presentation:{name:"Presentation",keywords:"presentation slides talk report"},image:{name:"Image",keywords:"image figure visual photo"},"folder-kanban":{name:"Project",keywords:"project board tasks planning"},microscope:{name:"Research",keywords:"research microscope experiment science"},"flask-conical":{name:"Experiment",keywords:"experiment chemistry laboratory flask"},"test-tube-diagonal":{name:"Chemistry",keywords:"chemistry test laboratory experiment"},atom:{name:"Physics",keywords:"physics atom science"},dna:{name:"Biology",keywords:"biology genetics dna life"},telescope:{name:"Astronomy",keywords:"astronomy telescope space"},earth:{name:"Earth",keywords:"earth global geography world"},map:{name:"Map",keywords:"map geography location spatial"},languages:{name:"Languages",keywords:"languages translation multilingual"},university:{name:"University",keywords:"university education academic"},landmark:{name:"Economics",keywords:"economics finance policy institution"},scale:{name:"Law",keywords:"law justice policy balance"},"code-2":{name:"Code",keywords:"code programming software development"},"file-code-2":{name:"Source code",keywords:"source code program file software"},database:{name:"Database",keywords:"database data storage"},server:{name:"Server",keywords:"server system infrastructure"},network:{name:"Network",keywords:"network graph connection"},"circuit-board":{name:"Engineering",keywords:"engineering circuit hardware electronics"},brain:{name:"Thinking",keywords:"thinking cognition mind"},"brain-circuit":{name:"AI",keywords:"artificial intelligence ai machine learning"},bot:{name:"Automation",keywords:"bot robot automation"},"shield-check":{name:"Security",keywords:"security protection privacy"},"lock-keyhole":{name:"Encryption",keywords:"lock encryption privacy security"},workflow:{name:"Workflow",keywords:"workflow process pipeline"},blocks:{name:"Modules",keywords:"modules blocks components build"},sigma:{name:"Mathematics",keywords:"mathematics formula statistics sigma"},calculator:{name:"Calculation",keywords:"calculation arithmetic mathematics"},"function-square":{name:"Function",keywords:"function mathematics formula"},"chart-no-axes-combined":{name:"Analysis",keywords:"analysis chart data"},"line-chart":{name:"Trend",keywords:"trend line chart data"},"bar-chart-3":{name:"Bar chart",keywords:"bar chart statistics data"},"pie-chart":{name:"Pie chart",keywords:"pie chart distribution data"},"chart-scatter":{name:"Scatter plot",keywords:"scatter plot data analysis"},"chart-spline":{name:"Curve",keywords:"curve spline data analysis"},"file-spreadsheet":{name:"Spreadsheet",keywords:"spreadsheet table data workbook"},"file-chart-column-increasing":{name:"Report",keywords:"report chart data results"},lightbulb:{name:"Idea",keywords:"idea inspiration creative"},rocket:{name:"Innovation",keywords:"innovation launch progress"},target:{name:"Goal",keywords:"goal target focus"},sparkles:{name:"General",keywords:"general sparkle highlight"},"wand-sparkles":{name:"Tools",keywords:"tools magic optimize utility"},"file-pen-line":{name:"Manuscript",keywords:"manuscript draft writing paper document"},"file-stack":{name:"File collection",keywords:"files stack documents collection"},folder:{name:"Folder",keywords:"folder directory files"},"folder-open":{name:"Open folder",keywords:"folder directory files open"},"folder-archive":{name:"Archived files",keywords:"folder archive files storage"},archive:{name:"Archive",keywords:"archive storage history"},book:{name:"Closed book",keywords:"book reading literature reference"},bookmark:{name:"Bookmark",keywords:"bookmark reference reading"},newspaper:{name:"Paper",keywords:"paper newspaper publication article"},"notepad-text":{name:"Notes",keywords:"notes notepad writing ideas"},"sticky-note":{name:"Sticky note",keywords:"note reminder idea"},"pen-tool":{name:"Writing",keywords:"writing pen author edit"},quote:{name:"Quotation",keywords:"quote citation reference text"},"list-tree":{name:"Outline",keywords:"outline structure chapters list tree"},"file-search":{name:"Search documents",keywords:"search documents research files"},beaker:{name:"Beaker",keywords:"beaker chemistry laboratory science"},"test-tubes":{name:"Tests",keywords:"test tubes laboratory experiment science"},syringe:{name:"Medicine",keywords:"medicine health clinical syringe"},radiation:{name:"Nuclear science",keywords:"radiation nuclear physics science"},satellite:{name:"Satellite",keywords:"satellite space remote sensing"},"map-pinned":{name:"Location",keywords:"location map pin geography"},route:{name:"Route",keywords:"route path transport geography"},"folder-git-2":{name:"Git repository",keywords:"git repository version control source"},"git-branch":{name:"Branch",keywords:"git branch version control"},"git-commit-horizontal":{name:"Commit",keywords:"git commit version control"},terminal:{name:"Terminal",keywords:"terminal command shell developer"},braces:{name:"Syntax",keywords:"syntax code programming braces"},regex:{name:"Regular expression",keywords:"regex regular expression search code"},binary:{name:"Binary",keywords:"binary bits data computing"},cpu:{name:"Computing",keywords:"cpu processor computing hardware"},"hard-drive":{name:"Storage",keywords:"storage disk drive data"},cloud:{name:"Cloud",keywords:"cloud infrastructure storage network"},wifi:{name:"Wireless",keywords:"wifi wireless network connection"},radar:{name:"Sensing",keywords:"radar sensing signal research"},"key-round":{name:"Access key",keywords:"key access authentication security"},fingerprint:{name:"Identity",keywords:"identity fingerprint authentication security"},shield:{name:"Protection",keywords:"protection security privacy shield"},bug:{name:"Debugging",keywords:"bug debugging software issue"},wrench:{name:"Maintenance",keywords:"maintenance tools repair engineering"},"chart-column":{name:"Column chart",keywords:"column chart data statistics"},"chart-candlestick":{name:"Candlestick chart",keywords:"candlestick chart finance data"},gauge:{name:"Metric",keywords:"metric gauge measurement performance"},activity:{name:"Activity",keywords:"activity signal monitoring health"},"table-2":{name:"Data table",keywords:"table data rows columns"},waypoints:{name:"Pipeline",keywords:"pipeline workflow waypoints process"},boxes:{name:"Components",keywords:"components boxes modules system"},package:{name:"Package",keywords:"package dependency software module"},"users-round":{name:"Team",keywords:"team users collaboration group"},"calendar-days":{name:"Schedule",keywords:"schedule calendar deadline planning"}}},Zn={manage:"User management",back:"Back to projects",onlyAdmin:"Only administrators can create users",add:"Add user",role:"Role",createProjects:"Create projects",ownedProjects:"Owned projects",status:"Status",actions:"Actions",adminRequired:"Administrator permission is required.",allow:"Allow",deny:"Deny",enable:"Enable",disable:"Disable",promote:"Make administrator",demote:"Make user",allowCreate:"Allow creation",denyCreate:"Deny creation",resetPassword:"Reset password",initialPassword:"Login password",displayName:"Display name",addDescription:"Set a login password or generate a secure random one.",createUser:"Create user",randomPassword:"Random password",generatePassword:"Generate a random password",resetDescription:"Set a temporary password for {{username}}. Existing sessions will be signed out.",reset:"Reset",deleteTitle:"Delete user",deleteDescription:"Delete {{username}}? This cannot be undone.",ownedChoice:"{{count}} owned projects",transferProjects:"Transfer them to the current administrator",deleteProjects:"Permanently delete projects and files"},Qn=JSON.parse(`{"saved":"Saved","savedAt":"Saved to server at {{time}}","loading":"Loading","pending":"Waiting to save","saving":"Saving to server","saveFailed":"Save failed","offlineDraft":"Offline · local draft retained","harperRecoveryTitle":"Harper is unavailable.","harperFallbackHint":" The browser's built-in spellchecker is being used instead.","texFmtRecoveryTitle":"tex-fmt could not load.","texFmtOptionsRecoveryTitle":"tex-fmt rejected the source or options.","texFmtRuntimeRecoveryTitle":"tex-fmt returned an unexpected result.","clientToolRecoveryHint":" Retry now, or reload the page to use the latest browser assets.","resetFormatterOptions":"Clear options and retry","formattingBy":"{{name}} is formatting this file. Please wait…","citationJumpHint":"Ctrl/Cmd-click to open bibliography entry “{{key}}”.","labelJumpHint":"Ctrl/Cmd-click to open label definition “{{key}}”.","citationTargetNotFound":"No bibliography entry was found for “{{key}}”.","labelTargetNotFound":"No label definition was found for “{{key}}”.","compile":"Compile · {{engine}}","compiling":"Compiling…","compileQueued":"Compile queued…","compileFailedRetained":"Compilation failed; showing the last successful PDF from {{time}}.","compileFailedNoPdf":"Compilation failed and no successful PDF is available.","upToDate":"Files are up to date; no compilation was needed.","compileSnapshotStale":"PDF compiled from a consistent earlier snapshot; newer source changes are not included.","addComment":"Add comment","sourceComments":"Source comments","mentionUsers":"Mention project members","mentionedYou":"Mentioned you","markMentionRead":"Mark as read","markAllMentionsRead":"Mark all read","commentScope":"Comment scope","commentScopeFile":"This file","commentScopeProject":"Project","commentFilter":"Comment filter","commentFilterUnresolved":"Open {{count}}","commentFilterMentions":"@ me {{count}}","commentFilterResolved":"Resolved {{count}}","commentPrevious":"Previous comment","commentNext":"Next comment","commentPosition":"{{current}} / {{total}}","commentNoMatches":"No comments match this filter.","commentLocation":"{{path}} · Line {{line}}","projectSettings":"Project settings","uploadAttachment":"Upload attachment","newFile":"New text file","binary":"The binary attachment is stored but cannot be opened in the text editor.","noOutline":"No sections in this file","collapseOutline":"Collapse outline","expandOutline":"Expand outline","collapseOutlineItem":"Collapse {{title}}","expandOutlineItem":"Expand {{title}}","wordCountTitle":"Word count","wordCountFull":"Full","wordCountSelection":"Selected","wordCountFullHint":"Count the current main document and included TeX files","wordCountSelectionHint":"Count the selected LaTeX source","wordCountLoading":"Running TeXcount…","wordCountTotal":"Total words","wordCountCharacters":"Characters","wordCountCharactersHint":"Excludes spaces and punctuation","wordCountText":"Body text","wordCountHeaders":"Headings","wordCountCaptions":"Captions","wordCountFloats":"Figures / tables","wordCountInlineMath":"Inline math","wordCountDisplayMath":"Displayed math","wordCountFiles":"Included files","wordCountWordsUnit":"words","wordCountItemsUnit":"items","wordCountExpressionsUnit":"expressions","wordCountParserErrors":"TeXcount reported {{count}} parsing issues.","wordCountSelectionEmpty":"Select LaTeX source before counting.","wordCountSaveRequired":"The latest editor changes could not be saved, so the count was cancelled.","wordCountFailed":"TeXcount could not count this source.","wordCountSourceInvalid":"Select LaTeX source text to count.","wordCountSourceTooLarge":"The selected source is too large to count.","wordCountUnavailable":"TeXcount is not available on this server. Install it from TeX Live and try again.","wordCountHelp":"About TeXcount","wordCountTemplateNote":"Custom %TC:newtemplate or %TC:template directives can override TexLite's report format and prevent a result.","preview":"PDF preview","previewHint":"Compile to generate the document","loadingPdf":"Loading PDF…","pdfCompiledAt":"Compiled successfully at {{time}}","pdfCompiledAtFor":"{{file}} compiled successfully at {{time}}","currentMainDocument":"Current document compiled as the root: {{path}}","mainDocumentCandidate":"LaTeX root document candidate: {{path}}","currentMainShort":"root","deletedUser":"Deleted User","orphaned":"Anchor lost","line":"Line {{line}}","reopen":"Reopen","resolve":"Mark resolved","noComments":"No comments in this file","newFileDescription":"Directories are allowed, for example chapters/introduction.tex.","filePath":"File path","commentDescription":"Selected {{count}} characters","pointComment":"No text selected; the comment will be anchored at the cursor.","commentContent":"Comment","backToProjects":"Back to projects","outputTabs":"Compile output","log":"Log","warnings":"Warnings","errors":"Errors","artifacts":"Artifacts","clean":"Recovery","noLog":"Compile to see the log.","noWarnings":"No warnings in the latest compile.","noErrors":"No errors in the latest compile.","projectRoot":"Project root","uploadTo":"Upload to {{folder}}","dropFiles":"Drop files to upload (folders are not supported)","dropFoldersUnsupported":"Dragging folders is not supported. Drag individual files instead.","newFolder":"New folder","folderName":"Folder name","noArtifacts":"Compile to see generated artifacts.","selectArtifact":"Select a text artifact to preview it.","viewArtifact":"View artifact","downloadArtifact":"Download artifact","downloadToView":"Download this artifact to view it","cleanTitle":"Compilation recovery","cleanDescription":"Use these advanced actions only when compilation is stuck, a previous error is left behind, or generated output is inconsistent. They do not change source files, project settings, comments, history, or Git data.","cleanCache":"Force a clean rebuild","cleanCacheDescription":"Use after a compilation failure or stale latexmk state. Removes the incremental cache while keeping the current successful PDF.","cleanArtifacts":"Remove generated output","cleanArtifactsDescription":"Use when generated files are inconsistent. Removes the PDF, SyncTeX, logs, and intermediate files for this root document.","cleanCacheConfirmTitle":"Force a clean rebuild?","cleanCacheConfirmDescription":"This recovery action removes the incremental latexmk cache. The current PDF remains visible, and the next compilation starts from a clean cache.","cleanArtifactsConfirmTitle":"Remove generated output?","cleanArtifactsConfirmDescription":"This recovery action removes the current PDF and all generated files for this root document. Source files are not affected.","cleanConfirm":"Run recovery","cleanCacheComplete":"Recovery cache cleared. The next compilation will be a full rebuild.","cleanArtifactsComplete":"Generated compilation output removed.","cleanBusy":"This root document is compiling. Try recovery again after it finishes.","folderDestination":"The folder will be created in {{folder}}.","uploadOverwriteTitle":"File already exists","uploadOverwriteDescription":"These files already exist: {{files}}. Replace them?","uploadOverwrite":"Replace files","collapseFiles":"Collapse file panel","showFileSizes":"Show file sizes","hideFileSizes":"Hide file sizes","move":"Move","moveTitle":"Move or rename {{name}}","moveDescription":"Choose a destination folder and name. Files, comments and project paths stay linked.","pathName":"Name","moveApply":"Move / rename","deletePath":"Delete file or folder","deletePathTitle":"Delete {{name}}","deletePathDescription":"Delete {{path}}? This cannot be undone.","deletePathActiveDescription":"Delete {{path}}? It is currently open for {{users}} and will close in those sessions.","deletePathWillClose":"Any late edits to this path will be rejected to prevent silent data loss.","fileDeletedByCollaborator":"{{path}} was deleted in another session. A safe fallback file has been opened.","destinationFolder":"Destination folder","compileShortcut":"Save and compile (Ctrl+S / Cmd+S)","compilingBy":"{{name}} is compiling","format":"Format","formatFile":"File","formatFileHint":"Format the current file","formatFileComplete":"Current file formatted.","formatFileFailed":"Unable to format the current file: {{message}}","formatSelected":"Selected","commentsAdd":"Add","commentsAll":"View","formatSelection":"Format selection","formatting":"Formatting…","formatSelectionHint":"Select LaTeX source to format","formatSelectionRequired":"Select LaTeX source before formatting.","formatSelectionComplete":"Selected LaTeX source formatted.","formatFailedContinue":"Formatting failed; compilation will continue: {{message}}","formatFailed":"Unable to format the selection: {{message}}","formatSourceChanged":"The source changed during formatting, so formatting was skipped.","formatSelectionChanged":"The selected source changed during formatting. Select it again and retry.","writingSuggestions":"Writing suggestions","noWritingSuggestions":"No suggestions available","removeText":"Remove text","replaceWith":"Replace with {{word}}","spellCheckReadOnly":"Read-only: choose a suggestion in an editor with write permission.","spellCheckSourceChanged":"The source changed before the writing correction could be applied.","mathPreview":"Math preview","mathPreviewLoading":"Rendering math…","mathPreviewUnavailable":"This formula cannot be previewed.","vimOn":"Vim ON","vimOnHint":"Vim keybindings are enabled for this editor.","reply":"Reply","replyPlaceholder":"Write a reply…","sendReply":"Send reply","editComment":"Edit comment","deleteComment":"Delete comment","saveChanges":"Save changes","deleteCommentTitle":"Delete comment","deleteCommentDescription":"Delete this comment and its {{count}} replies? This cannot be undone.","editReply":"Edit reply","deleteReply":"Delete reply","deleteReplyTitle":"Delete reply","deleteReplyDescription":"Delete this reply? This cannot be undone.","editedAt":"Edited {{time}}","outlineJump":"Go to source line {{line}} and locate it in the PDF","lineNumber":"line {{line}}","showInSource":"Show the visible PDF location in source","showInPdf":"Show the source cursor location in PDF","syncTexOnlyForTex":"PDF sync is only available for TeX (.tex) files","syncTexOnlyForMain":"PDF sync is only available for the current main TeX document","openFiles":"Open files","pdfLoadFailed":"The PDF preview could not be loaded","pdfZoomControls":"PDF zoom controls","downloadPdf":"Download PDF","downloadResource":"Download file","resourceTooLarge":"This file is {{size}} and exceeds the direct preview limit of {{limit}}.","resourceTooLargeTitle":"File is too large to preview","resourceTooLargeDescription":"Download the file to open it locally.","resourceUnsupportedTitle":"Preview unavailable","resourceUnsupportedDescription":"This file type cannot be rendered in the browser. Download it to open it locally.","resourcePreview":{"image":"Image preview","pdf":"PDF preview","text":"Text preview","unsupported":"File preview"},"pdfZoomOut":"Zoom out","pdfZoomIn":"Zoom in","pdfFitWidth":"Fit width","pdfLink":"PDF link","pdfLinks":"PDF links","layout":{"label":"Layout","choose":"Choose layout","current":"Current layout: {{layout}}","editor-pdf":{"name":"Editor & PDF","description":"Show the source editor and PDF preview side by side"},"editor-only":{"name":"Editor only","description":"Use the workspace for source editing"},"pdf-only":{"name":"PDF only","description":"Use the workspace for the PDF and compile output"}},"collaboration":{"connecting":"Connecting collaboration…","connected":"Live collaboration connected","disconnected":"Collaboration disconnected","editing":"Editing","viewing":"Viewing","joining":"Joining project","reconnect":"Reconnect","permissionDowngradeTitle":"Edit permission changed","permissionDowngradeDescription":"Your access changed from {{previous}} to read-only. Any unsaved local draft is still retained in this tab and cannot be saved. Keep it visible, or discard it and reload the latest server version.","permissionDowngradeKeep":"Keep local draft","permissionDowngradeDiscard":"Discard draft and reload","permissionDowngradeReload":"Reload server version","permissionDowngradeNoDraft":"Your access changed to read-only. Reload to use the latest server version, or continue viewing this tab.","permissionDowngradeOtherTab":"Your access changed to read-only. Another browser tab still has an unsaved draft; return to that tab to handle it. This page cannot clear the shared local draft safely.","permissionDowngradeMultipleDrafts":"Your access changed to read-only. This tab and another browser tab both have unsaved drafts. Handle the other tab first; this page will not clear shared local data.","permissionDowngradeOtherTabBlocked":"Another browser tab just created an unsaved draft, so cleanup was cancelled to protect it.","activeSessions":"{{count}} active sessions","showMoreSessions":"Show {{count}} more sessions","showFewerSessions":"Collapse session list","sessionTooltip":"{{name}} (@{{username}}) · {{file}} · {{activity}} · {{permission}}"},"search":{"button":"Find","title":"Find and replace (Ctrl+F / Cmd+F)","find":"Find","replace":"Replace","next":"Next","previous":"Previous","all":"Select all","matchCase":"Match case","regexp":"Regular expression","wholeWord":"Whole word","replaceNext":"Replace","replaceAll":"Replace all","currentMatch":"Current match","onLine":"on line","replacedMatchOnLine":"replaced match on line $","replacedMatches":"replaced $ matches","goToLine":"Go to line","go":"Go","matchCount":"{{count}} matches","noMatches":"No matches","invalidQuery":"Invalid regular expression"}}`),er={diagnostics:{syntaxError:"Syntax error",duplicatePerson:"Duplicate name in {{field}}: {{person}}",unknownEntryType:"Unknown entry type: @{{entryType}}",duplicateEntryKey:"Duplicate entry key: {{key}}",duplicateField:"Duplicate field ‘{{field}}’ in entry",unknownField:"Unknown field: {{field}}",invalidFieldValue:"Syntax error in value for field ‘{{field}}’",emptyFieldValue:"Empty value for field ‘{{field}}’",verifyInheritedFields:"Verify ‘{{field}}’ provides: {{fields}}",missingRequiredFields:"Missing required fields: {{fields}}",missingRecommendedFields:"Recommended fields missing: {{fields}}"},hover:{entryDescription:"BibTeX entry type {{entryType}}.",fieldDescription:"{{field}} is a BibTeX field.",requiredFields:"Required: {{fields}}",optionalFields:"Optional: {{fields}}",example:"Example",note:"Note",authorsNote:"Use “and” to separate multiple authors or editors.",pagesNote:"Use a double dash (--) for a page range.",monthNote:"Use a three-letter abbreviation without quotes."}},tr={title:"Citation library",description:"Save references from {{file}} and import them into this BibTeX file. Your library and its tags are private to your account.",myLibrary:"My library",currentFile:"Current file",searchPlaceholder:"Search citations…",searchHint:"Search key, title, author, or year",emptyTitle:"Your library is empty",emptyDescription:"Open the current-file tab to save a BibTeX entry.",noEntries:"No BibTeX entries found",noEntriesDescription:"Add a valid @article, @inproceedings, or similar entry to this file.",currentFileTitle:"Entries from the current file",currentFileDescription:"Select an entry to save it to your citation library.",backToLibrary:"Back to library",save:"Save",update:"Update",saving:"Saving…",saved:"Citation saved to your library.",updated:"Citation updated.",deleted:"Citation deleted.",deleteTitle:"Delete citation",deleteDescription:"Delete the citation {{key}} from your private library? This cannot be undone.",fileTooLarge:"This BibTeX file exceeds the {{size}} limit.",fileTooLargeHint:"The file is too large to parse in the browser. Save individual entries from a smaller file or split it first.",fileInvalid:"The current BibTeX file contains syntax errors.",fileInvalidHint:"Fix the current file before formatting it or importing another citation.",savedLabel:"Saved",import:"Import",importToFile:"Import into the current BibTeX file",importRequiresWrite:"Import requires write permission for this project.",imported:"Imported {{key}} into the current file.",untitled:"Untitled citation",authorUnknown:"Author not specified",allTags:"All tags",noTags:"No tags yet",noTagMatches:"No citations match this tag.",newTagPlaceholder:"New tag name",tagColor:"Tag color",createTag:"Create tag",tagCreated:"Tag created.",tags:"Tags",tagsTitle:"Tags for {{key}}",noTagsToAssign:"Create a tag first.",saveTags:"Save tags",tagsUpdated:"Tags updated.",editTitle:"Edit {{key}}"},or={invalid:"Enter one valid BibTeX entry.",tooLarge:"This BibTeX entry is too large.",notFound:"The citation does not exist.",keyExists:"That citation key already exists. Review the existing entry before replacing it.",tagNotFound:"The citation tag does not exist.",conflict:"This citation changed elsewhere. Refresh the library and try again.",alreadyInFile:"{{key}} is already present in this BibTeX file."},nr="Manage your private BibTeX references and tags from the homepage. Open a .bib file to save or import entries.",rr={addEntry:"Add entry",addEntryTitle:"Add a BibTeX entry",addEntryDescription:"Paste one complete BibTeX entry. It will be validated before it is saved.",addEntryPlaceholder:`@article{key,
3
3
  author = {Author},
4
4
  title = {Title},
@@ -9,4 +9,4 @@ $pdf_mode = 1;`,addMember:"Add member",noMembers:"This project has not been shar
9
9
  title = {Title},
10
10
  year = {2026}
11
11
  }`,added:"引用已添加到你的引用库。"},Nr={pageOf:"第 {{page}} / {{totalPages}} 页 · {{count}} 条引用",previous:"上一页",next:"下一页"},Ir={quickOpen:"快速打开",quickOpenDescription:"按名称打开项目文件(Ctrl/Cmd+P)。",filePlaceholder:"输入文件名…",noFiles:"没有匹配的文件。",projectSearch:"项目搜索",projectSearchDescription:"在项目源码文件中搜索和替换(Ctrl/Cmd+Shift+F)。",searchPlaceholder:"搜索全部源码文件…",replacePlaceholder:"替换为…",matchSummary:"共 {{count}} 个匹配",truncated:"仅显示前 {{count}} 个匹配。",replaceAll:"替换全部 {{count}} 项",replaceConfirmTitle:"在项目中批量替换",replaceConfirmDescription:"确定替换全部 {{count}} 个匹配?自动历史会记录所有修改文件。",replaced:"已在 {{files}} 个文件中替换 {{count}} 项。"},jr={saveWarning:"源码已保存,但部分历史未能保存。近期失败会自动重试,较早的历史可能不完整。请检查服务器日志及可用存储空间。",storageBreakdown:"文件 {{objects}} · 元数据 {{metadata}} · 受保护 {{protected}}",title:"历史",projectSnapshots:"项目快照",projectSnapshotsButton:"项目快照",description:"浏览自动项目快照、比较文件,并安全恢复较早的工作。",empty:"尚无项目快照。",loadOlder:"加载更早快照",changedCount:"{{count}} 个文件有变化",fileCount:"{{count}} 个文件",changed:"有修改",labelPlaceholder:"为此版本命名",saveLabel:"保存标签",compareCurrent:"与当前版本比较",comparingCurrent:"历史快照与当前文件的比较",chooseFile:"选择文件后,可与当前源码进行比较。",changedFilesHeading:"修改的文件 ({{count}})",noChangedFiles:"此快照没有修改的文件。",noDifferences:"文件在此快照与当前版本内容相同,没有差异。",noDifferencesInCommit:"此文件在本次修改中无内容变动。",historicalVersion:"历史快照",currentVersion:"当前版本",diffMode:"对比模式",diffModeCommit:"本次修改",diffModeCommitHint:"查看此快照相比上一快照的改动",diffModeCurrent:"与当前对比",diffModeCurrentHint:"查看此快照与当前工作区源码的差异",changedAt:"修改于 {{time}}",createdAt:"创建于 {{time}}",previousVersion:"上一快照",restore:"恢复",restoreFile:"恢复文件",restoreProject:"恢复项目",restoreFileTitle:"恢复此文件",restoreProjectTitle:"恢复此项目快照",restoreFileDescription:"从此快照恢复 {{path}}?系统会先为当前项目创建安全检查点。",restoreProjectDescription:"恢复此快照的全部源码和编译器设置?系统会先为当前项目创建安全检查点。",storage:"快照存储",storageUsage:"已使用 {{used}},上限 {{limit}}",versionUsage:"普通快照 {{count}} / {{limit}}",protectedVersions:"{{count}} 个已标记快照",storageExceeded:"受保护快照或当前基线已超过存储软上限。",deleteVersion:"删除快照",deleteVersionTitle:"删除此项目快照",deleteVersionDescription:"永久删除“{{name}}”?当前项目文件和选区历史不会改变。",clearAll:"清空项目快照",clearAllTitle:"清空全部项目快照",clearAllDescription:"永久删除全部项目快照及不再引用的存储数据?当前项目文件和选区历史不会改变。",reasons:{initial:"项目创建",autosave:"自动保存",file:"文件操作",settings:"编译器设置",git:"Git 操作",restore:"恢复版本",checkpoint:"安全检查点"}},Ar={storageUsage:"选区历史:{{used}} / {{limit}} MiB · {{count}} 个片段",storageDescription:"统计整个项目的修改数据,与项目快照独立;不包含共享数据库开销。",clearAll:"清空项目选区历史",clearDescription:"删除本项目所有文件的修改记录?源码和项目快照将保留,后续修改仍会继续记录。此操作不可撤销。",limited:"仅显示最近 {{count}} 个编辑窗口,更早的记录未展示。",sourceChanged:"源码已发生变化。请等待同步完成,重新选择文本后再打开历史。",title:"选区历史",buttonLabel:"编辑记录",selectSourceHint:"请先选中源码,再查看其编辑历史。",description:"{{path}} 中所选 {{count}} 个字符的编辑记录。",emptyTitle:"此选区还没有已保存的编辑记录",emptyDescription:"继续编辑并保存后,这里会显示相关的编辑记录。",boundary:"由于文件替换、恢复操作或较早记录已清理,此选区的历史从这里开始。",changedBy:"修改者:",contentTab:"内容",diffTab:"差异",view:"选区历史展示方式",previousVersion:"上一状态",currentVersion:"当前状态",noPrevious:"没有更早的选区状态可供比较。",diffUnavailable:"其中一个选区状态无法精确还原,暂无法比较。",noDiff:"与上一选区状态没有文本差异。",contentTruncated:"选区内容已缩短。",contentUnavailable:"由于一次过大的修改无法精确还原,无法显示这个较早状态的选区内容。"},_r={mainFile:"主文档",invalidMainFileOption:"{{path}}(不是主文档)",engine:"编译引擎",latexmkrc:"项目 latexmkrc",save:"保存项目设置",members:"共享成员",recentLog:"最近编译日志",share:"共享",shareDescription:"仅可共享给管理员已创建的用户。",chooseUser:"请选择用户",latexmkrcPlaceholder:`# 留空表示不使用项目 rc 文件
12
- $pdf_mode = 1;`,addMember:"添加成员",noMembers:"该项目尚未分享给其他成员。",removeTitle:"移除共享成员",removeDescription:"确认移除 {{username}}?其账号和其他项目不会受到影响。",editorTab:"编辑器外观",compilerTab:"LaTeX 编译器",compilerDescription:"选择本项目所有成员共享的主文档和 LaTeX 编译选项。",editorAppearance:"编辑器外观",editorAppearanceDescription:"这些偏好仅作用于当前浏览器中的当前用户和项目;项目词典是共享的。",browserTools:"格式化工具",toolStatus:{loading:"加载中",working:"运行正常",error:"错误"},reloadTool:"重新加载",saveAppearance:"保存外观设置",saveCompiler:"保存编译器设置",writingCheckDescription:"TexLite 使用宿主机上可选的 Harper CLI。若其不可用,将自动改用浏览器内置拼写检查。拼写问题使用红色波浪线,语法问题使用黄色波浪线;右键问题可以查看修改建议。",projectConfiguration:"项目配置",fontFamily:"英文字体",fontSize:"字体大小",lineHeight:"行间距",dictionary:"项目词典",dictionaryDescription:"添加到这里的词会在 Harper 返回本项目诊断后被忽略;具有编辑权限的用户可以维护此列表。",dictionaryPlaceholder:"添加自定义词",addWord:"添加词",dictionaryEmpty:"暂未添加自定义词。",showTooltips:"显示界面悬停提示",showTooltipsDescription:"显示项目工作区控件的悬停提示;不影响右键写作建议。",lineWrapping:"自动换行",mathPreviewOnHover:"悬停预览数学公式",mathPreviewOnHoverDescription:"在编辑器中悬停常见 LaTeX 公式时显示渲染预览。",spellCheck:"拼写和语法检查",vimMode:"Vim 键位",vimModeDescription:"在当前编辑器中使用 Vim 的普通、插入和可视模式。",vimHelp:"查看帮助",formatOnCompile:"编译前自动格式化 LaTeX",formatOnCompileDescription:"默认关闭;格式化会在编译前执行。",formatRequiresWrite:"需要项目编辑权限才能使用格式化。",formatterDescription:"tex、cls、sty 使用内置的浏览器 tex-fmt WASM 格式化器;BibTeX 使用浏览器中的 bibtex-tidy。",formatterInstall:"查看 tex-fmt",bibtexTidyInstall:"查看 bibtex-tidy",texFmtOptions:"tex-fmt 参数(TOML)",texFmtOptionsPlaceholder:"wrap = false",texFmtOptionsDescription:"这些参数仅保存在当前浏览器中,并按当前用户和项目隔离;它们会直接传递给 tex-fmt。",openFilesInTabs:"使用新 Tab 打开 LaTeX 文件",openFilesInTabsDescription:"在编辑器顶部通过标签页管理打开的 .tex、.bib、.bst、.sty 等源码文件。",writingIssues:"发现 {{count}} 个写作问题(去重后 {{uniqueCount}} 个)",noWritingIssues:"未发现拼写或语法问题。",spellCheckFirst:"第一个写作问题",spellCheckPrevious:"上一个写作问题",spellCheckNext:"下一个写作问题",spellCheckLast:"最后一个写作问题",spellCheckPosition:"第 {{current}}/{{total}} 个",fontJetBrains:"JetBrains Mono",fontSourceCode:"Source Code Pro",fontIbmPlex:"IBM Plex Mono",fontFiraCode:"Fira Code",fontIosevka:"Iosevka",lineHeightCompact:"紧凑",lineHeightNormal:"标准",lineHeightRelaxed:"宽松"},Mr={title:"Git 备份",description:"管理本地 Git 历史及 GitHub 备份;只有项目创建者可以执行这些操作。",ownerOnly:"只有项目所有者可以使用 Git 备份。",authentication:"GitHub 身份验证",authenticationHint:"token 需要仓库 Administration 与 Contents 写权限;它会加密保存,不会写入项目仓库或远程地址。",recommendedAccessTitle:"建议的仓库访问范围:All repositories(所有仓库)",recommendedAccess:"texLite 面向相互信任的用户。请选择 All repositories,使该 token 能创建仓库,并访问之后新建的仓库;同时授予 Administration 和 Contents 的 Read and write 权限。",token:"个人访问 token",tokenPlaceholder:"在此粘贴 GitHub token",replaceToken:"替换个人访问 token",saveToken:"保存并验证 token",createToken:"创建细粒度 token",connectedAs:"已连接为 @{{login}}",removeToken:"移除 token",tokenSaved:"GitHub token 已保存,本地仓库已就绪。",tokenRemoved:"GitHub token 已移除。",repository:"仓库",localReady:"项目源码已由本地 Git 仓库管理。",localPending:"保存有效 token 后将自动初始化本地 Git 仓库。",repositoryName:"GitHub 仓库名称",privateRepository:"创建为私有仓库",createRepository:"创建 GitHub 仓库",repositoryCreated:"GitHub 仓库创建成功。",origin:"远程仓库",openGitHub:"打开 GitHub",clean:"工作区干净",changedFiles:"{{count}} 个文件有修改",commitAndPush:"提交与推送",identity:"本次提交临时使用 {{username}} <{{username}}@texlite.com>,不会写入 Git 配置。",detachedHead:"当前处于 detached HEAD;请先返回默认分支再提交或推送。",detachedAt:"detached 于 {{revision}}",commitMessage:"提交说明",commitPlaceholder:"说明本次备份的内容…",commit:"提交",committed:"修改已提交。",noChangesToCommit:"当前没有新的修改可以提交。",push:"推送",pushed:"推送成功,GitHub 备份已是最新。",pushFailed:"推送失败",workingDiff:"当前差异",refresh:"刷新",diffTitle:"差异",diffTruncated:"输出已截断",diffFontSize:"差异字体大小",diffFontDecrease:"减小差异字体",diffFontIncrease:"增大差异字体",fullscreenDiff:"全屏查看差异",exitFullscreenDiff:"退出全屏",noChanges:"没有可显示的差异。",history:"提交历史",historyHint:"最多显示最近 100 次提交",noCommits:"尚无提交。",viewCommitDiff:"查看该提交的差异",checkoutVersion:"checkout 到该版本",checkoutTitle:"Checkout 版本",checkout:"Checkout",checkoutDescription:"将 checkout 到 {{revision}} — {{message}}。默认由 Git 保留兼容的未提交修改,发生冲突时拒绝操作。",forceCheckout:"强制覆盖",forceCheckoutDescription:"明确丢弃所有已跟踪及未跟踪的工作区修改后再 checkout;此操作不可撤销。",returnToBranch:"返回 {{branch}}",returnTitle:"返回默认分支",returnDescription:"将 checkout 到 {{branch}}。默认由 Git 保留兼容的未提交修改,发生冲突时拒绝操作。",discardChanges:"撤销修改",noChangesToDiscard:"当前没有可以撤销的修改。",discardTitle:"撤销未提交修改",discardDescription:"把所有已跟踪文件恢复到当前 HEAD(上次 commit)。未跟踪文件不受影响。",discardConfirm:"确认撤销"},Ur={title:"系统状态",description:"服务器实时健康状态和近期操作耗时,每五秒自动刷新。",refresh:"刷新",uptime:"运行时间",memory:"内存",heap:"堆内存",compileQueue:"编译任务",pending:"{{count}} 个等待中",collaboration:"协作",sessions:"{{count}} 个会话",roomsAndDirty:"{{rooms}} 个房间 · {{dirty}} 个待保存文件",eventLoop:"事件循环延迟",latencySummary:"P50 {{p50Ms}} ms · P95 {{p95Ms}} ms · 最大 {{maxMs}} ms",operationDurations:"近期操作耗时",noSamples:"尚未采集到操作样本。",operation:"操作",samples:"样本",last:"最近",max:"最大",operations:{collaboration:{connect:"打开协作房间",persist:"保存协作修改"},workspace:{project:"加载项目元数据",files:"加载项目文件",compileState:"加载保留的 PDF 状态"},compile:{snapshot:"准备编译快照",request:"编译请求总耗时",cacheSync:"更新编译缓存",latexmk:"运行 latexmk",artifactCopy:"发布编译产物"},outline:{build:"生成项目大纲"},search:{project:"项目内搜索"},completions:{build:"生成补全索引"}}},$r={title:"标签",add:"添加标签",create:"新建标签",createDescription:"创建仅自己可见的可复用彩色标签,用于整理项目。",manage:"管理标签",manageDescription:"创建和整理仅自己可见的项目标签。删除标签只会解除它与项目的关联。",createInManager:"新建标签",edit:"编辑",rename:"重命名",deleteTitle:"删除标签",deleteDescription_one:"确定删除“{{tag}}”吗?它将从 {{count}} 个项目中移除。",deleteDescription_other:"确定删除“{{tag}}”吗?它将从 {{count}} 个项目中移除。",projectCount_one:"{{count}} 个项目",projectCount_other:"{{count}} 个项目",noTags:"还没有标签。创建一个标签来整理项目。",none:"暂无标签",assign:"标签",assignTitle:"“{{project}}”的标签",assignDescription:"勾选你为此项目设置的私有标签;其他用户拥有各自的标签。",empty:"请先创建标签。",allAssigned:"所有可用标签均已添加。",name:"标签名称",color:"颜色",filter:"筛选",red:"红色",orange:"橙色",yellow:"黄色",green:"绿色",blue:"蓝色",purple:"紫色",gray:"灰色"},Br={generic:"操作失败",request:"请求失败({{status}})",upload:"上传失败",boundaryTitle:"页面遇到问题",boundaryDescription:"渲染组件时发生异常。你可以尝试恢复,或刷新页面重新载入。",boundaryRetry:"重试",boundaryReload:"刷新页面",fileExists:"同名文件或文件夹已经存在。",pathConflict:"目标路径已经被文件或文件夹占用。",duplicateUploadNames:"所选文件中存在重复名称:{{files}}。",fileTooLarge:"文件超过 {{size}} MB 限制。",zipOnly:"请选择 ZIP 压缩包。",collaborationUnavailable:"实时协作尚未连接,请在重新连接后保存或编译。",codes:{AUTH_INVALID:"用户名或密码错误。",CURRENT_PASSWORD_INVALID:"当前密码错误。",USER_NOT_FOUND:"用户不存在或已被删除。",LAST_ADMIN:"系统必须保留至少一名可用管理员。",SELF_DELETE_FORBIDDEN:"不能删除当前登录的管理员。",PROJECT_CREATE_FORBIDDEN:"管理员尚未授予你创建项目的权限。",PROJECT_NOT_FOUND:"项目不存在或你已无法访问。",PROJECT_OWNER_ONLY:"只有项目所有者可以修改此设置。",PROJECT_EDIT_FORBIDDEN:"你没有此项目的编辑权限。",DICTIONARY_EDIT_FORBIDDEN:"你没有维护本项目词典的权限。",TAG_NOT_FOUND:"所选标签不存在。",GIT_TOKEN_INVALID:"请输入 GitHub token。",GIT_REPOSITORY_NAME_INVALID:"请输入 GitHub 仓库名称。",GIT_REVISION_INVALID:"请选择要 checkout 的 Git 版本。",PROJECT_DELETE_FORBIDDEN:"只有项目所有者可以删除项目。",MEMBERS_MANAGE_FORBIDDEN:"只有项目所有者可以管理项目成员。",OWNER_MEMBER_FORBIDDEN:"项目所有者不能作为成员添加。",INVALID_PATH:"文件路径无效。",RESERVED_PATH:"此路径由 TexLite 保留。",PATH_EXISTS:"目标路径已被文件或文件夹占用。",FILE_EXISTS:"同名文件已经存在。",PATH_NOT_FOUND:"文件或文件夹不存在。",FILE_NOT_FOUND:"文件不存在。",DIRECTORY_NOT_FOUND:"目标文件夹不存在。",MOVE_INTO_SELF:"不能把文件夹移动到自身内部。",MAIN_FILE_DELETE_FORBIDDEN:"不能删除主文档。",FILE_TOO_LARGE:"文件过大,无法打开或上传。",UPLOAD_EMPTY:"没有选择要上传的文件。",COMMENT_FILE_NOT_FOUND:"批注对应的文件不存在。",COMMENT_RANGE_INVALID:"批注的源码区间无效。",COMMENT_NOT_FOUND:"批注不存在。",COMMENT_EDIT_FORBIDDEN:"只能编辑自己的批注。",COMMENT_DELETE_FORBIDDEN:"只能删除自己的批注。",REPLY_NOT_FOUND:"回复不存在。",REPLY_EDIT_FORBIDDEN:"只能编辑自己的回复。",REPLY_DELETE_FORBIDDEN:"只能删除自己的回复。",COMMENT_UPDATE_EMPTY:"没有可更新的批注内容。",MAIN_FILE_NOT_FOUND:"所选主文档不存在。",LATEXMKRC_DISABLED:"管理员已禁用项目级 latexmkrc。",LATEXMKRC_NOT_FOUND:"所选 latexmkrc 文件不存在。",COMPILE_ARTIFACTS_NOT_FOUND:"尚无可用的编译产物。",COMPILE_ARTIFACT_NOT_FOUND:"编译产物不存在。",ARTIFACT_PREVIEW_UNSUPPORTED:"该产物不能作为文本预览,请下载后查看。",SYNC_SOURCE_INVALID:"源码位置无效。",SOURCE_FILE_NOT_FOUND:"源码文件不存在。",SYNCTEX_NOT_AVAILABLE:"尚无可用的 SyncTeX 数据,请重新编译。",SYNC_PDF_INVALID:"PDF 位置无效。",SYNCTEX_EXTERNAL_PATH:"SyncTeX 返回了项目外部的源码路径。",COMPILE_FORBIDDEN:"你没有编译此项目的权限。",PDF_NOT_FOUND:"尚未生成 PDF。",API_NOT_FOUND:"接口不存在。",SERVER_ERROR:"服务器无法完成请求。",REQUEST_INVALID:"请求格式无效。"}},Hr={historyVersionNotFound:"所选历史版本已不存在。",historyFileNotFound:"所选历史版本中没有这个文件。",historyObjectMissing:"该快照的已存储文件缺失,无法再查看或恢复。",historyTargetConflict:"当前恢复目标是目录或其他非普通文件路径。",historyPreviewUnsupported:"这个历史文件不能作为文本比较。",searchInvalid:"请输入有效的搜索内容。",gitUnavailable:"Git 集成功能不可用。请在宿主机安装 Git,或修正配置中的 git.binary 后重试。",formatFailed:"tex-fmt 无法格式化这段源码。",mainDocumentInvalid:"所选文件不是有效的 LaTeX 主文档。",compileSnapshotBusy:"源码尚未完成稳定保存,请稍后再试编译。"},Vr={requestFailed:"网络请求失败,请检查连接后重试。",invalidResponse:"服务器返回了无效响应,请重试。"},Wr={protocolUpgrade:"工作区需要更新。本地草稿已保留;请在准备好重新连接时刷新页面。"},Xr={disableTitle:"禁用用户",disableDescription:"确定禁用 @{{username}} 吗?其活跃会话将结束,且无法再登录。",disableConfirm:"禁用用户",demoteTitle:"移除管理员权限",demoteDescription:"确定将 @{{username}} 降为普通用户吗?其将无法再管理用户。",demoteConfirm:"设为普通用户",denyProjectCreationTitle:"移除项目创建权限",denyProjectCreationDescription:"确定移除 @{{username}} 创建新项目的权限吗?其已有项目访问权限不受影响。",denyProjectCreationConfirm:"移除权限"},zr={cancel:"取消编译",cancelling:"正在取消…",cancelled:"编译已取消。"},Gr={tagline:"面向小型研究团队的自托管 LaTeX 协作平台",copyright:"© {{year}}"},Kr={section:"章节",subsection:"小节",bold:"粗体",emphasis:"强调",citation:"引用文献",reference:"交叉引用",label:"标签",image:"插入图片",unordered:"无序列表",ordered:"有序列表",equation:"公式",figure:"图片环境",projectCommand:"项目命令",projectCommandArgs:"项目命令({{count}} 个参数)",projectMacro:"项目宏",expl3Command:"Expl3 项目命令",mathOperator:"项目数学算子",mathDelimiter:"项目数学定界符",projectEnvironment:"项目环境",projectFile:"项目文件",package:"宏包",documentClass:"文档类",currentFile:"当前文件",project:"项目",latex:"LaTeX",standard:"LaTeX 命令"},Yr={common:Tr,auth:xr,projects:Dr,projectIcons:Sr,users:Er,editor:kr,bibtex:Pr,citationLibrary:Or,citationErrors:Rr,citationLibraryHomeDescription:Fr,citationLibraryActions:Lr,citationLibraryPagination:Nr,navigation:Ir,history:jr,selectionHistory:Ar,projectSettings:_r,git:Mr,metrics:Ur,tags:$r,errors:Br,apiErrors:Hr,network:Vr,workspaceUpdates:Wr,userConfirmations:Xr,compileControls:zr,footer:Gr,completions:Kr};k.use(uo).use(sn).init({resources:{en:{translation:Cr},zh:{translation:Yr}},fallbackLng:"en",supportedLngs:["en","zh"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"]}});const Z="/";function qr(o){const e=o.trim();if(e===Z)return Z;const t=e.replace(/\/+$/,"");if(!t.startsWith("/")||t.includes("//"))return null;const n=t.slice(1).split("/");return!n.length||n.some(r=>r==="."||r===".."||!/^[A-Za-z0-9._~-]+$/.test(r))?null:t}function po(o){return o===Z?"":o}function Jr(o,e){if(!e.startsWith("/"))throw new Error(`Application path must start with /: ${e}`);const t=po(o);return t?e==="/"?`${t}/`:`${t}${e}`:e}function Zr(o,e){const t=po(o);return t?e===t||e===`${t}/`?"/":e.startsWith(`${t}/`)?e.slice(t.length)||"/":null:e}const Qr="texlite-base-path";function ei(){if(typeof document>"u")return Z;const o=document.querySelector(`meta[name="${Qr}"]`)?.content??Z;return qr(o)??Z}const We=ei();function Se(){return We}function ae(o,e=We){return Jr(e,o)}function ti(o,e=We){return Zr(e,o)}function Ls(o,e=We){return e===Z?o:`${o}:base=${encodeURIComponent(e)}`}class Ce extends Error{constructor(e,t,n=null){super(e),this.status=t,this.code=n}status;code}function fo(o){return o instanceof Error&&o.name==="AbortError"}function oi(o){return fo(o)||o instanceof Ce?o:new Ce(k.t("network.requestFailed"),0,"NETWORK_ERROR")}function ni(o){return typeof FormData<"u"&&o instanceof FormData}async function le(o,e={}){const{suppressSessionExpired:t=!1,...n}=e,r=new Headers(n.headers);r.has("Accept-Language")||r.set("Accept-Language",k.resolvedLanguage?.startsWith("zh")?"zh":"en"),n.body&&!ni(n.body)&&!r.has("Content-Type")&&r.set("Content-Type","application/json");let i;try{i=await fetch(ae(o),{...n,headers:r})}catch(l){throw oi(l)}const s=i.headers.get("content-type")??"";let a=null;if(s.includes("application/json"))try{a=await i.json()}catch(l){throw fo(l)?l:new Ce(k.t("network.invalidResponse"),i.status,"INVALID_RESPONSE")}else if(i.ok)throw new Ce(k.t("network.invalidResponse"),i.status,"INVALID_RESPONSE");if(!i.ok)throw i.status===401&&!t&&typeof window<"u"&&window.dispatchEvent(new Event("texlite:session-expired")),new Ce(ri(a,i.status),i.status,ho(a));return a}function ri(o,e,t="errors.request"){const n=typeof o=="object"&&o!==null&&"error"in o&&typeof o.error=="string"?o.error:"",r=ho(o);if(r){const i={AUTH_REQUIRED:"auth.sessionExpired",ADMIN_REQUIRED:"users.adminRequired",HISTORY_VERSION_NOT_FOUND:"apiErrors.historyVersionNotFound",HISTORY_FILE_NOT_FOUND:"apiErrors.historyFileNotFound",HISTORY_OBJECT_MISSING:"apiErrors.historyObjectMissing",HISTORY_TARGET_CONFLICT:"apiErrors.historyTargetConflict",HISTORY_FILE_PREVIEW_UNSUPPORTED:"apiErrors.historyPreviewUnsupported",SEARCH_QUERY_INVALID:"apiErrors.searchInvalid",GIT_UNAVAILABLE:"apiErrors.gitUnavailable",FORMAT_FAILED:"apiErrors.formatFailed",PROJECT_TRANSFER_FORBIDDEN:"projects.transferForbidden",PROJECT_TRANSFER_TARGET_INVALID:"projects.transferTargetInvalid",PROJECT_TRANSFER_SELF:"projects.transferSelf",MAIN_DOCUMENT_INVALID:"apiErrors.mainDocumentInvalid",COMPILE_SNAPSHOT_BUSY:"apiErrors.compileSnapshotBusy",COMPILE_CLEAN_BUSY:"editor.cleanBusy",CITATION_INVALID:"citationErrors.invalid",CITATION_TOO_LARGE:"citationErrors.tooLarge",CITATION_NOT_FOUND:"citationErrors.notFound",CITATION_KEY_EXISTS:"citationErrors.keyExists",CITATION_TAG_NOT_FOUND:"citationErrors.tagNotFound",CITATION_CONFLICT:"citationErrors.conflict",WORD_COUNT_FAILED:"editor.wordCountFailed",WORD_COUNT_SOURCE_INVALID:"editor.wordCountSourceInvalid",WORD_COUNT_SOURCE_TOO_LARGE:"editor.wordCountSourceTooLarge",WORD_COUNT_UNAVAILABLE:"editor.wordCountUnavailable"}[r]??`errors.codes.${r}`;if(k.exists(i))return k.t(i,{status:e,...typeof o=="object"&&o!==null?o:{}})}return n||k.t(t,{status:e})}function ho(o){return typeof o!="object"||o===null||!("code"in o)||typeof o.code!="string"?null:o.code}const ii=/^\/projects?\/([^/]+)\/?$/;function re(o,e,t=Se()){const n=ae(`/project/${encodeURIComponent(o)}`,t);return e?`${n}?${new URLSearchParams({mention:e}).toString()}`:n}function we(o){const e=new URLSearchParams(o).get("mention");return e&&e.length<=128?e:null}function G(o,e=Se()){const t=ti(o,e),n=t?ii.exec(t):null;if(!n)return null;try{const r=decodeURIComponent(n[1]);return r&&!r.includes("/")?r:null}catch{return null}}function si(o,e,t=Se()){const n=new URLSearchParams({return:re(o,e,t)});return ae("/",t)+"?"+n.toString()}function mo(o){const e=new URLSearchParams(o).get("return");if(!e||!e.startsWith("/")||e.startsWith("//"))return null;try{return new URL(e,"https://texlite.invalid")}catch{return null}}function ai(o,e=Se()){const t=mo(o);return t?G(t.pathname,e):null}function li(o,e=Se()){const t=mo(o);return t&&G(t.pathname,e)?we(t.search):null}function Gt(o){if(!o||typeof o!="object")return!1;const e=o;return e.texliteRoute==="project"&&typeof e.projectId=="string"&&typeof e.fromDashboard=="boolean"}const go=()=>ht(()=>import("./PdfPreview-C_W7w360.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),_e=()=>ht(()=>import("./ProjectWorkspace-C6sYiBF2.js").then(o=>o.P),__vite__mapDeps([5,1,6,7,8,9,10]),import.meta.url),Re=new Map,Kt=2e3;function qe(o,e={}){const t=Date.now(),n=Re.get(o);if(!e.force&&n&&t-n.createdAt<Kt)return n.preload;const r=le(`/api/projects/${o}`,{suppressSessionExpired:!0}),i=le(`/api/projects/${o}/compile/latest`,{suppressSessionExpired:!0}),s=go(),a={projectId:o,project:r,latestCompile:i};return Re.set(o,{preload:a,createdAt:t}),r.catch(()=>{}),Promise.all([s,i]).then(([l,c])=>{c.pdfUrl&&l.preloadPdf(c.pdfUrl,c.pdfLoadingMode??"full")}).catch(()=>{}),window.setTimeout(()=>{Re.get(o)?.preload===a&&Re.delete(o)},Kt),a}function yo(o){return o instanceof Error?o.message:k.t("errors.generic")}function wo({compact:o=!1}){const{i18n:e,t}=z(),n=e.resolvedLanguage?.startsWith("zh")?"zh":"en";return h.jsxs("label",{className:`language-switcher${o?" compact":""}`,title:t("common.language"),children:[h.jsx("span",{children:"文/A"}),h.jsxs("select",{value:n,"aria-label":t("common.language"),onChange:r=>{e.changeLanguage(r.target.value)},children:[h.jsx("option",{value:"en",children:t("common.languageEnglish")}),h.jsx("option",{value:"zh",children:t("common.languageChinese")})]})]})}const ci="0.9.4";function vo({siteName:o,compact:e=!1,auth:t=!1}){return h.jsx("span",{className:`site-logo${e?" compact":""}${t?" auth-logo":""}`,children:h.jsx("img",{src:ae("/logo.svg"),alt:o})})}function bo(){const{t:o}=z();return h.jsxs("footer",{className:"site-footer",children:[h.jsx("span",{className:"site-footer-tagline",children:o("footer.tagline")}),h.jsxs("span",{children:[o("footer.copyright",{year:new Date().getFullYear()})," ",h.jsxs("a",{href:"https://github.com/SWUFE-DB-Group/TexLite",target:"_blank",rel:"noreferrer",children:["TexLite v",ci]})]})]})}function di({site:o,user:e,onChanged:t}){const{t:n}=z(),[r,i]=f.useState(""),[s,a]=f.useState(""),[l,c]=f.useState(""),[u,d]=f.useState(""),m=async g=>{if(g.preventDefault(),s!==l)return d(n("auth.mismatch"));if(s.length<o.minPasswordLength)return d(n("auth.passwordMinimum",{count:o.minPasswordLength}));try{await le("/api/me/password",{method:"PUT",body:JSON.stringify({currentPassword:r,newPassword:s})}),t({...e,mustChangePassword:!1})}catch(p){d(yo(p))}};return h.jsxs("main",{className:"login-page",children:[h.jsx(wo,{}),h.jsxs("form",{className:"login-card",onSubmit:m,children:[h.jsx(vo,{siteName:o.siteName,auth:!0}),h.jsx("h1",{className:"sr-only",children:o.siteName}),h.jsx("p",{className:"muted",children:n("auth.firstLogin")}),h.jsxs("label",{children:[n("auth.currentPassword"),h.jsx("input",{type:"password",value:r,onChange:g=>i(g.target.value)})]}),h.jsxs("label",{children:[n("auth.newPassword"),h.jsx("input",{type:"password",minLength:o.minPasswordLength,autoComplete:"new-password",value:s,onChange:g=>a(g.target.value)}),h.jsx("small",{className:"field-hint",children:n("auth.passwordMinimum",{count:o.minPasswordLength})})]}),h.jsxs("label",{children:[n("auth.confirmPassword"),h.jsx("input",{type:"password",minLength:o.minPasswordLength,autoComplete:"new-password",value:l,onChange:g=>c(g.target.value)})]}),u&&h.jsx("p",{className:"error",children:u}),h.jsx("button",{className:"primary",children:n("auth.updatePassword")})]}),h.jsx(bo,{})]})}function ui({site:o,onLogin:e}){const{t}=z(),[n,r]=f.useState(""),[i,s]=f.useState(""),[a,l]=f.useState(""),c=async u=>{u.preventDefault(),l("");try{const d=await le("/api/auth/login",{method:"POST",body:JSON.stringify({username:n,password:i}),suppressSessionExpired:!0});e(d.user)}catch(d){l(yo(d))}};return h.jsxs("main",{className:"login-page",children:[h.jsx(wo,{}),h.jsxs("form",{className:"login-card",onSubmit:c,children:[h.jsx(vo,{siteName:o.siteName,auth:!0}),h.jsx("h1",{className:"sr-only",children:o.siteName}),h.jsx("p",{className:"muted",children:t("auth.tagline")}),h.jsxs("label",{children:[t("auth.username"),h.jsx("input",{autoFocus:!0,value:n,onChange:u=>r(u.target.value)})]}),h.jsxs("label",{children:[t("auth.password"),h.jsx("input",{type:"password",value:i,onChange:u=>s(u.target.value)})]}),a&&h.jsx("p",{className:"error",children:a}),h.jsx("button",{className:"primary",type:"submit",children:t("auth.login")}),o.adminEmail&&h.jsx("small",{className:"support",children:t("auth.contact",{email:o.adminEmail})})]}),h.jsx(bo,{})]})}const pi=o=>o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Co=(...o)=>o.filter((e,t,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===t).join(" ").trim();var fi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const hi=f.forwardRef(({color:o="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:n,className:r="",children:i,iconNode:s,...a},l)=>f.createElement("svg",{ref:l,...fi,width:e,height:e,stroke:o,strokeWidth:n?Number(t)*24/Number(e):t,className:Co("lucide",r),...a},[...s.map(([c,u])=>f.createElement(c,u)),...Array.isArray(i)?i:[i]]));const mi=(o,e)=>{const t=f.forwardRef(({className:n,...r},i)=>f.createElement(hi,{ref:i,iconNode:e,className:Co(`lucide-${pi(o)}`,n),...r}));return t.displayName=`${o}`,t};const To=mi("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var gi=Object.defineProperty,ue=(o,e)=>gi(o,"name",{value:e,configurable:!0}),xo=!!(typeof window<"u"&&window.document&&window.document.createElement);function K(o,e,{checkForDefaultPrevented:t=!0}={}){return ue(function(r){if(o?.(r),t===!1||!r||!r.defaultPrevented)return e?.(r)},"handleEvent")}ue(K,"composeEventHandlers");function yi(o){if(!xo)throw new Error("Cannot access window outside of the DOM");return o?.ownerDocument?.defaultView??window}ue(yi,"getOwnerWindow");function nt(o){if(!xo)throw new Error("Cannot access document outside of the DOM");return o?.ownerDocument??document}ue(nt,"getOwnerDocument");function Do(o,e=!1){const{activeElement:t}=nt(o);if(!t?.nodeName)return null;if(So(t)&&t.contentDocument)return Do(t.contentDocument.body,e);if(e){const n=t.getAttribute("aria-activedescendant");if(n){const r=nt(t).getElementById(n);if(r)return r}}return t}ue(Do,"getActiveElement");function So(o){return o.tagName==="IFRAME"}ue(So,"isFrame");var wi=Object.defineProperty,mt=(o,e)=>wi(o,"name",{value:e,configurable:!0});function rt(o,e){if(typeof o=="function")return o(e);o!=null&&(o.current=e)}mt(rt,"setRef");function Eo(...o){return e=>{let t=!1;const n=o.map(r=>{const i=rt(r,e);return!t&&typeof i=="function"&&(t=!0),i});if(t)return()=>{for(let r=0;r<n.length;r++){const i=n[r];typeof i=="function"?i():rt(o[r],null)}}}}mt(Eo,"composeRefs");function pe(...o){return f.useCallback(Eo(...o),o)}mt(pe,"useComposedRefs");var vi=Object.defineProperty,_=(o,e)=>vi(o,"name",{value:e,configurable:!0});function bi(o,e){const t=f.createContext(e);t.displayName=o+"Context";const n=_(i=>{const{children:s,...a}=i,l=f.useMemo(()=>a,Object.values(a));return h.jsx(t.Provider,{value:l,children:s})},"Provider");n.displayName=o+"Provider";function r(i,s={}){const{optional:a=!1}=s,l=f.useContext(t);if(l)return l;if(e!==void 0)return e;if(!a)throw new Error(`\`${i}\` must be used within \`${o}\``)}return _(r,"useContext"),[n,r]}_(bi,"createContext");function ko(o,e=[]){let t=[];function n(i,s){const a=f.createContext(s);a.displayName=i+"Context";const l=t.length;t=[...t,s];const c=_(d=>{const{scope:m,children:g,...p}=d,v=m?.[o]?.[l]||a,b=f.useMemo(()=>p,Object.values(p));return h.jsx(v.Provider,{value:b,children:g})},"Provider");c.displayName=i+"Provider";function u(d,m,g={}){const{optional:p=!1}=g,v=m?.[o]?.[l]||a,b=f.useContext(v);if(b)return b;if(s!==void 0)return s;if(!p)throw new Error(`\`${d}\` must be used within \`${i}\``)}return _(u,"useContext"),[c,u]}_(n,"createContext");const r=_(()=>{const i=t.map(s=>f.createContext(s));return _(function(a){const l=a?.[o]||i;return f.useMemo(()=>({[`__scope${o}`]:{...a,[o]:l}}),[a,l])},"useScope")},"createScope");return r.scopeName=o,[n,Po(r,...e)]}_(ko,"createContextScope");function Po(...o){const e=o[0];if(o.length===1)return e;const t=_(()=>{const n=o.map(r=>({useScope:r(),scopeName:r.scopeName}));return _(function(i){const s=n.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return f.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return t.scopeName=e.scopeName,t}_(Po,"composeContextScopes");var Y=globalThis?.document?f.useLayoutEffect:()=>{},Ci=Object.defineProperty,Ti=(o,e)=>Ci(o,"name",{value:e,configurable:!0}),xi=De[" useId ".trim().toString()]||(()=>{}),Di=0;function Me(o){const[e,t]=f.useState(xi());return Y(()=>{o||t(n=>n??String(Di++))},[o]),o||(e?`radix-${e}`:"")}Ti(Me,"useId");var Si=Object.defineProperty,Ei=(o,e)=>Si(o,"name",{value:e,configurable:!0}),Yt=De[" useEffectEvent ".trim().toString()],qt=De[" useInsertionEffect ".trim().toString()];function Oo(o){if(typeof Yt=="function")return Yt(o);const e=f.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof qt=="function"?qt(()=>{e.current=o}):Y(()=>{e.current=o}),f.useMemo(()=>((...t)=>e.current?.(...t)),[])}Ei(Oo,"useEffectEvent");var ki=Object.defineProperty,Ee=(o,e)=>ki(o,"name",{value:e,configurable:!0}),Pi=De[" useInsertionEffect ".trim().toString()]||Y;function Ro({prop:o,defaultProp:e,onChange:t=Ee(()=>{},"onChange"),caller:n}){const[r,i,s]=Fo({defaultProp:e,onChange:t}),a=o!==void 0,l=a?o:r,c=f.useCallback(u=>{if(a){const d=Lo(u)?u(o):u;d!==o&&s.current?.(d)}else i(u)},[a,o,i,s]);return[l,c]}Ee(Ro,"useControllableState");function Fo({defaultProp:o,onChange:e}){const[t,n]=f.useState(o),r=f.useRef(t),i=f.useRef(e);return Pi(()=>{i.current=e},[e]),f.useEffect(()=>{r.current!==t&&(i.current?.(t),r.current=t)},[t,r]),[t,n,i]}Ee(Fo,"useUncontrolledState");function Lo(o){return typeof o=="function"}Ee(Lo,"isFunction");var Jt=Symbol("RADIX:SYNC_STATE");function Oi(o,e,t,n){const{prop:r,defaultProp:i,onChange:s,caller:a}=e,l=r!==void 0,c=Oo(s),u=[{...t,state:i}];n&&u.push(n);const[d,m]=f.useReducer((b,S)=>{if(S.type===Jt)return{...b,state:S.state};const T=o(b,S);return l&&!Object.is(T.state,b.state)&&c(T.state),T},...u),g=d.state,p=f.useRef(g);f.useEffect(()=>{p.current!==g&&(p.current=g,l||c(g))},[g,p,l]);const v=f.useMemo(()=>r!==void 0?{...d,state:r}:d,[d,r]);return f.useEffect(()=>{l&&!Object.is(r,d.state)&&m({type:Jt,state:r})},[r,d.state,l]),[v,m]}Ee(Oi,"useControllableStateReducer");var Ri=Object.defineProperty,U=(o,e)=>Ri(o,"name",{value:e,configurable:!0});function gt(o){const e=f.forwardRef((t,n)=>{let{children:r,...i}=t,s=null,a=!1;const l=[];it(r)&&typeof Fe=="function"&&(r=Fe(r._payload)),f.Children.forEach(r,m=>{if(Ao(m)){a=!0;const g=m;let p="child"in g.props?g.props.child:g.props.children;it(p)&&typeof Fe=="function"&&(p=Fe(p._payload)),s=Li(g,p),l.push(s?.props?.children)}else l.push(m)}),s?s=f.cloneElement(s,void 0,l):!a&&f.Children.count(r)===1&&f.isValidElement(r)&&(s=r);const c=s?jo(s):void 0,u=pe(n,c);if(!s){if(r||r===0)throw new Error(a?ji(o):Ii(o));return r}const d=Io(i,s.props??{});return s.type!==f.Fragment&&(d.ref=n?u:c),f.cloneElement(s,d)});return e.displayName=`${o}.Slot`,e}U(gt,"createSlot");var No=Symbol.for("radix.slottable");function Fi(o){const e=U(t=>"child"in t?t.children(t.child):t.children,"Slottable");return e.displayName=`${o}.Slottable`,e.__radixId=No,e}U(Fi,"createSlottable");var Li=U((o,e)=>{if("child"in o.props){const t=o.props.child;return f.isValidElement(t)?f.cloneElement(t,void 0,o.props.children(t.props.children)):null}return f.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function Io(o,e){const t={...e};for(const n in e){const r=o[n],i=e[n];/^on[A-Z]/.test(n)?r&&i?t[n]=(...a)=>{const l=i(...a);return r(...a),l}:r&&(t[n]=r):n==="style"?t[n]={...r,...i}:n==="className"&&(t[n]=[r,i].filter(Boolean).join(" "))}return{...o,...t}}U(Io,"mergeProps");function jo(o){let e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?o.ref:(e=Object.getOwnPropertyDescriptor(o,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?o.props.ref:o.props.ref||o.ref)}U(jo,"getElementRef");function Ao(o){return f.isValidElement(o)&&typeof o.type=="function"&&"__radixId"in o.type&&o.type.__radixId===No}U(Ao,"isSlottable");var Ni=Symbol.for("react.lazy");function it(o){return o!=null&&typeof o=="object"&&"$$typeof"in o&&o.$$typeof===Ni&&"_payload"in o&&_o(o._payload)}U(it,"isLazyComponent");function _o(o){return typeof o=="object"&&o!==null&&"then"in o}U(_o,"isPromiseLike");var Ii=U(o=>`${o} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ji=U(o=>`${o} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Fe=De[" use ".trim().toString()],Ai=Object.defineProperty,_i=(o,e)=>Ai(o,"name",{value:e,configurable:!0}),Mi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Q=Mi.reduce((o,e)=>{const t=gt(`Primitive.${e}`),n=f.forwardRef((r,i)=>{const{asChild:s,...a}=r,l=s?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...o,[e]:n}},{});function Mo(o,e){o&&no.flushSync(()=>o.dispatchEvent(e))}_i(Mo,"dispatchDiscreteCustomEvent");var Ui=Object.defineProperty,$i=(o,e)=>Ui(o,"name",{value:e,configurable:!0});function ce(o){const e=f.useRef(o);return f.useEffect(()=>{e.current=o}),f.useMemo(()=>((...t)=>e.current?.(...t)),[])}$i(ce,"useCallbackRef");var Bi=Object.defineProperty,R=(o,e)=>Bi(o,"name",{value:e,configurable:!0}),st="dismissableLayer.update",Hi="dismissableLayer.pointerDownOutside",Vi="dismissableLayer.focusOutside",Zt,Uo=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Wi=f.forwardRef(R(function(e,t){const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=e,d=f.useContext(Uo),[m,g]=f.useState(null),p=m?.ownerDocument??globalThis?.document,[,v]=f.useState({}),b=pe(t,g),S=Array.from(d.layers),[T]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=T?S.indexOf(T):-1,C=m?S.indexOf(m):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,D=C>=y,E=f.useRef(!1),F=Bo(P=>{s?.(P),l?.(P),P.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:f.useCallback(P=>{if(!(P instanceof Node))return!1;const O=[...d.branches].some(j=>j.contains(P));return D&&!O},[d.branches,D])}),I=Ho(P=>{if(r&&E.current)return;const O=P.target;[...d.branches].some(ke=>ke.contains(O))||(a?.(P),l?.(P),P.defaultPrevented||c?.())},p),L=m?C===S.length-1:!1,fe=ce(P=>{P.key==="Escape"&&(i?.(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))});return f.useEffect(()=>{if(L)return p.addEventListener("keydown",fe,{capture:!0}),()=>p.removeEventListener("keydown",fe,{capture:!0})},[p,L,fe]),f.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Zt=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),at(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(m),d.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Zt))}},[m,p,n,d]),f.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),at())},[m,d]),f.useEffect(()=>{const P=R(()=>v({}),"handleUpdate");return document.addEventListener(st,P),()=>document.removeEventListener(st,P)},[]),h.jsx(Q.div,{...u,ref:b,style:{pointerEvents:w?D?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,I.onFocusCapture),onBlurCapture:K(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,F.onPointerDownCapture)})},"DismissableLayer"));function $o(){const o=f.useContext(Uo),[e,t]=f.useState(null);return f.useEffect(()=>{if(e)return o.dismissableSurfaces.add(e),()=>{o.dismissableSurfaces.delete(e)}},[e,o.dismissableSurfaces]),t}R($o,"useDismissableLayerSurface");var Xi=R(()=>!0,"IS_TRUE");function Bo(o,e){const{ownerDocument:t=globalThis?.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:i,shouldHandlePointerDownOutside:s=Xi}=e,a=ce(o),l=f.useRef(!1),c=f.useRef(!1),u=f.useRef(new Map),d=f.useRef(()=>{});return f.useEffect(()=>{function m(){c.current=!1,r.current=!1,u.current.clear()}R(m,"resetOutsideInteraction");function g(){return Array.from(u.current.values()).some(Boolean)}R(g,"isOutsideInteractionIntercepted");function p(y){if(!c.current)return;const C=y.target;C instanceof Node&&[...i].some(D=>D.contains(C))||u.current.set(y.type,!0),y.type==="click"&&window.setTimeout(()=>{c.current&&d.current()},0)}R(p,"handleInteractionCapture");function v(y){c.current&&u.current.set(y.type,!1)}R(v,"handleInteractionBubble");const b=R(y=>{if(y.target&&!l.current){let C=function(){t.removeEventListener("click",d.current);const D=g();m(),D||yt(Hi,a,w,{discrete:!0})};if(R(C,"handleAndDispatchPointerDownOutsideEvent"),!s(y.target)){t.removeEventListener("click",d.current),m(),l.current=!1;return}const w={originalEvent:y};c.current=!0,r.current=n&&y.button===0,u.current.clear(),!n||y.button!==0?C():(t.removeEventListener("click",d.current),d.current=C,t.addEventListener("click",d.current,{once:!0}))}else t.removeEventListener("click",d.current),m();l.current=!1},"handlePointerDown"),S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const y of S)t.addEventListener(y,p,!0),t.addEventListener(y,v);const T=window.setTimeout(()=>{t.addEventListener("pointerdown",b)},0);return()=>{window.clearTimeout(T),t.removeEventListener("pointerdown",b),t.removeEventListener("click",d.current);for(const y of S)t.removeEventListener(y,p,!0),t.removeEventListener(y,v)}},[t,a,n,r,i,s]),{onPointerDownCapture:R(()=>l.current=!0,"onPointerDownCapture")}}R(Bo,"usePointerDownOutside");function Ho(o,e=globalThis?.document){const t=ce(o),n=f.useRef(!1);return f.useEffect(()=>{const r=R(i=>{i.target&&!n.current&&yt(Vi,t,{originalEvent:i},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,t]),{onFocusCapture:R(()=>n.current=!0,"onFocusCapture"),onBlurCapture:R(()=>n.current=!1,"onBlurCapture")}}R(Ho,"useFocusOutside");function at(){const o=new CustomEvent(st);document.dispatchEvent(o)}R(at,"dispatchUpdate");function yt(o,e,t,{discrete:n}){const r=t.originalEvent.target,i=new CustomEvent(o,{bubbles:!1,cancelable:!0,detail:t});e&&r.addEventListener(o,e,{once:!0}),n?Mo(r,i):r.dispatchEvent(i)}R(yt,"handleAndDispatchCustomEvent");var zi=Object.defineProperty,N=(o,e)=>zi(o,"name",{value:e,configurable:!0}),Je="focusScope.autoFocusOnMount",Ze="focusScope.autoFocusOnUnmount",Qt={bubbles:!1,cancelable:!0},Gi=f.forwardRef(N(function(e,t){const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[l,c]=f.useState(null),u=ce(i),d=ce(s),m=f.useRef(null),g=pe(t,c),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let b=function(C){if(p.paused||!l)return;const w=C.target;l.contains(w)?m.current=w:W(m.current,{select:!0})},S=function(C){if(p.paused||!l)return;const w=C.relatedTarget;w!==null&&(l.contains(w)||W(m.current,{select:!0}))},T=function(C){if(document.activeElement===document.body)for(const D of C)D.removedNodes.length>0&&W(l)};N(b,"handleFocusIn"),N(S,"handleFocusOut"),N(T,"handleMutations"),document.addEventListener("focusin",b),document.addEventListener("focusout",S);const y=new MutationObserver(T);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",S),y.disconnect()}}},[r,l,p.paused]),f.useEffect(()=>{if(l){eo.add(p);const b=document.activeElement;if(!l.contains(b)){const T=new CustomEvent(Je,Qt);l.addEventListener(Je,u),l.dispatchEvent(T),T.defaultPrevented||(Vo(Ko(wt(l)),{select:!0}),document.activeElement===b&&W(l))}return()=>{l.removeEventListener(Je,u),setTimeout(()=>{const T=new CustomEvent(Ze,Qt);l.addEventListener(Ze,d),l.dispatchEvent(T),T.defaultPrevented||W(b??document.body,{select:!0}),l.removeEventListener(Ze,d),eo.remove(p)},0)}}},[l,u,d,p]);const v=f.useCallback(b=>{if(!n&&!r||p.paused)return;const S=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,T=document.activeElement;if(S&&T){const y=b.currentTarget,[C,w]=Wo(y);C&&w?!b.shiftKey&&T===w?(b.preventDefault(),n&&W(C,{select:!0})):b.shiftKey&&T===C&&(b.preventDefault(),n&&W(w,{select:!0})):T===y&&b.preventDefault()}},[n,r,p.paused]);return h.jsx(Q.div,{tabIndex:-1,...a,ref:g,onKeyDown:v})},"FocusScope"));function Vo(o,{select:e=!1}={}){const t=document.activeElement;for(const n of o)if(W(n,{select:e}),document.activeElement!==t)return}N(Vo,"focusFirst");function Wo(o){const e=wt(o),t=lt(e,o),n=lt(e.reverse(),o);return[t,n]}N(Wo,"getTabbableEdges");function wt(o){const e=[],t=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:N(n=>{const r=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||r?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;t.nextNode();)e.push(t.currentNode);return e}N(wt,"getTabbableCandidates");function lt(o,e){const t=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const n of o)if(!(t?!n.checkVisibility({checkVisibilityCSS:!0}):Xo(n,{upTo:e})))return n}N(lt,"findVisible");function Xo(o,{upTo:e}){if(getComputedStyle(o).visibility==="hidden")return!0;for(;o;){if(e!==void 0&&o===e)return!1;if(getComputedStyle(o).display==="none")return!0;o=o.parentElement}return!1}N(Xo,"isHidden");function zo(o){return o instanceof HTMLInputElement&&"select"in o}N(zo,"isSelectableInput");function W(o,{select:e=!1}={}){if(o&&o.focus){const t=document.activeElement;o.focus({preventScroll:!0}),o!==t&&zo(o)&&e&&o.select()}}N(W,"focus");var eo=Go();function Go(){let o=[];return{add(e){const t=o[0];e!==t&&t?.pause(),o=ct(o,e),o.unshift(e)},remove(e){o=ct(o,e),o[0]?.resume()}}}N(Go,"createFocusScopesStack");function ct(o,e){const t=[...o],n=t.indexOf(e);return n!==-1&&t.splice(n,1),t}N(ct,"arrayRemove");function Ko(o){return o.filter(e=>e.tagName!=="A")}N(Ko,"removeLinks");var Ki=Object.defineProperty,Yi=(o,e)=>Ki(o,"name",{value:e,configurable:!0}),qi=f.forwardRef(Yi(function(e,t){const{container:n,...r}=e,[i,s]=f.useState(!1);Y(()=>s(!0),[]);const a=n||i&&globalThis?.document?.body;return a?no.createPortal(h.jsx(Q.div,{...r,ref:t}),a):null},"Portal")),Ji=Object.defineProperty,X=(o,e)=>Ji(o,"name",{value:e,configurable:!0});function Yo(o,e){return f.useReducer((t,n)=>e[t][n]??t,o)}X(Yo,"useStateMachine");var vt=X(o=>{const{present:e,children:t}=o,n=qo(e),r=typeof t=="function"?t({present:n.isPresent}):f.Children.only(t),i=Jo(n.ref,Zo(r));return typeof t=="function"||n.isPresent?f.cloneElement(r,{ref:i}):null},"Presence");function qo(o){const[e,t]=f.useState(),n=f.useRef(null),r=f.useRef(o),i=f.useRef("none"),s=f.useRef(void 0),a=o?"mounted":"unmounted",[l,c]=Yo(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{l==="mounted"?(i.current=s.current??ie(n.current),s.current=void 0):i.current="none"},[l]),Y(()=>{const u=n.current,d=r.current;if(d!==o){const g=i.current,p=ie(u);o?(s.current=p,c("MOUNT")):p==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&g!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=o}},[o,c]),Y(()=>{if(e){let u;const d=e.ownerDocument.defaultView??window,m=X(p=>{const b=ie(n.current).includes(CSS.escape(p.animationName));if(p.target===e&&b&&(c("ANIMATION_END"),!r.current)){const S=e.style.animationFillMode;e.style.animationFillMode="forwards",u=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=S)})}},"handleAnimationEnd"),g=X(p=>{p.target===e&&(i.current=ie(n.current))},"handleAnimationStart");return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{d.clearTimeout(u),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{if(u){const d=getComputedStyle(u);n.current=d,s.current=ie(d)}else n.current=null;t(u)},[])}}X(qo,"usePresence");function dt(o,e){if(typeof o=="function")return o(e);o!=null&&(o.current=e)}X(dt,"setRef");function Jo(...o){const e=f.useRef(o);return e.current=o,f.useCallback(t=>{const n=e.current;let r=!1;const i=n.map(s=>{const a=dt(s,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<i.length;s++){const a=i[s];typeof a=="function"?a():dt(n[s],null)}}},[])}X(Jo,"useStableComposedRefs");function ie(o){return o?.animationName||"none"}X(ie,"getAnimationName");function Zo(o){let e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?o.ref:(e=Object.getOwnPropertyDescriptor(o,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?o.props.ref:o.props.ref||o.ref)}X(Zo,"getElementRef");var Zi=Object.defineProperty,bt=(o,e)=>Zi(o,"name",{value:e,configurable:!0}),Le=0,oe=null;function Qi(o){return Ct(),o.children}bt(Qi,"FocusGuards");function Ct(){f.useEffect(()=>{oe||(oe={start:ut(),end:ut()});const{start:o,end:e}=oe;return document.body.firstElementChild!==o&&document.body.insertAdjacentElement("afterbegin",o),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),Le++,()=>{Le===1&&(oe?.start.remove(),oe?.end.remove(),oe=null),Le=Math.max(0,Le-1)}},[])}bt(Ct,"useFocusGuards");function ut(){const o=document.createElement("span");return o.setAttribute("data-radix-focus-guard",""),o.tabIndex=0,o.style.outline="none",o.style.opacity="0",o.style.position="fixed",o.style.pointerEvents="none",o}bt(ut,"createFocusGuard");var es=function(o){if(typeof document>"u")return null;var e=Array.isArray(o)?o[0]:o;return e.ownerDocument.body},ne=new WeakMap,Ne=new WeakMap,Ie={},Qe=0,Qo=function(o){return o&&(o.host||Qo(o.parentNode))},ts=function(o,e){return e.map(function(t){if(o.contains(t))return t;var n=Qo(t);return n&&o.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",o,". Doing nothing"),null)}).filter(function(t){return!!t})},os=function(o,e,t,n){var r=ts(e,Array.isArray(o)?o:[o]);Ie[t]||(Ie[t]=new WeakMap);var i=Ie[t],s=[],a=new Set,l=new Set(r),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};r.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(m){if(a.has(m))u(m);else try{var g=m.getAttribute(n),p=g!==null&&g!=="false",v=(ne.get(m)||0)+1,b=(i.get(m)||0)+1;ne.set(m,v),i.set(m,b),s.push(m),v===1&&p&&Ne.set(m,!0),b===1&&m.setAttribute(t,"true"),p||m.setAttribute(n,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return u(e),a.clear(),Qe++,function(){s.forEach(function(d){var m=ne.get(d)-1,g=i.get(d)-1;ne.set(d,m),i.set(d,g),m||(Ne.has(d)||d.removeAttribute(n),Ne.delete(d)),g||d.removeAttribute(t)}),Qe--,Qe||(ne=new WeakMap,ne=new WeakMap,Ne=new WeakMap,Ie={})}},ns=function(o,e,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(o)?o:[o]),r=es(o);return r?(n.push.apply(n,Array.from(r.querySelectorAll("[aria-live], script"))),os(n,r,t,"aria-hidden")):function(){return null}},rs=Object.defineProperty,M=(o,e)=>rs(o,"name",{value:e,configurable:!0}),Tt="Dialog",[en,Ns]=ko(Tt),[is,H]=en(Tt),ss=M(o=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:r,onOpenChange:i,modal:s=!0}=o,a=f.useRef(null),l=f.useRef(null),[c,u]=Ro({prop:n,defaultProp:r??!1,onChange:i,caller:Tt}),[d,m]=f.useState(0),[g,p]=f.useState(0);return h.jsx(is,{scope:e,triggerRef:a,contentRef:l,contentId:Me(),titleId:Me(),descriptionId:Me(),titlePresent:d>0,descriptionPresent:g>0,setTitleCount:m,setDescriptionCount:p,open:c,onOpenChange:u,onOpenToggle:f.useCallback(()=>u(v=>!v),[u]),modal:s,children:t})},"Dialog"),tn="DialogPortal",[as,on]=en(tn,{forceMount:void 0}),ls=M(o=>{const{__scopeDialog:e,forceMount:t,children:n,container:r}=o,i=H(tn,e);return h.jsx(as,{scope:e,forceMount:t,children:f.Children.map(n,s=>h.jsx(vt,{present:t||i.open,children:h.jsx(qi,{asChild:!0,container:r,children:s})}))})},"DialogPortal"),pt="DialogOverlay",cs=f.forwardRef(M(function(e,t){const n=on(pt,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=H(pt,e.__scopeDialog);return s.modal?h.jsx(vt,{present:r||s.open,children:h.jsx(us,{...i,ref:t})}):null},"DialogOverlay")),ds=gt("DialogOverlay.RemoveScroll"),us=f.forwardRef(M(function(e,t){const{__scopeDialog:n,...r}=e,i=H(pt,n),s=$o(),a=pe(t,s);return h.jsx(an,{as:ds,allowPinchZoom:!0,shards:[i.contentRef],children:h.jsx(Q.div,{"data-state":xt(i.open),...r,ref:a,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),xe="DialogContent",ps=f.forwardRef(M(function(e,t){const n=on(xe,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=H(xe,e.__scopeDialog);return h.jsx(vt,{present:r||s.open,children:s.modal?h.jsx(fs,{...i,ref:t}):h.jsx(hs,{...i,ref:t})})},"DialogContent")),fs=f.forwardRef(M(function(e,t){const n=H(xe,e.__scopeDialog),r=f.useRef(null),i=pe(t,n.contentRef,r);return f.useEffect(()=>{const s=r.current;if(s)return ns(s)},[]),h.jsx(nn,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&s.preventDefault()}),onFocusOutside:K(e.onFocusOutside,s=>s.preventDefault())})},"DialogContentModal")),hs=f.forwardRef(M(function(e,t){const n=H(xe,e.__scopeDialog),r=f.useRef(!1),i=f.useRef(!1);return h.jsx(nn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})},"DialogContentNonModal")),nn=f.forwardRef(M(function(e,t){const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,l=H(xe,n);return Ct(),h.jsx(h.Fragment,{children:h.jsx(Gi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:h.jsx(Wi,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":xt(l.open),...a,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),ms="DialogTitle",gs=f.forwardRef(M(function(e,t){const{__scopeDialog:n,...r}=e,i=H(ms,n),{setTitleCount:s}=i;return Y(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),h.jsx(Q.h2,{id:i.titleId,...r,ref:t})},"DialogTitle")),ys="DialogDescription",ws=f.forwardRef(M(function(e,t){const{__scopeDialog:n,...r}=e,i=H(ys,n),{setDescriptionCount:s}=i;return Y(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),h.jsx(Q.p,{id:i.descriptionId,...r,ref:t})},"DialogDescription")),vs="DialogClose",bs=f.forwardRef(M(function(e,t){const{__scopeDialog:n,...r}=e,i=H(vs,n);return h.jsx(Q.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>i.onOpenChange(!1))})},"DialogClose"));function xt(o){return o?"open":"closed"}M(xt,"getState");function Dt({open:o,title:e,description:t,onOpenChange:n,children:r,footer:i,wide:s,extraWide:a,className:l,draggable:c=!1}){const{t:u}=z(),d=f.useRef(null),m=f.useRef(null),[g,p]=f.useState({x:0,y:0}),[v,b]=f.useState(!1);f.useEffect(()=>{o||(m.current=null,b(!1),p({x:0,y:0}))},[o]);const S=w=>{!c||w.button!==0||w.pointerType==="touch"||Cs(w.target)||(m.current={pointerId:w.pointerId,clientX:w.clientX,clientY:w.clientY,...g},w.currentTarget.setPointerCapture(w.pointerId),b(!0),w.preventDefault())},T=w=>{const D=m.current;if(!D||D.pointerId!==w.pointerId)return;const E=d.current;if(!E)return;const F=E.getBoundingClientRect(),I=Math.max(0,(window.innerWidth-F.width)/2-12),L=Math.max(0,(window.innerHeight-F.height)/2-12);p({x:to(D.x+w.clientX-D.clientX,-I,I),y:to(D.y+w.clientY-D.clientY,-L,L)})},y=w=>{m.current?.pointerId===w.pointerId&&(m.current=null,b(!1),w.currentTarget.hasPointerCapture(w.pointerId)&&w.currentTarget.releasePointerCapture(w.pointerId))},C=c?{"--dialog-drag-x":`${g.x}px`,"--dialog-drag-y":`${g.y}px`}:void 0;return h.jsx(ss,{open:o,onOpenChange:n,children:h.jsxs(ls,{children:[h.jsx(cs,{className:"dialog-overlay"}),h.jsxs(ps,{ref:d,style:C,"data-dragging":v||void 0,className:`dialog-content${s?" dialog-wide":""}${a?" dialog-extra-wide":""}${c?" dialog-draggable":""}${l?` ${l}`:""}`,children:[h.jsxs("div",{className:`dialog-header${c?" dialog-drag-handle":""}`,onPointerDown:S,onPointerMove:T,onPointerUp:y,onPointerCancel:y,onLostPointerCapture:y,children:[h.jsxs("div",{children:[h.jsx(gs,{children:e}),t&&h.jsx(ws,{children:t})]}),h.jsx(bs,{className:"dialog-close","aria-label":u("common.close"),children:"×"})]}),h.jsx("div",{className:"dialog-body",children:r}),i&&h.jsx("div",{className:"dialog-footer",children:i})]})]})})}function Cs(o){return o instanceof Element&&!!o.closest("button, a, input, select, textarea, [data-dialog-no-drag]")}function to(o,e,t){return Math.max(e,Math.min(t,o))}function Is({open:o,title:e,description:t,confirmLabel:n,danger:r,onCancel:i,onConfirm:s,error:a,busy:l=!1}){const{t:c}=z();return h.jsx(Dt,{open:o,title:e,description:t,onOpenChange:u=>{!u&&!l&&i()},footer:h.jsxs(h.Fragment,{children:[h.jsx("button",{disabled:l,onClick:i,children:c("common.cancel")}),h.jsxs("button",{className:r?"danger":"primary",disabled:l,"aria-busy":l,onClick:s,children:[l&&h.jsx(To,{className:"spin",size:14}),n??c("common.remove")]})]}),children:h.jsxs(h.Fragment,{children:[a&&h.jsx("p",{className:"error dialog-error",children:a}),h.jsx("div",{})]})})}class Xe extends f.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("Uncaught error in component tree:",e,t)}handleReset=()=>{this.setState({hasError:!1,error:null}),this.props.onReset?.()};render(){return this.state.hasError?typeof this.props.fallback=="function"?this.props.fallback(this.state.error??new Error("Unknown error"),this.handleReset):this.props.fallback?this.props.fallback:h.jsxs("div",{role:"alert",style:{padding:"2rem",margin:"1rem",borderRadius:"8px",backgroundColor:"var(--bg-secondary, #f8f9fa)",border:"1px solid var(--border-color, #e9ecef)",color:"var(--text-primary, #212529)",fontFamily:"system-ui, -apple-system, sans-serif"},children:[h.jsx("h2",{style:{fontSize:"1.25rem",fontWeight:600,marginBottom:"0.5rem",color:"#dc3545"},children:this.props.title??k.t("errors.boundaryTitle")}),h.jsx("p",{style:{fontSize:"0.9rem",color:"var(--text-secondary, #6c757d)",marginBottom:"1rem"},children:k.t("errors.boundaryDescription")}),h.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[h.jsx("button",{type:"button",onClick:this.handleReset,className:"primary",style:{padding:"0.4rem 0.8rem",borderRadius:"4px",cursor:"pointer"},children:k.t("errors.boundaryRetry")}),h.jsx("button",{type:"button",onClick:()=>window.location.reload(),style:{padding:"0.4rem 0.8rem",borderRadius:"4px",cursor:"pointer"},children:k.t("errors.boundaryReload")})]})]}):this.props.children}}function St({compact:o=!1}){const{t:e}=z();return h.jsxs("div",{className:`lazy-load-state${o?" compact":""}`,role:"status","aria-live":"polite",children:[h.jsx(To,{className:"spin",size:o?15:18}),h.jsx("span",{children:e("common.loading")})]})}function Et({onClose:o,compact:e=!1}){const{t}=z();return h.jsxs("div",{className:`lazy-load-state lazy-load-error${e?" compact":""}`,role:"alert",children:[h.jsx("span",{children:t("errors.boundaryDescription")}),h.jsxs("div",{className:"lazy-load-actions",children:[o&&h.jsx("button",{type:"button",onClick:o,children:t("common.close")}),h.jsx("button",{type:"button",className:"primary",onClick:()=>window.location.reload(),children:t("common.reload")})]})]})}function Ts({title:o,onClose:e}){return h.jsx(Dt,{open:!0,title:o,onOpenChange:t=>{t||e()},children:h.jsx(Et,{onClose:e})})}function oo({children:o,onClose:e}){return h.jsx(Xe,{fallback:h.jsx(Et,{onClose:e}),children:h.jsx(f.Suspense,{fallback:h.jsx(St,{}),children:o})})}function js({title:o,onClose:e,children:t}){const n=h.jsx(Dt,{open:!0,title:o,onOpenChange:i=>{i||e()},children:h.jsx(St,{})}),r=h.jsx(Ts,{title:o,onClose:e});return h.jsx(Xe,{fallback:r,children:h.jsx(f.Suspense,{fallback:n,children:t})})}function As({children:o,onClose:e}){return h.jsx(Xe,{fallback:h.jsx(Et,{onClose:e,compact:!0}),children:h.jsx(f.Suspense,{fallback:h.jsx(St,{compact:!0}),children:o})})}const rn=()=>ht(()=>import("./Dashboard-JA5_M3TK.js").then(o=>o.D),__vite__mapDeps([11,1,12,7,13,14]),import.meta.url),xs=f.lazy(()=>rn().then(o=>({default:o.Dashboard}))),Ds=f.lazy(()=>_e().then(o=>({default:o.ProjectWorkspace})));function je(o){o().catch(()=>{})}function Ss(){const{t:o}=z(),[e,t]=f.useState(null),[n,r]=f.useState(),i=f.useRef(n);i.current=n;const[s,a]=f.useState(()=>typeof window>"u"?null:G(window.location.pathname)),[l,c]=f.useState(()=>typeof window>"u"?null:we(window.location.search)),[u,d]=f.useState(null),[m,g]=f.useState(null),p=()=>{const y=G(window.location.pathname);if(!y)return;const C={texliteRoute:"dashboard"};window.history.replaceState(C,"",si(y,we(window.location.search))),a(null),c(null),d(null)},v=y=>{const C=!y.mustChangePassword,w=ai(window.location.search),D=li(window.location.search);let E=null;if(w){const F={texliteRoute:"project",projectId:w,fromDashboard:!1};window.history.replaceState(F,"",re(w,D)),a(w),c(D),E=w}else if(new URLSearchParams(window.location.search).has("return")){const F={texliteRoute:"dashboard"};window.history.replaceState(F,"",ae("/")),a(null),c(null)}else G(window.location.pathname)&&(E=G(window.location.pathname));C&&E?(je(_e),d(qe(E))):C?je(rn):d(null),r(y)};f.useEffect(()=>{const y=G(window.location.pathname),C=we(window.location.search);if(y&&`${window.location.pathname}${window.location.search}`!==re(y,C)){const E={texliteRoute:"project",projectId:y,fromDashboard:!1};window.history.replaceState(E,"",re(y,C))}const w=()=>{const E=G(window.location.pathname);a(E),c(E?we(window.location.search):null);const F=i.current;E&&F&&!F.mustChangePassword?(je(_e),d(qe(E))):d(null)},D=()=>{g(null),r(null),p()};return window.addEventListener("popstate",w),window.addEventListener("texlite:session-expired",D),()=>{window.removeEventListener("popstate",w),window.removeEventListener("texlite:session-expired",D)}},[]);const b=(y,C)=>{const w=re(y,C);if(`${window.location.pathname}${window.location.search}`!==w){const D={texliteRoute:"project",projectId:y,fromDashboard:!0};window.history.pushState(D,"",w)}je(_e),d(qe(y)),a(y),c(C??null)},S=()=>{const y=window.history.state;if(Gt(y)&&y.fromDashboard){window.history.back();return}const C={texliteRoute:"dashboard"};window.history.replaceState(C,"",ae("/")),a(null),c(null),d(null)};if(f.useEffect(()=>{le("/api/config").then(y=>{t(y),document.title=y.siteName}),le("/api/me",{suppressSessionExpired:!0}).then(({user:y})=>v(y)).catch(()=>{p(),r(null)})},[]),f.useEffect(()=>{if(!n||n.mustChangePassword||s)return;let y=!1,C=null,w=null;const D=()=>{y||go().then(F=>F.preloadPdfRuntime()).catch(()=>{})},E=window;return E.requestIdleCallback?w=E.requestIdleCallback(D,{timeout:1200}):C=window.setTimeout(D,400),()=>{y=!0,C!==null&&window.clearTimeout(C),w!==null&&E.cancelIdleCallback?.(w)}},[n?.id,n?.mustChangePassword,s]),n===void 0||!e)return h.jsx("div",{className:"center-card",children:o("common.loading")});if(!n)return h.jsx(ui,{site:e,onLogin:v});if(n.mustChangePassword)return h.jsx(di,{site:e,user:n,onChanged:y=>r(y)});if(s)return h.jsx(oo,{onClose:S,children:h.jsx(Ds,{site:e,user:n,projectId:s,preload:u?.projectId===s?u:null,mentionId:l,onMentionTargeted:()=>{const y=window.history.state,C=Gt(y)?{...y,projectId:s}:{texliteRoute:"project",projectId:s,fromDashboard:!1};window.history.replaceState(C,"",re(s)),c(null)},onMentionsRead:(y,C)=>g(w=>w&&w.userId===n.id?{...w,projects:w.projects.map(D=>D.id===s?{...D,unreadMentionCount:C?0:Math.max(0,(D.unreadMentionCount??0)-y)}:D)}:w),onBack:S},s)},`project:${s}`);const T=m?.userId===n.id?m:null;return h.jsx(oo,{children:h.jsx(xs,{site:e,user:n,initialData:T?{projects:T.projects,tags:T.tags,pagination:T.pagination}:null,onDataChange:(y,C,w)=>g({userId:n.id,projects:y,tags:C,pagination:w}),onUser:y=>{(!y||y.id!==n.id)&&g(null),r(y),y||S()},onOpenProject:b})},"dashboard")}const de="data-texlite-tooltip-title",Es=`[data-tooltip], [title], [${de}]`,ks='[data-texlite-tooltips="off"]',Ps="[data-texlite-tooltip-always]";function et(o,e){const t=Math.min(160,Math.max(16,(e-16)/2)),n=o.left+o.width/2,r=Math.max(t,Math.min(n,e-t)),i=o.top>=64?"above":"below";return{left:r,top:i==="above"?o.top-8:o.bottom+8,placement:i}}function Ue(o){return(o.getAttribute("data-tooltip")??o.getAttribute("title")??o.getAttribute(de))?.trim()||null}function ye(o){if(!(o instanceof Element))return null;const e=o.closest(Es);return e&&Ue(e)?e:null}function Os(o){return!!o?.closest(ks)&&!o?.closest(Ps)}function ft(o){return Os(o)}function tt(o){const e=o.getAttribute("title");e===null||o.hasAttribute(de)||(o.setAttribute(de,e),o.removeAttribute("title"))}function Ae(o){if(!o||ft(o))return;const e=o.getAttribute(de);e!==null&&(o.hasAttribute("title")||o.setAttribute("title",e),o.removeAttribute(de))}function Rs(){const o=f.useRef(null),[e,t]=f.useState(null);return f.useEffect(()=>{let n=null,r=null;const i=()=>{n=null,r=null,Ae(o.current),o.current=null,t(null)},s=()=>{const p=n??r;if(p&&ft(p)){p!==o.current&&Ae(o.current),o.current=p,tt(p),t(null);return}if(p===o.current){if(!p)return;const b=Ue(p);if(!b)return;t({text:b,...et(p.getBoundingClientRect(),window.innerWidth)});return}if(Ae(o.current),o.current=p,!p){t(null);return}const v=Ue(p);if(!v){t(null);return}tt(p),t({text:v,...et(p.getBoundingClientRect(),window.innerWidth)})},a=()=>{const p=o.current;if(!p)return;if(ft(p)){tt(p),t(null);return}const v=Ue(p);v&&t({text:v,...et(p.getBoundingClientRect(),window.innerWidth)})},l=(p,v)=>v instanceof Node&&p.contains(v),c=p=>{n=ye(p.target),s()},u=p=>{const v=ye(p.target);!v||v!==n||ye(p.relatedTarget)===v||l(v,p.relatedTarget)||(n=null,s())},d=p=>{r=ye(p.target),s()},m=p=>{const v=ye(p.target);!v||v!==r||l(v,p.relatedTarget)||(r=null,s())};document.addEventListener("pointerover",c,!0),document.addEventListener("pointerout",u,!0),document.addEventListener("focusin",d,!0),document.addEventListener("focusout",m,!0),document.addEventListener("click",i,!0),window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),window.addEventListener("blur",i),window.addEventListener("pagehide",i),window.addEventListener("popstate",i);const g=new MutationObserver(s);return g.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-texlite-tooltips"]}),()=>{document.removeEventListener("pointerover",c,!0),document.removeEventListener("pointerout",u,!0),document.removeEventListener("focusin",d,!0),document.removeEventListener("focusout",m,!0),document.removeEventListener("click",i,!0),window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0),window.removeEventListener("blur",i),window.removeEventListener("pagehide",i),window.removeEventListener("popstate",i),g.disconnect(),Ae(o.current),o.current=null}},[]),e?h.jsx("div",{id:"texlite-global-tooltip",role:"tooltip",className:`global-tooltip ${e.placement}`,style:{left:e.left,top:e.top},children:e.text}):null}ln.createRoot(document.getElementById("root")).render(h.jsxs(f.StrictMode,{children:[h.jsx(Rs,{}),h.jsx(Xe,{children:h.jsx(Ss,{})})]}));export{Ce as A,Is as C,wo as L,Dt as M,vo as S,ht as _,ae as a,oo as b,mi as c,To as d,js as e,bo as f,le as g,yo as h,k as i,go as j,As as k,ri as l,oi as n,ho as r,Ls as s};
12
+ $pdf_mode = 1;`,addMember:"添加成员",noMembers:"该项目尚未分享给其他成员。",removeTitle:"移除共享成员",removeDescription:"确认移除 {{username}}?其账号和其他项目不会受到影响。",editorTab:"编辑器外观",compilerTab:"LaTeX 编译器",compilerDescription:"选择本项目所有成员共享的主文档和 LaTeX 编译选项。",editorAppearance:"编辑器外观",editorAppearanceDescription:"这些偏好仅作用于当前浏览器中的当前用户和项目;项目词典是共享的。",browserTools:"格式化工具",toolStatus:{loading:"加载中",working:"运行正常",error:"错误"},reloadTool:"重新加载",saveAppearance:"保存外观设置",saveCompiler:"保存编译器设置",writingCheckDescription:"TexLite 使用宿主机上可选的 Harper CLI。若其不可用,将自动改用浏览器内置拼写检查。拼写问题使用红色波浪线,语法问题使用黄色波浪线;右键问题可以查看修改建议。",projectConfiguration:"项目配置",fontFamily:"英文字体",fontSize:"字体大小",lineHeight:"行间距",dictionary:"项目词典",dictionaryDescription:"添加到这里的词会在 Harper 返回本项目诊断后被忽略;具有编辑权限的用户可以维护此列表。",dictionaryPlaceholder:"添加自定义词",addWord:"添加词",dictionaryEmpty:"暂未添加自定义词。",showTooltips:"显示界面悬停提示",showTooltipsDescription:"显示项目工作区控件的悬停提示;不影响右键写作建议。",lineWrapping:"自动换行",mathPreviewOnHover:"悬停预览数学公式",mathPreviewOnHoverDescription:"在编辑器中悬停常见 LaTeX 公式时显示渲染预览。",spellCheck:"拼写和语法检查",vimMode:"Vim 键位",vimModeDescription:"在当前编辑器中使用 Vim 的普通、插入和可视模式。",vimHelp:"查看帮助",formatOnCompile:"编译前自动格式化 LaTeX",formatOnCompileDescription:"默认关闭;格式化会在编译前执行。",formatRequiresWrite:"需要项目编辑权限才能使用格式化。",formatterDescription:"tex、cls、sty 使用内置的浏览器 tex-fmt WASM 格式化器;BibTeX 使用浏览器中的 bibtex-tidy。",formatterInstall:"查看 tex-fmt",bibtexTidyInstall:"查看 bibtex-tidy",texFmtOptions:"tex-fmt 参数(TOML)",texFmtOptionsPlaceholder:"wrap = false",texFmtOptionsDescription:"这些参数仅保存在当前浏览器中,并按当前用户和项目隔离;它们会直接传递给 tex-fmt。",openFilesInTabs:"使用新 Tab 打开 LaTeX 文件",openFilesInTabsDescription:"在编辑器顶部通过标签页管理打开的 .tex、.bib、.bst、.sty 等源码文件。",writingIssues:"发现 {{count}} 个写作问题(去重后 {{uniqueCount}} 个)",noWritingIssues:"未发现拼写或语法问题。",spellCheckFirst:"第一个写作问题",spellCheckPrevious:"上一个写作问题",spellCheckNext:"下一个写作问题",spellCheckLast:"最后一个写作问题",spellCheckPosition:"第 {{current}}/{{total}} 个",fontJetBrains:"JetBrains Mono",fontSourceCode:"Source Code Pro",fontIbmPlex:"IBM Plex Mono",fontFiraCode:"Fira Code",fontIosevka:"Iosevka",lineHeightCompact:"紧凑",lineHeightNormal:"标准",lineHeightRelaxed:"宽松"},Mr={title:"Git 备份",description:"管理本地 Git 历史及 GitHub 备份;只有项目创建者可以执行这些操作。",ownerOnly:"只有项目所有者可以使用 Git 备份。",authentication:"GitHub 身份验证",authenticationHint:"token 需要仓库 Administration 与 Contents 写权限;它会加密保存,不会写入项目仓库或远程地址。",recommendedAccessTitle:"建议的仓库访问范围:All repositories(所有仓库)",recommendedAccess:"texLite 面向相互信任的用户。请选择 All repositories,使该 token 能创建仓库,并访问之后新建的仓库;同时授予 Administration 和 Contents 的 Read and write 权限。",token:"个人访问 token",tokenPlaceholder:"在此粘贴 GitHub token",replaceToken:"替换个人访问 token",saveToken:"保存并验证 token",createToken:"创建细粒度 token",connectedAs:"已连接为 @{{login}}",removeToken:"移除 token",tokenSaved:"GitHub token 已保存,本地仓库已就绪。",tokenRemoved:"GitHub token 已移除。",repository:"仓库",localReady:"项目源码已由本地 Git 仓库管理。",localPending:"保存有效 token 后将自动初始化本地 Git 仓库。",repositoryName:"GitHub 仓库名称",privateRepository:"创建为私有仓库",createRepository:"创建 GitHub 仓库",repositoryCreated:"GitHub 仓库创建成功。",origin:"远程仓库",openGitHub:"打开 GitHub",clean:"工作区干净",changedFiles:"{{count}} 个文件有修改",commitAndPush:"提交与推送",identity:"本次提交临时使用 {{username}} <{{username}}@texlite.com>,不会写入 Git 配置。",detachedHead:"当前处于 detached HEAD;请先返回默认分支再提交或推送。",detachedAt:"detached 于 {{revision}}",commitMessage:"提交说明",commitPlaceholder:"说明本次备份的内容…",commit:"提交",committed:"修改已提交。",noChangesToCommit:"当前没有新的修改可以提交。",push:"推送",pushed:"推送成功,GitHub 备份已是最新。",pushFailed:"推送失败",workingDiff:"当前差异",refresh:"刷新",diffTitle:"差异",diffTruncated:"输出已截断",diffFontSize:"差异字体大小",diffFontDecrease:"减小差异字体",diffFontIncrease:"增大差异字体",fullscreenDiff:"全屏查看差异",exitFullscreenDiff:"退出全屏",noChanges:"没有可显示的差异。",history:"提交历史",historyHint:"最多显示最近 100 次提交",noCommits:"尚无提交。",viewCommitDiff:"查看该提交的差异",checkoutVersion:"checkout 到该版本",checkoutTitle:"Checkout 版本",checkout:"Checkout",checkoutDescription:"将 checkout 到 {{revision}} — {{message}}。默认由 Git 保留兼容的未提交修改,发生冲突时拒绝操作。",forceCheckout:"强制覆盖",forceCheckoutDescription:"明确丢弃所有已跟踪及未跟踪的工作区修改后再 checkout;此操作不可撤销。",returnToBranch:"返回 {{branch}}",returnTitle:"返回默认分支",returnDescription:"将 checkout 到 {{branch}}。默认由 Git 保留兼容的未提交修改,发生冲突时拒绝操作。",discardChanges:"撤销修改",noChangesToDiscard:"当前没有可以撤销的修改。",discardTitle:"撤销未提交修改",discardDescription:"把所有已跟踪文件恢复到当前 HEAD(上次 commit)。未跟踪文件不受影响。",discardConfirm:"确认撤销"},Ur={title:"系统状态",description:"服务器实时健康状态和近期操作耗时,每五秒自动刷新。",refresh:"刷新",uptime:"运行时间",memory:"内存",heap:"堆内存",compileQueue:"编译任务",pending:"{{count}} 个等待中",collaboration:"协作",sessions:"{{count}} 个会话",roomsAndDirty:"{{rooms}} 个房间 · {{dirty}} 个待保存文件",eventLoop:"事件循环延迟",latencySummary:"P50 {{p50Ms}} ms · P95 {{p95Ms}} ms · 最大 {{maxMs}} ms",operationDurations:"近期操作耗时",noSamples:"尚未采集到操作样本。",operation:"操作",samples:"样本",last:"最近",max:"最大",operations:{collaboration:{connect:"打开协作房间",persist:"保存协作修改"},workspace:{project:"加载项目元数据",files:"加载项目文件",compileState:"加载保留的 PDF 状态"},compile:{snapshot:"准备编译快照",request:"编译请求总耗时",cacheSync:"更新编译缓存",latexmk:"运行 latexmk",artifactCopy:"发布编译产物"},outline:{build:"生成项目大纲"},search:{project:"项目内搜索"},completions:{build:"生成补全索引"}}},$r={title:"标签",add:"添加标签",create:"新建标签",createDescription:"创建仅自己可见的可复用彩色标签,用于整理项目。",manage:"管理标签",manageDescription:"创建和整理仅自己可见的项目标签。删除标签只会解除它与项目的关联。",createInManager:"新建标签",edit:"编辑",rename:"重命名",deleteTitle:"删除标签",deleteDescription_one:"确定删除“{{tag}}”吗?它将从 {{count}} 个项目中移除。",deleteDescription_other:"确定删除“{{tag}}”吗?它将从 {{count}} 个项目中移除。",projectCount_one:"{{count}} 个项目",projectCount_other:"{{count}} 个项目",noTags:"还没有标签。创建一个标签来整理项目。",none:"暂无标签",assign:"标签",assignTitle:"“{{project}}”的标签",assignDescription:"勾选你为此项目设置的私有标签;其他用户拥有各自的标签。",empty:"请先创建标签。",allAssigned:"所有可用标签均已添加。",name:"标签名称",color:"颜色",filter:"筛选",red:"红色",orange:"橙色",yellow:"黄色",green:"绿色",blue:"蓝色",purple:"紫色",gray:"灰色"},Br={generic:"操作失败",request:"请求失败({{status}})",upload:"上传失败",boundaryTitle:"页面遇到问题",boundaryDescription:"渲染组件时发生异常。你可以尝试恢复,或刷新页面重新载入。",boundaryRetry:"重试",boundaryReload:"刷新页面",fileExists:"同名文件或文件夹已经存在。",pathConflict:"目标路径已经被文件或文件夹占用。",duplicateUploadNames:"所选文件中存在重复名称:{{files}}。",fileTooLarge:"文件超过 {{size}} MB 限制。",zipOnly:"请选择 ZIP 压缩包。",collaborationUnavailable:"实时协作尚未连接,请在重新连接后保存或编译。",codes:{AUTH_INVALID:"用户名或密码错误。",CURRENT_PASSWORD_INVALID:"当前密码错误。",USER_NOT_FOUND:"用户不存在或已被删除。",LAST_ADMIN:"系统必须保留至少一名可用管理员。",SELF_DELETE_FORBIDDEN:"不能删除当前登录的管理员。",PROJECT_CREATE_FORBIDDEN:"管理员尚未授予你创建项目的权限。",PROJECT_NOT_FOUND:"项目不存在或你已无法访问。",PROJECT_OWNER_ONLY:"只有项目所有者可以修改此设置。",PROJECT_EDIT_FORBIDDEN:"你没有此项目的编辑权限。",DICTIONARY_EDIT_FORBIDDEN:"你没有维护本项目词典的权限。",TAG_NOT_FOUND:"所选标签不存在。",GIT_TOKEN_INVALID:"请输入 GitHub token。",GIT_REPOSITORY_NAME_INVALID:"请输入 GitHub 仓库名称。",GIT_REVISION_INVALID:"请选择要 checkout 的 Git 版本。",PROJECT_DELETE_FORBIDDEN:"只有项目所有者可以删除项目。",MEMBERS_MANAGE_FORBIDDEN:"只有项目所有者可以管理项目成员。",OWNER_MEMBER_FORBIDDEN:"项目所有者不能作为成员添加。",INVALID_PATH:"文件路径无效。",RESERVED_PATH:"此路径由 TexLite 保留。",PATH_EXISTS:"目标路径已被文件或文件夹占用。",FILE_EXISTS:"同名文件已经存在。",PATH_NOT_FOUND:"文件或文件夹不存在。",FILE_NOT_FOUND:"文件不存在。",DIRECTORY_NOT_FOUND:"目标文件夹不存在。",MOVE_INTO_SELF:"不能把文件夹移动到自身内部。",MAIN_FILE_DELETE_FORBIDDEN:"不能删除主文档。",FILE_TOO_LARGE:"文件过大,无法打开或上传。",UPLOAD_EMPTY:"没有选择要上传的文件。",COMMENT_FILE_NOT_FOUND:"批注对应的文件不存在。",COMMENT_RANGE_INVALID:"批注的源码区间无效。",COMMENT_NOT_FOUND:"批注不存在。",COMMENT_EDIT_FORBIDDEN:"只能编辑自己的批注。",COMMENT_DELETE_FORBIDDEN:"只能删除自己的批注。",REPLY_NOT_FOUND:"回复不存在。",REPLY_EDIT_FORBIDDEN:"只能编辑自己的回复。",REPLY_DELETE_FORBIDDEN:"只能删除自己的回复。",COMMENT_UPDATE_EMPTY:"没有可更新的批注内容。",MAIN_FILE_NOT_FOUND:"所选主文档不存在。",LATEXMKRC_DISABLED:"管理员已禁用项目级 latexmkrc。",LATEXMKRC_NOT_FOUND:"所选 latexmkrc 文件不存在。",COMPILE_ARTIFACTS_NOT_FOUND:"尚无可用的编译产物。",COMPILE_ARTIFACT_NOT_FOUND:"编译产物不存在。",ARTIFACT_PREVIEW_UNSUPPORTED:"该产物不能作为文本预览,请下载后查看。",SYNC_SOURCE_INVALID:"源码位置无效。",SOURCE_FILE_NOT_FOUND:"源码文件不存在。",SYNCTEX_NOT_AVAILABLE:"尚无可用的 SyncTeX 数据,请重新编译。",SYNC_PDF_INVALID:"PDF 位置无效。",SYNCTEX_EXTERNAL_PATH:"SyncTeX 返回了项目外部的源码路径。",COMPILE_FORBIDDEN:"你没有编译此项目的权限。",PDF_NOT_FOUND:"尚未生成 PDF。",API_NOT_FOUND:"接口不存在。",SERVER_ERROR:"服务器无法完成请求。",REQUEST_INVALID:"请求格式无效。"}},Hr={historyVersionNotFound:"所选历史版本已不存在。",historyFileNotFound:"所选历史版本中没有这个文件。",historyObjectMissing:"该快照的已存储文件缺失,无法再查看或恢复。",historyTargetConflict:"当前恢复目标是目录或其他非普通文件路径。",historyPreviewUnsupported:"这个历史文件不能作为文本比较。",searchInvalid:"请输入有效的搜索内容。",gitUnavailable:"Git 集成功能不可用。请在宿主机安装 Git,或修正配置中的 git.binary 后重试。",formatFailed:"tex-fmt 无法格式化这段源码。",mainDocumentInvalid:"所选文件不是有效的 LaTeX 主文档。",compileSnapshotBusy:"源码尚未完成稳定保存,请稍后再试编译。"},Vr={requestFailed:"网络请求失败,请检查连接后重试。",invalidResponse:"服务器返回了无效响应,请重试。"},Wr={protocolUpgrade:"工作区需要更新。本地草稿已保留;请在准备好重新连接时刷新页面。"},Xr={disableTitle:"禁用用户",disableDescription:"确定禁用 @{{username}} 吗?其活跃会话将结束,且无法再登录。",disableConfirm:"禁用用户",demoteTitle:"移除管理员权限",demoteDescription:"确定将 @{{username}} 降为普通用户吗?其将无法再管理用户。",demoteConfirm:"设为普通用户",denyProjectCreationTitle:"移除项目创建权限",denyProjectCreationDescription:"确定移除 @{{username}} 创建新项目的权限吗?其已有项目访问权限不受影响。",denyProjectCreationConfirm:"移除权限"},zr={cancel:"取消编译",cancelling:"正在取消…",cancelled:"编译已取消。"},Gr={tagline:"面向小型研究团队的自托管 LaTeX 协作平台",copyright:"© {{year}}"},Kr={section:"章节",subsection:"小节",bold:"粗体",emphasis:"强调",citation:"引用文献",reference:"交叉引用",label:"标签",image:"插入图片",unordered:"无序列表",ordered:"有序列表",equation:"公式",figure:"图片环境",projectCommand:"项目命令",projectCommandArgs:"项目命令({{count}} 个参数)",projectMacro:"项目宏",expl3Command:"Expl3 项目命令",mathOperator:"项目数学算子",mathDelimiter:"项目数学定界符",projectEnvironment:"项目环境",projectFile:"项目文件",package:"宏包",documentClass:"文档类",currentFile:"当前文件",project:"项目",latex:"LaTeX",standard:"LaTeX 命令"},Yr={common:Tr,auth:xr,projects:Dr,projectIcons:Sr,users:Er,editor:kr,bibtex:Pr,citationLibrary:Or,citationErrors:Rr,citationLibraryHomeDescription:Fr,citationLibraryActions:Lr,citationLibraryPagination:Nr,navigation:Ir,history:jr,selectionHistory:Ar,projectSettings:_r,git:Mr,metrics:Ur,tags:$r,errors:Br,apiErrors:Hr,network:Vr,workspaceUpdates:Wr,userConfirmations:Xr,compileControls:zr,footer:Gr,completions:Kr};k.use(uo).use(sn).init({resources:{en:{translation:Cr},zh:{translation:Yr}},fallbackLng:"en",supportedLngs:["en","zh"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"]}});const Z="/";function qr(o){const e=o.trim();if(e===Z)return Z;const t=e.replace(/\/+$/,"");if(!t.startsWith("/")||t.includes("//"))return null;const n=t.slice(1).split("/");return!n.length||n.some(r=>r==="."||r===".."||!/^[A-Za-z0-9._~-]+$/.test(r))?null:t}function po(o){return o===Z?"":o}function Jr(o,e){if(!e.startsWith("/"))throw new Error(`Application path must start with /: ${e}`);const t=po(o);return t?e==="/"?`${t}/`:`${t}${e}`:e}function Zr(o,e){const t=po(o);return t?e===t||e===`${t}/`?"/":e.startsWith(`${t}/`)?e.slice(t.length)||"/":null:e}const Qr="texlite-base-path";function ei(){if(typeof document>"u")return Z;const o=document.querySelector(`meta[name="${Qr}"]`)?.content??Z;return qr(o)??Z}const We=ei();function Se(){return We}function ae(o,e=We){return Jr(e,o)}function ti(o,e=We){return Zr(e,o)}function Ls(o,e=We){return e===Z?o:`${o}:base=${encodeURIComponent(e)}`}class Ce extends Error{constructor(e,t,n=null){super(e),this.status=t,this.code=n}status;code}function fo(o){return o instanceof Error&&o.name==="AbortError"}function oi(o){return fo(o)||o instanceof Ce?o:new Ce(k.t("network.requestFailed"),0,"NETWORK_ERROR")}function ni(o){return typeof FormData<"u"&&o instanceof FormData}async function le(o,e={}){const{suppressSessionExpired:t=!1,...n}=e,r=new Headers(n.headers);r.has("Accept-Language")||r.set("Accept-Language",k.resolvedLanguage?.startsWith("zh")?"zh":"en"),n.body&&!ni(n.body)&&!r.has("Content-Type")&&r.set("Content-Type","application/json");let i;try{i=await fetch(ae(o),{...n,headers:r})}catch(l){throw oi(l)}const s=i.headers.get("content-type")??"";let a=null;if(s.includes("application/json"))try{a=await i.json()}catch(l){throw fo(l)?l:new Ce(k.t("network.invalidResponse"),i.status,"INVALID_RESPONSE")}else if(i.ok)throw new Ce(k.t("network.invalidResponse"),i.status,"INVALID_RESPONSE");if(!i.ok)throw i.status===401&&!t&&typeof window<"u"&&window.dispatchEvent(new Event("texlite:session-expired")),new Ce(ri(a,i.status),i.status,ho(a));return a}function ri(o,e,t="errors.request"){const n=typeof o=="object"&&o!==null&&"error"in o&&typeof o.error=="string"?o.error:"",r=ho(o);if(r){const i={AUTH_REQUIRED:"auth.sessionExpired",ADMIN_REQUIRED:"users.adminRequired",HISTORY_VERSION_NOT_FOUND:"apiErrors.historyVersionNotFound",HISTORY_FILE_NOT_FOUND:"apiErrors.historyFileNotFound",HISTORY_OBJECT_MISSING:"apiErrors.historyObjectMissing",HISTORY_TARGET_CONFLICT:"apiErrors.historyTargetConflict",HISTORY_FILE_PREVIEW_UNSUPPORTED:"apiErrors.historyPreviewUnsupported",SEARCH_QUERY_INVALID:"apiErrors.searchInvalid",GIT_UNAVAILABLE:"apiErrors.gitUnavailable",FORMAT_FAILED:"apiErrors.formatFailed",PROJECT_TRANSFER_FORBIDDEN:"projects.transferForbidden",PROJECT_TRANSFER_TARGET_INVALID:"projects.transferTargetInvalid",PROJECT_TRANSFER_SELF:"projects.transferSelf",MAIN_DOCUMENT_INVALID:"apiErrors.mainDocumentInvalid",COMPILE_SNAPSHOT_BUSY:"apiErrors.compileSnapshotBusy",COMPILE_CLEAN_BUSY:"editor.cleanBusy",CITATION_INVALID:"citationErrors.invalid",CITATION_TOO_LARGE:"citationErrors.tooLarge",CITATION_NOT_FOUND:"citationErrors.notFound",CITATION_KEY_EXISTS:"citationErrors.keyExists",CITATION_TAG_NOT_FOUND:"citationErrors.tagNotFound",CITATION_CONFLICT:"citationErrors.conflict",WORD_COUNT_FAILED:"editor.wordCountFailed",WORD_COUNT_SOURCE_INVALID:"editor.wordCountSourceInvalid",WORD_COUNT_SOURCE_TOO_LARGE:"editor.wordCountSourceTooLarge",WORD_COUNT_UNAVAILABLE:"editor.wordCountUnavailable"}[r]??`errors.codes.${r}`;if(k.exists(i))return k.t(i,{status:e,...typeof o=="object"&&o!==null?o:{}})}return n||k.t(t,{status:e})}function ho(o){return typeof o!="object"||o===null||!("code"in o)||typeof o.code!="string"?null:o.code}const ii=/^\/projects?\/([^/]+)\/?$/;function re(o,e,t=Se()){const n=ae(`/project/${encodeURIComponent(o)}`,t);return e?`${n}?${new URLSearchParams({mention:e}).toString()}`:n}function we(o){const e=new URLSearchParams(o).get("mention");return e&&e.length<=128?e:null}function G(o,e=Se()){const t=ti(o,e),n=t?ii.exec(t):null;if(!n)return null;try{const r=decodeURIComponent(n[1]);return r&&!r.includes("/")?r:null}catch{return null}}function si(o,e,t=Se()){const n=new URLSearchParams({return:re(o,e,t)});return ae("/",t)+"?"+n.toString()}function mo(o){const e=new URLSearchParams(o).get("return");if(!e||!e.startsWith("/")||e.startsWith("//"))return null;try{return new URL(e,"https://texlite.invalid")}catch{return null}}function ai(o,e=Se()){const t=mo(o);return t?G(t.pathname,e):null}function li(o,e=Se()){const t=mo(o);return t&&G(t.pathname,e)?we(t.search):null}function Gt(o){if(!o||typeof o!="object")return!1;const e=o;return e.texliteRoute==="project"&&typeof e.projectId=="string"&&typeof e.fromDashboard=="boolean"}const go=()=>ht(()=>import("./PdfPreview-fDxKh6hP.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),_e=()=>ht(()=>import("./ProjectWorkspace-mCYjyc6e.js").then(o=>o.P),__vite__mapDeps([5,1,6,7,8,9,10]),import.meta.url),Re=new Map,Kt=2e3;function qe(o,e={}){const t=Date.now(),n=Re.get(o);if(!e.force&&n&&t-n.createdAt<Kt)return n.preload;const r=le(`/api/projects/${o}`,{suppressSessionExpired:!0}),i=le(`/api/projects/${o}/compile/latest`,{suppressSessionExpired:!0}),s=go(),a={projectId:o,project:r,latestCompile:i};return Re.set(o,{preload:a,createdAt:t}),r.catch(()=>{}),Promise.all([s,i]).then(([l,c])=>{c.pdfUrl&&l.preloadPdf(c.pdfUrl,c.pdfLoadingMode??"full")}).catch(()=>{}),window.setTimeout(()=>{Re.get(o)?.preload===a&&Re.delete(o)},Kt),a}function yo(o){return o instanceof Error?o.message:k.t("errors.generic")}function wo({compact:o=!1}){const{i18n:e,t}=z(),n=e.resolvedLanguage?.startsWith("zh")?"zh":"en";return h.jsxs("label",{className:`language-switcher${o?" compact":""}`,title:t("common.language"),children:[h.jsx("span",{children:"文/A"}),h.jsxs("select",{value:n,"aria-label":t("common.language"),onChange:r=>{e.changeLanguage(r.target.value)},children:[h.jsx("option",{value:"en",children:t("common.languageEnglish")}),h.jsx("option",{value:"zh",children:t("common.languageChinese")})]})]})}const ci="0.10.0";function vo({siteName:o,compact:e=!1,auth:t=!1}){return h.jsx("span",{className:`site-logo${e?" compact":""}${t?" auth-logo":""}`,children:h.jsx("img",{src:ae("/logo.svg"),alt:o})})}function bo(){const{t:o}=z();return h.jsxs("footer",{className:"site-footer",children:[h.jsx("span",{className:"site-footer-tagline",children:o("footer.tagline")}),h.jsxs("span",{children:[o("footer.copyright",{year:new Date().getFullYear()})," ",h.jsxs("a",{href:"https://github.com/SWUFE-DB-Group/TexLite",target:"_blank",rel:"noreferrer",children:["TexLite v",ci]})]})]})}function di({site:o,user:e,onChanged:t}){const{t:n}=z(),[r,i]=f.useState(""),[s,a]=f.useState(""),[l,c]=f.useState(""),[u,d]=f.useState(""),m=async g=>{if(g.preventDefault(),s!==l)return d(n("auth.mismatch"));if(s.length<o.minPasswordLength)return d(n("auth.passwordMinimum",{count:o.minPasswordLength}));try{await le("/api/me/password",{method:"PUT",body:JSON.stringify({currentPassword:r,newPassword:s})}),t({...e,mustChangePassword:!1})}catch(p){d(yo(p))}};return h.jsxs("main",{className:"login-page",children:[h.jsx(wo,{}),h.jsxs("form",{className:"login-card",onSubmit:m,children:[h.jsx(vo,{siteName:o.siteName,auth:!0}),h.jsx("h1",{className:"sr-only",children:o.siteName}),h.jsx("p",{className:"muted",children:n("auth.firstLogin")}),h.jsxs("label",{children:[n("auth.currentPassword"),h.jsx("input",{type:"password",value:r,onChange:g=>i(g.target.value)})]}),h.jsxs("label",{children:[n("auth.newPassword"),h.jsx("input",{type:"password",minLength:o.minPasswordLength,autoComplete:"new-password",value:s,onChange:g=>a(g.target.value)}),h.jsx("small",{className:"field-hint",children:n("auth.passwordMinimum",{count:o.minPasswordLength})})]}),h.jsxs("label",{children:[n("auth.confirmPassword"),h.jsx("input",{type:"password",minLength:o.minPasswordLength,autoComplete:"new-password",value:l,onChange:g=>c(g.target.value)})]}),u&&h.jsx("p",{className:"error",children:u}),h.jsx("button",{className:"primary",children:n("auth.updatePassword")})]}),h.jsx(bo,{})]})}function ui({site:o,onLogin:e}){const{t}=z(),[n,r]=f.useState(""),[i,s]=f.useState(""),[a,l]=f.useState(""),c=async u=>{u.preventDefault(),l("");try{const d=await le("/api/auth/login",{method:"POST",body:JSON.stringify({username:n,password:i}),suppressSessionExpired:!0});e(d.user)}catch(d){l(yo(d))}};return h.jsxs("main",{className:"login-page",children:[h.jsx(wo,{}),h.jsxs("form",{className:"login-card",onSubmit:c,children:[h.jsx(vo,{siteName:o.siteName,auth:!0}),h.jsx("h1",{className:"sr-only",children:o.siteName}),h.jsx("p",{className:"muted",children:t("auth.tagline")}),h.jsxs("label",{children:[t("auth.username"),h.jsx("input",{autoFocus:!0,value:n,onChange:u=>r(u.target.value)})]}),h.jsxs("label",{children:[t("auth.password"),h.jsx("input",{type:"password",value:i,onChange:u=>s(u.target.value)})]}),a&&h.jsx("p",{className:"error",children:a}),h.jsx("button",{className:"primary",type:"submit",children:t("auth.login")}),o.adminEmail&&h.jsx("small",{className:"support",children:t("auth.contact",{email:o.adminEmail})})]}),h.jsx(bo,{})]})}const pi=o=>o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Co=(...o)=>o.filter((e,t,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===t).join(" ").trim();var fi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const hi=f.forwardRef(({color:o="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:n,className:r="",children:i,iconNode:s,...a},l)=>f.createElement("svg",{ref:l,...fi,width:e,height:e,stroke:o,strokeWidth:n?Number(t)*24/Number(e):t,className:Co("lucide",r),...a},[...s.map(([c,u])=>f.createElement(c,u)),...Array.isArray(i)?i:[i]]));const mi=(o,e)=>{const t=f.forwardRef(({className:n,...r},i)=>f.createElement(hi,{ref:i,iconNode:e,className:Co(`lucide-${pi(o)}`,n),...r}));return t.displayName=`${o}`,t};const To=mi("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var gi=Object.defineProperty,ue=(o,e)=>gi(o,"name",{value:e,configurable:!0}),xo=!!(typeof window<"u"&&window.document&&window.document.createElement);function K(o,e,{checkForDefaultPrevented:t=!0}={}){return ue(function(r){if(o?.(r),t===!1||!r||!r.defaultPrevented)return e?.(r)},"handleEvent")}ue(K,"composeEventHandlers");function yi(o){if(!xo)throw new Error("Cannot access window outside of the DOM");return o?.ownerDocument?.defaultView??window}ue(yi,"getOwnerWindow");function nt(o){if(!xo)throw new Error("Cannot access document outside of the DOM");return o?.ownerDocument??document}ue(nt,"getOwnerDocument");function Do(o,e=!1){const{activeElement:t}=nt(o);if(!t?.nodeName)return null;if(So(t)&&t.contentDocument)return Do(t.contentDocument.body,e);if(e){const n=t.getAttribute("aria-activedescendant");if(n){const r=nt(t).getElementById(n);if(r)return r}}return t}ue(Do,"getActiveElement");function So(o){return o.tagName==="IFRAME"}ue(So,"isFrame");var wi=Object.defineProperty,mt=(o,e)=>wi(o,"name",{value:e,configurable:!0});function rt(o,e){if(typeof o=="function")return o(e);o!=null&&(o.current=e)}mt(rt,"setRef");function Eo(...o){return e=>{let t=!1;const n=o.map(r=>{const i=rt(r,e);return!t&&typeof i=="function"&&(t=!0),i});if(t)return()=>{for(let r=0;r<n.length;r++){const i=n[r];typeof i=="function"?i():rt(o[r],null)}}}}mt(Eo,"composeRefs");function pe(...o){return f.useCallback(Eo(...o),o)}mt(pe,"useComposedRefs");var vi=Object.defineProperty,_=(o,e)=>vi(o,"name",{value:e,configurable:!0});function bi(o,e){const t=f.createContext(e);t.displayName=o+"Context";const n=_(i=>{const{children:s,...a}=i,l=f.useMemo(()=>a,Object.values(a));return h.jsx(t.Provider,{value:l,children:s})},"Provider");n.displayName=o+"Provider";function r(i,s={}){const{optional:a=!1}=s,l=f.useContext(t);if(l)return l;if(e!==void 0)return e;if(!a)throw new Error(`\`${i}\` must be used within \`${o}\``)}return _(r,"useContext"),[n,r]}_(bi,"createContext");function ko(o,e=[]){let t=[];function n(i,s){const a=f.createContext(s);a.displayName=i+"Context";const l=t.length;t=[...t,s];const c=_(d=>{const{scope:m,children:g,...p}=d,v=m?.[o]?.[l]||a,b=f.useMemo(()=>p,Object.values(p));return h.jsx(v.Provider,{value:b,children:g})},"Provider");c.displayName=i+"Provider";function u(d,m,g={}){const{optional:p=!1}=g,v=m?.[o]?.[l]||a,b=f.useContext(v);if(b)return b;if(s!==void 0)return s;if(!p)throw new Error(`\`${d}\` must be used within \`${i}\``)}return _(u,"useContext"),[c,u]}_(n,"createContext");const r=_(()=>{const i=t.map(s=>f.createContext(s));return _(function(a){const l=a?.[o]||i;return f.useMemo(()=>({[`__scope${o}`]:{...a,[o]:l}}),[a,l])},"useScope")},"createScope");return r.scopeName=o,[n,Po(r,...e)]}_(ko,"createContextScope");function Po(...o){const e=o[0];if(o.length===1)return e;const t=_(()=>{const n=o.map(r=>({useScope:r(),scopeName:r.scopeName}));return _(function(i){const s=n.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return f.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return t.scopeName=e.scopeName,t}_(Po,"composeContextScopes");var Y=globalThis?.document?f.useLayoutEffect:()=>{},Ci=Object.defineProperty,Ti=(o,e)=>Ci(o,"name",{value:e,configurable:!0}),xi=De[" useId ".trim().toString()]||(()=>{}),Di=0;function Me(o){const[e,t]=f.useState(xi());return Y(()=>{o||t(n=>n??String(Di++))},[o]),o||(e?`radix-${e}`:"")}Ti(Me,"useId");var Si=Object.defineProperty,Ei=(o,e)=>Si(o,"name",{value:e,configurable:!0}),Yt=De[" useEffectEvent ".trim().toString()],qt=De[" useInsertionEffect ".trim().toString()];function Oo(o){if(typeof Yt=="function")return Yt(o);const e=f.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof qt=="function"?qt(()=>{e.current=o}):Y(()=>{e.current=o}),f.useMemo(()=>((...t)=>e.current?.(...t)),[])}Ei(Oo,"useEffectEvent");var ki=Object.defineProperty,Ee=(o,e)=>ki(o,"name",{value:e,configurable:!0}),Pi=De[" useInsertionEffect ".trim().toString()]||Y;function Ro({prop:o,defaultProp:e,onChange:t=Ee(()=>{},"onChange"),caller:n}){const[r,i,s]=Fo({defaultProp:e,onChange:t}),a=o!==void 0,l=a?o:r,c=f.useCallback(u=>{if(a){const d=Lo(u)?u(o):u;d!==o&&s.current?.(d)}else i(u)},[a,o,i,s]);return[l,c]}Ee(Ro,"useControllableState");function Fo({defaultProp:o,onChange:e}){const[t,n]=f.useState(o),r=f.useRef(t),i=f.useRef(e);return Pi(()=>{i.current=e},[e]),f.useEffect(()=>{r.current!==t&&(i.current?.(t),r.current=t)},[t,r]),[t,n,i]}Ee(Fo,"useUncontrolledState");function Lo(o){return typeof o=="function"}Ee(Lo,"isFunction");var Jt=Symbol("RADIX:SYNC_STATE");function Oi(o,e,t,n){const{prop:r,defaultProp:i,onChange:s,caller:a}=e,l=r!==void 0,c=Oo(s),u=[{...t,state:i}];n&&u.push(n);const[d,m]=f.useReducer((b,S)=>{if(S.type===Jt)return{...b,state:S.state};const T=o(b,S);return l&&!Object.is(T.state,b.state)&&c(T.state),T},...u),g=d.state,p=f.useRef(g);f.useEffect(()=>{p.current!==g&&(p.current=g,l||c(g))},[g,p,l]);const v=f.useMemo(()=>r!==void 0?{...d,state:r}:d,[d,r]);return f.useEffect(()=>{l&&!Object.is(r,d.state)&&m({type:Jt,state:r})},[r,d.state,l]),[v,m]}Ee(Oi,"useControllableStateReducer");var Ri=Object.defineProperty,U=(o,e)=>Ri(o,"name",{value:e,configurable:!0});function gt(o){const e=f.forwardRef((t,n)=>{let{children:r,...i}=t,s=null,a=!1;const l=[];it(r)&&typeof Fe=="function"&&(r=Fe(r._payload)),f.Children.forEach(r,m=>{if(Ao(m)){a=!0;const g=m;let p="child"in g.props?g.props.child:g.props.children;it(p)&&typeof Fe=="function"&&(p=Fe(p._payload)),s=Li(g,p),l.push(s?.props?.children)}else l.push(m)}),s?s=f.cloneElement(s,void 0,l):!a&&f.Children.count(r)===1&&f.isValidElement(r)&&(s=r);const c=s?jo(s):void 0,u=pe(n,c);if(!s){if(r||r===0)throw new Error(a?ji(o):Ii(o));return r}const d=Io(i,s.props??{});return s.type!==f.Fragment&&(d.ref=n?u:c),f.cloneElement(s,d)});return e.displayName=`${o}.Slot`,e}U(gt,"createSlot");var No=Symbol.for("radix.slottable");function Fi(o){const e=U(t=>"child"in t?t.children(t.child):t.children,"Slottable");return e.displayName=`${o}.Slottable`,e.__radixId=No,e}U(Fi,"createSlottable");var Li=U((o,e)=>{if("child"in o.props){const t=o.props.child;return f.isValidElement(t)?f.cloneElement(t,void 0,o.props.children(t.props.children)):null}return f.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function Io(o,e){const t={...e};for(const n in e){const r=o[n],i=e[n];/^on[A-Z]/.test(n)?r&&i?t[n]=(...a)=>{const l=i(...a);return r(...a),l}:r&&(t[n]=r):n==="style"?t[n]={...r,...i}:n==="className"&&(t[n]=[r,i].filter(Boolean).join(" "))}return{...o,...t}}U(Io,"mergeProps");function jo(o){let e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?o.ref:(e=Object.getOwnPropertyDescriptor(o,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?o.props.ref:o.props.ref||o.ref)}U(jo,"getElementRef");function Ao(o){return f.isValidElement(o)&&typeof o.type=="function"&&"__radixId"in o.type&&o.type.__radixId===No}U(Ao,"isSlottable");var Ni=Symbol.for("react.lazy");function it(o){return o!=null&&typeof o=="object"&&"$$typeof"in o&&o.$$typeof===Ni&&"_payload"in o&&_o(o._payload)}U(it,"isLazyComponent");function _o(o){return typeof o=="object"&&o!==null&&"then"in o}U(_o,"isPromiseLike");var Ii=U(o=>`${o} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ji=U(o=>`${o} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Fe=De[" use ".trim().toString()],Ai=Object.defineProperty,_i=(o,e)=>Ai(o,"name",{value:e,configurable:!0}),Mi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Q=Mi.reduce((o,e)=>{const t=gt(`Primitive.${e}`),n=f.forwardRef((r,i)=>{const{asChild:s,...a}=r,l=s?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...o,[e]:n}},{});function Mo(o,e){o&&no.flushSync(()=>o.dispatchEvent(e))}_i(Mo,"dispatchDiscreteCustomEvent");var Ui=Object.defineProperty,$i=(o,e)=>Ui(o,"name",{value:e,configurable:!0});function ce(o){const e=f.useRef(o);return f.useEffect(()=>{e.current=o}),f.useMemo(()=>((...t)=>e.current?.(...t)),[])}$i(ce,"useCallbackRef");var Bi=Object.defineProperty,R=(o,e)=>Bi(o,"name",{value:e,configurable:!0}),st="dismissableLayer.update",Hi="dismissableLayer.pointerDownOutside",Vi="dismissableLayer.focusOutside",Zt,Uo=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Wi=f.forwardRef(R(function(e,t){const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=e,d=f.useContext(Uo),[m,g]=f.useState(null),p=m?.ownerDocument??globalThis?.document,[,v]=f.useState({}),b=pe(t,g),S=Array.from(d.layers),[T]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=T?S.indexOf(T):-1,C=m?S.indexOf(m):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,D=C>=y,E=f.useRef(!1),F=Bo(P=>{s?.(P),l?.(P),P.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:f.useCallback(P=>{if(!(P instanceof Node))return!1;const O=[...d.branches].some(j=>j.contains(P));return D&&!O},[d.branches,D])}),I=Ho(P=>{if(r&&E.current)return;const O=P.target;[...d.branches].some(ke=>ke.contains(O))||(a?.(P),l?.(P),P.defaultPrevented||c?.())},p),L=m?C===S.length-1:!1,fe=ce(P=>{P.key==="Escape"&&(i?.(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))});return f.useEffect(()=>{if(L)return p.addEventListener("keydown",fe,{capture:!0}),()=>p.removeEventListener("keydown",fe,{capture:!0})},[p,L,fe]),f.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Zt=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),at(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(m),d.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Zt))}},[m,p,n,d]),f.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),at())},[m,d]),f.useEffect(()=>{const P=R(()=>v({}),"handleUpdate");return document.addEventListener(st,P),()=>document.removeEventListener(st,P)},[]),h.jsx(Q.div,{...u,ref:b,style:{pointerEvents:w?D?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,I.onFocusCapture),onBlurCapture:K(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,F.onPointerDownCapture)})},"DismissableLayer"));function $o(){const o=f.useContext(Uo),[e,t]=f.useState(null);return f.useEffect(()=>{if(e)return o.dismissableSurfaces.add(e),()=>{o.dismissableSurfaces.delete(e)}},[e,o.dismissableSurfaces]),t}R($o,"useDismissableLayerSurface");var Xi=R(()=>!0,"IS_TRUE");function Bo(o,e){const{ownerDocument:t=globalThis?.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:i,shouldHandlePointerDownOutside:s=Xi}=e,a=ce(o),l=f.useRef(!1),c=f.useRef(!1),u=f.useRef(new Map),d=f.useRef(()=>{});return f.useEffect(()=>{function m(){c.current=!1,r.current=!1,u.current.clear()}R(m,"resetOutsideInteraction");function g(){return Array.from(u.current.values()).some(Boolean)}R(g,"isOutsideInteractionIntercepted");function p(y){if(!c.current)return;const C=y.target;C instanceof Node&&[...i].some(D=>D.contains(C))||u.current.set(y.type,!0),y.type==="click"&&window.setTimeout(()=>{c.current&&d.current()},0)}R(p,"handleInteractionCapture");function v(y){c.current&&u.current.set(y.type,!1)}R(v,"handleInteractionBubble");const b=R(y=>{if(y.target&&!l.current){let C=function(){t.removeEventListener("click",d.current);const D=g();m(),D||yt(Hi,a,w,{discrete:!0})};if(R(C,"handleAndDispatchPointerDownOutsideEvent"),!s(y.target)){t.removeEventListener("click",d.current),m(),l.current=!1;return}const w={originalEvent:y};c.current=!0,r.current=n&&y.button===0,u.current.clear(),!n||y.button!==0?C():(t.removeEventListener("click",d.current),d.current=C,t.addEventListener("click",d.current,{once:!0}))}else t.removeEventListener("click",d.current),m();l.current=!1},"handlePointerDown"),S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const y of S)t.addEventListener(y,p,!0),t.addEventListener(y,v);const T=window.setTimeout(()=>{t.addEventListener("pointerdown",b)},0);return()=>{window.clearTimeout(T),t.removeEventListener("pointerdown",b),t.removeEventListener("click",d.current);for(const y of S)t.removeEventListener(y,p,!0),t.removeEventListener(y,v)}},[t,a,n,r,i,s]),{onPointerDownCapture:R(()=>l.current=!0,"onPointerDownCapture")}}R(Bo,"usePointerDownOutside");function Ho(o,e=globalThis?.document){const t=ce(o),n=f.useRef(!1);return f.useEffect(()=>{const r=R(i=>{i.target&&!n.current&&yt(Vi,t,{originalEvent:i},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,t]),{onFocusCapture:R(()=>n.current=!0,"onFocusCapture"),onBlurCapture:R(()=>n.current=!1,"onBlurCapture")}}R(Ho,"useFocusOutside");function at(){const o=new CustomEvent(st);document.dispatchEvent(o)}R(at,"dispatchUpdate");function yt(o,e,t,{discrete:n}){const r=t.originalEvent.target,i=new CustomEvent(o,{bubbles:!1,cancelable:!0,detail:t});e&&r.addEventListener(o,e,{once:!0}),n?Mo(r,i):r.dispatchEvent(i)}R(yt,"handleAndDispatchCustomEvent");var zi=Object.defineProperty,N=(o,e)=>zi(o,"name",{value:e,configurable:!0}),Je="focusScope.autoFocusOnMount",Ze="focusScope.autoFocusOnUnmount",Qt={bubbles:!1,cancelable:!0},Gi=f.forwardRef(N(function(e,t){const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[l,c]=f.useState(null),u=ce(i),d=ce(s),m=f.useRef(null),g=pe(t,c),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let b=function(C){if(p.paused||!l)return;const w=C.target;l.contains(w)?m.current=w:W(m.current,{select:!0})},S=function(C){if(p.paused||!l)return;const w=C.relatedTarget;w!==null&&(l.contains(w)||W(m.current,{select:!0}))},T=function(C){if(document.activeElement===document.body)for(const D of C)D.removedNodes.length>0&&W(l)};N(b,"handleFocusIn"),N(S,"handleFocusOut"),N(T,"handleMutations"),document.addEventListener("focusin",b),document.addEventListener("focusout",S);const y=new MutationObserver(T);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",S),y.disconnect()}}},[r,l,p.paused]),f.useEffect(()=>{if(l){eo.add(p);const b=document.activeElement;if(!l.contains(b)){const T=new CustomEvent(Je,Qt);l.addEventListener(Je,u),l.dispatchEvent(T),T.defaultPrevented||(Vo(Ko(wt(l)),{select:!0}),document.activeElement===b&&W(l))}return()=>{l.removeEventListener(Je,u),setTimeout(()=>{const T=new CustomEvent(Ze,Qt);l.addEventListener(Ze,d),l.dispatchEvent(T),T.defaultPrevented||W(b??document.body,{select:!0}),l.removeEventListener(Ze,d),eo.remove(p)},0)}}},[l,u,d,p]);const v=f.useCallback(b=>{if(!n&&!r||p.paused)return;const S=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,T=document.activeElement;if(S&&T){const y=b.currentTarget,[C,w]=Wo(y);C&&w?!b.shiftKey&&T===w?(b.preventDefault(),n&&W(C,{select:!0})):b.shiftKey&&T===C&&(b.preventDefault(),n&&W(w,{select:!0})):T===y&&b.preventDefault()}},[n,r,p.paused]);return h.jsx(Q.div,{tabIndex:-1,...a,ref:g,onKeyDown:v})},"FocusScope"));function Vo(o,{select:e=!1}={}){const t=document.activeElement;for(const n of o)if(W(n,{select:e}),document.activeElement!==t)return}N(Vo,"focusFirst");function Wo(o){const e=wt(o),t=lt(e,o),n=lt(e.reverse(),o);return[t,n]}N(Wo,"getTabbableEdges");function wt(o){const e=[],t=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:N(n=>{const r=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||r?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;t.nextNode();)e.push(t.currentNode);return e}N(wt,"getTabbableCandidates");function lt(o,e){const t=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const n of o)if(!(t?!n.checkVisibility({checkVisibilityCSS:!0}):Xo(n,{upTo:e})))return n}N(lt,"findVisible");function Xo(o,{upTo:e}){if(getComputedStyle(o).visibility==="hidden")return!0;for(;o;){if(e!==void 0&&o===e)return!1;if(getComputedStyle(o).display==="none")return!0;o=o.parentElement}return!1}N(Xo,"isHidden");function zo(o){return o instanceof HTMLInputElement&&"select"in o}N(zo,"isSelectableInput");function W(o,{select:e=!1}={}){if(o&&o.focus){const t=document.activeElement;o.focus({preventScroll:!0}),o!==t&&zo(o)&&e&&o.select()}}N(W,"focus");var eo=Go();function Go(){let o=[];return{add(e){const t=o[0];e!==t&&t?.pause(),o=ct(o,e),o.unshift(e)},remove(e){o=ct(o,e),o[0]?.resume()}}}N(Go,"createFocusScopesStack");function ct(o,e){const t=[...o],n=t.indexOf(e);return n!==-1&&t.splice(n,1),t}N(ct,"arrayRemove");function Ko(o){return o.filter(e=>e.tagName!=="A")}N(Ko,"removeLinks");var Ki=Object.defineProperty,Yi=(o,e)=>Ki(o,"name",{value:e,configurable:!0}),qi=f.forwardRef(Yi(function(e,t){const{container:n,...r}=e,[i,s]=f.useState(!1);Y(()=>s(!0),[]);const a=n||i&&globalThis?.document?.body;return a?no.createPortal(h.jsx(Q.div,{...r,ref:t}),a):null},"Portal")),Ji=Object.defineProperty,X=(o,e)=>Ji(o,"name",{value:e,configurable:!0});function Yo(o,e){return f.useReducer((t,n)=>e[t][n]??t,o)}X(Yo,"useStateMachine");var vt=X(o=>{const{present:e,children:t}=o,n=qo(e),r=typeof t=="function"?t({present:n.isPresent}):f.Children.only(t),i=Jo(n.ref,Zo(r));return typeof t=="function"||n.isPresent?f.cloneElement(r,{ref:i}):null},"Presence");function qo(o){const[e,t]=f.useState(),n=f.useRef(null),r=f.useRef(o),i=f.useRef("none"),s=f.useRef(void 0),a=o?"mounted":"unmounted",[l,c]=Yo(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{l==="mounted"?(i.current=s.current??ie(n.current),s.current=void 0):i.current="none"},[l]),Y(()=>{const u=n.current,d=r.current;if(d!==o){const g=i.current,p=ie(u);o?(s.current=p,c("MOUNT")):p==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&g!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=o}},[o,c]),Y(()=>{if(e){let u;const d=e.ownerDocument.defaultView??window,m=X(p=>{const b=ie(n.current).includes(CSS.escape(p.animationName));if(p.target===e&&b&&(c("ANIMATION_END"),!r.current)){const S=e.style.animationFillMode;e.style.animationFillMode="forwards",u=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=S)})}},"handleAnimationEnd"),g=X(p=>{p.target===e&&(i.current=ie(n.current))},"handleAnimationStart");return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{d.clearTimeout(u),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{if(u){const d=getComputedStyle(u);n.current=d,s.current=ie(d)}else n.current=null;t(u)},[])}}X(qo,"usePresence");function dt(o,e){if(typeof o=="function")return o(e);o!=null&&(o.current=e)}X(dt,"setRef");function Jo(...o){const e=f.useRef(o);return e.current=o,f.useCallback(t=>{const n=e.current;let r=!1;const i=n.map(s=>{const a=dt(s,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<i.length;s++){const a=i[s];typeof a=="function"?a():dt(n[s],null)}}},[])}X(Jo,"useStableComposedRefs");function ie(o){return o?.animationName||"none"}X(ie,"getAnimationName");function Zo(o){let e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?o.ref:(e=Object.getOwnPropertyDescriptor(o,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?o.props.ref:o.props.ref||o.ref)}X(Zo,"getElementRef");var Zi=Object.defineProperty,bt=(o,e)=>Zi(o,"name",{value:e,configurable:!0}),Le=0,oe=null;function Qi(o){return Ct(),o.children}bt(Qi,"FocusGuards");function Ct(){f.useEffect(()=>{oe||(oe={start:ut(),end:ut()});const{start:o,end:e}=oe;return document.body.firstElementChild!==o&&document.body.insertAdjacentElement("afterbegin",o),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),Le++,()=>{Le===1&&(oe?.start.remove(),oe?.end.remove(),oe=null),Le=Math.max(0,Le-1)}},[])}bt(Ct,"useFocusGuards");function ut(){const o=document.createElement("span");return o.setAttribute("data-radix-focus-guard",""),o.tabIndex=0,o.style.outline="none",o.style.opacity="0",o.style.position="fixed",o.style.pointerEvents="none",o}bt(ut,"createFocusGuard");var es=function(o){if(typeof document>"u")return null;var e=Array.isArray(o)?o[0]:o;return e.ownerDocument.body},ne=new WeakMap,Ne=new WeakMap,Ie={},Qe=0,Qo=function(o){return o&&(o.host||Qo(o.parentNode))},ts=function(o,e){return e.map(function(t){if(o.contains(t))return t;var n=Qo(t);return n&&o.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",o,". Doing nothing"),null)}).filter(function(t){return!!t})},os=function(o,e,t,n){var r=ts(e,Array.isArray(o)?o:[o]);Ie[t]||(Ie[t]=new WeakMap);var i=Ie[t],s=[],a=new Set,l=new Set(r),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};r.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(m){if(a.has(m))u(m);else try{var g=m.getAttribute(n),p=g!==null&&g!=="false",v=(ne.get(m)||0)+1,b=(i.get(m)||0)+1;ne.set(m,v),i.set(m,b),s.push(m),v===1&&p&&Ne.set(m,!0),b===1&&m.setAttribute(t,"true"),p||m.setAttribute(n,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return u(e),a.clear(),Qe++,function(){s.forEach(function(d){var m=ne.get(d)-1,g=i.get(d)-1;ne.set(d,m),i.set(d,g),m||(Ne.has(d)||d.removeAttribute(n),Ne.delete(d)),g||d.removeAttribute(t)}),Qe--,Qe||(ne=new WeakMap,ne=new WeakMap,Ne=new WeakMap,Ie={})}},ns=function(o,e,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(o)?o:[o]),r=es(o);return r?(n.push.apply(n,Array.from(r.querySelectorAll("[aria-live], script"))),os(n,r,t,"aria-hidden")):function(){return null}},rs=Object.defineProperty,M=(o,e)=>rs(o,"name",{value:e,configurable:!0}),Tt="Dialog",[en,Ns]=ko(Tt),[is,H]=en(Tt),ss=M(o=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:r,onOpenChange:i,modal:s=!0}=o,a=f.useRef(null),l=f.useRef(null),[c,u]=Ro({prop:n,defaultProp:r??!1,onChange:i,caller:Tt}),[d,m]=f.useState(0),[g,p]=f.useState(0);return h.jsx(is,{scope:e,triggerRef:a,contentRef:l,contentId:Me(),titleId:Me(),descriptionId:Me(),titlePresent:d>0,descriptionPresent:g>0,setTitleCount:m,setDescriptionCount:p,open:c,onOpenChange:u,onOpenToggle:f.useCallback(()=>u(v=>!v),[u]),modal:s,children:t})},"Dialog"),tn="DialogPortal",[as,on]=en(tn,{forceMount:void 0}),ls=M(o=>{const{__scopeDialog:e,forceMount:t,children:n,container:r}=o,i=H(tn,e);return h.jsx(as,{scope:e,forceMount:t,children:f.Children.map(n,s=>h.jsx(vt,{present:t||i.open,children:h.jsx(qi,{asChild:!0,container:r,children:s})}))})},"DialogPortal"),pt="DialogOverlay",cs=f.forwardRef(M(function(e,t){const n=on(pt,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=H(pt,e.__scopeDialog);return s.modal?h.jsx(vt,{present:r||s.open,children:h.jsx(us,{...i,ref:t})}):null},"DialogOverlay")),ds=gt("DialogOverlay.RemoveScroll"),us=f.forwardRef(M(function(e,t){const{__scopeDialog:n,...r}=e,i=H(pt,n),s=$o(),a=pe(t,s);return h.jsx(an,{as:ds,allowPinchZoom:!0,shards:[i.contentRef],children:h.jsx(Q.div,{"data-state":xt(i.open),...r,ref:a,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),xe="DialogContent",ps=f.forwardRef(M(function(e,t){const n=on(xe,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=H(xe,e.__scopeDialog);return h.jsx(vt,{present:r||s.open,children:s.modal?h.jsx(fs,{...i,ref:t}):h.jsx(hs,{...i,ref:t})})},"DialogContent")),fs=f.forwardRef(M(function(e,t){const n=H(xe,e.__scopeDialog),r=f.useRef(null),i=pe(t,n.contentRef,r);return f.useEffect(()=>{const s=r.current;if(s)return ns(s)},[]),h.jsx(nn,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&s.preventDefault()}),onFocusOutside:K(e.onFocusOutside,s=>s.preventDefault())})},"DialogContentModal")),hs=f.forwardRef(M(function(e,t){const n=H(xe,e.__scopeDialog),r=f.useRef(!1),i=f.useRef(!1);return h.jsx(nn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})},"DialogContentNonModal")),nn=f.forwardRef(M(function(e,t){const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,l=H(xe,n);return Ct(),h.jsx(h.Fragment,{children:h.jsx(Gi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:h.jsx(Wi,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":xt(l.open),...a,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),ms="DialogTitle",gs=f.forwardRef(M(function(e,t){const{__scopeDialog:n,...r}=e,i=H(ms,n),{setTitleCount:s}=i;return Y(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),h.jsx(Q.h2,{id:i.titleId,...r,ref:t})},"DialogTitle")),ys="DialogDescription",ws=f.forwardRef(M(function(e,t){const{__scopeDialog:n,...r}=e,i=H(ys,n),{setDescriptionCount:s}=i;return Y(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),h.jsx(Q.p,{id:i.descriptionId,...r,ref:t})},"DialogDescription")),vs="DialogClose",bs=f.forwardRef(M(function(e,t){const{__scopeDialog:n,...r}=e,i=H(vs,n);return h.jsx(Q.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>i.onOpenChange(!1))})},"DialogClose"));function xt(o){return o?"open":"closed"}M(xt,"getState");function Dt({open:o,title:e,description:t,onOpenChange:n,children:r,footer:i,wide:s,extraWide:a,className:l,draggable:c=!1}){const{t:u}=z(),d=f.useRef(null),m=f.useRef(null),[g,p]=f.useState({x:0,y:0}),[v,b]=f.useState(!1);f.useEffect(()=>{o||(m.current=null,b(!1),p({x:0,y:0}))},[o]);const S=w=>{!c||w.button!==0||w.pointerType==="touch"||Cs(w.target)||(m.current={pointerId:w.pointerId,clientX:w.clientX,clientY:w.clientY,...g},w.currentTarget.setPointerCapture(w.pointerId),b(!0),w.preventDefault())},T=w=>{const D=m.current;if(!D||D.pointerId!==w.pointerId)return;const E=d.current;if(!E)return;const F=E.getBoundingClientRect(),I=Math.max(0,(window.innerWidth-F.width)/2-12),L=Math.max(0,(window.innerHeight-F.height)/2-12);p({x:to(D.x+w.clientX-D.clientX,-I,I),y:to(D.y+w.clientY-D.clientY,-L,L)})},y=w=>{m.current?.pointerId===w.pointerId&&(m.current=null,b(!1),w.currentTarget.hasPointerCapture(w.pointerId)&&w.currentTarget.releasePointerCapture(w.pointerId))},C=c?{"--dialog-drag-x":`${g.x}px`,"--dialog-drag-y":`${g.y}px`}:void 0;return h.jsx(ss,{open:o,onOpenChange:n,children:h.jsxs(ls,{children:[h.jsx(cs,{className:"dialog-overlay"}),h.jsxs(ps,{ref:d,style:C,"data-dragging":v||void 0,className:`dialog-content${s?" dialog-wide":""}${a?" dialog-extra-wide":""}${c?" dialog-draggable":""}${l?` ${l}`:""}`,children:[h.jsxs("div",{className:`dialog-header${c?" dialog-drag-handle":""}`,onPointerDown:S,onPointerMove:T,onPointerUp:y,onPointerCancel:y,onLostPointerCapture:y,children:[h.jsxs("div",{children:[h.jsx(gs,{children:e}),t&&h.jsx(ws,{children:t})]}),h.jsx(bs,{className:"dialog-close","aria-label":u("common.close"),children:"×"})]}),h.jsx("div",{className:"dialog-body",children:r}),i&&h.jsx("div",{className:"dialog-footer",children:i})]})]})})}function Cs(o){return o instanceof Element&&!!o.closest("button, a, input, select, textarea, [data-dialog-no-drag]")}function to(o,e,t){return Math.max(e,Math.min(t,o))}function Is({open:o,title:e,description:t,confirmLabel:n,danger:r,onCancel:i,onConfirm:s,error:a,busy:l=!1}){const{t:c}=z();return h.jsx(Dt,{open:o,title:e,description:t,onOpenChange:u=>{!u&&!l&&i()},footer:h.jsxs(h.Fragment,{children:[h.jsx("button",{disabled:l,onClick:i,children:c("common.cancel")}),h.jsxs("button",{className:r?"danger":"primary",disabled:l,"aria-busy":l,onClick:s,children:[l&&h.jsx(To,{className:"spin",size:14}),n??c("common.remove")]})]}),children:h.jsxs(h.Fragment,{children:[a&&h.jsx("p",{className:"error dialog-error",children:a}),h.jsx("div",{})]})})}class Xe extends f.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("Uncaught error in component tree:",e,t)}handleReset=()=>{this.setState({hasError:!1,error:null}),this.props.onReset?.()};render(){return this.state.hasError?typeof this.props.fallback=="function"?this.props.fallback(this.state.error??new Error("Unknown error"),this.handleReset):this.props.fallback?this.props.fallback:h.jsxs("div",{role:"alert",style:{padding:"2rem",margin:"1rem",borderRadius:"8px",backgroundColor:"var(--bg-secondary, #f8f9fa)",border:"1px solid var(--border-color, #e9ecef)",color:"var(--text-primary, #212529)",fontFamily:"system-ui, -apple-system, sans-serif"},children:[h.jsx("h2",{style:{fontSize:"1.25rem",fontWeight:600,marginBottom:"0.5rem",color:"#dc3545"},children:this.props.title??k.t("errors.boundaryTitle")}),h.jsx("p",{style:{fontSize:"0.9rem",color:"var(--text-secondary, #6c757d)",marginBottom:"1rem"},children:k.t("errors.boundaryDescription")}),h.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[h.jsx("button",{type:"button",onClick:this.handleReset,className:"primary",style:{padding:"0.4rem 0.8rem",borderRadius:"4px",cursor:"pointer"},children:k.t("errors.boundaryRetry")}),h.jsx("button",{type:"button",onClick:()=>window.location.reload(),style:{padding:"0.4rem 0.8rem",borderRadius:"4px",cursor:"pointer"},children:k.t("errors.boundaryReload")})]})]}):this.props.children}}function St({compact:o=!1}){const{t:e}=z();return h.jsxs("div",{className:`lazy-load-state${o?" compact":""}`,role:"status","aria-live":"polite",children:[h.jsx(To,{className:"spin",size:o?15:18}),h.jsx("span",{children:e("common.loading")})]})}function Et({onClose:o,compact:e=!1}){const{t}=z();return h.jsxs("div",{className:`lazy-load-state lazy-load-error${e?" compact":""}`,role:"alert",children:[h.jsx("span",{children:t("errors.boundaryDescription")}),h.jsxs("div",{className:"lazy-load-actions",children:[o&&h.jsx("button",{type:"button",onClick:o,children:t("common.close")}),h.jsx("button",{type:"button",className:"primary",onClick:()=>window.location.reload(),children:t("common.reload")})]})]})}function Ts({title:o,onClose:e}){return h.jsx(Dt,{open:!0,title:o,onOpenChange:t=>{t||e()},children:h.jsx(Et,{onClose:e})})}function oo({children:o,onClose:e}){return h.jsx(Xe,{fallback:h.jsx(Et,{onClose:e}),children:h.jsx(f.Suspense,{fallback:h.jsx(St,{}),children:o})})}function js({title:o,onClose:e,children:t}){const n=h.jsx(Dt,{open:!0,title:o,onOpenChange:i=>{i||e()},children:h.jsx(St,{})}),r=h.jsx(Ts,{title:o,onClose:e});return h.jsx(Xe,{fallback:r,children:h.jsx(f.Suspense,{fallback:n,children:t})})}function As({children:o,onClose:e}){return h.jsx(Xe,{fallback:h.jsx(Et,{onClose:e,compact:!0}),children:h.jsx(f.Suspense,{fallback:h.jsx(St,{compact:!0}),children:o})})}const rn=()=>ht(()=>import("./Dashboard-BB4RO4x2.js").then(o=>o.D),__vite__mapDeps([11,1,12,7,13,14]),import.meta.url),xs=f.lazy(()=>rn().then(o=>({default:o.Dashboard}))),Ds=f.lazy(()=>_e().then(o=>({default:o.ProjectWorkspace})));function je(o){o().catch(()=>{})}function Ss(){const{t:o}=z(),[e,t]=f.useState(null),[n,r]=f.useState(),i=f.useRef(n);i.current=n;const[s,a]=f.useState(()=>typeof window>"u"?null:G(window.location.pathname)),[l,c]=f.useState(()=>typeof window>"u"?null:we(window.location.search)),[u,d]=f.useState(null),[m,g]=f.useState(null),p=()=>{const y=G(window.location.pathname);if(!y)return;const C={texliteRoute:"dashboard"};window.history.replaceState(C,"",si(y,we(window.location.search))),a(null),c(null),d(null)},v=y=>{const C=!y.mustChangePassword,w=ai(window.location.search),D=li(window.location.search);let E=null;if(w){const F={texliteRoute:"project",projectId:w,fromDashboard:!1};window.history.replaceState(F,"",re(w,D)),a(w),c(D),E=w}else if(new URLSearchParams(window.location.search).has("return")){const F={texliteRoute:"dashboard"};window.history.replaceState(F,"",ae("/")),a(null),c(null)}else G(window.location.pathname)&&(E=G(window.location.pathname));C&&E?(je(_e),d(qe(E))):C?je(rn):d(null),r(y)};f.useEffect(()=>{const y=G(window.location.pathname),C=we(window.location.search);if(y&&`${window.location.pathname}${window.location.search}`!==re(y,C)){const E={texliteRoute:"project",projectId:y,fromDashboard:!1};window.history.replaceState(E,"",re(y,C))}const w=()=>{const E=G(window.location.pathname);a(E),c(E?we(window.location.search):null);const F=i.current;E&&F&&!F.mustChangePassword?(je(_e),d(qe(E))):d(null)},D=()=>{g(null),r(null),p()};return window.addEventListener("popstate",w),window.addEventListener("texlite:session-expired",D),()=>{window.removeEventListener("popstate",w),window.removeEventListener("texlite:session-expired",D)}},[]);const b=(y,C)=>{const w=re(y,C);if(`${window.location.pathname}${window.location.search}`!==w){const D={texliteRoute:"project",projectId:y,fromDashboard:!0};window.history.pushState(D,"",w)}je(_e),d(qe(y)),a(y),c(C??null)},S=()=>{const y=window.history.state;if(Gt(y)&&y.fromDashboard){window.history.back();return}const C={texliteRoute:"dashboard"};window.history.replaceState(C,"",ae("/")),a(null),c(null),d(null)};if(f.useEffect(()=>{le("/api/config").then(y=>{t(y),document.title=y.siteName}),le("/api/me",{suppressSessionExpired:!0}).then(({user:y})=>v(y)).catch(()=>{p(),r(null)})},[]),f.useEffect(()=>{if(!n||n.mustChangePassword||s)return;let y=!1,C=null,w=null;const D=()=>{y||go().then(F=>F.preloadPdfRuntime()).catch(()=>{})},E=window;return E.requestIdleCallback?w=E.requestIdleCallback(D,{timeout:1200}):C=window.setTimeout(D,400),()=>{y=!0,C!==null&&window.clearTimeout(C),w!==null&&E.cancelIdleCallback?.(w)}},[n?.id,n?.mustChangePassword,s]),n===void 0||!e)return h.jsx("div",{className:"center-card",children:o("common.loading")});if(!n)return h.jsx(ui,{site:e,onLogin:v});if(n.mustChangePassword)return h.jsx(di,{site:e,user:n,onChanged:y=>r(y)});if(s)return h.jsx(oo,{onClose:S,children:h.jsx(Ds,{site:e,user:n,projectId:s,preload:u?.projectId===s?u:null,mentionId:l,onMentionTargeted:()=>{const y=window.history.state,C=Gt(y)?{...y,projectId:s}:{texliteRoute:"project",projectId:s,fromDashboard:!1};window.history.replaceState(C,"",re(s)),c(null)},onMentionsRead:(y,C)=>g(w=>w&&w.userId===n.id?{...w,projects:w.projects.map(D=>D.id===s?{...D,unreadMentionCount:C?0:Math.max(0,(D.unreadMentionCount??0)-y)}:D)}:w),onBack:S},s)},`project:${s}`);const T=m?.userId===n.id?m:null;return h.jsx(oo,{children:h.jsx(xs,{site:e,user:n,initialData:T?{projects:T.projects,tags:T.tags,pagination:T.pagination}:null,onDataChange:(y,C,w)=>g({userId:n.id,projects:y,tags:C,pagination:w}),onUser:y=>{(!y||y.id!==n.id)&&g(null),r(y),y||S()},onOpenProject:b})},"dashboard")}const de="data-texlite-tooltip-title",Es=`[data-tooltip], [title], [${de}]`,ks='[data-texlite-tooltips="off"]',Ps="[data-texlite-tooltip-always]";function et(o,e){const t=Math.min(160,Math.max(16,(e-16)/2)),n=o.left+o.width/2,r=Math.max(t,Math.min(n,e-t)),i=o.top>=64?"above":"below";return{left:r,top:i==="above"?o.top-8:o.bottom+8,placement:i}}function Ue(o){return(o.getAttribute("data-tooltip")??o.getAttribute("title")??o.getAttribute(de))?.trim()||null}function ye(o){if(!(o instanceof Element))return null;const e=o.closest(Es);return e&&Ue(e)?e:null}function Os(o){return!!o?.closest(ks)&&!o?.closest(Ps)}function ft(o){return Os(o)}function tt(o){const e=o.getAttribute("title");e===null||o.hasAttribute(de)||(o.setAttribute(de,e),o.removeAttribute("title"))}function Ae(o){if(!o||ft(o))return;const e=o.getAttribute(de);e!==null&&(o.hasAttribute("title")||o.setAttribute("title",e),o.removeAttribute(de))}function Rs(){const o=f.useRef(null),[e,t]=f.useState(null);return f.useEffect(()=>{let n=null,r=null;const i=()=>{n=null,r=null,Ae(o.current),o.current=null,t(null)},s=()=>{const p=n??r;if(p&&ft(p)){p!==o.current&&Ae(o.current),o.current=p,tt(p),t(null);return}if(p===o.current){if(!p)return;const b=Ue(p);if(!b)return;t({text:b,...et(p.getBoundingClientRect(),window.innerWidth)});return}if(Ae(o.current),o.current=p,!p){t(null);return}const v=Ue(p);if(!v){t(null);return}tt(p),t({text:v,...et(p.getBoundingClientRect(),window.innerWidth)})},a=()=>{const p=o.current;if(!p)return;if(ft(p)){tt(p),t(null);return}const v=Ue(p);v&&t({text:v,...et(p.getBoundingClientRect(),window.innerWidth)})},l=(p,v)=>v instanceof Node&&p.contains(v),c=p=>{n=ye(p.target),s()},u=p=>{const v=ye(p.target);!v||v!==n||ye(p.relatedTarget)===v||l(v,p.relatedTarget)||(n=null,s())},d=p=>{r=ye(p.target),s()},m=p=>{const v=ye(p.target);!v||v!==r||l(v,p.relatedTarget)||(r=null,s())};document.addEventListener("pointerover",c,!0),document.addEventListener("pointerout",u,!0),document.addEventListener("focusin",d,!0),document.addEventListener("focusout",m,!0),document.addEventListener("click",i,!0),window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),window.addEventListener("blur",i),window.addEventListener("pagehide",i),window.addEventListener("popstate",i);const g=new MutationObserver(s);return g.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-texlite-tooltips"]}),()=>{document.removeEventListener("pointerover",c,!0),document.removeEventListener("pointerout",u,!0),document.removeEventListener("focusin",d,!0),document.removeEventListener("focusout",m,!0),document.removeEventListener("click",i,!0),window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0),window.removeEventListener("blur",i),window.removeEventListener("pagehide",i),window.removeEventListener("popstate",i),g.disconnect(),Ae(o.current),o.current=null}},[]),e?h.jsx("div",{id:"texlite-global-tooltip",role:"tooltip",className:`global-tooltip ${e.placement}`,style:{left:e.left,top:e.top},children:e.text}):null}ln.createRoot(document.getElementById("root")).render(h.jsxs(f.StrictMode,{children:[h.jsx(Rs,{}),h.jsx(Xe,{children:h.jsx(Ss,{})})]}));export{Ce as A,Is as C,wo as L,Dt as M,vo as S,ht as _,ae as a,oo as b,mi as c,To as d,js as e,bo as f,le as g,yo as h,k as i,go as j,As as k,ri as l,oi as n,ho as r,Ls as s};