From cf863ccac05fc3f12f9a1bcc42d35fe7dd91b0fa Mon Sep 17 00:00:00 2001 From: Daniel Kim Date: Wed, 14 Oct 2026 19:56:44 +0000 Subject: [PATCH 1/4] fix: keep sidebar chat menus above virtualized rows (OR-505) --- ...iew-DP0KB09M.js => PdfPreview-D9ODVenE.js} | 2 +- .../{index-Cs8E9A-x.js => index-BT1BW2gt.js} | 126 +++++++++--------- ui/dist/assets/index-BpV2q0ka.css | 1 - ui/dist/assets/index-D0DbaiG9.css | 1 + ui/dist/index.html | 4 +- ui/src/components/ChatPanel.tsx | 32 ++++- ui/tests/sidebar-layout.test.mjs | 48 +++++++ 7 files changed, 142 insertions(+), 72 deletions(-) rename ui/dist/assets/{PdfPreview-DP0KB09M.js => PdfPreview-D9ODVenE.js} (99%) rename ui/dist/assets/{index-Cs8E9A-x.js => index-BT1BW2gt.js} (90%) delete mode 100644 ui/dist/assets/index-BpV2q0ka.css create mode 100644 ui/dist/assets/index-D0DbaiG9.css diff --git a/ui/dist/assets/PdfPreview-DP0KB09M.js b/ui/dist/assets/PdfPreview-D9ODVenE.js similarity index 99% rename from ui/dist/assets/PdfPreview-DP0KB09M.js rename to ui/dist/assets/PdfPreview-D9ODVenE.js index 0bef360ce..eb151195f 100644 --- a/ui/dist/assets/PdfPreview-DP0KB09M.js +++ b/ui/dist/assets/PdfPreview-D9ODVenE.js @@ -1,4 +1,4 @@ -var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-Cs8E9A-x.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جست‌وجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",A1=()=>"문서에서 찾기",x1=()=>"文書内を検索",S1=()=>"Znajdź w dokumencie",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():t==="ko"?A1():t==="ja"?x1():t==="pl"?S1():m1()}),T1=()=>"Fit to width",C1=()=>"适应宽度",P1=()=>"متناسب با عرض",I1=()=>"ملاءمة العرض",R1=()=>"Ajustar al ancho",O1=()=>"चौड़ाई में फ़िट करें",M1=()=>"너비에 맞추기",D1=()=>"幅に合わせる",L1=()=>"Dopasuj do szerokości",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?C1():t==="fa"?P1():t==="ar"?I1():t==="es"?R1():t==="hi"?O1():t==="ko"?M1():t==="ja"?D1():t==="pl"?L1():T1()}),N1=()=>"Next match",F1=()=>"下一个匹配项",k1=()=>"مورد بعدی",B1=()=>"التطابق التالي",j1=()=>"Coincidencia siguiente",U1=()=>"अगला मिलान",$1=()=>"다음 일치 항목",H1=()=>"次の一致",V1=()=>"Następne dopasowanie",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?F1():t==="fa"?k1():t==="ar"?B1():t==="es"?j1():t==="hi"?U1():t==="ko"?$1():t==="ja"?H1():t==="pl"?V1():N1()}),z1=()=>"Previous match",W1=()=>"上一个匹配项",G1=()=>"مورد قبلی",_1=()=>"التطابق السابق",X1=()=>"Coincidencia anterior",Y1=()=>"पिछला मिलान",K1=()=>"이전 일치 항목",J1=()=>"前の一致",Z1=()=>"Poprzednie dopasowanie",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?W1():t==="fa"?G1():t==="ar"?_1():t==="es"?X1():t==="hi"?Y1():t==="ko"?K1():t==="ja"?J1():t==="pl"?Z1():z1()});/** +var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-BT1BW2gt.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جست‌وجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",A1=()=>"문서에서 찾기",x1=()=>"文書内を検索",S1=()=>"Znajdź w dokumencie",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():t==="ko"?A1():t==="ja"?x1():t==="pl"?S1():m1()}),T1=()=>"Fit to width",C1=()=>"适应宽度",P1=()=>"متناسب با عرض",I1=()=>"ملاءمة العرض",R1=()=>"Ajustar al ancho",O1=()=>"चौड़ाई में फ़िट करें",M1=()=>"너비에 맞추기",D1=()=>"幅に合わせる",L1=()=>"Dopasuj do szerokości",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?C1():t==="fa"?P1():t==="ar"?I1():t==="es"?R1():t==="hi"?O1():t==="ko"?M1():t==="ja"?D1():t==="pl"?L1():T1()}),N1=()=>"Next match",F1=()=>"下一个匹配项",k1=()=>"مورد بعدی",B1=()=>"التطابق التالي",j1=()=>"Coincidencia siguiente",U1=()=>"अगला मिलान",$1=()=>"다음 일치 항목",H1=()=>"次の一致",V1=()=>"Następne dopasowanie",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?F1():t==="fa"?k1():t==="ar"?B1():t==="es"?j1():t==="hi"?U1():t==="ko"?$1():t==="ja"?H1():t==="pl"?V1():N1()}),z1=()=>"Previous match",W1=()=>"上一个匹配项",G1=()=>"مورد قبلی",_1=()=>"التطابق السابق",X1=()=>"Coincidencia anterior",Y1=()=>"पिछला मिलान",K1=()=>"이전 일치 항목",J1=()=>"前の一致",Z1=()=>"Poprzednie dopasowanie",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?W1():t==="fa"?G1():t==="ar"?_1():t==="es"?X1():t==="hi"?Y1():t==="ko"?K1():t==="ja"?J1():t==="pl"?Z1():z1()});/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. diff --git a/ui/dist/assets/index-Cs8E9A-x.js b/ui/dist/assets/index-BT1BW2gt.js similarity index 90% rename from ui/dist/assets/index-Cs8E9A-x.js rename to ui/dist/assets/index-BT1BW2gt.js index cad4ee46f..66a1b3d88 100644 --- a/ui/dist/assets/index-Cs8E9A-x.js +++ b/ui/dist/assets/index-BT1BW2gt.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-DP0KB09M.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-D9ODVenE.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); var jK=Object.defineProperty;var k8=e=>{throw TypeError(e)};var SK=(e,r,t)=>r in e?jK(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var bo=(e,r,t)=>SK(e,typeof r!="symbol"?r+"":r,t),_2=(e,r,t)=>r.has(e)||k8("Cannot "+t);var ue=(e,r,t)=>(_2(e,r,"read from private field"),t?t.call(e):r.get(e)),ft=(e,r,t)=>r.has(e)?k8("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),Ge=(e,r,t,n)=>(_2(e,r,"write to private field"),n?n.call(e,t):r.set(e,t),t),Kt=(e,r,t)=>(_2(e,r,"access private method"),t);var hm=(e,r,t,n)=>({set _(s){Ge(e,r,s,t)},get _(){return ue(e,r,n)}});(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=t(s);fetch(s.href,o)}})();function n0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f2={exports:{}},pm={};/** * @license React * react-jsx-runtime.production.js @@ -15,7 +15,7 @@ var jK=Object.defineProperty;var k8=e=>{throw TypeError(e)};var SK=(e,r,t)=>r in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var C8;function EK(){if(C8)return ur;C8=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,v={};function b(F,q,U){this.props=F,this.context=q,this.refs=v,this.updater=U||k}b.prototype.isReactComponent={},b.prototype.setState=function(F,q){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,q,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function x(){}x.prototype=b.prototype;function y(F,q,U){this.props=F,this.context=q,this.refs=v,this.updater=U||k}var S=y.prototype=new x;S.constructor=y,w(S,b.prototype),S.isPureReactComponent=!0;var z=Array.isArray;function E(){}var A={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function M(F,q,U){var oe=U.ref;return{$$typeof:e,type:F,key:q,ref:oe!==void 0?oe:null,props:U}}function $(F,q){return M(F.type,q,F.props)}function D(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function I(F){var q={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(U){return q[U]})}var G=/\/+/g;function H(F,q){return typeof F=="object"&&F!==null&&F.key!=null?I(""+F.key):q.toString(36)}function Q(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(E,E):(F.status="pending",F.then(function(q){F.status==="pending"&&(F.status="fulfilled",F.value=q)},function(q){F.status==="pending"&&(F.status="rejected",F.reason=q)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function K(F,q,U,oe,ie){var ce=typeof F;(ce==="undefined"||ce==="boolean")&&(F=null);var re=!1;if(F===null)re=!0;else switch(ce){case"bigint":case"string":case"number":re=!0;break;case"object":switch(F.$$typeof){case e:case r:re=!0;break;case d:return re=F._init,K(re(F._payload),q,U,oe,ie)}}if(re)return ie=ie(F),re=oe===""?"."+H(F,0):oe,z(ie)?(U="",re!=null&&(U=re.replace(G,"$&/")+"/"),K(ie,q,U,"",function(le){return le})):ie!=null&&(D(ie)&&(ie=$(ie,U+(ie.key==null||F&&F.key===ie.key?"":(""+ie.key).replace(G,"$&/")+"/")+re)),q.push(ie)),1;re=0;var W=oe===""?".":oe+":";if(z(F))for(var ae=0;ae{const r=T.useContext(s$);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},NK=({client:e,children:r})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(s$.Provider,{value:e,children:r})),AK={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)};var n_,dj,WO,TK=(WO=class{constructor(){ft(this,n_,AK);ft(this,dj,!1)}setTimeoutProvider(e){Ge(this,n_,e)}setTimeout(e,r){return ue(this,n_).setTimeout(e,r)}clearTimeout(e){ue(this,n_).clearTimeout(e)}setInterval(e,r){return ue(this,n_).setInterval(e,r)}clearInterval(e){ue(this,n_).clearInterval(e)}},n_=new WeakMap,dj=new WeakMap,WO);const vf=new TK;function RK(e){setTimeout(e,0)}const MK=typeof window>"u"||"Deno"in globalThis;function jo(){}function OK(e,r){return typeof e=="function"?e(r):e}function o$(e){return typeof e=="number"&&e>=0&&e!==1/0}function a$(e,r){return Math.max(e+(r||0)-Date.now(),0)}function es(e,r){return typeof e=="function"?e(r):e}function E8(e,r){const{type:t="all",exact:n,fetchStatus:s,predicate:o,queryKey:a,stale:i}=e;if(a){if(n){if(r.queryHash!==hj(a,r.options))return!1}else if(!ep(r.queryKey,a))return!1}if(t!=="all"){const c=r.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof i=="boolean"&&r.isStale()!==i||s&&s!==r.state.fetchStatus||o&&!o(r))}function N8(e,r){const{exact:t,status:n,predicate:s,mutationKey:o}=e;if(o){if(!r.options.mutationKey)return!1;if(t){if(Hf(r.options.mutationKey)!==Hf(o))return!1}else if(!ep(r.options.mutationKey,o))return!1}return!(n&&r.state.status!==n||s&&!s(r))}function hj(e,r){return((r==null?void 0:r.queryKeyHashFn)||Hf)(e)}function Hf(e){return JSON.stringify(e,(r,t)=>m4(t)?Object.keys(t).sort().reduce((n,s)=>(n[s]=t[s],n),{}):t)}function ep(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(Array.isArray(e)&&Array.isArray(r)){for(let n=0;n500)return r;const n=A8(e)&&A8(r);if(!n&&!(m4(e)&&m4(r)))return r;const s=(n?e:Object.keys(e)).length,o=n?r:Object.keys(r),a=o.length,i=n?new Array(a):{};let c=0;for(let u=0;u{vf.setTimeout(r,e)})}function g4(e,r,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,r):t.structuralSharing!==!1?pj(e,r):r}function LK(e,r,t=0){const n=[...e,r];return t&&n.length>t?n.slice(1):n}function IK(e,r,t=0){const n=[r,...e];return t&&n.length>t?n.slice(0,-1):n}const mj=Symbol();function i$(e,r){return!e.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!e.queryFn||e.queryFn===mj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gj(e,r){return typeof e=="function"?e(...r):!!e}function PK(e,r,t){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=r()),n||(n=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}let BK=()=>MK;const vj=()=>BK();var ld=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},wf,s_,Dh,KO,FK=(KO=class extends ld{constructor(){super();ft(this,wf);ft(this,s_);ft(this,Dh);Ge(this,Dh,r=>{if(typeof window<"u"&&window.addEventListener){const t=()=>r();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,s_)||this.setEventListener(ue(this,Dh))}onUnsubscribe(){var r;this.hasListeners()||((r=ue(this,s_))==null||r.call(this),Ge(this,s_,void 0))}setEventListener(r){var t;Ge(this,Dh,r),(t=ue(this,s_))==null||t.call(this),Ge(this,s_,r(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(r){ue(this,wf)!==r&&(Ge(this,wf,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(t=>{t(r)})}isFocused(){var r;return typeof ue(this,wf)=="boolean"?ue(this,wf):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},wf=new WeakMap,s_=new WeakMap,Dh=new WeakMap,KO);const bj=new FK,HK=RK;function qK(){let e=[],r=0,t=i=>{i()},n=i=>{i()},s=HK;const o=i=>{r?e.push(i):s(()=>{t(i)})},a=()=>{const i=e;e=[],i.length&&s(()=>{n(()=>{i.forEach(c=>{t(c)})})})};return{batch:i=>{let c;r++;try{c=i()}finally{r--,r||a()}return c},batchCalls:i=>(...c)=>{o(()=>{i(...c)})},schedule:o,setNotifyFunction:i=>{t=i},setBatchNotifyFunction:i=>{n=i},setScheduler:i=>{s=i}}}const qn=qK();var Lh,o_,Ih,VO,UK=(VO=class extends ld{constructor(){super();ft(this,Lh,!0);ft(this,o_);ft(this,Ih);Ge(this,Ih,r=>{if(typeof window<"u"&&window.addEventListener){const t=()=>r(!0),n=()=>r(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){ue(this,o_)||this.setEventListener(ue(this,Ih))}onUnsubscribe(){var r;this.hasListeners()||((r=ue(this,o_))==null||r.call(this),Ge(this,o_,void 0))}setEventListener(r){var t;Ge(this,Ih,r),(t=ue(this,o_))==null||t.call(this),Ge(this,o_,r(this.setOnline.bind(this)))}setOnline(r){ue(this,Lh)!==r&&(Ge(this,Lh,r),this.listeners.forEach(t=>{t(r)}))}isOnline(){return ue(this,Lh)}},Lh=new WeakMap,o_=new WeakMap,Ih=new WeakMap,VO);const tb=new UK;function GK(e){return Math.min(1e3*2**e,3e4)}function c$(e){return(e??"online")==="online"?tb.isOnline():!0}var rb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function WK(e){return e instanceof rb}function l$(e){let r=!1,t=0,n,s="pending",o,a;const i=new Promise((x,y)=>{o=x,a=y});i.catch(jo);const c=()=>s!=="pending",u=x=>{var y;if(!c()){const S=new rb(x);w(S),(y=e.onCancel)==null||y.call(e,S)}},d=()=>{r=!0},_=()=>{r=!1},p=()=>bj.isFocused()&&(e.networkMode==="always"||tb.isOnline())&&e.canRun(),m=()=>c$(e.networkMode)&&e.canRun(),k=x=>{c()||(n==null||n(),s="resolved",o(x))},w=x=>{c()||(n==null||n(),s="rejected",a(x))},v=()=>new Promise(x=>{var y;n=S=>{(c()||p())&&x(S)},(y=e.onPause)==null||y.call(e)}).then(()=>{var x;n=void 0,c()||(x=e.onContinue)==null||x.call(e)}),b=()=>{if(c())return;let x;const y=t===0?e.initialPromise:void 0;try{x=y??e.fn()}catch(S){x=Promise.reject(S)}Promise.resolve(x).then(k).catch(S=>{var M;if(c())return;const z=e.retry??(vj()?0:3),E=e.retryDelay??GK,A=typeof E=="function"?E(t,S):E,N=z===!0||typeof z=="number"&&tp()?void 0:v()).then(()=>{r?w(S):b()})})};return{promise:i,status:()=>s,cancel:u,continue:()=>(n==null||n(),i),cancelRetry:d,continueRetry:_,canStart:m,start:()=>(m()?b():v().then(b),i)}}var kf,QO,u$=(QO=class{constructor(){ft(this,kf)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),o$(this.gcTime)&&Ge(this,kf,vf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vj()?1/0:3e5))}clearGcTimeout(){ue(this,kf)!==void 0&&(vf.clearTimeout(ue(this,kf)),Ge(this,kf,void 0))}},kf=new WeakMap,QO);function KK(e){return{onFetch:(r,t)=>{var d,_,p,m,k;const n=r.options,s=(p=(_=(d=r.fetchOptions)==null?void 0:d.meta)==null?void 0:_.fetchMore)==null?void 0:p.direction,o=((m=r.state.data)==null?void 0:m.pages)||[],a=((k=r.state.data)==null?void 0:k.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const u=async()=>{let w=!1;const v=y=>{PK(y,()=>r.signal,()=>w=!0)},b=i$(r.options,r.fetchOptions),x=async(y,S,z)=>{if(w)return Promise.reject(r.signal.reason);if(S==null&&y.pages.length)return Promise.resolve(y);const A=(()=>{const D={client:r.client,queryKey:r.queryKey,pageParam:S,direction:z?"backward":"forward",meta:r.options.meta};return v(D),D})(),N=await b(A),{maxPages:M}=r.options,$=z?IK:LK;return{pages:$(y.pages,N,M),pageParams:$(y.pageParams,S,M)}};if(s&&o.length){const y=s==="backward",S=y?_$:v4,z={pages:o,pageParams:a};i=await x(z,S(n,z),y)}else{const y=e??o.length;do{const S=c===0?a[0]??n.initialPageParam:v4(n,i);if(c>0&&S==null)break;i=await x(i,S),c++}while(c{var w,v;return(v=(w=r.options).persister)==null?void 0:v.call(w,u,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},t)}:r.fetchFn=u}}}function v4(e,{pages:r,pageParams:t}){const n=r.length-1;return r.length>0?e.getNextPageParam(r[n],r,t[n],t):void 0}function _$(e,{pages:r,pageParams:t}){var n;return r.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,r[0],r,t[0],t):void 0}function VK(e,r){return r?v4(e,r)!=null:!1}function QK(e,r){return!r||!e.getPreviousPageParam?!1:_$(e,r)!=null}var Ph,jf,Bh,bi,Sf,$s,qg,Cf,Ui,Pl,XO,XK=(XO=class extends u${constructor(r){super();ft(this,Ui);ft(this,Ph);ft(this,jf);ft(this,Bh);ft(this,bi);ft(this,Sf);ft(this,$s);ft(this,qg);ft(this,Cf);Ge(this,Cf,!1),Ge(this,qg,r.defaultOptions),this.setOptions(r.options),this.observers=[],Ge(this,Sf,r.client),Ge(this,bi,ue(this,Sf).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,Ge(this,jf,M8(this.options)),this.state=r.state??ue(this,jf),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ph)}get promise(){var r;return(r=ue(this,$s))==null?void 0:r.promise}setOptions(r){if(this.options={...ue(this,qg),...r},r!=null&&r._type&&Ge(this,Ph,r._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=M8(this.options);t.data!==void 0&&(this.setState(R8(t.data,t.dataUpdatedAt)),Ge(this,jf,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,bi).remove(this)}setData(r,t){const n=g4(this.state.data,r,this.options);return Kt(this,Ui,Pl).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(r){Kt(this,Ui,Pl).call(this,{type:"setState",state:r})}cancel(r){var n,s;const t=(n=ue(this,$s))==null?void 0:n.promise;return(s=ue(this,$s))==null||s.cancel(r),t?t.then(jo).catch(jo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,jf)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(r=>es(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mj||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>es(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!a$(this.state.dataUpdatedAt,r)}onFocus(){var r,t;(r=this.observers.find(n=>n.shouldFetchOnWindowFocus()))==null||r.refetch({cancelRefetch:!1}),(t=ue(this,$s))==null||t.continue()}onOnline(){var r,t;(r=this.observers.find(n=>n.shouldFetchOnReconnect()))==null||r.refetch({cancelRefetch:!1}),(t=ue(this,$s))==null||t.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),ue(this,bi).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){const t=this.observers.indexOf(r);t!==-1&&(this.observers.splice(t,1),this.observers.length||(ue(this,$s)&&(ue(this,Cf)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,$s).cancel({revert:!0}):ue(this,$s).cancelRetry()),this.scheduleGc()),ue(this,bi).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Kt(this,Ui,Pl).call(this,{type:"invalidate"})}async fetch(r,t){var u,d,_,p,m,k,w,v,b,x,y,S;if(this.state.fetchStatus!=="idle"&&((u=ue(this,$s))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,$s))return ue(this,$s).continueRetry(),ue(this,$s).promise}if(r&&this.setOptions(r),!this.options.queryFn){const z=this.observers.find(E=>E.options.queryFn);z&&this.setOptions(z.options)}const n=new AbortController,s=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(Ge(this,Cf,!0),n.signal)})},o=()=>{const z=i$(this.options,t),A=(()=>{const N={client:ue(this,Sf),queryKey:this.queryKey,meta:this.meta};return s(N),N})();return Ge(this,Cf,!1),this.options.persister?this.options.persister(z,A,this):z(A)},i=(()=>{const z={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,Sf),state:this.state,fetchFn:o};return s(z),z})();(d=ue(this,Ph)==="infinite"?KK(this.options.pages):this.options.behavior)==null||d.onFetch(i,this),Ge(this,Bh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((_=i.fetchOptions)==null?void 0:_.meta))&&Kt(this,Ui,Pl).call(this,{type:"fetch",meta:(p=i.fetchOptions)==null?void 0:p.meta});const c=Ge(this,$s,l$({initialPromise:t==null?void 0:t.initialPromise,fn:i.fetchFn,onCancel:z=>{z instanceof rb&&z.revert&&this.setState({...ue(this,Bh),fetchStatus:"idle"}),n.abort()},onFail:(z,E)=>{Kt(this,Ui,Pl).call(this,{type:"failed",failureCount:z,error:E})},onPause:()=>{Kt(this,Ui,Pl).call(this,{type:"pause"})},onContinue:()=>{Kt(this,Ui,Pl).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const z=await c.start();if(z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(z),(k=(m=ue(this,bi).config).onSuccess)==null||k.call(m,z,this),(v=(w=ue(this,bi).config).onSettled)==null||v.call(w,z,this.state.error,this),z}catch(z){if(z instanceof rb){if(z.silent)return ue(this,$s).promise;if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw Kt(this,Ui,Pl).call(this,{type:"error",error:z}),(x=(b=ue(this,bi).config).onError)==null||x.call(b,z,this),(S=(y=ue(this,bi).config).onSettled)==null||S.call(y,this.state.data,z,this),z}finally{ue(this,$s)===c&&Ge(this,$s,void 0),this.scheduleGc()}}},Ph=new WeakMap,jf=new WeakMap,Bh=new WeakMap,bi=new WeakMap,Sf=new WeakMap,$s=new WeakMap,qg=new WeakMap,Cf=new WeakMap,Ui=new WeakSet,Pl=function(r){const t=n=>{switch(r.type){case"failed":return{...n,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...f$(n.data,this.options),fetchMeta:r.meta??null};case"success":const s={...n,...R8(r.data,r.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,Bh,r.manual?s:void 0),s;case"error":const o=r.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...r.state}}};this.state=t(this.state),qn.batch(()=>{this.observers.slice().forEach(n=>{n.onQueryUpdate()}),ue(this,bi).notify({query:this,type:"updated",action:r})})},XO);function f$(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:c$(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function R8(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function M8(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,t=r!==void 0,n=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Ho,Ir,Ug,qo,zf,Fh,ql,Gg,Hh,qh,Ef,Nf,a_,Uh,Xr,$m,b4,y4,x4,w4,k4,j4,S4,C4,YO,_y=(YO=class extends ld{constructor(r,t){super();ft(this,Xr);ft(this,Ho);ft(this,Ir);ft(this,Ug);ft(this,qo);ft(this,zf);ft(this,Fh);ft(this,ql);ft(this,Gg);ft(this,Hh);ft(this,qh);ft(this,Ef);ft(this,Nf);ft(this,a_);ft(this,Uh,new Set);this.options=t,Ge(this,Ho,r),Ge(this,ql,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Ir).addObserver(this),O8(ue(this,Ir),this.options)?Kt(this,Xr,$m).call(this):this.updateResult(),Kt(this,Xr,k4).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return z4(ue(this,Ir),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return z4(ue(this,Ir),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Kt(this,Xr,j4).call(this),Kt(this,Xr,S4).call(this),ue(this,Ir).removeObserver(this)}setOptions(r){const t=this.options,n=ue(this,Ir);if(this.options=ue(this,Ho).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof es(this.options.enabled,ue(this,Ir))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Kt(this,Xr,C4).call(this),ue(this,Ir).setOptions(this.options),t._defaulted&&!Hm(this.options,t)&&ue(this,Ho).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Ir),observer:this});const s=this.hasListeners();s&&$8(ue(this,Ir),n,this.options,t)&&Kt(this,Xr,$m).call(this),this.updateResult(),s&&(ue(this,Ir)!==n||es(this.options.enabled,ue(this,Ir))!==es(t.enabled,ue(this,Ir))||es(this.options.staleTime,ue(this,Ir))!==es(t.staleTime,ue(this,Ir)))&&Kt(this,Xr,y4).call(this);const o=Kt(this,Xr,x4).call(this);s&&(ue(this,Ir)!==n||es(this.options.enabled,ue(this,Ir))!==es(t.enabled,ue(this,Ir))||o!==ue(this,a_))&&Kt(this,Xr,w4).call(this,o)}getOptimisticResult(r){const t=ue(this,Ho).getQueryCache().build(ue(this,Ho),r),n=this.createResult(t,r);return Hm(this.getCurrentResult(),n)||(Ge(this,qo,n),Ge(this,Fh,this.options),Ge(this,zf,ue(this,Ir).state)),n}getCurrentResult(){return ue(this,qo)}trackResult(r,t){return new Proxy(r,{get:(n,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(n,s))})}trackProp(r){ue(this,Uh).add(r)}getCurrentQuery(){return ue(this,Ir)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const t=ue(this,Ho).defaultQueryOptions(r),n=ue(this,Ho).getQueryCache().build(ue(this,Ho),t);let s=()=>{},o;const a=new Promise(i=>{o=i,s=ue(this,Ho).getQueryCache().subscribe(c=>{c.type==="updated"&&c.query.queryHash===n.queryHash&&n.state.data!==void 0&&(s(),i(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{const i=this.createResult(n,t);return o==null||o(i),i}).finally(()=>{s()}),a])}fetch(r){return Kt(this,Xr,$m).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,qo)))}createResult(r,t){var E;const n=ue(this,Ir),s=this.options,o=ue(this,qo),a=ue(this,zf),i=ue(this,Fh),c=r!==n?r.state:ue(this,Ug),{state:u}=r;let d={...u},_=!1,p;if(t._optimisticResults){const A=this.hasListeners(),N=!A&&O8(r,t),M=A&&$8(r,n,t,s);(N||M)&&(d={...d,...f$(u.data,r.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:k,status:w}=d;p=d.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&w==="pending"){let A;o!=null&&o.isPlaceholderData&&t.placeholderData===(i==null?void 0:i.placeholderData)?(A=o.data,v=!0):A=typeof t.placeholderData=="function"?t.placeholderData((E=ue(this,qh))==null?void 0:E.state.data,ue(this,qh)):t.placeholderData,A!==void 0&&(w="success",p=g4(o==null?void 0:o.data,A,t),_=!0)}if(t.select&&p!==void 0&&!v)if(o&&p===(a==null?void 0:a.data)&&t.select===ue(this,Gg))p=ue(this,Hh);else try{Ge(this,Gg,t.select),p=t.select(p),p=g4(o==null?void 0:o.data,p,t),Ge(this,Hh,p),Ge(this,ql,null)}catch(A){Ge(this,ql,A)}else p===void 0&&Ge(this,ql,null);ue(this,ql)&&(m=ue(this,ql),p=ue(this,Hh),k=Date.now(),w="error",_=!1);const b=d.fetchStatus==="fetching",x=w==="pending",y=w==="error",S=x&&b,z=p!==void 0;return{status:w,fetchStatus:d.fetchStatus,isPending:x,isSuccess:w==="success",isError:y,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:k,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:r.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:y&&!z,isPaused:d.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:y&&z,isStale:yj(r,t),refetch:this.refetch,isEnabled:es(t.enabled,r)!==!1}}updateResult(){const r=ue(this,qo),t=this.createResult(ue(this,Ir),this.options);if(Ge(this,zf,ue(this,Ir).state),Ge(this,Fh,this.options),ue(this,zf).data!==void 0&&Ge(this,qh,ue(this,Ir)),Hm(t,r))return;Ge(this,qo,t);const s=(()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!ue(this,Uh).size)return!0;const i=new Set(a??ue(this,Uh));return this.options.throwOnError&&i.add("error"),Object.keys(ue(this,qo)).some(c=>{const u=c;return ue(this,qo)[u]!==r[u]&&i.has(u)})})();qn.batch(()=>{s&&this.listeners.forEach(o=>{o(ue(this,qo))}),ue(this,Ho).getQueryCache().notify({query:ue(this,Ir),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Kt(this,Xr,k4).call(this)}},Ho=new WeakMap,Ir=new WeakMap,Ug=new WeakMap,qo=new WeakMap,zf=new WeakMap,Fh=new WeakMap,ql=new WeakMap,Gg=new WeakMap,Hh=new WeakMap,qh=new WeakMap,Ef=new WeakMap,Nf=new WeakMap,a_=new WeakMap,Uh=new WeakMap,Xr=new WeakSet,$m=function(r){Kt(this,Xr,C4).call(this);let t=ue(this,Ir).fetch(this.options,r);return r!=null&&r.throwOnError||(t=t.catch(jo)),t},b4=function(r){return!vj()&&es(this.options.enabled,ue(this,Ir))!==!1&&o$(r)},y4=function(){Kt(this,Xr,j4).call(this);const r=es(this.options.staleTime,ue(this,Ir));if(ue(this,qo).isStale||!Kt(this,Xr,b4).call(this,r))return;const t=a$(ue(this,qo).dataUpdatedAt,r)+1;Ge(this,Ef,vf.setTimeout(()=>{ue(this,qo).isStale||this.updateResult()},t))},x4=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Ir)):this.options.refetchInterval)??!1},w4=function(r){Kt(this,Xr,S4).call(this),Ge(this,a_,r),!(ue(this,a_)===0||!Kt(this,Xr,b4).call(this,ue(this,a_)))&&Ge(this,Nf,vf.setInterval(()=>{(this.options.refetchIntervalInBackground||bj.isFocused())&&Kt(this,Xr,$m).call(this)},ue(this,a_)))},k4=function(){Kt(this,Xr,y4).call(this),Kt(this,Xr,w4).call(this,Kt(this,Xr,x4).call(this))},j4=function(){ue(this,Ef)!==void 0&&(vf.clearTimeout(ue(this,Ef)),Ge(this,Ef,void 0))},S4=function(){ue(this,Nf)!==void 0&&(vf.clearInterval(ue(this,Nf)),Ge(this,Nf,void 0))},C4=function(){const r=ue(this,Ho).getQueryCache().build(ue(this,Ho),this.options);if(r===ue(this,Ir))return;const t=ue(this,Ir);Ge(this,Ir,r),Ge(this,Ug,r.state),this.hasListeners()&&(t==null||t.removeObserver(this),r.addObserver(this))},YO);function YK(e,r){return es(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&es(r.retryOnMount,e)===!1)}function O8(e,r){return YK(e,r)||e.state.data!==void 0&&z4(e,r,r.refetchOnMount)}function z4(e,r,t){if(es(r.enabled,e)!==!1&&es(r.staleTime,e)!=="static"){const n=typeof t=="function"?t(e):t;return n==="always"||n!==!1&&yj(e,r)}return!1}function $8(e,r,t,n){return(e!==r||es(n.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&yj(e,t)}function yj(e,r){return es(r.enabled,e)!==!1&&e.isStaleByTime(es(r.staleTime,e))}var ZK=class extends _y{constructor(e,r){super(e,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,r){var m,k;const{state:t}=e,n=super.createResult(e,r),{isFetching:s,isRefetching:o,isError:a,isRefetchError:i}=n,c=(k=(m=t.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:k.direction,u=a&&c==="forward",d=s&&c==="forward",_=a&&c==="backward",p=s&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:VK(r,t.data),hasPreviousPage:QK(r,t.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:_,isFetchingPreviousPage:p,isRefetchError:i&&!u&&!_,isRefetching:o&&!d&&!p}}},Wg,Tc,xo,Af,Rc,Yu,ZO,JK=(ZO=class extends u${constructor(r){super();ft(this,Rc);ft(this,Wg);ft(this,Tc);ft(this,xo);ft(this,Af);Ge(this,Wg,r.client),this.mutationId=r.mutationId,Ge(this,xo,r.mutationCache),Ge(this,Tc,[]),this.state=r.state||d$(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){ue(this,Tc).includes(r)||(ue(this,Tc).push(r),this.clearGcTimeout(),ue(this,xo).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){Ge(this,Tc,ue(this,Tc).filter(t=>t!==r)),this.scheduleGc(),ue(this,xo).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){ue(this,Tc).length||(this.state.status==="pending"?this.scheduleGc():ue(this,xo).remove(this))}continue(){var r;return((r=ue(this,Af))==null?void 0:r.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(r){var i,c,u,d,_,p,m,k,w,v,b,x,y,S,z,E,A,N;const t=()=>{Kt(this,Rc,Yu).call(this,{type:"continue"})},n={client:ue(this,Wg),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,Af,l$({fn:()=>this.options.mutationFn?this.options.mutationFn(r,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,$)=>{Kt(this,Rc,Yu).call(this,{type:"failed",failureCount:M,error:$})},onPause:()=>{Kt(this,Rc,Yu).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,xo).canRun(this)})),o=this.state.status==="pending",a=!s.canStart();try{if(o)t();else{Kt(this,Rc,Yu).call(this,{type:"pending",variables:r,isPaused:a}),ue(this,xo).config.onMutate&&await ue(this,xo).config.onMutate(r,this,n);const $=await((c=(i=this.options).onMutate)==null?void 0:c.call(i,r,n));$!==this.state.context&&Kt(this,Rc,Yu).call(this,{type:"pending",context:$,variables:r,isPaused:a})}const M=await s.start();return await((d=(u=ue(this,xo).config).onSuccess)==null?void 0:d.call(u,M,r,this.state.context,this,n)),await((p=(_=this.options).onSuccess)==null?void 0:p.call(_,M,r,this.state.context,n)),await((k=(m=ue(this,xo).config).onSettled)==null?void 0:k.call(m,M,null,this.state.variables,this.state.context,this,n)),await((v=(w=this.options).onSettled)==null?void 0:v.call(w,M,null,r,this.state.context,n)),Kt(this,Rc,Yu).call(this,{type:"success",data:M}),M}catch(M){try{await((x=(b=ue(this,xo).config).onError)==null?void 0:x.call(b,M,r,this.state.context,this,n))}catch($){Promise.reject($)}try{await((S=(y=this.options).onError)==null?void 0:S.call(y,M,r,this.state.context,n))}catch($){Promise.reject($)}try{await((E=(z=ue(this,xo).config).onSettled)==null?void 0:E.call(z,void 0,M,this.state.variables,this.state.context,this,n))}catch($){Promise.reject($)}try{await((N=(A=this.options).onSettled)==null?void 0:N.call(A,void 0,M,r,this.state.context,n))}catch($){Promise.reject($)}throw Kt(this,Rc,Yu).call(this,{type:"error",error:M}),M}finally{ue(this,Af)===s&&Ge(this,Af,void 0),ue(this,xo).runNext(this)}}},Wg=new WeakMap,Tc=new WeakMap,xo=new WeakMap,Af=new WeakMap,Rc=new WeakSet,Yu=function(r){const t=n=>{switch(r.type){case"failed":return{...n,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...n,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:r.error,failureCount:n.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=t(this.state),qn.batch(()=>{ue(this,Tc).forEach(n=>{n.onMutationUpdate(r)}),ue(this,xo).notify({mutation:this,type:"updated",action:r})})},ZO);function d$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ul,Gi,Kg,JO,eV=(JO=class extends ld{constructor(r={}){super();ft(this,Ul);ft(this,Gi);ft(this,Kg);this.config=r,Ge(this,Ul,new Set),Ge(this,Gi,new Map),Ge(this,Kg,0)}build(r,t,n){const s=new JK({client:r,mutationCache:this,mutationId:++hm(this,Kg)._,options:r.defaultMutationOptions(t),state:n});return this.add(s),s}add(r){ue(this,Ul).add(r);const t=Nv(r);if(typeof t=="string"){const n=ue(this,Gi).get(t);n?n.push(r):ue(this,Gi).set(t,[r])}this.notify({type:"added",mutation:r})}remove(r){if(ue(this,Ul).delete(r)){const t=Nv(r);if(typeof t=="string"){const n=ue(this,Gi).get(t);if(n)if(n.length>1){const s=n.indexOf(r);s!==-1&&n.splice(s,1)}else n[0]===r&&ue(this,Gi).delete(t)}}this.notify({type:"removed",mutation:r})}canRun(r){var n;const t=Nv(r);if(typeof t=="string"){const s=(n=ue(this,Gi).get(t))==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===r}else return!0}runNext(r){var n,s;const t=Nv(r);return typeof t=="string"?((s=(n=ue(this,Gi).get(t))==null?void 0:n.find(o=>o!==r&&o.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){qn.batch(()=>{ue(this,Ul).forEach(r=>{this.notify({type:"removed",mutation:r})}),ue(this,Ul).clear(),ue(this,Gi).clear()})}getAll(){return Array.from(ue(this,Ul))}find(r){const t={exact:!0,...r};return this.getAll().find(n=>N8(t,n))}findAll(r={}){return this.getAll().filter(t=>N8(r,t))}notify(r){qn.batch(()=>{this.listeners.forEach(t=>{t(r)})})}resumePausedMutations(){const r=this.getAll().filter(t=>t.state.isPaused);return qn.batch(()=>Promise.all(r.map(t=>t.continue().catch(jo))))}},Ul=new WeakMap,Gi=new WeakMap,Kg=new WeakMap,JO);function Nv(e){var r;return(r=e.options.scope)==null?void 0:r.id}var Gl,i_,wo,Wl,Ic,Dm,E4,e$,tV=(e$=class extends ld{constructor(t,n){super();ft(this,Ic);ft(this,Gl);ft(this,i_);ft(this,wo);ft(this,Wl);Ge(this,Gl,t),this.setOptions(n),this.bindMethods(),Kt(this,Ic,Dm).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=ue(this,Gl).defaultMutationOptions(t),Hm(this.options,n)||ue(this,Gl).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,wo),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Hf(n.mutationKey)!==Hf(this.options.mutationKey)?this.reset():((s=ue(this,wo))==null?void 0:s.state.status)==="pending"&&ue(this,wo).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,wo)&&(ue(this,wo).addObserver(this),Kt(this,Ic,Dm).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,wo))==null||t.removeObserver(this)}onMutationUpdate(t){Kt(this,Ic,Dm).call(this),Kt(this,Ic,E4).call(this,t)}getCurrentResult(){return ue(this,i_)}reset(){var t;(t=ue(this,wo))==null||t.removeObserver(this),Ge(this,wo,void 0),Kt(this,Ic,Dm).call(this),Kt(this,Ic,E4).call(this)}mutate(t,n){var s;return Ge(this,Wl,n),(s=ue(this,wo))==null||s.removeObserver(this),Ge(this,wo,ue(this,Gl).getMutationCache().build(ue(this,Gl),this.options)),ue(this,wo).addObserver(this),ue(this,wo).execute(t)}},Gl=new WeakMap,i_=new WeakMap,wo=new WeakMap,Wl=new WeakMap,Ic=new WeakSet,Dm=function(){var n;const t=((n=ue(this,wo))==null?void 0:n.state)??d$();Ge(this,i_,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},E4=function(t){qn.batch(()=>{var n,s,o,a,i,c,u,d;if(ue(this,Wl)&&this.hasListeners()){const _=ue(this,i_).variables,p=ue(this,i_).context,m={client:ue(this,Gl),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(n=ue(this,Wl)).onSuccess)==null||s.call(n,t.data,_,p,m)}catch(k){Promise.reject(k)}try{(a=(o=ue(this,Wl)).onSettled)==null||a.call(o,t.data,null,_,p,m)}catch(k){Promise.reject(k)}}else if((t==null?void 0:t.type)==="error"){try{(c=(i=ue(this,Wl)).onError)==null||c.call(i,t.error,_,p,m)}catch(k){Promise.reject(k)}try{(d=(u=ue(this,Wl)).onSettled)==null||d.call(u,void 0,t.error,_,p,m)}catch(k){Promise.reject(k)}}}this.listeners.forEach(_=>{_(ue(this,i_))})})},e$);function D8(e,r){const t=new Set(r);return e.filter(n=>!t.has(n))}var Gh,Uo,Wh,Tf,Da,Rf,Vg,Qg,Xg,Yg,Ps,N4,A4,h$,T4,R4,M4,t$,rV=(t$=class extends ld{constructor(r,t,n){super();ft(this,Ps);ft(this,Gh);ft(this,Uo);ft(this,Wh);ft(this,Tf);ft(this,Da);ft(this,Rf);ft(this,Vg);ft(this,Qg);ft(this,Xg);ft(this,Yg,[]);Ge(this,Gh,r),Ge(this,Tf,n),Ge(this,Wh,[]),Ge(this,Da,[]),Ge(this,Uo,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,Da).forEach(r=>{r.subscribe(t=>{Kt(this,Ps,R4).call(this,r,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,Da).forEach(r=>{r.destroy()})}setQueries(r,t){Ge(this,Wh,r),Ge(this,Tf,t),qn.batch(()=>{const n=ue(this,Da),s=Kt(this,Ps,T4).call(this,ue(this,Wh));s.forEach(_=>_.observer.setOptions(_.defaultedQueryOptions));const o=s.map(_=>_.observer),a=o.map(_=>_.getCurrentResult()),i=n.length!==o.length,c=o.some((_,p)=>_!==n[p]),u=i||c,d=u?!0:a.some((_,p)=>{const m=ue(this,Uo)[p];return!m||!Hm(_,m)});!u&&!d||(u&&(Ge(this,Yg,s),Ge(this,Da,o)),Ge(this,Uo,a),this.hasListeners()&&(u&&(D8(n,o).forEach(_=>{_.destroy()}),D8(o,n).forEach(_=>{_.subscribe(p=>{Kt(this,Ps,R4).call(this,_,p)})})),Kt(this,Ps,M4).call(this)))})}getCurrentResult(){return ue(this,Uo)}getQueries(){return ue(this,Da).map(r=>r.getCurrentQuery())}getObservers(){return ue(this,Da)}getOptimisticResult(r,t){const n=Kt(this,Ps,T4).call(this,r),s=n.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),o=n.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Kt(this,Ps,A4).call(this,a??s,t,o),()=>Kt(this,Ps,N4).call(this,s,n)]}},Gh=new WeakMap,Uo=new WeakMap,Wh=new WeakMap,Tf=new WeakMap,Da=new WeakMap,Rf=new WeakMap,Vg=new WeakMap,Qg=new WeakMap,Xg=new WeakMap,Yg=new WeakMap,Ps=new WeakSet,N4=function(r,t){const n=new Set;return t.map((s,o)=>{const a=r[o];return s.defaultedQueryOptions.notifyOnChangeProps?a:s.observer.trackResult(a,i=>{n.has(i)||(n.add(i),t.forEach(c=>{c.observer.trackProp(i)}))})})},A4=function(r,t,n){if(t){const s=ue(this,Xg),o=n!==void 0&&s!==void 0&&(s.length!==n.length||n.some((a,i)=>a!==s[i]));return(ue(this,Uo)!==ue(this,Qg)||o||t!==ue(this,Vg))&&(Ge(this,Vg,t),Ge(this,Qg,ue(this,Uo)),n!==void 0&&Ge(this,Xg,n),Ge(this,Rf,pj(ue(this,Rf),t(r)))),ue(this,Rf)}return r},h$=function(){var r;return!((r=ue(this,Tf))!=null&&r.combine)||ue(this,Da).some((t,n)=>{var s;return t.options.suspense&&((s=ue(this,Uo)[n])==null?void 0:s.data)===void 0})},T4=function(r){const t=new Map;ue(this,Da).forEach(s=>{const o=s.options.queryHash;if(!o)return;const a=t.get(o);a?a.push(s):t.set(o,[s])});const n=[];return r.forEach(s=>{var i;const o=ue(this,Gh).defaultQueryOptions(s),a=((i=t.get(o.queryHash))==null?void 0:i.shift())??new _y(ue(this,Gh),o);n.push({defaultedQueryOptions:o,observer:a})}),n},R4=function(r,t){const n=ue(this,Da).indexOf(r);n!==-1&&(Ge(this,Uo,ue(this,Uo).slice()),ue(this,Uo)[n]=t,Kt(this,Ps,M4).call(this))},M4=function(){var r;if(this.hasListeners()){const t=Kt(this,Ps,h$).call(this),n=ue(this,Rf),s=t?n:Kt(this,Ps,A4).call(this,Kt(this,Ps,N4).call(this,ue(this,Uo),ue(this,Yg)),(r=ue(this,Tf))==null?void 0:r.combine);(t||n!==s)&&qn.batch(()=>{this.listeners.forEach(o=>{o(ue(this,Uo))})})}},t$),Mc,r$,nV=(r$=class extends ld{constructor(r={}){super();ft(this,Mc);this.config=r,Ge(this,Mc,new Map)}build(r,t,n){const s=t.queryKey,o=t.queryHash??hj(s,t);let a=this.get(o);return a||(a=new XK({client:r,queryKey:s,queryHash:o,options:r.defaultQueryOptions(t),state:n,defaultOptions:r.getQueryDefaults(s)}),this.add(a)),a}add(r){ue(this,Mc).has(r.queryHash)||(ue(this,Mc).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const t=ue(this,Mc).get(r.queryHash);t&&(r.destroy(),t===r&&ue(this,Mc).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){qn.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return ue(this,Mc).get(r)}getAll(){return[...ue(this,Mc).values()]}find(r){const t={exact:!0,...r};return this.getAll().find(n=>E8(t,n))}findAll(r={}){const t=this.getAll();return Object.keys(r).length>0?t.filter(n=>E8(r,n)):t}notify(r){qn.batch(()=>{this.listeners.forEach(t=>{t(r)})})}onFocus(){qn.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){qn.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},Mc=new WeakMap,r$),Fn,c_,l_,Kh,Vh,u_,Qh,Xh,n$,sV=(n$=class{constructor(e={}){ft(this,Fn);ft(this,c_);ft(this,l_);ft(this,Kh);ft(this,Vh);ft(this,u_);ft(this,Qh);ft(this,Xh);Ge(this,Fn,e.queryCache||new nV),Ge(this,c_,e.mutationCache||new eV),Ge(this,l_,e.defaultOptions||{}),Ge(this,Kh,new Map),Ge(this,Vh,new Map),Ge(this,u_,0)}mount(){hm(this,u_)._++,ue(this,u_)===1&&(Ge(this,Qh,bj.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Fn).onFocus())})),Ge(this,Xh,tb.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Fn).onOnline())})))}unmount(){var e,r;hm(this,u_)._--,ue(this,u_)===0&&((e=ue(this,Qh))==null||e.call(this),Ge(this,Qh,void 0),(r=ue(this,Xh))==null||r.call(this),Ge(this,Xh,void 0))}isFetching(e){return ue(this,Fn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,c_).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Fn).get(r.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),t=ue(this,Fn).build(this,r),n=t.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(es(r.staleTime,t))&&this.prefetchQuery(r),Promise.resolve(n))}getQueriesData(e){return ue(this,Fn).findAll(e).map(({queryKey:r,state:t})=>[r,t.data])}setQueryData(e,r,t){var a;const n=this.defaultQueryOptions({queryKey:e}),s=(a=ue(this,Fn).get(n.queryHash))==null?void 0:a.state.data,o=OK(r,s);if(o!==void 0)return ue(this,Fn).build(this,n).setData(o,{...t,manual:!0})}setQueriesData(e,r,t){return qn.batch(()=>ue(this,Fn).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,r,t)]))}getQueryState(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Fn).get(r.queryHash))==null?void 0:t.state}removeQueries(e){const r=ue(this,Fn);qn.batch(()=>{r.findAll(e).forEach(t=>{r.remove(t)})})}resetQueries(e,r){const t=ue(this,Fn);return qn.batch(()=>{const n=t.findAll(e),s=new Set(n);return n.forEach(o=>{o.reset()}),this.refetchQueries({type:"active",predicate:o=>s.has(o)},r)})}cancelQueries(e,r={}){const t={revert:!0,...r},n=qn.batch(()=>ue(this,Fn).findAll(e).map(s=>s.cancel(t)));return Promise.all(n).then(jo).catch(jo)}invalidateQueries(e,r={}){return qn.batch(()=>(ue(this,Fn).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},r)))}refetchQueries(e,r={}){const t={...r,cancelRefetch:r.cancelRefetch??!0},n=qn.batch(()=>ue(this,Fn).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,t);return t.throwOnError||(o=o.catch(jo)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(jo)}async query(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const t=ue(this,Fn).build(this,r),n=t.isStaleByTime(es(r.staleTime,t))?await t.fetch(r):t.state.data,s=r.select;return s?s(n):n}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const t=ue(this,Fn).build(this,r);return t.isStaleByTime(es(r.staleTime,t))?t.fetch(r):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jo).catch(jo)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jo).catch(jo)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return tb.isOnline()?ue(this,c_).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Fn)}getMutationCache(){return ue(this,c_)}getDefaultOptions(){return ue(this,l_)}setDefaultOptions(e){Ge(this,l_,e)}setQueryDefaults(e,r){ue(this,Kh).set(Hf(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...ue(this,Kh).values()],t={};return r.forEach(n=>{ep(e,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(e,r){ue(this,Vh).set(Hf(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...ue(this,Vh).values()],t={};return r.forEach(n=>{ep(e,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const r={...ue(this,l_).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=hj(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===mj&&(r.enabled=!1),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,l_).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Fn).clear(),ue(this,c_).clear()}},Fn=new WeakMap,c_=new WeakMap,l_=new WeakMap,Kh=new WeakMap,Vh=new WeakMap,u_=new WeakMap,Qh=new WeakMap,Xh=new WeakMap,n$);const p$=T.createContext(!1),m$=()=>T.useContext(p$);p$.Provider;function oV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const aV=T.createContext(oV()),g$=()=>T.useContext(aV),v$=(e,r,t)=>{const n=t!=null&&t.state.error&&typeof e.throwOnError=="function"?gj(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||n)&&(r.isReset()||(e.retryOnMount=!1))},b$=e=>{T.useEffect(()=>{e.clearReset()},[e])},y$=({result:e,errorResetBoundary:r,throwOnError:t,query:n,suspense:s})=>e.isError&&!r.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||gj(t,[e.error,n])),x$=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>t(n(...s)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},O4=(e,r)=>(e==null?void 0:e.suspense)&&r.isPending,w$=(e,r,t)=>r.fetchOptimistic(e).catch(()=>{t.clearReset()});function k$({queries:e,...r},t){const n=o0(),s=m$(),o=g$(),a=r.subscribed!==!1,i=T.useMemo(()=>e.map(w=>{const v=n.defaultQueryOptions(w);return v._optimisticResults=s?"isRestoring":a?"optimistic":void 0,v}),[e,n,s,a]);i.forEach(w=>{x$(w);const v=n.getQueryCache().get(w.queryHash);v$(w,o,v)}),b$(o);const[c]=T.useState(()=>new rV(n,i,r)),[u,d,_]=c.getOptimisticResult(i,r.combine),p=!s&&a;T.useSyncExternalStore(T.useCallback(w=>p?c.subscribe(qn.batchCalls(w)):jo,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setQueries(i,r)},[i,r,c]);const m=u.some((w,v)=>O4(i[v],w))?u.flatMap((w,v)=>{const b=i[v];if(b&&O4(b,w)){const x=new _y(n,b);return w$(b,x,o)}return[]}):[];if(m.length>0)throw Promise.all(m);const k=u.find((w,v)=>{const b=i[v];return b&&y$({result:w,errorResetBoundary:o,throwOnError:b.throwOnError,query:n.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(k)throw k.error;return d(_())}function j$(e,r,t){const n=m$(),s=g$(),o=o0(),a=o.defaultQueryOptions(e),i=o.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=n?"isRestoring":c?"optimistic":void 0,x$(a),v$(a,s,i),b$(s);const[u]=T.useState(()=>new r(o,a)),d=u.getOptimisticResult(a),_=!n&&c;if(T.useSyncExternalStore(T.useCallback(p=>{const m=_?u.subscribe(qn.batchCalls(p)):jo;return u.updateResult(),m},[u,_]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),T.useEffect(()=>{u.setOptions(a)},[a,u]),O4(a,d))throw w$(a,u,s);if(y$({result:d,errorResetBoundary:s,throwOnError:a.throwOnError,query:i,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:u.trackResult(d)}function dt(e,r){return j$(e,_y)}function iV(e,r){const t=o0(),n=t.getQueryCache();return T.useSyncExternalStore(T.useCallback(s=>n.subscribe(qn.batchCalls(s)),[n]),()=>t.isFetching(e),()=>t.isFetching(e))}function mr(e,r){const t=o0(),[n]=T.useState(()=>new tV(t,e));T.useEffect(()=>{n.setOptions(e)},[n,e]);const s=T.useSyncExternalStore(T.useCallback(a=>n.subscribe(qn.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=T.useCallback((...a)=>{n.mutate(a[0],a[1]).catch(jo)},[n]);if(s.error&&gj(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}function cV(e,r){return j$(e,ZK)}const lV="modulepreload",uV=function(e){return"/"+e},L8={},_V=function(r,t,n){let s=Promise.resolve();if(t&&t.length>0){let a=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),c=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=a(t.map(u=>{if(u=uV(u),u in L8)return;L8[u]=!0;const d=u.endsWith(".css"),_=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${_}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":lV,d||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((m,k)=>{p.addEventListener("load",m),p.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=a,window.dispatchEvent(i),!i.defaultPrevented)throw a}return s.then(a=>{for(const i of a||[])i.status==="rejected"&&o(i.reason);return r().catch(o)})},Je=new sV({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),Pc=new Set;let I8=null,fy=0;const $4=new Set,fV=()=>fy,P8=e=>($4.add(e),()=>{$4.delete(e)}),Si=()=>["workspace",fy],Mt=(e,...r)=>[...Si(),e,...r];function dV(e,r=!1){if(I8===e&&!r)return!1;const t=Si();return I8=e,fy++,Pc.clear(),xj({queryKey:t}),$4.forEach(n=>n()),!0}const Wr=e=>e[1]===fy;async function xj(e){await Je.cancelQueries(e,{revert:!1}),Je.removeQueries(e)}function ts(e,r){if(Wr(e))return Je.setQueryData(e,r)}var h2={exports:{}},mm={},p2={exports:{}},m2={};/** + */var C8;function EK(){if(C8)return ur;C8=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function b(F,q,U){this.props=F,this.context=q,this.refs=v,this.updater=U||k}b.prototype.isReactComponent={},b.prototype.setState=function(F,q){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,q,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function w(){}w.prototype=b.prototype;function y(F,q,U){this.props=F,this.context=q,this.refs=v,this.updater=U||k}var S=y.prototype=new w;S.constructor=y,x(S,b.prototype),S.isPureReactComponent=!0;var z=Array.isArray;function N(){}var A={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function M(F,q,U){var oe=U.ref;return{$$typeof:e,type:F,key:q,ref:oe!==void 0?oe:null,props:U}}function $(F,q){return M(F.type,q,F.props)}function D(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function I(F){var q={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(U){return q[U]})}var G=/\/+/g;function H(F,q){return typeof F=="object"&&F!==null&&F.key!=null?I(""+F.key):q.toString(36)}function Q(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(N,N):(F.status="pending",F.then(function(q){F.status==="pending"&&(F.status="fulfilled",F.value=q)},function(q){F.status==="pending"&&(F.status="rejected",F.reason=q)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function K(F,q,U,oe,ie){var ce=typeof F;(ce==="undefined"||ce==="boolean")&&(F=null);var re=!1;if(F===null)re=!0;else switch(ce){case"bigint":case"string":case"number":re=!0;break;case"object":switch(F.$$typeof){case e:case r:re=!0;break;case d:return re=F._init,K(re(F._payload),q,U,oe,ie)}}if(re)return ie=ie(F),re=oe===""?"."+H(F,0):oe,z(ie)?(U="",re!=null&&(U=re.replace(G,"$&/")+"/"),K(ie,q,U,"",function(le){return le})):ie!=null&&(D(ie)&&(ie=$(ie,U+(ie.key==null||F&&F.key===ie.key?"":(""+ie.key).replace(G,"$&/")+"/")+re)),q.push(ie)),1;re=0;var W=oe===""?".":oe+":";if(z(F))for(var ae=0;ae{const r=T.useContext(s$);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},NK=({client:e,children:r})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(s$.Provider,{value:e,children:r})),AK={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)};var n_,dj,WO,TK=(WO=class{constructor(){ft(this,n_,AK);ft(this,dj,!1)}setTimeoutProvider(e){Ge(this,n_,e)}setTimeout(e,r){return ue(this,n_).setTimeout(e,r)}clearTimeout(e){ue(this,n_).clearTimeout(e)}setInterval(e,r){return ue(this,n_).setInterval(e,r)}clearInterval(e){ue(this,n_).clearInterval(e)}},n_=new WeakMap,dj=new WeakMap,WO);const vf=new TK;function RK(e){setTimeout(e,0)}const MK=typeof window>"u"||"Deno"in globalThis;function jo(){}function OK(e,r){return typeof e=="function"?e(r):e}function o$(e){return typeof e=="number"&&e>=0&&e!==1/0}function a$(e,r){return Math.max(e+(r||0)-Date.now(),0)}function es(e,r){return typeof e=="function"?e(r):e}function E8(e,r){const{type:t="all",exact:n,fetchStatus:s,predicate:o,queryKey:a,stale:i}=e;if(a){if(n){if(r.queryHash!==hj(a,r.options))return!1}else if(!ep(r.queryKey,a))return!1}if(t!=="all"){const c=r.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof i=="boolean"&&r.isStale()!==i||s&&s!==r.state.fetchStatus||o&&!o(r))}function N8(e,r){const{exact:t,status:n,predicate:s,mutationKey:o}=e;if(o){if(!r.options.mutationKey)return!1;if(t){if(Hf(r.options.mutationKey)!==Hf(o))return!1}else if(!ep(r.options.mutationKey,o))return!1}return!(n&&r.state.status!==n||s&&!s(r))}function hj(e,r){return((r==null?void 0:r.queryKeyHashFn)||Hf)(e)}function Hf(e){return JSON.stringify(e,(r,t)=>m4(t)?Object.keys(t).sort().reduce((n,s)=>(n[s]=t[s],n),{}):t)}function ep(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(Array.isArray(e)&&Array.isArray(r)){for(let n=0;n500)return r;const n=A8(e)&&A8(r);if(!n&&!(m4(e)&&m4(r)))return r;const s=(n?e:Object.keys(e)).length,o=n?r:Object.keys(r),a=o.length,i=n?new Array(a):{};let c=0;for(let u=0;u{vf.setTimeout(r,e)})}function g4(e,r,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,r):t.structuralSharing!==!1?pj(e,r):r}function LK(e,r,t=0){const n=[...e,r];return t&&n.length>t?n.slice(1):n}function IK(e,r,t=0){const n=[r,...e];return t&&n.length>t?n.slice(0,-1):n}const mj=Symbol();function i$(e,r){return!e.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!e.queryFn||e.queryFn===mj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gj(e,r){return typeof e=="function"?e(...r):!!e}function PK(e,r,t){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=r()),n||(n=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}let BK=()=>MK;const vj=()=>BK();var ld=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},wf,s_,Dh,KO,FK=(KO=class extends ld{constructor(){super();ft(this,wf);ft(this,s_);ft(this,Dh);Ge(this,Dh,r=>{if(typeof window<"u"&&window.addEventListener){const t=()=>r();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,s_)||this.setEventListener(ue(this,Dh))}onUnsubscribe(){var r;this.hasListeners()||((r=ue(this,s_))==null||r.call(this),Ge(this,s_,void 0))}setEventListener(r){var t;Ge(this,Dh,r),(t=ue(this,s_))==null||t.call(this),Ge(this,s_,r(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(r){ue(this,wf)!==r&&(Ge(this,wf,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(t=>{t(r)})}isFocused(){var r;return typeof ue(this,wf)=="boolean"?ue(this,wf):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},wf=new WeakMap,s_=new WeakMap,Dh=new WeakMap,KO);const bj=new FK,HK=RK;function qK(){let e=[],r=0,t=i=>{i()},n=i=>{i()},s=HK;const o=i=>{r?e.push(i):s(()=>{t(i)})},a=()=>{const i=e;e=[],i.length&&s(()=>{n(()=>{i.forEach(c=>{t(c)})})})};return{batch:i=>{let c;r++;try{c=i()}finally{r--,r||a()}return c},batchCalls:i=>(...c)=>{o(()=>{i(...c)})},schedule:o,setNotifyFunction:i=>{t=i},setBatchNotifyFunction:i=>{n=i},setScheduler:i=>{s=i}}}const qn=qK();var Lh,o_,Ih,VO,UK=(VO=class extends ld{constructor(){super();ft(this,Lh,!0);ft(this,o_);ft(this,Ih);Ge(this,Ih,r=>{if(typeof window<"u"&&window.addEventListener){const t=()=>r(!0),n=()=>r(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){ue(this,o_)||this.setEventListener(ue(this,Ih))}onUnsubscribe(){var r;this.hasListeners()||((r=ue(this,o_))==null||r.call(this),Ge(this,o_,void 0))}setEventListener(r){var t;Ge(this,Ih,r),(t=ue(this,o_))==null||t.call(this),Ge(this,o_,r(this.setOnline.bind(this)))}setOnline(r){ue(this,Lh)!==r&&(Ge(this,Lh,r),this.listeners.forEach(t=>{t(r)}))}isOnline(){return ue(this,Lh)}},Lh=new WeakMap,o_=new WeakMap,Ih=new WeakMap,VO);const tb=new UK;function GK(e){return Math.min(1e3*2**e,3e4)}function c$(e){return(e??"online")==="online"?tb.isOnline():!0}var rb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function WK(e){return e instanceof rb}function l$(e){let r=!1,t=0,n,s="pending",o,a;const i=new Promise((w,y)=>{o=w,a=y});i.catch(jo);const c=()=>s!=="pending",u=w=>{var y;if(!c()){const S=new rb(w);x(S),(y=e.onCancel)==null||y.call(e,S)}},d=()=>{r=!0},_=()=>{r=!1},p=()=>bj.isFocused()&&(e.networkMode==="always"||tb.isOnline())&&e.canRun(),m=()=>c$(e.networkMode)&&e.canRun(),k=w=>{c()||(n==null||n(),s="resolved",o(w))},x=w=>{c()||(n==null||n(),s="rejected",a(w))},v=()=>new Promise(w=>{var y;n=S=>{(c()||p())&&w(S)},(y=e.onPause)==null||y.call(e)}).then(()=>{var w;n=void 0,c()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(c())return;let w;const y=t===0?e.initialPromise:void 0;try{w=y??e.fn()}catch(S){w=Promise.reject(S)}Promise.resolve(w).then(k).catch(S=>{var M;if(c())return;const z=e.retry??(vj()?0:3),N=e.retryDelay??GK,A=typeof N=="function"?N(t,S):N,E=z===!0||typeof z=="number"&&tp()?void 0:v()).then(()=>{r?x(S):b()})})};return{promise:i,status:()=>s,cancel:u,continue:()=>(n==null||n(),i),cancelRetry:d,continueRetry:_,canStart:m,start:()=>(m()?b():v().then(b),i)}}var kf,QO,u$=(QO=class{constructor(){ft(this,kf)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),o$(this.gcTime)&&Ge(this,kf,vf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vj()?1/0:3e5))}clearGcTimeout(){ue(this,kf)!==void 0&&(vf.clearTimeout(ue(this,kf)),Ge(this,kf,void 0))}},kf=new WeakMap,QO);function KK(e){return{onFetch:(r,t)=>{var d,_,p,m,k;const n=r.options,s=(p=(_=(d=r.fetchOptions)==null?void 0:d.meta)==null?void 0:_.fetchMore)==null?void 0:p.direction,o=((m=r.state.data)==null?void 0:m.pages)||[],a=((k=r.state.data)==null?void 0:k.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const u=async()=>{let x=!1;const v=y=>{PK(y,()=>r.signal,()=>x=!0)},b=i$(r.options,r.fetchOptions),w=async(y,S,z)=>{if(x)return Promise.reject(r.signal.reason);if(S==null&&y.pages.length)return Promise.resolve(y);const A=(()=>{const D={client:r.client,queryKey:r.queryKey,pageParam:S,direction:z?"backward":"forward",meta:r.options.meta};return v(D),D})(),E=await b(A),{maxPages:M}=r.options,$=z?IK:LK;return{pages:$(y.pages,E,M),pageParams:$(y.pageParams,S,M)}};if(s&&o.length){const y=s==="backward",S=y?_$:v4,z={pages:o,pageParams:a};i=await w(z,S(n,z),y)}else{const y=e??o.length;do{const S=c===0?a[0]??n.initialPageParam:v4(n,i);if(c>0&&S==null)break;i=await w(i,S),c++}while(c{var x,v;return(v=(x=r.options).persister)==null?void 0:v.call(x,u,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},t)}:r.fetchFn=u}}}function v4(e,{pages:r,pageParams:t}){const n=r.length-1;return r.length>0?e.getNextPageParam(r[n],r,t[n],t):void 0}function _$(e,{pages:r,pageParams:t}){var n;return r.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,r[0],r,t[0],t):void 0}function VK(e,r){return r?v4(e,r)!=null:!1}function QK(e,r){return!r||!e.getPreviousPageParam?!1:_$(e,r)!=null}var Ph,jf,Bh,bi,Sf,$s,qg,Cf,Ui,Pl,XO,XK=(XO=class extends u${constructor(r){super();ft(this,Ui);ft(this,Ph);ft(this,jf);ft(this,Bh);ft(this,bi);ft(this,Sf);ft(this,$s);ft(this,qg);ft(this,Cf);Ge(this,Cf,!1),Ge(this,qg,r.defaultOptions),this.setOptions(r.options),this.observers=[],Ge(this,Sf,r.client),Ge(this,bi,ue(this,Sf).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,Ge(this,jf,M8(this.options)),this.state=r.state??ue(this,jf),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ph)}get promise(){var r;return(r=ue(this,$s))==null?void 0:r.promise}setOptions(r){if(this.options={...ue(this,qg),...r},r!=null&&r._type&&Ge(this,Ph,r._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=M8(this.options);t.data!==void 0&&(this.setState(R8(t.data,t.dataUpdatedAt)),Ge(this,jf,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,bi).remove(this)}setData(r,t){const n=g4(this.state.data,r,this.options);return Kt(this,Ui,Pl).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(r){Kt(this,Ui,Pl).call(this,{type:"setState",state:r})}cancel(r){var n,s;const t=(n=ue(this,$s))==null?void 0:n.promise;return(s=ue(this,$s))==null||s.cancel(r),t?t.then(jo).catch(jo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,jf)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(r=>es(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mj||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>es(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!a$(this.state.dataUpdatedAt,r)}onFocus(){var r,t;(r=this.observers.find(n=>n.shouldFetchOnWindowFocus()))==null||r.refetch({cancelRefetch:!1}),(t=ue(this,$s))==null||t.continue()}onOnline(){var r,t;(r=this.observers.find(n=>n.shouldFetchOnReconnect()))==null||r.refetch({cancelRefetch:!1}),(t=ue(this,$s))==null||t.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),ue(this,bi).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){const t=this.observers.indexOf(r);t!==-1&&(this.observers.splice(t,1),this.observers.length||(ue(this,$s)&&(ue(this,Cf)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,$s).cancel({revert:!0}):ue(this,$s).cancelRetry()),this.scheduleGc()),ue(this,bi).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Kt(this,Ui,Pl).call(this,{type:"invalidate"})}async fetch(r,t){var u,d,_,p,m,k,x,v,b,w,y,S;if(this.state.fetchStatus!=="idle"&&((u=ue(this,$s))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,$s))return ue(this,$s).continueRetry(),ue(this,$s).promise}if(r&&this.setOptions(r),!this.options.queryFn){const z=this.observers.find(N=>N.options.queryFn);z&&this.setOptions(z.options)}const n=new AbortController,s=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(Ge(this,Cf,!0),n.signal)})},o=()=>{const z=i$(this.options,t),A=(()=>{const E={client:ue(this,Sf),queryKey:this.queryKey,meta:this.meta};return s(E),E})();return Ge(this,Cf,!1),this.options.persister?this.options.persister(z,A,this):z(A)},i=(()=>{const z={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,Sf),state:this.state,fetchFn:o};return s(z),z})();(d=ue(this,Ph)==="infinite"?KK(this.options.pages):this.options.behavior)==null||d.onFetch(i,this),Ge(this,Bh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((_=i.fetchOptions)==null?void 0:_.meta))&&Kt(this,Ui,Pl).call(this,{type:"fetch",meta:(p=i.fetchOptions)==null?void 0:p.meta});const c=Ge(this,$s,l$({initialPromise:t==null?void 0:t.initialPromise,fn:i.fetchFn,onCancel:z=>{z instanceof rb&&z.revert&&this.setState({...ue(this,Bh),fetchStatus:"idle"}),n.abort()},onFail:(z,N)=>{Kt(this,Ui,Pl).call(this,{type:"failed",failureCount:z,error:N})},onPause:()=>{Kt(this,Ui,Pl).call(this,{type:"pause"})},onContinue:()=>{Kt(this,Ui,Pl).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const z=await c.start();if(z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(z),(k=(m=ue(this,bi).config).onSuccess)==null||k.call(m,z,this),(v=(x=ue(this,bi).config).onSettled)==null||v.call(x,z,this.state.error,this),z}catch(z){if(z instanceof rb){if(z.silent)return ue(this,$s).promise;if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw Kt(this,Ui,Pl).call(this,{type:"error",error:z}),(w=(b=ue(this,bi).config).onError)==null||w.call(b,z,this),(S=(y=ue(this,bi).config).onSettled)==null||S.call(y,this.state.data,z,this),z}finally{ue(this,$s)===c&&Ge(this,$s,void 0),this.scheduleGc()}}},Ph=new WeakMap,jf=new WeakMap,Bh=new WeakMap,bi=new WeakMap,Sf=new WeakMap,$s=new WeakMap,qg=new WeakMap,Cf=new WeakMap,Ui=new WeakSet,Pl=function(r){const t=n=>{switch(r.type){case"failed":return{...n,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...f$(n.data,this.options),fetchMeta:r.meta??null};case"success":const s={...n,...R8(r.data,r.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,Bh,r.manual?s:void 0),s;case"error":const o=r.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...r.state}}};this.state=t(this.state),qn.batch(()=>{this.observers.slice().forEach(n=>{n.onQueryUpdate()}),ue(this,bi).notify({query:this,type:"updated",action:r})})},XO);function f$(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:c$(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function R8(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function M8(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,t=r!==void 0,n=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Ho,Ir,Ug,qo,zf,Fh,ql,Gg,Hh,qh,Ef,Nf,a_,Uh,Xr,$m,b4,y4,x4,w4,k4,j4,S4,C4,YO,_y=(YO=class extends ld{constructor(r,t){super();ft(this,Xr);ft(this,Ho);ft(this,Ir);ft(this,Ug);ft(this,qo);ft(this,zf);ft(this,Fh);ft(this,ql);ft(this,Gg);ft(this,Hh);ft(this,qh);ft(this,Ef);ft(this,Nf);ft(this,a_);ft(this,Uh,new Set);this.options=t,Ge(this,Ho,r),Ge(this,ql,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Ir).addObserver(this),O8(ue(this,Ir),this.options)?Kt(this,Xr,$m).call(this):this.updateResult(),Kt(this,Xr,k4).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return z4(ue(this,Ir),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return z4(ue(this,Ir),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Kt(this,Xr,j4).call(this),Kt(this,Xr,S4).call(this),ue(this,Ir).removeObserver(this)}setOptions(r){const t=this.options,n=ue(this,Ir);if(this.options=ue(this,Ho).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof es(this.options.enabled,ue(this,Ir))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Kt(this,Xr,C4).call(this),ue(this,Ir).setOptions(this.options),t._defaulted&&!Hm(this.options,t)&&ue(this,Ho).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Ir),observer:this});const s=this.hasListeners();s&&$8(ue(this,Ir),n,this.options,t)&&Kt(this,Xr,$m).call(this),this.updateResult(),s&&(ue(this,Ir)!==n||es(this.options.enabled,ue(this,Ir))!==es(t.enabled,ue(this,Ir))||es(this.options.staleTime,ue(this,Ir))!==es(t.staleTime,ue(this,Ir)))&&Kt(this,Xr,y4).call(this);const o=Kt(this,Xr,x4).call(this);s&&(ue(this,Ir)!==n||es(this.options.enabled,ue(this,Ir))!==es(t.enabled,ue(this,Ir))||o!==ue(this,a_))&&Kt(this,Xr,w4).call(this,o)}getOptimisticResult(r){const t=ue(this,Ho).getQueryCache().build(ue(this,Ho),r),n=this.createResult(t,r);return Hm(this.getCurrentResult(),n)||(Ge(this,qo,n),Ge(this,Fh,this.options),Ge(this,zf,ue(this,Ir).state)),n}getCurrentResult(){return ue(this,qo)}trackResult(r,t){return new Proxy(r,{get:(n,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(n,s))})}trackProp(r){ue(this,Uh).add(r)}getCurrentQuery(){return ue(this,Ir)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const t=ue(this,Ho).defaultQueryOptions(r),n=ue(this,Ho).getQueryCache().build(ue(this,Ho),t);let s=()=>{},o;const a=new Promise(i=>{o=i,s=ue(this,Ho).getQueryCache().subscribe(c=>{c.type==="updated"&&c.query.queryHash===n.queryHash&&n.state.data!==void 0&&(s(),i(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{const i=this.createResult(n,t);return o==null||o(i),i}).finally(()=>{s()}),a])}fetch(r){return Kt(this,Xr,$m).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,qo)))}createResult(r,t){var N;const n=ue(this,Ir),s=this.options,o=ue(this,qo),a=ue(this,zf),i=ue(this,Fh),c=r!==n?r.state:ue(this,Ug),{state:u}=r;let d={...u},_=!1,p;if(t._optimisticResults){const A=this.hasListeners(),E=!A&&O8(r,t),M=A&&$8(r,n,t,s);(E||M)&&(d={...d,...f$(u.data,r.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:k,status:x}=d;p=d.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&x==="pending"){let A;o!=null&&o.isPlaceholderData&&t.placeholderData===(i==null?void 0:i.placeholderData)?(A=o.data,v=!0):A=typeof t.placeholderData=="function"?t.placeholderData((N=ue(this,qh))==null?void 0:N.state.data,ue(this,qh)):t.placeholderData,A!==void 0&&(x="success",p=g4(o==null?void 0:o.data,A,t),_=!0)}if(t.select&&p!==void 0&&!v)if(o&&p===(a==null?void 0:a.data)&&t.select===ue(this,Gg))p=ue(this,Hh);else try{Ge(this,Gg,t.select),p=t.select(p),p=g4(o==null?void 0:o.data,p,t),Ge(this,Hh,p),Ge(this,ql,null)}catch(A){Ge(this,ql,A)}else p===void 0&&Ge(this,ql,null);ue(this,ql)&&(m=ue(this,ql),p=ue(this,Hh),k=Date.now(),x="error",_=!1);const b=d.fetchStatus==="fetching",w=x==="pending",y=x==="error",S=w&&b,z=p!==void 0;return{status:x,fetchStatus:d.fetchStatus,isPending:w,isSuccess:x==="success",isError:y,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:k,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:r.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:y&&!z,isPaused:d.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:y&&z,isStale:yj(r,t),refetch:this.refetch,isEnabled:es(t.enabled,r)!==!1}}updateResult(){const r=ue(this,qo),t=this.createResult(ue(this,Ir),this.options);if(Ge(this,zf,ue(this,Ir).state),Ge(this,Fh,this.options),ue(this,zf).data!==void 0&&Ge(this,qh,ue(this,Ir)),Hm(t,r))return;Ge(this,qo,t);const s=(()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!ue(this,Uh).size)return!0;const i=new Set(a??ue(this,Uh));return this.options.throwOnError&&i.add("error"),Object.keys(ue(this,qo)).some(c=>{const u=c;return ue(this,qo)[u]!==r[u]&&i.has(u)})})();qn.batch(()=>{s&&this.listeners.forEach(o=>{o(ue(this,qo))}),ue(this,Ho).getQueryCache().notify({query:ue(this,Ir),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Kt(this,Xr,k4).call(this)}},Ho=new WeakMap,Ir=new WeakMap,Ug=new WeakMap,qo=new WeakMap,zf=new WeakMap,Fh=new WeakMap,ql=new WeakMap,Gg=new WeakMap,Hh=new WeakMap,qh=new WeakMap,Ef=new WeakMap,Nf=new WeakMap,a_=new WeakMap,Uh=new WeakMap,Xr=new WeakSet,$m=function(r){Kt(this,Xr,C4).call(this);let t=ue(this,Ir).fetch(this.options,r);return r!=null&&r.throwOnError||(t=t.catch(jo)),t},b4=function(r){return!vj()&&es(this.options.enabled,ue(this,Ir))!==!1&&o$(r)},y4=function(){Kt(this,Xr,j4).call(this);const r=es(this.options.staleTime,ue(this,Ir));if(ue(this,qo).isStale||!Kt(this,Xr,b4).call(this,r))return;const t=a$(ue(this,qo).dataUpdatedAt,r)+1;Ge(this,Ef,vf.setTimeout(()=>{ue(this,qo).isStale||this.updateResult()},t))},x4=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Ir)):this.options.refetchInterval)??!1},w4=function(r){Kt(this,Xr,S4).call(this),Ge(this,a_,r),!(ue(this,a_)===0||!Kt(this,Xr,b4).call(this,ue(this,a_)))&&Ge(this,Nf,vf.setInterval(()=>{(this.options.refetchIntervalInBackground||bj.isFocused())&&Kt(this,Xr,$m).call(this)},ue(this,a_)))},k4=function(){Kt(this,Xr,y4).call(this),Kt(this,Xr,w4).call(this,Kt(this,Xr,x4).call(this))},j4=function(){ue(this,Ef)!==void 0&&(vf.clearTimeout(ue(this,Ef)),Ge(this,Ef,void 0))},S4=function(){ue(this,Nf)!==void 0&&(vf.clearInterval(ue(this,Nf)),Ge(this,Nf,void 0))},C4=function(){const r=ue(this,Ho).getQueryCache().build(ue(this,Ho),this.options);if(r===ue(this,Ir))return;const t=ue(this,Ir);Ge(this,Ir,r),Ge(this,Ug,r.state),this.hasListeners()&&(t==null||t.removeObserver(this),r.addObserver(this))},YO);function YK(e,r){return es(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&es(r.retryOnMount,e)===!1)}function O8(e,r){return YK(e,r)||e.state.data!==void 0&&z4(e,r,r.refetchOnMount)}function z4(e,r,t){if(es(r.enabled,e)!==!1&&es(r.staleTime,e)!=="static"){const n=typeof t=="function"?t(e):t;return n==="always"||n!==!1&&yj(e,r)}return!1}function $8(e,r,t,n){return(e!==r||es(n.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&yj(e,t)}function yj(e,r){return es(r.enabled,e)!==!1&&e.isStaleByTime(es(r.staleTime,e))}var ZK=class extends _y{constructor(e,r){super(e,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,r){var m,k;const{state:t}=e,n=super.createResult(e,r),{isFetching:s,isRefetching:o,isError:a,isRefetchError:i}=n,c=(k=(m=t.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:k.direction,u=a&&c==="forward",d=s&&c==="forward",_=a&&c==="backward",p=s&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:VK(r,t.data),hasPreviousPage:QK(r,t.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:_,isFetchingPreviousPage:p,isRefetchError:i&&!u&&!_,isRefetching:o&&!d&&!p}}},Wg,Tc,xo,Af,Rc,Yu,ZO,JK=(ZO=class extends u${constructor(r){super();ft(this,Rc);ft(this,Wg);ft(this,Tc);ft(this,xo);ft(this,Af);Ge(this,Wg,r.client),this.mutationId=r.mutationId,Ge(this,xo,r.mutationCache),Ge(this,Tc,[]),this.state=r.state||d$(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){ue(this,Tc).includes(r)||(ue(this,Tc).push(r),this.clearGcTimeout(),ue(this,xo).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){Ge(this,Tc,ue(this,Tc).filter(t=>t!==r)),this.scheduleGc(),ue(this,xo).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){ue(this,Tc).length||(this.state.status==="pending"?this.scheduleGc():ue(this,xo).remove(this))}continue(){var r;return((r=ue(this,Af))==null?void 0:r.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(r){var i,c,u,d,_,p,m,k,x,v,b,w,y,S,z,N,A,E;const t=()=>{Kt(this,Rc,Yu).call(this,{type:"continue"})},n={client:ue(this,Wg),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,Af,l$({fn:()=>this.options.mutationFn?this.options.mutationFn(r,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,$)=>{Kt(this,Rc,Yu).call(this,{type:"failed",failureCount:M,error:$})},onPause:()=>{Kt(this,Rc,Yu).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,xo).canRun(this)})),o=this.state.status==="pending",a=!s.canStart();try{if(o)t();else{Kt(this,Rc,Yu).call(this,{type:"pending",variables:r,isPaused:a}),ue(this,xo).config.onMutate&&await ue(this,xo).config.onMutate(r,this,n);const $=await((c=(i=this.options).onMutate)==null?void 0:c.call(i,r,n));$!==this.state.context&&Kt(this,Rc,Yu).call(this,{type:"pending",context:$,variables:r,isPaused:a})}const M=await s.start();return await((d=(u=ue(this,xo).config).onSuccess)==null?void 0:d.call(u,M,r,this.state.context,this,n)),await((p=(_=this.options).onSuccess)==null?void 0:p.call(_,M,r,this.state.context,n)),await((k=(m=ue(this,xo).config).onSettled)==null?void 0:k.call(m,M,null,this.state.variables,this.state.context,this,n)),await((v=(x=this.options).onSettled)==null?void 0:v.call(x,M,null,r,this.state.context,n)),Kt(this,Rc,Yu).call(this,{type:"success",data:M}),M}catch(M){try{await((w=(b=ue(this,xo).config).onError)==null?void 0:w.call(b,M,r,this.state.context,this,n))}catch($){Promise.reject($)}try{await((S=(y=this.options).onError)==null?void 0:S.call(y,M,r,this.state.context,n))}catch($){Promise.reject($)}try{await((N=(z=ue(this,xo).config).onSettled)==null?void 0:N.call(z,void 0,M,this.state.variables,this.state.context,this,n))}catch($){Promise.reject($)}try{await((E=(A=this.options).onSettled)==null?void 0:E.call(A,void 0,M,r,this.state.context,n))}catch($){Promise.reject($)}throw Kt(this,Rc,Yu).call(this,{type:"error",error:M}),M}finally{ue(this,Af)===s&&Ge(this,Af,void 0),ue(this,xo).runNext(this)}}},Wg=new WeakMap,Tc=new WeakMap,xo=new WeakMap,Af=new WeakMap,Rc=new WeakSet,Yu=function(r){const t=n=>{switch(r.type){case"failed":return{...n,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...n,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:r.error,failureCount:n.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=t(this.state),qn.batch(()=>{ue(this,Tc).forEach(n=>{n.onMutationUpdate(r)}),ue(this,xo).notify({mutation:this,type:"updated",action:r})})},ZO);function d$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ul,Gi,Kg,JO,eV=(JO=class extends ld{constructor(r={}){super();ft(this,Ul);ft(this,Gi);ft(this,Kg);this.config=r,Ge(this,Ul,new Set),Ge(this,Gi,new Map),Ge(this,Kg,0)}build(r,t,n){const s=new JK({client:r,mutationCache:this,mutationId:++hm(this,Kg)._,options:r.defaultMutationOptions(t),state:n});return this.add(s),s}add(r){ue(this,Ul).add(r);const t=Nv(r);if(typeof t=="string"){const n=ue(this,Gi).get(t);n?n.push(r):ue(this,Gi).set(t,[r])}this.notify({type:"added",mutation:r})}remove(r){if(ue(this,Ul).delete(r)){const t=Nv(r);if(typeof t=="string"){const n=ue(this,Gi).get(t);if(n)if(n.length>1){const s=n.indexOf(r);s!==-1&&n.splice(s,1)}else n[0]===r&&ue(this,Gi).delete(t)}}this.notify({type:"removed",mutation:r})}canRun(r){var n;const t=Nv(r);if(typeof t=="string"){const s=(n=ue(this,Gi).get(t))==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===r}else return!0}runNext(r){var n,s;const t=Nv(r);return typeof t=="string"?((s=(n=ue(this,Gi).get(t))==null?void 0:n.find(o=>o!==r&&o.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){qn.batch(()=>{ue(this,Ul).forEach(r=>{this.notify({type:"removed",mutation:r})}),ue(this,Ul).clear(),ue(this,Gi).clear()})}getAll(){return Array.from(ue(this,Ul))}find(r){const t={exact:!0,...r};return this.getAll().find(n=>N8(t,n))}findAll(r={}){return this.getAll().filter(t=>N8(r,t))}notify(r){qn.batch(()=>{this.listeners.forEach(t=>{t(r)})})}resumePausedMutations(){const r=this.getAll().filter(t=>t.state.isPaused);return qn.batch(()=>Promise.all(r.map(t=>t.continue().catch(jo))))}},Ul=new WeakMap,Gi=new WeakMap,Kg=new WeakMap,JO);function Nv(e){var r;return(r=e.options.scope)==null?void 0:r.id}var Gl,i_,wo,Wl,Ic,Dm,E4,e$,tV=(e$=class extends ld{constructor(t,n){super();ft(this,Ic);ft(this,Gl);ft(this,i_);ft(this,wo);ft(this,Wl);Ge(this,Gl,t),this.setOptions(n),this.bindMethods(),Kt(this,Ic,Dm).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=ue(this,Gl).defaultMutationOptions(t),Hm(this.options,n)||ue(this,Gl).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,wo),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Hf(n.mutationKey)!==Hf(this.options.mutationKey)?this.reset():((s=ue(this,wo))==null?void 0:s.state.status)==="pending"&&ue(this,wo).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,wo)&&(ue(this,wo).addObserver(this),Kt(this,Ic,Dm).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,wo))==null||t.removeObserver(this)}onMutationUpdate(t){Kt(this,Ic,Dm).call(this),Kt(this,Ic,E4).call(this,t)}getCurrentResult(){return ue(this,i_)}reset(){var t;(t=ue(this,wo))==null||t.removeObserver(this),Ge(this,wo,void 0),Kt(this,Ic,Dm).call(this),Kt(this,Ic,E4).call(this)}mutate(t,n){var s;return Ge(this,Wl,n),(s=ue(this,wo))==null||s.removeObserver(this),Ge(this,wo,ue(this,Gl).getMutationCache().build(ue(this,Gl),this.options)),ue(this,wo).addObserver(this),ue(this,wo).execute(t)}},Gl=new WeakMap,i_=new WeakMap,wo=new WeakMap,Wl=new WeakMap,Ic=new WeakSet,Dm=function(){var n;const t=((n=ue(this,wo))==null?void 0:n.state)??d$();Ge(this,i_,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},E4=function(t){qn.batch(()=>{var n,s,o,a,i,c,u,d;if(ue(this,Wl)&&this.hasListeners()){const _=ue(this,i_).variables,p=ue(this,i_).context,m={client:ue(this,Gl),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(n=ue(this,Wl)).onSuccess)==null||s.call(n,t.data,_,p,m)}catch(k){Promise.reject(k)}try{(a=(o=ue(this,Wl)).onSettled)==null||a.call(o,t.data,null,_,p,m)}catch(k){Promise.reject(k)}}else if((t==null?void 0:t.type)==="error"){try{(c=(i=ue(this,Wl)).onError)==null||c.call(i,t.error,_,p,m)}catch(k){Promise.reject(k)}try{(d=(u=ue(this,Wl)).onSettled)==null||d.call(u,void 0,t.error,_,p,m)}catch(k){Promise.reject(k)}}}this.listeners.forEach(_=>{_(ue(this,i_))})})},e$);function D8(e,r){const t=new Set(r);return e.filter(n=>!t.has(n))}var Gh,Uo,Wh,Tf,Da,Rf,Vg,Qg,Xg,Yg,Ps,N4,A4,h$,T4,R4,M4,t$,rV=(t$=class extends ld{constructor(r,t,n){super();ft(this,Ps);ft(this,Gh);ft(this,Uo);ft(this,Wh);ft(this,Tf);ft(this,Da);ft(this,Rf);ft(this,Vg);ft(this,Qg);ft(this,Xg);ft(this,Yg,[]);Ge(this,Gh,r),Ge(this,Tf,n),Ge(this,Wh,[]),Ge(this,Da,[]),Ge(this,Uo,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,Da).forEach(r=>{r.subscribe(t=>{Kt(this,Ps,R4).call(this,r,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,Da).forEach(r=>{r.destroy()})}setQueries(r,t){Ge(this,Wh,r),Ge(this,Tf,t),qn.batch(()=>{const n=ue(this,Da),s=Kt(this,Ps,T4).call(this,ue(this,Wh));s.forEach(_=>_.observer.setOptions(_.defaultedQueryOptions));const o=s.map(_=>_.observer),a=o.map(_=>_.getCurrentResult()),i=n.length!==o.length,c=o.some((_,p)=>_!==n[p]),u=i||c,d=u?!0:a.some((_,p)=>{const m=ue(this,Uo)[p];return!m||!Hm(_,m)});!u&&!d||(u&&(Ge(this,Yg,s),Ge(this,Da,o)),Ge(this,Uo,a),this.hasListeners()&&(u&&(D8(n,o).forEach(_=>{_.destroy()}),D8(o,n).forEach(_=>{_.subscribe(p=>{Kt(this,Ps,R4).call(this,_,p)})})),Kt(this,Ps,M4).call(this)))})}getCurrentResult(){return ue(this,Uo)}getQueries(){return ue(this,Da).map(r=>r.getCurrentQuery())}getObservers(){return ue(this,Da)}getOptimisticResult(r,t){const n=Kt(this,Ps,T4).call(this,r),s=n.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),o=n.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Kt(this,Ps,A4).call(this,a??s,t,o),()=>Kt(this,Ps,N4).call(this,s,n)]}},Gh=new WeakMap,Uo=new WeakMap,Wh=new WeakMap,Tf=new WeakMap,Da=new WeakMap,Rf=new WeakMap,Vg=new WeakMap,Qg=new WeakMap,Xg=new WeakMap,Yg=new WeakMap,Ps=new WeakSet,N4=function(r,t){const n=new Set;return t.map((s,o)=>{const a=r[o];return s.defaultedQueryOptions.notifyOnChangeProps?a:s.observer.trackResult(a,i=>{n.has(i)||(n.add(i),t.forEach(c=>{c.observer.trackProp(i)}))})})},A4=function(r,t,n){if(t){const s=ue(this,Xg),o=n!==void 0&&s!==void 0&&(s.length!==n.length||n.some((a,i)=>a!==s[i]));return(ue(this,Uo)!==ue(this,Qg)||o||t!==ue(this,Vg))&&(Ge(this,Vg,t),Ge(this,Qg,ue(this,Uo)),n!==void 0&&Ge(this,Xg,n),Ge(this,Rf,pj(ue(this,Rf),t(r)))),ue(this,Rf)}return r},h$=function(){var r;return!((r=ue(this,Tf))!=null&&r.combine)||ue(this,Da).some((t,n)=>{var s;return t.options.suspense&&((s=ue(this,Uo)[n])==null?void 0:s.data)===void 0})},T4=function(r){const t=new Map;ue(this,Da).forEach(s=>{const o=s.options.queryHash;if(!o)return;const a=t.get(o);a?a.push(s):t.set(o,[s])});const n=[];return r.forEach(s=>{var i;const o=ue(this,Gh).defaultQueryOptions(s),a=((i=t.get(o.queryHash))==null?void 0:i.shift())??new _y(ue(this,Gh),o);n.push({defaultedQueryOptions:o,observer:a})}),n},R4=function(r,t){const n=ue(this,Da).indexOf(r);n!==-1&&(Ge(this,Uo,ue(this,Uo).slice()),ue(this,Uo)[n]=t,Kt(this,Ps,M4).call(this))},M4=function(){var r;if(this.hasListeners()){const t=Kt(this,Ps,h$).call(this),n=ue(this,Rf),s=t?n:Kt(this,Ps,A4).call(this,Kt(this,Ps,N4).call(this,ue(this,Uo),ue(this,Yg)),(r=ue(this,Tf))==null?void 0:r.combine);(t||n!==s)&&qn.batch(()=>{this.listeners.forEach(o=>{o(ue(this,Uo))})})}},t$),Mc,r$,nV=(r$=class extends ld{constructor(r={}){super();ft(this,Mc);this.config=r,Ge(this,Mc,new Map)}build(r,t,n){const s=t.queryKey,o=t.queryHash??hj(s,t);let a=this.get(o);return a||(a=new XK({client:r,queryKey:s,queryHash:o,options:r.defaultQueryOptions(t),state:n,defaultOptions:r.getQueryDefaults(s)}),this.add(a)),a}add(r){ue(this,Mc).has(r.queryHash)||(ue(this,Mc).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const t=ue(this,Mc).get(r.queryHash);t&&(r.destroy(),t===r&&ue(this,Mc).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){qn.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return ue(this,Mc).get(r)}getAll(){return[...ue(this,Mc).values()]}find(r){const t={exact:!0,...r};return this.getAll().find(n=>E8(t,n))}findAll(r={}){const t=this.getAll();return Object.keys(r).length>0?t.filter(n=>E8(r,n)):t}notify(r){qn.batch(()=>{this.listeners.forEach(t=>{t(r)})})}onFocus(){qn.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){qn.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},Mc=new WeakMap,r$),Fn,c_,l_,Kh,Vh,u_,Qh,Xh,n$,sV=(n$=class{constructor(e={}){ft(this,Fn);ft(this,c_);ft(this,l_);ft(this,Kh);ft(this,Vh);ft(this,u_);ft(this,Qh);ft(this,Xh);Ge(this,Fn,e.queryCache||new nV),Ge(this,c_,e.mutationCache||new eV),Ge(this,l_,e.defaultOptions||{}),Ge(this,Kh,new Map),Ge(this,Vh,new Map),Ge(this,u_,0)}mount(){hm(this,u_)._++,ue(this,u_)===1&&(Ge(this,Qh,bj.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Fn).onFocus())})),Ge(this,Xh,tb.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Fn).onOnline())})))}unmount(){var e,r;hm(this,u_)._--,ue(this,u_)===0&&((e=ue(this,Qh))==null||e.call(this),Ge(this,Qh,void 0),(r=ue(this,Xh))==null||r.call(this),Ge(this,Xh,void 0))}isFetching(e){return ue(this,Fn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,c_).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Fn).get(r.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),t=ue(this,Fn).build(this,r),n=t.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(es(r.staleTime,t))&&this.prefetchQuery(r),Promise.resolve(n))}getQueriesData(e){return ue(this,Fn).findAll(e).map(({queryKey:r,state:t})=>[r,t.data])}setQueryData(e,r,t){var a;const n=this.defaultQueryOptions({queryKey:e}),s=(a=ue(this,Fn).get(n.queryHash))==null?void 0:a.state.data,o=OK(r,s);if(o!==void 0)return ue(this,Fn).build(this,n).setData(o,{...t,manual:!0})}setQueriesData(e,r,t){return qn.batch(()=>ue(this,Fn).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,r,t)]))}getQueryState(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Fn).get(r.queryHash))==null?void 0:t.state}removeQueries(e){const r=ue(this,Fn);qn.batch(()=>{r.findAll(e).forEach(t=>{r.remove(t)})})}resetQueries(e,r){const t=ue(this,Fn);return qn.batch(()=>{const n=t.findAll(e),s=new Set(n);return n.forEach(o=>{o.reset()}),this.refetchQueries({type:"active",predicate:o=>s.has(o)},r)})}cancelQueries(e,r={}){const t={revert:!0,...r},n=qn.batch(()=>ue(this,Fn).findAll(e).map(s=>s.cancel(t)));return Promise.all(n).then(jo).catch(jo)}invalidateQueries(e,r={}){return qn.batch(()=>(ue(this,Fn).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},r)))}refetchQueries(e,r={}){const t={...r,cancelRefetch:r.cancelRefetch??!0},n=qn.batch(()=>ue(this,Fn).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,t);return t.throwOnError||(o=o.catch(jo)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(jo)}async query(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const t=ue(this,Fn).build(this,r),n=t.isStaleByTime(es(r.staleTime,t))?await t.fetch(r):t.state.data,s=r.select;return s?s(n):n}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const t=ue(this,Fn).build(this,r);return t.isStaleByTime(es(r.staleTime,t))?t.fetch(r):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jo).catch(jo)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jo).catch(jo)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return tb.isOnline()?ue(this,c_).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Fn)}getMutationCache(){return ue(this,c_)}getDefaultOptions(){return ue(this,l_)}setDefaultOptions(e){Ge(this,l_,e)}setQueryDefaults(e,r){ue(this,Kh).set(Hf(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...ue(this,Kh).values()],t={};return r.forEach(n=>{ep(e,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(e,r){ue(this,Vh).set(Hf(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...ue(this,Vh).values()],t={};return r.forEach(n=>{ep(e,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const r={...ue(this,l_).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=hj(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===mj&&(r.enabled=!1),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,l_).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Fn).clear(),ue(this,c_).clear()}},Fn=new WeakMap,c_=new WeakMap,l_=new WeakMap,Kh=new WeakMap,Vh=new WeakMap,u_=new WeakMap,Qh=new WeakMap,Xh=new WeakMap,n$);const p$=T.createContext(!1),m$=()=>T.useContext(p$);p$.Provider;function oV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const aV=T.createContext(oV()),g$=()=>T.useContext(aV),v$=(e,r,t)=>{const n=t!=null&&t.state.error&&typeof e.throwOnError=="function"?gj(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||n)&&(r.isReset()||(e.retryOnMount=!1))},b$=e=>{T.useEffect(()=>{e.clearReset()},[e])},y$=({result:e,errorResetBoundary:r,throwOnError:t,query:n,suspense:s})=>e.isError&&!r.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||gj(t,[e.error,n])),x$=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>t(n(...s)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},O4=(e,r)=>(e==null?void 0:e.suspense)&&r.isPending,w$=(e,r,t)=>r.fetchOptimistic(e).catch(()=>{t.clearReset()});function k$({queries:e,...r},t){const n=o0(),s=m$(),o=g$(),a=r.subscribed!==!1,i=T.useMemo(()=>e.map(x=>{const v=n.defaultQueryOptions(x);return v._optimisticResults=s?"isRestoring":a?"optimistic":void 0,v}),[e,n,s,a]);i.forEach(x=>{x$(x);const v=n.getQueryCache().get(x.queryHash);v$(x,o,v)}),b$(o);const[c]=T.useState(()=>new rV(n,i,r)),[u,d,_]=c.getOptimisticResult(i,r.combine),p=!s&&a;T.useSyncExternalStore(T.useCallback(x=>p?c.subscribe(qn.batchCalls(x)):jo,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setQueries(i,r)},[i,r,c]);const m=u.some((x,v)=>O4(i[v],x))?u.flatMap((x,v)=>{const b=i[v];if(b&&O4(b,x)){const w=new _y(n,b);return w$(b,w,o)}return[]}):[];if(m.length>0)throw Promise.all(m);const k=u.find((x,v)=>{const b=i[v];return b&&y$({result:x,errorResetBoundary:o,throwOnError:b.throwOnError,query:n.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(k)throw k.error;return d(_())}function j$(e,r,t){const n=m$(),s=g$(),o=o0(),a=o.defaultQueryOptions(e),i=o.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=n?"isRestoring":c?"optimistic":void 0,x$(a),v$(a,s,i),b$(s);const[u]=T.useState(()=>new r(o,a)),d=u.getOptimisticResult(a),_=!n&&c;if(T.useSyncExternalStore(T.useCallback(p=>{const m=_?u.subscribe(qn.batchCalls(p)):jo;return u.updateResult(),m},[u,_]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),T.useEffect(()=>{u.setOptions(a)},[a,u]),O4(a,d))throw w$(a,u,s);if(y$({result:d,errorResetBoundary:s,throwOnError:a.throwOnError,query:i,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:u.trackResult(d)}function dt(e,r){return j$(e,_y)}function iV(e,r){const t=o0(),n=t.getQueryCache();return T.useSyncExternalStore(T.useCallback(s=>n.subscribe(qn.batchCalls(s)),[n]),()=>t.isFetching(e),()=>t.isFetching(e))}function mr(e,r){const t=o0(),[n]=T.useState(()=>new tV(t,e));T.useEffect(()=>{n.setOptions(e)},[n,e]);const s=T.useSyncExternalStore(T.useCallback(a=>n.subscribe(qn.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=T.useCallback((...a)=>{n.mutate(a[0],a[1]).catch(jo)},[n]);if(s.error&&gj(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}function cV(e,r){return j$(e,ZK)}const lV="modulepreload",uV=function(e){return"/"+e},L8={},_V=function(r,t,n){let s=Promise.resolve();if(t&&t.length>0){let a=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),c=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=a(t.map(u=>{if(u=uV(u),u in L8)return;L8[u]=!0;const d=u.endsWith(".css"),_=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${_}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":lV,d||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((m,k)=>{p.addEventListener("load",m),p.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=a,window.dispatchEvent(i),!i.defaultPrevented)throw a}return s.then(a=>{for(const i of a||[])i.status==="rejected"&&o(i.reason);return r().catch(o)})},Je=new sV({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),Pc=new Set;let I8=null,fy=0;const $4=new Set,fV=()=>fy,P8=e=>($4.add(e),()=>{$4.delete(e)}),Si=()=>["workspace",fy],Mt=(e,...r)=>[...Si(),e,...r];function dV(e,r=!1){if(I8===e&&!r)return!1;const t=Si();return I8=e,fy++,Pc.clear(),xj({queryKey:t}),$4.forEach(n=>n()),!0}const Wr=e=>e[1]===fy;async function xj(e){await Je.cancelQueries(e,{revert:!1}),Je.removeQueries(e)}function ts(e,r){if(Wr(e))return Je.setQueryData(e,r)}var h2={exports:{}},mm={},p2={exports:{}},m2={};/** * @license React * scheduler.production.js * @@ -23,7 +23,7 @@ var jK=Object.defineProperty;var k8=e=>{throw TypeError(e)};var SK=(e,r,t)=>r in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var B8;function hV(){return B8||(B8=1,(function(e){function r(K,J){var ee=K.length;K.push(J);e:for(;0>>1,L=K[P];if(0>>1;Ps(U,ee))oes(ie,U)?(K[P]=ie,K[oe]=ee,P=oe):(K[P]=U,K[q]=ee,P=q);else if(oes(ie,ee))K[P]=ie,K[oe]=ee,P=oe;else break e}}return J}function s(K,J){var ee=K.sortIndex-J.sortIndex;return ee!==0?ee:K.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,i=a.now();e.unstable_now=function(){return a.now()-i}}var c=[],u=[],d=1,_=null,p=3,m=!1,k=!1,w=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function S(K){for(var J=t(u);J!==null;){if(J.callback===null)n(u);else if(J.startTime<=K)n(u),J.sortIndex=J.expirationTime,r(c,J);else break;J=t(u)}}function z(K){if(w=!1,S(K),!k)if(t(c)!==null)k=!0,E||(E=!0,I());else{var J=t(u);J!==null&&Q(z,J.startTime-K)}}var E=!1,A=-1,N=5,M=-1;function $(){return v?!0:!(e.unstable_now()-MK&&$());){var P=_.callback;if(typeof P=="function"){_.callback=null,p=_.priorityLevel;var L=P(_.expirationTime<=K);if(K=e.unstable_now(),typeof L=="function"){_.callback=L,S(K),J=!0;break t}_===t(c)&&n(c),S(K)}else n(c);_=t(c)}if(_!==null)J=!0;else{var F=t(u);F!==null&&Q(z,F.startTime-K),J=!1}}break e}finally{_=null,p=ee,m=!1}J=void 0}}finally{J?I():E=!1}}}var I;if(typeof y=="function")I=function(){y(D)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,H=G.port2;G.port1.onmessage=D,I=function(){H.postMessage(null)}}else I=function(){b(D,0)};function Q(K,J){A=b(function(){K(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125P?(K.sortIndex=ee,r(u,K),t(c)===null&&K===t(u)&&(w?(x(A),A=-1):w=!0,Q(z,ee-P))):(K.sortIndex=L,r(c,K),k||m||(k=!0,E||(E=!0,I()))),K},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(K){var J=p;return function(){var ee=p;p=J;try{return K.apply(this,arguments)}finally{p=ee}}}})(m2)),m2}var F8;function pV(){return F8||(F8=1,p2.exports=hV()),p2.exports}var g2={exports:{}},yo={};/** + */var B8;function hV(){return B8||(B8=1,(function(e){function r(K,J){var ee=K.length;K.push(J);e:for(;0>>1,L=K[P];if(0>>1;Ps(U,ee))oes(ie,U)?(K[P]=ie,K[oe]=ee,P=oe):(K[P]=U,K[q]=ee,P=q);else if(oes(ie,ee))K[P]=ie,K[oe]=ee,P=oe;else break e}}return J}function s(K,J){var ee=K.sortIndex-J.sortIndex;return ee!==0?ee:K.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,i=a.now();e.unstable_now=function(){return a.now()-i}}var c=[],u=[],d=1,_=null,p=3,m=!1,k=!1,x=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function S(K){for(var J=t(u);J!==null;){if(J.callback===null)n(u);else if(J.startTime<=K)n(u),J.sortIndex=J.expirationTime,r(c,J);else break;J=t(u)}}function z(K){if(x=!1,S(K),!k)if(t(c)!==null)k=!0,N||(N=!0,I());else{var J=t(u);J!==null&&Q(z,J.startTime-K)}}var N=!1,A=-1,E=5,M=-1;function $(){return v?!0:!(e.unstable_now()-MK&&$());){var P=_.callback;if(typeof P=="function"){_.callback=null,p=_.priorityLevel;var L=P(_.expirationTime<=K);if(K=e.unstable_now(),typeof L=="function"){_.callback=L,S(K),J=!0;break t}_===t(c)&&n(c),S(K)}else n(c);_=t(c)}if(_!==null)J=!0;else{var F=t(u);F!==null&&Q(z,F.startTime-K),J=!1}}break e}finally{_=null,p=ee,m=!1}J=void 0}}finally{J?I():N=!1}}}var I;if(typeof y=="function")I=function(){y(D)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,H=G.port2;G.port1.onmessage=D,I=function(){H.postMessage(null)}}else I=function(){b(D,0)};function Q(K,J){A=b(function(){K(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125P?(K.sortIndex=ee,r(u,K),t(c)===null&&K===t(u)&&(x?(w(A),A=-1):x=!0,Q(z,ee-P))):(K.sortIndex=L,r(c,K),k||m||(k=!0,N||(N=!0,I()))),K},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(K){var J=p;return function(){var ee=p;p=J;try{return K.apply(this,arguments)}finally{p=ee}}}})(m2)),m2}var F8;function pV(){return F8||(F8=1,p2.exports=hV()),p2.exports}var g2={exports:{}},yo={};/** * @license React * react-dom.production.js * @@ -39,15 +39,15 @@ var jK=Object.defineProperty;var k8=e=>{throw TypeError(e)};var SK=(e,r,t)=>r in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var U8;function gV(){if(U8)return mm;U8=1;var e=pV(),r=s0(),t=S$();function n(l){var h="https://react.dev/errors/"+l;if(1L||(l.current=P[L],P[L]=null,L--)}function U(l,h){L++,P[L]=l.current,l.current=h}var oe=F(null),ie=F(null),ce=F(null),re=F(null);function W(l,h){switch(U(ce,h),U(ie,l),U(oe,null),h.nodeType){case 9:case 11:l=(l=h.documentElement)&&(l=l.namespaceURI)?Wz(l):0;break;default:if(l=h.tagName,h=h.namespaceURI)h=Wz(h),l=Kz(h,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}q(oe),U(oe,l)}function ae(){q(oe),q(ie),q(ce)}function le(l){l.memoizedState!==null&&U(re,l);var h=oe.current,g=Kz(h,l.type);h!==g&&(U(ie,l),U(oe,g))}function me(l){ie.current===l&&(q(oe),q(ie)),re.current===l&&(q(re),um._currentValue=ee)}var be,Se;function Be(l){if(be===void 0)try{throw Error()}catch(g){var h=g.stack.trim().match(/\n( *(at )?)/);be=h&&h[1]||"",Se=-1L||(l.current=P[L],P[L]=null,L--)}function U(l,h){L++,P[L]=l.current,l.current=h}var oe=F(null),ie=F(null),ce=F(null),re=F(null);function W(l,h){switch(U(ce,h),U(ie,l),U(oe,null),h.nodeType){case 9:case 11:l=(l=h.documentElement)&&(l=l.namespaceURI)?Wz(l):0;break;default:if(l=h.tagName,h=h.namespaceURI)h=Wz(h),l=Kz(h,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}q(oe),U(oe,l)}function ae(){q(oe),q(ie),q(ce)}function le(l){l.memoizedState!==null&&U(re,l);var h=oe.current,g=Kz(h,l.type);h!==g&&(U(ie,l),U(oe,g))}function me(l){ie.current===l&&(q(oe),q(ie)),re.current===l&&(q(re),um._currentValue=ee)}var be,Se;function Be(l){if(be===void 0)try{throw Error()}catch(g){var h=g.stack.trim().match(/\n( *(at )?)/);be=h&&h[1]||"",Se=-1)":-1R||pe[j]!==ze[R]){var He=` `+pe[j].replace(" at new "," at ");return l.displayName&&He.includes("")&&(He=He.replace("",l.displayName)),He}while(1<=j&&0<=R);break}}}finally{Xe=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?Be(g):""}function Fe(l,h){switch(l.tag){case 26:case 27:case 5:return Be(l.type);case 16:return Be("Lazy");case 13:return l.child!==h&&h!==null?Be("Suspense Fallback"):Be("Suspense");case 19:return Be("SuspenseList");case 0:case 15:return Me(l.type,!1);case 11:return Me(l.type.render,!1);case 1:return Me(l.type,!0);case 31:return Be("Activity");default:return""}}function pt(l){try{var h="",g=null;do h+=Fe(l,g),g=l,l=l.return;while(l);return h}catch(j){return` Error generating stack: `+j.message+` -`+j.stack}}var Ct=Object.prototype.hasOwnProperty,Vt=e.unstable_scheduleCallback,Ut=e.unstable_cancelCallback,Gt=e.unstable_shouldYield,De=e.unstable_requestPaint,ct=e.unstable_now,lt=e.unstable_getCurrentPriorityLevel,xe=e.unstable_ImmediatePriority,Ie=e.unstable_UserBlockingPriority,Ye=e.unstable_NormalPriority,Ae=e.unstable_LowPriority,Ve=e.unstable_IdlePriority,Ze=e.log,at=e.unstable_setDisableYieldValue,At=null,Pe=null;function Jt(l){if(typeof Ze=="function"&&at(l),Pe&&typeof Pe.setStrictMode=="function")try{Pe.setStrictMode(At,l)}catch{}}var Tt=Math.clz32?Math.clz32:nr,Zr=Math.log,cr=Math.LN2;function nr(l){return l>>>=0,l===0?32:31-(Zr(l)/cr|0)|0}var Wt=256,wt=262144,ns=4194304;function Hr(l){var h=l&42;if(h!==0)return h;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function en(l,h,g){var j=l.pendingLanes;if(j===0)return 0;var R=0,O=l.suspendedLanes,X=l.pingedLanes;l=l.warmLanes;var ne=j&134217727;return ne!==0?(j=ne&~O,j!==0?R=Hr(j):(X&=ne,X!==0?R=Hr(X):g||(g=ne&~l,g!==0&&(R=Hr(g))))):(ne=j&~O,ne!==0?R=Hr(ne):X!==0?R=Hr(X):g||(g=j&~l,g!==0&&(R=Hr(g)))),R===0?0:h!==0&&h!==R&&(h&O)===0&&(O=R&-R,g=h&-h,O>=g||O===32&&(g&4194048)!==0)?h:R}function gr(l,h){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&h)===0}function ut(l,h){switch(l){case 1:case 2:case 4:case 8:case 64:return h+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dr(){var l=ns;return ns<<=1,(ns&62914560)===0&&(ns=4194304),l}function Cr(l){for(var h=[],g=0;31>g;g++)h.push(l);return h}function $r(l,h){l.pendingLanes|=h,h!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function wn(l,h,g,j,R,O){var X=l.pendingLanes;l.pendingLanes=g,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=g,l.entangledLanes&=g,l.errorRecoveryDisabledLanes&=g,l.shellSuspendCounter=0;var ne=l.entanglements,pe=l.expirationTimes,ze=l.hiddenUpdates;for(g=X&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var ho=/[\n"\\]/g;function Kn(l){return l.replace(ho,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Xs(l,h,g,j,R,O,X,ne){l.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?l.type=X:l.removeAttribute("type"),h!=null?X==="number"?(h===0&&l.value===""||l.value!=h)&&(l.value=""+As(h)):l.value!==""+As(h)&&(l.value=""+As(h)):X!=="submit"&&X!=="reset"||l.removeAttribute("value"),h!=null?To(l,X,As(h)):g!=null?To(l,X,As(g)):j!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?l.name=""+As(ne):l.removeAttribute("name")}function Ys(l,h,g,j,R,O,X,ne){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),h!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||h!=null)){ti(l);return}g=g!=null?""+As(g):"",h=h!=null?""+As(h):g,ne||h===l.value||(l.value=h),l.defaultValue=h}j=j??R,j=typeof j!="function"&&typeof j!="symbol"&&!!j,l.checked=ne?l.checked:!!j,l.defaultChecked=!!j,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(l.name=X),ti(l)}function To(l,h,g){h==="number"&&Tn(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function Zo(l,h,g,j){if(l=l.options,h){h={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),il=!1;if(ea)try{var Ri={};Object.defineProperty(Ri,"passive",{get:function(){il=!0}}),window.addEventListener("test",Ri,Ri),window.removeEventListener("test",Ri,Ri)}catch{il=!1}var Et=null,pu=null,hs=null;function mu(){if(hs)return hs;var l,h=pu,g=h.length,j,R="value"in Et?Et.value:Et.textContent,O=R.length;for(l=0;l=si),ro=" ",ta=!1;function Oi(l,h){switch(l){case"keyup":return P_.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yu(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var xn=!1;function Ts(l,h){switch(l){case"compositionend":return yu(h);case"keypress":return h.which!==32?null:(ta=!0,ro);case"textInput":return l=h.data,l===ro&&ta?null:l;default:return null}}function Sn(l,h){if(xn)return l==="compositionend"||!gl&&Oi(l,h)?(l=mu(),hs=pu=Et=null,xn=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1=h)return{node:g,offset:h-l};l=j}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=G_(g)}}function W_(l,h){return l&&h?l===h?!0:l&&l.nodeType===3?!1:h&&h.nodeType===3?W_(l,h.parentNode):"contains"in l?l.contains(h):l.compareDocumentPosition?!!(l.compareDocumentPosition(h)&16):!1:!1}function Vn(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var h=Tn(l.document);h instanceof l.HTMLIFrameElement;){try{var g=typeof h.contentWindow.location.href=="string"}catch{g=!1}if(g)l=h.contentWindow;else break;h=Tn(l.document)}return h}function ii(l){var h=l&&l.nodeName&&l.nodeName.toLowerCase();return h&&(h==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||h==="textarea"||l.contentEditable==="true")}var bl=ea&&"documentMode"in document&&11>=document.documentMode,Do=null,ci=null,li=null,ps=!1;function ms(l,h,g){var j=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;ps||Do==null||Do!==Tn(j)||(j=Do,"selectionStart"in j&&ii(j)?j={start:j.selectionStart,end:j.selectionEnd}:(j=(j.ownerDocument&&j.ownerDocument.defaultView||window).getSelection(),j={anchorNode:j.anchorNode,anchorOffset:j.anchorOffset,focusNode:j.focusNode,focusOffset:j.focusOffset}),li&&ai(li,j)||(li=j,j=hv(ci,"onSelect"),0>=X,R-=X,za=1<<32-Tt(h)+R|g<vr?(Or=Ot,Ot=null):Or=Ot.sibling;var Gr=Ne(je,Ot,Ce[vr],qe);if(Gr===null){Ot===null&&(Ot=Or);break}l&&Ot&&Gr.alternate===null&&h(je,Ot),ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr,Ot=Or}if(vr===Ce.length)return g(je,Ot),Er&&di(je,vr),qt;if(Ot===null){for(;vrvr?(Or=Ot,Ot=null):Or=Ot.sibling;var Uu=Ne(je,Ot,Gr.value,qe);if(Uu===null){Ot===null&&(Ot=Or);break}l&&Ot&&Uu.alternate===null&&h(je,Ot),ge=O(Uu,ge,vr),Ur===null?qt=Uu:Ur.sibling=Uu,Ur=Uu,Ot=Or}if(Gr.done)return g(je,Ot),Er&&di(je,vr),qt;if(Ot===null){for(;!Gr.done;vr++,Gr=Ce.next())Gr=Ue(je,Gr.value,qe),Gr!==null&&(ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr);return Er&&di(je,vr),qt}for(Ot=j(Ot);!Gr.done;vr++,Gr=Ce.next())Gr=$e(Ot,je,vr,Gr.value,qe),Gr!==null&&(l&&Gr.alternate!==null&&Ot.delete(Gr.key===null?vr:Gr.key),ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr);return l&&Ot.forEach(function(kK){return h(je,kK)}),Er&&di(je,vr),qt}function hn(je,ge,Ce,qe){if(typeof Ce=="object"&&Ce!==null&&Ce.type===w&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case m:e:{for(var qt=Ce.key;ge!==null;){if(ge.key===qt){if(qt=Ce.type,qt===w){if(ge.tag===7){g(je,ge.sibling),qe=R(ge,Ce.props.children),qe.return=je,je=qe;break e}}else if(ge.elementType===qt||typeof qt=="object"&&qt!==null&&qt.$$typeof===N&&Z_(qt)===ge.type){g(je,ge.sibling),qe=R(ge,Ce.props),Fp(qe,Ce),qe.return=je,je=qe;break e}g(je,ge);break}else h(je,ge);ge=ge.sibling}Ce.type===w?(qe=Lo(Ce.props.children,je.mode,qe,Ce.key),qe.return=je,je=qe):(qe=Ca(Ce.type,Ce.key,Ce.props,null,je.mode,qe),Fp(qe,Ce),qe.return=je,je=qe)}return X(je);case k:e:{for(qt=Ce.key;ge!==null;){if(ge.key===qt)if(ge.tag===4&&ge.stateNode.containerInfo===Ce.containerInfo&&ge.stateNode.implementation===Ce.implementation){g(je,ge.sibling),qe=R(ge,Ce.children||[]),qe.return=je,je=qe;break e}else{g(je,ge);break}else h(je,ge);ge=ge.sibling}qe=_i(Ce,je.mode,qe),qe.return=je,je=qe}return X(je);case N:return Ce=Z_(Ce),hn(je,ge,Ce,qe)}if(Q(Ce))return St(je,ge,Ce,qe);if(I(Ce)){if(qt=I(Ce),typeof qt!="function")throw Error(n(150));return Ce=qt.call(Ce),Xt(je,ge,Ce,qe)}if(typeof Ce.then=="function")return hn(je,ge,I0(Ce),qe);if(Ce.$$typeof===y)return hn(je,ge,bc(je,Ce),qe);P0(je,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint"?(Ce=""+Ce,ge!==null&&ge.tag===6?(g(je,ge.sibling),qe=R(ge,Ce),qe.return=je,je=qe):(g(je,ge),qe=pc(Ce,je.mode,qe),qe.return=je,je=qe),X(je)):g(je,ge)}return function(je,ge,Ce,qe){try{Bp=0;var qt=hn(je,ge,Ce,qe);return Id=null,qt}catch(Ot){if(Ot===Ld||Ot===D0)throw Ot;var Ur=un(29,Ot,null,je.mode);return Ur.lanes=qe,Ur.return=je,Ur}finally{}}}var ef=LC(!0),IC=LC(!1),zu=!1;function Fx(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hx(l,h){l=l.updateQueue,h.updateQueue===l&&(h.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Eu(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Nu(l,h,g){var j=l.updateQueue;if(j===null)return null;if(j=j.shared,(Kr&2)!==0){var R=j.pending;return R===null?h.next=h:(h.next=R.next,R.next=h),j.pending=h,h=_t(l),mt(l,null,g),h}return we(l,j,h,g),_t(l)}function Hp(l,h,g){if(h=h.updateQueue,h!==null&&(h=h.shared,(g&4194048)!==0)){var j=h.lanes;j&=l.pendingLanes,g|=j,h.lanes=g,yr(l,g)}}function qx(l,h){var g=l.updateQueue,j=l.alternate;if(j!==null&&(j=j.updateQueue,g===j)){var R=null,O=null;if(g=g.firstBaseUpdate,g!==null){do{var X={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};O===null?R=O=X:O=O.next=X,g=g.next}while(g!==null);O===null?R=O=h:O=O.next=h}else R=O=h;g={baseState:j.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:j.shared,callbacks:j.callbacks},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=h:l.next=h,g.lastBaseUpdate=h}var Ux=!1;function qp(){if(Ux){var l=sa;if(l!==null)throw l}}function Up(l,h,g,j){Ux=!1;var R=l.updateQueue;zu=!1;var O=R.firstBaseUpdate,X=R.lastBaseUpdate,ne=R.shared.pending;if(ne!==null){R.shared.pending=null;var pe=ne,ze=pe.next;pe.next=null,X===null?O=ze:X.next=ze,X=pe;var He=l.alternate;He!==null&&(He=He.updateQueue,ne=He.lastBaseUpdate,ne!==X&&(ne===null?He.firstBaseUpdate=ze:ne.next=ze,He.lastBaseUpdate=pe))}if(O!==null){var Ue=R.baseState;X=0,He=ze=pe=null,ne=O;do{var Ne=ne.lane&-536870913,$e=Ne!==ne.lane;if($e?(Mr&Ne)===Ne:(j&Ne)===Ne){Ne!==0&&Ne===Lr&&(Ux=!0),He!==null&&(He=He.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var St=l,Xt=ne;Ne=h;var hn=g;switch(Xt.tag){case 1:if(St=Xt.payload,typeof St=="function"){Ue=St.call(hn,Ue,Ne);break e}Ue=St;break e;case 3:St.flags=St.flags&-65537|128;case 0:if(St=Xt.payload,Ne=typeof St=="function"?St.call(hn,Ue,Ne):St,Ne==null)break e;Ue=_({},Ue,Ne);break e;case 2:zu=!0}}Ne=ne.callback,Ne!==null&&(l.flags|=64,$e&&(l.flags|=8192),$e=R.callbacks,$e===null?R.callbacks=[Ne]:$e.push(Ne))}else $e={lane:Ne,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},He===null?(ze=He=$e,pe=Ue):He=He.next=$e,X|=Ne;if(ne=ne.next,ne===null){if(ne=R.shared.pending,ne===null)break;$e=ne,ne=$e.next,$e.next=null,R.lastBaseUpdate=$e,R.shared.pending=null}}while(!0);He===null&&(pe=Ue),R.baseState=pe,R.firstBaseUpdate=ze,R.lastBaseUpdate=He,O===null&&(R.shared.lanes=0),Ou|=X,l.lanes=X,l.memoizedState=Ue}}function PC(l,h){if(typeof l!="function")throw Error(n(191,l));l.call(h)}function BC(l,h){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var X=K.T,ne={};K.T=ne,lw(l,!1,h,g);try{var pe=R(),ze=K.S;if(ze!==null&&ze(ne,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var He=Dd(pe,j);Kp(l,h,He,Ma(l))}else Kp(l,h,j,Ma(l))}catch(Ue){Kp(l,h,{then:function(){},status:"rejected",reason:Ue},Ma())}finally{J.p=O,X!==null&&ne.types!==null&&(X.types=ne.types),K.T=X}}function vW(){}function iw(l,h,g,j){if(l.tag!==5)throw Error(n(476));var R=v7(l).queue;g7(l,R,h,ee,g===null?vW:function(){return b7(l),g(j)})}function v7(l){var h=l.memoizedState;if(h!==null)return h;h={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:ee},next:null};var g={};return h.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:g},next:null},l.memoizedState=h,l=l.alternate,l!==null&&(l.memoizedState=h),h}function b7(l){var h=v7(l);h.next===null&&(h=l.alternate.memoizedState),Kp(l,h.next.queue,{},Ma())}function cw(){return bs(um)}function y7(){return cs().memoizedState}function x7(){return cs().memoizedState}function bW(l){for(var h=l.return;h!==null;){switch(h.tag){case 24:case 3:var g=Ma();l=Eu(g);var j=Nu(h,l,g);j!==null&&(la(j,h,g),Hp(j,h,g)),h={cache:Od()},l.payload=h;return}h=h.return}}function yW(l,h,g){var j=Ma();g={lane:j,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Q0(l)?k7(h,g):(g=Re(l,h,g,j),g!==null&&(la(g,l,j),j7(g,h,j)))}function w7(l,h,g){var j=Ma();Kp(l,h,g,j)}function Kp(l,h,g,j){var R={lane:j,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(Q0(l))k7(h,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=h.lastRenderedReducer,O!==null))try{var X=h.lastRenderedState,ne=O(X,g);if(R.hasEagerState=!0,R.eagerState=ne,Yt(ne,X))return we(l,h,R,0),mn===null&&fe(),!1}catch{}finally{}if(g=Re(l,h,R,j),g!==null)return la(g,l,j),j7(g,h,j),!0}return!1}function lw(l,h,g,j){if(j={lane:2,revertLane:Fw(),gesture:null,action:j,hasEagerState:!1,eagerState:null,next:null},Q0(l)){if(h)throw Error(n(479))}else h=Re(l,g,j,2),h!==null&&la(h,l,2)}function Q0(l){var h=l.alternate;return l===pr||h!==null&&h===pr}function k7(l,h){Bd=H0=!0;var g=l.pending;g===null?h.next=h:(h.next=g.next,g.next=h),l.pending=h}function j7(l,h,g){if((g&4194048)!==0){var j=h.lanes;j&=l.pendingLanes,g|=j,h.lanes=g,yr(l,g)}}var Vp={readContext:bs,use:G0,useCallback:Yn,useContext:Yn,useEffect:Yn,useImperativeHandle:Yn,useLayoutEffect:Yn,useInsertionEffect:Yn,useMemo:Yn,useReducer:Yn,useRef:Yn,useState:Yn,useDebugValue:Yn,useDeferredValue:Yn,useTransition:Yn,useSyncExternalStore:Yn,useId:Yn,useHostTransitionStatus:Yn,useFormState:Yn,useActionState:Yn,useOptimistic:Yn,useMemoCache:Yn,useCacheRefresh:Yn};Vp.useEffectEvent=Yn;var S7={readContext:bs,use:G0,useCallback:function(l,h){return Bo().memoizedState=[l,h===void 0?null:h],l},useContext:bs,useEffect:c7,useImperativeHandle:function(l,h,g){g=g!=null?g.concat([l]):null,K0(4194308,4,f7.bind(null,h,l),g)},useLayoutEffect:function(l,h){return K0(4194308,4,l,h)},useInsertionEffect:function(l,h){K0(4,2,l,h)},useMemo:function(l,h){var g=Bo();h=h===void 0?null:h;var j=l();if(tf){Jt(!0);try{l()}finally{Jt(!1)}}return g.memoizedState=[j,h],j},useReducer:function(l,h,g){var j=Bo();if(g!==void 0){var R=g(h);if(tf){Jt(!0);try{g(h)}finally{Jt(!1)}}}else R=h;return j.memoizedState=j.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},j.queue=l,l=l.dispatch=yW.bind(null,pr,l),[j.memoizedState,l]},useRef:function(l){var h=Bo();return l={current:l},h.memoizedState=l},useState:function(l){l=rw(l);var h=l.queue,g=w7.bind(null,pr,h);return h.dispatch=g,[l.memoizedState,g]},useDebugValue:ow,useDeferredValue:function(l,h){var g=Bo();return aw(g,l,h)},useTransition:function(){var l=rw(!1);return l=g7.bind(null,pr,l.queue,!0,!1),Bo().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,h,g){var j=pr,R=Bo();if(Er){if(g===void 0)throw Error(n(407));g=g()}else{if(g=h(),mn===null)throw Error(n(349));(Mr&127)!==0||WC(j,h,g)}R.memoizedState=g;var O={value:g,getSnapshot:h};return R.queue=O,c7(VC.bind(null,j,O,l),[l]),j.flags|=2048,Hd(9,{destroy:void 0},KC.bind(null,j,O,g,h),null),g},useId:function(){var l=Bo(),h=mn.identifierPrefix;if(Er){var g=fi,j=za;g=(j&~(1<<32-Tt(j)-1)).toString(32)+g,h="_"+h+"R_"+g,g=q0++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof j.is=="string"?X.createElement("select",{is:j.is}):X.createElement("select"),j.multiple?O.multiple=!0:j.size&&(O.size=j.size);break;default:O=typeof j.is=="string"?X.createElement(R,{is:j.is}):X.createElement(R)}}O[cn]=h,O[Dt]=j;e:for(X=h.child;X!==null;){if(X.tag===5||X.tag===6)O.appendChild(X.stateNode);else if(X.tag!==4&&X.tag!==27&&X.child!==null){X.child.return=X,X=X.child;continue}if(X===h)break e;for(;X.sibling===null;){if(X.return===null||X.return===h)break e;X=X.return}X.sibling.return=X.return,X=X.sibling}h.stateNode=O;e:switch(co(O,R,j),R){case"button":case"input":case"select":case"textarea":j=!!j.autoFocus;break e;case"img":j=!0;break e;default:j=!1}j&&Cl(h)}}return zn(h),kw(h,h.type,l===null?null:l.memoizedProps,h.pendingProps,g),null;case 6:if(l&&h.stateNode!=null)l.memoizedProps!==j&&Cl(h);else{if(typeof j!="string"&&h.stateNode===null)throw Error(n(166));if(l=ce.current,bt(h)){if(l=h.stateNode,g=h.memoizedProps,j=null,R=gs,R!==null)switch(R.tag){case 27:case 5:j=R.memoizedProps}l[cn]=h,l=!!(l.nodeValue===g||j!==null&&j.suppressHydrationWarning===!0||Uz(l.nodeValue,g)),l||ke(h,!0)}else l=pv(l).createTextNode(j),l[cn]=h,h.stateNode=l}return zn(h),null;case 31:if(g=h.memoizedState,l===null||l.memoizedState!==null){if(j=bt(h),g!==null){if(l===null){if(!j)throw Error(n(318));if(l=h.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(n(557));l[cn]=h}else ht(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;zn(h),l=!1}else g=kr(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return h.flags&256?(Aa(h),h):(Aa(h),null);if((h.flags&128)!==0)throw Error(n(558))}return zn(h),null;case 13:if(j=h.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=bt(h),j!==null&&j.dehydrated!==null){if(l===null){if(!R)throw Error(n(318));if(R=h.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(n(317));R[cn]=h}else ht(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;zn(h),R=!1}else R=kr(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return h.flags&256?(Aa(h),h):(Aa(h),null)}return Aa(h),(h.flags&128)!==0?(h.lanes=g,h):(g=j!==null,l=l!==null&&l.memoizedState!==null,g&&(j=h.child,R=null,j.alternate!==null&&j.alternate.memoizedState!==null&&j.alternate.memoizedState.cachePool!==null&&(R=j.alternate.memoizedState.cachePool.pool),O=null,j.memoizedState!==null&&j.memoizedState.cachePool!==null&&(O=j.memoizedState.cachePool.pool),O!==R&&(j.flags|=2048)),g!==l&&g&&(h.child.flags|=8192),ev(h,h.updateQueue),zn(h),null);case 4:return ae(),l===null&&Gw(h.stateNode.containerInfo),zn(h),null;case 10:return Pi(h.type),zn(h),null;case 19:if(q(is),j=h.memoizedState,j===null)return zn(h),null;if(R=(h.flags&128)!==0,O=j.rendering,O===null)if(R)Xp(j,!1);else{if(Zn!==0||l!==null&&(l.flags&128)!==0)for(l=h.child;l!==null;){if(O=F0(l),O!==null){for(h.flags|=128,Xp(j,!1),l=O.updateQueue,h.updateQueue=l,ev(h,l),h.subtreeFlags=0,l=g,g=h.child;g!==null;)ui(g,l),g=g.sibling;return U(is,is.current&1|2),Er&&di(h,j.treeForkCount),h.child}l=l.sibling}j.tail!==null&&ct()>ov&&(h.flags|=128,R=!0,Xp(j,!1),h.lanes=4194304)}else{if(!R)if(l=F0(O),l!==null){if(h.flags|=128,R=!0,l=l.updateQueue,h.updateQueue=l,ev(h,l),Xp(j,!0),j.tail===null&&j.tailMode==="hidden"&&!O.alternate&&!Er)return zn(h),null}else 2*ct()-j.renderingStartTime>ov&&g!==536870912&&(h.flags|=128,R=!0,Xp(j,!1),h.lanes=4194304);j.isBackwards?(O.sibling=h.child,h.child=O):(l=j.last,l!==null?l.sibling=O:h.child=O,j.last=O)}return j.tail!==null?(l=j.tail,j.rendering=l,j.tail=l.sibling,j.renderingStartTime=ct(),l.sibling=null,g=is.current,U(is,R?g&1|2:g&1),Er&&di(h,j.treeForkCount),l):(zn(h),null);case 22:case 23:return Aa(h),Wx(),j=h.memoizedState!==null,l!==null?l.memoizedState!==null!==j&&(h.flags|=8192):j&&(h.flags|=8192),j?(g&536870912)!==0&&(h.flags&128)===0&&(zn(h),h.subtreeFlags&6&&(h.flags|=8192)):zn(h),g=h.updateQueue,g!==null&&ev(h,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),j=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(j=h.memoizedState.cachePool.pool),j!==g&&(h.flags|=2048),l!==null&&q(yc),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),h.memoizedState.cache!==g&&(h.flags|=2048),Pi(Bn),zn(h),null;case 25:return null;case 30:return null}throw Error(n(156,h.tag))}function SW(l,h){switch(Rd(h),h.tag){case 1:return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 3:return Pi(Bn),ae(),l=h.flags,(l&65536)!==0&&(l&128)===0?(h.flags=l&-65537|128,h):null;case 26:case 27:case 5:return me(h),null;case 31:if(h.memoizedState!==null){if(Aa(h),h.alternate===null)throw Error(n(340));ht()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 13:if(Aa(h),l=h.memoizedState,l!==null&&l.dehydrated!==null){if(h.alternate===null)throw Error(n(340));ht()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 19:return q(is),null;case 4:return ae(),null;case 10:return Pi(h.type),null;case 22:case 23:return Aa(h),Wx(),l!==null&&q(yc),l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 24:return Pi(Bn),null;case 25:return null;default:return null}}function Q7(l,h){switch(Rd(h),h.tag){case 3:Pi(Bn),ae();break;case 26:case 27:case 5:me(h);break;case 4:ae();break;case 31:h.memoizedState!==null&&Aa(h);break;case 13:Aa(h);break;case 19:q(is);break;case 10:Pi(h.type);break;case 22:case 23:Aa(h),Wx(),l!==null&&q(yc);break;case 24:Pi(Bn)}}function Yp(l,h){try{var g=h.updateQueue,j=g!==null?g.lastEffect:null;if(j!==null){var R=j.next;g=R;do{if((g.tag&l)===l){j=void 0;var O=g.create,X=g.inst;j=O(),X.destroy=j}g=g.next}while(g!==R)}}catch(ne){an(h,h.return,ne)}}function Ru(l,h,g){try{var j=h.updateQueue,R=j!==null?j.lastEffect:null;if(R!==null){var O=R.next;j=O;do{if((j.tag&l)===l){var X=j.inst,ne=X.destroy;if(ne!==void 0){X.destroy=void 0,R=h;var pe=g,ze=ne;try{ze()}catch(He){an(R,pe,He)}}}j=j.next}while(j!==O)}}catch(He){an(h,h.return,He)}}function X7(l){var h=l.updateQueue;if(h!==null){var g=l.stateNode;try{BC(h,g)}catch(j){an(l,l.return,j)}}}function Y7(l,h,g){g.props=rf(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(j){an(l,h,j)}}function Zp(l,h){try{var g=l.ref;if(g!==null){switch(l.tag){case 26:case 27:case 5:var j=l.stateNode;break;case 30:j=l.stateNode;break;default:j=l.stateNode}typeof g=="function"?l.refCleanup=g(j):g.current=j}}catch(R){an(l,h,R)}}function xc(l,h){var g=l.ref,j=l.refCleanup;if(g!==null)if(typeof j=="function")try{j()}catch(R){an(l,h,R)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(R){an(l,h,R)}else g.current=null}function Z7(l){var h=l.type,g=l.memoizedProps,j=l.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":g.autoFocus&&j.focus();break e;case"img":g.src?j.src=g.src:g.srcSet&&(j.srcset=g.srcSet)}}catch(R){an(l,l.return,R)}}function jw(l,h,g){try{var j=l.stateNode;KW(j,l.type,g,h),j[Dt]=h}catch(R){an(l,l.return,R)}}function J7(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&Pu(l.type)||l.tag===4}function Sw(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||J7(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&Pu(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Cw(l,h,g){var j=l.tag;if(j===5||j===6)l=l.stateNode,h?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,h):(h=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,h.appendChild(l),g=g._reactRootContainer,g!=null||h.onclick!==null||(h.onclick=as));else if(j!==4&&(j===27&&Pu(l.type)&&(g=l.stateNode,h=null),l=l.child,l!==null))for(Cw(l,h,g),l=l.sibling;l!==null;)Cw(l,h,g),l=l.sibling}function tv(l,h,g){var j=l.tag;if(j===5||j===6)l=l.stateNode,h?g.insertBefore(l,h):g.appendChild(l);else if(j!==4&&(j===27&&Pu(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(tv(l,h,g),l=l.sibling;l!==null;)tv(l,h,g),l=l.sibling}function ez(l){var h=l.stateNode,g=l.memoizedProps;try{for(var j=l.type,R=h.attributes;R.length;)h.removeAttributeNode(R[0]);co(h,j,g),h[cn]=l,h[Dt]=g}catch(O){an(l,l.return,O)}}var zl=!1,ks=!1,zw=!1,tz=typeof WeakSet=="function"?WeakSet:Set,Gs=null;function CW(l,h){if(l=l.containerInfo,Vw=wv,l=Vn(l),ii(l)){if("selectionStart"in l)var g={start:l.selectionStart,end:l.selectionEnd};else e:{g=(g=l.ownerDocument)&&g.defaultView||window;var j=g.getSelection&&g.getSelection();if(j&&j.rangeCount!==0){g=j.anchorNode;var R=j.anchorOffset,O=j.focusNode;j=j.focusOffset;try{g.nodeType,O.nodeType}catch{g=null;break e}var X=0,ne=-1,pe=-1,ze=0,He=0,Ue=l,Ne=null;t:for(;;){for(var $e;Ue!==g||R!==0&&Ue.nodeType!==3||(ne=X+R),Ue!==O||j!==0&&Ue.nodeType!==3||(pe=X+j),Ue.nodeType===3&&(X+=Ue.nodeValue.length),($e=Ue.firstChild)!==null;)Ne=Ue,Ue=$e;for(;;){if(Ue===l)break t;if(Ne===g&&++ze===R&&(ne=X),Ne===O&&++He===j&&(pe=X),($e=Ue.nextSibling)!==null)break;Ue=Ne,Ne=Ue.parentNode}Ue=$e}g=ne===-1||pe===-1?null:{start:ne,end:pe}}else g=null}g=g||{start:0,end:0}}else g=null;for(Qw={focusedElem:l,selectionRange:g},wv=!1,Gs=h;Gs!==null;)if(h=Gs,l=h.child,(h.subtreeFlags&1028)!==0&&l!==null)l.return=h,Gs=l;else for(;Gs!==null;){switch(h=Gs,O=h.alternate,l=h.flags,h.tag){case 0:if((l&4)!==0&&(l=h.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),co(O,j,g),O[cn]=l,xr(O),j=O;break e;case"link":var X=i8("link","href",R).get(j+(g.href||""));if(X){for(var ne=0;nehn&&(X=hn,hn=Xt,Xt=X);var je=vl(ne,Xt),ge=vl(ne,hn);if(je&&ge&&($e.rangeCount!==1||$e.anchorNode!==je.node||$e.anchorOffset!==je.offset||$e.focusNode!==ge.node||$e.focusOffset!==ge.offset)){var Ce=Ue.createRange();Ce.setStart(je.node,je.offset),$e.removeAllRanges(),Xt>hn?($e.addRange(Ce),$e.extend(ge.node,ge.offset)):(Ce.setEnd(ge.node,ge.offset),$e.addRange(Ce))}}}}for(Ue=[],$e=ne;$e=$e.parentNode;)$e.nodeType===1&&Ue.push({element:$e,left:$e.scrollLeft,top:$e.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;neg?32:g,K.T=null,g=Ow,Ow=null;var O=Du,X=Rl;if(Ms=0,Kd=Du=null,Rl=0,(Kr&6)!==0)throw Error(n(331));var ne=Kr;if(Kr|=4,fz(O.current),lz(O,O.current,X,g),Kr=ne,sm(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot=="function")try{Pe.onPostCommitFiberRoot(At,O)}catch{}return!0}finally{J.p=R,K.T=j,Az(l,h)}}function Rz(l,h,g){h=Io(g,h),h=dw(l.stateNode,h,2),l=Nu(l,h,2),l!==null&&($r(l,2),wc(l))}function an(l,h,g){if(l.tag===3)Rz(l,l,g);else for(;h!==null;){if(h.tag===3){Rz(h,l,g);break}else if(h.tag===1){var j=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof j.componentDidCatch=="function"&&($u===null||!$u.has(j))){l=Io(g,l),g=M7(2),j=Nu(h,g,2),j!==null&&(O7(g,j,h,l),$r(j,2),wc(j));break}}h=h.return}}function Iw(l,h,g){var j=l.pingCache;if(j===null){j=l.pingCache=new NW;var R=new Set;j.set(h,R)}else R=j.get(h),R===void 0&&(R=new Set,j.set(h,R));R.has(g)||(Aw=!0,R.add(g),l=OW.bind(null,l,h,g),h.then(l,l))}function OW(l,h,g){var j=l.pingCache;j!==null&&j.delete(h),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,mn===l&&(Mr&g)===g&&(Zn===4||Zn===3&&(Mr&62914560)===Mr&&300>ct()-sv?(Kr&2)===0&&Vd(l,0):Tw|=g,Wd===Mr&&(Wd=0)),wc(l)}function Mz(l,h){h===0&&(h=dr()),l=Te(l,h),l!==null&&($r(l,h),wc(l))}function $W(l){var h=l.memoizedState,g=0;h!==null&&(g=h.retryLane),Mz(l,g)}function DW(l,h){var g=0;switch(l.tag){case 31:case 13:var j=l.stateNode,R=l.memoizedState;R!==null&&(g=R.retryLane);break;case 19:j=l.stateNode;break;case 22:j=l.stateNode._retryCache;break;default:throw Error(n(314))}j!==null&&j.delete(h),Mz(l,g)}function LW(l,h){return Vt(l,h)}var _v=null,Xd=null,Pw=!1,fv=!1,Bw=!1,Iu=0;function wc(l){l!==Xd&&l.next===null&&(Xd===null?_v=Xd=l:Xd=Xd.next=l),fv=!0,Pw||(Pw=!0,PW())}function sm(l,h){if(!Bw&&fv){Bw=!0;do for(var g=!1,j=_v;j!==null;){if(l!==0){var R=j.pendingLanes;if(R===0)var O=0;else{var X=j.suspendedLanes,ne=j.pingedLanes;O=(1<<31-Tt(42|l)+1)-1,O&=R&~(X&~ne),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,Lz(j,O))}else O=Mr,O=en(j,j===mn?O:0,j.cancelPendingCommit!==null||j.timeoutHandle!==-1),(O&3)===0||gr(j,O)||(g=!0,Lz(j,O));j=j.next}while(g);Bw=!1}}function IW(){Oz()}function Oz(){fv=Pw=!1;var l=0;Iu!==0&&QW()&&(l=Iu);for(var h=ct(),g=null,j=_v;j!==null;){var R=j.next,O=$z(j,h);O===0?(j.next=null,g===null?_v=R:g.next=R,R===null&&(Xd=g)):(g=j,(l!==0||(O&3)!==0)&&(fv=!0)),j=R}Ms!==0&&Ms!==5||sm(l),Iu!==0&&(Iu=0)}function $z(l,h){for(var g=l.suspendedLanes,j=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0ne)break;var He=pe.transferSize,Ue=pe.initiatorType;He&&Gz(Ue)&&(pe=pe.responseEnd,X+=He*(pe"u"?null:document;function n8(l,h,g){var j=Yd;if(j&&typeof h=="string"&&h){var R=Kn(h);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),r8.has(R)||(r8.add(R),l={rel:l,crossOrigin:g,href:h},j.querySelector(R)===null&&(h=j.createElement("link"),co(h,"link",l),xr(h),j.head.appendChild(h)))}}function sK(l){Ml.D(l),n8("dns-prefetch",l,null)}function oK(l,h){Ml.C(l,h),n8("preconnect",l,h)}function aK(l,h,g){Ml.L(l,h,g);var j=Yd;if(j&&l&&h){var R='link[rel="preload"][as="'+Kn(h)+'"]';h==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+Kn(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+Kn(g.imageSizes)+'"]')):R+='[href="'+Kn(l)+'"]';var O=R;switch(h){case"style":O=Zd(l);break;case"script":O=Jd(l)}gi.has(O)||(l=_({rel:"preload",href:h==="image"&&g&&g.imageSrcSet?void 0:l,as:h},g),gi.set(O,l),j.querySelector(R)!==null||h==="style"&&j.querySelector(cm(O))||h==="script"&&j.querySelector(lm(O))||(h=j.createElement("link"),co(h,"link",l),xr(h),j.head.appendChild(h)))}}function iK(l,h){Ml.m(l,h);var g=Yd;if(g&&l){var j=h&&typeof h.as=="string"?h.as:"script",R='link[rel="modulepreload"][as="'+Kn(j)+'"][href="'+Kn(l)+'"]',O=R;switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Jd(l)}if(!gi.has(O)&&(l=_({rel:"modulepreload",href:l},h),gi.set(O,l),g.querySelector(R)===null)){switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(lm(O)))return}j=g.createElement("link"),co(j,"link",l),xr(j),g.head.appendChild(j)}}}function cK(l,h,g){Ml.S(l,h,g);var j=Yd;if(j&&l){var R=zr(j).hoistableStyles,O=Zd(l);h=h||"default";var X=R.get(O);if(!X){var ne={loading:0,preload:null};if(X=j.querySelector(cm(O)))ne.loading=5;else{l=_({rel:"stylesheet",href:l,"data-precedence":h},g),(g=gi.get(O))&&r2(l,g);var pe=X=j.createElement("link");xr(pe),co(pe,"link",l),pe._p=new Promise(function(ze,He){pe.onload=ze,pe.onerror=He}),pe.addEventListener("load",function(){ne.loading|=1}),pe.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,gv(X,h,j)}X={type:"stylesheet",instance:X,count:1,state:ne},R.set(O,X)}}}function lK(l,h){Ml.X(l,h);var g=Yd;if(g&&l){var j=zr(g).hoistableScripts,R=Jd(l),O=j.get(R);O||(O=g.querySelector(lm(R)),O||(l=_({src:l,async:!0},h),(h=gi.get(R))&&n2(l,h),O=g.createElement("script"),xr(O),co(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},j.set(R,O))}}function uK(l,h){Ml.M(l,h);var g=Yd;if(g&&l){var j=zr(g).hoistableScripts,R=Jd(l),O=j.get(R);O||(O=g.querySelector(lm(R)),O||(l=_({src:l,async:!0,type:"module"},h),(h=gi.get(R))&&n2(l,h),O=g.createElement("script"),xr(O),co(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},j.set(R,O))}}function s8(l,h,g,j){var R=(R=ce.current)?mv(R):null;if(!R)throw Error(n(446));switch(l){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(h=Zd(g.href),g=zr(R).hoistableStyles,j=g.get(h),j||(j={type:"style",instance:null,count:0,state:null},g.set(h,j)),j):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){l=Zd(g.href);var O=zr(R).hoistableStyles,X=O.get(l);if(X||(R=R.ownerDocument||R,X={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(l,X),(O=R.querySelector(cm(l)))&&!O._p&&(X.instance=O,X.state.loading=5),gi.has(l)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},gi.set(l,g),O||_K(R,l,g,X.state))),h&&j===null)throw Error(n(528,""));return X}if(h&&j!==null)throw Error(n(529,""));return null;case"script":return h=g.async,g=g.src,typeof g=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=Jd(g),g=zr(R).hoistableScripts,j=g.get(h),j||(j={type:"script",instance:null,count:0,state:null},g.set(h,j)),j):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,l))}}function Zd(l){return'href="'+Kn(l)+'"'}function cm(l){return'link[rel="stylesheet"]['+l+"]"}function o8(l){return _({},l,{"data-precedence":l.precedence,precedence:null})}function _K(l,h,g,j){l.querySelector('link[rel="preload"][as="style"]['+h+"]")?j.loading=1:(h=l.createElement("link"),j.preload=h,h.addEventListener("load",function(){return j.loading|=1}),h.addEventListener("error",function(){return j.loading|=2}),co(h,"link",g),xr(h),l.head.appendChild(h))}function Jd(l){return'[src="'+Kn(l)+'"]'}function lm(l){return"script[async]"+l}function a8(l,h,g){if(h.count++,h.instance===null)switch(h.type){case"style":var j=l.querySelector('style[data-href~="'+Kn(g.href)+'"]');if(j)return h.instance=j,xr(j),j;var R=_({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return j=(l.ownerDocument||l).createElement("style"),xr(j),co(j,"style",R),gv(j,g.precedence,l),h.instance=j;case"stylesheet":R=Zd(g.href);var O=l.querySelector(cm(R));if(O)return h.state.loading|=4,h.instance=O,xr(O),O;j=o8(g),(R=gi.get(R))&&r2(j,R),O=(l.ownerDocument||l).createElement("link"),xr(O);var X=O;return X._p=new Promise(function(ne,pe){X.onload=ne,X.onerror=pe}),co(O,"link",j),h.state.loading|=4,gv(O,g.precedence,l),h.instance=O;case"script":return O=Jd(g.src),(R=l.querySelector(lm(O)))?(h.instance=R,xr(R),R):(j=g,(R=gi.get(O))&&(j=_({},g),n2(j,R)),l=l.ownerDocument||l,R=l.createElement("script"),xr(R),co(R,"link",j),l.head.appendChild(R),h.instance=R);case"void":return null;default:throw Error(n(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(j=h.instance,h.state.loading|=4,gv(j,g.precedence,l));return h.instance}function gv(l,h,g){for(var j=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=j.length?j[j.length-1]:null,O=R,X=0;X title"):null)}function fK(l,h,g){if(g===1||h.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return l=h.disabled,typeof h.precedence=="string"&&l==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function l8(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function dK(l,h,g,j){if(g.type==="stylesheet"&&(typeof j.media!="string"||matchMedia(j.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var R=Zd(j.href),O=h.querySelector(cm(R));if(O){h=O._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(l.count++,l=bv.bind(l),h.then(l,l)),g.state.loading|=4,g.instance=O,xr(O);return}O=h.ownerDocument||h,j=o8(j),(R=gi.get(R))&&r2(j,R),O=O.createElement("link"),xr(O);var X=O;X._p=new Promise(function(ne,pe){X.onload=ne,X.onerror=pe}),co(O,"link",j),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,h),(h=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=bv.bind(l),h.addEventListener("load",g),h.addEventListener("error",g))}}var s2=0;function hK(l,h){return l.stylesheets&&l.count===0&&xv(l,l.stylesheets),0s2?50:800)+h);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(j),clearTimeout(R)}}:null}function bv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xv(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var yv=null;function xv(l,h){l.stylesheets=null,l.unsuspend!==null&&(l.count++,yv=new Map,h.forEach(pK,l),yv=null,bv.call(l))}function pK(l,h){if(!(h.state.loading&4)){var g=yv.get(l);if(g)var j=g.get(null);else{g=new Map,yv.set(l,g);for(var R=l.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),h2.exports=gV(),h2.exports}var bV=vV();const yV=!1;var C$=T.useLayoutEffect;function xV(e,r,t){T.useEffect(()=>{if(!e.current||t||typeof IntersectionObserver!="function")return()=>r();const n=new IntersectionObserver(s=>{r(s.pop())},{rootMargin:"100px"});return n.observe(e.current),()=>{n.disconnect(),r()}},[r,t,e])}function wV(e){const r=T.useRef(null);return T.useImperativeHandle(e,()=>r.current,[]),r}function og(e){return e[e.length-1]}function tp(e,r){return typeof e=="function"?e(r):e}const z$=Object.prototype.hasOwnProperty,kV=Object.prototype.propertyIsEnumerable;function E$(e){for(const r in e)if(z$.call(e,r))return!0;return!1}const jV=()=>Object.create(null),of=(e,r)=>bf(e,r,jV);function bf(e,r,t=()=>({}),n=0){if(e===r)return e;if(n>500)return r;const s=r,o=V8(e)&&V8(s);if(!o&&!(nb(e)&&nb(s)))return s;const a=o?e:W8(e);if(!a)return s;const i=o?s:W8(s);if(!i)return s;const c=a.length,u=i.length,d=o?new Array(u):t();let _=0;for(let p=0;p"u")return!0;const t=r.prototype;return!(!K8(t)||!t.hasOwnProperty("isPrototypeOf"))}function K8(e){return Object.prototype.toString.call(e)==="[object Object]"}function V8(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function m_(e,r,t){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let n=0,s=e.length;ns||!m_(e[a],r[a],t)))return!1;return s===o}return!1}const SV=/[\x00-\x1f\x7f"<>`{}]/g;function CV(e){return e.replace(SV,r=>"%"+r.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function Q8(e){let r;try{r=decodeURI(e)}catch{r=e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}return CV(r)}const zV=["http:","https:","mailto:","tel:"];function sb(e,r){if(!e)return!1;try{const t=new URL(e);return!r.has(t.protocol)}catch{return!1}}function gm(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const r=/%25|%5C/gi;let t=0,n="",s;for(;(s=r.exec(e))!==null;)n+=Q8(e.slice(t,s.index))+s[0],t=r.lastIndex;n=n+Q8(t?e.slice(t):e);let o=!1;return n.startsWith("//")&&(o=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:o}}function EV(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function NV(e,r){if(e===r)return!0;if(e.length!==r.length)return!1;for(let t=0;t{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,n&&(n.next=o,o.prev=n)):(o.next.prev=void 0,t=o.next,o.next=void 0,n&&(o.prev=n,n.next=o)),n=o)};return{get(o){const a=r.get(o);if(a)return s(a),a.value},set(o,a){if(r.size>=e&&t){const c=t;r.delete(c.key),c.next&&(t=c.next,c.next.prev=void 0),c===n&&(n=void 0)}const i=r.get(o);if(i)i.value=a,s(i);else{const c={key:o,value:a,prev:n};n&&(n.next=c),n=c,t||(t=c),r.set(o,c)}},clear(){r.clear(),t=void 0,n=void 0}}}const f_=4,N$=5;function A$(e,r,t=new Uint16Array(6)){const n=e.indexOf("/",r),s=n===-1?e.length:n,o=e.substring(r,s);if(!o||!o.includes("$"))return t[0]=0,t[1]=r,t[2]=r,t[3]=s,t[4]=s,t[5]=s,t;if(o==="$"){const c=e.length;return t[0]=2,t[1]=r,t[2]=r,t[3]=c,t[4]=c,t[5]=c,t}if(o.charCodeAt(0)===36)return t[0]=1,t[1]=r,t[2]=r+1,t[3]=s,t[4]=s,t[5]=s,t;const a=o.indexOf("{");let i;if(a!==-1&&a+1!D.parse&&D.caseSensitive===N&&D.prefix===E&&D.suffix===A));if($)x=$;else{const D=AV(z,_,N,E,A);x=D,D.parent=s,D.depth=o;let I;z===1?I=s.dynamic??(s.dynamic=[]):z===3?I=s.optional??(s.optional=[]):I=s.wildcard??(s.wildcard=[]),I.push(D),I.length===2&&(a==null||a.push(I))}break}}s=x}if(w&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=kh(_);b.kind=N$,b.parent=s,o++,b.depth=o,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&_.endsWith("/")){const b=kh(_);b.kind=f_,b.parent=s,o++,b.depth=o,s.index=b,s=b}s.parse=w??null,s.priority=((d=p==null?void 0:p.params)==null?void 0:d.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=_)}if(t.children)for(const _ of t.children)dy(e,r,_,c,s,o,a,i)}function T$(e,r){if(e.parse&&!r.parse)return-1;if(!e.parse&&r.parse)return 1;if(e.parse&&r.parse&&(e.priority||r.priority))return r.priority-e.priority;if(e.prefix&&r.prefix&&e.prefix!==r.prefix){if(e.prefix.startsWith(r.prefix))return-1;if(r.prefix.startsWith(e.prefix))return 1}if(e.suffix&&r.suffix&&e.suffix!==r.suffix){if(e.suffix.endsWith(r.suffix))return-1;if(r.suffix.endsWith(e.suffix))return 1}return e.prefix&&!r.prefix?-1:!e.prefix&&r.prefix?1:e.suffix&&!r.suffix?-1:!e.suffix&&r.suffix?1:e.caseSensitive&&!r.caseSensitive?-1:!e.caseSensitive&&r.caseSensitive?1:0}function kh(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function AV(e,r,t,n,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:r,parent:null,parse:null,priority:0,caseSensitive:t,prefix:n,suffix:s}}function TV(e,r){const t=kh("/"),n=new Uint16Array(6),s=[];for(const o of e)dy(!1,n,o,1,t,0,s);for(const o of s)o.sort(T$);r.masksTree=t,r.flatCache=ob(1e3)}function RV(e,r){e||(e="/");const t=r.flatCache.get(e);if(t!==void 0)return t;const n=kj(e,r.masksTree);return r.flatCache.set(e,n),n}function MV(e,r,t,n,s){e||(e="/"),n||(n="/");const o=r?`case\0${e}`:e;let a=s.singleCache.get(o);return a||(a=kh("/"),dy(r,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(o,a)),kj(n,a,t)}function OV(e,r,t=!1){const n=t?e:`nofuzz\0${e}`,s=r.matchCache.get(n);if(s!==void 0)return s;e||(e="/");let o;try{o=kj(e,r.segmentTree,t)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=M$(o.route)),r.matchCache.set(n,o),o}function $V(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function DV(e,r=!1,t){const n=kh(e.fullPath),s=new Uint16Array(6),o=[],a={},i={};let c=0;dy(r,s,e,1,n,0,o,u=>{if(t==null||t(u,c),u.id in a&&wj(),a[u.id]=u,c!==0&&u.path){const d=$V(u.fullPath);(!i[d]||u.fullPath.endsWith("/"))&&(i[d]=u)}c++});for(const u of o)u.sort(T$);return{processedTree:{segmentTree:n,singleCache:ob(1e3),matchCache:ob(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:i}}function kj(e,r,t=!1){const n=e.split("/"),s=IV(e,n,r,t);if(!s)return null;const[o]=R$(e,n,s);return{route:s.node.route,rawParams:o}}function R$(e,r,t){var d,_,p,m;const n=LV(t.node);let s=null;const o=Object.create(null);let a=((d=t.extract)==null?void 0:d.part)??0,i=((_=t.extract)==null?void 0:_.node)??0,c=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;i=0;E--){const A=_.wildcard[E],{prefix:N,suffix:M}=A;if(!(N&&(y||!(A.caseSensitive?S:z??(z=S.toLowerCase())).startsWith(N)))){if(M){if(y)continue;const $=r.slice(p).join("/"),D=$.slice(-M.length);if((A.caseSensitive?D:D.toLowerCase())!==M||$.length-M.length=0;A--){const N=_.optional[A];i.push({node:N,index:p,skipped:E,statics:k,dynamics:w,optionals:v,extract:b,rawParams:x})}if(!y)for(let A=_.optional.length-1;A>=0;A--){const N=_.optional[A],{prefix:M,suffix:$}=N;if(M||$){const D=N.caseSensitive?S:z??(z=S.toLowerCase());if(M&&!D.startsWith(M)||$&&D.indexOf($,D.length-$.length)=0;E--){const A=_.dynamic[E],{prefix:N,suffix:M}=A;if(N||M){const $=A.caseSensitive?S:z??(z=S.toLowerCase());if(N&&!$.startsWith(N)||M&&$.indexOf(M,$.length-M.length)=0;E--){const A=_.pathless[E];i.push({node:A,index:p,skipped:m,statics:k,dynamics:w,optionals:v,extract:b,rawParams:x})}}if(u)return u;if(n&&c){let d=c.index;for(let p=0;pe.statics||r.statics===e.statics&&(r.dynamics>e.dynamics||r.dynamics===e.dynamics&&(r.optionals>e.optionals||r.optionals===e.optionals&&((r.node.kind===f_)>(e.node.kind===f_)||r.node.kind===f_==(e.node.kind===f_)&&r.node.depth>e.node.depth))):!0}function E1(e){return N1(e.filter(r=>r!==void 0).join("/"))}function N1(e){return e.replace(/\/{2,}/g,"/")}function O$(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Kl(e){const r=e.length;return r>1&&e[r-1]==="/"?e.replace(/\/{1,}$/,""):e}function $$(e){return Kl(O$(e))}function ab(e,r){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${r}/`?e.slice(0,-1):e}function BV(e,r,t){return ab(e,t)===ab(r,t)}function FV({base:e,to:r,trailingSlash:t="never",cache:n}){if(r.includes("//")&&(r=N1(r)),r.startsWith("/"))return r.length===1||t==="preserve"?r:t==="always"?r.endsWith("/")?r:`${r}/`:r.endsWith("/")?r.slice(0,-1):r;const s=r===".";let o;if(n){o=s?e:e+"\0"+r;const u=n.get(o);if(u)return u}let a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=N1(e)),a=e.split("/");a.length>1&&og(a)==="";)a.pop();const u=r.split("/");for(let d=0,_=u.length;d<_;d++){const p=u[d];p===""?d?d===_-1&&a.push(p):a=[p]:p===".."?a.length>1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(og(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const i=a.join("/"),c=(s?N1(i):i)||"/";return o&&n&&n.set(o,c),c}function HV(e){const r=new Map(e.map(s=>[encodeURIComponent(s),s])),t=Array.from(r.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(t,"g");return s=>s.replace(n,o=>r.get(o)??o)}function v2(e,r,t){const n=r[e];return typeof n!="string"?n:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(s=>Z8(s,t)).join("/"):Z8(n,t)}function Y8({path:e,params:r,decoder:t,...n}){let s=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:s};const a=e.length;let i=0,c,u="";for(;ie.state.__TSR_key||e.href;function QV(e){const r=e.getAttribute(J8);if(r)return`[${J8}="${r}"]`;let t="",n=e,s;for(;s=n.parentNode;){let o=1,a=n;for(;a=a.previousElementSibling;)o++;const i=`${n.localName}:nth-child(${o})`;t=t?`${i} > ${t}`:i,n=s}return t}let Rv=!1;const A1="window";function D4(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function e9(e){const r=new Set;for(const t of e){if(t===A1)continue;const n=D4(t);n&&r.add(n)}return r}function XV(e,r){const t=e.options.scrollRestoration,n=e._scroll;t&&(n.restoring=!0);const s=e.options.getScrollRestorationKey||VV,o=new Set,a=i=>{const c=Zu[i]||(Zu[i]={});for(const u of o)u===document?c[A1]={scrollX,scrollY}:u.isConnected&&(c[QV(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!n.restoration&&(n.restoration=!0,Rv=!1,history.scrollRestoration="manual",document.addEventListener("scroll",i=>{Rv||o.add(i.target)},!0),e.subscribe("onBeforeLoad",i=>{i.fromLocation&&a(s(i.fromLocation)),o.clear()}),addEventListener("pagehide",()=>{a(s(e.stores.resolvedLocation.get()??e.stores.location.get())),KV()})),!n.reset&&(n.reset=!0,e.subscribe("onRendered",i=>{var w;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,d=n.next,_=n.hash;let p;if(o.clear(),n.next=!0,n.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=s(i.toLocation),k=i.fromLocation&&s(i.fromLocation);if(n.restoring&&k&&k!==m){const v=Zu[k];if(v){let b=Zu[m];for(const x in v){if(x===A1){if(d)continue}else{const y=D4(x);if(!y||d&&u&&(p??(p=e9(u)),p.has(y)))continue}b||(b=Zu[m]={}),b[x]??(b[x]=v[x])}}}Rv=!0;try{const v=i.toLocation.hash,b=i.toLocation.state.__hashScrollIntoViewOptions??!0;let x=!1;if(d){!v&&u&&(p??(p=e9(u)));const y=v&&b&&_,S=n.restoring?Zu[m]:void 0;if(S)for(const z in S){const{scrollX:E,scrollY:A}=S[z];if(z===A1){if(y)continue;scrollTo({top:A,left:E,behavior:c}),x=!0}else{const N=D4(z);N&&(N.scrollLeft=E,N.scrollTop=A,p==null||p.delete(N))}}if(!v){const z={top:0,left:0,behavior:c};if(x||scrollTo(z),p)for(const E of p)E.scrollTo(z)}}!x&&v&&b&&((w=document.getElementById(v))==null||w.scrollIntoView(b))}finally{Rv=!1}}))}function YV(e,r=String){const t=new URLSearchParams;for(const n in e){const s=e[n];s!==void 0&&t.set(n,r(s))}return t.toString()}function b2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function ZV(e){const r=new URLSearchParams(e),t=Object.create(null);for(const[n,s]of r.entries()){const o=t[n];o==null?t[n]=b2(s):Array.isArray(o)?o.push(b2(s)):t[n]=[o,b2(s)]}return t}const JV=/^(?:\s|["[{\d-]|fa|nu|tr)/,eQ=rQ(JSON.parse),tQ=nQ(JSON.stringify,JSON.parse);function rQ(e){return r=>{r[0]==="?"&&(r=r.substring(1));const t=ZV(r);for(const n in t){const s=t[n];if(typeof s=="string")try{t[n]=e(s)}catch{}}return t}}function nQ(e,r){const t=r===JSON.parse;function n(s){if(s&&typeof s=="object")try{return e(s)}catch{}else if(r&&typeof s=="string"){if(t&&!JV.test(s))return s;try{return r(s),e(s)}catch{}}return s}return s=>{const o=YV(s,n);return o?`?${o}`:""}}const Sh="__root__";function sQ(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const r=new Headers(e.headers);e.href&&r.get("Location")===null&&r.set("Location",e.href);const t=new Response(null,{status:e.statusCode,headers:r});if(t.options=e,e.throw)throw t;return t}function D$(e){return e instanceof Response&&!!e.options}function oQ(e){return{input:({url:r})=>{for(const t of e)r=L4(t,r);return r},output:({url:r})=>{for(let t=e.length-1;t>=0;t--)r=L$(e[t],r);return r}}}function aQ(e){const r=$$(e.basepath),t=`/${r}`,n=e.caseSensitive?t:t.toLowerCase(),s=`${n}/`;return{input:({url:o})=>{const a=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===n?o.pathname="/":a.startsWith(s)&&(o.pathname=o.pathname.slice(t.length)),o},output:({url:o})=>(o.pathname=E1(["/",r,o.pathname]),o)}}function L4(e,r){var n;const t=(n=e==null?void 0:e.input)==null?void 0:n.call(e,{url:r});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return r}function L$(e,r){var n;const t=(n=e==null?void 0:e.output)==null?void 0:n.call(e,{url:r});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return r}function iQ(e,r){const{createMutableStore:t,createReadonlyStore:n,batch:s}=r,o=new Map,a=t("idle"),i=t(e),c=t(void 0),u=t([]),d=n(()=>u.get().map(w=>o.get(w).get())),_=n(()=>({status:a.get(),isLoading:a.get()==="pending",matches:d.get(),location:i.get(),resolvedLocation:c.get()}));function p(w){let v=o.get(w);return v||(v=t(void 0),o.set(w,v)),v}const m={status:a,location:i,resolvedLocation:c,ids:u,matches:d,byRoute:o,__store:_,getMatchStore:p,setMatches:k};function k(w){const v=u.get(),b=w.map(x=>x.routeId);s(()=>{NV(v,b)||u.set(b);for(const x of v)b.includes(x)||o.get(x).set(()=>{});for(const x of w){const y=p(x.routeId);y.get()!==x&&y.set(x)}})}return m}var g_="__TSR_index",t9="popstate",r9="beforeunload";function cQ(e){let r=e.getLocation();const t=new Set,n=a=>{r=e.getLocation(),t.forEach(i=>i({location:r,action:a}))},s=a=>{e.notifyOnIndexChange??!0?n(a):r=e.getLocation()},o=async({task:a,navigateOpts:i,...c})=>{var _,p;if((i==null?void 0:i.ignoreBlocker)??!1){a();return}const u=((_=e.getBlockers)==null?void 0:_.call(e))??[],d=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&d)for(const m of u){const k=ib(c.path,c.state);if(await m.blockerFn({currentLocation:r,nextLocation:k,action:c.type})){(p=e.onBlocked)==null||p.call(e);return}}a()};return{get location(){return r},get length(){return e.getLength()},subscribers:t,subscribe:a=>(t.add(a),()=>{t.delete(a)}),push:(a,i,c)=>{const u=r.state[g_];i=n9(u+1,i),o({task:()=>{e.pushState(a,i),n({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:i})},replace:(a,i,c)=>{const u=r.state[g_];i=n9(u,i),o({task:()=>{e.replaceState(a,i),n({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:i})},go:(a,i)=>{o({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:i,type:"GO"})},back:a=>{o({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>r.state[g_]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const i=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...i,a]),()=>{var d,_;const u=((d=e.getBlockers)==null?void 0:d.call(e))??[];(_=e.setBlockers)==null||_.call(e,u.filter(p=>p!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:n}}function n9(e,r){r||(r={});const t=jj();return{...r,key:t,__TSR_key:t,[g_]:e}}function lQ(e){var A,N;const r=typeof document<"u"?window:void 0,t=r.history.pushState,n=r.history.replaceState;let s=[];const o=()=>s,a=M=>s=M,i=(M=>M),c=(()=>ib(`${r.location.pathname}${r.location.search}${r.location.hash}`,r.history.state));if(!((A=r.history.state)!=null&&A.__TSR_key)&&!((N=r.history.state)!=null&&N.key)){const M=jj();r.history.replaceState({[g_]:0,key:M,__TSR_key:M},"")}let u=c(),d,_=!1,p=!1,m=!1,k=!1;const w=()=>u;let v;const b=()=>{v&&(E._ignoreSubscribers=!0,(v[2]?r.history.pushState:r.history.replaceState)(v[1],"",v[0]),E._ignoreSubscribers=!1,v=void 0,d=void 0)},x=(M,$,D)=>{const I=i($),G=!!v;G||(d=u),u=ib($,D),v=[I,D,(v==null?void 0:v[2])||M],G||queueMicrotask(()=>b())},y=M=>{u=c(),E.notify({type:M})},S=async()=>{if(p){p=!1;return}const M=c(),$=M.state[g_]-u.state[g_],D=$===1,I=$===-1,G=!D&&!I||_;_=!1;const H=G?"GO":I?"BACK":"FORWARD",Q=G?{type:"GO",index:$}:{type:I?"BACK":"FORWARD"};if(m)m=!1;else{const K=o();if(typeof document<"u"&&K.length){for(const J of K)if(await J.blockerFn({currentLocation:u,nextLocation:M,action:H})){p=!0,r.history.go(1),E.notify(Q);return}}}u=c(),E.notify(Q)},z=M=>{if(k){k=!1;return}let $=!1;const D=o();if(typeof document<"u"&&D.length)for(const I of D){const G=I.enableBeforeUnload??!0;if(G===!0){$=!0;break}if(typeof G=="function"&&G()===!0){$=!0;break}}if($)return M.preventDefault(),M.returnValue=""},E=cQ({getLocation:w,getLength:()=>r.history.length,pushState:(M,$)=>x(!0,M,$),replaceState:(M,$)=>x(!1,M,$),back:M=>(M&&(m=!0),k=!0,r.history.back()),forward:M=>{M&&(m=!0),k=!0,r.history.forward()},go:M=>{_=!0,r.history.go(M)},createHref:M=>i(M),flush:b,destroy:()=>{r.history.pushState=t,r.history.replaceState=n,r.removeEventListener(r9,z,{capture:!0}),r.removeEventListener(t9,S)},onBlocked:()=>{d&&u!==d&&(u=d)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return r.addEventListener(r9,z,{capture:!0}),r.addEventListener(t9,S),r.history.pushState=function(...M){const $=t.apply(r.history,M);return E._ignoreSubscribers||y("PUSH"),$},r.history.replaceState=function(...M){const $=n.apply(r.history,M);return E._ignoreSubscribers||y("REPLACE"),$},E}function uQ(e){let r=e.replace(/[\x00-\x1f\x7f]/g,"");return r.startsWith("//")&&(r="/"+r.replace(/^\/+/,"")),r}function ib(e,r){const t=uQ(e),n=t.indexOf("#"),s=t.indexOf("?"),o=jj();return{href:t,pathname:t.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:t.length),hash:n>-1?t.substring(n):"",search:s>-1?t.slice(s,n===-1?void 0:n):"",state:r||{[g_]:0,key:o,__TSR_key:o}}}function jj(){return(Math.random()+1).toString(36).substring(7)}function s9(e){var r,t;return e.options.loader||e.options.beforeLoad||e.lazyFn||((r=e.options.component)==null?void 0:r.preload)||((t=e.options.pendingComponent)==null?void 0:t.preload)}function hy(e,r){return{fromLocation:r,toLocation:e,pathChanged:(r==null?void 0:r.pathname)!==e.pathname,hrefChanged:(r==null?void 0:r.href)!==e.href,hashChanged:(r==null?void 0:r.hash)!==e.hash}}function o9({key:e,__TSR_key:r,__TSR_index:t,__hashScrollIntoViewOptions:n,...s}){return s}function _Q(e,r,t,n){var s,o,a,i;for(const c of r){if(n&&e._tx!==n)return;t.some(u=>u.routeId===c.routeId)||(o=(s=e.routesById[c.routeId].options).onLeave)==null||o.call(s,c)}for(const c of t){if(n&&e._tx!==n)return;(i=(a=e.routesById[c.routeId].options)[r.some(u=>u.routeId===c.routeId)?"onStay":"onEnter"])==null||i.call(a,c)}}var fQ=class{constructor(e,r){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async t=>(t(),!1),this.update=t=>{const n=this.options,s=this.basepath??(n==null?void 0:n.basepath)??"/",o=this.basepath===void 0,a=n==null?void 0:n.rewrite;if(this.options={...n,...t},this.isServer=this.options.isServer??yV??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=HV(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=lQ()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let u;this.resolvePathCache=ob(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=iQ(this.latestLocation,u),XV(this)}const i=this.options.basepath??"/",c=this.options.rewrite;if(o||s!==i||a!==c){this.basepath=i;const u=[],d=$$(i);d&&d!=="/"&&u.push(aQ({basepath:i})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:oQ(u),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const t=DV(this.routeTree,this.options.caseSensitive,(n,s)=>{n.init({originalIndex:s})});return this.options.routeMasks&&TV(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,n)=>{const s={eventType:t,fn:n};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{for(const n of this.subscribers)if(n.eventType===t.type)try{n.fn(t)}catch(s){console.error(s)}},this.parseLocation=(t,n)=>{const s=({pathname:c,search:u,hash:d,href:_,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const b=this.options.parseSearch(u),x=this.options.stringifySearch(b);return{href:c+x+d,publicHref:c+x+d,pathname:gm(c).path,external:!1,searchStr:x,search:of(n==null?void 0:n.search,b),hash:gm(d.slice(1)).path,state:bf(n==null?void 0:n.state,p)}}const m=new URL(_,this.origin),k=L4(this.rewrite,m),w=this.options.parseSearch(k.search),v=this.options.stringifySearch(w);return k.search=v,{href:k.href.replace(k.origin,""),publicHref:_,pathname:gm(k.pathname).path,external:!!this.rewrite&&k.origin!==this.origin,searchStr:v,search:of(n==null?void 0:n.search,w),hash:gm(k.hash.slice(1)).path,state:bf(n==null?void 0:n.state,p)}},o=s(t),{__tempLocation:a,__tempKey:i}=o.state;if(a&&(!i||i===this.tempLocationKey)){const c=s(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(t,n)=>FV({base:t,to:n,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,n,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:n},s):this.matchRoutesInternal(t,n),this.getMatchedRoutes=t=>{const n=Object.create(null),s=OV(Kl(t),this.processedTree,!0);return s&&Object.assign(n,s.rawParams),[(s==null?void 0:s.branch)||[this.routesById.__root__],n,s==null?void 0:s.route]},this.buildLocation=t=>{const n=(o={})=>{var M,$;if(o.href){const D=ib(o.href,{});o={...o,to:L4(this.rewrite,new URL(D.pathname,this.origin)).pathname,search:this.options.parseSearch(D.search),hash:D.hash.slice(1)}}const a=o._fromLocation||this._pendingLocation||this.latestLocation,i=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??i[1],u=i[2],d=i[3],_=this.resolvePathWithBase(c,o.to?`${o.to}`:".");let p=a9(o.params,d);const m=this.routesByPath[Kl(_)];let k;if(m)k=this.getRouteBranch(m);else if(_.includes("$"))k=[];else{const[D,I,G]=this.getMatchedRoutes(_);k=D,this.options.notFoundRoute&&(!G||G.path!=="/"&&I["**"])&&(k=[...k,this.options.notFoundRoute])}if(k.length&&E$(p))for(const D of k){const I=((M=D.options.params)==null?void 0:M.stringify)??D.options.stringifyParams;if(I){p===d&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,I(p))}catch{}}}const w=t.leaveParams?_:gm(Y8({path:_,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=u;if(t._includeValidateSearch&&(($=this.options.search)!=null&&$.strict)){const D={};k.forEach(I=>{if(I.options.validateSearch)try{Object.assign(D,T1(I.options.validateSearch,{...D,...v}))}catch{}}),v=D}v=hQ(v,o,k,t._includeValidateSearch),v=of(u,v);const b=this.options.stringifySearch(v),x=o.hash===!0?a.hash:o.hash?tp(o.hash,a.hash):void 0,y=x?`#${x}`:"";let S=o.state===!0?a.state:o.state?tp(o.state,a.state):{};o.state&&(S=bf(a.state,S));const z=`${w}${b}${y}`;let E,A,N=!1;if(this.rewrite){const D=new URL(z,this.origin),I=L$(this.rewrite,D);E=D.href.replace(D.origin,""),I.origin!==this.origin?(A=I.href,N=!0):A=I.pathname+I.search+I.hash}else E=EV(z),A=E;return{publicHref:A,href:E,pathname:w,search:v,searchStr:b,state:S,hash:x??"",external:N,unmaskOnReload:o.unmaskOnReload}},s=n(t);if(t.mask)s.maskedLocation=n({from:t.from,...t.mask});else if(this.options.routeMasks){const o=RV(s.pathname,this.processedTree);if(o){const a=Object.assign(Object.create(null),o.rawParams),{from:i,params:c,...u}=o.route,d=a9(c,a);s.maskedLocation=n({from:t.from,...u,params:d})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:n,...s})=>{let o;const a=Kl(this.latestLocation.href)===Kl(s.href)&&m_(o9(s.state),o9(this.latestLocation.state)),i=this._commitPromise;let c;const u=new Promise(d=>{c=d});if(u.resolve=()=>{c(),i==null||i.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:d,hashScrollIntoView:_,...p}=s;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=_??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,o=s.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n}),this.history.subscribers.size||this.load({action:{type:o}})}return this._scroll.next=s.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:t,resetScroll:n,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:a,...i}={})=>{const c=this.buildLocation({...i,_includeValidateSearch:!0});this._pendingLocation=c;const u=this.commitLocation({...c,viewTransition:o,replace:t,resetScroll:n,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:n,href:s,publicHref:o,...a})=>{var c,u;let i=!1;if(s)try{new URL(`${s}`),i=!0}catch{}if(i&&!n&&(n=!0),n){if(t!==void 0||!s){const _=this.buildLocation({to:t,...a});s=s??_.publicHref,o=o??_.publicHref}const d=!i&&o?o:s;if(sb(d,this.protocolAllowlist))return;if(!a.ignoreBlocker){const _=((u=(c=this.history).getBlockers)==null?void 0:u.call(c))??[];for(const p of _)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(d):window.location.href=d;return}return this.buildAndCommitLocation({...a,href:s,to:t,_isNavigate:!0})},this.load=async t=>{this.updateLatestLocation(),t!=null&&t.action&&(this._scroll.hash=t.action.type==="PUSH"||t.action.type==="REPLACE"),await kQ(this,t)},this.startViewTransition=t=>{var s,o;const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document.startViewTransition=="function"){let a;if(typeof n=="object"&&((o=(s=window.CSS)==null?void 0:s.supports)!=null&&o.call(s,"selector(:active-view-transition-type(a))"))){const i=this.latestLocation,c=this.stores.resolvedLocation.get(),u=typeof n.types=="function"?n.types(hy(i,c)):n.types;if(u===!1)return t();a={update:t,types:u}}else a=t;return document.startViewTransition(a).updateCallbackDone}return t()},this.invalidate=t=>{var u,d;const n=this._committed,s=t==null?void 0:t.filter,o=this._preloads,a=new Set([...n,...this._cache.values(),...[...(o==null?void 0:o.values())??[]].flat(),...((u=this._tx)==null?void 0:u[3])??[]].filter(_=>!s||s(_)).map(_=>_.id)),i=[];for(const[_,p]of o??[])p.some(m=>a.has(m.id))&&(o.delete(_),i.push(_));const c=_=>{if(a.has(_.id)){const p=this.routesById[_.routeId],m={..._,invalid:!0,...(t!=null&&t.forcePending||_.status==="error"||_.status==="notFound")&&s9(p)?{status:"pending",error:void 0}:void 0};return _._flight=void 0,m}return _};this._committed=n.map(c);for(const[_,p]of this._cache)a.has(_)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const _ of a)(d=this._flights)==null||d.delete(_);for(const _ of i)_.abort();return this.shouldViewTransition=!1,this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const n=t.headers.get("Location");if(t.options.href){if(n)try{const s=new URL(n);if(this.origin&&s.origin===this.origin){const o=s.pathname+s.search+s.hash;t.options.href=o,t.headers.set("Location",o)}}catch{}}else{const s=this.buildLocation(t.options).publicHref||"/";t.options.href=s,t.headers.set("Location",s)}if(t.options.href&&sb(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{var u;const n=this._cache,s=this._preloads,o=t==null?void 0:t.filter,a=[],i=[];for(const[d,_]of n)(!o||o(_))&&(i.push(d),a.push(_));const c=[];for(const[d,_]of s??[])(!o||_.some(o))&&(c.push(d),a.push(..._));for(const d of i)n.delete(d);for(const d of c)s.delete(d);for(const d of a){const _=d._flight;d._flight=void 0,_&&!--_[2]&&(((u=this._flights)==null?void 0:u.get(d.id))===_&&this._flights.delete(d.id),c.push(_[1]))}for(const d of c)d.abort()},this.loadRouteChunk=Ch,this.preloadRoute=t=>jQ(this,t),this.matchRoute=(t,n)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},o=this.buildLocation(s),a=this.stores.status.get()==="pending";if(n!=null&&n.pending&&!a)return!1;const i=(n==null?void 0:n.pending)??!a?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=MV(o.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,i.pathname,this.processedTree);return!c||t.params&&!m_(c.rawParams,t.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?m_(i.search,o.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.getStoreConfig=r,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??tQ,parseSearch:e.parseSearch??eQ,protocolAllowlist:e.protocolAllowlist??zV}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:r,processedTree:t}){this.routesById=e,this.routesByPath=r,this.processedTree=t;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}getRouteBranch(e){let r=this.routeBranchCache.get(e);return r||(r=M$(e),this.routeBranchCache.set(e,r)),r}matchRoutesInternal(e,r){var p,m;const[t,n,s]=this.getMatchedRoutes(e.pathname);let o=t,a=!1;(s?s.path!=="/"&&n["**"]:Kl(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const i=a?pQ(this.options.notFoundMode,o):void 0,c=new Array(o.length),u=this._committed,d=(k,w)=>{const v=u[w];return(v==null?void 0:v.routeId)===k.id?v:k===this.options.notFoundRoute?u.find(b=>b.routeId===k.id):void 0};let _;for(let k=0;k{const m=p(c.preSearchFilters?c.preSearchFilters.reduce((k,w)=>w(k),_):_);return c.postSearchFilters?c.postSearchFilters.reduce((k,w)=>w(k),m):m};s.push(d)}const u=c.validateSearch;if(n&&u){const d=({search:_,next:p,meta:m})=>{const k=p(_);try{const w=T1(u,k);if(m&&w)for(const v in w)v in k||(m.defaulted||(m.defaulted=new Map)).set(v,w[v]);return{...k,...w}}catch{}return k};s.push(d)}}const o=(i,c,u)=>{if(i>=s.length){if(!r.search)return{};if(r.search===!0)return c;const _=tp(r.search,c);return u&&(u.explicit=_),_}const d=(_,p)=>{if(p){const m=u||{};return{search:o(i+1,_,m),meta:m}}return o(i+1,_,u)};return s[i]({search:c,next:d,meta:u})};return o(0,e)}function pQ(e,r){if(e!=="root"){let t;for(let n=r.length-1;n>=0;n--){const s=r[n];if(s.options.notFoundComponent)return s.id;t||(t=s.children&&s.id)}if(t)return t}return Sh}function a9(e,r){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return r;const t=Object.assign(Object.create(null),r);return Object.assign(t,tp(e,t))}function i9(e,r){var n;const t=((n=e.options.params)==null?void 0:n.parse)??e.options.parseParams;t&&Object.assign(r,t(r))}function I4(e,r){var t,n;return(n=(t=e.options[r])==null?void 0:t.preload)==null?void 0:n.call(t)}function mQ(e,r){const t=I4(e,"component");let n=I4(e,"pendingComponent");return r&&(n?n=n.then(r):r()),t&&n?Promise.all([t,n]).then(()=>{}):t??n}function Ch(e,r,t){const n=()=>r===!1?void 0:r?I4(e,r):mQ(e,t),s=e._lazy;if(s)return s===!0?n():s.then(n);if(!e.lazyFn)return n();const o=e.lazyFn().then(a=>{{const{id:i,...c}=a.options;Object.assign(e.options,c),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=o,o.then(n)}function Sj(e){const r=e.findIndex(t=>t.status!=="success"||t._notFound)+1;return r&&r{const s=()=>n(r);r.addEventListener("abort",s,{once:!0}),Promise.resolve(e).then(t,n).finally(()=>r.removeEventListener("abort",s))})}function _d(e,r){return e.routesById[r.routeId]}function ig(e,r,t){return D$(e)?[Ia,e]:rp(e)?(e.routeId||(e.routeId=t),[py,e]):r?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[eu,e]):[Bc,e]}function Cj(e,r){var n,s;let t=ig(r,!0,e.id);if(t[0]!==eu)return t;try{(s=(n=e.options).onError)==null||s.call(n,t[1])}catch(o){t=ig(o,!0,e.id)}return t}function qm(e,r,t,n,s){return s[0].signal.aborted?y_:Nj(e,r,t,Cj(t,n),s)}async function gQ(e,r,t,n,s,o){var d,_;const[a,i]=r,c=t[0].signal,u=!!t[3];for(let p=t[6]??0;pe.navigate({...S,_fromLocation:a}),buildLocation:e.buildLocation,cause:u?"preload":m.cause,abortController:t[0],preload:u,matches:i,routeId:k.id};try{const S=m._ctx||(m._ctx=k.options.context?k.options.context({...v,deps:m.loaderDeps,context:w})||{}:void 0);m.context={...w,...S}}catch(S){return Ql(e,m),[p,qm(e,r,k,S,t)]}if(c.aborted)return[p,y_];const b=m.paramsError??m.searchError;if(b!==void 0)return Ql(e,m),[p,qm(e,r,k,b,t)];const x=k.options.beforeLoad;if(!x)continue;const y=m.status;p>=o&&(m.status="pending",(_=t[7])==null||_.call(t));try{cg(e,m,"beforeLoad",t[0]);const S=await ud(x({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,y_];const z=Nj(e,r,k,ig(S,!1,k.id),t);if(z[0]!==Bc)return Ql(e,m),[p,z];m.context={...m.context,...S}}catch(S){return Ql(e,m),[p,qm(e,r,k,S,t)]}finally{m.status=y,cg(e,m,!1,t[0])}}s()}function zj(e,r,t){var n;if(!(!t||--t[2])){if(((n=e._flights)==null?void 0:n.get(r.id))===t){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(r)&&s[3].some(o=>o.id===r.id)&&s[3].some(o=>o.isFetching==="beforeLoad"))return;e._flights.delete(r.id)}return t[1]}}function Ql(e,r){var n;const t=r._flight;r._flight=void 0,(n=zj(e,r,t))==null||n.abort()}function ma(e,r,t,n){var o;const s=[];for(const a of r)if(!(t!=null&&t.includes(a))){const i=a._flight;if(a._flight=void 0,n&&(i==null?void 0:i[2])===1&&((o=e._flights)==null?void 0:o.get(a.id))===i&&(t!=null&&t.some(c=>c.id===a.id)))i[2]=0;else{const c=zj(e,a,i);c&&s.push(c)}}for(const a of s)a.abort()}function Ej(e){for(const r of e){const t=r._flight;t&&t[2]++}}function cg(e,r,t,n){var a;if(r.isFetching=t,n&&((a=e._tx)==null?void 0:a[0])!==n)return;const s=e.stores.byRoute.get(r.routeId),o=s==null?void 0:s.get();(o==null?void 0:o.id)===r.id&&s.set({...o,isFetching:t})}function I$(e,r,t,n,s,o,a){const i=r[0];return{params:t.params,location:i,navigate:c=>e.navigate({...c,_fromLocation:i}),cause:a?"preload":t.cause,abortController:s,preload:a,deps:t.loaderDeps,parentMatchPromise:o,context:t.context,route:n,...e.options.additionalContext}}async function c9(e,r,t,n,s,o,a){const i=a[0],c=i.signal;if(c.aborted)return y_;if(!s)return[Bc,void 0];let u=t._flight;cg(e,t,"loader",i);try{if(!u){const d=new AbortController;u=[Promise.resolve().then(()=>s(I$(e,r,t,n,d,o,!!a[3]))).then(_=>ig(_,!1,n.id),_=>ig(_,!0,n.id)).then(_=>{var p;return _[0]!==Bc&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||d.abort()),_[0]===eu&&u[2]?Cj(n,_[1]):_}),d,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],Nj(e,r,n,await ud(u[0],c),a)}catch(d){if(d!==c||!c.aborted)throw d;return Ql(e,t),y_}finally{cg(e,t,!1,i)}}function l9(e,r,t){r[0]!==Ia&&(e.status="success",e.error=void 0,r[0]===Bc?(e.loaderData=r[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function vQ(e,r,t){const n=e._cache.get(r.id);if(n!==t||e._committed.some(o=>o.id===r.id&&o._flight===r._flight))return;const s={...r,_notFound:void 0,context:{}};s._flight&&s._flight[2]++,e._cache.set(r.id,s),n&&Ql(e,n)}function u9(e,r){return r[0]===eu||r[0]===py?{...e,status:r[0]===eu?"error":"notFound",error:r[1],_flight:void 0}:e}function bQ(e,r,t,n,s,o,a){var I,G;const i=r[1][t],c=_d(e,i),u=!!o[3],d=e._cache.get(i.id);let _,p=!1,m;try{if(i.status==="success"&&(_=c.options.shouldReload,typeof _=="function"&&(_=_(I$(e,r,i,c,o[0],s,u))),o[0].signal.aborted&&(m=y_)),!m)if(i.status!=="success")p=!0;else{const H=u||i.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;p=!!(i.invalid||_||_===void 0&&Date.now()-i.updatedAt>=H&&(o[5]||i.cause==="enter"||o[2].some(Q=>Q.routeId===i.routeId&&Q.id!==i.id)))}}catch(H){i.invalid=!0,Ql(e,i),m=qm(e,r,c,H,o)}const k=c.options.loader,w=typeof k=="function",v=w?k:k==null?void 0:k.handler,b=!u||c.options.preload!==!1;let x=b&&k?(I=e._flights)==null?void 0:I.get(i.id):void 0;x===i._flight||m?x=void 0:x&&!p&&!u&&_===void 0?p=!0:p||(x=void 0);const y=!!(k&&p&&i.status==="success"&&!u&&!o[4]&&((w?void 0:k.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),S=p&&b,z=S&&!y&&(i.status!=="success"||!!k),E=t>=a?o[7]:void 0,A=c.lazyFn&&c._lazy!==!0?E:void 0;if(S&&!k&&(i.invalid=!1,i.updatedAt=Date.now()),x&&x[2]++,z){const H=i._flight;i._flight=x,(G=zj(e,i,H))==null||G.abort(),t>=a&&(i.status="pending"),E==null||E()}S||(i.isFetching=!1);const N=(m?Promise.resolve(m):z?c9(e,r,i,c,v,s,o):Promise.resolve([Bc,i.loaderData])).then(H=>(z&&(l9(i,H,u),H[0]===Bc&&(k&&!o[0].signal.aborted&&vQ(e,i,d),t>=a&&(i.status="pending"))),H)),M=ud(Promise.resolve().then(()=>Ch(c,void 0,A)),o[0].signal).then(()=>{},H=>r[1].some((Q,K)=>K<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,qm(e,r,c,H,o)]).then(H=>N.then(Q=>(z&&!H&&Q[0]===Bc&&i.status==="pending"&&!o[0].signal.aborted&&(i.status="success",E==null||E()),H)));if(n.push([t,N,M]),!y)return N.then(H=>u9(i,H));const $={...i,status:"pending",preload:!1,_flight:x};i.invalid=!1,i.isFetching="loader";const D=c9(e,r,$,c,v,s,o).then(H=>(i.isFetching=!1,l9($,H,!1),H));return(r[2]??(r[2]=[])).push([t,D,M,$]),D.then(H=>u9($,H))}async function P4(e,r,t,n,s=0){const o=t==null?void 0:t[1][1];let a=o!=null&&o.routeId?r.findIndex(i=>i.routeId===o.routeId):(t==null?void 0:t[0])??r.length-1;a<0&&(a=0);for(let i=a;i>=0;i--){const c=_d(e,r[i]);try{const u=Ch(c,!1);u&&await ud(u,n)}catch(u){if(u===n&&n.aborted)throw u}if(c.options.notFoundComponent)return i}return o!=null&&o.routeId?a:s}function Df(e,r){r[2]&&(ma(e,r[2].map(t=>t[3])),r[2]=void 0)}async function _9(e,r,t,n){let s;try{await Promise.all(e.map(o=>o[1].then(async a=>{const i=o[0];if(!(n&&i>=await n)){if(a[0]>=Ia)throw[i,a];!s&&a[0]!==Bc&&(s=[i,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=i))return c[1].then(u=>{if(u[0]===Ia)throw[c[0],u]})})))}})))}catch(o){return o}return r??s}function Nj(e,r,t,n,s,o){for(;n[0]===Ia;){const a=n[1],i=a.options;if(i.reloadDocument?s[3]:s[1]>=20)return n;try{return i.href&&i.reloadDocument?(e.resolveRedirect(a),n):[Ia,a,e.buildLocation({...i,_fromLocation:r[0],_includeValidateSearch:!0})]}catch(c){n=o?[eu,c]:Cj(t,c),o=!0}}return n}async function P$(e,r,t,n,s,o){const a=r[1];let i=await s,c=!1;const u=a.findIndex(m=>m._notFound),d=m=>m[1][0]===py?P4(e,a,m,n.signal):m[0];let _=u<0?a.length:u;if(((i==null?void 0:i[1][0])??0)>=Ia)_=0;else if(i){_=i[2]??(i[2]=await d(i));for(const m of t){if(m[0]>=_)break;const k=await m[1];if(k[0]!==Bc&&k[0]=_)break;const k=await m[2];if(k){i=k;break}}if(((i==null?void 0:i[1][0])??0)>=Ia){const m=i[1];if(m[0]!==Ia||m[1].options.reloadDocument||m[2])return Df(e,r),m;c=!0,i=[0,[eu,new Error("Too many redirects")]]}const p=i?i[2]??await d(i):u;if(p>=0){const m=i==null?void 0:i[1],k=m==null?void 0:m[0],w=a[p],v=m==null?void 0:m[1],b=()=>{m&&(w._notFound=void 0,k===eu?w.status="error":(v.routeId=w.routeId,w.routeId===e.routeTree.id?(w.status="success",w._notFound=!0):w.status="notFound"),w.error=v,w.isFetching=!1)};b(),m||o==null||o();const x=_d(e,w);try{await ud(m?Promise.resolve().then(()=>Ch(x,k===eu?"errorComponent":"notFoundComponent")):Promise.all([Ch(x),Ch(x,"notFoundComponent")]),n.signal)}catch(y){if(y===n.signal&&n.signal.aborted)return Df(e,r),y_}m?c&&(n.abort(),await Promise.all([...t.map(y=>y[1]),...t.map(y=>y[2]),...(r[2]??[]).map(y=>y[1])]),Df(e,r),ma(e,a),b()):w.status="success"}return r}async function B$(e,r,t,n=0,s=r[1].length){var a,i;const o=r[1];for(let c=n;cx._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const x=await P4(e,t,void 0,o,u);t[u]._notFound=void 0,t[x]._notFound=!0,u=x}let d=u<0?t.length:u+1,_=0;for(;_{for(let x=m;x=Ia&&(d=0);w()}if(!o.aborted&&!n[3]){const x=[];for(const[y,S]of e._flights??[])S[2]||(e._flights.delete(y),x.push(S[1]));for(const y of x)y.abort()}const b=P$(e,s,p,n[0],_9(p,v,s[2]),n[7]);(i=s[2])!=null&&i.length&&(s[3]=_9(s[2],void 0,void 0,b.then(x=>ag(x)?0:Sj(t).length,()=>0))),a=await b}catch(c){if(Df(e,s),c===o&&o.aborted)return y_;throw c}return ag(a)?a:B$(e,a,o,n[6]===t.length?n[6]:0)}function B4(e,r){var o,a;if(e._tx!==r)return;const t=r[3],n=e.stores.matches.get();let s=e._pending;for(let i=0;i0){s[3]=setTimeout(()=>B4(e,r),x);return}s[2]=0}const v=t.map(x=>({...x,_flight:void 0}));v[i].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(x=>(x&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+k),x));return}}function vm(e,r){var n;const t=e._pending;(e._tx===r||!((n=e._tx)!=null&&n[3].some(s=>s.id===(t==null?void 0:t[1]))))&&(clearTimeout(t==null?void 0:t[3]),e._pending=void 0)}async function f9(e,r){const t=e._pending;if(!t)return;clearTimeout(t[3]);const n=t[2]-Date.now();if(!t[4]||n<=0||!Sj(r[3]).some(o=>o.id===t[1]))return;let s;try{await ud(new Promise(o=>{s=setTimeout(o,n)}),r[0].signal)}catch{}clearTimeout(s)}function H$(e,r){e._committed=r,e.stores.setMatches(r)}function yQ(e,r,t,n){const s=e._committed,o=e._cache;for(const c of t)c.preload=!1,n&&(c._assetEnd=void 0);const a=Sj(t).length,i=new Map;{const c=Date.now();for(const u of[...s,...o.values()]){if(u.status!=="success"||t.some((_,p)=>_.id===u.id&&(p=(u.preload?d.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:d.options.gcTime??e.options.defaultGcTime??3e5)||i.set(u.id,o.get(u.id)===u?u:{...u,_flight:void 0,isFetching:!1,context:{}})}}r[3]=[],e._cache=i,H$(e,t),ma(e,[...o.values(),...s],[...t,...i.values()]),_Q(e,s,t,r)}async function Mv(e,r){let t=e._tx;for(;t&&t!==r;){if(await t[5],e._tx===t)return;t=e._tx}}function q$(e,r,t){const n=t[1].options,s=t[2];if(!s)return e.navigate({...n,replace:!0,ignoreBlocker:!0});if(n.reloadDocument)return e.navigate({href:s.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});s._redirects=r[1]+1,e._pendingLocation=s;const o=e.commitLocation({...s,viewTransition:n.viewTransition,replace:!0,resetScroll:n.resetScroll,hashScrollIntoView:n.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===s&&(e._pendingLocation=void 0)}),o}async function xQ(e,r,t,n,s){const o=t.map(c=>({...c}));Ej(o);for(const c of n)Ql(e,o[c[0]]),o[c[0]]=c[3];const a=[r[2],o];let i;try{i=await P$(e,a,n,r[0],s)}catch(c){throw ma(e,o),c}if(ag(i)){ma(e,o),i[0]===Ia&&e._tx===r&&e._committed===t&&await q$(e,r,i);return}if(await B$(e,i,r[0].signal),e._tx!==r||e._committed!==t){ma(e,o);return}for(const c of o){const u=e._cache.get(c.id);u!=null&&u._flight&&u._flight===c._flight&&(e._cache.delete(c.id),Ql(e,u))}H$(e,o),ma(e,t,o)}async function wQ(e,r,t,n,s,o){const a=await F$(e,r[2],r[3],[r[0],r[1],e._committed,void 0,s,t,o,n]);if(ag(a)){const _=a[0]===Ia&&e._tx===r;if((!_||a[1].options.reloadDocument)&&vm(e,r),ma(e,r[3]),r[3]=[],!_)return;if(e._tx!==r){vm(e,r);return}await q$(e,r,a);return}const i=a[1];if(e._tx===r&&await f9(e,r),e._tx!==r){vm(e,r),ma(e,i),Df(e,a);return}const c=r[2],u=hy(c,e.stores.resolvedLocation.get()),d=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===r&&await f9(e,r),e._tx!==r){vm(e,r),ma(e,i),Df(e,a);return}const _=()=>{vm(e,r),yQ(e,r,i,o),e._tx===r&&(e.emit({type:"onLoad",...u}),e._tx===r&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(_,i);if(e._tx!==r){Df(e,a);return}d!=null&&d.length&&xQ(e,r,i,d,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set("idle"),e._tx===r&&e.emit({type:"onResolved",...u}),p&&e._tx===r&&e.emit({type:"onRendered",...u})}),e._tx===r&&((m=e._commitPromise)==null||m.resolve(),e._commitPromise=void 0)})}async function kQ(e,r){var S;const t=e._tx,n=e.stores.resolvedLocation.get(),s=n??e.stores.location.get(),o=e.latestLocation,a=e._pendingLocation,i=(a==null?void 0:a.href)===o.href?a._redirects??0:0,c=e._handoff,u=c==null?void 0:c[0](),d=new AbortController,_=e._preflight;if(e._preflight=d,u||c==null||c[1](),_==null||_.abort(),!d.signal.aborted){const z=hy(o,n);e.emit({type:"onBeforeNavigate",...z}),d.signal.aborted||e.emit({type:"onBeforeLoad",...z})}if(d.signal.aborted){await Mv(e,t);return}const p=s.href===o.href;let m=d;const k=e.matchRoutes(o,{_controller:d});Ej(k);const w=u?c[1](k):void 0;if(w?m=u:u==null||u.abort(),d.signal.aborted){ma(e,k),await Mv(e,t);return}e._preflight=void 0;let v;const b=()=>wQ(e,y,p,()=>B4(e,y),r==null?void 0:r.sync,w),x=r!=null&&r.sync?new Promise(z=>v=z):Promise.resolve().then(b).then(),y=[m,i,o,k,Date.now(),x];if(e._tx=y,t){for(const z of e.stores.matches.get()){if(e._tx!==y)break;z.isFetching&&cg(e,z,!1)}t[0].abort(),ma(e,t[3],y[3],!0)}if(e._tx!==y){ma(e,y[3]),y[3]=[],v==null||v(),await Mv(e,y);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(o)}),(w||!e._committed.length&&((S=k[0])==null?void 0:S.status)!=="success"&&!k.some(z=>z._notFound))&&B4(e,y),v==null||v(b()),await x,await Mv(e,y)}async function jQ(e,r){let t=e.buildLocation(r);for(let n=0;;n++){const s=e._committed,o=new AbortController;let a,i,c;try{try{a=e.matchRoutes(t,{_controller:o}),Ej(a),i=(e._preloads??(e._preloads=new Map)).set(o,a),c=await F$(e,t,a,[o,n,s,!0])}finally{i&&(i=i.delete(o),ma(e,a)),o.abort()}if(!ag(c))return c[1];if(!i||c.length<3)return;t=c[2]}catch(u){rp(u)||console.error(u);return}}}const SQ="Error preloading route! ☝️";var U$=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=r=>{var c,u;this.originalIndex=r.originalIndex;const t=this.options,n=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(c=this.options).getParentRoute)==null?void 0:u.call(c),n?this._path=Sh:this.parentRoute||wj();let s=n?Sh:t==null?void 0:t.path;s&&s!=="/"&&(s=O$(s));const o=(t==null?void 0:t.id)||s;let a=n?Sh:E1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=E1(["/",a]));const i=a==="__root__"?"/":E1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=i,this._to=Kl(i)},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.redirect=r=>sQ({from:this.fullPath,...r}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},CQ=class extends U${constructor(e){super(e)}},Aj=class extends T.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,r){const t=e.getResetKey();return r.error&&r.resetKey!==t?{resetKey:t,error:null}:{resetKey:t}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,r){var t,n;(n=(t=this.props).onCatch)==null||n.call(t,e,r)}render(){const e=this.state.error;return e?T.createElement(this.props.errorComponent??zQ,{error:e,reset:this.reset}):this.props.children}};function zQ({error:e}){const[r,t]=T.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(n=>!n),children:r?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),r?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function EQ({children:e,fallback:r=null}){return f.jsx(st.Fragment,{children:G$()?e:r})}function G$(){return st.useSyncExternalStore(NQ,()=>!0,()=>!1)}function NQ(){return()=>{}}var W$=T.createContext(null);function Vo(e){return T.useContext(W$)}var my=T.createContext(void 0),AQ=T.createContext(void 0),On=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(On||{});function TQ({update:e,notify:r,unwatched:t}){return{link:n,unlink:s,propagate:o,checkDirty:a,shallowPropagate:i};function n(u,d,_){const p=d.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:d.deps;if(m!==void 0&&m.dep===u){m.version=_,d.depsTail=m;return}const k=u.subsTail;if(k!==void 0&&k.version===_&&k.sub===d)return;const w=d.depsTail=u.subsTail={version:_,dep:u,sub:d,prevDep:p,nextDep:m,prevSub:k,nextSub:void 0};m!==void 0&&(m.prevDep=w),p!==void 0?p.nextDep=w:d.deps=w,k!==void 0?k.nextSub=w:u.subs=w}function s(u,d=u.sub){const _=u.dep,p=u.prevDep,m=u.nextDep,k=u.nextSub,w=u.prevSub;return m!==void 0?m.prevDep=p:d.depsTail=p,p!==void 0?p.nextDep=m:d.deps=m,k!==void 0?k.prevSub=w:_.subsTail=w,w!==void 0?w.nextSub=k:(_.subs=k)===void 0&&t(_),m}function o(u){let d=u.nextSub,_;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&c(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&r(p),m&1){const k=p.subs;if(k!==void 0){const w=(u=k).nextSub;w!==void 0&&(_={value:d,prev:_},d=w);continue}}if((u=d)!==void 0){d=u.nextSub;continue}for(;_!==void 0;)if(u=_.value,_=_.prev,u!==void 0){d=u.nextSub;continue e}break}while(!0)}function a(u,d){let _,p=0,m=!1;e:do{const k=u.dep,w=k.flags;if(d.flags&16)m=!0;else if((w&17)===17){if(e(k)){const v=k.subs;v.nextSub!==void 0&&i(v),m=!0}}else if((w&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(_={value:u,prev:_}),u=k.deps,d=k,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=d.subs,b=v.nextSub!==void 0;if(b?(u=_.value,_=_.prev):u=v,m){if(e(d)){b&&i(v),d=u.sub;continue}m=!1}else d.flags&=-33;d=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return m}while(!0)}function i(u){do{const d=u.sub,_=d.flags;(_&48)===32&&(d.flags=_|16,(_&6)===2&&r(d))}while((u=u.nextSub)!==void 0)}function c(u,d){let _=d.depsTail;for(;_!==void 0;){if(_===u)return!0;_=_.prevDep}return!1}}function RQ(e,r,t){var o,a,i;const n=typeof e=="object",s=n?e:void 0;return{next:(o=n?e.next:e)==null?void 0:o.bind(s),error:(a=n?e.error:r)==null?void 0:a.bind(s),complete:(i=n?e.complete:t)==null?void 0:i.bind(s)}}const F4=[];let R1=0;const{link:d9,unlink:MQ,propagate:OQ,checkDirty:K$,shallowPropagate:h9}=TQ({update(e){return e._update()},notify(e){F4[H4++]=e,e.flags&=~On.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=On.Mutable|On.Dirty,lb(e))}});let Ov=0,H4=0,Ac,q4=0;function $Q(e){try{++q4,e()}finally{--q4||V$()}}function lb(e){const r=e.depsTail;let t=r!==void 0?r.nextDep:e.deps;for(;t!==void 0;)t=MQ(t,e)}function V$(){if(!(q4>0)){for(;Ov{var u;s.get(),i.current?(u=a.next)==null||u.call(a,s._snapshot):i.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=Ac,i=(r==null?void 0:r.compare)??Object.is;if(t)Ac=s,++R1,s.depsTail=void 0;else if(o===void 0)return!1;t&&(s.flags=On.Mutable|On.RecursedCheck);try{const c=s._snapshot,u=typeof o=="function"?o(c):o===void 0&&t?n(c):o;return c===void 0||!i(c,u)?(s._snapshot=u,!0):!1}finally{Ac=a,t&&(s.flags&=~On.RecursedCheck),lb(s)}}};return t?(s.flags=On.Mutable|On.Dirty,s.get=function(){const o=s.flags;if(o&On.Dirty||o&On.Pending&&K$(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&h9(a)}}else o&On.Pending&&(s.flags=o&~On.Pending);return Ac!==void 0&&d9(s,Ac,R1),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(OQ(a),h9(a),V$())}},s}function DQ(e){const r=()=>{const n=Ac;Ac=t,++R1,t.depsTail=void 0,t.flags=On.Watching|On.RecursedCheck;try{return e()}finally{Ac=n,t.flags&=~On.RecursedCheck,lb(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:On.Watching|On.RecursedCheck,notify(){const n=this.flags;n&On.Dirty||n&On.Pending&&K$(this.deps,this)?r():this.flags=On.Watching},stop(){this.flags=On.None,this.depsTail=void 0,lb(this)}};return r(),t}var y2={exports:{}},x2={},w2={exports:{}},k2={};/** +`+j.stack}}var Ct=Object.prototype.hasOwnProperty,Vt=e.unstable_scheduleCallback,Ut=e.unstable_cancelCallback,Gt=e.unstable_shouldYield,De=e.unstable_requestPaint,ct=e.unstable_now,lt=e.unstable_getCurrentPriorityLevel,xe=e.unstable_ImmediatePriority,Ie=e.unstable_UserBlockingPriority,Ye=e.unstable_NormalPriority,Ae=e.unstable_LowPriority,Ve=e.unstable_IdlePriority,Ze=e.log,at=e.unstable_setDisableYieldValue,At=null,Pe=null;function Jt(l){if(typeof Ze=="function"&&at(l),Pe&&typeof Pe.setStrictMode=="function")try{Pe.setStrictMode(At,l)}catch{}}var Tt=Math.clz32?Math.clz32:nr,Zr=Math.log,cr=Math.LN2;function nr(l){return l>>>=0,l===0?32:31-(Zr(l)/cr|0)|0}var Wt=256,wt=262144,ns=4194304;function Hr(l){var h=l&42;if(h!==0)return h;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function en(l,h,g){var j=l.pendingLanes;if(j===0)return 0;var R=0,O=l.suspendedLanes,X=l.pingedLanes;l=l.warmLanes;var ne=j&134217727;return ne!==0?(j=ne&~O,j!==0?R=Hr(j):(X&=ne,X!==0?R=Hr(X):g||(g=ne&~l,g!==0&&(R=Hr(g))))):(ne=j&~O,ne!==0?R=Hr(ne):X!==0?R=Hr(X):g||(g=j&~l,g!==0&&(R=Hr(g)))),R===0?0:h!==0&&h!==R&&(h&O)===0&&(O=R&-R,g=h&-h,O>=g||O===32&&(g&4194048)!==0)?h:R}function gr(l,h){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&h)===0}function ut(l,h){switch(l){case 1:case 2:case 4:case 8:case 64:return h+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dr(){var l=ns;return ns<<=1,(ns&62914560)===0&&(ns=4194304),l}function Cr(l){for(var h=[],g=0;31>g;g++)h.push(l);return h}function $r(l,h){l.pendingLanes|=h,h!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function wn(l,h,g,j,R,O){var X=l.pendingLanes;l.pendingLanes=g,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=g,l.entangledLanes&=g,l.errorRecoveryDisabledLanes&=g,l.shellSuspendCounter=0;var ne=l.entanglements,pe=l.expirationTimes,ze=l.hiddenUpdates;for(g=X&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var ho=/[\n"\\]/g;function Kn(l){return l.replace(ho,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Ys(l,h,g,j,R,O,X,ne){l.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?l.type=X:l.removeAttribute("type"),h!=null?X==="number"?(h===0&&l.value===""||l.value!=h)&&(l.value=""+As(h)):l.value!==""+As(h)&&(l.value=""+As(h)):X!=="submit"&&X!=="reset"||l.removeAttribute("value"),h!=null?To(l,X,As(h)):g!=null?To(l,X,As(g)):j!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?l.name=""+As(ne):l.removeAttribute("name")}function Zs(l,h,g,j,R,O,X,ne){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),h!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||h!=null)){ti(l);return}g=g!=null?""+As(g):"",h=h!=null?""+As(h):g,ne||h===l.value||(l.value=h),l.defaultValue=h}j=j??R,j=typeof j!="function"&&typeof j!="symbol"&&!!j,l.checked=ne?l.checked:!!j,l.defaultChecked=!!j,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(l.name=X),ti(l)}function To(l,h,g){h==="number"&&Tn(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function Zo(l,h,g,j){if(l=l.options,h){h={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),il=!1;if(ea)try{var Ri={};Object.defineProperty(Ri,"passive",{get:function(){il=!0}}),window.addEventListener("test",Ri,Ri),window.removeEventListener("test",Ri,Ri)}catch{il=!1}var Et=null,pu=null,hs=null;function mu(){if(hs)return hs;var l,h=pu,g=h.length,j,R="value"in Et?Et.value:Et.textContent,O=R.length;for(l=0;l=si),no=" ",ta=!1;function Oi(l,h){switch(l){case"keyup":return P_.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yu(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var xn=!1;function Ts(l,h){switch(l){case"compositionend":return yu(h);case"keypress":return h.which!==32?null:(ta=!0,no);case"textInput":return l=h.data,l===no&&ta?null:l;default:return null}}function Sn(l,h){if(xn)return l==="compositionend"||!gl&&Oi(l,h)?(l=mu(),hs=pu=Et=null,xn=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1=h)return{node:g,offset:h-l};l=j}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=G_(g)}}function W_(l,h){return l&&h?l===h?!0:l&&l.nodeType===3?!1:h&&h.nodeType===3?W_(l,h.parentNode):"contains"in l?l.contains(h):l.compareDocumentPosition?!!(l.compareDocumentPosition(h)&16):!1:!1}function Vn(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var h=Tn(l.document);h instanceof l.HTMLIFrameElement;){try{var g=typeof h.contentWindow.location.href=="string"}catch{g=!1}if(g)l=h.contentWindow;else break;h=Tn(l.document)}return h}function ii(l){var h=l&&l.nodeName&&l.nodeName.toLowerCase();return h&&(h==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||h==="textarea"||l.contentEditable==="true")}var bl=ea&&"documentMode"in document&&11>=document.documentMode,Do=null,ci=null,li=null,ps=!1;function ms(l,h,g){var j=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;ps||Do==null||Do!==Tn(j)||(j=Do,"selectionStart"in j&&ii(j)?j={start:j.selectionStart,end:j.selectionEnd}:(j=(j.ownerDocument&&j.ownerDocument.defaultView||window).getSelection(),j={anchorNode:j.anchorNode,anchorOffset:j.anchorOffset,focusNode:j.focusNode,focusOffset:j.focusOffset}),li&&ai(li,j)||(li=j,j=hv(ci,"onSelect"),0>=X,R-=X,za=1<<32-Tt(h)+R|g<vr?(Or=Ot,Ot=null):Or=Ot.sibling;var Gr=Ne(je,Ot,Ce[vr],qe);if(Gr===null){Ot===null&&(Ot=Or);break}l&&Ot&&Gr.alternate===null&&h(je,Ot),ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr,Ot=Or}if(vr===Ce.length)return g(je,Ot),Er&&di(je,vr),qt;if(Ot===null){for(;vrvr?(Or=Ot,Ot=null):Or=Ot.sibling;var Uu=Ne(je,Ot,Gr.value,qe);if(Uu===null){Ot===null&&(Ot=Or);break}l&&Ot&&Uu.alternate===null&&h(je,Ot),ge=O(Uu,ge,vr),Ur===null?qt=Uu:Ur.sibling=Uu,Ur=Uu,Ot=Or}if(Gr.done)return g(je,Ot),Er&&di(je,vr),qt;if(Ot===null){for(;!Gr.done;vr++,Gr=Ce.next())Gr=Ue(je,Gr.value,qe),Gr!==null&&(ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr);return Er&&di(je,vr),qt}for(Ot=j(Ot);!Gr.done;vr++,Gr=Ce.next())Gr=$e(Ot,je,vr,Gr.value,qe),Gr!==null&&(l&&Gr.alternate!==null&&Ot.delete(Gr.key===null?vr:Gr.key),ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr);return l&&Ot.forEach(function(kK){return h(je,kK)}),Er&&di(je,vr),qt}function hn(je,ge,Ce,qe){if(typeof Ce=="object"&&Ce!==null&&Ce.type===x&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case m:e:{for(var qt=Ce.key;ge!==null;){if(ge.key===qt){if(qt=Ce.type,qt===x){if(ge.tag===7){g(je,ge.sibling),qe=R(ge,Ce.props.children),qe.return=je,je=qe;break e}}else if(ge.elementType===qt||typeof qt=="object"&&qt!==null&&qt.$$typeof===E&&Z_(qt)===ge.type){g(je,ge.sibling),qe=R(ge,Ce.props),Fp(qe,Ce),qe.return=je,je=qe;break e}g(je,ge);break}else h(je,ge);ge=ge.sibling}Ce.type===x?(qe=Lo(Ce.props.children,je.mode,qe,Ce.key),qe.return=je,je=qe):(qe=Ca(Ce.type,Ce.key,Ce.props,null,je.mode,qe),Fp(qe,Ce),qe.return=je,je=qe)}return X(je);case k:e:{for(qt=Ce.key;ge!==null;){if(ge.key===qt)if(ge.tag===4&&ge.stateNode.containerInfo===Ce.containerInfo&&ge.stateNode.implementation===Ce.implementation){g(je,ge.sibling),qe=R(ge,Ce.children||[]),qe.return=je,je=qe;break e}else{g(je,ge);break}else h(je,ge);ge=ge.sibling}qe=_i(Ce,je.mode,qe),qe.return=je,je=qe}return X(je);case E:return Ce=Z_(Ce),hn(je,ge,Ce,qe)}if(Q(Ce))return St(je,ge,Ce,qe);if(I(Ce)){if(qt=I(Ce),typeof qt!="function")throw Error(n(150));return Ce=qt.call(Ce),Xt(je,ge,Ce,qe)}if(typeof Ce.then=="function")return hn(je,ge,I0(Ce),qe);if(Ce.$$typeof===y)return hn(je,ge,bc(je,Ce),qe);P0(je,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint"?(Ce=""+Ce,ge!==null&&ge.tag===6?(g(je,ge.sibling),qe=R(ge,Ce),qe.return=je,je=qe):(g(je,ge),qe=pc(Ce,je.mode,qe),qe.return=je,je=qe),X(je)):g(je,ge)}return function(je,ge,Ce,qe){try{Bp=0;var qt=hn(je,ge,Ce,qe);return Id=null,qt}catch(Ot){if(Ot===Ld||Ot===D0)throw Ot;var Ur=un(29,Ot,null,je.mode);return Ur.lanes=qe,Ur.return=je,Ur}finally{}}}var ef=LC(!0),IC=LC(!1),zu=!1;function Fx(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hx(l,h){l=l.updateQueue,h.updateQueue===l&&(h.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Eu(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Nu(l,h,g){var j=l.updateQueue;if(j===null)return null;if(j=j.shared,(Kr&2)!==0){var R=j.pending;return R===null?h.next=h:(h.next=R.next,R.next=h),j.pending=h,h=_t(l),mt(l,null,g),h}return we(l,j,h,g),_t(l)}function Hp(l,h,g){if(h=h.updateQueue,h!==null&&(h=h.shared,(g&4194048)!==0)){var j=h.lanes;j&=l.pendingLanes,g|=j,h.lanes=g,yr(l,g)}}function qx(l,h){var g=l.updateQueue,j=l.alternate;if(j!==null&&(j=j.updateQueue,g===j)){var R=null,O=null;if(g=g.firstBaseUpdate,g!==null){do{var X={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};O===null?R=O=X:O=O.next=X,g=g.next}while(g!==null);O===null?R=O=h:O=O.next=h}else R=O=h;g={baseState:j.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:j.shared,callbacks:j.callbacks},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=h:l.next=h,g.lastBaseUpdate=h}var Ux=!1;function qp(){if(Ux){var l=sa;if(l!==null)throw l}}function Up(l,h,g,j){Ux=!1;var R=l.updateQueue;zu=!1;var O=R.firstBaseUpdate,X=R.lastBaseUpdate,ne=R.shared.pending;if(ne!==null){R.shared.pending=null;var pe=ne,ze=pe.next;pe.next=null,X===null?O=ze:X.next=ze,X=pe;var He=l.alternate;He!==null&&(He=He.updateQueue,ne=He.lastBaseUpdate,ne!==X&&(ne===null?He.firstBaseUpdate=ze:ne.next=ze,He.lastBaseUpdate=pe))}if(O!==null){var Ue=R.baseState;X=0,He=ze=pe=null,ne=O;do{var Ne=ne.lane&-536870913,$e=Ne!==ne.lane;if($e?(Mr&Ne)===Ne:(j&Ne)===Ne){Ne!==0&&Ne===Lr&&(Ux=!0),He!==null&&(He=He.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var St=l,Xt=ne;Ne=h;var hn=g;switch(Xt.tag){case 1:if(St=Xt.payload,typeof St=="function"){Ue=St.call(hn,Ue,Ne);break e}Ue=St;break e;case 3:St.flags=St.flags&-65537|128;case 0:if(St=Xt.payload,Ne=typeof St=="function"?St.call(hn,Ue,Ne):St,Ne==null)break e;Ue=_({},Ue,Ne);break e;case 2:zu=!0}}Ne=ne.callback,Ne!==null&&(l.flags|=64,$e&&(l.flags|=8192),$e=R.callbacks,$e===null?R.callbacks=[Ne]:$e.push(Ne))}else $e={lane:Ne,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},He===null?(ze=He=$e,pe=Ue):He=He.next=$e,X|=Ne;if(ne=ne.next,ne===null){if(ne=R.shared.pending,ne===null)break;$e=ne,ne=$e.next,$e.next=null,R.lastBaseUpdate=$e,R.shared.pending=null}}while(!0);He===null&&(pe=Ue),R.baseState=pe,R.firstBaseUpdate=ze,R.lastBaseUpdate=He,O===null&&(R.shared.lanes=0),Ou|=X,l.lanes=X,l.memoizedState=Ue}}function PC(l,h){if(typeof l!="function")throw Error(n(191,l));l.call(h)}function BC(l,h){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var X=K.T,ne={};K.T=ne,lw(l,!1,h,g);try{var pe=R(),ze=K.S;if(ze!==null&&ze(ne,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var He=Dd(pe,j);Kp(l,h,He,Ma(l))}else Kp(l,h,j,Ma(l))}catch(Ue){Kp(l,h,{then:function(){},status:"rejected",reason:Ue},Ma())}finally{J.p=O,X!==null&&ne.types!==null&&(X.types=ne.types),K.T=X}}function vW(){}function iw(l,h,g,j){if(l.tag!==5)throw Error(n(476));var R=v7(l).queue;g7(l,R,h,ee,g===null?vW:function(){return b7(l),g(j)})}function v7(l){var h=l.memoizedState;if(h!==null)return h;h={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:ee},next:null};var g={};return h.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:g},next:null},l.memoizedState=h,l=l.alternate,l!==null&&(l.memoizedState=h),h}function b7(l){var h=v7(l);h.next===null&&(h=l.alternate.memoizedState),Kp(l,h.next.queue,{},Ma())}function cw(){return bs(um)}function y7(){return cs().memoizedState}function x7(){return cs().memoizedState}function bW(l){for(var h=l.return;h!==null;){switch(h.tag){case 24:case 3:var g=Ma();l=Eu(g);var j=Nu(h,l,g);j!==null&&(la(j,h,g),Hp(j,h,g)),h={cache:Od()},l.payload=h;return}h=h.return}}function yW(l,h,g){var j=Ma();g={lane:j,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Q0(l)?k7(h,g):(g=Re(l,h,g,j),g!==null&&(la(g,l,j),j7(g,h,j)))}function w7(l,h,g){var j=Ma();Kp(l,h,g,j)}function Kp(l,h,g,j){var R={lane:j,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(Q0(l))k7(h,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=h.lastRenderedReducer,O!==null))try{var X=h.lastRenderedState,ne=O(X,g);if(R.hasEagerState=!0,R.eagerState=ne,Yt(ne,X))return we(l,h,R,0),mn===null&&fe(),!1}catch{}finally{}if(g=Re(l,h,R,j),g!==null)return la(g,l,j),j7(g,h,j),!0}return!1}function lw(l,h,g,j){if(j={lane:2,revertLane:Fw(),gesture:null,action:j,hasEagerState:!1,eagerState:null,next:null},Q0(l)){if(h)throw Error(n(479))}else h=Re(l,g,j,2),h!==null&&la(h,l,2)}function Q0(l){var h=l.alternate;return l===pr||h!==null&&h===pr}function k7(l,h){Bd=H0=!0;var g=l.pending;g===null?h.next=h:(h.next=g.next,g.next=h),l.pending=h}function j7(l,h,g){if((g&4194048)!==0){var j=h.lanes;j&=l.pendingLanes,g|=j,h.lanes=g,yr(l,g)}}var Vp={readContext:bs,use:G0,useCallback:Yn,useContext:Yn,useEffect:Yn,useImperativeHandle:Yn,useLayoutEffect:Yn,useInsertionEffect:Yn,useMemo:Yn,useReducer:Yn,useRef:Yn,useState:Yn,useDebugValue:Yn,useDeferredValue:Yn,useTransition:Yn,useSyncExternalStore:Yn,useId:Yn,useHostTransitionStatus:Yn,useFormState:Yn,useActionState:Yn,useOptimistic:Yn,useMemoCache:Yn,useCacheRefresh:Yn};Vp.useEffectEvent=Yn;var S7={readContext:bs,use:G0,useCallback:function(l,h){return Bo().memoizedState=[l,h===void 0?null:h],l},useContext:bs,useEffect:c7,useImperativeHandle:function(l,h,g){g=g!=null?g.concat([l]):null,K0(4194308,4,f7.bind(null,h,l),g)},useLayoutEffect:function(l,h){return K0(4194308,4,l,h)},useInsertionEffect:function(l,h){K0(4,2,l,h)},useMemo:function(l,h){var g=Bo();h=h===void 0?null:h;var j=l();if(tf){Jt(!0);try{l()}finally{Jt(!1)}}return g.memoizedState=[j,h],j},useReducer:function(l,h,g){var j=Bo();if(g!==void 0){var R=g(h);if(tf){Jt(!0);try{g(h)}finally{Jt(!1)}}}else R=h;return j.memoizedState=j.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},j.queue=l,l=l.dispatch=yW.bind(null,pr,l),[j.memoizedState,l]},useRef:function(l){var h=Bo();return l={current:l},h.memoizedState=l},useState:function(l){l=rw(l);var h=l.queue,g=w7.bind(null,pr,h);return h.dispatch=g,[l.memoizedState,g]},useDebugValue:ow,useDeferredValue:function(l,h){var g=Bo();return aw(g,l,h)},useTransition:function(){var l=rw(!1);return l=g7.bind(null,pr,l.queue,!0,!1),Bo().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,h,g){var j=pr,R=Bo();if(Er){if(g===void 0)throw Error(n(407));g=g()}else{if(g=h(),mn===null)throw Error(n(349));(Mr&127)!==0||WC(j,h,g)}R.memoizedState=g;var O={value:g,getSnapshot:h};return R.queue=O,c7(VC.bind(null,j,O,l),[l]),j.flags|=2048,Hd(9,{destroy:void 0},KC.bind(null,j,O,g,h),null),g},useId:function(){var l=Bo(),h=mn.identifierPrefix;if(Er){var g=fi,j=za;g=(j&~(1<<32-Tt(j)-1)).toString(32)+g,h="_"+h+"R_"+g,g=q0++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof j.is=="string"?X.createElement("select",{is:j.is}):X.createElement("select"),j.multiple?O.multiple=!0:j.size&&(O.size=j.size);break;default:O=typeof j.is=="string"?X.createElement(R,{is:j.is}):X.createElement(R)}}O[cn]=h,O[Dt]=j;e:for(X=h.child;X!==null;){if(X.tag===5||X.tag===6)O.appendChild(X.stateNode);else if(X.tag!==4&&X.tag!==27&&X.child!==null){X.child.return=X,X=X.child;continue}if(X===h)break e;for(;X.sibling===null;){if(X.return===null||X.return===h)break e;X=X.return}X.sibling.return=X.return,X=X.sibling}h.stateNode=O;e:switch(lo(O,R,j),R){case"button":case"input":case"select":case"textarea":j=!!j.autoFocus;break e;case"img":j=!0;break e;default:j=!1}j&&Cl(h)}}return zn(h),kw(h,h.type,l===null?null:l.memoizedProps,h.pendingProps,g),null;case 6:if(l&&h.stateNode!=null)l.memoizedProps!==j&&Cl(h);else{if(typeof j!="string"&&h.stateNode===null)throw Error(n(166));if(l=ce.current,bt(h)){if(l=h.stateNode,g=h.memoizedProps,j=null,R=gs,R!==null)switch(R.tag){case 27:case 5:j=R.memoizedProps}l[cn]=h,l=!!(l.nodeValue===g||j!==null&&j.suppressHydrationWarning===!0||Uz(l.nodeValue,g)),l||ke(h,!0)}else l=pv(l).createTextNode(j),l[cn]=h,h.stateNode=l}return zn(h),null;case 31:if(g=h.memoizedState,l===null||l.memoizedState!==null){if(j=bt(h),g!==null){if(l===null){if(!j)throw Error(n(318));if(l=h.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(n(557));l[cn]=h}else ht(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;zn(h),l=!1}else g=kr(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return h.flags&256?(Aa(h),h):(Aa(h),null);if((h.flags&128)!==0)throw Error(n(558))}return zn(h),null;case 13:if(j=h.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=bt(h),j!==null&&j.dehydrated!==null){if(l===null){if(!R)throw Error(n(318));if(R=h.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(n(317));R[cn]=h}else ht(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;zn(h),R=!1}else R=kr(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return h.flags&256?(Aa(h),h):(Aa(h),null)}return Aa(h),(h.flags&128)!==0?(h.lanes=g,h):(g=j!==null,l=l!==null&&l.memoizedState!==null,g&&(j=h.child,R=null,j.alternate!==null&&j.alternate.memoizedState!==null&&j.alternate.memoizedState.cachePool!==null&&(R=j.alternate.memoizedState.cachePool.pool),O=null,j.memoizedState!==null&&j.memoizedState.cachePool!==null&&(O=j.memoizedState.cachePool.pool),O!==R&&(j.flags|=2048)),g!==l&&g&&(h.child.flags|=8192),ev(h,h.updateQueue),zn(h),null);case 4:return ae(),l===null&&Gw(h.stateNode.containerInfo),zn(h),null;case 10:return Pi(h.type),zn(h),null;case 19:if(q(is),j=h.memoizedState,j===null)return zn(h),null;if(R=(h.flags&128)!==0,O=j.rendering,O===null)if(R)Xp(j,!1);else{if(Zn!==0||l!==null&&(l.flags&128)!==0)for(l=h.child;l!==null;){if(O=F0(l),O!==null){for(h.flags|=128,Xp(j,!1),l=O.updateQueue,h.updateQueue=l,ev(h,l),h.subtreeFlags=0,l=g,g=h.child;g!==null;)ui(g,l),g=g.sibling;return U(is,is.current&1|2),Er&&di(h,j.treeForkCount),h.child}l=l.sibling}j.tail!==null&&ct()>ov&&(h.flags|=128,R=!0,Xp(j,!1),h.lanes=4194304)}else{if(!R)if(l=F0(O),l!==null){if(h.flags|=128,R=!0,l=l.updateQueue,h.updateQueue=l,ev(h,l),Xp(j,!0),j.tail===null&&j.tailMode==="hidden"&&!O.alternate&&!Er)return zn(h),null}else 2*ct()-j.renderingStartTime>ov&&g!==536870912&&(h.flags|=128,R=!0,Xp(j,!1),h.lanes=4194304);j.isBackwards?(O.sibling=h.child,h.child=O):(l=j.last,l!==null?l.sibling=O:h.child=O,j.last=O)}return j.tail!==null?(l=j.tail,j.rendering=l,j.tail=l.sibling,j.renderingStartTime=ct(),l.sibling=null,g=is.current,U(is,R?g&1|2:g&1),Er&&di(h,j.treeForkCount),l):(zn(h),null);case 22:case 23:return Aa(h),Wx(),j=h.memoizedState!==null,l!==null?l.memoizedState!==null!==j&&(h.flags|=8192):j&&(h.flags|=8192),j?(g&536870912)!==0&&(h.flags&128)===0&&(zn(h),h.subtreeFlags&6&&(h.flags|=8192)):zn(h),g=h.updateQueue,g!==null&&ev(h,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),j=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(j=h.memoizedState.cachePool.pool),j!==g&&(h.flags|=2048),l!==null&&q(yc),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),h.memoizedState.cache!==g&&(h.flags|=2048),Pi(Bn),zn(h),null;case 25:return null;case 30:return null}throw Error(n(156,h.tag))}function SW(l,h){switch(Rd(h),h.tag){case 1:return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 3:return Pi(Bn),ae(),l=h.flags,(l&65536)!==0&&(l&128)===0?(h.flags=l&-65537|128,h):null;case 26:case 27:case 5:return me(h),null;case 31:if(h.memoizedState!==null){if(Aa(h),h.alternate===null)throw Error(n(340));ht()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 13:if(Aa(h),l=h.memoizedState,l!==null&&l.dehydrated!==null){if(h.alternate===null)throw Error(n(340));ht()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 19:return q(is),null;case 4:return ae(),null;case 10:return Pi(h.type),null;case 22:case 23:return Aa(h),Wx(),l!==null&&q(yc),l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 24:return Pi(Bn),null;case 25:return null;default:return null}}function Q7(l,h){switch(Rd(h),h.tag){case 3:Pi(Bn),ae();break;case 26:case 27:case 5:me(h);break;case 4:ae();break;case 31:h.memoizedState!==null&&Aa(h);break;case 13:Aa(h);break;case 19:q(is);break;case 10:Pi(h.type);break;case 22:case 23:Aa(h),Wx(),l!==null&&q(yc);break;case 24:Pi(Bn)}}function Yp(l,h){try{var g=h.updateQueue,j=g!==null?g.lastEffect:null;if(j!==null){var R=j.next;g=R;do{if((g.tag&l)===l){j=void 0;var O=g.create,X=g.inst;j=O(),X.destroy=j}g=g.next}while(g!==R)}}catch(ne){an(h,h.return,ne)}}function Ru(l,h,g){try{var j=h.updateQueue,R=j!==null?j.lastEffect:null;if(R!==null){var O=R.next;j=O;do{if((j.tag&l)===l){var X=j.inst,ne=X.destroy;if(ne!==void 0){X.destroy=void 0,R=h;var pe=g,ze=ne;try{ze()}catch(He){an(R,pe,He)}}}j=j.next}while(j!==O)}}catch(He){an(h,h.return,He)}}function X7(l){var h=l.updateQueue;if(h!==null){var g=l.stateNode;try{BC(h,g)}catch(j){an(l,l.return,j)}}}function Y7(l,h,g){g.props=rf(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(j){an(l,h,j)}}function Zp(l,h){try{var g=l.ref;if(g!==null){switch(l.tag){case 26:case 27:case 5:var j=l.stateNode;break;case 30:j=l.stateNode;break;default:j=l.stateNode}typeof g=="function"?l.refCleanup=g(j):g.current=j}}catch(R){an(l,h,R)}}function xc(l,h){var g=l.ref,j=l.refCleanup;if(g!==null)if(typeof j=="function")try{j()}catch(R){an(l,h,R)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(R){an(l,h,R)}else g.current=null}function Z7(l){var h=l.type,g=l.memoizedProps,j=l.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":g.autoFocus&&j.focus();break e;case"img":g.src?j.src=g.src:g.srcSet&&(j.srcset=g.srcSet)}}catch(R){an(l,l.return,R)}}function jw(l,h,g){try{var j=l.stateNode;KW(j,l.type,g,h),j[Dt]=h}catch(R){an(l,l.return,R)}}function J7(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&Pu(l.type)||l.tag===4}function Sw(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||J7(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&Pu(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Cw(l,h,g){var j=l.tag;if(j===5||j===6)l=l.stateNode,h?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,h):(h=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,h.appendChild(l),g=g._reactRootContainer,g!=null||h.onclick!==null||(h.onclick=as));else if(j!==4&&(j===27&&Pu(l.type)&&(g=l.stateNode,h=null),l=l.child,l!==null))for(Cw(l,h,g),l=l.sibling;l!==null;)Cw(l,h,g),l=l.sibling}function tv(l,h,g){var j=l.tag;if(j===5||j===6)l=l.stateNode,h?g.insertBefore(l,h):g.appendChild(l);else if(j!==4&&(j===27&&Pu(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(tv(l,h,g),l=l.sibling;l!==null;)tv(l,h,g),l=l.sibling}function ez(l){var h=l.stateNode,g=l.memoizedProps;try{for(var j=l.type,R=h.attributes;R.length;)h.removeAttributeNode(R[0]);lo(h,j,g),h[cn]=l,h[Dt]=g}catch(O){an(l,l.return,O)}}var zl=!1,ks=!1,zw=!1,tz=typeof WeakSet=="function"?WeakSet:Set,Gs=null;function CW(l,h){if(l=l.containerInfo,Vw=wv,l=Vn(l),ii(l)){if("selectionStart"in l)var g={start:l.selectionStart,end:l.selectionEnd};else e:{g=(g=l.ownerDocument)&&g.defaultView||window;var j=g.getSelection&&g.getSelection();if(j&&j.rangeCount!==0){g=j.anchorNode;var R=j.anchorOffset,O=j.focusNode;j=j.focusOffset;try{g.nodeType,O.nodeType}catch{g=null;break e}var X=0,ne=-1,pe=-1,ze=0,He=0,Ue=l,Ne=null;t:for(;;){for(var $e;Ue!==g||R!==0&&Ue.nodeType!==3||(ne=X+R),Ue!==O||j!==0&&Ue.nodeType!==3||(pe=X+j),Ue.nodeType===3&&(X+=Ue.nodeValue.length),($e=Ue.firstChild)!==null;)Ne=Ue,Ue=$e;for(;;){if(Ue===l)break t;if(Ne===g&&++ze===R&&(ne=X),Ne===O&&++He===j&&(pe=X),($e=Ue.nextSibling)!==null)break;Ue=Ne,Ne=Ue.parentNode}Ue=$e}g=ne===-1||pe===-1?null:{start:ne,end:pe}}else g=null}g=g||{start:0,end:0}}else g=null;for(Qw={focusedElem:l,selectionRange:g},wv=!1,Gs=h;Gs!==null;)if(h=Gs,l=h.child,(h.subtreeFlags&1028)!==0&&l!==null)l.return=h,Gs=l;else for(;Gs!==null;){switch(h=Gs,O=h.alternate,l=h.flags,h.tag){case 0:if((l&4)!==0&&(l=h.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),lo(O,j,g),O[cn]=l,xr(O),j=O;break e;case"link":var X=i8("link","href",R).get(j+(g.href||""));if(X){for(var ne=0;nehn&&(X=hn,hn=Xt,Xt=X);var je=vl(ne,Xt),ge=vl(ne,hn);if(je&&ge&&($e.rangeCount!==1||$e.anchorNode!==je.node||$e.anchorOffset!==je.offset||$e.focusNode!==ge.node||$e.focusOffset!==ge.offset)){var Ce=Ue.createRange();Ce.setStart(je.node,je.offset),$e.removeAllRanges(),Xt>hn?($e.addRange(Ce),$e.extend(ge.node,ge.offset)):(Ce.setEnd(ge.node,ge.offset),$e.addRange(Ce))}}}}for(Ue=[],$e=ne;$e=$e.parentNode;)$e.nodeType===1&&Ue.push({element:$e,left:$e.scrollLeft,top:$e.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;neg?32:g,K.T=null,g=Ow,Ow=null;var O=Du,X=Rl;if(Ms=0,Kd=Du=null,Rl=0,(Kr&6)!==0)throw Error(n(331));var ne=Kr;if(Kr|=4,fz(O.current),lz(O,O.current,X,g),Kr=ne,sm(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot=="function")try{Pe.onPostCommitFiberRoot(At,O)}catch{}return!0}finally{J.p=R,K.T=j,Az(l,h)}}function Rz(l,h,g){h=Io(g,h),h=dw(l.stateNode,h,2),l=Nu(l,h,2),l!==null&&($r(l,2),wc(l))}function an(l,h,g){if(l.tag===3)Rz(l,l,g);else for(;h!==null;){if(h.tag===3){Rz(h,l,g);break}else if(h.tag===1){var j=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof j.componentDidCatch=="function"&&($u===null||!$u.has(j))){l=Io(g,l),g=M7(2),j=Nu(h,g,2),j!==null&&(O7(g,j,h,l),$r(j,2),wc(j));break}}h=h.return}}function Iw(l,h,g){var j=l.pingCache;if(j===null){j=l.pingCache=new NW;var R=new Set;j.set(h,R)}else R=j.get(h),R===void 0&&(R=new Set,j.set(h,R));R.has(g)||(Aw=!0,R.add(g),l=OW.bind(null,l,h,g),h.then(l,l))}function OW(l,h,g){var j=l.pingCache;j!==null&&j.delete(h),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,mn===l&&(Mr&g)===g&&(Zn===4||Zn===3&&(Mr&62914560)===Mr&&300>ct()-sv?(Kr&2)===0&&Vd(l,0):Tw|=g,Wd===Mr&&(Wd=0)),wc(l)}function Mz(l,h){h===0&&(h=dr()),l=Te(l,h),l!==null&&($r(l,h),wc(l))}function $W(l){var h=l.memoizedState,g=0;h!==null&&(g=h.retryLane),Mz(l,g)}function DW(l,h){var g=0;switch(l.tag){case 31:case 13:var j=l.stateNode,R=l.memoizedState;R!==null&&(g=R.retryLane);break;case 19:j=l.stateNode;break;case 22:j=l.stateNode._retryCache;break;default:throw Error(n(314))}j!==null&&j.delete(h),Mz(l,g)}function LW(l,h){return Vt(l,h)}var _v=null,Xd=null,Pw=!1,fv=!1,Bw=!1,Iu=0;function wc(l){l!==Xd&&l.next===null&&(Xd===null?_v=Xd=l:Xd=Xd.next=l),fv=!0,Pw||(Pw=!0,PW())}function sm(l,h){if(!Bw&&fv){Bw=!0;do for(var g=!1,j=_v;j!==null;){if(l!==0){var R=j.pendingLanes;if(R===0)var O=0;else{var X=j.suspendedLanes,ne=j.pingedLanes;O=(1<<31-Tt(42|l)+1)-1,O&=R&~(X&~ne),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,Lz(j,O))}else O=Mr,O=en(j,j===mn?O:0,j.cancelPendingCommit!==null||j.timeoutHandle!==-1),(O&3)===0||gr(j,O)||(g=!0,Lz(j,O));j=j.next}while(g);Bw=!1}}function IW(){Oz()}function Oz(){fv=Pw=!1;var l=0;Iu!==0&&QW()&&(l=Iu);for(var h=ct(),g=null,j=_v;j!==null;){var R=j.next,O=$z(j,h);O===0?(j.next=null,g===null?_v=R:g.next=R,R===null&&(Xd=g)):(g=j,(l!==0||(O&3)!==0)&&(fv=!0)),j=R}Ms!==0&&Ms!==5||sm(l),Iu!==0&&(Iu=0)}function $z(l,h){for(var g=l.suspendedLanes,j=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0ne)break;var He=pe.transferSize,Ue=pe.initiatorType;He&&Gz(Ue)&&(pe=pe.responseEnd,X+=He*(pe"u"?null:document;function n8(l,h,g){var j=Yd;if(j&&typeof h=="string"&&h){var R=Kn(h);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),r8.has(R)||(r8.add(R),l={rel:l,crossOrigin:g,href:h},j.querySelector(R)===null&&(h=j.createElement("link"),lo(h,"link",l),xr(h),j.head.appendChild(h)))}}function sK(l){Ml.D(l),n8("dns-prefetch",l,null)}function oK(l,h){Ml.C(l,h),n8("preconnect",l,h)}function aK(l,h,g){Ml.L(l,h,g);var j=Yd;if(j&&l&&h){var R='link[rel="preload"][as="'+Kn(h)+'"]';h==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+Kn(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+Kn(g.imageSizes)+'"]')):R+='[href="'+Kn(l)+'"]';var O=R;switch(h){case"style":O=Zd(l);break;case"script":O=Jd(l)}gi.has(O)||(l=_({rel:"preload",href:h==="image"&&g&&g.imageSrcSet?void 0:l,as:h},g),gi.set(O,l),j.querySelector(R)!==null||h==="style"&&j.querySelector(cm(O))||h==="script"&&j.querySelector(lm(O))||(h=j.createElement("link"),lo(h,"link",l),xr(h),j.head.appendChild(h)))}}function iK(l,h){Ml.m(l,h);var g=Yd;if(g&&l){var j=h&&typeof h.as=="string"?h.as:"script",R='link[rel="modulepreload"][as="'+Kn(j)+'"][href="'+Kn(l)+'"]',O=R;switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Jd(l)}if(!gi.has(O)&&(l=_({rel:"modulepreload",href:l},h),gi.set(O,l),g.querySelector(R)===null)){switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(lm(O)))return}j=g.createElement("link"),lo(j,"link",l),xr(j),g.head.appendChild(j)}}}function cK(l,h,g){Ml.S(l,h,g);var j=Yd;if(j&&l){var R=zr(j).hoistableStyles,O=Zd(l);h=h||"default";var X=R.get(O);if(!X){var ne={loading:0,preload:null};if(X=j.querySelector(cm(O)))ne.loading=5;else{l=_({rel:"stylesheet",href:l,"data-precedence":h},g),(g=gi.get(O))&&r2(l,g);var pe=X=j.createElement("link");xr(pe),lo(pe,"link",l),pe._p=new Promise(function(ze,He){pe.onload=ze,pe.onerror=He}),pe.addEventListener("load",function(){ne.loading|=1}),pe.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,gv(X,h,j)}X={type:"stylesheet",instance:X,count:1,state:ne},R.set(O,X)}}}function lK(l,h){Ml.X(l,h);var g=Yd;if(g&&l){var j=zr(g).hoistableScripts,R=Jd(l),O=j.get(R);O||(O=g.querySelector(lm(R)),O||(l=_({src:l,async:!0},h),(h=gi.get(R))&&n2(l,h),O=g.createElement("script"),xr(O),lo(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},j.set(R,O))}}function uK(l,h){Ml.M(l,h);var g=Yd;if(g&&l){var j=zr(g).hoistableScripts,R=Jd(l),O=j.get(R);O||(O=g.querySelector(lm(R)),O||(l=_({src:l,async:!0,type:"module"},h),(h=gi.get(R))&&n2(l,h),O=g.createElement("script"),xr(O),lo(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},j.set(R,O))}}function s8(l,h,g,j){var R=(R=ce.current)?mv(R):null;if(!R)throw Error(n(446));switch(l){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(h=Zd(g.href),g=zr(R).hoistableStyles,j=g.get(h),j||(j={type:"style",instance:null,count:0,state:null},g.set(h,j)),j):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){l=Zd(g.href);var O=zr(R).hoistableStyles,X=O.get(l);if(X||(R=R.ownerDocument||R,X={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(l,X),(O=R.querySelector(cm(l)))&&!O._p&&(X.instance=O,X.state.loading=5),gi.has(l)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},gi.set(l,g),O||_K(R,l,g,X.state))),h&&j===null)throw Error(n(528,""));return X}if(h&&j!==null)throw Error(n(529,""));return null;case"script":return h=g.async,g=g.src,typeof g=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=Jd(g),g=zr(R).hoistableScripts,j=g.get(h),j||(j={type:"script",instance:null,count:0,state:null},g.set(h,j)),j):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,l))}}function Zd(l){return'href="'+Kn(l)+'"'}function cm(l){return'link[rel="stylesheet"]['+l+"]"}function o8(l){return _({},l,{"data-precedence":l.precedence,precedence:null})}function _K(l,h,g,j){l.querySelector('link[rel="preload"][as="style"]['+h+"]")?j.loading=1:(h=l.createElement("link"),j.preload=h,h.addEventListener("load",function(){return j.loading|=1}),h.addEventListener("error",function(){return j.loading|=2}),lo(h,"link",g),xr(h),l.head.appendChild(h))}function Jd(l){return'[src="'+Kn(l)+'"]'}function lm(l){return"script[async]"+l}function a8(l,h,g){if(h.count++,h.instance===null)switch(h.type){case"style":var j=l.querySelector('style[data-href~="'+Kn(g.href)+'"]');if(j)return h.instance=j,xr(j),j;var R=_({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return j=(l.ownerDocument||l).createElement("style"),xr(j),lo(j,"style",R),gv(j,g.precedence,l),h.instance=j;case"stylesheet":R=Zd(g.href);var O=l.querySelector(cm(R));if(O)return h.state.loading|=4,h.instance=O,xr(O),O;j=o8(g),(R=gi.get(R))&&r2(j,R),O=(l.ownerDocument||l).createElement("link"),xr(O);var X=O;return X._p=new Promise(function(ne,pe){X.onload=ne,X.onerror=pe}),lo(O,"link",j),h.state.loading|=4,gv(O,g.precedence,l),h.instance=O;case"script":return O=Jd(g.src),(R=l.querySelector(lm(O)))?(h.instance=R,xr(R),R):(j=g,(R=gi.get(O))&&(j=_({},g),n2(j,R)),l=l.ownerDocument||l,R=l.createElement("script"),xr(R),lo(R,"link",j),l.head.appendChild(R),h.instance=R);case"void":return null;default:throw Error(n(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(j=h.instance,h.state.loading|=4,gv(j,g.precedence,l));return h.instance}function gv(l,h,g){for(var j=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=j.length?j[j.length-1]:null,O=R,X=0;X title"):null)}function fK(l,h,g){if(g===1||h.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return l=h.disabled,typeof h.precedence=="string"&&l==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function l8(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function dK(l,h,g,j){if(g.type==="stylesheet"&&(typeof j.media!="string"||matchMedia(j.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var R=Zd(j.href),O=h.querySelector(cm(R));if(O){h=O._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(l.count++,l=bv.bind(l),h.then(l,l)),g.state.loading|=4,g.instance=O,xr(O);return}O=h.ownerDocument||h,j=o8(j),(R=gi.get(R))&&r2(j,R),O=O.createElement("link"),xr(O);var X=O;X._p=new Promise(function(ne,pe){X.onload=ne,X.onerror=pe}),lo(O,"link",j),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,h),(h=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=bv.bind(l),h.addEventListener("load",g),h.addEventListener("error",g))}}var s2=0;function hK(l,h){return l.stylesheets&&l.count===0&&xv(l,l.stylesheets),0s2?50:800)+h);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(j),clearTimeout(R)}}:null}function bv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xv(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var yv=null;function xv(l,h){l.stylesheets=null,l.unsuspend!==null&&(l.count++,yv=new Map,h.forEach(pK,l),yv=null,bv.call(l))}function pK(l,h){if(!(h.state.loading&4)){var g=yv.get(l);if(g)var j=g.get(null);else{g=new Map,yv.set(l,g);for(var R=l.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),h2.exports=gV(),h2.exports}var bV=vV();const yV=!1;var C$=T.useLayoutEffect;function xV(e,r,t){T.useEffect(()=>{if(!e.current||t||typeof IntersectionObserver!="function")return()=>r();const n=new IntersectionObserver(s=>{r(s.pop())},{rootMargin:"100px"});return n.observe(e.current),()=>{n.disconnect(),r()}},[r,t,e])}function wV(e){const r=T.useRef(null);return T.useImperativeHandle(e,()=>r.current,[]),r}function og(e){return e[e.length-1]}function tp(e,r){return typeof e=="function"?e(r):e}const z$=Object.prototype.hasOwnProperty,kV=Object.prototype.propertyIsEnumerable;function E$(e){for(const r in e)if(z$.call(e,r))return!0;return!1}const jV=()=>Object.create(null),of=(e,r)=>bf(e,r,jV);function bf(e,r,t=()=>({}),n=0){if(e===r)return e;if(n>500)return r;const s=r,o=V8(e)&&V8(s);if(!o&&!(nb(e)&&nb(s)))return s;const a=o?e:W8(e);if(!a)return s;const i=o?s:W8(s);if(!i)return s;const c=a.length,u=i.length,d=o?new Array(u):t();let _=0;for(let p=0;p"u")return!0;const t=r.prototype;return!(!K8(t)||!t.hasOwnProperty("isPrototypeOf"))}function K8(e){return Object.prototype.toString.call(e)==="[object Object]"}function V8(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function m_(e,r,t){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let n=0,s=e.length;ns||!m_(e[a],r[a],t)))return!1;return s===o}return!1}const SV=/[\x00-\x1f\x7f"<>`{}]/g;function CV(e){return e.replace(SV,r=>"%"+r.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function Q8(e){let r;try{r=decodeURI(e)}catch{r=e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}return CV(r)}const zV=["http:","https:","mailto:","tel:"];function sb(e,r){if(!e)return!1;try{const t=new URL(e);return!r.has(t.protocol)}catch{return!1}}function gm(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const r=/%25|%5C/gi;let t=0,n="",s;for(;(s=r.exec(e))!==null;)n+=Q8(e.slice(t,s.index))+s[0],t=r.lastIndex;n=n+Q8(t?e.slice(t):e);let o=!1;return n.startsWith("//")&&(o=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:o}}function EV(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function NV(e,r){if(e===r)return!0;if(e.length!==r.length)return!1;for(let t=0;t{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,n&&(n.next=o,o.prev=n)):(o.next.prev=void 0,t=o.next,o.next=void 0,n&&(o.prev=n,n.next=o)),n=o)};return{get(o){const a=r.get(o);if(a)return s(a),a.value},set(o,a){if(r.size>=e&&t){const c=t;r.delete(c.key),c.next&&(t=c.next,c.next.prev=void 0),c===n&&(n=void 0)}const i=r.get(o);if(i)i.value=a,s(i);else{const c={key:o,value:a,prev:n};n&&(n.next=c),n=c,t||(t=c),r.set(o,c)}},clear(){r.clear(),t=void 0,n=void 0}}}const f_=4,N$=5;function A$(e,r,t=new Uint16Array(6)){const n=e.indexOf("/",r),s=n===-1?e.length:n,o=e.substring(r,s);if(!o||!o.includes("$"))return t[0]=0,t[1]=r,t[2]=r,t[3]=s,t[4]=s,t[5]=s,t;if(o==="$"){const c=e.length;return t[0]=2,t[1]=r,t[2]=r,t[3]=c,t[4]=c,t[5]=c,t}if(o.charCodeAt(0)===36)return t[0]=1,t[1]=r,t[2]=r+1,t[3]=s,t[4]=s,t[5]=s,t;const a=o.indexOf("{");let i;if(a!==-1&&a+1!D.parse&&D.caseSensitive===E&&D.prefix===N&&D.suffix===A));if($)w=$;else{const D=AV(z,_,E,N,A);w=D,D.parent=s,D.depth=o;let I;z===1?I=s.dynamic??(s.dynamic=[]):z===3?I=s.optional??(s.optional=[]):I=s.wildcard??(s.wildcard=[]),I.push(D),I.length===2&&(a==null||a.push(I))}break}}s=w}if(x&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=kh(_);b.kind=N$,b.parent=s,o++,b.depth=o,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&_.endsWith("/")){const b=kh(_);b.kind=f_,b.parent=s,o++,b.depth=o,s.index=b,s=b}s.parse=x??null,s.priority=((d=p==null?void 0:p.params)==null?void 0:d.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=_)}if(t.children)for(const _ of t.children)dy(e,r,_,c,s,o,a,i)}function T$(e,r){if(e.parse&&!r.parse)return-1;if(!e.parse&&r.parse)return 1;if(e.parse&&r.parse&&(e.priority||r.priority))return r.priority-e.priority;if(e.prefix&&r.prefix&&e.prefix!==r.prefix){if(e.prefix.startsWith(r.prefix))return-1;if(r.prefix.startsWith(e.prefix))return 1}if(e.suffix&&r.suffix&&e.suffix!==r.suffix){if(e.suffix.endsWith(r.suffix))return-1;if(r.suffix.endsWith(e.suffix))return 1}return e.prefix&&!r.prefix?-1:!e.prefix&&r.prefix?1:e.suffix&&!r.suffix?-1:!e.suffix&&r.suffix?1:e.caseSensitive&&!r.caseSensitive?-1:!e.caseSensitive&&r.caseSensitive?1:0}function kh(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function AV(e,r,t,n,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:r,parent:null,parse:null,priority:0,caseSensitive:t,prefix:n,suffix:s}}function TV(e,r){const t=kh("/"),n=new Uint16Array(6),s=[];for(const o of e)dy(!1,n,o,1,t,0,s);for(const o of s)o.sort(T$);r.masksTree=t,r.flatCache=ob(1e3)}function RV(e,r){e||(e="/");const t=r.flatCache.get(e);if(t!==void 0)return t;const n=kj(e,r.masksTree);return r.flatCache.set(e,n),n}function MV(e,r,t,n,s){e||(e="/"),n||(n="/");const o=r?`case\0${e}`:e;let a=s.singleCache.get(o);return a||(a=kh("/"),dy(r,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(o,a)),kj(n,a,t)}function OV(e,r,t=!1){const n=t?e:`nofuzz\0${e}`,s=r.matchCache.get(n);if(s!==void 0)return s;e||(e="/");let o;try{o=kj(e,r.segmentTree,t)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=M$(o.route)),r.matchCache.set(n,o),o}function $V(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function DV(e,r=!1,t){const n=kh(e.fullPath),s=new Uint16Array(6),o=[],a={},i={};let c=0;dy(r,s,e,1,n,0,o,u=>{if(t==null||t(u,c),u.id in a&&wj(),a[u.id]=u,c!==0&&u.path){const d=$V(u.fullPath);(!i[d]||u.fullPath.endsWith("/"))&&(i[d]=u)}c++});for(const u of o)u.sort(T$);return{processedTree:{segmentTree:n,singleCache:ob(1e3),matchCache:ob(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:i}}function kj(e,r,t=!1){const n=e.split("/"),s=IV(e,n,r,t);if(!s)return null;const[o]=R$(e,n,s);return{route:s.node.route,rawParams:o}}function R$(e,r,t){var d,_,p,m;const n=LV(t.node);let s=null;const o=Object.create(null);let a=((d=t.extract)==null?void 0:d.part)??0,i=((_=t.extract)==null?void 0:_.node)??0,c=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;i=0;N--){const A=_.wildcard[N],{prefix:E,suffix:M}=A;if(!(E&&(y||!(A.caseSensitive?S:z??(z=S.toLowerCase())).startsWith(E)))){if(M){if(y)continue;const $=r.slice(p).join("/"),D=$.slice(-M.length);if((A.caseSensitive?D:D.toLowerCase())!==M||$.length-M.length=0;A--){const E=_.optional[A];i.push({node:E,index:p,skipped:N,statics:k,dynamics:x,optionals:v,extract:b,rawParams:w})}if(!y)for(let A=_.optional.length-1;A>=0;A--){const E=_.optional[A],{prefix:M,suffix:$}=E;if(M||$){const D=E.caseSensitive?S:z??(z=S.toLowerCase());if(M&&!D.startsWith(M)||$&&D.indexOf($,D.length-$.length)=0;N--){const A=_.dynamic[N],{prefix:E,suffix:M}=A;if(E||M){const $=A.caseSensitive?S:z??(z=S.toLowerCase());if(E&&!$.startsWith(E)||M&&$.indexOf(M,$.length-M.length)=0;N--){const A=_.pathless[N];i.push({node:A,index:p,skipped:m,statics:k,dynamics:x,optionals:v,extract:b,rawParams:w})}}if(u)return u;if(n&&c){let d=c.index;for(let p=0;pe.statics||r.statics===e.statics&&(r.dynamics>e.dynamics||r.dynamics===e.dynamics&&(r.optionals>e.optionals||r.optionals===e.optionals&&((r.node.kind===f_)>(e.node.kind===f_)||r.node.kind===f_==(e.node.kind===f_)&&r.node.depth>e.node.depth))):!0}function E1(e){return N1(e.filter(r=>r!==void 0).join("/"))}function N1(e){return e.replace(/\/{2,}/g,"/")}function O$(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Kl(e){const r=e.length;return r>1&&e[r-1]==="/"?e.replace(/\/{1,}$/,""):e}function $$(e){return Kl(O$(e))}function ab(e,r){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${r}/`?e.slice(0,-1):e}function BV(e,r,t){return ab(e,t)===ab(r,t)}function FV({base:e,to:r,trailingSlash:t="never",cache:n}){if(r.includes("//")&&(r=N1(r)),r.startsWith("/"))return r.length===1||t==="preserve"?r:t==="always"?r.endsWith("/")?r:`${r}/`:r.endsWith("/")?r.slice(0,-1):r;const s=r===".";let o;if(n){o=s?e:e+"\0"+r;const u=n.get(o);if(u)return u}let a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=N1(e)),a=e.split("/");a.length>1&&og(a)==="";)a.pop();const u=r.split("/");for(let d=0,_=u.length;d<_;d++){const p=u[d];p===""?d?d===_-1&&a.push(p):a=[p]:p===".."?a.length>1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(og(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const i=a.join("/"),c=(s?N1(i):i)||"/";return o&&n&&n.set(o,c),c}function HV(e){const r=new Map(e.map(s=>[encodeURIComponent(s),s])),t=Array.from(r.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(t,"g");return s=>s.replace(n,o=>r.get(o)??o)}function v2(e,r,t){const n=r[e];return typeof n!="string"?n:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(s=>Z8(s,t)).join("/"):Z8(n,t)}function Y8({path:e,params:r,decoder:t,...n}){let s=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:s};const a=e.length;let i=0,c,u="";for(;ie.state.__TSR_key||e.href;function QV(e){const r=e.getAttribute(J8);if(r)return`[${J8}="${r}"]`;let t="",n=e,s;for(;s=n.parentNode;){let o=1,a=n;for(;a=a.previousElementSibling;)o++;const i=`${n.localName}:nth-child(${o})`;t=t?`${i} > ${t}`:i,n=s}return t}let Rv=!1;const A1="window";function D4(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function e9(e){const r=new Set;for(const t of e){if(t===A1)continue;const n=D4(t);n&&r.add(n)}return r}function XV(e,r){const t=e.options.scrollRestoration,n=e._scroll;t&&(n.restoring=!0);const s=e.options.getScrollRestorationKey||VV,o=new Set,a=i=>{const c=Zu[i]||(Zu[i]={});for(const u of o)u===document?c[A1]={scrollX,scrollY}:u.isConnected&&(c[QV(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!n.restoration&&(n.restoration=!0,Rv=!1,history.scrollRestoration="manual",document.addEventListener("scroll",i=>{Rv||o.add(i.target)},!0),e.subscribe("onBeforeLoad",i=>{i.fromLocation&&a(s(i.fromLocation)),o.clear()}),addEventListener("pagehide",()=>{a(s(e.stores.resolvedLocation.get()??e.stores.location.get())),KV()})),!n.reset&&(n.reset=!0,e.subscribe("onRendered",i=>{var x;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,d=n.next,_=n.hash;let p;if(o.clear(),n.next=!0,n.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=s(i.toLocation),k=i.fromLocation&&s(i.fromLocation);if(n.restoring&&k&&k!==m){const v=Zu[k];if(v){let b=Zu[m];for(const w in v){if(w===A1){if(d)continue}else{const y=D4(w);if(!y||d&&u&&(p??(p=e9(u)),p.has(y)))continue}b||(b=Zu[m]={}),b[w]??(b[w]=v[w])}}}Rv=!0;try{const v=i.toLocation.hash,b=i.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(d){!v&&u&&(p??(p=e9(u)));const y=v&&b&&_,S=n.restoring?Zu[m]:void 0;if(S)for(const z in S){const{scrollX:N,scrollY:A}=S[z];if(z===A1){if(y)continue;scrollTo({top:A,left:N,behavior:c}),w=!0}else{const E=D4(z);E&&(E.scrollLeft=N,E.scrollTop=A,p==null||p.delete(E))}}if(!v){const z={top:0,left:0,behavior:c};if(w||scrollTo(z),p)for(const N of p)N.scrollTo(z)}}!w&&v&&b&&((x=document.getElementById(v))==null||x.scrollIntoView(b))}finally{Rv=!1}}))}function YV(e,r=String){const t=new URLSearchParams;for(const n in e){const s=e[n];s!==void 0&&t.set(n,r(s))}return t.toString()}function b2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function ZV(e){const r=new URLSearchParams(e),t=Object.create(null);for(const[n,s]of r.entries()){const o=t[n];o==null?t[n]=b2(s):Array.isArray(o)?o.push(b2(s)):t[n]=[o,b2(s)]}return t}const JV=/^(?:\s|["[{\d-]|fa|nu|tr)/,eQ=rQ(JSON.parse),tQ=nQ(JSON.stringify,JSON.parse);function rQ(e){return r=>{r[0]==="?"&&(r=r.substring(1));const t=ZV(r);for(const n in t){const s=t[n];if(typeof s=="string")try{t[n]=e(s)}catch{}}return t}}function nQ(e,r){const t=r===JSON.parse;function n(s){if(s&&typeof s=="object")try{return e(s)}catch{}else if(r&&typeof s=="string"){if(t&&!JV.test(s))return s;try{return r(s),e(s)}catch{}}return s}return s=>{const o=YV(s,n);return o?`?${o}`:""}}const Sh="__root__";function sQ(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const r=new Headers(e.headers);e.href&&r.get("Location")===null&&r.set("Location",e.href);const t=new Response(null,{status:e.statusCode,headers:r});if(t.options=e,e.throw)throw t;return t}function D$(e){return e instanceof Response&&!!e.options}function oQ(e){return{input:({url:r})=>{for(const t of e)r=L4(t,r);return r},output:({url:r})=>{for(let t=e.length-1;t>=0;t--)r=L$(e[t],r);return r}}}function aQ(e){const r=$$(e.basepath),t=`/${r}`,n=e.caseSensitive?t:t.toLowerCase(),s=`${n}/`;return{input:({url:o})=>{const a=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===n?o.pathname="/":a.startsWith(s)&&(o.pathname=o.pathname.slice(t.length)),o},output:({url:o})=>(o.pathname=E1(["/",r,o.pathname]),o)}}function L4(e,r){var n;const t=(n=e==null?void 0:e.input)==null?void 0:n.call(e,{url:r});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return r}function L$(e,r){var n;const t=(n=e==null?void 0:e.output)==null?void 0:n.call(e,{url:r});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return r}function iQ(e,r){const{createMutableStore:t,createReadonlyStore:n,batch:s}=r,o=new Map,a=t("idle"),i=t(e),c=t(void 0),u=t([]),d=n(()=>u.get().map(x=>o.get(x).get())),_=n(()=>({status:a.get(),isLoading:a.get()==="pending",matches:d.get(),location:i.get(),resolvedLocation:c.get()}));function p(x){let v=o.get(x);return v||(v=t(void 0),o.set(x,v)),v}const m={status:a,location:i,resolvedLocation:c,ids:u,matches:d,byRoute:o,__store:_,getMatchStore:p,setMatches:k};function k(x){const v=u.get(),b=x.map(w=>w.routeId);s(()=>{NV(v,b)||u.set(b);for(const w of v)b.includes(w)||o.get(w).set(()=>{});for(const w of x){const y=p(w.routeId);y.get()!==w&&y.set(w)}})}return m}var g_="__TSR_index",t9="popstate",r9="beforeunload";function cQ(e){let r=e.getLocation();const t=new Set,n=a=>{r=e.getLocation(),t.forEach(i=>i({location:r,action:a}))},s=a=>{e.notifyOnIndexChange??!0?n(a):r=e.getLocation()},o=async({task:a,navigateOpts:i,...c})=>{var _,p;if((i==null?void 0:i.ignoreBlocker)??!1){a();return}const u=((_=e.getBlockers)==null?void 0:_.call(e))??[],d=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&d)for(const m of u){const k=ib(c.path,c.state);if(await m.blockerFn({currentLocation:r,nextLocation:k,action:c.type})){(p=e.onBlocked)==null||p.call(e);return}}a()};return{get location(){return r},get length(){return e.getLength()},subscribers:t,subscribe:a=>(t.add(a),()=>{t.delete(a)}),push:(a,i,c)=>{const u=r.state[g_];i=n9(u+1,i),o({task:()=>{e.pushState(a,i),n({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:i})},replace:(a,i,c)=>{const u=r.state[g_];i=n9(u,i),o({task:()=>{e.replaceState(a,i),n({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:i})},go:(a,i)=>{o({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:i,type:"GO"})},back:a=>{o({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>r.state[g_]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const i=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...i,a]),()=>{var d,_;const u=((d=e.getBlockers)==null?void 0:d.call(e))??[];(_=e.setBlockers)==null||_.call(e,u.filter(p=>p!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:n}}function n9(e,r){r||(r={});const t=jj();return{...r,key:t,__TSR_key:t,[g_]:e}}function lQ(e){var A,E;const r=typeof document<"u"?window:void 0,t=r.history.pushState,n=r.history.replaceState;let s=[];const o=()=>s,a=M=>s=M,i=(M=>M),c=(()=>ib(`${r.location.pathname}${r.location.search}${r.location.hash}`,r.history.state));if(!((A=r.history.state)!=null&&A.__TSR_key)&&!((E=r.history.state)!=null&&E.key)){const M=jj();r.history.replaceState({[g_]:0,key:M,__TSR_key:M},"")}let u=c(),d,_=!1,p=!1,m=!1,k=!1;const x=()=>u;let v;const b=()=>{v&&(N._ignoreSubscribers=!0,(v[2]?r.history.pushState:r.history.replaceState)(v[1],"",v[0]),N._ignoreSubscribers=!1,v=void 0,d=void 0)},w=(M,$,D)=>{const I=i($),G=!!v;G||(d=u),u=ib($,D),v=[I,D,(v==null?void 0:v[2])||M],G||queueMicrotask(()=>b())},y=M=>{u=c(),N.notify({type:M})},S=async()=>{if(p){p=!1;return}const M=c(),$=M.state[g_]-u.state[g_],D=$===1,I=$===-1,G=!D&&!I||_;_=!1;const H=G?"GO":I?"BACK":"FORWARD",Q=G?{type:"GO",index:$}:{type:I?"BACK":"FORWARD"};if(m)m=!1;else{const K=o();if(typeof document<"u"&&K.length){for(const J of K)if(await J.blockerFn({currentLocation:u,nextLocation:M,action:H})){p=!0,r.history.go(1),N.notify(Q);return}}}u=c(),N.notify(Q)},z=M=>{if(k){k=!1;return}let $=!1;const D=o();if(typeof document<"u"&&D.length)for(const I of D){const G=I.enableBeforeUnload??!0;if(G===!0){$=!0;break}if(typeof G=="function"&&G()===!0){$=!0;break}}if($)return M.preventDefault(),M.returnValue=""},N=cQ({getLocation:x,getLength:()=>r.history.length,pushState:(M,$)=>w(!0,M,$),replaceState:(M,$)=>w(!1,M,$),back:M=>(M&&(m=!0),k=!0,r.history.back()),forward:M=>{M&&(m=!0),k=!0,r.history.forward()},go:M=>{_=!0,r.history.go(M)},createHref:M=>i(M),flush:b,destroy:()=>{r.history.pushState=t,r.history.replaceState=n,r.removeEventListener(r9,z,{capture:!0}),r.removeEventListener(t9,S)},onBlocked:()=>{d&&u!==d&&(u=d)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return r.addEventListener(r9,z,{capture:!0}),r.addEventListener(t9,S),r.history.pushState=function(...M){const $=t.apply(r.history,M);return N._ignoreSubscribers||y("PUSH"),$},r.history.replaceState=function(...M){const $=n.apply(r.history,M);return N._ignoreSubscribers||y("REPLACE"),$},N}function uQ(e){let r=e.replace(/[\x00-\x1f\x7f]/g,"");return r.startsWith("//")&&(r="/"+r.replace(/^\/+/,"")),r}function ib(e,r){const t=uQ(e),n=t.indexOf("#"),s=t.indexOf("?"),o=jj();return{href:t,pathname:t.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:t.length),hash:n>-1?t.substring(n):"",search:s>-1?t.slice(s,n===-1?void 0:n):"",state:r||{[g_]:0,key:o,__TSR_key:o}}}function jj(){return(Math.random()+1).toString(36).substring(7)}function s9(e){var r,t;return e.options.loader||e.options.beforeLoad||e.lazyFn||((r=e.options.component)==null?void 0:r.preload)||((t=e.options.pendingComponent)==null?void 0:t.preload)}function hy(e,r){return{fromLocation:r,toLocation:e,pathChanged:(r==null?void 0:r.pathname)!==e.pathname,hrefChanged:(r==null?void 0:r.href)!==e.href,hashChanged:(r==null?void 0:r.hash)!==e.hash}}function o9({key:e,__TSR_key:r,__TSR_index:t,__hashScrollIntoViewOptions:n,...s}){return s}function _Q(e,r,t,n){var s,o,a,i;for(const c of r){if(n&&e._tx!==n)return;t.some(u=>u.routeId===c.routeId)||(o=(s=e.routesById[c.routeId].options).onLeave)==null||o.call(s,c)}for(const c of t){if(n&&e._tx!==n)return;(i=(a=e.routesById[c.routeId].options)[r.some(u=>u.routeId===c.routeId)?"onStay":"onEnter"])==null||i.call(a,c)}}var fQ=class{constructor(e,r){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async t=>(t(),!1),this.update=t=>{const n=this.options,s=this.basepath??(n==null?void 0:n.basepath)??"/",o=this.basepath===void 0,a=n==null?void 0:n.rewrite;if(this.options={...n,...t},this.isServer=this.options.isServer??yV??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=HV(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=lQ()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let u;this.resolvePathCache=ob(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=iQ(this.latestLocation,u),XV(this)}const i=this.options.basepath??"/",c=this.options.rewrite;if(o||s!==i||a!==c){this.basepath=i;const u=[],d=$$(i);d&&d!=="/"&&u.push(aQ({basepath:i})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:oQ(u),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const t=DV(this.routeTree,this.options.caseSensitive,(n,s)=>{n.init({originalIndex:s})});return this.options.routeMasks&&TV(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,n)=>{const s={eventType:t,fn:n};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{for(const n of this.subscribers)if(n.eventType===t.type)try{n.fn(t)}catch(s){console.error(s)}},this.parseLocation=(t,n)=>{const s=({pathname:c,search:u,hash:d,href:_,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const b=this.options.parseSearch(u),w=this.options.stringifySearch(b);return{href:c+w+d,publicHref:c+w+d,pathname:gm(c).path,external:!1,searchStr:w,search:of(n==null?void 0:n.search,b),hash:gm(d.slice(1)).path,state:bf(n==null?void 0:n.state,p)}}const m=new URL(_,this.origin),k=L4(this.rewrite,m),x=this.options.parseSearch(k.search),v=this.options.stringifySearch(x);return k.search=v,{href:k.href.replace(k.origin,""),publicHref:_,pathname:gm(k.pathname).path,external:!!this.rewrite&&k.origin!==this.origin,searchStr:v,search:of(n==null?void 0:n.search,x),hash:gm(k.hash.slice(1)).path,state:bf(n==null?void 0:n.state,p)}},o=s(t),{__tempLocation:a,__tempKey:i}=o.state;if(a&&(!i||i===this.tempLocationKey)){const c=s(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(t,n)=>FV({base:t,to:n,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,n,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:n},s):this.matchRoutesInternal(t,n),this.getMatchedRoutes=t=>{const n=Object.create(null),s=OV(Kl(t),this.processedTree,!0);return s&&Object.assign(n,s.rawParams),[(s==null?void 0:s.branch)||[this.routesById.__root__],n,s==null?void 0:s.route]},this.buildLocation=t=>{const n=(o={})=>{var M,$;if(o.href){const D=ib(o.href,{});o={...o,to:L4(this.rewrite,new URL(D.pathname,this.origin)).pathname,search:this.options.parseSearch(D.search),hash:D.hash.slice(1)}}const a=o._fromLocation||this._pendingLocation||this.latestLocation,i=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??i[1],u=i[2],d=i[3],_=this.resolvePathWithBase(c,o.to?`${o.to}`:".");let p=a9(o.params,d);const m=this.routesByPath[Kl(_)];let k;if(m)k=this.getRouteBranch(m);else if(_.includes("$"))k=[];else{const[D,I,G]=this.getMatchedRoutes(_);k=D,this.options.notFoundRoute&&(!G||G.path!=="/"&&I["**"])&&(k=[...k,this.options.notFoundRoute])}if(k.length&&E$(p))for(const D of k){const I=((M=D.options.params)==null?void 0:M.stringify)??D.options.stringifyParams;if(I){p===d&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,I(p))}catch{}}}const x=t.leaveParams?_:gm(Y8({path:_,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=u;if(t._includeValidateSearch&&(($=this.options.search)!=null&&$.strict)){const D={};k.forEach(I=>{if(I.options.validateSearch)try{Object.assign(D,T1(I.options.validateSearch,{...D,...v}))}catch{}}),v=D}v=hQ(v,o,k,t._includeValidateSearch),v=of(u,v);const b=this.options.stringifySearch(v),w=o.hash===!0?a.hash:o.hash?tp(o.hash,a.hash):void 0,y=w?`#${w}`:"";let S=o.state===!0?a.state:o.state?tp(o.state,a.state):{};o.state&&(S=bf(a.state,S));const z=`${x}${b}${y}`;let N,A,E=!1;if(this.rewrite){const D=new URL(z,this.origin),I=L$(this.rewrite,D);N=D.href.replace(D.origin,""),I.origin!==this.origin?(A=I.href,E=!0):A=I.pathname+I.search+I.hash}else N=EV(z),A=N;return{publicHref:A,href:N,pathname:x,search:v,searchStr:b,state:S,hash:w??"",external:E,unmaskOnReload:o.unmaskOnReload}},s=n(t);if(t.mask)s.maskedLocation=n({from:t.from,...t.mask});else if(this.options.routeMasks){const o=RV(s.pathname,this.processedTree);if(o){const a=Object.assign(Object.create(null),o.rawParams),{from:i,params:c,...u}=o.route,d=a9(c,a);s.maskedLocation=n({from:t.from,...u,params:d})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:n,...s})=>{let o;const a=Kl(this.latestLocation.href)===Kl(s.href)&&m_(o9(s.state),o9(this.latestLocation.state)),i=this._commitPromise;let c;const u=new Promise(d=>{c=d});if(u.resolve=()=>{c(),i==null||i.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:d,hashScrollIntoView:_,...p}=s;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=_??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,o=s.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n}),this.history.subscribers.size||this.load({action:{type:o}})}return this._scroll.next=s.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:t,resetScroll:n,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:a,...i}={})=>{const c=this.buildLocation({...i,_includeValidateSearch:!0});this._pendingLocation=c;const u=this.commitLocation({...c,viewTransition:o,replace:t,resetScroll:n,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:n,href:s,publicHref:o,...a})=>{var c,u;let i=!1;if(s)try{new URL(`${s}`),i=!0}catch{}if(i&&!n&&(n=!0),n){if(t!==void 0||!s){const _=this.buildLocation({to:t,...a});s=s??_.publicHref,o=o??_.publicHref}const d=!i&&o?o:s;if(sb(d,this.protocolAllowlist))return;if(!a.ignoreBlocker){const _=((u=(c=this.history).getBlockers)==null?void 0:u.call(c))??[];for(const p of _)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(d):window.location.href=d;return}return this.buildAndCommitLocation({...a,href:s,to:t,_isNavigate:!0})},this.load=async t=>{this.updateLatestLocation(),t!=null&&t.action&&(this._scroll.hash=t.action.type==="PUSH"||t.action.type==="REPLACE"),await kQ(this,t)},this.startViewTransition=t=>{var s,o;const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document.startViewTransition=="function"){let a;if(typeof n=="object"&&((o=(s=window.CSS)==null?void 0:s.supports)!=null&&o.call(s,"selector(:active-view-transition-type(a))"))){const i=this.latestLocation,c=this.stores.resolvedLocation.get(),u=typeof n.types=="function"?n.types(hy(i,c)):n.types;if(u===!1)return t();a={update:t,types:u}}else a=t;return document.startViewTransition(a).updateCallbackDone}return t()},this.invalidate=t=>{var u,d;const n=this._committed,s=t==null?void 0:t.filter,o=this._preloads,a=new Set([...n,...this._cache.values(),...[...(o==null?void 0:o.values())??[]].flat(),...((u=this._tx)==null?void 0:u[3])??[]].filter(_=>!s||s(_)).map(_=>_.id)),i=[];for(const[_,p]of o??[])p.some(m=>a.has(m.id))&&(o.delete(_),i.push(_));const c=_=>{if(a.has(_.id)){const p=this.routesById[_.routeId],m={..._,invalid:!0,...(t!=null&&t.forcePending||_.status==="error"||_.status==="notFound")&&s9(p)?{status:"pending",error:void 0}:void 0};return _._flight=void 0,m}return _};this._committed=n.map(c);for(const[_,p]of this._cache)a.has(_)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const _ of a)(d=this._flights)==null||d.delete(_);for(const _ of i)_.abort();return this.shouldViewTransition=!1,this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const n=t.headers.get("Location");if(t.options.href){if(n)try{const s=new URL(n);if(this.origin&&s.origin===this.origin){const o=s.pathname+s.search+s.hash;t.options.href=o,t.headers.set("Location",o)}}catch{}}else{const s=this.buildLocation(t.options).publicHref||"/";t.options.href=s,t.headers.set("Location",s)}if(t.options.href&&sb(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{var u;const n=this._cache,s=this._preloads,o=t==null?void 0:t.filter,a=[],i=[];for(const[d,_]of n)(!o||o(_))&&(i.push(d),a.push(_));const c=[];for(const[d,_]of s??[])(!o||_.some(o))&&(c.push(d),a.push(..._));for(const d of i)n.delete(d);for(const d of c)s.delete(d);for(const d of a){const _=d._flight;d._flight=void 0,_&&!--_[2]&&(((u=this._flights)==null?void 0:u.get(d.id))===_&&this._flights.delete(d.id),c.push(_[1]))}for(const d of c)d.abort()},this.loadRouteChunk=Ch,this.preloadRoute=t=>jQ(this,t),this.matchRoute=(t,n)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},o=this.buildLocation(s),a=this.stores.status.get()==="pending";if(n!=null&&n.pending&&!a)return!1;const i=(n==null?void 0:n.pending)??!a?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=MV(o.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,i.pathname,this.processedTree);return!c||t.params&&!m_(c.rawParams,t.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?m_(i.search,o.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.getStoreConfig=r,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??tQ,parseSearch:e.parseSearch??eQ,protocolAllowlist:e.protocolAllowlist??zV}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:r,processedTree:t}){this.routesById=e,this.routesByPath=r,this.processedTree=t;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}getRouteBranch(e){let r=this.routeBranchCache.get(e);return r||(r=M$(e),this.routeBranchCache.set(e,r)),r}matchRoutesInternal(e,r){var p,m;const[t,n,s]=this.getMatchedRoutes(e.pathname);let o=t,a=!1;(s?s.path!=="/"&&n["**"]:Kl(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const i=a?pQ(this.options.notFoundMode,o):void 0,c=new Array(o.length),u=this._committed,d=(k,x)=>{const v=u[x];return(v==null?void 0:v.routeId)===k.id?v:k===this.options.notFoundRoute?u.find(b=>b.routeId===k.id):void 0};let _;for(let k=0;k{const m=p(c.preSearchFilters?c.preSearchFilters.reduce((k,x)=>x(k),_):_);return c.postSearchFilters?c.postSearchFilters.reduce((k,x)=>x(k),m):m};s.push(d)}const u=c.validateSearch;if(n&&u){const d=({search:_,next:p,meta:m})=>{const k=p(_);try{const x=T1(u,k);if(m&&x)for(const v in x)v in k||(m.defaulted||(m.defaulted=new Map)).set(v,x[v]);return{...k,...x}}catch{}return k};s.push(d)}}const o=(i,c,u)=>{if(i>=s.length){if(!r.search)return{};if(r.search===!0)return c;const _=tp(r.search,c);return u&&(u.explicit=_),_}const d=(_,p)=>{if(p){const m=u||{};return{search:o(i+1,_,m),meta:m}}return o(i+1,_,u)};return s[i]({search:c,next:d,meta:u})};return o(0,e)}function pQ(e,r){if(e!=="root"){let t;for(let n=r.length-1;n>=0;n--){const s=r[n];if(s.options.notFoundComponent)return s.id;t||(t=s.children&&s.id)}if(t)return t}return Sh}function a9(e,r){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return r;const t=Object.assign(Object.create(null),r);return Object.assign(t,tp(e,t))}function i9(e,r){var n;const t=((n=e.options.params)==null?void 0:n.parse)??e.options.parseParams;t&&Object.assign(r,t(r))}function I4(e,r){var t,n;return(n=(t=e.options[r])==null?void 0:t.preload)==null?void 0:n.call(t)}function mQ(e,r){const t=I4(e,"component");let n=I4(e,"pendingComponent");return r&&(n?n=n.then(r):r()),t&&n?Promise.all([t,n]).then(()=>{}):t??n}function Ch(e,r,t){const n=()=>r===!1?void 0:r?I4(e,r):mQ(e,t),s=e._lazy;if(s)return s===!0?n():s.then(n);if(!e.lazyFn)return n();const o=e.lazyFn().then(a=>{{const{id:i,...c}=a.options;Object.assign(e.options,c),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=o,o.then(n)}function Sj(e){const r=e.findIndex(t=>t.status!=="success"||t._notFound)+1;return r&&r{const s=()=>n(r);r.addEventListener("abort",s,{once:!0}),Promise.resolve(e).then(t,n).finally(()=>r.removeEventListener("abort",s))})}function _d(e,r){return e.routesById[r.routeId]}function ig(e,r,t){return D$(e)?[Ia,e]:rp(e)?(e.routeId||(e.routeId=t),[py,e]):r?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[eu,e]):[Bc,e]}function Cj(e,r){var n,s;let t=ig(r,!0,e.id);if(t[0]!==eu)return t;try{(s=(n=e.options).onError)==null||s.call(n,t[1])}catch(o){t=ig(o,!0,e.id)}return t}function qm(e,r,t,n,s){return s[0].signal.aborted?y_:Nj(e,r,t,Cj(t,n),s)}async function gQ(e,r,t,n,s,o){var d,_;const[a,i]=r,c=t[0].signal,u=!!t[3];for(let p=t[6]??0;pe.navigate({...S,_fromLocation:a}),buildLocation:e.buildLocation,cause:u?"preload":m.cause,abortController:t[0],preload:u,matches:i,routeId:k.id};try{const S=m._ctx||(m._ctx=k.options.context?k.options.context({...v,deps:m.loaderDeps,context:x})||{}:void 0);m.context={...x,...S}}catch(S){return Ql(e,m),[p,qm(e,r,k,S,t)]}if(c.aborted)return[p,y_];const b=m.paramsError??m.searchError;if(b!==void 0)return Ql(e,m),[p,qm(e,r,k,b,t)];const w=k.options.beforeLoad;if(!w)continue;const y=m.status;p>=o&&(m.status="pending",(_=t[7])==null||_.call(t));try{cg(e,m,"beforeLoad",t[0]);const S=await ud(w({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,y_];const z=Nj(e,r,k,ig(S,!1,k.id),t);if(z[0]!==Bc)return Ql(e,m),[p,z];m.context={...m.context,...S}}catch(S){return Ql(e,m),[p,qm(e,r,k,S,t)]}finally{m.status=y,cg(e,m,!1,t[0])}}s()}function zj(e,r,t){var n;if(!(!t||--t[2])){if(((n=e._flights)==null?void 0:n.get(r.id))===t){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(r)&&s[3].some(o=>o.id===r.id)&&s[3].some(o=>o.isFetching==="beforeLoad"))return;e._flights.delete(r.id)}return t[1]}}function Ql(e,r){var n;const t=r._flight;r._flight=void 0,(n=zj(e,r,t))==null||n.abort()}function ma(e,r,t,n){var o;const s=[];for(const a of r)if(!(t!=null&&t.includes(a))){const i=a._flight;if(a._flight=void 0,n&&(i==null?void 0:i[2])===1&&((o=e._flights)==null?void 0:o.get(a.id))===i&&(t!=null&&t.some(c=>c.id===a.id)))i[2]=0;else{const c=zj(e,a,i);c&&s.push(c)}}for(const a of s)a.abort()}function Ej(e){for(const r of e){const t=r._flight;t&&t[2]++}}function cg(e,r,t,n){var a;if(r.isFetching=t,n&&((a=e._tx)==null?void 0:a[0])!==n)return;const s=e.stores.byRoute.get(r.routeId),o=s==null?void 0:s.get();(o==null?void 0:o.id)===r.id&&s.set({...o,isFetching:t})}function I$(e,r,t,n,s,o,a){const i=r[0];return{params:t.params,location:i,navigate:c=>e.navigate({...c,_fromLocation:i}),cause:a?"preload":t.cause,abortController:s,preload:a,deps:t.loaderDeps,parentMatchPromise:o,context:t.context,route:n,...e.options.additionalContext}}async function c9(e,r,t,n,s,o,a){const i=a[0],c=i.signal;if(c.aborted)return y_;if(!s)return[Bc,void 0];let u=t._flight;cg(e,t,"loader",i);try{if(!u){const d=new AbortController;u=[Promise.resolve().then(()=>s(I$(e,r,t,n,d,o,!!a[3]))).then(_=>ig(_,!1,n.id),_=>ig(_,!0,n.id)).then(_=>{var p;return _[0]!==Bc&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||d.abort()),_[0]===eu&&u[2]?Cj(n,_[1]):_}),d,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],Nj(e,r,n,await ud(u[0],c),a)}catch(d){if(d!==c||!c.aborted)throw d;return Ql(e,t),y_}finally{cg(e,t,!1,i)}}function l9(e,r,t){r[0]!==Ia&&(e.status="success",e.error=void 0,r[0]===Bc?(e.loaderData=r[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function vQ(e,r,t){const n=e._cache.get(r.id);if(n!==t||e._committed.some(o=>o.id===r.id&&o._flight===r._flight))return;const s={...r,_notFound:void 0,context:{}};s._flight&&s._flight[2]++,e._cache.set(r.id,s),n&&Ql(e,n)}function u9(e,r){return r[0]===eu||r[0]===py?{...e,status:r[0]===eu?"error":"notFound",error:r[1],_flight:void 0}:e}function bQ(e,r,t,n,s,o,a){var I,G;const i=r[1][t],c=_d(e,i),u=!!o[3],d=e._cache.get(i.id);let _,p=!1,m;try{if(i.status==="success"&&(_=c.options.shouldReload,typeof _=="function"&&(_=_(I$(e,r,i,c,o[0],s,u))),o[0].signal.aborted&&(m=y_)),!m)if(i.status!=="success")p=!0;else{const H=u||i.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;p=!!(i.invalid||_||_===void 0&&Date.now()-i.updatedAt>=H&&(o[5]||i.cause==="enter"||o[2].some(Q=>Q.routeId===i.routeId&&Q.id!==i.id)))}}catch(H){i.invalid=!0,Ql(e,i),m=qm(e,r,c,H,o)}const k=c.options.loader,x=typeof k=="function",v=x?k:k==null?void 0:k.handler,b=!u||c.options.preload!==!1;let w=b&&k?(I=e._flights)==null?void 0:I.get(i.id):void 0;w===i._flight||m?w=void 0:w&&!p&&!u&&_===void 0?p=!0:p||(w=void 0);const y=!!(k&&p&&i.status==="success"&&!u&&!o[4]&&((x?void 0:k.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),S=p&&b,z=S&&!y&&(i.status!=="success"||!!k),N=t>=a?o[7]:void 0,A=c.lazyFn&&c._lazy!==!0?N:void 0;if(S&&!k&&(i.invalid=!1,i.updatedAt=Date.now()),w&&w[2]++,z){const H=i._flight;i._flight=w,(G=zj(e,i,H))==null||G.abort(),t>=a&&(i.status="pending"),N==null||N()}S||(i.isFetching=!1);const E=(m?Promise.resolve(m):z?c9(e,r,i,c,v,s,o):Promise.resolve([Bc,i.loaderData])).then(H=>(z&&(l9(i,H,u),H[0]===Bc&&(k&&!o[0].signal.aborted&&vQ(e,i,d),t>=a&&(i.status="pending"))),H)),M=ud(Promise.resolve().then(()=>Ch(c,void 0,A)),o[0].signal).then(()=>{},H=>r[1].some((Q,K)=>K<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,qm(e,r,c,H,o)]).then(H=>E.then(Q=>(z&&!H&&Q[0]===Bc&&i.status==="pending"&&!o[0].signal.aborted&&(i.status="success",N==null||N()),H)));if(n.push([t,E,M]),!y)return E.then(H=>u9(i,H));const $={...i,status:"pending",preload:!1,_flight:w};i.invalid=!1,i.isFetching="loader";const D=c9(e,r,$,c,v,s,o).then(H=>(i.isFetching=!1,l9($,H,!1),H));return(r[2]??(r[2]=[])).push([t,D,M,$]),D.then(H=>u9($,H))}async function P4(e,r,t,n,s=0){const o=t==null?void 0:t[1][1];let a=o!=null&&o.routeId?r.findIndex(i=>i.routeId===o.routeId):(t==null?void 0:t[0])??r.length-1;a<0&&(a=0);for(let i=a;i>=0;i--){const c=_d(e,r[i]);try{const u=Ch(c,!1);u&&await ud(u,n)}catch(u){if(u===n&&n.aborted)throw u}if(c.options.notFoundComponent)return i}return o!=null&&o.routeId?a:s}function Df(e,r){r[2]&&(ma(e,r[2].map(t=>t[3])),r[2]=void 0)}async function _9(e,r,t,n){let s;try{await Promise.all(e.map(o=>o[1].then(async a=>{const i=o[0];if(!(n&&i>=await n)){if(a[0]>=Ia)throw[i,a];!s&&a[0]!==Bc&&(s=[i,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=i))return c[1].then(u=>{if(u[0]===Ia)throw[c[0],u]})})))}})))}catch(o){return o}return r??s}function Nj(e,r,t,n,s,o){for(;n[0]===Ia;){const a=n[1],i=a.options;if(i.reloadDocument?s[3]:s[1]>=20)return n;try{return i.href&&i.reloadDocument?(e.resolveRedirect(a),n):[Ia,a,e.buildLocation({...i,_fromLocation:r[0],_includeValidateSearch:!0})]}catch(c){n=o?[eu,c]:Cj(t,c),o=!0}}return n}async function P$(e,r,t,n,s,o){const a=r[1];let i=await s,c=!1;const u=a.findIndex(m=>m._notFound),d=m=>m[1][0]===py?P4(e,a,m,n.signal):m[0];let _=u<0?a.length:u;if(((i==null?void 0:i[1][0])??0)>=Ia)_=0;else if(i){_=i[2]??(i[2]=await d(i));for(const m of t){if(m[0]>=_)break;const k=await m[1];if(k[0]!==Bc&&k[0]=_)break;const k=await m[2];if(k){i=k;break}}if(((i==null?void 0:i[1][0])??0)>=Ia){const m=i[1];if(m[0]!==Ia||m[1].options.reloadDocument||m[2])return Df(e,r),m;c=!0,i=[0,[eu,new Error("Too many redirects")]]}const p=i?i[2]??await d(i):u;if(p>=0){const m=i==null?void 0:i[1],k=m==null?void 0:m[0],x=a[p],v=m==null?void 0:m[1],b=()=>{m&&(x._notFound=void 0,k===eu?x.status="error":(v.routeId=x.routeId,x.routeId===e.routeTree.id?(x.status="success",x._notFound=!0):x.status="notFound"),x.error=v,x.isFetching=!1)};b(),m||o==null||o();const w=_d(e,x);try{await ud(m?Promise.resolve().then(()=>Ch(w,k===eu?"errorComponent":"notFoundComponent")):Promise.all([Ch(w),Ch(w,"notFoundComponent")]),n.signal)}catch(y){if(y===n.signal&&n.signal.aborted)return Df(e,r),y_}m?c&&(n.abort(),await Promise.all([...t.map(y=>y[1]),...t.map(y=>y[2]),...(r[2]??[]).map(y=>y[1])]),Df(e,r),ma(e,a),b()):x.status="success"}return r}async function B$(e,r,t,n=0,s=r[1].length){var a,i;const o=r[1];for(let c=n;cw._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const w=await P4(e,t,void 0,o,u);t[u]._notFound=void 0,t[w]._notFound=!0,u=w}let d=u<0?t.length:u+1,_=0;for(;_{for(let w=m;w=Ia&&(d=0);x()}if(!o.aborted&&!n[3]){const w=[];for(const[y,S]of e._flights??[])S[2]||(e._flights.delete(y),w.push(S[1]));for(const y of w)y.abort()}const b=P$(e,s,p,n[0],_9(p,v,s[2]),n[7]);(i=s[2])!=null&&i.length&&(s[3]=_9(s[2],void 0,void 0,b.then(w=>ag(w)?0:Sj(t).length,()=>0))),a=await b}catch(c){if(Df(e,s),c===o&&o.aborted)return y_;throw c}return ag(a)?a:B$(e,a,o,n[6]===t.length?n[6]:0)}function B4(e,r){var o,a;if(e._tx!==r)return;const t=r[3],n=e.stores.matches.get();let s=e._pending;for(let i=0;i0){s[3]=setTimeout(()=>B4(e,r),w);return}s[2]=0}const v=t.map(w=>({...w,_flight:void 0}));v[i].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(w=>(w&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+k),w));return}}function vm(e,r){var n;const t=e._pending;(e._tx===r||!((n=e._tx)!=null&&n[3].some(s=>s.id===(t==null?void 0:t[1]))))&&(clearTimeout(t==null?void 0:t[3]),e._pending=void 0)}async function f9(e,r){const t=e._pending;if(!t)return;clearTimeout(t[3]);const n=t[2]-Date.now();if(!t[4]||n<=0||!Sj(r[3]).some(o=>o.id===t[1]))return;let s;try{await ud(new Promise(o=>{s=setTimeout(o,n)}),r[0].signal)}catch{}clearTimeout(s)}function H$(e,r){e._committed=r,e.stores.setMatches(r)}function yQ(e,r,t,n){const s=e._committed,o=e._cache;for(const c of t)c.preload=!1,n&&(c._assetEnd=void 0);const a=Sj(t).length,i=new Map;{const c=Date.now();for(const u of[...s,...o.values()]){if(u.status!=="success"||t.some((_,p)=>_.id===u.id&&(p=(u.preload?d.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:d.options.gcTime??e.options.defaultGcTime??3e5)||i.set(u.id,o.get(u.id)===u?u:{...u,_flight:void 0,isFetching:!1,context:{}})}}r[3]=[],e._cache=i,H$(e,t),ma(e,[...o.values(),...s],[...t,...i.values()]),_Q(e,s,t,r)}async function Mv(e,r){let t=e._tx;for(;t&&t!==r;){if(await t[5],e._tx===t)return;t=e._tx}}function q$(e,r,t){const n=t[1].options,s=t[2];if(!s)return e.navigate({...n,replace:!0,ignoreBlocker:!0});if(n.reloadDocument)return e.navigate({href:s.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});s._redirects=r[1]+1,e._pendingLocation=s;const o=e.commitLocation({...s,viewTransition:n.viewTransition,replace:!0,resetScroll:n.resetScroll,hashScrollIntoView:n.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===s&&(e._pendingLocation=void 0)}),o}async function xQ(e,r,t,n,s){const o=t.map(c=>({...c}));Ej(o);for(const c of n)Ql(e,o[c[0]]),o[c[0]]=c[3];const a=[r[2],o];let i;try{i=await P$(e,a,n,r[0],s)}catch(c){throw ma(e,o),c}if(ag(i)){ma(e,o),i[0]===Ia&&e._tx===r&&e._committed===t&&await q$(e,r,i);return}if(await B$(e,i,r[0].signal),e._tx!==r||e._committed!==t){ma(e,o);return}for(const c of o){const u=e._cache.get(c.id);u!=null&&u._flight&&u._flight===c._flight&&(e._cache.delete(c.id),Ql(e,u))}H$(e,o),ma(e,t,o)}async function wQ(e,r,t,n,s,o){const a=await F$(e,r[2],r[3],[r[0],r[1],e._committed,void 0,s,t,o,n]);if(ag(a)){const _=a[0]===Ia&&e._tx===r;if((!_||a[1].options.reloadDocument)&&vm(e,r),ma(e,r[3]),r[3]=[],!_)return;if(e._tx!==r){vm(e,r);return}await q$(e,r,a);return}const i=a[1];if(e._tx===r&&await f9(e,r),e._tx!==r){vm(e,r),ma(e,i),Df(e,a);return}const c=r[2],u=hy(c,e.stores.resolvedLocation.get()),d=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===r&&await f9(e,r),e._tx!==r){vm(e,r),ma(e,i),Df(e,a);return}const _=()=>{vm(e,r),yQ(e,r,i,o),e._tx===r&&(e.emit({type:"onLoad",...u}),e._tx===r&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(_,i);if(e._tx!==r){Df(e,a);return}d!=null&&d.length&&xQ(e,r,i,d,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set("idle"),e._tx===r&&e.emit({type:"onResolved",...u}),p&&e._tx===r&&e.emit({type:"onRendered",...u})}),e._tx===r&&((m=e._commitPromise)==null||m.resolve(),e._commitPromise=void 0)})}async function kQ(e,r){var S;const t=e._tx,n=e.stores.resolvedLocation.get(),s=n??e.stores.location.get(),o=e.latestLocation,a=e._pendingLocation,i=(a==null?void 0:a.href)===o.href?a._redirects??0:0,c=e._handoff,u=c==null?void 0:c[0](),d=new AbortController,_=e._preflight;if(e._preflight=d,u||c==null||c[1](),_==null||_.abort(),!d.signal.aborted){const z=hy(o,n);e.emit({type:"onBeforeNavigate",...z}),d.signal.aborted||e.emit({type:"onBeforeLoad",...z})}if(d.signal.aborted){await Mv(e,t);return}const p=s.href===o.href;let m=d;const k=e.matchRoutes(o,{_controller:d});Ej(k);const x=u?c[1](k):void 0;if(x?m=u:u==null||u.abort(),d.signal.aborted){ma(e,k),await Mv(e,t);return}e._preflight=void 0;let v;const b=()=>wQ(e,y,p,()=>B4(e,y),r==null?void 0:r.sync,x),w=r!=null&&r.sync?new Promise(z=>v=z):Promise.resolve().then(b).then(),y=[m,i,o,k,Date.now(),w];if(e._tx=y,t){for(const z of e.stores.matches.get()){if(e._tx!==y)break;z.isFetching&&cg(e,z,!1)}t[0].abort(),ma(e,t[3],y[3],!0)}if(e._tx!==y){ma(e,y[3]),y[3]=[],v==null||v(),await Mv(e,y);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(o)}),(x||!e._committed.length&&((S=k[0])==null?void 0:S.status)!=="success"&&!k.some(z=>z._notFound))&&B4(e,y),v==null||v(b()),await w,await Mv(e,y)}async function jQ(e,r){let t=e.buildLocation(r);for(let n=0;;n++){const s=e._committed,o=new AbortController;let a,i,c;try{try{a=e.matchRoutes(t,{_controller:o}),Ej(a),i=(e._preloads??(e._preloads=new Map)).set(o,a),c=await F$(e,t,a,[o,n,s,!0])}finally{i&&(i=i.delete(o),ma(e,a)),o.abort()}if(!ag(c))return c[1];if(!i||c.length<3)return;t=c[2]}catch(u){rp(u)||console.error(u);return}}}const SQ="Error preloading route! ☝️";var U$=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=r=>{var c,u;this.originalIndex=r.originalIndex;const t=this.options,n=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(c=this.options).getParentRoute)==null?void 0:u.call(c),n?this._path=Sh:this.parentRoute||wj();let s=n?Sh:t==null?void 0:t.path;s&&s!=="/"&&(s=O$(s));const o=(t==null?void 0:t.id)||s;let a=n?Sh:E1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=E1(["/",a]));const i=a==="__root__"?"/":E1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=i,this._to=Kl(i)},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.redirect=r=>sQ({from:this.fullPath,...r}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},CQ=class extends U${constructor(e){super(e)}},Aj=class extends T.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,r){const t=e.getResetKey();return r.error&&r.resetKey!==t?{resetKey:t,error:null}:{resetKey:t}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,r){var t,n;(n=(t=this.props).onCatch)==null||n.call(t,e,r)}render(){const e=this.state.error;return e?T.createElement(this.props.errorComponent??zQ,{error:e,reset:this.reset}):this.props.children}};function zQ({error:e}){const[r,t]=T.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(n=>!n),children:r?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),r?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function EQ({children:e,fallback:r=null}){return f.jsx(st.Fragment,{children:G$()?e:r})}function G$(){return st.useSyncExternalStore(NQ,()=>!0,()=>!1)}function NQ(){return()=>{}}var W$=T.createContext(null);function Vo(e){return T.useContext(W$)}var my=T.createContext(void 0),AQ=T.createContext(void 0),On=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(On||{});function TQ({update:e,notify:r,unwatched:t}){return{link:n,unlink:s,propagate:o,checkDirty:a,shallowPropagate:i};function n(u,d,_){const p=d.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:d.deps;if(m!==void 0&&m.dep===u){m.version=_,d.depsTail=m;return}const k=u.subsTail;if(k!==void 0&&k.version===_&&k.sub===d)return;const x=d.depsTail=u.subsTail={version:_,dep:u,sub:d,prevDep:p,nextDep:m,prevSub:k,nextSub:void 0};m!==void 0&&(m.prevDep=x),p!==void 0?p.nextDep=x:d.deps=x,k!==void 0?k.nextSub=x:u.subs=x}function s(u,d=u.sub){const _=u.dep,p=u.prevDep,m=u.nextDep,k=u.nextSub,x=u.prevSub;return m!==void 0?m.prevDep=p:d.depsTail=p,p!==void 0?p.nextDep=m:d.deps=m,k!==void 0?k.prevSub=x:_.subsTail=x,x!==void 0?x.nextSub=k:(_.subs=k)===void 0&&t(_),m}function o(u){let d=u.nextSub,_;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&c(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&r(p),m&1){const k=p.subs;if(k!==void 0){const x=(u=k).nextSub;x!==void 0&&(_={value:d,prev:_},d=x);continue}}if((u=d)!==void 0){d=u.nextSub;continue}for(;_!==void 0;)if(u=_.value,_=_.prev,u!==void 0){d=u.nextSub;continue e}break}while(!0)}function a(u,d){let _,p=0,m=!1;e:do{const k=u.dep,x=k.flags;if(d.flags&16)m=!0;else if((x&17)===17){if(e(k)){const v=k.subs;v.nextSub!==void 0&&i(v),m=!0}}else if((x&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(_={value:u,prev:_}),u=k.deps,d=k,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=d.subs,b=v.nextSub!==void 0;if(b?(u=_.value,_=_.prev):u=v,m){if(e(d)){b&&i(v),d=u.sub;continue}m=!1}else d.flags&=-33;d=u.sub;const w=u.nextDep;if(w!==void 0){u=w;continue e}}return m}while(!0)}function i(u){do{const d=u.sub,_=d.flags;(_&48)===32&&(d.flags=_|16,(_&6)===2&&r(d))}while((u=u.nextSub)!==void 0)}function c(u,d){let _=d.depsTail;for(;_!==void 0;){if(_===u)return!0;_=_.prevDep}return!1}}function RQ(e,r,t){var o,a,i;const n=typeof e=="object",s=n?e:void 0;return{next:(o=n?e.next:e)==null?void 0:o.bind(s),error:(a=n?e.error:r)==null?void 0:a.bind(s),complete:(i=n?e.complete:t)==null?void 0:i.bind(s)}}const F4=[];let R1=0;const{link:d9,unlink:MQ,propagate:OQ,checkDirty:K$,shallowPropagate:h9}=TQ({update(e){return e._update()},notify(e){F4[H4++]=e,e.flags&=~On.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=On.Mutable|On.Dirty,lb(e))}});let Ov=0,H4=0,Ac,q4=0;function $Q(e){try{++q4,e()}finally{--q4||V$()}}function lb(e){const r=e.depsTail;let t=r!==void 0?r.nextDep:e.deps;for(;t!==void 0;)t=MQ(t,e)}function V$(){if(!(q4>0)){for(;Ov{var u;s.get(),i.current?(u=a.next)==null||u.call(a,s._snapshot):i.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=Ac,i=(r==null?void 0:r.compare)??Object.is;if(t)Ac=s,++R1,s.depsTail=void 0;else if(o===void 0)return!1;t&&(s.flags=On.Mutable|On.RecursedCheck);try{const c=s._snapshot,u=typeof o=="function"?o(c):o===void 0&&t?n(c):o;return c===void 0||!i(c,u)?(s._snapshot=u,!0):!1}finally{Ac=a,t&&(s.flags&=~On.RecursedCheck),lb(s)}}};return t?(s.flags=On.Mutable|On.Dirty,s.get=function(){const o=s.flags;if(o&On.Dirty||o&On.Pending&&K$(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&h9(a)}}else o&On.Pending&&(s.flags=o&~On.Pending);return Ac!==void 0&&d9(s,Ac,R1),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(OQ(a),h9(a),V$())}},s}function DQ(e){const r=()=>{const n=Ac;Ac=t,++R1,t.depsTail=void 0,t.flags=On.Watching|On.RecursedCheck;try{return e()}finally{Ac=n,t.flags&=~On.RecursedCheck,lb(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:On.Watching|On.RecursedCheck,notify(){const n=this.flags;n&On.Dirty||n&On.Pending&&K$(this.deps,this)?r():this.flags=On.Watching},stop(){this.flags=On.None,this.depsTail=void 0,lb(this)}};return r(),t}var y2={exports:{}},x2={},w2={exports:{}},k2={};/** * @license React * use-sync-external-store-shim.production.js * @@ -55,7 +55,7 @@ Error generating stack: `+j.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var m9;function LQ(){if(m9)return k2;m9=1;var e=s0();function r(_,p){return _===p&&(_!==0||1/_===1/p)||_!==_&&p!==p}var t=typeof Object.is=="function"?Object.is:r,n=e.useState,s=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function i(_,p){var m=p(),k=n({inst:{value:m,getSnapshot:p}}),w=k[0].inst,v=k[1];return o(function(){w.value=m,w.getSnapshot=p,c(w)&&v({inst:w})},[_,m,p]),s(function(){return c(w)&&v({inst:w}),_(function(){c(w)&&v({inst:w})})},[_]),a(m),m}function c(_){var p=_.getSnapshot;_=_.value;try{var m=p();return!t(_,m)}catch{return!0}}function u(_,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return k2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,k2}var g9;function IQ(){return g9||(g9=1,w2.exports=LQ()),w2.exports}/** + */var m9;function LQ(){if(m9)return k2;m9=1;var e=s0();function r(_,p){return _===p&&(_!==0||1/_===1/p)||_!==_&&p!==p}var t=typeof Object.is=="function"?Object.is:r,n=e.useState,s=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function i(_,p){var m=p(),k=n({inst:{value:m,getSnapshot:p}}),x=k[0].inst,v=k[1];return o(function(){x.value=m,x.getSnapshot=p,c(x)&&v({inst:x})},[_,m,p]),s(function(){return c(x)&&v({inst:x}),_(function(){c(x)&&v({inst:x})})},[_]),a(m),m}function c(_){var p=_.getSnapshot;_=_.value;try{var m=p();return!t(_,m)}catch{return!0}}function u(_,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return k2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,k2}var g9;function IQ(){return g9||(g9=1,w2.exports=LQ()),w2.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -63,7 +63,7 @@ Error generating stack: `+j.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var v9;function PQ(){if(v9)return x2;v9=1;var e=s0(),r=IQ();function t(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var n=typeof Object.is=="function"?Object.is:t,s=r.useSyncExternalStore,o=e.useRef,a=e.useEffect,i=e.useMemo,c=e.useDebugValue;return x2.useSyncExternalStoreWithSelector=function(u,d,_,p,m){var k=o(null);if(k.current===null){var w={hasValue:!1,value:null};k.current=w}else w=k.current;k=i(function(){function b(E){if(!x){if(x=!0,y=E,E=p(E),m!==void 0&&w.hasValue){var A=w.value;if(m(A,E))return S=A}return S=E}if(A=S,n(y,E))return A;var N=p(E);return m!==void 0&&m(A,N)?(y=E,A):(y=E,S=N)}var x=!1,y,S,z=_===void 0?null:_;return[function(){return b(d())},z===null?void 0:function(){return b(z())}]},[d,_,p,m]);var v=s(u,k[0],k[1]);return a(function(){w.hasValue=!0,w.value=v},[v]),c(v),v},x2}var b9;function BQ(){return b9||(b9=1,y2.exports=PQ()),y2.exports}var Q$=BQ();const FQ=n0(Q$);function HQ(e,r){return e===r}function qc(e,r,t=HQ){const n=T.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:i}=e.subscribe(a);return i},[e]),s=T.useCallback(()=>e==null?void 0:e.get(),[e]);return Q$.useSyncExternalStoreWithSelector(n,s,s,r,t)}var y9={};function Tj(e,r){const t=T.useRef();return n=>{const s=e!=null&&e.select?e.select(n):n;return(e==null?void 0:e.structuralSharing)??r.options.defaultStructuralSharing?t.current=bf(t.current,s):s}}function fd(e){const r=Vo(),t=T.useContext(e.from?AQ:my),n=e.from??t,s=r.stores.getMatchStore(n),o=Tj(e,r),a=qc(s,i=>i?o(i):y9);if(a!==y9)return a;(e.shouldThrow??!0)&&wj()}function X$(e){return fd({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:r=>e.select?e.select(r.loaderData):r.loaderData})}function Y$(e){const{select:r,...t}=e;return fd({...t,select:n=>r?r(n.loaderDeps):n.loaderDeps})}function Z$(e){return fd({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:r=>{const t=e.strict===!1?r.params:r._strictParams;return e.select?e.select(t):t}})}function J$(e){return fd({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:r=>e.select?e.select(r.search):r.search})}function a0(e){const r=Vo();return T.useCallback(t=>r.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,r])}function Rj(e){return fd({...e,select:r=>e.select?e.select(r.context):r.context})}function j2(e){const r=T.useRef(e);return m_(r.current,e,{ignoreUndefined:!1})||(r.current=e),r.current}function qQ(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]}function UQ(e,r,t){if(e!=null&&e.external)return sb(e.href,t)?void 0:e.href;if(!YQ(r)&&!(typeof r!="string"||r.indexOf(":")===-1))try{return new URL(r),sb(r,t)?void 0:r}catch{}}function GQ(e,r,t,n,s,o){if(o)return!1;if(t!=null&&t.exact){if(!BV(e.pathname,r.pathname,n))return!1}else{const a=ab(e.pathname,n),i=ab(r.pathname,n);if(!(a.startsWith(i)&&(a.length===i.length||a[i.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!m_(e.search,r.search,{partial:!(t!=null&&t.exact),ignoreUndefined:!(t!=null&&t.explicitUndefined)})?!1:t!=null&&t.includeHash?s&&e.hash===r.hash:!0}function WQ(e,r){const t=Vo(),n=wV(r),{activeProps:s,inactiveProps:o,activeOptions:a,to:i,preload:c,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:_,replace:p,startTransition:m,resetScroll:k,viewTransition:w,children:v,target:b,disabled:x,style:y,className:S,onClick:z,onBlur:E,onFocus:A,onMouseEnter:N,onMouseLeave:M,onTouchStart:$,ignoreBlocker:D,params:I,search:G,hash:H,state:Q,mask:K,reloadDocument:J,unsafeRelative:ee,from:P,_fromLocation:L,...F}=e,q=G$(),U=j2(e.search),oe=j2(e.params),ie=j2(a),ce=T.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,U,oe,e.state,e.mask,e.unsafeRelative]),re=T.useCallback(De=>{const ct=t.buildLocation({_fromLocation:De,...ce}),lt=XQ(ct.maskedLocation?ct.maskedLocation.publicHref:ct.publicHref,ct.maskedLocation?ct.maskedLocation.external:ct.external,t.history,x),xe=UQ(lt,i,t.protocolAllowlist);return[lt==null?void 0:lt.href,xe,GQ(De,ct,ie,t.basepath,q,xe!==void 0)]},[ie,x,q,ce,t,i]),[W,ae,le]=qc(t.stores.location,re,qQ),me=le?tp(s,{})??KQ:S2,be=le?S2:tp(o,{})??S2,Se=[S,me.className,be.className].filter(Boolean).join(" "),Be=(y||me.style||be.style)&&{...y,...me.style,...be.style},Xe=T.useRef(!1),Me=e.reloadDocument||ae||x?!1:c??t.options.defaultPreload,Fe=u??t.options.defaultPreloadDelay??0,pt=T.useCallback(()=>{t.preloadRoute(ce).catch(De=>{console.warn(De),console.warn(SQ)})},[t,ce]),Ct=T.useCallback(De=>{if(!De){C2(n);return}if(!(De.isIntersecting??Me==="intent")){De.isIntersecting===!1&&C2(n);return}if(!Fe){pt();return}Um.has(n)||Um.set(n,setTimeout(()=>{Um.delete(n),pt()},Fe))},[pt,n,Me,Fe]);xV(n,Ct,Me!=="viewport"),T.useEffect(()=>{Xe.current||Me==="render"&&(pt(),Xe.current=!0)},[pt,Me]);const Vt=De=>{const ct=De.currentTarget.getAttribute("target"),lt=b!==void 0?b:ct;!x&&!(De.metaKey||De.altKey||De.ctrlKey||De.shiftKey)&&!De.defaultPrevented&&(!lt||lt==="_self")&&De.button===0&&(De.preventDefault(),t.navigate({...ce,replace:p,resetScroll:k,hashScrollIntoView:_,startTransition:m,viewTransition:w,ignoreBlocker:D}))};if(ae)return{...F,ref:n,href:ae,...v&&{children:v},...b&&{target:b},...x&&{disabled:x},...y&&{style:y},...S&&{className:S},...z&&{onClick:z},...E&&{onBlur:E},...A&&{onFocus:A},...N&&{onMouseEnter:N},...M&&{onMouseLeave:M},...$&&{onTouchStart:$}};const Ut=()=>{Me==="intent"&&pt()},Gt=()=>{Me==="intent"&&C2(n)};return{...F,...me,...be,href:W,ref:n,onClick:th([z,Vt]),onBlur:th([E,Gt]),onFocus:th([A,Ct]),onMouseEnter:th([N,Ct]),onMouseLeave:th([M,Gt]),onTouchStart:th([$,Ut]),disabled:!!x,target:b,...Be&&{style:Be},...Se&&{className:Se},...x&&VQ,...le&&QQ}}var S2={},KQ={className:"active"},VQ={role:"link","aria-disabled":!0},QQ={"data-status":"active","aria-current":"page"},Um=new WeakMap,C2=e=>{clearTimeout(Um.get(e)),Um.delete(e)},th=e=>r=>{for(const t of e)if(t){if(r.defaultPrevented)return;t(r)}};function XQ(e,r,t,n){if(!n)return r?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function YQ(e){if(typeof e!="string")return!1;const r=e.charCodeAt(0);return r===47?e.charCodeAt(1)!==47:r===46}var gy=T.forwardRef((e,r)=>{const{_asChild:t,...n}=e,{type:s,...o}=WQ(n,r),a=typeof n.children=="function"?n.children({isActive:o["data-status"]==="active"}):n.children;if(!t){const{disabled:i,...c}=o;return T.createElement("a",c,a)}return T.createElement(t,o,a)}),ZQ=class extends U${constructor(r){super(r),this.useMatch=t=>fd({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Rj({...t,from:this.id}),this.useSearch=t=>J$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Z$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Y$({...t,from:this.id}),this.useLoaderData=t=>X$({...t,from:this.id}),this.useNavigate=()=>a0({from:this.fullPath}),this.Link=st.forwardRef((t,n)=>f.jsx(gy,{ref:n,from:this.fullPath,...t}))}};function JQ(e){return new ZQ(e)}function eX(){return e=>rX(e)}var tX=class extends CQ{constructor(e){super(e),this.useMatch=r=>fd({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Rj({...r,from:this.id}),this.useSearch=r=>J$({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Z$({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Y$({...r,from:this.id}),this.useLoaderData=r=>X$({...r,from:this.id}),this.useNavigate=()=>a0({from:this.fullPath}),this.Link=st.forwardRef((r,t)=>f.jsx(gy,{ref:t,from:this.fullPath,...r}))}};function rX(e){return new tX(e)}function Xc(e){return r=>{const t=JQ(r);return t.isRoot=!1,t}}function nX(e){const r=Vo(),t=`not-found-${qc(r.stores.location,n=>n.pathname)}-${qc(r.stores.status,n=>n)}`;return f.jsx(Aj,{getResetKey:()=>t,onCatch:(n,s)=>{var o;if(rp(n))(o=e.onCatch)==null||o.call(e,n,s);else throw n},errorComponent:({error:n})=>{var s;if(rp(n))return(s=e.fallback)==null?void 0:s.call(e,n);throw n},children:e.children})}function sX(){return f.jsx("p",{children:"Not Found"})}function uh(e){return f.jsx(f.Fragment,{children:e.children})}function eD(e,r,t){return r.options.notFoundComponent?f.jsx(r.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...t}):f.jsx(sX,{})}function vy(e,r){const t=(r==null?void 0:r.options.pendingComponent)??e.options.defaultPendingComponent;return t?f.jsx(t,{}):null}var oX=(e,r)=>e[0]===r[0]&&e[1]===r[1],tD=(e,r,t)=>!r.isRoot||r.options.shellComponent||r.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,rD=T.memo(function({routeId:r}){const t=Vo();return f.jsx(aX,{router:t,match:qc(t.stores.getMatchStore(r),n=>n)})});function aX({router:e,match:r}){var _,p;const t=e.routesById[r.routeId],n=vy(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,o=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((_=e.options.notFoundRoute)==null?void 0:_.options.component):t.options.notFoundComponent,i=r.ssr===!1||r.ssr==="data-only",c=tD(e,t,r.ssr)&&(t.options.wrapInSuspense??n??(((p=t.options.errorComponent)==null?void 0:p.preload)||i))?T.Suspense:uh,u=s?Aj:uh,d=a?nX:uh;return f.jsxs(t.isRoot?t.options.shellComponent??uh:uh,{children:[f.jsx(my.Provider,{value:r.routeId,children:f.jsx(c,{fallback:n,children:f.jsx(u,{getResetKey:()=>r,errorComponent:s,onCatch:(m,k)=>{if(rp(m))throw m.routeId??(m.routeId=r.routeId),m;o==null||o(m,k)},children:f.jsx(d,{fallback:m=>{if(m.routeId??(m.routeId=r.routeId),m.routeId!==r.routeId)throw m;return T.createElement(a,m)},children:i?f.jsx(EQ,{fallback:n,children:f.jsx(x9,{match:r})}):f.jsx(x9,{match:r})})})})}),null]})}var x9=T.memo(function({match:r}){const t=Vo(),n=r.routeId,s=t.routesById[n],o=T.useMemo(()=>{var c;const i=(c=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:c({routeId:n,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return i?JSON.stringify(i):void 0},[n,r.loaderDeps,r._strictParams,r._strictSearch,s.options.remountDeps,t.options.defaultRemountDeps]),a=T.useMemo(()=>{const i=s.options.component??t.options.defaultComponent;return i?f.jsx(i,{},o):f.jsx(lg,{})},[o,s.options.component,t.options.defaultComponent]);if(r.status==="pending"){if(t.ssr&&!tD(t,s,r.ssr))return a;if(t._tx)throw t._tx[5];return vy(t,s)}if(r.status==="notFound")return eD(t,s,r.error);if(r.status==="error")throw r.error;return a}),lg=T.memo(function(){const r=Vo(),t=T.useContext(my);let n,s,o;{const i=r.stores.getMatchStore(t);[n,s]=qc(i,c=>[!!c._notFound,c.error],oX),o=qc(r.stores.ids,c=>c[c.indexOf(t)+1])}if(n)return eD(r,r.routesById[t],s);if(!o)return null;const a=f.jsx(rD,{routeId:o});return t===Sh?f.jsx(T.Suspense,{fallback:vy(r),children:a}):a});function nD(e,r){const t=e[1];e.length=0,t==null||t(r)}function iX({t:e}){const r=Vo(),t=r._rendered??(r._rendered=[]);return r.startTransition=(n,s)=>new Promise(o=>{nD(t,!1),t.push(s,o),e(r),T.startTransition(n)}),C$(()=>{const n=r.history.subscribe(r.load);r.updateLatestLocation();const s=r.latestLocation,o=r.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Kl(s.publicHref)!==Kl(o.publicHref))return r.commitLocation({...o,replace:!0,ignoreBlocker:!0}),n;const a=r.stores.resolvedLocation.get();return(a==null?void 0:a.href)===s.href&&a.state.__TSR_key===s.state.__TSR_key?t.push(r.stores.matches.get(),i=>{i&&r.emit({type:"onRendered",...hy(a,a)})}):r._tx||r.load({sync:!0}).catch(console.error),n},[r,r.history]),null}function cX(){const e=Vo(),r=e.routesById[Sh],t=vy(e,r),n=e.ssr?uh:T.Suspense,s=f.jsxs(f.Fragment,{children:[f.jsx(iX,{t:T.useState()[1]}),f.jsx(n,{fallback:t,children:f.jsx(lX,{})})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:s}):s}function lX(){const e=Vo(),r=e._rendered,t=qc(e.stores.matches,a=>r[0]??a),n=t[0],s=n==null?void 0:n.routeId;C$(()=>{r[0]===t&&nD(r,!0)},[r,t]);const o=s?f.jsx(rD,{routeId:s}):null;return f.jsx(my.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?o:f.jsx(Aj,{getResetKey:()=>n,onCatch:void 0,children:o})})}var uX=e=>({createMutableStore:p9,createReadonlyStore:p9,batch:$Q}),_X=e=>new fX(e),fX=class extends fQ{constructor(e){super(e,uX)}};function dX({router:e,children:r,...t}){E$(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const n=f.jsx(W$.Provider,{value:e,children:r});return e.options.Wrap?f.jsx(e.options.Wrap,{children:n}):n}function hX({router:e,...r}){return f.jsx(dX,{router:e,...r,children:f.jsx(cX,{})})}function pX(e,r){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function")return{shouldBlockFn:async()=>await e(),enableBeforeUnload:!0,withResolver:!1};const t=!!(e.condition??!0),n=e.blockerFn;return{shouldBlockFn:async()=>t&&n!==void 0?await n():t,enableBeforeUnload:t,withResolver:n===void 0}}function mX(e,r){const{shouldBlockFn:t,enableBeforeUnload:n=!0,disabled:s=!1,withResolver:o=!1}=pX(e),a=Vo(),{history:i}=a,[c,u]=T.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return T.useEffect(()=>{const d=async _=>{function p(b){const x=a.parseLocation(b),[,y,S]=a.getMatchedRoutes(x.pathname);return S===void 0?{routeId:"__notFound__",fullPath:x.pathname,pathname:x.pathname,params:y,search:a.options.parseSearch(b.search)}:{routeId:S.id,fullPath:S.fullPath,pathname:x.pathname,params:y,search:a.options.parseSearch(b.search)}}const m=p(_.currentLocation),k=p(_.nextLocation);if(m.routeId==="__notFound__"&&k.routeId!=="__notFound__")return!1;const w=await t({action:_.action,current:m,next:k});if(!o)return w;if(!w)return!1;const v=await new Promise(b=>{u({status:"blocked",current:m,next:k,action:_.action,proceed:()=>b(!1),reset:()=>b(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return s?void 0:i.block({blockerFn:d,enableBeforeUnload:n})},[t,n,s,o,i,a]),c}function sD(e){const r=Vo({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||r;return qc(t.stores.__store,Tj(e,t))}function gX(e){const r=Vo();return qc(r.stores.location,Tj(e,r))}const ub=new WeakMap,M1=new WeakMap;function yi(e,r,t="*"){var n;for(const s of e.getQueryCache().findAll({queryKey:r}))ub.set(s,(ub.get(s)??0)+1),(n=M1.get(s))==null||n.add(t)}function i0(e,r,t,n=!0){if(!r)return e;const s=new Map(r.map(c=>[c.id,c])),o=new Set(e.map(c=>c.id)),a=r.filter(c=>t.has(c.id)&&!o.has(c.id)),i=e.filter(c=>!t.has(c.id)||s.has(c.id)).map(c=>t.has(c.id)?s.get(c.id)??c:c);return n?[...a,...i]:[...i,...a]}async function vp(e,r,t,n=(s,o)=>o??s){const s=e.getQueryCache().find({queryKey:r,exact:!0}),o=s?ub.get(s):void 0,a=await t();if(!s||ub.get(s)===o||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:r,exact:!0})!==s)return a;e.setQueryData(r,c=>c??a);const i=new Set;M1.set(s,i);try{const c=await t();return i.size?n(c,e.getQueryData(r),i):c}finally{M1.get(s)===i&&M1.delete(s)}}const np=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function oD(e){const r=e.queryKey[2];if(r==="resolvedFile")return np(e.queryKey[7]);const t=r==="getProjectFile"?e.queryKey[5]:r==="getCodeTree"?e.queryKey[4]:null;return typeof t=="object"&&t!==null&&"ref"in t&&np(t.ref)}function $a(e,r=Si(),t,n=!1){if(!Wr(r))return;const s={queryKey:r,predicate:o=>e.includes(String(o.queryKey[2]))&&!oD(o)&&(!t||t(o))};n?Je.cancelQueries(s).then(()=>{Wr(r)&&Je.invalidateQueries(s)}):Je.invalidateQueries(s)}const aD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],Mj=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],vX=["listProjects","listProjectActivity","listSidebarChatSessions","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...Mj,...aD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function bX(e,r=Si(),t=!1){const n=Je.getQueryData([...r,"listChatSessions",e])??[],s=Je.getQueryData([...r,"listRuns",e])??[],o=Je.getQueryData([...r,"listExperiments",e])??[];$a([...aD,...Mj,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],r,a=>{const i=a.queryKey[2];return i==="getRunDiff"?s.some(c=>c.id===a.queryKey[3]):i==="getExperimentDiff"?o.some(c=>c.id===a.queryKey[3]):i==="getSessionWorktree"?n.some(c=>c.id===a.queryKey[3]):i==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function by(e){const r=Si();Pc.add(e),yi(Je,[...r,"listChatSessions"],e),Je.setQueriesData({queryKey:[...r,"listChatSessions"]},t=>t==null?void 0:t.filter(n=>n.id!==e));for(const t of["getChatMessages","getSessionWorktree"])xj({queryKey:[...r,t,e]})}function yX(e){const r=Si(),t=Je.getQueryData([...r,"listChatSessions",e]);for(const n of t??[])by(n.id);xj({queryKey:r,predicate:n=>n.queryKey.slice(3).includes(e)})}const xX={hf:["getHfSettings","getComputeSettings","getEnvVars"],tinker:["getTinkerSettings","getComputeSettings","getEnvVars"],k8s:["getK8sSettings","getComputeSettings"],modal:["getModalSettings","getComputeSettings","getEnvVars"],slurm:["getSlurmSettings","getComputeSettings"],ray:["getRaySettings","getComputeSettings"],env:["getEnvVars","getHfSettings","getTinkerSettings","getModalSettings","getSlurmSettings","getRaySettings","getK8sSettings","getOpenResearchSettings","getComputeSettings","getHarnesses"],"data-dir":["getDataDir"],ssh:["getSshSettings","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function wX(e,r){var a;if(!Wr(r))return;const t=(i,c=r,u)=>$a(i,c,u,!0),n=e.split("?")[0];if(/\/(ui-state|open|reveal|prewarm|validate|preflight)$/.test(n))return;const s=(a=/^\/api\/settings\/([^/]+)/.exec(n))==null?void 0:a[1];if(s){t(xX[s]??[],r);return}if(n.startsWith("/api/local-models")&&!/\/(discover|check)$/.test(n)){t(["getLocalModels","getHarnesses"],r);return}if(n==="/api/user-skills"){t(["listUserSkills","getSkills","getSkillContent"],r);return}if(n==="/api/latex-templates"){t(["listLatexTemplates"],r);return}if(n==="/api/overleaf/token"){t(["getOverleafSettings","getOverleafState","getOverleafStatus"],r);return}if(n.startsWith("/api/update/")){t(["getUpdateStatus","getLocalMachine"],r);return}if(n.startsWith("/api/remote/")||n.startsWith("/_orx/")){t(["listRemoteSessions"],r),Je.invalidateQueries({queryKey:["gateway","runtime"]});return}if(n.startsWith("/api/chat/")){t(["listSidebarChatSessions"],r),n==="/api/chat/sessions"&&t(["getProjectStarterPrompts","listProjectActivity"],r);return}const o=/^\/api\/projects\/([^/]+)(.*)$/.exec(n);if(o){const[,i,c]=o;if(c.startsWith("/file")){bX(i,r,!0);return}t(["listProjects","listProjectActivity","listSidebarChatSessions"],r),t(["getProjectGitStatus","getCodeTree","getProjectStarterPrompts"],r,u=>u.queryKey[3]===i);return}(n==="/api/projects"||n==="/api/onboarding/complete")&&t(["listProjects","listProjectActivity","getUiState","getProfile"],r)}const kX={},jX="en",Oj=["en","zh-CN","fa","ar","es","hi","ko","ja","pl"],iD="orx:locale",$j=["localStorage","preferredLanguage","baseLocale"],w9=[],ug=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let k9=!1,C=()=>{var t;let e=$j;!ug&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=uD(window.location.href));const r=SX(e);if(r)return k9||(k9=!0,cD(r,{reload:!1})),r;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function SX(e,r){let t;for(const n of e){if(n==="baseLocale")t=jX;else if(n==="preferredLanguage"&&!ug)t=AX();else if(n==="localStorage"&&!ug)t=localStorage.getItem(iD)??void 0;else if(_D(n)&&_b.has(n)){const o=_b.get(n);if(o){const a=o.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return EX(a)}}const s=_g(t);if(s)return s}}const CX=e=>{window.location.reload()};let cD=(e,r)=>{var i;const t={reload:!0,...r};let n;try{n=C()}catch{}const s=[];let o=$j;!ug&&typeof window<"u"&&((i=window.location)!=null&&i.href)&&(o=uD(window.location.href));for(const c of o)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(iD,e);else if(_D(c)&&_b.has(c)){const u=_b.get(c);if(u){let d=u.setLocale(e);d instanceof Promise&&(d=d.catch(_=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:_})}),s.push(d))}}}const a=()=>{!ug&&t.reload&&window.location&&e!==n&&CX()};if(s.length)return Promise.all(s).then(()=>{a()});a()},zX=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function _g(e){if(typeof e!="string")return;const r=e.toLowerCase();for(const t of Oj)if(t.toLowerCase()===r)return t}function lD(e){return!!e&&Oj.some(r=>r===e)}function EX(e){const r=_g(e);if(r)return r;throw new Error(`Invalid locale: ${e}. Expected one of: ${Oj.join(", ")}`)}function NX(e,r){return e.exec(r.href)}function AX(){var r;if(!((r=navigator==null?void 0:navigator.languages)!=null&&r.length))return;const e=navigator.languages.map(t=>({fullTag:t,baseTag:t.split("-")[0]}));for(const t of e){const n=_g(t.fullTag);if(n)return n;const s=_g(t.baseTag);if(s)return s}}function TX(e){return RX(e)}function RX(e){const r=typeof e=="string"?new URL(e,zX()):new URL(e),t=r.pathname.split("/").filter(Boolean);return t.length>0&&_g(t[0])&&(r.pathname="/"+t.slice(1).join("/")),r}let j9,S9;function MX(e){if(w9.length===0)return;const r=typeof e=="string"?e:e.href;if(j9===r)return S9;const t=new URL(r,"http://example.com"),n=TX(t),s=n.href===t.href?[t]:[t,n];let o;for(const a of s){for(const i of w9){const c=new kX(i.match,a.href);if(NX(c,a)){o=i;break}}if(o)break}return j9=r,S9=o,o}function uD(e){const r=MX(e);return r&&r.exclude!==!0&&Array.isArray(r.strategy)?r.strategy:$j}const _b=new Map;function _D(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const OX=e=>`Actions for ${e==null?void 0:e.name}`,$X=e=>`${e==null?void 0:e.name} 的操作`,DX=e=>`عملیات ${e==null?void 0:e.name}`,LX=e=>`إجراءات ${e==null?void 0:e.name}`,IX=e=>`Acciones para ${e==null?void 0:e.name}`,PX=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,BX=e=>`${e==null?void 0:e.name} 작업`,FX=e=>`${e==null?void 0:e.name} の操作`,HX=e=>`Operacje na elemencie ${e==null?void 0:e.name}`,qX=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?$X(e):t==="fa"?DX(e):t==="ar"?LX(e):t==="es"?IX(e):t==="hi"?PX(e):t==="ko"?BX(e):t==="ja"?FX(e):t==="pl"?HX(e):OX(e)}),UX=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,GX=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,WX=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,KX=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,VX=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,QX=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,XX=e=>`${e==null?void 0:e.path} — Space로 미리보기; 더블 클릭하거나 Enter를 눌러 탭에서 열린 상태 유지`,YX=e=>`${e==null?void 0:e.path} — Space でプレビュー。ダブルクリックまたは Enter でタブを開いたままにする`,ZX=e=>`${e==null?void 0:e.path} — naciśnij spację, aby wyświetlić podgląd; kliknij dwukrotnie lub naciśnij Enter, aby pozostawić kartę otwartą`,JX=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?GX(e):t==="fa"?WX(e):t==="ar"?KX(e):t==="es"?VX(e):t==="hi"?QX(e):t==="ko"?XX(e):t==="ja"?YX(e):t==="pl"?ZX(e):UX(e)}),eY=e=>`Branch: ${e==null?void 0:e.branch}`,tY=e=>`分支:${e==null?void 0:e.branch}`,rY=e=>`شاخه: ${e==null?void 0:e.branch}`,nY=e=>`الفرع: ${e==null?void 0:e.branch}`,sY=e=>`Rama: ${e==null?void 0:e.branch}`,oY=e=>`ब्रांच: ${e==null?void 0:e.branch}`,aY=e=>`브랜치: ${e==null?void 0:e.branch}`,iY=e=>`ブランチ: ${e==null?void 0:e.branch}`,cY=e=>`Gałąź: ${e==null?void 0:e.branch}`,lY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?tY(e):t==="fa"?rY(e):t==="ar"?nY(e):t==="es"?sY(e):t==="hi"?oY(e):t==="ko"?aY(e):t==="ja"?iY(e):t==="pl"?cY(e):eY(e)}),uY=e=>`Browse code on ${e==null?void 0:e.branch}`,_Y=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,fY=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,dY=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,hY=e=>`Explorar el código en ${e==null?void 0:e.branch}`,pY=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,mY=e=>`${e==null?void 0:e.branch}의 코드 탐색`,gY=e=>`${e==null?void 0:e.branch} のコードを閲覧`,vY=e=>`Przeglądaj kod gałęzi ${e==null?void 0:e.branch}`,fD=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?_Y(e):t==="fa"?fY(e):t==="ar"?dY(e):t==="es"?hY(e):t==="hi"?pY(e):t==="ko"?mY(e):t==="ja"?gY(e):t==="pl"?vY(e):uY(e)}),bY=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,yY=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,xY=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,wY=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,kY=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,jY=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,SY=e=>`이 채팅의 에이전트 환경 및 모델: ${e==null?void 0:e.label}`,CY=e=>`このチャットのエージェント環境とモデル: ${e==null?void 0:e.label}`,zY=e=>`Środowisko agenta i model dla tego czatu: ${e==null?void 0:e.label}`,EY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yY(e):t==="fa"?xY(e):t==="ar"?wY(e):t==="es"?kY(e):t==="hi"?jY(e):t==="ko"?SY(e):t==="ja"?CY(e):t==="pl"?zY(e):bY(e)}),NY=e=>`Collapse ${e==null?void 0:e.name}`,AY=e=>`折叠 ${e==null?void 0:e.name}`,TY=e=>`بستن ${e==null?void 0:e.name}`,RY=e=>`طيّ ${e==null?void 0:e.name}`,MY=e=>`Contraer ${e==null?void 0:e.name}`,OY=e=>`${e==null?void 0:e.name} समेटें`,$Y=e=>`${e==null?void 0:e.name} 접기`,DY=e=>`${e==null?void 0:e.name} を折りたたむ`,LY=e=>`Zwiń ${e==null?void 0:e.name}`,IY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?AY(e):t==="fa"?TY(e):t==="ar"?RY(e):t==="es"?MY(e):t==="hi"?OY(e):t==="ko"?$Y(e):t==="ja"?DY(e):t==="pl"?LY(e):NY(e)}),PY=e=>`Committed changes versus ${e==null?void 0:e.parent}`,BY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,FY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,HY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,qY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,UY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,GY=e=>`${e==null?void 0:e.parent} 대비 커밋된 변경 사항`,WY=e=>`${e==null?void 0:e.parent} に対するコミット済みの変更`,KY=e=>`Zatwierdzone zmiany względem ${e==null?void 0:e.parent}`,VY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?BY(e):t==="fa"?FY(e):t==="ar"?HY(e):t==="es"?qY(e):t==="hi"?UY(e):t==="ko"?GY(e):t==="ja"?WY(e):t==="pl"?KY(e):PY(e)}),QY=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,XY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,YY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,ZY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,JY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,eZ=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,tZ=e=>`${e==null?void 0:e.parent} 대비 커밋된 변경 사항 (차이가 잘렸으며 개수는 최솟값입니다)`,rZ=e=>`${e==null?void 0:e.parent} に対するコミット済みの変更(差分は省略されており、件数は下限値です)`,nZ=e=>`Zatwierdzone zmiany względem ${e==null?void 0:e.parent} (diff został ucięty, liczniki podają wartości minimalne)`,sZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?XY(e):t==="fa"?YY(e):t==="ar"?ZY(e):t==="es"?JY(e):t==="hi"?eZ(e):t==="ko"?tZ(e):t==="ja"?rZ(e):t==="pl"?nZ(e):QY(e)}),oZ=e=>`Copy ${e==null?void 0:e.value}`,aZ=e=>`复制 ${e==null?void 0:e.value}`,iZ=e=>`کپی ${e==null?void 0:e.value}`,cZ=e=>`نسخ ${e==null?void 0:e.value}`,lZ=e=>`Copiar ${e==null?void 0:e.value}`,uZ=e=>`${e==null?void 0:e.value} कॉपी करें`,_Z=e=>`${e==null?void 0:e.value} 복사`,fZ=e=>`${e==null?void 0:e.value} をコピー`,dZ=e=>`Kopiuj ${e==null?void 0:e.value}`,hZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?aZ(e):t==="fa"?iZ(e):t==="ar"?cZ(e):t==="es"?lZ(e):t==="hi"?uZ(e):t==="ko"?_Z(e):t==="ja"?fZ(e):t==="pl"?dZ(e):oZ(e)}),pZ=e=>`Delete ${e==null?void 0:e.name}`,mZ=e=>`删除 ${e==null?void 0:e.name}`,gZ=e=>`حذف ${e==null?void 0:e.name}`,vZ=e=>`حذف ${e==null?void 0:e.name}`,bZ=e=>`Eliminar ${e==null?void 0:e.name}`,yZ=e=>`${e==null?void 0:e.name} हटाएं`,xZ=e=>`${e==null?void 0:e.name} 삭제`,wZ=e=>`${e==null?void 0:e.name} を削除`,kZ=e=>`Usuń ${e==null?void 0:e.name}`,C9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mZ(e):t==="fa"?gZ(e):t==="ar"?vZ(e):t==="es"?bZ(e):t==="hi"?yZ(e):t==="ko"?xZ(e):t==="ja"?wZ(e):t==="pl"?kZ(e):pZ(e)}),jZ=e=>`Download ${e==null?void 0:e.name}`,SZ=e=>`下载 ${e==null?void 0:e.name}`,CZ=e=>`بارگیری ${e==null?void 0:e.name}`,zZ=e=>`تنزيل ${e==null?void 0:e.name}`,EZ=e=>`Descargar ${e==null?void 0:e.name}`,NZ=e=>`${e==null?void 0:e.name} डाउनलोड करें`,AZ=e=>`${e==null?void 0:e.name} 다운로드`,TZ=e=>`${e==null?void 0:e.name} をダウンロード`,RZ=e=>`Pobierz ${e==null?void 0:e.name}`,fb=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?SZ(e):t==="fa"?CZ(e):t==="ar"?zZ(e):t==="es"?EZ(e):t==="hi"?NZ(e):t==="ko"?AZ(e):t==="ja"?TZ(e):t==="pl"?RZ(e):jZ(e)}),MZ=e=>`Expand ${e==null?void 0:e.name}`,OZ=e=>`展开 ${e==null?void 0:e.name}`,$Z=e=>`باز کردن ${e==null?void 0:e.name}`,DZ=e=>`توسيع ${e==null?void 0:e.name}`,LZ=e=>`Expandir ${e==null?void 0:e.name}`,IZ=e=>`${e==null?void 0:e.name} फैलाएं`,PZ=e=>`${e==null?void 0:e.name} 펼치기`,BZ=e=>`${e==null?void 0:e.name} を展開`,FZ=e=>`Rozwiń ${e==null?void 0:e.name}`,HZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?OZ(e):t==="fa"?$Z(e):t==="ar"?DZ(e):t==="es"?LZ(e):t==="hi"?IZ(e):t==="ko"?PZ(e):t==="ja"?BZ(e):t==="pl"?FZ(e):MZ(e)}),qZ=e=>`Hide additional ${e==null?void 0:e.target}`,UZ=e=>`隐藏其余${e==null?void 0:e.target}`,GZ=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,WZ=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,KZ=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,VZ=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,QZ=e=>`추가 ${e==null?void 0:e.target} 숨기기`,XZ=e=>`追加の ${e==null?void 0:e.target} を非表示`,YZ=e=>`Ukryj dodatkowe ${e==null?void 0:e.target}`,ZZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?UZ(e):t==="fa"?GZ(e):t==="ar"?WZ(e):t==="es"?KZ(e):t==="hi"?VZ(e):t==="ko"?QZ(e):t==="ja"?XZ(e):t==="pl"?YZ(e):qZ(e)}),JZ=e=>`Hide error details for ${e==null?void 0:e.activity}`,eJ=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,tJ=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,rJ=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,nJ=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,sJ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,oJ=e=>`${e==null?void 0:e.activity} 오류 상세 정보 숨기기`,aJ=e=>`${e==null?void 0:e.activity} のエラー詳細を非表示`,iJ=e=>`Ukryj szczegóły błędu działania ${e==null?void 0:e.activity}`,cJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?eJ(e):t==="fa"?tJ(e):t==="ar"?rJ(e):t==="es"?nJ(e):t==="hi"?sJ(e):t==="ko"?oJ(e):t==="ja"?aJ(e):t==="pl"?iJ(e):JZ(e)}),lJ=e=>`${e==null?void 0:e.count} consecutive identical calls`,uJ=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,_J=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,fJ=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,dJ=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,hJ=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,pJ=e=>`동일한 호출 ${e==null?void 0:e.count}회 연속`,mJ=e=>`同一の呼び出しが ${e==null?void 0:e.count} 回連続`,gJ=e=>`Kolejne identyczne wywołania: ${e==null?void 0:e.count}`,vJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?uJ(e):t==="fa"?_J(e):t==="ar"?fJ(e):t==="es"?dJ(e):t==="hi"?hJ(e):t==="ko"?pJ(e):t==="ja"?mJ(e):t==="pl"?gJ(e):lJ(e)}),bJ=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,yJ=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,xJ=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,wJ=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,kJ=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,jJ=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,SJ=e=>`${e==null?void 0:e.name} — 더블 클릭하거나 Enter를 눌러 열린 상태 유지`,CJ=e=>`${e==null?void 0:e.name} — ダブルクリックまたは Enter で開いたままにする`,zJ=e=>`${e==null?void 0:e.name} — kliknij dwukrotnie lub naciśnij Enter, aby pozostawić otwarte`,EJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yJ(e):t==="fa"?xJ(e):t==="ar"?wJ(e):t==="es"?kJ(e):t==="hi"?jJ(e):t==="ko"?SJ(e):t==="ja"?CJ(e):t==="pl"?zJ(e):bJ(e)}),NJ=e=>`Open ${e==null?void 0:e.branch} on GitHub`,AJ=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,TJ=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,RJ=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,MJ=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,OJ=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,$J=e=>`GitHub에서 ${e==null?void 0:e.branch} 열기`,DJ=e=>`GitHub で ${e==null?void 0:e.branch} を開く`,LJ=e=>`Otwórz gałąź ${e==null?void 0:e.branch} w GitHubie`,dD=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?AJ(e):t==="fa"?TJ(e):t==="ar"?RJ(e):t==="es"?MJ(e):t==="hi"?OJ(e):t==="ko"?$J(e):t==="ja"?DJ(e):t==="pl"?LJ(e):NJ(e)}),IJ=e=>`Open experiment ${e==null?void 0:e.name}`,PJ=e=>`打开实验 ${e==null?void 0:e.name}`,BJ=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,FJ=e=>`فتح التجربة ${e==null?void 0:e.name}`,HJ=e=>`Abrir el experimento ${e==null?void 0:e.name}`,qJ=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,UJ=e=>`실험 ${e==null?void 0:e.name} 열기`,GJ=e=>`実験 ${e==null?void 0:e.name} を開く`,WJ=e=>`Otwórz eksperyment ${e==null?void 0:e.name}`,KJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?PJ(e):t==="fa"?BJ(e):t==="ar"?FJ(e):t==="es"?HJ(e):t==="hi"?qJ(e):t==="ko"?UJ(e):t==="ja"?GJ(e):t==="pl"?WJ(e):IJ(e)}),VJ=e=>`Open ${e==null?void 0:e.path} in the right pane`,QJ=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,XJ=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,YJ=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,ZJ=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,JJ=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,eee=e=>`오른쪽 패널에서 ${e==null?void 0:e.path} 열기`,tee=e=>`右側のペインで ${e==null?void 0:e.path} を開く`,ree=e=>`Otwórz ${e==null?void 0:e.path} w prawym panelu`,nee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?QJ(e):t==="fa"?XJ(e):t==="ar"?YJ(e):t==="es"?ZJ(e):t==="hi"?JJ(e):t==="ko"?eee(e):t==="ja"?tee(e):t==="pl"?ree(e):VJ(e)}),see=e=>`Open logs for run ${e==null?void 0:e.run}`,oee=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,aee=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,iee=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,cee=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,lee=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,uee=e=>`실행 ${e==null?void 0:e.run}의 로그 열기`,_ee=e=>`実行 ${e==null?void 0:e.run} のログを開く`,fee=e=>`Otwórz logi uruchomienia ${e==null?void 0:e.run}`,dee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?oee(e):t==="fa"?aee(e):t==="ar"?iee(e):t==="es"?cee(e):t==="hi"?lee(e):t==="ko"?uee(e):t==="ja"?_ee(e):t==="pl"?fee(e):see(e)}),hee=e=>`Open ${e==null?void 0:e.name} on GitHub`,pee=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,mee=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,gee=e=>`فتح ${e==null?void 0:e.name} على GitHub`,vee=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,bee=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,yee=e=>`GitHub에서 ${e==null?void 0:e.name} 열기`,xee=e=>`GitHub で ${e==null?void 0:e.name} を開く`,wee=e=>`Otwórz ${e==null?void 0:e.name} w GitHubie`,U4=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?pee(e):t==="fa"?mee(e):t==="ar"?gee(e):t==="es"?vee(e):t==="hi"?bee(e):t==="ko"?yee(e):t==="ja"?xee(e):t==="pl"?wee(e):hee(e)}),kee=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,jee=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,See=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,Cee=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,zee=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,Eee=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,Nee=e=>`오른쪽 패널에서 실행 ${e==null?void 0:e.id}의 로그 열기`,Aee=e=>`右側のペインで実行 ${e==null?void 0:e.id} のログを開く`,Tee=e=>`Otwórz logi uruchomienia ${e==null?void 0:e.id} w prawym panelu`,Ree=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?jee(e):t==="fa"?See(e):t==="ar"?Cee(e):t==="es"?zee(e):t==="hi"?Eee(e):t==="ko"?Nee(e):t==="ja"?Aee(e):t==="pl"?Tee(e):kee(e)}),Mee=e=>`Overleaf — ${e==null?void 0:e.status}`,Oee=e=>`Overleaf — ${e==null?void 0:e.status}`,$ee=e=>`Overleaf — ${e==null?void 0:e.status}`,Dee=e=>`Overleaf — ${e==null?void 0:e.status}`,Lee=e=>`Overleaf — ${e==null?void 0:e.status}`,Iee=e=>`Overleaf — ${e==null?void 0:e.status}`,Pee=e=>`Overleaf — ${e==null?void 0:e.status}`,Bee=e=>`Overleaf — ${e==null?void 0:e.status}`,Fee=e=>`Overleaf — ${e==null?void 0:e.status}`,Hee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Oee(e):t==="fa"?$ee(e):t==="ar"?Dee(e):t==="es"?Lee(e):t==="hi"?Iee(e):t==="ko"?Pee(e):t==="ja"?Bee(e):t==="pl"?Fee(e):Mee(e)}),qee=e=>`Preview /${e==null?void 0:e.name} skill`,Uee=e=>`预览 /${e==null?void 0:e.name} 技能`,Gee=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,Wee=e=>`معاينة مهارة /${e==null?void 0:e.name}`,Kee=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,Vee=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,Qee=e=>`/${e==null?void 0:e.name} 스킬 미리보기`,Xee=e=>`/${e==null?void 0:e.name} スキルをプレビュー`,Yee=e=>`Podgląd umiejętności /${e==null?void 0:e.name}`,Zee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Uee(e):t==="fa"?Gee(e):t==="ar"?Wee(e):t==="es"?Kee(e):t==="hi"?Vee(e):t==="ko"?Qee(e):t==="ja"?Xee(e):t==="pl"?Yee(e):qee(e)}),Jee=e=>`Remove annotation ${e==null?void 0:e.number}`,ete=e=>`移除批注 ${e==null?void 0:e.number}`,tte=e=>`حذف یادداشت ${e==null?void 0:e.number}`,rte=e=>`إزالة التعليق ${e==null?void 0:e.number}`,nte=e=>`Quitar la anotación ${e==null?void 0:e.number}`,ste=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,ote=e=>`주석 ${e==null?void 0:e.number} 제거`,ate=e=>`注釈 ${e==null?void 0:e.number} を削除`,ite=e=>`Usuń adnotację ${e==null?void 0:e.number}`,cte=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ete(e):t==="fa"?tte(e):t==="ar"?rte(e):t==="es"?nte(e):t==="hi"?ste(e):t==="ko"?ote(e):t==="ja"?ate(e):t==="pl"?ite(e):Jee(e)}),lte=e=>`Remove ${e==null?void 0:e.name}`,ute=e=>`移除 ${e==null?void 0:e.name}`,_te=e=>`حذف ${e==null?void 0:e.name}`,fte=e=>`إزالة ${e==null?void 0:e.name}`,dte=e=>`Quitar ${e==null?void 0:e.name}`,hte=e=>`${e==null?void 0:e.name} हटाएं`,pte=e=>`${e==null?void 0:e.name} 제거`,mte=e=>`${e==null?void 0:e.name} を削除`,gte=e=>`Usuń ${e==null?void 0:e.name}`,vte=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ute(e):t==="fa"?_te(e):t==="ar"?fte(e):t==="es"?dte(e):t==="hi"?hte(e):t==="ko"?pte(e):t==="ja"?mte(e):t==="pl"?gte(e):lte(e)}),bte=e=>`Remove queued message: ${e==null?void 0:e.text}`,yte=e=>`移除排队消息:${e==null?void 0:e.text}`,xte=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,wte=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,kte=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,jte=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,Ste=e=>`대기 메시지 제거: ${e==null?void 0:e.text}`,Cte=e=>`待機中のメッセージを削除: ${e==null?void 0:e.text}`,zte=e=>`Usuń wiadomość z kolejki: ${e==null?void 0:e.text}`,Ete=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yte(e):t==="fa"?xte(e):t==="ar"?wte(e):t==="es"?kte(e):t==="hi"?jte(e):t==="ko"?Ste(e):t==="ja"?Cte(e):t==="pl"?zte(e):bte(e)}),Nte=e=>`Retry queued message: ${e==null?void 0:e.text}`,Ate=e=>`重试排队消息:${e==null?void 0:e.text}`,Tte=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,Rte=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,Mte=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,Ote=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,$te=e=>`대기 메시지 다시 시도: ${e==null?void 0:e.text}`,Dte=e=>`待機中のメッセージを再試行: ${e==null?void 0:e.text}`,Lte=e=>`Ponów wiadomość z kolejki: ${e==null?void 0:e.text}`,Ite=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Ate(e):t==="fa"?Tte(e):t==="ar"?Rte(e):t==="es"?Mte(e):t==="hi"?Ote(e):t==="ko"?$te(e):t==="ja"?Dte(e):t==="pl"?Lte(e):Nte(e)}),Pte=e=>`Run ${e==null?void 0:e.value} in a terminal here`,Bte=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,Fte=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,Hte=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,qte=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,Ute=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,Gte=e=>`여기 터미널에서 ${e==null?void 0:e.value} 실행`,Wte=e=>`ここにあるターミナルで ${e==null?void 0:e.value} を実行`,Kte=e=>`Uruchom ${e==null?void 0:e.value} w terminalu tutaj`,z9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Bte(e):t==="fa"?Fte(e):t==="ar"?Hte(e):t==="es"?qte(e):t==="hi"?Ute(e):t==="ko"?Gte(e):t==="ja"?Wte(e):t==="pl"?Kte(e):Pte(e)}),Vte=e=>`Run ${e==null?void 0:e.id}`,Qte=e=>`运行 ${e==null?void 0:e.id}`,Xte=e=>`اجرای ${e==null?void 0:e.id}`,Yte=e=>`تشغيل ${e==null?void 0:e.id}`,Zte=e=>`Ejecución ${e==null?void 0:e.id}`,Jte=e=>`रन ${e==null?void 0:e.id}`,ere=e=>`실행 ${e==null?void 0:e.id}`,tre=e=>`実行 ${e==null?void 0:e.id}`,rre=e=>`Uruchomienie ${e==null?void 0:e.id}`,nre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Qte(e):t==="fa"?Xte(e):t==="ar"?Yte(e):t==="es"?Zte(e):t==="hi"?Jte(e):t==="ko"?ere(e):t==="ja"?tre(e):t==="pl"?rre(e):Vte(e)}),sre=e=>`Show error details for ${e==null?void 0:e.activity}`,ore=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,are=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,ire=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,cre=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,lre=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,ure=e=>`${e==null?void 0:e.activity} 오류 상세 정보 표시`,_re=e=>`${e==null?void 0:e.activity} のエラー詳細を表示`,fre=e=>`Pokaż szczegóły błędu działania ${e==null?void 0:e.activity}`,dre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ore(e):t==="fa"?are(e):t==="ar"?ire(e):t==="es"?cre(e):t==="hi"?lre(e):t==="ko"?ure(e):t==="ja"?_re(e):t==="pl"?fre(e):sre(e)}),hre=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,pre=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,mre=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,gre=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,vre=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,bre=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,yre=e=>`${e==null?void 0:e.target} ${e==null?void 0:e.count}개 더 표시`,xre=e=>`${e==null?void 0:e.target} をさらに ${e==null?void 0:e.count} 件表示`,wre=e=>`Pokaż więcej (${e==null?void 0:e.count}): ${e==null?void 0:e.target}`,kre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?pre(e):t==="fa"?mre(e):t==="ar"?gre(e):t==="es"?vre(e):t==="hi"?bre(e):t==="ko"?yre(e):t==="ja"?xre(e):t==="pl"?wre(e):hre(e)}),jre=e=>`${e==null?void 0:e.name} skill`,Sre=e=>`${e==null?void 0:e.name} 技能`,Cre=e=>`مهارت ${e==null?void 0:e.name}`,zre=e=>`مهارة ${e==null?void 0:e.name}`,Ere=e=>`Skill ${e==null?void 0:e.name}`,Nre=e=>`${e==null?void 0:e.name} स्किल`,Are=e=>`${e==null?void 0:e.name} 스킬`,Tre=e=>`${e==null?void 0:e.name} スキル`,Rre=e=>`Umiejętność ${e==null?void 0:e.name}`,Mre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Sre(e):t==="fa"?Cre(e):t==="ar"?zre(e):t==="es"?Ere(e):t==="hi"?Nre(e):t==="ko"?Are(e):t==="ja"?Tre(e):t==="pl"?Rre(e):jre(e)}),Ore=e=>`Value for ${e==null?void 0:e.name}`,$re=e=>`${e==null?void 0:e.name} 的值`,Dre=e=>`مقدار ${e==null?void 0:e.name}`,Lre=e=>`قيمة ${e==null?void 0:e.name}`,Ire=e=>`Valor de ${e==null?void 0:e.name}`,Pre=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,Bre=e=>`${e==null?void 0:e.name}의 값`,Fre=e=>`${e==null?void 0:e.name} の値`,Hre=e=>`Wartość dla ${e==null?void 0:e.name}`,qre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?$re(e):t==="fa"?Dre(e):t==="ar"?Lre(e):t==="es"?Ire(e):t==="hi"?Pre(e):t==="ko"?Bre(e):t==="ja"?Fre(e):t==="pl"?Hre(e):Ore(e)}),Ure=()=>"Agent reported back",Gre=()=>"智能体已返回结果",Wre=()=>"عامل نتیجه را گزارش کرد",Kre=()=>"أبلغ الوكيل بالنتيجة",Vre=()=>"El agente informó de los resultados",Qre=()=>"एजेंट ने रिपोर्ट भेजी",Xre=()=>"에이전트 결과 보고됨",Yre=()=>"エージェントが結果を報告しました",Zre=()=>"Agent przekazał wyniki",Jre=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Gre():t==="fa"?Wre():t==="ar"?Kre():t==="es"?Vre():t==="hi"?Qre():t==="ko"?Xre():t==="ja"?Yre():t==="pl"?Zre():Ure()}),ene=()=>"Browse",tne=()=>"浏览",rne=()=>"مرور",nne=()=>"تصفّح",sne=()=>"Navegar",one=()=>"ब्राउज़ करें",ane=()=>"탐색",ine=()=>"閲覧",cne=()=>"Przeglądaj",lne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?tne():t==="fa"?rne():t==="ar"?nne():t==="es"?sne():t==="hi"?one():t==="ko"?ane():t==="ja"?ine():t==="pl"?cne():ene()}),une=()=>"Browsing…",_ne=()=>"正在浏览…",fne=()=>"در حال مرور…",dne=()=>"جارٍ التصفّح…",hne=()=>"Navegando…",pne=()=>"ब्राउज़ कर रहा है…",mne=()=>"탐색 중…",gne=()=>"閲覧中…",vne=()=>"Przeglądanie…",bne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_ne():t==="fa"?fne():t==="ar"?dne():t==="es"?hne():t==="hi"?pne():t==="ko"?mne():t==="ja"?gne():t==="pl"?vne():une()}),yne=()=>"Checked experiment status and updated notes",xne=()=>"已检查实验状态并更新笔记",wne=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",kne=()=>"فحص حالة التجربة وحدّث الملاحظات",jne=()=>"Consultó el estado del experimento y actualizó las notas",Sne=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",Cne=()=>"실험 상태 확인 및 노트 업데이트 완료",zne=()=>"実験の状態を確認してノートを更新しました",Ene=()=>"Sprawdzono stan eksperymentu i zaktualizowano notatki",Nne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xne():t==="fa"?wne():t==="ar"?kne():t==="es"?jne():t==="hi"?Sne():t==="ko"?Cne():t==="ja"?zne():t==="pl"?Ene():yne()}),Ane=()=>"Closed an agent",Tne=()=>"已关闭智能体",Rne=()=>"عامل بسته شد",Mne=()=>"أغلق وكيلًا",One=()=>"Cerró un agente",$ne=()=>"एक एजेंट बंद किया",Dne=()=>"에이전트 종료 완료",Lne=()=>"エージェントを閉じました",Ine=()=>"Zamknięto agenta",Pne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Tne():t==="fa"?Rne():t==="ar"?Mne():t==="es"?One():t==="hi"?$ne():t==="ko"?Dne():t==="ja"?Lne():t==="pl"?Ine():Ane()}),Bne=()=>"Context compacted",Fne=()=>"上下文已压缩",Hne=()=>"زمینه فشرده شد",qne=()=>"تم ضغط السياق",Une=()=>"Contexto comprimido",Gne=()=>"कॉन्टेक्स्ट छोटा किया गया",Wne=()=>"컨텍스트 압축 완료",Kne=()=>"コンテキストを圧縮しました",Vne=()=>"Skrócono kontekst",Qne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fne():t==="fa"?Hne():t==="ar"?qne():t==="es"?Une():t==="hi"?Gne():t==="ko"?Wne():t==="ja"?Kne():t==="pl"?Vne():Bne()}),Xne=()=>"Compacting conversation…",Yne=()=>"正在压缩对话…",Zne=()=>"در حال فشرده‌سازی گفت‌وگو…",Jne=()=>"جارٍ ضغط المحادثة…",ese=()=>"Comprimiendo la conversación…",tse=()=>"बातचीत छोटी की जा रही है…",rse=()=>"대화 압축 중…",nse=()=>"会話を圧縮中…",sse=()=>"Skracanie kontekstu rozmowy…",E9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yne():t==="fa"?Zne():t==="ar"?Jne():t==="es"?ese():t==="hi"?tse():t==="ko"?rse():t==="ja"?nse():t==="pl"?sse():Xne()}),ose=()=>"Compacting failed",ase=()=>"压缩失败",ise=()=>"فشرده‌سازی ناموفق بود",cse=()=>"فشل الضغط",lse=()=>"Error al comprimir",use=()=>"छोटा करना विफल",_se=()=>"압축 실패",fse=()=>"圧縮に失敗しました",dse=()=>"Nie udało się skrócić kontekstu",hse=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ase():t==="fa"?ise():t==="ar"?cse():t==="es"?lse():t==="hi"?use():t==="ko"?_se():t==="ja"?fse():t==="pl"?dse():ose()}),pse=e=>`Created ${e==null?void 0:e.target}`,mse=e=>`已创建 ${e==null?void 0:e.target}`,gse=e=>`${e==null?void 0:e.target} ایجاد شد`,vse=e=>`أنشأ ${e==null?void 0:e.target}`,bse=e=>`Creó ${e==null?void 0:e.target}`,yse=e=>`${e==null?void 0:e.target} बनाया`,xse=e=>`${e==null?void 0:e.target} 생성 완료`,wse=e=>`${e==null?void 0:e.target} を作成しました`,kse=e=>`Utworzono ${e==null?void 0:e.target}`,jse=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mse(e):t==="fa"?gse(e):t==="ar"?vse(e):t==="es"?bse(e):t==="hi"?yse(e):t==="ko"?xse(e):t==="ja"?wse(e):t==="pl"?kse(e):pse(e)}),Sse=()=>"Delegate",Cse=()=>"委派",zse=()=>"واگذاری",Ese=()=>"تفويض",Nse=()=>"Delegar",Ase=()=>"सौंपें",Tse=()=>"위임",Rse=()=>"委任",Mse=()=>"Przekaż",Ose=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cse():t==="fa"?zse():t==="ar"?Ese():t==="es"?Nse():t==="hi"?Ase():t==="ko"?Tse():t==="ja"?Rse():t==="pl"?Mse():Sse()}),$se=()=>"Delegating…",Dse=()=>"正在委派…",Lse=()=>"در حال واگذاری…",Ise=()=>"جارٍ التفويض…",Pse=()=>"Delegando…",Bse=()=>"सौंप रहा है…",Fse=()=>"위임 중…",Hse=()=>"委任中…",qse=()=>"Przekazywanie zadania…",Use=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dse():t==="fa"?Lse():t==="ar"?Ise():t==="es"?Pse():t==="hi"?Bse():t==="ko"?Fse():t==="ja"?Hse():t==="pl"?qse():$se()}),Gse=e=>`Deleted ${e==null?void 0:e.target}`,Wse=e=>`已删除 ${e==null?void 0:e.target}`,Kse=e=>`${e==null?void 0:e.target} حذف شد`,Vse=e=>`حذف ${e==null?void 0:e.target}`,Qse=e=>`Eliminó ${e==null?void 0:e.target}`,Xse=e=>`${e==null?void 0:e.target} हटाया`,Yse=e=>`${e==null?void 0:e.target} 삭제 완료`,Zse=e=>`${e==null?void 0:e.target} を削除しました`,Jse=e=>`Usunięto ${e==null?void 0:e.target}`,eoe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Wse(e):t==="fa"?Kse(e):t==="ar"?Vse(e):t==="es"?Qse(e):t==="hi"?Xse(e):t==="ko"?Yse(e):t==="ja"?Zse(e):t==="pl"?Jse(e):Gse(e)}),toe=()=>"Edit",roe=()=>"编辑",noe=()=>"ویرایش",soe=()=>"تعديل",ooe=()=>"Editar",aoe=()=>"संपादित करें",ioe=()=>"편집",coe=()=>"編集",loe=()=>"Edytuj",hD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?roe():t==="fa"?noe():t==="ar"?soe():t==="es"?ooe():t==="hi"?aoe():t==="ko"?ioe():t==="ja"?coe():t==="pl"?loe():toe()}),uoe=e=>`Edited ${e==null?void 0:e.target}`,_oe=e=>`已编辑 ${e==null?void 0:e.target}`,foe=e=>`${e==null?void 0:e.target} ویرایش شد`,doe=e=>`عدّل ${e==null?void 0:e.target}`,hoe=e=>`Editó ${e==null?void 0:e.target}`,poe=e=>`${e==null?void 0:e.target} संपादित किया`,moe=e=>`${e==null?void 0:e.target} 수정 완료`,goe=e=>`${e==null?void 0:e.target} を編集しました`,voe=e=>`Edytowano ${e==null?void 0:e.target}`,boe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?_oe(e):t==="fa"?foe(e):t==="ar"?doe(e):t==="es"?hoe(e):t==="hi"?poe(e):t==="ko"?moe(e):t==="ja"?goe(e):t==="pl"?voe(e):uoe(e)}),yoe=()=>"Editing…",xoe=()=>"正在编辑…",woe=()=>"در حال ویرایش…",koe=()=>"جارٍ التعديل…",joe=()=>"Editando…",Soe=()=>"संपादित कर रहा है…",Coe=()=>"편집 중…",zoe=()=>"編集中…",Eoe=()=>"Edytowanie…",Noe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xoe():t==="fa"?woe():t==="ar"?koe():t==="es"?joe():t==="hi"?Soe():t==="ko"?Coe():t==="ja"?zoe():t==="pl"?Eoe():yoe()}),Aoe=e=>`${e==null?void 0:e.activity} for ${e==null?void 0:e.count} queries`,Toe=e=>`${e==null?void 0:e.activity},共 ${e==null?void 0:e.count} 个查询`,Roe=e=>`${e==null?void 0:e.activity} برای ${e==null?void 0:e.count} جستجو`,Moe=e=>`${e==null?void 0:e.activity} لـ ${e==null?void 0:e.count} استعلامات`,Ooe=e=>`${e==null?void 0:e.activity} para ${e==null?void 0:e.count} consultas`,$oe=e=>`${e==null?void 0:e.activity}: ${e==null?void 0:e.count} क्वेरी`,Doe=e=>`${e==null?void 0:e.count}개 검색어에 대한 ${e==null?void 0:e.activity}`,Loe=e=>`${e==null?void 0:e.count} 件の検索語について ${e==null?void 0:e.activity}`,Ioe=e=>`${e==null?void 0:e.activity} dla ${e==null?void 0:e.count} zapytań`,Poe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Toe(e):t==="fa"?Roe(e):t==="ar"?Moe(e):t==="es"?Ooe(e):t==="hi"?$oe(e):t==="ko"?Doe(e):t==="ja"?Loe(e):t==="pl"?Ioe(e):Aoe(e)}),Boe=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,Foe=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,Hoe=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,qoe=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,Uoe=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,Goe=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,Woe=e=>`“${e==null?void 0:e.query}”에 대한 ${e==null?void 0:e.activity}`,Koe=e=>`「${e==null?void 0:e.query}」について ${e==null?void 0:e.activity}`,Voe=e=>`${e==null?void 0:e.activity} dla „${e==null?void 0:e.query}”`,N9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Foe(e):t==="fa"?Hoe(e):t==="ar"?qoe(e):t==="es"?Uoe(e):t==="hi"?Goe(e):t==="ko"?Woe(e):t==="ja"?Koe(e):t==="pl"?Voe(e):Boe(e)}),Qoe=()=>"Imported from your terminal — new turns continue in the agent's own history",Xoe=()=>"从你的终端导入 — 新的回合将在智能体自己的历史中继续",Yoe=()=>"از ترمینال شما وارد شد — نوبت‌های جدید در تاریخچهٔ خود عامل ادامه می‌یابند",Zoe=()=>"مستورد من طرفيتك — الجولات الجديدة تتابع في سجل الوكيل نفسه",Joe=()=>"Importado desde tu terminal — los turnos nuevos continúan en el historial del agente",eae=()=>"आपके टर्मिनल से इम्पोर्ट किया गया — नए टर्न एजेंट के अपने इतिहास में जारी रहेंगे",tae=()=>"터미널에서 가져왔습니다. 새 대화는 에이전트 자체 기록에서 계속됩니다",rae=()=>"ターミナルから取り込みました。新しいターンはエージェント自身の履歴で続きます",nae=()=>"Zaimportowano z terminala — kolejne wiadomości będą zapisywane w historii agenta",sae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xoe():t==="fa"?Yoe():t==="ar"?Zoe():t==="es"?Joe():t==="hi"?eae():t==="ko"?tae():t==="ja"?rae():t==="pl"?nae():Qoe()}),oae=e=>`Listed files matching ${e==null?void 0:e.pattern}`,aae=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,iae=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,cae=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,lae=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,uae=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,_ae=e=>`${e==null?void 0:e.pattern}과(와) 일치하는 파일 목록 확인 완료`,fae=e=>`${e==null?void 0:e.pattern} に一致するファイルを一覧表示しました`,dae=e=>`Wyświetlono pliki pasujące do ${e==null?void 0:e.pattern}`,hae=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?aae(e):t==="fa"?iae(e):t==="ar"?cae(e):t==="es"?lae(e):t==="hi"?uae(e):t==="ko"?_ae(e):t==="ja"?fae(e):t==="pl"?dae(e):oae(e)}),pae=()=>"Load",mae=()=>"加载",gae=()=>"بارگیری",vae=()=>"تحميل",bae=()=>"Cargar",yae=()=>"लोड करें",xae=()=>"불러오기",wae=()=>"読み込み",kae=()=>"Wczytaj",jae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mae():t==="fa"?gae():t==="ar"?vae():t==="es"?bae():t==="hi"?yae():t==="ko"?xae():t==="ja"?wae():t==="pl"?kae():pae()}),Sae=()=>"Loaded a skill",Cae=()=>"已加载技能",zae=()=>"یک مهارت بارگیری شد",Eae=()=>"حمّل مهارة",Nae=()=>"Cargó una skill",Aae=()=>"एक स्किल लोड की",Tae=()=>"스킬 불러오기 완료",Rae=()=>"スキルを読み込みました",Mae=()=>"Wczytano umiejętność",Oae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cae():t==="fa"?zae():t==="ar"?Eae():t==="es"?Nae():t==="hi"?Aae():t==="ko"?Tae():t==="ja"?Rae():t==="pl"?Mae():Sae()}),$ae=e=>`Loaded ${e==null?void 0:e.name} skill`,Dae=e=>`已加载技能 ${e==null?void 0:e.name}`,Lae=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,Iae=e=>`حمّل مهارة ${e==null?void 0:e.name}`,Pae=e=>`Cargó la skill ${e==null?void 0:e.name}`,Bae=e=>`${e==null?void 0:e.name} स्किल लोड की`,Fae=e=>`${e==null?void 0:e.name} 스킬 불러오기 완료`,Hae=e=>`スキル ${e==null?void 0:e.name} を読み込みました`,qae=e=>`Wczytano umiejętność ${e==null?void 0:e.name}`,Uae=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Dae(e):t==="fa"?Lae(e):t==="ar"?Iae(e):t==="es"?Pae(e):t==="hi"?Bae(e):t==="ko"?Fae(e):t==="ja"?Hae(e):t==="pl"?qae(e):$ae(e)}),Gae=()=>"Loading…",Wae=()=>"正在加载…",Kae=()=>"در حال بارگیری…",Vae=()=>"جارٍ التحميل…",Qae=()=>"Cargando…",Xae=()=>"लोड हो रहा है…",Yae=()=>"불러오는 중…",Zae=()=>"読み込み中…",Jae=()=>"Wczytywanie…",eie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wae():t==="fa"?Kae():t==="ar"?Vae():t==="es"?Qae():t==="hi"?Xae():t==="ko"?Yae():t==="ja"?Zae():t==="pl"?Jae():Gae()}),tie=e=>`Opened ${e==null?void 0:e.target}`,rie=e=>`已打开 ${e==null?void 0:e.target}`,nie=e=>`${e==null?void 0:e.target} باز شد`,sie=e=>`فتح ${e==null?void 0:e.target}`,oie=e=>`Abrió ${e==null?void 0:e.target}`,aie=e=>`${e==null?void 0:e.target} खोला`,iie=e=>`${e==null?void 0:e.target} 열기 완료`,cie=e=>`${e==null?void 0:e.target} を開きました`,lie=e=>`Otwarto ${e==null?void 0:e.target}`,uie=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?rie(e):t==="fa"?nie(e):t==="ar"?sie(e):t==="es"?oie(e):t==="hi"?aie(e):t==="ko"?iie(e):t==="ja"?cie(e):t==="pl"?lie(e):tie(e)}),_ie=e=>`Ran ${e==null?void 0:e.command}`,fie=e=>`已运行 ${e==null?void 0:e.command}`,die=e=>`${e==null?void 0:e.command} اجرا شد`,hie=e=>`نفّذ ${e==null?void 0:e.command}`,pie=e=>`Ejecutó ${e==null?void 0:e.command}`,mie=e=>`${e==null?void 0:e.command} चलाया`,gie=e=>`${e==null?void 0:e.command} 실행 완료`,vie=e=>`${e==null?void 0:e.command} を実行しました`,bie=e=>`Uruchomiono ${e==null?void 0:e.command}`,yie=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fie(e):t==="fa"?die(e):t==="ar"?hie(e):t==="es"?pie(e):t==="hi"?mie(e):t==="ko"?gie(e):t==="ja"?vie(e):t==="pl"?bie(e):_ie(e)}),xie=()=>"Ran a sub-agent",wie=()=>"已运行子智能体",kie=()=>"یک عامل فرعی اجرا شد",jie=()=>"شغّل وكيلًا فرعيًا",Sie=()=>"Ejecutó un subagente",Cie=()=>"एक सब-एजेंट चलाया",zie=()=>"하위 에이전트 실행 완료",Eie=()=>"サブエージェントを実行しました",Nie=()=>"Uruchomiono podagenta",Aie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wie():t==="fa"?kie():t==="ar"?jie():t==="es"?Sie():t==="hi"?Cie():t==="ko"?zie():t==="ja"?Eie():t==="pl"?Nie():xie()}),Tie=()=>"Read",Rie=()=>"读取",Mie=()=>"خواندن",Oie=()=>"قراءة",$ie=()=>"Leer",Die=()=>"पढ़ें",Lie=()=>"읽기",Iie=()=>"読む",Pie=()=>"Odczytaj",Bie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rie():t==="fa"?Mie():t==="ar"?Oie():t==="es"?$ie():t==="hi"?Die():t==="ko"?Lie():t==="ja"?Iie():t==="pl"?Pie():Tie()}),Fie=()=>"Read experiment notes",Hie=()=>"已读取实验笔记",qie=()=>"یادداشت‌های آزمایش خوانده شد",Uie=()=>"قرأ ملاحظات التجربة",Gie=()=>"Leyó las notas del experimento",Wie=()=>"प्रयोग के नोट्स पढ़े",Kie=()=>"실험 노트 읽기 완료",Vie=()=>"実験ノートを読みました",Qie=()=>"Odczytano notatki eksperymentu",Xie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hie():t==="fa"?qie():t==="ar"?Uie():t==="es"?Gie():t==="hi"?Wie():t==="ko"?Kie():t==="ja"?Vie():t==="pl"?Qie():Fie()}),Yie=()=>"Read a paper",Zie=()=>"已读取论文",Jie=()=>"یک مقاله خوانده شد",ece=()=>"قرأ ورقة",tce=()=>"Leyó un paper",rce=()=>"एक पेपर पढ़ा",nce=()=>"논문 읽기 완료",sce=()=>"論文を読みました",oce=()=>"Przeczytano publikację",ace=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zie():t==="fa"?Jie():t==="ar"?ece():t==="es"?tce():t==="hi"?rce():t==="ko"?nce():t==="ja"?sce():t==="pl"?oce():Yie()}),ice=e=>`Read ${e==null?void 0:e.name} skill`,cce=e=>`已读取技能 ${e==null?void 0:e.name}`,lce=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,uce=e=>`قرأ مهارة ${e==null?void 0:e.name}`,_ce=e=>`Leyó la skill ${e==null?void 0:e.name}`,fce=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,dce=e=>`${e==null?void 0:e.name} 스킬 읽기 완료`,hce=e=>`スキル ${e==null?void 0:e.name} を読みました`,pce=e=>`Odczytano umiejętność ${e==null?void 0:e.name}`,z2=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?cce(e):t==="fa"?lce(e):t==="ar"?uce(e):t==="es"?_ce(e):t==="hi"?fce(e):t==="ko"?dce(e):t==="ja"?hce(e):t==="pl"?pce(e):ice(e)}),mce=e=>`Read ${e==null?void 0:e.target}`,gce=e=>`已读取 ${e==null?void 0:e.target}`,vce=e=>`${e==null?void 0:e.target} خوانده شد`,bce=e=>`قرأ ${e==null?void 0:e.target}`,yce=e=>`Leyó ${e==null?void 0:e.target}`,xce=e=>`${e==null?void 0:e.target} पढ़ा`,wce=e=>`${e==null?void 0:e.target} 읽기 완료`,kce=e=>`${e==null?void 0:e.target} を読みました`,jce=e=>`Odczytano ${e==null?void 0:e.target}`,bm=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?gce(e):t==="fa"?vce(e):t==="ar"?bce(e):t==="es"?yce(e):t==="hi"?xce(e):t==="ko"?wce(e):t==="ja"?kce(e):t==="pl"?jce(e):mce(e)}),Sce=()=>"Read a web page",Cce=()=>"已读取网页",zce=()=>"یک صفحهٔ وب خوانده شد",Ece=()=>"قرأ صفحة ويب",Nce=()=>"Leyó una página web",Ace=()=>"एक वेब पेज पढ़ा",Tce=()=>"웹 페이지 읽기 완료",Rce=()=>"ウェブページを読みました",Mce=()=>"Odczytano stronę internetową",Oce=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cce():t==="fa"?zce():t==="ar"?Ece():t==="es"?Nce():t==="hi"?Ace():t==="ko"?Tce():t==="ja"?Rce():t==="pl"?Mce():Sce()}),$ce=()=>"Reading…",Dce=()=>"正在读取…",Lce=()=>"در حال خواندن…",Ice=()=>"جارٍ القراءة…",Pce=()=>"Leyendo…",Bce=()=>"पढ़ रहा है…",Fce=()=>"읽는 중…",Hce=()=>"読み取り中…",qce=()=>"Odczytywanie…",Uce=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dce():t==="fa"?Lce():t==="ar"?Ice():t==="es"?Pce():t==="hi"?Bce():t==="ko"?Fce():t==="ja"?Hce():t==="pl"?qce():$ce()}),Gce=()=>"Resumed an agent",Wce=()=>"已恢复智能体",Kce=()=>"عامل از سر گرفته شد",Vce=()=>"استأنف عمل وكيل",Qce=()=>"Reanudó un agente",Xce=()=>"एक एजेंट फिर से शुरू किया",Yce=()=>"에이전트 재개 완료",Zce=()=>"エージェントを再開しました",Jce=()=>"Wznowiono działanie agenta",ele=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wce():t==="fa"?Kce():t==="ar"?Vce():t==="es"?Qce():t==="hi"?Xce():t==="ko"?Yce():t==="ja"?Zce():t==="pl"?Jce():Gce()}),tle=()=>"Review",rle=()=>"查看",nle=()=>"بازبینی",sle=()=>"مراجعة",ole=()=>"Revisar",ale=()=>"समीक्षा करें",ile=()=>"검토",cle=()=>"レビュー",lle=()=>"Przejrzyj",ule=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rle():t==="fa"?nle():t==="ar"?sle():t==="es"?ole():t==="hi"?ale():t==="ko"?ile():t==="ja"?cle():t==="pl"?lle():tle()}),_le=()=>"Reviewed run log",fle=()=>"已查看运行日志",dle=()=>"گزارش اجرا بازبینی شد",hle=()=>"راجع سجل التشغيل",ple=()=>"Revisó el log de la ejecución",mle=()=>"रन लॉग की समीक्षा की",gle=()=>"실행 로그 검토 완료",vle=()=>"実行ログを確認しました",ble=()=>"Przejrzano log uruchomienia",yle=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fle():t==="fa"?dle():t==="ar"?hle():t==="es"?ple():t==="hi"?mle():t==="ko"?gle():t==="ja"?vle():t==="pl"?ble():_le()}),xle=()=>"Reviewed run logs",wle=()=>"已查看运行日志",kle=()=>"گزارش‌های اجرا بازبینی شد",jle=()=>"راجع سجلات التشغيل",Sle=()=>"Revisó los logs de las ejecuciones",Cle=()=>"रन लॉग की समीक्षा की",zle=()=>"실행 로그 검토 완료",Ele=()=>"実行ログを確認しました",Nle=()=>"Przejrzano logi uruchomień",Ale=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wle():t==="fa"?kle():t==="ar"?jle():t==="es"?Sle():t==="hi"?Cle():t==="ko"?zle():t==="ja"?Ele():t==="pl"?Nle():xle()}),Tle=()=>"Reviewed experiment status and notes",Rle=()=>"已查看实验状态和笔记",Mle=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",Ole=()=>"راجع حالة التجربة وملاحظاتها",$le=()=>"Revisó el estado y las notas del experimento",Dle=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",Lle=()=>"실험 상태와 노트 검토 완료",Ile=()=>"実験の状態とノートを確認しました",Ple=()=>"Przejrzano stan eksperymentu i notatki",Ble=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rle():t==="fa"?Mle():t==="ar"?Ole():t==="es"?$le():t==="hi"?Dle():t==="ko"?Lle():t==="ja"?Ile():t==="pl"?Ple():Tle()}),Fle=()=>"Reviewing…",Hle=()=>"正在查看…",qle=()=>"در حال بازبینی…",Ule=()=>"جارٍ المراجعة…",Gle=()=>"Revisando…",Wle=()=>"समीक्षा कर रहा है…",Kle=()=>"검토 중…",Vle=()=>"レビュー中…",Qle=()=>"Przeglądanie…",Xle=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hle():t==="fa"?qle():t==="ar"?Ule():t==="es"?Gle():t==="hi"?Wle():t==="ko"?Kle():t==="ja"?Vle():t==="pl"?Qle():Fle()}),Yle=()=>"Run",Zle=()=>"运行",Jle=()=>"اجرا",eue=()=>"تشغيل",tue=()=>"Ejecutar",rue=()=>"चलाएं",nue=()=>"실행",sue=()=>"実行",oue=()=>"Uruchom",aue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zle():t==="fa"?Jle():t==="ar"?eue():t==="es"?tue():t==="hi"?rue():t==="ko"?nue():t==="ja"?sue():t==="pl"?oue():Yle()}),iue=()=>"Running…",cue=()=>"正在运行…",lue=()=>"در حال اجرا…",uue=()=>"جارٍ التشغيل…",_ue=()=>"Ejecutando…",fue=()=>"चल रहा है…",due=()=>"실행 중…",hue=()=>"実行中…",pue=()=>"Uruchamianie…",pD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?cue():t==="fa"?lue():t==="ar"?uue():t==="es"?_ue():t==="hi"?fue():t==="ko"?due():t==="ja"?hue():t==="pl"?pue():iue()}),mue=()=>"Search",gue=()=>"搜索",vue=()=>"جست‌وجو",bue=()=>"بحث",yue=()=>"Buscar",xue=()=>"खोजें",wue=()=>"검색",kue=()=>"検索",jue=()=>"Szukaj",Sue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gue():t==="fa"?vue():t==="ar"?bue():t==="es"?yue():t==="hi"?xue():t==="ko"?wue():t==="ja"?kue():t==="pl"?jue():mue()}),Cue=()=>"Searched alphaXiv full text",zue=()=>"已搜索 alphaXiv 全文",Eue=()=>"متن کامل alphaXiv جست‌وجو شد",Nue=()=>"بحث في نص alphaXiv الكامل",Aue=()=>"Buscó en el texto completo de alphaXiv",Tue=()=>"alphaXiv का पूरा टेक्स्ट खोजा",Rue=()=>"alphaXiv 전문 검색 완료",Mue=()=>"alphaXiv の全文を検索しました",Oue=()=>"Przeszukano pełne teksty w alphaXiv",$ue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zue():t==="fa"?Eue():t==="ar"?Nue():t==="es"?Aue():t==="hi"?Tue():t==="ko"?Rue():t==="ja"?Mue():t==="pl"?Oue():Cue()}),Due=()=>"Searched alphaXiv semantically",Lue=()=>"已对 alphaXiv 进行语义搜索",Iue=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",Pue=()=>"أجرى بحثًا دلاليًا في alphaXiv",Bue=()=>"Hizo una búsqueda semántica en alphaXiv",Fue=()=>"alphaXiv को सिमेंटिक रूप से खोजा",Hue=()=>"alphaXiv 의미 기반 검색 완료",que=()=>"alphaXiv で意味検索しました",Uue=()=>"Przeszukano semantycznie alphaXiv",Gue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lue():t==="fa"?Iue():t==="ar"?Pue():t==="es"?Bue():t==="hi"?Fue():t==="ko"?Hue():t==="ja"?que():t==="pl"?Uue():Due()}),Wue=()=>"Searched bioRxiv",Kue=()=>"已搜索 bioRxiv",Vue=()=>"bioRxiv جست‌وجو شد",Que=()=>"بحث في bioRxiv",Xue=()=>"Buscó en bioRxiv",Yue=()=>"bioRxiv खोजा",Zue=()=>"bioRxiv 검색 완료",Jue=()=>"bioRxiv を検索しました",e_e=()=>"Przeszukano bioRxiv",t_e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kue():t==="fa"?Vue():t==="ar"?Que():t==="es"?Xue():t==="hi"?Yue():t==="ko"?Zue():t==="ja"?Jue():t==="pl"?e_e():Wue()}),r_e=()=>"Searched code",n_e=()=>"已搜索代码",s_e=()=>"کد جست‌وجو شد",o_e=()=>"بحث في الشيفرة",a_e=()=>"Buscó en el código",i_e=()=>"कोड खोजा",c_e=()=>"코드 검색 완료",l_e=()=>"コードを検索しました",u_e=()=>"Przeszukano kod",E2=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?n_e():t==="fa"?s_e():t==="ar"?o_e():t==="es"?a_e():t==="hi"?i_e():t==="ko"?c_e():t==="ja"?l_e():t==="pl"?u_e():r_e()}),__e=e=>`Searched code for “${e==null?void 0:e.pattern}”`,f_e=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,d_e=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,h_e=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,p_e=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,m_e=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,g_e=e=>`코드에서 “${e==null?void 0:e.pattern}” 검색 완료`,v_e=e=>`コードで「${e==null?void 0:e.pattern}」を検索しました`,b_e=e=>`Przeszukano kod pod kątem „${e==null?void 0:e.pattern}”`,N2=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?f_e(e):t==="fa"?d_e(e):t==="ar"?h_e(e):t==="es"?p_e(e):t==="hi"?m_e(e):t==="ko"?g_e(e):t==="ja"?v_e(e):t==="pl"?b_e(e):__e(e)}),y_e=e=>`Searched images for “${e==null?void 0:e.query}”`,x_e=e=>`已搜索图片“${e==null?void 0:e.query}”`,w_e=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,k_e=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,j_e=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,S_e=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,C_e=e=>`“${e==null?void 0:e.query}” 이미지 검색 완료`,z_e=e=>`「${e==null?void 0:e.query}」の画像を検索しました`,E_e=e=>`Wyszukano obrazy: „${e==null?void 0:e.query}”`,N_e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?x_e(e):t==="fa"?w_e(e):t==="ar"?k_e(e):t==="es"?j_e(e):t==="hi"?S_e(e):t==="ko"?C_e(e):t==="ja"?z_e(e):t==="pl"?E_e(e):y_e(e)}),A_e=()=>"Searched the literature",T_e=()=>"已搜索文献",R_e=()=>"منابع علمی جست‌وجو شد",M_e=()=>"بحث في الأدبيات",O_e=()=>"Buscó en la literatura",$_e=()=>"साहित्य खोजा",D_e=()=>"문헌 검색 완료",L_e=()=>"文献を検索しました",I_e=()=>"Przeszukano literaturę",$v=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?T_e():t==="fa"?R_e():t==="ar"?M_e():t==="es"?O_e():t==="hi"?$_e():t==="ko"?D_e():t==="ja"?L_e():t==="pl"?I_e():A_e()}),P_e=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,B_e=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,F_e=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,H_e=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,q_e=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,U_e=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,G_e=e=>`페이지에서 “${e==null?void 0:e.pattern}” 검색 완료`,W_e=e=>`ページで「${e==null?void 0:e.pattern}」を検索しました`,K_e=e=>`Wyszukano na stronie „${e==null?void 0:e.pattern}”`,V_e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?B_e(e):t==="fa"?F_e(e):t==="ar"?H_e(e):t==="es"?q_e(e):t==="hi"?U_e(e):t==="ko"?G_e(e):t==="ja"?W_e(e):t==="pl"?K_e(e):P_e(e)}),Q_e=()=>"Searched OpenAlex",X_e=()=>"已搜索 OpenAlex",Y_e=()=>"OpenAlex جست‌وجو شد",Z_e=()=>"بحث في OpenAlex",J_e=()=>"Buscó en OpenAlex",efe=()=>"OpenAlex खोजा",tfe=()=>"OpenAlex 검색 완료",rfe=()=>"OpenAlex を検索しました",nfe=()=>"Przeszukano OpenAlex",sfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?X_e():t==="fa"?Y_e():t==="ar"?Z_e():t==="es"?J_e():t==="hi"?efe():t==="ko"?tfe():t==="ja"?rfe():t==="pl"?nfe():Q_e()}),ofe=()=>"Searched PubMed",afe=()=>"已搜索 PubMed",ife=()=>"PubMed جست‌وجو شد",cfe=()=>"بحث في PubMed",lfe=()=>"Buscó en PubMed",ufe=()=>"PubMed खोजा",_fe=()=>"PubMed 검색 완료",ffe=()=>"PubMed を検索しました",dfe=()=>"Przeszukano PubMed",hfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?afe():t==="fa"?ife():t==="ar"?cfe():t==="es"?lfe():t==="hi"?ufe():t==="ko"?_fe():t==="ja"?ffe():t==="pl"?dfe():ofe()}),pfe=e=>`Searched the web for “${e==null?void 0:e.query}”`,mfe=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,gfe=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,vfe=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,bfe=e=>`Buscó “${e==null?void 0:e.query}” en la web`,yfe=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,xfe=e=>`“${e==null?void 0:e.query}” 웹 검색 완료`,wfe=e=>`「${e==null?void 0:e.query}」をウェブで検索しました`,kfe=e=>`Przeszukano internet: „${e==null?void 0:e.query}”`,A9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mfe(e):t==="fa"?gfe(e):t==="ar"?vfe(e):t==="es"?bfe(e):t==="hi"?yfe(e):t==="ko"?xfe(e):t==="ja"?wfe(e):t==="pl"?kfe(e):pfe(e)}),jfe=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,Sfe=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,Cfe=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,zfe=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,Efe=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,Nfe=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,Afe=e=>`웹 페이지에서 “${e==null?void 0:e.pattern}” 검색 완료`,Tfe=e=>`ウェブページで「${e==null?void 0:e.pattern}」を検索しました`,Rfe=e=>`Wyszukano na stronie internetowej: „${e==null?void 0:e.pattern}”`,Mfe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Sfe(e):t==="fa"?Cfe(e):t==="ar"?zfe(e):t==="es"?Efe(e):t==="hi"?Nfe(e):t==="ko"?Afe(e):t==="ja"?Tfe(e):t==="pl"?Rfe(e):jfe(e)}),Ofe=()=>"Searching…",$fe=()=>"正在搜索…",Dfe=()=>"در حال جست‌وجو…",Lfe=()=>"جارٍ البحث…",Ife=()=>"Buscando…",Pfe=()=>"खोज रहा है…",Bfe=()=>"검색 중…",Ffe=()=>"検索中…",Hfe=()=>"Wyszukiwanie…",qfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?$fe():t==="fa"?Dfe():t==="ar"?Lfe():t==="es"?Ife():t==="hi"?Pfe():t==="ko"?Bfe():t==="ja"?Ffe():t==="pl"?Hfe():Ofe()}),Ufe=()=>"Sent input to an agent",Gfe=()=>"已向智能体发送输入",Wfe=()=>"ورودی به عامل فرستاده شد",Kfe=()=>"أرسل مدخلًا إلى وكيل",Vfe=()=>"Envió información a un agente",Qfe=()=>"एक एजेंट को इनपुट भेजा",Xfe=()=>"에이전트에 입력 전송 완료",Yfe=()=>"エージェントに入力を送信しました",Zfe=()=>"Wysłano dane wejściowe do agenta",Jfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Gfe():t==="fa"?Wfe():t==="ar"?Kfe():t==="es"?Vfe():t==="hi"?Qfe():t==="ko"?Xfe():t==="ja"?Yfe():t==="pl"?Zfe():Ufe()}),ede=()=>"Spawned an agent",tde=()=>"已创建智能体",rde=()=>"یک عامل ساخته شد",nde=()=>"أنشأ وكيلًا",sde=()=>"Creó un agente",ode=()=>"एक एजेंट शुरू किया",ade=()=>"에이전트 생성 완료",ide=()=>"エージェントを作成しました",cde=()=>"Utworzono agenta",lde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?tde():t==="fa"?rde():t==="ar"?nde():t==="es"?sde():t==="hi"?ode():t==="ko"?ade():t==="ja"?ide():t==="pl"?cde():ede()}),ude=()=>"Sub-agent",_de=()=>"子智能体",fde=()=>"عامل فرعی",dde=()=>"وكيل فرعي",hde=()=>"Subagente",pde=()=>"सब-एजेंट",mde=()=>"하위 에이전트",gde=()=>"サブエージェント",vde=()=>"Podagent",bde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_de():t==="fa"?fde():t==="ar"?dde():t==="es"?hde():t==="hi"?pde():t==="ko"?mde():t==="ja"?gde():t==="pl"?vde():ude()}),yde=()=>"Sub-agent interrupted",xde=()=>"子智能体已中断",wde=()=>"عامل فرعی متوقف شد",kde=()=>"قُوطع الوكيل الفرعي",jde=()=>"Subagente interrumpido",Sde=()=>"सब-एजेंट बाधित हुआ",Cde=()=>"하위 에이전트 중단됨",zde=()=>"サブエージェントが中断されました",Ede=()=>"Przerwano działanie podagenta",Nde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xde():t==="fa"?wde():t==="ar"?kde():t==="es"?jde():t==="hi"?Sde():t==="ko"?Cde():t==="ja"?zde():t==="pl"?Ede():yde()}),Ade=()=>"Sub-agent started",Tde=()=>"子智能体已启动",Rde=()=>"عامل فرعی آغاز شد",Mde=()=>"بدأ الوكيل الفرعي",Ode=()=>"Subagente iniciado",$de=()=>"सब-एजेंट शुरू हुआ",Dde=()=>"하위 에이전트 시작됨",Lde=()=>"サブエージェントが開始しました",Ide=()=>"Uruchomiono podagenta",Pde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Tde():t==="fa"?Rde():t==="ar"?Mde():t==="es"?Ode():t==="hi"?$de():t==="ko"?Dde():t==="ja"?Lde():t==="pl"?Ide():Ade()}),Bde=()=>"Updated experiment notes",Fde=()=>"已更新实验笔记",Hde=()=>"یادداشت‌های آزمایش به‌روز شد",qde=()=>"حدّث ملاحظات التجربة",Ude=()=>"Actualizó las notas del experimento",Gde=()=>"प्रयोग के नोट्स अपडेट किए",Wde=()=>"실험 노트 업데이트 완료",Kde=()=>"実験ノートを更新しました",Vde=()=>"Zaktualizowano notatki eksperymentu",Qde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fde():t==="fa"?Hde():t==="ar"?qde():t==="es"?Ude():t==="hi"?Gde():t==="ko"?Wde():t==="ja"?Kde():t==="pl"?Vde():Bde()}),Xde=()=>"Waiting on an agent",Yde=()=>"正在等待智能体",Zde=()=>"در انتظار عامل",Jde=()=>"في انتظار وكيل",ehe=()=>"Esperando a un agente",the=()=>"एजेंट का इंतज़ार है",rhe=()=>"에이전트 대기 중",nhe=()=>"エージェントを待機中",she=()=>"Oczekiwanie na agenta",ohe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yde():t==="fa"?Zde():t==="ar"?Jde():t==="es"?ehe():t==="hi"?the():t==="ko"?rhe():t==="ja"?nhe():t==="pl"?she():Xde()}),ahe=e=>`Approval required: ${e==null?void 0:e.label}`,ihe=e=>`需要批准:${e==null?void 0:e.label}`,che=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,lhe=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,uhe=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,_he=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,fhe=e=>`승인 필요: ${e==null?void 0:e.label}`,dhe=e=>`承認が必要: ${e==null?void 0:e.label}`,hhe=e=>`Wymagane zatwierdzenie: ${e==null?void 0:e.label}`,T9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ihe(e):t==="fa"?che(e):t==="ar"?lhe(e):t==="es"?uhe(e):t==="hi"?_he(e):t==="ko"?fhe(e):t==="ja"?dhe(e):t==="pl"?hhe(e):ahe(e)}),phe=()=>"The CLI is retrying the turn.",mhe=()=>"CLI 正在重试本轮。",ghe=()=>"CLI در حال تلاش دوباره برای این نوبت است.",vhe=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",bhe=()=>"La CLI está reintentando el turno.",yhe=()=>"CLI टर्न फिर से कोशिश कर रहा है।",xhe=()=>"CLI가 턴을 다시 시도하고 있습니다.",whe=()=>"CLI がターンを再試行しています。",khe=()=>"CLI ponawia próbę.",jhe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mhe():t==="fa"?ghe():t==="ar"?vhe():t==="es"?bhe():t==="hi"?yhe():t==="ko"?xhe():t==="ja"?whe():t==="pl"?khe():phe()}),She=()=>"Continue is available.",Che=()=>"可以继续。",zhe=()=>"ادامه در دسترس است.",Ehe=()=>"المتابعة متاحة.",Nhe=()=>"Puedes continuar.",Ahe=()=>"जारी रखना उपलब्ध है।",The=()=>"계속할 수 있습니다.",Rhe=()=>"続行できます。",Mhe=()=>"Można kontynuować.",Ohe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Che():t==="fa"?zhe():t==="ar"?Ehe():t==="es"?Nhe():t==="hi"?Ahe():t==="ko"?The():t==="ja"?Rhe():t==="pl"?Mhe():She()}),$he=()=>"Retry is available.",Dhe=()=>"可以重试。",Lhe=()=>"تلاش دوباره در دسترس است.",Ihe=()=>"إعادة المحاولة متاحة.",Phe=()=>"Puedes reintentarlo.",Bhe=()=>"फिर से कोशिश करना उपलब्ध है।",Fhe=()=>"다시 시도할 수 있습니다.",Hhe=()=>"再試行できます。",qhe=()=>"Można ponowić próbę.",Uhe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dhe():t==="fa"?Lhe():t==="ar"?Ihe():t==="es"?Phe():t==="hi"?Bhe():t==="ko"?Fhe():t==="ja"?Hhe():t==="pl"?qhe():$he()}),Ghe=()=>"Running a tool",Whe=()=>"正在运行工具",Khe=()=>"در حال اجرای ابزار",Vhe=()=>"جارٍ تشغيل أداة",Qhe=()=>"Ejecutando una herramienta",Xhe=()=>"एक टूल चल रहा है",Yhe=()=>"도구 실행 중",Zhe=()=>"ツールを実行中",Jhe=()=>"Narzędzie jest uruchomione",epe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Whe():t==="fa"?Khe():t==="ar"?Vhe():t==="es"?Qhe():t==="hi"?Xhe():t==="ko"?Yhe():t==="ja"?Zhe():t==="pl"?Jhe():Ghe()}),tpe=()=>"Tool activity completed",rpe=()=>"工具活动已完成",npe=()=>"فعالیت ابزار کامل شد",spe=()=>"اكتمل نشاط الأداة",ope=()=>"Actividad de la herramienta completada",ape=()=>"टूल गतिविधि पूरी हुई",ipe=()=>"도구 작업 완료",cpe=()=>"ツールの処理が完了しました",lpe=()=>"Narzędzie zakończyło działanie",upe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rpe():t==="fa"?npe():t==="ar"?spe():t==="es"?ope():t==="hi"?ape():t==="ko"?ipe():t==="ja"?cpe():t==="pl"?lpe():tpe()}),_pe=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,fpe=e=>`工具活动失败:${e==null?void 0:e.labels}`,dpe=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,hpe=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,ppe=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,mpe=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,gpe=e=>`도구 작업 실패: ${e==null?void 0:e.labels}`,vpe=e=>`ツールの処理に失敗: ${e==null?void 0:e.labels}`,bpe=e=>`Błąd działania narzędzia: ${e==null?void 0:e.labels}`,ype=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fpe(e):t==="fa"?dpe(e):t==="ar"?hpe(e):t==="es"?ppe(e):t==="hi"?mpe(e):t==="ko"?gpe(e):t==="ja"?vpe(e):t==="pl"?bpe(e):_pe(e)}),xpe=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,wpe=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,kpe=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,jpe=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,Spe=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,Cpe=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,zpe=e=>`도구 작업 ${e==null?void 0:e.count}개 실패: ${e==null?void 0:e.labels}`,Epe=e=>`${e==null?void 0:e.count} 件のツール処理に失敗: ${e==null?void 0:e.labels}`,Npe=e=>`Wystąpiły błędy w ${e==null?void 0:e.count} działaniach narzędzi: ${e==null?void 0:e.labels}`,Ape=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?wpe(e):t==="fa"?kpe(e):t==="ar"?jpe(e):t==="es"?Spe(e):t==="hi"?Cpe(e):t==="ko"?zpe(e):t==="ja"?Epe(e):t==="pl"?Npe(e):xpe(e)}),Tpe=()=>"Turn did not finish.",Rpe=()=>"本轮未完成。",Mpe=()=>"این نوبت کامل نشد.",Ope=()=>"لم تكتمل الجولة.",$pe=()=>"El turno no terminó.",Dpe=()=>"यह टर्न पूरा नहीं हुआ।",Lpe=()=>"턴이 완료되지 않았습니다.",Ipe=()=>"ターンが完了しませんでした。",Ppe=()=>"Odpowiedź nie została ukończona.",Bpe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rpe():t==="fa"?Mpe():t==="ar"?Ope():t==="es"?$pe():t==="hi"?Dpe():t==="ko"?Lpe():t==="ja"?Ipe():t==="pl"?Ppe():Tpe()}),Fpe=()=>"Artifacts",Hpe=()=>"产物",qpe=()=>"خروجی‌ها",Upe=()=>"المُخرَجات",Gpe=()=>"Artefactos",Wpe=()=>"आर्टिफ़ैक्ट",Kpe=()=>"결과물",Vpe=()=>"成果物",Qpe=()=>"Artefakty",mD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hpe():t==="fa"?qpe():t==="ar"?Upe():t==="es"?Gpe():t==="hi"?Wpe():t==="ko"?Kpe():t==="ja"?Vpe():t==="pl"?Qpe():Fpe()}),Xpe=()=>"Close panel",Ype=()=>"关闭面板",Zpe=()=>"بستن پنل",Jpe=()=>"إغلاق اللوحة",eme=()=>"Cerrar panel",tme=()=>"पैनल बंद करें",rme=()=>"패널 닫기",nme=()=>"パネルを閉じる",sme=()=>"Zamknij panel",fg=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ype():t==="fa"?Zpe():t==="ar"?Jpe():t==="es"?eme():t==="hi"?tme():t==="ko"?rme():t==="ja"?nme():t==="pl"?sme():Xpe()}),ome=()=>"Current task",ame=()=>"当前任务",ime=()=>"وظیفهٔ فعلی",cme=()=>"المهمة الحالية",lme=()=>"Tarea actual",ume=()=>"मौजूदा टास्क",_me=()=>"현재 작업",fme=()=>"現在のタスク",dme=()=>"Bieżące zadanie",R9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ame():t==="fa"?ime():t==="ar"?cme():t==="es"?lme():t==="hi"?ume():t==="ko"?_me():t==="ja"?fme():t==="pl"?dme():ome()}),hme=()=>"Drag to resize panel",pme=()=>"拖动以调整面板大小",mme=()=>"برای تغییر اندازهٔ پنل بکشید",gme=()=>"اسحب لتغيير حجم اللوحة",vme=()=>"Arrastra para cambiar el tamaño del panel",bme=()=>"पैनल का आकार बदलने के लिए खींचें",yme=()=>"드래그하여 패널 크기 조정",xme=()=>"ドラッグしてパネルのサイズを変更",wme=()=>"Przeciągnij, aby zmienić rozmiar panelu",kme=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?pme():t==="fa"?mme():t==="ar"?gme():t==="es"?vme():t==="hi"?bme():t==="ko"?yme():t==="ja"?xme():t==="pl"?wme():hme()}),jme=()=>"Drag toward the center to restore panel",Sme=()=>"向中央拖动以恢复面板",Cme=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",zme=()=>"اسحب نحو المنتصف لاستعادة اللوحة",Eme=()=>"Arrastra hacia el centro para restaurar el panel",Nme=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",Ame=()=>"패널을 복원하려면 중앙으로 드래그",Tme=()=>"中央にドラッグしてパネルを復元",Rme=()=>"Przeciągnij w kierunku środka, aby przywrócić panel",Mme=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Sme():t==="fa"?Cme():t==="ar"?zme():t==="es"?Eme():t==="hi"?Nme():t==="ko"?Ame():t==="ja"?Tme():t==="pl"?Rme():jme()}),Ome=()=>"Entire project",$me=()=>"整个项目",Dme=()=>"کل پروژه",Lme=()=>"المشروع بالكامل",Ime=()=>"Todo el proyecto",Pme=()=>"पूरा प्रोजेक्ट",Bme=()=>"전체 프로젝트",Fme=()=>"プロジェクト全体",Hme=()=>"Cały projekt",M9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?$me():t==="fa"?Dme():t==="ar"?Lme():t==="es"?Ime():t==="hi"?Pme():t==="ko"?Bme():t==="ja"?Fme():t==="pl"?Hme():Ome()}),qme=()=>"Expand panel",Ume=()=>"展开面板",Gme=()=>"گسترش پنل",Wme=()=>"توسيع اللوحة",Kme=()=>"Expandir panel",Vme=()=>"पैनल फैलाएं",Qme=()=>"패널 확장",Xme=()=>"パネルを拡大",Yme=()=>"Rozwiń panel",O9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ume():t==="fa"?Gme():t==="ar"?Wme():t==="es"?Kme():t==="hi"?Vme():t==="ko"?Qme():t==="ja"?Xme():t==="pl"?Yme():qme()}),Zme=e=>`Experiment filter: ${e==null?void 0:e.scope}`,Jme=e=>`实验筛选:${e==null?void 0:e.scope}`,ege=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,tge=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,rge=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,nge=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,sge=e=>`실험 필터: ${e==null?void 0:e.scope}`,oge=e=>`実験フィルター: ${e==null?void 0:e.scope}`,age=e=>`Filtr eksperymentów: ${e==null?void 0:e.scope}`,ige=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Jme(e):t==="fa"?ege(e):t==="ar"?tge(e):t==="es"?rge(e):t==="hi"?nge(e):t==="ko"?sge(e):t==="ja"?oge(e):t==="pl"?age(e):Zme(e)}),cge=()=>"Experiment view",lge=()=>"实验视图",uge=()=>"نمای آزمایش",_ge=()=>"عرض التجربة",fge=()=>"Vista de experimento",dge=()=>"प्रयोग व्यू",hge=()=>"실험 보기",pge=()=>"実験表示",mge=()=>"Widok eksperymentu",gge=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?lge():t==="fa"?uge():t==="ar"?_ge():t==="es"?fge():t==="hi"?dge():t==="ko"?hge():t==="ja"?pge():t==="pl"?mge():cge()}),vge=()=>"Experiments",bge=()=>"实验",yge=()=>"آزمایش‌ها",xge=()=>"التجارب",wge=()=>"Experimentos",kge=()=>"प्रयोग",jge=()=>"실험",Sge=()=>"実験",Cge=()=>"Eksperymenty",gD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?bge():t==="fa"?yge():t==="ar"?xge():t==="es"?wge():t==="hi"?kge():t==="ko"?jge():t==="ja"?Sge():t==="pl"?Cge():vge()}),zge=()=>"Files",Ege=()=>"文件",Nge=()=>"فایل‌ها",Age=()=>"الملفات",Tge=()=>"Archivos",Rge=()=>"फ़ाइलें",Mge=()=>"파일",Oge=()=>"ファイル",$ge=()=>"Pliki",G4=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ege():t==="fa"?Nge():t==="ar"?Age():t==="es"?Tge():t==="hi"?Rge():t==="ko"?Mge():t==="ja"?Oge():t==="pl"?$ge():zge()}),Dge=()=>"Filter experiments",Lge=()=>"筛选实验",Ige=()=>"فیلتر آزمایش‌ها",Pge=()=>"تصفية التجارب",Bge=()=>"Filtrar experimentos",Fge=()=>"प्रयोग फ़िल्टर करें",Hge=()=>"실험 필터링",qge=()=>"実験を絞り込む",Uge=()=>"Filtruj eksperymenty",Gge=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lge():t==="fa"?Ige():t==="ar"?Pge():t==="es"?Bge():t==="hi"?Fge():t==="ko"?Hge():t==="ja"?qge():t==="pl"?Uge():Dge()}),Wge=()=>"Current task filtering is unavailable for unattributed experiments",Kge=()=>"存在无法归属的实验时,不能按当前任务筛选",Vge=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",Qge=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",Xge=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",Yge=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",Zge=()=>"작업에 연결되지 않은 실험은 현재 작업 필터를 사용할 수 없습니다",Jge=()=>"タスクに紐付いていない実験では、現在のタスクによる絞り込みは利用できません",e0e=()=>"Filtrowanie według bieżącego zadania jest niedostępne dla eksperymentów bez przypisania",t0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kge():t==="fa"?Vge():t==="ar"?Qge():t==="es"?Xge():t==="hi"?Yge():t==="ko"?Zge():t==="ja"?Jge():t==="pl"?e0e():Wge()}),r0e=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",n0e=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",s0e=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",o0e=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",a0e=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",i0e=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",c0e=()=>"현재 작업에서 생성한 실험이 아직 없습니다. 전체 프로젝트로 전환하여 모든 실험을 확인하세요.",l0e=()=>"現在のタスクの実験はまだありません。プロジェクト全体に切り替えて、すべての実験を確認してください。",u0e=()=>"Brak eksperymentów w bieżącym zadaniu. Przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty.",_0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?n0e():t==="fa"?s0e():t==="ar"?o0e():t==="es"?a0e():t==="hi"?i0e():t==="ko"?c0e():t==="ja"?l0e():t==="pl"?u0e():r0e()}),f0e=()=>"Open a task to filter to its experiments",d0e=()=>"请打开一个任务以筛选其实验",h0e=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",p0e=()=>"افتح مهمة لعرض تجاربها فقط",m0e=()=>"Abre una tarea para filtrar por sus experimentos",g0e=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",v0e=()=>"작업을 열어 해당 실험만 표시",b0e=()=>"タスクを開いて、その実験に絞り込む",y0e=()=>"Otwórz zadanie, aby filtrować jego eksperymenty",x0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?d0e():t==="fa"?h0e():t==="ar"?p0e():t==="es"?m0e():t==="hi"?g0e():t==="ko"?v0e():t==="ja"?b0e():t==="pl"?y0e():f0e()}),w0e=()=>"projects",k0e=()=>"项目",j0e=()=>"پروژه‌ها",S0e=()=>"المشاريع",C0e=()=>"los proyectos",z0e=()=>"प्रोजेक्ट",E0e=()=>"프로젝트",N0e=()=>"プロジェクト",A0e=()=>"projekty",Gm=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?k0e():t==="fa"?j0e():t==="ar"?S0e():t==="es"?C0e():t==="hi"?z0e():t==="ko"?E0e():t==="ja"?N0e():t==="pl"?A0e():w0e()}),T0e=()=>"Restore panel",R0e=()=>"还原面板",M0e=()=>"بازگرداندن اندازهٔ پنل",O0e=()=>"استعادة اللوحة",$0e=()=>"Restaurar panel",D0e=()=>"पैनल वापस लाएं",L0e=()=>"패널 복원",I0e=()=>"パネルを復元",P0e=()=>"Przywróć panel",$9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?R0e():t==="fa"?M0e():t==="ar"?O0e():t==="es"?$0e():t==="hi"?D0e():t==="ko"?L0e():t==="ja"?I0e():t==="pl"?P0e():T0e()}),B0e=()=>"Retry",F0e=()=>"重试",H0e=()=>"تلاش دوباره",q0e=()=>"إعادة المحاولة",U0e=()=>"Reintentar",G0e=()=>"फिर से कोशिश करें",W0e=()=>"다시 시도",K0e=()=>"再試行",V0e=()=>"Ponów",Ks=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F0e():t==="fa"?H0e():t==="ar"?q0e():t==="es"?U0e():t==="hi"?G0e():t==="ko"?W0e():t==="ja"?K0e():t==="pl"?V0e():B0e()}),Q0e=()=>"Select a project to browse its files.",X0e=()=>"选择一个项目以浏览其文件。",Y0e=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Z0e=()=>"اختر مشروعًا لتصفح ملفاته.",J0e=()=>"Selecciona un proyecto para explorar sus archivos.",eve=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",tve=()=>"파일을 탐색할 프로젝트를 선택하세요.",rve=()=>"ファイルを閲覧するプロジェクトを選択してください。",nve=()=>"Wybierz projekt, aby przeglądać jego pliki.",sve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?X0e():t==="fa"?Y0e():t==="ar"?Z0e():t==="es"?J0e():t==="hi"?eve():t==="ko"?tve():t==="ja"?rve():t==="pl"?nve():Q0e()}),ove=()=>"settings",ave=()=>"设置",ive=()=>"تنظیمات",cve=()=>"الإعدادات",lve=()=>"la configuración",uve=()=>"सेटिंग्स",_ve=()=>"설정",fve=()=>"設定",dve=()=>"ustawienia",hve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ave():t==="fa"?ive():t==="ar"?cve():t==="es"?lve():t==="hi"?uve():t==="ko"?_ve():t==="ja"?fve():t==="pl"?dve():ove()}),pve=()=>"Show archived",mve=()=>"显示已归档",gve=()=>"نمایش بایگانی‌شده‌ها",vve=()=>"إظهار المؤرشف",bve=()=>"Mostrar archivados",yve=()=>"संग्रहीत दिखाएँ",xve=()=>"보관된 실험 표시",wve=()=>"アーカイブ済みを表示",kve=()=>"Pokaż zarchiwizowane",jve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mve():t==="fa"?gve():t==="ar"?vve():t==="es"?bve():t==="hi"?yve():t==="ko"?xve():t==="ja"?wve():t==="pl"?kve():pve()}),Sve=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,Cve=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,zve=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,Eve=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,Nve=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,Ave=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,Tve=e=>`OpenResearch ${e==null?void 0:e.items}을(를) 불러올 수 없습니다.`,Rve=e=>`OpenResearch の ${e==null?void 0:e.items} を読み込めませんでした。`,Mve=e=>`Nie udało się wczytać elementów OpenResearch: ${e==null?void 0:e.items}.`,Ove=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Cve(e):t==="fa"?zve(e):t==="ar"?Eve(e):t==="es"?Nve(e):t==="hi"?Ave(e):t==="ko"?Tve(e):t==="ja"?Rve(e):t==="pl"?Mve(e):Sve(e)}),$ve=()=>"Sub-agent",Dve=()=>"子智能体",Lve=()=>"عامل فرعی",Ive=()=>"وكيل فرعي",Pve=()=>"Subagente",Bve=()=>"सब-एजेंट",Fve=()=>"하위 에이전트",Hve=()=>"サブエージェント",qve=()=>"Podagent",Uve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dve():t==="fa"?Lve():t==="ar"?Ive():t==="es"?Pve():t==="hi"?Bve():t==="ko"?Fve():t==="ja"?Hve():t==="pl"?qve():$ve()}),Gve=()=>"Table",Wve=()=>"表格",Kve=()=>"جدول",Vve=()=>"جدول",Qve=()=>"Tabla",Xve=()=>"टेबल",Yve=()=>"표",Zve=()=>"表",Jve=()=>"Tabela",e1e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wve():t==="fa"?Kve():t==="ar"?Vve():t==="es"?Qve():t==="hi"?Xve():t==="ko"?Yve():t==="ja"?Zve():t==="pl"?Jve():Gve()}),t1e=()=>"Tree",r1e=()=>"树状图",n1e=()=>"درخت",s1e=()=>"شجرة",o1e=()=>"Árbol",a1e=()=>"ट्री",i1e=()=>"트리",c1e=()=>"ツリー",l1e=()=>"Drzewo",u1e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?r1e():t==="fa"?n1e():t==="ar"?s1e():t==="es"?o1e():t==="hi"?a1e():t==="ko"?i1e():t==="ja"?c1e():t==="pl"?l1e():t1e()}),_1e=e=>`Collapse ${e==null?void 0:e.name}`,f1e=e=>`折叠 ${e==null?void 0:e.name}`,d1e=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,h1e=e=>`طيّ ${e==null?void 0:e.name}`,p1e=e=>`Contraer ${e==null?void 0:e.name}`,m1e=e=>`${e==null?void 0:e.name} समेटें`,g1e=e=>`${e==null?void 0:e.name} 접기`,v1e=e=>`${e==null?void 0:e.name} を折りたたむ`,b1e=e=>`Zwiń folder ${e==null?void 0:e.name}`,y1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?f1e(e):t==="fa"?d1e(e):t==="ar"?h1e(e):t==="es"?p1e(e):t==="hi"?m1e(e):t==="ko"?g1e(e):t==="ja"?v1e(e):t==="pl"?b1e(e):_1e(e)}),x1e=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,w1e=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,k1e=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,j1e=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,S1e=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,C1e=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,z1e=e=>`결과물 디렉터리에서 “${e==null?void 0:e.path}”을(를) 삭제할까요?`,E1e=e=>`成果物ディレクトリから「${e==null?void 0:e.path}」を削除しますか?`,N1e=e=>`Usunąć „${e==null?void 0:e.path}” z katalogu artefaktów?`,Dj=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?w1e(e):t==="fa"?k1e(e):t==="ar"?j1e(e):t==="es"?S1e(e):t==="hi"?C1e(e):t==="ko"?z1e(e):t==="ja"?E1e(e):t==="pl"?N1e(e):x1e(e)}),A1e=e=>`Delete folder ${e==null?void 0:e.name}`,T1e=e=>`删除文件夹 ${e==null?void 0:e.name}`,R1e=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,M1e=e=>`حذف المجلد ${e==null?void 0:e.name}`,O1e=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,$1e=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,D1e=e=>`${e==null?void 0:e.name} 폴더 삭제`,L1e=e=>`フォルダー ${e==null?void 0:e.name} を削除`,I1e=e=>`Usuń folder ${e==null?void 0:e.name}`,P1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T1e(e):t==="fa"?R1e(e):t==="ar"?M1e(e):t==="es"?O1e(e):t==="hi"?$1e(e):t==="ko"?D1e(e):t==="ja"?L1e(e):t==="pl"?I1e(e):A1e(e)}),B1e=e=>`Expand ${e==null?void 0:e.name}`,F1e=e=>`展开 ${e==null?void 0:e.name}`,H1e=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,q1e=e=>`توسيع ${e==null?void 0:e.name}`,U1e=e=>`Expandir ${e==null?void 0:e.name}`,G1e=e=>`${e==null?void 0:e.name} फैलाएं`,W1e=e=>`${e==null?void 0:e.name} 펼치기`,K1e=e=>`${e==null?void 0:e.name} を展開`,V1e=e=>`Rozwiń folder ${e==null?void 0:e.name}`,Q1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?F1e(e):t==="fa"?H1e(e):t==="ar"?q1e(e):t==="es"?U1e(e):t==="hi"?G1e(e):t==="ko"?W1e(e):t==="ja"?K1e(e):t==="pl"?V1e(e):B1e(e)}),X1e=()=>"Binary or unsupported file — no inline preview.",Y1e=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",Z1e=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",J1e=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",ebe=()=>"Archivo binario o no compatible — sin vista previa.",tbe=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",rbe=()=>"바이너리 또는 지원하지 않는 파일은 인라인 미리보기를 지원하지 않습니다.",nbe=()=>"バイナリまたは未対応のファイルにはインラインプレビューがありません。",sbe=()=>"Plik binarny lub nieobsługiwany — podgląd jest niedostępny.",obe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y1e():t==="fa"?Z1e():t==="ar"?J1e():t==="es"?ebe():t==="hi"?tbe():t==="ko"?rbe():t==="ja"?nbe():t==="pl"?sbe():X1e()}),abe=()=>"Copy path",ibe=()=>"复制路径",cbe=()=>"کپی مسیر",lbe=()=>"نسخ المسار",ube=()=>"Copiar ruta",_be=()=>"पथ कॉपी करें",fbe=()=>"경로 복사",dbe=()=>"パスをコピー",hbe=()=>"Kopiuj ścieżkę",pbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ibe():t==="fa"?cbe():t==="ar"?lbe():t==="es"?ube():t==="hi"?_be():t==="ko"?fbe():t==="ja"?dbe():t==="pl"?hbe():abe()}),mbe=()=>"Artifact not found",gbe=()=>"找不到产物",vbe=()=>"خروجی پیدا نشد",bbe=()=>"لم يُعثر على المُخرَج",ybe=()=>"No se encontró el artefacto",xbe=()=>"आर्टिफ़ैक्ट नहीं मिला",wbe=()=>"결과물을 찾지 못했습니다",kbe=()=>"成果物が見つかりません",jbe=()=>"Nie znaleziono artefaktu",Sbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gbe():t==="fa"?vbe():t==="ar"?bbe():t==="es"?ybe():t==="hi"?xbe():t==="ko"?wbe():t==="ja"?kbe():t==="pl"?jbe():mbe()}),Cbe=()=>"Open raw",zbe=()=>"打开原始文件",Ebe=()=>"باز کردن فایل خام",Nbe=()=>"فتح الملف الخام",Abe=()=>"Abrir sin formato",Tbe=()=>"रॉ खोलें",Rbe=()=>"원본 열기",Mbe=()=>"元のファイルを開く",Obe=()=>"Otwórz surowy plik",$be=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zbe():t==="fa"?Ebe():t==="ar"?Nbe():t==="es"?Abe():t==="hi"?Tbe():t==="ko"?Rbe():t==="ja"?Mbe():t==="pl"?Obe():Cbe()}),Dbe=()=>"Click an artifact to view it",Lbe=()=>"点击产物即可查看",Ibe=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Pbe=()=>"انقر على مُخرَج لعرضه",Bbe=()=>"Selecciona un artefacto para verlo",Fbe=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",Hbe=()=>"결과물을 클릭하여 확인하세요",qbe=()=>"成果物をクリックして表示",Ube=()=>"Kliknij artefakt, aby go wyświetlić",Gbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lbe():t==="fa"?Ibe():t==="ar"?Pbe():t==="es"?Bbe():t==="hi"?Fbe():t==="ko"?Hbe():t==="ja"?qbe():t==="pl"?Ube():Dbe()}),Wbe=()=>"Delete artifact",Kbe=()=>"删除产物",Vbe=()=>"حذف خروجی",Qbe=()=>"حذف المُخرَج",Xbe=()=>"Eliminar artefacto",Ybe=()=>"आर्टिफ़ैक्ट हटाएं",Zbe=()=>"결과물 삭제",Jbe=()=>"成果物を削除",eye=()=>"Usuń artefakt",D9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kbe():t==="fa"?Vbe():t==="ar"?Qbe():t==="es"?Xbe():t==="hi"?Ybe():t==="ko"?Zbe():t==="ja"?Jbe():t==="pl"?eye():Wbe()}),tye=()=>"Delete folder",rye=()=>"删除文件夹",nye=()=>"حذف پوشه",sye=()=>"حذف المجلد",oye=()=>"Eliminar carpeta",aye=()=>"फ़ोल्डर हटाएं",iye=()=>"폴더 삭제",cye=()=>"フォルダーを削除",lye=()=>"Usuń folder",uye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rye():t==="fa"?nye():t==="ar"?sye():t==="es"?oye():t==="hi"?aye():t==="ko"?iye():t==="ja"?cye():t==="pl"?lye():tye()}),_ye=()=>"Failed to load:",fye=()=>"加载失败:",dye=()=>"بارگیری ناموفق بود:",hye=()=>"تعذّر التحميل:",pye=()=>"Error al cargar:",mye=()=>"लोड नहीं हो सका:",gye=()=>"불러오기 실패:",vye=()=>"読み込みに失敗:",bye=()=>"Nie udało się wczytać:",yye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fye():t==="fa"?dye():t==="ar"?hye():t==="es"?pye():t==="hi"?mye():t==="ko"?gye():t==="ja"?vye():t==="pl"?bye():_ye()}),xye=()=>"File truncated — showing the first 512 KB.",wye=()=>"文件已截断——仅显示前 512 KB。",kye=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",jye=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",Sye=()=>"Archivo truncado — se muestran los primeros 512 KB.",Cye=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",zye=()=>"파일이 잘렸습니다. 처음 512 KB만 표시합니다.",Eye=()=>"ファイルが省略されています。先頭の 512 KB を表示しています。",Nye=()=>"Plik został ucięty — wyświetlono pierwsze 512 KB.",Aye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wye():t==="fa"?kye():t==="ar"?jye():t==="es"?Sye():t==="hi"?Cye():t==="ko"?zye():t==="ja"?Eye():t==="pl"?Nye():xye()}),Tye=()=>"Listing truncated — the folder has more artifacts.",Rye=()=>"列表已截断——文件夹中还有更多产物。",Mye=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",Oye=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",$ye=()=>"Listado truncado — la carpeta tiene más artefactos.",Dye=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",Lye=()=>"목록이 잘렸습니다. 폴더에 더 많은 결과물이 있습니다.",Iye=()=>"一覧が省略されています。フォルダーには他にも成果物があります。",Pye=()=>"Lista została ucięta — folder zawiera więcej artefaktów.",Bye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rye():t==="fa"?Mye():t==="ar"?Oye():t==="es"?$ye():t==="hi"?Dye():t==="ko"?Lye():t==="ja"?Iye():t==="pl"?Pye():Tye()}),Fye=()=>"Loading…",Hye=()=>"正在加载…",qye=()=>"در حال بارگیری…",Uye=()=>"جارٍ التحميل…",Gye=()=>"Cargando…",Wye=()=>"लोड हो रहा है…",Kye=()=>"불러오는 중…",Vye=()=>"読み込み中…",Qye=()=>"Wczytywanie…",vD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hye():t==="fa"?qye():t==="ar"?Uye():t==="es"?Gye():t==="hi"?Wye():t==="ko"?Kye():t==="ja"?Vye():t==="pl"?Qye():Fye()}),Xye=()=>"Loading artifacts…",Yye=()=>"正在加载产物…",Zye=()=>"در حال بارگیری خروجی‌ها…",Jye=()=>"جارٍ تحميل المُخرَجات…",exe=()=>"Cargando artefactos…",txe=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",rxe=()=>"결과물 불러오는 중…",nxe=()=>"成果物を読み込み中…",sxe=()=>"Wczytywanie artefaktów…",oxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yye():t==="fa"?Zye():t==="ar"?Jye():t==="es"?exe():t==="hi"?txe():t==="ko"?rxe():t==="ja"?nxe():t==="pl"?sxe():Xye()}),axe=()=>"Modified",ixe=()=>"修改时间",cxe=()=>"ویرایش‌شده",lxe=()=>"عُدّل",uxe=()=>"Modificado",_xe=()=>"बदला गया",fxe=()=>"수정됨",dxe=()=>"変更済み",hxe=()=>"Zmodyfikowano",pxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ixe():t==="fa"?cxe():t==="ar"?lxe():t==="es"?uxe():t==="hi"?_xe():t==="ko"?fxe():t==="ja"?dxe():t==="pl"?hxe():axe()}),mxe=()=>"No artifacts yet",gxe=()=>"尚无产物",vxe=()=>"هنوز خروجی‌ای وجود ندارد",bxe=()=>"لا توجد مُخرَجات بعد",yxe=()=>"Aún no hay artefactos",xxe=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",wxe=()=>"아직 결과물이 없습니다",kxe=()=>"成果物はまだありません",jxe=()=>"Brak artefaktów",Sxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gxe():t==="fa"?vxe():t==="ar"?bxe():t==="es"?yxe():t==="hi"?xxe():t==="ko"?wxe():t==="ja"?kxe():t==="pl"?jxe():mxe()}),Cxe=()=>"Open raw in new tab",zxe=()=>"在新标签页中打开原始文件",Exe=()=>"باز کردن فایل خام در زبانهٔ جدید",Nxe=()=>"فتح الملف الخام في تبويب جديد",Axe=()=>"Abrir sin formato en una pestaña nueva",Txe=()=>"नए टैब में रॉ खोलें",Rxe=()=>"새 탭에서 원본 열기",Mxe=()=>"新しいタブで元のファイルを開く",Oxe=()=>"Otwórz surowy plik w nowej karcie",L9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zxe():t==="fa"?Exe():t==="ar"?Nxe():t==="es"?Axe():t==="hi"?Txe():t==="ko"?Rxe():t==="ja"?Mxe():t==="pl"?Oxe():Cxe()}),$xe=()=>"This is the project's durable output space for reports, figures, images, CSVs, PDFs, and other research artifacts. Ask the agent for a write-up or add your own files.",Dxe=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",Lxe=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",Ixe=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",Pxe=()=>"Este es el espacio de resultados permanente del proyecto: informes, figuras, imágenes, CSV, PDF y otros artefactos de investigación. Pídele al agente un informe o añade tus propios archivos.",Bxe=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",Fxe=()=>"보고서, 그림, 이미지, CSV, PDF 등 연구 결과물을 영구 보관하는 프로젝트 공간입니다. 에이전트에게 문서 작성을 요청하거나 직접 파일을 추가하세요.",Hxe=()=>"レポート、図、画像、CSV、PDF などの研究成果物を永続的に保存するプロジェクトの領域です。エージェントに文書の作成を依頼するか、ファイルを追加してください。",qxe=()=>"To miejsce na trwałe wyniki projektu: raporty, wykresy, obrazy, pliki CSV, PDF i inne artefakty badawcze. Poproś agenta o przygotowanie opracowania lub dodaj własne pliki.",Uxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dxe():t==="fa"?Lxe():t==="ar"?Ixe():t==="es"?Pxe():t==="hi"?Bxe():t==="ko"?Fxe():t==="ja"?Hxe():t==="pl"?qxe():$xe()}),Gxe=()=>"File too large to preview inline.",Wxe=()=>"文件太大,无法内嵌预览。",Kxe=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",Vxe=()=>"الملف كبير جدًا للمعاينة المضمّنة.",Qxe=()=>"El archivo es demasiado grande para previsualizarlo.",Xxe=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",Yxe=()=>"파일이 너무 커서 인라인 미리보기를 할 수 없습니다.",Zxe=()=>"ファイルが大きすぎるためインラインプレビューできません。",Jxe=()=>"Plik jest za duży, aby wyświetlić podgląd.",ewe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wxe():t==="fa"?Kxe():t==="ar"?Vxe():t==="es"?Qxe():t==="hi"?Xxe():t==="ko"?Yxe():t==="ja"?Zxe():t==="pl"?Jxe():Gxe()}),twe=()=>"This is the baseline branch, so there is no parent comparison.",rwe=()=>"这是基线分支,因此没有父分支可供比较。",nwe=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",swe=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",owe=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",awe=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",iwe=()=>"베이스라인 브랜치이므로 상위 브랜치와 비교할 수 없습니다.",cwe=()=>"これはベースラインブランチのため、親との比較はありません。",lwe=()=>"To gałąź bazowa, więc nie ma gałęzi nadrzędnej do porównania.",uwe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rwe():t==="fa"?nwe():t==="ar"?swe():t==="es"?owe():t==="hi"?awe():t==="ko"?iwe():t==="ja"?cwe():t==="pl"?lwe():twe()}),_we=()=>"Failed to load changes:",fwe=()=>"加载更改失败:",dwe=()=>"بارگیری تغییرات ناموفق بود:",hwe=()=>"تعذّر تحميل التغييرات:",pwe=()=>"Error al cargar los cambios:",mwe=()=>"बदलाव लोड नहीं हो सके:",gwe=()=>"변경 사항 불러오기 실패:",vwe=()=>"変更の読み込みに失敗:",bwe=()=>"Nie udało się wczytać zmian:",ywe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fwe():t==="fa"?dwe():t==="ar"?hwe():t==="es"?pwe():t==="hi"?mwe():t==="ko"?gwe():t==="ja"?vwe():t==="pl"?bwe():_we()}),xwe=()=>"Loading changes…",wwe=()=>"正在加载更改…",kwe=()=>"در حال بارگیری تغییرات…",jwe=()=>"جارٍ تحميل التغييرات…",Swe=()=>"Cargando cambios…",Cwe=()=>"बदलाव लोड हो रहे हैं…",zwe=()=>"변경 사항 불러오는 중…",Ewe=()=>"変更を読み込み中…",Nwe=()=>"Wczytywanie zmian…",Awe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wwe():t==="fa"?kwe():t==="ar"?jwe():t==="es"?Swe():t==="hi"?Cwe():t==="ko"?zwe():t==="ja"?Ewe():t==="pl"?Nwe():xwe()}),Twe=()=>"No committed changes from the parent branch.",Rwe=()=>"与父分支相比没有已提交的更改。",Mwe=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",Owe=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",$we=()=>"No hay cambios confirmados respecto a la rama padre.",Dwe=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",Lwe=()=>"상위 브랜치 대비 커밋된 변경 사항이 없습니다.",Iwe=()=>"親ブランチからのコミット済みの変更はありません。",Pwe=()=>"Brak zatwierdzonych zmian względem gałęzi nadrzędnej.",Bwe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rwe():t==="fa"?Mwe():t==="ar"?Owe():t==="es"?$we():t==="hi"?Dwe():t==="ko"?Lwe():t==="ja"?Iwe():t==="pl"?Pwe():Twe()}),Fwe=e=>`chat ${e==null?void 0:e.number}`,Hwe=e=>`聊天 ${e==null?void 0:e.number}`,qwe=e=>`گفتگو ${e==null?void 0:e.number}`,Uwe=e=>`محادثة ${e==null?void 0:e.number}`,Gwe=e=>`chat ${e==null?void 0:e.number}`,Wwe=e=>`चैट ${e==null?void 0:e.number}`,Kwe=e=>`채팅 ${e==null?void 0:e.number}`,Vwe=e=>`チャット ${e==null?void 0:e.number}`,Qwe=e=>`czat ${e==null?void 0:e.number}`,I9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Hwe(e):t==="fa"?qwe(e):t==="ar"?Uwe(e):t==="es"?Gwe(e):t==="hi"?Wwe(e):t==="ko"?Kwe(e):t==="ja"?Vwe(e):t==="pl"?Qwe(e):Fwe(e)}),Xwe=()=>"agent sessions",Ywe=()=>"智能体会话",Zwe=()=>"نشست‌های عامل‌ها",Jwe=()=>"جلسات الوكلاء",e2e=()=>"sesiones de agente",t2e=()=>"एजेंट सेशन",r2e=()=>"에이전트 세션",n2e=()=>"エージェントのセッション",s2e=()=>"sesje agentów",o2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ywe():t==="fa"?Zwe():t==="ar"?Jwe():t==="es"?e2e():t==="hi"?t2e():t==="ko"?r2e():t==="ja"?n2e():t==="pl"?s2e():Xwe()}),a2e=()=>"All sessions",i2e=()=>"所有会话",c2e=()=>"همهٔ نشست‌ها",l2e=()=>"كل الجلسات",u2e=()=>"Todas las sesiones",_2e=()=>"सभी सेशन",f2e=()=>"모든 세션",d2e=()=>"すべてのセッション",h2e=()=>"Wszystkie sesje",bD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i2e():t==="fa"?c2e():t==="ar"?l2e():t==="es"?u2e():t==="hi"?_2e():t==="ko"?f2e():t==="ja"?d2e():t==="pl"?h2e():a2e()}),p2e=e=>`${e==null?void 0:e.count} annotations`,m2e=e=>`${e==null?void 0:e.count} 条批注`,g2e=e=>`${e==null?void 0:e.count} یادداشت`,v2e=e=>`التعليقات: ${e==null?void 0:e.count}`,b2e=e=>`${e==null?void 0:e.count} anotaciones`,y2e=e=>`${e==null?void 0:e.count} एनोटेशन`,x2e=e=>`주석 ${e==null?void 0:e.count}개`,w2e=e=>`${e==null?void 0:e.count} 件の注釈`,k2e=e=>`Adnotacje: ${e==null?void 0:e.count}`,j2e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?m2e(e):t==="fa"?g2e(e):t==="ar"?v2e(e):t==="es"?b2e(e):t==="hi"?y2e(e):t==="ko"?x2e(e):t==="ja"?w2e(e):t==="pl"?k2e(e):p2e(e)}),S2e=()=>"Archive",C2e=()=>"归档",z2e=()=>"بایگانی",E2e=()=>"أرشفة",N2e=()=>"Archivar",A2e=()=>"आर्काइव करें",T2e=()=>"보관",R2e=()=>"アーカイブ",M2e=()=>"Archiwizuj",O2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?C2e():t==="fa"?z2e():t==="ar"?E2e():t==="es"?N2e():t==="hi"?A2e():t==="ko"?T2e():t==="ja"?R2e():t==="pl"?M2e():S2e()}),$2e=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",D2e=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",L2e=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",I2e=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",P2e=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",B2e=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",F2e=()=>"연구 에이전트에 질문… (명령과 스킬은 /, 셸은 !)",H2e=()=>"研究エージェントに質問…(/ でコマンドとスキル、! でシェル)",q2e=()=>"Zapytaj agenta badawczego… (/ — polecenia i umiejętności, ! — powłoka)",U2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?D2e():t==="fa"?L2e():t==="ar"?I2e():t==="es"?P2e():t==="hi"?B2e():t==="ko"?F2e():t==="ja"?H2e():t==="pl"?q2e():$2e()}),G2e=()=>"Asked about selected text",W2e=()=>"已询问所选文本",K2e=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",V2e=()=>"سأل عن النص المحدد",Q2e=()=>"Preguntó sobre el texto seleccionado",X2e=()=>"चयनित टेक्स्ट के बारे में पूछा",Y2e=()=>"선택한 텍스트에 대해 질문함",Z2e=()=>"選択したテキストについて質問しました",J2e=()=>"Zapytano o zaznaczony tekst",eke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W2e():t==="fa"?K2e():t==="ar"?V2e():t==="es"?Q2e():t==="hi"?X2e():t==="ko"?Y2e():t==="ja"?Z2e():t==="pl"?J2e():G2e()}),tke=()=>"Attachment",rke=()=>"附件",nke=()=>"پیوست",ske=()=>"مرفق",oke=()=>"Adjunto",ake=()=>"अटैचमेंट",ike=()=>"첨부 파일",cke=()=>"添付ファイル",lke=()=>"Załącznik",uke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rke():t==="fa"?nke():t==="ar"?ske():t==="es"?oke():t==="hi"?ake():t==="ko"?ike():t==="ja"?cke():t==="pl"?lke():tke()}),_ke=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,fke=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,dke=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,hke=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,pke=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,mke=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,gke=e=>`${e==null?void 0:e.name} 파일이 너무 큽니다. 첨부 파일당 크기는 30 MB 미만이어야 합니다.`,vke=e=>`${e==null?void 0:e.name} が大きすぎます。各添付ファイルは 30 MB 未満である必要があります。`,bke=e=>`${e==null?void 0:e.name} jest za duży — każdy załącznik musi mieć mniej niż 30 MB.`,yke=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fke(e):t==="fa"?dke(e):t==="ar"?hke(e):t==="es"?pke(e):t==="hi"?mke(e):t==="ko"?gke(e):t==="ja"?vke(e):t==="pl"?bke(e):_ke(e)}),xke=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",wke=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",kke=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",jke=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",Ske=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",Cke=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",zke=()=>"첨부 파일의 총 크기가 40 MB를 초과합니다. 하나를 제거한 뒤 다시 시도하세요.",Eke=()=>"添付ファイルの合計が上限の 40 MB を超えています。1 つ削除して再試行してください。",Nke=()=>"Załączniki przekraczają łączny limit 40 MB — usuń jeden z nich i spróbuj ponownie.",Ake=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wke():t==="fa"?kke():t==="ar"?jke():t==="es"?Ske():t==="hi"?Cke():t==="ko"?zke():t==="ja"?Eke():t==="pl"?Nke():xke()}),Tke=()=>"Wait for the turn to finish before running a command.",Rke=()=>"请等待本轮结束后再运行命令。",Mke=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",Oke=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",$ke=()=>"Espera a que termine el turno antes de ejecutar un comando.",Dke=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",Lke=()=>"명령을 실행하기 전에 턴이 끝날 때까지 기다리세요.",Ike=()=>"コマンドを実行する前に、ターンの完了を待ってください。",Pke=()=>"Poczekaj na zakończenie odpowiedzi przed uruchomieniem polecenia.",Bke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rke():t==="fa"?Mke():t==="ar"?Oke():t==="es"?$ke():t==="hi"?Dke():t==="ko"?Lke():t==="ja"?Ike():t==="pl"?Pke():Tke()}),Fke=e=>`Exited with code ${e==null?void 0:e.code}`,Hke=e=>`退出码 ${e==null?void 0:e.code}`,qke=e=>`با کد ${e==null?void 0:e.code} خارج شد`,Uke=e=>`خرج برمز ${e==null?void 0:e.code}`,Gke=e=>`Terminó con el código ${e==null?void 0:e.code}`,Wke=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,Kke=e=>`코드 ${e==null?void 0:e.code}로 종료됨`,Vke=e=>`コード ${e==null?void 0:e.code} で終了`,Qke=e=>`Zakończono z kodem ${e==null?void 0:e.code}`,Xke=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Hke(e):t==="fa"?qke(e):t==="ar"?Uke(e):t==="es"?Gke(e):t==="hi"?Wke(e):t==="ko"?Kke(e):t==="ja"?Vke(e):t==="pl"?Qke(e):Fke(e)}),Yke=e=>`Command not run: ${e==null?void 0:e.error}`,Zke=e=>`命令未运行:${e==null?void 0:e.error}`,Jke=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,e4e=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,t4e=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,r4e=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,n4e=e=>`명령이 실행되지 않았습니다: ${e==null?void 0:e.error}`,s4e=e=>`コマンドは実行されませんでした: ${e==null?void 0:e.error}`,o4e=e=>`Nie uruchomiono polecenia: ${e==null?void 0:e.error}`,P9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Zke(e):t==="fa"?Jke(e):t==="ar"?e4e(e):t==="es"?t4e(e):t==="hi"?r4e(e):t==="ko"?n4e(e):t==="ja"?s4e(e):t==="pl"?o4e(e):Yke(e)}),a4e=()=>"Collapse tool activity",i4e=()=>"折叠工具活动",c4e=()=>"بستن فعالیت ابزارها",l4e=()=>"طيّ نشاط الأداة",u4e=()=>"Contraer actividad de herramientas",_4e=()=>"टूल गतिविधि समेटें",f4e=()=>"도구 활동 접기",d4e=()=>"ツールのアクティビティを折りたたむ",h4e=()=>"Zwiń działania narzędzi",p4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i4e():t==="fa"?c4e():t==="ar"?l4e():t==="es"?u4e():t==="hi"?_4e():t==="ko"?f4e():t==="ja"?d4e():t==="pl"?h4e():a4e()}),m4e=()=>"Wait for the turn to finish before compacting.",g4e=()=>"请等待本轮结束后再压缩。",v4e=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",b4e=()=>"انتظر انتهاء الجولة قبل الضغط.",y4e=()=>"Espera a que termine el turno antes de comprimir.",x4e=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",w4e=()=>"압축하기 전에 턴이 끝날 때까지 기다리세요.",k4e=()=>"圧縮する前にターンの完了を待ってください。",j4e=()=>"Poczekaj na zakończenie odpowiedzi przed skróceniem kontekstu.",S4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?g4e():t==="fa"?v4e():t==="ar"?b4e():t==="es"?y4e():t==="hi"?x4e():t==="ko"?w4e():t==="ja"?k4e():t==="pl"?j4e():m4e()}),C4e=e=>`Compacting failed: ${e==null?void 0:e.error}`,z4e=e=>`压缩失败:${e==null?void 0:e.error}`,E4e=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,N4e=e=>`فشل الضغط: ${e==null?void 0:e.error}`,A4e=e=>`Error al comprimir: ${e==null?void 0:e.error}`,T4e=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,R4e=e=>`압축 실패: ${e==null?void 0:e.error}`,M4e=e=>`圧縮に失敗: ${e==null?void 0:e.error}`,O4e=e=>`Nie udało się skrócić kontekstu: ${e==null?void 0:e.error}`,$4e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?z4e(e):t==="fa"?E4e(e):t==="ar"?N4e(e):t==="es"?A4e(e):t==="hi"?T4e(e):t==="ko"?R4e(e):t==="ja"?M4e(e):t==="pl"?O4e(e):C4e(e)}),D4e=()=>"Continue",L4e=()=>"继续",I4e=()=>"ادامه",P4e=()=>"متابعة",B4e=()=>"Continuar",F4e=()=>"जारी रखें",H4e=()=>"계속",q4e=()=>"続行",U4e=()=>"Kontynuuj",G4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?L4e():t==="fa"?I4e():t==="ar"?P4e():t==="es"?B4e():t==="hi"?F4e():t==="ko"?H4e():t==="ja"?q4e():t==="pl"?U4e():D4e()}),W4e=()=>"Copy response",K4e=()=>"复制回复",V4e=()=>"کپی پاسخ",Q4e=()=>"نسخ الرد",X4e=()=>"Copiar respuesta",Y4e=()=>"जवाब कॉपी करें",Z4e=()=>"응답 복사",J4e=()=>"応答をコピー",e3e=()=>"Kopiuj odpowiedź",B9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?K4e():t==="fa"?V4e():t==="ar"?Q4e():t==="es"?X4e():t==="hi"?Y4e():t==="ko"?Z4e():t==="ja"?J4e():t==="pl"?e3e():W4e()}),t3e=e=>`Delete “${e==null?void 0:e.title}”? + */var v9;function PQ(){if(v9)return x2;v9=1;var e=s0(),r=IQ();function t(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var n=typeof Object.is=="function"?Object.is:t,s=r.useSyncExternalStore,o=e.useRef,a=e.useEffect,i=e.useMemo,c=e.useDebugValue;return x2.useSyncExternalStoreWithSelector=function(u,d,_,p,m){var k=o(null);if(k.current===null){var x={hasValue:!1,value:null};k.current=x}else x=k.current;k=i(function(){function b(N){if(!w){if(w=!0,y=N,N=p(N),m!==void 0&&x.hasValue){var A=x.value;if(m(A,N))return S=A}return S=N}if(A=S,n(y,N))return A;var E=p(N);return m!==void 0&&m(A,E)?(y=N,A):(y=N,S=E)}var w=!1,y,S,z=_===void 0?null:_;return[function(){return b(d())},z===null?void 0:function(){return b(z())}]},[d,_,p,m]);var v=s(u,k[0],k[1]);return a(function(){x.hasValue=!0,x.value=v},[v]),c(v),v},x2}var b9;function BQ(){return b9||(b9=1,y2.exports=PQ()),y2.exports}var Q$=BQ();const FQ=n0(Q$);function HQ(e,r){return e===r}function qc(e,r,t=HQ){const n=T.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:i}=e.subscribe(a);return i},[e]),s=T.useCallback(()=>e==null?void 0:e.get(),[e]);return Q$.useSyncExternalStoreWithSelector(n,s,s,r,t)}var y9={};function Tj(e,r){const t=T.useRef();return n=>{const s=e!=null&&e.select?e.select(n):n;return(e==null?void 0:e.structuralSharing)??r.options.defaultStructuralSharing?t.current=bf(t.current,s):s}}function fd(e){const r=Vo(),t=T.useContext(e.from?AQ:my),n=e.from??t,s=r.stores.getMatchStore(n),o=Tj(e,r),a=qc(s,i=>i?o(i):y9);if(a!==y9)return a;(e.shouldThrow??!0)&&wj()}function X$(e){return fd({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:r=>e.select?e.select(r.loaderData):r.loaderData})}function Y$(e){const{select:r,...t}=e;return fd({...t,select:n=>r?r(n.loaderDeps):n.loaderDeps})}function Z$(e){return fd({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:r=>{const t=e.strict===!1?r.params:r._strictParams;return e.select?e.select(t):t}})}function J$(e){return fd({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:r=>e.select?e.select(r.search):r.search})}function a0(e){const r=Vo();return T.useCallback(t=>r.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,r])}function Rj(e){return fd({...e,select:r=>e.select?e.select(r.context):r.context})}function j2(e){const r=T.useRef(e);return m_(r.current,e,{ignoreUndefined:!1})||(r.current=e),r.current}function qQ(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]}function UQ(e,r,t){if(e!=null&&e.external)return sb(e.href,t)?void 0:e.href;if(!YQ(r)&&!(typeof r!="string"||r.indexOf(":")===-1))try{return new URL(r),sb(r,t)?void 0:r}catch{}}function GQ(e,r,t,n,s,o){if(o)return!1;if(t!=null&&t.exact){if(!BV(e.pathname,r.pathname,n))return!1}else{const a=ab(e.pathname,n),i=ab(r.pathname,n);if(!(a.startsWith(i)&&(a.length===i.length||a[i.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!m_(e.search,r.search,{partial:!(t!=null&&t.exact),ignoreUndefined:!(t!=null&&t.explicitUndefined)})?!1:t!=null&&t.includeHash?s&&e.hash===r.hash:!0}function WQ(e,r){const t=Vo(),n=wV(r),{activeProps:s,inactiveProps:o,activeOptions:a,to:i,preload:c,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:_,replace:p,startTransition:m,resetScroll:k,viewTransition:x,children:v,target:b,disabled:w,style:y,className:S,onClick:z,onBlur:N,onFocus:A,onMouseEnter:E,onMouseLeave:M,onTouchStart:$,ignoreBlocker:D,params:I,search:G,hash:H,state:Q,mask:K,reloadDocument:J,unsafeRelative:ee,from:P,_fromLocation:L,...F}=e,q=G$(),U=j2(e.search),oe=j2(e.params),ie=j2(a),ce=T.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,U,oe,e.state,e.mask,e.unsafeRelative]),re=T.useCallback(De=>{const ct=t.buildLocation({_fromLocation:De,...ce}),lt=XQ(ct.maskedLocation?ct.maskedLocation.publicHref:ct.publicHref,ct.maskedLocation?ct.maskedLocation.external:ct.external,t.history,w),xe=UQ(lt,i,t.protocolAllowlist);return[lt==null?void 0:lt.href,xe,GQ(De,ct,ie,t.basepath,q,xe!==void 0)]},[ie,w,q,ce,t,i]),[W,ae,le]=qc(t.stores.location,re,qQ),me=le?tp(s,{})??KQ:S2,be=le?S2:tp(o,{})??S2,Se=[S,me.className,be.className].filter(Boolean).join(" "),Be=(y||me.style||be.style)&&{...y,...me.style,...be.style},Xe=T.useRef(!1),Me=e.reloadDocument||ae||w?!1:c??t.options.defaultPreload,Fe=u??t.options.defaultPreloadDelay??0,pt=T.useCallback(()=>{t.preloadRoute(ce).catch(De=>{console.warn(De),console.warn(SQ)})},[t,ce]),Ct=T.useCallback(De=>{if(!De){C2(n);return}if(!(De.isIntersecting??Me==="intent")){De.isIntersecting===!1&&C2(n);return}if(!Fe){pt();return}Um.has(n)||Um.set(n,setTimeout(()=>{Um.delete(n),pt()},Fe))},[pt,n,Me,Fe]);xV(n,Ct,Me!=="viewport"),T.useEffect(()=>{Xe.current||Me==="render"&&(pt(),Xe.current=!0)},[pt,Me]);const Vt=De=>{const ct=De.currentTarget.getAttribute("target"),lt=b!==void 0?b:ct;!w&&!(De.metaKey||De.altKey||De.ctrlKey||De.shiftKey)&&!De.defaultPrevented&&(!lt||lt==="_self")&&De.button===0&&(De.preventDefault(),t.navigate({...ce,replace:p,resetScroll:k,hashScrollIntoView:_,startTransition:m,viewTransition:x,ignoreBlocker:D}))};if(ae)return{...F,ref:n,href:ae,...v&&{children:v},...b&&{target:b},...w&&{disabled:w},...y&&{style:y},...S&&{className:S},...z&&{onClick:z},...N&&{onBlur:N},...A&&{onFocus:A},...E&&{onMouseEnter:E},...M&&{onMouseLeave:M},...$&&{onTouchStart:$}};const Ut=()=>{Me==="intent"&&pt()},Gt=()=>{Me==="intent"&&C2(n)};return{...F,...me,...be,href:W,ref:n,onClick:th([z,Vt]),onBlur:th([N,Gt]),onFocus:th([A,Ct]),onMouseEnter:th([E,Ct]),onMouseLeave:th([M,Gt]),onTouchStart:th([$,Ut]),disabled:!!w,target:b,...Be&&{style:Be},...Se&&{className:Se},...w&&VQ,...le&&QQ}}var S2={},KQ={className:"active"},VQ={role:"link","aria-disabled":!0},QQ={"data-status":"active","aria-current":"page"},Um=new WeakMap,C2=e=>{clearTimeout(Um.get(e)),Um.delete(e)},th=e=>r=>{for(const t of e)if(t){if(r.defaultPrevented)return;t(r)}};function XQ(e,r,t,n){if(!n)return r?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function YQ(e){if(typeof e!="string")return!1;const r=e.charCodeAt(0);return r===47?e.charCodeAt(1)!==47:r===46}var gy=T.forwardRef((e,r)=>{const{_asChild:t,...n}=e,{type:s,...o}=WQ(n,r),a=typeof n.children=="function"?n.children({isActive:o["data-status"]==="active"}):n.children;if(!t){const{disabled:i,...c}=o;return T.createElement("a",c,a)}return T.createElement(t,o,a)}),ZQ=class extends U${constructor(r){super(r),this.useMatch=t=>fd({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Rj({...t,from:this.id}),this.useSearch=t=>J$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Z$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Y$({...t,from:this.id}),this.useLoaderData=t=>X$({...t,from:this.id}),this.useNavigate=()=>a0({from:this.fullPath}),this.Link=st.forwardRef((t,n)=>f.jsx(gy,{ref:n,from:this.fullPath,...t}))}};function JQ(e){return new ZQ(e)}function eX(){return e=>rX(e)}var tX=class extends CQ{constructor(e){super(e),this.useMatch=r=>fd({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Rj({...r,from:this.id}),this.useSearch=r=>J$({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Z$({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Y$({...r,from:this.id}),this.useLoaderData=r=>X$({...r,from:this.id}),this.useNavigate=()=>a0({from:this.fullPath}),this.Link=st.forwardRef((r,t)=>f.jsx(gy,{ref:t,from:this.fullPath,...r}))}};function rX(e){return new tX(e)}function Xc(e){return r=>{const t=JQ(r);return t.isRoot=!1,t}}function nX(e){const r=Vo(),t=`not-found-${qc(r.stores.location,n=>n.pathname)}-${qc(r.stores.status,n=>n)}`;return f.jsx(Aj,{getResetKey:()=>t,onCatch:(n,s)=>{var o;if(rp(n))(o=e.onCatch)==null||o.call(e,n,s);else throw n},errorComponent:({error:n})=>{var s;if(rp(n))return(s=e.fallback)==null?void 0:s.call(e,n);throw n},children:e.children})}function sX(){return f.jsx("p",{children:"Not Found"})}function uh(e){return f.jsx(f.Fragment,{children:e.children})}function eD(e,r,t){return r.options.notFoundComponent?f.jsx(r.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...t}):f.jsx(sX,{})}function vy(e,r){const t=(r==null?void 0:r.options.pendingComponent)??e.options.defaultPendingComponent;return t?f.jsx(t,{}):null}var oX=(e,r)=>e[0]===r[0]&&e[1]===r[1],tD=(e,r,t)=>!r.isRoot||r.options.shellComponent||r.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,rD=T.memo(function({routeId:r}){const t=Vo();return f.jsx(aX,{router:t,match:qc(t.stores.getMatchStore(r),n=>n)})});function aX({router:e,match:r}){var _,p;const t=e.routesById[r.routeId],n=vy(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,o=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((_=e.options.notFoundRoute)==null?void 0:_.options.component):t.options.notFoundComponent,i=r.ssr===!1||r.ssr==="data-only",c=tD(e,t,r.ssr)&&(t.options.wrapInSuspense??n??(((p=t.options.errorComponent)==null?void 0:p.preload)||i))?T.Suspense:uh,u=s?Aj:uh,d=a?nX:uh;return f.jsxs(t.isRoot?t.options.shellComponent??uh:uh,{children:[f.jsx(my.Provider,{value:r.routeId,children:f.jsx(c,{fallback:n,children:f.jsx(u,{getResetKey:()=>r,errorComponent:s,onCatch:(m,k)=>{if(rp(m))throw m.routeId??(m.routeId=r.routeId),m;o==null||o(m,k)},children:f.jsx(d,{fallback:m=>{if(m.routeId??(m.routeId=r.routeId),m.routeId!==r.routeId)throw m;return T.createElement(a,m)},children:i?f.jsx(EQ,{fallback:n,children:f.jsx(x9,{match:r})}):f.jsx(x9,{match:r})})})})}),null]})}var x9=T.memo(function({match:r}){const t=Vo(),n=r.routeId,s=t.routesById[n],o=T.useMemo(()=>{var c;const i=(c=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:c({routeId:n,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return i?JSON.stringify(i):void 0},[n,r.loaderDeps,r._strictParams,r._strictSearch,s.options.remountDeps,t.options.defaultRemountDeps]),a=T.useMemo(()=>{const i=s.options.component??t.options.defaultComponent;return i?f.jsx(i,{},o):f.jsx(lg,{})},[o,s.options.component,t.options.defaultComponent]);if(r.status==="pending"){if(t.ssr&&!tD(t,s,r.ssr))return a;if(t._tx)throw t._tx[5];return vy(t,s)}if(r.status==="notFound")return eD(t,s,r.error);if(r.status==="error")throw r.error;return a}),lg=T.memo(function(){const r=Vo(),t=T.useContext(my);let n,s,o;{const i=r.stores.getMatchStore(t);[n,s]=qc(i,c=>[!!c._notFound,c.error],oX),o=qc(r.stores.ids,c=>c[c.indexOf(t)+1])}if(n)return eD(r,r.routesById[t],s);if(!o)return null;const a=f.jsx(rD,{routeId:o});return t===Sh?f.jsx(T.Suspense,{fallback:vy(r),children:a}):a});function nD(e,r){const t=e[1];e.length=0,t==null||t(r)}function iX({t:e}){const r=Vo(),t=r._rendered??(r._rendered=[]);return r.startTransition=(n,s)=>new Promise(o=>{nD(t,!1),t.push(s,o),e(r),T.startTransition(n)}),C$(()=>{const n=r.history.subscribe(r.load);r.updateLatestLocation();const s=r.latestLocation,o=r.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Kl(s.publicHref)!==Kl(o.publicHref))return r.commitLocation({...o,replace:!0,ignoreBlocker:!0}),n;const a=r.stores.resolvedLocation.get();return(a==null?void 0:a.href)===s.href&&a.state.__TSR_key===s.state.__TSR_key?t.push(r.stores.matches.get(),i=>{i&&r.emit({type:"onRendered",...hy(a,a)})}):r._tx||r.load({sync:!0}).catch(console.error),n},[r,r.history]),null}function cX(){const e=Vo(),r=e.routesById[Sh],t=vy(e,r),n=e.ssr?uh:T.Suspense,s=f.jsxs(f.Fragment,{children:[f.jsx(iX,{t:T.useState()[1]}),f.jsx(n,{fallback:t,children:f.jsx(lX,{})})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:s}):s}function lX(){const e=Vo(),r=e._rendered,t=qc(e.stores.matches,a=>r[0]??a),n=t[0],s=n==null?void 0:n.routeId;C$(()=>{r[0]===t&&nD(r,!0)},[r,t]);const o=s?f.jsx(rD,{routeId:s}):null;return f.jsx(my.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?o:f.jsx(Aj,{getResetKey:()=>n,onCatch:void 0,children:o})})}var uX=e=>({createMutableStore:p9,createReadonlyStore:p9,batch:$Q}),_X=e=>new fX(e),fX=class extends fQ{constructor(e){super(e,uX)}};function dX({router:e,children:r,...t}){E$(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const n=f.jsx(W$.Provider,{value:e,children:r});return e.options.Wrap?f.jsx(e.options.Wrap,{children:n}):n}function hX({router:e,...r}){return f.jsx(dX,{router:e,...r,children:f.jsx(cX,{})})}function pX(e,r){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function")return{shouldBlockFn:async()=>await e(),enableBeforeUnload:!0,withResolver:!1};const t=!!(e.condition??!0),n=e.blockerFn;return{shouldBlockFn:async()=>t&&n!==void 0?await n():t,enableBeforeUnload:t,withResolver:n===void 0}}function mX(e,r){const{shouldBlockFn:t,enableBeforeUnload:n=!0,disabled:s=!1,withResolver:o=!1}=pX(e),a=Vo(),{history:i}=a,[c,u]=T.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return T.useEffect(()=>{const d=async _=>{function p(b){const w=a.parseLocation(b),[,y,S]=a.getMatchedRoutes(w.pathname);return S===void 0?{routeId:"__notFound__",fullPath:w.pathname,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}:{routeId:S.id,fullPath:S.fullPath,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}}const m=p(_.currentLocation),k=p(_.nextLocation);if(m.routeId==="__notFound__"&&k.routeId!=="__notFound__")return!1;const x=await t({action:_.action,current:m,next:k});if(!o)return x;if(!x)return!1;const v=await new Promise(b=>{u({status:"blocked",current:m,next:k,action:_.action,proceed:()=>b(!1),reset:()=>b(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return s?void 0:i.block({blockerFn:d,enableBeforeUnload:n})},[t,n,s,o,i,a]),c}function sD(e){const r=Vo({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||r;return qc(t.stores.__store,Tj(e,t))}function gX(e){const r=Vo();return qc(r.stores.location,Tj(e,r))}const ub=new WeakMap,M1=new WeakMap;function yi(e,r,t="*"){var n;for(const s of e.getQueryCache().findAll({queryKey:r}))ub.set(s,(ub.get(s)??0)+1),(n=M1.get(s))==null||n.add(t)}function i0(e,r,t,n=!0){if(!r)return e;const s=new Map(r.map(c=>[c.id,c])),o=new Set(e.map(c=>c.id)),a=r.filter(c=>t.has(c.id)&&!o.has(c.id)),i=e.filter(c=>!t.has(c.id)||s.has(c.id)).map(c=>t.has(c.id)?s.get(c.id)??c:c);return n?[...a,...i]:[...i,...a]}async function vp(e,r,t,n=(s,o)=>o??s){const s=e.getQueryCache().find({queryKey:r,exact:!0}),o=s?ub.get(s):void 0,a=await t();if(!s||ub.get(s)===o||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:r,exact:!0})!==s)return a;e.setQueryData(r,c=>c??a);const i=new Set;M1.set(s,i);try{const c=await t();return i.size?n(c,e.getQueryData(r),i):c}finally{M1.get(s)===i&&M1.delete(s)}}const np=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function oD(e){const r=e.queryKey[2];if(r==="resolvedFile")return np(e.queryKey[7]);const t=r==="getProjectFile"?e.queryKey[5]:r==="getCodeTree"?e.queryKey[4]:null;return typeof t=="object"&&t!==null&&"ref"in t&&np(t.ref)}function $a(e,r=Si(),t,n=!1){if(!Wr(r))return;const s={queryKey:r,predicate:o=>e.includes(String(o.queryKey[2]))&&!oD(o)&&(!t||t(o))};n?Je.cancelQueries(s).then(()=>{Wr(r)&&Je.invalidateQueries(s)}):Je.invalidateQueries(s)}const aD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],Mj=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],vX=["listProjects","listProjectActivity","listSidebarChatSessions","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...Mj,...aD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function bX(e,r=Si(),t=!1){const n=Je.getQueryData([...r,"listChatSessions",e])??[],s=Je.getQueryData([...r,"listRuns",e])??[],o=Je.getQueryData([...r,"listExperiments",e])??[];$a([...aD,...Mj,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],r,a=>{const i=a.queryKey[2];return i==="getRunDiff"?s.some(c=>c.id===a.queryKey[3]):i==="getExperimentDiff"?o.some(c=>c.id===a.queryKey[3]):i==="getSessionWorktree"?n.some(c=>c.id===a.queryKey[3]):i==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function by(e){const r=Si();Pc.add(e),yi(Je,[...r,"listChatSessions"],e),Je.setQueriesData({queryKey:[...r,"listChatSessions"]},t=>t==null?void 0:t.filter(n=>n.id!==e));for(const t of["getChatMessages","getSessionWorktree"])xj({queryKey:[...r,t,e]})}function yX(e){const r=Si(),t=Je.getQueryData([...r,"listChatSessions",e]);for(const n of t??[])by(n.id);xj({queryKey:r,predicate:n=>n.queryKey.slice(3).includes(e)})}const xX={hf:["getHfSettings","getComputeSettings","getEnvVars"],tinker:["getTinkerSettings","getComputeSettings","getEnvVars"],k8s:["getK8sSettings","getComputeSettings"],modal:["getModalSettings","getComputeSettings","getEnvVars"],slurm:["getSlurmSettings","getComputeSettings"],ray:["getRaySettings","getComputeSettings"],env:["getEnvVars","getHfSettings","getTinkerSettings","getModalSettings","getSlurmSettings","getRaySettings","getK8sSettings","getOpenResearchSettings","getComputeSettings","getHarnesses"],"data-dir":["getDataDir"],ssh:["getSshSettings","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function wX(e,r){var a;if(!Wr(r))return;const t=(i,c=r,u)=>$a(i,c,u,!0),n=e.split("?")[0];if(/\/(ui-state|open|reveal|prewarm|validate|preflight)$/.test(n))return;const s=(a=/^\/api\/settings\/([^/]+)/.exec(n))==null?void 0:a[1];if(s){t(xX[s]??[],r);return}if(n.startsWith("/api/local-models")&&!/\/(discover|check)$/.test(n)){t(["getLocalModels","getHarnesses"],r);return}if(n==="/api/user-skills"){t(["listUserSkills","getSkills","getSkillContent"],r);return}if(n==="/api/latex-templates"){t(["listLatexTemplates"],r);return}if(n==="/api/overleaf/token"){t(["getOverleafSettings","getOverleafState","getOverleafStatus"],r);return}if(n.startsWith("/api/update/")){t(["getUpdateStatus","getLocalMachine"],r);return}if(n.startsWith("/api/remote/")||n.startsWith("/_orx/")){t(["listRemoteSessions"],r),Je.invalidateQueries({queryKey:["gateway","runtime"]});return}if(n.startsWith("/api/chat/")){t(["listSidebarChatSessions"],r),n==="/api/chat/sessions"&&t(["getProjectStarterPrompts","listProjectActivity"],r);return}const o=/^\/api\/projects\/([^/]+)(.*)$/.exec(n);if(o){const[,i,c]=o;if(c.startsWith("/file")){bX(i,r,!0);return}t(["listProjects","listProjectActivity","listSidebarChatSessions"],r),t(["getProjectGitStatus","getCodeTree","getProjectStarterPrompts"],r,u=>u.queryKey[3]===i);return}(n==="/api/projects"||n==="/api/onboarding/complete")&&t(["listProjects","listProjectActivity","getUiState","getProfile"],r)}const kX={},jX="en",Oj=["en","zh-CN","fa","ar","es","hi","ko","ja","pl"],iD="orx:locale",$j=["localStorage","preferredLanguage","baseLocale"],w9=[],ug=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let k9=!1,C=()=>{var t;let e=$j;!ug&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=uD(window.location.href));const r=SX(e);if(r)return k9||(k9=!0,cD(r,{reload:!1})),r;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function SX(e,r){let t;for(const n of e){if(n==="baseLocale")t=jX;else if(n==="preferredLanguage"&&!ug)t=AX();else if(n==="localStorage"&&!ug)t=localStorage.getItem(iD)??void 0;else if(_D(n)&&_b.has(n)){const o=_b.get(n);if(o){const a=o.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return EX(a)}}const s=_g(t);if(s)return s}}const CX=e=>{window.location.reload()};let cD=(e,r)=>{var i;const t={reload:!0,...r};let n;try{n=C()}catch{}const s=[];let o=$j;!ug&&typeof window<"u"&&((i=window.location)!=null&&i.href)&&(o=uD(window.location.href));for(const c of o)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(iD,e);else if(_D(c)&&_b.has(c)){const u=_b.get(c);if(u){let d=u.setLocale(e);d instanceof Promise&&(d=d.catch(_=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:_})}),s.push(d))}}}const a=()=>{!ug&&t.reload&&window.location&&e!==n&&CX()};if(s.length)return Promise.all(s).then(()=>{a()});a()},zX=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function _g(e){if(typeof e!="string")return;const r=e.toLowerCase();for(const t of Oj)if(t.toLowerCase()===r)return t}function lD(e){return!!e&&Oj.some(r=>r===e)}function EX(e){const r=_g(e);if(r)return r;throw new Error(`Invalid locale: ${e}. Expected one of: ${Oj.join(", ")}`)}function NX(e,r){return e.exec(r.href)}function AX(){var r;if(!((r=navigator==null?void 0:navigator.languages)!=null&&r.length))return;const e=navigator.languages.map(t=>({fullTag:t,baseTag:t.split("-")[0]}));for(const t of e){const n=_g(t.fullTag);if(n)return n;const s=_g(t.baseTag);if(s)return s}}function TX(e){return RX(e)}function RX(e){const r=typeof e=="string"?new URL(e,zX()):new URL(e),t=r.pathname.split("/").filter(Boolean);return t.length>0&&_g(t[0])&&(r.pathname="/"+t.slice(1).join("/")),r}let j9,S9;function MX(e){if(w9.length===0)return;const r=typeof e=="string"?e:e.href;if(j9===r)return S9;const t=new URL(r,"http://example.com"),n=TX(t),s=n.href===t.href?[t]:[t,n];let o;for(const a of s){for(const i of w9){const c=new kX(i.match,a.href);if(NX(c,a)){o=i;break}}if(o)break}return j9=r,S9=o,o}function uD(e){const r=MX(e);return r&&r.exclude!==!0&&Array.isArray(r.strategy)?r.strategy:$j}const _b=new Map;function _D(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const OX=e=>`Actions for ${e==null?void 0:e.name}`,$X=e=>`${e==null?void 0:e.name} 的操作`,DX=e=>`عملیات ${e==null?void 0:e.name}`,LX=e=>`إجراءات ${e==null?void 0:e.name}`,IX=e=>`Acciones para ${e==null?void 0:e.name}`,PX=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,BX=e=>`${e==null?void 0:e.name} 작업`,FX=e=>`${e==null?void 0:e.name} の操作`,HX=e=>`Operacje na elemencie ${e==null?void 0:e.name}`,qX=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?$X(e):t==="fa"?DX(e):t==="ar"?LX(e):t==="es"?IX(e):t==="hi"?PX(e):t==="ko"?BX(e):t==="ja"?FX(e):t==="pl"?HX(e):OX(e)}),UX=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,GX=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,WX=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,KX=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,VX=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,QX=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,XX=e=>`${e==null?void 0:e.path} — Space로 미리보기; 더블 클릭하거나 Enter를 눌러 탭에서 열린 상태 유지`,YX=e=>`${e==null?void 0:e.path} — Space でプレビュー。ダブルクリックまたは Enter でタブを開いたままにする`,ZX=e=>`${e==null?void 0:e.path} — naciśnij spację, aby wyświetlić podgląd; kliknij dwukrotnie lub naciśnij Enter, aby pozostawić kartę otwartą`,JX=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?GX(e):t==="fa"?WX(e):t==="ar"?KX(e):t==="es"?VX(e):t==="hi"?QX(e):t==="ko"?XX(e):t==="ja"?YX(e):t==="pl"?ZX(e):UX(e)}),eY=e=>`Branch: ${e==null?void 0:e.branch}`,tY=e=>`分支:${e==null?void 0:e.branch}`,rY=e=>`شاخه: ${e==null?void 0:e.branch}`,nY=e=>`الفرع: ${e==null?void 0:e.branch}`,sY=e=>`Rama: ${e==null?void 0:e.branch}`,oY=e=>`ब्रांच: ${e==null?void 0:e.branch}`,aY=e=>`브랜치: ${e==null?void 0:e.branch}`,iY=e=>`ブランチ: ${e==null?void 0:e.branch}`,cY=e=>`Gałąź: ${e==null?void 0:e.branch}`,lY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?tY(e):t==="fa"?rY(e):t==="ar"?nY(e):t==="es"?sY(e):t==="hi"?oY(e):t==="ko"?aY(e):t==="ja"?iY(e):t==="pl"?cY(e):eY(e)}),uY=e=>`Browse code on ${e==null?void 0:e.branch}`,_Y=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,fY=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,dY=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,hY=e=>`Explorar el código en ${e==null?void 0:e.branch}`,pY=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,mY=e=>`${e==null?void 0:e.branch}의 코드 탐색`,gY=e=>`${e==null?void 0:e.branch} のコードを閲覧`,vY=e=>`Przeglądaj kod gałęzi ${e==null?void 0:e.branch}`,fD=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?_Y(e):t==="fa"?fY(e):t==="ar"?dY(e):t==="es"?hY(e):t==="hi"?pY(e):t==="ko"?mY(e):t==="ja"?gY(e):t==="pl"?vY(e):uY(e)}),bY=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,yY=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,xY=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,wY=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,kY=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,jY=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,SY=e=>`이 채팅의 에이전트 환경 및 모델: ${e==null?void 0:e.label}`,CY=e=>`このチャットのエージェント環境とモデル: ${e==null?void 0:e.label}`,zY=e=>`Środowisko agenta i model dla tego czatu: ${e==null?void 0:e.label}`,EY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yY(e):t==="fa"?xY(e):t==="ar"?wY(e):t==="es"?kY(e):t==="hi"?jY(e):t==="ko"?SY(e):t==="ja"?CY(e):t==="pl"?zY(e):bY(e)}),NY=e=>`Collapse ${e==null?void 0:e.name}`,AY=e=>`折叠 ${e==null?void 0:e.name}`,TY=e=>`بستن ${e==null?void 0:e.name}`,RY=e=>`طيّ ${e==null?void 0:e.name}`,MY=e=>`Contraer ${e==null?void 0:e.name}`,OY=e=>`${e==null?void 0:e.name} समेटें`,$Y=e=>`${e==null?void 0:e.name} 접기`,DY=e=>`${e==null?void 0:e.name} を折りたたむ`,LY=e=>`Zwiń ${e==null?void 0:e.name}`,IY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?AY(e):t==="fa"?TY(e):t==="ar"?RY(e):t==="es"?MY(e):t==="hi"?OY(e):t==="ko"?$Y(e):t==="ja"?DY(e):t==="pl"?LY(e):NY(e)}),PY=e=>`Committed changes versus ${e==null?void 0:e.parent}`,BY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,FY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,HY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,qY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,UY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,GY=e=>`${e==null?void 0:e.parent} 대비 커밋된 변경 사항`,WY=e=>`${e==null?void 0:e.parent} に対するコミット済みの変更`,KY=e=>`Zatwierdzone zmiany względem ${e==null?void 0:e.parent}`,VY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?BY(e):t==="fa"?FY(e):t==="ar"?HY(e):t==="es"?qY(e):t==="hi"?UY(e):t==="ko"?GY(e):t==="ja"?WY(e):t==="pl"?KY(e):PY(e)}),QY=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,XY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,YY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,ZY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,JY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,eZ=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,tZ=e=>`${e==null?void 0:e.parent} 대비 커밋된 변경 사항 (차이가 잘렸으며 개수는 최솟값입니다)`,rZ=e=>`${e==null?void 0:e.parent} に対するコミット済みの変更(差分は省略されており、件数は下限値です)`,nZ=e=>`Zatwierdzone zmiany względem ${e==null?void 0:e.parent} (diff został ucięty, liczniki podają wartości minimalne)`,sZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?XY(e):t==="fa"?YY(e):t==="ar"?ZY(e):t==="es"?JY(e):t==="hi"?eZ(e):t==="ko"?tZ(e):t==="ja"?rZ(e):t==="pl"?nZ(e):QY(e)}),oZ=e=>`Copy ${e==null?void 0:e.value}`,aZ=e=>`复制 ${e==null?void 0:e.value}`,iZ=e=>`کپی ${e==null?void 0:e.value}`,cZ=e=>`نسخ ${e==null?void 0:e.value}`,lZ=e=>`Copiar ${e==null?void 0:e.value}`,uZ=e=>`${e==null?void 0:e.value} कॉपी करें`,_Z=e=>`${e==null?void 0:e.value} 복사`,fZ=e=>`${e==null?void 0:e.value} をコピー`,dZ=e=>`Kopiuj ${e==null?void 0:e.value}`,hZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?aZ(e):t==="fa"?iZ(e):t==="ar"?cZ(e):t==="es"?lZ(e):t==="hi"?uZ(e):t==="ko"?_Z(e):t==="ja"?fZ(e):t==="pl"?dZ(e):oZ(e)}),pZ=e=>`Delete ${e==null?void 0:e.name}`,mZ=e=>`删除 ${e==null?void 0:e.name}`,gZ=e=>`حذف ${e==null?void 0:e.name}`,vZ=e=>`حذف ${e==null?void 0:e.name}`,bZ=e=>`Eliminar ${e==null?void 0:e.name}`,yZ=e=>`${e==null?void 0:e.name} हटाएं`,xZ=e=>`${e==null?void 0:e.name} 삭제`,wZ=e=>`${e==null?void 0:e.name} を削除`,kZ=e=>`Usuń ${e==null?void 0:e.name}`,C9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mZ(e):t==="fa"?gZ(e):t==="ar"?vZ(e):t==="es"?bZ(e):t==="hi"?yZ(e):t==="ko"?xZ(e):t==="ja"?wZ(e):t==="pl"?kZ(e):pZ(e)}),jZ=e=>`Download ${e==null?void 0:e.name}`,SZ=e=>`下载 ${e==null?void 0:e.name}`,CZ=e=>`بارگیری ${e==null?void 0:e.name}`,zZ=e=>`تنزيل ${e==null?void 0:e.name}`,EZ=e=>`Descargar ${e==null?void 0:e.name}`,NZ=e=>`${e==null?void 0:e.name} डाउनलोड करें`,AZ=e=>`${e==null?void 0:e.name} 다운로드`,TZ=e=>`${e==null?void 0:e.name} をダウンロード`,RZ=e=>`Pobierz ${e==null?void 0:e.name}`,fb=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?SZ(e):t==="fa"?CZ(e):t==="ar"?zZ(e):t==="es"?EZ(e):t==="hi"?NZ(e):t==="ko"?AZ(e):t==="ja"?TZ(e):t==="pl"?RZ(e):jZ(e)}),MZ=e=>`Expand ${e==null?void 0:e.name}`,OZ=e=>`展开 ${e==null?void 0:e.name}`,$Z=e=>`باز کردن ${e==null?void 0:e.name}`,DZ=e=>`توسيع ${e==null?void 0:e.name}`,LZ=e=>`Expandir ${e==null?void 0:e.name}`,IZ=e=>`${e==null?void 0:e.name} फैलाएं`,PZ=e=>`${e==null?void 0:e.name} 펼치기`,BZ=e=>`${e==null?void 0:e.name} を展開`,FZ=e=>`Rozwiń ${e==null?void 0:e.name}`,HZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?OZ(e):t==="fa"?$Z(e):t==="ar"?DZ(e):t==="es"?LZ(e):t==="hi"?IZ(e):t==="ko"?PZ(e):t==="ja"?BZ(e):t==="pl"?FZ(e):MZ(e)}),qZ=e=>`Hide additional ${e==null?void 0:e.target}`,UZ=e=>`隐藏其余${e==null?void 0:e.target}`,GZ=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,WZ=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,KZ=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,VZ=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,QZ=e=>`추가 ${e==null?void 0:e.target} 숨기기`,XZ=e=>`追加の ${e==null?void 0:e.target} を非表示`,YZ=e=>`Ukryj dodatkowe ${e==null?void 0:e.target}`,ZZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?UZ(e):t==="fa"?GZ(e):t==="ar"?WZ(e):t==="es"?KZ(e):t==="hi"?VZ(e):t==="ko"?QZ(e):t==="ja"?XZ(e):t==="pl"?YZ(e):qZ(e)}),JZ=e=>`Hide error details for ${e==null?void 0:e.activity}`,eJ=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,tJ=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,rJ=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,nJ=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,sJ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,oJ=e=>`${e==null?void 0:e.activity} 오류 상세 정보 숨기기`,aJ=e=>`${e==null?void 0:e.activity} のエラー詳細を非表示`,iJ=e=>`Ukryj szczegóły błędu działania ${e==null?void 0:e.activity}`,cJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?eJ(e):t==="fa"?tJ(e):t==="ar"?rJ(e):t==="es"?nJ(e):t==="hi"?sJ(e):t==="ko"?oJ(e):t==="ja"?aJ(e):t==="pl"?iJ(e):JZ(e)}),lJ=e=>`${e==null?void 0:e.count} consecutive identical calls`,uJ=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,_J=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,fJ=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,dJ=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,hJ=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,pJ=e=>`동일한 호출 ${e==null?void 0:e.count}회 연속`,mJ=e=>`同一の呼び出しが ${e==null?void 0:e.count} 回連続`,gJ=e=>`Kolejne identyczne wywołania: ${e==null?void 0:e.count}`,vJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?uJ(e):t==="fa"?_J(e):t==="ar"?fJ(e):t==="es"?dJ(e):t==="hi"?hJ(e):t==="ko"?pJ(e):t==="ja"?mJ(e):t==="pl"?gJ(e):lJ(e)}),bJ=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,yJ=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,xJ=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,wJ=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,kJ=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,jJ=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,SJ=e=>`${e==null?void 0:e.name} — 더블 클릭하거나 Enter를 눌러 열린 상태 유지`,CJ=e=>`${e==null?void 0:e.name} — ダブルクリックまたは Enter で開いたままにする`,zJ=e=>`${e==null?void 0:e.name} — kliknij dwukrotnie lub naciśnij Enter, aby pozostawić otwarte`,EJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yJ(e):t==="fa"?xJ(e):t==="ar"?wJ(e):t==="es"?kJ(e):t==="hi"?jJ(e):t==="ko"?SJ(e):t==="ja"?CJ(e):t==="pl"?zJ(e):bJ(e)}),NJ=e=>`Open ${e==null?void 0:e.branch} on GitHub`,AJ=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,TJ=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,RJ=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,MJ=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,OJ=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,$J=e=>`GitHub에서 ${e==null?void 0:e.branch} 열기`,DJ=e=>`GitHub で ${e==null?void 0:e.branch} を開く`,LJ=e=>`Otwórz gałąź ${e==null?void 0:e.branch} w GitHubie`,dD=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?AJ(e):t==="fa"?TJ(e):t==="ar"?RJ(e):t==="es"?MJ(e):t==="hi"?OJ(e):t==="ko"?$J(e):t==="ja"?DJ(e):t==="pl"?LJ(e):NJ(e)}),IJ=e=>`Open experiment ${e==null?void 0:e.name}`,PJ=e=>`打开实验 ${e==null?void 0:e.name}`,BJ=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,FJ=e=>`فتح التجربة ${e==null?void 0:e.name}`,HJ=e=>`Abrir el experimento ${e==null?void 0:e.name}`,qJ=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,UJ=e=>`실험 ${e==null?void 0:e.name} 열기`,GJ=e=>`実験 ${e==null?void 0:e.name} を開く`,WJ=e=>`Otwórz eksperyment ${e==null?void 0:e.name}`,KJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?PJ(e):t==="fa"?BJ(e):t==="ar"?FJ(e):t==="es"?HJ(e):t==="hi"?qJ(e):t==="ko"?UJ(e):t==="ja"?GJ(e):t==="pl"?WJ(e):IJ(e)}),VJ=e=>`Open ${e==null?void 0:e.path} in the right pane`,QJ=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,XJ=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,YJ=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,ZJ=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,JJ=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,eee=e=>`오른쪽 패널에서 ${e==null?void 0:e.path} 열기`,tee=e=>`右側のペインで ${e==null?void 0:e.path} を開く`,ree=e=>`Otwórz ${e==null?void 0:e.path} w prawym panelu`,nee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?QJ(e):t==="fa"?XJ(e):t==="ar"?YJ(e):t==="es"?ZJ(e):t==="hi"?JJ(e):t==="ko"?eee(e):t==="ja"?tee(e):t==="pl"?ree(e):VJ(e)}),see=e=>`Open logs for run ${e==null?void 0:e.run}`,oee=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,aee=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,iee=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,cee=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,lee=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,uee=e=>`실행 ${e==null?void 0:e.run}의 로그 열기`,_ee=e=>`実行 ${e==null?void 0:e.run} のログを開く`,fee=e=>`Otwórz logi uruchomienia ${e==null?void 0:e.run}`,dee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?oee(e):t==="fa"?aee(e):t==="ar"?iee(e):t==="es"?cee(e):t==="hi"?lee(e):t==="ko"?uee(e):t==="ja"?_ee(e):t==="pl"?fee(e):see(e)}),hee=e=>`Open ${e==null?void 0:e.name} on GitHub`,pee=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,mee=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,gee=e=>`فتح ${e==null?void 0:e.name} على GitHub`,vee=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,bee=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,yee=e=>`GitHub에서 ${e==null?void 0:e.name} 열기`,xee=e=>`GitHub で ${e==null?void 0:e.name} を開く`,wee=e=>`Otwórz ${e==null?void 0:e.name} w GitHubie`,U4=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?pee(e):t==="fa"?mee(e):t==="ar"?gee(e):t==="es"?vee(e):t==="hi"?bee(e):t==="ko"?yee(e):t==="ja"?xee(e):t==="pl"?wee(e):hee(e)}),kee=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,jee=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,See=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,Cee=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,zee=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,Eee=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,Nee=e=>`오른쪽 패널에서 실행 ${e==null?void 0:e.id}의 로그 열기`,Aee=e=>`右側のペインで実行 ${e==null?void 0:e.id} のログを開く`,Tee=e=>`Otwórz logi uruchomienia ${e==null?void 0:e.id} w prawym panelu`,Ree=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?jee(e):t==="fa"?See(e):t==="ar"?Cee(e):t==="es"?zee(e):t==="hi"?Eee(e):t==="ko"?Nee(e):t==="ja"?Aee(e):t==="pl"?Tee(e):kee(e)}),Mee=e=>`Overleaf — ${e==null?void 0:e.status}`,Oee=e=>`Overleaf — ${e==null?void 0:e.status}`,$ee=e=>`Overleaf — ${e==null?void 0:e.status}`,Dee=e=>`Overleaf — ${e==null?void 0:e.status}`,Lee=e=>`Overleaf — ${e==null?void 0:e.status}`,Iee=e=>`Overleaf — ${e==null?void 0:e.status}`,Pee=e=>`Overleaf — ${e==null?void 0:e.status}`,Bee=e=>`Overleaf — ${e==null?void 0:e.status}`,Fee=e=>`Overleaf — ${e==null?void 0:e.status}`,Hee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Oee(e):t==="fa"?$ee(e):t==="ar"?Dee(e):t==="es"?Lee(e):t==="hi"?Iee(e):t==="ko"?Pee(e):t==="ja"?Bee(e):t==="pl"?Fee(e):Mee(e)}),qee=e=>`Preview /${e==null?void 0:e.name} skill`,Uee=e=>`预览 /${e==null?void 0:e.name} 技能`,Gee=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,Wee=e=>`معاينة مهارة /${e==null?void 0:e.name}`,Kee=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,Vee=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,Qee=e=>`/${e==null?void 0:e.name} 스킬 미리보기`,Xee=e=>`/${e==null?void 0:e.name} スキルをプレビュー`,Yee=e=>`Podgląd umiejętności /${e==null?void 0:e.name}`,Zee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Uee(e):t==="fa"?Gee(e):t==="ar"?Wee(e):t==="es"?Kee(e):t==="hi"?Vee(e):t==="ko"?Qee(e):t==="ja"?Xee(e):t==="pl"?Yee(e):qee(e)}),Jee=e=>`Remove annotation ${e==null?void 0:e.number}`,ete=e=>`移除批注 ${e==null?void 0:e.number}`,tte=e=>`حذف یادداشت ${e==null?void 0:e.number}`,rte=e=>`إزالة التعليق ${e==null?void 0:e.number}`,nte=e=>`Quitar la anotación ${e==null?void 0:e.number}`,ste=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,ote=e=>`주석 ${e==null?void 0:e.number} 제거`,ate=e=>`注釈 ${e==null?void 0:e.number} を削除`,ite=e=>`Usuń adnotację ${e==null?void 0:e.number}`,cte=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ete(e):t==="fa"?tte(e):t==="ar"?rte(e):t==="es"?nte(e):t==="hi"?ste(e):t==="ko"?ote(e):t==="ja"?ate(e):t==="pl"?ite(e):Jee(e)}),lte=e=>`Remove ${e==null?void 0:e.name}`,ute=e=>`移除 ${e==null?void 0:e.name}`,_te=e=>`حذف ${e==null?void 0:e.name}`,fte=e=>`إزالة ${e==null?void 0:e.name}`,dte=e=>`Quitar ${e==null?void 0:e.name}`,hte=e=>`${e==null?void 0:e.name} हटाएं`,pte=e=>`${e==null?void 0:e.name} 제거`,mte=e=>`${e==null?void 0:e.name} を削除`,gte=e=>`Usuń ${e==null?void 0:e.name}`,vte=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ute(e):t==="fa"?_te(e):t==="ar"?fte(e):t==="es"?dte(e):t==="hi"?hte(e):t==="ko"?pte(e):t==="ja"?mte(e):t==="pl"?gte(e):lte(e)}),bte=e=>`Remove queued message: ${e==null?void 0:e.text}`,yte=e=>`移除排队消息:${e==null?void 0:e.text}`,xte=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,wte=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,kte=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,jte=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,Ste=e=>`대기 메시지 제거: ${e==null?void 0:e.text}`,Cte=e=>`待機中のメッセージを削除: ${e==null?void 0:e.text}`,zte=e=>`Usuń wiadomość z kolejki: ${e==null?void 0:e.text}`,Ete=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yte(e):t==="fa"?xte(e):t==="ar"?wte(e):t==="es"?kte(e):t==="hi"?jte(e):t==="ko"?Ste(e):t==="ja"?Cte(e):t==="pl"?zte(e):bte(e)}),Nte=e=>`Retry queued message: ${e==null?void 0:e.text}`,Ate=e=>`重试排队消息:${e==null?void 0:e.text}`,Tte=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,Rte=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,Mte=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,Ote=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,$te=e=>`대기 메시지 다시 시도: ${e==null?void 0:e.text}`,Dte=e=>`待機中のメッセージを再試行: ${e==null?void 0:e.text}`,Lte=e=>`Ponów wiadomość z kolejki: ${e==null?void 0:e.text}`,Ite=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Ate(e):t==="fa"?Tte(e):t==="ar"?Rte(e):t==="es"?Mte(e):t==="hi"?Ote(e):t==="ko"?$te(e):t==="ja"?Dte(e):t==="pl"?Lte(e):Nte(e)}),Pte=e=>`Run ${e==null?void 0:e.value} in a terminal here`,Bte=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,Fte=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,Hte=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,qte=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,Ute=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,Gte=e=>`여기 터미널에서 ${e==null?void 0:e.value} 실행`,Wte=e=>`ここにあるターミナルで ${e==null?void 0:e.value} を実行`,Kte=e=>`Uruchom ${e==null?void 0:e.value} w terminalu tutaj`,z9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Bte(e):t==="fa"?Fte(e):t==="ar"?Hte(e):t==="es"?qte(e):t==="hi"?Ute(e):t==="ko"?Gte(e):t==="ja"?Wte(e):t==="pl"?Kte(e):Pte(e)}),Vte=e=>`Run ${e==null?void 0:e.id}`,Qte=e=>`运行 ${e==null?void 0:e.id}`,Xte=e=>`اجرای ${e==null?void 0:e.id}`,Yte=e=>`تشغيل ${e==null?void 0:e.id}`,Zte=e=>`Ejecución ${e==null?void 0:e.id}`,Jte=e=>`रन ${e==null?void 0:e.id}`,ere=e=>`실행 ${e==null?void 0:e.id}`,tre=e=>`実行 ${e==null?void 0:e.id}`,rre=e=>`Uruchomienie ${e==null?void 0:e.id}`,nre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Qte(e):t==="fa"?Xte(e):t==="ar"?Yte(e):t==="es"?Zte(e):t==="hi"?Jte(e):t==="ko"?ere(e):t==="ja"?tre(e):t==="pl"?rre(e):Vte(e)}),sre=e=>`Show error details for ${e==null?void 0:e.activity}`,ore=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,are=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,ire=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,cre=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,lre=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,ure=e=>`${e==null?void 0:e.activity} 오류 상세 정보 표시`,_re=e=>`${e==null?void 0:e.activity} のエラー詳細を表示`,fre=e=>`Pokaż szczegóły błędu działania ${e==null?void 0:e.activity}`,dre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ore(e):t==="fa"?are(e):t==="ar"?ire(e):t==="es"?cre(e):t==="hi"?lre(e):t==="ko"?ure(e):t==="ja"?_re(e):t==="pl"?fre(e):sre(e)}),hre=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,pre=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,mre=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,gre=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,vre=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,bre=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,yre=e=>`${e==null?void 0:e.target} ${e==null?void 0:e.count}개 더 표시`,xre=e=>`${e==null?void 0:e.target} をさらに ${e==null?void 0:e.count} 件表示`,wre=e=>`Pokaż więcej (${e==null?void 0:e.count}): ${e==null?void 0:e.target}`,kre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?pre(e):t==="fa"?mre(e):t==="ar"?gre(e):t==="es"?vre(e):t==="hi"?bre(e):t==="ko"?yre(e):t==="ja"?xre(e):t==="pl"?wre(e):hre(e)}),jre=e=>`${e==null?void 0:e.name} skill`,Sre=e=>`${e==null?void 0:e.name} 技能`,Cre=e=>`مهارت ${e==null?void 0:e.name}`,zre=e=>`مهارة ${e==null?void 0:e.name}`,Ere=e=>`Skill ${e==null?void 0:e.name}`,Nre=e=>`${e==null?void 0:e.name} स्किल`,Are=e=>`${e==null?void 0:e.name} 스킬`,Tre=e=>`${e==null?void 0:e.name} スキル`,Rre=e=>`Umiejętność ${e==null?void 0:e.name}`,Mre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Sre(e):t==="fa"?Cre(e):t==="ar"?zre(e):t==="es"?Ere(e):t==="hi"?Nre(e):t==="ko"?Are(e):t==="ja"?Tre(e):t==="pl"?Rre(e):jre(e)}),Ore=e=>`Value for ${e==null?void 0:e.name}`,$re=e=>`${e==null?void 0:e.name} 的值`,Dre=e=>`مقدار ${e==null?void 0:e.name}`,Lre=e=>`قيمة ${e==null?void 0:e.name}`,Ire=e=>`Valor de ${e==null?void 0:e.name}`,Pre=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,Bre=e=>`${e==null?void 0:e.name}의 값`,Fre=e=>`${e==null?void 0:e.name} の値`,Hre=e=>`Wartość dla ${e==null?void 0:e.name}`,qre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?$re(e):t==="fa"?Dre(e):t==="ar"?Lre(e):t==="es"?Ire(e):t==="hi"?Pre(e):t==="ko"?Bre(e):t==="ja"?Fre(e):t==="pl"?Hre(e):Ore(e)}),Ure=()=>"Agent reported back",Gre=()=>"智能体已返回结果",Wre=()=>"عامل نتیجه را گزارش کرد",Kre=()=>"أبلغ الوكيل بالنتيجة",Vre=()=>"El agente informó de los resultados",Qre=()=>"एजेंट ने रिपोर्ट भेजी",Xre=()=>"에이전트 결과 보고됨",Yre=()=>"エージェントが結果を報告しました",Zre=()=>"Agent przekazał wyniki",Jre=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Gre():t==="fa"?Wre():t==="ar"?Kre():t==="es"?Vre():t==="hi"?Qre():t==="ko"?Xre():t==="ja"?Yre():t==="pl"?Zre():Ure()}),ene=()=>"Browse",tne=()=>"浏览",rne=()=>"مرور",nne=()=>"تصفّح",sne=()=>"Navegar",one=()=>"ब्राउज़ करें",ane=()=>"탐색",ine=()=>"閲覧",cne=()=>"Przeglądaj",lne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?tne():t==="fa"?rne():t==="ar"?nne():t==="es"?sne():t==="hi"?one():t==="ko"?ane():t==="ja"?ine():t==="pl"?cne():ene()}),une=()=>"Browsing…",_ne=()=>"正在浏览…",fne=()=>"در حال مرور…",dne=()=>"جارٍ التصفّح…",hne=()=>"Navegando…",pne=()=>"ब्राउज़ कर रहा है…",mne=()=>"탐색 중…",gne=()=>"閲覧中…",vne=()=>"Przeglądanie…",bne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_ne():t==="fa"?fne():t==="ar"?dne():t==="es"?hne():t==="hi"?pne():t==="ko"?mne():t==="ja"?gne():t==="pl"?vne():une()}),yne=()=>"Checked experiment status and updated notes",xne=()=>"已检查实验状态并更新笔记",wne=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",kne=()=>"فحص حالة التجربة وحدّث الملاحظات",jne=()=>"Consultó el estado del experimento y actualizó las notas",Sne=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",Cne=()=>"실험 상태 확인 및 노트 업데이트 완료",zne=()=>"実験の状態を確認してノートを更新しました",Ene=()=>"Sprawdzono stan eksperymentu i zaktualizowano notatki",Nne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xne():t==="fa"?wne():t==="ar"?kne():t==="es"?jne():t==="hi"?Sne():t==="ko"?Cne():t==="ja"?zne():t==="pl"?Ene():yne()}),Ane=()=>"Closed an agent",Tne=()=>"已关闭智能体",Rne=()=>"عامل بسته شد",Mne=()=>"أغلق وكيلًا",One=()=>"Cerró un agente",$ne=()=>"एक एजेंट बंद किया",Dne=()=>"에이전트 종료 완료",Lne=()=>"エージェントを閉じました",Ine=()=>"Zamknięto agenta",Pne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Tne():t==="fa"?Rne():t==="ar"?Mne():t==="es"?One():t==="hi"?$ne():t==="ko"?Dne():t==="ja"?Lne():t==="pl"?Ine():Ane()}),Bne=()=>"Context compacted",Fne=()=>"上下文已压缩",Hne=()=>"زمینه فشرده شد",qne=()=>"تم ضغط السياق",Une=()=>"Contexto comprimido",Gne=()=>"कॉन्टेक्स्ट छोटा किया गया",Wne=()=>"컨텍스트 압축 완료",Kne=()=>"コンテキストを圧縮しました",Vne=()=>"Skrócono kontekst",Qne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fne():t==="fa"?Hne():t==="ar"?qne():t==="es"?Une():t==="hi"?Gne():t==="ko"?Wne():t==="ja"?Kne():t==="pl"?Vne():Bne()}),Xne=()=>"Compacting conversation…",Yne=()=>"正在压缩对话…",Zne=()=>"در حال فشرده‌سازی گفت‌وگو…",Jne=()=>"جارٍ ضغط المحادثة…",ese=()=>"Comprimiendo la conversación…",tse=()=>"बातचीत छोटी की जा रही है…",rse=()=>"대화 압축 중…",nse=()=>"会話を圧縮中…",sse=()=>"Skracanie kontekstu rozmowy…",E9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yne():t==="fa"?Zne():t==="ar"?Jne():t==="es"?ese():t==="hi"?tse():t==="ko"?rse():t==="ja"?nse():t==="pl"?sse():Xne()}),ose=()=>"Compacting failed",ase=()=>"压缩失败",ise=()=>"فشرده‌سازی ناموفق بود",cse=()=>"فشل الضغط",lse=()=>"Error al comprimir",use=()=>"छोटा करना विफल",_se=()=>"압축 실패",fse=()=>"圧縮に失敗しました",dse=()=>"Nie udało się skrócić kontekstu",hse=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ase():t==="fa"?ise():t==="ar"?cse():t==="es"?lse():t==="hi"?use():t==="ko"?_se():t==="ja"?fse():t==="pl"?dse():ose()}),pse=e=>`Created ${e==null?void 0:e.target}`,mse=e=>`已创建 ${e==null?void 0:e.target}`,gse=e=>`${e==null?void 0:e.target} ایجاد شد`,vse=e=>`أنشأ ${e==null?void 0:e.target}`,bse=e=>`Creó ${e==null?void 0:e.target}`,yse=e=>`${e==null?void 0:e.target} बनाया`,xse=e=>`${e==null?void 0:e.target} 생성 완료`,wse=e=>`${e==null?void 0:e.target} を作成しました`,kse=e=>`Utworzono ${e==null?void 0:e.target}`,jse=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mse(e):t==="fa"?gse(e):t==="ar"?vse(e):t==="es"?bse(e):t==="hi"?yse(e):t==="ko"?xse(e):t==="ja"?wse(e):t==="pl"?kse(e):pse(e)}),Sse=()=>"Delegate",Cse=()=>"委派",zse=()=>"واگذاری",Ese=()=>"تفويض",Nse=()=>"Delegar",Ase=()=>"सौंपें",Tse=()=>"위임",Rse=()=>"委任",Mse=()=>"Przekaż",Ose=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cse():t==="fa"?zse():t==="ar"?Ese():t==="es"?Nse():t==="hi"?Ase():t==="ko"?Tse():t==="ja"?Rse():t==="pl"?Mse():Sse()}),$se=()=>"Delegating…",Dse=()=>"正在委派…",Lse=()=>"در حال واگذاری…",Ise=()=>"جارٍ التفويض…",Pse=()=>"Delegando…",Bse=()=>"सौंप रहा है…",Fse=()=>"위임 중…",Hse=()=>"委任中…",qse=()=>"Przekazywanie zadania…",Use=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dse():t==="fa"?Lse():t==="ar"?Ise():t==="es"?Pse():t==="hi"?Bse():t==="ko"?Fse():t==="ja"?Hse():t==="pl"?qse():$se()}),Gse=e=>`Deleted ${e==null?void 0:e.target}`,Wse=e=>`已删除 ${e==null?void 0:e.target}`,Kse=e=>`${e==null?void 0:e.target} حذف شد`,Vse=e=>`حذف ${e==null?void 0:e.target}`,Qse=e=>`Eliminó ${e==null?void 0:e.target}`,Xse=e=>`${e==null?void 0:e.target} हटाया`,Yse=e=>`${e==null?void 0:e.target} 삭제 완료`,Zse=e=>`${e==null?void 0:e.target} を削除しました`,Jse=e=>`Usunięto ${e==null?void 0:e.target}`,eoe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Wse(e):t==="fa"?Kse(e):t==="ar"?Vse(e):t==="es"?Qse(e):t==="hi"?Xse(e):t==="ko"?Yse(e):t==="ja"?Zse(e):t==="pl"?Jse(e):Gse(e)}),toe=()=>"Edit",roe=()=>"编辑",noe=()=>"ویرایش",soe=()=>"تعديل",ooe=()=>"Editar",aoe=()=>"संपादित करें",ioe=()=>"편집",coe=()=>"編集",loe=()=>"Edytuj",hD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?roe():t==="fa"?noe():t==="ar"?soe():t==="es"?ooe():t==="hi"?aoe():t==="ko"?ioe():t==="ja"?coe():t==="pl"?loe():toe()}),uoe=e=>`Edited ${e==null?void 0:e.target}`,_oe=e=>`已编辑 ${e==null?void 0:e.target}`,foe=e=>`${e==null?void 0:e.target} ویرایش شد`,doe=e=>`عدّل ${e==null?void 0:e.target}`,hoe=e=>`Editó ${e==null?void 0:e.target}`,poe=e=>`${e==null?void 0:e.target} संपादित किया`,moe=e=>`${e==null?void 0:e.target} 수정 완료`,goe=e=>`${e==null?void 0:e.target} を編集しました`,voe=e=>`Edytowano ${e==null?void 0:e.target}`,boe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?_oe(e):t==="fa"?foe(e):t==="ar"?doe(e):t==="es"?hoe(e):t==="hi"?poe(e):t==="ko"?moe(e):t==="ja"?goe(e):t==="pl"?voe(e):uoe(e)}),yoe=()=>"Editing…",xoe=()=>"正在编辑…",woe=()=>"در حال ویرایش…",koe=()=>"جارٍ التعديل…",joe=()=>"Editando…",Soe=()=>"संपादित कर रहा है…",Coe=()=>"편집 중…",zoe=()=>"編集中…",Eoe=()=>"Edytowanie…",Noe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xoe():t==="fa"?woe():t==="ar"?koe():t==="es"?joe():t==="hi"?Soe():t==="ko"?Coe():t==="ja"?zoe():t==="pl"?Eoe():yoe()}),Aoe=e=>`${e==null?void 0:e.activity} for ${e==null?void 0:e.count} queries`,Toe=e=>`${e==null?void 0:e.activity},共 ${e==null?void 0:e.count} 个查询`,Roe=e=>`${e==null?void 0:e.activity} برای ${e==null?void 0:e.count} جستجو`,Moe=e=>`${e==null?void 0:e.activity} لـ ${e==null?void 0:e.count} استعلامات`,Ooe=e=>`${e==null?void 0:e.activity} para ${e==null?void 0:e.count} consultas`,$oe=e=>`${e==null?void 0:e.activity}: ${e==null?void 0:e.count} क्वेरी`,Doe=e=>`${e==null?void 0:e.count}개 검색어에 대한 ${e==null?void 0:e.activity}`,Loe=e=>`${e==null?void 0:e.count} 件の検索語について ${e==null?void 0:e.activity}`,Ioe=e=>`${e==null?void 0:e.activity} dla ${e==null?void 0:e.count} zapytań`,Poe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Toe(e):t==="fa"?Roe(e):t==="ar"?Moe(e):t==="es"?Ooe(e):t==="hi"?$oe(e):t==="ko"?Doe(e):t==="ja"?Loe(e):t==="pl"?Ioe(e):Aoe(e)}),Boe=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,Foe=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,Hoe=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,qoe=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,Uoe=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,Goe=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,Woe=e=>`“${e==null?void 0:e.query}”에 대한 ${e==null?void 0:e.activity}`,Koe=e=>`「${e==null?void 0:e.query}」について ${e==null?void 0:e.activity}`,Voe=e=>`${e==null?void 0:e.activity} dla „${e==null?void 0:e.query}”`,N9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Foe(e):t==="fa"?Hoe(e):t==="ar"?qoe(e):t==="es"?Uoe(e):t==="hi"?Goe(e):t==="ko"?Woe(e):t==="ja"?Koe(e):t==="pl"?Voe(e):Boe(e)}),Qoe=()=>"Imported from your terminal — new turns continue in the agent's own history",Xoe=()=>"从你的终端导入 — 新的回合将在智能体自己的历史中继续",Yoe=()=>"از ترمینال شما وارد شد — نوبت‌های جدید در تاریخچهٔ خود عامل ادامه می‌یابند",Zoe=()=>"مستورد من طرفيتك — الجولات الجديدة تتابع في سجل الوكيل نفسه",Joe=()=>"Importado desde tu terminal — los turnos nuevos continúan en el historial del agente",eae=()=>"आपके टर्मिनल से इम्पोर्ट किया गया — नए टर्न एजेंट के अपने इतिहास में जारी रहेंगे",tae=()=>"터미널에서 가져왔습니다. 새 대화는 에이전트 자체 기록에서 계속됩니다",rae=()=>"ターミナルから取り込みました。新しいターンはエージェント自身の履歴で続きます",nae=()=>"Zaimportowano z terminala — kolejne wiadomości będą zapisywane w historii agenta",sae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xoe():t==="fa"?Yoe():t==="ar"?Zoe():t==="es"?Joe():t==="hi"?eae():t==="ko"?tae():t==="ja"?rae():t==="pl"?nae():Qoe()}),oae=e=>`Listed files matching ${e==null?void 0:e.pattern}`,aae=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,iae=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,cae=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,lae=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,uae=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,_ae=e=>`${e==null?void 0:e.pattern}과(와) 일치하는 파일 목록 확인 완료`,fae=e=>`${e==null?void 0:e.pattern} に一致するファイルを一覧表示しました`,dae=e=>`Wyświetlono pliki pasujące do ${e==null?void 0:e.pattern}`,hae=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?aae(e):t==="fa"?iae(e):t==="ar"?cae(e):t==="es"?lae(e):t==="hi"?uae(e):t==="ko"?_ae(e):t==="ja"?fae(e):t==="pl"?dae(e):oae(e)}),pae=()=>"Load",mae=()=>"加载",gae=()=>"بارگیری",vae=()=>"تحميل",bae=()=>"Cargar",yae=()=>"लोड करें",xae=()=>"불러오기",wae=()=>"読み込み",kae=()=>"Wczytaj",jae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mae():t==="fa"?gae():t==="ar"?vae():t==="es"?bae():t==="hi"?yae():t==="ko"?xae():t==="ja"?wae():t==="pl"?kae():pae()}),Sae=()=>"Loaded a skill",Cae=()=>"已加载技能",zae=()=>"یک مهارت بارگیری شد",Eae=()=>"حمّل مهارة",Nae=()=>"Cargó una skill",Aae=()=>"एक स्किल लोड की",Tae=()=>"스킬 불러오기 완료",Rae=()=>"スキルを読み込みました",Mae=()=>"Wczytano umiejętność",Oae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cae():t==="fa"?zae():t==="ar"?Eae():t==="es"?Nae():t==="hi"?Aae():t==="ko"?Tae():t==="ja"?Rae():t==="pl"?Mae():Sae()}),$ae=e=>`Loaded ${e==null?void 0:e.name} skill`,Dae=e=>`已加载技能 ${e==null?void 0:e.name}`,Lae=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,Iae=e=>`حمّل مهارة ${e==null?void 0:e.name}`,Pae=e=>`Cargó la skill ${e==null?void 0:e.name}`,Bae=e=>`${e==null?void 0:e.name} स्किल लोड की`,Fae=e=>`${e==null?void 0:e.name} 스킬 불러오기 완료`,Hae=e=>`スキル ${e==null?void 0:e.name} を読み込みました`,qae=e=>`Wczytano umiejętność ${e==null?void 0:e.name}`,Uae=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Dae(e):t==="fa"?Lae(e):t==="ar"?Iae(e):t==="es"?Pae(e):t==="hi"?Bae(e):t==="ko"?Fae(e):t==="ja"?Hae(e):t==="pl"?qae(e):$ae(e)}),Gae=()=>"Loading…",Wae=()=>"正在加载…",Kae=()=>"در حال بارگیری…",Vae=()=>"جارٍ التحميل…",Qae=()=>"Cargando…",Xae=()=>"लोड हो रहा है…",Yae=()=>"불러오는 중…",Zae=()=>"読み込み中…",Jae=()=>"Wczytywanie…",eie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wae():t==="fa"?Kae():t==="ar"?Vae():t==="es"?Qae():t==="hi"?Xae():t==="ko"?Yae():t==="ja"?Zae():t==="pl"?Jae():Gae()}),tie=e=>`Opened ${e==null?void 0:e.target}`,rie=e=>`已打开 ${e==null?void 0:e.target}`,nie=e=>`${e==null?void 0:e.target} باز شد`,sie=e=>`فتح ${e==null?void 0:e.target}`,oie=e=>`Abrió ${e==null?void 0:e.target}`,aie=e=>`${e==null?void 0:e.target} खोला`,iie=e=>`${e==null?void 0:e.target} 열기 완료`,cie=e=>`${e==null?void 0:e.target} を開きました`,lie=e=>`Otwarto ${e==null?void 0:e.target}`,uie=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?rie(e):t==="fa"?nie(e):t==="ar"?sie(e):t==="es"?oie(e):t==="hi"?aie(e):t==="ko"?iie(e):t==="ja"?cie(e):t==="pl"?lie(e):tie(e)}),_ie=e=>`Ran ${e==null?void 0:e.command}`,fie=e=>`已运行 ${e==null?void 0:e.command}`,die=e=>`${e==null?void 0:e.command} اجرا شد`,hie=e=>`نفّذ ${e==null?void 0:e.command}`,pie=e=>`Ejecutó ${e==null?void 0:e.command}`,mie=e=>`${e==null?void 0:e.command} चलाया`,gie=e=>`${e==null?void 0:e.command} 실행 완료`,vie=e=>`${e==null?void 0:e.command} を実行しました`,bie=e=>`Uruchomiono ${e==null?void 0:e.command}`,yie=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fie(e):t==="fa"?die(e):t==="ar"?hie(e):t==="es"?pie(e):t==="hi"?mie(e):t==="ko"?gie(e):t==="ja"?vie(e):t==="pl"?bie(e):_ie(e)}),xie=()=>"Ran a sub-agent",wie=()=>"已运行子智能体",kie=()=>"یک عامل فرعی اجرا شد",jie=()=>"شغّل وكيلًا فرعيًا",Sie=()=>"Ejecutó un subagente",Cie=()=>"एक सब-एजेंट चलाया",zie=()=>"하위 에이전트 실행 완료",Eie=()=>"サブエージェントを実行しました",Nie=()=>"Uruchomiono podagenta",Aie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wie():t==="fa"?kie():t==="ar"?jie():t==="es"?Sie():t==="hi"?Cie():t==="ko"?zie():t==="ja"?Eie():t==="pl"?Nie():xie()}),Tie=()=>"Read",Rie=()=>"读取",Mie=()=>"خواندن",Oie=()=>"قراءة",$ie=()=>"Leer",Die=()=>"पढ़ें",Lie=()=>"읽기",Iie=()=>"読む",Pie=()=>"Odczytaj",Bie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rie():t==="fa"?Mie():t==="ar"?Oie():t==="es"?$ie():t==="hi"?Die():t==="ko"?Lie():t==="ja"?Iie():t==="pl"?Pie():Tie()}),Fie=()=>"Read experiment notes",Hie=()=>"已读取实验笔记",qie=()=>"یادداشت‌های آزمایش خوانده شد",Uie=()=>"قرأ ملاحظات التجربة",Gie=()=>"Leyó las notas del experimento",Wie=()=>"प्रयोग के नोट्स पढ़े",Kie=()=>"실험 노트 읽기 완료",Vie=()=>"実験ノートを読みました",Qie=()=>"Odczytano notatki eksperymentu",Xie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hie():t==="fa"?qie():t==="ar"?Uie():t==="es"?Gie():t==="hi"?Wie():t==="ko"?Kie():t==="ja"?Vie():t==="pl"?Qie():Fie()}),Yie=()=>"Read a paper",Zie=()=>"已读取论文",Jie=()=>"یک مقاله خوانده شد",ece=()=>"قرأ ورقة",tce=()=>"Leyó un paper",rce=()=>"एक पेपर पढ़ा",nce=()=>"논문 읽기 완료",sce=()=>"論文を読みました",oce=()=>"Przeczytano publikację",ace=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zie():t==="fa"?Jie():t==="ar"?ece():t==="es"?tce():t==="hi"?rce():t==="ko"?nce():t==="ja"?sce():t==="pl"?oce():Yie()}),ice=e=>`Read ${e==null?void 0:e.name} skill`,cce=e=>`已读取技能 ${e==null?void 0:e.name}`,lce=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,uce=e=>`قرأ مهارة ${e==null?void 0:e.name}`,_ce=e=>`Leyó la skill ${e==null?void 0:e.name}`,fce=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,dce=e=>`${e==null?void 0:e.name} 스킬 읽기 완료`,hce=e=>`スキル ${e==null?void 0:e.name} を読みました`,pce=e=>`Odczytano umiejętność ${e==null?void 0:e.name}`,z2=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?cce(e):t==="fa"?lce(e):t==="ar"?uce(e):t==="es"?_ce(e):t==="hi"?fce(e):t==="ko"?dce(e):t==="ja"?hce(e):t==="pl"?pce(e):ice(e)}),mce=e=>`Read ${e==null?void 0:e.target}`,gce=e=>`已读取 ${e==null?void 0:e.target}`,vce=e=>`${e==null?void 0:e.target} خوانده شد`,bce=e=>`قرأ ${e==null?void 0:e.target}`,yce=e=>`Leyó ${e==null?void 0:e.target}`,xce=e=>`${e==null?void 0:e.target} पढ़ा`,wce=e=>`${e==null?void 0:e.target} 읽기 완료`,kce=e=>`${e==null?void 0:e.target} を読みました`,jce=e=>`Odczytano ${e==null?void 0:e.target}`,bm=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?gce(e):t==="fa"?vce(e):t==="ar"?bce(e):t==="es"?yce(e):t==="hi"?xce(e):t==="ko"?wce(e):t==="ja"?kce(e):t==="pl"?jce(e):mce(e)}),Sce=()=>"Read a web page",Cce=()=>"已读取网页",zce=()=>"یک صفحهٔ وب خوانده شد",Ece=()=>"قرأ صفحة ويب",Nce=()=>"Leyó una página web",Ace=()=>"एक वेब पेज पढ़ा",Tce=()=>"웹 페이지 읽기 완료",Rce=()=>"ウェブページを読みました",Mce=()=>"Odczytano stronę internetową",Oce=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cce():t==="fa"?zce():t==="ar"?Ece():t==="es"?Nce():t==="hi"?Ace():t==="ko"?Tce():t==="ja"?Rce():t==="pl"?Mce():Sce()}),$ce=()=>"Reading…",Dce=()=>"正在读取…",Lce=()=>"در حال خواندن…",Ice=()=>"جارٍ القراءة…",Pce=()=>"Leyendo…",Bce=()=>"पढ़ रहा है…",Fce=()=>"읽는 중…",Hce=()=>"読み取り中…",qce=()=>"Odczytywanie…",Uce=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dce():t==="fa"?Lce():t==="ar"?Ice():t==="es"?Pce():t==="hi"?Bce():t==="ko"?Fce():t==="ja"?Hce():t==="pl"?qce():$ce()}),Gce=()=>"Resumed an agent",Wce=()=>"已恢复智能体",Kce=()=>"عامل از سر گرفته شد",Vce=()=>"استأنف عمل وكيل",Qce=()=>"Reanudó un agente",Xce=()=>"एक एजेंट फिर से शुरू किया",Yce=()=>"에이전트 재개 완료",Zce=()=>"エージェントを再開しました",Jce=()=>"Wznowiono działanie agenta",ele=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wce():t==="fa"?Kce():t==="ar"?Vce():t==="es"?Qce():t==="hi"?Xce():t==="ko"?Yce():t==="ja"?Zce():t==="pl"?Jce():Gce()}),tle=()=>"Review",rle=()=>"查看",nle=()=>"بازبینی",sle=()=>"مراجعة",ole=()=>"Revisar",ale=()=>"समीक्षा करें",ile=()=>"검토",cle=()=>"レビュー",lle=()=>"Przejrzyj",ule=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rle():t==="fa"?nle():t==="ar"?sle():t==="es"?ole():t==="hi"?ale():t==="ko"?ile():t==="ja"?cle():t==="pl"?lle():tle()}),_le=()=>"Reviewed run log",fle=()=>"已查看运行日志",dle=()=>"گزارش اجرا بازبینی شد",hle=()=>"راجع سجل التشغيل",ple=()=>"Revisó el log de la ejecución",mle=()=>"रन लॉग की समीक्षा की",gle=()=>"실행 로그 검토 완료",vle=()=>"実行ログを確認しました",ble=()=>"Przejrzano log uruchomienia",yle=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fle():t==="fa"?dle():t==="ar"?hle():t==="es"?ple():t==="hi"?mle():t==="ko"?gle():t==="ja"?vle():t==="pl"?ble():_le()}),xle=()=>"Reviewed run logs",wle=()=>"已查看运行日志",kle=()=>"گزارش‌های اجرا بازبینی شد",jle=()=>"راجع سجلات التشغيل",Sle=()=>"Revisó los logs de las ejecuciones",Cle=()=>"रन लॉग की समीक्षा की",zle=()=>"실행 로그 검토 완료",Ele=()=>"実行ログを確認しました",Nle=()=>"Przejrzano logi uruchomień",Ale=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wle():t==="fa"?kle():t==="ar"?jle():t==="es"?Sle():t==="hi"?Cle():t==="ko"?zle():t==="ja"?Ele():t==="pl"?Nle():xle()}),Tle=()=>"Reviewed experiment status and notes",Rle=()=>"已查看实验状态和笔记",Mle=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",Ole=()=>"راجع حالة التجربة وملاحظاتها",$le=()=>"Revisó el estado y las notas del experimento",Dle=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",Lle=()=>"실험 상태와 노트 검토 완료",Ile=()=>"実験の状態とノートを確認しました",Ple=()=>"Przejrzano stan eksperymentu i notatki",Ble=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rle():t==="fa"?Mle():t==="ar"?Ole():t==="es"?$le():t==="hi"?Dle():t==="ko"?Lle():t==="ja"?Ile():t==="pl"?Ple():Tle()}),Fle=()=>"Reviewing…",Hle=()=>"正在查看…",qle=()=>"در حال بازبینی…",Ule=()=>"جارٍ المراجعة…",Gle=()=>"Revisando…",Wle=()=>"समीक्षा कर रहा है…",Kle=()=>"검토 중…",Vle=()=>"レビュー中…",Qle=()=>"Przeglądanie…",Xle=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hle():t==="fa"?qle():t==="ar"?Ule():t==="es"?Gle():t==="hi"?Wle():t==="ko"?Kle():t==="ja"?Vle():t==="pl"?Qle():Fle()}),Yle=()=>"Run",Zle=()=>"运行",Jle=()=>"اجرا",eue=()=>"تشغيل",tue=()=>"Ejecutar",rue=()=>"चलाएं",nue=()=>"실행",sue=()=>"実行",oue=()=>"Uruchom",aue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zle():t==="fa"?Jle():t==="ar"?eue():t==="es"?tue():t==="hi"?rue():t==="ko"?nue():t==="ja"?sue():t==="pl"?oue():Yle()}),iue=()=>"Running…",cue=()=>"正在运行…",lue=()=>"در حال اجرا…",uue=()=>"جارٍ التشغيل…",_ue=()=>"Ejecutando…",fue=()=>"चल रहा है…",due=()=>"실행 중…",hue=()=>"実行中…",pue=()=>"Uruchamianie…",pD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?cue():t==="fa"?lue():t==="ar"?uue():t==="es"?_ue():t==="hi"?fue():t==="ko"?due():t==="ja"?hue():t==="pl"?pue():iue()}),mue=()=>"Search",gue=()=>"搜索",vue=()=>"جست‌وجو",bue=()=>"بحث",yue=()=>"Buscar",xue=()=>"खोजें",wue=()=>"검색",kue=()=>"検索",jue=()=>"Szukaj",Sue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gue():t==="fa"?vue():t==="ar"?bue():t==="es"?yue():t==="hi"?xue():t==="ko"?wue():t==="ja"?kue():t==="pl"?jue():mue()}),Cue=()=>"Searched alphaXiv full text",zue=()=>"已搜索 alphaXiv 全文",Eue=()=>"متن کامل alphaXiv جست‌وجو شد",Nue=()=>"بحث في نص alphaXiv الكامل",Aue=()=>"Buscó en el texto completo de alphaXiv",Tue=()=>"alphaXiv का पूरा टेक्स्ट खोजा",Rue=()=>"alphaXiv 전문 검색 완료",Mue=()=>"alphaXiv の全文を検索しました",Oue=()=>"Przeszukano pełne teksty w alphaXiv",$ue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zue():t==="fa"?Eue():t==="ar"?Nue():t==="es"?Aue():t==="hi"?Tue():t==="ko"?Rue():t==="ja"?Mue():t==="pl"?Oue():Cue()}),Due=()=>"Searched alphaXiv semantically",Lue=()=>"已对 alphaXiv 进行语义搜索",Iue=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",Pue=()=>"أجرى بحثًا دلاليًا في alphaXiv",Bue=()=>"Hizo una búsqueda semántica en alphaXiv",Fue=()=>"alphaXiv को सिमेंटिक रूप से खोजा",Hue=()=>"alphaXiv 의미 기반 검색 완료",que=()=>"alphaXiv で意味検索しました",Uue=()=>"Przeszukano semantycznie alphaXiv",Gue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lue():t==="fa"?Iue():t==="ar"?Pue():t==="es"?Bue():t==="hi"?Fue():t==="ko"?Hue():t==="ja"?que():t==="pl"?Uue():Due()}),Wue=()=>"Searched bioRxiv",Kue=()=>"已搜索 bioRxiv",Vue=()=>"bioRxiv جست‌وجو شد",Que=()=>"بحث في bioRxiv",Xue=()=>"Buscó en bioRxiv",Yue=()=>"bioRxiv खोजा",Zue=()=>"bioRxiv 검색 완료",Jue=()=>"bioRxiv を検索しました",e_e=()=>"Przeszukano bioRxiv",t_e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kue():t==="fa"?Vue():t==="ar"?Que():t==="es"?Xue():t==="hi"?Yue():t==="ko"?Zue():t==="ja"?Jue():t==="pl"?e_e():Wue()}),r_e=()=>"Searched code",n_e=()=>"已搜索代码",s_e=()=>"کد جست‌وجو شد",o_e=()=>"بحث في الشيفرة",a_e=()=>"Buscó en el código",i_e=()=>"कोड खोजा",c_e=()=>"코드 검색 완료",l_e=()=>"コードを検索しました",u_e=()=>"Przeszukano kod",E2=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?n_e():t==="fa"?s_e():t==="ar"?o_e():t==="es"?a_e():t==="hi"?i_e():t==="ko"?c_e():t==="ja"?l_e():t==="pl"?u_e():r_e()}),__e=e=>`Searched code for “${e==null?void 0:e.pattern}”`,f_e=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,d_e=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,h_e=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,p_e=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,m_e=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,g_e=e=>`코드에서 “${e==null?void 0:e.pattern}” 검색 완료`,v_e=e=>`コードで「${e==null?void 0:e.pattern}」を検索しました`,b_e=e=>`Przeszukano kod pod kątem „${e==null?void 0:e.pattern}”`,N2=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?f_e(e):t==="fa"?d_e(e):t==="ar"?h_e(e):t==="es"?p_e(e):t==="hi"?m_e(e):t==="ko"?g_e(e):t==="ja"?v_e(e):t==="pl"?b_e(e):__e(e)}),y_e=e=>`Searched images for “${e==null?void 0:e.query}”`,x_e=e=>`已搜索图片“${e==null?void 0:e.query}”`,w_e=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,k_e=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,j_e=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,S_e=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,C_e=e=>`“${e==null?void 0:e.query}” 이미지 검색 완료`,z_e=e=>`「${e==null?void 0:e.query}」の画像を検索しました`,E_e=e=>`Wyszukano obrazy: „${e==null?void 0:e.query}”`,N_e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?x_e(e):t==="fa"?w_e(e):t==="ar"?k_e(e):t==="es"?j_e(e):t==="hi"?S_e(e):t==="ko"?C_e(e):t==="ja"?z_e(e):t==="pl"?E_e(e):y_e(e)}),A_e=()=>"Searched the literature",T_e=()=>"已搜索文献",R_e=()=>"منابع علمی جست‌وجو شد",M_e=()=>"بحث في الأدبيات",O_e=()=>"Buscó en la literatura",$_e=()=>"साहित्य खोजा",D_e=()=>"문헌 검색 완료",L_e=()=>"文献を検索しました",I_e=()=>"Przeszukano literaturę",$v=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?T_e():t==="fa"?R_e():t==="ar"?M_e():t==="es"?O_e():t==="hi"?$_e():t==="ko"?D_e():t==="ja"?L_e():t==="pl"?I_e():A_e()}),P_e=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,B_e=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,F_e=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,H_e=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,q_e=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,U_e=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,G_e=e=>`페이지에서 “${e==null?void 0:e.pattern}” 검색 완료`,W_e=e=>`ページで「${e==null?void 0:e.pattern}」を検索しました`,K_e=e=>`Wyszukano na stronie „${e==null?void 0:e.pattern}”`,V_e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?B_e(e):t==="fa"?F_e(e):t==="ar"?H_e(e):t==="es"?q_e(e):t==="hi"?U_e(e):t==="ko"?G_e(e):t==="ja"?W_e(e):t==="pl"?K_e(e):P_e(e)}),Q_e=()=>"Searched OpenAlex",X_e=()=>"已搜索 OpenAlex",Y_e=()=>"OpenAlex جست‌وجو شد",Z_e=()=>"بحث في OpenAlex",J_e=()=>"Buscó en OpenAlex",efe=()=>"OpenAlex खोजा",tfe=()=>"OpenAlex 검색 완료",rfe=()=>"OpenAlex を検索しました",nfe=()=>"Przeszukano OpenAlex",sfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?X_e():t==="fa"?Y_e():t==="ar"?Z_e():t==="es"?J_e():t==="hi"?efe():t==="ko"?tfe():t==="ja"?rfe():t==="pl"?nfe():Q_e()}),ofe=()=>"Searched PubMed",afe=()=>"已搜索 PubMed",ife=()=>"PubMed جست‌وجو شد",cfe=()=>"بحث في PubMed",lfe=()=>"Buscó en PubMed",ufe=()=>"PubMed खोजा",_fe=()=>"PubMed 검색 완료",ffe=()=>"PubMed を検索しました",dfe=()=>"Przeszukano PubMed",hfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?afe():t==="fa"?ife():t==="ar"?cfe():t==="es"?lfe():t==="hi"?ufe():t==="ko"?_fe():t==="ja"?ffe():t==="pl"?dfe():ofe()}),pfe=e=>`Searched the web for “${e==null?void 0:e.query}”`,mfe=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,gfe=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,vfe=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,bfe=e=>`Buscó “${e==null?void 0:e.query}” en la web`,yfe=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,xfe=e=>`“${e==null?void 0:e.query}” 웹 검색 완료`,wfe=e=>`「${e==null?void 0:e.query}」をウェブで検索しました`,kfe=e=>`Przeszukano internet: „${e==null?void 0:e.query}”`,A9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mfe(e):t==="fa"?gfe(e):t==="ar"?vfe(e):t==="es"?bfe(e):t==="hi"?yfe(e):t==="ko"?xfe(e):t==="ja"?wfe(e):t==="pl"?kfe(e):pfe(e)}),jfe=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,Sfe=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,Cfe=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,zfe=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,Efe=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,Nfe=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,Afe=e=>`웹 페이지에서 “${e==null?void 0:e.pattern}” 검색 완료`,Tfe=e=>`ウェブページで「${e==null?void 0:e.pattern}」を検索しました`,Rfe=e=>`Wyszukano na stronie internetowej: „${e==null?void 0:e.pattern}”`,Mfe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Sfe(e):t==="fa"?Cfe(e):t==="ar"?zfe(e):t==="es"?Efe(e):t==="hi"?Nfe(e):t==="ko"?Afe(e):t==="ja"?Tfe(e):t==="pl"?Rfe(e):jfe(e)}),Ofe=()=>"Searching…",$fe=()=>"正在搜索…",Dfe=()=>"در حال جست‌وجو…",Lfe=()=>"جارٍ البحث…",Ife=()=>"Buscando…",Pfe=()=>"खोज रहा है…",Bfe=()=>"검색 중…",Ffe=()=>"検索中…",Hfe=()=>"Wyszukiwanie…",qfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?$fe():t==="fa"?Dfe():t==="ar"?Lfe():t==="es"?Ife():t==="hi"?Pfe():t==="ko"?Bfe():t==="ja"?Ffe():t==="pl"?Hfe():Ofe()}),Ufe=()=>"Sent input to an agent",Gfe=()=>"已向智能体发送输入",Wfe=()=>"ورودی به عامل فرستاده شد",Kfe=()=>"أرسل مدخلًا إلى وكيل",Vfe=()=>"Envió información a un agente",Qfe=()=>"एक एजेंट को इनपुट भेजा",Xfe=()=>"에이전트에 입력 전송 완료",Yfe=()=>"エージェントに入力を送信しました",Zfe=()=>"Wysłano dane wejściowe do agenta",Jfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Gfe():t==="fa"?Wfe():t==="ar"?Kfe():t==="es"?Vfe():t==="hi"?Qfe():t==="ko"?Xfe():t==="ja"?Yfe():t==="pl"?Zfe():Ufe()}),ede=()=>"Spawned an agent",tde=()=>"已创建智能体",rde=()=>"یک عامل ساخته شد",nde=()=>"أنشأ وكيلًا",sde=()=>"Creó un agente",ode=()=>"एक एजेंट शुरू किया",ade=()=>"에이전트 생성 완료",ide=()=>"エージェントを作成しました",cde=()=>"Utworzono agenta",lde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?tde():t==="fa"?rde():t==="ar"?nde():t==="es"?sde():t==="hi"?ode():t==="ko"?ade():t==="ja"?ide():t==="pl"?cde():ede()}),ude=()=>"Sub-agent",_de=()=>"子智能体",fde=()=>"عامل فرعی",dde=()=>"وكيل فرعي",hde=()=>"Subagente",pde=()=>"सब-एजेंट",mde=()=>"하위 에이전트",gde=()=>"サブエージェント",vde=()=>"Podagent",bde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_de():t==="fa"?fde():t==="ar"?dde():t==="es"?hde():t==="hi"?pde():t==="ko"?mde():t==="ja"?gde():t==="pl"?vde():ude()}),yde=()=>"Sub-agent interrupted",xde=()=>"子智能体已中断",wde=()=>"عامل فرعی متوقف شد",kde=()=>"قُوطع الوكيل الفرعي",jde=()=>"Subagente interrumpido",Sde=()=>"सब-एजेंट बाधित हुआ",Cde=()=>"하위 에이전트 중단됨",zde=()=>"サブエージェントが中断されました",Ede=()=>"Przerwano działanie podagenta",Nde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xde():t==="fa"?wde():t==="ar"?kde():t==="es"?jde():t==="hi"?Sde():t==="ko"?Cde():t==="ja"?zde():t==="pl"?Ede():yde()}),Ade=()=>"Sub-agent started",Tde=()=>"子智能体已启动",Rde=()=>"عامل فرعی آغاز شد",Mde=()=>"بدأ الوكيل الفرعي",Ode=()=>"Subagente iniciado",$de=()=>"सब-एजेंट शुरू हुआ",Dde=()=>"하위 에이전트 시작됨",Lde=()=>"サブエージェントが開始しました",Ide=()=>"Uruchomiono podagenta",Pde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Tde():t==="fa"?Rde():t==="ar"?Mde():t==="es"?Ode():t==="hi"?$de():t==="ko"?Dde():t==="ja"?Lde():t==="pl"?Ide():Ade()}),Bde=()=>"Updated experiment notes",Fde=()=>"已更新实验笔记",Hde=()=>"یادداشت‌های آزمایش به‌روز شد",qde=()=>"حدّث ملاحظات التجربة",Ude=()=>"Actualizó las notas del experimento",Gde=()=>"प्रयोग के नोट्स अपडेट किए",Wde=()=>"실험 노트 업데이트 완료",Kde=()=>"実験ノートを更新しました",Vde=()=>"Zaktualizowano notatki eksperymentu",Qde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fde():t==="fa"?Hde():t==="ar"?qde():t==="es"?Ude():t==="hi"?Gde():t==="ko"?Wde():t==="ja"?Kde():t==="pl"?Vde():Bde()}),Xde=()=>"Waiting on an agent",Yde=()=>"正在等待智能体",Zde=()=>"در انتظار عامل",Jde=()=>"في انتظار وكيل",ehe=()=>"Esperando a un agente",the=()=>"एजेंट का इंतज़ार है",rhe=()=>"에이전트 대기 중",nhe=()=>"エージェントを待機中",she=()=>"Oczekiwanie na agenta",ohe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yde():t==="fa"?Zde():t==="ar"?Jde():t==="es"?ehe():t==="hi"?the():t==="ko"?rhe():t==="ja"?nhe():t==="pl"?she():Xde()}),ahe=e=>`Approval required: ${e==null?void 0:e.label}`,ihe=e=>`需要批准:${e==null?void 0:e.label}`,che=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,lhe=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,uhe=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,_he=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,fhe=e=>`승인 필요: ${e==null?void 0:e.label}`,dhe=e=>`承認が必要: ${e==null?void 0:e.label}`,hhe=e=>`Wymagane zatwierdzenie: ${e==null?void 0:e.label}`,T9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ihe(e):t==="fa"?che(e):t==="ar"?lhe(e):t==="es"?uhe(e):t==="hi"?_he(e):t==="ko"?fhe(e):t==="ja"?dhe(e):t==="pl"?hhe(e):ahe(e)}),phe=()=>"The CLI is retrying the turn.",mhe=()=>"CLI 正在重试本轮。",ghe=()=>"CLI در حال تلاش دوباره برای این نوبت است.",vhe=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",bhe=()=>"La CLI está reintentando el turno.",yhe=()=>"CLI टर्न फिर से कोशिश कर रहा है।",xhe=()=>"CLI가 턴을 다시 시도하고 있습니다.",whe=()=>"CLI がターンを再試行しています。",khe=()=>"CLI ponawia próbę.",jhe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mhe():t==="fa"?ghe():t==="ar"?vhe():t==="es"?bhe():t==="hi"?yhe():t==="ko"?xhe():t==="ja"?whe():t==="pl"?khe():phe()}),She=()=>"Continue is available.",Che=()=>"可以继续。",zhe=()=>"ادامه در دسترس است.",Ehe=()=>"المتابعة متاحة.",Nhe=()=>"Puedes continuar.",Ahe=()=>"जारी रखना उपलब्ध है।",The=()=>"계속할 수 있습니다.",Rhe=()=>"続行できます。",Mhe=()=>"Można kontynuować.",Ohe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Che():t==="fa"?zhe():t==="ar"?Ehe():t==="es"?Nhe():t==="hi"?Ahe():t==="ko"?The():t==="ja"?Rhe():t==="pl"?Mhe():She()}),$he=()=>"Retry is available.",Dhe=()=>"可以重试。",Lhe=()=>"تلاش دوباره در دسترس است.",Ihe=()=>"إعادة المحاولة متاحة.",Phe=()=>"Puedes reintentarlo.",Bhe=()=>"फिर से कोशिश करना उपलब्ध है।",Fhe=()=>"다시 시도할 수 있습니다.",Hhe=()=>"再試行できます。",qhe=()=>"Można ponowić próbę.",Uhe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dhe():t==="fa"?Lhe():t==="ar"?Ihe():t==="es"?Phe():t==="hi"?Bhe():t==="ko"?Fhe():t==="ja"?Hhe():t==="pl"?qhe():$he()}),Ghe=()=>"Running a tool",Whe=()=>"正在运行工具",Khe=()=>"در حال اجرای ابزار",Vhe=()=>"جارٍ تشغيل أداة",Qhe=()=>"Ejecutando una herramienta",Xhe=()=>"एक टूल चल रहा है",Yhe=()=>"도구 실행 중",Zhe=()=>"ツールを実行中",Jhe=()=>"Narzędzie jest uruchomione",epe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Whe():t==="fa"?Khe():t==="ar"?Vhe():t==="es"?Qhe():t==="hi"?Xhe():t==="ko"?Yhe():t==="ja"?Zhe():t==="pl"?Jhe():Ghe()}),tpe=()=>"Tool activity completed",rpe=()=>"工具活动已完成",npe=()=>"فعالیت ابزار کامل شد",spe=()=>"اكتمل نشاط الأداة",ope=()=>"Actividad de la herramienta completada",ape=()=>"टूल गतिविधि पूरी हुई",ipe=()=>"도구 작업 완료",cpe=()=>"ツールの処理が完了しました",lpe=()=>"Narzędzie zakończyło działanie",upe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rpe():t==="fa"?npe():t==="ar"?spe():t==="es"?ope():t==="hi"?ape():t==="ko"?ipe():t==="ja"?cpe():t==="pl"?lpe():tpe()}),_pe=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,fpe=e=>`工具活动失败:${e==null?void 0:e.labels}`,dpe=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,hpe=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,ppe=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,mpe=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,gpe=e=>`도구 작업 실패: ${e==null?void 0:e.labels}`,vpe=e=>`ツールの処理に失敗: ${e==null?void 0:e.labels}`,bpe=e=>`Błąd działania narzędzia: ${e==null?void 0:e.labels}`,ype=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fpe(e):t==="fa"?dpe(e):t==="ar"?hpe(e):t==="es"?ppe(e):t==="hi"?mpe(e):t==="ko"?gpe(e):t==="ja"?vpe(e):t==="pl"?bpe(e):_pe(e)}),xpe=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,wpe=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,kpe=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,jpe=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,Spe=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,Cpe=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,zpe=e=>`도구 작업 ${e==null?void 0:e.count}개 실패: ${e==null?void 0:e.labels}`,Epe=e=>`${e==null?void 0:e.count} 件のツール処理に失敗: ${e==null?void 0:e.labels}`,Npe=e=>`Wystąpiły błędy w ${e==null?void 0:e.count} działaniach narzędzi: ${e==null?void 0:e.labels}`,Ape=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?wpe(e):t==="fa"?kpe(e):t==="ar"?jpe(e):t==="es"?Spe(e):t==="hi"?Cpe(e):t==="ko"?zpe(e):t==="ja"?Epe(e):t==="pl"?Npe(e):xpe(e)}),Tpe=()=>"Turn did not finish.",Rpe=()=>"本轮未完成。",Mpe=()=>"این نوبت کامل نشد.",Ope=()=>"لم تكتمل الجولة.",$pe=()=>"El turno no terminó.",Dpe=()=>"यह टर्न पूरा नहीं हुआ।",Lpe=()=>"턴이 완료되지 않았습니다.",Ipe=()=>"ターンが完了しませんでした。",Ppe=()=>"Odpowiedź nie została ukończona.",Bpe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rpe():t==="fa"?Mpe():t==="ar"?Ope():t==="es"?$pe():t==="hi"?Dpe():t==="ko"?Lpe():t==="ja"?Ipe():t==="pl"?Ppe():Tpe()}),Fpe=()=>"Artifacts",Hpe=()=>"产物",qpe=()=>"خروجی‌ها",Upe=()=>"المُخرَجات",Gpe=()=>"Artefactos",Wpe=()=>"आर्टिफ़ैक्ट",Kpe=()=>"결과물",Vpe=()=>"成果物",Qpe=()=>"Artefakty",mD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hpe():t==="fa"?qpe():t==="ar"?Upe():t==="es"?Gpe():t==="hi"?Wpe():t==="ko"?Kpe():t==="ja"?Vpe():t==="pl"?Qpe():Fpe()}),Xpe=()=>"Close panel",Ype=()=>"关闭面板",Zpe=()=>"بستن پنل",Jpe=()=>"إغلاق اللوحة",eme=()=>"Cerrar panel",tme=()=>"पैनल बंद करें",rme=()=>"패널 닫기",nme=()=>"パネルを閉じる",sme=()=>"Zamknij panel",fg=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ype():t==="fa"?Zpe():t==="ar"?Jpe():t==="es"?eme():t==="hi"?tme():t==="ko"?rme():t==="ja"?nme():t==="pl"?sme():Xpe()}),ome=()=>"Current task",ame=()=>"当前任务",ime=()=>"وظیفهٔ فعلی",cme=()=>"المهمة الحالية",lme=()=>"Tarea actual",ume=()=>"मौजूदा टास्क",_me=()=>"현재 작업",fme=()=>"現在のタスク",dme=()=>"Bieżące zadanie",R9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ame():t==="fa"?ime():t==="ar"?cme():t==="es"?lme():t==="hi"?ume():t==="ko"?_me():t==="ja"?fme():t==="pl"?dme():ome()}),hme=()=>"Drag to resize panel",pme=()=>"拖动以调整面板大小",mme=()=>"برای تغییر اندازهٔ پنل بکشید",gme=()=>"اسحب لتغيير حجم اللوحة",vme=()=>"Arrastra para cambiar el tamaño del panel",bme=()=>"पैनल का आकार बदलने के लिए खींचें",yme=()=>"드래그하여 패널 크기 조정",xme=()=>"ドラッグしてパネルのサイズを変更",wme=()=>"Przeciągnij, aby zmienić rozmiar panelu",kme=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?pme():t==="fa"?mme():t==="ar"?gme():t==="es"?vme():t==="hi"?bme():t==="ko"?yme():t==="ja"?xme():t==="pl"?wme():hme()}),jme=()=>"Drag toward the center to restore panel",Sme=()=>"向中央拖动以恢复面板",Cme=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",zme=()=>"اسحب نحو المنتصف لاستعادة اللوحة",Eme=()=>"Arrastra hacia el centro para restaurar el panel",Nme=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",Ame=()=>"패널을 복원하려면 중앙으로 드래그",Tme=()=>"中央にドラッグしてパネルを復元",Rme=()=>"Przeciągnij w kierunku środka, aby przywrócić panel",Mme=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Sme():t==="fa"?Cme():t==="ar"?zme():t==="es"?Eme():t==="hi"?Nme():t==="ko"?Ame():t==="ja"?Tme():t==="pl"?Rme():jme()}),Ome=()=>"Entire project",$me=()=>"整个项目",Dme=()=>"کل پروژه",Lme=()=>"المشروع بالكامل",Ime=()=>"Todo el proyecto",Pme=()=>"पूरा प्रोजेक्ट",Bme=()=>"전체 프로젝트",Fme=()=>"プロジェクト全体",Hme=()=>"Cały projekt",M9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?$me():t==="fa"?Dme():t==="ar"?Lme():t==="es"?Ime():t==="hi"?Pme():t==="ko"?Bme():t==="ja"?Fme():t==="pl"?Hme():Ome()}),qme=()=>"Expand panel",Ume=()=>"展开面板",Gme=()=>"گسترش پنل",Wme=()=>"توسيع اللوحة",Kme=()=>"Expandir panel",Vme=()=>"पैनल फैलाएं",Qme=()=>"패널 확장",Xme=()=>"パネルを拡大",Yme=()=>"Rozwiń panel",O9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ume():t==="fa"?Gme():t==="ar"?Wme():t==="es"?Kme():t==="hi"?Vme():t==="ko"?Qme():t==="ja"?Xme():t==="pl"?Yme():qme()}),Zme=e=>`Experiment filter: ${e==null?void 0:e.scope}`,Jme=e=>`实验筛选:${e==null?void 0:e.scope}`,ege=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,tge=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,rge=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,nge=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,sge=e=>`실험 필터: ${e==null?void 0:e.scope}`,oge=e=>`実験フィルター: ${e==null?void 0:e.scope}`,age=e=>`Filtr eksperymentów: ${e==null?void 0:e.scope}`,ige=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Jme(e):t==="fa"?ege(e):t==="ar"?tge(e):t==="es"?rge(e):t==="hi"?nge(e):t==="ko"?sge(e):t==="ja"?oge(e):t==="pl"?age(e):Zme(e)}),cge=()=>"Experiment view",lge=()=>"实验视图",uge=()=>"نمای آزمایش",_ge=()=>"عرض التجربة",fge=()=>"Vista de experimento",dge=()=>"प्रयोग व्यू",hge=()=>"실험 보기",pge=()=>"実験表示",mge=()=>"Widok eksperymentu",gge=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?lge():t==="fa"?uge():t==="ar"?_ge():t==="es"?fge():t==="hi"?dge():t==="ko"?hge():t==="ja"?pge():t==="pl"?mge():cge()}),vge=()=>"Experiments",bge=()=>"实验",yge=()=>"آزمایش‌ها",xge=()=>"التجارب",wge=()=>"Experimentos",kge=()=>"प्रयोग",jge=()=>"실험",Sge=()=>"実験",Cge=()=>"Eksperymenty",gD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?bge():t==="fa"?yge():t==="ar"?xge():t==="es"?wge():t==="hi"?kge():t==="ko"?jge():t==="ja"?Sge():t==="pl"?Cge():vge()}),zge=()=>"Files",Ege=()=>"文件",Nge=()=>"فایل‌ها",Age=()=>"الملفات",Tge=()=>"Archivos",Rge=()=>"फ़ाइलें",Mge=()=>"파일",Oge=()=>"ファイル",$ge=()=>"Pliki",G4=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ege():t==="fa"?Nge():t==="ar"?Age():t==="es"?Tge():t==="hi"?Rge():t==="ko"?Mge():t==="ja"?Oge():t==="pl"?$ge():zge()}),Dge=()=>"Filter experiments",Lge=()=>"筛选实验",Ige=()=>"فیلتر آزمایش‌ها",Pge=()=>"تصفية التجارب",Bge=()=>"Filtrar experimentos",Fge=()=>"प्रयोग फ़िल्टर करें",Hge=()=>"실험 필터링",qge=()=>"実験を絞り込む",Uge=()=>"Filtruj eksperymenty",Gge=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lge():t==="fa"?Ige():t==="ar"?Pge():t==="es"?Bge():t==="hi"?Fge():t==="ko"?Hge():t==="ja"?qge():t==="pl"?Uge():Dge()}),Wge=()=>"Current task filtering is unavailable for unattributed experiments",Kge=()=>"存在无法归属的实验时,不能按当前任务筛选",Vge=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",Qge=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",Xge=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",Yge=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",Zge=()=>"작업에 연결되지 않은 실험은 현재 작업 필터를 사용할 수 없습니다",Jge=()=>"タスクに紐付いていない実験では、現在のタスクによる絞り込みは利用できません",e0e=()=>"Filtrowanie według bieżącego zadania jest niedostępne dla eksperymentów bez przypisania",t0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kge():t==="fa"?Vge():t==="ar"?Qge():t==="es"?Xge():t==="hi"?Yge():t==="ko"?Zge():t==="ja"?Jge():t==="pl"?e0e():Wge()}),r0e=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",n0e=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",s0e=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",o0e=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",a0e=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",i0e=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",c0e=()=>"현재 작업에서 생성한 실험이 아직 없습니다. 전체 프로젝트로 전환하여 모든 실험을 확인하세요.",l0e=()=>"現在のタスクの実験はまだありません。プロジェクト全体に切り替えて、すべての実験を確認してください。",u0e=()=>"Brak eksperymentów w bieżącym zadaniu. Przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty.",_0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?n0e():t==="fa"?s0e():t==="ar"?o0e():t==="es"?a0e():t==="hi"?i0e():t==="ko"?c0e():t==="ja"?l0e():t==="pl"?u0e():r0e()}),f0e=()=>"Open a task to filter to its experiments",d0e=()=>"请打开一个任务以筛选其实验",h0e=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",p0e=()=>"افتح مهمة لعرض تجاربها فقط",m0e=()=>"Abre una tarea para filtrar por sus experimentos",g0e=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",v0e=()=>"작업을 열어 해당 실험만 표시",b0e=()=>"タスクを開いて、その実験に絞り込む",y0e=()=>"Otwórz zadanie, aby filtrować jego eksperymenty",x0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?d0e():t==="fa"?h0e():t==="ar"?p0e():t==="es"?m0e():t==="hi"?g0e():t==="ko"?v0e():t==="ja"?b0e():t==="pl"?y0e():f0e()}),w0e=()=>"projects",k0e=()=>"项目",j0e=()=>"پروژه‌ها",S0e=()=>"المشاريع",C0e=()=>"los proyectos",z0e=()=>"प्रोजेक्ट",E0e=()=>"프로젝트",N0e=()=>"プロジェクト",A0e=()=>"projekty",Gm=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?k0e():t==="fa"?j0e():t==="ar"?S0e():t==="es"?C0e():t==="hi"?z0e():t==="ko"?E0e():t==="ja"?N0e():t==="pl"?A0e():w0e()}),T0e=()=>"Restore panel",R0e=()=>"还原面板",M0e=()=>"بازگرداندن اندازهٔ پنل",O0e=()=>"استعادة اللوحة",$0e=()=>"Restaurar panel",D0e=()=>"पैनल वापस लाएं",L0e=()=>"패널 복원",I0e=()=>"パネルを復元",P0e=()=>"Przywróć panel",$9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?R0e():t==="fa"?M0e():t==="ar"?O0e():t==="es"?$0e():t==="hi"?D0e():t==="ko"?L0e():t==="ja"?I0e():t==="pl"?P0e():T0e()}),B0e=()=>"Retry",F0e=()=>"重试",H0e=()=>"تلاش دوباره",q0e=()=>"إعادة المحاولة",U0e=()=>"Reintentar",G0e=()=>"फिर से कोशिश करें",W0e=()=>"다시 시도",K0e=()=>"再試行",V0e=()=>"Ponów",Ks=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F0e():t==="fa"?H0e():t==="ar"?q0e():t==="es"?U0e():t==="hi"?G0e():t==="ko"?W0e():t==="ja"?K0e():t==="pl"?V0e():B0e()}),Q0e=()=>"Select a project to browse its files.",X0e=()=>"选择一个项目以浏览其文件。",Y0e=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Z0e=()=>"اختر مشروعًا لتصفح ملفاته.",J0e=()=>"Selecciona un proyecto para explorar sus archivos.",eve=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",tve=()=>"파일을 탐색할 프로젝트를 선택하세요.",rve=()=>"ファイルを閲覧するプロジェクトを選択してください。",nve=()=>"Wybierz projekt, aby przeglądać jego pliki.",sve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?X0e():t==="fa"?Y0e():t==="ar"?Z0e():t==="es"?J0e():t==="hi"?eve():t==="ko"?tve():t==="ja"?rve():t==="pl"?nve():Q0e()}),ove=()=>"settings",ave=()=>"设置",ive=()=>"تنظیمات",cve=()=>"الإعدادات",lve=()=>"la configuración",uve=()=>"सेटिंग्स",_ve=()=>"설정",fve=()=>"設定",dve=()=>"ustawienia",hve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ave():t==="fa"?ive():t==="ar"?cve():t==="es"?lve():t==="hi"?uve():t==="ko"?_ve():t==="ja"?fve():t==="pl"?dve():ove()}),pve=()=>"Show archived",mve=()=>"显示已归档",gve=()=>"نمایش بایگانی‌شده‌ها",vve=()=>"إظهار المؤرشف",bve=()=>"Mostrar archivados",yve=()=>"संग्रहीत दिखाएँ",xve=()=>"보관된 실험 표시",wve=()=>"アーカイブ済みを表示",kve=()=>"Pokaż zarchiwizowane",jve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mve():t==="fa"?gve():t==="ar"?vve():t==="es"?bve():t==="hi"?yve():t==="ko"?xve():t==="ja"?wve():t==="pl"?kve():pve()}),Sve=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,Cve=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,zve=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,Eve=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,Nve=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,Ave=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,Tve=e=>`OpenResearch ${e==null?void 0:e.items}을(를) 불러올 수 없습니다.`,Rve=e=>`OpenResearch の ${e==null?void 0:e.items} を読み込めませんでした。`,Mve=e=>`Nie udało się wczytać elementów OpenResearch: ${e==null?void 0:e.items}.`,Ove=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Cve(e):t==="fa"?zve(e):t==="ar"?Eve(e):t==="es"?Nve(e):t==="hi"?Ave(e):t==="ko"?Tve(e):t==="ja"?Rve(e):t==="pl"?Mve(e):Sve(e)}),$ve=()=>"Sub-agent",Dve=()=>"子智能体",Lve=()=>"عامل فرعی",Ive=()=>"وكيل فرعي",Pve=()=>"Subagente",Bve=()=>"सब-एजेंट",Fve=()=>"하위 에이전트",Hve=()=>"サブエージェント",qve=()=>"Podagent",Uve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dve():t==="fa"?Lve():t==="ar"?Ive():t==="es"?Pve():t==="hi"?Bve():t==="ko"?Fve():t==="ja"?Hve():t==="pl"?qve():$ve()}),Gve=()=>"Table",Wve=()=>"表格",Kve=()=>"جدول",Vve=()=>"جدول",Qve=()=>"Tabla",Xve=()=>"टेबल",Yve=()=>"표",Zve=()=>"表",Jve=()=>"Tabela",e1e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wve():t==="fa"?Kve():t==="ar"?Vve():t==="es"?Qve():t==="hi"?Xve():t==="ko"?Yve():t==="ja"?Zve():t==="pl"?Jve():Gve()}),t1e=()=>"Tree",r1e=()=>"树状图",n1e=()=>"درخت",s1e=()=>"شجرة",o1e=()=>"Árbol",a1e=()=>"ट्री",i1e=()=>"트리",c1e=()=>"ツリー",l1e=()=>"Drzewo",u1e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?r1e():t==="fa"?n1e():t==="ar"?s1e():t==="es"?o1e():t==="hi"?a1e():t==="ko"?i1e():t==="ja"?c1e():t==="pl"?l1e():t1e()}),_1e=e=>`Collapse ${e==null?void 0:e.name}`,f1e=e=>`折叠 ${e==null?void 0:e.name}`,d1e=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,h1e=e=>`طيّ ${e==null?void 0:e.name}`,p1e=e=>`Contraer ${e==null?void 0:e.name}`,m1e=e=>`${e==null?void 0:e.name} समेटें`,g1e=e=>`${e==null?void 0:e.name} 접기`,v1e=e=>`${e==null?void 0:e.name} を折りたたむ`,b1e=e=>`Zwiń folder ${e==null?void 0:e.name}`,y1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?f1e(e):t==="fa"?d1e(e):t==="ar"?h1e(e):t==="es"?p1e(e):t==="hi"?m1e(e):t==="ko"?g1e(e):t==="ja"?v1e(e):t==="pl"?b1e(e):_1e(e)}),x1e=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,w1e=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,k1e=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,j1e=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,S1e=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,C1e=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,z1e=e=>`결과물 디렉터리에서 “${e==null?void 0:e.path}”을(를) 삭제할까요?`,E1e=e=>`成果物ディレクトリから「${e==null?void 0:e.path}」を削除しますか?`,N1e=e=>`Usunąć „${e==null?void 0:e.path}” z katalogu artefaktów?`,Dj=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?w1e(e):t==="fa"?k1e(e):t==="ar"?j1e(e):t==="es"?S1e(e):t==="hi"?C1e(e):t==="ko"?z1e(e):t==="ja"?E1e(e):t==="pl"?N1e(e):x1e(e)}),A1e=e=>`Delete folder ${e==null?void 0:e.name}`,T1e=e=>`删除文件夹 ${e==null?void 0:e.name}`,R1e=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,M1e=e=>`حذف المجلد ${e==null?void 0:e.name}`,O1e=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,$1e=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,D1e=e=>`${e==null?void 0:e.name} 폴더 삭제`,L1e=e=>`フォルダー ${e==null?void 0:e.name} を削除`,I1e=e=>`Usuń folder ${e==null?void 0:e.name}`,P1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T1e(e):t==="fa"?R1e(e):t==="ar"?M1e(e):t==="es"?O1e(e):t==="hi"?$1e(e):t==="ko"?D1e(e):t==="ja"?L1e(e):t==="pl"?I1e(e):A1e(e)}),B1e=e=>`Expand ${e==null?void 0:e.name}`,F1e=e=>`展开 ${e==null?void 0:e.name}`,H1e=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,q1e=e=>`توسيع ${e==null?void 0:e.name}`,U1e=e=>`Expandir ${e==null?void 0:e.name}`,G1e=e=>`${e==null?void 0:e.name} फैलाएं`,W1e=e=>`${e==null?void 0:e.name} 펼치기`,K1e=e=>`${e==null?void 0:e.name} を展開`,V1e=e=>`Rozwiń folder ${e==null?void 0:e.name}`,Q1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?F1e(e):t==="fa"?H1e(e):t==="ar"?q1e(e):t==="es"?U1e(e):t==="hi"?G1e(e):t==="ko"?W1e(e):t==="ja"?K1e(e):t==="pl"?V1e(e):B1e(e)}),X1e=()=>"Binary or unsupported file — no inline preview.",Y1e=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",Z1e=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",J1e=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",ebe=()=>"Archivo binario o no compatible — sin vista previa.",tbe=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",rbe=()=>"바이너리 또는 지원하지 않는 파일은 인라인 미리보기를 지원하지 않습니다.",nbe=()=>"バイナリまたは未対応のファイルにはインラインプレビューがありません。",sbe=()=>"Plik binarny lub nieobsługiwany — podgląd jest niedostępny.",obe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y1e():t==="fa"?Z1e():t==="ar"?J1e():t==="es"?ebe():t==="hi"?tbe():t==="ko"?rbe():t==="ja"?nbe():t==="pl"?sbe():X1e()}),abe=()=>"Copy path",ibe=()=>"复制路径",cbe=()=>"کپی مسیر",lbe=()=>"نسخ المسار",ube=()=>"Copiar ruta",_be=()=>"पथ कॉपी करें",fbe=()=>"경로 복사",dbe=()=>"パスをコピー",hbe=()=>"Kopiuj ścieżkę",pbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ibe():t==="fa"?cbe():t==="ar"?lbe():t==="es"?ube():t==="hi"?_be():t==="ko"?fbe():t==="ja"?dbe():t==="pl"?hbe():abe()}),mbe=()=>"Artifact not found",gbe=()=>"找不到产物",vbe=()=>"خروجی پیدا نشد",bbe=()=>"لم يُعثر على المُخرَج",ybe=()=>"No se encontró el artefacto",xbe=()=>"आर्टिफ़ैक्ट नहीं मिला",wbe=()=>"결과물을 찾지 못했습니다",kbe=()=>"成果物が見つかりません",jbe=()=>"Nie znaleziono artefaktu",Sbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gbe():t==="fa"?vbe():t==="ar"?bbe():t==="es"?ybe():t==="hi"?xbe():t==="ko"?wbe():t==="ja"?kbe():t==="pl"?jbe():mbe()}),Cbe=()=>"Open raw",zbe=()=>"打开原始文件",Ebe=()=>"باز کردن فایل خام",Nbe=()=>"فتح الملف الخام",Abe=()=>"Abrir sin formato",Tbe=()=>"रॉ खोलें",Rbe=()=>"원본 열기",Mbe=()=>"元のファイルを開く",Obe=()=>"Otwórz surowy plik",$be=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zbe():t==="fa"?Ebe():t==="ar"?Nbe():t==="es"?Abe():t==="hi"?Tbe():t==="ko"?Rbe():t==="ja"?Mbe():t==="pl"?Obe():Cbe()}),Dbe=()=>"Click an artifact to view it",Lbe=()=>"点击产物即可查看",Ibe=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Pbe=()=>"انقر على مُخرَج لعرضه",Bbe=()=>"Selecciona un artefacto para verlo",Fbe=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",Hbe=()=>"결과물을 클릭하여 확인하세요",qbe=()=>"成果物をクリックして表示",Ube=()=>"Kliknij artefakt, aby go wyświetlić",Gbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lbe():t==="fa"?Ibe():t==="ar"?Pbe():t==="es"?Bbe():t==="hi"?Fbe():t==="ko"?Hbe():t==="ja"?qbe():t==="pl"?Ube():Dbe()}),Wbe=()=>"Delete artifact",Kbe=()=>"删除产物",Vbe=()=>"حذف خروجی",Qbe=()=>"حذف المُخرَج",Xbe=()=>"Eliminar artefacto",Ybe=()=>"आर्टिफ़ैक्ट हटाएं",Zbe=()=>"결과물 삭제",Jbe=()=>"成果物を削除",eye=()=>"Usuń artefakt",D9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kbe():t==="fa"?Vbe():t==="ar"?Qbe():t==="es"?Xbe():t==="hi"?Ybe():t==="ko"?Zbe():t==="ja"?Jbe():t==="pl"?eye():Wbe()}),tye=()=>"Delete folder",rye=()=>"删除文件夹",nye=()=>"حذف پوشه",sye=()=>"حذف المجلد",oye=()=>"Eliminar carpeta",aye=()=>"फ़ोल्डर हटाएं",iye=()=>"폴더 삭제",cye=()=>"フォルダーを削除",lye=()=>"Usuń folder",uye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rye():t==="fa"?nye():t==="ar"?sye():t==="es"?oye():t==="hi"?aye():t==="ko"?iye():t==="ja"?cye():t==="pl"?lye():tye()}),_ye=()=>"Failed to load:",fye=()=>"加载失败:",dye=()=>"بارگیری ناموفق بود:",hye=()=>"تعذّر التحميل:",pye=()=>"Error al cargar:",mye=()=>"लोड नहीं हो सका:",gye=()=>"불러오기 실패:",vye=()=>"読み込みに失敗:",bye=()=>"Nie udało się wczytać:",yye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fye():t==="fa"?dye():t==="ar"?hye():t==="es"?pye():t==="hi"?mye():t==="ko"?gye():t==="ja"?vye():t==="pl"?bye():_ye()}),xye=()=>"File truncated — showing the first 512 KB.",wye=()=>"文件已截断——仅显示前 512 KB。",kye=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",jye=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",Sye=()=>"Archivo truncado — se muestran los primeros 512 KB.",Cye=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",zye=()=>"파일이 잘렸습니다. 처음 512 KB만 표시합니다.",Eye=()=>"ファイルが省略されています。先頭の 512 KB を表示しています。",Nye=()=>"Plik został ucięty — wyświetlono pierwsze 512 KB.",Aye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wye():t==="fa"?kye():t==="ar"?jye():t==="es"?Sye():t==="hi"?Cye():t==="ko"?zye():t==="ja"?Eye():t==="pl"?Nye():xye()}),Tye=()=>"Listing truncated — the folder has more artifacts.",Rye=()=>"列表已截断——文件夹中还有更多产物。",Mye=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",Oye=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",$ye=()=>"Listado truncado — la carpeta tiene más artefactos.",Dye=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",Lye=()=>"목록이 잘렸습니다. 폴더에 더 많은 결과물이 있습니다.",Iye=()=>"一覧が省略されています。フォルダーには他にも成果物があります。",Pye=()=>"Lista została ucięta — folder zawiera więcej artefaktów.",Bye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rye():t==="fa"?Mye():t==="ar"?Oye():t==="es"?$ye():t==="hi"?Dye():t==="ko"?Lye():t==="ja"?Iye():t==="pl"?Pye():Tye()}),Fye=()=>"Loading…",Hye=()=>"正在加载…",qye=()=>"در حال بارگیری…",Uye=()=>"جارٍ التحميل…",Gye=()=>"Cargando…",Wye=()=>"लोड हो रहा है…",Kye=()=>"불러오는 중…",Vye=()=>"読み込み中…",Qye=()=>"Wczytywanie…",vD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hye():t==="fa"?qye():t==="ar"?Uye():t==="es"?Gye():t==="hi"?Wye():t==="ko"?Kye():t==="ja"?Vye():t==="pl"?Qye():Fye()}),Xye=()=>"Loading artifacts…",Yye=()=>"正在加载产物…",Zye=()=>"در حال بارگیری خروجی‌ها…",Jye=()=>"جارٍ تحميل المُخرَجات…",exe=()=>"Cargando artefactos…",txe=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",rxe=()=>"결과물 불러오는 중…",nxe=()=>"成果物を読み込み中…",sxe=()=>"Wczytywanie artefaktów…",oxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yye():t==="fa"?Zye():t==="ar"?Jye():t==="es"?exe():t==="hi"?txe():t==="ko"?rxe():t==="ja"?nxe():t==="pl"?sxe():Xye()}),axe=()=>"Modified",ixe=()=>"修改时间",cxe=()=>"ویرایش‌شده",lxe=()=>"عُدّل",uxe=()=>"Modificado",_xe=()=>"बदला गया",fxe=()=>"수정됨",dxe=()=>"変更済み",hxe=()=>"Zmodyfikowano",pxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ixe():t==="fa"?cxe():t==="ar"?lxe():t==="es"?uxe():t==="hi"?_xe():t==="ko"?fxe():t==="ja"?dxe():t==="pl"?hxe():axe()}),mxe=()=>"No artifacts yet",gxe=()=>"尚无产物",vxe=()=>"هنوز خروجی‌ای وجود ندارد",bxe=()=>"لا توجد مُخرَجات بعد",yxe=()=>"Aún no hay artefactos",xxe=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",wxe=()=>"아직 결과물이 없습니다",kxe=()=>"成果物はまだありません",jxe=()=>"Brak artefaktów",Sxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gxe():t==="fa"?vxe():t==="ar"?bxe():t==="es"?yxe():t==="hi"?xxe():t==="ko"?wxe():t==="ja"?kxe():t==="pl"?jxe():mxe()}),Cxe=()=>"Open raw in new tab",zxe=()=>"在新标签页中打开原始文件",Exe=()=>"باز کردن فایل خام در زبانهٔ جدید",Nxe=()=>"فتح الملف الخام في تبويب جديد",Axe=()=>"Abrir sin formato en una pestaña nueva",Txe=()=>"नए टैब में रॉ खोलें",Rxe=()=>"새 탭에서 원본 열기",Mxe=()=>"新しいタブで元のファイルを開く",Oxe=()=>"Otwórz surowy plik w nowej karcie",L9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zxe():t==="fa"?Exe():t==="ar"?Nxe():t==="es"?Axe():t==="hi"?Txe():t==="ko"?Rxe():t==="ja"?Mxe():t==="pl"?Oxe():Cxe()}),$xe=()=>"This is the project's durable output space for reports, figures, images, CSVs, PDFs, and other research artifacts. Ask the agent for a write-up or add your own files.",Dxe=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",Lxe=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",Ixe=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",Pxe=()=>"Este es el espacio de resultados permanente del proyecto: informes, figuras, imágenes, CSV, PDF y otros artefactos de investigación. Pídele al agente un informe o añade tus propios archivos.",Bxe=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",Fxe=()=>"보고서, 그림, 이미지, CSV, PDF 등 연구 결과물을 영구 보관하는 프로젝트 공간입니다. 에이전트에게 문서 작성을 요청하거나 직접 파일을 추가하세요.",Hxe=()=>"レポート、図、画像、CSV、PDF などの研究成果物を永続的に保存するプロジェクトの領域です。エージェントに文書の作成を依頼するか、ファイルを追加してください。",qxe=()=>"To miejsce na trwałe wyniki projektu: raporty, wykresy, obrazy, pliki CSV, PDF i inne artefakty badawcze. Poproś agenta o przygotowanie opracowania lub dodaj własne pliki.",Uxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dxe():t==="fa"?Lxe():t==="ar"?Ixe():t==="es"?Pxe():t==="hi"?Bxe():t==="ko"?Fxe():t==="ja"?Hxe():t==="pl"?qxe():$xe()}),Gxe=()=>"File too large to preview inline.",Wxe=()=>"文件太大,无法内嵌预览。",Kxe=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",Vxe=()=>"الملف كبير جدًا للمعاينة المضمّنة.",Qxe=()=>"El archivo es demasiado grande para previsualizarlo.",Xxe=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",Yxe=()=>"파일이 너무 커서 인라인 미리보기를 할 수 없습니다.",Zxe=()=>"ファイルが大きすぎるためインラインプレビューできません。",Jxe=()=>"Plik jest za duży, aby wyświetlić podgląd.",ewe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wxe():t==="fa"?Kxe():t==="ar"?Vxe():t==="es"?Qxe():t==="hi"?Xxe():t==="ko"?Yxe():t==="ja"?Zxe():t==="pl"?Jxe():Gxe()}),twe=()=>"This is the baseline branch, so there is no parent comparison.",rwe=()=>"这是基线分支,因此没有父分支可供比较。",nwe=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",swe=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",owe=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",awe=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",iwe=()=>"베이스라인 브랜치이므로 상위 브랜치와 비교할 수 없습니다.",cwe=()=>"これはベースラインブランチのため、親との比較はありません。",lwe=()=>"To gałąź bazowa, więc nie ma gałęzi nadrzędnej do porównania.",uwe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rwe():t==="fa"?nwe():t==="ar"?swe():t==="es"?owe():t==="hi"?awe():t==="ko"?iwe():t==="ja"?cwe():t==="pl"?lwe():twe()}),_we=()=>"Failed to load changes:",fwe=()=>"加载更改失败:",dwe=()=>"بارگیری تغییرات ناموفق بود:",hwe=()=>"تعذّر تحميل التغييرات:",pwe=()=>"Error al cargar los cambios:",mwe=()=>"बदलाव लोड नहीं हो सके:",gwe=()=>"변경 사항 불러오기 실패:",vwe=()=>"変更の読み込みに失敗:",bwe=()=>"Nie udało się wczytać zmian:",ywe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fwe():t==="fa"?dwe():t==="ar"?hwe():t==="es"?pwe():t==="hi"?mwe():t==="ko"?gwe():t==="ja"?vwe():t==="pl"?bwe():_we()}),xwe=()=>"Loading changes…",wwe=()=>"正在加载更改…",kwe=()=>"در حال بارگیری تغییرات…",jwe=()=>"جارٍ تحميل التغييرات…",Swe=()=>"Cargando cambios…",Cwe=()=>"बदलाव लोड हो रहे हैं…",zwe=()=>"변경 사항 불러오는 중…",Ewe=()=>"変更を読み込み中…",Nwe=()=>"Wczytywanie zmian…",Awe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wwe():t==="fa"?kwe():t==="ar"?jwe():t==="es"?Swe():t==="hi"?Cwe():t==="ko"?zwe():t==="ja"?Ewe():t==="pl"?Nwe():xwe()}),Twe=()=>"No committed changes from the parent branch.",Rwe=()=>"与父分支相比没有已提交的更改。",Mwe=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",Owe=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",$we=()=>"No hay cambios confirmados respecto a la rama padre.",Dwe=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",Lwe=()=>"상위 브랜치 대비 커밋된 변경 사항이 없습니다.",Iwe=()=>"親ブランチからのコミット済みの変更はありません。",Pwe=()=>"Brak zatwierdzonych zmian względem gałęzi nadrzędnej.",Bwe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rwe():t==="fa"?Mwe():t==="ar"?Owe():t==="es"?$we():t==="hi"?Dwe():t==="ko"?Lwe():t==="ja"?Iwe():t==="pl"?Pwe():Twe()}),Fwe=e=>`chat ${e==null?void 0:e.number}`,Hwe=e=>`聊天 ${e==null?void 0:e.number}`,qwe=e=>`گفتگو ${e==null?void 0:e.number}`,Uwe=e=>`محادثة ${e==null?void 0:e.number}`,Gwe=e=>`chat ${e==null?void 0:e.number}`,Wwe=e=>`चैट ${e==null?void 0:e.number}`,Kwe=e=>`채팅 ${e==null?void 0:e.number}`,Vwe=e=>`チャット ${e==null?void 0:e.number}`,Qwe=e=>`czat ${e==null?void 0:e.number}`,I9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Hwe(e):t==="fa"?qwe(e):t==="ar"?Uwe(e):t==="es"?Gwe(e):t==="hi"?Wwe(e):t==="ko"?Kwe(e):t==="ja"?Vwe(e):t==="pl"?Qwe(e):Fwe(e)}),Xwe=()=>"agent sessions",Ywe=()=>"智能体会话",Zwe=()=>"نشست‌های عامل‌ها",Jwe=()=>"جلسات الوكلاء",e2e=()=>"sesiones de agente",t2e=()=>"एजेंट सेशन",r2e=()=>"에이전트 세션",n2e=()=>"エージェントのセッション",s2e=()=>"sesje agentów",o2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ywe():t==="fa"?Zwe():t==="ar"?Jwe():t==="es"?e2e():t==="hi"?t2e():t==="ko"?r2e():t==="ja"?n2e():t==="pl"?s2e():Xwe()}),a2e=()=>"All sessions",i2e=()=>"所有会话",c2e=()=>"همهٔ نشست‌ها",l2e=()=>"كل الجلسات",u2e=()=>"Todas las sesiones",_2e=()=>"सभी सेशन",f2e=()=>"모든 세션",d2e=()=>"すべてのセッション",h2e=()=>"Wszystkie sesje",bD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i2e():t==="fa"?c2e():t==="ar"?l2e():t==="es"?u2e():t==="hi"?_2e():t==="ko"?f2e():t==="ja"?d2e():t==="pl"?h2e():a2e()}),p2e=e=>`${e==null?void 0:e.count} annotations`,m2e=e=>`${e==null?void 0:e.count} 条批注`,g2e=e=>`${e==null?void 0:e.count} یادداشت`,v2e=e=>`التعليقات: ${e==null?void 0:e.count}`,b2e=e=>`${e==null?void 0:e.count} anotaciones`,y2e=e=>`${e==null?void 0:e.count} एनोटेशन`,x2e=e=>`주석 ${e==null?void 0:e.count}개`,w2e=e=>`${e==null?void 0:e.count} 件の注釈`,k2e=e=>`Adnotacje: ${e==null?void 0:e.count}`,j2e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?m2e(e):t==="fa"?g2e(e):t==="ar"?v2e(e):t==="es"?b2e(e):t==="hi"?y2e(e):t==="ko"?x2e(e):t==="ja"?w2e(e):t==="pl"?k2e(e):p2e(e)}),S2e=()=>"Archive",C2e=()=>"归档",z2e=()=>"بایگانی",E2e=()=>"أرشفة",N2e=()=>"Archivar",A2e=()=>"आर्काइव करें",T2e=()=>"보관",R2e=()=>"アーカイブ",M2e=()=>"Archiwizuj",O2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?C2e():t==="fa"?z2e():t==="ar"?E2e():t==="es"?N2e():t==="hi"?A2e():t==="ko"?T2e():t==="ja"?R2e():t==="pl"?M2e():S2e()}),$2e=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",D2e=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",L2e=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",I2e=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",P2e=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",B2e=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",F2e=()=>"연구 에이전트에 질문… (명령과 스킬은 /, 셸은 !)",H2e=()=>"研究エージェントに質問…(/ でコマンドとスキル、! でシェル)",q2e=()=>"Zapytaj agenta badawczego… (/ — polecenia i umiejętności, ! — powłoka)",U2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?D2e():t==="fa"?L2e():t==="ar"?I2e():t==="es"?P2e():t==="hi"?B2e():t==="ko"?F2e():t==="ja"?H2e():t==="pl"?q2e():$2e()}),G2e=()=>"Asked about selected text",W2e=()=>"已询问所选文本",K2e=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",V2e=()=>"سأل عن النص المحدد",Q2e=()=>"Preguntó sobre el texto seleccionado",X2e=()=>"चयनित टेक्स्ट के बारे में पूछा",Y2e=()=>"선택한 텍스트에 대해 질문함",Z2e=()=>"選択したテキストについて質問しました",J2e=()=>"Zapytano o zaznaczony tekst",eke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W2e():t==="fa"?K2e():t==="ar"?V2e():t==="es"?Q2e():t==="hi"?X2e():t==="ko"?Y2e():t==="ja"?Z2e():t==="pl"?J2e():G2e()}),tke=()=>"Attachment",rke=()=>"附件",nke=()=>"پیوست",ske=()=>"مرفق",oke=()=>"Adjunto",ake=()=>"अटैचमेंट",ike=()=>"첨부 파일",cke=()=>"添付ファイル",lke=()=>"Załącznik",uke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rke():t==="fa"?nke():t==="ar"?ske():t==="es"?oke():t==="hi"?ake():t==="ko"?ike():t==="ja"?cke():t==="pl"?lke():tke()}),_ke=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,fke=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,dke=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,hke=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,pke=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,mke=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,gke=e=>`${e==null?void 0:e.name} 파일이 너무 큽니다. 첨부 파일당 크기는 30 MB 미만이어야 합니다.`,vke=e=>`${e==null?void 0:e.name} が大きすぎます。各添付ファイルは 30 MB 未満である必要があります。`,bke=e=>`${e==null?void 0:e.name} jest za duży — każdy załącznik musi mieć mniej niż 30 MB.`,yke=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fke(e):t==="fa"?dke(e):t==="ar"?hke(e):t==="es"?pke(e):t==="hi"?mke(e):t==="ko"?gke(e):t==="ja"?vke(e):t==="pl"?bke(e):_ke(e)}),xke=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",wke=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",kke=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",jke=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",Ske=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",Cke=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",zke=()=>"첨부 파일의 총 크기가 40 MB를 초과합니다. 하나를 제거한 뒤 다시 시도하세요.",Eke=()=>"添付ファイルの合計が上限の 40 MB を超えています。1 つ削除して再試行してください。",Nke=()=>"Załączniki przekraczają łączny limit 40 MB — usuń jeden z nich i spróbuj ponownie.",Ake=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wke():t==="fa"?kke():t==="ar"?jke():t==="es"?Ske():t==="hi"?Cke():t==="ko"?zke():t==="ja"?Eke():t==="pl"?Nke():xke()}),Tke=()=>"Wait for the turn to finish before running a command.",Rke=()=>"请等待本轮结束后再运行命令。",Mke=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",Oke=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",$ke=()=>"Espera a que termine el turno antes de ejecutar un comando.",Dke=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",Lke=()=>"명령을 실행하기 전에 턴이 끝날 때까지 기다리세요.",Ike=()=>"コマンドを実行する前に、ターンの完了を待ってください。",Pke=()=>"Poczekaj na zakończenie odpowiedzi przed uruchomieniem polecenia.",Bke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rke():t==="fa"?Mke():t==="ar"?Oke():t==="es"?$ke():t==="hi"?Dke():t==="ko"?Lke():t==="ja"?Ike():t==="pl"?Pke():Tke()}),Fke=e=>`Exited with code ${e==null?void 0:e.code}`,Hke=e=>`退出码 ${e==null?void 0:e.code}`,qke=e=>`با کد ${e==null?void 0:e.code} خارج شد`,Uke=e=>`خرج برمز ${e==null?void 0:e.code}`,Gke=e=>`Terminó con el código ${e==null?void 0:e.code}`,Wke=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,Kke=e=>`코드 ${e==null?void 0:e.code}로 종료됨`,Vke=e=>`コード ${e==null?void 0:e.code} で終了`,Qke=e=>`Zakończono z kodem ${e==null?void 0:e.code}`,Xke=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Hke(e):t==="fa"?qke(e):t==="ar"?Uke(e):t==="es"?Gke(e):t==="hi"?Wke(e):t==="ko"?Kke(e):t==="ja"?Vke(e):t==="pl"?Qke(e):Fke(e)}),Yke=e=>`Command not run: ${e==null?void 0:e.error}`,Zke=e=>`命令未运行:${e==null?void 0:e.error}`,Jke=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,e4e=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,t4e=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,r4e=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,n4e=e=>`명령이 실행되지 않았습니다: ${e==null?void 0:e.error}`,s4e=e=>`コマンドは実行されませんでした: ${e==null?void 0:e.error}`,o4e=e=>`Nie uruchomiono polecenia: ${e==null?void 0:e.error}`,P9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Zke(e):t==="fa"?Jke(e):t==="ar"?e4e(e):t==="es"?t4e(e):t==="hi"?r4e(e):t==="ko"?n4e(e):t==="ja"?s4e(e):t==="pl"?o4e(e):Yke(e)}),a4e=()=>"Collapse tool activity",i4e=()=>"折叠工具活动",c4e=()=>"بستن فعالیت ابزارها",l4e=()=>"طيّ نشاط الأداة",u4e=()=>"Contraer actividad de herramientas",_4e=()=>"टूल गतिविधि समेटें",f4e=()=>"도구 활동 접기",d4e=()=>"ツールのアクティビティを折りたたむ",h4e=()=>"Zwiń działania narzędzi",p4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i4e():t==="fa"?c4e():t==="ar"?l4e():t==="es"?u4e():t==="hi"?_4e():t==="ko"?f4e():t==="ja"?d4e():t==="pl"?h4e():a4e()}),m4e=()=>"Wait for the turn to finish before compacting.",g4e=()=>"请等待本轮结束后再压缩。",v4e=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",b4e=()=>"انتظر انتهاء الجولة قبل الضغط.",y4e=()=>"Espera a que termine el turno antes de comprimir.",x4e=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",w4e=()=>"압축하기 전에 턴이 끝날 때까지 기다리세요.",k4e=()=>"圧縮する前にターンの完了を待ってください。",j4e=()=>"Poczekaj na zakończenie odpowiedzi przed skróceniem kontekstu.",S4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?g4e():t==="fa"?v4e():t==="ar"?b4e():t==="es"?y4e():t==="hi"?x4e():t==="ko"?w4e():t==="ja"?k4e():t==="pl"?j4e():m4e()}),C4e=e=>`Compacting failed: ${e==null?void 0:e.error}`,z4e=e=>`压缩失败:${e==null?void 0:e.error}`,E4e=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,N4e=e=>`فشل الضغط: ${e==null?void 0:e.error}`,A4e=e=>`Error al comprimir: ${e==null?void 0:e.error}`,T4e=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,R4e=e=>`압축 실패: ${e==null?void 0:e.error}`,M4e=e=>`圧縮に失敗: ${e==null?void 0:e.error}`,O4e=e=>`Nie udało się skrócić kontekstu: ${e==null?void 0:e.error}`,$4e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?z4e(e):t==="fa"?E4e(e):t==="ar"?N4e(e):t==="es"?A4e(e):t==="hi"?T4e(e):t==="ko"?R4e(e):t==="ja"?M4e(e):t==="pl"?O4e(e):C4e(e)}),D4e=()=>"Continue",L4e=()=>"继续",I4e=()=>"ادامه",P4e=()=>"متابعة",B4e=()=>"Continuar",F4e=()=>"जारी रखें",H4e=()=>"계속",q4e=()=>"続行",U4e=()=>"Kontynuuj",G4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?L4e():t==="fa"?I4e():t==="ar"?P4e():t==="es"?B4e():t==="hi"?F4e():t==="ko"?H4e():t==="ja"?q4e():t==="pl"?U4e():D4e()}),W4e=()=>"Copy response",K4e=()=>"复制回复",V4e=()=>"کپی پاسخ",Q4e=()=>"نسخ الرد",X4e=()=>"Copiar respuesta",Y4e=()=>"जवाब कॉपी करें",Z4e=()=>"응답 복사",J4e=()=>"応答をコピー",e3e=()=>"Kopiuj odpowiedź",B9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?K4e():t==="fa"?V4e():t==="ar"?Q4e():t==="es"?X4e():t==="hi"?Y4e():t==="ko"?Z4e():t==="ja"?J4e():t==="pl"?e3e():W4e()}),t3e=e=>`Delete “${e==null?void 0:e.title}”? Its transcript will be permanently removed.`,r3e=e=>`删除“${e==null?void 0:e.title}”? @@ -108,7 +108,7 @@ ${e==null?void 0:e.path} ストアを新しい場所にコピーし、そこで有効化します。実行やチャットが進行中の場合、移動はできません。`,ghn=e=>`Przenieść wszystkie dane orx do: ${e==null?void 0:e.path} -Magazyn danych zostanie skopiowany do nowej lokalizacji i tam aktywowany. Trwające uruchomienia lub czaty uniemożliwią przeniesienie.`,vhn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?uhn(e):t==="fa"?_hn(e):t==="ar"?fhn(e):t==="es"?dhn(e):t==="hi"?hhn(e):t==="ko"?phn(e):t==="ja"?mhn(e):t==="pl"?ghn(e):lhn(e)}),bhn=()=>"Move data here",yhn=()=>"将数据移动到此处",xhn=()=>"انتقال داده به اینجا",whn=()=>"نقل البيانات إلى هنا",khn=()=>"Mover los datos aquí",jhn=()=>"डेटा यहाँ ले जाएं",Shn=()=>"여기로 데이터 이동",Chn=()=>"ここにデータを移動",zhn=()=>"Przenieś dane tutaj",Ehn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?yhn():t==="fa"?xhn():t==="ar"?whn():t==="es"?khn():t==="hi"?jhn():t==="ko"?Shn():t==="ja"?Chn():t==="pl"?zhn():bhn()}),Nhn=()=>"Moving…",Ahn=()=>"正在移动…",Thn=()=>"در حال جابه‌جایی…",Rhn=()=>"جارٍ النقل…",Mhn=()=>"Moviendo…",Ohn=()=>"स्थानांतरित हो रहा है…",$hn=()=>"이동 중…",Dhn=()=>"移動中…",Lhn=()=>"Przenoszenie…",Ihn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ahn():t==="fa"?Thn():t==="ar"?Rhn():t==="es"?Mhn():t==="hi"?Ohn():t==="ko"?$hn():t==="ja"?Dhn():t==="pl"?Lhn():Nhn()}),Phn=()=>"Preparing…",Bhn=()=>"正在准备…",Fhn=()=>"در حال آماده‌سازی…",Hhn=()=>"جارٍ التحضير…",qhn=()=>"Preparando…",Uhn=()=>"तैयार हो रहा है…",Ghn=()=>"준비 중…",Whn=()=>"準備中…",Khn=()=>"Przygotowywanie…",Vhn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Bhn():t==="fa"?Fhn():t==="ar"?Hhn():t==="es"?qhn():t==="hi"?Uhn():t==="ko"?Ghn():t==="ja"?Whn():t==="pl"?Khn():Phn()}),Qhn=()=>" (same disk, instant)",Xhn=()=>"(同一磁盘,可立即完成)",Yhn=()=>" (روی همان دیسک، فوری)",Zhn=()=>" (القرص نفسه، فوري)",Jhn=()=>" (mismo disco, instantáneo)",epn=()=>" (उसी डिस्क पर, तुरंत)",tpn=()=>" (같은 디스크, 즉시 이동)",rpn=()=>"(同じディスク、即時)",npn=()=>" (ten sam dysk, natychmiastowo)",spn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xhn():t==="fa"?Yhn():t==="ar"?Zhn():t==="es"?Jhn():t==="hi"?epn():t==="ko"?tpn():t==="ja"?rpn():t==="pl"?npn():Qhn()}),opn=()=>"default location",apn=()=>"默认位置",ipn=()=>"محل پیش‌فرض",cpn=()=>"الموقع الافتراضي",lpn=()=>"ubicación predeterminada",upn=()=>"डिफ़ॉल्ट स्थान",_pn=()=>"기본 위치",fpn=()=>"既定の場所",dpn=()=>"domyślna lokalizacja",hpn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?apn():t==="fa"?ipn():t==="ar"?cpn():t==="es"?lpn():t==="hi"?upn():t==="ko"?_pn():t==="ja"?fpn():t==="pl"?dpn():opn()}),ppn=()=>"ORX_DATA_DIR environment variable",mpn=()=>"ORX_DATA_DIR 环境变量",gpn=()=>"متغیر محیطی ORX_DATA_DIR",vpn=()=>"متغيّر البيئة ORX_DATA_DIR",bpn=()=>"variable de entorno ORX_DATA_DIR",ypn=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",xpn=()=>"ORX_DATA_DIR 환경 변수",wpn=()=>"ORX_DATA_DIR 環境変数",kpn=()=>"Zmienna środowiskowa ORX_DATA_DIR",jpn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mpn():t==="fa"?gpn():t==="ar"?vpn():t==="es"?bpn():t==="hi"?ypn():t==="ko"?xpn():t==="ja"?wpn():t==="pl"?kpn():ppn()}),Spn=()=>"your saved setting",Cpn=()=>"已保存的设置",zpn=()=>"تنظیم ذخیره‌شدهٔ شما",Epn=()=>"إعدادك المحفوظ",Npn=()=>"tu ajuste guardado",Apn=()=>"आपकी सेव की गई सेटिंग",Tpn=()=>"저장한 설정",Rpn=()=>"保存済みの設定",Mpn=()=>"zapisane ustawienie",Opn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cpn():t==="fa"?zpn():t==="ar"?Epn():t==="es"?Npn():t==="hi"?Apn():t==="ko"?Tpn():t==="ja"?Rpn():t==="pl"?Mpn():Spn()}),$pn=()=>"XDG_DATA_HOME",Dpn=()=>"XDG_DATA_HOME",Lpn=()=>"XDG_DATA_HOME",Ipn=()=>"XDG_DATA_HOME",Ppn=()=>"XDG_DATA_HOME",Bpn=()=>"XDG_DATA_HOME",Fpn=()=>"XDG_DATA_HOME",Hpn=()=>"XDG_DATA_HOME",qpn=()=>"XDG_DATA_HOME",Upn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dpn():t==="fa"?Lpn():t==="ar"?Ipn():t==="es"?Ppn():t==="hi"?Bpn():t==="ko"?Fpn():t==="ja"?Hpn():t==="pl"?qpn():$pn()}),Gpn=()=>"Verifying…",Wpn=()=>"正在验证…",Kpn=()=>"در حال بررسی…",Vpn=()=>"جارٍ التحقق…",Qpn=()=>"Verificando…",Xpn=()=>"सत्यापित हो रहा है…",Ypn=()=>"검증 중…",Zpn=()=>"検証中…",Jpn=()=>"Weryfikowanie…",emn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wpn():t==="fa"?Kpn():t==="ar"?Vpn():t==="es"?Qpn():t==="hi"?Xpn():t==="ko"?Ypn():t==="ja"?Zpn():t==="pl"?Jpn():Gpn()}),tmn=()=>"Loading…",rmn=()=>"正在加载…",nmn=()=>"در حال بارگیری…",smn=()=>"جارٍ التحميل…",omn=()=>"Cargando…",amn=()=>"लोड हो रहा है…",imn=()=>"불러오는 중…",cmn=()=>"読み込み中…",lmn=()=>"Wczytywanie…",AL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rmn():t==="fa"?nmn():t==="ar"?smn():t==="es"?omn():t==="hi"?amn():t==="ko"?imn():t==="ja"?cmn():t==="pl"?lmn():tmn()}),umn=()=>"This sub-agent is no longer available.",_mn=()=>"此子智能体已不可用。",fmn=()=>"این عامل فرعی دیگر در دسترس نیست.",dmn=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",hmn=()=>"Este subagente ya no está disponible.",pmn=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",mmn=()=>"이 하위 에이전트는 더 이상 사용할 수 없습니다.",gmn=()=>"このサブエージェントはもう利用できません。",vmn=()=>"Ten podagent nie jest już dostępny.",bmn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_mn():t==="fa"?fmn():t==="ar"?dmn():t==="es"?hmn():t==="hi"?pmn():t==="ko"?mmn():t==="ja"?gmn():t==="pl"?vmn():umn()}),ymn=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,xmn=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,wmn=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,kmn=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,jmn=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,Smn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,Cmn=e=>`${e==null?void 0:e.label} (미리보기; 더블 클릭 또는 Command/Control K 다음 Enter로 열린 상태 유지)`,zmn=e=>`${e==null?void 0:e.label}(プレビュー。ダブルクリック、または Command/Control K の後に Enter で開いたままにする)`,Emn=e=>`${e==null?void 0:e.label} (podgląd; kliknij dwukrotnie lub naciśnij Command/Control K, a następnie Enter, aby pozostawić otwarte)`,Nmn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?xmn(e):t==="fa"?wmn(e):t==="ar"?kmn(e):t==="es"?jmn(e):t==="hi"?Smn(e):t==="ko"?Cmn(e):t==="ja"?zmn(e):t==="pl"?Emn(e):ymn(e)}),Amn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,Tmn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,Rmn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,Mmn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,Omn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,$mn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,Dmn=e=>`${e==null?void 0:e.label} (더블 클릭 또는 ⌘/Ctrl+K Enter로 열린 상태 유지)`,Lmn=e=>`${e==null?void 0:e.label}(ダブルクリックまたは ⌘/Ctrl+K Enter で開いたままにする)`,Imn=e=>`${e==null?void 0:e.label} (kliknij dwukrotnie lub naciśnij ⌘/Ctrl+K, Enter, aby pozostawić otwarte)`,Pmn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Tmn(e):t==="fa"?Rmn(e):t==="ar"?Mmn(e):t==="es"?Omn(e):t==="hi"?$mn(e):t==="ko"?Dmn(e):t==="ja"?Lmn(e):t==="pl"?Imn(e):Amn(e)}),Bmn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",Fmn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",Hmn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",qmn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",Umn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",Gmn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",Wmn=()=>"또는 에이전트에게 LaTeX 템플릿 추가를 요청하세요.",Kmn=()=>"エージェントに LaTeX テンプレートの追加を依頼することもできます。",Vmn=()=>"Możesz też poprosić agenta o dodanie szablonu LaTeX.",Qmn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fmn():t==="fa"?Hmn():t==="ar"?qmn():t==="es"?Umn():t==="hi"?Gmn():t==="ko"?Wmn():t==="ja"?Kmn():t==="pl"?Vmn():Bmn()}),Xmn=()=>", a repo for training a mini-GPT from scratch.",Ymn=()=>",一个从零训练迷你 GPT 的仓库。",Zmn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",Jmn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",egn=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",tgn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",rgn=()=>", 작은 GPT를 처음부터 학습하는 저장소입니다.",ngn=()=>"という、小さな GPT をゼロから学習するリポジトリです。",sgn=()=>", repozytorium do trenowania mini-GPT od podstaw.",ogn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ymn():t==="fa"?Zmn():t==="ar"?Jmn():t==="es"?egn():t==="hi"?tgn():t==="ko"?rgn():t==="ja"?ngn():t==="pl"?sgn():Xmn()}),agn=()=>"Close",ign=()=>"关闭",cgn=()=>"بستن",lgn=()=>"إغلاق",ugn=()=>"Cerrar",_gn=()=>"बंद करें",fgn=()=>"닫기",dgn=()=>"閉じる",hgn=()=>"Zamknij",vb=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ign():t==="fa"?cgn():t==="ar"?lgn():t==="es"?ugn():t==="hi"?_gn():t==="ko"?fgn():t==="ja"?dgn():t==="pl"?hgn():agn()}),pgn=()=>"Create a new project",mgn=()=>"新建项目",ggn=()=>"ایجاد پروژهٔ جدید",vgn=()=>"إنشاء مشروع جديد",bgn=()=>"Crear un proyecto nuevo",ygn=()=>"नया प्रोजेक्ट बनाएं",xgn=()=>"새 프로젝트 만들기",wgn=()=>"新しいプロジェクトを作成",kgn=()=>"Utwórz nowy projekt",jgn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mgn():t==="fa"?ggn():t==="ar"?vgn():t==="es"?bgn():t==="hi"?ygn():t==="ko"?xgn():t==="ja"?wgn():t==="pl"?kgn():pgn()}),Sgn=()=>"Demo project",Cgn=()=>"演示项目",zgn=()=>"پروژهٔ نمایشی",Egn=()=>"مشروع توضيحي",Ngn=()=>"Proyecto de demostración",Agn=()=>"डेमो प्रोजेक्ट",Tgn=()=>"데모 프로젝트",Rgn=()=>"デモプロジェクト",Mgn=()=>"Projekt demonstracyjny",Ogn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cgn():t==="fa"?zgn():t==="ar"?Egn():t==="es"?Ngn():t==="hi"?Agn():t==="ko"?Tgn():t==="ja"?Rgn():t==="pl"?Mgn():Sgn()}),$gn=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",Dgn=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Lgn=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Ign=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",Pgn=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Bgn=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",Fgn=()=>"에이전트 대화, 실험, 실행, 결과물을 살펴보고 OpenResearch에서 프로젝트가 구성되는 방식을 확인하세요.",Hgn=()=>"エージェントの会話、実験、実行、成果物を見て、OpenResearch でプロジェクトがどのように進むか確認してください。",qgn=()=>"Przejrzyj rozmowy z agentem, eksperymenty, uruchomienia i artefakty, aby zobaczyć, jak powstaje projekt w OpenResearch.",Ugn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dgn():t==="fa"?Lgn():t==="ar"?Ign():t==="es"?Pgn():t==="hi"?Bgn():t==="ko"?Fgn():t==="ja"?Hgn():t==="pl"?qgn():$gn()}),Ggn=()=>"nanochat",Wgn=()=>"nanochat",Kgn=()=>"nanochat",Vgn=()=>"nanochat",Qgn=()=>"nanochat",Xgn=()=>"nanochat",Ygn=()=>"nanochat",Zgn=()=>"nanochat",Jgn=()=>"nanochat",e0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wgn():t==="fa"?Kgn():t==="ar"?Vgn():t==="es"?Qgn():t==="hi"?Xgn():t==="ko"?Ygn():t==="ja"?Zgn():t==="pl"?Jgn():Ggn()}),t0n=()=>"Try the demo experiment",r0n=()=>"试试演示实验",n0n=()=>"آزمایش نمایشی را امتحان کنید",s0n=()=>"جرّب التجربة التوضيحية",o0n=()=>"Probar el experimento de demostración",a0n=()=>"डेमो प्रयोग आज़माएं",i0n=()=>"데모 실험 체험",c0n=()=>"デモ実験を試す",l0n=()=>"Wypróbuj eksperyment demonstracyjny",u0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?r0n():t==="fa"?n0n():t==="ar"?s0n():t==="es"?o0n():t==="hi"?a0n():t==="ko"?i0n():t==="ja"?c0n():t==="pl"?l0n():t0n()}),_0n=()=>"Couldn’t save your progress. Try again.",f0n=()=>"无法保存进度。请重试。",d0n=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",h0n=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",p0n=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",m0n=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",g0n=()=>"진행 상황을 저장할 수 없습니다. 다시 시도하세요.",v0n=()=>"進捗を保存できませんでした。再試行してください。",b0n=()=>"Nie udało się zapisać postępu. Spróbuj ponownie.",y0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?f0n():t==="fa"?d0n():t==="ar"?h0n():t==="es"?p0n():t==="hi"?m0n():t==="ko"?g0n():t==="ja"?v0n():t==="pl"?b0n():_0n()}),x0n=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",w0n=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",k0n=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",j0n=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",S0n=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",C0n=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",z0n=()=>"OpenResearch의 작동 방식을 보여주는 데모 프로젝트입니다. 이 데모는 Andrej Karpathy의 다음 저장소를 사용합니다:",E0n=()=>"OpenResearch の動作を示すデモプロジェクトです。このデモでは Andrej Karpathy の次のリポジトリを使用しています:",N0n=()=>"To projekt demonstracyjny pokazujący działanie OpenResearch. Wykorzystuje projekt Andreja Karpathy’ego",A0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w0n():t==="fa"?k0n():t==="ar"?j0n():t==="es"?S0n():t==="hi"?C0n():t==="ko"?z0n():t==="ja"?E0n():t==="pl"?N0n():x0n()}),T0n=()=>"Welcome to OpenResearch",R0n=()=>"欢迎使用 OpenResearch",M0n=()=>"به OpenResearch خوش آمدید",O0n=()=>"مرحبًا بك في OpenResearch",$0n=()=>"Te damos la bienvenida a OpenResearch",D0n=()=>"OpenResearch में आपका स्वागत है",L0n=()=>"OpenResearch에 오신 것을 환영합니다",I0n=()=>"OpenResearch へようこそ",P0n=()=>"Witaj w OpenResearch",B0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?R0n():t==="fa"?M0n():t==="ar"?O0n():t==="es"?$0n():t==="hi"?D0n():t==="ko"?L0n():t==="ja"?I0n():t==="pl"?P0n():T0n()}),F0n=()=>"All experiments are archived. Turn on Show archived to view them.",H0n=()=>"所有实验均已归档。开启“显示已归档”即可查看。",q0n=()=>"همه آزمایش‌ها بایگانی شده‌اند. برای دیدنشان نمایش بایگانی‌شده‌ها را فعال کنید.",U0n=()=>"جميع التجارب مؤرشفة. فعّل إظهار المؤرشف لعرضها.",G0n=()=>"Todos los experimentos están archivados. Activa Mostrar archivados para verlos.",W0n=()=>"सभी प्रयोग संग्रहीत हैं। उन्हें देखने के लिए संग्रहीत दिखाएँ चालू करें।",K0n=()=>"모든 실험이 보관되었습니다. 보려면 보관된 실험 표시를 켜세요.",V0n=()=>"すべての実験がアーカイブされています。「アーカイブ済みを表示」を有効にして確認してください。",Q0n=()=>"Wszystkie eksperymenty są zarchiwizowane. Włącz „Pokaż zarchiwizowane”, aby je wyświetlić.",X0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?H0n():t==="fa"?q0n():t==="ar"?U0n():t==="es"?G0n():t==="hi"?W0n():t==="ko"?K0n():t==="ja"?V0n():t==="pl"?Q0n():F0n()}),Y0n=()=>"Archive ancestors",Z0n=()=>"归档祖先节点",J0n=()=>"بایگانی نیاکان",evn=()=>"أرشفة الأسلاف",tvn=()=>"Archivar antepasados",rvn=()=>"पूर्वजों को संग्रहीत करें",nvn=()=>"상위 실험 보관",svn=()=>"祖先の実験をアーカイブ",ovn=()=>"Archiwizuj nadrzędne eksperymenty",avn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Z0n():t==="fa"?J0n():t==="ar"?evn():t==="es"?tvn():t==="hi"?rvn():t==="ko"?nvn():t==="ja"?svn():t==="pl"?ovn():Y0n()}),ivn=()=>"Archive descendants",cvn=()=>"归档后代节点",lvn=()=>"بایگانی نوادگان",uvn=()=>"أرشفة الفروع التابعة",_vn=()=>"Archivar descendientes",fvn=()=>"वंशजों को संग्रहीत करें",dvn=()=>"하위 실험 보관",hvn=()=>"子孫の実験をアーカイブ",pvn=()=>"Archiwizuj podrzędne eksperymenty",mvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?cvn():t==="fa"?lvn():t==="ar"?uvn():t==="es"?_vn():t==="hi"?fvn():t==="ko"?dvn():t==="ja"?hvn():t==="pl"?pvn():ivn()}),gvn=()=>"Manage",vvn=()=>"管理",bvn=()=>"مدیریت",yvn=()=>"إدارة",xvn=()=>"Gestionar",wvn=()=>"प्रबंधित करें",kvn=()=>"관리",jvn=()=>"管理",Svn=()=>"Zarządzaj",Cvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?vvn():t==="fa"?bvn():t==="ar"?yvn():t==="es"?xvn():t==="hi"?wvn():t==="ko"?kvn():t==="ja"?jvn():t==="pl"?Svn():gvn()}),zvn=e=>`Manage ${e==null?void 0:e.name}`,Evn=e=>`管理 ${e==null?void 0:e.name}`,Nvn=e=>`مدیریت ${e==null?void 0:e.name}`,Avn=e=>`إدارة ${e==null?void 0:e.name}`,Tvn=e=>`Gestionar ${e==null?void 0:e.name}`,Rvn=e=>`${e==null?void 0:e.name} प्रबंधित करें`,Mvn=e=>`${e==null?void 0:e.name} 관리`,Ovn=e=>`${e==null?void 0:e.name} を管理`,$vn=e=>`Zarządzaj eksperymentem ${e==null?void 0:e.name}`,yN=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Evn(e):t==="fa"?Nvn(e):t==="ar"?Avn(e):t==="es"?Tvn(e):t==="hi"?Rvn(e):t==="ko"?Mvn(e):t==="ja"?Ovn(e):t==="pl"?$vn(e):zvn(e)}),Dvn=()=>"Archive this experiment",Lvn=()=>"归档此实验",Ivn=()=>"بایگانی این آزمایش",Pvn=()=>"أرشفة هذه التجربة",Bvn=()=>"Archivar este experimento",Fvn=()=>"इस प्रयोग को संग्रहीत करें",Hvn=()=>"이 실험 보관",qvn=()=>"この実験をアーカイブ",Uvn=()=>"Archiwizuj ten eksperyment",Gvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lvn():t==="fa"?Ivn():t==="ar"?Pvn():t==="es"?Bvn():t==="hi"?Fvn():t==="ko"?Hvn():t==="ja"?qvn():t==="pl"?Uvn():Dvn()}),Wvn=()=>"Archived",Kvn=()=>"已归档",Vvn=()=>"بایگانی‌شده",Qvn=()=>"مؤرشف",Xvn=()=>"Archivado",Yvn=()=>"संग्रहीत",Zvn=()=>"보관됨",Jvn=()=>"アーカイブ済み",e1n=()=>"Zarchiwizowane",TL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kvn():t==="fa"?Vvn():t==="ar"?Qvn():t==="es"?Xvn():t==="hi"?Yvn():t==="ko"?Zvn():t==="ja"?Jvn():t==="pl"?e1n():Wvn()}),t1n=e=>`${e==null?void 0:e.count} archived`,r1n=e=>`${e==null?void 0:e.count} 个已归档`,n1n=e=>`${e==null?void 0:e.count} بایگانی‌شده`,s1n=e=>`${e==null?void 0:e.count} مؤرشفة`,o1n=e=>`${e==null?void 0:e.count} archivados`,a1n=e=>`${e==null?void 0:e.count} संग्रहीत`,i1n=e=>`${e==null?void 0:e.count}개 보관됨`,c1n=e=>`${e==null?void 0:e.count} 件アーカイブ済み`,l1n=e=>`Zarchiwizowane: ${e==null?void 0:e.count}`,u1n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?r1n(e):t==="fa"?n1n(e):t==="ar"?s1n(e):t==="es"?o1n(e):t==="hi"?a1n(e):t==="ko"?i1n(e):t==="ja"?c1n(e):t==="pl"?l1n(e):t1n(e)}),_1n=()=>"Baseline",f1n=()=>"基线",d1n=()=>"مبنا",h1n=()=>"الأساس",p1n=()=>"Base",m1n=()=>"बेसलाइन",g1n=()=>"베이스라인",v1n=()=>"ベースライン",b1n=()=>"Wariant bazowy",y1n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?f1n():t==="fa"?d1n():t==="ar"?h1n():t==="es"?p1n():t==="hi"?m1n():t==="ko"?g1n():t==="ja"?v1n():t==="pl"?b1n():_1n()}),x1n=()=>"Experiment",w1n=()=>"实验",k1n=()=>"آزمایش",j1n=()=>"تجربة",S1n=()=>"Experimento",C1n=()=>"प्रयोग",z1n=()=>"실험",E1n=()=>"実験",N1n=()=>"Eksperyment",Fl=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w1n():t==="fa"?k1n():t==="ar"?j1n():t==="es"?S1n():t==="hi"?C1n():t==="ko"?z1n():t==="ja"?E1n():t==="pl"?N1n():x1n()}),A1n=e=>`${e==null?void 0:e.count} experiments`,T1n=e=>`${e==null?void 0:e.count} 个实验`,R1n=e=>`${e==null?void 0:e.count} آزمایش`,M1n=e=>`التجارب: ${e==null?void 0:e.count}`,O1n=e=>`${e==null?void 0:e.count} experimentos`,$1n=e=>`${e==null?void 0:e.count} प्रयोग`,D1n=e=>`실험 ${e==null?void 0:e.count}개`,L1n=e=>`${e==null?void 0:e.count} 件の実験`,I1n=e=>`Eksperymenty: ${e==null?void 0:e.count}`,P1n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T1n(e):t==="fa"?R1n(e):t==="ar"?M1n(e):t==="es"?O1n(e):t==="hi"?$1n(e):t==="ko"?D1n(e):t==="ja"?L1n(e):t==="pl"?I1n(e):A1n(e)}),B1n=()=>"hidden",F1n=()=>"已隐藏",H1n=()=>"پنهان",q1n=()=>"مخفية",U1n=()=>"ocultos",G1n=()=>"छिपे हुए",W1n=()=>"숨김",K1n=()=>"非表示",V1n=()=>"ukryte",Q1n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F1n():t==="fa"?H1n():t==="ar"?q1n():t==="es"?U1n():t==="hi"?G1n():t==="ko"?W1n():t==="ja"?K1n():t==="pl"?V1n():B1n()}),X1n=()=>"1 experiment",Y1n=()=>"1 个实验",Z1n=()=>"۱ آزمایش",J1n=()=>"تجربة واحدة",ebn=()=>"1 experimento",tbn=()=>"1 प्रयोग",rbn=()=>"실험 1개",nbn=()=>"1 件の実験",sbn=()=>"1 eksperyment",obn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y1n():t==="fa"?Z1n():t==="ar"?J1n():t==="es"?ebn():t==="hi"?tbn():t==="ko"?rbn():t==="ja"?nbn():t==="pl"?sbn():X1n()}),abn=()=>"Restore archived ancestors",ibn=()=>"恢复已归档的祖先节点",cbn=()=>"بازیابی نیاکان بایگانی‌شده",lbn=()=>"استعادة الأسلاف المؤرشفين",ubn=()=>"Restaurar antepasados archivados",_bn=()=>"संग्रहीत पूर्वजों को पुनर्स्थापित करें",fbn=()=>"보관된 상위 실험 복원",dbn=()=>"アーカイブ済みの祖先の実験を復元",hbn=()=>"Przywróć zarchiwizowane eksperymenty nadrzędne",pbn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ibn():t==="fa"?cbn():t==="ar"?lbn():t==="es"?ubn():t==="hi"?_bn():t==="ko"?fbn():t==="ja"?dbn():t==="pl"?hbn():abn()}),mbn=e=>`Restore ${e==null?void 0:e.count} archived experiments`,gbn=e=>`恢复 ${e==null?void 0:e.count} 个已归档实验`,vbn=e=>`بازیابی ${e==null?void 0:e.count} آزمایش بایگانی‌شده`,bbn=e=>`استعادة ${e==null?void 0:e.count} تجارب مؤرشفة`,ybn=e=>`Restaurar ${e==null?void 0:e.count} experimentos archivados`,xbn=e=>`${e==null?void 0:e.count} संग्रहीत प्रयोग पुनर्स्थापित करें`,wbn=e=>`보관된 실험 ${e==null?void 0:e.count}개 복원`,kbn=e=>`アーカイブ済みの実験を ${e==null?void 0:e.count} 件復元`,jbn=e=>`Przywróć zarchiwizowane eksperymenty (${e==null?void 0:e.count})`,Sbn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?gbn(e):t==="fa"?vbn(e):t==="ar"?bbn(e):t==="es"?ybn(e):t==="hi"?xbn(e):t==="ko"?wbn(e):t==="ja"?kbn(e):t==="pl"?jbn(e):mbn(e)}),Cbn=()=>"Restore descendants",zbn=()=>"恢复后代节点",Ebn=()=>"بازیابی نوادگان",Nbn=()=>"استعادة الفروع التابعة",Abn=()=>"Restaurar descendientes",Tbn=()=>"वंशजों को पुनर्स्थापित करें",Rbn=()=>"하위 실험 복원",Mbn=()=>"子孫の実験を復元",Obn=()=>"Przywróć eksperymenty podrzędne",$bn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zbn():t==="fa"?Ebn():t==="ar"?Nbn():t==="es"?Abn():t==="hi"?Tbn():t==="ko"?Rbn():t==="ja"?Mbn():t==="pl"?Obn():Cbn()}),Dbn=()=>"Restore this experiment",Lbn=()=>"恢复此实验",Ibn=()=>"بازیابی این آزمایش",Pbn=()=>"استعادة هذه التجربة",Bbn=()=>"Restaurar este experimento",Fbn=()=>"इस प्रयोग को पुनर्स्थापित करें",Hbn=()=>"이 실험 복원",qbn=()=>"この実験を復元",Ubn=()=>"Przywróć ten eksperyment",RL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lbn():t==="fa"?Ibn():t==="ar"?Pbn():t==="es"?Bbn():t==="hi"?Fbn():t==="ko"?Hbn():t==="ja"?qbn():t==="pl"?Ubn():Dbn()}),Gbn=()=>"Running",Wbn=()=>"运行中",Kbn=()=>"در حال اجرا",Vbn=()=>"قيد التشغيل",Qbn=()=>"En ejecución",Xbn=()=>"चल रहा है",Ybn=()=>"실행 중",Zbn=()=>"実行中",Jbn=()=>"W toku",eyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wbn():t==="fa"?Kbn():t==="ar"?Vbn():t==="es"?Qbn():t==="hi"?Xbn():t==="ko"?Ybn():t==="ja"?Zbn():t==="pl"?Jbn():Gbn()}),tyn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",ryn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",nyn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",syn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",oyn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",ayn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",iyn=()=>"이 작업에서 실험 생성을 요청하거나 전체 프로젝트로 전환하여 모든 실험을 확인하세요.",cyn=()=>"このタスクで実験の作成を依頼するか、プロジェクト全体に切り替えてすべての実験を確認してください。",lyn=()=>"Poproś o utworzenie eksperymentu w tym zadaniu albo przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty.",uyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ryn():t==="fa"?nyn():t==="ar"?syn():t==="es"?oyn():t==="hi"?ayn():t==="ko"?iyn():t==="ja"?cyn():t==="pl"?lyn():tyn()}),_yn=()=>"Ask the agent in chat to create and run your first experiment.",fyn=()=>"在聊天中让智能体创建并运行你的第一个实验。",dyn=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",hyn=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",pyn=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",myn=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",gyn=()=>"채팅에서 에이전트에게 첫 실험의 생성과 실행을 요청하세요.",vyn=()=>"チャットでエージェントに最初の実験の作成と実行を依頼してください。",byn=()=>"Poproś agenta na czacie o utworzenie i uruchomienie pierwszego eksperymentu.",yyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fyn():t==="fa"?dyn():t==="ar"?hyn():t==="es"?pyn():t==="hi"?myn():t==="ko"?gyn():t==="ja"?vyn():t==="pl"?byn():_yn()}),xyn=()=>"Code",wyn=()=>"代码",kyn=()=>"کد",jyn=()=>"الشيفرة",Syn=()=>"Código",Cyn=()=>"कोड",zyn=()=>"코드",Eyn=()=>"コード",Nyn=()=>"Kod",Ayn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wyn():t==="fa"?kyn():t==="ar"?jyn():t==="es"?Syn():t==="hi"?Cyn():t==="ko"?zyn():t==="ja"?Eyn():t==="pl"?Nyn():xyn()}),Tyn=()=>"Logs",Ryn=()=>"日志",Myn=()=>"گزارش‌ها",Oyn=()=>"السجلات",$yn=()=>"Logs",Dyn=()=>"लॉग",Lyn=()=>"로그",Iyn=()=>"ログ",Pyn=()=>"Logi",ML=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ryn():t==="fa"?Myn():t==="ar"?Oyn():t==="es"?$yn():t==="hi"?Dyn():t==="ko"?Lyn():t==="ja"?Iyn():t==="pl"?Pyn():Tyn()}),Byn=()=>"No experiments from the current task yet",Fyn=()=>"当前任务尚无实验",Hyn=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",qyn=()=>"لا توجد تجارب من المهمة الحالية بعد",Uyn=()=>"Aún no hay experimentos de la tarea actual",Gyn=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",Wyn=()=>"현재 작업에서 생성한 실험이 아직 없습니다",Kyn=()=>"現在のタスクの実験はまだありません",Vyn=()=>"Brak eksperymentów w bieżącym zadaniu",Qyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fyn():t==="fa"?Hyn():t==="ar"?qyn():t==="es"?Uyn():t==="hi"?Gyn():t==="ko"?Wyn():t==="ja"?Kyn():t==="pl"?Vyn():Byn()}),Xyn=()=>"No experiments yet",Yyn=()=>"尚无实验",Zyn=()=>"هنوز آزمایشی وجود ندارد",Jyn=()=>"لا توجد تجارب بعد",exn=()=>"Aún no hay experimentos",txn=()=>"अभी तक कोई प्रयोग नहीं",rxn=()=>"아직 실험이 없습니다",nxn=()=>"実験はまだありません",sxn=()=>"Brak eksperymentów",oxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yyn():t==="fa"?Zyn():t==="ar"?Jyn():t==="es"?exn():t==="hi"?txn():t==="ko"?rxn():t==="ja"?nxn():t==="pl"?sxn():Xyn()}),axn=()=>"no runs",ixn=()=>"无运行",cxn=()=>"بدون اجرا",lxn=()=>"لا عمليات تشغيل",uxn=()=>"sin ejecuciones",_xn=()=>"कोई रन नहीं",fxn=()=>"실행 없음",dxn=()=>"実行なし",hxn=()=>"brak uruchomień",pxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ixn():t==="fa"?cxn():t==="ar"?lxn():t==="es"?uxn():t==="hi"?_xn():t==="ko"?fxn():t==="ja"?dxn():t==="pl"?hxn():axn()}),mxn=()=>"Open logs",gxn=()=>"打开日志",vxn=()=>"باز کردن گزارش‌ها",bxn=()=>"فتح السجلات",yxn=()=>"Abrir logs",xxn=()=>"लॉग खोलें",wxn=()=>"로그 열기",kxn=()=>"ログを開く",jxn=()=>"Otwórz logi",Sxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gxn():t==="fa"?vxn():t==="ar"?bxn():t==="es"?yxn():t==="hi"?xxn():t==="ko"?wxn():t==="ja"?kxn():t==="pl"?jxn():mxn()}),Cxn=()=>"Runs",zxn=()=>"运行",Exn=()=>"اجراها",Nxn=()=>"عمليات التشغيل",Axn=()=>"Ejecuciones",Txn=()=>"रन",Rxn=()=>"실행",Mxn=()=>"実行",Oxn=()=>"Uruchomienia",$xn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zxn():t==="fa"?Exn():t==="ar"?Nxn():t==="es"?Axn():t==="hi"?Txn():t==="ko"?Rxn():t==="ja"?Mxn():t==="pl"?Oxn():Cxn()}),Dxn=()=>"Switch to Entire project to see all experiments",Lxn=()=>"切换到“整个项目”以查看所有实验",Ixn=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",Pxn=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",Bxn=()=>"Cambia a Todo el proyecto para ver todos los experimentos",Fxn=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",Hxn=()=>"전체 프로젝트로 전환하여 모든 실험 보기",qxn=()=>"プロジェクト全体に切り替えてすべての実験を表示",Uxn=()=>"Przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty",Gxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lxn():t==="fa"?Ixn():t==="ar"?Pxn():t==="es"?Bxn():t==="hi"?Fxn():t==="ko"?Hxn():t==="ja"?qxn():t==="pl"?Uxn():Dxn()}),Wxn=e=>`OpenResearch ${e==null?void 0:e.version} is ready. Restart to switch to it.`,Kxn=e=>`OpenResearch ${e==null?void 0:e.version} 已就绪。重新启动即可切换。`,Vxn=e=>`OpenResearch ${e==null?void 0:e.version} آماده است. برای رفتن به آن دوباره راه‌اندازی کنید.`,Qxn=e=>`OpenResearch ${e==null?void 0:e.version} جاهز. أعد التشغيل للانتقال إليه.`,Xxn=e=>`OpenResearch ${e==null?void 0:e.version} está listo. Reinicia para cambiar a esta versión.`,Yxn=e=>`OpenResearch ${e==null?void 0:e.version} तैयार है। इस पर जाने के लिए फिर से शुरू करें।`,Zxn=e=>`OpenResearch ${e==null?void 0:e.version}이(가) 준비되었습니다. 전환하려면 다시 시작하세요.`,Jxn=e=>`OpenResearch ${e==null?void 0:e.version} の準備ができました。切り替えるには再起動してください。`,ewn=e=>`OpenResearch ${e==null?void 0:e.version} jest gotowy. Uruchom aplikację ponownie, aby przejść na nową wersję.`,twn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Kxn(e):t==="fa"?Vxn(e):t==="ar"?Qxn(e):t==="es"?Xxn(e):t==="hi"?Yxn(e):t==="ko"?Zxn(e):t==="ja"?Jxn(e):t==="pl"?ewn(e):Wxn(e)}),rwn=()=>"Dismiss",nwn=()=>"关闭",swn=()=>"بستن",own=()=>"تجاهل",awn=()=>"Descartar",iwn=()=>"खारिज करें",cwn=()=>"닫기",lwn=()=>"閉じる",uwn=()=>"Zamknij",_wn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?nwn():t==="fa"?swn():t==="ar"?own():t==="es"?awn():t==="hi"?iwn():t==="ko"?cwn():t==="ja"?lwn():t==="pl"?uwn():rwn()}),fwn=()=>"Restart now",dwn=()=>"立即重新启动",hwn=()=>"هم‌اکنون دوباره راه‌اندازی کن",pwn=()=>"أعد التشغيل الآن",mwn=()=>"Reiniciar ahora",gwn=()=>"अभी फिर से शुरू करें",vwn=()=>"지금 다시 시작",bwn=()=>"今すぐ再起動",ywn=()=>"Uruchom ponownie teraz",OL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?dwn():t==="fa"?hwn():t==="ar"?pwn():t==="es"?mwn():t==="hi"?gwn():t==="ko"?vwn():t==="ja"?bwn():t==="pl"?ywn():fwn()}),xwn=e=>`Could not restart: ${e==null?void 0:e.error}`,wwn=e=>`无法重新启动:${e==null?void 0:e.error}`,kwn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,jwn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,Swn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,Cwn=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,zwn=e=>`다시 시작할 수 없습니다: ${e==null?void 0:e.error}`,Ewn=e=>`再起動できませんでした: ${e==null?void 0:e.error}`,Nwn=e=>`Nie udało się uruchomić ponownie: ${e==null?void 0:e.error}`,$L=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?wwn(e):t==="fa"?kwn(e):t==="ar"?jwn(e):t==="es"?Swn(e):t==="hi"?Cwn(e):t==="ko"?zwn(e):t==="ja"?Ewn(e):t==="pl"?Nwn(e):xwn(e)}),Awn=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",Twn=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",Rwn=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",Mwn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",Own=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",$wn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",Dwn=()=>"업데이트된 OpenResearch가 제한 시간 내에 시작되지 않았습니다. 직접 다시 시작하세요.",Lwn=()=>"更新された OpenResearch が時間内に起動しませんでした。手動で再起動してください。",Iwn=()=>"Zaktualizowany OpenResearch nie uruchomił się na czas. Uruchom go ręcznie.",Pwn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Twn():t==="fa"?Rwn():t==="ar"?Mwn():t==="es"?Own():t==="hi"?$wn():t==="ko"?Dwn():t==="ja"?Lwn():t==="pl"?Iwn():Awn()}),Bwn=()=>"Restarting…",Fwn=()=>"正在重新启动…",Hwn=()=>"در حال راه‌اندازی مجدد…",qwn=()=>"جارٍ إعادة التشغيل…",Uwn=()=>"Reiniciando…",Gwn=()=>"फिर से शुरू हो रहा है…",Wwn=()=>"다시 시작 중…",Kwn=()=>"再起動中…",Vwn=()=>"Ponowne uruchamianie…",DL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fwn():t==="fa"?Hwn():t==="ar"?qwn():t==="es"?Uwn():t==="hi"?Gwn():t==="ko"?Wwn():t==="ja"?Kwn():t==="pl"?Vwn():Bwn()}),Qwn=()=>"macOS app",Xwn=()=>"macOS 应用",Ywn=()=>"برنامهٔ macOS",Zwn=()=>"تطبيق macOS",Jwn=()=>"App de macOS",e2n=()=>"macOS ऐप",t2n=()=>"macOS 앱",r2n=()=>"macOS アプリ",n2n=()=>"Aplikacja macOS",s2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xwn():t==="fa"?Ywn():t==="ar"?Zwn():t==="es"?Jwn():t==="hi"?e2n():t==="ko"?t2n():t==="ja"?r2n():t==="pl"?n2n():Qwn()}),o2n=()=>"Linux app (AppImage)",a2n=()=>"Linux 应用(AppImage)",i2n=()=>"برنامه لینوکس (AppImage)",c2n=()=>"تطبيق Linux ‏(AppImage)",l2n=()=>"Aplicación para Linux (AppImage)",u2n=()=>"Linux ऐप (AppImage)",_2n=()=>"Linux 앱 (AppImage)",f2n=()=>"Linux アプリ(AppImage)",d2n=()=>"Aplikacja Linux (AppImage)",h2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?a2n():t==="fa"?i2n():t==="ar"?c2n():t==="es"?l2n():t==="hi"?u2n():t==="ko"?_2n():t==="ja"?f2n():t==="pl"?d2n():o2n()}),p2n=()=>"Installed with cargo",m2n=()=>"通过 cargo 安装",g2n=()=>"نصب‌شده با cargo",v2n=()=>"مثبّت عبر cargo",b2n=()=>"Instalado con cargo",y2n=()=>"cargo से इंस्टॉल किया गया",x2n=()=>"cargo로 설치됨",w2n=()=>"cargo でインストール",k2n=()=>"Zainstalowano przez cargo",j2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?m2n():t==="fa"?g2n():t==="ar"?v2n():t==="es"?b2n():t==="hi"?y2n():t==="ko"?x2n():t==="ja"?w2n():t==="pl"?k2n():p2n()}),S2n=()=>"Installed with Homebrew",C2n=()=>"通过 Homebrew 安装",z2n=()=>"نصب‌شده با Homebrew",E2n=()=>"مثبّت عبر Homebrew",N2n=()=>"Instalado con Homebrew",A2n=()=>"Homebrew से इंस्टॉल किया गया",T2n=()=>"Homebrew로 설치됨",R2n=()=>"Homebrew でインストール",M2n=()=>"Zainstalowano przez Homebrew",O2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?C2n():t==="fa"?z2n():t==="ar"?E2n():t==="es"?N2n():t==="hi"?A2n():t==="ko"?T2n():t==="ja"?R2n():t==="pl"?M2n():S2n()}),$2n=()=>"Installed with the orx installer",D2n=()=>"通过 orx 安装程序安装",L2n=()=>"نصب‌شده با نصب‌کنندهٔ orx",I2n=()=>"مثبّت عبر مُثبّت orx",P2n=()=>"Instalado con el instalador de orx",B2n=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",F2n=()=>"orx 설치 프로그램으로 설치됨",H2n=()=>"orx インストーラーでインストール",q2n=()=>"Zainstalowano instalatorem orx",U2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?D2n():t==="fa"?L2n():t==="ar"?I2n():t==="es"?P2n():t==="hi"?B2n():t==="ko"?F2n():t==="ja"?H2n():t==="pl"?q2n():$2n()}),G2n=()=>"Managed by Nix",W2n=()=>"由 Nix 管理",K2n=()=>"مدیریت‌شده با Nix",V2n=()=>"مُدار بواسطة Nix",Q2n=()=>"Gestionado por Nix",X2n=()=>"Nix द्वारा प्रबंधित",Y2n=()=>"Nix로 관리됨",Z2n=()=>"Nix で管理",J2n=()=>"Zarządzane przez Nix",ekn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W2n():t==="fa"?K2n():t==="ar"?V2n():t==="es"?Q2n():t==="hi"?X2n():t==="ko"?Y2n():t==="ja"?Z2n():t==="pl"?J2n():G2n()}),tkn=()=>"Portable orx.exe",rkn=()=>"便携版 orx.exe",nkn=()=>"orx.exe قابل‌حمل",skn=()=>"‏orx.exe المحمول",okn=()=>"orx.exe portable",akn=()=>"पोर्टेबल orx.exe",ikn=()=>"포터블 orx.exe",ckn=()=>"ポータブル版 orx.exe",lkn=()=>"Przenośny orx.exe",ukn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rkn():t==="fa"?nkn():t==="ar"?skn():t==="es"?okn():t==="hi"?akn():t==="ko"?ikn():t==="ja"?ckn():t==="pl"?lkn():tkn()}),_kn=()=>"Unknown install",fkn=()=>"未知安装方式",dkn=()=>"روش نصب نامشخص",hkn=()=>"تثبيت غير معروف",pkn=()=>"Instalación desconocida",mkn=()=>"अज्ञात इंस्टॉल",gkn=()=>"알 수 없는 설치",vkn=()=>"不明なインストール",bkn=()=>"Nieznany sposób instalacji",ykn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fkn():t==="fa"?dkn():t==="ar"?hkn():t==="es"?pkn():t==="hi"?mkn():t==="ko"?gkn():t==="ja"?vkn():t==="pl"?bkn():_kn()}),xkn=()=>"Re-run your cargo install to update.",wkn=()=>"重新运行 cargo 安装命令以更新。",kkn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",jkn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",Skn=()=>"Vuelve a ejecutar cargo install para actualizar.",Ckn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",zkn=()=>"업데이트하려면 cargo install을 다시 실행하세요.",Ekn=()=>"更新するには cargo install を再実行してください。",Nkn=()=>"Uruchom ponownie cargo install, aby zaktualizować.",Akn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wkn():t==="fa"?kkn():t==="ar"?jkn():t==="es"?Skn():t==="hi"?Ckn():t==="ko"?zkn():t==="ja"?Ekn():t==="pl"?Nkn():xkn()}),Tkn=()=>"Run brew upgrade to update.",Rkn=()=>"运行 brew upgrade 以更新。",Mkn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",Okn=()=>"نفّذ brew upgrade للتحديث.",$kn=()=>"Ejecuta brew upgrade para actualizar.",Dkn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",Lkn=()=>"업데이트하려면 brew upgrade를 실행하세요.",Ikn=()=>"更新するには brew upgrade を実行してください。",Pkn=()=>"Uruchom brew upgrade, aby zaktualizować.",Bkn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rkn():t==="fa"?Mkn():t==="ar"?Okn():t==="es"?$kn():t==="hi"?Dkn():t==="ko"?Lkn():t==="ja"?Ikn():t==="pl"?Pkn():Tkn()}),Fkn=()=>"Update it through your Nix configuration.",Hkn=()=>"通过 Nix 配置进行更新。",qkn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Ukn=()=>"حدّثه عبر إعداد Nix الخاص بك.",Gkn=()=>"Actualízalo desde tu configuración de Nix.",Wkn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",Kkn=()=>"Nix 설정을 통해 업데이트하세요.",Vkn=()=>"Nix の設定を通じて更新してください。",Qkn=()=>"Zaktualizuj przez konfigurację Nix.",Xkn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hkn():t==="fa"?qkn():t==="ar"?Ukn():t==="es"?Gkn():t==="hi"?Wkn():t==="ko"?Kkn():t==="ja"?Vkn():t==="pl"?Qkn():Fkn()}),Ykn=()=>"Close",Zkn=()=>"关闭",Jkn=()=>"بستن",e4n=()=>"إغلاق",t4n=()=>"Cerrar",r4n=()=>"बंद करें",n4n=()=>"닫기",s4n=()=>"閉じる",o4n=()=>"Zamknij",a4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zkn():t==="fa"?Jkn():t==="ar"?e4n():t==="es"?t4n():t==="hi"?r4n():t==="ko"?n4n():t==="ja"?s4n():t==="pl"?o4n():Ykn()}),i4n=()=>"Maximize",c4n=()=>"最大化",l4n=()=>"بزرگ کردن",u4n=()=>"تكبير",_4n=()=>"Maximizar",f4n=()=>"बड़ा करें",d4n=()=>"최대화",h4n=()=>"最大化",p4n=()=>"Maksymalizuj",m4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?c4n():t==="fa"?l4n():t==="ar"?u4n():t==="es"?_4n():t==="hi"?f4n():t==="ko"?d4n():t==="ja"?h4n():t==="pl"?p4n():i4n()}),g4n=()=>"Minimize",v4n=()=>"最小化",b4n=()=>"کوچک کردن",y4n=()=>"تصغير",x4n=()=>"Minimizar",w4n=()=>"छोटा करें",k4n=()=>"최소화",j4n=()=>"最小化",S4n=()=>"Minimalizuj",C4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?v4n():t==="fa"?b4n():t==="ar"?y4n():t==="es"?x4n():t==="hi"?w4n():t==="ko"?k4n():t==="ja"?j4n():t==="pl"?S4n():g4n()}),z4n=()=>"Restore",E4n=()=>"还原",N4n=()=>"بازیابی",A4n=()=>"استعادة",T4n=()=>"Restaurar",R4n=()=>"पुनर्स्थापित करें",M4n=()=>"복원",O4n=()=>"元に戻す",$4n=()=>"Przywróć",D4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?E4n():t==="fa"?N4n():t==="ar"?A4n():t==="es"?T4n():t==="hi"?R4n():t==="ko"?M4n():t==="ja"?O4n():t==="pl"?$4n():z4n()}),L4n=()=>"Active Experiments",I4n=()=>"活跃实验",P4n=()=>"آزمایش‌های فعال",B4n=()=>"التجارب النشطة",F4n=()=>"Experimentos activos",H4n=()=>"सक्रिय प्रयोग",q4n=()=>"활성 실험",U4n=()=>"進行中の実験",G4n=()=>"Aktywne eksperymenty",W4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?I4n():t==="fa"?P4n():t==="ar"?B4n():t==="es"?F4n():t==="hi"?H4n():t==="ko"?q4n():t==="ja"?U4n():t==="pl"?G4n():L4n()}),K4n=()=>"Default compute",V4n=()=>"默认计算目标",Q4n=()=>"محاسبات پیش‌فرض",X4n=()=>"الحوسبة الافتراضية",Y4n=()=>"Cómputo predeterminado",Z4n=()=>"डिफ़ॉल्ट कंप्यूट",J4n=()=>"기본 컴퓨팅",e3n=()=>"既定のコンピューティング",t3n=()=>"Domyślne zasoby obliczeniowe",r3n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?V4n():t==="fa"?Q4n():t==="ar"?X4n():t==="es"?Y4n():t==="hi"?Z4n():t==="ko"?J4n():t==="ja"?e3n():t==="pl"?t3n():K4n()}),n3n=()=>"More tools",s3n=()=>"更多工具",o3n=()=>"ابزارهای بیشتر",a3n=()=>"مزيد من الأدوات",i3n=()=>"Más herramientas",c3n=()=>"और टूल",l3n=()=>"추가 도구",u3n=()=>"その他のツール",_3n=()=>"Więcej narzędzi",xN=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?s3n():t==="fa"?o3n():t==="ar"?a3n():t==="es"?i3n():t==="hi"?c3n():t==="ko"?l3n():t==="ja"?u3n():t==="pl"?_3n():n3n()}),f3n=()=>"Terminal",d3n=()=>"终端",h3n=()=>"ترمینال",p3n=()=>"الطرفية",m3n=()=>"Terminal",g3n=()=>"टर्मिनल",v3n=()=>"터미널",b3n=()=>"ターミナル",y3n=()=>"Terminal",bb=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?d3n():t==="fa"?h3n():t==="ar"?p3n():t==="es"?m3n():t==="hi"?g3n():t==="ko"?v3n():t==="ja"?b3n():t==="pl"?y3n():f3n()}),x3n=()=>"The terminal disconnected.",w3n=()=>"终端连接已断开。",k3n=()=>"ارتباط ترمینال قطع شد.",j3n=()=>"انقطعت الطرفية.",S3n=()=>"La terminal se desconectó.",C3n=()=>"टर्मिनल डिस्कनेक्ट हो गया।",z3n=()=>"터미널 연결이 끊어졌습니다.",E3n=()=>"ターミナルの接続が切れました。",N3n=()=>"Utracono połączenie z terminalem.",wN=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w3n():t==="fa"?k3n():t==="ar"?j3n():t==="es"?S3n():t==="hi"?C3n():t==="ko"?z3n():t==="ja"?E3n():t==="pl"?N3n():x3n()}),A3n=e=>`Shell exited with code ${e==null?void 0:e.code}.`,T3n=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,R3n=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,M3n=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,O3n=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,$3n=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,D3n=e=>`셸이 코드 ${e==null?void 0:e.code}로 종료되었습니다.`,L3n=e=>`シェルがコード ${e==null?void 0:e.code} で終了しました。`,I3n=e=>`Powłoka zakończyła działanie z kodem ${e==null?void 0:e.code}.`,P3n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T3n(e):t==="fa"?R3n(e):t==="ar"?M3n(e):t==="es"?O3n(e):t==="hi"?$3n(e):t==="ko"?D3n(e):t==="ja"?L3n(e):t==="pl"?I3n(e):A3n(e)}),B3n=()=>"Restart shell",F3n=()=>"重新启动 Shell",H3n=()=>"راه‌اندازی دوباره پوسته",q3n=()=>"إعادة تشغيل Shell",U3n=()=>"Reiniciar shell",G3n=()=>"शेल फिर से शुरू करें",W3n=()=>"셸 다시 시작",K3n=()=>"シェルを再起動",V3n=()=>"Uruchom ponownie powłokę",Q3n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F3n():t==="fa"?H3n():t==="ar"?q3n():t==="es"?U3n():t==="hi"?G3n():t==="ko"?W3n():t==="ja"?K3n():t==="pl"?V3n():B3n()}),X3n=()=>"This worktree",Y3n=()=>"当前工作树",Z3n=()=>"این درخت کاری",J3n=()=>"شجرة العمل هذه",e5n=()=>"Este árbol de trabajo",t5n=()=>"यह वर्कट्री",r5n=()=>"이 워크트리",n5n=()=>"このワークツリー",s5n=()=>"To drzewo robocze",o5n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y3n():t==="fa"?Z3n():t==="ar"?J3n():t==="es"?e5n():t==="hi"?t5n():t==="ko"?r5n():t==="ja"?n5n():t==="pl"?s5n():X3n()}),a5n=()=>"Workspace",i5n=()=>"工作区",c5n=()=>"فضای کاری",l5n=()=>"مساحة العمل",u5n=()=>"Espacio de trabajo",_5n=()=>"वर्कस्पेस",f5n=()=>"작업 공간",d5n=()=>"ワークスペース",h5n=()=>"Obszar roboczy",D2=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i5n():t==="fa"?c5n():t==="ar"?l5n():t==="es"?u5n():t==="hi"?_5n():t==="ko"?f5n():t==="ja"?d5n():t==="pl"?h5n():a5n()}),p5n=e=>`Current worktree · ${e==null?void 0:e.branch}`,m5n=e=>`当前工作树 · ${e==null?void 0:e.branch}`,g5n=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,v5n=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,b5n=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,y5n=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,x5n=e=>`현재 워크트리 · ${e==null?void 0:e.branch}`,w5n=e=>`現在のワークツリー · ${e==null?void 0:e.branch}`,k5n=e=>`Bieżące drzewo robocze · ${e==null?void 0:e.branch}`,j5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?m5n(e):t==="fa"?g5n(e):t==="ar"?v5n(e):t==="es"?b5n(e):t==="hi"?y5n(e):t==="ko"?x5n(e):t==="ja"?w5n(e):t==="pl"?k5n(e):p5n(e)}),S5n=e=>`Default branch · ${e==null?void 0:e.branch}`,C5n=e=>`默认分支 · ${e==null?void 0:e.branch}`,z5n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,E5n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,N5n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,A5n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,T5n=e=>`기본 브랜치 · ${e==null?void 0:e.branch}`,R5n=e=>`既定のブランチ · ${e==null?void 0:e.branch}`,M5n=e=>`Gałąź domyślna · ${e==null?void 0:e.branch}`,O5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?C5n(e):t==="fa"?z5n(e):t==="ar"?E5n(e):t==="es"?N5n(e):t==="hi"?A5n(e):t==="ko"?T5n(e):t==="ja"?R5n(e):t==="pl"?M5n(e):S5n(e)}),$5n=e=>`detached at ${e==null?void 0:e.branch}`,D5n=e=>`分离于 ${e==null?void 0:e.branch}`,L5n=e=>`جدا در ${e==null?void 0:e.branch}`,I5n=e=>`منفصل عند ${e==null?void 0:e.branch}`,P5n=e=>`desacoplado en ${e==null?void 0:e.branch}`,B5n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,F5n=e=>`${e==null?void 0:e.branch}에서 분리됨`,H5n=e=>`${e==null?void 0:e.branch} で分離された HEAD`,q5n=e=>`odłączony HEAD na ${e==null?void 0:e.branch}`,U5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?D5n(e):t==="fa"?L5n(e):t==="ar"?I5n(e):t==="es"?P5n(e):t==="hi"?B5n(e):t==="ko"?F5n(e):t==="ja"?H5n(e):t==="pl"?q5n(e):$5n(e)}),G5n=()=>"Listing truncated.",W5n=()=>"列表已截断。",K5n=()=>"فهرست کوتاه شده است.",V5n=()=>"القائمة مقتطعة.",Q5n=()=>"Listado truncado.",X5n=()=>"सूची छोटी की गई।",Y5n=()=>"목록이 잘렸습니다.",Z5n=()=>"一覧が省略されています。",J5n=()=>"Lista została ucięta.",ejn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W5n():t==="fa"?K5n():t==="ar"?V5n():t==="es"?Q5n():t==="hi"?X5n():t==="ko"?Y5n():t==="ja"?Z5n():t==="pl"?J5n():G5n()}),tjn=()=>"Loading…",rjn=()=>"正在加载…",njn=()=>"در حال بارگیری…",sjn=()=>"جارٍ التحميل…",ojn=()=>"Cargando…",ajn=()=>"लोड हो रहा है…",ijn=()=>"불러오는 중…",cjn=()=>"読み込み中…",ljn=()=>"Wczytywanie…",ujn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rjn():t==="fa"?njn():t==="ar"?sjn():t==="es"?ojn():t==="hi"?ajn():t==="ko"?ijn():t==="ja"?cjn():t==="pl"?ljn():tjn()}),_jn=()=>"No changes yet.",fjn=()=>"尚无更改。",djn=()=>"هنوز تغییری وجود ندارد.",hjn=()=>"لا توجد تغييرات بعد.",pjn=()=>"Aún no hay cambios.",mjn=()=>"अभी तक कोई बदलाव नहीं।",gjn=()=>"아직 변경 사항이 없습니다.",vjn=()=>"変更はまだありません。",bjn=()=>"Na razie brak zmian.",yjn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fjn():t==="fa"?djn():t==="ar"?hjn():t==="es"?pjn():t==="hi"?mjn():t==="ko"?gjn():t==="ja"?vjn():t==="pl"?bjn():_jn()}),xjn=()=>"No files.",wjn=()=>"没有文件。",kjn=()=>"فایلی وجود ندارد.",jjn=()=>"لا توجد ملفات.",Sjn=()=>"No hay archivos.",Cjn=()=>"कोई फ़ाइल नहीं।",zjn=()=>"파일이 없습니다.",Ejn=()=>"ファイルがありません。",Njn=()=>"Brak plików.",Ajn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wjn():t==="fa"?kjn():t==="ar"?jjn():t==="es"?Sjn():t==="hi"?Cjn():t==="ko"?zjn():t==="ja"?Ejn():t==="pl"?Njn():xjn()}),Tjn=()=>"Refresh failed:",Rjn=()=>"刷新失败:",Mjn=()=>"تازه‌سازی ناموفق بود:",Ojn=()=>"فشل التحديث:",$jn=()=>"Error al actualizar:",Djn=()=>"रीफ़्रेश विफल:",Ljn=()=>"새로 고침 실패:",Ijn=()=>"更新に失敗:",Pjn=()=>"Nie udało się odświeżyć:",Bjn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rjn():t==="fa"?Mjn():t==="ar"?Ojn():t==="es"?$jn():t==="hi"?Djn():t==="ko"?Ljn():t==="ja"?Ijn():t==="pl"?Pjn():Tjn()}),Ee=e=>`⁦${e}⁩`,Vl=e=>`⁨${e}⁩`,fr=e=>new Intl.NumberFormat(C()).format(e),ym="demo_nanochat_v1",Ju=e=>e.startsWith("demo_"),zh="chat_demo_nanochat_v1",Jj="chat_demo_nanochat_figures_v1",eS="chat_demo_nanochat_literature_v1",Fjn={[zh]:"cpu_end_to_end",[Jj]:"figures",[eS]:"literature"},L2="cpu-apple-silicon-pipeline-results.md",Hjn={[zh]:"msg_demo_nanochat_assistant_v1",[Jj]:"msg_demo_nanochat_figures_assistant_v1",[eS]:"msg_demo_nanochat_literature_assistant_v1"},kN="Run the proposed learning-rate probe experiment. Summarize its results using the recorded validation metric and comparison described by the experiment. If it produces an interactive HTML loss chart, show it inline using image syntax.";class c3 extends Error{constructor(t,n,s){super(t);bo(this,"currentVersion");bo(this,"exists");this.name="FileChangedError",this.currentVersion=n,this.exists=s}}function Ba(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}function qjn(e){var t;if(e.status!=="running"&&e.status!=="starting")return null;const r=(t=e.backend)==null?void 0:t.monitoringError;return typeof r=="string"&&r?r:null}function LL(e){return[...e].sort((t,n)=>n.createdAt-t.createdAt).map(qjn).find(t=>t!==null)??null}const IL=new WeakMap;async function Eo(e){if(!e.ok){const n=await e.text().catch(()=>"");let s=n;try{const o=JSON.parse(n);if(typeof o=="object"&&o!==null&&("error"in o&&typeof o.error=="string"&&(s=o.error),e.status===409&&"code"in o&&o.code==="fileChanged"&&"exists"in o&&typeof o.exists=="boolean")){const a="currentVersion"in o&&typeof o.currentVersion=="string"?o.currentVersion:null;throw new c3(s,a,o.exists)}}catch(o){if(o instanceof c3)throw o}throw new Error(s||`HTTP ${e.status}`)}const r=await e.json(),t=IL.get(e);if(t&&!Wr(t))throw new DOMException("Workspace changed","AbortError");return r}const $t=(e,r)=>fetch(e,{signal:r}).then(t=>Eo(t));async function va(e,r){const t=Si(),n=await fetch(e,r);if(!Wr(t))throw new DOMException("Workspace changed","AbortError");return IL.set(n,t),n.ok&&wX(e,t),n}const jt=(e,r,t=!1)=>va(e,{method:"POST",keepalive:t,headers:r===void 0?{}:{"content-type":"application/json"},body:r===void 0?void 0:JSON.stringify(r)}).then(n=>Eo(n)),Yc=(e,r)=>va(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(r)}).then(t=>Eo(t)),PL=(e,r)=>va(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(r)}).then(t=>Eo(t)),Ujn=e=>$t("/api/projects",e).then(r=>r.projects),Gjn=e=>$t("/api/projects/activity",e).then(r=>r.activity),l3="agentic",Wjn=e=>$t("/api/settings/ui-state",e),Kjn=(e,r)=>$t(`/api/projects/${encodeURIComponent(e)}/ui-state`,r),Vjn=(e,r,t=!1)=>jt(`/api/projects/${encodeURIComponent(e)}/ui-state`,r,t),Qjn=(e,r=!1)=>jt("/api/settings/ui-state",{workspace:e},r),Xjn=e=>jt("/api/settings/ui-state",e),Yjn=(e,r)=>jt("/api/onboarding/complete",{...e,...r}),Zjn=(e="",r)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return $t(`/api/project-path/status${t}`,r)},Jjn=()=>jt("/api/git/install"),eSn=()=>jt("/api/project-path/pick").then(e=>e.path),tSn=e=>jt("/api/projects",e),rSn=(e,r)=>$t(`/api/papers/search?q=${encodeURIComponent(e)}`,r).then(t=>t.papers),nSn=e=>$t("/api/github/account",e),sSn=(e,r)=>$t(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,r),oSn=(e,r,t)=>$t(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(r)}`,t),aSn=(e,r)=>$t(`/api/papers/resolve?id=${encodeURIComponent(e)}`,r).then(t=>t.paper),iSn=(e,r)=>Yc(`/api/projects/${e}`,r).then(t=>t.project),cSn=e=>jt("/api/projects/starter-prompts/prewarm",e),lSn=(e,r,t,n,s)=>$t(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:r,...t?{model:t}:{},locale:n})}`,s),BL=e=>va(`/api/projects/${e}`,{method:"DELETE"}).then(async r=>{if(!r.ok){const t=await r.json().catch(()=>null);throw new Error((t==null?void 0:t.error)??`delete failed (${r.status})`)}yX(e)}),uSn=(e,r)=>$t(`/api/projects/${e}/experiments`,r).then(t=>t.experiments),_Sn=(e,r,t)=>Yc(`/api/experiments/${e}/archive`,{direction:r,archived:t}),fSn=(e,r)=>$t(`/api/projects/${e}/runs`,r).then(t=>t.runs),FL=e=>jt(`/api/runs/${e}/cancel`).then(()=>{}),dSn=(e,r)=>$t(`/api/runs/${e}/log?offset=${r}`),hSn=(e,r)=>$t(`/api/runs/${e}/diff`,r),pSn=(e,r)=>$t(`/api/experiments/${e}/diff`,r),N_=(e,r=new URLSearchParams)=>(e.sessionId&&r.set("sessionId",e.sessionId),e.ref&&r.set("ref",e.ref),r),mSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file?${N_(t,new URLSearchParams({path:r}))}`,n),u3=(e,r,t={})=>`/api/projects/${e}/file/raw?${N_(t,new URLSearchParams({path:r}))}`,gSn=(e,r)=>$t(`/api/files/abs?path=${encodeURIComponent(e)}`,r),HL=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,vSn=(e,r,t,n)=>PL(`/api/projects/${e}/file`,{path:r,content:t,sessionId:n.sessionId,expectedVersion:n.expectedVersion}),bSn=(e,r,t,n={})=>Yc(`/api/projects/${e}/file`,{path:r,...t,sessionId:n.sessionId}),ySn=(e,r,t={})=>jt(`/api/projects/${e}/file/open`,{path:r,sessionId:t.sessionId}),qL=(e,r,t={})=>jt(`/api/projects/${e}/file/reveal`,{path:r,sessionId:t.sessionId}),xSn=e=>$t("/api/latex/engine",e),wSn=(e,r,t={})=>jt(`/api/projects/${e}/file/latex`,{path:r,sessionId:t.sessionId}),kSn=e=>$t("/api/overleaf/settings",e),UL=e=>jt("/api/overleaf/token",{token:e}),jSn=()=>va("/api/overleaf/token",{method:"DELETE"}).then(e=>Eo(e)),GL=(e,r={})=>jt("/api/overleaf/session",{session:e,host:r.host}),SSn=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>Eo(e)),CSn=(e={})=>jt("/api/overleaf/session/import",{host:e.host}),zSn=(e,r,t={})=>jt(`/api/projects/${e}/file/overleaf/live`,{path:r,sessionId:t.sessionId,retry:t.retry}),ESn=(e,r,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${N_(t,new URLSearchParams({path:r}))}`,{method:"DELETE"}).then(n=>Eo(n)),NSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file/overleaf?${N_(t,new URLSearchParams({path:r}))}`,n),ASn=(e,r,t)=>jt(`/api/projects/${e}/file/overleaf`,{path:r,project:t.project,sessionId:t.sessionId}),TSn=(e,r,t={})=>va(`/api/projects/${e}/file/overleaf?${N_(t,new URLSearchParams({path:r}))}`,{method:"DELETE"}).then(n=>Eo(n)),RSn=(e,r,t={})=>jt(`/api/projects/${e}/file/overleaf/sync`,{path:r,sessionId:t.sessionId,resolve:t.resolve}),MSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file/overleaf/status?${N_(t,new URLSearchParams({path:r}))}`,n),OSn=(e,r,t={})=>`/api/projects/${e}/file/overleaf/upload?${N_(t,new URLSearchParams({path:r}))}`,$Sn=(e,r={},t)=>{const n=N_(r).toString();return $t(`/api/projects/${e}/code-tree${n?`?${n}`:""}`,t)},DSn=(e,r)=>$t(`/api/chat/sessions/${e}/worktree`,r),xy=(e,r,t)=>`https://github.com/${e}/${r}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,LSn=e=>$t("/api/settings/hf",e),ISn=e=>jt("/api/settings/hf",{token:e}),PSn=e=>$t("/api/settings/tinker",e),BSn=e=>jt("/api/settings/tinker",{key:e}),FSn=e=>$t("/api/update",e),HSn=()=>jt("/api/update/apply"),qSn=()=>jt("/api/update/restart"),USn=e=>jt("/api/update/auto",{enabled:e}),GSn=(e=!1)=>jt("/api/update/install-cli",{force:e}),WSn=e=>$t("/api/settings/k8s",e),KSn=e=>jt("/api/settings/k8s",e),VSn=e=>$t("/api/settings/modal",e),QSn=(e,r)=>jt("/api/settings/modal",{tokenId:e,tokenSecret:r}),XSn=e=>$t("/api/settings/env",e).then(r=>r.vars),WL=(e,r)=>jt("/api/settings/env",{key:e,value:r}).then(t=>t.vars),YSn=e=>va(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)).then(r=>r.vars),ZSn=e=>$t("/api/settings/data-dir",e),JSn=e=>jt("/api/settings/data-dir/validate",{path:e}),e6n=e=>jt("/api/settings/data-dir/move",{path:e}),t6n=e=>$t("/api/settings/ssh",e),r6n=e=>jt("/api/settings/ssh",e),n6n=e=>jt("/api/settings/ssh/default",{host:e}),s6n=(e,r)=>jt("/api/settings/ssh/preflight",{host:e,container:r}),o6n=e=>$t("/api/settings/ssh/config",e),a6n=(e,r)=>PL("/api/settings/ssh/config",{content:e,previousContent:r}),i6n=(e,r)=>$t(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,r),c6n=e=>$t("/_orx/runtime",e),l6n=e=>$t("/api/remote/sessions",e).then(r=>r.sessions),u6n=(e,r)=>jt("/api/remote/sessions",{host:e,uiPreferences:r}),_6n=e=>jt("/_orx/install",e),f6n=()=>jt("/_orx/reconnect"),KL=()=>jt("/_orx/disconnect"),d6n=()=>jt("/_orx/start-host"),VL=()=>$t("/_orx/stop-host"),QL=e=>jt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),h6n=e=>$t("/api/settings/slurm",e),p6n=e=>jt("/api/settings/slurm",e),m6n=e=>$t("/api/settings/ray",e),g6n=e=>jt("/api/settings/ray",e),v6n=e=>jt("/api/settings/ray/preflight",{address:e??null}),b6n=(e,r)=>$t(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,r),y6n=e=>jt("/api/settings/compute/default",e),x6n=e=>$t("/api/settings/local",e),w6n=e=>$t("/api/settings/openresearch",e),k6n=(e,r)=>$t(`/api/projects/${e}/files`,r),j6n=(e,r)=>va(`/api/projects/${e}/files?path=${encodeURIComponent(r)}`,{method:"DELETE"}).then(t=>Eo(t)),S6n=(e,r,t)=>Yc(`/api/projects/${e}/files`,{path:r,...t}),Wf=(e,r)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(r)}`,XL=512e3,C6n=(e,r)=>{const t=new Uint8Array(e);if(t.includes(0))return{content:"",binary:!0,truncated:r};try{return{content:new TextDecoder("utf-8",{fatal:!0}).decode(t,{stream:r}),binary:!1,truncated:r}}catch{return{content:"",binary:!0,truncated:r}}},z6n=(e,r,t)=>fetch(Wf(e,r),{signal:t,headers:{Range:`bytes=0-${XL-1}`}}).then(n=>{var o;if(n.status===404)return null;if(n.status===416&&n.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!n.ok)throw new Error(`HTTP ${n.status}`);const s=Number((o=n.headers.get("content-range"))==null?void 0:o.split("/").pop());return n.arrayBuffer().then(a=>C6n(a,Number.isFinite(s)&&s>a.byteLength))}),E6n=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",N6n=(e,r,t)=>fetch(Wf(e,r),{signal:t,method:"HEAD"}).then(n=>{if(n.status===404)return null;if(!n.ok)throw new Error(`HTTP ${n.status}`);const s=n.headers.get("x-openresearch-presentation");return{size:Number(n.headers.get("content-length"))||0,presentation:E6n(s)?s:"download"}}),A6n=e=>$t("/api/settings/profile",e),T6n=e=>$t("/api/settings/lit-sources",e),R6n=e=>jt("/api/settings/lit-sources",e),M6n=e=>$t("/api/settings/projects",e),YL=(e,r)=>jt("/api/settings/projects",{githubForNewProjects:e,...r===void 0?{}:{githubDefaultPromptSeen:r}}),O6n=(e,r)=>$t(`/api/projects/${e}/git`,r),$6n=e=>jt(`/api/projects/${e}/git/init`),D6n=e=>jt(`/api/projects/${e}/github`),L6n=e=>jt(`/api/projects/${e}/github/disable`),I6n=e=>$t("/api/settings/telemetry",e),P6n=e=>jt("/api/settings/telemetry",{enabled:e}),e_=e=>{jt("/api/telemetry/event",e).catch(()=>{})},B6n=(e,r)=>va("/api/telemetry/locale",{method:"POST",signal:r,headers:{"content-type":"application/json"},body:JSON.stringify({locale:e})}).then(t=>Eo(t));function $1(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??f3(e.id);const r=(s=e.displayName)==null?void 0:s.split(" · ").slice(1).join(" · ").replace(/ \(local\)$/,""),t=r==="OpenAI-compatible server"||r==="Custom endpoint"||r==="Custom Endpoint"?qj():r,n=f3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${n} · ${t}`:n}const yb="default";function wy(e,r){var a,i,c;const t=e==null?void 0:e.models.find(u=>u.id===r),n=(t==null?void 0:t.reasoningLevels)??((a=e==null?void 0:e.options)==null?void 0:a.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,o=s&&n.some(u=>u.id===s)?s:n.some(u=>u.id===yb)?yb:((i=e==null?void 0:e.options)==null?void 0:i.defaultReasoningLevel)??((c=n[0])==null?void 0:c.id)??null;return{choices:n,defaultId:o}}const _3="default";function ZL(e,r){var n;if((e==null?void 0:e.id)!=="codex")return[];const t=(n=e.models.find(s=>s.id===r))==null?void 0:n.serviceTiers;return t!=null&&t.length?[{id:_3,label:v0r(),description:c0r()},...t]:[]}function xb(e,r,t){var o;if(!e)return t??null;if(e.id!=="codex"||((o=e.models.find(a=>a.id===r))==null?void 0:o.serviceTiers)===void 0)return null;const s=ZL(e,r);return s.length===0?_3:t!=null&&s.some(a=>a.id===t)?t:_3}function JL(e,r,t){if(!e)return t;const{choices:n,defaultId:s}=wy(e,r);return n.length===0?yb:t&&n.some(o=>o.id===t)?t:s}const F6n=e=>$t("/api/harnesses/setup/commands",e),eI=(e=!1,r=!1,t,n)=>{const s=new URLSearchParams;e&&s.set("refresh","1"),r&&s.set("retry","1"),n&&s.set("harness",n);const o=s.size>0?`?${s.toString()}`:"";return $t(`/api/harnesses${o}`,t).then(a=>a.harnesses)},H6n=(e,r,t)=>{const n=new URLSearchParams({...r?{harness:r}:{},...t?{project:t}:{}});return $t(`/api/skills${n.size?`?${n}`:""}`,e)},q6n=(e,r,t,n)=>$t(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...r?{project:r}:{},...n?{harness:n}:{}})}`}`,t).then(s=>s.content),U6n=e=>$t("/api/latex-templates",e).then(r=>r.templates),G6n=e=>jt("/api/latex-templates",e).then(r=>r.template),W6n=e=>va(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)),K6n=e=>$t("/api/user-skills",e),V6n=e=>jt("/api/user-skills",e).then(r=>r.skill),Q6n=e=>va(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r));function f3(e){const r=(e.split("/").pop()??e).replace(/^~/,"").replace(/^claude-/,""),t=[],n=[];for(const s of r.split("-"))/^\d+(\.\d+)?$/.test(s)?n.push(s):(n.length&&t.push(n.splice(0).join(".")),t.push(s==="gpt"?"GPT":s.charAt(0).toUpperCase()+s.slice(1)));return n.length&&t.push(n.join(".")),t.join(" ")}const X6n=(e,r)=>$t(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,r).then(t=>t.sessions),Y6n=e=>$t("/api/chat/native-sessions",e).then(r=>r.chats),Z6n=(e,r)=>jt("/api/chat/native-sessions/import",{projectId:e,harness:r.harness,nativeId:r.nativeId,title:r.title}).then(t=>t.session),J6n=e=>$t("/api/chat/sessions?scope=all",e).then(r=>r.sessions),eCn=(e,r,t)=>{const n=new URLSearchParams({scope:"sidebar"});return e!=="all"&&n.set("archived",String(e==="archived")),r&&(n.set("beforeUpdatedAt",String(r.updatedAt)),n.set("beforeId",r.id)),$t(`/api/chat/sessions?${n}`,t)},tCn=(e,r,t={})=>jt("/api/chat/sessions",{projectId:e,harness:r,...t}).then(n=>n.session),rCn=e=>$t(`/api/chat/sessions/${e}`).then(r=>r.session),d3=e=>va(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(r=>Eo(r).then(t=>(by(e),t))),nCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{archived:r}).then(t=>t.session),sCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{title:r}).then(t=>t.session),oCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{planMode:r}).then(t=>t.session),aCn=e=>jt(`/api/chat/sessions/${e}/side`,{}).then(r=>r.session),iCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{goal:r}).then(t=>t.session),cCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{autonomy:r}).then(t=>t.session),lCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{permissionMode:r}).then(t=>t.session),uCn=(e,r)=>$t(`/api/chat/sessions/${e}/messages`,r).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),_Cn=(e,r)=>va(`/api/chat/sessions/${e}/queue/${encodeURIComponent(r)}`,{method:"DELETE"}).then(t=>Eo(t)),fCn=(e,r)=>jt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(r)}`),dCn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,h3=(e,r,t={},n,s,o,a)=>jt(`/api/chat/sessions/${e}/message`,{text:r,clientTurnId:o,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:n,annotations:s,mode:a}),hCn=e=>jt(`/api/chat/sessions/${e}/compact`,{}),pCn=(e,r)=>jt(`/api/chat/sessions/${e}/shell`,{command:r}),mCn=(e,r,t,n={})=>jt(`/api/chat/sessions/${e}/turns/${r}/recover`,{action:t,...n}),gCn=(e,r,t)=>jt(`/api/chat/sessions/${e}/fork`,{messageId:r,text:t}),vCn=(e,r)=>jt(`/api/chat/sessions/${e}/branch`,{leafId:r}),bCn=e=>jt(`/api/chat/sessions/${e}/interrupt`),yCn=(e,r)=>jt(`/api/chat/sessions/${e}/respond`,r);function Uc(e){const r=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(C(),{numeric:"always",style:"narrow"});if(r<60)return t.format(-r,"second");const n=Math.floor(r/60);if(n<60)return t.format(-n,"minute");const s=Math.floor(n/60);return s<24?t.format(-s,"hour"):t.format(-Math.floor(s/24),"day")}function dg(e){const r=Math.max(0,Math.floor(e/1e3));if(r<60)return znt({value:fr(r)});const t=Math.floor(r/60);if(t<60)return gnt({value:fr(t)});const n=Math.floor(t/60);return n<24?int({hours:fr(n),minutes:fr(t%60)}):Yrt({days:fr(Math.floor(n/24)),hours:fr(n%24)})}function Xl(e){const r=["B","KB","MB","GB","TB"];let t=e,n=0;for(;t>=1024&&n$t("/api/local-models",e),kCn=e=>jt("/api/local-models/discover",e),jCn=e=>jt("/api/local-models",e),SCn=e=>jt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),CCn=e=>va(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)),jN=()=>({queryKey:Mt("getHfSettings"),queryFn:({signal:e})=>LSn(e),staleTime:3e5}),SN=()=>({queryKey:Mt("getTinkerSettings"),queryFn:({signal:e})=>PSn(e),staleTime:3e5}),CN=()=>({queryKey:Mt("getK8sSettings"),queryFn:({signal:e})=>WSn(e),staleTime:3e4}),zN=()=>({queryKey:Mt("getModalSettings"),queryFn:({signal:e})=>VSn(e),staleTime:3e5}),zCn=()=>({queryKey:Mt("getSlurmSettings"),queryFn:({signal:e})=>h6n(e),staleTime:3e5}),ECn=()=>({queryKey:Mt("getRaySettings"),queryFn:({signal:e})=>m6n(e),staleTime:3e5}),tI=e=>({queryKey:Mt("getComputeSettings",e??null),queryFn:({signal:r})=>b6n(e,r),staleTime:3e4}),NCn=()=>({queryKey:Mt("getLocalMachine"),queryFn:({signal:e})=>x6n(e),staleTime:3e5}),ACn=()=>({queryKey:Mt("getOpenResearchSettings"),queryFn:({signal:e})=>w6n(e),staleTime:3e4}),TCn=()=>({queryKey:Mt("getEnvVars"),queryFn:({signal:e})=>XSn(e),staleTime:3e5}),RCn=()=>({queryKey:Mt("getDataDir"),queryFn:({signal:e})=>ZSn(e),staleTime:3e5}),rI=()=>({queryKey:Mt("getSshSettings"),queryFn:({signal:e})=>t6n(e),staleTime:3e4}),MCn=()=>({queryKey:Mt("getSshConfig"),queryFn:({signal:e})=>o6n(e),staleTime:3e5}),EN=e=>({queryKey:Mt("getSshMasterStatus",e),queryFn:({signal:r})=>i6n(e,r),staleTime:5e3}),OCn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>c6n(e),staleTime:2e3}),$Cn=()=>({queryKey:Mt("listRemoteSessions"),queryFn:({signal:e})=>l6n(e),staleTime:3e4}),wb=()=>({queryKey:Mt("getUpdateStatus"),queryFn:({signal:e,client:r,queryKey:t})=>vp(r,t,()=>FSn(e)),staleTime:3e4}),DCn=()=>({queryKey:Mt("getProfile"),queryFn:({signal:e})=>A6n(e),staleTime:3e5}),LCn=()=>({queryKey:Mt("getLitSources"),queryFn:({signal:e})=>T6n(e),staleTime:3e5}),rS=()=>({queryKey:Mt("getProjectDefaults"),queryFn:({signal:e})=>M6n(e),staleTime:3e5}),ICn=e=>({queryKey:Mt("getProjectGitStatus",e),queryFn:({signal:r})=>O6n(e,r),staleTime:3e4}),PCn=()=>({queryKey:Mt("getTelemetry"),queryFn:({signal:e})=>I6n(e),staleTime:3e5}),nS=()=>({queryKey:Mt("getHarnessSetupCommands"),queryFn:({signal:e})=>F6n(e),staleTime:1/0}),su=()=>({queryKey:Mt("getHarnesses"),queryFn:({signal:e})=>eI(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var r;return(r=e.state.data)!=null&&r.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),BCn=(e,r)=>({queryKey:Mt("getSkills",e??null,r??null),queryFn:({signal:t})=>H6n(t,e,r),select:t=>t.skills,refetchInterval:t=>{var n;return(n=t.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5}),FCn=(e,r,t)=>({queryKey:Mt("getSkillContent",e,r??null,t??null),queryFn:({signal:n})=>q6n(e,r,n,t),staleTime:3e5}),HCn=()=>({queryKey:Mt("listLatexTemplates"),queryFn:({signal:e})=>U6n(e),refetchInterval:3e4,staleTime:3e5}),qCn=()=>({queryKey:Mt("listUserSkills"),queryFn:({signal:e})=>K6n(e),select:e=>e.skills,refetchInterval:e=>{var r;return(r=e.state.data)!=null&&r.importing?2e3:3e4},staleTime:3e5});async function Kf(e=!1,r=!1){return!e&&!r?Je.fetchQuery(su()):sS(e,r)}const UCn=e=>sS(!0,!1,e),nI=()=>sS(!1,!1);async function sS(e,r,t){const n=su();await Je.cancelQueries(n);const s=await eI(e,r,void 0,t);return Wr(n.queryKey)&&Je.setQueryData(n.queryKey,s),s}const GCn=()=>({queryKey:Mt("getLocalModels"),queryFn:({signal:e})=>wCn(e),staleTime:3e4}),WCn=e=>({queryKey:Mt("reportLocale",e),queryFn:({signal:r})=>B6n(e,r),staleTime:0,retry:3,retryDelay:1e3,refetchOnWindowFocus:!1}),D1=new Map;function KCn(e,r){let t=D1.get(e);return t||(t=new Set,D1.set(e,t)),t.add(r),()=>{t.delete(r),t.size===0&&D1.delete(e)}}function VCn(e){var r;(r=D1.get(e.runId))==null||r.forEach(t=>t(e))}const p3=new Set;function hg(e){return p3.add(e),()=>{p3.delete(e)}}function Ol(e){p3.forEach(r=>r(e))}const m3=new Set;function QCn(e){return m3.add(e),()=>{m3.delete(e)}}function $l(){m3.forEach(e=>e())}const g3=new Set;function XCn(e){return g3.add(e),()=>{g3.delete(e)}}const v3=new Set;function YCn(e){return v3.add(e),()=>{v3.delete(e)}}function ZCn(){v3.forEach(e=>e())}function NN(e){g3.forEach(r=>r(e))}const b3=new Set;function sI(e){return b3.add(e),()=>{b3.delete(e)}}function I2(e){b3.forEach(r=>r(e))}const y3=new Set;function JCn(e){return y3.add(e),()=>{y3.delete(e)}}function AN(e){y3.forEach(r=>r(e))}const x3=new Set;function e7n(e){return x3.add(e),()=>{x3.delete(e)}}function t7n(e){x3.forEach(r=>r(e))}let w3=!0;const k3=new Set;function r7n(e){return k3.add(e),()=>{k3.delete(e)}}function TN(){return w3}function RN(e){e!==w3&&(w3=e,k3.forEach(r=>r()))}const n7n=8e3,s7n=3e3;function o7n(e){const r=T.useRef(e);r.current=e,T.useEffect(()=>{let t=null,n=!1,s,o,a=!1;const i=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{n||(a=!0,s??(s=window.setTimeout(()=>RN(!1),n7n)),c.readyState===EventSource.CLOSED&&o===void 0&&(o=window.setTimeout(()=>{o=void 0,i()},s7n)))},c.onopen=()=>{var d,_;n||(window.clearTimeout(s),s=void 0,RN(!0),a&&(Ol({type:"reconnected"}),$l(),NN({harness:"*",authState:"unknown"}),(_=(d=r.current).onReconnect)==null||_.call(d)),a=!0)};const u=d=>{try{return JSON.parse(d.data)}catch{return null}};c.addEventListener("resync.required",()=>{var d,_;Ol({type:"reconnected"}),$l(),(_=(d=r.current).onReconnect)==null||_.call(d)}),c.addEventListener("run.updated",d=>{const _=u(d);_!=null&&_.run&&($l(),r.current.onRun(_.run))}),c.addEventListener("experiment.updated",d=>{var p,m;const _=u(d);_!=null&&_.experiment&&($l(),(m=(p=r.current).onExperiment)==null||m.call(p,_.experiment))}),c.addEventListener("project.updated",d=>{var p,m;const _=u(d);_!=null&&_.project&&($l(),(m=(p=r.current).onProject)==null||m.call(p,_.project))}),c.addEventListener("files.updated",d=>{var p,m;const _=u(d);_!=null&&_.projectId&&((m=(p=r.current).onArtifacts)==null||m.call(p,_.projectId))}),c.addEventListener("run.log",d=>{const _=u(d);_!=null&&_.runId&&(VCn(_),j3.onRunLog(_))}),c.addEventListener("chat.session",d=>{const _=u(d);_!=null&&_.session&&($l(),Ol({type:"session",session:_.session}))}),c.addEventListener("chat.session.deleted",d=>{const _=u(d);_!=null&&_.sessionId&&($l(),Ol({type:"sessionDeleted",sessionId:_.sessionId}))}),c.addEventListener("chat.message",d=>{const _=u(d);_!=null&&_.message&&($l(),Ol({type:"message",sessionId:_.sessionId,message:_.message}))}),c.addEventListener("chat.busy",d=>{const _=u(d);_!=null&&_.sessionId&&($l(),Ol({type:"busy",sessionId:_.sessionId,busy:_.busy}))}),c.addEventListener("chat.usage",d=>{const _=u(d);_!=null&&_.sessionId&&_.usage&&Ol({type:"usage",sessionId:_.sessionId,usage:_.usage})}),c.addEventListener("chat.queued",d=>{const _=u(d);_!=null&&_.sessionId&&Ol({type:"queued",sessionId:_.sessionId,items:_.items??[]})}),c.addEventListener("chat.branch",d=>{const _=u(d);_!=null&&_.sessionId&&Ol({type:"branch",sessionId:_.sessionId,activeLeafId:_.activeLeafId??null})}),c.addEventListener("harness.auth",d=>{const _=u(d);_!=null&&_.harness&&_.authState&&NN(_)}),c.addEventListener("harness.catalog",()=>ZCn()),c.addEventListener("datadir.move.progress",d=>{const _=u(d);_&&I2({type:"progress",..._})}),c.addEventListener("datadir.move.done",d=>{const _=u(d);_&&I2({type:"done",path:_.path,oldPathLeft:_.oldPathLeft})}),c.addEventListener("datadir.move.error",d=>{const _=u(d);_&&I2({type:"error",error:_.error})}),c.addEventListener("update.status",d=>{const _=u(d);_&&t7n(_)}),c.addEventListener("overleaf.live",d=>{const _=u(d);_!=null&&_.key&&_.status&&AN({type:"live",key:_.key,status:_.status})}),c.addEventListener("overleaf.pulled",d=>{const _=u(d);_!=null&&_.key&&Array.isArray(_.paths)&&AN({type:"pulled",key:_.key,paths:_.paths})})};return i(),()=>{n=!0,window.clearTimeout(s),window.clearTimeout(o),t==null||t.close()}},[])}const Km=new Set;function a7n(e){const r=T.useRef(e);r.current=e,T.useEffect(()=>{const t={onRun:n=>r.current.onRun(n),onRunLog:n=>{var s,o;return(o=(s=r.current).onRunLog)==null?void 0:o.call(s,n)},onReconnect:()=>{var n,s;return(s=(n=r.current).onReconnect)==null?void 0:s.call(n)}};return Km.add(t),()=>{Km.delete(t)}},[])}const j3={onRun:e=>Km.forEach(r=>r.onRun(e)),onRunLog:e=>Km.forEach(r=>{var t;return(t=r.onRunLog)==null?void 0:t.call(r,e)}),onReconnect:()=>Km.forEach(e=>{var r;return(r=e.onReconnect)==null?void 0:r.call(e)})},So=e=>({queryKey:Mt("listChatSessions",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,async()=>{const s=await X6n(e,r),o=t.getQueryData(n);return s.filter(a=>!Pc.has(a.id)).map(a=>{var i;return{...a,contextUsage:a.contextUsage??((i=o==null?void 0:o.find(c=>c.id===a.id))==null?void 0:i.contextUsage)}})},i0),staleTime:3e4}),oI=()=>({queryKey:Mt("listNativeChats"),queryFn:({signal:e})=>Y6n(e),staleTime:0}),i7n=()=>({queryKey:Mt("listAllChatSessions"),queryFn:async({signal:e})=>(await J6n(e)).filter(r=>!Pc.has(r.id)),staleTime:0}),Fc=e=>({queryKey:Mt("getChatMessages",e),queryFn:async({signal:r,client:t,queryKey:n})=>{var d;const s=t.getQueryData(n),o=await vp(t,n,()=>uCn(e,r),(_,p,m)=>{if(!p)return _;const k=new Set([...m].filter(w=>w.startsWith("message:")).map(w=>w.slice(8)));return{messages:i0(_.messages,p.messages,k,!1),queued:m.has("queued")?p.queued:_.queued,activeLeafId:m.has("branch")||k.size?p.activeLeafId:_.activeLeafId}});r.throwIfAborted();const a=t.getQueryData(n),c=s!==void 0&&o.messages.some(_=>_.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===_.id)))?[]:(a==null?void 0:a.messages.filter(_=>_.id.startsWith("local-")))??[],u=c.some(_=>_.id===(a==null?void 0:a.activeLeafId));return{...o,messages:[...o.messages,...c.filter(_=>!o.messages.some(p=>p.id===_.id))],activeLeafId:a&&(u||!((d=a.activeLeafId)!=null&&d.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:o.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"});async function c7n(e,r,t){const n=new Map,s=hg(o=>{(o.type==="busy"||o.type==="usage")&&n.set(o.sessionId,{...n.get(o.sessionId),...o.type==="busy"?{busy:o.busy}:{contextUsage:o.usage}})});try{const o=await eCn(e,r,t);return t.throwIfAborted(),{...o,sessions:o.sessions.map(a=>({...a,...n.get(a.id)}))}}finally{s()}}const Lf="local-",aI="bash";function MN(e,r){const t=e.findIndex(n=>n.id===r.id);if(t>=0){const n=e.slice();return n[t]=r,n}return r.role!=="user"?[...e,r]:[...e.filter(n=>!n.id.startsWith(Lf)),r]}function l7n(e,r){switch(r.type){case"upsertMessage":{const t=e.messagesBySession[r.sessionId]??[],n=t.some(i=>i.id===r.message.id),s=e.activeLeafBySession[r.sessionId]??null,o=r.message.role==="user"&&s!==null&&s.startsWith(Lf),a=r.message.parentId!=null&&r.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:MN(t,r.message)},activeLeafBySession:n&&!o&&!a?e.activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:r.message.id}}}case"localError":{const t=e.messagesBySession[r.sessionId]??[],n={id:`${Lf}senderr-${Date.now()}`,role:"assistant",parts:[{id:"p0",type:"tool",tool:"error",state:{status:"error",error:r.text}}],createdAt:Date.now(),parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:[...t,n]},activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:n.id}}}case"localShell":{const t=e.messagesBySession[r.sessionId]??[],n=t.find(o=>o.id===r.id),s={id:r.id,role:"user",parts:[{id:"p0",type:"tool",tool:aI,state:{status:r.error===void 0?"running":"error",input:{command:r.command},error:r.error}}],createdAt:(n==null?void 0:n.createdAt)??Date.now(),parentId:n?n.parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:n?MN(t,s):[...t,s]},activeLeafBySession:n?e.activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:s.id}}}case"activeLeaf":return{...e,activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:r.leafId}};case"optimisticUser":{const t=e.messagesBySession[r.sessionId]??[],n=r.text?[{id:"p0",type:"text",text:r.text}]:[];r.attachments.forEach((o,a)=>n.push({id:`img${a}`,type:"image",text:o.url,name:o.name})),r.annotations.forEach((o,a)=>n.push({id:`annotation${a}`,type:"annotation",text:o.text}));const s={id:`${Lf}${Date.now()}`,role:"user",parts:n,createdAt:Date.now(),parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:[...t,s]},activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:s.id}}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[r.sessionId]:r.items}}}}let iI=0;function cI(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}Je.getQueryCache().subscribe(e=>{cI(e)&&iI++});const u7n=e=>Je.getQueryCache().subscribe(r=>{cI(r)&&e()}),_7n=()=>iI;function f7n(e,r){const t=Je.getQueryData(So(e).queryKey)??[],n=new Set(t.filter(a=>a.busy).map(a=>a.id)),s={messagesBySession:{},queuedBySession:{},activeLeafBySession:{},busySessions:n},o=new Set(n);r&&o.add(r);for(const a of o){const i=Je.getQueryData(Fc(a).queryKey);i&&(s.messagesBySession[a]=i.messages,s.queuedBySession[a]=i.queued,s.activeLeafBySession[a]=i.activeLeafId)}return s}function lI(e,r,t=!1){if(r.type==="busy"){yi(Je,So(e).queryKey,r.sessionId),Je.setQueryData(So(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===r.sessionId?{...u,busy:r.busy}:u));return}const n=Fc(r.sessionId);if(Pc.has(r.sessionId))return;yi(Je,n.queryKey,r.type==="upsertMessage"?`message:${r.message.id}`:r.type==="setQueued"?"queued":r.type==="activeLeaf"?"branch":"local");const s=Je.getQueryData(n.queryKey);if(t&&!s)return;const o={messagesBySession:s?{[r.sessionId]:s.messages}:{},queuedBySession:s?{[r.sessionId]:s.queued}:{},activeLeafBySession:s?{[r.sessionId]:s.activeLeafId}:{},busySessions:new Set},a=l7n(o,r),i={messages:a.messagesBySession[r.sessionId]??[],queued:a.queuedBySession[r.sessionId]??[],activeLeafId:a.activeLeafBySession[r.sessionId]??null};Je.setQueryData(n.queryKey,i)}function d7n(e,r){const t=!!r&&!Pc.has(r??""),n=dt({...Fc(r??""),enabled:t,subscribed:t}),s=T.useSyncExternalStore(u7n,_7n),o=T.useMemo(()=>f7n(e,r),[e,r,s,n.data]),a=Si()[1],i=T.useCallback(c=>{Wr(["workspace",a])&&lI(e,c)},[e,a]);return[o,i,n]}const Vf=()=>({queryKey:Mt("listProjects"),queryFn:({signal:e,client:r,queryKey:t})=>vp(r,t,()=>Ujn(e),i0),staleTime:3e4}),ON=()=>({queryKey:Mt("listProjectActivity"),queryFn:({signal:e})=>Gjn(e),staleTime:3e4}),f0=()=>({queryKey:Mt("getUiState"),queryFn:({signal:e})=>Wjn(e),staleTime:3e5}),oS=e=>({queryKey:Mt("getProjectUiState",e),queryFn:({signal:r})=>Kjn(e,r),staleTime:3e5}),Vm=(e="")=>({queryKey:Mt("getProjectPathStatus",e),queryFn:({signal:r})=>Zjn(e,r),staleTime:3e4}),uI=e=>({queryKey:Mt("searchPapers",e),queryFn:({signal:r})=>rSn(e,r),staleTime:3e5}),h7n=()=>({queryKey:Mt("githubAccount"),queryFn:({signal:e})=>nSn(e),staleTime:3e5}),p7n=e=>({queryKey:Mt("githubProjectRepoPreview",e),queryFn:({signal:r})=>sSn(e,r),staleTime:3e4}),$N=(e,r)=>({queryKey:Mt("repoAccess",e,r),queryFn:({signal:t})=>oSn(e,r,t),staleTime:3e4}),S3=e=>({queryKey:Mt("resolvePaper",e),queryFn:({signal:r})=>aSn(e,r),staleTime:36e5}),m7n=(e,r,t,n)=>({queryKey:Mt("getProjectStarterPrompts",e,r,t,n),queryFn:({signal:s})=>lSn(e,r,t,n,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),kb=e=>({queryKey:Mt("listExperiments",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,()=>uSn(e,r),i0),staleTime:3e4}),d_=e=>({queryKey:Mt("listRuns",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,()=>fSn(e,r),i0),staleTime:3e4});function Bv(e,r){if(!e)return;const t=e.find(n=>n.id===r.id);return t&&t.updatedAt>r.updatedAt?e:t?e.map(n=>n.id===r.id?r:n):[...e,r]}function DN(){const e=Si();return o7n({onRun(r){var n;if(!Wr(e))return;const t=(n=Je.getQueryData(d_(r.projectId).queryKey))==null?void 0:n.find(s=>s.id===r.id);yi(Je,d_(r.projectId).queryKey,r.id),Je.setQueryData(d_(r.projectId).queryKey,s=>Bv(s,r)),(t==null?void 0:t.commitSha)!==r.commitSha&&($a(["getRunDiff"],e,s=>s.queryKey[3]===r.id),$a(["getExperimentDiff"],e,s=>s.queryKey[3]===r.experimentId)),j3.onRun(r)},onExperiment(r){Wr(e)&&(yi(Je,kb(r.projectId).queryKey,r.id),Je.setQueryData(kb(r.projectId).queryKey,t=>Bv(t,r)),$a(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===r.projectId),$a(["getExperimentDiff"],e,t=>t.queryKey[3]===r.id),$a(["getRunDiff"],e,t=>{var n;return((n=Je.getQueryData(d_(r.projectId).queryKey))==null?void 0:n.some(s=>s.experimentId===r.id&&s.id===t.queryKey[3]))??!1}))},onProject(r){Wr(e)&&(yi(Je,Vf().queryKey,r.id),Je.setQueryData(Vf().queryKey,t=>Bv(t,r)))},onArtifacts(r){Wr(e)&&($a(Mj,e,t=>t.queryKey[3]===r),$a(["resolvedFile"],e,t=>t.queryKey[3]===r&&t.queryKey[5]==="artifacts"))},onReconnect(){Wr(e)&&($a(vX,e),j3.onReconnect())}}),T.useEffect(()=>{let r,t;const n=()=>{t??(t=setTimeout(()=>{t=void 0,$a(["listSidebarChatSessions"],e)},100))},o=QCn(()=>{r??(r=setTimeout(()=>{r=void 0,$a(["listProjectActivity"],e)},100))}),a=sI(_=>{_.type==="done"&&$a(["getDataDir"],e)}),i=hg(_=>{if(Wr(e)){if((_.type==="session"||_.type==="sessionDeleted")&&n(),_.type==="session"?yi(Je,So(_.session.projectId).queryKey,_.session.id):(_.type==="busy"||_.type==="usage")&&yi(Je,[...e,"listChatSessions"],_.sessionId),(_.type==="message"||_.type==="queued"||_.type==="branch")&&lI("",_.type==="message"?{type:"upsertMessage",sessionId:_.sessionId,message:_.message}:_.type==="queued"?{type:"setQueued",sessionId:_.sessionId,items:_.items}:{type:"activeLeaf",sessionId:_.sessionId,leafId:_.activeLeafId},!0),_.type==="session"&&!Pc.has(_.session.id))Je.setQueryData(So(_.session.projectId).queryKey,p=>{if(!p)return;const m=p.find(k=>k.id===_.session.id);return m?Bv(p,{..._.session,contextUsage:_.session.contextUsage??m.contextUsage}):[_.session,...p]});else if(_.type==="sessionDeleted")by(_.sessionId);else if(_.type==="busy"||_.type==="usage"){const p=m=>m.id!==_.sessionId?m:_.type==="busy"?{...m,busy:_.busy}:{...m,contextUsage:_.usage};Je.setQueriesData({queryKey:[...e,"listChatSessions"]},m=>m==null?void 0:m.map(p)),Je.setQueriesData({queryKey:[...e,"listSidebarChatSessions"]},m=>m&&{...m,pages:m.pages.map(k=>({...k,sessions:k.sessions.map(p)}))})}}}),c=XCn(({harness:_})=>{Wr(e)&&(_==="*"?Kf(!0):UCn(_)).catch(()=>{})}),u=YCn(()=>{Wr(e)&&Je.fetchQuery({...su(),staleTime:0}).catch(()=>{})}),d=e7n(_=>{Wr(e)&&(yi(Je,wb().queryKey),Je.setQueryData(wb().queryKey,_))});return()=>{clearTimeout(r),clearTimeout(t),o(),a(),i(),c(),u(),d()}},[e[1]]),null}const C3=new Set;function _I(e){if(e!==C()){cD(e,{reload:!1}),document.documentElement.lang=e;for(const r of C3)r()}}function g7n(e){return C3.add(e),()=>C3.delete(e)}function cu(){return T.useSyncExternalStore(g7n,C,C)}const ky="__ORX_MAC_TITLEBAR__"in window,fI="__ORX_WIN_TITLEBAR__"in window;let LN="system",IN="",P2=!1;const rh=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function PN(e){if(!rh)return null;rh.clearRect(0,0,1,1),rh.fillStyle="transparent",rh.fillStyle=e,rh.fillRect(0,0,1,1);const[r,t,n,s]=rh.getImageData(0,0,1,1).data;return s!==255?null:[r,t,n].map(o=>o.toString(16).padStart(2,"0")).join("")}function v7n(){const e=document.elementsFromPoint(window.innerWidth/2,0),r=e.findIndex(t=>t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY));for(const t of e.slice(Math.max(r,0))){const n=PN(getComputedStyle(t).backgroundColor);if(n)return n}return PN(getComputedStyle(document.documentElement).backgroundColor)}function z3(e){e&&(LN=e),!(!ky||P2)&&(P2=!0,setTimeout(()=>{var n;P2=!1;const r=v7n(),t=`titlebar:${LN}:${r}`;!r||t===IN||(IN=t,(n=window.ipc)==null||n.postMessage(t))},100))}ky&&(new MutationObserver(()=>z3()).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style","data-theme"]}),window.addEventListener("resize",()=>z3()));const b7n="a, button, input, select, textarea, label, summary, [role='button'], [role='tab'], [role='menuitem'], [role='option'], [role='switch'], [role='checkbox'], [contenteditable]:not([contenteditable='false']), [tabindex]:not([tabindex='-1'])",BN=ky?28:fI?32:0;if(BN){document.documentElement.classList.add(ky?"mac-titlebar":"win-titlebar");let e=!1;window.addEventListener("mousedown",r=>{var t;e=!1,!(r.button!==0||r.defaultPrevented||r.clientY>=BN)&&(r.target instanceof Element&&r.target.closest(b7n)||(r.detail===2?(t=window.ipc)==null||t.postMessage("titlebar:zoom"):e=!0))}),window.addEventListener("mousemove",r=>{var t;!e||r.buttons!==1||(e=!1,(t=window.ipc)==null||t.postMessage("titlebar:drag"))}),window.addEventListener("mouseup",()=>{e=!1})}const dI="orx:theme";function y7n(){try{const e=localStorage.getItem(dI);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Qf=y7n();const E3=new Set;function x7n(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function aS(){document.documentElement.dataset.theme=x7n(Qf),z3(Qf)}function hI(e){Qf=e;try{localStorage.setItem(dI,e)}catch{}aS();for(const r of E3)r()}function w7n(){return Qf}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Qf==="system"&&aS()});aS();function k7n(e){return E3.add(e),()=>E3.delete(e)}function pI(){return[T.useSyncExternalStore(k7n,()=>Qf,()=>Qf),hI]}const j7n=(e,r)=>{const t=new Array(e.length+r.length);for(let n=0;n({classGroupId:e,validator:r}),mI=(e=new Map,r=null,t)=>({nextPart:e,validators:r,classGroupId:t}),jb="-",FN=[],C7n="arbitrary..",z7n=e=>{const r=N7n(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return E7n(a);const i=a.split(jb),c=i[0]===""&&i.length>1?1:0;return gI(i,c,r)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=n[a],u=t[a];return c?u?j7n(u,c):c:u||FN}return t[a]||FN}}},gI=(e,r,t)=>{if(e.length-r===0)return t.classGroupId;const s=e[r],o=t.nextPart.get(s);if(o){const u=gI(e,r+1,o);if(u)return u}const a=t.validators;if(a===null)return;const i=r===0?e.join(jb):e.slice(r).join(jb),c=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),t=r.indexOf(":"),n=r.slice(0,t);return n?C7n+n:void 0})(),N7n=e=>{const{theme:r,classGroups:t}=e;return A7n(t,r)},A7n=(e,r)=>{const t=mI();for(const n in e){const s=e[n];iS(s,t,n,r)}return t},iS=(e,r,t,n)=>{const s=e.length;for(let o=0;o{if(typeof e=="string"){R7n(e,r,t);return}if(typeof e=="function"){M7n(e,r,t,n);return}O7n(e,r,t,n)},R7n=(e,r,t)=>{const n=e===""?r:vI(r,e);n.classGroupId=t},M7n=(e,r,t,n)=>{if($7n(e)){iS(e(n),r,t,n);return}r.validators===null&&(r.validators=[]),r.validators.push(S7n(t,e))},O7n=(e,r,t,n)=>{const s=Object.entries(e),o=s.length;for(let a=0;a{let t=e;const n=r.split(jb),s=n.length;for(let o=0;o"isThemeGetter"in e&&e.isThemeGetter===!0,D7n=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=Object.create(null),n=Object.create(null);const s=(o,a)=>{t[o]=a,r++,r>e&&(r=0,n=t,t=Object.create(null))};return{get(o){let a=t[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return s(o,a),a},set(o,a){o in t?t[o]=a:s(o,a)}}},N3="!",HN=":",L7n=[],qN=(e,r,t,n,s)=>({modifiers:e,hasImportantModifier:r,baseClassName:t,maybePostfixModifierPosition:n,isExternal:s}),I7n=e=>{const{prefix:r,experimentalParseClassName:t}=e;let n=s=>{const o=[];let a=0,i=0,c=0,u;const d=s.length;for(let w=0;wc?u-c:void 0;return qN(o,m,p,k)};if(r){const s=r+HN,o=n;n=a=>a.startsWith(s)?o(a.slice(s.length)):qN(L7n,!1,a,void 0,!0)}if(t){const s=n;n=o=>t({className:o,parseClassName:s})}return n},P7n=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((t,n)=>{r.set(t,1e6+n)}),t=>{const n=[];let s=[];for(let o=0;o0&&(s.sort(),n.push(...s),s=[]),n.push(a)):s.push(a)}return s.length>0&&(s.sort(),n.push(...s)),n}},B7n=e=>({cache:D7n(e.cacheSize),parseClassName:I7n(e),sortModifiers:P7n(e),postfixLookupClassGroupIds:F7n(e),...z7n(e)}),F7n=e=>{const r=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let n=0;n{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:o,postfixLookupClassGroupIds:a}=r,i=[],c=e.trim().split(H7n);let u="";for(let d=c.length-1;d>=0;d-=1){const _=c[d],{isExternal:p,modifiers:m,hasImportantModifier:k,baseClassName:w,maybePostfixModifierPosition:v}=t(_);if(p){u=_+(u.length>0?" "+u:u);continue}let b=!!v,x;if(b){const A=w.substring(0,v);x=n(A);const N=x&&a[x]?n(w):void 0;N&&N!==x&&(x=N,b=!1)}else x=n(w);if(!x){if(!b){u=_+(u.length>0?" "+u:u);continue}if(x=n(w),!x){u=_+(u.length>0?" "+u:u);continue}b=!1}const y=m.length===0?"":m.length===1?m[0]:o(m).join(":"),S=k?y+N3:y,z=S+x;if(i.indexOf(z)>-1)continue;i.push(z);const E=s(x,b);for(let A=0;A0?" "+u:u)}return u},U7n=(...e)=>{let r=0,t,n,s="";for(;r{if(typeof e=="string")return e;let r,t="";for(let n=0;n{let t,n,s,o;const a=c=>{const u=r.reduce((d,_)=>_(d),e());return t=B7n(u),n=t.cache.get,s=t.cache.set,o=i,i(c)},i=c=>{const u=n(c);if(u)return u;const d=q7n(c,t);return s(c,d),d};return o=a,(...c)=>o(U7n(...c))},G7n=[],Os=e=>{const r=t=>t[e]||G7n;return r.isThemeGetter=!0,r},yI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,W7n=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,K7n=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V7n=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Q7n=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,X7n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y7n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gu=e=>W7n.test(e),Sr=e=>!!e&&!Number.isNaN(Number(e)),kc=e=>!!e&&Number.isInteger(Number(e)),B2=e=>e.endsWith("%")&&Sr(e.slice(0,-1)),Dl=e=>K7n.test(e),wI=()=>!0,Z7n=e=>V7n.test(e)&&!Q7n.test(e),cS=()=>!1,J7n=e=>X7n.test(e),ezn=e=>Y7n.test(e),tzn=e=>!xt(e)&&!kt(e),rzn=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),nzn=e=>A_(e,SI,cS),xt=e=>yI.test(e),af=e=>A_(e,CI,Z7n),GN=e=>A_(e,_zn,Sr),szn=e=>A_(e,EI,wI),ozn=e=>A_(e,zI,cS),WN=e=>A_(e,kI,cS),azn=e=>A_(e,jI,ezn),Fv=e=>A_(e,NI,J7n),kt=e=>xI.test(e),xm=e=>dd(e,CI),izn=e=>dd(e,zI),KN=e=>dd(e,kI),czn=e=>dd(e,SI),lzn=e=>dd(e,jI),Hv=e=>dd(e,NI,!0),uzn=e=>dd(e,EI,!0),A_=(e,r,t)=>{const n=yI.exec(e);return n?n[1]?r(n[1]):t(n[2]):!1},dd=(e,r,t=!1)=>{const n=xI.exec(e);return n?n[1]?r(n[1]):t:!1},kI=e=>e==="position"||e==="percentage",jI=e=>e==="image"||e==="url",SI=e=>e==="length"||e==="size"||e==="bg-size",CI=e=>e==="length",_zn=e=>e==="number",zI=e=>e==="family-name",EI=e=>e==="number"||e==="weight",NI=e=>e==="shadow",VN=()=>{const e=Os("color"),r=Os("font"),t=Os("text"),n=Os("font-weight"),s=Os("tracking"),o=Os("leading"),a=Os("breakpoint"),i=Os("container"),c=Os("spacing"),u=Os("radius"),d=Os("shadow"),_=Os("inset-shadow"),p=Os("text-shadow"),m=Os("drop-shadow"),k=Os("blur"),w=Os("perspective"),v=Os("aspect"),b=Os("ease"),x=Os("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...S(),kt,xt],E=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],N=()=>[kt,xt,c],M=()=>[Gu,"full","auto",...N()],$=()=>[kc,"none","subgrid",kt,xt],D=()=>["auto",{span:["full",kc,kt,xt]},kc,kt,xt],I=()=>[kc,"auto",kt,xt],G=()=>["auto","min","max","fr",kt,xt],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...N()],J=()=>[Gu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],ee=()=>[Gu,"screen","full","dvw","lvw","svw","min","max","fit",...N()],P=()=>[Gu,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],L=()=>[e,kt,xt],F=()=>[...S(),KN,WN,{position:[kt,xt]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",czn,nzn,{size:[kt,xt]}],oe=()=>[B2,xm,af],ie=()=>["","none","full",u,kt,xt],ce=()=>["",Sr,xm,af],re=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Sr,B2,KN,WN],le=()=>["","none",k,kt,xt],me=()=>["none",Sr,kt,xt],be=()=>["none",Sr,kt,xt],Se=()=>[Sr,kt,xt],Be=()=>[Gu,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Dl],breakpoint:[Dl],color:[wI],container:[Dl],"drop-shadow":[Dl],ease:["in","out","in-out"],font:[tzn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Dl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Dl],shadow:[Dl],spacing:["px",Sr],text:[Dl],"text-shadow":[Dl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gu,xt,kt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",kt,xt]}],"container-named":[rzn],columns:[{columns:[Sr,xt,kt,i]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:z()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[kc,"auto",kt,xt]}],basis:[{basis:[Gu,"full","auto",i,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Sr,Gu,"auto","initial","none",xt]}],grow:[{grow:["",Sr,kt,xt]}],shrink:[{shrink:["",Sr,kt,xt]}],order:[{order:[kc,"first","last","none",kt,xt]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...ee()]}],"min-inline-size":[{"min-inline":["auto",...ee()]}],"max-inline-size":[{"max-inline":["none",...ee()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[i,"screen",...J()]}],"min-w":[{"min-w":[i,"screen","none",...J()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",t,xm,af]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,uzn,szn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",B2,xt]}],"font-family":[{font:[izn,ozn,r]}],"font-features":[{"font-features":[xt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,kt,xt]}],"line-clamp":[{"line-clamp":[Sr,"none",kt,GN]}],leading:[{leading:[o,...N()]}],"list-image":[{"list-image":["none",kt,xt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",kt,xt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Sr,"from-font","auto",kt,af]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Sr,"auto",kt,xt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"tab-size":[{tab:[kc,kt,xt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",kt,xt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",kt,xt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},kc,kt,xt],radial:["",kt,xt],conic:[kc,kt,xt]},lzn,azn]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Sr,kt,xt]}],"outline-w":[{outline:["",Sr,xm,af]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",d,Hv,Fv]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",_,Hv,Fv]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Sr,af]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,Hv,Fv]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Sr,kt,xt]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Sr]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[kt,xt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Sr]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",kt,xt]}],filter:[{filter:["","none",kt,xt]}],blur:[{blur:le()}],brightness:[{brightness:[Sr,kt,xt]}],contrast:[{contrast:[Sr,kt,xt]}],"drop-shadow":[{"drop-shadow":["","none",m,Hv,Fv]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Sr,kt,xt]}],"hue-rotate":[{"hue-rotate":[Sr,kt,xt]}],invert:[{invert:["",Sr,kt,xt]}],saturate:[{saturate:[Sr,kt,xt]}],sepia:[{sepia:["",Sr,kt,xt]}],"backdrop-filter":[{"backdrop-filter":["","none",kt,xt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Sr,kt,xt]}],"backdrop-contrast":[{"backdrop-contrast":[Sr,kt,xt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Sr,kt,xt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Sr,kt,xt]}],"backdrop-invert":[{"backdrop-invert":["",Sr,kt,xt]}],"backdrop-opacity":[{"backdrop-opacity":[Sr,kt,xt]}],"backdrop-saturate":[{"backdrop-saturate":[Sr,kt,xt]}],"backdrop-sepia":[{"backdrop-sepia":["",Sr,kt,xt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",kt,xt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Sr,"initial",kt,xt]}],ease:[{ease:["linear","initial",b,kt,xt]}],delay:[{delay:[Sr,kt,xt]}],animate:[{animate:["none",x,kt,xt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,kt,xt]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[kt,xt,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],zoom:[{zoom:[kc,kt,xt]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",kt,xt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",kt,xt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Sr,xm,af,GN]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fzn=(e,{cacheSize:r,prefix:t,experimentalParseClassName:n,extend:s={},override:o={}})=>(_h(e,"cacheSize",r),_h(e,"prefix",t),_h(e,"experimentalParseClassName",n),qv(e.theme,o.theme),qv(e.classGroups,o.classGroups),qv(e.conflictingClassGroups,o.conflictingClassGroups),qv(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),_h(e,"postfixLookupClassGroups",o.postfixLookupClassGroups),_h(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Uv(e.theme,s.theme),Uv(e.classGroups,s.classGroups),Uv(e.conflictingClassGroups,s.conflictingClassGroups),Uv(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),A3(e,s,"postfixLookupClassGroups"),A3(e,s,"orderSensitiveModifiers"),e),_h=(e,r,t)=>{t!==void 0&&(e[r]=t)},qv=(e,r)=>{if(r)for(const t in r)_h(e,t,r[t])},Uv=(e,r)=>{if(r)for(const t in r)A3(e,r,t)},A3=(e,r,t)=>{const n=r[t];n!==void 0&&(e[t]=e[t]?e[t].concat(n):n)},dzn=(e,...r)=>typeof e=="function"?UN(VN,e,...r):UN(()=>fzn(VN(),e),...r),hzn=dzn({extend:{theme:{text:["menu"]}}});function Ls(...e){return hzn(...e)}const pzn={default:"border-transparent bg-surface text-subtext",success:"border-accent-green bg-accent-green-subtle text-accent-green",error:"border-accent-red bg-accent-red-subtle text-accent-red",warning:"border-accent-amber bg-accent-amber-subtle text-accent-amber"};function Zt({variant:e="default",size:r="default",className:t,...n}){return f.jsx("span",{className:Ls("badge inline-flex items-center rounded-full border py-px font-sans",r==="small"?"px-1.5 text-xs font-normal":"px-2 text-sm font-medium",pzn[e],t),...n})}const mzn=["btn inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap border font-medium","transition-[background,border-color,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),gzn={default:"border-border bg-background text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight",primary:"border-primary bg-primary text-background [&:hover:not(:disabled)]:border-primary-hover [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:border-primary-active [&:active:not(:disabled)]:bg-primary-active",ghost:"border-transparent bg-transparent text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-muted",danger:"border-border bg-background text-accent-red [&:hover:not(:disabled)]:bg-danger-hover [&:active:not(:disabled)]:bg-danger-active",warning:"border-accent-amber bg-background text-accent-amber [&:hover:not(:disabled)]:bg-accent-amber-subtle [&:active:not(:disabled)]:bg-highlight"},vzn={default:"h-8 rounded-md px-3.5 text-sm",small:"h-7 rounded-sm px-2.5 text-sm",large:"h-14 rounded-lg px-7 text-xl"};function AI(e,r,t,n){return Ls(mzn,gzn[e],vzn[r],t&&"active",n)}function Oe({active:e=!1,variant:r="default",size:t="default",className:n,...s}){return f.jsx("button",{className:AI(r,t,e,n),...s})}function Xf({active:e=!1,variant:r="default",size:t="default",className:n,...s}){return f.jsx("a",{className:AI(r,t,e,n),...s})}const bzn=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),yzn={default:"text-subtext [&:hover:not(:disabled)]:bg-surface [&:hover:not(:disabled)]:text-text [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-primary",primary:"bg-primary text-background [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:bg-primary-active",stop:"bg-surface text-text [&:hover:not(:disabled)]:bg-stop-hover [&:active:not(:disabled)]:bg-highlight"},xzn={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function TI(e,r,t,n,s){return Ls(bzn,yzn[e],xzn[r],n==="circle"&&"rounded-full",t&&"active",s)}const Rt=T.forwardRef(function({active:r=!1,shape:t="rounded",size:n="default",variant:s="default",className:o,...a},i){return f.jsx("button",{ref:i,className:TI(s,n,r,t,o),...a})});function yp({active:e=!1,shape:r="rounded",size:t="default",variant:n="default",className:s,...o}){return f.jsx("a",{className:TI(n,t,e,r,s),...o})}const wzn={default:"h-8 rounded-md border border-border bg-background px-2.5 py-1.5 focus:border-text",inline:"h-8 rounded-none border-x-0 border-t-0 border-b border-transparent bg-transparent px-0 py-0 focus:border-text"};function Nn({variant:e="default",className:r,...t}){return f.jsx("input",{className:Ls("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",wzn[e],r),...t})}function _r({active:e=!1,danger:r=!1,size:t="default",className:n,...s}){return f.jsx("button",{className:Ls("model-item flex w-full items-center justify-between gap-2 rounded-sm px-2 text-start transition-[background,color] duration-120 ease-standard hover:bg-surface focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-45 [&_.model-id]:block [&_.model-id]:text-xs [&_.model-id]:text-muted",t==="compact"?"min-h-6 py-0.5 text-menu":"min-h-8 py-1.5 text-sm",e&&"bg-surface",r&&"text-accent-red hover:text-accent-red",n),...s})}function Nt({className:e,...r}){return f.jsx("span",{className:Ls("spinner h-[13px] w-[13px] shrink-0 animate-[spin_0.8s_linear_infinite] rounded-full border-2 border-border border-t-primary",e),...r})}function Gn({className:e,...r}){return f.jsx("div",{className:Ls("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...r})}const kzn={success:"text-accent-green",danger:"text-accent-red",info:"text-accent-teal",warning:"text-accent-amber",caution:"text-accent-orange",accent:"text-accent-purple",neutral:"text-muted"};function Eh({tone:e="neutral",live:r=!1,className:t,children:n,...s}){return f.jsxs("span",{className:Ls("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:Ls("h-[7px] w-[7px] shrink-0 rounded-full bg-current",kzn[e],r&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),n]})}const jzn=["relative h-5.5 w-9.5 flex-none rounded-full border border-border bg-panel","transition-[background,border-color] duration-120 ease-standard","[&_span]:absolute [&_span]:start-[3px] [&_span]:top-[3px] [&_span]:h-3.5 [&_span]:w-3.5","[&_span]:rounded-full [&_span]:bg-muted [&_span]:transition-[translate,background] [&_span]:duration-120 [&_span]:ease-standard","hover:border-border-strong","disabled:cursor-default disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2"].join(" ");function RI(e,r){return Ls(jzn,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",r)}function lS({checked:e=!1,className:r,children:t,...n}){return f.jsx("button",{role:"switch","aria-checked":e,className:RI(e,r),...n,children:t??f.jsx("span",{})})}function Szn({checked:e=!1,className:r,...t}){return f.jsx("span",{className:RI(e,r),...t,children:f.jsx("span",{})})}var _o=S$();const Czn=n0(_o);function zzn(e){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",r.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const Ezn=e=>{switch(e){case"success":return Tzn;case"info":return Mzn;case"warning":return Rzn;case"error":return Ozn;default:return null}},Nzn=Array(12).fill(0),Azn=({visible:e,className:r})=>st.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":e},st.createElement("div",{className:"sonner-spinner"},Nzn.map((t,n)=>st.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),Tzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Rzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Mzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Ozn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),$zn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},st.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),st.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Dzn=()=>{const[e,r]=st.useState(document.hidden);return st.useEffect(()=>{const t=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let Lzn=1;const Izn=100,QN=e=>{var r;return typeof(e==null?void 0:e.id)=="number"||(e==null||(r=e.id)==null?void 0:r.length)>0?e.id:Lzn++};class Pzn{constructor(){this.subscribe=r=>(this.subscribers.push(r),this.getActiveToasts().forEach(t=>r(t)),()=>{const t=this.subscribers.indexOf(r);this.subscribers.splice(t,1)}),this.publish=r=>{this.subscribers.forEach(t=>t(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r],this.trimHistory()},this.trimHistory=()=>{let r=this.toasts.length-Izn;r<=0||(this.toasts=this.toasts.filter(t=>r>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),r--,!1):!0))},this.create=r=>{const{message:t,...n}=r,s=QN(r),o=this.pendingDismissals.get(s);o!==void 0&&(cancelAnimationFrame(o),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const a=this.dismissedToasts.has(s),i=r.dismissible===void 0?!0:r.dismissible;return a&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(u=>u.id!==s)),(a?void 0:this.toasts.find(u=>u.id===s))?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...r,id:s,title:t}),{...u,...r,id:s,dismissible:i,title:t}):u):this.addToast({title:t,...n,dismissible:i,id:s}),s},this.dismiss=r=>{if(r==null)return this.getActiveToasts().forEach(n=>{this.dismissedToasts.add(n.id),this.subscribers.forEach(s=>s({id:n.id,dismiss:!0}))}),r;this.dismissedToasts.add(r);const t=this.pendingDismissals.get(r);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(r,requestAnimationFrame(()=>{this.pendingDismissals.delete(r),this.subscribers.forEach(n=>n({id:r,dismiss:!0}))})),r},this.message=(r,t)=>this.create({...t,message:r,type:void 0}),this.error=(r,t)=>this.create({...t,message:r,type:"error"}),this.success=(r,t)=>this.create({...t,type:"success",message:r}),this.info=(r,t)=>this.create({...t,type:"info",message:r}),this.warning=(r,t)=>this.create({...t,type:"warning",message:r}),this.loading=(r,t)=>this.create({...t,type:"loading",message:r}),this.promise=(r,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:r,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(r instanceof Function?r():r);let o=n!==void 0,a;const i=s.then(async u=>{if(a=["resolve",u],st.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(Fzn(u)&&!u.ok){o=!1;const _=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"error",description:p,...k})}else if(u instanceof Error){o=!1;const _=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"error",description:p,...k})}else if(t.success!==void 0){o=!1;const _=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"success",description:p,...k})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){o=!1;const d=typeof t.error=="function"?await t.error(u):t.error,_=typeof t.description=="function"?await t.description(u):t.description,m=typeof d=="object"&&!st.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:_,...m})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((u,d)=>i.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(r,t)=>{const n=QN(t);return this.create({...t,jsx:r(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const ha=new Pzn,Bzn=(e,r)=>ha.message(e,r),Fzn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Hzn=Bzn,qzn=()=>ha.toasts,Uzn=()=>ha.getActiveToasts(),Gzn=Object.assign(Hzn,{success:ha.success,info:ha.info,warning:ha.warning,error:ha.error,custom:ha.custom,message:ha.message,promise:ha.promise,dismiss:ha.dismiss,loading:ha.loading},{getHistory:qzn,getToasts:Uzn});zzn("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Gv(e){return e.label!==void 0}const Wzn=3,Kzn="24px",Vzn="16px",XN=4e3,Qzn=356,Xzn=14,Yzn=45,Zzn=200;function jc(...e){return e.filter(Boolean).join(" ")}function Jzn(e){const[r,t]=e.split("-"),n=[];return r&&n.push(r),t&&n.push(t),n}const e8n=e=>{var r,t,n,s,o,a,i,c,u;const{invert:d,toast:_,unstyled:p,interacting:m,setHeights:k,visibleToasts:w,heights:v,index:b,toasts:x,expanded:y,removeToast:S,defaultRichColors:z,closeButton:E,style:A,cancelButtonStyle:N,actionButtonStyle:M,className:$="",descriptionClassName:D="",duration:I,position:G,gap:H,expandByDefault:Q,classNames:K,icons:J,closeButtonAriaLabel:ee="Close toast"}=e,[P,L]=st.useState(null),[F,q]=st.useState(null),[U,oe]=st.useState(!1),[ie,ce]=st.useState(!1),[re,W]=st.useState(!1),[ae,le]=st.useState(!1),[me,be]=st.useState(!1),[Se,Be]=st.useState(0),[Xe,Me]=st.useState(0),Fe=st.useRef(_.duration||I||XN),pt=st.useRef(null),Ct=st.useRef(null),Vt=b===0,Ut=b+1<=w,Gt=_.type,De=Gt??"default",ct=_.dismissible!==!1,lt=_.className||"",xe=_.descriptionClassName||"",Ie=st.useMemo(()=>v.findIndex(ut=>ut.toastId===_.id)||0,[v,_.id]),Ye=st.useMemo(()=>{var ut;return(ut=_.closeButton)!=null?ut:E},[_.closeButton,E]),Ae=st.useMemo(()=>_.duration||I||XN,[_.duration,I]),Ve=st.useRef(0),Ze=st.useRef(0),at=st.useRef(0),At=st.useRef(null),[Pe,Jt]=G.split("-"),Tt=st.useMemo(()=>v.reduce((ut,dr,Cr)=>Cr>=Ie?ut:ut+dr.height,0),[v,Ie]),Zr=Dzn(),cr=st.useMemo(()=>{var ut;return(ut=e.swipeDirections)!=null?ut:Jzn(G)},[e.swipeDirections,G]),nr=_.invert||d,Wt=Gt==="loading";Ze.current=st.useMemo(()=>Ie*H+Tt,[Ie,Tt]),st.useEffect(()=>{Fe.current=Ae},[Ae]),st.useEffect(()=>{oe(!0)},[]),st.useEffect(()=>{const ut=Ct.current;if(ut){const dr=ut.getBoundingClientRect().height;return Me(dr),k(Cr=>[{toastId:_.id,height:dr,position:_.position},...Cr]),()=>k(Cr=>Cr.filter($r=>$r.toastId!==_.id))}},[k,_.id]),st.useLayoutEffect(()=>{if(!U)return;const ut=Ct.current,dr=ut.style.height;ut.style.height="auto";const Cr=ut.getBoundingClientRect().height;ut.style.height=dr,Me(Cr),k($r=>$r.find(Br=>Br.toastId===_.id)?$r.map(Br=>Br.toastId===_.id?{...Br,height:Cr}:Br):[{toastId:_.id,height:Cr,position:_.position},...$r])},[U,_.title,_.description,k,_.id,_.jsx,_.action,_.cancel]);const wt=st.useCallback(()=>{ce(!0),Be(Ze.current),k(ut=>ut.filter(dr=>dr.toastId!==_.id)),setTimeout(()=>{S(_)},Zzn)},[_,S,k,Ze]);st.useEffect(()=>{if(_.promise&&Gt==="loading"||_.duration===1/0||_.type==="loading")return;let ut;return y||m||Zr?(()=>{if(at.current{Fe.current!==1/0&&(Ve.current=new Date().getTime(),ut=setTimeout(()=>{_.onAutoClose==null||_.onAutoClose.call(_,_),wt()},Fe.current))})(),()=>clearTimeout(ut)},[y,m,_,Gt,Zr,wt]),st.useEffect(()=>{_.delete&&(wt(),_.onDismiss==null||_.onDismiss.call(_,_))},[wt,_.delete]);function ns(){var ut;if(J!=null&&J.loading){var dr;return st.createElement("div",{className:jc(K==null?void 0:K.loader,_==null||(dr=_.classNames)==null?void 0:dr.loader,"sonner-loader"),"data-visible":Gt==="loading"},J.loading)}return st.createElement(Azn,{className:jc(K==null?void 0:K.loader,_==null||(ut=_.classNames)==null?void 0:ut.loader),visible:Gt==="loading"})}const Hr=_.icon||(J==null?void 0:J[Gt])||Ezn(Gt);var en,gr;return st.createElement("li",{tabIndex:0,ref:Ct,className:jc($,lt,K==null?void 0:K.toast,_==null||(r=_.classNames)==null?void 0:r.toast,K==null?void 0:K[De],_==null||(t=_.classNames)==null?void 0:t[De]),"data-sonner-toast":"","data-rich-colors":(en=_.richColors)!=null?en:z,"data-styled":!(_.jsx||_.unstyled||p),"data-mounted":U,"data-promise":!!_.promise,"data-swiped":me,"data-removed":ie,"data-visible":Ut,"data-y-position":Pe,"data-x-position":Jt,"data-index":b,"data-front":Vt,"data-swiping":re,"data-dismissible":ct,"data-type":Gt,"data-invert":nr,"data-swipe-out":ae,"data-swipe-direction":F,"data-expanded":!!(y||Q&&U),"data-testid":_.testId,style:{"--index":b,"--toasts-before":b,"--z-index":x.length-b,"--offset":`${ie?Se:Ze.current}px`,"--initial-height":Q?"auto":`${Xe}px`,...A,..._.style},onDragEnd:()=>{W(!1),L(null),At.current=null},onPointerDown:ut=>{ut.button!==2&&(Wt||!ct||(pt.current=new Date,Be(Ze.current),ut.target.setPointerCapture(ut.pointerId),ut.target.tagName!=="BUTTON"&&(W(!0),At.current={x:ut.clientX,y:ut.clientY})))},onPointerUp:()=>{var ut,dr,Cr;if(ae||!ct)return;At.current=null;const $r=Number(((ut=Ct.current)==null?void 0:ut.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wn=Number(((dr=Ct.current)==null?void 0:dr.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Br=new Date().getTime()-((Cr=pt.current)==null?void 0:Cr.getTime()),yr=P==="x"?$r:wn,Dr=Math.abs(yr)/Br;if((P==="x"?cr.includes($r>0?"right":"left"):cr.includes(wn>0?"bottom":"top"))&&(Math.abs(yr)>=Yzn||Dr>.11)){Be(Ze.current),_.onDismiss==null||_.onDismiss.call(_,_),q(P==="x"?$r>0?"right":"left":wn>0?"down":"up"),wt(),le(!0);return}else{var Ht,tn;(Ht=Ct.current)==null||Ht.style.setProperty("--swipe-amount-x","0px"),(tn=Ct.current)==null||tn.style.setProperty("--swipe-amount-y","0px")}be(!1),W(!1),L(null)},onPointerMove:ut=>{var dr,Cr,$r;if(!At.current||!ct||((dr=window.getSelection())==null?void 0:dr.toString().length)>0)return;const Br=ut.clientY-At.current.y,yr=ut.clientX-At.current.x;!P&&(Math.abs(yr)>1||Math.abs(Br)>1)&&L(Math.abs(yr)>Math.abs(Br)?"x":"y");let Dr={x:0,y:0};const zt=Ht=>1/(1.5+Math.abs(Ht)/20);if(P==="y"){if(cr.includes("top")||cr.includes("bottom"))if(cr.includes("top")&&Br<0||cr.includes("bottom")&&Br>0)Dr.y=Br;else{const Ht=Br*zt(Br);Dr.y=Math.abs(Ht)0)Dr.x=yr;else{const Ht=yr*zt(yr);Dr.x=Math.abs(Ht)0||Math.abs(Dr.y)>0)&&be(!0),(Cr=Ct.current)==null||Cr.style.setProperty("--swipe-amount-x",`${Dr.x}px`),($r=Ct.current)==null||$r.style.setProperty("--swipe-amount-y",`${Dr.y}px`)}},Ye&&!_.jsx&&Gt!=="loading"?st.createElement("button",{"aria-label":ee,"data-disabled":Wt,"data-close-button":!0,onClick:Wt||!ct?()=>{}:()=>{wt(),_.onDismiss==null||_.onDismiss.call(_,_)},className:jc(K==null?void 0:K.closeButton,_==null||(n=_.classNames)==null?void 0:n.closeButton)},(gr=J==null?void 0:J.close)!=null?gr:$zn):null,(Gt||_.icon||_.promise)&&_.icon!==null&&((J==null?void 0:J[Gt])!==null||_.icon)?st.createElement("div",{"data-icon":"",className:jc(K==null?void 0:K.icon,_==null||(s=_.classNames)==null?void 0:s.icon)},Gt==="loading"?_.icon||ns():_.promise?ns():null,Gt!=="loading"?Hr:null):null,st.createElement("div",{"data-content":"",className:jc(K==null?void 0:K.content,_==null||(o=_.classNames)==null?void 0:o.content)},st.createElement("div",{"data-title":"",className:jc(K==null?void 0:K.title,_==null||(a=_.classNames)==null?void 0:a.title)},_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title),_.description?st.createElement("div",{"data-description":"",className:jc(D,xe,K==null?void 0:K.description,_==null||(i=_.classNames)==null?void 0:i.description)},typeof _.description=="function"?_.description():_.description):null),st.isValidElement(_.cancel)?_.cancel:_.cancel&&Gv(_.cancel)?st.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||N,onClick:ut=>{Gv(_.cancel)&&ct&&(_.cancel.onClick==null||_.cancel.onClick.call(_.cancel,ut),wt())},className:jc(K==null?void 0:K.cancelButton,_==null||(c=_.classNames)==null?void 0:c.cancelButton)},_.cancel.label):null,st.isValidElement(_.action)?_.action:_.action&&Gv(_.action)?st.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||M,onClick:ut=>{Gv(_.action)&&(_.action.onClick==null||_.action.onClick.call(_.action,ut),!ut.defaultPrevented&&wt())},className:jc(K==null?void 0:K.actionButton,_==null||(u=_.classNames)==null?void 0:u.actionButton)},_.action.label):null)};function YN(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function t8n(e,r){const t={};return[e,r].forEach((n,s)=>{const o=s===1,a=o?"--mobile-offset":"--offset",i=o?Vzn:Kzn;function c(u){["top","right","bottom","left"].forEach(d=>{t[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?t[`${a}-${u}`]=i:t[`${a}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):c(i)}),t}const r8n=st.forwardRef(function(r,t){const{id:n,invert:s,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:c,className:u,offset:d,mobileOffset:_,theme:p="light",richColors:m,duration:k,style:w,visibleToasts:v=Wzn,toastOptions:b,dir:x=YN(),gap:y=Xzn,icons:S,customAriaLabel:z,containerAriaLabel:E="Notifications"}=r,[A,N]=st.useState([]),M=st.useMemo(()=>n?A.filter(oe=>oe.toasterId===n):A.filter(oe=>!oe.toasterId),[A,n]),$=st.useMemo(()=>Array.from(new Set([o].concat(M.filter(oe=>oe.position).map(oe=>oe.position)))),[M,o]),[D,I]=st.useState([]),[G,H]=st.useState(!1),[Q,K]=st.useState(!1),[J,ee]=st.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),P=st.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=st.useRef(null),q=st.useRef(!1),U=st.useCallback(oe=>{N(ie=>{var ce;return(ce=ie.find(re=>re.id===oe.id))!=null&&ce.delete||ha.dismiss(oe.id),ie.filter(({id:re})=>re!==oe.id)})},[]);return st.useEffect(()=>ha.subscribe(oe=>{if(oe.dismiss){requestAnimationFrame(()=>{N(ie=>ie.map(ce=>ce.id===oe.id?{...ce,delete:!0}:ce))});return}setTimeout(()=>{Czn.flushSync(()=>{N(ie=>{const ce=ie.findIndex(re=>re.id===oe.id);return ce!==-1?[...ie.slice(0,ce),{...ie[ce],...oe},...ie.slice(ce+1)]:[oe,...ie]})})})}),[]),st.useEffect(()=>{if(p!=="system"){ee(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ee("dark"):ee("light")),typeof window>"u")return;const oe=window.matchMedia("(prefers-color-scheme: dark)");try{oe.addEventListener("change",({matches:ie})=>{ee(ie?"dark":"light")})}catch{oe.addListener(({matches:ce})=>{try{ee(ce?"dark":"light")}catch(re){console.error(re)}})}},[p]),st.useEffect(()=>{A.length<=1&&H(!1)},[A]),st.useEffect(()=>{const oe=ie=>{var ce;if(a.length>0&&a.every(ae=>ie[ae]||ie.code===ae)){var W;H(!0),(W=P.current)==null||W.focus()}ie.code==="Escape"&&(document.activeElement===P.current||(ce=P.current)!=null&&ce.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",oe),()=>document.removeEventListener("keydown",oe)},[a]),st.useEffect(()=>{if(P.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,q.current=!1)}},[P.current]),st.createElement("section",{ref:t,"aria-label":z??`${E} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},$.map((oe,ie)=>{var ce;const[re,W]=oe.split("-");return M.length?st.createElement("ol",{key:oe,dir:x==="auto"?YN():x,tabIndex:-1,ref:P,className:u,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":re,"data-x-position":W,style:{"--front-toast-height":`${((ce=D[0])==null?void 0:ce.height)||0}px`,"--width":`${Qzn}px`,"--gap":`${y}px`,...w,...t8n(d,_)},onBlur:ae=>{q.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(q.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||q.current||(q.current=!0,F.current=ae.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Q||H(!1)},onDragEnd:()=>H(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},M.filter(ae=>!ae.position&&ie===0||ae.position===oe).map((ae,le)=>{var me,be;return st.createElement(e8n,{key:ae.id,icons:S,index:le,toast:ae,defaultRichColors:m,duration:(me=b==null?void 0:b.duration)!=null?me:k,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(be=b==null?void 0:b.closeButton)!=null?be:c,interacting:Q,position:oe,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:U,toasts:M.filter(Se=>Se.position==ae.position),heights:D.filter(Se=>Se.position==ae.position),setHeights:I,expandByDefault:i,gap:y,expanded:G,swipeDirections:r.swipeDirections})})):null}))});function n8n(e){const[r]=pI();return f.jsx(r8n,{theme:r,...e})}function tr(e,r,t){Gzn[r](e,{duration:r==="warning"||r==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function d0({content:e,children:r,className:t,interactive:n=!1}){const s=T.useRef(null),o=T.useRef(null);function a(){const c=s.current,u=o.current;if(!c||!u)return;u.matches(":popover-open")||u.showPopover();const d=c.getBoundingClientRect(),_=u.getBoundingClientRect(),p=Math.max(8,Math.min(d.left+d.width/2-_.width/2,window.innerWidth-_.width-8));u.style.left=`${p}px`,u.style.top=`${Math.max(8,d.top-_.height-6)}px`}function i(){var u;const c=s.current;!(c!=null&&c.matches(":hover, :focus-visible"))&&!(c!=null&&c.querySelector(":focus-visible"))&&((u=o.current)==null||u.hidePopover())}return T.useEffect(()=>{const c=()=>{var u;return(u=o.current)==null?void 0:u.hidePopover()};return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[]),f.jsxs("span",{ref:s,className:Ls("group relative inline-flex cursor-help rounded-full outline-none focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2",t),tabIndex:n?void 0:0,role:n?void 0:"img","aria-label":n?void 0:e,onMouseEnter:a,onMouseLeave:i,onFocus:c=>{c.target.matches(":focus-visible")&&a()},onBlur:i,onKeyDown:c=>{var u;c.key==="Escape"&&((u=o.current)!=null&&u.matches(":popover-open"))&&(c.preventDefault(),c.stopPropagation(),o.current.hidePopover())},children:[r,f.jsx("span",{ref:o,popover:"manual",role:"tooltip",className:"pointer-events-none fixed inset-auto m-0 w-max max-w-64 whitespace-normal rounded-sm border-0 bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background shadow-control-subtle",children:e})]})}const s8n=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function xp(e,r,t="[data-initial-focus]"){const n=T.useRef(r);n.current=r,T.useEffect(()=>{const s=e.current;if(!s)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll(s8n)];(s.querySelector(t)??a()[0]??s).focus();const i=c=>{if(c.key==="Escape"){if(s.querySelector(":popover-open"))return;c.preventDefault(),c.stopPropagation(),n.current();return}if(c.key!=="Tab")return;const u=a(),d=u[0],_=u.at(-1);!d||!_?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===d?(c.preventDefault(),_.focus()):!c.shiftKey&&document.activeElement===_&&(c.preventDefault(),d.focus())};return document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("keydown",i,!0),o==null||o.focus()}},[e,t])}function MI({host:e,preview:r,currentClientAttached:t,stopping:n,onClose:s,onConfirm:o}){const a=T.useRef(null),i=Math.max(0,r.attachmentCount-(t?1:0)),c=[];return r.activeTurnCount>0&&c.push(r.activeTurnCount===1?ddr():qdr({count:fr(r.activeTurnCount)})),r.pendingPermissionCount>0&&c.push(r.pendingPermissionCount===1?zfr():w_r({count:fr(r.pendingPermissionCount)})),i>0&&c.push(i===1?Kfr():kdr({count:fr(i)})),r.queuedMessageCount>0&&c.push(r.queuedMessageCount===1?ndr():Mdr({count:fr(r.queuedMessageCount)})),r.activeRunCount>0&&c.push(r.activeRunCount===1?Lfr():Z_r({count:fr(r.activeRunCount)})),xp(a,s),_o.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:u=>{!n&&u.target===u.currentTarget&&s()},children:f.jsxs("div",{ref:a,className:"w-120 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-stop-dialog-title","aria-describedby":c.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[f.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:H_r({host:Ee(e)})}),c.length>0&&f.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[f.jsx("p",{className:"m-0 font-medium",children:gfr()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:c.map(u=>f.jsx("li",{children:u},u))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx(Oe,{disabled:n,onClick:s,children:Gf()}),f.jsx(Oe,{variant:"danger",disabled:n,onClick:o,children:n?Jdr():R_r()})]})]})}),document.body)}/** +Magazyn danych zostanie skopiowany do nowej lokalizacji i tam aktywowany. Trwające uruchomienia lub czaty uniemożliwią przeniesienie.`,vhn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?uhn(e):t==="fa"?_hn(e):t==="ar"?fhn(e):t==="es"?dhn(e):t==="hi"?hhn(e):t==="ko"?phn(e):t==="ja"?mhn(e):t==="pl"?ghn(e):lhn(e)}),bhn=()=>"Move data here",yhn=()=>"将数据移动到此处",xhn=()=>"انتقال داده به اینجا",whn=()=>"نقل البيانات إلى هنا",khn=()=>"Mover los datos aquí",jhn=()=>"डेटा यहाँ ले जाएं",Shn=()=>"여기로 데이터 이동",Chn=()=>"ここにデータを移動",zhn=()=>"Przenieś dane tutaj",Ehn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?yhn():t==="fa"?xhn():t==="ar"?whn():t==="es"?khn():t==="hi"?jhn():t==="ko"?Shn():t==="ja"?Chn():t==="pl"?zhn():bhn()}),Nhn=()=>"Moving…",Ahn=()=>"正在移动…",Thn=()=>"در حال جابه‌جایی…",Rhn=()=>"جارٍ النقل…",Mhn=()=>"Moviendo…",Ohn=()=>"स्थानांतरित हो रहा है…",$hn=()=>"이동 중…",Dhn=()=>"移動中…",Lhn=()=>"Przenoszenie…",Ihn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ahn():t==="fa"?Thn():t==="ar"?Rhn():t==="es"?Mhn():t==="hi"?Ohn():t==="ko"?$hn():t==="ja"?Dhn():t==="pl"?Lhn():Nhn()}),Phn=()=>"Preparing…",Bhn=()=>"正在准备…",Fhn=()=>"در حال آماده‌سازی…",Hhn=()=>"جارٍ التحضير…",qhn=()=>"Preparando…",Uhn=()=>"तैयार हो रहा है…",Ghn=()=>"준비 중…",Whn=()=>"準備中…",Khn=()=>"Przygotowywanie…",Vhn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Bhn():t==="fa"?Fhn():t==="ar"?Hhn():t==="es"?qhn():t==="hi"?Uhn():t==="ko"?Ghn():t==="ja"?Whn():t==="pl"?Khn():Phn()}),Qhn=()=>" (same disk, instant)",Xhn=()=>"(同一磁盘,可立即完成)",Yhn=()=>" (روی همان دیسک، فوری)",Zhn=()=>" (القرص نفسه، فوري)",Jhn=()=>" (mismo disco, instantáneo)",epn=()=>" (उसी डिस्क पर, तुरंत)",tpn=()=>" (같은 디스크, 즉시 이동)",rpn=()=>"(同じディスク、即時)",npn=()=>" (ten sam dysk, natychmiastowo)",spn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xhn():t==="fa"?Yhn():t==="ar"?Zhn():t==="es"?Jhn():t==="hi"?epn():t==="ko"?tpn():t==="ja"?rpn():t==="pl"?npn():Qhn()}),opn=()=>"default location",apn=()=>"默认位置",ipn=()=>"محل پیش‌فرض",cpn=()=>"الموقع الافتراضي",lpn=()=>"ubicación predeterminada",upn=()=>"डिफ़ॉल्ट स्थान",_pn=()=>"기본 위치",fpn=()=>"既定の場所",dpn=()=>"domyślna lokalizacja",hpn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?apn():t==="fa"?ipn():t==="ar"?cpn():t==="es"?lpn():t==="hi"?upn():t==="ko"?_pn():t==="ja"?fpn():t==="pl"?dpn():opn()}),ppn=()=>"ORX_DATA_DIR environment variable",mpn=()=>"ORX_DATA_DIR 环境变量",gpn=()=>"متغیر محیطی ORX_DATA_DIR",vpn=()=>"متغيّر البيئة ORX_DATA_DIR",bpn=()=>"variable de entorno ORX_DATA_DIR",ypn=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",xpn=()=>"ORX_DATA_DIR 환경 변수",wpn=()=>"ORX_DATA_DIR 環境変数",kpn=()=>"Zmienna środowiskowa ORX_DATA_DIR",jpn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mpn():t==="fa"?gpn():t==="ar"?vpn():t==="es"?bpn():t==="hi"?ypn():t==="ko"?xpn():t==="ja"?wpn():t==="pl"?kpn():ppn()}),Spn=()=>"your saved setting",Cpn=()=>"已保存的设置",zpn=()=>"تنظیم ذخیره‌شدهٔ شما",Epn=()=>"إعدادك المحفوظ",Npn=()=>"tu ajuste guardado",Apn=()=>"आपकी सेव की गई सेटिंग",Tpn=()=>"저장한 설정",Rpn=()=>"保存済みの設定",Mpn=()=>"zapisane ustawienie",Opn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cpn():t==="fa"?zpn():t==="ar"?Epn():t==="es"?Npn():t==="hi"?Apn():t==="ko"?Tpn():t==="ja"?Rpn():t==="pl"?Mpn():Spn()}),$pn=()=>"XDG_DATA_HOME",Dpn=()=>"XDG_DATA_HOME",Lpn=()=>"XDG_DATA_HOME",Ipn=()=>"XDG_DATA_HOME",Ppn=()=>"XDG_DATA_HOME",Bpn=()=>"XDG_DATA_HOME",Fpn=()=>"XDG_DATA_HOME",Hpn=()=>"XDG_DATA_HOME",qpn=()=>"XDG_DATA_HOME",Upn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dpn():t==="fa"?Lpn():t==="ar"?Ipn():t==="es"?Ppn():t==="hi"?Bpn():t==="ko"?Fpn():t==="ja"?Hpn():t==="pl"?qpn():$pn()}),Gpn=()=>"Verifying…",Wpn=()=>"正在验证…",Kpn=()=>"در حال بررسی…",Vpn=()=>"جارٍ التحقق…",Qpn=()=>"Verificando…",Xpn=()=>"सत्यापित हो रहा है…",Ypn=()=>"검증 중…",Zpn=()=>"検証中…",Jpn=()=>"Weryfikowanie…",emn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wpn():t==="fa"?Kpn():t==="ar"?Vpn():t==="es"?Qpn():t==="hi"?Xpn():t==="ko"?Ypn():t==="ja"?Zpn():t==="pl"?Jpn():Gpn()}),tmn=()=>"Loading…",rmn=()=>"正在加载…",nmn=()=>"در حال بارگیری…",smn=()=>"جارٍ التحميل…",omn=()=>"Cargando…",amn=()=>"लोड हो रहा है…",imn=()=>"불러오는 중…",cmn=()=>"読み込み中…",lmn=()=>"Wczytywanie…",AL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rmn():t==="fa"?nmn():t==="ar"?smn():t==="es"?omn():t==="hi"?amn():t==="ko"?imn():t==="ja"?cmn():t==="pl"?lmn():tmn()}),umn=()=>"This sub-agent is no longer available.",_mn=()=>"此子智能体已不可用。",fmn=()=>"این عامل فرعی دیگر در دسترس نیست.",dmn=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",hmn=()=>"Este subagente ya no está disponible.",pmn=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",mmn=()=>"이 하위 에이전트는 더 이상 사용할 수 없습니다.",gmn=()=>"このサブエージェントはもう利用できません。",vmn=()=>"Ten podagent nie jest już dostępny.",bmn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_mn():t==="fa"?fmn():t==="ar"?dmn():t==="es"?hmn():t==="hi"?pmn():t==="ko"?mmn():t==="ja"?gmn():t==="pl"?vmn():umn()}),ymn=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,xmn=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,wmn=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,kmn=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,jmn=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,Smn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,Cmn=e=>`${e==null?void 0:e.label} (미리보기; 더블 클릭 또는 Command/Control K 다음 Enter로 열린 상태 유지)`,zmn=e=>`${e==null?void 0:e.label}(プレビュー。ダブルクリック、または Command/Control K の後に Enter で開いたままにする)`,Emn=e=>`${e==null?void 0:e.label} (podgląd; kliknij dwukrotnie lub naciśnij Command/Control K, a następnie Enter, aby pozostawić otwarte)`,Nmn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?xmn(e):t==="fa"?wmn(e):t==="ar"?kmn(e):t==="es"?jmn(e):t==="hi"?Smn(e):t==="ko"?Cmn(e):t==="ja"?zmn(e):t==="pl"?Emn(e):ymn(e)}),Amn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,Tmn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,Rmn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,Mmn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,Omn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,$mn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,Dmn=e=>`${e==null?void 0:e.label} (더블 클릭 또는 ⌘/Ctrl+K Enter로 열린 상태 유지)`,Lmn=e=>`${e==null?void 0:e.label}(ダブルクリックまたは ⌘/Ctrl+K Enter で開いたままにする)`,Imn=e=>`${e==null?void 0:e.label} (kliknij dwukrotnie lub naciśnij ⌘/Ctrl+K, Enter, aby pozostawić otwarte)`,Pmn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Tmn(e):t==="fa"?Rmn(e):t==="ar"?Mmn(e):t==="es"?Omn(e):t==="hi"?$mn(e):t==="ko"?Dmn(e):t==="ja"?Lmn(e):t==="pl"?Imn(e):Amn(e)}),Bmn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",Fmn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",Hmn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",qmn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",Umn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",Gmn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",Wmn=()=>"또는 에이전트에게 LaTeX 템플릿 추가를 요청하세요.",Kmn=()=>"エージェントに LaTeX テンプレートの追加を依頼することもできます。",Vmn=()=>"Możesz też poprosić agenta o dodanie szablonu LaTeX.",Qmn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fmn():t==="fa"?Hmn():t==="ar"?qmn():t==="es"?Umn():t==="hi"?Gmn():t==="ko"?Wmn():t==="ja"?Kmn():t==="pl"?Vmn():Bmn()}),Xmn=()=>", a repo for training a mini-GPT from scratch.",Ymn=()=>",一个从零训练迷你 GPT 的仓库。",Zmn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",Jmn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",egn=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",tgn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",rgn=()=>", 작은 GPT를 처음부터 학습하는 저장소입니다.",ngn=()=>"という、小さな GPT をゼロから学習するリポジトリです。",sgn=()=>", repozytorium do trenowania mini-GPT od podstaw.",ogn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ymn():t==="fa"?Zmn():t==="ar"?Jmn():t==="es"?egn():t==="hi"?tgn():t==="ko"?rgn():t==="ja"?ngn():t==="pl"?sgn():Xmn()}),agn=()=>"Close",ign=()=>"关闭",cgn=()=>"بستن",lgn=()=>"إغلاق",ugn=()=>"Cerrar",_gn=()=>"बंद करें",fgn=()=>"닫기",dgn=()=>"閉じる",hgn=()=>"Zamknij",vb=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ign():t==="fa"?cgn():t==="ar"?lgn():t==="es"?ugn():t==="hi"?_gn():t==="ko"?fgn():t==="ja"?dgn():t==="pl"?hgn():agn()}),pgn=()=>"Create a new project",mgn=()=>"新建项目",ggn=()=>"ایجاد پروژهٔ جدید",vgn=()=>"إنشاء مشروع جديد",bgn=()=>"Crear un proyecto nuevo",ygn=()=>"नया प्रोजेक्ट बनाएं",xgn=()=>"새 프로젝트 만들기",wgn=()=>"新しいプロジェクトを作成",kgn=()=>"Utwórz nowy projekt",jgn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mgn():t==="fa"?ggn():t==="ar"?vgn():t==="es"?bgn():t==="hi"?ygn():t==="ko"?xgn():t==="ja"?wgn():t==="pl"?kgn():pgn()}),Sgn=()=>"Demo project",Cgn=()=>"演示项目",zgn=()=>"پروژهٔ نمایشی",Egn=()=>"مشروع توضيحي",Ngn=()=>"Proyecto de demostración",Agn=()=>"डेमो प्रोजेक्ट",Tgn=()=>"데모 프로젝트",Rgn=()=>"デモプロジェクト",Mgn=()=>"Projekt demonstracyjny",Ogn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cgn():t==="fa"?zgn():t==="ar"?Egn():t==="es"?Ngn():t==="hi"?Agn():t==="ko"?Tgn():t==="ja"?Rgn():t==="pl"?Mgn():Sgn()}),$gn=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",Dgn=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Lgn=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Ign=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",Pgn=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Bgn=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",Fgn=()=>"에이전트 대화, 실험, 실행, 결과물을 살펴보고 OpenResearch에서 프로젝트가 구성되는 방식을 확인하세요.",Hgn=()=>"エージェントの会話、実験、実行、成果物を見て、OpenResearch でプロジェクトがどのように進むか確認してください。",qgn=()=>"Przejrzyj rozmowy z agentem, eksperymenty, uruchomienia i artefakty, aby zobaczyć, jak powstaje projekt w OpenResearch.",Ugn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dgn():t==="fa"?Lgn():t==="ar"?Ign():t==="es"?Pgn():t==="hi"?Bgn():t==="ko"?Fgn():t==="ja"?Hgn():t==="pl"?qgn():$gn()}),Ggn=()=>"nanochat",Wgn=()=>"nanochat",Kgn=()=>"nanochat",Vgn=()=>"nanochat",Qgn=()=>"nanochat",Xgn=()=>"nanochat",Ygn=()=>"nanochat",Zgn=()=>"nanochat",Jgn=()=>"nanochat",e0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wgn():t==="fa"?Kgn():t==="ar"?Vgn():t==="es"?Qgn():t==="hi"?Xgn():t==="ko"?Ygn():t==="ja"?Zgn():t==="pl"?Jgn():Ggn()}),t0n=()=>"Try the demo experiment",r0n=()=>"试试演示实验",n0n=()=>"آزمایش نمایشی را امتحان کنید",s0n=()=>"جرّب التجربة التوضيحية",o0n=()=>"Probar el experimento de demostración",a0n=()=>"डेमो प्रयोग आज़माएं",i0n=()=>"데모 실험 체험",c0n=()=>"デモ実験を試す",l0n=()=>"Wypróbuj eksperyment demonstracyjny",u0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?r0n():t==="fa"?n0n():t==="ar"?s0n():t==="es"?o0n():t==="hi"?a0n():t==="ko"?i0n():t==="ja"?c0n():t==="pl"?l0n():t0n()}),_0n=()=>"Couldn’t save your progress. Try again.",f0n=()=>"无法保存进度。请重试。",d0n=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",h0n=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",p0n=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",m0n=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",g0n=()=>"진행 상황을 저장할 수 없습니다. 다시 시도하세요.",v0n=()=>"進捗を保存できませんでした。再試行してください。",b0n=()=>"Nie udało się zapisać postępu. Spróbuj ponownie.",y0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?f0n():t==="fa"?d0n():t==="ar"?h0n():t==="es"?p0n():t==="hi"?m0n():t==="ko"?g0n():t==="ja"?v0n():t==="pl"?b0n():_0n()}),x0n=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",w0n=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",k0n=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",j0n=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",S0n=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",C0n=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",z0n=()=>"OpenResearch의 작동 방식을 보여주는 데모 프로젝트입니다. 이 데모는 Andrej Karpathy의 다음 저장소를 사용합니다:",E0n=()=>"OpenResearch の動作を示すデモプロジェクトです。このデモでは Andrej Karpathy の次のリポジトリを使用しています:",N0n=()=>"To projekt demonstracyjny pokazujący działanie OpenResearch. Wykorzystuje projekt Andreja Karpathy’ego",A0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w0n():t==="fa"?k0n():t==="ar"?j0n():t==="es"?S0n():t==="hi"?C0n():t==="ko"?z0n():t==="ja"?E0n():t==="pl"?N0n():x0n()}),T0n=()=>"Welcome to OpenResearch",R0n=()=>"欢迎使用 OpenResearch",M0n=()=>"به OpenResearch خوش آمدید",O0n=()=>"مرحبًا بك في OpenResearch",$0n=()=>"Te damos la bienvenida a OpenResearch",D0n=()=>"OpenResearch में आपका स्वागत है",L0n=()=>"OpenResearch에 오신 것을 환영합니다",I0n=()=>"OpenResearch へようこそ",P0n=()=>"Witaj w OpenResearch",B0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?R0n():t==="fa"?M0n():t==="ar"?O0n():t==="es"?$0n():t==="hi"?D0n():t==="ko"?L0n():t==="ja"?I0n():t==="pl"?P0n():T0n()}),F0n=()=>"All experiments are archived. Turn on Show archived to view them.",H0n=()=>"所有实验均已归档。开启“显示已归档”即可查看。",q0n=()=>"همه آزمایش‌ها بایگانی شده‌اند. برای دیدنشان نمایش بایگانی‌شده‌ها را فعال کنید.",U0n=()=>"جميع التجارب مؤرشفة. فعّل إظهار المؤرشف لعرضها.",G0n=()=>"Todos los experimentos están archivados. Activa Mostrar archivados para verlos.",W0n=()=>"सभी प्रयोग संग्रहीत हैं। उन्हें देखने के लिए संग्रहीत दिखाएँ चालू करें।",K0n=()=>"모든 실험이 보관되었습니다. 보려면 보관된 실험 표시를 켜세요.",V0n=()=>"すべての実験がアーカイブされています。「アーカイブ済みを表示」を有効にして確認してください。",Q0n=()=>"Wszystkie eksperymenty są zarchiwizowane. Włącz „Pokaż zarchiwizowane”, aby je wyświetlić.",X0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?H0n():t==="fa"?q0n():t==="ar"?U0n():t==="es"?G0n():t==="hi"?W0n():t==="ko"?K0n():t==="ja"?V0n():t==="pl"?Q0n():F0n()}),Y0n=()=>"Archive ancestors",Z0n=()=>"归档祖先节点",J0n=()=>"بایگانی نیاکان",evn=()=>"أرشفة الأسلاف",tvn=()=>"Archivar antepasados",rvn=()=>"पूर्वजों को संग्रहीत करें",nvn=()=>"상위 실험 보관",svn=()=>"祖先の実験をアーカイブ",ovn=()=>"Archiwizuj nadrzędne eksperymenty",avn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Z0n():t==="fa"?J0n():t==="ar"?evn():t==="es"?tvn():t==="hi"?rvn():t==="ko"?nvn():t==="ja"?svn():t==="pl"?ovn():Y0n()}),ivn=()=>"Archive descendants",cvn=()=>"归档后代节点",lvn=()=>"بایگانی نوادگان",uvn=()=>"أرشفة الفروع التابعة",_vn=()=>"Archivar descendientes",fvn=()=>"वंशजों को संग्रहीत करें",dvn=()=>"하위 실험 보관",hvn=()=>"子孫の実験をアーカイブ",pvn=()=>"Archiwizuj podrzędne eksperymenty",mvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?cvn():t==="fa"?lvn():t==="ar"?uvn():t==="es"?_vn():t==="hi"?fvn():t==="ko"?dvn():t==="ja"?hvn():t==="pl"?pvn():ivn()}),gvn=()=>"Manage",vvn=()=>"管理",bvn=()=>"مدیریت",yvn=()=>"إدارة",xvn=()=>"Gestionar",wvn=()=>"प्रबंधित करें",kvn=()=>"관리",jvn=()=>"管理",Svn=()=>"Zarządzaj",Cvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?vvn():t==="fa"?bvn():t==="ar"?yvn():t==="es"?xvn():t==="hi"?wvn():t==="ko"?kvn():t==="ja"?jvn():t==="pl"?Svn():gvn()}),zvn=e=>`Manage ${e==null?void 0:e.name}`,Evn=e=>`管理 ${e==null?void 0:e.name}`,Nvn=e=>`مدیریت ${e==null?void 0:e.name}`,Avn=e=>`إدارة ${e==null?void 0:e.name}`,Tvn=e=>`Gestionar ${e==null?void 0:e.name}`,Rvn=e=>`${e==null?void 0:e.name} प्रबंधित करें`,Mvn=e=>`${e==null?void 0:e.name} 관리`,Ovn=e=>`${e==null?void 0:e.name} を管理`,$vn=e=>`Zarządzaj eksperymentem ${e==null?void 0:e.name}`,yN=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Evn(e):t==="fa"?Nvn(e):t==="ar"?Avn(e):t==="es"?Tvn(e):t==="hi"?Rvn(e):t==="ko"?Mvn(e):t==="ja"?Ovn(e):t==="pl"?$vn(e):zvn(e)}),Dvn=()=>"Archive this experiment",Lvn=()=>"归档此实验",Ivn=()=>"بایگانی این آزمایش",Pvn=()=>"أرشفة هذه التجربة",Bvn=()=>"Archivar este experimento",Fvn=()=>"इस प्रयोग को संग्रहीत करें",Hvn=()=>"이 실험 보관",qvn=()=>"この実験をアーカイブ",Uvn=()=>"Archiwizuj ten eksperyment",Gvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lvn():t==="fa"?Ivn():t==="ar"?Pvn():t==="es"?Bvn():t==="hi"?Fvn():t==="ko"?Hvn():t==="ja"?qvn():t==="pl"?Uvn():Dvn()}),Wvn=()=>"Archived",Kvn=()=>"已归档",Vvn=()=>"بایگانی‌شده",Qvn=()=>"مؤرشف",Xvn=()=>"Archivado",Yvn=()=>"संग्रहीत",Zvn=()=>"보관됨",Jvn=()=>"アーカイブ済み",e1n=()=>"Zarchiwizowane",TL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kvn():t==="fa"?Vvn():t==="ar"?Qvn():t==="es"?Xvn():t==="hi"?Yvn():t==="ko"?Zvn():t==="ja"?Jvn():t==="pl"?e1n():Wvn()}),t1n=e=>`${e==null?void 0:e.count} archived`,r1n=e=>`${e==null?void 0:e.count} 个已归档`,n1n=e=>`${e==null?void 0:e.count} بایگانی‌شده`,s1n=e=>`${e==null?void 0:e.count} مؤرشفة`,o1n=e=>`${e==null?void 0:e.count} archivados`,a1n=e=>`${e==null?void 0:e.count} संग्रहीत`,i1n=e=>`${e==null?void 0:e.count}개 보관됨`,c1n=e=>`${e==null?void 0:e.count} 件アーカイブ済み`,l1n=e=>`Zarchiwizowane: ${e==null?void 0:e.count}`,u1n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?r1n(e):t==="fa"?n1n(e):t==="ar"?s1n(e):t==="es"?o1n(e):t==="hi"?a1n(e):t==="ko"?i1n(e):t==="ja"?c1n(e):t==="pl"?l1n(e):t1n(e)}),_1n=()=>"Baseline",f1n=()=>"基线",d1n=()=>"مبنا",h1n=()=>"الأساس",p1n=()=>"Base",m1n=()=>"बेसलाइन",g1n=()=>"베이스라인",v1n=()=>"ベースライン",b1n=()=>"Wariant bazowy",y1n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?f1n():t==="fa"?d1n():t==="ar"?h1n():t==="es"?p1n():t==="hi"?m1n():t==="ko"?g1n():t==="ja"?v1n():t==="pl"?b1n():_1n()}),x1n=()=>"Experiment",w1n=()=>"实验",k1n=()=>"آزمایش",j1n=()=>"تجربة",S1n=()=>"Experimento",C1n=()=>"प्रयोग",z1n=()=>"실험",E1n=()=>"実験",N1n=()=>"Eksperyment",Fl=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w1n():t==="fa"?k1n():t==="ar"?j1n():t==="es"?S1n():t==="hi"?C1n():t==="ko"?z1n():t==="ja"?E1n():t==="pl"?N1n():x1n()}),A1n=e=>`${e==null?void 0:e.count} experiments`,T1n=e=>`${e==null?void 0:e.count} 个实验`,R1n=e=>`${e==null?void 0:e.count} آزمایش`,M1n=e=>`التجارب: ${e==null?void 0:e.count}`,O1n=e=>`${e==null?void 0:e.count} experimentos`,$1n=e=>`${e==null?void 0:e.count} प्रयोग`,D1n=e=>`실험 ${e==null?void 0:e.count}개`,L1n=e=>`${e==null?void 0:e.count} 件の実験`,I1n=e=>`Eksperymenty: ${e==null?void 0:e.count}`,P1n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T1n(e):t==="fa"?R1n(e):t==="ar"?M1n(e):t==="es"?O1n(e):t==="hi"?$1n(e):t==="ko"?D1n(e):t==="ja"?L1n(e):t==="pl"?I1n(e):A1n(e)}),B1n=()=>"hidden",F1n=()=>"已隐藏",H1n=()=>"پنهان",q1n=()=>"مخفية",U1n=()=>"ocultos",G1n=()=>"छिपे हुए",W1n=()=>"숨김",K1n=()=>"非表示",V1n=()=>"ukryte",Q1n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F1n():t==="fa"?H1n():t==="ar"?q1n():t==="es"?U1n():t==="hi"?G1n():t==="ko"?W1n():t==="ja"?K1n():t==="pl"?V1n():B1n()}),X1n=()=>"1 experiment",Y1n=()=>"1 个实验",Z1n=()=>"۱ آزمایش",J1n=()=>"تجربة واحدة",ebn=()=>"1 experimento",tbn=()=>"1 प्रयोग",rbn=()=>"실험 1개",nbn=()=>"1 件の実験",sbn=()=>"1 eksperyment",obn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y1n():t==="fa"?Z1n():t==="ar"?J1n():t==="es"?ebn():t==="hi"?tbn():t==="ko"?rbn():t==="ja"?nbn():t==="pl"?sbn():X1n()}),abn=()=>"Restore archived ancestors",ibn=()=>"恢复已归档的祖先节点",cbn=()=>"بازیابی نیاکان بایگانی‌شده",lbn=()=>"استعادة الأسلاف المؤرشفين",ubn=()=>"Restaurar antepasados archivados",_bn=()=>"संग्रहीत पूर्वजों को पुनर्स्थापित करें",fbn=()=>"보관된 상위 실험 복원",dbn=()=>"アーカイブ済みの祖先の実験を復元",hbn=()=>"Przywróć zarchiwizowane eksperymenty nadrzędne",pbn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ibn():t==="fa"?cbn():t==="ar"?lbn():t==="es"?ubn():t==="hi"?_bn():t==="ko"?fbn():t==="ja"?dbn():t==="pl"?hbn():abn()}),mbn=e=>`Restore ${e==null?void 0:e.count} archived experiments`,gbn=e=>`恢复 ${e==null?void 0:e.count} 个已归档实验`,vbn=e=>`بازیابی ${e==null?void 0:e.count} آزمایش بایگانی‌شده`,bbn=e=>`استعادة ${e==null?void 0:e.count} تجارب مؤرشفة`,ybn=e=>`Restaurar ${e==null?void 0:e.count} experimentos archivados`,xbn=e=>`${e==null?void 0:e.count} संग्रहीत प्रयोग पुनर्स्थापित करें`,wbn=e=>`보관된 실험 ${e==null?void 0:e.count}개 복원`,kbn=e=>`アーカイブ済みの実験を ${e==null?void 0:e.count} 件復元`,jbn=e=>`Przywróć zarchiwizowane eksperymenty (${e==null?void 0:e.count})`,Sbn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?gbn(e):t==="fa"?vbn(e):t==="ar"?bbn(e):t==="es"?ybn(e):t==="hi"?xbn(e):t==="ko"?wbn(e):t==="ja"?kbn(e):t==="pl"?jbn(e):mbn(e)}),Cbn=()=>"Restore descendants",zbn=()=>"恢复后代节点",Ebn=()=>"بازیابی نوادگان",Nbn=()=>"استعادة الفروع التابعة",Abn=()=>"Restaurar descendientes",Tbn=()=>"वंशजों को पुनर्स्थापित करें",Rbn=()=>"하위 실험 복원",Mbn=()=>"子孫の実験を復元",Obn=()=>"Przywróć eksperymenty podrzędne",$bn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zbn():t==="fa"?Ebn():t==="ar"?Nbn():t==="es"?Abn():t==="hi"?Tbn():t==="ko"?Rbn():t==="ja"?Mbn():t==="pl"?Obn():Cbn()}),Dbn=()=>"Restore this experiment",Lbn=()=>"恢复此实验",Ibn=()=>"بازیابی این آزمایش",Pbn=()=>"استعادة هذه التجربة",Bbn=()=>"Restaurar este experimento",Fbn=()=>"इस प्रयोग को पुनर्स्थापित करें",Hbn=()=>"이 실험 복원",qbn=()=>"この実験を復元",Ubn=()=>"Przywróć ten eksperyment",RL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lbn():t==="fa"?Ibn():t==="ar"?Pbn():t==="es"?Bbn():t==="hi"?Fbn():t==="ko"?Hbn():t==="ja"?qbn():t==="pl"?Ubn():Dbn()}),Gbn=()=>"Running",Wbn=()=>"运行中",Kbn=()=>"در حال اجرا",Vbn=()=>"قيد التشغيل",Qbn=()=>"En ejecución",Xbn=()=>"चल रहा है",Ybn=()=>"실행 중",Zbn=()=>"実行中",Jbn=()=>"W toku",eyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wbn():t==="fa"?Kbn():t==="ar"?Vbn():t==="es"?Qbn():t==="hi"?Xbn():t==="ko"?Ybn():t==="ja"?Zbn():t==="pl"?Jbn():Gbn()}),tyn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",ryn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",nyn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",syn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",oyn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",ayn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",iyn=()=>"이 작업에서 실험 생성을 요청하거나 전체 프로젝트로 전환하여 모든 실험을 확인하세요.",cyn=()=>"このタスクで実験の作成を依頼するか、プロジェクト全体に切り替えてすべての実験を確認してください。",lyn=()=>"Poproś o utworzenie eksperymentu w tym zadaniu albo przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty.",uyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ryn():t==="fa"?nyn():t==="ar"?syn():t==="es"?oyn():t==="hi"?ayn():t==="ko"?iyn():t==="ja"?cyn():t==="pl"?lyn():tyn()}),_yn=()=>"Ask the agent in chat to create and run your first experiment.",fyn=()=>"在聊天中让智能体创建并运行你的第一个实验。",dyn=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",hyn=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",pyn=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",myn=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",gyn=()=>"채팅에서 에이전트에게 첫 실험의 생성과 실행을 요청하세요.",vyn=()=>"チャットでエージェントに最初の実験の作成と実行を依頼してください。",byn=()=>"Poproś agenta na czacie o utworzenie i uruchomienie pierwszego eksperymentu.",yyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fyn():t==="fa"?dyn():t==="ar"?hyn():t==="es"?pyn():t==="hi"?myn():t==="ko"?gyn():t==="ja"?vyn():t==="pl"?byn():_yn()}),xyn=()=>"Code",wyn=()=>"代码",kyn=()=>"کد",jyn=()=>"الشيفرة",Syn=()=>"Código",Cyn=()=>"कोड",zyn=()=>"코드",Eyn=()=>"コード",Nyn=()=>"Kod",Ayn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wyn():t==="fa"?kyn():t==="ar"?jyn():t==="es"?Syn():t==="hi"?Cyn():t==="ko"?zyn():t==="ja"?Eyn():t==="pl"?Nyn():xyn()}),Tyn=()=>"Logs",Ryn=()=>"日志",Myn=()=>"گزارش‌ها",Oyn=()=>"السجلات",$yn=()=>"Logs",Dyn=()=>"लॉग",Lyn=()=>"로그",Iyn=()=>"ログ",Pyn=()=>"Logi",ML=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ryn():t==="fa"?Myn():t==="ar"?Oyn():t==="es"?$yn():t==="hi"?Dyn():t==="ko"?Lyn():t==="ja"?Iyn():t==="pl"?Pyn():Tyn()}),Byn=()=>"No experiments from the current task yet",Fyn=()=>"当前任务尚无实验",Hyn=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",qyn=()=>"لا توجد تجارب من المهمة الحالية بعد",Uyn=()=>"Aún no hay experimentos de la tarea actual",Gyn=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",Wyn=()=>"현재 작업에서 생성한 실험이 아직 없습니다",Kyn=()=>"現在のタスクの実験はまだありません",Vyn=()=>"Brak eksperymentów w bieżącym zadaniu",Qyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fyn():t==="fa"?Hyn():t==="ar"?qyn():t==="es"?Uyn():t==="hi"?Gyn():t==="ko"?Wyn():t==="ja"?Kyn():t==="pl"?Vyn():Byn()}),Xyn=()=>"No experiments yet",Yyn=()=>"尚无实验",Zyn=()=>"هنوز آزمایشی وجود ندارد",Jyn=()=>"لا توجد تجارب بعد",exn=()=>"Aún no hay experimentos",txn=()=>"अभी तक कोई प्रयोग नहीं",rxn=()=>"아직 실험이 없습니다",nxn=()=>"実験はまだありません",sxn=()=>"Brak eksperymentów",oxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yyn():t==="fa"?Zyn():t==="ar"?Jyn():t==="es"?exn():t==="hi"?txn():t==="ko"?rxn():t==="ja"?nxn():t==="pl"?sxn():Xyn()}),axn=()=>"no runs",ixn=()=>"无运行",cxn=()=>"بدون اجرا",lxn=()=>"لا عمليات تشغيل",uxn=()=>"sin ejecuciones",_xn=()=>"कोई रन नहीं",fxn=()=>"실행 없음",dxn=()=>"実行なし",hxn=()=>"brak uruchomień",pxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ixn():t==="fa"?cxn():t==="ar"?lxn():t==="es"?uxn():t==="hi"?_xn():t==="ko"?fxn():t==="ja"?dxn():t==="pl"?hxn():axn()}),mxn=()=>"Open logs",gxn=()=>"打开日志",vxn=()=>"باز کردن گزارش‌ها",bxn=()=>"فتح السجلات",yxn=()=>"Abrir logs",xxn=()=>"लॉग खोलें",wxn=()=>"로그 열기",kxn=()=>"ログを開く",jxn=()=>"Otwórz logi",Sxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gxn():t==="fa"?vxn():t==="ar"?bxn():t==="es"?yxn():t==="hi"?xxn():t==="ko"?wxn():t==="ja"?kxn():t==="pl"?jxn():mxn()}),Cxn=()=>"Runs",zxn=()=>"运行",Exn=()=>"اجراها",Nxn=()=>"عمليات التشغيل",Axn=()=>"Ejecuciones",Txn=()=>"रन",Rxn=()=>"실행",Mxn=()=>"実行",Oxn=()=>"Uruchomienia",$xn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zxn():t==="fa"?Exn():t==="ar"?Nxn():t==="es"?Axn():t==="hi"?Txn():t==="ko"?Rxn():t==="ja"?Mxn():t==="pl"?Oxn():Cxn()}),Dxn=()=>"Switch to Entire project to see all experiments",Lxn=()=>"切换到“整个项目”以查看所有实验",Ixn=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",Pxn=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",Bxn=()=>"Cambia a Todo el proyecto para ver todos los experimentos",Fxn=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",Hxn=()=>"전체 프로젝트로 전환하여 모든 실험 보기",qxn=()=>"プロジェクト全体に切り替えてすべての実験を表示",Uxn=()=>"Przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty",Gxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lxn():t==="fa"?Ixn():t==="ar"?Pxn():t==="es"?Bxn():t==="hi"?Fxn():t==="ko"?Hxn():t==="ja"?qxn():t==="pl"?Uxn():Dxn()}),Wxn=e=>`OpenResearch ${e==null?void 0:e.version} is ready. Restart to switch to it.`,Kxn=e=>`OpenResearch ${e==null?void 0:e.version} 已就绪。重新启动即可切换。`,Vxn=e=>`OpenResearch ${e==null?void 0:e.version} آماده است. برای رفتن به آن دوباره راه‌اندازی کنید.`,Qxn=e=>`OpenResearch ${e==null?void 0:e.version} جاهز. أعد التشغيل للانتقال إليه.`,Xxn=e=>`OpenResearch ${e==null?void 0:e.version} está listo. Reinicia para cambiar a esta versión.`,Yxn=e=>`OpenResearch ${e==null?void 0:e.version} तैयार है। इस पर जाने के लिए फिर से शुरू करें।`,Zxn=e=>`OpenResearch ${e==null?void 0:e.version}이(가) 준비되었습니다. 전환하려면 다시 시작하세요.`,Jxn=e=>`OpenResearch ${e==null?void 0:e.version} の準備ができました。切り替えるには再起動してください。`,ewn=e=>`OpenResearch ${e==null?void 0:e.version} jest gotowy. Uruchom aplikację ponownie, aby przejść na nową wersję.`,twn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Kxn(e):t==="fa"?Vxn(e):t==="ar"?Qxn(e):t==="es"?Xxn(e):t==="hi"?Yxn(e):t==="ko"?Zxn(e):t==="ja"?Jxn(e):t==="pl"?ewn(e):Wxn(e)}),rwn=()=>"Dismiss",nwn=()=>"关闭",swn=()=>"بستن",own=()=>"تجاهل",awn=()=>"Descartar",iwn=()=>"खारिज करें",cwn=()=>"닫기",lwn=()=>"閉じる",uwn=()=>"Zamknij",_wn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?nwn():t==="fa"?swn():t==="ar"?own():t==="es"?awn():t==="hi"?iwn():t==="ko"?cwn():t==="ja"?lwn():t==="pl"?uwn():rwn()}),fwn=()=>"Restart now",dwn=()=>"立即重新启动",hwn=()=>"هم‌اکنون دوباره راه‌اندازی کن",pwn=()=>"أعد التشغيل الآن",mwn=()=>"Reiniciar ahora",gwn=()=>"अभी फिर से शुरू करें",vwn=()=>"지금 다시 시작",bwn=()=>"今すぐ再起動",ywn=()=>"Uruchom ponownie teraz",OL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?dwn():t==="fa"?hwn():t==="ar"?pwn():t==="es"?mwn():t==="hi"?gwn():t==="ko"?vwn():t==="ja"?bwn():t==="pl"?ywn():fwn()}),xwn=e=>`Could not restart: ${e==null?void 0:e.error}`,wwn=e=>`无法重新启动:${e==null?void 0:e.error}`,kwn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,jwn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,Swn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,Cwn=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,zwn=e=>`다시 시작할 수 없습니다: ${e==null?void 0:e.error}`,Ewn=e=>`再起動できませんでした: ${e==null?void 0:e.error}`,Nwn=e=>`Nie udało się uruchomić ponownie: ${e==null?void 0:e.error}`,$L=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?wwn(e):t==="fa"?kwn(e):t==="ar"?jwn(e):t==="es"?Swn(e):t==="hi"?Cwn(e):t==="ko"?zwn(e):t==="ja"?Ewn(e):t==="pl"?Nwn(e):xwn(e)}),Awn=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",Twn=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",Rwn=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",Mwn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",Own=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",$wn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",Dwn=()=>"업데이트된 OpenResearch가 제한 시간 내에 시작되지 않았습니다. 직접 다시 시작하세요.",Lwn=()=>"更新された OpenResearch が時間内に起動しませんでした。手動で再起動してください。",Iwn=()=>"Zaktualizowany OpenResearch nie uruchomił się na czas. Uruchom go ręcznie.",Pwn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Twn():t==="fa"?Rwn():t==="ar"?Mwn():t==="es"?Own():t==="hi"?$wn():t==="ko"?Dwn():t==="ja"?Lwn():t==="pl"?Iwn():Awn()}),Bwn=()=>"Restarting…",Fwn=()=>"正在重新启动…",Hwn=()=>"در حال راه‌اندازی مجدد…",qwn=()=>"جارٍ إعادة التشغيل…",Uwn=()=>"Reiniciando…",Gwn=()=>"फिर से शुरू हो रहा है…",Wwn=()=>"다시 시작 중…",Kwn=()=>"再起動中…",Vwn=()=>"Ponowne uruchamianie…",DL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fwn():t==="fa"?Hwn():t==="ar"?qwn():t==="es"?Uwn():t==="hi"?Gwn():t==="ko"?Wwn():t==="ja"?Kwn():t==="pl"?Vwn():Bwn()}),Qwn=()=>"macOS app",Xwn=()=>"macOS 应用",Ywn=()=>"برنامهٔ macOS",Zwn=()=>"تطبيق macOS",Jwn=()=>"App de macOS",e2n=()=>"macOS ऐप",t2n=()=>"macOS 앱",r2n=()=>"macOS アプリ",n2n=()=>"Aplikacja macOS",s2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xwn():t==="fa"?Ywn():t==="ar"?Zwn():t==="es"?Jwn():t==="hi"?e2n():t==="ko"?t2n():t==="ja"?r2n():t==="pl"?n2n():Qwn()}),o2n=()=>"Linux app (AppImage)",a2n=()=>"Linux 应用(AppImage)",i2n=()=>"برنامه لینوکس (AppImage)",c2n=()=>"تطبيق Linux ‏(AppImage)",l2n=()=>"Aplicación para Linux (AppImage)",u2n=()=>"Linux ऐप (AppImage)",_2n=()=>"Linux 앱 (AppImage)",f2n=()=>"Linux アプリ(AppImage)",d2n=()=>"Aplikacja Linux (AppImage)",h2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?a2n():t==="fa"?i2n():t==="ar"?c2n():t==="es"?l2n():t==="hi"?u2n():t==="ko"?_2n():t==="ja"?f2n():t==="pl"?d2n():o2n()}),p2n=()=>"Installed with cargo",m2n=()=>"通过 cargo 安装",g2n=()=>"نصب‌شده با cargo",v2n=()=>"مثبّت عبر cargo",b2n=()=>"Instalado con cargo",y2n=()=>"cargo से इंस्टॉल किया गया",x2n=()=>"cargo로 설치됨",w2n=()=>"cargo でインストール",k2n=()=>"Zainstalowano przez cargo",j2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?m2n():t==="fa"?g2n():t==="ar"?v2n():t==="es"?b2n():t==="hi"?y2n():t==="ko"?x2n():t==="ja"?w2n():t==="pl"?k2n():p2n()}),S2n=()=>"Installed with Homebrew",C2n=()=>"通过 Homebrew 安装",z2n=()=>"نصب‌شده با Homebrew",E2n=()=>"مثبّت عبر Homebrew",N2n=()=>"Instalado con Homebrew",A2n=()=>"Homebrew से इंस्टॉल किया गया",T2n=()=>"Homebrew로 설치됨",R2n=()=>"Homebrew でインストール",M2n=()=>"Zainstalowano przez Homebrew",O2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?C2n():t==="fa"?z2n():t==="ar"?E2n():t==="es"?N2n():t==="hi"?A2n():t==="ko"?T2n():t==="ja"?R2n():t==="pl"?M2n():S2n()}),$2n=()=>"Installed with the orx installer",D2n=()=>"通过 orx 安装程序安装",L2n=()=>"نصب‌شده با نصب‌کنندهٔ orx",I2n=()=>"مثبّت عبر مُثبّت orx",P2n=()=>"Instalado con el instalador de orx",B2n=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",F2n=()=>"orx 설치 프로그램으로 설치됨",H2n=()=>"orx インストーラーでインストール",q2n=()=>"Zainstalowano instalatorem orx",U2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?D2n():t==="fa"?L2n():t==="ar"?I2n():t==="es"?P2n():t==="hi"?B2n():t==="ko"?F2n():t==="ja"?H2n():t==="pl"?q2n():$2n()}),G2n=()=>"Managed by Nix",W2n=()=>"由 Nix 管理",K2n=()=>"مدیریت‌شده با Nix",V2n=()=>"مُدار بواسطة Nix",Q2n=()=>"Gestionado por Nix",X2n=()=>"Nix द्वारा प्रबंधित",Y2n=()=>"Nix로 관리됨",Z2n=()=>"Nix で管理",J2n=()=>"Zarządzane przez Nix",ekn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W2n():t==="fa"?K2n():t==="ar"?V2n():t==="es"?Q2n():t==="hi"?X2n():t==="ko"?Y2n():t==="ja"?Z2n():t==="pl"?J2n():G2n()}),tkn=()=>"Portable orx.exe",rkn=()=>"便携版 orx.exe",nkn=()=>"orx.exe قابل‌حمل",skn=()=>"‏orx.exe المحمول",okn=()=>"orx.exe portable",akn=()=>"पोर्टेबल orx.exe",ikn=()=>"포터블 orx.exe",ckn=()=>"ポータブル版 orx.exe",lkn=()=>"Przenośny orx.exe",ukn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rkn():t==="fa"?nkn():t==="ar"?skn():t==="es"?okn():t==="hi"?akn():t==="ko"?ikn():t==="ja"?ckn():t==="pl"?lkn():tkn()}),_kn=()=>"Unknown install",fkn=()=>"未知安装方式",dkn=()=>"روش نصب نامشخص",hkn=()=>"تثبيت غير معروف",pkn=()=>"Instalación desconocida",mkn=()=>"अज्ञात इंस्टॉल",gkn=()=>"알 수 없는 설치",vkn=()=>"不明なインストール",bkn=()=>"Nieznany sposób instalacji",ykn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fkn():t==="fa"?dkn():t==="ar"?hkn():t==="es"?pkn():t==="hi"?mkn():t==="ko"?gkn():t==="ja"?vkn():t==="pl"?bkn():_kn()}),xkn=()=>"Re-run your cargo install to update.",wkn=()=>"重新运行 cargo 安装命令以更新。",kkn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",jkn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",Skn=()=>"Vuelve a ejecutar cargo install para actualizar.",Ckn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",zkn=()=>"업데이트하려면 cargo install을 다시 실행하세요.",Ekn=()=>"更新するには cargo install を再実行してください。",Nkn=()=>"Uruchom ponownie cargo install, aby zaktualizować.",Akn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wkn():t==="fa"?kkn():t==="ar"?jkn():t==="es"?Skn():t==="hi"?Ckn():t==="ko"?zkn():t==="ja"?Ekn():t==="pl"?Nkn():xkn()}),Tkn=()=>"Run brew upgrade to update.",Rkn=()=>"运行 brew upgrade 以更新。",Mkn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",Okn=()=>"نفّذ brew upgrade للتحديث.",$kn=()=>"Ejecuta brew upgrade para actualizar.",Dkn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",Lkn=()=>"업데이트하려면 brew upgrade를 실행하세요.",Ikn=()=>"更新するには brew upgrade を実行してください。",Pkn=()=>"Uruchom brew upgrade, aby zaktualizować.",Bkn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rkn():t==="fa"?Mkn():t==="ar"?Okn():t==="es"?$kn():t==="hi"?Dkn():t==="ko"?Lkn():t==="ja"?Ikn():t==="pl"?Pkn():Tkn()}),Fkn=()=>"Update it through your Nix configuration.",Hkn=()=>"通过 Nix 配置进行更新。",qkn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Ukn=()=>"حدّثه عبر إعداد Nix الخاص بك.",Gkn=()=>"Actualízalo desde tu configuración de Nix.",Wkn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",Kkn=()=>"Nix 설정을 통해 업데이트하세요.",Vkn=()=>"Nix の設定を通じて更新してください。",Qkn=()=>"Zaktualizuj przez konfigurację Nix.",Xkn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hkn():t==="fa"?qkn():t==="ar"?Ukn():t==="es"?Gkn():t==="hi"?Wkn():t==="ko"?Kkn():t==="ja"?Vkn():t==="pl"?Qkn():Fkn()}),Ykn=()=>"Close",Zkn=()=>"关闭",Jkn=()=>"بستن",e4n=()=>"إغلاق",t4n=()=>"Cerrar",r4n=()=>"बंद करें",n4n=()=>"닫기",s4n=()=>"閉じる",o4n=()=>"Zamknij",a4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zkn():t==="fa"?Jkn():t==="ar"?e4n():t==="es"?t4n():t==="hi"?r4n():t==="ko"?n4n():t==="ja"?s4n():t==="pl"?o4n():Ykn()}),i4n=()=>"Maximize",c4n=()=>"最大化",l4n=()=>"بزرگ کردن",u4n=()=>"تكبير",_4n=()=>"Maximizar",f4n=()=>"बड़ा करें",d4n=()=>"최대화",h4n=()=>"最大化",p4n=()=>"Maksymalizuj",m4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?c4n():t==="fa"?l4n():t==="ar"?u4n():t==="es"?_4n():t==="hi"?f4n():t==="ko"?d4n():t==="ja"?h4n():t==="pl"?p4n():i4n()}),g4n=()=>"Minimize",v4n=()=>"最小化",b4n=()=>"کوچک کردن",y4n=()=>"تصغير",x4n=()=>"Minimizar",w4n=()=>"छोटा करें",k4n=()=>"최소화",j4n=()=>"最小化",S4n=()=>"Minimalizuj",C4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?v4n():t==="fa"?b4n():t==="ar"?y4n():t==="es"?x4n():t==="hi"?w4n():t==="ko"?k4n():t==="ja"?j4n():t==="pl"?S4n():g4n()}),z4n=()=>"Restore",E4n=()=>"还原",N4n=()=>"بازیابی",A4n=()=>"استعادة",T4n=()=>"Restaurar",R4n=()=>"पुनर्स्थापित करें",M4n=()=>"복원",O4n=()=>"元に戻す",$4n=()=>"Przywróć",D4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?E4n():t==="fa"?N4n():t==="ar"?A4n():t==="es"?T4n():t==="hi"?R4n():t==="ko"?M4n():t==="ja"?O4n():t==="pl"?$4n():z4n()}),L4n=()=>"Active Experiments",I4n=()=>"活跃实验",P4n=()=>"آزمایش‌های فعال",B4n=()=>"التجارب النشطة",F4n=()=>"Experimentos activos",H4n=()=>"सक्रिय प्रयोग",q4n=()=>"활성 실험",U4n=()=>"進行中の実験",G4n=()=>"Aktywne eksperymenty",W4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?I4n():t==="fa"?P4n():t==="ar"?B4n():t==="es"?F4n():t==="hi"?H4n():t==="ko"?q4n():t==="ja"?U4n():t==="pl"?G4n():L4n()}),K4n=()=>"Default compute",V4n=()=>"默认计算目标",Q4n=()=>"محاسبات پیش‌فرض",X4n=()=>"الحوسبة الافتراضية",Y4n=()=>"Cómputo predeterminado",Z4n=()=>"डिफ़ॉल्ट कंप्यूट",J4n=()=>"기본 컴퓨팅",e3n=()=>"既定のコンピューティング",t3n=()=>"Domyślne zasoby obliczeniowe",r3n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?V4n():t==="fa"?Q4n():t==="ar"?X4n():t==="es"?Y4n():t==="hi"?Z4n():t==="ko"?J4n():t==="ja"?e3n():t==="pl"?t3n():K4n()}),n3n=()=>"More tools",s3n=()=>"更多工具",o3n=()=>"ابزارهای بیشتر",a3n=()=>"مزيد من الأدوات",i3n=()=>"Más herramientas",c3n=()=>"और टूल",l3n=()=>"추가 도구",u3n=()=>"その他のツール",_3n=()=>"Więcej narzędzi",xN=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?s3n():t==="fa"?o3n():t==="ar"?a3n():t==="es"?i3n():t==="hi"?c3n():t==="ko"?l3n():t==="ja"?u3n():t==="pl"?_3n():n3n()}),f3n=()=>"Terminal",d3n=()=>"终端",h3n=()=>"ترمینال",p3n=()=>"الطرفية",m3n=()=>"Terminal",g3n=()=>"टर्मिनल",v3n=()=>"터미널",b3n=()=>"ターミナル",y3n=()=>"Terminal",bb=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?d3n():t==="fa"?h3n():t==="ar"?p3n():t==="es"?m3n():t==="hi"?g3n():t==="ko"?v3n():t==="ja"?b3n():t==="pl"?y3n():f3n()}),x3n=()=>"The terminal disconnected.",w3n=()=>"终端连接已断开。",k3n=()=>"ارتباط ترمینال قطع شد.",j3n=()=>"انقطعت الطرفية.",S3n=()=>"La terminal se desconectó.",C3n=()=>"टर्मिनल डिस्कनेक्ट हो गया।",z3n=()=>"터미널 연결이 끊어졌습니다.",E3n=()=>"ターミナルの接続が切れました。",N3n=()=>"Utracono połączenie z terminalem.",wN=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w3n():t==="fa"?k3n():t==="ar"?j3n():t==="es"?S3n():t==="hi"?C3n():t==="ko"?z3n():t==="ja"?E3n():t==="pl"?N3n():x3n()}),A3n=e=>`Shell exited with code ${e==null?void 0:e.code}.`,T3n=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,R3n=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,M3n=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,O3n=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,$3n=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,D3n=e=>`셸이 코드 ${e==null?void 0:e.code}로 종료되었습니다.`,L3n=e=>`シェルがコード ${e==null?void 0:e.code} で終了しました。`,I3n=e=>`Powłoka zakończyła działanie z kodem ${e==null?void 0:e.code}.`,P3n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T3n(e):t==="fa"?R3n(e):t==="ar"?M3n(e):t==="es"?O3n(e):t==="hi"?$3n(e):t==="ko"?D3n(e):t==="ja"?L3n(e):t==="pl"?I3n(e):A3n(e)}),B3n=()=>"Restart shell",F3n=()=>"重新启动 Shell",H3n=()=>"راه‌اندازی دوباره پوسته",q3n=()=>"إعادة تشغيل Shell",U3n=()=>"Reiniciar shell",G3n=()=>"शेल फिर से शुरू करें",W3n=()=>"셸 다시 시작",K3n=()=>"シェルを再起動",V3n=()=>"Uruchom ponownie powłokę",Q3n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F3n():t==="fa"?H3n():t==="ar"?q3n():t==="es"?U3n():t==="hi"?G3n():t==="ko"?W3n():t==="ja"?K3n():t==="pl"?V3n():B3n()}),X3n=()=>"This worktree",Y3n=()=>"当前工作树",Z3n=()=>"این درخت کاری",J3n=()=>"شجرة العمل هذه",e5n=()=>"Este árbol de trabajo",t5n=()=>"यह वर्कट्री",r5n=()=>"이 워크트리",n5n=()=>"このワークツリー",s5n=()=>"To drzewo robocze",o5n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y3n():t==="fa"?Z3n():t==="ar"?J3n():t==="es"?e5n():t==="hi"?t5n():t==="ko"?r5n():t==="ja"?n5n():t==="pl"?s5n():X3n()}),a5n=()=>"Workspace",i5n=()=>"工作区",c5n=()=>"فضای کاری",l5n=()=>"مساحة العمل",u5n=()=>"Espacio de trabajo",_5n=()=>"वर्कस्पेस",f5n=()=>"작업 공간",d5n=()=>"ワークスペース",h5n=()=>"Obszar roboczy",D2=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i5n():t==="fa"?c5n():t==="ar"?l5n():t==="es"?u5n():t==="hi"?_5n():t==="ko"?f5n():t==="ja"?d5n():t==="pl"?h5n():a5n()}),p5n=e=>`Current worktree · ${e==null?void 0:e.branch}`,m5n=e=>`当前工作树 · ${e==null?void 0:e.branch}`,g5n=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,v5n=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,b5n=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,y5n=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,x5n=e=>`현재 워크트리 · ${e==null?void 0:e.branch}`,w5n=e=>`現在のワークツリー · ${e==null?void 0:e.branch}`,k5n=e=>`Bieżące drzewo robocze · ${e==null?void 0:e.branch}`,j5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?m5n(e):t==="fa"?g5n(e):t==="ar"?v5n(e):t==="es"?b5n(e):t==="hi"?y5n(e):t==="ko"?x5n(e):t==="ja"?w5n(e):t==="pl"?k5n(e):p5n(e)}),S5n=e=>`Default branch · ${e==null?void 0:e.branch}`,C5n=e=>`默认分支 · ${e==null?void 0:e.branch}`,z5n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,E5n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,N5n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,A5n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,T5n=e=>`기본 브랜치 · ${e==null?void 0:e.branch}`,R5n=e=>`既定のブランチ · ${e==null?void 0:e.branch}`,M5n=e=>`Gałąź domyślna · ${e==null?void 0:e.branch}`,O5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?C5n(e):t==="fa"?z5n(e):t==="ar"?E5n(e):t==="es"?N5n(e):t==="hi"?A5n(e):t==="ko"?T5n(e):t==="ja"?R5n(e):t==="pl"?M5n(e):S5n(e)}),$5n=e=>`detached at ${e==null?void 0:e.branch}`,D5n=e=>`分离于 ${e==null?void 0:e.branch}`,L5n=e=>`جدا در ${e==null?void 0:e.branch}`,I5n=e=>`منفصل عند ${e==null?void 0:e.branch}`,P5n=e=>`desacoplado en ${e==null?void 0:e.branch}`,B5n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,F5n=e=>`${e==null?void 0:e.branch}에서 분리됨`,H5n=e=>`${e==null?void 0:e.branch} で分離された HEAD`,q5n=e=>`odłączony HEAD na ${e==null?void 0:e.branch}`,U5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?D5n(e):t==="fa"?L5n(e):t==="ar"?I5n(e):t==="es"?P5n(e):t==="hi"?B5n(e):t==="ko"?F5n(e):t==="ja"?H5n(e):t==="pl"?q5n(e):$5n(e)}),G5n=()=>"Listing truncated.",W5n=()=>"列表已截断。",K5n=()=>"فهرست کوتاه شده است.",V5n=()=>"القائمة مقتطعة.",Q5n=()=>"Listado truncado.",X5n=()=>"सूची छोटी की गई।",Y5n=()=>"목록이 잘렸습니다.",Z5n=()=>"一覧が省略されています。",J5n=()=>"Lista została ucięta.",ejn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W5n():t==="fa"?K5n():t==="ar"?V5n():t==="es"?Q5n():t==="hi"?X5n():t==="ko"?Y5n():t==="ja"?Z5n():t==="pl"?J5n():G5n()}),tjn=()=>"Loading…",rjn=()=>"正在加载…",njn=()=>"در حال بارگیری…",sjn=()=>"جارٍ التحميل…",ojn=()=>"Cargando…",ajn=()=>"लोड हो रहा है…",ijn=()=>"불러오는 중…",cjn=()=>"読み込み中…",ljn=()=>"Wczytywanie…",ujn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rjn():t==="fa"?njn():t==="ar"?sjn():t==="es"?ojn():t==="hi"?ajn():t==="ko"?ijn():t==="ja"?cjn():t==="pl"?ljn():tjn()}),_jn=()=>"No changes yet.",fjn=()=>"尚无更改。",djn=()=>"هنوز تغییری وجود ندارد.",hjn=()=>"لا توجد تغييرات بعد.",pjn=()=>"Aún no hay cambios.",mjn=()=>"अभी तक कोई बदलाव नहीं।",gjn=()=>"아직 변경 사항이 없습니다.",vjn=()=>"変更はまだありません。",bjn=()=>"Na razie brak zmian.",yjn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fjn():t==="fa"?djn():t==="ar"?hjn():t==="es"?pjn():t==="hi"?mjn():t==="ko"?gjn():t==="ja"?vjn():t==="pl"?bjn():_jn()}),xjn=()=>"No files.",wjn=()=>"没有文件。",kjn=()=>"فایلی وجود ندارد.",jjn=()=>"لا توجد ملفات.",Sjn=()=>"No hay archivos.",Cjn=()=>"कोई फ़ाइल नहीं।",zjn=()=>"파일이 없습니다.",Ejn=()=>"ファイルがありません。",Njn=()=>"Brak plików.",Ajn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wjn():t==="fa"?kjn():t==="ar"?jjn():t==="es"?Sjn():t==="hi"?Cjn():t==="ko"?zjn():t==="ja"?Ejn():t==="pl"?Njn():xjn()}),Tjn=()=>"Refresh failed:",Rjn=()=>"刷新失败:",Mjn=()=>"تازه‌سازی ناموفق بود:",Ojn=()=>"فشل التحديث:",$jn=()=>"Error al actualizar:",Djn=()=>"रीफ़्रेश विफल:",Ljn=()=>"새로 고침 실패:",Ijn=()=>"更新に失敗:",Pjn=()=>"Nie udało się odświeżyć:",Bjn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rjn():t==="fa"?Mjn():t==="ar"?Ojn():t==="es"?$jn():t==="hi"?Djn():t==="ko"?Ljn():t==="ja"?Ijn():t==="pl"?Pjn():Tjn()}),Ee=e=>`⁦${e}⁩`,Vl=e=>`⁨${e}⁩`,fr=e=>new Intl.NumberFormat(C()).format(e),ym="demo_nanochat_v1",Ju=e=>e.startsWith("demo_"),zh="chat_demo_nanochat_v1",Jj="chat_demo_nanochat_figures_v1",eS="chat_demo_nanochat_literature_v1",Fjn={[zh]:"cpu_end_to_end",[Jj]:"figures",[eS]:"literature"},L2="cpu-apple-silicon-pipeline-results.md",Hjn={[zh]:"msg_demo_nanochat_assistant_v1",[Jj]:"msg_demo_nanochat_figures_assistant_v1",[eS]:"msg_demo_nanochat_literature_assistant_v1"},kN="Run the proposed learning-rate probe experiment. Summarize its results using the recorded validation metric and comparison described by the experiment. If it produces an interactive HTML loss chart, show it inline using image syntax.";class c3 extends Error{constructor(t,n,s){super(t);bo(this,"currentVersion");bo(this,"exists");this.name="FileChangedError",this.currentVersion=n,this.exists=s}}function Ba(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}function qjn(e){var t;if(e.status!=="running"&&e.status!=="starting")return null;const r=(t=e.backend)==null?void 0:t.monitoringError;return typeof r=="string"&&r?r:null}function LL(e){return[...e].sort((t,n)=>n.createdAt-t.createdAt).map(qjn).find(t=>t!==null)??null}const IL=new WeakMap;async function Eo(e){if(!e.ok){const n=await e.text().catch(()=>"");let s=n;try{const o=JSON.parse(n);if(typeof o=="object"&&o!==null&&("error"in o&&typeof o.error=="string"&&(s=o.error),e.status===409&&"code"in o&&o.code==="fileChanged"&&"exists"in o&&typeof o.exists=="boolean")){const a="currentVersion"in o&&typeof o.currentVersion=="string"?o.currentVersion:null;throw new c3(s,a,o.exists)}}catch(o){if(o instanceof c3)throw o}throw new Error(s||`HTTP ${e.status}`)}const r=await e.json(),t=IL.get(e);if(t&&!Wr(t))throw new DOMException("Workspace changed","AbortError");return r}const $t=(e,r)=>fetch(e,{signal:r}).then(t=>Eo(t));async function va(e,r){const t=Si(),n=await fetch(e,r);if(!Wr(t))throw new DOMException("Workspace changed","AbortError");return IL.set(n,t),n.ok&&wX(e,t),n}const jt=(e,r,t=!1)=>va(e,{method:"POST",keepalive:t,headers:r===void 0?{}:{"content-type":"application/json"},body:r===void 0?void 0:JSON.stringify(r)}).then(n=>Eo(n)),Yc=(e,r)=>va(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(r)}).then(t=>Eo(t)),PL=(e,r)=>va(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(r)}).then(t=>Eo(t)),Ujn=e=>$t("/api/projects",e).then(r=>r.projects),Gjn=e=>$t("/api/projects/activity",e).then(r=>r.activity),l3="agentic",Wjn=e=>$t("/api/settings/ui-state",e),Kjn=(e,r)=>$t(`/api/projects/${encodeURIComponent(e)}/ui-state`,r),Vjn=(e,r,t=!1)=>jt(`/api/projects/${encodeURIComponent(e)}/ui-state`,r,t),Qjn=(e,r=!1)=>jt("/api/settings/ui-state",{workspace:e},r),Xjn=e=>jt("/api/settings/ui-state",e),Yjn=(e,r)=>jt("/api/onboarding/complete",{...e,...r}),Zjn=(e="",r)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return $t(`/api/project-path/status${t}`,r)},Jjn=()=>jt("/api/git/install"),eSn=()=>jt("/api/project-path/pick").then(e=>e.path),tSn=e=>jt("/api/projects",e),rSn=(e,r)=>$t(`/api/papers/search?q=${encodeURIComponent(e)}`,r).then(t=>t.papers),nSn=e=>$t("/api/github/account",e),sSn=(e,r)=>$t(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,r),oSn=(e,r,t)=>$t(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(r)}`,t),aSn=(e,r)=>$t(`/api/papers/resolve?id=${encodeURIComponent(e)}`,r).then(t=>t.paper),iSn=(e,r)=>Yc(`/api/projects/${e}`,r).then(t=>t.project),cSn=e=>jt("/api/projects/starter-prompts/prewarm",e),lSn=(e,r,t,n,s)=>$t(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:r,...t?{model:t}:{},locale:n})}`,s),BL=e=>va(`/api/projects/${e}`,{method:"DELETE"}).then(async r=>{if(!r.ok){const t=await r.json().catch(()=>null);throw new Error((t==null?void 0:t.error)??`delete failed (${r.status})`)}yX(e)}),uSn=(e,r)=>$t(`/api/projects/${e}/experiments`,r).then(t=>t.experiments),_Sn=(e,r,t)=>Yc(`/api/experiments/${e}/archive`,{direction:r,archived:t}),fSn=(e,r)=>$t(`/api/projects/${e}/runs`,r).then(t=>t.runs),FL=e=>jt(`/api/runs/${e}/cancel`).then(()=>{}),dSn=(e,r)=>$t(`/api/runs/${e}/log?offset=${r}`),hSn=(e,r)=>$t(`/api/runs/${e}/diff`,r),pSn=(e,r)=>$t(`/api/experiments/${e}/diff`,r),N_=(e,r=new URLSearchParams)=>(e.sessionId&&r.set("sessionId",e.sessionId),e.ref&&r.set("ref",e.ref),r),mSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file?${N_(t,new URLSearchParams({path:r}))}`,n),u3=(e,r,t={})=>`/api/projects/${e}/file/raw?${N_(t,new URLSearchParams({path:r}))}`,gSn=(e,r)=>$t(`/api/files/abs?path=${encodeURIComponent(e)}`,r),HL=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,vSn=(e,r,t,n)=>PL(`/api/projects/${e}/file`,{path:r,content:t,sessionId:n.sessionId,expectedVersion:n.expectedVersion}),bSn=(e,r,t,n={})=>Yc(`/api/projects/${e}/file`,{path:r,...t,sessionId:n.sessionId}),ySn=(e,r,t={})=>jt(`/api/projects/${e}/file/open`,{path:r,sessionId:t.sessionId}),qL=(e,r,t={})=>jt(`/api/projects/${e}/file/reveal`,{path:r,sessionId:t.sessionId}),xSn=e=>$t("/api/latex/engine",e),wSn=(e,r,t={})=>jt(`/api/projects/${e}/file/latex`,{path:r,sessionId:t.sessionId}),kSn=e=>$t("/api/overleaf/settings",e),UL=e=>jt("/api/overleaf/token",{token:e}),jSn=()=>va("/api/overleaf/token",{method:"DELETE"}).then(e=>Eo(e)),GL=(e,r={})=>jt("/api/overleaf/session",{session:e,host:r.host}),SSn=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>Eo(e)),CSn=(e={})=>jt("/api/overleaf/session/import",{host:e.host}),zSn=(e,r,t={})=>jt(`/api/projects/${e}/file/overleaf/live`,{path:r,sessionId:t.sessionId,retry:t.retry}),ESn=(e,r,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${N_(t,new URLSearchParams({path:r}))}`,{method:"DELETE"}).then(n=>Eo(n)),NSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file/overleaf?${N_(t,new URLSearchParams({path:r}))}`,n),ASn=(e,r,t)=>jt(`/api/projects/${e}/file/overleaf`,{path:r,project:t.project,sessionId:t.sessionId}),TSn=(e,r,t={})=>va(`/api/projects/${e}/file/overleaf?${N_(t,new URLSearchParams({path:r}))}`,{method:"DELETE"}).then(n=>Eo(n)),RSn=(e,r,t={})=>jt(`/api/projects/${e}/file/overleaf/sync`,{path:r,sessionId:t.sessionId,resolve:t.resolve}),MSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file/overleaf/status?${N_(t,new URLSearchParams({path:r}))}`,n),OSn=(e,r,t={})=>`/api/projects/${e}/file/overleaf/upload?${N_(t,new URLSearchParams({path:r}))}`,$Sn=(e,r={},t)=>{const n=N_(r).toString();return $t(`/api/projects/${e}/code-tree${n?`?${n}`:""}`,t)},DSn=(e,r)=>$t(`/api/chat/sessions/${e}/worktree`,r),xy=(e,r,t)=>`https://github.com/${e}/${r}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,LSn=e=>$t("/api/settings/hf",e),ISn=e=>jt("/api/settings/hf",{token:e}),PSn=e=>$t("/api/settings/tinker",e),BSn=e=>jt("/api/settings/tinker",{key:e}),FSn=e=>$t("/api/update",e),HSn=()=>jt("/api/update/apply"),qSn=()=>jt("/api/update/restart"),USn=e=>jt("/api/update/auto",{enabled:e}),GSn=(e=!1)=>jt("/api/update/install-cli",{force:e}),WSn=e=>$t("/api/settings/k8s",e),KSn=e=>jt("/api/settings/k8s",e),VSn=e=>$t("/api/settings/modal",e),QSn=(e,r)=>jt("/api/settings/modal",{tokenId:e,tokenSecret:r}),XSn=e=>$t("/api/settings/env",e).then(r=>r.vars),WL=(e,r)=>jt("/api/settings/env",{key:e,value:r}).then(t=>t.vars),YSn=e=>va(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)).then(r=>r.vars),ZSn=e=>$t("/api/settings/data-dir",e),JSn=e=>jt("/api/settings/data-dir/validate",{path:e}),e6n=e=>jt("/api/settings/data-dir/move",{path:e}),t6n=e=>$t("/api/settings/ssh",e),r6n=e=>jt("/api/settings/ssh",e),n6n=e=>jt("/api/settings/ssh/default",{host:e}),s6n=(e,r)=>jt("/api/settings/ssh/preflight",{host:e,container:r}),o6n=e=>$t("/api/settings/ssh/config",e),a6n=(e,r)=>PL("/api/settings/ssh/config",{content:e,previousContent:r}),i6n=(e,r)=>$t(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,r),c6n=e=>$t("/_orx/runtime",e),l6n=e=>$t("/api/remote/sessions",e).then(r=>r.sessions),u6n=(e,r)=>jt("/api/remote/sessions",{host:e,uiPreferences:r}),_6n=e=>jt("/_orx/install",e),f6n=()=>jt("/_orx/reconnect"),KL=()=>jt("/_orx/disconnect"),d6n=()=>jt("/_orx/start-host"),VL=()=>$t("/_orx/stop-host"),QL=e=>jt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),h6n=e=>$t("/api/settings/slurm",e),p6n=e=>jt("/api/settings/slurm",e),m6n=e=>$t("/api/settings/ray",e),g6n=e=>jt("/api/settings/ray",e),v6n=e=>jt("/api/settings/ray/preflight",{address:e??null}),b6n=(e,r)=>$t(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,r),y6n=e=>jt("/api/settings/compute/default",e),x6n=e=>$t("/api/settings/local",e),w6n=e=>$t("/api/settings/openresearch",e),k6n=(e,r)=>$t(`/api/projects/${e}/files`,r),j6n=(e,r)=>va(`/api/projects/${e}/files?path=${encodeURIComponent(r)}`,{method:"DELETE"}).then(t=>Eo(t)),S6n=(e,r,t)=>Yc(`/api/projects/${e}/files`,{path:r,...t}),Wf=(e,r)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(r)}`,XL=512e3,C6n=(e,r)=>{const t=new Uint8Array(e);if(t.includes(0))return{content:"",binary:!0,truncated:r};try{return{content:new TextDecoder("utf-8",{fatal:!0}).decode(t,{stream:r}),binary:!1,truncated:r}}catch{return{content:"",binary:!0,truncated:r}}},z6n=(e,r,t)=>fetch(Wf(e,r),{signal:t,headers:{Range:`bytes=0-${XL-1}`}}).then(n=>{var o;if(n.status===404)return null;if(n.status===416&&n.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!n.ok)throw new Error(`HTTP ${n.status}`);const s=Number((o=n.headers.get("content-range"))==null?void 0:o.split("/").pop());return n.arrayBuffer().then(a=>C6n(a,Number.isFinite(s)&&s>a.byteLength))}),E6n=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",N6n=(e,r,t)=>fetch(Wf(e,r),{signal:t,method:"HEAD"}).then(n=>{if(n.status===404)return null;if(!n.ok)throw new Error(`HTTP ${n.status}`);const s=n.headers.get("x-openresearch-presentation");return{size:Number(n.headers.get("content-length"))||0,presentation:E6n(s)?s:"download"}}),A6n=e=>$t("/api/settings/profile",e),T6n=e=>$t("/api/settings/lit-sources",e),R6n=e=>jt("/api/settings/lit-sources",e),M6n=e=>$t("/api/settings/projects",e),YL=(e,r)=>jt("/api/settings/projects",{githubForNewProjects:e,...r===void 0?{}:{githubDefaultPromptSeen:r}}),O6n=(e,r)=>$t(`/api/projects/${e}/git`,r),$6n=e=>jt(`/api/projects/${e}/git/init`),D6n=e=>jt(`/api/projects/${e}/github`),L6n=e=>jt(`/api/projects/${e}/github/disable`),I6n=e=>$t("/api/settings/telemetry",e),P6n=e=>jt("/api/settings/telemetry",{enabled:e}),e_=e=>{jt("/api/telemetry/event",e).catch(()=>{})},B6n=(e,r)=>va("/api/telemetry/locale",{method:"POST",signal:r,headers:{"content-type":"application/json"},body:JSON.stringify({locale:e})}).then(t=>Eo(t));function $1(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??f3(e.id);const r=(s=e.displayName)==null?void 0:s.split(" · ").slice(1).join(" · ").replace(/ \(local\)$/,""),t=r==="OpenAI-compatible server"||r==="Custom endpoint"||r==="Custom Endpoint"?qj():r,n=f3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${n} · ${t}`:n}const yb="default";function wy(e,r){var a,i,c;const t=e==null?void 0:e.models.find(u=>u.id===r),n=(t==null?void 0:t.reasoningLevels)??((a=e==null?void 0:e.options)==null?void 0:a.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,o=s&&n.some(u=>u.id===s)?s:n.some(u=>u.id===yb)?yb:((i=e==null?void 0:e.options)==null?void 0:i.defaultReasoningLevel)??((c=n[0])==null?void 0:c.id)??null;return{choices:n,defaultId:o}}const _3="default";function ZL(e,r){var n;if((e==null?void 0:e.id)!=="codex")return[];const t=(n=e.models.find(s=>s.id===r))==null?void 0:n.serviceTiers;return t!=null&&t.length?[{id:_3,label:v0r(),description:c0r()},...t]:[]}function xb(e,r,t){var o;if(!e)return t??null;if(e.id!=="codex"||((o=e.models.find(a=>a.id===r))==null?void 0:o.serviceTiers)===void 0)return null;const s=ZL(e,r);return s.length===0?_3:t!=null&&s.some(a=>a.id===t)?t:_3}function JL(e,r,t){if(!e)return t;const{choices:n,defaultId:s}=wy(e,r);return n.length===0?yb:t&&n.some(o=>o.id===t)?t:s}const F6n=e=>$t("/api/harnesses/setup/commands",e),eI=(e=!1,r=!1,t,n)=>{const s=new URLSearchParams;e&&s.set("refresh","1"),r&&s.set("retry","1"),n&&s.set("harness",n);const o=s.size>0?`?${s.toString()}`:"";return $t(`/api/harnesses${o}`,t).then(a=>a.harnesses)},H6n=(e,r,t)=>{const n=new URLSearchParams({...r?{harness:r}:{},...t?{project:t}:{}});return $t(`/api/skills${n.size?`?${n}`:""}`,e)},q6n=(e,r,t,n)=>$t(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...r?{project:r}:{},...n?{harness:n}:{}})}`}`,t).then(s=>s.content),U6n=e=>$t("/api/latex-templates",e).then(r=>r.templates),G6n=e=>jt("/api/latex-templates",e).then(r=>r.template),W6n=e=>va(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)),K6n=e=>$t("/api/user-skills",e),V6n=e=>jt("/api/user-skills",e).then(r=>r.skill),Q6n=e=>va(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r));function f3(e){const r=(e.split("/").pop()??e).replace(/^~/,"").replace(/^claude-/,""),t=[],n=[];for(const s of r.split("-"))/^\d+(\.\d+)?$/.test(s)?n.push(s):(n.length&&t.push(n.splice(0).join(".")),t.push(s==="gpt"?"GPT":s.charAt(0).toUpperCase()+s.slice(1)));return n.length&&t.push(n.join(".")),t.join(" ")}const X6n=(e,r)=>$t(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,r).then(t=>t.sessions),Y6n=e=>$t("/api/chat/native-sessions",e).then(r=>r.chats),Z6n=(e,r)=>jt("/api/chat/native-sessions/import",{projectId:e,harness:r.harness,nativeId:r.nativeId,title:r.title}).then(t=>t.session),J6n=e=>$t("/api/chat/sessions?scope=all",e).then(r=>r.sessions),eCn=(e,r,t)=>{const n=new URLSearchParams({scope:"sidebar"});return e!=="all"&&n.set("archived",String(e==="archived")),r&&(n.set("beforeUpdatedAt",String(r.updatedAt)),n.set("beforeId",r.id)),$t(`/api/chat/sessions?${n}`,t)},tCn=(e,r,t={})=>jt("/api/chat/sessions",{projectId:e,harness:r,...t}).then(n=>n.session),rCn=e=>$t(`/api/chat/sessions/${e}`).then(r=>r.session),d3=e=>va(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(r=>Eo(r).then(t=>(by(e),t))),nCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{archived:r}).then(t=>t.session),sCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{title:r}).then(t=>t.session),oCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{planMode:r}).then(t=>t.session),aCn=e=>jt(`/api/chat/sessions/${e}/side`,{}).then(r=>r.session),iCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{goal:r}).then(t=>t.session),cCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{autonomy:r}).then(t=>t.session),lCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{permissionMode:r}).then(t=>t.session),uCn=(e,r)=>$t(`/api/chat/sessions/${e}/messages`,r).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),_Cn=(e,r)=>va(`/api/chat/sessions/${e}/queue/${encodeURIComponent(r)}`,{method:"DELETE"}).then(t=>Eo(t)),fCn=(e,r)=>jt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(r)}`),dCn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,h3=(e,r,t={},n,s,o,a)=>jt(`/api/chat/sessions/${e}/message`,{text:r,clientTurnId:o,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:n,annotations:s,mode:a}),hCn=e=>jt(`/api/chat/sessions/${e}/compact`,{}),pCn=(e,r)=>jt(`/api/chat/sessions/${e}/shell`,{command:r}),mCn=(e,r,t,n={})=>jt(`/api/chat/sessions/${e}/turns/${r}/recover`,{action:t,...n}),gCn=(e,r,t)=>jt(`/api/chat/sessions/${e}/fork`,{messageId:r,text:t}),vCn=(e,r)=>jt(`/api/chat/sessions/${e}/branch`,{leafId:r}),bCn=e=>jt(`/api/chat/sessions/${e}/interrupt`),yCn=(e,r)=>jt(`/api/chat/sessions/${e}/respond`,r);function Uc(e){const r=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(C(),{numeric:"always",style:"narrow"});if(r<60)return t.format(-r,"second");const n=Math.floor(r/60);if(n<60)return t.format(-n,"minute");const s=Math.floor(n/60);return s<24?t.format(-s,"hour"):t.format(-Math.floor(s/24),"day")}function dg(e){const r=Math.max(0,Math.floor(e/1e3));if(r<60)return znt({value:fr(r)});const t=Math.floor(r/60);if(t<60)return gnt({value:fr(t)});const n=Math.floor(t/60);return n<24?int({hours:fr(n),minutes:fr(t%60)}):Yrt({days:fr(Math.floor(n/24)),hours:fr(n%24)})}function Xl(e){const r=["B","KB","MB","GB","TB"];let t=e,n=0;for(;t>=1024&&n$t("/api/local-models",e),kCn=e=>jt("/api/local-models/discover",e),jCn=e=>jt("/api/local-models",e),SCn=e=>jt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),CCn=e=>va(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)),jN=()=>({queryKey:Mt("getHfSettings"),queryFn:({signal:e})=>LSn(e),staleTime:3e5}),SN=()=>({queryKey:Mt("getTinkerSettings"),queryFn:({signal:e})=>PSn(e),staleTime:3e5}),CN=()=>({queryKey:Mt("getK8sSettings"),queryFn:({signal:e})=>WSn(e),staleTime:3e4}),zN=()=>({queryKey:Mt("getModalSettings"),queryFn:({signal:e})=>VSn(e),staleTime:3e5}),zCn=()=>({queryKey:Mt("getSlurmSettings"),queryFn:({signal:e})=>h6n(e),staleTime:3e5}),ECn=()=>({queryKey:Mt("getRaySettings"),queryFn:({signal:e})=>m6n(e),staleTime:3e5}),tI=e=>({queryKey:Mt("getComputeSettings",e??null),queryFn:({signal:r})=>b6n(e,r),staleTime:3e4}),NCn=()=>({queryKey:Mt("getLocalMachine"),queryFn:({signal:e})=>x6n(e),staleTime:3e5}),ACn=()=>({queryKey:Mt("getOpenResearchSettings"),queryFn:({signal:e})=>w6n(e),staleTime:3e4}),TCn=()=>({queryKey:Mt("getEnvVars"),queryFn:({signal:e})=>XSn(e),staleTime:3e5}),RCn=()=>({queryKey:Mt("getDataDir"),queryFn:({signal:e})=>ZSn(e),staleTime:3e5}),rI=()=>({queryKey:Mt("getSshSettings"),queryFn:({signal:e})=>t6n(e),staleTime:3e4}),MCn=()=>({queryKey:Mt("getSshConfig"),queryFn:({signal:e})=>o6n(e),staleTime:3e5}),EN=e=>({queryKey:Mt("getSshMasterStatus",e),queryFn:({signal:r})=>i6n(e,r),staleTime:5e3}),OCn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>c6n(e),staleTime:2e3}),$Cn=()=>({queryKey:Mt("listRemoteSessions"),queryFn:({signal:e})=>l6n(e),staleTime:3e4}),wb=()=>({queryKey:Mt("getUpdateStatus"),queryFn:({signal:e,client:r,queryKey:t})=>vp(r,t,()=>FSn(e)),staleTime:3e4}),DCn=()=>({queryKey:Mt("getProfile"),queryFn:({signal:e})=>A6n(e),staleTime:3e5}),LCn=()=>({queryKey:Mt("getLitSources"),queryFn:({signal:e})=>T6n(e),staleTime:3e5}),rS=()=>({queryKey:Mt("getProjectDefaults"),queryFn:({signal:e})=>M6n(e),staleTime:3e5}),ICn=e=>({queryKey:Mt("getProjectGitStatus",e),queryFn:({signal:r})=>O6n(e,r),staleTime:3e4}),PCn=()=>({queryKey:Mt("getTelemetry"),queryFn:({signal:e})=>I6n(e),staleTime:3e5}),nS=()=>({queryKey:Mt("getHarnessSetupCommands"),queryFn:({signal:e})=>F6n(e),staleTime:1/0}),su=()=>({queryKey:Mt("getHarnesses"),queryFn:({signal:e})=>eI(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var r;return(r=e.state.data)!=null&&r.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),BCn=(e,r)=>({queryKey:Mt("getSkills",e??null,r??null),queryFn:({signal:t})=>H6n(t,e,r),select:t=>t.skills,refetchInterval:t=>{var n;return(n=t.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5}),FCn=(e,r,t)=>({queryKey:Mt("getSkillContent",e,r??null,t??null),queryFn:({signal:n})=>q6n(e,r,n,t),staleTime:3e5}),HCn=()=>({queryKey:Mt("listLatexTemplates"),queryFn:({signal:e})=>U6n(e),refetchInterval:3e4,staleTime:3e5}),qCn=()=>({queryKey:Mt("listUserSkills"),queryFn:({signal:e})=>K6n(e),select:e=>e.skills,refetchInterval:e=>{var r;return(r=e.state.data)!=null&&r.importing?2e3:3e4},staleTime:3e5});async function Kf(e=!1,r=!1){return!e&&!r?Je.fetchQuery(su()):sS(e,r)}const UCn=e=>sS(!0,!1,e),nI=()=>sS(!1,!1);async function sS(e,r,t){const n=su();await Je.cancelQueries(n);const s=await eI(e,r,void 0,t);return Wr(n.queryKey)&&Je.setQueryData(n.queryKey,s),s}const GCn=()=>({queryKey:Mt("getLocalModels"),queryFn:({signal:e})=>wCn(e),staleTime:3e4}),WCn=e=>({queryKey:Mt("reportLocale",e),queryFn:({signal:r})=>B6n(e,r),staleTime:0,retry:3,retryDelay:1e3,refetchOnWindowFocus:!1}),D1=new Map;function KCn(e,r){let t=D1.get(e);return t||(t=new Set,D1.set(e,t)),t.add(r),()=>{t.delete(r),t.size===0&&D1.delete(e)}}function VCn(e){var r;(r=D1.get(e.runId))==null||r.forEach(t=>t(e))}const p3=new Set;function hg(e){return p3.add(e),()=>{p3.delete(e)}}function Ol(e){p3.forEach(r=>r(e))}const m3=new Set;function QCn(e){return m3.add(e),()=>{m3.delete(e)}}function $l(){m3.forEach(e=>e())}const g3=new Set;function XCn(e){return g3.add(e),()=>{g3.delete(e)}}const v3=new Set;function YCn(e){return v3.add(e),()=>{v3.delete(e)}}function ZCn(){v3.forEach(e=>e())}function NN(e){g3.forEach(r=>r(e))}const b3=new Set;function sI(e){return b3.add(e),()=>{b3.delete(e)}}function I2(e){b3.forEach(r=>r(e))}const y3=new Set;function JCn(e){return y3.add(e),()=>{y3.delete(e)}}function AN(e){y3.forEach(r=>r(e))}const x3=new Set;function e7n(e){return x3.add(e),()=>{x3.delete(e)}}function t7n(e){x3.forEach(r=>r(e))}let w3=!0;const k3=new Set;function r7n(e){return k3.add(e),()=>{k3.delete(e)}}function TN(){return w3}function RN(e){e!==w3&&(w3=e,k3.forEach(r=>r()))}const n7n=8e3,s7n=3e3;function o7n(e){const r=T.useRef(e);r.current=e,T.useEffect(()=>{let t=null,n=!1,s,o,a=!1;const i=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{n||(a=!0,s??(s=window.setTimeout(()=>RN(!1),n7n)),c.readyState===EventSource.CLOSED&&o===void 0&&(o=window.setTimeout(()=>{o=void 0,i()},s7n)))},c.onopen=()=>{var d,_;n||(window.clearTimeout(s),s=void 0,RN(!0),a&&(Ol({type:"reconnected"}),$l(),NN({harness:"*",authState:"unknown"}),(_=(d=r.current).onReconnect)==null||_.call(d)),a=!0)};const u=d=>{try{return JSON.parse(d.data)}catch{return null}};c.addEventListener("resync.required",()=>{var d,_;Ol({type:"reconnected"}),$l(),(_=(d=r.current).onReconnect)==null||_.call(d)}),c.addEventListener("run.updated",d=>{const _=u(d);_!=null&&_.run&&($l(),r.current.onRun(_.run))}),c.addEventListener("experiment.updated",d=>{var p,m;const _=u(d);_!=null&&_.experiment&&($l(),(m=(p=r.current).onExperiment)==null||m.call(p,_.experiment))}),c.addEventListener("project.updated",d=>{var p,m;const _=u(d);_!=null&&_.project&&($l(),(m=(p=r.current).onProject)==null||m.call(p,_.project))}),c.addEventListener("files.updated",d=>{var p,m;const _=u(d);_!=null&&_.projectId&&((m=(p=r.current).onArtifacts)==null||m.call(p,_.projectId))}),c.addEventListener("run.log",d=>{const _=u(d);_!=null&&_.runId&&(VCn(_),j3.onRunLog(_))}),c.addEventListener("chat.session",d=>{const _=u(d);_!=null&&_.session&&($l(),Ol({type:"session",session:_.session}))}),c.addEventListener("chat.session.deleted",d=>{const _=u(d);_!=null&&_.sessionId&&($l(),Ol({type:"sessionDeleted",sessionId:_.sessionId}))}),c.addEventListener("chat.message",d=>{const _=u(d);_!=null&&_.message&&($l(),Ol({type:"message",sessionId:_.sessionId,message:_.message}))}),c.addEventListener("chat.busy",d=>{const _=u(d);_!=null&&_.sessionId&&($l(),Ol({type:"busy",sessionId:_.sessionId,busy:_.busy}))}),c.addEventListener("chat.usage",d=>{const _=u(d);_!=null&&_.sessionId&&_.usage&&Ol({type:"usage",sessionId:_.sessionId,usage:_.usage})}),c.addEventListener("chat.queued",d=>{const _=u(d);_!=null&&_.sessionId&&Ol({type:"queued",sessionId:_.sessionId,items:_.items??[]})}),c.addEventListener("chat.branch",d=>{const _=u(d);_!=null&&_.sessionId&&Ol({type:"branch",sessionId:_.sessionId,activeLeafId:_.activeLeafId??null})}),c.addEventListener("harness.auth",d=>{const _=u(d);_!=null&&_.harness&&_.authState&&NN(_)}),c.addEventListener("harness.catalog",()=>ZCn()),c.addEventListener("datadir.move.progress",d=>{const _=u(d);_&&I2({type:"progress",..._})}),c.addEventListener("datadir.move.done",d=>{const _=u(d);_&&I2({type:"done",path:_.path,oldPathLeft:_.oldPathLeft})}),c.addEventListener("datadir.move.error",d=>{const _=u(d);_&&I2({type:"error",error:_.error})}),c.addEventListener("update.status",d=>{const _=u(d);_&&t7n(_)}),c.addEventListener("overleaf.live",d=>{const _=u(d);_!=null&&_.key&&_.status&&AN({type:"live",key:_.key,status:_.status})}),c.addEventListener("overleaf.pulled",d=>{const _=u(d);_!=null&&_.key&&Array.isArray(_.paths)&&AN({type:"pulled",key:_.key,paths:_.paths})})};return i(),()=>{n=!0,window.clearTimeout(s),window.clearTimeout(o),t==null||t.close()}},[])}const Km=new Set;function a7n(e){const r=T.useRef(e);r.current=e,T.useEffect(()=>{const t={onRun:n=>r.current.onRun(n),onRunLog:n=>{var s,o;return(o=(s=r.current).onRunLog)==null?void 0:o.call(s,n)},onReconnect:()=>{var n,s;return(s=(n=r.current).onReconnect)==null?void 0:s.call(n)}};return Km.add(t),()=>{Km.delete(t)}},[])}const j3={onRun:e=>Km.forEach(r=>r.onRun(e)),onRunLog:e=>Km.forEach(r=>{var t;return(t=r.onRunLog)==null?void 0:t.call(r,e)}),onReconnect:()=>Km.forEach(e=>{var r;return(r=e.onReconnect)==null?void 0:r.call(e)})},So=e=>({queryKey:Mt("listChatSessions",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,async()=>{const s=await X6n(e,r),o=t.getQueryData(n);return s.filter(a=>!Pc.has(a.id)).map(a=>{var i;return{...a,contextUsage:a.contextUsage??((i=o==null?void 0:o.find(c=>c.id===a.id))==null?void 0:i.contextUsage)}})},i0),staleTime:3e4}),oI=()=>({queryKey:Mt("listNativeChats"),queryFn:({signal:e})=>Y6n(e),staleTime:0}),i7n=()=>({queryKey:Mt("listAllChatSessions"),queryFn:async({signal:e})=>(await J6n(e)).filter(r=>!Pc.has(r.id)),staleTime:0}),Fc=e=>({queryKey:Mt("getChatMessages",e),queryFn:async({signal:r,client:t,queryKey:n})=>{var d;const s=t.getQueryData(n),o=await vp(t,n,()=>uCn(e,r),(_,p,m)=>{if(!p)return _;const k=new Set([...m].filter(x=>x.startsWith("message:")).map(x=>x.slice(8)));return{messages:i0(_.messages,p.messages,k,!1),queued:m.has("queued")?p.queued:_.queued,activeLeafId:m.has("branch")||k.size?p.activeLeafId:_.activeLeafId}});r.throwIfAborted();const a=t.getQueryData(n),c=s!==void 0&&o.messages.some(_=>_.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===_.id)))?[]:(a==null?void 0:a.messages.filter(_=>_.id.startsWith("local-")))??[],u=c.some(_=>_.id===(a==null?void 0:a.activeLeafId));return{...o,messages:[...o.messages,...c.filter(_=>!o.messages.some(p=>p.id===_.id))],activeLeafId:a&&(u||!((d=a.activeLeafId)!=null&&d.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:o.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"});async function c7n(e,r,t){const n=new Map,s=hg(o=>{(o.type==="busy"||o.type==="usage")&&n.set(o.sessionId,{...n.get(o.sessionId),...o.type==="busy"?{busy:o.busy}:{contextUsage:o.usage}})});try{const o=await eCn(e,r,t);return t.throwIfAborted(),{...o,sessions:o.sessions.map(a=>({...a,...n.get(a.id)}))}}finally{s()}}const Lf="local-",aI="bash";function MN(e,r){const t=e.findIndex(n=>n.id===r.id);if(t>=0){const n=e.slice();return n[t]=r,n}return r.role!=="user"?[...e,r]:[...e.filter(n=>!n.id.startsWith(Lf)),r]}function l7n(e,r){switch(r.type){case"upsertMessage":{const t=e.messagesBySession[r.sessionId]??[],n=t.some(i=>i.id===r.message.id),s=e.activeLeafBySession[r.sessionId]??null,o=r.message.role==="user"&&s!==null&&s.startsWith(Lf),a=r.message.parentId!=null&&r.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:MN(t,r.message)},activeLeafBySession:n&&!o&&!a?e.activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:r.message.id}}}case"localError":{const t=e.messagesBySession[r.sessionId]??[],n={id:`${Lf}senderr-${Date.now()}`,role:"assistant",parts:[{id:"p0",type:"tool",tool:"error",state:{status:"error",error:r.text}}],createdAt:Date.now(),parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:[...t,n]},activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:n.id}}}case"localShell":{const t=e.messagesBySession[r.sessionId]??[],n=t.find(o=>o.id===r.id),s={id:r.id,role:"user",parts:[{id:"p0",type:"tool",tool:aI,state:{status:r.error===void 0?"running":"error",input:{command:r.command},error:r.error}}],createdAt:(n==null?void 0:n.createdAt)??Date.now(),parentId:n?n.parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:n?MN(t,s):[...t,s]},activeLeafBySession:n?e.activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:s.id}}}case"activeLeaf":return{...e,activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:r.leafId}};case"optimisticUser":{const t=e.messagesBySession[r.sessionId]??[],n=r.text?[{id:"p0",type:"text",text:r.text}]:[];r.attachments.forEach((o,a)=>n.push({id:`img${a}`,type:"image",text:o.url,name:o.name})),r.annotations.forEach((o,a)=>n.push({id:`annotation${a}`,type:"annotation",text:o.text}));const s={id:`${Lf}${Date.now()}`,role:"user",parts:n,createdAt:Date.now(),parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:[...t,s]},activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:s.id}}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[r.sessionId]:r.items}}}}let iI=0;function cI(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}Je.getQueryCache().subscribe(e=>{cI(e)&&iI++});const u7n=e=>Je.getQueryCache().subscribe(r=>{cI(r)&&e()}),_7n=()=>iI;function f7n(e,r){const t=Je.getQueryData(So(e).queryKey)??[],n=new Set(t.filter(a=>a.busy).map(a=>a.id)),s={messagesBySession:{},queuedBySession:{},activeLeafBySession:{},busySessions:n},o=new Set(n);r&&o.add(r);for(const a of o){const i=Je.getQueryData(Fc(a).queryKey);i&&(s.messagesBySession[a]=i.messages,s.queuedBySession[a]=i.queued,s.activeLeafBySession[a]=i.activeLeafId)}return s}function lI(e,r,t=!1){if(r.type==="busy"){yi(Je,So(e).queryKey,r.sessionId),Je.setQueryData(So(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===r.sessionId?{...u,busy:r.busy}:u));return}const n=Fc(r.sessionId);if(Pc.has(r.sessionId))return;yi(Je,n.queryKey,r.type==="upsertMessage"?`message:${r.message.id}`:r.type==="setQueued"?"queued":r.type==="activeLeaf"?"branch":"local");const s=Je.getQueryData(n.queryKey);if(t&&!s)return;const o={messagesBySession:s?{[r.sessionId]:s.messages}:{},queuedBySession:s?{[r.sessionId]:s.queued}:{},activeLeafBySession:s?{[r.sessionId]:s.activeLeafId}:{},busySessions:new Set},a=l7n(o,r),i={messages:a.messagesBySession[r.sessionId]??[],queued:a.queuedBySession[r.sessionId]??[],activeLeafId:a.activeLeafBySession[r.sessionId]??null};Je.setQueryData(n.queryKey,i)}function d7n(e,r){const t=!!r&&!Pc.has(r??""),n=dt({...Fc(r??""),enabled:t,subscribed:t}),s=T.useSyncExternalStore(u7n,_7n),o=T.useMemo(()=>f7n(e,r),[e,r,s,n.data]),a=Si()[1],i=T.useCallback(c=>{Wr(["workspace",a])&&lI(e,c)},[e,a]);return[o,i,n]}const Vf=()=>({queryKey:Mt("listProjects"),queryFn:({signal:e,client:r,queryKey:t})=>vp(r,t,()=>Ujn(e),i0),staleTime:3e4}),ON=()=>({queryKey:Mt("listProjectActivity"),queryFn:({signal:e})=>Gjn(e),staleTime:3e4}),f0=()=>({queryKey:Mt("getUiState"),queryFn:({signal:e})=>Wjn(e),staleTime:3e5}),oS=e=>({queryKey:Mt("getProjectUiState",e),queryFn:({signal:r})=>Kjn(e,r),staleTime:3e5}),Vm=(e="")=>({queryKey:Mt("getProjectPathStatus",e),queryFn:({signal:r})=>Zjn(e,r),staleTime:3e4}),uI=e=>({queryKey:Mt("searchPapers",e),queryFn:({signal:r})=>rSn(e,r),staleTime:3e5}),h7n=()=>({queryKey:Mt("githubAccount"),queryFn:({signal:e})=>nSn(e),staleTime:3e5}),p7n=e=>({queryKey:Mt("githubProjectRepoPreview",e),queryFn:({signal:r})=>sSn(e,r),staleTime:3e4}),$N=(e,r)=>({queryKey:Mt("repoAccess",e,r),queryFn:({signal:t})=>oSn(e,r,t),staleTime:3e4}),S3=e=>({queryKey:Mt("resolvePaper",e),queryFn:({signal:r})=>aSn(e,r),staleTime:36e5}),m7n=(e,r,t,n)=>({queryKey:Mt("getProjectStarterPrompts",e,r,t,n),queryFn:({signal:s})=>lSn(e,r,t,n,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),kb=e=>({queryKey:Mt("listExperiments",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,()=>uSn(e,r),i0),staleTime:3e4}),d_=e=>({queryKey:Mt("listRuns",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,()=>fSn(e,r),i0),staleTime:3e4});function Bv(e,r){if(!e)return;const t=e.find(n=>n.id===r.id);return t&&t.updatedAt>r.updatedAt?e:t?e.map(n=>n.id===r.id?r:n):[...e,r]}function DN(){const e=Si();return o7n({onRun(r){var n;if(!Wr(e))return;const t=(n=Je.getQueryData(d_(r.projectId).queryKey))==null?void 0:n.find(s=>s.id===r.id);yi(Je,d_(r.projectId).queryKey,r.id),Je.setQueryData(d_(r.projectId).queryKey,s=>Bv(s,r)),(t==null?void 0:t.commitSha)!==r.commitSha&&($a(["getRunDiff"],e,s=>s.queryKey[3]===r.id),$a(["getExperimentDiff"],e,s=>s.queryKey[3]===r.experimentId)),j3.onRun(r)},onExperiment(r){Wr(e)&&(yi(Je,kb(r.projectId).queryKey,r.id),Je.setQueryData(kb(r.projectId).queryKey,t=>Bv(t,r)),$a(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===r.projectId),$a(["getExperimentDiff"],e,t=>t.queryKey[3]===r.id),$a(["getRunDiff"],e,t=>{var n;return((n=Je.getQueryData(d_(r.projectId).queryKey))==null?void 0:n.some(s=>s.experimentId===r.id&&s.id===t.queryKey[3]))??!1}))},onProject(r){Wr(e)&&(yi(Je,Vf().queryKey,r.id),Je.setQueryData(Vf().queryKey,t=>Bv(t,r)))},onArtifacts(r){Wr(e)&&($a(Mj,e,t=>t.queryKey[3]===r),$a(["resolvedFile"],e,t=>t.queryKey[3]===r&&t.queryKey[5]==="artifacts"))},onReconnect(){Wr(e)&&($a(vX,e),j3.onReconnect())}}),T.useEffect(()=>{let r,t;const n=()=>{t??(t=setTimeout(()=>{t=void 0,$a(["listSidebarChatSessions"],e)},100))},o=QCn(()=>{r??(r=setTimeout(()=>{r=void 0,$a(["listProjectActivity"],e)},100))}),a=sI(_=>{_.type==="done"&&$a(["getDataDir"],e)}),i=hg(_=>{if(Wr(e)){if((_.type==="session"||_.type==="sessionDeleted")&&n(),_.type==="session"?yi(Je,So(_.session.projectId).queryKey,_.session.id):(_.type==="busy"||_.type==="usage")&&yi(Je,[...e,"listChatSessions"],_.sessionId),(_.type==="message"||_.type==="queued"||_.type==="branch")&&lI("",_.type==="message"?{type:"upsertMessage",sessionId:_.sessionId,message:_.message}:_.type==="queued"?{type:"setQueued",sessionId:_.sessionId,items:_.items}:{type:"activeLeaf",sessionId:_.sessionId,leafId:_.activeLeafId},!0),_.type==="session"&&!Pc.has(_.session.id))Je.setQueryData(So(_.session.projectId).queryKey,p=>{if(!p)return;const m=p.find(k=>k.id===_.session.id);return m?Bv(p,{..._.session,contextUsage:_.session.contextUsage??m.contextUsage}):[_.session,...p]});else if(_.type==="sessionDeleted")by(_.sessionId);else if(_.type==="busy"||_.type==="usage"){const p=m=>m.id!==_.sessionId?m:_.type==="busy"?{...m,busy:_.busy}:{...m,contextUsage:_.usage};Je.setQueriesData({queryKey:[...e,"listChatSessions"]},m=>m==null?void 0:m.map(p)),Je.setQueriesData({queryKey:[...e,"listSidebarChatSessions"]},m=>m&&{...m,pages:m.pages.map(k=>({...k,sessions:k.sessions.map(p)}))})}}}),c=XCn(({harness:_})=>{Wr(e)&&(_==="*"?Kf(!0):UCn(_)).catch(()=>{})}),u=YCn(()=>{Wr(e)&&Je.fetchQuery({...su(),staleTime:0}).catch(()=>{})}),d=e7n(_=>{Wr(e)&&(yi(Je,wb().queryKey),Je.setQueryData(wb().queryKey,_))});return()=>{clearTimeout(r),clearTimeout(t),o(),a(),i(),c(),u(),d()}},[e[1]]),null}const C3=new Set;function _I(e){if(e!==C()){cD(e,{reload:!1}),document.documentElement.lang=e;for(const r of C3)r()}}function g7n(e){return C3.add(e),()=>C3.delete(e)}function cu(){return T.useSyncExternalStore(g7n,C,C)}const ky="__ORX_MAC_TITLEBAR__"in window,fI="__ORX_WIN_TITLEBAR__"in window;let LN="system",IN="",P2=!1;const rh=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function PN(e){if(!rh)return null;rh.clearRect(0,0,1,1),rh.fillStyle="transparent",rh.fillStyle=e,rh.fillRect(0,0,1,1);const[r,t,n,s]=rh.getImageData(0,0,1,1).data;return s!==255?null:[r,t,n].map(o=>o.toString(16).padStart(2,"0")).join("")}function v7n(){const e=document.elementsFromPoint(window.innerWidth/2,0),r=e.findIndex(t=>t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY));for(const t of e.slice(Math.max(r,0))){const n=PN(getComputedStyle(t).backgroundColor);if(n)return n}return PN(getComputedStyle(document.documentElement).backgroundColor)}function z3(e){e&&(LN=e),!(!ky||P2)&&(P2=!0,setTimeout(()=>{var n;P2=!1;const r=v7n(),t=`titlebar:${LN}:${r}`;!r||t===IN||(IN=t,(n=window.ipc)==null||n.postMessage(t))},100))}ky&&(new MutationObserver(()=>z3()).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style","data-theme"]}),window.addEventListener("resize",()=>z3()));const b7n="a, button, input, select, textarea, label, summary, [role='button'], [role='tab'], [role='menuitem'], [role='option'], [role='switch'], [role='checkbox'], [contenteditable]:not([contenteditable='false']), [tabindex]:not([tabindex='-1'])",BN=ky?28:fI?32:0;if(BN){document.documentElement.classList.add(ky?"mac-titlebar":"win-titlebar");let e=!1;window.addEventListener("mousedown",r=>{var t;e=!1,!(r.button!==0||r.defaultPrevented||r.clientY>=BN)&&(r.target instanceof Element&&r.target.closest(b7n)||(r.detail===2?(t=window.ipc)==null||t.postMessage("titlebar:zoom"):e=!0))}),window.addEventListener("mousemove",r=>{var t;!e||r.buttons!==1||(e=!1,(t=window.ipc)==null||t.postMessage("titlebar:drag"))}),window.addEventListener("mouseup",()=>{e=!1})}const dI="orx:theme";function y7n(){try{const e=localStorage.getItem(dI);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Qf=y7n();const E3=new Set;function x7n(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function aS(){document.documentElement.dataset.theme=x7n(Qf),z3(Qf)}function hI(e){Qf=e;try{localStorage.setItem(dI,e)}catch{}aS();for(const r of E3)r()}function w7n(){return Qf}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Qf==="system"&&aS()});aS();function k7n(e){return E3.add(e),()=>E3.delete(e)}function pI(){return[T.useSyncExternalStore(k7n,()=>Qf,()=>Qf),hI]}const j7n=(e,r)=>{const t=new Array(e.length+r.length);for(let n=0;n({classGroupId:e,validator:r}),mI=(e=new Map,r=null,t)=>({nextPart:e,validators:r,classGroupId:t}),jb="-",FN=[],C7n="arbitrary..",z7n=e=>{const r=N7n(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return E7n(a);const i=a.split(jb),c=i[0]===""&&i.length>1?1:0;return gI(i,c,r)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=n[a],u=t[a];return c?u?j7n(u,c):c:u||FN}return t[a]||FN}}},gI=(e,r,t)=>{if(e.length-r===0)return t.classGroupId;const s=e[r],o=t.nextPart.get(s);if(o){const u=gI(e,r+1,o);if(u)return u}const a=t.validators;if(a===null)return;const i=r===0?e.join(jb):e.slice(r).join(jb),c=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),t=r.indexOf(":"),n=r.slice(0,t);return n?C7n+n:void 0})(),N7n=e=>{const{theme:r,classGroups:t}=e;return A7n(t,r)},A7n=(e,r)=>{const t=mI();for(const n in e){const s=e[n];iS(s,t,n,r)}return t},iS=(e,r,t,n)=>{const s=e.length;for(let o=0;o{if(typeof e=="string"){R7n(e,r,t);return}if(typeof e=="function"){M7n(e,r,t,n);return}O7n(e,r,t,n)},R7n=(e,r,t)=>{const n=e===""?r:vI(r,e);n.classGroupId=t},M7n=(e,r,t,n)=>{if($7n(e)){iS(e(n),r,t,n);return}r.validators===null&&(r.validators=[]),r.validators.push(S7n(t,e))},O7n=(e,r,t,n)=>{const s=Object.entries(e),o=s.length;for(let a=0;a{let t=e;const n=r.split(jb),s=n.length;for(let o=0;o"isThemeGetter"in e&&e.isThemeGetter===!0,D7n=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=Object.create(null),n=Object.create(null);const s=(o,a)=>{t[o]=a,r++,r>e&&(r=0,n=t,t=Object.create(null))};return{get(o){let a=t[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return s(o,a),a},set(o,a){o in t?t[o]=a:s(o,a)}}},N3="!",HN=":",L7n=[],qN=(e,r,t,n,s)=>({modifiers:e,hasImportantModifier:r,baseClassName:t,maybePostfixModifierPosition:n,isExternal:s}),I7n=e=>{const{prefix:r,experimentalParseClassName:t}=e;let n=s=>{const o=[];let a=0,i=0,c=0,u;const d=s.length;for(let x=0;xc?u-c:void 0;return qN(o,m,p,k)};if(r){const s=r+HN,o=n;n=a=>a.startsWith(s)?o(a.slice(s.length)):qN(L7n,!1,a,void 0,!0)}if(t){const s=n;n=o=>t({className:o,parseClassName:s})}return n},P7n=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((t,n)=>{r.set(t,1e6+n)}),t=>{const n=[];let s=[];for(let o=0;o0&&(s.sort(),n.push(...s),s=[]),n.push(a)):s.push(a)}return s.length>0&&(s.sort(),n.push(...s)),n}},B7n=e=>({cache:D7n(e.cacheSize),parseClassName:I7n(e),sortModifiers:P7n(e),postfixLookupClassGroupIds:F7n(e),...z7n(e)}),F7n=e=>{const r=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let n=0;n{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:o,postfixLookupClassGroupIds:a}=r,i=[],c=e.trim().split(H7n);let u="";for(let d=c.length-1;d>=0;d-=1){const _=c[d],{isExternal:p,modifiers:m,hasImportantModifier:k,baseClassName:x,maybePostfixModifierPosition:v}=t(_);if(p){u=_+(u.length>0?" "+u:u);continue}let b=!!v,w;if(b){const A=x.substring(0,v);w=n(A);const E=w&&a[w]?n(x):void 0;E&&E!==w&&(w=E,b=!1)}else w=n(x);if(!w){if(!b){u=_+(u.length>0?" "+u:u);continue}if(w=n(x),!w){u=_+(u.length>0?" "+u:u);continue}b=!1}const y=m.length===0?"":m.length===1?m[0]:o(m).join(":"),S=k?y+N3:y,z=S+w;if(i.indexOf(z)>-1)continue;i.push(z);const N=s(w,b);for(let A=0;A0?" "+u:u)}return u},U7n=(...e)=>{let r=0,t,n,s="";for(;r{if(typeof e=="string")return e;let r,t="";for(let n=0;n{let t,n,s,o;const a=c=>{const u=r.reduce((d,_)=>_(d),e());return t=B7n(u),n=t.cache.get,s=t.cache.set,o=i,i(c)},i=c=>{const u=n(c);if(u)return u;const d=q7n(c,t);return s(c,d),d};return o=a,(...c)=>o(U7n(...c))},G7n=[],Os=e=>{const r=t=>t[e]||G7n;return r.isThemeGetter=!0,r},yI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,W7n=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,K7n=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V7n=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Q7n=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,X7n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y7n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gu=e=>W7n.test(e),Sr=e=>!!e&&!Number.isNaN(Number(e)),kc=e=>!!e&&Number.isInteger(Number(e)),B2=e=>e.endsWith("%")&&Sr(e.slice(0,-1)),Dl=e=>K7n.test(e),wI=()=>!0,Z7n=e=>V7n.test(e)&&!Q7n.test(e),cS=()=>!1,J7n=e=>X7n.test(e),ezn=e=>Y7n.test(e),tzn=e=>!xt(e)&&!kt(e),rzn=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),nzn=e=>A_(e,SI,cS),xt=e=>yI.test(e),af=e=>A_(e,CI,Z7n),GN=e=>A_(e,_zn,Sr),szn=e=>A_(e,EI,wI),ozn=e=>A_(e,zI,cS),WN=e=>A_(e,kI,cS),azn=e=>A_(e,jI,ezn),Fv=e=>A_(e,NI,J7n),kt=e=>xI.test(e),xm=e=>dd(e,CI),izn=e=>dd(e,zI),KN=e=>dd(e,kI),czn=e=>dd(e,SI),lzn=e=>dd(e,jI),Hv=e=>dd(e,NI,!0),uzn=e=>dd(e,EI,!0),A_=(e,r,t)=>{const n=yI.exec(e);return n?n[1]?r(n[1]):t(n[2]):!1},dd=(e,r,t=!1)=>{const n=xI.exec(e);return n?n[1]?r(n[1]):t:!1},kI=e=>e==="position"||e==="percentage",jI=e=>e==="image"||e==="url",SI=e=>e==="length"||e==="size"||e==="bg-size",CI=e=>e==="length",_zn=e=>e==="number",zI=e=>e==="family-name",EI=e=>e==="number"||e==="weight",NI=e=>e==="shadow",VN=()=>{const e=Os("color"),r=Os("font"),t=Os("text"),n=Os("font-weight"),s=Os("tracking"),o=Os("leading"),a=Os("breakpoint"),i=Os("container"),c=Os("spacing"),u=Os("radius"),d=Os("shadow"),_=Os("inset-shadow"),p=Os("text-shadow"),m=Os("drop-shadow"),k=Os("blur"),x=Os("perspective"),v=Os("aspect"),b=Os("ease"),w=Os("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...S(),kt,xt],N=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],E=()=>[kt,xt,c],M=()=>[Gu,"full","auto",...E()],$=()=>[kc,"none","subgrid",kt,xt],D=()=>["auto",{span:["full",kc,kt,xt]},kc,kt,xt],I=()=>[kc,"auto",kt,xt],G=()=>["auto","min","max","fr",kt,xt],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...E()],J=()=>[Gu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],ee=()=>[Gu,"screen","full","dvw","lvw","svw","min","max","fit",...E()],P=()=>[Gu,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],L=()=>[e,kt,xt],F=()=>[...S(),KN,WN,{position:[kt,xt]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",czn,nzn,{size:[kt,xt]}],oe=()=>[B2,xm,af],ie=()=>["","none","full",u,kt,xt],ce=()=>["",Sr,xm,af],re=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Sr,B2,KN,WN],le=()=>["","none",k,kt,xt],me=()=>["none",Sr,kt,xt],be=()=>["none",Sr,kt,xt],Se=()=>[Sr,kt,xt],Be=()=>[Gu,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Dl],breakpoint:[Dl],color:[wI],container:[Dl],"drop-shadow":[Dl],ease:["in","out","in-out"],font:[tzn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Dl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Dl],shadow:[Dl],spacing:["px",Sr],text:[Dl],"text-shadow":[Dl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gu,xt,kt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",kt,xt]}],"container-named":[rzn],columns:[{columns:[Sr,xt,kt,i]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:z()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[kc,"auto",kt,xt]}],basis:[{basis:[Gu,"full","auto",i,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Sr,Gu,"auto","initial","none",xt]}],grow:[{grow:["",Sr,kt,xt]}],shrink:[{shrink:["",Sr,kt,xt]}],order:[{order:[kc,"first","last","none",kt,xt]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...ee()]}],"min-inline-size":[{"min-inline":["auto",...ee()]}],"max-inline-size":[{"max-inline":["none",...ee()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[i,"screen",...J()]}],"min-w":[{"min-w":[i,"screen","none",...J()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",t,xm,af]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,uzn,szn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",B2,xt]}],"font-family":[{font:[izn,ozn,r]}],"font-features":[{"font-features":[xt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,kt,xt]}],"line-clamp":[{"line-clamp":[Sr,"none",kt,GN]}],leading:[{leading:[o,...E()]}],"list-image":[{"list-image":["none",kt,xt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",kt,xt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Sr,"from-font","auto",kt,af]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Sr,"auto",kt,xt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"tab-size":[{tab:[kc,kt,xt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",kt,xt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",kt,xt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},kc,kt,xt],radial:["",kt,xt],conic:[kc,kt,xt]},lzn,azn]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Sr,kt,xt]}],"outline-w":[{outline:["",Sr,xm,af]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",d,Hv,Fv]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",_,Hv,Fv]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Sr,af]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,Hv,Fv]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Sr,kt,xt]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Sr]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[kt,xt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Sr]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",kt,xt]}],filter:[{filter:["","none",kt,xt]}],blur:[{blur:le()}],brightness:[{brightness:[Sr,kt,xt]}],contrast:[{contrast:[Sr,kt,xt]}],"drop-shadow":[{"drop-shadow":["","none",m,Hv,Fv]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Sr,kt,xt]}],"hue-rotate":[{"hue-rotate":[Sr,kt,xt]}],invert:[{invert:["",Sr,kt,xt]}],saturate:[{saturate:[Sr,kt,xt]}],sepia:[{sepia:["",Sr,kt,xt]}],"backdrop-filter":[{"backdrop-filter":["","none",kt,xt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Sr,kt,xt]}],"backdrop-contrast":[{"backdrop-contrast":[Sr,kt,xt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Sr,kt,xt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Sr,kt,xt]}],"backdrop-invert":[{"backdrop-invert":["",Sr,kt,xt]}],"backdrop-opacity":[{"backdrop-opacity":[Sr,kt,xt]}],"backdrop-saturate":[{"backdrop-saturate":[Sr,kt,xt]}],"backdrop-sepia":[{"backdrop-sepia":["",Sr,kt,xt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",kt,xt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Sr,"initial",kt,xt]}],ease:[{ease:["linear","initial",b,kt,xt]}],delay:[{delay:[Sr,kt,xt]}],animate:[{animate:["none",w,kt,xt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,kt,xt]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[kt,xt,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],zoom:[{zoom:[kc,kt,xt]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",kt,xt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",kt,xt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Sr,xm,af,GN]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fzn=(e,{cacheSize:r,prefix:t,experimentalParseClassName:n,extend:s={},override:o={}})=>(_h(e,"cacheSize",r),_h(e,"prefix",t),_h(e,"experimentalParseClassName",n),qv(e.theme,o.theme),qv(e.classGroups,o.classGroups),qv(e.conflictingClassGroups,o.conflictingClassGroups),qv(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),_h(e,"postfixLookupClassGroups",o.postfixLookupClassGroups),_h(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Uv(e.theme,s.theme),Uv(e.classGroups,s.classGroups),Uv(e.conflictingClassGroups,s.conflictingClassGroups),Uv(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),A3(e,s,"postfixLookupClassGroups"),A3(e,s,"orderSensitiveModifiers"),e),_h=(e,r,t)=>{t!==void 0&&(e[r]=t)},qv=(e,r)=>{if(r)for(const t in r)_h(e,t,r[t])},Uv=(e,r)=>{if(r)for(const t in r)A3(e,r,t)},A3=(e,r,t)=>{const n=r[t];n!==void 0&&(e[t]=e[t]?e[t].concat(n):n)},dzn=(e,...r)=>typeof e=="function"?UN(VN,e,...r):UN(()=>fzn(VN(),e),...r),hzn=dzn({extend:{theme:{text:["menu"]}}});function Ls(...e){return hzn(...e)}const pzn={default:"border-transparent bg-surface text-subtext",success:"border-accent-green bg-accent-green-subtle text-accent-green",error:"border-accent-red bg-accent-red-subtle text-accent-red",warning:"border-accent-amber bg-accent-amber-subtle text-accent-amber"};function Zt({variant:e="default",size:r="default",className:t,...n}){return f.jsx("span",{className:Ls("badge inline-flex items-center rounded-full border py-px font-sans",r==="small"?"px-1.5 text-xs font-normal":"px-2 text-sm font-medium",pzn[e],t),...n})}const mzn=["btn inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap border font-medium","transition-[background,border-color,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),gzn={default:"border-border bg-background text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight",primary:"border-primary bg-primary text-background [&:hover:not(:disabled)]:border-primary-hover [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:border-primary-active [&:active:not(:disabled)]:bg-primary-active",ghost:"border-transparent bg-transparent text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-muted",danger:"border-border bg-background text-accent-red [&:hover:not(:disabled)]:bg-danger-hover [&:active:not(:disabled)]:bg-danger-active",warning:"border-accent-amber bg-background text-accent-amber [&:hover:not(:disabled)]:bg-accent-amber-subtle [&:active:not(:disabled)]:bg-highlight"},vzn={default:"h-8 rounded-md px-3.5 text-sm",small:"h-7 rounded-sm px-2.5 text-sm",large:"h-14 rounded-lg px-7 text-xl"};function AI(e,r,t,n){return Ls(mzn,gzn[e],vzn[r],t&&"active",n)}function Oe({active:e=!1,variant:r="default",size:t="default",className:n,...s}){return f.jsx("button",{className:AI(r,t,e,n),...s})}function Xf({active:e=!1,variant:r="default",size:t="default",className:n,...s}){return f.jsx("a",{className:AI(r,t,e,n),...s})}const bzn=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),yzn={default:"text-subtext [&:hover:not(:disabled)]:bg-surface [&:hover:not(:disabled)]:text-text [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-primary",primary:"bg-primary text-background [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:bg-primary-active",stop:"bg-surface text-text [&:hover:not(:disabled)]:bg-stop-hover [&:active:not(:disabled)]:bg-highlight"},xzn={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function TI(e,r,t,n,s){return Ls(bzn,yzn[e],xzn[r],n==="circle"&&"rounded-full",t&&"active",s)}const Rt=T.forwardRef(function({active:r=!1,shape:t="rounded",size:n="default",variant:s="default",className:o,...a},i){return f.jsx("button",{ref:i,className:TI(s,n,r,t,o),...a})});function yp({active:e=!1,shape:r="rounded",size:t="default",variant:n="default",className:s,...o}){return f.jsx("a",{className:TI(n,t,e,r,s),...o})}const wzn={default:"h-8 rounded-md border border-border bg-background px-2.5 py-1.5 focus:border-text",inline:"h-8 rounded-none border-x-0 border-t-0 border-b border-transparent bg-transparent px-0 py-0 focus:border-text"};function Nn({variant:e="default",className:r,...t}){return f.jsx("input",{className:Ls("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",wzn[e],r),...t})}function _r({active:e=!1,danger:r=!1,size:t="default",className:n,...s}){return f.jsx("button",{className:Ls("model-item flex w-full items-center justify-between gap-2 rounded-sm px-2 text-start transition-[background,color] duration-120 ease-standard hover:bg-surface focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-45 [&_.model-id]:block [&_.model-id]:text-xs [&_.model-id]:text-muted",t==="compact"?"min-h-6 py-0.5 text-menu":"min-h-8 py-1.5 text-sm",e&&"bg-surface",r&&"text-accent-red hover:text-accent-red",n),...s})}function Nt({className:e,...r}){return f.jsx("span",{className:Ls("spinner h-[13px] w-[13px] shrink-0 animate-[spin_0.8s_linear_infinite] rounded-full border-2 border-border border-t-primary",e),...r})}function Gn({className:e,...r}){return f.jsx("div",{className:Ls("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...r})}const kzn={success:"text-accent-green",danger:"text-accent-red",info:"text-accent-teal",warning:"text-accent-amber",caution:"text-accent-orange",accent:"text-accent-purple",neutral:"text-muted"};function Eh({tone:e="neutral",live:r=!1,className:t,children:n,...s}){return f.jsxs("span",{className:Ls("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:Ls("h-[7px] w-[7px] shrink-0 rounded-full bg-current",kzn[e],r&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),n]})}const jzn=["relative h-5.5 w-9.5 flex-none rounded-full border border-border bg-panel","transition-[background,border-color] duration-120 ease-standard","[&_span]:absolute [&_span]:start-[3px] [&_span]:top-[3px] [&_span]:h-3.5 [&_span]:w-3.5","[&_span]:rounded-full [&_span]:bg-muted [&_span]:transition-[translate,background] [&_span]:duration-120 [&_span]:ease-standard","hover:border-border-strong","disabled:cursor-default disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2"].join(" ");function RI(e,r){return Ls(jzn,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",r)}function lS({checked:e=!1,className:r,children:t,...n}){return f.jsx("button",{role:"switch","aria-checked":e,className:RI(e,r),...n,children:t??f.jsx("span",{})})}function Szn({checked:e=!1,className:r,...t}){return f.jsx("span",{className:RI(e,r),...t,children:f.jsx("span",{})})}var Vs=S$();const Czn=n0(Vs);function zzn(e){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",r.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const Ezn=e=>{switch(e){case"success":return Tzn;case"info":return Mzn;case"warning":return Rzn;case"error":return Ozn;default:return null}},Nzn=Array(12).fill(0),Azn=({visible:e,className:r})=>st.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":e},st.createElement("div",{className:"sonner-spinner"},Nzn.map((t,n)=>st.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),Tzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Rzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Mzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Ozn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),$zn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},st.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),st.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Dzn=()=>{const[e,r]=st.useState(document.hidden);return st.useEffect(()=>{const t=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let Lzn=1;const Izn=100,QN=e=>{var r;return typeof(e==null?void 0:e.id)=="number"||(e==null||(r=e.id)==null?void 0:r.length)>0?e.id:Lzn++};class Pzn{constructor(){this.subscribe=r=>(this.subscribers.push(r),this.getActiveToasts().forEach(t=>r(t)),()=>{const t=this.subscribers.indexOf(r);this.subscribers.splice(t,1)}),this.publish=r=>{this.subscribers.forEach(t=>t(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r],this.trimHistory()},this.trimHistory=()=>{let r=this.toasts.length-Izn;r<=0||(this.toasts=this.toasts.filter(t=>r>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),r--,!1):!0))},this.create=r=>{const{message:t,...n}=r,s=QN(r),o=this.pendingDismissals.get(s);o!==void 0&&(cancelAnimationFrame(o),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const a=this.dismissedToasts.has(s),i=r.dismissible===void 0?!0:r.dismissible;return a&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(u=>u.id!==s)),(a?void 0:this.toasts.find(u=>u.id===s))?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...r,id:s,title:t}),{...u,...r,id:s,dismissible:i,title:t}):u):this.addToast({title:t,...n,dismissible:i,id:s}),s},this.dismiss=r=>{if(r==null)return this.getActiveToasts().forEach(n=>{this.dismissedToasts.add(n.id),this.subscribers.forEach(s=>s({id:n.id,dismiss:!0}))}),r;this.dismissedToasts.add(r);const t=this.pendingDismissals.get(r);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(r,requestAnimationFrame(()=>{this.pendingDismissals.delete(r),this.subscribers.forEach(n=>n({id:r,dismiss:!0}))})),r},this.message=(r,t)=>this.create({...t,message:r,type:void 0}),this.error=(r,t)=>this.create({...t,message:r,type:"error"}),this.success=(r,t)=>this.create({...t,type:"success",message:r}),this.info=(r,t)=>this.create({...t,type:"info",message:r}),this.warning=(r,t)=>this.create({...t,type:"warning",message:r}),this.loading=(r,t)=>this.create({...t,type:"loading",message:r}),this.promise=(r,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:r,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(r instanceof Function?r():r);let o=n!==void 0,a;const i=s.then(async u=>{if(a=["resolve",u],st.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(Fzn(u)&&!u.ok){o=!1;const _=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"error",description:p,...k})}else if(u instanceof Error){o=!1;const _=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"error",description:p,...k})}else if(t.success!==void 0){o=!1;const _=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"success",description:p,...k})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){o=!1;const d=typeof t.error=="function"?await t.error(u):t.error,_=typeof t.description=="function"?await t.description(u):t.description,m=typeof d=="object"&&!st.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:_,...m})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((u,d)=>i.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(r,t)=>{const n=QN(t);return this.create({...t,jsx:r(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const ha=new Pzn,Bzn=(e,r)=>ha.message(e,r),Fzn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Hzn=Bzn,qzn=()=>ha.toasts,Uzn=()=>ha.getActiveToasts(),Gzn=Object.assign(Hzn,{success:ha.success,info:ha.info,warning:ha.warning,error:ha.error,custom:ha.custom,message:ha.message,promise:ha.promise,dismiss:ha.dismiss,loading:ha.loading},{getHistory:qzn,getToasts:Uzn});zzn("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Gv(e){return e.label!==void 0}const Wzn=3,Kzn="24px",Vzn="16px",XN=4e3,Qzn=356,Xzn=14,Yzn=45,Zzn=200;function jc(...e){return e.filter(Boolean).join(" ")}function Jzn(e){const[r,t]=e.split("-"),n=[];return r&&n.push(r),t&&n.push(t),n}const e8n=e=>{var r,t,n,s,o,a,i,c,u;const{invert:d,toast:_,unstyled:p,interacting:m,setHeights:k,visibleToasts:x,heights:v,index:b,toasts:w,expanded:y,removeToast:S,defaultRichColors:z,closeButton:N,style:A,cancelButtonStyle:E,actionButtonStyle:M,className:$="",descriptionClassName:D="",duration:I,position:G,gap:H,expandByDefault:Q,classNames:K,icons:J,closeButtonAriaLabel:ee="Close toast"}=e,[P,L]=st.useState(null),[F,q]=st.useState(null),[U,oe]=st.useState(!1),[ie,ce]=st.useState(!1),[re,W]=st.useState(!1),[ae,le]=st.useState(!1),[me,be]=st.useState(!1),[Se,Be]=st.useState(0),[Xe,Me]=st.useState(0),Fe=st.useRef(_.duration||I||XN),pt=st.useRef(null),Ct=st.useRef(null),Vt=b===0,Ut=b+1<=x,Gt=_.type,De=Gt??"default",ct=_.dismissible!==!1,lt=_.className||"",xe=_.descriptionClassName||"",Ie=st.useMemo(()=>v.findIndex(ut=>ut.toastId===_.id)||0,[v,_.id]),Ye=st.useMemo(()=>{var ut;return(ut=_.closeButton)!=null?ut:N},[_.closeButton,N]),Ae=st.useMemo(()=>_.duration||I||XN,[_.duration,I]),Ve=st.useRef(0),Ze=st.useRef(0),at=st.useRef(0),At=st.useRef(null),[Pe,Jt]=G.split("-"),Tt=st.useMemo(()=>v.reduce((ut,dr,Cr)=>Cr>=Ie?ut:ut+dr.height,0),[v,Ie]),Zr=Dzn(),cr=st.useMemo(()=>{var ut;return(ut=e.swipeDirections)!=null?ut:Jzn(G)},[e.swipeDirections,G]),nr=_.invert||d,Wt=Gt==="loading";Ze.current=st.useMemo(()=>Ie*H+Tt,[Ie,Tt]),st.useEffect(()=>{Fe.current=Ae},[Ae]),st.useEffect(()=>{oe(!0)},[]),st.useEffect(()=>{const ut=Ct.current;if(ut){const dr=ut.getBoundingClientRect().height;return Me(dr),k(Cr=>[{toastId:_.id,height:dr,position:_.position},...Cr]),()=>k(Cr=>Cr.filter($r=>$r.toastId!==_.id))}},[k,_.id]),st.useLayoutEffect(()=>{if(!U)return;const ut=Ct.current,dr=ut.style.height;ut.style.height="auto";const Cr=ut.getBoundingClientRect().height;ut.style.height=dr,Me(Cr),k($r=>$r.find(Br=>Br.toastId===_.id)?$r.map(Br=>Br.toastId===_.id?{...Br,height:Cr}:Br):[{toastId:_.id,height:Cr,position:_.position},...$r])},[U,_.title,_.description,k,_.id,_.jsx,_.action,_.cancel]);const wt=st.useCallback(()=>{ce(!0),Be(Ze.current),k(ut=>ut.filter(dr=>dr.toastId!==_.id)),setTimeout(()=>{S(_)},Zzn)},[_,S,k,Ze]);st.useEffect(()=>{if(_.promise&&Gt==="loading"||_.duration===1/0||_.type==="loading")return;let ut;return y||m||Zr?(()=>{if(at.current{Fe.current!==1/0&&(Ve.current=new Date().getTime(),ut=setTimeout(()=>{_.onAutoClose==null||_.onAutoClose.call(_,_),wt()},Fe.current))})(),()=>clearTimeout(ut)},[y,m,_,Gt,Zr,wt]),st.useEffect(()=>{_.delete&&(wt(),_.onDismiss==null||_.onDismiss.call(_,_))},[wt,_.delete]);function ns(){var ut;if(J!=null&&J.loading){var dr;return st.createElement("div",{className:jc(K==null?void 0:K.loader,_==null||(dr=_.classNames)==null?void 0:dr.loader,"sonner-loader"),"data-visible":Gt==="loading"},J.loading)}return st.createElement(Azn,{className:jc(K==null?void 0:K.loader,_==null||(ut=_.classNames)==null?void 0:ut.loader),visible:Gt==="loading"})}const Hr=_.icon||(J==null?void 0:J[Gt])||Ezn(Gt);var en,gr;return st.createElement("li",{tabIndex:0,ref:Ct,className:jc($,lt,K==null?void 0:K.toast,_==null||(r=_.classNames)==null?void 0:r.toast,K==null?void 0:K[De],_==null||(t=_.classNames)==null?void 0:t[De]),"data-sonner-toast":"","data-rich-colors":(en=_.richColors)!=null?en:z,"data-styled":!(_.jsx||_.unstyled||p),"data-mounted":U,"data-promise":!!_.promise,"data-swiped":me,"data-removed":ie,"data-visible":Ut,"data-y-position":Pe,"data-x-position":Jt,"data-index":b,"data-front":Vt,"data-swiping":re,"data-dismissible":ct,"data-type":Gt,"data-invert":nr,"data-swipe-out":ae,"data-swipe-direction":F,"data-expanded":!!(y||Q&&U),"data-testid":_.testId,style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${ie?Se:Ze.current}px`,"--initial-height":Q?"auto":`${Xe}px`,...A,..._.style},onDragEnd:()=>{W(!1),L(null),At.current=null},onPointerDown:ut=>{ut.button!==2&&(Wt||!ct||(pt.current=new Date,Be(Ze.current),ut.target.setPointerCapture(ut.pointerId),ut.target.tagName!=="BUTTON"&&(W(!0),At.current={x:ut.clientX,y:ut.clientY})))},onPointerUp:()=>{var ut,dr,Cr;if(ae||!ct)return;At.current=null;const $r=Number(((ut=Ct.current)==null?void 0:ut.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wn=Number(((dr=Ct.current)==null?void 0:dr.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Br=new Date().getTime()-((Cr=pt.current)==null?void 0:Cr.getTime()),yr=P==="x"?$r:wn,Dr=Math.abs(yr)/Br;if((P==="x"?cr.includes($r>0?"right":"left"):cr.includes(wn>0?"bottom":"top"))&&(Math.abs(yr)>=Yzn||Dr>.11)){Be(Ze.current),_.onDismiss==null||_.onDismiss.call(_,_),q(P==="x"?$r>0?"right":"left":wn>0?"down":"up"),wt(),le(!0);return}else{var Ht,tn;(Ht=Ct.current)==null||Ht.style.setProperty("--swipe-amount-x","0px"),(tn=Ct.current)==null||tn.style.setProperty("--swipe-amount-y","0px")}be(!1),W(!1),L(null)},onPointerMove:ut=>{var dr,Cr,$r;if(!At.current||!ct||((dr=window.getSelection())==null?void 0:dr.toString().length)>0)return;const Br=ut.clientY-At.current.y,yr=ut.clientX-At.current.x;!P&&(Math.abs(yr)>1||Math.abs(Br)>1)&&L(Math.abs(yr)>Math.abs(Br)?"x":"y");let Dr={x:0,y:0};const zt=Ht=>1/(1.5+Math.abs(Ht)/20);if(P==="y"){if(cr.includes("top")||cr.includes("bottom"))if(cr.includes("top")&&Br<0||cr.includes("bottom")&&Br>0)Dr.y=Br;else{const Ht=Br*zt(Br);Dr.y=Math.abs(Ht)0)Dr.x=yr;else{const Ht=yr*zt(yr);Dr.x=Math.abs(Ht)0||Math.abs(Dr.y)>0)&&be(!0),(Cr=Ct.current)==null||Cr.style.setProperty("--swipe-amount-x",`${Dr.x}px`),($r=Ct.current)==null||$r.style.setProperty("--swipe-amount-y",`${Dr.y}px`)}},Ye&&!_.jsx&&Gt!=="loading"?st.createElement("button",{"aria-label":ee,"data-disabled":Wt,"data-close-button":!0,onClick:Wt||!ct?()=>{}:()=>{wt(),_.onDismiss==null||_.onDismiss.call(_,_)},className:jc(K==null?void 0:K.closeButton,_==null||(n=_.classNames)==null?void 0:n.closeButton)},(gr=J==null?void 0:J.close)!=null?gr:$zn):null,(Gt||_.icon||_.promise)&&_.icon!==null&&((J==null?void 0:J[Gt])!==null||_.icon)?st.createElement("div",{"data-icon":"",className:jc(K==null?void 0:K.icon,_==null||(s=_.classNames)==null?void 0:s.icon)},Gt==="loading"?_.icon||ns():_.promise?ns():null,Gt!=="loading"?Hr:null):null,st.createElement("div",{"data-content":"",className:jc(K==null?void 0:K.content,_==null||(o=_.classNames)==null?void 0:o.content)},st.createElement("div",{"data-title":"",className:jc(K==null?void 0:K.title,_==null||(a=_.classNames)==null?void 0:a.title)},_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title),_.description?st.createElement("div",{"data-description":"",className:jc(D,xe,K==null?void 0:K.description,_==null||(i=_.classNames)==null?void 0:i.description)},typeof _.description=="function"?_.description():_.description):null),st.isValidElement(_.cancel)?_.cancel:_.cancel&&Gv(_.cancel)?st.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||E,onClick:ut=>{Gv(_.cancel)&&ct&&(_.cancel.onClick==null||_.cancel.onClick.call(_.cancel,ut),wt())},className:jc(K==null?void 0:K.cancelButton,_==null||(c=_.classNames)==null?void 0:c.cancelButton)},_.cancel.label):null,st.isValidElement(_.action)?_.action:_.action&&Gv(_.action)?st.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||M,onClick:ut=>{Gv(_.action)&&(_.action.onClick==null||_.action.onClick.call(_.action,ut),!ut.defaultPrevented&&wt())},className:jc(K==null?void 0:K.actionButton,_==null||(u=_.classNames)==null?void 0:u.actionButton)},_.action.label):null)};function YN(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function t8n(e,r){const t={};return[e,r].forEach((n,s)=>{const o=s===1,a=o?"--mobile-offset":"--offset",i=o?Vzn:Kzn;function c(u){["top","right","bottom","left"].forEach(d=>{t[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?t[`${a}-${u}`]=i:t[`${a}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):c(i)}),t}const r8n=st.forwardRef(function(r,t){const{id:n,invert:s,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:c,className:u,offset:d,mobileOffset:_,theme:p="light",richColors:m,duration:k,style:x,visibleToasts:v=Wzn,toastOptions:b,dir:w=YN(),gap:y=Xzn,icons:S,customAriaLabel:z,containerAriaLabel:N="Notifications"}=r,[A,E]=st.useState([]),M=st.useMemo(()=>n?A.filter(oe=>oe.toasterId===n):A.filter(oe=>!oe.toasterId),[A,n]),$=st.useMemo(()=>Array.from(new Set([o].concat(M.filter(oe=>oe.position).map(oe=>oe.position)))),[M,o]),[D,I]=st.useState([]),[G,H]=st.useState(!1),[Q,K]=st.useState(!1),[J,ee]=st.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),P=st.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=st.useRef(null),q=st.useRef(!1),U=st.useCallback(oe=>{E(ie=>{var ce;return(ce=ie.find(re=>re.id===oe.id))!=null&&ce.delete||ha.dismiss(oe.id),ie.filter(({id:re})=>re!==oe.id)})},[]);return st.useEffect(()=>ha.subscribe(oe=>{if(oe.dismiss){requestAnimationFrame(()=>{E(ie=>ie.map(ce=>ce.id===oe.id?{...ce,delete:!0}:ce))});return}setTimeout(()=>{Czn.flushSync(()=>{E(ie=>{const ce=ie.findIndex(re=>re.id===oe.id);return ce!==-1?[...ie.slice(0,ce),{...ie[ce],...oe},...ie.slice(ce+1)]:[oe,...ie]})})})}),[]),st.useEffect(()=>{if(p!=="system"){ee(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ee("dark"):ee("light")),typeof window>"u")return;const oe=window.matchMedia("(prefers-color-scheme: dark)");try{oe.addEventListener("change",({matches:ie})=>{ee(ie?"dark":"light")})}catch{oe.addListener(({matches:ce})=>{try{ee(ce?"dark":"light")}catch(re){console.error(re)}})}},[p]),st.useEffect(()=>{A.length<=1&&H(!1)},[A]),st.useEffect(()=>{const oe=ie=>{var ce;if(a.length>0&&a.every(ae=>ie[ae]||ie.code===ae)){var W;H(!0),(W=P.current)==null||W.focus()}ie.code==="Escape"&&(document.activeElement===P.current||(ce=P.current)!=null&&ce.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",oe),()=>document.removeEventListener("keydown",oe)},[a]),st.useEffect(()=>{if(P.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,q.current=!1)}},[P.current]),st.createElement("section",{ref:t,"aria-label":z??`${N} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},$.map((oe,ie)=>{var ce;const[re,W]=oe.split("-");return M.length?st.createElement("ol",{key:oe,dir:w==="auto"?YN():w,tabIndex:-1,ref:P,className:u,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":re,"data-x-position":W,style:{"--front-toast-height":`${((ce=D[0])==null?void 0:ce.height)||0}px`,"--width":`${Qzn}px`,"--gap":`${y}px`,...x,...t8n(d,_)},onBlur:ae=>{q.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(q.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||q.current||(q.current=!0,F.current=ae.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Q||H(!1)},onDragEnd:()=>H(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},M.filter(ae=>!ae.position&&ie===0||ae.position===oe).map((ae,le)=>{var me,be;return st.createElement(e8n,{key:ae.id,icons:S,index:le,toast:ae,defaultRichColors:m,duration:(me=b==null?void 0:b.duration)!=null?me:k,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(be=b==null?void 0:b.closeButton)!=null?be:c,interacting:Q,position:oe,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:U,toasts:M.filter(Se=>Se.position==ae.position),heights:D.filter(Se=>Se.position==ae.position),setHeights:I,expandByDefault:i,gap:y,expanded:G,swipeDirections:r.swipeDirections})})):null}))});function n8n(e){const[r]=pI();return f.jsx(r8n,{theme:r,...e})}function tr(e,r,t){Gzn[r](e,{duration:r==="warning"||r==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function d0({content:e,children:r,className:t,interactive:n=!1}){const s=T.useRef(null),o=T.useRef(null);function a(){const c=s.current,u=o.current;if(!c||!u)return;u.matches(":popover-open")||u.showPopover();const d=c.getBoundingClientRect(),_=u.getBoundingClientRect(),p=Math.max(8,Math.min(d.left+d.width/2-_.width/2,window.innerWidth-_.width-8));u.style.left=`${p}px`,u.style.top=`${Math.max(8,d.top-_.height-6)}px`}function i(){var u;const c=s.current;!(c!=null&&c.matches(":hover, :focus-visible"))&&!(c!=null&&c.querySelector(":focus-visible"))&&((u=o.current)==null||u.hidePopover())}return T.useEffect(()=>{const c=()=>{var u;return(u=o.current)==null?void 0:u.hidePopover()};return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[]),f.jsxs("span",{ref:s,className:Ls("group relative inline-flex cursor-help rounded-full outline-none focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2",t),tabIndex:n?void 0:0,role:n?void 0:"img","aria-label":n?void 0:e,onMouseEnter:a,onMouseLeave:i,onFocus:c=>{c.target.matches(":focus-visible")&&a()},onBlur:i,onKeyDown:c=>{var u;c.key==="Escape"&&((u=o.current)!=null&&u.matches(":popover-open"))&&(c.preventDefault(),c.stopPropagation(),o.current.hidePopover())},children:[r,f.jsx("span",{ref:o,popover:"manual",role:"tooltip",className:"pointer-events-none fixed inset-auto m-0 w-max max-w-64 whitespace-normal rounded-sm border-0 bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background shadow-control-subtle",children:e})]})}const s8n=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function xp(e,r,t="[data-initial-focus]"){const n=T.useRef(r);n.current=r,T.useEffect(()=>{const s=e.current;if(!s)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll(s8n)];(s.querySelector(t)??a()[0]??s).focus();const i=c=>{if(c.key==="Escape"){if(s.querySelector(":popover-open"))return;c.preventDefault(),c.stopPropagation(),n.current();return}if(c.key!=="Tab")return;const u=a(),d=u[0],_=u.at(-1);!d||!_?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===d?(c.preventDefault(),_.focus()):!c.shiftKey&&document.activeElement===_&&(c.preventDefault(),d.focus())};return document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("keydown",i,!0),o==null||o.focus()}},[e,t])}function MI({host:e,preview:r,currentClientAttached:t,stopping:n,onClose:s,onConfirm:o}){const a=T.useRef(null),i=Math.max(0,r.attachmentCount-(t?1:0)),c=[];return r.activeTurnCount>0&&c.push(r.activeTurnCount===1?ddr():qdr({count:fr(r.activeTurnCount)})),r.pendingPermissionCount>0&&c.push(r.pendingPermissionCount===1?zfr():w_r({count:fr(r.pendingPermissionCount)})),i>0&&c.push(i===1?Kfr():kdr({count:fr(i)})),r.queuedMessageCount>0&&c.push(r.queuedMessageCount===1?ndr():Mdr({count:fr(r.queuedMessageCount)})),r.activeRunCount>0&&c.push(r.activeRunCount===1?Lfr():Z_r({count:fr(r.activeRunCount)})),xp(a,s),Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:u=>{!n&&u.target===u.currentTarget&&s()},children:f.jsxs("div",{ref:a,className:"w-120 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-stop-dialog-title","aria-describedby":c.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[f.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:H_r({host:Ee(e)})}),c.length>0&&f.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[f.jsx("p",{className:"m-0 font-medium",children:gfr()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:c.map(u=>f.jsx("li",{children:u},u))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx(Oe,{disabled:n,onClick:s,children:Gf()}),f.jsx(Oe,{variant:"danger",disabled:n,onClick:o,children:n?Jdr():R_r()})]})]})}),document.body)}/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. @@ -138,7 +138,7 @@ Magazyn danych zostanie skopiowany do nowej lokalizacji i tam aktywowany. Trwaj * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const i8n=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},c8n=T.createContext({}),l8n=()=>T.useContext(c8n),u8n=T.forwardRef(({color:e,size:r,strokeWidth:t,absoluteStrokeWidth:n,className:s="",children:o,iconNode:a,...i},c)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:_=!1,color:p="currentColor",className:m=""}=l8n()??{},k=n??_?Number(t??d)*24/Number(r??u):t??d;return T.createElement("svg",{ref:c,...F2,width:r??u??F2.width,height:r??u??F2.height,stroke:e??p,strokeWidth:k,className:OI("lucide",m,s),...!o&&!i8n(i)&&{"aria-hidden":"true"},...i},[...a.map(([w,v])=>T.createElement(w,v)),...Array.isArray(o)?o:[o]])});/** + */const i8n=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},c8n=T.createContext({}),l8n=()=>T.useContext(c8n),u8n=T.forwardRef(({color:e,size:r,strokeWidth:t,absoluteStrokeWidth:n,className:s="",children:o,iconNode:a,...i},c)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:_=!1,color:p="currentColor",className:m=""}=l8n()??{},k=n??_?Number(t??d)*24/Number(r??u):t??d;return T.createElement("svg",{ref:c,...F2,width:r??u??F2.width,height:r??u??F2.height,stroke:e??p,strokeWidth:k,className:OI("lucide",m,s),...!o&&!i8n(i)&&{"aria-hidden":"true"},...i},[...a.map(([x,v])=>T.createElement(x,v)),...Array.isArray(o)?o:[o]])});/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. @@ -193,7 +193,7 @@ Magazyn danych zostanie skopiowany do nowej lokalizacji i tam aktywowany. Trwaj * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const S8n=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],uo=it("check",S8n);/** + */const S8n=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_o=it("check",S8n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. @@ -568,23 +568,23 @@ Magazyn danych zostanie skopiowany do nowej lokalizacji i tam aktywowany. Trwaj * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kEn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],jEn=it("zap",kEn);function v_(e,r){return e&&Object.hasOwn(e.tasks,r)?e.tasks[r]:void 0}const SEn=["settings","harnesses","projects","compute","instances","environment","git","storage"],CEn=e=>SEn.some(r=>r===e),vd=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ua=e=>typeof e=="string"&&e.length>0,Wv=e=>e==null||ua(e);function gS(e){if(!vd(e))return;const r=(...t)=>Object.keys(e).every(n=>t.includes(n));switch(e.kind){case"home":if(r("kind","view")&&(e.view==="experiments"||e.view==="files"||e.view==="artifacts"||e.view==="terminal"))return{kind:"home",view:e.view};break;case"experiment":if(r("kind","experimentId","view","runId")&&ua(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&Wv(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...ua(e.runId)?{runId:e.runId}:{}};break;case"file":if(r("kind","path","source","sessionId","ref","line","branchLabel")&&ua(e.path)&&Wv(e.sessionId)&&Wv(e.ref)&&Wv(e.branchLabel)&&(e.source==null||e.source==="repo"||e.source==="artifacts"||e.source==="abs")&&(e.line==null||typeof e.line=="number"&&Number.isSafeInteger(e.line)&&e.line>0))return{kind:"file",path:e.path,...e.source?{source:e.source}:{},...ua(e.sessionId)?{sessionId:e.sessionId}:{},...ua(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...ua(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(r("kind","experimentId","branch","view")&&ua(e.experimentId)&&ua(e.branch)&&(e.view==="files"||e.view==="changes"))return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};break;case"plan":if(r("kind","sessionId","promptId")&&ua(e.sessionId)&&ua(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(r("kind","sessionId","spawnPartId")&&ua(e.sessionId)&&ua(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};break;case"side":if(r("kind","sessionId")&&ua(e.sessionId))return{kind:"side",sessionId:e.sessionId}}}function Zf(e){if(e==="/projects")return{kind:"home"};const r=e.split("/");if(r[0]!==""||r[1]!=="projects"||!r[2])return null;let t,n;try{t=decodeURIComponent(r[2]),n=decodeURIComponent(r[4]??"")}catch{return null}const s=o=>o.length>0&&o!=="."&&o!==".."&&!/[\\/?#\u0000-\u001f\u007f-\u009f]/.test(o);return s(t)?r.length===3||r.length===4&&r[3]===""?{kind:"resume",projectId:t}:r.length===4&&r[3]==="skills"?{kind:"skills",projectId:t}:r.length===5&&r[3]==="tasks"&&s(n)?{kind:"task",projectId:t,...n==="new"?{}:{sessionId:n}}:r.length===5&&r[3]==="settings"&&CEn(n)?{kind:"settings",projectId:t,section:n}:null:null}function Ny(e){if(typeof e!="string"||!e.startsWith("/")||e.startsWith("//")||/[\\#\u0000-\u001f\u007f-\u009f]/.test(e))return null;const r=e.indexOf("?"),t=r===-1?e:e.slice(0,r),n=r===-1?"":e.slice(r+1),s=Zf(t);if(!s||s.kind==="resume")return null;const o=new URLSearchParams(n);if([...o.keys()].some(a=>a!=="pane")||o.getAll("pane").length>1)return null;if(o.has("pane"))try{if(!gS(JSON.parse(o.get("pane")??"")))return null}catch{return null}return e}function I1(e,r,t){const n=`/projects/${encodeURIComponent(e)}/tasks/${r?encodeURIComponent(r):"new"}`;return t?`${n}?${new URLSearchParams({pane:JSON.stringify(t)})}`:n}const tA=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function XI(e,r){let t,n,s=!1,o=!1,a;async function i(c=!1){if(clearTimeout(a),o||(o=c),s||t===void 0)return;s=!0;const u=t;t=void 0;const d=o;o=!1;try{await e(u,d),n=void 0}catch(_){n=u,r(_)}finally{s=!1,t!==void 0&&i()}}return{queue(c,u=0){t=c,clearTimeout(a),a=setTimeout(()=>void i(),u)},flush:i,retry(){return!s&&t===void 0&&(t=n),i()}}}var H2={exports:{}},rA;function zEn(){return rA||(rA=1,(function(e,r){(function(t,n){e.exports=n()})(self,(()=>(()=>{var t={};return(()=>{var n=t;Object.defineProperty(n,"__esModule",{value:!0}),n.FitAddon=void 0,n.FitAddon=class{activate(s){this._terminal=s}dispose(){}fit(){const s=this.proposeDimensions();if(!s||!this._terminal||isNaN(s.cols)||isNaN(s.rows))return;const o=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(o._renderService.clear(),this._terminal.resize(s.cols,s.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const s=this._terminal._core,o=s._renderService.dimensions;if(o.css.cell.width===0||o.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,i=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(i.getPropertyValue("height")),u=Math.max(0,parseInt(i.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),_=c-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),p=u-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/o.css.cell.width)),rows:Math.max(1,Math.floor(_/o.css.cell.height))}}}})(),t})()))})(H2)),H2.exports}var EEn=zEn(),q2={exports:{}},nA;function NEn(){return nA||(nA=1,(function(e,r){(function(t,n){e.exports=n()})(self,(()=>(()=>{var t={6:(a,i)=>{function c(d){try{const _=new URL(d),p=_.password&&_.username?`${_.protocol}//${_.username}:${_.password}@${_.host}`:_.username?`${_.protocol}//${_.username}@${_.host}`:`${_.protocol}//${_.host}`;return d.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(i,"__esModule",{value:!0}),i.LinkComputer=i.WebLinkProvider=void 0,i.WebLinkProvider=class{constructor(d,_,p,m={}){this._terminal=d,this._regex=_,this._handler=p,this._options=m}provideLinks(d,_){const p=u.computeLink(d,this._regex,this._terminal,this._handler);_(this._addCallbacks(p))}_addCallbacks(d){return d.map((_=>(_.leave=this._options.leave,_.hover=(p,m)=>{if(this._options.hover){const{range:k}=_;this._options.hover(p,m,k)}},_)))}};class u{static computeLink(_,p,m,k){const w=new RegExp(p.source,(p.flags||"")+"g"),[v,b]=u._getWindowedLineStrings(_-1,m),x=v.join("");let y;const S=[];for(;y=w.exec(x);){const z=y[0];if(!c(z))continue;const[E,A]=u._mapStrIdx(m,b,0,y.index),[N,M]=u._mapStrIdx(m,E,A,z.length);if(E===-1||A===-1||N===-1||M===-1)continue;const $={start:{x:A+1,y:E+1},end:{x:M,y:N+1}};S.push({range:$,text:z,activate:k})}return S}static _getWindowedLineStrings(_,p){let m,k=_,w=_,v=0,b="";const x=[];if(m=p.buffer.active.getLine(_)){const y=m.translateToString(!0);if(m.isWrapped&&y[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--k))&&v<2048&&(b=m.translateToString(!0),v+=b.length,x.push(b),m.isWrapped&&b.indexOf(" ")===-1););x.reverse()}for(x.push(y),v=0;(m=p.buffer.active.getLine(++w))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,x.push(b),b.indexOf(" ")===-1););}return[x,k]}static _mapStrIdx(_,p,m,k){const w=_.buffer.active,v=w.getNullCell();let b=m;for(;k;){const x=w.getLine(p);if(!x)return[-1,-1];for(let y=b;y{var a=o;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const i=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(d,_){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(d=u,_={}){this._handler=d,this._options=_}activate(d){this._terminal=d;const _=this._options,p=_.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new i.WebLinkProvider(this._terminal,p,this._handler,_))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),o})()))})(q2)),q2.exports}var AEn=NEn(),U2={exports:{}},sA;function TEn(){return sA||(sA=1,(function(e,r){(function(t,n){e.exports=n()})(globalThis,(()=>(()=>{var t={4567:function(a,i,c){var u=this&&this.__decorate||function(x,y,S,z){var E,A=arguments.length,N=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(x,y,S,z);else for(var M=x.length-1;M>=0;M--)(E=x[M])&&(N=(A<3?E(N):A>3?E(y,S,N):E(y,S))||N);return A>3&&N&&Object.defineProperty(y,S,N),N},d=this&&this.__param||function(x,y){return function(S,z){y(S,z,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.AccessibilityManager=void 0;const _=c(9042),p=c(9924),m=c(844),k=c(4725),w=c(2585),v=c(3656);let b=i.AccessibilityManager=class extends m.Disposable{constructor(x,y,S,z){super(),this._terminal=x,this._coreBrowserService=S,this._renderService=z,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let E=0;Ethis._handleBoundaryFocus(E,0),this._bottomBoundaryFocusListener=E=>this._handleBoundaryFocus(E,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((E=>this._handleResize(E.rows)))),this.register(this._terminal.onRender((E=>this._refreshRows(E.start,E.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((E=>this._handleChar(E)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` -`)))),this.register(this._terminal.onA11yTab((E=>this._handleTab(E)))),this.register(this._terminal.onKey((E=>this._handleKey(E.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,m.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(x){for(let y=0;y0?this._charsToConsume.shift()!==x&&(this._charsToAnnounce+=x):this._charsToAnnounce+=x,x===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=_.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(x){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(x)||this._charsToConsume.push(x)}_refreshRows(x,y){this._liveRegionDebouncer.refresh(x,y,this._terminal.rows)}_renderRows(x,y){const S=this._terminal.buffer,z=S.lines.length.toString();for(let E=x;E<=y;E++){const A=S.lines.get(S.ydisp+E),N=[],M=(A==null?void 0:A.translateToString(!0,void 0,void 0,N))||"",$=(S.ydisp+E+1).toString(),D=this._rowElements[E];D&&(M.length===0?(D.innerText=" ",this._rowColumns.set(D,[0,1])):(D.textContent=M,this._rowColumns.set(D,N)),D.setAttribute("aria-posinset",$),D.setAttribute("aria-setsize",z))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(x,y){const S=x.target,z=this._rowElements[y===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||x.relatedTarget!==z)return;let E,A;if(y===0?(E=S,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(E=this._rowElements.shift(),A=S,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const N=this._createAccessibilityTreeNode();this._rowElements.unshift(N),this._rowContainer.insertAdjacentElement("afterbegin",N)}else{const N=this._createAccessibilityTreeNode();this._rowElements.push(N),this._rowContainer.appendChild(N)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),x.preventDefault(),x.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const x=document.getSelection();if(!x)return;if(x.isCollapsed)return void(this._rowContainer.contains(x.anchorNode)&&this._terminal.clearSelection());if(!x.anchorNode||!x.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:x.anchorNode,offset:x.anchorOffset},S={node:x.focusNode,offset:x.focusOffset};if((y.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===S.node&&y.offset>S.offset)&&([y,S]=[S,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const z=this._rowElements.slice(-1)[0];if(S.node.compareDocumentPosition(z)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:z,offset:((M=z.textContent)==null?void 0:M.length)??0}),!this._rowContainer.contains(S.node))return;const E=({node:$,offset:D})=>{const I=$ instanceof Text?$.parentNode:$;let G=parseInt(I==null?void 0:I.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;const H=this._rowColumns.get(I);if(!H)return console.warn("columns is null. Race condition?"),null;let Q=D=this._terminal.cols&&(++G,Q=0),{row:G,column:Q}},A=E(y),N=E(S);if(A&&N){if(A.row>N.row||A.row===N.row&&A.column>=N.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(N.row-A.row)*this._terminal.cols-A.column+N.column)}}_handleResize(x){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yx;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const x=this._coreBrowserService.mainDocument.createElement("div");return x.setAttribute("role","listitem"),x.tabIndex=-1,this._refreshRowDimensions(x),x}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let x=0;x{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function d(p,m,k,w){p=u(p=c(p),k.decPrivateModes.bracketedPasteMode&&w.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(p,!0),m.value=""}function _(p,m,k){const w=k.getBoundingClientRect(),v=p.clientX-w.left-10,b=p.clientY-w.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}px`,m.style.zIndex="1000",m.focus()}Object.defineProperty(i,"__esModule",{value:!0}),i.rightClickHandler=i.moveTextAreaUnderMouseCursor=i.paste=i.handlePasteEvent=i.copyHandler=i.bracketTextForPaste=i.prepareTextForTerminal=void 0,i.prepareTextForTerminal=c,i.bracketTextForPaste=u,i.copyHandler=function(p,m){p.clipboardData&&p.clipboardData.setData("text/plain",m.selectionText),p.preventDefault()},i.handlePasteEvent=function(p,m,k,w){p.stopPropagation(),p.clipboardData&&d(p.clipboardData.getData("text/plain"),m,k,w)},i.paste=d,i.moveTextAreaUnderMouseCursor=_,i.rightClickHandler=function(p,m,k,w,v){_(p,m,k),v&&w.rightClickSelect(p),m.value=w.selectionText,m.select()}},7239:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const u=c(1505);i.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(d,_,p){this._css.set(d,_,p)}getCss(d,_){return this._css.get(d,_)}setColor(d,_,p){this._color.set(d,_,p)}getColor(d,_){return this._color.get(d,_)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(c,u,d,_){c.addEventListener(u,d,_);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,d,_))}}}},3551:function(a,i,c){var u=this&&this.__decorate||function(b,x,y,S){var z,E=arguments.length,A=E<3?x:S===null?S=Object.getOwnPropertyDescriptor(x,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,x,y,S);else for(var N=b.length-1;N>=0;N--)(z=b[N])&&(A=(E<3?z(A):E>3?z(x,y,A):z(x,y))||A);return E>3&&A&&Object.defineProperty(x,y,A),A},d=this&&this.__param||function(b,x){return function(y,S){x(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Linkifier=void 0;const _=c(3656),p=c(8460),m=c(844),k=c(2585),w=c(4725);let v=i.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(b,x,y,S,z){super(),this._element=b,this._mouseService=x,this._renderService=y,this._bufferService=S,this._linkProviderService=z,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,m.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,m.toDisposable)((()=>{var E;this._lastMouseEvent=void 0,(E=this._activeProviderReplies)==null||E.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,_.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,_.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const x=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!x)return;this._isMouseOut=!1;const y=b.composedPath();for(let S=0;S{E==null||E.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let y=!1;for(const[E,A]of this._linkProviderService.linkProviders.entries())x?(z=this._activeProviderReplies)!=null&&z.get(E)&&(y=this._checkLinkProviderResult(E,b,y)):A.provideLinks(b.y,(N=>{var $,D;if(this._isMouseOut)return;const M=N==null?void 0:N.map((I=>({link:I})));($=this._activeProviderReplies)==null||$.set(E,M),y=this._checkLinkProviderResult(E,b,y),((D=this._activeProviderReplies)==null?void 0:D.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,x){const y=new Set;for(let S=0;Sb?this._bufferService.cols:A.link.range.end.x;for(let $=N;$<=M;$++){if(y.has($)){z.splice(E--,1);break}y.add($)}}}}_checkLinkProviderResult(b,x,y){var E;if(!this._activeProviderReplies)return y;const S=this._activeProviderReplies.get(b);let z=!1;for(let A=0;Athis._linkAtPosition(N.link,x)));A&&(y=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let A=0;Athis._linkAtPosition(M.link,x)));if(N){y=!0,this._handleNewLink(N);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const x=this._positionFromMouseEvent(b,this._element,this._mouseService);x&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,x)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,x){this._currentLink&&this._lastMouseEvent&&(!b||!x||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=x)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(b.link,x)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var y,S;return(S=(y=this._currentLink)==null?void 0:y.state)==null?void 0:S.decorations.pointerCursor},set:y=>{var S;(S=this._currentLink)!=null&&S.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,S;return(S=(y=this._currentLink)==null?void 0:y.state)==null?void 0:S.decorations.underline},set:y=>{var S,z,E;(S=this._currentLink)!=null&&S.state&&((E=(z=this._currentLink)==null?void 0:z.state)==null?void 0:E.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const S=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,z=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=z&&(this._clearCurrentLink(S,z),this._lastMouseEvent)){const E=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);E&&this._askForLink(E,!1)}}))))}_linkHover(b,x,y){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),x.hover&&x.hover(y,x.text)}_fireUnderlineEvent(b,x){const y=b.range,S=this._bufferService.buffer.ydisp,z=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-S-1,y.end.x,y.end.y-S-1,void 0);(x?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(z)}_linkLeave(b,x,y){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),x.leave&&x.leave(y,x.text)}_linkAtPosition(b,x){const y=b.range.start.y*this._bufferService.cols+b.range.start.x,S=b.range.end.y*this._bufferService.cols+b.range.end.x,z=x.y*this._bufferService.cols+x.x;return y<=z&&z<=S}_positionFromMouseEvent(b,x,y){const S=y.getCoords(b,x,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,x,y,S,z){return{x1:b,y1:x,x2:y,y2:S,cols:this._bufferService.cols,fg:z}}};i.Linkifier=v=u([d(1,w.IMouseService),d(2,w.IRenderService),d(3,k.IBufferService),d(4,w.ILinkProviderService)],v)},9042:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.tooMuchOutput=i.promptLabel=void 0,i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,i,c){var u=this&&this.__decorate||function(w,v,b,x){var y,S=arguments.length,z=S<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(w,v,b,x);else for(var E=w.length-1;E>=0;E--)(y=w[E])&&(z=(S<3?y(z):S>3?y(v,b,z):y(v,b))||z);return S>3&&z&&Object.defineProperty(v,b,z),z},d=this&&this.__param||function(w,v){return function(b,x){v(b,x,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkProvider=void 0;const _=c(511),p=c(2585);let m=i.OscLinkProvider=class{constructor(w,v,b){this._bufferService=w,this._optionsService=v,this._oscLinkService=b}provideLinks(w,v){var M;const b=this._bufferService.buffer.lines.get(w-1);if(!b)return void v(void 0);const x=[],y=this._optionsService.rawOptions.linkHandler,S=new _.CellData,z=b.getTrimmedLength();let E=-1,A=-1,N=!1;for(let $=0;$y?y.activate(H,Q,I):k(0,Q),hover:(H,Q)=>{var K;return(K=y==null?void 0:y.hover)==null?void 0:K.call(y,H,Q,I)},leave:(H,Q)=>{var K;return(K=y==null?void 0:y.leave)==null?void 0:K.call(y,H,Q,I)}})}N=!1,S.hasExtendedAttrs()&&S.extended.urlId?(A=$,E=S.extended.urlId):(A=-1,E=-1)}}v(x)}};function k(w,v){if(confirm(`Do you want to navigate to ${v}? + */const kEn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],jEn=it("zap",kEn);function v_(e,r){return e&&Object.hasOwn(e.tasks,r)?e.tasks[r]:void 0}const SEn=["settings","harnesses","projects","compute","instances","environment","git","storage"],CEn=e=>SEn.some(r=>r===e),vd=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ua=e=>typeof e=="string"&&e.length>0,Wv=e=>e==null||ua(e);function gS(e){if(!vd(e))return;const r=(...t)=>Object.keys(e).every(n=>t.includes(n));switch(e.kind){case"home":if(r("kind","view")&&(e.view==="experiments"||e.view==="files"||e.view==="artifacts"||e.view==="terminal"))return{kind:"home",view:e.view};break;case"experiment":if(r("kind","experimentId","view","runId")&&ua(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&Wv(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...ua(e.runId)?{runId:e.runId}:{}};break;case"file":if(r("kind","path","source","sessionId","ref","line","branchLabel")&&ua(e.path)&&Wv(e.sessionId)&&Wv(e.ref)&&Wv(e.branchLabel)&&(e.source==null||e.source==="repo"||e.source==="artifacts"||e.source==="abs")&&(e.line==null||typeof e.line=="number"&&Number.isSafeInteger(e.line)&&e.line>0))return{kind:"file",path:e.path,...e.source?{source:e.source}:{},...ua(e.sessionId)?{sessionId:e.sessionId}:{},...ua(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...ua(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(r("kind","experimentId","branch","view")&&ua(e.experimentId)&&ua(e.branch)&&(e.view==="files"||e.view==="changes"))return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};break;case"plan":if(r("kind","sessionId","promptId")&&ua(e.sessionId)&&ua(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(r("kind","sessionId","spawnPartId")&&ua(e.sessionId)&&ua(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};break;case"side":if(r("kind","sessionId")&&ua(e.sessionId))return{kind:"side",sessionId:e.sessionId}}}function Zf(e){if(e==="/projects")return{kind:"home"};const r=e.split("/");if(r[0]!==""||r[1]!=="projects"||!r[2])return null;let t,n;try{t=decodeURIComponent(r[2]),n=decodeURIComponent(r[4]??"")}catch{return null}const s=o=>o.length>0&&o!=="."&&o!==".."&&!/[\\/?#\u0000-\u001f\u007f-\u009f]/.test(o);return s(t)?r.length===3||r.length===4&&r[3]===""?{kind:"resume",projectId:t}:r.length===4&&r[3]==="skills"?{kind:"skills",projectId:t}:r.length===5&&r[3]==="tasks"&&s(n)?{kind:"task",projectId:t,...n==="new"?{}:{sessionId:n}}:r.length===5&&r[3]==="settings"&&CEn(n)?{kind:"settings",projectId:t,section:n}:null:null}function Ny(e){if(typeof e!="string"||!e.startsWith("/")||e.startsWith("//")||/[\\#\u0000-\u001f\u007f-\u009f]/.test(e))return null;const r=e.indexOf("?"),t=r===-1?e:e.slice(0,r),n=r===-1?"":e.slice(r+1),s=Zf(t);if(!s||s.kind==="resume")return null;const o=new URLSearchParams(n);if([...o.keys()].some(a=>a!=="pane")||o.getAll("pane").length>1)return null;if(o.has("pane"))try{if(!gS(JSON.parse(o.get("pane")??"")))return null}catch{return null}return e}function I1(e,r,t){const n=`/projects/${encodeURIComponent(e)}/tasks/${r?encodeURIComponent(r):"new"}`;return t?`${n}?${new URLSearchParams({pane:JSON.stringify(t)})}`:n}const tA=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function XI(e,r){let t,n,s=!1,o=!1,a;async function i(c=!1){if(clearTimeout(a),o||(o=c),s||t===void 0)return;s=!0;const u=t;t=void 0;const d=o;o=!1;try{await e(u,d),n=void 0}catch(_){n=u,r(_)}finally{s=!1,t!==void 0&&i()}}return{queue(c,u=0){t=c,clearTimeout(a),a=setTimeout(()=>void i(),u)},flush:i,retry(){return!s&&t===void 0&&(t=n),i()}}}var H2={exports:{}},rA;function zEn(){return rA||(rA=1,(function(e,r){(function(t,n){e.exports=n()})(self,(()=>(()=>{var t={};return(()=>{var n=t;Object.defineProperty(n,"__esModule",{value:!0}),n.FitAddon=void 0,n.FitAddon=class{activate(s){this._terminal=s}dispose(){}fit(){const s=this.proposeDimensions();if(!s||!this._terminal||isNaN(s.cols)||isNaN(s.rows))return;const o=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(o._renderService.clear(),this._terminal.resize(s.cols,s.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const s=this._terminal._core,o=s._renderService.dimensions;if(o.css.cell.width===0||o.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,i=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(i.getPropertyValue("height")),u=Math.max(0,parseInt(i.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),_=c-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),p=u-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/o.css.cell.width)),rows:Math.max(1,Math.floor(_/o.css.cell.height))}}}})(),t})()))})(H2)),H2.exports}var EEn=zEn(),q2={exports:{}},nA;function NEn(){return nA||(nA=1,(function(e,r){(function(t,n){e.exports=n()})(self,(()=>(()=>{var t={6:(a,i)=>{function c(d){try{const _=new URL(d),p=_.password&&_.username?`${_.protocol}//${_.username}:${_.password}@${_.host}`:_.username?`${_.protocol}//${_.username}@${_.host}`:`${_.protocol}//${_.host}`;return d.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(i,"__esModule",{value:!0}),i.LinkComputer=i.WebLinkProvider=void 0,i.WebLinkProvider=class{constructor(d,_,p,m={}){this._terminal=d,this._regex=_,this._handler=p,this._options=m}provideLinks(d,_){const p=u.computeLink(d,this._regex,this._terminal,this._handler);_(this._addCallbacks(p))}_addCallbacks(d){return d.map((_=>(_.leave=this._options.leave,_.hover=(p,m)=>{if(this._options.hover){const{range:k}=_;this._options.hover(p,m,k)}},_)))}};class u{static computeLink(_,p,m,k){const x=new RegExp(p.source,(p.flags||"")+"g"),[v,b]=u._getWindowedLineStrings(_-1,m),w=v.join("");let y;const S=[];for(;y=x.exec(w);){const z=y[0];if(!c(z))continue;const[N,A]=u._mapStrIdx(m,b,0,y.index),[E,M]=u._mapStrIdx(m,N,A,z.length);if(N===-1||A===-1||E===-1||M===-1)continue;const $={start:{x:A+1,y:N+1},end:{x:M,y:E+1}};S.push({range:$,text:z,activate:k})}return S}static _getWindowedLineStrings(_,p){let m,k=_,x=_,v=0,b="";const w=[];if(m=p.buffer.active.getLine(_)){const y=m.translateToString(!0);if(m.isWrapped&&y[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--k))&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),m.isWrapped&&b.indexOf(" ")===-1););w.reverse()}for(w.push(y),v=0;(m=p.buffer.active.getLine(++x))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),b.indexOf(" ")===-1););}return[w,k]}static _mapStrIdx(_,p,m,k){const x=_.buffer.active,v=x.getNullCell();let b=m;for(;k;){const w=x.getLine(p);if(!w)return[-1,-1];for(let y=b;y{var a=o;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const i=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(d,_){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(d=u,_={}){this._handler=d,this._options=_}activate(d){this._terminal=d;const _=this._options,p=_.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new i.WebLinkProvider(this._terminal,p,this._handler,_))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),o})()))})(q2)),q2.exports}var AEn=NEn(),U2={exports:{}},sA;function TEn(){return sA||(sA=1,(function(e,r){(function(t,n){e.exports=n()})(globalThis,(()=>(()=>{var t={4567:function(a,i,c){var u=this&&this.__decorate||function(w,y,S,z){var N,A=arguments.length,E=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(w,y,S,z);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(E=(A<3?N(E):A>3?N(y,S,E):N(y,S))||E);return A>3&&E&&Object.defineProperty(y,S,E),E},d=this&&this.__param||function(w,y){return function(S,z){y(S,z,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.AccessibilityManager=void 0;const _=c(9042),p=c(9924),m=c(844),k=c(4725),x=c(2585),v=c(3656);let b=i.AccessibilityManager=class extends m.Disposable{constructor(w,y,S,z){super(),this._terminal=w,this._coreBrowserService=S,this._renderService=z,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let N=0;Nthis._handleBoundaryFocus(N,0),this._bottomBoundaryFocusListener=N=>this._handleBoundaryFocus(N,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((N=>this._handleResize(N.rows)))),this.register(this._terminal.onRender((N=>this._refreshRows(N.start,N.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((N=>this._handleChar(N)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` +`)))),this.register(this._terminal.onA11yTab((N=>this._handleTab(N)))),this.register(this._terminal.onKey((N=>this._handleKey(N.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,m.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(w){for(let y=0;y0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===` +`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=_.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(w){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(w)||this._charsToConsume.push(w)}_refreshRows(w,y){this._liveRegionDebouncer.refresh(w,y,this._terminal.rows)}_renderRows(w,y){const S=this._terminal.buffer,z=S.lines.length.toString();for(let N=w;N<=y;N++){const A=S.lines.get(S.ydisp+N),E=[],M=(A==null?void 0:A.translateToString(!0,void 0,void 0,E))||"",$=(S.ydisp+N+1).toString(),D=this._rowElements[N];D&&(M.length===0?(D.innerText=" ",this._rowColumns.set(D,[0,1])):(D.textContent=M,this._rowColumns.set(D,E)),D.setAttribute("aria-posinset",$),D.setAttribute("aria-setsize",z))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,y){const S=w.target,z=this._rowElements[y===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==z)return;let N,A;if(y===0?(N=S,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(N=this._rowElements.shift(),A=S,this._rowContainer.removeChild(N)),N.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else{const E=this._createAccessibilityTreeNode();this._rowElements.push(E),this._rowContainer.appendChild(E)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const w=document.getSelection();if(!w)return;if(w.isCollapsed)return void(this._rowContainer.contains(w.anchorNode)&&this._terminal.clearSelection());if(!w.anchorNode||!w.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:w.anchorNode,offset:w.anchorOffset},S={node:w.focusNode,offset:w.focusOffset};if((y.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===S.node&&y.offset>S.offset)&&([y,S]=[S,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const z=this._rowElements.slice(-1)[0];if(S.node.compareDocumentPosition(z)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:z,offset:((M=z.textContent)==null?void 0:M.length)??0}),!this._rowContainer.contains(S.node))return;const N=({node:$,offset:D})=>{const I=$ instanceof Text?$.parentNode:$;let G=parseInt(I==null?void 0:I.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;const H=this._rowColumns.get(I);if(!H)return console.warn("columns is null. Race condition?"),null;let Q=D=this._terminal.cols&&(++G,Q=0),{row:G,column:Q}},A=N(y),E=N(S);if(A&&E){if(A.row>E.row||A.row===E.row&&A.column>=E.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(E.row-A.row)*this._terminal.cols-A.column+E.column)}}_handleResize(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yw;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const w=this._coreBrowserService.mainDocument.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let w=0;w{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function d(p,m,k,x){p=u(p=c(p),k.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(p,!0),m.value=""}function _(p,m,k){const x=k.getBoundingClientRect(),v=p.clientX-x.left-10,b=p.clientY-x.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}px`,m.style.zIndex="1000",m.focus()}Object.defineProperty(i,"__esModule",{value:!0}),i.rightClickHandler=i.moveTextAreaUnderMouseCursor=i.paste=i.handlePasteEvent=i.copyHandler=i.bracketTextForPaste=i.prepareTextForTerminal=void 0,i.prepareTextForTerminal=c,i.bracketTextForPaste=u,i.copyHandler=function(p,m){p.clipboardData&&p.clipboardData.setData("text/plain",m.selectionText),p.preventDefault()},i.handlePasteEvent=function(p,m,k,x){p.stopPropagation(),p.clipboardData&&d(p.clipboardData.getData("text/plain"),m,k,x)},i.paste=d,i.moveTextAreaUnderMouseCursor=_,i.rightClickHandler=function(p,m,k,x,v){_(p,m,k),v&&x.rightClickSelect(p),m.value=x.selectionText,m.select()}},7239:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const u=c(1505);i.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(d,_,p){this._css.set(d,_,p)}getCss(d,_){return this._css.get(d,_)}setColor(d,_,p){this._color.set(d,_,p)}getColor(d,_){return this._color.get(d,_)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(c,u,d,_){c.addEventListener(u,d,_);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,d,_))}}}},3551:function(a,i,c){var u=this&&this.__decorate||function(b,w,y,S){var z,N=arguments.length,A=N<3?w:S===null?S=Object.getOwnPropertyDescriptor(w,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,w,y,S);else for(var E=b.length-1;E>=0;E--)(z=b[E])&&(A=(N<3?z(A):N>3?z(w,y,A):z(w,y))||A);return N>3&&A&&Object.defineProperty(w,y,A),A},d=this&&this.__param||function(b,w){return function(y,S){w(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Linkifier=void 0;const _=c(3656),p=c(8460),m=c(844),k=c(2585),x=c(4725);let v=i.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(b,w,y,S,z){super(),this._element=b,this._mouseService=w,this._renderService=y,this._bufferService=S,this._linkProviderService=z,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,m.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,m.toDisposable)((()=>{var N;this._lastMouseEvent=void 0,(N=this._activeProviderReplies)==null||N.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,_.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,_.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!w)return;this._isMouseOut=!1;const y=b.composedPath();for(let S=0;S{N==null||N.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let y=!1;for(const[N,A]of this._linkProviderService.linkProviders.entries())w?(z=this._activeProviderReplies)!=null&&z.get(N)&&(y=this._checkLinkProviderResult(N,b,y)):A.provideLinks(b.y,(E=>{var $,D;if(this._isMouseOut)return;const M=E==null?void 0:E.map((I=>({link:I})));($=this._activeProviderReplies)==null||$.set(N,M),y=this._checkLinkProviderResult(N,b,y),((D=this._activeProviderReplies)==null?void 0:D.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,w){const y=new Set;for(let S=0;Sb?this._bufferService.cols:A.link.range.end.x;for(let $=E;$<=M;$++){if(y.has($)){z.splice(N--,1);break}y.add($)}}}}_checkLinkProviderResult(b,w,y){var N;if(!this._activeProviderReplies)return y;const S=this._activeProviderReplies.get(b);let z=!1;for(let A=0;Athis._linkAtPosition(E.link,w)));A&&(y=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let A=0;Athis._linkAtPosition(M.link,w)));if(E){y=!0,this._handleNewLink(E);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);w&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,w){this._currentLink&&this._lastMouseEvent&&(!b||!w||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._linkAtPosition(b.link,w)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var y,S;return(S=(y=this._currentLink)==null?void 0:y.state)==null?void 0:S.decorations.pointerCursor},set:y=>{var S;(S=this._currentLink)!=null&&S.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,S;return(S=(y=this._currentLink)==null?void 0:y.state)==null?void 0:S.decorations.underline},set:y=>{var S,z,N;(S=this._currentLink)!=null&&S.state&&((N=(z=this._currentLink)==null?void 0:z.state)==null?void 0:N.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const S=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,z=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=z&&(this._clearCurrentLink(S,z),this._lastMouseEvent)){const N=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);N&&this._askForLink(N,!1)}}))))}_linkHover(b,w,y){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(y,w.text)}_fireUnderlineEvent(b,w){const y=b.range,S=this._bufferService.buffer.ydisp,z=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-S-1,y.end.x,y.end.y-S-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(z)}_linkLeave(b,w,y){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(y,w.text)}_linkAtPosition(b,w){const y=b.range.start.y*this._bufferService.cols+b.range.start.x,S=b.range.end.y*this._bufferService.cols+b.range.end.x,z=w.y*this._bufferService.cols+w.x;return y<=z&&z<=S}_positionFromMouseEvent(b,w,y){const S=y.getCoords(b,w,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,w,y,S,z){return{x1:b,y1:w,x2:y,y2:S,cols:this._bufferService.cols,fg:z}}};i.Linkifier=v=u([d(1,x.IMouseService),d(2,x.IRenderService),d(3,k.IBufferService),d(4,x.ILinkProviderService)],v)},9042:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.tooMuchOutput=i.promptLabel=void 0,i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,i,c){var u=this&&this.__decorate||function(x,v,b,w){var y,S=arguments.length,z=S<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,v,b,w);else for(var N=x.length-1;N>=0;N--)(y=x[N])&&(z=(S<3?y(z):S>3?y(v,b,z):y(v,b))||z);return S>3&&z&&Object.defineProperty(v,b,z),z},d=this&&this.__param||function(x,v){return function(b,w){v(b,w,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkProvider=void 0;const _=c(511),p=c(2585);let m=i.OscLinkProvider=class{constructor(x,v,b){this._bufferService=x,this._optionsService=v,this._oscLinkService=b}provideLinks(x,v){var M;const b=this._bufferService.buffer.lines.get(x-1);if(!b)return void v(void 0);const w=[],y=this._optionsService.rawOptions.linkHandler,S=new _.CellData,z=b.getTrimmedLength();let N=-1,A=-1,E=!1;for(let $=0;$y?y.activate(H,Q,I):k(0,Q),hover:(H,Q)=>{var K;return(K=y==null?void 0:y.hover)==null?void 0:K.call(y,H,Q,I)},leave:(H,Q)=>{var K;return(K=y==null?void 0:y.leave)==null?void 0:K.call(y,H,Q,I)}})}E=!1,S.hasExtendedAttrs()&&S.extended.urlId?(A=$,N=S.extended.urlId):(A=-1,N=-1)}}v(w)}};function k(x,v){if(confirm(`Do you want to navigate to ${v}? -WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}i.OscLinkProvider=m=u([d(0,p.IBufferService),d(1,p.IOptionsService),d(2,p.IOscLinkService)],m)},6193:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.RenderDebouncer=void 0,i.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Terminal=void 0;const u=c(3614),d=c(3656),_=c(3551),p=c(9042),m=c(3730),k=c(1680),w=c(3107),v=c(5744),b=c(2950),x=c(1296),y=c(428),S=c(4269),z=c(5114),E=c(8934),A=c(3230),N=c(9312),M=c(4725),$=c(6731),D=c(8055),I=c(8969),G=c(8460),H=c(844),Q=c(6114),K=c(8437),J=c(2584),ee=c(7399),P=c(5941),L=c(9074),F=c(2585),q=c(5435),U=c(4567),oe=c(779);class ie extends I.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(re={}){super(re),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new H.MutableDisposable),this._onCursorMove=this.register(new G.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new G.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new G.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new G.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new G.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new G.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new G.EventEmitter),this._onBlur=this.register(new G.EventEmitter),this._onA11yCharEmitter=this.register(new G.EventEmitter),this._onA11yTabEmitter=this.register(new G.EventEmitter),this._onWillOpen=this.register(new G.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(oe.LinkProviderService),this._instantiationService.setService(M.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(m.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((W,ae)=>this.refresh(W,ae)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((W=>this._reportWindowsOptions(W)))),this.register(this._inputHandler.onColor((W=>this._handleColorEvent(W)))),this.register((0,G.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,G.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((W=>this._afterResize(W.cols,W.rows)))),this.register((0,H.toDisposable)((()=>{var W,ae;this._customKeyEventHandler=void 0,(ae=(W=this.element)==null?void 0:W.parentNode)==null||ae.removeChild(this.element)})))}_handleColorEvent(re){if(this._themeService)for(const W of re){let ae,le="";switch(W.index){case 256:ae="foreground",le="10";break;case 257:ae="background",le="11";break;case 258:ae="cursor",le="12";break;default:ae="ansi",le="4;"+W.index}switch(W.type){case 0:const me=D.color.toColorRGB(ae==="ansi"?this._themeService.colors.ansi[W.index]:this._themeService.colors[ae]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${le};${(0,P.toRgbString)(me)}${J.C1_ESCAPED.ST}`);break;case 1:if(ae==="ansi")this._themeService.modifyColors((be=>be.ansi[W.index]=D.channels.toColor(...W.color)));else{const be=ae;this._themeService.modifyColors((Se=>Se[be]=D.channels.toColor(...W.color)))}break;case 2:this._themeService.restoreColor(W.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(re){re?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(U.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(re){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var re;return(re=this.textarea)==null?void 0:re.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const re=this.buffer.ybase+this.buffer.y,W=this.buffer.lines.get(re);if(!W)return;const ae=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,me=W.getWidth(ae),be=this._renderService.dimensions.css.cell.width*me,Se=this.buffer.y*this._renderService.dimensions.css.cell.height,Be=ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Be+"px",this.textarea.style.top=Se+"px",this.textarea.style.width=be+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(W=>{this.hasSelection()&&(0,u.copyHandler)(W,this._selectionService)})));const re=W=>(0,u.handlePasteEvent)(W,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",re)),this.register((0,d.addDisposableDomListener)(this.element,"paste",re)),Q.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(W=>{W.button===2&&(0,u.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(W=>{(0,u.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(W=>{W.button===1&&(0,u.moveTextAreaUnderMouseCursor)(W,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(re=>this._keyUp(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(re=>this._keyDown(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(re=>this._keyPress(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(re=>this._compositionHelper.compositionupdate(re)))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(re=>this._inputEvent(re)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(re){var ae;if(!re)throw new Error("Terminal requires a parent element.");if(re.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ae=this.element)==null?void 0:ae.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=re.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),re.appendChild(this.element);const W=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),W.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,d.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),W.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Q.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(z.CoreBrowserService,this.textarea,re.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance($.ThemeService),this._instantiationService.setService(M.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(M.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(_.Linkifier,this.screenElement)),this.element.appendChild(W);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(k.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(N.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(w.BufferDecorationRenderer,this.screenElement)),this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(U.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(x.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const re=this,W=this.element;function ae(be){const Se=re._mouseService.getMouseReportCoords(be,re.screenElement);if(!Se)return!1;let Be,Xe;switch(be.overrideType||be.type){case"mousemove":Xe=32,be.buttons===void 0?(Be=3,be.button!==void 0&&(Be=be.button<3?be.button:3)):Be=1&be.buttons?0:4&be.buttons?1:2&be.buttons?2:3;break;case"mouseup":Xe=0,Be=be.button<3?be.button:3;break;case"mousedown":Xe=1,Be=be.button<3?be.button:3;break;case"wheel":if(re._customWheelEventHandler&&re._customWheelEventHandler(be)===!1||re.viewport.getLinesScrolled(be)===0)return!1;Xe=be.deltaY<0?0:1,Be=4;break;default:return!1}return!(Xe===void 0||Be===void 0||Be>4)&&re.coreMouseService.triggerMouseEvent({col:Se.col,row:Se.row,x:Se.x,y:Se.y,button:Be,action:Xe,ctrl:be.ctrlKey,alt:be.altKey,shift:be.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},me={mouseup:be=>(ae(be),be.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(be)),wheel:be=>(ae(be),this.cancel(be,!0)),mousedrag:be=>{be.buttons&&ae(be)},mousemove:be=>{be.buttons||ae(be)}};this.register(this.coreMouseService.onProtocolChange((be=>{be?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(be)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&be?le.mousemove||(W.addEventListener("mousemove",me.mousemove),le.mousemove=me.mousemove):(W.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&be?le.wheel||(W.addEventListener("wheel",me.wheel,{passive:!1}),le.wheel=me.wheel):(W.removeEventListener("wheel",le.wheel),le.wheel=null),2&be?le.mouseup||(le.mouseup=me.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&be?le.mousedrag||(le.mousedrag=me.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(W,"mousedown",(be=>{if(be.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(be))return ae(be),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(be)}))),this.register((0,d.addDisposableDomListener)(W,"wheel",(be=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(be)===!1)return!1;if(!this.buffer.hasScrollback){const Se=this.viewport.getLinesScrolled(be);if(Se===0)return;const Be=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(be.deltaY<0?"A":"B");let Xe="";for(let Me=0;Me{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(be),this.cancel(be)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(W,"touchmove",(be=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(be)?void 0:this.cancel(be)}),{passive:!1}))}refresh(re,W){var ae;(ae=this._renderService)==null||ae.refreshRows(re,W)}updateCursorStyle(re){var W;(W=this._selectionService)!=null&&W.shouldColumnSelect(re)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(re,W,ae=0){var le;ae===1?(super.scrollLines(re,W,ae),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(re)}paste(re){(0,u.paste)(re,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(re){this._customKeyEventHandler=re}attachCustomWheelEventHandler(re){this._customWheelEventHandler=re}registerLinkProvider(re){return this._linkProviderService.registerLinkProvider(re)}registerCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const W=this._characterJoinerService.register(re);return this.refresh(0,this.rows-1),W}deregisterCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(re)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(re){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+re)}registerDecoration(re){return this._decorationService.registerDecoration(re)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(re,W,ae){this._selectionService.setSelection(re,W,ae)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var re;(re=this._selectionService)==null||re.clearSelection()}selectAll(){var re;(re=this._selectionService)==null||re.selectAll()}selectLines(re,W){var ae;(ae=this._selectionService)==null||ae.selectLines(re,W)}_keyDown(re){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;const W=this.browser.isMac&&this.options.macOptionIsMeta&&re.altKey;if(!W&&!this._compositionHelper.keydown(re))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;W||re.key!=="Dead"&&re.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ae=(0,ee.evaluateKeyboardEvent)(re,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(re),ae.type===3||ae.type===2){const le=this.rows-1;return this.scrollLines(ae.type===2?-le:le),this.cancel(re,!0)}return ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,re)||(ae.cancel&&this.cancel(re,!0),!ae.key||!!(re.key&&!re.ctrlKey&&!re.altKey&&!re.metaKey&&re.key.length===1&&re.key.charCodeAt(0)>=65&&re.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ae.key!==J.C0.ETX&&ae.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ae.key,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||re.altKey||re.ctrlKey?this.cancel(re,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(re,W){const ae=re.isMac&&!this.options.macOptionIsMeta&&W.altKey&&!W.ctrlKey&&!W.metaKey||re.isWindows&&W.altKey&&W.ctrlKey&&!W.metaKey||re.isWindows&&W.getModifierState("AltGraph");return W.type==="keypress"?ae:ae&&(!W.keyCode||W.keyCode>47)}_keyUp(re){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1||((function(W){return W.keyCode===16||W.keyCode===17||W.keyCode===18})(re)||this.focus(),this.updateCursorStyle(re),this._keyPressHandled=!1)}_keyPress(re){let W;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;if(this.cancel(re),re.charCode)W=re.charCode;else if(re.which===null||re.which===void 0)W=re.keyCode;else{if(re.which===0||re.charCode===0)return!1;W=re.which}return!(!W||(re.altKey||re.ctrlKey||re.metaKey)&&!this._isThirdLevelShift(this.browser,re)||(W=String.fromCharCode(W),this._onKey.fire({key:W,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(W,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(re){if(re.data&&re.inputType==="insertText"&&(!re.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const W=re.data;return this.coreService.triggerDataEvent(W,!0),this.cancel(re),!0}return!1}resize(re,W){re!==this.cols||W!==this.rows?super.resize(re,W):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(re,W){var ae,le;(ae=this._charSizeService)==null||ae.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var re;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let W=1;W{Object.defineProperty(i,"__esModule",{value:!0}),i.TimeBasedDebouncer=void 0,i.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const _=Date.now();if(_-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=_,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=_-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),m)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(a,i,c){var u=this&&this.__decorate||function(b,x,y,S){var z,E=arguments.length,A=E<3?x:S===null?S=Object.getOwnPropertyDescriptor(x,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,x,y,S);else for(var N=b.length-1;N>=0;N--)(z=b[N])&&(A=(E<3?z(A):E>3?z(x,y,A):z(x,y))||A);return E>3&&A&&Object.defineProperty(x,y,A),A},d=this&&this.__param||function(b,x){return function(y,S){x(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Viewport=void 0;const _=c(3656),p=c(4725),m=c(8460),k=c(844),w=c(2585);let v=i.Viewport=class extends k.Disposable{constructor(b,x,y,S,z,E,A,N){super(),this._viewportElement=b,this._scrollArea=x,this._bufferService=y,this._optionsService=S,this._charSizeService=z,this._renderService=E,this._coreBrowserService=A,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((M=>this._activeBuffer=M.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((M=>this._renderDimensions=M))),this._handleThemeChange(N.colors),this.register(N.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(b){if(b)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const x=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:x,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(b,x){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(x<0&&this._viewportElement.scrollTop!==0||x>0&&y0&&(y=I),S=""}}return{bufferElements:z,cursorElement:y}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let x=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(x/=this._currentRowHeight+0,this._wheelPartialScroll+=x,x=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(x*=this._bufferService.rows),x}_applyScrollModifier(b,x){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&x.altKey||y==="ctrl"&&x.ctrlKey||y==="shift"&&x.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const x=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,x!==0&&(this._viewportElement.scrollTop+=x,this._bubbleScroll(b,x))}};i.Viewport=v=u([d(2,w.IBufferService),d(3,w.IOptionsService),d(4,p.ICharSizeService),d(5,p.IRenderService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],v)},3107:function(a,i,c){var u=this&&this.__decorate||function(w,v,b,x){var y,S=arguments.length,z=S<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(w,v,b,x);else for(var E=w.length-1;E>=0;E--)(y=w[E])&&(z=(S<3?y(z):S>3?y(v,b,z):y(v,b))||z);return S>3&&z&&Object.defineProperty(v,b,z),z},d=this&&this.__param||function(w,v){return function(b,x){v(b,x,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferDecorationRenderer=void 0;const _=c(4725),p=c(844),m=c(2585);let k=i.BufferDecorationRenderer=class extends p.Disposable{constructor(w,v,b,x,y){super(),this._screenElement=w,this._bufferService=v,this._coreBrowserService=b,this._decorationService=x,this._renderService=y,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((S=>this._removeDecoration(S)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const w of this._decorationService.decorations)this._renderDecoration(w);this._dimensionsChanged=!1}_renderDecoration(w){this._refreshStyle(w),this._dimensionsChanged&&this._refreshXPosition(w)}_createElement(w){var x;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((x=w==null?void 0:w.options)==null?void 0:x.layer)==="top"),v.style.width=`${Math.round((w.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(w.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(w.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=w.options.x??0;return b&&b>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(w,v),v}_refreshStyle(w){const v=w.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)w.element&&(w.element.style.display="none",w.onRenderEmitter.fire(w.element));else{let b=this._decorationElements.get(w);b||(b=this._createElement(w),w.element=b,this._decorationElements.set(w,b),this._container.appendChild(b),w.onDispose((()=>{this._decorationElements.delete(w),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",w.onRenderEmitter.fire(b)}}_refreshXPosition(w,v=w.element){if(!v)return;const b=w.options.x??0;(w.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(w){var v;(v=this._decorationElements.get(w))==null||v.remove(),this._decorationElements.delete(w),w.dispose()}};i.BufferDecorationRenderer=k=u([d(1,m.IBufferService),d(2,_.ICoreBrowserService),d(3,m.IDecorationService),d(4,_.IRenderService)],k)},5871:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorZoneStore=void 0,i.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,d){return u>=c.startBufferLine-this._linePadding[d||"full"]&&u<=c.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(a,i,c){var u=this&&this.__decorate||function(y,S,z,E){var A,N=arguments.length,M=N<3?S:E===null?E=Object.getOwnPropertyDescriptor(S,z):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,S,z,E);else for(var $=y.length-1;$>=0;$--)(A=y[$])&&(M=(N<3?A(M):N>3?A(S,z,M):A(S,z))||M);return N>3&&M&&Object.defineProperty(S,z,M),M},d=this&&this.__param||function(y,S){return function(z,E){S(z,E,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OverviewRulerRenderer=void 0;const _=c(5871),p=c(4725),m=c(844),k=c(2585),w={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let x=i.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,S,z,E,A,N,M){var D;super(),this._viewportElement=y,this._screenElement=S,this._bufferService=z,this._decorationService=E,this._renderService=A,this._optionsService=N,this._coreBrowserService=M,this._colorZoneStore=new _.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(D=this._viewportElement.parentElement)==null||D.insertBefore(this._canvas,this._viewportElement);const $=this._canvas.getContext("2d");if(!$)throw new Error("Ctx cannot be null");this._ctx=$,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var I;(I=this._canvas)==null||I.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const y=Math.floor(this._canvas.width/3),S=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=y,v.center=S,v.right=y,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){w.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);w.left=S,w.center=S,w.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const y=this._colorZoneStore.zones;for(const S of y)S.position!=="full"&&this._renderColorZone(S);for(const S of y)S.position==="full"&&this._renderColorZone(S);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(b[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-w[y.position||"full"]/2),v[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+w[y.position||"full"]))}_queueRefresh(y,S){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};i.OverviewRulerRenderer=x=u([d(2,k.IBufferService),d(3,k.IDecorationService),d(4,p.IRenderService),d(5,k.IOptionsService),d(6,p.ICoreBrowserService)],x)},2950:function(a,i,c){var u=this&&this.__decorate||function(w,v,b,x){var y,S=arguments.length,z=S<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(w,v,b,x);else for(var E=w.length-1;E>=0;E--)(y=w[E])&&(z=(S<3?y(z):S>3?y(v,b,z):y(v,b))||z);return S>3&&z&&Object.defineProperty(v,b,z),z},d=this&&this.__param||function(w,v){return function(b,x){v(b,x,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CompositionHelper=void 0;const _=c(4725),p=c(2585),m=c(2584);let k=i.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(w,v,b,x,y,S){this._textarea=w,this._compositionView=v,this._bufferService=b,this._optionsService=x,this._coreService=y,this._renderService=S,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(w){this._compositionView.textContent=w.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(w){if(this._isComposing||this._isSendingComposition){if(w.keyCode===229||w.keyCode===16||w.keyCode===17||w.keyCode===18)return!1;this._finalizeComposition(!1)}return w.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(w){if(this._compositionView.classList.remove("active"),this._isComposing=!1,w){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const w=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,b=v.replace(w,"");this._dataAlreadySent=b,v.length>w.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};i.CompositionHelper=k=u([d(2,p.IBufferService),d(3,p.IOptionsService),d(4,p.ICoreService),d(5,_.IRenderService)],k)},9806:(a,i)=>{function c(u,d,_){const p=_.getBoundingClientRect(),m=u.getComputedStyle(_),k=parseInt(m.getPropertyValue("padding-left")),w=parseInt(m.getPropertyValue("padding-top"));return[d.clientX-p.left-k,d.clientY-p.top-w]}Object.defineProperty(i,"__esModule",{value:!0}),i.getCoords=i.getCoordsRelativeToElement=void 0,i.getCoordsRelativeToElement=c,i.getCoords=function(u,d,_,p,m,k,w,v,b){if(!k)return;const x=c(u,d,_);return x?(x[0]=Math.ceil((x[0]+(b?w/2:0))/w),x[1]=Math.ceil(x[1]/v),x[0]=Math.min(Math.max(x[0],1),p+(b?1:0)),x[1]=Math.min(Math.max(x[1],1),m),x):void 0}},9504:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.moveToCellSequence=void 0;const u=c(2584);function d(v,b,x,y){const S=v-_(v,x),z=b-_(b,x),E=Math.abs(S-z)-(function(A,N,M){let $=0;const D=A-_(A,M),I=N-_(N,M);for(let G=0;G=0&&vb?"A":"B"}function m(v,b,x,y,S,z){let E=v,A=b,N="";for(;E!==x||A!==y;)E+=S?1:-1,S&&E>z.cols-1?(N+=z.buffer.translateBufferLineToString(A,!1,v,E),E=0,v=0,A++):!S&&E<0&&(N+=z.buffer.translateBufferLineToString(A,!1,0,v+1),E=z.cols-1,v=E,A--);return N+z.buffer.translateBufferLineToString(A,!1,v,E)}function k(v,b){const x=b?"O":"[";return u.C0.ESC+x+v}function w(v,b){v=Math.floor(v);let x="";for(let y=0;y0?D-_(D,I):M;const Q=D,K=(function(J,ee,P,L,F,q){let U;return U=d(P,L,F,q).length>0?L-_(L,F):ee,J=P&&Uv?"D":"C",w(Math.abs(S-v),k(E,y));E=z>b?"D":"C";const A=Math.abs(z-b);return w((function(N,M){return M.cols-N})(z>b?v:S,x)+(A-1)*x.cols+1+((z>b?S:v)-1),k(E,y))}},1296:function(a,i,c){var u=this&&this.__decorate||function(G,H,Q,K){var J,ee=arguments.length,P=ee<3?H:K===null?K=Object.getOwnPropertyDescriptor(H,Q):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(G,H,Q,K);else for(var L=G.length-1;L>=0;L--)(J=G[L])&&(P=(ee<3?J(P):ee>3?J(H,Q,P):J(H,Q))||P);return ee>3&&P&&Object.defineProperty(H,Q,P),P},d=this&&this.__param||function(G,H){return function(Q,K){H(Q,K,G)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRenderer=void 0;const _=c(3787),p=c(2550),m=c(2223),k=c(6171),w=c(6052),v=c(4725),b=c(8055),x=c(8460),y=c(844),S=c(2585),z="xterm-dom-renderer-owner-",E="xterm-rows",A="xterm-fg-",N="xterm-bg-",M="xterm-focus",$="xterm-selection";let D=1,I=i.DomRenderer=class extends y.Disposable{constructor(G,H,Q,K,J,ee,P,L,F,q,U,oe,ie){super(),this._terminal=G,this._document=H,this._element=Q,this._screenElement=K,this._viewportElement=J,this._helperContainer=ee,this._linkifier2=P,this._charSizeService=F,this._optionsService=q,this._bufferService=U,this._coreBrowserService=oe,this._themeService=ie,this._terminalClass=D++,this._rowElements=[],this._selectionRenderModel=(0,w.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new x.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(E),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add($),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,k.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ce=>this._injectCss(ce)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(_.DomRendererRowFactory,document),this._element.classList.add(z+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ce=>this._handleLinkHover(ce)))),this.register(this._linkifier2.onHideLinkUnderline((ce=>this._handleLinkLeave(ce)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(z+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const G=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*G,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*G),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/G),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/G),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const Q of this._rowElements)Q.style.width=`${this.dimensions.css.canvas.width}px`,Q.style.height=`${this.dimensions.css.cell.height}px`,Q.style.lineHeight=`${this.dimensions.css.cell.height}px`,Q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const H=`${this._terminalSelector} .${E} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=H,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(G){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let H=`${this._terminalSelector} .${E} { color: ${G.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;H+=`${this._terminalSelector} .${E} .xterm-dim { color: ${b.color.multiplyOpacity(G.foreground,.5).css};}`,H+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const Q=`blink_underline_${this._terminalClass}`,K=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;H+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,H+=`@keyframes ${K} { 50% { box-shadow: none; }}`,H+=`@keyframes ${J} { 0% { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css}; } 50% { background-color: inherit; color: ${G.cursor.css}; }}`,H+=`${this._terminalSelector} .${E}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${E}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${E}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css};}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${G.cursor.css} !important; color: ${G.cursorAccent.css} !important;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${G.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${G.cursor.css} inset;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${G.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,H+=`${this._terminalSelector} .${$} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${$} div { position: absolute; background-color: ${G.selectionBackgroundOpaque.css};}${this._terminalSelector} .${$} div { position: absolute; background-color: ${G.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,P]of G.ansi.entries())H+=`${this._terminalSelector} .${A}${ee} { color: ${P.css}; }${this._terminalSelector} .${A}${ee}.xterm-dim { color: ${b.color.multiplyOpacity(P,.5).css}; }${this._terminalSelector} .${N}${ee} { background-color: ${P.css}; }`;H+=`${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(G.background).css}; }${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(G.background),.5).css}; }${this._terminalSelector} .${N}${m.INVERTED_DEFAULT_COLOR} { background-color: ${G.foreground.css}; }`,this._themeStyleElement.textContent=H}_setDefaultSpacing(){const G=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${G}px`,this._rowFactory.defaultSpacing=G}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(G,H){for(let Q=this._rowElements.length;Q<=H;Q++){const K=this._document.createElement("div");this._rowContainer.appendChild(K),this._rowElements.push(K)}for(;this._rowElements.length>H;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(G,H){this._refreshRowElements(G,H),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(M),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(M),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(G,H,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(G,H,Q),this.renderRows(0,this._bufferService.rows-1),!G||!H)return;this._selectionRenderModel.update(this._terminal,G,H,Q);const K=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,P=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||P<0)return;const L=this._document.createDocumentFragment();if(Q){const F=G[0]>H[0];L.appendChild(this._createSelectionElement(ee,F?H[0]:G[0],F?G[0]:H[0],P-ee+1))}else{const F=K===ee?G[0]:0,q=ee===J?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(ee,F,q));const U=P-ee-1;if(L.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,U)),ee!==P){const oe=J===P?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(P,0,oe))}}this._selectionContainer.appendChild(L)}_createSelectionElement(G,H,Q,K=1){const J=this._document.createElement("div"),ee=H*this.dimensions.css.cell.width;let P=this.dimensions.css.cell.width*(Q-H);return ee+P>this.dimensions.css.canvas.width&&(P=this.dimensions.css.canvas.width-ee),J.style.height=K*this.dimensions.css.cell.height+"px",J.style.top=G*this.dimensions.css.cell.height+"px",J.style.left=`${ee}px`,J.style.width=`${P}px`,J}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const G of this._rowElements)G.replaceChildren()}renderRows(G,H){const Q=this._bufferService.buffer,K=Q.ybase+Q.y,J=Math.min(Q.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,P=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=G;F<=H;F++){const q=F+Q.ydisp,U=this._rowElements[F],oe=Q.lines.get(q);if(!U||!oe)break;U.replaceChildren(...this._rowFactory.createRow(oe,q,q===K,P,L,J,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${z}${this._terminalClass}`}_handleLinkHover(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!0)}_handleLinkLeave(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!1)}_setCellUnderline(G,H,Q,K,J,ee){Q<0&&(G=0),K<0&&(H=0);const P=this._bufferService.rows-1;Q=Math.max(Math.min(Q,P),0),K=Math.max(Math.min(K,P),0),J=Math.min(J,this._bufferService.cols);const L=this._bufferService.buffer,F=L.ybase+L.y,q=Math.min(L.x,J-1),U=this._optionsService.rawOptions.cursorBlink,oe=this._optionsService.rawOptions.cursorStyle,ie=this._optionsService.rawOptions.cursorInactiveStyle;for(let ce=Q;ce<=K;++ce){const re=ce+L.ydisp,W=this._rowElements[ce],ae=L.lines.get(re);if(!W||!ae)break;W.replaceChildren(...this._rowFactory.createRow(ae,re,re===F,oe,ie,q,U,this.dimensions.css.cell.width,this._widthCache,ee?ce===Q?G:0:-1,ee?(ce===K?H:J)-1:-1))}}};i.DomRenderer=I=u([d(7,S.IInstantiationService),d(8,v.ICharSizeService),d(9,S.IOptionsService),d(10,S.IBufferService),d(11,v.ICoreBrowserService),d(12,v.IThemeService)],I)},3787:function(a,i,c){var u=this&&this.__decorate||function(E,A,N,M){var $,D=arguments.length,I=D<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,N):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(E,A,N,M);else for(var G=E.length-1;G>=0;G--)($=E[G])&&(I=(D<3?$(I):D>3?$(A,N,I):$(A,N))||I);return D>3&&I&&Object.defineProperty(A,N,I),I},d=this&&this.__param||function(E,A){return function(N,M){A(N,M,E)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRendererRowFactory=void 0;const _=c(2223),p=c(643),m=c(511),k=c(2585),w=c(8055),v=c(4725),b=c(4269),x=c(6171),y=c(3734);let S=i.DomRendererRowFactory=class{constructor(E,A,N,M,$,D,I){this._document=E,this._characterJoinerService=A,this._optionsService=N,this._coreBrowserService=M,this._coreService=$,this._decorationService=D,this._themeService=I,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,A,N){this._selectionStart=E,this._selectionEnd=A,this._columnSelectMode=N}createRow(E,A,N,M,$,D,I,G,H,Q,K){const J=[],ee=this._characterJoinerService.getJoinedCharacters(A),P=this._themeService.colors;let L,F=E.getNoBgTrimmedLength();N&&F0&&Se===ee[0][0]){Xe=!0;const at=ee.shift();Fe=new b.JoinedCellData(this._workCell,E.translateToString(!0,at[0],at[1]),at[1]-at[0]),Me=at[1]-1,Be=Fe.getWidth()}const pt=this._isCellInSelection(Se,A),Ct=N&&Se===D,Vt=be&&Se>=Q&&Se<=K;let Ut=!1;this._decorationService.forEachDecorationAtCell(Se,A,void 0,(at=>{Ut=!0}));let Gt=Fe.getChars()||p.WHITESPACE_CELL_CHAR;if(Gt===" "&&(Fe.isUnderline()||Fe.isOverline())&&(Gt=" "),le=Be*G-H.get(Gt,Fe.isBold(),Fe.isItalic()),L){if(q&&(pt&&ae||!pt&&!ae&&Fe.bg===oe)&&(pt&&ae&&P.selectionForeground||Fe.fg===ie)&&Fe.extended.ext===ce&&Vt===re&&le===W&&!Ct&&!Xe&&!Ut){Fe.isInvisible()?U+=p.WHITESPACE_CELL_CHAR:U+=Gt,q++;continue}q&&(L.textContent=U),L=this._document.createElement("span"),q=0,U=""}else L=this._document.createElement("span");if(oe=Fe.bg,ie=Fe.fg,ce=Fe.extended.ext,re=Vt,W=le,ae=pt,Xe&&D>=Se&&D<=Me&&(D=Se),!this._coreService.isCursorHidden&&Ct&&this._coreService.isCursorInitialized){if(me.push("xterm-cursor"),this._coreBrowserService.isFocused)I&&me.push("xterm-cursor-blink"),me.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if($)switch($){case"outline":me.push("xterm-cursor-outline");break;case"block":me.push("xterm-cursor-block");break;case"bar":me.push("xterm-cursor-bar");break;case"underline":me.push("xterm-cursor-underline")}}if(Fe.isBold()&&me.push("xterm-bold"),Fe.isItalic()&&me.push("xterm-italic"),Fe.isDim()&&me.push("xterm-dim"),U=Fe.isInvisible()?p.WHITESPACE_CELL_CHAR:Fe.getChars()||p.WHITESPACE_CELL_CHAR,Fe.isUnderline()&&(me.push(`xterm-underline-${Fe.extended.underlineStyle}`),U===" "&&(U=" "),!Fe.isUnderlineColorDefault()))if(Fe.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Fe.getUnderlineColor()).join(",")})`;else{let at=Fe.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Fe.isBold()&&at<8&&(at+=8),L.style.textDecorationColor=P.ansi[at].css}Fe.isOverline()&&(me.push("xterm-overline"),U===" "&&(U=" ")),Fe.isStrikethrough()&&me.push("xterm-strikethrough"),Vt&&(L.style.textDecoration="underline");let De=Fe.getFgColor(),ct=Fe.getFgColorMode(),lt=Fe.getBgColor(),xe=Fe.getBgColorMode();const Ie=!!Fe.isInverse();if(Ie){const at=De;De=lt,lt=at;const At=ct;ct=xe,xe=At}let Ye,Ae,Ve,Ze=!1;switch(this._decorationService.forEachDecorationAtCell(Se,A,void 0,(at=>{at.options.layer!=="top"&&Ze||(at.backgroundColorRGB&&(xe=50331648,lt=at.backgroundColorRGB.rgba>>8&16777215,Ye=at.backgroundColorRGB),at.foregroundColorRGB&&(ct=50331648,De=at.foregroundColorRGB.rgba>>8&16777215,Ae=at.foregroundColorRGB),Ze=at.options.layer==="top")})),!Ze&&pt&&(Ye=this._coreBrowserService.isFocused?P.selectionBackgroundOpaque:P.selectionInactiveBackgroundOpaque,lt=Ye.rgba>>8&16777215,xe=50331648,Ze=!0,P.selectionForeground&&(ct=50331648,De=P.selectionForeground.rgba>>8&16777215,Ae=P.selectionForeground)),Ze&&me.push("xterm-decoration-top"),xe){case 16777216:case 33554432:Ve=P.ansi[lt],me.push(`xterm-bg-${lt}`);break;case 50331648:Ve=w.channels.toColor(lt>>16,lt>>8&255,255<),this._addStyle(L,`background-color:#${z((lt>>>0).toString(16),"0",6)}`);break;default:Ie?(Ve=P.foreground,me.push(`xterm-bg-${_.INVERTED_DEFAULT_COLOR}`)):Ve=P.background}switch(Ye||Fe.isDim()&&(Ye=w.color.multiplyOpacity(Ve,.5)),ct){case 16777216:case 33554432:Fe.isBold()&&De<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(De+=8),this._applyMinimumContrast(L,Ve,P.ansi[De],Fe,Ye,void 0)||me.push(`xterm-fg-${De}`);break;case 50331648:const at=w.channels.toColor(De>>16&255,De>>8&255,255&De);this._applyMinimumContrast(L,Ve,at,Fe,Ye,Ae)||this._addStyle(L,`color:#${z(De.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,Ve,P.foreground,Fe,Ye,Ae)||Ie&&me.push(`xterm-fg-${_.INVERTED_DEFAULT_COLOR}`)}me.length&&(L.className=me.join(" "),me.length=0),Ct||Xe||Ut?L.textContent=U:q++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),J.push(L),Se=Me}return L&&q&&(L.textContent=U),J}_applyMinimumContrast(E,A,N,M,$,D){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,x.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const I=this._getContrastCache(M);let G;if($||D||(G=I.getColor(A.rgba,N.rgba)),G===void 0){const H=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);G=w.color.ensureContrastRatio($||A,D||N,H),I.setColor(($||A).rgba,(D||N).rgba,G??null)}return!!G&&(this._addStyle(E,`color:${G.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,A){E.setAttribute("style",`${E.getAttribute("style")||""}${A};`)}_isCellInSelection(E,A){const N=this._selectionStart,M=this._selectionEnd;return!(!N||!M)&&(this._columnSelectMode?N[0]<=M[0]?E>=N[0]&&A>=N[1]&&E=N[1]&&E>=M[0]&&A<=M[1]:A>N[1]&&A=N[0]&&E=N[0])}};function z(E,A,N){for(;E.length{Object.defineProperty(i,"__esModule",{value:!0}),i.WidthCache=void 0,i.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const d=c.createElement("span");d.classList.add("xterm-char-measure-element");const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[d,_,p,m],this._container.appendChild(d),this._container.appendChild(_),this._container.appendChild(p),this._container.appendChild(m),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,u,d,_){c===this._font&&u===this._fontSize&&d===this._weight&&_===this._weightBold||(this._font=c,this._fontSize=u,this._weight=d,this._weightBold=_,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${_}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${_}`,this.clear())}get(c,u,d){let _=0;if(!u&&!d&&c.length===1&&(_=c.charCodeAt(0))<256){if(this._flat[_]!==-9999)return this._flat[_];const k=this._measure(c,0);return k>0&&(this._flat[_]=k),k}let p=c;u&&(p+="B"),d&&(p+="I");let m=this._holey.get(p);if(m===void 0){let k=0;u&&(k|=1),d&&(k|=2),m=this._measure(c,k),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const d=this._measureElements[u];return d.textContent=c.repeat(32),d.offsetWidth/32}}},2223:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TEXT_BASELINE=i.DIM_OPACITY=i.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);i.INVERTED_DEFAULT_COLOR=257,i.DIM_OPACITY=.5,i.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,i)=>{function c(d){return 57508<=d&&d<=57558}function u(d){return d>=128512&&d<=128591||d>=127744&&d<=128511||d>=128640&&d<=128767||d>=9728&&d<=9983||d>=9984&&d<=10175||d>=65024&&d<=65039||d>=129280&&d<=129535||d>=127462&&d<=127487}Object.defineProperty(i,"__esModule",{value:!0}),i.computeNextVariantOffset=i.createRenderDimensions=i.treatGlyphAsBackgroundColor=i.allowRescaling=i.isEmoji=i.isRestrictedPowerlineGlyph=i.isPowerlineGlyph=i.throwIfFalsy=void 0,i.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},i.isPowerlineGlyph=c,i.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},i.isEmoji=u,i.allowRescaling=function(d,_,p,m){return _===1&&p>Math.ceil(1.5*m)&&d!==void 0&&d>255&&!u(d)&&!c(d)&&!(function(k){return 57344<=k&&k<=63743})(d)},i.treatGlyphAsBackgroundColor=function(d){return c(d)||(function(_){return 9472<=_&&_<=9631})(d)},i.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},i.computeNextVariantOffset=function(d,_,p=0){return(d-(2*Math.round(_)-p))%(2*Math.round(_))}},6052:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createSelectionRenderModel=void 0;class c{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(d,_,p,m=!1){if(this.selectionStart=_,this.selectionEnd=p,!_||!p||_[0]===p[0]&&_[1]===p[1])return void this.clear();const k=d.buffers.active.ydisp,w=_[1]-k,v=p[1]-k,b=Math.max(w,0),x=Math.min(v,d.rows-1);b>=d.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=w,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=x,this.startCol=_[0],this.endCol=p[0])}isCellSelected(d,_,p){return!!this.hasSelection&&(p-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?_>=this.startCol&&p>=this.viewportCappedStartRow&&_=this.viewportCappedStartRow&&_>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&_=this.startCol)}}i.createSelectionRenderModel=function(){return new c}},456:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionModel=void 0,i.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,i,c){var u=this&&this.__decorate||function(x,y,S,z){var E,A=arguments.length,N=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(x,y,S,z);else for(var M=x.length-1;M>=0;M--)(E=x[M])&&(N=(A<3?E(N):A>3?E(y,S,N):E(y,S))||N);return A>3&&N&&Object.defineProperty(y,S,N),N},d=this&&this.__param||function(x,y){return function(S,z){y(S,z,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharSizeService=void 0;const _=c(2585),p=c(8460),m=c(844);let k=i.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(x,y,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new v(x,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const x=this._measureStrategy.measure();x.width===this.width&&x.height===this.height||(this.width=x.width,this.height=x.height,this._onCharSizeChange.fire())}};i.CharSizeService=k=u([d(2,_.IOptionsService)],k);class w extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,S){y!==void 0&&y>0&&S!==void 0&&S>0&&(this._result.width=y,this._result.height=S)}}class v extends w{constructor(y,S,z){super(),this._document=y,this._parentElement=S,this._optionsService=z,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class b extends w{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(a,i,c){var u=this&&this.__decorate||function(b,x,y,S){var z,E=arguments.length,A=E<3?x:S===null?S=Object.getOwnPropertyDescriptor(x,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,x,y,S);else for(var N=b.length-1;N>=0;N--)(z=b[N])&&(A=(E<3?z(A):E>3?z(x,y,A):z(x,y))||A);return E>3&&A&&Object.defineProperty(x,y,A),A},d=this&&this.__param||function(b,x){return function(y,S){x(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharacterJoinerService=i.JoinedCellData=void 0;const _=c(3734),p=c(643),m=c(511),k=c(2585);class w extends _.AttributeData{constructor(x,y,S){super(),this.content=0,this.combinedData="",this.fg=x.fg,this.bg=x.bg,this.combinedData=y,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(x){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.JoinedCellData=w;let v=i.CharacterJoinerService=class YI{constructor(x){this._bufferService=x,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(x){const y={id:this._nextCharacterJoinerId++,handler:x};return this._characterJoiners.push(y),y.id}deregister(x){for(let y=0;y1){const I=this._getJoinedRanges(z,N,A,y,E);for(let G=0;G1){const D=this._getJoinedRanges(z,N,A,y,E);for(let I=0;I{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreBrowserService=void 0;const u=c(844),d=c(8460),_=c(3656);class p extends u.Disposable{constructor(w,v,b){super(),this._textarea=w,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new d.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((x=>this._screenDprMonitor.setWindow(x)))),this.register((0,d.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(w){this._window!==w&&(this._window=w,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}i.CoreBrowserService=p;class m extends u.Disposable{constructor(w){super(),this._parentWindow=w,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(w){this._parentWindow=w,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,_.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var w;this._outerListener&&((w=this._resolutionMediaMatchList)==null||w.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LinkProviderService=void 0;const u=c(844);class d extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const m=this.linkProviders.indexOf(p);m!==-1&&this.linkProviders.splice(m,1)}}}}i.LinkProviderService=d},8934:function(a,i,c){var u=this&&this.__decorate||function(k,w,v,b){var x,y=arguments.length,S=y<3?w:b===null?b=Object.getOwnPropertyDescriptor(w,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(k,w,v,b);else for(var z=k.length-1;z>=0;z--)(x=k[z])&&(S=(y<3?x(S):y>3?x(w,v,S):x(w,v))||S);return y>3&&S&&Object.defineProperty(w,v,S),S},d=this&&this.__param||function(k,w){return function(v,b){w(v,b,k)}};Object.defineProperty(i,"__esModule",{value:!0}),i.MouseService=void 0;const _=c(4725),p=c(9806);let m=i.MouseService=class{constructor(k,w){this._renderService=k,this._charSizeService=w}getCoords(k,w,v,b,x){return(0,p.getCoords)(window,k,w,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,x)}getMouseReportCoords(k,w){const v=(0,p.getCoordsRelativeToElement)(window,k,w);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};i.MouseService=m=u([d(0,_.IRenderService),d(1,_.ICharSizeService)],m)},3230:function(a,i,c){var u=this&&this.__decorate||function(x,y,S,z){var E,A=arguments.length,N=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(x,y,S,z);else for(var M=x.length-1;M>=0;M--)(E=x[M])&&(N=(A<3?E(N):A>3?E(y,S,N):E(y,S))||N);return A>3&&N&&Object.defineProperty(y,S,N),N},d=this&&this.__param||function(x,y){return function(S,z){y(S,z,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.RenderService=void 0;const _=c(6193),p=c(4725),m=c(8460),k=c(844),w=c(7226),v=c(2585);let b=i.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(x,y,S,z,E,A,N,M){super(),this._rowCount=x,this._charSizeService=z,this._renderer=this.register(new k.MutableDisposable),this._pausedResizeTask=new w.DebouncedIdleTask,this._observerDisposable=this.register(new k.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new m.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new m.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new m.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new m.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new _.RenderDebouncer((($,D)=>this._renderRows($,D)),N),this.register(this._renderDebouncer),this.register(N.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(A.onResize((()=>this._fullRefresh()))),this.register(A.buffers.onBufferActivate((()=>{var $;return($=this._renderer.value)==null?void 0:$.clear()}))),this.register(S.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(E.onDecorationRegistered((()=>this._fullRefresh()))),this.register(E.onDecorationRemoved((()=>this._fullRefresh()))),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()}))),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(A.buffer.y,A.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(N.window,y),this.register(N.onWindowChange(($=>this._registerIntersectionObserver($,y))))}_registerIntersectionObserver(x,y){if("IntersectionObserver"in x){const S=new x.IntersectionObserver((z=>this._handleIntersectionChange(z[z.length-1])),{threshold:0});S.observe(y),this._observerDisposable.value=(0,k.toDisposable)((()=>S.disconnect()))}}_handleIntersectionChange(x){this._isPaused=x.isIntersecting===void 0?x.intersectionRatio===0:!x.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(x,y,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(x,y,this._rowCount))}_renderRows(x,y){this._renderer.value&&(x=Math.min(x,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(x,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:x,end:y}),this._onRender.fire({start:x,end:y}),this._isNextRenderRedrawOnly=!0)}resize(x,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(x){this._renderer.value=x,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(x){return this._renderDebouncer.addRefreshCallback(x)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var x,y;this._renderer.value&&((y=(x=this._renderer.value).clearTextureAtlas)==null||y.call(x),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(x,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var S;return(S=this._renderer.value)==null?void 0:S.handleResize(x,y)})):this._renderer.value.handleResize(x,y),this._fullRefresh())}handleCharSizeChanged(){var x;(x=this._renderer.value)==null||x.handleCharSizeChanged()}handleBlur(){var x;(x=this._renderer.value)==null||x.handleBlur()}handleFocus(){var x;(x=this._renderer.value)==null||x.handleFocus()}handleSelectionChanged(x,y,S){var z;this._selectionState.start=x,this._selectionState.end=y,this._selectionState.columnSelectMode=S,(z=this._renderer.value)==null||z.handleSelectionChanged(x,y,S)}handleCursorMove(){var x;(x=this._renderer.value)==null||x.handleCursorMove()}clear(){var x;(x=this._renderer.value)==null||x.clear()}};i.RenderService=b=u([d(2,v.IOptionsService),d(3,p.ICharSizeService),d(4,v.IDecorationService),d(5,v.IBufferService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],b)},9312:function(a,i,c){var u=this&&this.__decorate||function(N,M,$,D){var I,G=arguments.length,H=G<3?M:D===null?D=Object.getOwnPropertyDescriptor(M,$):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(N,M,$,D);else for(var Q=N.length-1;Q>=0;Q--)(I=N[Q])&&(H=(G<3?I(H):G>3?I(M,$,H):I(M,$))||H);return G>3&&H&&Object.defineProperty(M,$,H),H},d=this&&this.__param||function(N,M){return function($,D){M($,D,N)}};Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionService=void 0;const _=c(9806),p=c(9504),m=c(456),k=c(4725),w=c(8460),v=c(844),b=c(6114),x=c(4841),y=c(511),S=c(2585),z=" ",E=new RegExp(z,"g");let A=i.SelectionService=class extends v.Disposable{constructor(N,M,$,D,I,G,H,Q,K){super(),this._element=N,this._screenElement=M,this._linkifier=$,this._bufferService=D,this._coreService=I,this._mouseService=G,this._optionsService=H,this._renderService=Q,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new w.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new w.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new w.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const N=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!N||!M||N[0]===M[0]&&N[1]===M[1])}get selectionText(){const N=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!N||!M)return"";const $=this._bufferService.buffer,D=[];if(this._activeSelectionMode===3){if(N[0]===M[0])return"";const I=N[0]I.replace(E," "))).join(b.isWindows?`\r +WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}i.OscLinkProvider=m=u([d(0,p.IBufferService),d(1,p.IOptionsService),d(2,p.IOscLinkService)],m)},6193:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.RenderDebouncer=void 0,i.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Terminal=void 0;const u=c(3614),d=c(3656),_=c(3551),p=c(9042),m=c(3730),k=c(1680),x=c(3107),v=c(5744),b=c(2950),w=c(1296),y=c(428),S=c(4269),z=c(5114),N=c(8934),A=c(3230),E=c(9312),M=c(4725),$=c(6731),D=c(8055),I=c(8969),G=c(8460),H=c(844),Q=c(6114),K=c(8437),J=c(2584),ee=c(7399),P=c(5941),L=c(9074),F=c(2585),q=c(5435),U=c(4567),oe=c(779);class ie extends I.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(re={}){super(re),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new H.MutableDisposable),this._onCursorMove=this.register(new G.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new G.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new G.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new G.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new G.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new G.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new G.EventEmitter),this._onBlur=this.register(new G.EventEmitter),this._onA11yCharEmitter=this.register(new G.EventEmitter),this._onA11yTabEmitter=this.register(new G.EventEmitter),this._onWillOpen=this.register(new G.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(oe.LinkProviderService),this._instantiationService.setService(M.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(m.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((W,ae)=>this.refresh(W,ae)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((W=>this._reportWindowsOptions(W)))),this.register(this._inputHandler.onColor((W=>this._handleColorEvent(W)))),this.register((0,G.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,G.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((W=>this._afterResize(W.cols,W.rows)))),this.register((0,H.toDisposable)((()=>{var W,ae;this._customKeyEventHandler=void 0,(ae=(W=this.element)==null?void 0:W.parentNode)==null||ae.removeChild(this.element)})))}_handleColorEvent(re){if(this._themeService)for(const W of re){let ae,le="";switch(W.index){case 256:ae="foreground",le="10";break;case 257:ae="background",le="11";break;case 258:ae="cursor",le="12";break;default:ae="ansi",le="4;"+W.index}switch(W.type){case 0:const me=D.color.toColorRGB(ae==="ansi"?this._themeService.colors.ansi[W.index]:this._themeService.colors[ae]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${le};${(0,P.toRgbString)(me)}${J.C1_ESCAPED.ST}`);break;case 1:if(ae==="ansi")this._themeService.modifyColors((be=>be.ansi[W.index]=D.channels.toColor(...W.color)));else{const be=ae;this._themeService.modifyColors((Se=>Se[be]=D.channels.toColor(...W.color)))}break;case 2:this._themeService.restoreColor(W.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(re){re?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(U.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(re){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var re;return(re=this.textarea)==null?void 0:re.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const re=this.buffer.ybase+this.buffer.y,W=this.buffer.lines.get(re);if(!W)return;const ae=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,me=W.getWidth(ae),be=this._renderService.dimensions.css.cell.width*me,Se=this.buffer.y*this._renderService.dimensions.css.cell.height,Be=ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Be+"px",this.textarea.style.top=Se+"px",this.textarea.style.width=be+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(W=>{this.hasSelection()&&(0,u.copyHandler)(W,this._selectionService)})));const re=W=>(0,u.handlePasteEvent)(W,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",re)),this.register((0,d.addDisposableDomListener)(this.element,"paste",re)),Q.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(W=>{W.button===2&&(0,u.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(W=>{(0,u.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(W=>{W.button===1&&(0,u.moveTextAreaUnderMouseCursor)(W,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(re=>this._keyUp(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(re=>this._keyDown(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(re=>this._keyPress(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(re=>this._compositionHelper.compositionupdate(re)))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(re=>this._inputEvent(re)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(re){var ae;if(!re)throw new Error("Terminal requires a parent element.");if(re.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ae=this.element)==null?void 0:ae.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=re.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),re.appendChild(this.element);const W=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),W.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,d.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),W.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Q.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(z.CoreBrowserService,this.textarea,re.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance($.ThemeService),this._instantiationService.setService(M.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(M.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(N.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(_.Linkifier,this.screenElement)),this.element.appendChild(W);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(k.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(E.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(U.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(w.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const re=this,W=this.element;function ae(be){const Se=re._mouseService.getMouseReportCoords(be,re.screenElement);if(!Se)return!1;let Be,Xe;switch(be.overrideType||be.type){case"mousemove":Xe=32,be.buttons===void 0?(Be=3,be.button!==void 0&&(Be=be.button<3?be.button:3)):Be=1&be.buttons?0:4&be.buttons?1:2&be.buttons?2:3;break;case"mouseup":Xe=0,Be=be.button<3?be.button:3;break;case"mousedown":Xe=1,Be=be.button<3?be.button:3;break;case"wheel":if(re._customWheelEventHandler&&re._customWheelEventHandler(be)===!1||re.viewport.getLinesScrolled(be)===0)return!1;Xe=be.deltaY<0?0:1,Be=4;break;default:return!1}return!(Xe===void 0||Be===void 0||Be>4)&&re.coreMouseService.triggerMouseEvent({col:Se.col,row:Se.row,x:Se.x,y:Se.y,button:Be,action:Xe,ctrl:be.ctrlKey,alt:be.altKey,shift:be.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},me={mouseup:be=>(ae(be),be.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(be)),wheel:be=>(ae(be),this.cancel(be,!0)),mousedrag:be=>{be.buttons&&ae(be)},mousemove:be=>{be.buttons||ae(be)}};this.register(this.coreMouseService.onProtocolChange((be=>{be?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(be)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&be?le.mousemove||(W.addEventListener("mousemove",me.mousemove),le.mousemove=me.mousemove):(W.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&be?le.wheel||(W.addEventListener("wheel",me.wheel,{passive:!1}),le.wheel=me.wheel):(W.removeEventListener("wheel",le.wheel),le.wheel=null),2&be?le.mouseup||(le.mouseup=me.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&be?le.mousedrag||(le.mousedrag=me.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(W,"mousedown",(be=>{if(be.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(be))return ae(be),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(be)}))),this.register((0,d.addDisposableDomListener)(W,"wheel",(be=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(be)===!1)return!1;if(!this.buffer.hasScrollback){const Se=this.viewport.getLinesScrolled(be);if(Se===0)return;const Be=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(be.deltaY<0?"A":"B");let Xe="";for(let Me=0;Me{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(be),this.cancel(be)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(W,"touchmove",(be=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(be)?void 0:this.cancel(be)}),{passive:!1}))}refresh(re,W){var ae;(ae=this._renderService)==null||ae.refreshRows(re,W)}updateCursorStyle(re){var W;(W=this._selectionService)!=null&&W.shouldColumnSelect(re)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(re,W,ae=0){var le;ae===1?(super.scrollLines(re,W,ae),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(re)}paste(re){(0,u.paste)(re,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(re){this._customKeyEventHandler=re}attachCustomWheelEventHandler(re){this._customWheelEventHandler=re}registerLinkProvider(re){return this._linkProviderService.registerLinkProvider(re)}registerCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const W=this._characterJoinerService.register(re);return this.refresh(0,this.rows-1),W}deregisterCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(re)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(re){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+re)}registerDecoration(re){return this._decorationService.registerDecoration(re)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(re,W,ae){this._selectionService.setSelection(re,W,ae)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var re;(re=this._selectionService)==null||re.clearSelection()}selectAll(){var re;(re=this._selectionService)==null||re.selectAll()}selectLines(re,W){var ae;(ae=this._selectionService)==null||ae.selectLines(re,W)}_keyDown(re){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;const W=this.browser.isMac&&this.options.macOptionIsMeta&&re.altKey;if(!W&&!this._compositionHelper.keydown(re))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;W||re.key!=="Dead"&&re.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ae=(0,ee.evaluateKeyboardEvent)(re,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(re),ae.type===3||ae.type===2){const le=this.rows-1;return this.scrollLines(ae.type===2?-le:le),this.cancel(re,!0)}return ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,re)||(ae.cancel&&this.cancel(re,!0),!ae.key||!!(re.key&&!re.ctrlKey&&!re.altKey&&!re.metaKey&&re.key.length===1&&re.key.charCodeAt(0)>=65&&re.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ae.key!==J.C0.ETX&&ae.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ae.key,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||re.altKey||re.ctrlKey?this.cancel(re,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(re,W){const ae=re.isMac&&!this.options.macOptionIsMeta&&W.altKey&&!W.ctrlKey&&!W.metaKey||re.isWindows&&W.altKey&&W.ctrlKey&&!W.metaKey||re.isWindows&&W.getModifierState("AltGraph");return W.type==="keypress"?ae:ae&&(!W.keyCode||W.keyCode>47)}_keyUp(re){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1||((function(W){return W.keyCode===16||W.keyCode===17||W.keyCode===18})(re)||this.focus(),this.updateCursorStyle(re),this._keyPressHandled=!1)}_keyPress(re){let W;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;if(this.cancel(re),re.charCode)W=re.charCode;else if(re.which===null||re.which===void 0)W=re.keyCode;else{if(re.which===0||re.charCode===0)return!1;W=re.which}return!(!W||(re.altKey||re.ctrlKey||re.metaKey)&&!this._isThirdLevelShift(this.browser,re)||(W=String.fromCharCode(W),this._onKey.fire({key:W,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(W,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(re){if(re.data&&re.inputType==="insertText"&&(!re.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const W=re.data;return this.coreService.triggerDataEvent(W,!0),this.cancel(re),!0}return!1}resize(re,W){re!==this.cols||W!==this.rows?super.resize(re,W):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(re,W){var ae,le;(ae=this._charSizeService)==null||ae.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var re;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let W=1;W{Object.defineProperty(i,"__esModule",{value:!0}),i.TimeBasedDebouncer=void 0,i.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const _=Date.now();if(_-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=_,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=_-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),m)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(a,i,c){var u=this&&this.__decorate||function(b,w,y,S){var z,N=arguments.length,A=N<3?w:S===null?S=Object.getOwnPropertyDescriptor(w,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,w,y,S);else for(var E=b.length-1;E>=0;E--)(z=b[E])&&(A=(N<3?z(A):N>3?z(w,y,A):z(w,y))||A);return N>3&&A&&Object.defineProperty(w,y,A),A},d=this&&this.__param||function(b,w){return function(y,S){w(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Viewport=void 0;const _=c(3656),p=c(4725),m=c(8460),k=c(844),x=c(2585);let v=i.Viewport=class extends k.Disposable{constructor(b,w,y,S,z,N,A,E){super(),this._viewportElement=b,this._scrollArea=w,this._bufferService=y,this._optionsService=S,this._charSizeService=z,this._renderService=N,this._coreBrowserService=A,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((M=>this._activeBuffer=M.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((M=>this._renderDimensions=M))),this._handleThemeChange(E.colors),this.register(E.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(b){if(b)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:w,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(b,w){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&y0&&(y=I),S=""}}return{bufferElements:z,cursorElement:y}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w}_applyScrollModifier(b,w){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&w.altKey||y==="ctrl"&&w.ctrlKey||y==="shift"&&w.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const w=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))}};i.Viewport=v=u([d(2,x.IBufferService),d(3,x.IOptionsService),d(4,p.ICharSizeService),d(5,p.IRenderService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],v)},3107:function(a,i,c){var u=this&&this.__decorate||function(x,v,b,w){var y,S=arguments.length,z=S<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,v,b,w);else for(var N=x.length-1;N>=0;N--)(y=x[N])&&(z=(S<3?y(z):S>3?y(v,b,z):y(v,b))||z);return S>3&&z&&Object.defineProperty(v,b,z),z},d=this&&this.__param||function(x,v){return function(b,w){v(b,w,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferDecorationRenderer=void 0;const _=c(4725),p=c(844),m=c(2585);let k=i.BufferDecorationRenderer=class extends p.Disposable{constructor(x,v,b,w,y){super(),this._screenElement=x,this._bufferService=v,this._coreBrowserService=b,this._decorationService=w,this._renderService=y,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((S=>this._removeDecoration(S)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){var w;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((w=x==null?void 0:x.options)==null?void 0:w.layer)==="top"),v.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=x.options.x??0;return b&&b>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(x,v),v}_refreshStyle(x){const v=x.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let b=this._decorationElements.get(x);b||(b=this._createElement(x),x.element=b,this._decorationElements.set(x,b),this._container.appendChild(b),x.onDispose((()=>{this._decorationElements.delete(x),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(b)}}_refreshXPosition(x,v=x.element){if(!v)return;const b=x.options.x??0;(x.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var v;(v=this._decorationElements.get(x))==null||v.remove(),this._decorationElements.delete(x),x.dispose()}};i.BufferDecorationRenderer=k=u([d(1,m.IBufferService),d(2,_.ICoreBrowserService),d(3,m.IDecorationService),d(4,_.IRenderService)],k)},5871:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorZoneStore=void 0,i.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,d){return u>=c.startBufferLine-this._linePadding[d||"full"]&&u<=c.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(a,i,c){var u=this&&this.__decorate||function(y,S,z,N){var A,E=arguments.length,M=E<3?S:N===null?N=Object.getOwnPropertyDescriptor(S,z):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,S,z,N);else for(var $=y.length-1;$>=0;$--)(A=y[$])&&(M=(E<3?A(M):E>3?A(S,z,M):A(S,z))||M);return E>3&&M&&Object.defineProperty(S,z,M),M},d=this&&this.__param||function(y,S){return function(z,N){S(z,N,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OverviewRulerRenderer=void 0;const _=c(5871),p=c(4725),m=c(844),k=c(2585),x={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let w=i.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,S,z,N,A,E,M){var D;super(),this._viewportElement=y,this._screenElement=S,this._bufferService=z,this._decorationService=N,this._renderService=A,this._optionsService=E,this._coreBrowserService=M,this._colorZoneStore=new _.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(D=this._viewportElement.parentElement)==null||D.insertBefore(this._canvas,this._viewportElement);const $=this._canvas.getContext("2d");if(!$)throw new Error("Ctx cannot be null");this._ctx=$,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var I;(I=this._canvas)==null||I.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const y=Math.floor(this._canvas.width/3),S=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=y,v.center=S,v.right=y,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);x.left=S,x.center=S,x.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const y=this._colorZoneStore.zones;for(const S of y)S.position!=="full"&&this._renderColorZone(S);for(const S of y)S.position==="full"&&this._renderColorZone(S);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(b[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-x[y.position||"full"]/2),v[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[y.position||"full"]))}_queueRefresh(y,S){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};i.OverviewRulerRenderer=w=u([d(2,k.IBufferService),d(3,k.IDecorationService),d(4,p.IRenderService),d(5,k.IOptionsService),d(6,p.ICoreBrowserService)],w)},2950:function(a,i,c){var u=this&&this.__decorate||function(x,v,b,w){var y,S=arguments.length,z=S<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,v,b,w);else for(var N=x.length-1;N>=0;N--)(y=x[N])&&(z=(S<3?y(z):S>3?y(v,b,z):y(v,b))||z);return S>3&&z&&Object.defineProperty(v,b,z),z},d=this&&this.__param||function(x,v){return function(b,w){v(b,w,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CompositionHelper=void 0;const _=c(4725),p=c(2585),m=c(2584);let k=i.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,v,b,w,y,S){this._textarea=x,this._compositionView=v,this._bufferService=b,this._optionsService=w,this._coreService=y,this._renderService=S,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,b=v.replace(x,"");this._dataAlreadySent=b,v.length>x.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};i.CompositionHelper=k=u([d(2,p.IBufferService),d(3,p.IOptionsService),d(4,p.ICoreService),d(5,_.IRenderService)],k)},9806:(a,i)=>{function c(u,d,_){const p=_.getBoundingClientRect(),m=u.getComputedStyle(_),k=parseInt(m.getPropertyValue("padding-left")),x=parseInt(m.getPropertyValue("padding-top"));return[d.clientX-p.left-k,d.clientY-p.top-x]}Object.defineProperty(i,"__esModule",{value:!0}),i.getCoords=i.getCoordsRelativeToElement=void 0,i.getCoordsRelativeToElement=c,i.getCoords=function(u,d,_,p,m,k,x,v,b){if(!k)return;const w=c(u,d,_);return w?(w[0]=Math.ceil((w[0]+(b?x/2:0))/x),w[1]=Math.ceil(w[1]/v),w[0]=Math.min(Math.max(w[0],1),p+(b?1:0)),w[1]=Math.min(Math.max(w[1],1),m),w):void 0}},9504:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.moveToCellSequence=void 0;const u=c(2584);function d(v,b,w,y){const S=v-_(v,w),z=b-_(b,w),N=Math.abs(S-z)-(function(A,E,M){let $=0;const D=A-_(A,M),I=E-_(E,M);for(let G=0;G=0&&vb?"A":"B"}function m(v,b,w,y,S,z){let N=v,A=b,E="";for(;N!==w||A!==y;)N+=S?1:-1,S&&N>z.cols-1?(E+=z.buffer.translateBufferLineToString(A,!1,v,N),N=0,v=0,A++):!S&&N<0&&(E+=z.buffer.translateBufferLineToString(A,!1,0,v+1),N=z.cols-1,v=N,A--);return E+z.buffer.translateBufferLineToString(A,!1,v,N)}function k(v,b){const w=b?"O":"[";return u.C0.ESC+w+v}function x(v,b){v=Math.floor(v);let w="";for(let y=0;y0?D-_(D,I):M;const Q=D,K=(function(J,ee,P,L,F,q){let U;return U=d(P,L,F,q).length>0?L-_(L,F):ee,J=P&&Uv?"D":"C",x(Math.abs(S-v),k(N,y));N=z>b?"D":"C";const A=Math.abs(z-b);return x((function(E,M){return M.cols-E})(z>b?v:S,w)+(A-1)*w.cols+1+((z>b?S:v)-1),k(N,y))}},1296:function(a,i,c){var u=this&&this.__decorate||function(G,H,Q,K){var J,ee=arguments.length,P=ee<3?H:K===null?K=Object.getOwnPropertyDescriptor(H,Q):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(G,H,Q,K);else for(var L=G.length-1;L>=0;L--)(J=G[L])&&(P=(ee<3?J(P):ee>3?J(H,Q,P):J(H,Q))||P);return ee>3&&P&&Object.defineProperty(H,Q,P),P},d=this&&this.__param||function(G,H){return function(Q,K){H(Q,K,G)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRenderer=void 0;const _=c(3787),p=c(2550),m=c(2223),k=c(6171),x=c(6052),v=c(4725),b=c(8055),w=c(8460),y=c(844),S=c(2585),z="xterm-dom-renderer-owner-",N="xterm-rows",A="xterm-fg-",E="xterm-bg-",M="xterm-focus",$="xterm-selection";let D=1,I=i.DomRenderer=class extends y.Disposable{constructor(G,H,Q,K,J,ee,P,L,F,q,U,oe,ie){super(),this._terminal=G,this._document=H,this._element=Q,this._screenElement=K,this._viewportElement=J,this._helperContainer=ee,this._linkifier2=P,this._charSizeService=F,this._optionsService=q,this._bufferService=U,this._coreBrowserService=oe,this._themeService=ie,this._terminalClass=D++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new w.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(N),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add($),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,k.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ce=>this._injectCss(ce)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(_.DomRendererRowFactory,document),this._element.classList.add(z+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ce=>this._handleLinkHover(ce)))),this.register(this._linkifier2.onHideLinkUnderline((ce=>this._handleLinkLeave(ce)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(z+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const G=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*G,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*G),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/G),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/G),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const Q of this._rowElements)Q.style.width=`${this.dimensions.css.canvas.width}px`,Q.style.height=`${this.dimensions.css.cell.height}px`,Q.style.lineHeight=`${this.dimensions.css.cell.height}px`,Q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const H=`${this._terminalSelector} .${N} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=H,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(G){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let H=`${this._terminalSelector} .${N} { color: ${G.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;H+=`${this._terminalSelector} .${N} .xterm-dim { color: ${b.color.multiplyOpacity(G.foreground,.5).css};}`,H+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const Q=`blink_underline_${this._terminalClass}`,K=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;H+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,H+=`@keyframes ${K} { 50% { box-shadow: none; }}`,H+=`@keyframes ${J} { 0% { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css}; } 50% { background-color: inherit; color: ${G.cursor.css}; }}`,H+=`${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css};}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${G.cursor.css} !important; color: ${G.cursorAccent.css} !important;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${G.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${G.cursor.css} inset;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${G.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,H+=`${this._terminalSelector} .${$} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${$} div { position: absolute; background-color: ${G.selectionBackgroundOpaque.css};}${this._terminalSelector} .${$} div { position: absolute; background-color: ${G.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,P]of G.ansi.entries())H+=`${this._terminalSelector} .${A}${ee} { color: ${P.css}; }${this._terminalSelector} .${A}${ee}.xterm-dim { color: ${b.color.multiplyOpacity(P,.5).css}; }${this._terminalSelector} .${E}${ee} { background-color: ${P.css}; }`;H+=`${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(G.background).css}; }${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(G.background),.5).css}; }${this._terminalSelector} .${E}${m.INVERTED_DEFAULT_COLOR} { background-color: ${G.foreground.css}; }`,this._themeStyleElement.textContent=H}_setDefaultSpacing(){const G=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${G}px`,this._rowFactory.defaultSpacing=G}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(G,H){for(let Q=this._rowElements.length;Q<=H;Q++){const K=this._document.createElement("div");this._rowContainer.appendChild(K),this._rowElements.push(K)}for(;this._rowElements.length>H;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(G,H){this._refreshRowElements(G,H),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(M),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(M),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(G,H,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(G,H,Q),this.renderRows(0,this._bufferService.rows-1),!G||!H)return;this._selectionRenderModel.update(this._terminal,G,H,Q);const K=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,P=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||P<0)return;const L=this._document.createDocumentFragment();if(Q){const F=G[0]>H[0];L.appendChild(this._createSelectionElement(ee,F?H[0]:G[0],F?G[0]:H[0],P-ee+1))}else{const F=K===ee?G[0]:0,q=ee===J?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(ee,F,q));const U=P-ee-1;if(L.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,U)),ee!==P){const oe=J===P?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(P,0,oe))}}this._selectionContainer.appendChild(L)}_createSelectionElement(G,H,Q,K=1){const J=this._document.createElement("div"),ee=H*this.dimensions.css.cell.width;let P=this.dimensions.css.cell.width*(Q-H);return ee+P>this.dimensions.css.canvas.width&&(P=this.dimensions.css.canvas.width-ee),J.style.height=K*this.dimensions.css.cell.height+"px",J.style.top=G*this.dimensions.css.cell.height+"px",J.style.left=`${ee}px`,J.style.width=`${P}px`,J}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const G of this._rowElements)G.replaceChildren()}renderRows(G,H){const Q=this._bufferService.buffer,K=Q.ybase+Q.y,J=Math.min(Q.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,P=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=G;F<=H;F++){const q=F+Q.ydisp,U=this._rowElements[F],oe=Q.lines.get(q);if(!U||!oe)break;U.replaceChildren(...this._rowFactory.createRow(oe,q,q===K,P,L,J,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${z}${this._terminalClass}`}_handleLinkHover(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!0)}_handleLinkLeave(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!1)}_setCellUnderline(G,H,Q,K,J,ee){Q<0&&(G=0),K<0&&(H=0);const P=this._bufferService.rows-1;Q=Math.max(Math.min(Q,P),0),K=Math.max(Math.min(K,P),0),J=Math.min(J,this._bufferService.cols);const L=this._bufferService.buffer,F=L.ybase+L.y,q=Math.min(L.x,J-1),U=this._optionsService.rawOptions.cursorBlink,oe=this._optionsService.rawOptions.cursorStyle,ie=this._optionsService.rawOptions.cursorInactiveStyle;for(let ce=Q;ce<=K;++ce){const re=ce+L.ydisp,W=this._rowElements[ce],ae=L.lines.get(re);if(!W||!ae)break;W.replaceChildren(...this._rowFactory.createRow(ae,re,re===F,oe,ie,q,U,this.dimensions.css.cell.width,this._widthCache,ee?ce===Q?G:0:-1,ee?(ce===K?H:J)-1:-1))}}};i.DomRenderer=I=u([d(7,S.IInstantiationService),d(8,v.ICharSizeService),d(9,S.IOptionsService),d(10,S.IBufferService),d(11,v.ICoreBrowserService),d(12,v.IThemeService)],I)},3787:function(a,i,c){var u=this&&this.__decorate||function(N,A,E,M){var $,D=arguments.length,I=D<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,E):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(N,A,E,M);else for(var G=N.length-1;G>=0;G--)($=N[G])&&(I=(D<3?$(I):D>3?$(A,E,I):$(A,E))||I);return D>3&&I&&Object.defineProperty(A,E,I),I},d=this&&this.__param||function(N,A){return function(E,M){A(E,M,N)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRendererRowFactory=void 0;const _=c(2223),p=c(643),m=c(511),k=c(2585),x=c(8055),v=c(4725),b=c(4269),w=c(6171),y=c(3734);let S=i.DomRendererRowFactory=class{constructor(N,A,E,M,$,D,I){this._document=N,this._characterJoinerService=A,this._optionsService=E,this._coreBrowserService=M,this._coreService=$,this._decorationService=D,this._themeService=I,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(N,A,E){this._selectionStart=N,this._selectionEnd=A,this._columnSelectMode=E}createRow(N,A,E,M,$,D,I,G,H,Q,K){const J=[],ee=this._characterJoinerService.getJoinedCharacters(A),P=this._themeService.colors;let L,F=N.getNoBgTrimmedLength();E&&F0&&Se===ee[0][0]){Xe=!0;const at=ee.shift();Fe=new b.JoinedCellData(this._workCell,N.translateToString(!0,at[0],at[1]),at[1]-at[0]),Me=at[1]-1,Be=Fe.getWidth()}const pt=this._isCellInSelection(Se,A),Ct=E&&Se===D,Vt=be&&Se>=Q&&Se<=K;let Ut=!1;this._decorationService.forEachDecorationAtCell(Se,A,void 0,(at=>{Ut=!0}));let Gt=Fe.getChars()||p.WHITESPACE_CELL_CHAR;if(Gt===" "&&(Fe.isUnderline()||Fe.isOverline())&&(Gt=" "),le=Be*G-H.get(Gt,Fe.isBold(),Fe.isItalic()),L){if(q&&(pt&&ae||!pt&&!ae&&Fe.bg===oe)&&(pt&&ae&&P.selectionForeground||Fe.fg===ie)&&Fe.extended.ext===ce&&Vt===re&&le===W&&!Ct&&!Xe&&!Ut){Fe.isInvisible()?U+=p.WHITESPACE_CELL_CHAR:U+=Gt,q++;continue}q&&(L.textContent=U),L=this._document.createElement("span"),q=0,U=""}else L=this._document.createElement("span");if(oe=Fe.bg,ie=Fe.fg,ce=Fe.extended.ext,re=Vt,W=le,ae=pt,Xe&&D>=Se&&D<=Me&&(D=Se),!this._coreService.isCursorHidden&&Ct&&this._coreService.isCursorInitialized){if(me.push("xterm-cursor"),this._coreBrowserService.isFocused)I&&me.push("xterm-cursor-blink"),me.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if($)switch($){case"outline":me.push("xterm-cursor-outline");break;case"block":me.push("xterm-cursor-block");break;case"bar":me.push("xterm-cursor-bar");break;case"underline":me.push("xterm-cursor-underline")}}if(Fe.isBold()&&me.push("xterm-bold"),Fe.isItalic()&&me.push("xterm-italic"),Fe.isDim()&&me.push("xterm-dim"),U=Fe.isInvisible()?p.WHITESPACE_CELL_CHAR:Fe.getChars()||p.WHITESPACE_CELL_CHAR,Fe.isUnderline()&&(me.push(`xterm-underline-${Fe.extended.underlineStyle}`),U===" "&&(U=" "),!Fe.isUnderlineColorDefault()))if(Fe.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Fe.getUnderlineColor()).join(",")})`;else{let at=Fe.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Fe.isBold()&&at<8&&(at+=8),L.style.textDecorationColor=P.ansi[at].css}Fe.isOverline()&&(me.push("xterm-overline"),U===" "&&(U=" ")),Fe.isStrikethrough()&&me.push("xterm-strikethrough"),Vt&&(L.style.textDecoration="underline");let De=Fe.getFgColor(),ct=Fe.getFgColorMode(),lt=Fe.getBgColor(),xe=Fe.getBgColorMode();const Ie=!!Fe.isInverse();if(Ie){const at=De;De=lt,lt=at;const At=ct;ct=xe,xe=At}let Ye,Ae,Ve,Ze=!1;switch(this._decorationService.forEachDecorationAtCell(Se,A,void 0,(at=>{at.options.layer!=="top"&&Ze||(at.backgroundColorRGB&&(xe=50331648,lt=at.backgroundColorRGB.rgba>>8&16777215,Ye=at.backgroundColorRGB),at.foregroundColorRGB&&(ct=50331648,De=at.foregroundColorRGB.rgba>>8&16777215,Ae=at.foregroundColorRGB),Ze=at.options.layer==="top")})),!Ze&&pt&&(Ye=this._coreBrowserService.isFocused?P.selectionBackgroundOpaque:P.selectionInactiveBackgroundOpaque,lt=Ye.rgba>>8&16777215,xe=50331648,Ze=!0,P.selectionForeground&&(ct=50331648,De=P.selectionForeground.rgba>>8&16777215,Ae=P.selectionForeground)),Ze&&me.push("xterm-decoration-top"),xe){case 16777216:case 33554432:Ve=P.ansi[lt],me.push(`xterm-bg-${lt}`);break;case 50331648:Ve=x.channels.toColor(lt>>16,lt>>8&255,255<),this._addStyle(L,`background-color:#${z((lt>>>0).toString(16),"0",6)}`);break;default:Ie?(Ve=P.foreground,me.push(`xterm-bg-${_.INVERTED_DEFAULT_COLOR}`)):Ve=P.background}switch(Ye||Fe.isDim()&&(Ye=x.color.multiplyOpacity(Ve,.5)),ct){case 16777216:case 33554432:Fe.isBold()&&De<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(De+=8),this._applyMinimumContrast(L,Ve,P.ansi[De],Fe,Ye,void 0)||me.push(`xterm-fg-${De}`);break;case 50331648:const at=x.channels.toColor(De>>16&255,De>>8&255,255&De);this._applyMinimumContrast(L,Ve,at,Fe,Ye,Ae)||this._addStyle(L,`color:#${z(De.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,Ve,P.foreground,Fe,Ye,Ae)||Ie&&me.push(`xterm-fg-${_.INVERTED_DEFAULT_COLOR}`)}me.length&&(L.className=me.join(" "),me.length=0),Ct||Xe||Ut?L.textContent=U:q++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),J.push(L),Se=Me}return L&&q&&(L.textContent=U),J}_applyMinimumContrast(N,A,E,M,$,D){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const I=this._getContrastCache(M);let G;if($||D||(G=I.getColor(A.rgba,E.rgba)),G===void 0){const H=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);G=x.color.ensureContrastRatio($||A,D||E,H),I.setColor(($||A).rgba,(D||E).rgba,G??null)}return!!G&&(this._addStyle(N,`color:${G.css}`),!0)}_getContrastCache(N){return N.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(N,A){N.setAttribute("style",`${N.getAttribute("style")||""}${A};`)}_isCellInSelection(N,A){const E=this._selectionStart,M=this._selectionEnd;return!(!E||!M)&&(this._columnSelectMode?E[0]<=M[0]?N>=E[0]&&A>=E[1]&&N=E[1]&&N>=M[0]&&A<=M[1]:A>E[1]&&A=E[0]&&N=E[0])}};function z(N,A,E){for(;N.length{Object.defineProperty(i,"__esModule",{value:!0}),i.WidthCache=void 0,i.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const d=c.createElement("span");d.classList.add("xterm-char-measure-element");const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[d,_,p,m],this._container.appendChild(d),this._container.appendChild(_),this._container.appendChild(p),this._container.appendChild(m),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,u,d,_){c===this._font&&u===this._fontSize&&d===this._weight&&_===this._weightBold||(this._font=c,this._fontSize=u,this._weight=d,this._weightBold=_,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${_}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${_}`,this.clear())}get(c,u,d){let _=0;if(!u&&!d&&c.length===1&&(_=c.charCodeAt(0))<256){if(this._flat[_]!==-9999)return this._flat[_];const k=this._measure(c,0);return k>0&&(this._flat[_]=k),k}let p=c;u&&(p+="B"),d&&(p+="I");let m=this._holey.get(p);if(m===void 0){let k=0;u&&(k|=1),d&&(k|=2),m=this._measure(c,k),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const d=this._measureElements[u];return d.textContent=c.repeat(32),d.offsetWidth/32}}},2223:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TEXT_BASELINE=i.DIM_OPACITY=i.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);i.INVERTED_DEFAULT_COLOR=257,i.DIM_OPACITY=.5,i.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,i)=>{function c(d){return 57508<=d&&d<=57558}function u(d){return d>=128512&&d<=128591||d>=127744&&d<=128511||d>=128640&&d<=128767||d>=9728&&d<=9983||d>=9984&&d<=10175||d>=65024&&d<=65039||d>=129280&&d<=129535||d>=127462&&d<=127487}Object.defineProperty(i,"__esModule",{value:!0}),i.computeNextVariantOffset=i.createRenderDimensions=i.treatGlyphAsBackgroundColor=i.allowRescaling=i.isEmoji=i.isRestrictedPowerlineGlyph=i.isPowerlineGlyph=i.throwIfFalsy=void 0,i.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},i.isPowerlineGlyph=c,i.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},i.isEmoji=u,i.allowRescaling=function(d,_,p,m){return _===1&&p>Math.ceil(1.5*m)&&d!==void 0&&d>255&&!u(d)&&!c(d)&&!(function(k){return 57344<=k&&k<=63743})(d)},i.treatGlyphAsBackgroundColor=function(d){return c(d)||(function(_){return 9472<=_&&_<=9631})(d)},i.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},i.computeNextVariantOffset=function(d,_,p=0){return(d-(2*Math.round(_)-p))%(2*Math.round(_))}},6052:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createSelectionRenderModel=void 0;class c{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(d,_,p,m=!1){if(this.selectionStart=_,this.selectionEnd=p,!_||!p||_[0]===p[0]&&_[1]===p[1])return void this.clear();const k=d.buffers.active.ydisp,x=_[1]-k,v=p[1]-k,b=Math.max(x,0),w=Math.min(v,d.rows-1);b>=d.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=x,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=w,this.startCol=_[0],this.endCol=p[0])}isCellSelected(d,_,p){return!!this.hasSelection&&(p-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?_>=this.startCol&&p>=this.viewportCappedStartRow&&_=this.viewportCappedStartRow&&_>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&_=this.startCol)}}i.createSelectionRenderModel=function(){return new c}},456:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionModel=void 0,i.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,i,c){var u=this&&this.__decorate||function(w,y,S,z){var N,A=arguments.length,E=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(w,y,S,z);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(E=(A<3?N(E):A>3?N(y,S,E):N(y,S))||E);return A>3&&E&&Object.defineProperty(y,S,E),E},d=this&&this.__param||function(w,y){return function(S,z){y(S,z,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharSizeService=void 0;const _=c(2585),p=c(8460),m=c(844);let k=i.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,y,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new v(w,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const w=this._measureStrategy.measure();w.width===this.width&&w.height===this.height||(this.width=w.width,this.height=w.height,this._onCharSizeChange.fire())}};i.CharSizeService=k=u([d(2,_.IOptionsService)],k);class x extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,S){y!==void 0&&y>0&&S!==void 0&&S>0&&(this._result.width=y,this._result.height=S)}}class v extends x{constructor(y,S,z){super(),this._document=y,this._parentElement=S,this._optionsService=z,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class b extends x{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(a,i,c){var u=this&&this.__decorate||function(b,w,y,S){var z,N=arguments.length,A=N<3?w:S===null?S=Object.getOwnPropertyDescriptor(w,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,w,y,S);else for(var E=b.length-1;E>=0;E--)(z=b[E])&&(A=(N<3?z(A):N>3?z(w,y,A):z(w,y))||A);return N>3&&A&&Object.defineProperty(w,y,A),A},d=this&&this.__param||function(b,w){return function(y,S){w(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharacterJoinerService=i.JoinedCellData=void 0;const _=c(3734),p=c(643),m=c(511),k=c(2585);class x extends _.AttributeData{constructor(w,y,S){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=y,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(w){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.JoinedCellData=x;let v=i.CharacterJoinerService=class YI{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(w){const y={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(y),y.id}deregister(w){for(let y=0;y1){const I=this._getJoinedRanges(z,E,A,y,N);for(let G=0;G1){const D=this._getJoinedRanges(z,E,A,y,N);for(let I=0;I{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreBrowserService=void 0;const u=c(844),d=c(8460),_=c(3656);class p extends u.Disposable{constructor(x,v,b){super(),this._textarea=x,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new d.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((w=>this._screenDprMonitor.setWindow(w)))),this.register((0,d.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(x){this._window!==x&&(this._window=x,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}i.CoreBrowserService=p;class m extends u.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,_.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var x;this._outerListener&&((x=this._resolutionMediaMatchList)==null||x.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LinkProviderService=void 0;const u=c(844);class d extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const m=this.linkProviders.indexOf(p);m!==-1&&this.linkProviders.splice(m,1)}}}}i.LinkProviderService=d},8934:function(a,i,c){var u=this&&this.__decorate||function(k,x,v,b){var w,y=arguments.length,S=y<3?x:b===null?b=Object.getOwnPropertyDescriptor(x,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(k,x,v,b);else for(var z=k.length-1;z>=0;z--)(w=k[z])&&(S=(y<3?w(S):y>3?w(x,v,S):w(x,v))||S);return y>3&&S&&Object.defineProperty(x,v,S),S},d=this&&this.__param||function(k,x){return function(v,b){x(v,b,k)}};Object.defineProperty(i,"__esModule",{value:!0}),i.MouseService=void 0;const _=c(4725),p=c(9806);let m=i.MouseService=class{constructor(k,x){this._renderService=k,this._charSizeService=x}getCoords(k,x,v,b,w){return(0,p.getCoords)(window,k,x,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(k,x){const v=(0,p.getCoordsRelativeToElement)(window,k,x);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};i.MouseService=m=u([d(0,_.IRenderService),d(1,_.ICharSizeService)],m)},3230:function(a,i,c){var u=this&&this.__decorate||function(w,y,S,z){var N,A=arguments.length,E=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(w,y,S,z);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(E=(A<3?N(E):A>3?N(y,S,E):N(y,S))||E);return A>3&&E&&Object.defineProperty(y,S,E),E},d=this&&this.__param||function(w,y){return function(S,z){y(S,z,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.RenderService=void 0;const _=c(6193),p=c(4725),m=c(8460),k=c(844),x=c(7226),v=c(2585);let b=i.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,y,S,z,N,A,E,M){super(),this._rowCount=w,this._charSizeService=z,this._renderer=this.register(new k.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new k.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new m.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new m.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new m.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new m.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new _.RenderDebouncer((($,D)=>this._renderRows($,D)),E),this.register(this._renderDebouncer),this.register(E.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(A.onResize((()=>this._fullRefresh()))),this.register(A.buffers.onBufferActivate((()=>{var $;return($=this._renderer.value)==null?void 0:$.clear()}))),this.register(S.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(N.onDecorationRegistered((()=>this._fullRefresh()))),this.register(N.onDecorationRemoved((()=>this._fullRefresh()))),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()}))),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(A.buffer.y,A.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(E.window,y),this.register(E.onWindowChange(($=>this._registerIntersectionObserver($,y))))}_registerIntersectionObserver(w,y){if("IntersectionObserver"in w){const S=new w.IntersectionObserver((z=>this._handleIntersectionChange(z[z.length-1])),{threshold:0});S.observe(y),this._observerDisposable.value=(0,k.toDisposable)((()=>S.disconnect()))}}_handleIntersectionChange(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(w,y,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,y,this._rowCount))}_renderRows(w,y){this._renderer.value&&(w=Math.min(w,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(w,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:w,end:y}),this._onRender.fire({start:w,end:y}),this._isNextRenderRedrawOnly=!0)}resize(w,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(w){this._renderer.value=w,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(w){return this._renderDebouncer.addRefreshCallback(w)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var w,y;this._renderer.value&&((y=(w=this._renderer.value).clearTextureAtlas)==null||y.call(w),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var S;return(S=this._renderer.value)==null?void 0:S.handleResize(w,y)})):this._renderer.value.handleResize(w,y),this._fullRefresh())}handleCharSizeChanged(){var w;(w=this._renderer.value)==null||w.handleCharSizeChanged()}handleBlur(){var w;(w=this._renderer.value)==null||w.handleBlur()}handleFocus(){var w;(w=this._renderer.value)==null||w.handleFocus()}handleSelectionChanged(w,y,S){var z;this._selectionState.start=w,this._selectionState.end=y,this._selectionState.columnSelectMode=S,(z=this._renderer.value)==null||z.handleSelectionChanged(w,y,S)}handleCursorMove(){var w;(w=this._renderer.value)==null||w.handleCursorMove()}clear(){var w;(w=this._renderer.value)==null||w.clear()}};i.RenderService=b=u([d(2,v.IOptionsService),d(3,p.ICharSizeService),d(4,v.IDecorationService),d(5,v.IBufferService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],b)},9312:function(a,i,c){var u=this&&this.__decorate||function(E,M,$,D){var I,G=arguments.length,H=G<3?M:D===null?D=Object.getOwnPropertyDescriptor(M,$):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(E,M,$,D);else for(var Q=E.length-1;Q>=0;Q--)(I=E[Q])&&(H=(G<3?I(H):G>3?I(M,$,H):I(M,$))||H);return G>3&&H&&Object.defineProperty(M,$,H),H},d=this&&this.__param||function(E,M){return function($,D){M($,D,E)}};Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionService=void 0;const _=c(9806),p=c(9504),m=c(456),k=c(4725),x=c(8460),v=c(844),b=c(6114),w=c(4841),y=c(511),S=c(2585),z=" ",N=new RegExp(z,"g");let A=i.SelectionService=class extends v.Disposable{constructor(E,M,$,D,I,G,H,Q,K){super(),this._element=E,this._screenElement=M,this._linkifier=$,this._bufferService=D,this._coreService=I,this._mouseService=G,this._optionsService=H,this._renderService=Q,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const E=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!E||!M||E[0]===M[0]&&E[1]===M[1])}get selectionText(){const E=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!E||!M)return"";const $=this._bufferService.buffer,D=[];if(this._activeSelectionMode===3){if(E[0]===M[0])return"";const I=E[0]I.replace(N," "))).join(b.isWindows?`\r `:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(N){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&N&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(N){const M=this._getMouseBufferCoords(N),$=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!!($&&D&&M)&&this._areCoordsInSelection(M,$,D)}isCellInSelection(N,M){const $=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!$||!D)&&this._areCoordsInSelection([N,M],$,D)}_areCoordsInSelection(N,M,$){return N[1]>M[1]&&N[1]<$[1]||M[1]===$[1]&&N[1]===M[1]&&N[0]>=M[0]&&N[0]<$[0]||M[1]<$[1]&&N[1]===$[1]&&N[0]<$[0]||M[1]<$[1]&&N[1]===M[1]&&N[0]>=M[0]}_selectWordAtCursor(N,M){var I,G;const $=(G=(I=this._linkifier.currentLink)==null?void 0:I.link)==null?void 0:G.range;if($)return this._model.selectionStart=[$.start.x-1,$.start.y-1],this._model.selectionStartLength=(0,x.getRangeLength)($,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const D=this._getMouseBufferCoords(N);return!!D&&(this._selectWordAt(D,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(N,M){this._model.clearSelection(),N=Math.max(N,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,N],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(N){this._model.handleTrim(N)&&this.refresh()}_getMouseBufferCoords(N){const M=this._mouseService.getCoords(N,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(N){let M=(0,_.getCoordsRelativeToElement)(this._coreBrowserService.window,N,this._screenElement)[1];const $=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=$?0:(M>$&&(M-=$),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(N){return b.isMac?N.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:N.shiftKey}handleMouseDown(N){if(this._mouseDownTimeStamp=N.timeStamp,(N.button!==2||!this.hasSelection)&&N.button===0){if(!this._enabled){if(!this.shouldForceSelection(N))return;N.stopPropagation()}N.preventDefault(),this._dragScrollAmount=0,this._enabled&&N.shiftKey?this._handleIncrementalClick(N):N.detail===1?this._handleSingleClick(N):N.detail===2?this._handleDoubleClick(N):N.detail===3&&this._handleTripleClick(N),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(N){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(N))}_handleSingleClick(N){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(N)?3:0,this._model.selectionStart=this._getMouseBufferCoords(N),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const M=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);M&&M.length!==this._model.selectionStart[0]&&M.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(N){this._selectWordAtCursor(N,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(N){const M=this._getMouseBufferCoords(N);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(N){return N.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(N){if(N.stopImmediatePropagation(),!this._model.selectionStart)return;const M=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(N),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const $=this._bufferService.buffer;if(this._model.selectionEnd[1]<$.lines.length){const D=$.lines.get(this._model.selectionEnd[1]);D&&D.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(N.ydisp+this._bufferService.rows,N.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=N.ydisp),this.refresh()}}_handleMouseUp(N){const M=N.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&N.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const $=this._mouseService.getCoords(N,this._element,this._bufferService.cols,this._bufferService.rows,!1);if($&&$[0]!==void 0&&$[1]!==void 0){const D=(0,p.moveToCellSequence)($[0]-1,$[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(D,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const N=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,$=!(!N||!M||N[0]===M[0]&&N[1]===M[1]);$?N&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&N[0]===this._oldSelectionStart[0]&&N[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(N,M,$)):this._oldHasSelection&&this._fireOnSelectionChange(N,M,$)}_fireOnSelectionChange(N,M,$){this._oldSelectionStart=N,this._oldSelectionEnd=M,this._oldHasSelection=$,this._onSelectionChange.fire()}_handleBufferActivate(N){this.clearSelection(),this._trimListener.dispose(),this._trimListener=N.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(N,M){let $=M;for(let D=0;M>=D;D++){const I=N.loadCell(D,this._workCell).getChars().length;this._workCell.getWidth()===0?$--:I>1&&M!==D&&($+=I-1)}return $}setSelection(N,M,$){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[N,M],this._model.selectionStartLength=$,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(N){this._isClickInSelection(N)||(this._selectWordAtCursor(N,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(N,M,$=!0,D=!0){if(N[0]>=this._bufferService.cols)return;const I=this._bufferService.buffer,G=I.lines.get(N[1]);if(!G)return;const H=I.translateBufferLineToString(N[1],!1);let Q=this._convertViewportColToCharacterIndex(G,N[0]),K=Q;const J=N[0]-Q;let ee=0,P=0,L=0,F=0;if(H.charAt(Q)===" "){for(;Q>0&&H.charAt(Q-1)===" ";)Q--;for(;K1&&(F+=ce-1,K+=ce-1);oe>0&&Q>0&&!this._isCharWordSeparator(G.loadCell(oe-1,this._workCell));){G.loadCell(oe-1,this._workCell);const re=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,oe--):re>1&&(L+=re-1,Q-=re-1),Q--,oe--}for(;ie1&&(F+=re-1,K+=re-1),K++,ie++}}K++;let q=Q+J-ee+L,U=Math.min(this._bufferService.cols,K-Q+ee+P-L-F);if(M||H.slice(Q,K).trim()!==""){if($&&q===0&&G.getCodePoint(0)!==32){const oe=I.lines.get(N[1]-1);if(oe&&G.isWrapped&&oe.getCodePoint(this._bufferService.cols-1)!==32){const ie=this._getWordAt([this._bufferService.cols-1,N[1]-1],!1,!0,!1);if(ie){const ce=this._bufferService.cols-ie.start;q-=ce,U+=ce}}}if(D&&q+U===this._bufferService.cols&&G.getCodePoint(this._bufferService.cols-1)!==32){const oe=I.lines.get(N[1]+1);if(oe!=null&&oe.isWrapped&&oe.getCodePoint(0)!==32){const ie=this._getWordAt([0,N[1]+1],!1,!1,!0);ie&&(U+=ie.length)}}return{start:q,length:U}}}_selectWordAt(N,M){const $=this._getWordAt(N,M);if($){for(;$.start<0;)$.start+=this._bufferService.cols,N[1]--;this._model.selectionStart=[$.start,N[1]],this._model.selectionStartLength=$.length}}_selectToWordAt(N){const M=this._getWordAt(N,!0);if(M){let $=N[1];for(;M.start<0;)M.start+=this._bufferService.cols,$--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,$++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,$]}}_isCharWordSeparator(N){return N.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(N.getChars())>=0}_selectLineAt(N){const M=this._bufferService.buffer.getWrappedRangeForLine(N),$={start:{x:0,y:M.first},end:{x:this._bufferService.cols-1,y:M.last}};this._model.selectionStart=[0,M.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,x.getRangeLength)($,this._bufferService.cols)}};i.SelectionService=A=u([d(3,S.IBufferService),d(4,S.ICoreService),d(5,k.IMouseService),d(6,S.IOptionsService),d(7,k.IRenderService),d(8,k.ICoreBrowserService)],A)},4725:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ILinkProviderService=i.IThemeService=i.ICharacterJoinerService=i.ISelectionService=i.IRenderService=i.IMouseService=i.ICoreBrowserService=i.ICharSizeService=void 0;const u=c(8343);i.ICharSizeService=(0,u.createDecorator)("CharSizeService"),i.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),i.IMouseService=(0,u.createDecorator)("MouseService"),i.IRenderService=(0,u.createDecorator)("RenderService"),i.ISelectionService=(0,u.createDecorator)("SelectionService"),i.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),i.IThemeService=(0,u.createDecorator)("ThemeService"),i.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(a,i,c){var u=this&&this.__decorate||function(A,N,M,$){var D,I=arguments.length,G=I<3?N:$===null?$=Object.getOwnPropertyDescriptor(N,M):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(A,N,M,$);else for(var H=A.length-1;H>=0;H--)(D=A[H])&&(G=(I<3?D(G):I>3?D(N,M,G):D(N,M))||G);return I>3&&G&&Object.defineProperty(N,M,G),G},d=this&&this.__param||function(A,N){return function(M,$){N(M,$,A)}};Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeService=i.DEFAULT_ANSI_COLORS=void 0;const _=c(7239),p=c(8055),m=c(8460),k=c(844),w=c(2585),v=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),x=p.css.toColor("#ffffff"),y=p.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};i.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],N=[0,95,135,175,215,255];for(let M=0;M<216;M++){const $=N[M/36%6|0],D=N[M/6%6|0],I=N[M%6];A.push({css:p.channels.toCss($,D,I),rgba:p.channels.toRgba($,D,I)})}for(let M=0;M<24;M++){const $=8+10*M;A.push({css:p.channels.toCss($,$,$),rgba:p.channels.toRgba($,$,$)})}return A})());let z=i.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new _.ColorContrastCache,this._halfContrastCache=new _.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:b,cursor:x,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:p.color.blend(b,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:p.color.blend(b,S),ansi:i.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(A={}){const N=this._colors;if(N.foreground=E(A.foreground,v),N.background=E(A.background,b),N.cursor=E(A.cursor,x),N.cursorAccent=E(A.cursorAccent,y),N.selectionBackgroundTransparent=E(A.selectionBackground,S),N.selectionBackgroundOpaque=p.color.blend(N.background,N.selectionBackgroundTransparent),N.selectionInactiveBackgroundTransparent=E(A.selectionInactiveBackground,N.selectionBackgroundTransparent),N.selectionInactiveBackgroundOpaque=p.color.blend(N.background,N.selectionInactiveBackgroundTransparent),N.selectionForeground=A.selectionForeground?E(A.selectionForeground,p.NULL_COLOR):void 0,N.selectionForeground===p.NULL_COLOR&&(N.selectionForeground=void 0),p.color.isOpaque(N.selectionBackgroundTransparent)&&(N.selectionBackgroundTransparent=p.color.opacity(N.selectionBackgroundTransparent,.3)),p.color.isOpaque(N.selectionInactiveBackgroundTransparent)&&(N.selectionInactiveBackgroundTransparent=p.color.opacity(N.selectionInactiveBackgroundTransparent,.3)),N.ansi=i.DEFAULT_ANSI_COLORS.slice(),N.ansi[0]=E(A.black,i.DEFAULT_ANSI_COLORS[0]),N.ansi[1]=E(A.red,i.DEFAULT_ANSI_COLORS[1]),N.ansi[2]=E(A.green,i.DEFAULT_ANSI_COLORS[2]),N.ansi[3]=E(A.yellow,i.DEFAULT_ANSI_COLORS[3]),N.ansi[4]=E(A.blue,i.DEFAULT_ANSI_COLORS[4]),N.ansi[5]=E(A.magenta,i.DEFAULT_ANSI_COLORS[5]),N.ansi[6]=E(A.cyan,i.DEFAULT_ANSI_COLORS[6]),N.ansi[7]=E(A.white,i.DEFAULT_ANSI_COLORS[7]),N.ansi[8]=E(A.brightBlack,i.DEFAULT_ANSI_COLORS[8]),N.ansi[9]=E(A.brightRed,i.DEFAULT_ANSI_COLORS[9]),N.ansi[10]=E(A.brightGreen,i.DEFAULT_ANSI_COLORS[10]),N.ansi[11]=E(A.brightYellow,i.DEFAULT_ANSI_COLORS[11]),N.ansi[12]=E(A.brightBlue,i.DEFAULT_ANSI_COLORS[12]),N.ansi[13]=E(A.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),N.ansi[14]=E(A.brightCyan,i.DEFAULT_ANSI_COLORS[14]),N.ansi[15]=E(A.brightWhite,i.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const M=Math.min(N.ansi.length-16,A.extendedAnsi.length);for(let $=0;${Object.defineProperty(i,"__esModule",{value:!0}),i.CircularList=void 0;const u=c(8460),d=c(844);class _ extends d.Disposable{constructor(m){super(),this._maxLength=m,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(m){if(this._maxLength===m)return;const k=new Array(m);for(let w=0;wthis._length)for(let k=this._length;k=m;v--)this._array[this._getCyclicIndex(v+w.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;vthis._maxLength){const v=this._length+w.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=w.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,k,w){if(!(k<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+w<0)throw new Error("Cannot shift elements in list beyond index 0");if(w>0){for(let b=k-1;b>=0;b--)this.set(m+b+w,this.get(m+b));const v=m+k+w-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v{Object.defineProperty(i,"__esModule",{value:!0}),i.clone=void 0,i.clone=function c(u,d=5){if(typeof u!="object")return u;const _=Array.isArray(u)?[]:{};for(const p in u)_[p]=d<=1?u[p]:u[p]&&c(u[p],d-1);return _}},8055:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.contrastRatio=i.toPaddedHex=i.rgba=i.rgb=i.css=i.color=i.channels=i.NULL_COLOR=void 0;let c=0,u=0,d=0,_=0;var p,m,k,w,v;function b(y){const S=y.toString(16);return S.length<2?"0"+S:S}function x(y,S){return y>>0},y.toColor=function(S,z,E,A){return{css:y.toCss(S,z,E,A),rgba:y.toRgba(S,z,E,A)}}})(p||(i.channels=p={})),(function(y){function S(z,E){return _=Math.round(255*E),[c,u,d]=v.toChannels(z.rgba),{css:p.toCss(c,u,d,_),rgba:p.toRgba(c,u,d,_)}}y.blend=function(z,E){if(_=(255&E.rgba)/255,_===1)return{css:E.css,rgba:E.rgba};const A=E.rgba>>24&255,N=E.rgba>>16&255,M=E.rgba>>8&255,$=z.rgba>>24&255,D=z.rgba>>16&255,I=z.rgba>>8&255;return c=$+Math.round((A-$)*_),u=D+Math.round((N-D)*_),d=I+Math.round((M-I)*_),{css:p.toCss(c,u,d),rgba:p.toRgba(c,u,d)}},y.isOpaque=function(z){return(255&z.rgba)==255},y.ensureContrastRatio=function(z,E,A){const N=v.ensureContrastRatio(z.rgba,E.rgba,A);if(N)return p.toColor(N>>24&255,N>>16&255,N>>8&255)},y.opaque=function(z){const E=(255|z.rgba)>>>0;return[c,u,d]=v.toChannels(E),{css:p.toCss(c,u,d),rgba:E}},y.opacity=S,y.multiplyOpacity=function(z,E){return _=255&z.rgba,S(z,_*E/255)},y.toColorRGB=function(z){return[z.rgba>>24&255,z.rgba>>16&255,z.rgba>>8&255]}})(m||(i.color=m={})),(function(y){let S,z;try{const E=document.createElement("canvas");E.width=1,E.height=1;const A=E.getContext("2d",{willReadFrequently:!0});A&&(S=A,S.globalCompositeOperation="copy",z=S.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return c=parseInt(E.slice(1,2).repeat(2),16),u=parseInt(E.slice(2,3).repeat(2),16),d=parseInt(E.slice(3,4).repeat(2),16),p.toColor(c,u,d);case 5:return c=parseInt(E.slice(1,2).repeat(2),16),u=parseInt(E.slice(2,3).repeat(2),16),d=parseInt(E.slice(3,4).repeat(2),16),_=parseInt(E.slice(4,5).repeat(2),16),p.toColor(c,u,d,_);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const A=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return c=parseInt(A[1]),u=parseInt(A[2]),d=parseInt(A[3]),_=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(c,u,d,_);if(!S||!z)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=z,S.fillStyle=E,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[c,u,d,_]=S.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,d,_),css:E}}})(k||(i.css=k={})),(function(y){function S(z,E,A){const N=z/255,M=E/255,$=A/255;return .2126*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*($<=.03928?$/12.92:Math.pow(($+.055)/1.055,2.4))}y.relativeLuminance=function(z){return S(z>>16&255,z>>8&255,255&z)},y.relativeLuminance2=S})(w||(i.rgb=w={})),(function(y){function S(E,A,N){const M=E>>24&255,$=E>>16&255,D=E>>8&255;let I=A>>24&255,G=A>>16&255,H=A>>8&255,Q=x(w.relativeLuminance2(I,G,H),w.relativeLuminance2(M,$,D));for(;Q0||G>0||H>0);)I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),H-=Math.max(0,Math.ceil(.1*H)),Q=x(w.relativeLuminance2(I,G,H),w.relativeLuminance2(M,$,D));return(I<<24|G<<16|H<<8|255)>>>0}function z(E,A,N){const M=E>>24&255,$=E>>16&255,D=E>>8&255;let I=A>>24&255,G=A>>16&255,H=A>>8&255,Q=x(w.relativeLuminance2(I,G,H),w.relativeLuminance2(M,$,D));for(;Q>>0}y.blend=function(E,A){if(_=(255&A)/255,_===1)return A;const N=A>>24&255,M=A>>16&255,$=A>>8&255,D=E>>24&255,I=E>>16&255,G=E>>8&255;return c=D+Math.round((N-D)*_),u=I+Math.round((M-I)*_),d=G+Math.round(($-G)*_),p.toRgba(c,u,d)},y.ensureContrastRatio=function(E,A,N){const M=w.relativeLuminance(E>>8),$=w.relativeLuminance(A>>8);if(x(M,$)>8));if(Hx(M,w.relativeLuminance(Q>>8))?G:Q}return G}const D=z(E,A,N),I=x(M,w.relativeLuminance(D>>8));if(Ix(M,w.relativeLuminance(G>>8))?D:G}return D}},y.reduceLuminance=S,y.increaseLuminance=z,y.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}})(v||(i.rgba=v={})),i.toPaddedHex=b,i.contrastRatio=x},8969:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreTerminal=void 0;const u=c(844),d=c(2585),_=c(4348),p=c(7866),m=c(744),k=c(7302),w=c(6975),v=c(8460),b=c(1753),x=c(1480),y=c(7994),S=c(9282),z=c(5435),E=c(5981),A=c(2660);let N=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((D=>{var I;(I=this._onScrollApi)==null||I.fire(D.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(D){for(const I in D)this.optionsService.options[I]=D[I]}constructor(D){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new _.InstantiationService,this.optionsService=this.register(new k.OptionsService(D)),this._instantiationService.setService(d.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(d.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(d.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(w.CoreService)),this._instantiationService.setService(d.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(d.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(x.UnicodeService)),this._instantiationService.setService(d.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(d.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(d.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new z.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new E.WriteBuffer(((I,G)=>this._inputHandler.parse(I,G)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(D,I){this._writeBuffer.write(D,I)}writeSync(D,I){this._logService.logLevel<=d.LogLevelEnum.WARN&&!N&&(this._logService.warn("writeSync is unreliable and will be removed soon."),N=!0),this._writeBuffer.writeSync(D,I)}input(D,I=!0){this.coreService.triggerDataEvent(D,I)}resize(D,I){isNaN(D)||isNaN(I)||(D=Math.max(D,m.MINIMUM_COLS),I=Math.max(I,m.MINIMUM_ROWS),this._bufferService.resize(D,I))}scroll(D,I=!1){this._bufferService.scroll(D,I)}scrollLines(D,I,G){this._bufferService.scrollLines(D,I,G)}scrollPages(D){this.scrollLines(D*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(D){const I=D-this._bufferService.buffer.ydisp;I!==0&&this.scrollLines(I)}registerEscHandler(D,I){return this._inputHandler.registerEscHandler(D,I)}registerDcsHandler(D,I){return this._inputHandler.registerDcsHandler(D,I)}registerCsiHandler(D,I){return this._inputHandler.registerCsiHandler(D,I)}registerOscHandler(D,I){return this._inputHandler.registerOscHandler(D,I)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let D=!1;const I=this.optionsService.rawOptions.windowsPty;I&&I.buildNumber!==void 0&&I.buildNumber!==void 0?D=I.backend==="conpty"&&I.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(D=!0),D?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const D=[];D.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),D.push(this.registerCsiHandler({final:"H"},(()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const I of D)I.dispose()}))}}}i.CoreTerminal=M},8460:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(d)))},i.runAndSubscribe=function(c,u){return u(void 0),c((d=>u(d)))}},5435:function(a,i,c){var u=this&&this.__decorate||function(ee,P,L,F){var q,U=arguments.length,oe=U<3?P:F===null?F=Object.getOwnPropertyDescriptor(P,L):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ee,P,L,F);else for(var ie=ee.length-1;ie>=0;ie--)(q=ee[ie])&&(oe=(U<3?q(oe):U>3?q(P,L,oe):q(P,L))||oe);return U>3&&oe&&Object.defineProperty(P,L,oe),oe},d=this&&this.__param||function(ee,P){return function(L,F){P(L,F,ee)}};Object.defineProperty(i,"__esModule",{value:!0}),i.InputHandler=i.WindowsOptionsReportType=void 0;const _=c(2584),p=c(7116),m=c(2015),k=c(844),w=c(482),v=c(8437),b=c(8460),x=c(643),y=c(511),S=c(3734),z=c(2585),E=c(1480),A=c(6242),N=c(6351),M=c(5941),$={"(":0,")":1,"*":2,"+":3,"-":1,".":2},D=131072;function I(ee,P){if(ee>24)return P.setWinLines||!1;switch(ee){case 1:return!!P.restoreWin;case 2:return!!P.minimizeWin;case 3:return!!P.setWinPosition;case 4:return!!P.setWinSizePixels;case 5:return!!P.raiseWin;case 6:return!!P.lowerWin;case 7:return!!P.refreshWin;case 8:return!!P.setWinSizeChars;case 9:return!!P.maximizeWin;case 10:return!!P.fullscreenWin;case 11:return!!P.getWinState;case 13:return!!P.getWinPosition;case 14:return!!P.getWinSizePixels;case 15:return!!P.getScreenSizePixels;case 16:return!!P.getCellSizePixels;case 18:return!!P.getWinSizeChars;case 19:return!!P.getScreenSizeChars;case 20:return!!P.getIconTitle;case 21:return!!P.getWinTitle;case 22:return!!P.pushTitle;case 23:return!!P.popTitle;case 24:return!!P.setWinLines}return!1}var G;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(G||(i.WindowsOptionsReportType=G={}));let H=0;class Q extends k.Disposable{getAttrData(){return this._curAttrData}constructor(P,L,F,q,U,oe,ie,ce,re=new m.EscapeSequenceParser){super(),this._bufferService=P,this._charsetService=L,this._coreService=F,this._logService=q,this._optionsService=U,this._oscLinkService=oe,this._coreMouseService=ie,this._unicodeService=ce,this._parser=re,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new w.StringToUtf32,this._utf8Decoder=new w.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new K(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((W=>this._activeBuffer=W.activeBuffer))),this._parser.setCsiHandlerFallback(((W,ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(W),params:ae.toArray()})})),this._parser.setEscHandlerFallback((W=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(W)})})),this._parser.setExecuteHandlerFallback((W=>{this._logService.debug("Unknown EXECUTE code: ",{code:W})})),this._parser.setOscHandlerFallback(((W,ae,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:W,action:ae,data:le})})),this._parser.setDcsHandlerFallback(((W,ae,le)=>{ae==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(W),action:ae,payload:le})})),this._parser.setPrintHandler(((W,ae,le)=>this.print(W,ae,le))),this._parser.registerCsiHandler({final:"@"},(W=>this.insertChars(W))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(W=>this.scrollLeft(W))),this._parser.registerCsiHandler({final:"A"},(W=>this.cursorUp(W))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(W=>this.scrollRight(W))),this._parser.registerCsiHandler({final:"B"},(W=>this.cursorDown(W))),this._parser.registerCsiHandler({final:"C"},(W=>this.cursorForward(W))),this._parser.registerCsiHandler({final:"D"},(W=>this.cursorBackward(W))),this._parser.registerCsiHandler({final:"E"},(W=>this.cursorNextLine(W))),this._parser.registerCsiHandler({final:"F"},(W=>this.cursorPrecedingLine(W))),this._parser.registerCsiHandler({final:"G"},(W=>this.cursorCharAbsolute(W))),this._parser.registerCsiHandler({final:"H"},(W=>this.cursorPosition(W))),this._parser.registerCsiHandler({final:"I"},(W=>this.cursorForwardTab(W))),this._parser.registerCsiHandler({final:"J"},(W=>this.eraseInDisplay(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(W=>this.eraseInDisplay(W,!0))),this._parser.registerCsiHandler({final:"K"},(W=>this.eraseInLine(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(W=>this.eraseInLine(W,!0))),this._parser.registerCsiHandler({final:"L"},(W=>this.insertLines(W))),this._parser.registerCsiHandler({final:"M"},(W=>this.deleteLines(W))),this._parser.registerCsiHandler({final:"P"},(W=>this.deleteChars(W))),this._parser.registerCsiHandler({final:"S"},(W=>this.scrollUp(W))),this._parser.registerCsiHandler({final:"T"},(W=>this.scrollDown(W))),this._parser.registerCsiHandler({final:"X"},(W=>this.eraseChars(W))),this._parser.registerCsiHandler({final:"Z"},(W=>this.cursorBackwardTab(W))),this._parser.registerCsiHandler({final:"`"},(W=>this.charPosAbsolute(W))),this._parser.registerCsiHandler({final:"a"},(W=>this.hPositionRelative(W))),this._parser.registerCsiHandler({final:"b"},(W=>this.repeatPrecedingCharacter(W))),this._parser.registerCsiHandler({final:"c"},(W=>this.sendDeviceAttributesPrimary(W))),this._parser.registerCsiHandler({prefix:">",final:"c"},(W=>this.sendDeviceAttributesSecondary(W))),this._parser.registerCsiHandler({final:"d"},(W=>this.linePosAbsolute(W))),this._parser.registerCsiHandler({final:"e"},(W=>this.vPositionRelative(W))),this._parser.registerCsiHandler({final:"f"},(W=>this.hVPosition(W))),this._parser.registerCsiHandler({final:"g"},(W=>this.tabClear(W))),this._parser.registerCsiHandler({final:"h"},(W=>this.setMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(W=>this.setModePrivate(W))),this._parser.registerCsiHandler({final:"l"},(W=>this.resetMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(W=>this.resetModePrivate(W))),this._parser.registerCsiHandler({final:"m"},(W=>this.charAttributes(W))),this._parser.registerCsiHandler({final:"n"},(W=>this.deviceStatus(W))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(W=>this.deviceStatusPrivate(W))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(W=>this.softReset(W))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(W=>this.setCursorStyle(W))),this._parser.registerCsiHandler({final:"r"},(W=>this.setScrollRegion(W))),this._parser.registerCsiHandler({final:"s"},(W=>this.saveCursor(W))),this._parser.registerCsiHandler({final:"t"},(W=>this.windowOptions(W))),this._parser.registerCsiHandler({final:"u"},(W=>this.restoreCursor(W))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(W=>this.insertColumns(W))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(W=>this.deleteColumns(W))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(W=>this.selectProtected(W))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(W=>this.requestMode(W,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(W=>this.requestMode(W,!1))),this._parser.setExecuteHandler(_.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(_.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(_.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(_.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(_.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(_.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(_.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(_.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(_.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new A.OscHandler((W=>(this.setTitle(W),this.setIconName(W),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((W=>this.setIconName(W)))),this._parser.registerOscHandler(2,new A.OscHandler((W=>this.setTitle(W)))),this._parser.registerOscHandler(4,new A.OscHandler((W=>this.setOrReportIndexedColor(W)))),this._parser.registerOscHandler(8,new A.OscHandler((W=>this.setHyperlink(W)))),this._parser.registerOscHandler(10,new A.OscHandler((W=>this.setOrReportFgColor(W)))),this._parser.registerOscHandler(11,new A.OscHandler((W=>this.setOrReportBgColor(W)))),this._parser.registerOscHandler(12,new A.OscHandler((W=>this.setOrReportCursorColor(W)))),this._parser.registerOscHandler(104,new A.OscHandler((W=>this.restoreIndexedColor(W)))),this._parser.registerOscHandler(110,new A.OscHandler((W=>this.restoreFgColor(W)))),this._parser.registerOscHandler(111,new A.OscHandler((W=>this.restoreBgColor(W)))),this._parser.registerOscHandler(112,new A.OscHandler((W=>this.restoreCursorColor(W)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const W in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:W},(()=>this.selectCharset("("+W))),this._parser.registerEscHandler({intermediates:")",final:W},(()=>this.selectCharset(")"+W))),this._parser.registerEscHandler({intermediates:"*",final:W},(()=>this.selectCharset("*"+W))),this._parser.registerEscHandler({intermediates:"+",final:W},(()=>this.selectCharset("+"+W))),this._parser.registerEscHandler({intermediates:"-",final:W},(()=>this.selectCharset("-"+W))),this._parser.registerEscHandler({intermediates:".",final:W},(()=>this.selectCharset("."+W))),this._parser.registerEscHandler({intermediates:"/",final:W},(()=>this.selectCharset("/"+W)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((W=>(this._logService.error("Parsing error: ",W),W))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new N.DcsHandler(((W,ae)=>this.requestStatusString(W,ae))))}_preserveStack(P,L,F,q){this._parseStack.paused=!0,this._parseStack.cursorStartX=P,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=F,this._parseStack.position=q}_logSlowResolvingAsync(P){this._logService.logLevel<=z.LogLevelEnum.WARN&&Promise.race([P,new Promise(((L,F)=>setTimeout((()=>F("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(P,L){let F,q=this._activeBuffer.x,U=this._activeBuffer.y,oe=0;const ie=this._parseStack.paused;if(ie){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(F),F;q=this._parseStack.cursorStartX,U=this._parseStack.cursorStartY,this._parseStack.paused=!1,P.length>D&&(oe=this._parseStack.position+D)}if(this._logService.logLevel<=z.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof P=="string"?` "${P}"`:` "${Array.prototype.map.call(P,(W=>String.fromCharCode(W))).join("")}"`),typeof P=="string"?P.split("").map((W=>W.charCodeAt(0))):P),this._parseBuffer.lengthD)for(let W=oe;W0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ae);let me=this._parser.precedingJoinState;for(let be=L;bece){if(re){const Me=le;let Fe=this._activeBuffer.x-Xe;for(this._activeBuffer.x=Xe,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Xe>0&&le instanceof v.BufferLine&&le.copyCellsFrom(Me,Fe,0,Xe,!1);Fe=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}else if(W&&(le.insertCells(this._activeBuffer.x,U-Xe,this._activeBuffer.getNullCell(ae)),le.getWidth(ce-1)===2&&le.setCellFromCodepoint(ce-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,ae)),le.setCellFromCodepoint(this._activeBuffer.x++,q,U,ae),U>0)for(;--U;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}this._parser.precedingJoinState=me,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(P,L){return P.final!=="t"||P.prefix||P.intermediates?this._parser.registerCsiHandler(P,L):this._parser.registerCsiHandler(P,(F=>!I(F.params[0],this._optionsService.rawOptions.windowOptions)||L(F)))}registerDcsHandler(P,L){return this._parser.registerDcsHandler(P,new N.DcsHandler(L))}registerEscHandler(P,L){return this._parser.registerEscHandler(P,L)}registerOscHandler(P,L){return this._parser.registerOscHandler(P,new A.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var P;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&P.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const P=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-P),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(P=this._bufferService.cols-1){this._activeBuffer.x=Math.min(P,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(P,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=P,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=P,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(P,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+P,this._activeBuffer.y+L)}cursorUp(P){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,P.params[0]||1)):this._moveCursor(0,-(P.params[0]||1)),!0}cursorDown(P){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,P.params[0]||1)):this._moveCursor(0,P.params[0]||1),!0}cursorForward(P){return this._moveCursor(P.params[0]||1,0),!0}cursorBackward(P){return this._moveCursor(-(P.params[0]||1),0),!0}cursorNextLine(P){return this.cursorDown(P),this._activeBuffer.x=0,!0}cursorPrecedingLine(P){return this.cursorUp(P),this._activeBuffer.x=0,!0}cursorCharAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(P){return this._setCursor(P.length>=2?(P.params[1]||1)-1:0,(P.params[0]||1)-1),!0}charPosAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(P){return this._moveCursor(P.params[0]||1,0),!0}linePosAbsolute(P){return this._setCursor(this._activeBuffer.x,(P.params[0]||1)-1),!0}vPositionRelative(P){return this._moveCursor(0,P.params[0]||1),!0}hVPosition(P){return this.cursorPosition(P),!0}tabClear(P){const L=P.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(P){const L=P.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(P,L,F,q=!1,U=!1){const oe=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);oe.replaceCells(L,F,this._activeBuffer.getNullCell(this._eraseAttrData()),U),q&&(oe.isWrapped=!1)}_resetBufferLine(P,L=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+P),F.isWrapped=!1)}eraseInDisplay(P,L=!1){let F;switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 3:const q=this._activeBuffer.lines.length-this._bufferService.rows;q>0&&(this._activeBuffer.lines.trimStart(q),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-q,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-q,0),this._onScroll.fire(0))}return!0}eraseInLine(P,L=!1){switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(P){this._restrictCursor();let L=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let re=ce;for(let W=1;W0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(P){return P.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(P.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.C0.ESC+"[>83;40003;0c")),!0}_is(P){return(this._optionsService.rawOptions.termName+"").indexOf(P)===0}setMode(P){for(let L=0;LBe?1:2,me=P.params[0];return be=me,Se=L?me===2?4:me===4?le(oe.modes.insertMode):me===12?3:me===20?le(ae.convertEol):0:me===1?le(F.applicationCursorKeys):me===3?ae.windowOptions.setWinLines?ce===80?2:ce===132?1:0:0:me===6?le(F.origin):me===7?le(F.wraparound):me===8?3:me===9?le(q==="X10"):me===12?le(ae.cursorBlink):me===25?le(!oe.isCursorHidden):me===45?le(F.reverseWraparound):me===66?le(F.applicationKeypad):me===67?4:me===1e3?le(q==="VT200"):me===1002?le(q==="DRAG"):me===1003?le(q==="ANY"):me===1004?le(F.sendFocus):me===1005?4:me===1006?le(U==="SGR"):me===1015?4:me===1016?le(U==="SGR_PIXELS"):me===1048?1:me===47||me===1047||me===1049?le(re===W):me===2004?le(F.bracketedPasteMode):0,oe.triggerDataEvent(`${_.C0.ESC}[${L?"":"?"}${be};${Se}$y`),!0;var be,Se}_updateAttrColor(P,L,F,q,U){return L===2?(P|=50331648,P&=-16777216,P|=S.AttributeData.fromColorRGB([F,q,U])):L===5&&(P&=-50331904,P|=33554432|255&F),P}_extractColor(P,L,F){const q=[0,0,-1,0,0,0];let U=0,oe=0;do{if(q[oe+U]=P.params[L+oe],P.hasSubParams(L+oe)){const ie=P.getSubParams(L+oe);let ce=0;do q[1]===5&&(U=1),q[oe+ce+1+U]=ie[ce];while(++ce=2||q[1]===2&&oe+U>=5)break;q[1]&&(U=1)}while(++oe+L5)&&(P=1),L.extended.underlineStyle=P,L.fg|=268435456,P===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(P){P.fg=v.DEFAULT_ATTR_DATA.fg,P.bg=v.DEFAULT_ATTR_DATA.bg,P.extended=P.extended.clone(),P.extended.underlineStyle=0,P.extended.underlineColor&=-67108864,P.updateExtended()}charAttributes(P){if(P.length===1&&P.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=P.length;let F;const q=this._curAttrData;for(let U=0;U=30&&F<=37?(q.fg&=-50331904,q.fg|=16777216|F-30):F>=40&&F<=47?(q.bg&=-50331904,q.bg|=16777216|F-40):F>=90&&F<=97?(q.fg&=-50331904,q.fg|=16777224|F-90):F>=100&&F<=107?(q.bg&=-50331904,q.bg|=16777224|F-100):F===0?this._processSGR0(q):F===1?q.fg|=134217728:F===3?q.bg|=67108864:F===4?(q.fg|=268435456,this._processUnderline(P.hasSubParams(U)?P.getSubParams(U)[0]:1,q)):F===5?q.fg|=536870912:F===7?q.fg|=67108864:F===8?q.fg|=1073741824:F===9?q.fg|=2147483648:F===2?q.bg|=134217728:F===21?this._processUnderline(2,q):F===22?(q.fg&=-134217729,q.bg&=-134217729):F===23?q.bg&=-67108865:F===24?(q.fg&=-268435457,this._processUnderline(0,q)):F===25?q.fg&=-536870913:F===27?q.fg&=-67108865:F===28?q.fg&=-1073741825:F===29?q.fg&=2147483647:F===39?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?U+=this._extractColor(P,U,q):F===53?q.bg|=1073741824:F===55?q.bg&=-1073741825:F===59?(q.extended=q.extended.clone(),q.extended.underlineColor=-1,q.updateExtended()):F===100?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",F);return!0}deviceStatus(P){switch(P.params[0]){case 5:this._coreService.triggerDataEvent(`${_.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[${L};${F}R`)}return!0}deviceStatusPrivate(P){if(P.params[0]===6){const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[?${L};${F}R`)}return!0}softReset(P){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(P){const L=P.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const F=L%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion(P){const L=P.params[0]||1;let F;return(P.length<2||(F=P.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions(P){if(!I(P.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=P.length>1?P.params[1]:0;switch(P.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(G.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(G.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${_.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(P){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(P){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(P){return this._windowTitle=P,this._onTitleChange.fire(P),!0}setIconName(P){return this._iconName=P,!0}setOrReportIndexedColor(P){const L=[],F=P.split(";");for(;F.length>1;){const q=F.shift(),U=F.shift();if(/^\d+$/.exec(q)){const oe=parseInt(q);if(J(oe))if(U==="?")L.push({type:0,index:oe});else{const ie=(0,M.parseColor)(U);ie&&L.push({type:1,index:oe,color:ie})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(P){const L=P.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(P,L){this._getCurrentLinkId()&&this._finishHyperlink();const F=P.split(":");let q;const U=F.findIndex((oe=>oe.startsWith("id=")));return U!==-1&&(q=F[U].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:q,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(P,L){const F=P.split(";");for(let q=0;q=this._specialColors.length);++q,++L)if(F[q]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const U=(0,M.parseColor)(F[q]);U&&this._onColor.fire([{type:1,index:this._specialColors[L],color:U}])}return!0}setOrReportFgColor(P){return this._setOrReportSpecialColor(P,0)}setOrReportBgColor(P){return this._setOrReportSpecialColor(P,1)}setOrReportCursorColor(P){return this._setOrReportSpecialColor(P,2)}restoreIndexedColor(P){if(!P)return this._onColor.fire([{type:2}]),!0;const L=[],F=P.split(";");for(let q=0;q=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const P=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,P,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(P){return this._charsetService.setgLevel(P),!0}screenAlignmentPattern(){const P=new y.CellData;P.content=4194373,P.fg=this._curAttrData.fg,P.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${_.C0.ESC}${U}${_.C0.ESC}\\`),!0))(P==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:P==='"p'?'P1$r61;1"p':P==="r"?`P1$r${F.scrollTop+1};${F.scrollBottom+1}r`:P==="m"?"P1$r0m":P===" q"?`P1$r${{block:2,underline:4,bar:6}[q.cursorStyle]-(q.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(P,L){this._dirtyRowTracker.markRangeDirty(P,L)}}i.InputHandler=Q;let K=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){eethis.end&&(this.end=ee)}markRangeDirty(ee,P){ee>P&&(H=ee,ee=P,P=H),eethis.end&&(this.end=P)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(ee){return 0<=ee&&ee<256}K=u([d(0,z.IBufferService)],K)},844:(a,i)=>{function c(u){for(const d of u)d.dispose();u.length=0}Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.toDisposable=i.MutableDisposable=i.Disposable=void 0,i.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const d=this._disposables.indexOf(u);d!==-1&&this._disposables.splice(d,1)}},i.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var d;this._isDisposed||u===this._value||((d=this._value)==null||d.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},i.toDisposable=function(u){return{dispose:u}},i.disposeArray=c,i.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(d,_,p){this._data[d]||(this._data[d]={}),this._data[d][_]=p}get(d,_){return this._data[d]?this._data[d][_]:void 0}clear(){this._data={}}}i.TwoKeyMap=c,i.FourKeyMap=class{constructor(){this._data=new c}set(u,d,_,p,m){this._data.get(u,d)||this._data.set(u,d,new c),this._data.get(u,d).set(_,p,m)}get(u,d,_,p){var m;return(m=this._data.get(u,d))==null?void 0:m.get(_,p)}clear(){this._data.clear()}}},6114:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.isChromeOS=i.isLinux=i.isWindows=i.isIphone=i.isIpad=i.isMac=i.getSafariVersion=i.isSafari=i.isLegacyEdge=i.isFirefox=i.isNode=void 0,i.isNode=typeof process<"u"&&"title"in process;const c=i.isNode?"node":navigator.userAgent,u=i.isNode?"node":navigator.platform;i.isFirefox=c.includes("Firefox"),i.isLegacyEdge=c.includes("Edge"),i.isSafari=/^((?!chrome|android).)*safari/i.test(c),i.getSafariVersion=function(){if(!i.isSafari)return 0;const d=c.match(/Version\/(\d+)/);return d===null||d.length<2?0:parseInt(d[1])},i.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),i.isIpad=u==="iPad",i.isIphone=u==="iPhone",i.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),i.isLinux=u.indexOf("Linux")>=0,i.isChromeOS=/\bCrOS\b/.test(c)},6106:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SortedList=void 0;let c=0;i.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const d=this._getKey(u);if(d===void 0||(c=this._search(d),c===-1)||this._getKey(this._array[c])!==d)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===u))do d(this._array[c]);while(++c=d;){let p=d+_>>1;const m=this._getKey(this._array[p]);if(m>u)_=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}d=p+1}}return d}}},7226:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DebouncedIdleTask=i.IdleTaskQueue=i.PriorityTaskQueue=void 0;const u=c(6114);class d{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-k))}ms`),void this._start();v=b}this.clear()}}class _ extends d{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const k=Date.now()+m;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}i.PriorityTaskQueue=_,i.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends d{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:_,i.DebouncedIdleTask=class{constructor(){this._queue=new i.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.updateWindowsModeWrappedState=void 0;const u=c(643);i.updateWindowsModeWrappedState=function(d){const _=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),p=_==null?void 0:_.get(d.cols-1),m=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);m&&p&&(m.isWrapped=p[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&p[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ExtendedAttrs=i.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(_){return[_>>>16&255,_>>>8&255,255&_]}static fromColorRGB(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]}clone(){const _=new c;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}i.AttributeData=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(_){this._ext=_}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(_){this._ext&=-469762049,this._ext|=_<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(_){this._ext&=-67108864,this._ext|=67108863&_}get urlId(){return this._urlId}set urlId(_){this._urlId=_}get underlineVariantOffset(){const _=(3758096384&this._ext)>>29;return _<0?4294967288^_:_}set underlineVariantOffset(_){this._ext&=536870911,this._ext|=_<<29&3758096384}constructor(_=0,p=0){this._ext=0,this._urlId=0,this._ext=_,this._urlId=p}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}i.ExtendedAttrs=u},9092:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Buffer=i.MAX_BUFFER_SIZE=void 0;const u=c(6349),d=c(7226),_=c(3734),p=c(8437),m=c(4634),k=c(511),w=c(643),v=c(4863),b=c(7116);i.MAX_BUFFER_SIZE=4294967295,i.Buffer=class{constructor(x,y,S){this._hasScrollback=x,this._optionsService=y,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=k.CellData.fromCharData([0,w.NULL_CELL_CHAR,w.NULL_CELL_WIDTH,w.NULL_CELL_CODE]),this._whitespaceCell=k.CellData.fromCharData([0,w.WHITESPACE_CELL_CHAR,w.WHITESPACE_CELL_WIDTH,w.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new d.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new _.ExtendedAttrs),this._nullCell}getWhitespaceCell(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new _.ExtendedAttrs),this._whitespaceCell}getBlankLine(x,y){return new p.BufferLine(this._bufferService.cols,this.getNullCell(x),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const x=this.ybase+this.y-this.ydisp;return x>=0&&xi.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:y}fillViewportRows(x){if(this.lines.length===0){x===void 0&&(x=p.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(x))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(x,y){const S=this.getNullCell(p.DEFAULT_ATTR_DATA);let z=0;const E=this._getCorrectBufferLength(y);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(x,S)));else for(let N=this._rows;N>y;N--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E0&&(this.lines.trimStart(N),this.ybase=Math.max(this.ybase-N,0),this.ydisp=Math.max(this.ydisp-N,0),this.savedY=Math.max(this.savedY-N,0)),this.lines.maxLength=E}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,y-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(x,y),this._cols>x))for(let A=0;A.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let x=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,x=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return x}get _isReflowEnabled(){const x=this._optionsService.rawOptions.windowsPty;return x&&x.buildNumber?this._hasScrollback&&x.backend==="conpty"&&x.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(x,y){this._cols!==x&&(x>this._cols?this._reflowLarger(x,y):this._reflowSmaller(x,y))}_reflowLarger(x,y){const S=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(S.length>0){const z=(0,m.reflowLargerCreateNewLayout)(this.lines,S);(0,m.reflowLargerApplyNewLayout)(this.lines,z.layout),this._reflowLargerAdjustViewport(x,y,z.countRemoved)}}_reflowLargerAdjustViewport(x,y,S){const z=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=S;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;A--){let N=this.lines.get(A);if(!N||!N.isWrapped&&N.getTrimmedLength()<=x)continue;const M=[N];for(;N.isWrapped&&A>0;)N=this.lines.get(--A),M.unshift(N);const $=this.ybase+this.y;if($>=A&&$0&&(z.push({start:A+M.length+E,newLines:Q}),E+=Q.length),M.push(...Q);let K=I.length-1,J=I[K];J===0&&(K--,J=I[K]);let ee=M.length-G-1,P=D;for(;ee>=0;){const F=Math.min(P,J);if(M[K]===void 0)break;if(M[K].copyCellsFrom(M[ee],P-F,J-F,F,!0),J-=F,J===0&&(K--,J=I[K]),P-=F,P===0){ee--;const q=Math.max(ee,0);P=(0,m.getWrappedLineTrimmedLength)(M,q,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const A=[],N=[];for(let K=0;K=0;K--)if(I&&I.start>$+G){for(let J=I.newLines.length-1;J>=0;J--)this.lines.set(K--,I.newLines[J]);K++,A.push({index:$+1,amount:I.newLines.length}),G+=I.newLines.length,I=z[++D]}else this.lines.set(K,N[$--]);let H=0;for(let K=A.length-1;K>=0;K--)A[K].index+=H,this.lines.onInsertEmitter.fire(A[K]),H+=A[K].amount;const Q=Math.max(0,M+E-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(x,y,S=0,z){const E=this.lines.get(x);return E?E.translateToString(y,S,z):""}getWrappedRangeForLine(x){let y=x,S=x;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;S+10;);return x>=this._cols?this._cols-1:x<0?0:x}nextStop(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x=this._cols?this._cols-1:x<0?0:x}clearMarkers(x){this._isClearing=!0;for(let y=0;y{y.line-=S,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((S=>{y.line>=S.index&&(y.line+=S.amount)}))),y.register(this.lines.onDelete((S=>{y.line>=S.index&&y.lineS.index&&(y.line-=S.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(x){this._isClearing||this.markers.splice(this.markers.indexOf(x),1)}}},8437:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLine=i.DEFAULT_ATTR_DATA=void 0;const u=c(3734),d=c(511),_=c(643),p=c(482);i.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class k{constructor(v,b,x=!1){this.isWrapped=x,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const y=b||d.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]);for(let S=0;S>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):x]}set(v,b){this._data[3*v+1]=b[_.CHAR_DATA_ATTR_INDEX],b[_.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[_.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,x,y){268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=b|x<<22,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}addCodepointToCell(v,b,x){let y=this._data[3*v+0];2097152&y?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&y?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&y)+(0,p.stringFromCodePoint)(b),y&=-2097152,y|=2097152):y=b|4194304,x&&(y&=-12582913,y|=x<<22),this._data[3*v+0]=y}insertCells(v,b,x){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,x),b=0;--S)this.setCell(v+b+S,this.loadCell(v+S,y));for(let S=0;Sthis.length){if(this._data.buffer.byteLength>=4*x)this._data=new Uint32Array(this._data.buffer,0,x);else{const y=new Uint32Array(x);y.set(this._data),this._data=y}for(let y=this.length;y=v&&delete this._combined[E]}const S=Object.keys(this._extendedAttrs);for(let z=0;z=v&&delete this._extendedAttrs[E]}}return this.length=v,4*x*2=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,b,x,y,S){const z=v._data;if(S)for(let A=y-1;A>=0;A--){for(let N=0;N<3;N++)this._data[3*(x+A)+N]=z[3*(b+A)+N];268435456&z[3*(b+A)+2]&&(this._extendedAttrs[x+A]=v._extendedAttrs[b+A])}else for(let A=0;A=b&&(this._combined[N-b+x]=v._combined[N])}}translateToString(v,b,x,y){b=b??0,x=x??this.length,v&&(x=Math.min(x,this.getTrimmedLength())),y&&(y.length=0);let S="";for(;b>22||1}return y&&y.push(b),S}}i.BufferLine=k},4841:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.getRangeLength=void 0,i.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(a,i)=>{function c(u,d,_){if(d===u.length-1)return u[d].getTrimmedLength();const p=!u[d].hasContent(_-1)&&u[d].getWidth(_-1)===1,m=u[d+1].getWidth(0)===2;return p&&m?_-1:_}Object.defineProperty(i,"__esModule",{value:!0}),i.getWrappedLineTrimmedLength=i.reflowSmallerGetNewLineLengths=i.reflowLargerApplyNewLayout=i.reflowLargerCreateNewLayout=i.reflowLargerGetLinesToRemove=void 0,i.reflowLargerGetLinesToRemove=function(u,d,_,p,m){const k=[];for(let w=0;w=w&&p0&&(N>y||x[N].getTrimmedLength()===0);N--)A++;A>0&&(k.push(w+x.length-A),k.push(A)),w+=x.length-1}return k},i.reflowLargerCreateNewLayout=function(u,d){const _=[];let p=0,m=d[p],k=0;for(let w=0;wc(u,x,d))).reduce(((b,x)=>b+x));let k=0,w=0,v=0;for(;vb&&(k-=b,w++);const x=u[w].getWidth(k-1)===2;x&&k--;const y=x?_-1:_;p.push(y),v+=y}return p},i.getWrappedLineTrimmedLength=c},5295:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferSet=void 0;const u=c(8460),d=c(844),_=c(9092);class p extends d.Disposable{constructor(k,w){super(),this._optionsService=k,this._bufferService=w,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(k){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(k),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(k,w){this._normal.resize(k,w),this._alt.resize(k,w),this.setupTabStops(k)}setupTabStops(k){this._normal.setupTabStops(k),this._alt.setupTabStops(k)}}i.BufferSet=p},511:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CellData=void 0;const u=c(482),d=c(643),_=c(3734);class p extends _.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new _.ExtendedAttrs,this.combinedData=""}static fromCharData(k){const w=new p;return w.setFromCharData(k),w}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(k){this.fg=k[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let w=!1;if(k[d.CHAR_DATA_CHAR_INDEX].length>2)w=!0;else if(k[d.CHAR_DATA_CHAR_INDEX].length===2){const v=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|k[d.CHAR_DATA_WIDTH_INDEX]<<22:w=!0}else w=!0}else this.content=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[d.CHAR_DATA_WIDTH_INDEX]<<22;w&&(this.combinedData=k[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.CellData=p},643:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WHITESPACE_CELL_CODE=i.WHITESPACE_CELL_WIDTH=i.WHITESPACE_CELL_CHAR=i.NULL_CELL_CODE=i.NULL_CELL_WIDTH=i.NULL_CELL_CHAR=i.CHAR_DATA_CODE_INDEX=i.CHAR_DATA_WIDTH_INDEX=i.CHAR_DATA_CHAR_INDEX=i.CHAR_DATA_ATTR_INDEX=i.DEFAULT_EXT=i.DEFAULT_ATTR=i.DEFAULT_COLOR=void 0,i.DEFAULT_COLOR=0,i.DEFAULT_ATTR=256|i.DEFAULT_COLOR<<9,i.DEFAULT_EXT=0,i.CHAR_DATA_ATTR_INDEX=0,i.CHAR_DATA_CHAR_INDEX=1,i.CHAR_DATA_WIDTH_INDEX=2,i.CHAR_DATA_CODE_INDEX=3,i.NULL_CELL_CHAR="",i.NULL_CELL_WIDTH=1,i.NULL_CELL_CODE=0,i.WHITESPACE_CELL_CHAR=" ",i.WHITESPACE_CELL_WIDTH=1,i.WHITESPACE_CELL_CODE=32},4863:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Marker=void 0;const u=c(8460),d=c(844);class _{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=_._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,d.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}i.Marker=_,_._nextId=1},7116:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CHARSET=i.CHARSETS=void 0,i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=void 0,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,i)=>{var c,u,d;Object.defineProperty(i,"__esModule",{value:!0}),i.C1_ESCAPED=i.C1=i.C0=void 0,(function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=` -`,_.VT="\v",_.FF="\f",_.CR="\r",_.SO="",_.SI="",_.DLE="",_.DC1="",_.DC2="",_.DC3="",_.DC4="",_.NAK="",_.SYN="",_.ETB="",_.CAN="",_.EM="",_.SUB="",_.ESC="\x1B",_.FS="",_.GS="",_.RS="",_.US="",_.SP=" ",_.DEL=""})(c||(i.C0=c={})),(function(_){_.PAD="€",_.HOP="",_.BPH="‚",_.NBH="ƒ",_.IND="„",_.NEL="…",_.SSA="†",_.ESA="‡",_.HTS="ˆ",_.HTJ="‰",_.VTS="Š",_.PLD="‹",_.PLU="Œ",_.RI="",_.SS2="Ž",_.SS3="",_.DCS="",_.PU1="‘",_.PU2="’",_.STS="“",_.CCH="”",_.MW="•",_.SPA="–",_.EPA="—",_.SOS="˜",_.SGCI="™",_.SCI="š",_.CSI="›",_.ST="œ",_.OSC="",_.PM="ž",_.APC="Ÿ"})(u||(i.C1=u={})),(function(_){_.ST=`${c.ESC}\\`})(d||(i.C1_ESCAPED=d={}))},7399:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.evaluateKeyboardEvent=void 0;const u=c(2584),d={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};i.evaluateKeyboardEvent=function(_,p,m,k){const w={type:0,cancel:!1,key:void 0},v=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?w.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?w.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?w.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(w.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:w.key=_.ctrlKey?"\b":u.C0.DEL,_.altKey&&(w.key=u.C0.ESC+w.key);break;case 9:if(_.shiftKey){w.key=u.C0.ESC+"[Z";break}w.key=u.C0.HT,w.cancel=!0;break;case 13:w.key=_.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,w.cancel=!0;break;case 27:w.key=u.C0.ESC,_.altKey&&(w.key=u.C0.ESC+u.C0.ESC),w.cancel=!0;break;case 37:if(_.metaKey)break;v?(w.key=u.C0.ESC+"[1;"+(v+1)+"D",w.key===u.C0.ESC+"[1;3D"&&(w.key=u.C0.ESC+(m?"b":"[1;5D"))):w.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(_.metaKey)break;v?(w.key=u.C0.ESC+"[1;"+(v+1)+"C",w.key===u.C0.ESC+"[1;3C"&&(w.key=u.C0.ESC+(m?"f":"[1;5C"))):w.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(_.metaKey)break;v?(w.key=u.C0.ESC+"[1;"+(v+1)+"A",m||w.key!==u.C0.ESC+"[1;3A"||(w.key=u.C0.ESC+"[1;5A")):w.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(_.metaKey)break;v?(w.key=u.C0.ESC+"[1;"+(v+1)+"B",m||w.key!==u.C0.ESC+"[1;3B"||(w.key=u.C0.ESC+"[1;5B")):w.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(w.key=u.C0.ESC+"[2~");break;case 46:w.key=v?u.C0.ESC+"[3;"+(v+1)+"~":u.C0.ESC+"[3~";break;case 36:w.key=v?u.C0.ESC+"[1;"+(v+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:w.key=v?u.C0.ESC+"[1;"+(v+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:_.shiftKey?w.type=2:_.ctrlKey?w.key=u.C0.ESC+"[5;"+(v+1)+"~":w.key=u.C0.ESC+"[5~";break;case 34:_.shiftKey?w.type=3:_.ctrlKey?w.key=u.C0.ESC+"[6;"+(v+1)+"~":w.key=u.C0.ESC+"[6~";break;case 112:w.key=v?u.C0.ESC+"[1;"+(v+1)+"P":u.C0.ESC+"OP";break;case 113:w.key=v?u.C0.ESC+"[1;"+(v+1)+"Q":u.C0.ESC+"OQ";break;case 114:w.key=v?u.C0.ESC+"[1;"+(v+1)+"R":u.C0.ESC+"OR";break;case 115:w.key=v?u.C0.ESC+"[1;"+(v+1)+"S":u.C0.ESC+"OS";break;case 116:w.key=v?u.C0.ESC+"[15;"+(v+1)+"~":u.C0.ESC+"[15~";break;case 117:w.key=v?u.C0.ESC+"[17;"+(v+1)+"~":u.C0.ESC+"[17~";break;case 118:w.key=v?u.C0.ESC+"[18;"+(v+1)+"~":u.C0.ESC+"[18~";break;case 119:w.key=v?u.C0.ESC+"[19;"+(v+1)+"~":u.C0.ESC+"[19~";break;case 120:w.key=v?u.C0.ESC+"[20;"+(v+1)+"~":u.C0.ESC+"[20~";break;case 121:w.key=v?u.C0.ESC+"[21;"+(v+1)+"~":u.C0.ESC+"[21~";break;case 122:w.key=v?u.C0.ESC+"[23;"+(v+1)+"~":u.C0.ESC+"[23~";break;case 123:w.key=v?u.C0.ESC+"[24;"+(v+1)+"~":u.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(m&&!k||!_.altKey||_.metaKey)!m||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?w.key=_.key:_.key&&_.ctrlKey&&(_.key==="_"&&(w.key=u.C0.US),_.key==="@"&&(w.key=u.C0.NUL)):_.keyCode===65&&(w.type=1);else{const b=d[_.keyCode],x=b==null?void 0:b[_.shiftKey?1:0];if(x)w.key=u.C0.ESC+x;else if(_.keyCode>=65&&_.keyCode<=90){const y=_.ctrlKey?_.keyCode-64:_.keyCode+32;let S=String.fromCharCode(y);_.shiftKey&&(S=S.toUpperCase()),w.key=u.C0.ESC+S}else if(_.keyCode===32)w.key=u.C0.ESC+(_.ctrlKey?u.C0.NUL:" ");else if(_.key==="Dead"&&_.code.startsWith("Key")){let y=_.code.slice(3,4);_.shiftKey||(y=y.toLowerCase()),w.key=u.C0.ESC+y,w.cancel=!0}}else _.keyCode>=65&&_.keyCode<=90?w.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?w.key=u.C0.NUL:_.keyCode>=51&&_.keyCode<=55?w.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?w.key=u.C0.DEL:_.keyCode===219?w.key=u.C0.ESC:_.keyCode===220?w.key=u.C0.FS:_.keyCode===221&&(w.key=u.C0.GS)}return w}},482:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Utf8ToUtf32=i.StringToUtf32=i.utf32ToString=i.stringFromCodePoint=void 0,i.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},i.utf32ToString=function(c,u=0,d=c.length){let _="";for(let p=u;p65535?(m-=65536,_+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):_+=String.fromCharCode(m)}return _},i.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const d=c.length;if(!d)return 0;let _=0,p=0;if(this._interim){const m=c.charCodeAt(p++);56320<=m&&m<=57343?u[_++]=1024*(this._interim-55296)+m-56320+65536:(u[_++]=this._interim,u[_++]=m),this._interim=0}for(let m=p;m=d)return this._interim=k,_;const w=c.charCodeAt(m);56320<=w&&w<=57343?u[_++]=1024*(k-55296)+w-56320+65536:(u[_++]=k,u[_++]=w)}else k!==65279&&(u[_++]=k)}return _}},i.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const d=c.length;if(!d)return 0;let _,p,m,k,w=0,v=0,b=0;if(this.interim[0]){let S=!1,z=this.interim[0];z&=(224&z)==192?31:(240&z)==224?15:7;let E,A=0;for(;(E=63&this.interim[++A])&&A<4;)z<<=6,z|=E;const N=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=N-A;for(;b=d)return 0;if(E=c[b++],(192&E)!=128){b--,S=!0;break}this.interim[A++]=E,z<<=6,z|=63&E}S||(N===2?z<128?b--:u[w++]=z:N===3?z<2048||z>=55296&&z<=57343||z===65279||(u[w++]=z):z<65536||z>1114111||(u[w++]=z)),this.interim.fill(0)}const x=d-4;let y=b;for(;y=d)return this.interim[0]=_,w;if(p=c[y++],(192&p)!=128){y--;continue}if(v=(31&_)<<6|63&p,v<128){y--;continue}u[w++]=v}else if((240&_)==224){if(y>=d)return this.interim[0]=_,w;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,w;if(m=c[y++],(192&m)!=128){y--;continue}if(v=(15&_)<<12|(63&p)<<6|63&m,v<2048||v>=55296&&v<=57343||v===65279)continue;u[w++]=v}else if((248&_)==240){if(y>=d)return this.interim[0]=_,w;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,w;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,this.interim[2]=m,w;if(k=c[y++],(192&k)!=128){y--;continue}if(v=(7&_)<<18|(63&p)<<12|(63&m)<<6|63&k,v<65536||v>1114111)continue;u[w++]=v}}return w}}},225:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;const u=c(1480),d=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],_=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;i.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let m=0;mw[x][1])return!1;for(;x>=b;)if(v=b+x>>1,k>w[v][1])b=v+1;else{if(!(k=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,k){let w=this.wcwidth(m),v=w===0&&k!==0;if(v){const b=u.UnicodeService.extractWidth(k);b===0?v=!1:b>w&&(w=b)}return u.UnicodeService.createPropertyValue(0,w,v)}}},5981:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WriteBuffer=void 0;const u=c(8460),d=c(844);class _ extends d.Disposable{constructor(m){super(),this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(m,k){if(k!==void 0&&this._syncCalls>k)return void(this._syncCalls=0);if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let w;for(this._isSyncWriting=!0;w=this._writeBuffer.shift();){this._action(w);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(m,k){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(k),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(k)}_innerWrite(m=0,k=!0){const w=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],b=this._action(v,k);if(b){const y=S=>Date.now()-w>=12?setTimeout((()=>this._innerWrite(0,S))):this._innerWrite(w,S);return void b.catch((S=>(queueMicrotask((()=>{throw S})),Promise.resolve(!1)))).then(y)}const x=this._callbacks[this._bufferOffset];if(x&&x(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-w>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}i.WriteBuffer=_},5941:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.toRgbString=i.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function d(_,p){const m=_.toString(16),k=m.length<2?"0"+m:m;switch(p){case 4:return m[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}i.parseColor=function(_){if(!_)return;let p=_.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=c.exec(p);if(m){const k=m[1]?15:m[4]?255:m[7]?4095:65535;return[Math.round(parseInt(m[1]||m[4]||m[7]||m[10],16)/k*255),Math.round(parseInt(m[2]||m[5]||m[8]||m[11],16)/k*255),Math.round(parseInt(m[3]||m[6]||m[9]||m[12],16)/k*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),u.exec(p)&&[3,6,9,12].includes(p.length))){const m=p.length/3,k=[0,0,0];for(let w=0;w<3;++w){const v=parseInt(p.slice(m*w,m*w+m),16);k[w]=m===1?v<<4:m===2?v:m===3?v>>4:v>>8}return k}},i.toRgbString=function(_,p=16){const[m,k,w]=_;return`rgb:${d(m,p)}/${d(k,p)}/${d(w,p)}`}},5770:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.PAYLOAD_LIMIT=void 0,i.PAYLOAD_LIMIT=1e7},6351:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DcsHandler=i.DcsParser=void 0;const u=c(482),d=c(8742),_=c(5770),p=[];i.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(k,w){this._handlers[k]===void 0&&(this._handlers[k]=[]);const v=this._handlers[k];return v.push(w),{dispose:()=>{const b=v.indexOf(w);b!==-1&&v.splice(b,1)}}}clearHandler(k){this._handlers[k]&&delete this._handlers[k]}setHandlerFallback(k){this._handlerFb=k}reset(){if(this._active.length)for(let k=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;k>=0;--k)this._active[k].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(k,w){if(this.reset(),this._ident=k,this._active=this._handlers[k]||p,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(w);else this._handlerFb(this._ident,"HOOK",w)}put(k,w,v){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(k,w,v);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(k,w,v))}unhook(k,w=!0){if(this._active.length){let v=!1,b=this._active.length-1,x=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=w,x=this._stack.fallThrough,this._stack.paused=!1),!x&&v===!1){for(;b>=0&&(v=this._active[b].unhook(k),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",k);this._active=p,this._ident=0}};const m=new d.Params;m.addParam(0),i.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=m,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():m,this._data="",this._hitLimit=!1}put(k,w,v){this._hitLimit||(this._data+=(0,u.utf32ToString)(k,w,v),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(k){let w=!1;if(this._hitLimit)w=!1;else if(k&&(w=this._handler(this._data,this._params),w instanceof Promise))return w.then((v=>(this._params=m,this._data="",this._hitLimit=!1,v)));return this._params=m,this._data="",this._hitLimit=!1,w}}},2015:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.EscapeSequenceParser=i.VT500_TRANSITION_TABLE=i.TransitionTable=void 0;const u=c(844),d=c(8742),_=c(6242),p=c(6351);class m{constructor(b){this.table=new Uint8Array(b)}setDefault(b,x){this.table.fill(b<<4|x)}add(b,x,y,S){this.table[x<<8|b]=y<<4|S}addMany(b,x,y,S){for(let z=0;zN)),x=(A,N)=>b.slice(A,N),y=x(32,127),S=x(0,24);S.push(25),S.push.apply(S,x(28,32));const z=x(0,14);let E;for(E in v.setDefault(1,0),v.addMany(y,0,2,0),z)v.addMany([24,26,153,154],E,3,0),v.addMany(x(128,144),E,3,0),v.addMany(x(144,152),E,3,0),v.add(156,E,0,0),v.add(27,E,11,1),v.add(157,E,4,8),v.addMany([152,158,159],E,0,7),v.add(155,E,11,3),v.add(144,E,11,9);return v.addMany(S,0,3,0),v.addMany(S,1,3,1),v.add(127,1,0,1),v.addMany(S,8,0,8),v.addMany(S,3,3,3),v.add(127,3,0,3),v.addMany(S,4,3,4),v.add(127,4,0,4),v.addMany(S,6,3,6),v.addMany(S,5,3,5),v.add(127,5,0,5),v.addMany(S,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(y,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(x(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(y,7,0,7),v.addMany(S,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(x(64,127),3,7,0),v.addMany(x(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(x(48,60),4,8,4),v.addMany(x(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(x(32,64),6,0,6),v.add(127,6,0,6),v.addMany(x(64,127),6,0,0),v.addMany(x(32,48),3,9,5),v.addMany(x(32,48),5,9,5),v.addMany(x(48,64),5,0,6),v.addMany(x(64,127),5,7,0),v.addMany(x(32,48),4,9,5),v.addMany(x(32,48),1,9,2),v.addMany(x(32,48),2,9,2),v.addMany(x(48,127),2,10,0),v.addMany(x(48,80),1,10,0),v.addMany(x(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(x(96,127),1,10,0),v.add(80,1,11,9),v.addMany(S,9,0,9),v.add(127,9,0,9),v.addMany(x(28,32),9,0,9),v.addMany(x(32,48),9,9,12),v.addMany(x(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(S,11,0,11),v.addMany(x(32,128),11,0,11),v.addMany(x(28,32),11,0,11),v.addMany(S,10,0,10),v.add(127,10,0,10),v.addMany(x(28,32),10,0,10),v.addMany(x(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(x(32,48),10,9,12),v.addMany(S,12,0,12),v.add(127,12,0,12),v.addMany(x(28,32),12,0,12),v.addMany(x(32,48),12,9,12),v.addMany(x(48,64),12,0,11),v.addMany(x(64,127),12,12,13),v.addMany(x(64,127),10,12,13),v.addMany(x(64,127),9,12,13),v.addMany(S,13,13,13),v.addMany(y,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(k,0,2,0),v.add(k,8,5,8),v.add(k,6,0,6),v.add(k,11,0,11),v.add(k,13,13,13),v})();class w extends u.Disposable{constructor(b=i.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new d.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(x,y,S)=>{},this._executeHandlerFb=x=>{},this._csiHandlerFb=(x,y)=>{},this._escHandlerFb=x=>{},this._errorHandlerFb=x=>x,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new _.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,x=[64,126]){let y=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=b.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let z=0;zE||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=E}}if(b.final.length!==1)throw new Error("final must be a single byte");const S=b.final.charCodeAt(0);if(x[0]>S||S>x[1])throw new Error(`final must be in range ${x[0]} .. ${x[1]}`);return y<<=8,y|=S,y}identToString(b){const x=[];for(;b;)x.push(String.fromCharCode(255&b)),b>>=8;return x.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,x){const y=this._identifier(b,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const S=this._escHandlers[y];return S.push(x),{dispose:()=>{const z=S.indexOf(x);z!==-1&&S.splice(z,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,x){this._executeHandlers[b.charCodeAt(0)]=x}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,x){const y=this._identifier(b);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const S=this._csiHandlers[y];return S.push(x),{dispose:()=>{const z=S.indexOf(x);z!==-1&&S.splice(z,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,x){return this._dcsParser.registerHandler(this._identifier(b),x)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,x){return this._oscParser.registerHandler(b,x)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(b,x,y,S,z){this._parseStack.state=b,this._parseStack.handlers=x,this._parseStack.handlerPos=y,this._parseStack.transition=S,this._parseStack.chunkPos=z}parse(b,x,y){let S,z=0,E=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const N=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&M>-1){for(;M>=0&&(S=N[M](this._params),S!==!0);M--)if(S instanceof Promise)return this._parseStack.handlerPos=M,S}this._parseStack.handlers=[];break;case 4:if(y===!1&&M>-1){for(;M>=0&&(S=N[M](),S!==!0);M--)if(S instanceof Promise)return this._parseStack.handlerPos=M,S}this._parseStack.handlers=[];break;case 6:if(z=b[this._parseStack.chunkPos],S=this._dcsParser.unhook(z!==24&&z!==26,y),S)return S;z===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(z=b[this._parseStack.chunkPos],S=this._oscParser.end(z!==24&&z!==26,y),S)return S;z===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let N=A;N>4){case 2:for(let G=N+1;;++G){if(G>=x||(z=b[G])<32||z>126&&z=x||(z=b[G])<32||z>126&&z=x||(z=b[G])<32||z>126&&z=x||(z=b[G])<32||z>126&&z=0&&(S=M[$](this._params),S!==!0);$--)if(S instanceof Promise)return this._preserveStack(3,M,$,E,N),S;$<0&&this._csiHandlerFb(this._collect<<8|z,this._params),this.precedingJoinState=0;break;case 8:do switch(z){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(z-48)}while(++N47&&z<60);N--;break;case 9:this._collect<<=8,this._collect|=z;break;case 10:const D=this._escHandlers[this._collect<<8|z];let I=D?D.length-1:-1;for(;I>=0&&(S=D[I](),S!==!0);I--)if(S instanceof Promise)return this._preserveStack(4,D,I,E,N),S;I<0&&this._escHandlerFb(this._collect<<8|z),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|z,this._params);break;case 13:for(let G=N+1;;++G)if(G>=x||(z=b[G])===24||z===26||z===27||z>127&&z=x||(z=b[G])<32||z>127&&z{Object.defineProperty(i,"__esModule",{value:!0}),i.OscHandler=i.OscParser=void 0;const u=c(5770),d=c(482),_=[];i.OscParser=class{constructor(){this._state=0,this._active=_,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,m){this._handlers[p]===void 0&&(this._handlers[p]=[]);const k=this._handlers[p];return k.push(m),{dispose:()=>{const w=k.indexOf(m);w!==-1&&k.splice(w,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=_,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||_,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,m,k){if(this._active.length)for(let w=this._active.length-1;w>=0;w--)this._active[w].put(p,m,k);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(p,m,k))}start(){this.reset(),this._state=1}put(p,m,k){if(this._state!==3){if(this._state===1)for(;m0&&this._put(p,m,k)}}end(p,m=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let k=!1,w=this._active.length-1,v=!1;if(this._stack.paused&&(w=this._stack.loopPosition-1,k=m,v=this._stack.fallThrough,this._stack.paused=!1),!v&&k===!1){for(;w>=0&&(k=this._active[w].end(p),k!==!0);w--)if(k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!1,k;w--}for(;w>=0;w--)if(k=this._active[w].end(!1),k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!0,k}else this._handlerFb(this._id,"END",p);this._active=_,this._id=-1,this._state=0}}},i.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,m,k){this._hitLimit||(this._data+=(0,d.utf32ToString)(p,m,k),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let m=!1;if(this._hitLimit)m=!1;else if(p&&(m=this._handler(this._data),m instanceof Promise))return m.then((k=>(this._data="",this._hitLimit=!1,k)));return this._data="",this._hitLimit=!1,m}}},8742:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Params=void 0;const c=2147483647;class u{static fromArray(_){const p=new u;if(!_.length)return p;for(let m=Array.isArray(_[0])?1:0;m<_.length;++m){const k=_[m];if(Array.isArray(k))for(let w=0;w256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const _=new u(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_}toArray(){const _=[];for(let p=0;p>8,k=255&this._subParamsIdx[p];k-m>0&&_.push(Array.prototype.slice.call(this._subParams,m,k))}return _}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>c?c:_}}addSubParam(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>c?c:_,this._subParamsIdx[this.length-1]++}}hasSubParams(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0}getSubParams(_){const p=this._subParamsIdx[_]>>8,m=255&this._subParamsIdx[_];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const _={};for(let p=0;p>8,k=255&this._subParamsIdx[p];k-m>0&&(_[p]=this._subParams.slice(m,k))}return _}addDigit(_){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const m=this._digitIsSub?this._subParams:this.params,k=m[p-1];m[p-1]=~k?Math.min(10*k+_,c):_}}i.Params=u},5741:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AddonManager=void 0,i.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const d={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(d),u.dispose=()=>this._wrappedAddonDispose(d),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let d=0;d{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferApiView=void 0;const u=c(3785),d=c(511);i.BufferApiView=class{constructor(_,p){this._buffer=_,this.type=p}init(_){return this._buffer=_,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(_){const p=this._buffer.lines.get(_);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new d.CellData}}},3785:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLineApiView=void 0;const u=c(511);i.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,_){if(!(d<0||d>=this._line.length))return _?(this._line.loadCell(d,_),_):this._line.loadCell(d,new u.CellData)}translateToString(d,_,p){return this._line.translateToString(d,_,p)}}},8285:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferNamespaceApi=void 0;const u=c(8771),d=c(8460),_=c(844);class p extends _.Disposable{constructor(k){super(),this._core=k,this._onBufferChange=this.register(new d.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}i.BufferNamespaceApi=p},7975:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ParserApi=void 0,i.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,(d=>u(d.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((d,_)=>u(d,_.toArray())))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeApi=void 0,i.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(a,i,c){var u=this&&this.__decorate||function(v,b,x,y){var S,z=arguments.length,E=z<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,b,x,y);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(E=(z<3?S(E):z>3?S(b,x,E):S(b,x))||E);return z>3&&E&&Object.defineProperty(b,x,E),E},d=this&&this.__param||function(v,b){return function(x,y){b(x,y,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferService=i.MINIMUM_ROWS=i.MINIMUM_COLS=void 0;const _=c(8460),p=c(844),m=c(5295),k=c(2585);i.MINIMUM_COLS=2,i.MINIMUM_ROWS=1;let w=i.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,i.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,i.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(v,this))}resize(v,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const x=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===v.fg&&y.getBg(0)===v.bg||(y=x.getBlankLine(v,b),this._cachedBlankLine=y),y.isWrapped=b;const S=x.ybase+x.scrollTop,z=x.ybase+x.scrollBottom;if(x.scrollTop===0){const E=x.lines.isFull;z===x.lines.length-1?E?x.lines.recycle().copyFrom(y):x.lines.push(y.clone()):x.lines.splice(z+1,0,y.clone()),E?this.isUserScrolling&&(x.ydisp=Math.max(x.ydisp-1,0)):(x.ybase++,this.isUserScrolling||x.ydisp++)}else{const E=z-S+1;x.lines.shiftElements(S+1,E-1,-1),x.lines.set(z,y.clone())}this.isUserScrolling||(x.ydisp=x.ybase),this._onScroll.fire(x.ydisp)}scrollLines(v,b,x){const y=this.buffer;if(v<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else v+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const S=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+v,y.ybase),0),S!==y.ydisp&&(b||this._onScroll.fire(y.ydisp))}};i.BufferService=w=u([d(0,k.IOptionsService)],w)},7994:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CharsetService=void 0,i.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(a,i,c){var u=this&&this.__decorate||function(y,S,z,E){var A,N=arguments.length,M=N<3?S:E===null?E=Object.getOwnPropertyDescriptor(S,z):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,S,z,E);else for(var $=y.length-1;$>=0;$--)(A=y[$])&&(M=(N<3?A(M):N>3?A(S,z,M):A(S,z))||M);return N>3&&M&&Object.defineProperty(S,z,M),M},d=this&&this.__param||function(y,S){return function(z,E){S(z,E,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreMouseService=void 0;const _=c(2585),p=c(8460),m=c(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function w(y,S){let z=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(z|=64,z|=y.action):(z|=3&y.button,4&y.button&&(z|=64),8&y.button&&(z|=128),y.action===32?z|=32:y.action!==0||S||(z|=3)),z}const v=String.fromCharCode,b={DEFAULT:y=>{const S=[w(y,!1)+32,y.col+32,y.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${v(S[0])}${v(S[1])}${v(S[2])}`},SGR:y=>{const S=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${w(y,!0)};${y.col};${y.row}${S}`},SGR_PIXELS:y=>{const S=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${w(y,!0)};${y.x};${y.y}${S}`}};let x=i.CoreMouseService=class extends m.Disposable{constructor(y,S){super(),this._bufferService=y,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const z of Object.keys(k))this.addProtocol(z,k[z]);for(const z of Object.keys(b))this.addEncoding(z,b[z]);this.reset()}addProtocol(y,S){this._protocols[y]=S}addEncoding(y,S){this._encodings[y]=S}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const S=this._encodings[this._activeEncoding](y);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,S,z){if(z){if(y.x!==S.x||y.y!==S.y)return!1}else if(y.col!==S.col||y.row!==S.row)return!1;return y.button===S.button&&y.action===S.action&&y.ctrl===S.ctrl&&y.alt===S.alt&&y.shift===S.shift}};i.CoreMouseService=x=u([d(0,_.IBufferService),d(1,_.ICoreService)],x)},6975:function(a,i,c){var u=this&&this.__decorate||function(x,y,S,z){var E,A=arguments.length,N=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(x,y,S,z);else for(var M=x.length-1;M>=0;M--)(E=x[M])&&(N=(A<3?E(N):A>3?E(y,S,N):E(y,S))||N);return A>3&&N&&Object.defineProperty(y,S,N),N},d=this&&this.__param||function(x,y){return function(S,z){y(S,z,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreService=void 0;const _=c(1439),p=c(8460),m=c(844),k=c(2585),w=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=i.CoreService=class extends m.Disposable{constructor(x,y,S){super(),this._bufferService=x,this._logService=y,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,_.clone)(w),this.decPrivateModes=(0,_.clone)(v)}reset(){this.modes=(0,_.clone)(w),this.decPrivateModes=(0,_.clone)(v)}triggerDataEvent(x,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${x}"`,(()=>x.split("").map((z=>z.charCodeAt(0))))),this._onData.fire(x)}triggerBinaryEvent(x){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${x}"`,(()=>x.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(x))}};i.CoreService=b=u([d(0,k.IBufferService),d(1,k.ILogService),d(2,k.IOptionsService)],b)},9074:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DecorationService=void 0;const u=c(8055),d=c(8460),_=c(844),p=c(6106);let m=0,k=0;class w extends _.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((x=>x==null?void 0:x.marker.line)),this._onDecorationRegistered=this.register(new d.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new d.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,_.toDisposable)((()=>this.reset())))}registerDecoration(x){if(x.marker.isDisposed)return;const y=new v(x);if(y){const S=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),S.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const x of this._decorations.values())x.dispose();this._decorations.clear()}*getDecorationsAtCell(x,y,S){let z=0,E=0;for(const A of this._decorations.getKeyIterator(y))z=A.options.x??0,E=z+(A.options.width??1),x>=z&&x{m=E.options.x??0,k=m+(E.options.width??1),x>=m&&x{Object.defineProperty(i,"__esModule",{value:!0}),i.InstantiationService=i.ServiceCollection=void 0;const u=c(2585),d=c(8343);class _{constructor(...m){this._entries=new Map;for(const[k,w]of m)this.set(k,w)}set(m,k){const w=this._entries.get(m);return this._entries.set(m,k),w}forEach(m){for(const[k,w]of this._entries.entries())m(k,w)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}i.ServiceCollection=_,i.InstantiationService=class{constructor(){this._services=new _,this._services.set(u.IInstantiationService,this)}setService(p,m){this._services.set(p,m)}getService(p){return this._services.get(p)}createInstance(p,...m){const k=(0,d.getServiceDependencies)(p).sort(((b,x)=>b.index-x.index)),w=[];for(const b of k){const x=this._services.get(b.id);if(!x)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${b.id}.`);w.push(x)}const v=k.length>0?k[0].index:m.length;if(m.length!==v)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${v+1} conflicts with ${m.length} static arguments`);return new p(...m,...w)}}},7866:function(a,i,c){var u=this&&this.__decorate||function(v,b,x,y){var S,z=arguments.length,E=z<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,b,x,y);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(E=(z<3?S(E):z>3?S(b,x,E):S(b,x))||E);return z>3&&E&&Object.defineProperty(b,x,E),E},d=this&&this.__param||function(v,b){return function(x,y){b(x,y,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.traceCall=i.setTraceLogger=i.LogService=void 0;const _=c(844),p=c(2585),m={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let k,w=i.LogService=class extends _.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),k=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let b=0;bJSON.stringify(E))).join(", ")})`);const z=y.apply(this,S);return k.trace(`GlyphRenderer#${y.name} return`,z),z}}},7302:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OptionsService=i.DEFAULT_OPTIONS=void 0;const u=c(8460),d=c(844),_=c(6114);i.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:_.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class m extends d.Disposable{constructor(w){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...i.DEFAULT_OPTIONS};for(const b in w)if(b in v)try{const x=w[b];v[b]=this._sanitizeAndValidateOption(b,x)}catch(x){console.error(x)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,d.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(w,v){return this.onOptionChange((b=>{b===w&&v(this.rawOptions[w])}))}onMultipleOptionChange(w,v){return this.onOptionChange((b=>{w.indexOf(b)!==-1&&v()}))}_setupOptions(){const w=b=>{if(!(b in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(b,x)=>{if(!(b in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);x=this._sanitizeAndValidateOption(b,x),this.rawOptions[b]!==x&&(this.rawOptions[b]=x,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const x={get:w.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,x)}}_sanitizeAndValidateOption(w,v){switch(w){case"cursorStyle":if(v||(v=i.DEFAULT_OPTIONS[w]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${w}`);break;case"wordSeparator":v||(v=i.DEFAULT_OPTIONS[w]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=p.includes(v)?v:i.DEFAULT_OPTIONS[w];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${w} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${w} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${w} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${w} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}i.OptionsService=m},2660:function(a,i,c){var u=this&&this.__decorate||function(m,k,w,v){var b,x=arguments.length,y=x<3?k:v===null?v=Object.getOwnPropertyDescriptor(k,w):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(m,k,w,v);else for(var S=m.length-1;S>=0;S--)(b=m[S])&&(y=(x<3?b(y):x>3?b(k,w,y):b(k,w))||y);return x>3&&y&&Object.defineProperty(k,w,y),y},d=this&&this.__param||function(m,k){return function(w,v){k(w,v,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkService=void 0;const _=c(2585);let p=i.OscLinkService=class{constructor(m){this._bufferService=m,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(m){const k=this._bufferService.buffer;if(m.id===void 0){const S=k.addMarker(k.ybase+k.y),z={data:m,id:this._nextId++,lines:[S]};return S.onDispose((()=>this._removeMarkerFromLink(z,S))),this._dataByLinkId.set(z.id,z),z.id}const w=m,v=this._getEntryIdKey(w),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,k.ybase+k.y),b.id;const x=k.addMarker(k.ybase+k.y),y={id:this._nextId++,key:this._getEntryIdKey(w),data:w,lines:[x]};return x.onDispose((()=>this._removeMarkerFromLink(y,x))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(m,k){const w=this._dataByLinkId.get(m);if(w&&w.lines.every((v=>v.line!==k))){const v=this._bufferService.buffer.addMarker(k);w.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(w,v)))}}getLinkData(m){var k;return(k=this._dataByLinkId.get(m))==null?void 0:k.data}_getEntryIdKey(m){return`${m.id};;${m.uri}`}_removeMarkerFromLink(m,k){const w=m.lines.indexOf(k);w!==-1&&(m.lines.splice(w,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};i.OscLinkService=p=u([d(0,_.IBufferService)],p)},8343:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createDecorator=i.getServiceDependencies=i.serviceRegistry=void 0;const c="di$target",u="di$dependencies";i.serviceRegistry=new Map,i.getServiceDependencies=function(d){return d[u]||[]},i.createDecorator=function(d){if(i.serviceRegistry.has(d))return i.serviceRegistry.get(d);const _=function(p,m,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(w,v,b){v[c]===v?v[u].push({id:w,index:b}):(v[u]=[{id:w,index:b}],v[c]=v)})(_,p,k)};return _.toString=()=>d,i.serviceRegistry.set(d,_),_}},2585:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.IDecorationService=i.IUnicodeService=i.IOscLinkService=i.IOptionsService=i.ILogService=i.LogLevelEnum=i.IInstantiationService=i.ICharsetService=i.ICoreService=i.ICoreMouseService=i.IBufferService=void 0;const u=c(8343);var d;i.IBufferService=(0,u.createDecorator)("BufferService"),i.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),i.ICoreService=(0,u.createDecorator)("CoreService"),i.ICharsetService=(0,u.createDecorator)("CharsetService"),i.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(_){_[_.TRACE=0]="TRACE",_[_.DEBUG=1]="DEBUG",_[_.INFO=2]="INFO",_[_.WARN=3]="WARN",_[_.ERROR=4]="ERROR",_[_.OFF=5]="OFF"})(d||(i.LogLevelEnum=d={})),i.ILogService=(0,u.createDecorator)("LogService"),i.IOptionsService=(0,u.createDecorator)("OptionsService"),i.IOscLinkService=(0,u.createDecorator)("OscLinkService"),i.IUnicodeService=(0,u.createDecorator)("UnicodeService"),i.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeService=void 0;const u=c(8460),d=c(225);class _{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,k,w=!1){return(16777215&m)<<3|(3&k)<<1|(w?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new d.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(m){if(!this._providers[m])throw new Error(`unknown Unicode version "${m}"`);this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)}register(m){this._providers[m.version]=m}wcwidth(m){return this._activeProvider.wcwidth(m)}getStringCellWidth(m){let k=0,w=0;const v=m.length;for(let b=0;b=v)return k+this.wcwidth(x);const z=m.charCodeAt(b);56320<=z&&z<=57343?x=1024*(x-55296)+z-56320+65536:k+=this.wcwidth(z)}const y=this.charProperties(x,w);let S=_.extractWidth(y);_.extractShouldJoin(y)&&(S-=_.extractWidth(w)),k+=S,w=y}return k}charProperties(m,k){return this._activeProvider.charProperties(m,k)}}i.UnicodeService=_}},n={};function s(a){var i=n[a];if(i!==void 0)return i.exports;var c=n[a]={exports:{}};return t[a].call(c.exports,c,c.exports,s),c.exports}var o={};return(()=>{var a=o;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const i=s(9042),c=s(3236),u=s(844),d=s(5741),_=s(8285),p=s(7975),m=s(7090),k=["cols","rows"];class w extends u.Disposable{constructor(b){super(),this._core=this.register(new c.Terminal(b)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const x=S=>this._core.options[S],y=(S,z)=>{this._checkReadonlyOptions(S),this._core.options[S]=z};for(const S in this._core.options){const z={get:x.bind(this,S),set:y.bind(this,S)};Object.defineProperty(this._publicOptions,S,z)}}_checkReadonlyOptions(b){if(k.includes(b))throw new Error(`Option "${b}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new m.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new _.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let x="none";switch(this._core.coreMouseService.activeProtocol){case"X10":x="x10";break;case"VT200":x="vt200";break;case"DRAG":x="drag";break;case"ANY":x="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:x,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const x in b)this._publicOptions[x]=b[x]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,x=!0){this._core.input(b,x)}resize(b,x){this._verifyIntegers(b,x),this._core.resize(b,x)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,x,y){this._verifyIntegers(b,x,y),this._core.select(b,x,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,x){this._verifyIntegers(b,x),this._core.selectLines(b,x)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,x){this._core.write(b,x)}writeln(b,x){this._core.write(b),this._core.write(`\r -`,x)}paste(b){this._core.paste(b)}refresh(b,x){this._verifyIntegers(b,x),this._core.refresh(b,x)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return i}_verifyIntegers(...b){for(const x of b)if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const x of b)if(x&&(x===1/0||isNaN(x)||x%1!=0||x<0))throw new Error("This API only accepts positive integers")}}a.Terminal=w})(),o})()))})(U2)),U2.exports}var ZI=TEn();const REn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function oA(e,r){const t=document.documentElement,n=getComputedStyle(t),s=a=>n.getPropertyValue(r==="app"?`--term-app-${a}`:`--term-${a}`).trim(),o={};if(r==="app"&&t.dataset.theme!=="dark")for(const a of REn){const i=n.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`).trim();i&&(o[a]=i)}return{...o,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function Ay(e,r,t=!1,n="dark"){const s=getComputedStyle(document.documentElement),o=new ZI.Terminal({convertEol:!0,disableStdin:r,cursorBlink:!r,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:oA(r,n)}),a=n==="app"?new MutationObserver(()=>{o.options.theme=oA(o.options.disableStdin??r,n)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const i=new EEn.FitAddon;o.loadAddon(i),t&&o.loadAddon(new AEn.WebLinksAddon((x,y)=>{let S;try{S=new URL(y)}catch{return}(S.protocol==="http:"||S.protocol==="https:")&&window.open(S,"_blank","noopener,noreferrer")}));const c=e.style.overflowY;e.style.overflowY="auto",o.open(e);let u=!0,d=null;const _=()=>{if(d===e.scrollTop){d=null;return}d=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",_);const p=()=>{var N;const x=o.element,y=x==null?void 0:x.querySelector(".xterm-screen"),S=x==null?void 0:x.querySelector(".xterm-viewport");if(!x||!(y instanceof HTMLElement)||!(S instanceof HTMLElement))return;const z=o.buffer.active;let E=Math.max(0,z.baseY+z.cursorY-z.viewportY+1);for(let M=o.rows-1;M>=E;M--)if((N=z.getLine(z.viewportY+M))!=null&&N.translateToString(!0).trim()){E=M+1;break}const A=y.getBoundingClientRect().height;x.style.height=`${Math.max(e.clientHeight,Math.min(E,o.rows)*A/o.rows)}px`,x.style.overflow="hidden",S.style.height=`${A}px`},m=()=>{try{const x=i.proposeDimensions();x&&(o.resize(x.cols,Math.max(x.rows,r?1:40)),p())}catch{}};m();const k=new ResizeObserver(m);k.observe(e);const w=o.onWriteParsed(()=>{var y;const x=u&&o.buffer.active.viewportY===o.buffer.active.baseY;if(p(),x){const S=(y=o.element)==null?void 0:y.querySelector(".xterm-screen");if(S instanceof HTMLElement){const z=(o.buffer.active.cursorY+1)*S.getBoundingClientRect().height/o.rows;e.scrollTop=Math.max(0,z-e.clientHeight),d=e.scrollTop}}}),v=o.onScroll(p),b=x=>{(x.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof r=="string")}function MEn(e){return vd(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||eP(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function OEn(e){return vd(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&eP(e.partitions)&&(e.error===null||typeof e.error=="string")}function $En(e){return!vd(e)||e.type!=="complete"?null:e.backend==="ssh"&&MEn(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&OEn(e.result)?{backend:"slurm",result:e.result}:null}function tP(e){return vd(e)&&e.type==="complete"}function DEn(e){return vd(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function vS({host:e,backend:r,path:t="/api/settings/ssh/connect",active:n=!0,onComplete:s,onError:o}){const a=new URLSearchParams({host:e,backend:r});return f.jsx(Ty,{path:`${t}?${a}`,label:SL({host:Ee(e)}),active:n,onError:o,onComplete:i=>{const c=$En(i);return c?(s(c),!0):!1}})}function LEn({login:e,onComplete:r,onError:t}){return f.jsx(Ty,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:n=>tP(n)?(r(),!0):!1})}function rP({path:e,label:r,className:t="mt-4 overflow-hidden rounded-lg border border-border",heightClass:n="h-80",onComplete:s,onError:o,onClose:a}){const[i,c]=T.useState("running");return f.jsxs("div",{className:t,children:[f.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[f.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:r}),f.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:i==="running"?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{className:"border-t-accent-amber"})," ",Obr()]}):i==="done"?f.jsxs(f.Fragment,{children:[f.jsx(uo,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",hbr()]}):i==="failed"?f.jsxs(f.Fragment,{children:[f.jsx(pn,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",jbr()]}):sbr()}),f.jsx("button",{type:"button",onClick:a,"aria-label":iN(),title:iN(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:f.jsx(pn,{size:14})})]}),f.jsx(Ty,{path:e,label:r,heightClass:n,frame:"bare",palette:"app",shellAfter:!0,onError:(u,d)=>{c("failed"),d&&o(u)},onComplete:u=>tP(u)?(c("done"),s(),!0):!1,onClosed:()=>c(u=>u==="running"?"closed":u)})]})}function Ty({path:e,label:r,command:t,heightClass:n="h-40",frame:s="card",palette:o="dark",shellAfter:a=!1,active:i=!0,awaitingApproval:c=!1,onComplete:u,onError:d,onClosed:_}){const p=T.useRef(null),m=T.useRef(null),k=T.useRef(u),w=T.useRef(d),v=T.useRef(_),[b,x]=T.useState(null);return k.current=u,w.current=d,v.current=_,T.useEffect(()=>{const y=p.current;if(!y)return;const{terminal:S,dispose:z}=Ay(y,c,!0,o);if(m.current=S,c)return t&&S.writeln(`$ ${t}`),()=>{m.current=null,z()};S.focus();const E=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${E}//${location.host}`),N=new WebSocket(A);N.binaryType="arraybuffer";let M=!1,$=!1,D=!1;const I=(Q,K)=>{var J;if($){K||S.writeln(Q);return}$=!0,(!D||a)&&S.writeln(Q),(J=w.current)==null||J.call(w,Q,K),!(a&&!K)&&(S.options.disableStdin=!0,S.blur(),x(Q))},G=S.onData(Q=>{N.readyState===WebSocket.OPEN&&N.send(new TextEncoder().encode(Q))}),H=S.onResize(({cols:Q,rows:K})=>{N.readyState===WebSocket.OPEN&&N.send(JSON.stringify({type:"resize",cols:Q,rows:K}))});return N.onopen=()=>{t&&S.writeln(`$ ${t}`),N.send(JSON.stringify({type:"resize",cols:S.cols,rows:S.rows}))},N.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){D=!0,S.write(new Uint8Array(Q.data));return}if(typeof Q.data!="string")return;let K;try{K=JSON.parse(Q.data)}catch{return}if(k.current(K)){M=!0,a||N.close();return}const J=DEn(K);J&&(M?S.writeln(J):I(J,!a))},N.onerror=()=>I(gb(),!0),N.onclose=()=>{var Q;if(!M&&!$){I(gb(),!0);return}a&&(S.options.disableStdin=!0,S.blur(),(Q=v.current)==null||Q.call(v))},()=>{N.onopen=null,N.onmessage=null,N.onerror=null,N.onclose=null,G.dispose(),H.dispose(),N.close(),m.current=null,z()}},[e,t,c,o,a]),T.useEffect(()=>{const y=m.current;y&&(y.options.disableStdin=c||!i||b!==null,!c&&i&&b===null?y.focus():y.blur())},[i,b,c]),f.jsxs("div",{className:s==="card"?"mt-3":"contents",children:[f.jsx("div",{className:`${n} ${s==="card"?JI:`overflow-hidden p-3 ${o==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":r,children:f.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),b?f.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function IEn({host:e,transcript:r}){const t=T.useRef(null);return T.useEffect(()=>{const n=t.current;if(!n)return;const{terminal:s,dispose:o}=Ay(n,!0,!0);return s.write(r),o},[r]),f.jsx("div",{className:`mt-3 h-40 ${JI}`,role:"group","aria-label":SL({host:Ee(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Cb=null,Lm=0;const nP=()=>Cb;function sP(){const e=Lm;return XI(async(r,t)=>{if(e!==Lm)return;const n=await Qjn(r,t);e===Lm&&Je.setQueryData(f0().queryKey,s=>s?{...s,workspace:n.workspace}:n)},r=>{e===Lm&&tr(r instanceof Error?r.message:String(r),"error",{id:"workspace-save",action:{label:Ks(),onClick:()=>void bS.retry()}})})}let P1=sP();function PEn(){Lm++,Cb=null,P1=sP()}const bS={flush:(e=!1)=>P1.flush(e),retry:()=>P1.retry(),queue(e,r=0){const t=Cb;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Cb=e,P1.queue(e,r))}};window.addEventListener("pagehide",()=>void bS.flush(!0));function Yl(e,r){if(typeof e=="string")return{kind:"home",view:e};if("code"in e)return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};if("kind"in e)return e.kind==="plan"?{kind:"plan",sessionId:e.sessionId,promptId:e.promptId}:e.kind==="side"?{kind:"side",sessionId:e.sessionId}:{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};if("path"in e)return{kind:"file",path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};const t=r===void 0?e.runId:r;return{kind:"experiment",experimentId:e.id,view:e.view,...t?{runId:t}:{}}}function Ki(e){switch(e.kind){case"home":return e.view;case"experiment":return{id:e.experimentId,view:e.view,...e.runId?{runId:e.runId}:{}};case"file":return{path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};case"code":return{code:!0,experimentId:e.experimentId,branch:e.branch,view:e.view,toggled:new Set};case"plan":return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId,plan:""};case"subagent":return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};case"side":return{kind:"side",sessionId:e.sessionId}}}function oP(e,r,t){const n=[];e.filesTabOpen&&n.push("files"),e.terminalTabOpen&&n.push("terminal"),e.artifactsTabOpen&&n.push("artifacts"),e.experimentsTabOpen&&n.push("experiments");const s=[...e.expTabs,...e.fileTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs,...e.codeTabs],o=new Map(s.map(u=>[Bt(u),u])),a=e.contentTabOrder.flatMap(u=>{const d=o.get(u);return d?[d]:[]}),i=Bt(e.rightTab);return{tabs:[...n,...a].map(u=>Yl(u,Bt(u)===i?e.selectedRunId:void 0)),active:e.panelOpen?Yl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Bt(e.previewTab):null,history:e.tabHistory.map(Bt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Bt(u),[...u.toggled]])]),scroll:r,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function BEn(e,r){const t=xS();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const n=[...(e==null?void 0:e.tabs)??[]];if(r){const o=n.findIndex(a=>Bt(Ki(a))===Bt(Ki(r)));o===-1?n.push(r):n[o]=r}for(const o of n){const a=Ki(o);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[Bt(a)])??[]),t.codeTabs.push(a)):"path"in a?t.fileTabs.push(a):"kind"in a?a.kind==="plan"?t.planTabs.push(a):a.kind==="side"?t.sideTabs.push(a):t.subagentTabs.push(a):t.expTabs.push(a),t.contentTabOrder.push(Bt(a))}const s=new Map(n.map(o=>{const a=Ki(o);return[Bt(a),a]}));return t.tabHistory=((e==null?void 0:e.history)??[]).flatMap(o=>{const a=s.get(o);return a?[a]:[]}),t.previewTab=e!=null&&e.previewKey?s.get(e.previewKey)??null:null,t.rightTab=r?Ki(r):e!=null&&e.active?Ki(e.active):"experiments",t.panelOpen=r!==void 0,t.selectedRunId=(r==null?void 0:r.kind)==="experiment"?r.runId??null:null,iP(t,r)}const G2=(e,r)=>e.id===r.id&&e.view===r.view,cf=(e,r)=>e.path===r.path&&(e.source??"repo")===(r.source??"repo")&&e.sessionId===r.sessionId&&e.ref===r.ref,yS=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,lo=(e,r,t)=>`${e}:${r??""}:${yS(t)}`,aP=e=>({...e,lineScrollRequest:void 0});function Kv(e){return typeof e=="object"&&"path"in e?aP(e):e}const nh=(e,r)=>e.branch===r.branch;function Bt(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:e.kind==="side"?`side:${e.sessionId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${yS(e)}`:`experiment:${e.id}:${e.view}`}function wm(e,r){const t=e.filter(n=>Bt(n)!==r);return t.length===e.length?e:t}function FEn(e){return e!==void 0}function xS(e,r=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],sideTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===zh&&r){const n="experiments";return{...t,rightTab:n,tabHistory:[n],experimentsTabOpen:!0,panelOpen:!0}}return t}function wS(e,r){const t=xS(e,r);return t.panelOpen?oP(t,{},{}):void 0}function iP(e,r){if(!r)return e;const t=Ki(r),n=Bt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs].find(c=>Bt(c)===n),o=(c,u)=>{const d=c.findIndex(_=>Bt(_)===n);return d<0?[...c,u]:JSON.stringify(Yl(c[d]))===JSON.stringify(Yl(u))?c:c.map((_,p)=>p===d?{..._,...u}:_)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!0:a.experimentsTabOpen=!0:("path"in t?a.fileTabs=o(e.fileTabs,t):"id"in t?a.expTabs=o(e.expTabs,{...t,runId:r.kind==="experiment"?r.runId:void 0}):"code"in t?a.codeTabs=o(e.codeTabs,{...t,toggled:s&&"code"in s?s.toggled:t.toggled}):t.kind==="plan"?a.planTabs=o(e.planTabs,t):t.kind==="side"?a.sideTabs=o(e.sideTabs,t):a.subagentTabs=o(e.subagentTabs,t),e.contentTabOrder.includes(n)||(a.contentTabOrder=[...e.contentTabOrder,n]));const i=e.tabHistory.at(-1);return i&&Bt(i)===n&&JSON.stringify(Yl(i))===JSON.stringify(Yl(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Bt(c)!==n),t]),a}let Vi=0;const mg=new Map,zb=new Map,R3=new Set,M3=()=>{for(const e of R3)e()},HEn=e=>(R3.add(e),()=>{R3.delete(e)}),gg=new Map,Qi=new Map,cP=e=>Qi.get(e);function qEn(){Vi++,Qi.clear(),gg.clear(),mg.clear(),zb.clear(),M3()}function UEn(e,r){const t=Qi.get(e);if(!(t!=null&&t.tasks.new)||v_(t,r))return;const n=t.tasks.new,s=a=>Object.fromEntries(n.tabs.flatMap(i=>{if(i.kind!=="file")return[];const c=Ki(i);if(typeof c=="string"||!("path"in c))return[];const u=lo(e,null,c);return u in a?[[lo(e,r,c),a[u]]]:[]})),o={...t.tasks,[r]:{...n,scroll:s(n.scroll),sourceModes:s(n.sourceModes)}};delete o.new,gg.set(e,r),Qi.set(e,{...t,tasks:o})}function GEn(e){let r=mg.get(e);if(!r){const t=Vi;r=XI(async(n,s)=>{if(t!==Vi)return;const o=await Vjn(e,n,s);t===Vi&&Je.setQueryData(oS(e).queryKey,o),t===Vi&&zb.delete(e)&&M3()},n=>{t===Vi&&(zb.set(e,n instanceof Error?n.message:String(n)),M3())}),mg.set(e,r)}return r}function W2(e,r,t,n){const s=Qi.get(e);if(!s||t==="new"&&gg.has(e))return;const o=Ny(r)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,i=t?v_(s,t):void 0;if(o===s.lastLocation&&a===s.lastTaskId&&(!n||JSON.stringify(n)===JSON.stringify(i)))return;const c={...s,lastLocation:o,lastTaskId:a,tasks:t&&n?{...s.tasks,[t]:n}:s.tasks},u=i&&n&&o===s.lastLocation&&JSON.stringify({...i,scroll:{},sourceModes:{}})===JSON.stringify({...n,scroll:{},sourceModes:{}});Qi.set(e,c),GEn(e).queue(c,u?250:0)}function aA(e,r,t,n){const s=new Set(e.state.fileTabs.map(d=>lo(t,n==="new"?null:n,d))),o=Object.fromEntries(Object.entries(e.getScroll()).filter(([d])=>s.has(d))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([d])=>s.has(d))),i=oP(e.state,o,a),c=e.pane??(r==null?void 0:r.active),u=c?Bt(Ki(c)):null;return i.active=i.tabs.find(d=>Bt(Ki(d))===u)??null,i}function WEn(e){const{projectId:r,taskKey:t,location:n,pane:s,isTask:o,firstDemoOpen:a,state:i,apply:c,getScroll:u,sourceModes:d,revision:_}=e,p=T.useRef(tA()),m=T.useSyncExternalStore(HEn,()=>r?zb.get(r)??null:null),[k,w]=T.useState(null),[v,b]=T.useState(0),[x,y]=T.useState(null),[S,z]=T.useState(null),E=T.useRef(null),A=T.useRef(null),N=T.useRef(null),M=T.useRef(e);M.current=e;const $=JSON.stringify([r,t,o]),D=JSON.stringify(s??null),I=T.useCallback(()=>{const H=N.current;if(!H)return;const Q=aA({...M.current,state:H.state,pane:H.pane},v_(Qi.get(H.projectId),H.taskKey),H.projectId,H.taskKey);W2(H.projectId,H.location,H.taskKey,Q)},[]);T.useEffect(()=>{let H=!0;const Q=Vi;if(w(null),y(null),!!r)return Qi.has(r)?y(r):Je.fetchQuery(oS(r)).then(K=>{!H||Q!==Vi||(Qi.set(r,K??tA()),y(r))}).catch(K=>{H&&Q===Vi&&w(K instanceof Error?K.message:String(K))}),()=>{H=!1}},[r,v]),T.useLayoutEffect(()=>{if(N.current&&N.current.scope!==$){const K=N.current.projectId;I(),gg.get(K)===t&&gg.delete(K),N.current=null}if(!r||x!==r)return;const H=Qi.get(r);if(!H)return;if(p.current=H,E.current!==$){if(E.current=$,A.current=D,o){const K=v_(H,t)??(Ju(r)?wS(t,a):void 0);c(BEn(K,s),K,!0)}z($);return}if(S!==$)return;let Q=i;A.current!==D&&(A.current=D,o&&s&&(Q=iP(i,s),c(Q,void 0,!1))),o?(W2(r,n,t,aA({state:Q,pane:s,getScroll:u,sourceModes:d},v_(H,t),r,t)),N.current={projectId:r,taskKey:t,scope:$,location:n,pane:s,state:Q}):W2(r,n),p.current=Qi.get(r)??H},[r,t,n,s,D,o,a,i,c,u,d,_,x,$,S,I]),T.useEffect(()=>{const H=Vi,Q=J=>{if(H===Vi){I();for(const ee of mg.values())ee.flush(J)}},K=()=>Q(!0);return window.addEventListener("pagehide",K),()=>{window.removeEventListener("pagehide",K),Q(!1)}},[I]);const G=T.useCallback(()=>{var H;r&&(k?b(Q=>Q+1):(H=mg.get(r))==null||H.retry())},[r,k]);return{ready:r===null||x===r&&S===$,loaded:r===null||x===r,error:k??m,retry:G,capture:I,workspace:p}}const KEn="data:image/svg+xml,"+encodeURIComponent(''),O3=T.createContext(null);function VEn(e){var r;return e.kind==="local"?"local":`${e.session.id}:${((r=e.session.installPaths)==null?void 0:r.database)??""}`}function lP(){const e=T.useContext(O3);if(!e)throw new Error("Runtime is not connected");return e}function QEn(e){const r=document.querySelector('link[rel="icon"]');r&&(r.href=e?KEn:"/favicon.svg")}function iA(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function XEn(e){if(e.kind!=="ssh")return;const{theme:r,locale:t}=e.session.uiPreferences;!iA("orx:theme")&&(r==="light"||r==="dark"||r==="system")&&hI(r),!iA("orx:locale")&&t&&lD(t)&&_I(t)}function YEn(e){return e.includes("ssh ")&&e.includes("failed")}function cA({host:e,overlay:r=!1}){return f.jsx("div",{className:r?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:ZD({host:Ee(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:J4()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:Fir()})]})})}function lA({runtime:e,overlay:r=!1,retriedInteractiveError:t,setRetriedInteractiveError:n}){var M,$,D;const{session:s}=e,[o,a]=T.useState(s.installPaths),[i,c]=T.useState(!1),[u,d]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,($=s.installPaths)==null?void 0:$.database,(D=s.installPaths)==null?void 0:D.cache]);async function _(){if(o){c(!0);try{await _6n(o)}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}}async function p(I=!1){n(I?s.error:null),c(!0);try{await f6n()}catch(G){tr(G instanceof Error?G.message:String(G),"error")}finally{c(!1)}}async function m(){c(!0);try{await KL()}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}async function k(){c(!0);try{d(await VL())}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}async function w(){if(u){c(!0);try{await QL(u),d(null)}catch(I){d(null),tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}}async function v(){c(!0);try{await d6n()}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}const b=s.status==="applying"||i,x=s.status==="needsInstall",y=s.status==="needsUpdate",S=o&&x,z=["connecting","applying","reconnecting"].includes(s.status),E=s.status==="disconnected"&&s.error!==null&&YEn(s.error)&&t!==s.error&&!s.canStartNewHost,A=x?Kcr():y?Ehr():s.status==="applying"?wor({host:Ee(s.host)}):s.status==="reconnecting"?Iur({host:Ee(s.host)}):s.status==="disconnected"?s.error?Tir({host:Ee(s.host)}):s.canStartNewHost?icr({host:Ee(s.host)}):ZD({host:Ee(s.host)}):gar({host:Ee(s.host)}),N=s.error??(s.canStartNewHost?Yir():x?klr({user:Ee(s.user??""),host:Ee(s.host)}):y?vhr({host:Ee(s.host)}):s.status==="applying"?_or():s.status==="reconnecting"?Eur():s.status==="disconnected"?fir():iar());return f.jsxs(f.Fragment,{children:[f.jsx("main",{className:r?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[z&&f.jsx(Nt,{className:"mt-2"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:A}),!E&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:N})]})]}),E&&f.jsx(vS,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),S&&f.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[f.jsx("p",{className:"m-0 text-sm text-subtext",children:Lcr()}),[["binary",gcr()],["database",zcr()]].map(([I,G])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[G,f.jsx(Nn,{value:o[I],onChange:H=>a({...o,[I]:H.target.value}),disabled:b,dir:"ltr"})]},I)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx(Oe,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",nlr()]}):y?nN():_L()})})]}),y&&o&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx(Oe,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",Ihr()]}):nN()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void v(),children:[i?f.jsx(Nt,{}):null,s.error?tN():f_r()]}):f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void p(),children:[i?f.jsx(Nt,{}):null,tN()]})}),(s.status==="connecting"||s.status==="reconnecting")&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:f.jsx(Oe,{disabled:i,onClick:()=>void m(),children:s3()})}),y&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx(Oe,{disabled:i,onClick:()=>void m(),children:s3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[i?f.jsx(Nt,{}):null,eN()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid k(),children:[i?f.jsx(Nt,{}):null,JD()]})]}),x&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void p(),children:[i?f.jsx(Nt,{}):null,eN()]})})]})}),u&&f.jsx(MI,{host:s.host,preview:u,currentClientAttached:!1,stopping:i,onClose:()=>{i||d(null)},onConfirm:()=>void w()})]})}function ZEn({children:e}){const r=T.useRef(null);return T.useEffect(()=>{var t;return(t=r.current)==null?void 0:t.focus()},[]),f.jsx("div",{ref:r,role:"alertdialog","aria-modal":"true","aria-labelledby":"remote-setup-title",tabIndex:-1,className:"absolute inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-6",children:e})}function JEn(){const e=cu();T.useSyncExternalStore(P8,fV),T.useEffect(()=>P8(()=>{PEn(),qEn()}),[]);const r=gX({select:w=>w.pathname==="/remote-launch"}),[t,n]=T.useState(null),[s,o]=T.useState(null),a=T.useRef(!1),i=T.useRef(!1),c=T.useRef(!1),u=T.useRef(null),[d,_]=T.useState(null),p=dt({...OCn(),enabled:!r,refetchInterval:w=>{var v;return w.state.status==="error"||((v=w.state.data)==null?void 0:v.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(dt({...WCn(e),enabled:!r&&((t==null?void 0:t.kind)==="local"||(t==null?void 0:t.kind)==="ssh"&&t.session.status==="connected")}),T.useEffect(()=>{var b,x;if(r)return;const w=p.data;if(!w){o(((b=p.error)==null?void 0:b.message)??null);return}const v=VEn(w);dV(v),u.current!==null&&u.current!==v&&(a.current=!1,i.current=!1,c.current=!1),u.current=v,w.kind==="ssh"&&(c.current||(c.current=!0,XEn(w)),w.session.status==="connected"?(a.current=!0,i.current=!0,_(null)):w.session.status==="disconnected"&&w.session.error===null&&(i.current=!1)),n(w),o(((x=p.error)==null?void 0:x.message)??null)},[r,p.data,p.error]),T.useEffect(()=>{const w=(t==null?void 0:t.kind)==="ssh";QEn(w),w&&(!a.current||t.session.status==="disconnected"&&!t.session.error)&&(document.title="OpenResearch")},[t]),r)return f.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[f.jsx(Nt,{})," ",lur()]});if(!t)return f.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:s?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:s}),f.jsx(Oe,{onClick:()=>location.reload(),children:Ks()})]}):f.jsx(Nt,{})});if(t.kind==="local")return f.jsxs(O3,{value:t,children:[f.jsx(DN,{}),f.jsx(lg,{})]},Si()[1]);if(!(i.current&&(t.session.status!=="disconnected"||t.session.error!==null))&&t.session.status!=="connected")return s?f.jsx(cA,{host:t.session.host}):f.jsx(lA,{runtime:t,retriedInteractiveError:d,setRetriedInteractiveError:_});const k=t.session.status!=="connected"||s!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:k,children:f.jsxs(O3,{value:t,children:[f.jsx(DN,{}),f.jsx(lg,{})]},Si()[1])}),k&&f.jsx(ZEn,{children:s?f.jsx(cA,{host:t.session.host,overlay:!0}):f.jsx(lA,{runtime:t,overlay:!0,retriedInteractiveError:d,setRetriedInteractiveError:_})})]})}const Ry=eX()({component:JEn}),kS="orx:demo-read-sessions";function uP(){try{const e=JSON.parse(sessionStorage.getItem(kS)??"[]");return new Set(Array.isArray(e)?e.filter(r=>typeof r=="string"):[])}catch{return new Set}}function eNn(e){try{const r=uP();r.add(e),sessionStorage.setItem(kS,JSON.stringify([...r]))}catch{}}function tNn(){try{sessionStorage.removeItem(kS)}catch{}}function _P(e,r){const t=Zf(e.split("?")[0]);return!!(t&&(!t.sessionId||r.some(n=>n.id===t.sessionId&&n.projectId===t.projectId)))}async function rNn(e=Je){var a;const[r,t]=await Promise.all([e.fetchQuery(f0()),e.fetchQuery(Vf())]),n=Ny((a=nP()??r.workspace)==null?void 0:a.lastLocation),s=()=>t[0]?fP(t[0].id,e):Promise.resolve("/projects");if(!n)return s();const o=Zf(n.split("?")[0]);return!(o!=null&&o.projectId)||!t.some(i=>i.id===o.projectId)||o.sessionId&&!_P(n,await e.fetchQuery(So(o.projectId)))?s():n}async function fP(e,r=Je){var d;const[t,n]=await Promise.all([r.fetchQuery(oS(e)),r.fetchQuery(So(e))]),s=cP(e)??t,o=Ny(s==null?void 0:s.lastLocation);if(o&&((d=Zf(o.split("?")[0]))==null?void 0:d.projectId)===e&&_P(o,n))return o;const a=n.find(_=>!_.archived&&!_.sideParentSessionId),i=Ju(e)?wS(a==null?void 0:a.id,!(await r.fetchQuery(f0())).tourCompleted):void 0,c=v_(s,(a==null?void 0:a.id)??"new"),u=c?c.active:i==null?void 0:i.active;return I1(e,(a==null?void 0:a.id)??null,u)}function My(){return f.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function K2(){return f.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[f.jsx(My,{}),"OpenResearch"]})}const uA="inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text";function nNn({cmd:e,onRun:r}){const[t,n]=T.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),r&&f.jsx("button",{type:"button",className:`cmd-inline-run ${uA}`,onClick:r,"aria-label":z9({value:Ee(e)}),title:z9({value:Ee(e)}),children:f.jsx(Y9n,{size:11})}),f.jsx("button",{type:"button",className:`cmd-inline-copy ${uA}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),1500)}).catch(()=>{})},"aria-label":t?qf():hZ({value:Ee(e)}),title:t?qf():Uj(),children:t?f.jsx(uo,{size:11,strokeWidth:3}):f.jsx(hd,{size:11})})]})}function x_(e,r){return e?e.split(/`([^`]+)`/).map((t,n)=>n%2===1?f.jsx(nNn,{cmd:t,onRun:r!=null&&r.canRun(t)?()=>r.onRun(t):void 0},n):t):null}function m0(e){if(e.id!=="claude-code")return null;switch(e.authProvider){case"bedrock":return"Amazon Bedrock";case"vertex":return"Google Vertex AI";case"foundry":return"Microsoft Foundry";case"firstParty":return null;default:return e.authProvider??null}}function sp({harness:e,size:r=16}){const t="block shrink-0";return e==="claude-code"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:f.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):e==="opencode"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?f.jsxs("svg",{className:t,width:r,height:r,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[f.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),f.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),f.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),f.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),f.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:f.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):f.jsx("svg",{className:t,width:r,height:r,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z"})})}function $3(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function sNn(e,r){return e.needsConfigRepair?"error":r==="login"?"running":"preview"}function _A(e,r){return r||e==="preview"}function oNn(e,r){if(!e||e.needsConfigRepair)return null;const t=$3(e);return t===r?null:t}function dP({harness:e,commands:r,onReady:t,onClose:n}){const s=T.useRef(null),o=T.useRef(!1),[a,i]=T.useState(()=>$3(e)),[c,u]=T.useState(0),[d,_]=T.useState(()=>sNn(e,$3(e))),[p,m]=T.useState(d==="running"),[k,w]=T.useState(e.needsConfigRepair),[v,b]=T.useState(e.needsConfigRepair?e.agentNote??null:null),x=d==="running"||d==="checking",y=r[a].includes(` -`)?void 0:r[a];T.useEffect(()=>{o.current=!1;const z=s.current;return z==null||z.showModal(),()=>{o.current=!0,z==null||z.close()}},[]);const S=async(z=!0)=>{_("checking"),b(null);try{const E=z?await Kf(!0,!0):await nI();if(o.current)return;const A=E.find(N=>N.id===e.id);if(w((A==null?void 0:A.needsConfigRepair)??!1),A!=null&&A.agentReady&&(a!=="login"||A.authenticated))t==null||t(A),_("success"),e.id==="antigravity"&&a==="login"&&n();else if(a!=="login"&&(A!=null&&A.installed)&&!A.installBroken&&!A.needsConfigRepair&&A.authState==="needsLogin")i("login"),m(!0),_("running");else if(z){const N=oNn(A,a);N&&(i(N),m(!1)),b((A==null?void 0:A.agentNote)??LD()),_("error")}else return S(!0)}catch(E){if(o.current)return;b(E instanceof Error?E.message:String(E)),_("error")}};return f.jsxs("dialog",{ref:s,className:"m-auto w-180 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"harness-setup-title",onKeyDown:z=>{z.key==="Escape"&&x&&z.preventDefault()},onCancel:z=>{z.preventDefault(),x||n()},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(sp,{harness:e.id,size:26}),f.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:NE({agent:e.name})})]}),d==="preview"?f.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?Lxt({agent:e.name}):m2t({agent:e.name})}):y&&_A(d,p)?f.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:x_(Fwt({command:y}))}):null,d!=="running"&&d!=="preview"&&f.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[d==="checking"&&f.jsx(Nt,{}),d==="success"?cxt({agent:e.name}):d==="error"?$D():Zyt()]}),a==="install"&&r.requiresNpm&&f.jsx("p",{className:"text-sm text-subtext",children:Twt()}),_A(d,p)&&f.jsx(Ty,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:NE({agent:e.name}),command:y,heightClass:"h-96",active:d==="running",awaitingApproval:d==="preview",onComplete:z=>typeof z!="object"||z===null||!("type"in z)||z.type!=="complete"?!1:(S(!1),!0),onError:z=>{b(z),_("error")}},`${a}-${c}`),v&&f.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:x_(v)}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[d==="error"&&f.jsx(Oe,{variant:"ghost",onClick:()=>{b(null),S()},children:hb()}),d==="error"&&!k&&f.jsx(Oe,{onClick:()=>{b(null),m(!0),_("running"),u(z=>z+1)},children:Ks()}),f.jsx(Oe,{variant:d==="success"?"primary":"default",onClick:n,children:d==="success"?NL():x?Hyt():fg()}),d==="preview"&&f.jsx(Oe,{variant:"primary",onClick:()=>{m(!0),_("running")},children:Ryt()})]})]})}const aNn=600,fA=700,D3=1300,hP=900,V2=2.6,Vv=.06;function iNn(e){if(e{const t=r.current,n=t==null?void 0:t.getContext("2d");if(!t||!n||matchMedia("(prefers-reduced-motion: reduce)").matches)return;const s=Array.from({length:aNn},()=>dA());let o=0,a=0;const i=()=>{const p=window.devicePixelRatio||1;o=t.clientWidth,a=t.clientHeight,t.width=o*p,t.height=a*p,n.setTransform(p,0,0,p,0,0)};i(),window.addEventListener("resize",i);const c=performance.now();let u=c,d=0;const _=p=>{if(p-c>D3+hP&&p-u<33){d=requestAnimationFrame(_);return}const m=Math.min(p-u,50)/1e3;u=p;const k=iNn(p-c),w=getComputedStyle(document.documentElement),v=w.getPropertyValue("--text"),b=w.getPropertyValue("--primary"),x=o/2,y=a/2,S=Math.max(o,a)*.5,z=Math.min(.6,k*.12);n.clearRect(0,0,o,a),n.lineCap="round";for(const E of s){E.z-=k*m,E.z<=.02&&Object.assign(E,dA(1));const A=x+E.x/E.z*S,N=y+E.y/E.z*S,M=E.z+z,$=x+E.x/M*S,D=y+E.y/M*S,I=1-E.z;n.globalAlpha=Math.min(1,I*1.4)*(E.tinted?1:.8),n.strokeStyle=E.tinted?b:v,n.lineWidth=.6+I*2.2,n.beginPath(),n.moveTo($,D),n.lineTo(A+.01,N),n.stroke()}d=requestAnimationFrame(_)};return d=requestAnimationFrame(_),()=>{cancelAnimationFrame(d),window.removeEventListener("resize",i)}},[]),f.jsx("canvas",{ref:r,"aria-hidden":"true",className:e})}const lNn={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function vg({variant:e="list",className:r,...t}){return f.jsx("span",{className:Ls("title",lNn[e],r),...t})}const hA=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),h_=["onb-card-meta text-sm text-subtext [&_code]:font-mono","[&_code]:text-xs [&_code]:bg-surface","[&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs","[&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap"].join(" "),Im=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),pP=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),uNn=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),_Nn=[{id:"AI/ML",label:XDt},{id:"Biology",label:aLt},{id:"Physics",label:CLt},{id:"Other",label:mLt}],fNn=["welcome","environment","profile"];function dNn({onDone:e,preferredAgent:r,remote:t}){var Ie,Ye;const n=mr({mutationFn:Ae=>Yjn(...Ae)}),[s,o]=T.useState(0);T.useEffect(()=>{const Ae=fNn[s];Ae&&e_({name:"onboarding_step_viewed",step:Ae})},[s]);const a=dt(su()),i=dt(Vm()),c=dt(nS()),[u,d]=T.useState(null),[_,p]=T.useState(!1),m=T.useRef(null),k=T.useRef(""),w=T.useRef(null),v=T.useRef(!1);T.useEffect(()=>()=>{var Ae;return(Ae=m.current)==null?void 0:Ae.close()},[]);const b=a.data??null,x=(Ie=i.data)==null?void 0:Ie.gitVersion,y=!t&&((Ye=i.data)==null?void 0:Ye.gitInstallable)===!0,[S,z]=T.useState(!1),[E,A]=T.useState(null),[N,M]=T.useState(""),[$,D]=T.useState(null),[I,G]=T.useState(!1),[H,Q]=T.useState([]),[K,J]=T.useState(""),[ee,P]=T.useState(""),[L,F]=T.useState([]),[q,U]=T.useState(""),[oe,ie]=T.useState([]),[ce,re]=T.useState(!1),W=T.useRef(0),[ae,le]=T.useState(!1),[me,be]=T.useState(!1),Se=(b==null?void 0:b.some(Ae=>Ae.agentReady&&!Ae.catalogPending))??!1,Be=(b==null?void 0:b.some(Ae=>Ae.catalogPending))??!1,Xe=x!=null,Me=T.useRef(0),Fe=(Ae,Ve=!1)=>{const Ze=++Me.current;G(!0),le(!1),be(!1);const at=()=>Ze===Me.current;Promise.allSettled([Kf(Ae,Ve),Je.fetchQuery({...Vm(),staleTime:Ae?0:3e4})]).then(([At,Pe])=>{at()&&(At.status==="rejected"&&le(!0),Pe.status==="rejected"&&be(!0))}).finally(()=>at()&&G(!1))};T.useEffect(()=>Fe(!1),[]);const pt=mr({mutationFn:Jjn,onSuccess:()=>Fe(!0)}),Ct=f.jsx(vNn,{pending:pt.isPending,error:pt.error,disabled:I,onInstall:()=>pt.mutate()});T.useEffect(()=>{if(b===null)return;const Ae=b.filter(Ve=>Ve.agentReady&&!Ve.catalogPending);D(Ve=>{var at;if(Ve&&Ae.some(At=>At.id===Ve))return Ve;const Ze=r&&Ae.find(At=>At.id===r.harness);return(Ze==null?void 0:Ze.id)??((at=Ae[0])==null?void 0:at.id)??null})},[b,r]),T.useEffect(()=>le(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>be(i.isError),[i.isError,i.dataUpdatedAt]),T.useEffect(()=>{Je.fetchQuery(DCn()).then(Ae=>{Q(Ae.researchAreas),J(Ae.otherArea??""),P(Ae.background??""),F(Ae.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const Ae=q.trim();if(Ae.length<3){ie([]),re(!1);return}const Ve=++W.current;re(!0);const Ze=setTimeout(()=>{Je.fetchQuery(uI(Ae)).then(at=>Ve===W.current&&ie(at)).catch(()=>Ve===W.current&&ie([])).finally(()=>Ve===W.current&&re(!1))},350);return()=>clearTimeout(Ze)},[q]);const Vt=Ae=>{const Ve=L.some(Ze=>Ze.paperId===Ae.paperId);F(Ze=>Ze.some(at=>at.paperId===Ae.paperId)?Ze:[...Ze,{paperId:Ae.paperId,title:pA(Ae.title)}]),U(""),ie([]),Ve||Je.fetchQuery(S3(Ae.paperId)).then(Ze=>{var At;const at=(At=Ze.title)==null?void 0:At.trim();at&&F(Pe=>Pe.map(Jt=>Jt.paperId===Ae.paperId?{...Jt,title:at}:Jt))}).catch(()=>{})},Ut=Ae=>F(Ve=>Ve.filter(Ze=>Ze.paperId!==Ae)),Gt=Ae=>{Q(Ve=>Ve.includes(Ae)?Ve.filter(Ze=>Ze!==Ae):[...Ve,Ae])},De=H.length>0&&(!H.includes("Other")||K.trim().length>0),ct=()=>{if(w.current)return w.current;k.current="",v.current=!0,p(!0);const Ae=(async()=>{await new Promise((at,At)=>{const Pe=location.protocol==="https:"?"wss:":"ws:",Jt=new WebSocket(`${Pe}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);Jt.binaryType="arraybuffer";const Tt=new TextDecoder,Zr=new ZI.Terminal;Zr.onData(nr=>{Jt.readyState===WebSocket.OPEN&&Jt.send(new TextEncoder().encode(nr))}),m.current=Jt;let cr=!1;Jt.onmessage=nr=>{if(nr.data instanceof ArrayBuffer){Zr.write(new Uint8Array(nr.data)),k.current=(k.current+Tt.decode(nr.data,{stream:!0})).slice(-65536);return}if(typeof nr.data!="string")return;let Wt;try{Wt=JSON.parse(nr.data)}catch{return}typeof Wt!="object"||Wt===null||!("type"in Wt)||(Wt.type==="complete"?(cr=!0,Jt.close(),at()):Wt.type==="error"&&(Jt.close(),At(new Error("error"in Wt&&typeof Wt.error=="string"?Wt.error:$D()))))},Jt.onerror=()=>{Jt.close(),At(new Error(gb()))},Jt.onclose=()=>{Zr.dispose(),m.current=null,cr||At(new Error(gb()))}});const Ze=(await Kf(!0,!0)).find(at=>at.id==="opencode"&&at.agentReady);if(!Ze)throw new Error(PHt());return D("opencode"),Ze})();return w.current=Ae,Ae.catch(()=>{}),Ae};T.useEffect(()=>{t||v.current||!(b!=null&&b.length)||b.some(Ae=>Ae.catalogPending)||!b.every(Ae=>!Ae.installed&&!Ae.installBroken)||ct()},[b,t]),T.useEffect(()=>{s===1&&_&&o(2)},[s,_]);const lt=()=>{o(_?2:1)},xe=async(Ae="complete")=>{var Ve;if(!(S||Ae==="complete"&&(!De||!Xe))){z(!0),A(null),M("");try{const Ze=_?await ct():b==null?void 0:b.find(Pe=>Pe.id===$&&Pe.agentReady&&!Pe.catalogPending);if(!Ze)throw new Error(LD());if(Ae==="setup")return;const at=pNn(Ze,((Ve=Ze.models[0])==null?void 0:Ve.id)??null),At=await n.mutateAsync([at,{researchAreas:H,otherArea:H.includes("Other")?K:null,background:ee||null,papers:L}]);e(At.project,At.selection)}catch(Ze){_&&(w.current=null);const at=Ze instanceof Error?Ze.message:String(Ze);A(at),M([k.current,at].filter(Boolean).join(` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(E){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&E&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(E){const M=this._getMouseBufferCoords(E),$=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!!($&&D&&M)&&this._areCoordsInSelection(M,$,D)}isCellInSelection(E,M){const $=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!$||!D)&&this._areCoordsInSelection([E,M],$,D)}_areCoordsInSelection(E,M,$){return E[1]>M[1]&&E[1]<$[1]||M[1]===$[1]&&E[1]===M[1]&&E[0]>=M[0]&&E[0]<$[0]||M[1]<$[1]&&E[1]===$[1]&&E[0]<$[0]||M[1]<$[1]&&E[1]===M[1]&&E[0]>=M[0]}_selectWordAtCursor(E,M){var I,G;const $=(G=(I=this._linkifier.currentLink)==null?void 0:I.link)==null?void 0:G.range;if($)return this._model.selectionStart=[$.start.x-1,$.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)($,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const D=this._getMouseBufferCoords(E);return!!D&&(this._selectWordAt(D,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(E,M){this._model.clearSelection(),E=Math.max(E,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,E],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(E){this._model.handleTrim(E)&&this.refresh()}_getMouseBufferCoords(E){const M=this._mouseService.getCoords(E,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(E){let M=(0,_.getCoordsRelativeToElement)(this._coreBrowserService.window,E,this._screenElement)[1];const $=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=$?0:(M>$&&(M-=$),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(E){return b.isMac?E.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:E.shiftKey}handleMouseDown(E){if(this._mouseDownTimeStamp=E.timeStamp,(E.button!==2||!this.hasSelection)&&E.button===0){if(!this._enabled){if(!this.shouldForceSelection(E))return;E.stopPropagation()}E.preventDefault(),this._dragScrollAmount=0,this._enabled&&E.shiftKey?this._handleIncrementalClick(E):E.detail===1?this._handleSingleClick(E):E.detail===2?this._handleDoubleClick(E):E.detail===3&&this._handleTripleClick(E),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(E){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(E))}_handleSingleClick(E){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(E)?3:0,this._model.selectionStart=this._getMouseBufferCoords(E),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const M=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);M&&M.length!==this._model.selectionStart[0]&&M.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(E){this._selectWordAtCursor(E,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(E){const M=this._getMouseBufferCoords(E);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(E){return E.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(E){if(E.stopImmediatePropagation(),!this._model.selectionStart)return;const M=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(E),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const $=this._bufferService.buffer;if(this._model.selectionEnd[1]<$.lines.length){const D=$.lines.get(this._model.selectionEnd[1]);D&&D.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(E.ydisp+this._bufferService.rows,E.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=E.ydisp),this.refresh()}}_handleMouseUp(E){const M=E.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&E.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const $=this._mouseService.getCoords(E,this._element,this._bufferService.cols,this._bufferService.rows,!1);if($&&$[0]!==void 0&&$[1]!==void 0){const D=(0,p.moveToCellSequence)($[0]-1,$[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(D,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const E=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,$=!(!E||!M||E[0]===M[0]&&E[1]===M[1]);$?E&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&E[0]===this._oldSelectionStart[0]&&E[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(E,M,$)):this._oldHasSelection&&this._fireOnSelectionChange(E,M,$)}_fireOnSelectionChange(E,M,$){this._oldSelectionStart=E,this._oldSelectionEnd=M,this._oldHasSelection=$,this._onSelectionChange.fire()}_handleBufferActivate(E){this.clearSelection(),this._trimListener.dispose(),this._trimListener=E.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(E,M){let $=M;for(let D=0;M>=D;D++){const I=E.loadCell(D,this._workCell).getChars().length;this._workCell.getWidth()===0?$--:I>1&&M!==D&&($+=I-1)}return $}setSelection(E,M,$){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[E,M],this._model.selectionStartLength=$,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(E){this._isClickInSelection(E)||(this._selectWordAtCursor(E,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(E,M,$=!0,D=!0){if(E[0]>=this._bufferService.cols)return;const I=this._bufferService.buffer,G=I.lines.get(E[1]);if(!G)return;const H=I.translateBufferLineToString(E[1],!1);let Q=this._convertViewportColToCharacterIndex(G,E[0]),K=Q;const J=E[0]-Q;let ee=0,P=0,L=0,F=0;if(H.charAt(Q)===" "){for(;Q>0&&H.charAt(Q-1)===" ";)Q--;for(;K1&&(F+=ce-1,K+=ce-1);oe>0&&Q>0&&!this._isCharWordSeparator(G.loadCell(oe-1,this._workCell));){G.loadCell(oe-1,this._workCell);const re=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,oe--):re>1&&(L+=re-1,Q-=re-1),Q--,oe--}for(;ie1&&(F+=re-1,K+=re-1),K++,ie++}}K++;let q=Q+J-ee+L,U=Math.min(this._bufferService.cols,K-Q+ee+P-L-F);if(M||H.slice(Q,K).trim()!==""){if($&&q===0&&G.getCodePoint(0)!==32){const oe=I.lines.get(E[1]-1);if(oe&&G.isWrapped&&oe.getCodePoint(this._bufferService.cols-1)!==32){const ie=this._getWordAt([this._bufferService.cols-1,E[1]-1],!1,!0,!1);if(ie){const ce=this._bufferService.cols-ie.start;q-=ce,U+=ce}}}if(D&&q+U===this._bufferService.cols&&G.getCodePoint(this._bufferService.cols-1)!==32){const oe=I.lines.get(E[1]+1);if(oe!=null&&oe.isWrapped&&oe.getCodePoint(0)!==32){const ie=this._getWordAt([0,E[1]+1],!1,!1,!0);ie&&(U+=ie.length)}}return{start:q,length:U}}}_selectWordAt(E,M){const $=this._getWordAt(E,M);if($){for(;$.start<0;)$.start+=this._bufferService.cols,E[1]--;this._model.selectionStart=[$.start,E[1]],this._model.selectionStartLength=$.length}}_selectToWordAt(E){const M=this._getWordAt(E,!0);if(M){let $=E[1];for(;M.start<0;)M.start+=this._bufferService.cols,$--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,$++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,$]}}_isCharWordSeparator(E){return E.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(E.getChars())>=0}_selectLineAt(E){const M=this._bufferService.buffer.getWrappedRangeForLine(E),$={start:{x:0,y:M.first},end:{x:this._bufferService.cols-1,y:M.last}};this._model.selectionStart=[0,M.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,w.getRangeLength)($,this._bufferService.cols)}};i.SelectionService=A=u([d(3,S.IBufferService),d(4,S.ICoreService),d(5,k.IMouseService),d(6,S.IOptionsService),d(7,k.IRenderService),d(8,k.ICoreBrowserService)],A)},4725:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ILinkProviderService=i.IThemeService=i.ICharacterJoinerService=i.ISelectionService=i.IRenderService=i.IMouseService=i.ICoreBrowserService=i.ICharSizeService=void 0;const u=c(8343);i.ICharSizeService=(0,u.createDecorator)("CharSizeService"),i.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),i.IMouseService=(0,u.createDecorator)("MouseService"),i.IRenderService=(0,u.createDecorator)("RenderService"),i.ISelectionService=(0,u.createDecorator)("SelectionService"),i.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),i.IThemeService=(0,u.createDecorator)("ThemeService"),i.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(a,i,c){var u=this&&this.__decorate||function(A,E,M,$){var D,I=arguments.length,G=I<3?E:$===null?$=Object.getOwnPropertyDescriptor(E,M):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(A,E,M,$);else for(var H=A.length-1;H>=0;H--)(D=A[H])&&(G=(I<3?D(G):I>3?D(E,M,G):D(E,M))||G);return I>3&&G&&Object.defineProperty(E,M,G),G},d=this&&this.__param||function(A,E){return function(M,$){E(M,$,A)}};Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeService=i.DEFAULT_ANSI_COLORS=void 0;const _=c(7239),p=c(8055),m=c(8460),k=c(844),x=c(2585),v=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),w=p.css.toColor("#ffffff"),y=p.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};i.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],E=[0,95,135,175,215,255];for(let M=0;M<216;M++){const $=E[M/36%6|0],D=E[M/6%6|0],I=E[M%6];A.push({css:p.channels.toCss($,D,I),rgba:p.channels.toRgba($,D,I)})}for(let M=0;M<24;M++){const $=8+10*M;A.push({css:p.channels.toCss($,$,$),rgba:p.channels.toRgba($,$,$)})}return A})());let z=i.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new _.ColorContrastCache,this._halfContrastCache=new _.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:b,cursor:w,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:p.color.blend(b,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:p.color.blend(b,S),ansi:i.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(A={}){const E=this._colors;if(E.foreground=N(A.foreground,v),E.background=N(A.background,b),E.cursor=N(A.cursor,w),E.cursorAccent=N(A.cursorAccent,y),E.selectionBackgroundTransparent=N(A.selectionBackground,S),E.selectionBackgroundOpaque=p.color.blend(E.background,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundTransparent=N(A.selectionInactiveBackground,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundOpaque=p.color.blend(E.background,E.selectionInactiveBackgroundTransparent),E.selectionForeground=A.selectionForeground?N(A.selectionForeground,p.NULL_COLOR):void 0,E.selectionForeground===p.NULL_COLOR&&(E.selectionForeground=void 0),p.color.isOpaque(E.selectionBackgroundTransparent)&&(E.selectionBackgroundTransparent=p.color.opacity(E.selectionBackgroundTransparent,.3)),p.color.isOpaque(E.selectionInactiveBackgroundTransparent)&&(E.selectionInactiveBackgroundTransparent=p.color.opacity(E.selectionInactiveBackgroundTransparent,.3)),E.ansi=i.DEFAULT_ANSI_COLORS.slice(),E.ansi[0]=N(A.black,i.DEFAULT_ANSI_COLORS[0]),E.ansi[1]=N(A.red,i.DEFAULT_ANSI_COLORS[1]),E.ansi[2]=N(A.green,i.DEFAULT_ANSI_COLORS[2]),E.ansi[3]=N(A.yellow,i.DEFAULT_ANSI_COLORS[3]),E.ansi[4]=N(A.blue,i.DEFAULT_ANSI_COLORS[4]),E.ansi[5]=N(A.magenta,i.DEFAULT_ANSI_COLORS[5]),E.ansi[6]=N(A.cyan,i.DEFAULT_ANSI_COLORS[6]),E.ansi[7]=N(A.white,i.DEFAULT_ANSI_COLORS[7]),E.ansi[8]=N(A.brightBlack,i.DEFAULT_ANSI_COLORS[8]),E.ansi[9]=N(A.brightRed,i.DEFAULT_ANSI_COLORS[9]),E.ansi[10]=N(A.brightGreen,i.DEFAULT_ANSI_COLORS[10]),E.ansi[11]=N(A.brightYellow,i.DEFAULT_ANSI_COLORS[11]),E.ansi[12]=N(A.brightBlue,i.DEFAULT_ANSI_COLORS[12]),E.ansi[13]=N(A.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),E.ansi[14]=N(A.brightCyan,i.DEFAULT_ANSI_COLORS[14]),E.ansi[15]=N(A.brightWhite,i.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const M=Math.min(E.ansi.length-16,A.extendedAnsi.length);for(let $=0;${Object.defineProperty(i,"__esModule",{value:!0}),i.CircularList=void 0;const u=c(8460),d=c(844);class _ extends d.Disposable{constructor(m){super(),this._maxLength=m,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(m){if(this._maxLength===m)return;const k=new Array(m);for(let x=0;xthis._length)for(let k=this._length;k=m;v--)this._array[this._getCyclicIndex(v+x.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;vthis._maxLength){const v=this._length+x.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=x.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,k,x){if(!(k<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let b=k-1;b>=0;b--)this.set(m+b+x,this.get(m+b));const v=m+k+x-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v{Object.defineProperty(i,"__esModule",{value:!0}),i.clone=void 0,i.clone=function c(u,d=5){if(typeof u!="object")return u;const _=Array.isArray(u)?[]:{};for(const p in u)_[p]=d<=1?u[p]:u[p]&&c(u[p],d-1);return _}},8055:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.contrastRatio=i.toPaddedHex=i.rgba=i.rgb=i.css=i.color=i.channels=i.NULL_COLOR=void 0;let c=0,u=0,d=0,_=0;var p,m,k,x,v;function b(y){const S=y.toString(16);return S.length<2?"0"+S:S}function w(y,S){return y>>0},y.toColor=function(S,z,N,A){return{css:y.toCss(S,z,N,A),rgba:y.toRgba(S,z,N,A)}}})(p||(i.channels=p={})),(function(y){function S(z,N){return _=Math.round(255*N),[c,u,d]=v.toChannels(z.rgba),{css:p.toCss(c,u,d,_),rgba:p.toRgba(c,u,d,_)}}y.blend=function(z,N){if(_=(255&N.rgba)/255,_===1)return{css:N.css,rgba:N.rgba};const A=N.rgba>>24&255,E=N.rgba>>16&255,M=N.rgba>>8&255,$=z.rgba>>24&255,D=z.rgba>>16&255,I=z.rgba>>8&255;return c=$+Math.round((A-$)*_),u=D+Math.round((E-D)*_),d=I+Math.round((M-I)*_),{css:p.toCss(c,u,d),rgba:p.toRgba(c,u,d)}},y.isOpaque=function(z){return(255&z.rgba)==255},y.ensureContrastRatio=function(z,N,A){const E=v.ensureContrastRatio(z.rgba,N.rgba,A);if(E)return p.toColor(E>>24&255,E>>16&255,E>>8&255)},y.opaque=function(z){const N=(255|z.rgba)>>>0;return[c,u,d]=v.toChannels(N),{css:p.toCss(c,u,d),rgba:N}},y.opacity=S,y.multiplyOpacity=function(z,N){return _=255&z.rgba,S(z,_*N/255)},y.toColorRGB=function(z){return[z.rgba>>24&255,z.rgba>>16&255,z.rgba>>8&255]}})(m||(i.color=m={})),(function(y){let S,z;try{const N=document.createElement("canvas");N.width=1,N.height=1;const A=N.getContext("2d",{willReadFrequently:!0});A&&(S=A,S.globalCompositeOperation="copy",z=S.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(N){if(N.match(/#[\da-f]{3,8}/i))switch(N.length){case 4:return c=parseInt(N.slice(1,2).repeat(2),16),u=parseInt(N.slice(2,3).repeat(2),16),d=parseInt(N.slice(3,4).repeat(2),16),p.toColor(c,u,d);case 5:return c=parseInt(N.slice(1,2).repeat(2),16),u=parseInt(N.slice(2,3).repeat(2),16),d=parseInt(N.slice(3,4).repeat(2),16),_=parseInt(N.slice(4,5).repeat(2),16),p.toColor(c,u,d,_);case 7:return{css:N,rgba:(parseInt(N.slice(1),16)<<8|255)>>>0};case 9:return{css:N,rgba:parseInt(N.slice(1),16)>>>0}}const A=N.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return c=parseInt(A[1]),u=parseInt(A[2]),d=parseInt(A[3]),_=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(c,u,d,_);if(!S||!z)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=z,S.fillStyle=N,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[c,u,d,_]=S.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,d,_),css:N}}})(k||(i.css=k={})),(function(y){function S(z,N,A){const E=z/255,M=N/255,$=A/255;return .2126*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*($<=.03928?$/12.92:Math.pow(($+.055)/1.055,2.4))}y.relativeLuminance=function(z){return S(z>>16&255,z>>8&255,255&z)},y.relativeLuminance2=S})(x||(i.rgb=x={})),(function(y){function S(N,A,E){const M=N>>24&255,$=N>>16&255,D=N>>8&255;let I=A>>24&255,G=A>>16&255,H=A>>8&255,Q=w(x.relativeLuminance2(I,G,H),x.relativeLuminance2(M,$,D));for(;Q0||G>0||H>0);)I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),H-=Math.max(0,Math.ceil(.1*H)),Q=w(x.relativeLuminance2(I,G,H),x.relativeLuminance2(M,$,D));return(I<<24|G<<16|H<<8|255)>>>0}function z(N,A,E){const M=N>>24&255,$=N>>16&255,D=N>>8&255;let I=A>>24&255,G=A>>16&255,H=A>>8&255,Q=w(x.relativeLuminance2(I,G,H),x.relativeLuminance2(M,$,D));for(;Q>>0}y.blend=function(N,A){if(_=(255&A)/255,_===1)return A;const E=A>>24&255,M=A>>16&255,$=A>>8&255,D=N>>24&255,I=N>>16&255,G=N>>8&255;return c=D+Math.round((E-D)*_),u=I+Math.round((M-I)*_),d=G+Math.round(($-G)*_),p.toRgba(c,u,d)},y.ensureContrastRatio=function(N,A,E){const M=x.relativeLuminance(N>>8),$=x.relativeLuminance(A>>8);if(w(M,$)>8));if(Hw(M,x.relativeLuminance(Q>>8))?G:Q}return G}const D=z(N,A,E),I=w(M,x.relativeLuminance(D>>8));if(Iw(M,x.relativeLuminance(G>>8))?D:G}return D}},y.reduceLuminance=S,y.increaseLuminance=z,y.toChannels=function(N){return[N>>24&255,N>>16&255,N>>8&255,255&N]}})(v||(i.rgba=v={})),i.toPaddedHex=b,i.contrastRatio=w},8969:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreTerminal=void 0;const u=c(844),d=c(2585),_=c(4348),p=c(7866),m=c(744),k=c(7302),x=c(6975),v=c(8460),b=c(1753),w=c(1480),y=c(7994),S=c(9282),z=c(5435),N=c(5981),A=c(2660);let E=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((D=>{var I;(I=this._onScrollApi)==null||I.fire(D.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(D){for(const I in D)this.optionsService.options[I]=D[I]}constructor(D){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new _.InstantiationService,this.optionsService=this.register(new k.OptionsService(D)),this._instantiationService.setService(d.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(d.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(d.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(d.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(d.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(d.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(d.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(d.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new z.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new N.WriteBuffer(((I,G)=>this._inputHandler.parse(I,G)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(D,I){this._writeBuffer.write(D,I)}writeSync(D,I){this._logService.logLevel<=d.LogLevelEnum.WARN&&!E&&(this._logService.warn("writeSync is unreliable and will be removed soon."),E=!0),this._writeBuffer.writeSync(D,I)}input(D,I=!0){this.coreService.triggerDataEvent(D,I)}resize(D,I){isNaN(D)||isNaN(I)||(D=Math.max(D,m.MINIMUM_COLS),I=Math.max(I,m.MINIMUM_ROWS),this._bufferService.resize(D,I))}scroll(D,I=!1){this._bufferService.scroll(D,I)}scrollLines(D,I,G){this._bufferService.scrollLines(D,I,G)}scrollPages(D){this.scrollLines(D*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(D){const I=D-this._bufferService.buffer.ydisp;I!==0&&this.scrollLines(I)}registerEscHandler(D,I){return this._inputHandler.registerEscHandler(D,I)}registerDcsHandler(D,I){return this._inputHandler.registerDcsHandler(D,I)}registerCsiHandler(D,I){return this._inputHandler.registerCsiHandler(D,I)}registerOscHandler(D,I){return this._inputHandler.registerOscHandler(D,I)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let D=!1;const I=this.optionsService.rawOptions.windowsPty;I&&I.buildNumber!==void 0&&I.buildNumber!==void 0?D=I.backend==="conpty"&&I.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(D=!0),D?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const D=[];D.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),D.push(this.registerCsiHandler({final:"H"},(()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const I of D)I.dispose()}))}}}i.CoreTerminal=M},8460:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(d)))},i.runAndSubscribe=function(c,u){return u(void 0),c((d=>u(d)))}},5435:function(a,i,c){var u=this&&this.__decorate||function(ee,P,L,F){var q,U=arguments.length,oe=U<3?P:F===null?F=Object.getOwnPropertyDescriptor(P,L):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ee,P,L,F);else for(var ie=ee.length-1;ie>=0;ie--)(q=ee[ie])&&(oe=(U<3?q(oe):U>3?q(P,L,oe):q(P,L))||oe);return U>3&&oe&&Object.defineProperty(P,L,oe),oe},d=this&&this.__param||function(ee,P){return function(L,F){P(L,F,ee)}};Object.defineProperty(i,"__esModule",{value:!0}),i.InputHandler=i.WindowsOptionsReportType=void 0;const _=c(2584),p=c(7116),m=c(2015),k=c(844),x=c(482),v=c(8437),b=c(8460),w=c(643),y=c(511),S=c(3734),z=c(2585),N=c(1480),A=c(6242),E=c(6351),M=c(5941),$={"(":0,")":1,"*":2,"+":3,"-":1,".":2},D=131072;function I(ee,P){if(ee>24)return P.setWinLines||!1;switch(ee){case 1:return!!P.restoreWin;case 2:return!!P.minimizeWin;case 3:return!!P.setWinPosition;case 4:return!!P.setWinSizePixels;case 5:return!!P.raiseWin;case 6:return!!P.lowerWin;case 7:return!!P.refreshWin;case 8:return!!P.setWinSizeChars;case 9:return!!P.maximizeWin;case 10:return!!P.fullscreenWin;case 11:return!!P.getWinState;case 13:return!!P.getWinPosition;case 14:return!!P.getWinSizePixels;case 15:return!!P.getScreenSizePixels;case 16:return!!P.getCellSizePixels;case 18:return!!P.getWinSizeChars;case 19:return!!P.getScreenSizeChars;case 20:return!!P.getIconTitle;case 21:return!!P.getWinTitle;case 22:return!!P.pushTitle;case 23:return!!P.popTitle;case 24:return!!P.setWinLines}return!1}var G;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(G||(i.WindowsOptionsReportType=G={}));let H=0;class Q extends k.Disposable{getAttrData(){return this._curAttrData}constructor(P,L,F,q,U,oe,ie,ce,re=new m.EscapeSequenceParser){super(),this._bufferService=P,this._charsetService=L,this._coreService=F,this._logService=q,this._optionsService=U,this._oscLinkService=oe,this._coreMouseService=ie,this._unicodeService=ce,this._parser=re,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new K(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((W=>this._activeBuffer=W.activeBuffer))),this._parser.setCsiHandlerFallback(((W,ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(W),params:ae.toArray()})})),this._parser.setEscHandlerFallback((W=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(W)})})),this._parser.setExecuteHandlerFallback((W=>{this._logService.debug("Unknown EXECUTE code: ",{code:W})})),this._parser.setOscHandlerFallback(((W,ae,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:W,action:ae,data:le})})),this._parser.setDcsHandlerFallback(((W,ae,le)=>{ae==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(W),action:ae,payload:le})})),this._parser.setPrintHandler(((W,ae,le)=>this.print(W,ae,le))),this._parser.registerCsiHandler({final:"@"},(W=>this.insertChars(W))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(W=>this.scrollLeft(W))),this._parser.registerCsiHandler({final:"A"},(W=>this.cursorUp(W))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(W=>this.scrollRight(W))),this._parser.registerCsiHandler({final:"B"},(W=>this.cursorDown(W))),this._parser.registerCsiHandler({final:"C"},(W=>this.cursorForward(W))),this._parser.registerCsiHandler({final:"D"},(W=>this.cursorBackward(W))),this._parser.registerCsiHandler({final:"E"},(W=>this.cursorNextLine(W))),this._parser.registerCsiHandler({final:"F"},(W=>this.cursorPrecedingLine(W))),this._parser.registerCsiHandler({final:"G"},(W=>this.cursorCharAbsolute(W))),this._parser.registerCsiHandler({final:"H"},(W=>this.cursorPosition(W))),this._parser.registerCsiHandler({final:"I"},(W=>this.cursorForwardTab(W))),this._parser.registerCsiHandler({final:"J"},(W=>this.eraseInDisplay(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(W=>this.eraseInDisplay(W,!0))),this._parser.registerCsiHandler({final:"K"},(W=>this.eraseInLine(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(W=>this.eraseInLine(W,!0))),this._parser.registerCsiHandler({final:"L"},(W=>this.insertLines(W))),this._parser.registerCsiHandler({final:"M"},(W=>this.deleteLines(W))),this._parser.registerCsiHandler({final:"P"},(W=>this.deleteChars(W))),this._parser.registerCsiHandler({final:"S"},(W=>this.scrollUp(W))),this._parser.registerCsiHandler({final:"T"},(W=>this.scrollDown(W))),this._parser.registerCsiHandler({final:"X"},(W=>this.eraseChars(W))),this._parser.registerCsiHandler({final:"Z"},(W=>this.cursorBackwardTab(W))),this._parser.registerCsiHandler({final:"`"},(W=>this.charPosAbsolute(W))),this._parser.registerCsiHandler({final:"a"},(W=>this.hPositionRelative(W))),this._parser.registerCsiHandler({final:"b"},(W=>this.repeatPrecedingCharacter(W))),this._parser.registerCsiHandler({final:"c"},(W=>this.sendDeviceAttributesPrimary(W))),this._parser.registerCsiHandler({prefix:">",final:"c"},(W=>this.sendDeviceAttributesSecondary(W))),this._parser.registerCsiHandler({final:"d"},(W=>this.linePosAbsolute(W))),this._parser.registerCsiHandler({final:"e"},(W=>this.vPositionRelative(W))),this._parser.registerCsiHandler({final:"f"},(W=>this.hVPosition(W))),this._parser.registerCsiHandler({final:"g"},(W=>this.tabClear(W))),this._parser.registerCsiHandler({final:"h"},(W=>this.setMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(W=>this.setModePrivate(W))),this._parser.registerCsiHandler({final:"l"},(W=>this.resetMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(W=>this.resetModePrivate(W))),this._parser.registerCsiHandler({final:"m"},(W=>this.charAttributes(W))),this._parser.registerCsiHandler({final:"n"},(W=>this.deviceStatus(W))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(W=>this.deviceStatusPrivate(W))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(W=>this.softReset(W))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(W=>this.setCursorStyle(W))),this._parser.registerCsiHandler({final:"r"},(W=>this.setScrollRegion(W))),this._parser.registerCsiHandler({final:"s"},(W=>this.saveCursor(W))),this._parser.registerCsiHandler({final:"t"},(W=>this.windowOptions(W))),this._parser.registerCsiHandler({final:"u"},(W=>this.restoreCursor(W))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(W=>this.insertColumns(W))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(W=>this.deleteColumns(W))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(W=>this.selectProtected(W))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(W=>this.requestMode(W,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(W=>this.requestMode(W,!1))),this._parser.setExecuteHandler(_.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(_.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(_.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(_.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(_.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(_.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(_.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(_.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(_.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new A.OscHandler((W=>(this.setTitle(W),this.setIconName(W),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((W=>this.setIconName(W)))),this._parser.registerOscHandler(2,new A.OscHandler((W=>this.setTitle(W)))),this._parser.registerOscHandler(4,new A.OscHandler((W=>this.setOrReportIndexedColor(W)))),this._parser.registerOscHandler(8,new A.OscHandler((W=>this.setHyperlink(W)))),this._parser.registerOscHandler(10,new A.OscHandler((W=>this.setOrReportFgColor(W)))),this._parser.registerOscHandler(11,new A.OscHandler((W=>this.setOrReportBgColor(W)))),this._parser.registerOscHandler(12,new A.OscHandler((W=>this.setOrReportCursorColor(W)))),this._parser.registerOscHandler(104,new A.OscHandler((W=>this.restoreIndexedColor(W)))),this._parser.registerOscHandler(110,new A.OscHandler((W=>this.restoreFgColor(W)))),this._parser.registerOscHandler(111,new A.OscHandler((W=>this.restoreBgColor(W)))),this._parser.registerOscHandler(112,new A.OscHandler((W=>this.restoreCursorColor(W)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const W in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:W},(()=>this.selectCharset("("+W))),this._parser.registerEscHandler({intermediates:")",final:W},(()=>this.selectCharset(")"+W))),this._parser.registerEscHandler({intermediates:"*",final:W},(()=>this.selectCharset("*"+W))),this._parser.registerEscHandler({intermediates:"+",final:W},(()=>this.selectCharset("+"+W))),this._parser.registerEscHandler({intermediates:"-",final:W},(()=>this.selectCharset("-"+W))),this._parser.registerEscHandler({intermediates:".",final:W},(()=>this.selectCharset("."+W))),this._parser.registerEscHandler({intermediates:"/",final:W},(()=>this.selectCharset("/"+W)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((W=>(this._logService.error("Parsing error: ",W),W))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new E.DcsHandler(((W,ae)=>this.requestStatusString(W,ae))))}_preserveStack(P,L,F,q){this._parseStack.paused=!0,this._parseStack.cursorStartX=P,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=F,this._parseStack.position=q}_logSlowResolvingAsync(P){this._logService.logLevel<=z.LogLevelEnum.WARN&&Promise.race([P,new Promise(((L,F)=>setTimeout((()=>F("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(P,L){let F,q=this._activeBuffer.x,U=this._activeBuffer.y,oe=0;const ie=this._parseStack.paused;if(ie){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(F),F;q=this._parseStack.cursorStartX,U=this._parseStack.cursorStartY,this._parseStack.paused=!1,P.length>D&&(oe=this._parseStack.position+D)}if(this._logService.logLevel<=z.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof P=="string"?` "${P}"`:` "${Array.prototype.map.call(P,(W=>String.fromCharCode(W))).join("")}"`),typeof P=="string"?P.split("").map((W=>W.charCodeAt(0))):P),this._parseBuffer.lengthD)for(let W=oe;W0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ae);let me=this._parser.precedingJoinState;for(let be=L;bece){if(re){const Me=le;let Fe=this._activeBuffer.x-Xe;for(this._activeBuffer.x=Xe,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Xe>0&&le instanceof v.BufferLine&&le.copyCellsFrom(Me,Fe,0,Xe,!1);Fe=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}else if(W&&(le.insertCells(this._activeBuffer.x,U-Xe,this._activeBuffer.getNullCell(ae)),le.getWidth(ce-1)===2&&le.setCellFromCodepoint(ce-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,ae)),le.setCellFromCodepoint(this._activeBuffer.x++,q,U,ae),U>0)for(;--U;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}this._parser.precedingJoinState=me,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(P,L){return P.final!=="t"||P.prefix||P.intermediates?this._parser.registerCsiHandler(P,L):this._parser.registerCsiHandler(P,(F=>!I(F.params[0],this._optionsService.rawOptions.windowOptions)||L(F)))}registerDcsHandler(P,L){return this._parser.registerDcsHandler(P,new E.DcsHandler(L))}registerEscHandler(P,L){return this._parser.registerEscHandler(P,L)}registerOscHandler(P,L){return this._parser.registerOscHandler(P,new A.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var P;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&P.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const P=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-P),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(P=this._bufferService.cols-1){this._activeBuffer.x=Math.min(P,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(P,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=P,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=P,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(P,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+P,this._activeBuffer.y+L)}cursorUp(P){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,P.params[0]||1)):this._moveCursor(0,-(P.params[0]||1)),!0}cursorDown(P){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,P.params[0]||1)):this._moveCursor(0,P.params[0]||1),!0}cursorForward(P){return this._moveCursor(P.params[0]||1,0),!0}cursorBackward(P){return this._moveCursor(-(P.params[0]||1),0),!0}cursorNextLine(P){return this.cursorDown(P),this._activeBuffer.x=0,!0}cursorPrecedingLine(P){return this.cursorUp(P),this._activeBuffer.x=0,!0}cursorCharAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(P){return this._setCursor(P.length>=2?(P.params[1]||1)-1:0,(P.params[0]||1)-1),!0}charPosAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(P){return this._moveCursor(P.params[0]||1,0),!0}linePosAbsolute(P){return this._setCursor(this._activeBuffer.x,(P.params[0]||1)-1),!0}vPositionRelative(P){return this._moveCursor(0,P.params[0]||1),!0}hVPosition(P){return this.cursorPosition(P),!0}tabClear(P){const L=P.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(P){const L=P.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(P,L,F,q=!1,U=!1){const oe=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);oe.replaceCells(L,F,this._activeBuffer.getNullCell(this._eraseAttrData()),U),q&&(oe.isWrapped=!1)}_resetBufferLine(P,L=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+P),F.isWrapped=!1)}eraseInDisplay(P,L=!1){let F;switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 3:const q=this._activeBuffer.lines.length-this._bufferService.rows;q>0&&(this._activeBuffer.lines.trimStart(q),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-q,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-q,0),this._onScroll.fire(0))}return!0}eraseInLine(P,L=!1){switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(P){this._restrictCursor();let L=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let re=ce;for(let W=1;W0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(P){return P.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(P.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.C0.ESC+"[>83;40003;0c")),!0}_is(P){return(this._optionsService.rawOptions.termName+"").indexOf(P)===0}setMode(P){for(let L=0;LBe?1:2,me=P.params[0];return be=me,Se=L?me===2?4:me===4?le(oe.modes.insertMode):me===12?3:me===20?le(ae.convertEol):0:me===1?le(F.applicationCursorKeys):me===3?ae.windowOptions.setWinLines?ce===80?2:ce===132?1:0:0:me===6?le(F.origin):me===7?le(F.wraparound):me===8?3:me===9?le(q==="X10"):me===12?le(ae.cursorBlink):me===25?le(!oe.isCursorHidden):me===45?le(F.reverseWraparound):me===66?le(F.applicationKeypad):me===67?4:me===1e3?le(q==="VT200"):me===1002?le(q==="DRAG"):me===1003?le(q==="ANY"):me===1004?le(F.sendFocus):me===1005?4:me===1006?le(U==="SGR"):me===1015?4:me===1016?le(U==="SGR_PIXELS"):me===1048?1:me===47||me===1047||me===1049?le(re===W):me===2004?le(F.bracketedPasteMode):0,oe.triggerDataEvent(`${_.C0.ESC}[${L?"":"?"}${be};${Se}$y`),!0;var be,Se}_updateAttrColor(P,L,F,q,U){return L===2?(P|=50331648,P&=-16777216,P|=S.AttributeData.fromColorRGB([F,q,U])):L===5&&(P&=-50331904,P|=33554432|255&F),P}_extractColor(P,L,F){const q=[0,0,-1,0,0,0];let U=0,oe=0;do{if(q[oe+U]=P.params[L+oe],P.hasSubParams(L+oe)){const ie=P.getSubParams(L+oe);let ce=0;do q[1]===5&&(U=1),q[oe+ce+1+U]=ie[ce];while(++ce=2||q[1]===2&&oe+U>=5)break;q[1]&&(U=1)}while(++oe+L5)&&(P=1),L.extended.underlineStyle=P,L.fg|=268435456,P===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(P){P.fg=v.DEFAULT_ATTR_DATA.fg,P.bg=v.DEFAULT_ATTR_DATA.bg,P.extended=P.extended.clone(),P.extended.underlineStyle=0,P.extended.underlineColor&=-67108864,P.updateExtended()}charAttributes(P){if(P.length===1&&P.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=P.length;let F;const q=this._curAttrData;for(let U=0;U=30&&F<=37?(q.fg&=-50331904,q.fg|=16777216|F-30):F>=40&&F<=47?(q.bg&=-50331904,q.bg|=16777216|F-40):F>=90&&F<=97?(q.fg&=-50331904,q.fg|=16777224|F-90):F>=100&&F<=107?(q.bg&=-50331904,q.bg|=16777224|F-100):F===0?this._processSGR0(q):F===1?q.fg|=134217728:F===3?q.bg|=67108864:F===4?(q.fg|=268435456,this._processUnderline(P.hasSubParams(U)?P.getSubParams(U)[0]:1,q)):F===5?q.fg|=536870912:F===7?q.fg|=67108864:F===8?q.fg|=1073741824:F===9?q.fg|=2147483648:F===2?q.bg|=134217728:F===21?this._processUnderline(2,q):F===22?(q.fg&=-134217729,q.bg&=-134217729):F===23?q.bg&=-67108865:F===24?(q.fg&=-268435457,this._processUnderline(0,q)):F===25?q.fg&=-536870913:F===27?q.fg&=-67108865:F===28?q.fg&=-1073741825:F===29?q.fg&=2147483647:F===39?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?U+=this._extractColor(P,U,q):F===53?q.bg|=1073741824:F===55?q.bg&=-1073741825:F===59?(q.extended=q.extended.clone(),q.extended.underlineColor=-1,q.updateExtended()):F===100?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",F);return!0}deviceStatus(P){switch(P.params[0]){case 5:this._coreService.triggerDataEvent(`${_.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[${L};${F}R`)}return!0}deviceStatusPrivate(P){if(P.params[0]===6){const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[?${L};${F}R`)}return!0}softReset(P){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(P){const L=P.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const F=L%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion(P){const L=P.params[0]||1;let F;return(P.length<2||(F=P.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions(P){if(!I(P.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=P.length>1?P.params[1]:0;switch(P.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(G.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(G.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${_.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(P){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(P){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(P){return this._windowTitle=P,this._onTitleChange.fire(P),!0}setIconName(P){return this._iconName=P,!0}setOrReportIndexedColor(P){const L=[],F=P.split(";");for(;F.length>1;){const q=F.shift(),U=F.shift();if(/^\d+$/.exec(q)){const oe=parseInt(q);if(J(oe))if(U==="?")L.push({type:0,index:oe});else{const ie=(0,M.parseColor)(U);ie&&L.push({type:1,index:oe,color:ie})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(P){const L=P.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(P,L){this._getCurrentLinkId()&&this._finishHyperlink();const F=P.split(":");let q;const U=F.findIndex((oe=>oe.startsWith("id=")));return U!==-1&&(q=F[U].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:q,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(P,L){const F=P.split(";");for(let q=0;q=this._specialColors.length);++q,++L)if(F[q]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const U=(0,M.parseColor)(F[q]);U&&this._onColor.fire([{type:1,index:this._specialColors[L],color:U}])}return!0}setOrReportFgColor(P){return this._setOrReportSpecialColor(P,0)}setOrReportBgColor(P){return this._setOrReportSpecialColor(P,1)}setOrReportCursorColor(P){return this._setOrReportSpecialColor(P,2)}restoreIndexedColor(P){if(!P)return this._onColor.fire([{type:2}]),!0;const L=[],F=P.split(";");for(let q=0;q=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const P=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,P,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(P){return this._charsetService.setgLevel(P),!0}screenAlignmentPattern(){const P=new y.CellData;P.content=4194373,P.fg=this._curAttrData.fg,P.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${_.C0.ESC}${U}${_.C0.ESC}\\`),!0))(P==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:P==='"p'?'P1$r61;1"p':P==="r"?`P1$r${F.scrollTop+1};${F.scrollBottom+1}r`:P==="m"?"P1$r0m":P===" q"?`P1$r${{block:2,underline:4,bar:6}[q.cursorStyle]-(q.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(P,L){this._dirtyRowTracker.markRangeDirty(P,L)}}i.InputHandler=Q;let K=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){eethis.end&&(this.end=ee)}markRangeDirty(ee,P){ee>P&&(H=ee,ee=P,P=H),eethis.end&&(this.end=P)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(ee){return 0<=ee&&ee<256}K=u([d(0,z.IBufferService)],K)},844:(a,i)=>{function c(u){for(const d of u)d.dispose();u.length=0}Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.toDisposable=i.MutableDisposable=i.Disposable=void 0,i.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const d=this._disposables.indexOf(u);d!==-1&&this._disposables.splice(d,1)}},i.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var d;this._isDisposed||u===this._value||((d=this._value)==null||d.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},i.toDisposable=function(u){return{dispose:u}},i.disposeArray=c,i.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(d,_,p){this._data[d]||(this._data[d]={}),this._data[d][_]=p}get(d,_){return this._data[d]?this._data[d][_]:void 0}clear(){this._data={}}}i.TwoKeyMap=c,i.FourKeyMap=class{constructor(){this._data=new c}set(u,d,_,p,m){this._data.get(u,d)||this._data.set(u,d,new c),this._data.get(u,d).set(_,p,m)}get(u,d,_,p){var m;return(m=this._data.get(u,d))==null?void 0:m.get(_,p)}clear(){this._data.clear()}}},6114:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.isChromeOS=i.isLinux=i.isWindows=i.isIphone=i.isIpad=i.isMac=i.getSafariVersion=i.isSafari=i.isLegacyEdge=i.isFirefox=i.isNode=void 0,i.isNode=typeof process<"u"&&"title"in process;const c=i.isNode?"node":navigator.userAgent,u=i.isNode?"node":navigator.platform;i.isFirefox=c.includes("Firefox"),i.isLegacyEdge=c.includes("Edge"),i.isSafari=/^((?!chrome|android).)*safari/i.test(c),i.getSafariVersion=function(){if(!i.isSafari)return 0;const d=c.match(/Version\/(\d+)/);return d===null||d.length<2?0:parseInt(d[1])},i.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),i.isIpad=u==="iPad",i.isIphone=u==="iPhone",i.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),i.isLinux=u.indexOf("Linux")>=0,i.isChromeOS=/\bCrOS\b/.test(c)},6106:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SortedList=void 0;let c=0;i.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const d=this._getKey(u);if(d===void 0||(c=this._search(d),c===-1)||this._getKey(this._array[c])!==d)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===u))do d(this._array[c]);while(++c=d;){let p=d+_>>1;const m=this._getKey(this._array[p]);if(m>u)_=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}d=p+1}}return d}}},7226:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DebouncedIdleTask=i.IdleTaskQueue=i.PriorityTaskQueue=void 0;const u=c(6114);class d{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-k))}ms`),void this._start();v=b}this.clear()}}class _ extends d{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const k=Date.now()+m;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}i.PriorityTaskQueue=_,i.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends d{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:_,i.DebouncedIdleTask=class{constructor(){this._queue=new i.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.updateWindowsModeWrappedState=void 0;const u=c(643);i.updateWindowsModeWrappedState=function(d){const _=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),p=_==null?void 0:_.get(d.cols-1),m=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);m&&p&&(m.isWrapped=p[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&p[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ExtendedAttrs=i.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(_){return[_>>>16&255,_>>>8&255,255&_]}static fromColorRGB(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]}clone(){const _=new c;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}i.AttributeData=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(_){this._ext=_}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(_){this._ext&=-469762049,this._ext|=_<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(_){this._ext&=-67108864,this._ext|=67108863&_}get urlId(){return this._urlId}set urlId(_){this._urlId=_}get underlineVariantOffset(){const _=(3758096384&this._ext)>>29;return _<0?4294967288^_:_}set underlineVariantOffset(_){this._ext&=536870911,this._ext|=_<<29&3758096384}constructor(_=0,p=0){this._ext=0,this._urlId=0,this._ext=_,this._urlId=p}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}i.ExtendedAttrs=u},9092:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Buffer=i.MAX_BUFFER_SIZE=void 0;const u=c(6349),d=c(7226),_=c(3734),p=c(8437),m=c(4634),k=c(511),x=c(643),v=c(4863),b=c(7116);i.MAX_BUFFER_SIZE=4294967295,i.Buffer=class{constructor(w,y,S){this._hasScrollback=w,this._optionsService=y,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=k.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=k.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new d.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(w){return w?(this._nullCell.fg=w.fg,this._nullCell.bg=w.bg,this._nullCell.extended=w.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new _.ExtendedAttrs),this._nullCell}getWhitespaceCell(w){return w?(this._whitespaceCell.fg=w.fg,this._whitespaceCell.bg=w.bg,this._whitespaceCell.extended=w.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new _.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,y){return new p.BufferLine(this._bufferService.cols,this.getNullCell(w),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const w=this.ybase+this.y-this.ydisp;return w>=0&&wi.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:y}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=p.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(w))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(w,y){const S=this.getNullCell(p.DEFAULT_ATTR_DATA);let z=0;const N=this._getCorrectBufferLength(y);if(N>this.lines.maxLength&&(this.lines.maxLength=N),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(w,S)));else for(let E=this._rows;E>y;E--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(N0&&(this.lines.trimStart(E),this.ybase=Math.max(this.ybase-E,0),this.ydisp=Math.max(this.ydisp-E,0),this.savedY=Math.max(this.savedY-E,0)),this.lines.maxLength=N}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,y-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(w,y),this._cols>w))for(let A=0;A.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let w=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,w=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return w}get _isReflowEnabled(){const w=this._optionsService.rawOptions.windowsPty;return w&&w.buildNumber?this._hasScrollback&&w.backend==="conpty"&&w.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(w,y){this._cols!==w&&(w>this._cols?this._reflowLarger(w,y):this._reflowSmaller(w,y))}_reflowLarger(w,y){const S=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(S.length>0){const z=(0,m.reflowLargerCreateNewLayout)(this.lines,S);(0,m.reflowLargerApplyNewLayout)(this.lines,z.layout),this._reflowLargerAdjustViewport(w,y,z.countRemoved)}}_reflowLargerAdjustViewport(w,y,S){const z=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=S;for(;N-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;A--){let E=this.lines.get(A);if(!E||!E.isWrapped&&E.getTrimmedLength()<=w)continue;const M=[E];for(;E.isWrapped&&A>0;)E=this.lines.get(--A),M.unshift(E);const $=this.ybase+this.y;if($>=A&&$0&&(z.push({start:A+M.length+N,newLines:Q}),N+=Q.length),M.push(...Q);let K=I.length-1,J=I[K];J===0&&(K--,J=I[K]);let ee=M.length-G-1,P=D;for(;ee>=0;){const F=Math.min(P,J);if(M[K]===void 0)break;if(M[K].copyCellsFrom(M[ee],P-F,J-F,F,!0),J-=F,J===0&&(K--,J=I[K]),P-=F,P===0){ee--;const q=Math.max(ee,0);P=(0,m.getWrappedLineTrimmedLength)(M,q,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const A=[],E=[];for(let K=0;K=0;K--)if(I&&I.start>$+G){for(let J=I.newLines.length-1;J>=0;J--)this.lines.set(K--,I.newLines[J]);K++,A.push({index:$+1,amount:I.newLines.length}),G+=I.newLines.length,I=z[++D]}else this.lines.set(K,E[$--]);let H=0;for(let K=A.length-1;K>=0;K--)A[K].index+=H,this.lines.onInsertEmitter.fire(A[K]),H+=A[K].amount;const Q=Math.max(0,M+N-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(w,y,S=0,z){const N=this.lines.get(w);return N?N.translateToString(y,S,z):""}getWrappedRangeForLine(w){let y=w,S=w;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;S+10;);return w>=this._cols?this._cols-1:w<0?0:w}nextStop(w){for(w==null&&(w=this.x);!this.tabs[++w]&&w=this._cols?this._cols-1:w<0?0:w}clearMarkers(w){this._isClearing=!0;for(let y=0;y{y.line-=S,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((S=>{y.line>=S.index&&(y.line+=S.amount)}))),y.register(this.lines.onDelete((S=>{y.line>=S.index&&y.lineS.index&&(y.line-=S.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLine=i.DEFAULT_ATTR_DATA=void 0;const u=c(3734),d=c(511),_=c(643),p=c(482);i.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class k{constructor(v,b,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const y=b||d.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]);for(let S=0;S>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):w]}set(v,b){this._data[3*v+1]=b[_.CHAR_DATA_ATTR_INDEX],b[_.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[_.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,w,y){268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=b|w<<22,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}addCodepointToCell(v,b,w){let y=this._data[3*v+0];2097152&y?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&y?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&y)+(0,p.stringFromCodePoint)(b),y&=-2097152,y|=2097152):y=b|4194304,w&&(y&=-12582913,y|=w<<22),this._data[3*v+0]=y}insertCells(v,b,w){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,w),b=0;--S)this.setCell(v+b+S,this.loadCell(v+S,y));for(let S=0;Sthis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{const y=new Uint32Array(w);y.set(this._data),this._data=y}for(let y=this.length;y=v&&delete this._combined[N]}const S=Object.keys(this._extendedAttrs);for(let z=0;z=v&&delete this._extendedAttrs[N]}}return this.length=v,4*w*2=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,b,w,y,S){const z=v._data;if(S)for(let A=y-1;A>=0;A--){for(let E=0;E<3;E++)this._data[3*(w+A)+E]=z[3*(b+A)+E];268435456&z[3*(b+A)+2]&&(this._extendedAttrs[w+A]=v._extendedAttrs[b+A])}else for(let A=0;A=b&&(this._combined[E-b+w]=v._combined[E])}}translateToString(v,b,w,y){b=b??0,w=w??this.length,v&&(w=Math.min(w,this.getTrimmedLength())),y&&(y.length=0);let S="";for(;b>22||1}return y&&y.push(b),S}}i.BufferLine=k},4841:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.getRangeLength=void 0,i.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(a,i)=>{function c(u,d,_){if(d===u.length-1)return u[d].getTrimmedLength();const p=!u[d].hasContent(_-1)&&u[d].getWidth(_-1)===1,m=u[d+1].getWidth(0)===2;return p&&m?_-1:_}Object.defineProperty(i,"__esModule",{value:!0}),i.getWrappedLineTrimmedLength=i.reflowSmallerGetNewLineLengths=i.reflowLargerApplyNewLayout=i.reflowLargerCreateNewLayout=i.reflowLargerGetLinesToRemove=void 0,i.reflowLargerGetLinesToRemove=function(u,d,_,p,m){const k=[];for(let x=0;x=x&&p0&&(E>y||w[E].getTrimmedLength()===0);E--)A++;A>0&&(k.push(x+w.length-A),k.push(A)),x+=w.length-1}return k},i.reflowLargerCreateNewLayout=function(u,d){const _=[];let p=0,m=d[p],k=0;for(let x=0;xc(u,w,d))).reduce(((b,w)=>b+w));let k=0,x=0,v=0;for(;vb&&(k-=b,x++);const w=u[x].getWidth(k-1)===2;w&&k--;const y=w?_-1:_;p.push(y),v+=y}return p},i.getWrappedLineTrimmedLength=c},5295:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferSet=void 0;const u=c(8460),d=c(844),_=c(9092);class p extends d.Disposable{constructor(k,x){super(),this._optionsService=k,this._bufferService=x,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(k){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(k),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(k,x){this._normal.resize(k,x),this._alt.resize(k,x),this.setupTabStops(k)}setupTabStops(k){this._normal.setupTabStops(k),this._alt.setupTabStops(k)}}i.BufferSet=p},511:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CellData=void 0;const u=c(482),d=c(643),_=c(3734);class p extends _.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new _.ExtendedAttrs,this.combinedData=""}static fromCharData(k){const x=new p;return x.setFromCharData(k),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(k){this.fg=k[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(k[d.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(k[d.CHAR_DATA_CHAR_INDEX].length===2){const v=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|k[d.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[d.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=k[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.CellData=p},643:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WHITESPACE_CELL_CODE=i.WHITESPACE_CELL_WIDTH=i.WHITESPACE_CELL_CHAR=i.NULL_CELL_CODE=i.NULL_CELL_WIDTH=i.NULL_CELL_CHAR=i.CHAR_DATA_CODE_INDEX=i.CHAR_DATA_WIDTH_INDEX=i.CHAR_DATA_CHAR_INDEX=i.CHAR_DATA_ATTR_INDEX=i.DEFAULT_EXT=i.DEFAULT_ATTR=i.DEFAULT_COLOR=void 0,i.DEFAULT_COLOR=0,i.DEFAULT_ATTR=256|i.DEFAULT_COLOR<<9,i.DEFAULT_EXT=0,i.CHAR_DATA_ATTR_INDEX=0,i.CHAR_DATA_CHAR_INDEX=1,i.CHAR_DATA_WIDTH_INDEX=2,i.CHAR_DATA_CODE_INDEX=3,i.NULL_CELL_CHAR="",i.NULL_CELL_WIDTH=1,i.NULL_CELL_CODE=0,i.WHITESPACE_CELL_CHAR=" ",i.WHITESPACE_CELL_WIDTH=1,i.WHITESPACE_CELL_CODE=32},4863:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Marker=void 0;const u=c(8460),d=c(844);class _{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=_._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,d.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}i.Marker=_,_._nextId=1},7116:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CHARSET=i.CHARSETS=void 0,i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=void 0,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,i)=>{var c,u,d;Object.defineProperty(i,"__esModule",{value:!0}),i.C1_ESCAPED=i.C1=i.C0=void 0,(function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=` +`,_.VT="\v",_.FF="\f",_.CR="\r",_.SO="",_.SI="",_.DLE="",_.DC1="",_.DC2="",_.DC3="",_.DC4="",_.NAK="",_.SYN="",_.ETB="",_.CAN="",_.EM="",_.SUB="",_.ESC="\x1B",_.FS="",_.GS="",_.RS="",_.US="",_.SP=" ",_.DEL=""})(c||(i.C0=c={})),(function(_){_.PAD="€",_.HOP="",_.BPH="‚",_.NBH="ƒ",_.IND="„",_.NEL="…",_.SSA="†",_.ESA="‡",_.HTS="ˆ",_.HTJ="‰",_.VTS="Š",_.PLD="‹",_.PLU="Œ",_.RI="",_.SS2="Ž",_.SS3="",_.DCS="",_.PU1="‘",_.PU2="’",_.STS="“",_.CCH="”",_.MW="•",_.SPA="–",_.EPA="—",_.SOS="˜",_.SGCI="™",_.SCI="š",_.CSI="›",_.ST="œ",_.OSC="",_.PM="ž",_.APC="Ÿ"})(u||(i.C1=u={})),(function(_){_.ST=`${c.ESC}\\`})(d||(i.C1_ESCAPED=d={}))},7399:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.evaluateKeyboardEvent=void 0;const u=c(2584),d={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};i.evaluateKeyboardEvent=function(_,p,m,k){const x={type:0,cancel:!1,key:void 0},v=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?x.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?x.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?x.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(x.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:x.key=_.ctrlKey?"\b":u.C0.DEL,_.altKey&&(x.key=u.C0.ESC+x.key);break;case 9:if(_.shiftKey){x.key=u.C0.ESC+"[Z";break}x.key=u.C0.HT,x.cancel=!0;break;case 13:x.key=_.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,x.cancel=!0;break;case 27:x.key=u.C0.ESC,_.altKey&&(x.key=u.C0.ESC+u.C0.ESC),x.cancel=!0;break;case 37:if(_.metaKey)break;v?(x.key=u.C0.ESC+"[1;"+(v+1)+"D",x.key===u.C0.ESC+"[1;3D"&&(x.key=u.C0.ESC+(m?"b":"[1;5D"))):x.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(_.metaKey)break;v?(x.key=u.C0.ESC+"[1;"+(v+1)+"C",x.key===u.C0.ESC+"[1;3C"&&(x.key=u.C0.ESC+(m?"f":"[1;5C"))):x.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(_.metaKey)break;v?(x.key=u.C0.ESC+"[1;"+(v+1)+"A",m||x.key!==u.C0.ESC+"[1;3A"||(x.key=u.C0.ESC+"[1;5A")):x.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(_.metaKey)break;v?(x.key=u.C0.ESC+"[1;"+(v+1)+"B",m||x.key!==u.C0.ESC+"[1;3B"||(x.key=u.C0.ESC+"[1;5B")):x.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(x.key=u.C0.ESC+"[2~");break;case 46:x.key=v?u.C0.ESC+"[3;"+(v+1)+"~":u.C0.ESC+"[3~";break;case 36:x.key=v?u.C0.ESC+"[1;"+(v+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:x.key=v?u.C0.ESC+"[1;"+(v+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:_.shiftKey?x.type=2:_.ctrlKey?x.key=u.C0.ESC+"[5;"+(v+1)+"~":x.key=u.C0.ESC+"[5~";break;case 34:_.shiftKey?x.type=3:_.ctrlKey?x.key=u.C0.ESC+"[6;"+(v+1)+"~":x.key=u.C0.ESC+"[6~";break;case 112:x.key=v?u.C0.ESC+"[1;"+(v+1)+"P":u.C0.ESC+"OP";break;case 113:x.key=v?u.C0.ESC+"[1;"+(v+1)+"Q":u.C0.ESC+"OQ";break;case 114:x.key=v?u.C0.ESC+"[1;"+(v+1)+"R":u.C0.ESC+"OR";break;case 115:x.key=v?u.C0.ESC+"[1;"+(v+1)+"S":u.C0.ESC+"OS";break;case 116:x.key=v?u.C0.ESC+"[15;"+(v+1)+"~":u.C0.ESC+"[15~";break;case 117:x.key=v?u.C0.ESC+"[17;"+(v+1)+"~":u.C0.ESC+"[17~";break;case 118:x.key=v?u.C0.ESC+"[18;"+(v+1)+"~":u.C0.ESC+"[18~";break;case 119:x.key=v?u.C0.ESC+"[19;"+(v+1)+"~":u.C0.ESC+"[19~";break;case 120:x.key=v?u.C0.ESC+"[20;"+(v+1)+"~":u.C0.ESC+"[20~";break;case 121:x.key=v?u.C0.ESC+"[21;"+(v+1)+"~":u.C0.ESC+"[21~";break;case 122:x.key=v?u.C0.ESC+"[23;"+(v+1)+"~":u.C0.ESC+"[23~";break;case 123:x.key=v?u.C0.ESC+"[24;"+(v+1)+"~":u.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(m&&!k||!_.altKey||_.metaKey)!m||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?x.key=_.key:_.key&&_.ctrlKey&&(_.key==="_"&&(x.key=u.C0.US),_.key==="@"&&(x.key=u.C0.NUL)):_.keyCode===65&&(x.type=1);else{const b=d[_.keyCode],w=b==null?void 0:b[_.shiftKey?1:0];if(w)x.key=u.C0.ESC+w;else if(_.keyCode>=65&&_.keyCode<=90){const y=_.ctrlKey?_.keyCode-64:_.keyCode+32;let S=String.fromCharCode(y);_.shiftKey&&(S=S.toUpperCase()),x.key=u.C0.ESC+S}else if(_.keyCode===32)x.key=u.C0.ESC+(_.ctrlKey?u.C0.NUL:" ");else if(_.key==="Dead"&&_.code.startsWith("Key")){let y=_.code.slice(3,4);_.shiftKey||(y=y.toLowerCase()),x.key=u.C0.ESC+y,x.cancel=!0}}else _.keyCode>=65&&_.keyCode<=90?x.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?x.key=u.C0.NUL:_.keyCode>=51&&_.keyCode<=55?x.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?x.key=u.C0.DEL:_.keyCode===219?x.key=u.C0.ESC:_.keyCode===220?x.key=u.C0.FS:_.keyCode===221&&(x.key=u.C0.GS)}return x}},482:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Utf8ToUtf32=i.StringToUtf32=i.utf32ToString=i.stringFromCodePoint=void 0,i.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},i.utf32ToString=function(c,u=0,d=c.length){let _="";for(let p=u;p65535?(m-=65536,_+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):_+=String.fromCharCode(m)}return _},i.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const d=c.length;if(!d)return 0;let _=0,p=0;if(this._interim){const m=c.charCodeAt(p++);56320<=m&&m<=57343?u[_++]=1024*(this._interim-55296)+m-56320+65536:(u[_++]=this._interim,u[_++]=m),this._interim=0}for(let m=p;m=d)return this._interim=k,_;const x=c.charCodeAt(m);56320<=x&&x<=57343?u[_++]=1024*(k-55296)+x-56320+65536:(u[_++]=k,u[_++]=x)}else k!==65279&&(u[_++]=k)}return _}},i.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const d=c.length;if(!d)return 0;let _,p,m,k,x=0,v=0,b=0;if(this.interim[0]){let S=!1,z=this.interim[0];z&=(224&z)==192?31:(240&z)==224?15:7;let N,A=0;for(;(N=63&this.interim[++A])&&A<4;)z<<=6,z|=N;const E=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=E-A;for(;b=d)return 0;if(N=c[b++],(192&N)!=128){b--,S=!0;break}this.interim[A++]=N,z<<=6,z|=63&N}S||(E===2?z<128?b--:u[x++]=z:E===3?z<2048||z>=55296&&z<=57343||z===65279||(u[x++]=z):z<65536||z>1114111||(u[x++]=z)),this.interim.fill(0)}const w=d-4;let y=b;for(;y=d)return this.interim[0]=_,x;if(p=c[y++],(192&p)!=128){y--;continue}if(v=(31&_)<<6|63&p,v<128){y--;continue}u[x++]=v}else if((240&_)==224){if(y>=d)return this.interim[0]=_,x;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,x;if(m=c[y++],(192&m)!=128){y--;continue}if(v=(15&_)<<12|(63&p)<<6|63&m,v<2048||v>=55296&&v<=57343||v===65279)continue;u[x++]=v}else if((248&_)==240){if(y>=d)return this.interim[0]=_,x;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,x;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,this.interim[2]=m,x;if(k=c[y++],(192&k)!=128){y--;continue}if(v=(7&_)<<18|(63&p)<<12|(63&m)<<6|63&k,v<65536||v>1114111)continue;u[x++]=v}}return x}}},225:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;const u=c(1480),d=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],_=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;i.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let m=0;mx[w][1])return!1;for(;w>=b;)if(v=b+w>>1,k>x[v][1])b=v+1;else{if(!(k=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,k){let x=this.wcwidth(m),v=x===0&&k!==0;if(v){const b=u.UnicodeService.extractWidth(k);b===0?v=!1:b>x&&(x=b)}return u.UnicodeService.createPropertyValue(0,x,v)}}},5981:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WriteBuffer=void 0;const u=c(8460),d=c(844);class _ extends d.Disposable{constructor(m){super(),this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(m,k){if(k!==void 0&&this._syncCalls>k)return void(this._syncCalls=0);if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(m,k){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(k),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(k)}_innerWrite(m=0,k=!0){const x=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],b=this._action(v,k);if(b){const y=S=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,S))):this._innerWrite(x,S);return void b.catch((S=>(queueMicrotask((()=>{throw S})),Promise.resolve(!1)))).then(y)}const w=this._callbacks[this._bufferOffset];if(w&&w(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-x>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}i.WriteBuffer=_},5941:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.toRgbString=i.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function d(_,p){const m=_.toString(16),k=m.length<2?"0"+m:m;switch(p){case 4:return m[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}i.parseColor=function(_){if(!_)return;let p=_.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=c.exec(p);if(m){const k=m[1]?15:m[4]?255:m[7]?4095:65535;return[Math.round(parseInt(m[1]||m[4]||m[7]||m[10],16)/k*255),Math.round(parseInt(m[2]||m[5]||m[8]||m[11],16)/k*255),Math.round(parseInt(m[3]||m[6]||m[9]||m[12],16)/k*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),u.exec(p)&&[3,6,9,12].includes(p.length))){const m=p.length/3,k=[0,0,0];for(let x=0;x<3;++x){const v=parseInt(p.slice(m*x,m*x+m),16);k[x]=m===1?v<<4:m===2?v:m===3?v>>4:v>>8}return k}},i.toRgbString=function(_,p=16){const[m,k,x]=_;return`rgb:${d(m,p)}/${d(k,p)}/${d(x,p)}`}},5770:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.PAYLOAD_LIMIT=void 0,i.PAYLOAD_LIMIT=1e7},6351:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DcsHandler=i.DcsParser=void 0;const u=c(482),d=c(8742),_=c(5770),p=[];i.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(k,x){this._handlers[k]===void 0&&(this._handlers[k]=[]);const v=this._handlers[k];return v.push(x),{dispose:()=>{const b=v.indexOf(x);b!==-1&&v.splice(b,1)}}}clearHandler(k){this._handlers[k]&&delete this._handlers[k]}setHandlerFallback(k){this._handlerFb=k}reset(){if(this._active.length)for(let k=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;k>=0;--k)this._active[k].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(k,x){if(this.reset(),this._ident=k,this._active=this._handlers[k]||p,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(k,x,v){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(k,x,v);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(k,x,v))}unhook(k,x=!0){if(this._active.length){let v=!1,b=this._active.length-1,w=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=x,w=this._stack.fallThrough,this._stack.paused=!1),!w&&v===!1){for(;b>=0&&(v=this._active[b].unhook(k),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",k);this._active=p,this._ident=0}};const m=new d.Params;m.addParam(0),i.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=m,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():m,this._data="",this._hitLimit=!1}put(k,x,v){this._hitLimit||(this._data+=(0,u.utf32ToString)(k,x,v),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(k){let x=!1;if(this._hitLimit)x=!1;else if(k&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then((v=>(this._params=m,this._data="",this._hitLimit=!1,v)));return this._params=m,this._data="",this._hitLimit=!1,x}}},2015:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.EscapeSequenceParser=i.VT500_TRANSITION_TABLE=i.TransitionTable=void 0;const u=c(844),d=c(8742),_=c(6242),p=c(6351);class m{constructor(b){this.table=new Uint8Array(b)}setDefault(b,w){this.table.fill(b<<4|w)}add(b,w,y,S){this.table[w<<8|b]=y<<4|S}addMany(b,w,y,S){for(let z=0;zE)),w=(A,E)=>b.slice(A,E),y=w(32,127),S=w(0,24);S.push(25),S.push.apply(S,w(28,32));const z=w(0,14);let N;for(N in v.setDefault(1,0),v.addMany(y,0,2,0),z)v.addMany([24,26,153,154],N,3,0),v.addMany(w(128,144),N,3,0),v.addMany(w(144,152),N,3,0),v.add(156,N,0,0),v.add(27,N,11,1),v.add(157,N,4,8),v.addMany([152,158,159],N,0,7),v.add(155,N,11,3),v.add(144,N,11,9);return v.addMany(S,0,3,0),v.addMany(S,1,3,1),v.add(127,1,0,1),v.addMany(S,8,0,8),v.addMany(S,3,3,3),v.add(127,3,0,3),v.addMany(S,4,3,4),v.add(127,4,0,4),v.addMany(S,6,3,6),v.addMany(S,5,3,5),v.add(127,5,0,5),v.addMany(S,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(y,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(w(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(y,7,0,7),v.addMany(S,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(w(64,127),3,7,0),v.addMany(w(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(w(48,60),4,8,4),v.addMany(w(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(w(32,64),6,0,6),v.add(127,6,0,6),v.addMany(w(64,127),6,0,0),v.addMany(w(32,48),3,9,5),v.addMany(w(32,48),5,9,5),v.addMany(w(48,64),5,0,6),v.addMany(w(64,127),5,7,0),v.addMany(w(32,48),4,9,5),v.addMany(w(32,48),1,9,2),v.addMany(w(32,48),2,9,2),v.addMany(w(48,127),2,10,0),v.addMany(w(48,80),1,10,0),v.addMany(w(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(w(96,127),1,10,0),v.add(80,1,11,9),v.addMany(S,9,0,9),v.add(127,9,0,9),v.addMany(w(28,32),9,0,9),v.addMany(w(32,48),9,9,12),v.addMany(w(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(S,11,0,11),v.addMany(w(32,128),11,0,11),v.addMany(w(28,32),11,0,11),v.addMany(S,10,0,10),v.add(127,10,0,10),v.addMany(w(28,32),10,0,10),v.addMany(w(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(w(32,48),10,9,12),v.addMany(S,12,0,12),v.add(127,12,0,12),v.addMany(w(28,32),12,0,12),v.addMany(w(32,48),12,9,12),v.addMany(w(48,64),12,0,11),v.addMany(w(64,127),12,12,13),v.addMany(w(64,127),10,12,13),v.addMany(w(64,127),9,12,13),v.addMany(S,13,13,13),v.addMany(y,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(k,0,2,0),v.add(k,8,5,8),v.add(k,6,0,6),v.add(k,11,0,11),v.add(k,13,13,13),v})();class x extends u.Disposable{constructor(b=i.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new d.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(w,y,S)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,y)=>{},this._escHandlerFb=w=>{},this._errorHandlerFb=w=>w,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new _.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,w=[64,126]){let y=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=b.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let z=0;zN||N>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=N}}if(b.final.length!==1)throw new Error("final must be a single byte");const S=b.final.charCodeAt(0);if(w[0]>S||S>w[1])throw new Error(`final must be in range ${w[0]} .. ${w[1]}`);return y<<=8,y|=S,y}identToString(b){const w=[];for(;b;)w.push(String.fromCharCode(255&b)),b>>=8;return w.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,w){const y=this._identifier(b,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const S=this._escHandlers[y];return S.push(w),{dispose:()=>{const z=S.indexOf(w);z!==-1&&S.splice(z,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,w){this._executeHandlers[b.charCodeAt(0)]=w}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,w){const y=this._identifier(b);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const S=this._csiHandlers[y];return S.push(w),{dispose:()=>{const z=S.indexOf(w);z!==-1&&S.splice(z,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,w){return this._dcsParser.registerHandler(this._identifier(b),w)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,w){return this._oscParser.registerHandler(b,w)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(b,w,y,S,z){this._parseStack.state=b,this._parseStack.handlers=w,this._parseStack.handlerPos=y,this._parseStack.transition=S,this._parseStack.chunkPos=z}parse(b,w,y){let S,z=0,N=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const E=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&M>-1){for(;M>=0&&(S=E[M](this._params),S!==!0);M--)if(S instanceof Promise)return this._parseStack.handlerPos=M,S}this._parseStack.handlers=[];break;case 4:if(y===!1&&M>-1){for(;M>=0&&(S=E[M](),S!==!0);M--)if(S instanceof Promise)return this._parseStack.handlerPos=M,S}this._parseStack.handlers=[];break;case 6:if(z=b[this._parseStack.chunkPos],S=this._dcsParser.unhook(z!==24&&z!==26,y),S)return S;z===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(z=b[this._parseStack.chunkPos],S=this._oscParser.end(z!==24&&z!==26,y),S)return S;z===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let E=A;E>4){case 2:for(let G=E+1;;++G){if(G>=w||(z=b[G])<32||z>126&&z=w||(z=b[G])<32||z>126&&z=w||(z=b[G])<32||z>126&&z=w||(z=b[G])<32||z>126&&z=0&&(S=M[$](this._params),S!==!0);$--)if(S instanceof Promise)return this._preserveStack(3,M,$,N,E),S;$<0&&this._csiHandlerFb(this._collect<<8|z,this._params),this.precedingJoinState=0;break;case 8:do switch(z){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(z-48)}while(++E47&&z<60);E--;break;case 9:this._collect<<=8,this._collect|=z;break;case 10:const D=this._escHandlers[this._collect<<8|z];let I=D?D.length-1:-1;for(;I>=0&&(S=D[I](),S!==!0);I--)if(S instanceof Promise)return this._preserveStack(4,D,I,N,E),S;I<0&&this._escHandlerFb(this._collect<<8|z),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|z,this._params);break;case 13:for(let G=E+1;;++G)if(G>=w||(z=b[G])===24||z===26||z===27||z>127&&z=w||(z=b[G])<32||z>127&&z{Object.defineProperty(i,"__esModule",{value:!0}),i.OscHandler=i.OscParser=void 0;const u=c(5770),d=c(482),_=[];i.OscParser=class{constructor(){this._state=0,this._active=_,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,m){this._handlers[p]===void 0&&(this._handlers[p]=[]);const k=this._handlers[p];return k.push(m),{dispose:()=>{const x=k.indexOf(m);x!==-1&&k.splice(x,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=_,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||_,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,m,k){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(p,m,k);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(p,m,k))}start(){this.reset(),this._state=1}put(p,m,k){if(this._state!==3){if(this._state===1)for(;m0&&this._put(p,m,k)}}end(p,m=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let k=!1,x=this._active.length-1,v=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,k=m,v=this._stack.fallThrough,this._stack.paused=!1),!v&&k===!1){for(;x>=0&&(k=this._active[x].end(p),k!==!0);x--)if(k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,k;x--}for(;x>=0;x--)if(k=this._active[x].end(!1),k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,k}else this._handlerFb(this._id,"END",p);this._active=_,this._id=-1,this._state=0}}},i.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,m,k){this._hitLimit||(this._data+=(0,d.utf32ToString)(p,m,k),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let m=!1;if(this._hitLimit)m=!1;else if(p&&(m=this._handler(this._data),m instanceof Promise))return m.then((k=>(this._data="",this._hitLimit=!1,k)));return this._data="",this._hitLimit=!1,m}}},8742:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Params=void 0;const c=2147483647;class u{static fromArray(_){const p=new u;if(!_.length)return p;for(let m=Array.isArray(_[0])?1:0;m<_.length;++m){const k=_[m];if(Array.isArray(k))for(let x=0;x256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const _=new u(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_}toArray(){const _=[];for(let p=0;p>8,k=255&this._subParamsIdx[p];k-m>0&&_.push(Array.prototype.slice.call(this._subParams,m,k))}return _}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>c?c:_}}addSubParam(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>c?c:_,this._subParamsIdx[this.length-1]++}}hasSubParams(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0}getSubParams(_){const p=this._subParamsIdx[_]>>8,m=255&this._subParamsIdx[_];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const _={};for(let p=0;p>8,k=255&this._subParamsIdx[p];k-m>0&&(_[p]=this._subParams.slice(m,k))}return _}addDigit(_){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const m=this._digitIsSub?this._subParams:this.params,k=m[p-1];m[p-1]=~k?Math.min(10*k+_,c):_}}i.Params=u},5741:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AddonManager=void 0,i.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const d={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(d),u.dispose=()=>this._wrappedAddonDispose(d),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let d=0;d{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferApiView=void 0;const u=c(3785),d=c(511);i.BufferApiView=class{constructor(_,p){this._buffer=_,this.type=p}init(_){return this._buffer=_,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(_){const p=this._buffer.lines.get(_);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new d.CellData}}},3785:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLineApiView=void 0;const u=c(511);i.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,_){if(!(d<0||d>=this._line.length))return _?(this._line.loadCell(d,_),_):this._line.loadCell(d,new u.CellData)}translateToString(d,_,p){return this._line.translateToString(d,_,p)}}},8285:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferNamespaceApi=void 0;const u=c(8771),d=c(8460),_=c(844);class p extends _.Disposable{constructor(k){super(),this._core=k,this._onBufferChange=this.register(new d.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}i.BufferNamespaceApi=p},7975:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ParserApi=void 0,i.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,(d=>u(d.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((d,_)=>u(d,_.toArray())))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeApi=void 0,i.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(a,i,c){var u=this&&this.__decorate||function(v,b,w,y){var S,z=arguments.length,N=z<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(v,b,w,y);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(N=(z<3?S(N):z>3?S(b,w,N):S(b,w))||N);return z>3&&N&&Object.defineProperty(b,w,N),N},d=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferService=i.MINIMUM_ROWS=i.MINIMUM_COLS=void 0;const _=c(8460),p=c(844),m=c(5295),k=c(2585);i.MINIMUM_COLS=2,i.MINIMUM_ROWS=1;let x=i.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,i.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,i.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(v,this))}resize(v,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const w=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===v.fg&&y.getBg(0)===v.bg||(y=w.getBlankLine(v,b),this._cachedBlankLine=y),y.isWrapped=b;const S=w.ybase+w.scrollTop,z=w.ybase+w.scrollBottom;if(w.scrollTop===0){const N=w.lines.isFull;z===w.lines.length-1?N?w.lines.recycle().copyFrom(y):w.lines.push(y.clone()):w.lines.splice(z+1,0,y.clone()),N?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{const N=z-S+1;w.lines.shiftElements(S+1,N-1,-1),w.lines.set(z,y.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(v,b,w){const y=this.buffer;if(v<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else v+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const S=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+v,y.ybase),0),S!==y.ydisp&&(b||this._onScroll.fire(y.ydisp))}};i.BufferService=x=u([d(0,k.IOptionsService)],x)},7994:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CharsetService=void 0,i.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(a,i,c){var u=this&&this.__decorate||function(y,S,z,N){var A,E=arguments.length,M=E<3?S:N===null?N=Object.getOwnPropertyDescriptor(S,z):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,S,z,N);else for(var $=y.length-1;$>=0;$--)(A=y[$])&&(M=(E<3?A(M):E>3?A(S,z,M):A(S,z))||M);return E>3&&M&&Object.defineProperty(S,z,M),M},d=this&&this.__param||function(y,S){return function(z,N){S(z,N,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreMouseService=void 0;const _=c(2585),p=c(8460),m=c(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function x(y,S){let z=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(z|=64,z|=y.action):(z|=3&y.button,4&y.button&&(z|=64),8&y.button&&(z|=128),y.action===32?z|=32:y.action!==0||S||(z|=3)),z}const v=String.fromCharCode,b={DEFAULT:y=>{const S=[x(y,!1)+32,y.col+32,y.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${v(S[0])}${v(S[1])}${v(S[2])}`},SGR:y=>{const S=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.col};${y.row}${S}`},SGR_PIXELS:y=>{const S=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.x};${y.y}${S}`}};let w=i.CoreMouseService=class extends m.Disposable{constructor(y,S){super(),this._bufferService=y,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const z of Object.keys(k))this.addProtocol(z,k[z]);for(const z of Object.keys(b))this.addEncoding(z,b[z]);this.reset()}addProtocol(y,S){this._protocols[y]=S}addEncoding(y,S){this._encodings[y]=S}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const S=this._encodings[this._activeEncoding](y);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,S,z){if(z){if(y.x!==S.x||y.y!==S.y)return!1}else if(y.col!==S.col||y.row!==S.row)return!1;return y.button===S.button&&y.action===S.action&&y.ctrl===S.ctrl&&y.alt===S.alt&&y.shift===S.shift}};i.CoreMouseService=w=u([d(0,_.IBufferService),d(1,_.ICoreService)],w)},6975:function(a,i,c){var u=this&&this.__decorate||function(w,y,S,z){var N,A=arguments.length,E=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(w,y,S,z);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(E=(A<3?N(E):A>3?N(y,S,E):N(y,S))||E);return A>3&&E&&Object.defineProperty(y,S,E),E},d=this&&this.__param||function(w,y){return function(S,z){y(S,z,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreService=void 0;const _=c(1439),p=c(8460),m=c(844),k=c(2585),x=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=i.CoreService=class extends m.Disposable{constructor(w,y,S){super(),this._bufferService=w,this._logService=y,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,_.clone)(x),this.decPrivateModes=(0,_.clone)(v)}reset(){this.modes=(0,_.clone)(x),this.decPrivateModes=(0,_.clone)(v)}triggerDataEvent(w,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,(()=>w.split("").map((z=>z.charCodeAt(0))))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,(()=>w.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(w))}};i.CoreService=b=u([d(0,k.IBufferService),d(1,k.ILogService),d(2,k.IOptionsService)],b)},9074:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DecorationService=void 0;const u=c(8055),d=c(8460),_=c(844),p=c(6106);let m=0,k=0;class x extends _.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((w=>w==null?void 0:w.marker.line)),this._onDecorationRegistered=this.register(new d.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new d.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,_.toDisposable)((()=>this.reset())))}registerDecoration(w){if(w.marker.isDisposed)return;const y=new v(w);if(y){const S=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),S.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,y,S){let z=0,N=0;for(const A of this._decorations.getKeyIterator(y))z=A.options.x??0,N=z+(A.options.width??1),w>=z&&w{m=N.options.x??0,k=m+(N.options.width??1),w>=m&&w{Object.defineProperty(i,"__esModule",{value:!0}),i.InstantiationService=i.ServiceCollection=void 0;const u=c(2585),d=c(8343);class _{constructor(...m){this._entries=new Map;for(const[k,x]of m)this.set(k,x)}set(m,k){const x=this._entries.get(m);return this._entries.set(m,k),x}forEach(m){for(const[k,x]of this._entries.entries())m(k,x)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}i.ServiceCollection=_,i.InstantiationService=class{constructor(){this._services=new _,this._services.set(u.IInstantiationService,this)}setService(p,m){this._services.set(p,m)}getService(p){return this._services.get(p)}createInstance(p,...m){const k=(0,d.getServiceDependencies)(p).sort(((b,w)=>b.index-w.index)),x=[];for(const b of k){const w=this._services.get(b.id);if(!w)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${b.id}.`);x.push(w)}const v=k.length>0?k[0].index:m.length;if(m.length!==v)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${v+1} conflicts with ${m.length} static arguments`);return new p(...m,...x)}}},7866:function(a,i,c){var u=this&&this.__decorate||function(v,b,w,y){var S,z=arguments.length,N=z<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(v,b,w,y);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(N=(z<3?S(N):z>3?S(b,w,N):S(b,w))||N);return z>3&&N&&Object.defineProperty(b,w,N),N},d=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.traceCall=i.setTraceLogger=i.LogService=void 0;const _=c(844),p=c(2585),m={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let k,x=i.LogService=class extends _.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),k=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let b=0;bJSON.stringify(N))).join(", ")})`);const z=y.apply(this,S);return k.trace(`GlyphRenderer#${y.name} return`,z),z}}},7302:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OptionsService=i.DEFAULT_OPTIONS=void 0;const u=c(8460),d=c(844),_=c(6114);i.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:_.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class m extends d.Disposable{constructor(x){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...i.DEFAULT_OPTIONS};for(const b in x)if(b in v)try{const w=x[b];v[b]=this._sanitizeAndValidateOption(b,w)}catch(w){console.error(w)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,d.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,v){return this.onOptionChange((b=>{b===x&&v(this.rawOptions[x])}))}onMultipleOptionChange(x,v){return this.onOptionChange((b=>{x.indexOf(b)!==-1&&v()}))}_setupOptions(){const x=b=>{if(!(b in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(b,w)=>{if(!(b in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);w=this._sanitizeAndValidateOption(b,w),this.rawOptions[b]!==w&&(this.rawOptions[b]=w,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const w={get:x.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,w)}}_sanitizeAndValidateOption(x,v){switch(x){case"cursorStyle":if(v||(v=i.DEFAULT_OPTIONS[x]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${x}`);break;case"wordSeparator":v||(v=i.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=p.includes(v)?v:i.DEFAULT_OPTIONS[x];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${x} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${x} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}i.OptionsService=m},2660:function(a,i,c){var u=this&&this.__decorate||function(m,k,x,v){var b,w=arguments.length,y=w<3?k:v===null?v=Object.getOwnPropertyDescriptor(k,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(m,k,x,v);else for(var S=m.length-1;S>=0;S--)(b=m[S])&&(y=(w<3?b(y):w>3?b(k,x,y):b(k,x))||y);return w>3&&y&&Object.defineProperty(k,x,y),y},d=this&&this.__param||function(m,k){return function(x,v){k(x,v,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkService=void 0;const _=c(2585);let p=i.OscLinkService=class{constructor(m){this._bufferService=m,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(m){const k=this._bufferService.buffer;if(m.id===void 0){const S=k.addMarker(k.ybase+k.y),z={data:m,id:this._nextId++,lines:[S]};return S.onDispose((()=>this._removeMarkerFromLink(z,S))),this._dataByLinkId.set(z.id,z),z.id}const x=m,v=this._getEntryIdKey(x),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,k.ybase+k.y),b.id;const w=k.addMarker(k.ybase+k.y),y={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[w]};return w.onDispose((()=>this._removeMarkerFromLink(y,w))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(m,k){const x=this._dataByLinkId.get(m);if(x&&x.lines.every((v=>v.line!==k))){const v=this._bufferService.buffer.addMarker(k);x.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(x,v)))}}getLinkData(m){var k;return(k=this._dataByLinkId.get(m))==null?void 0:k.data}_getEntryIdKey(m){return`${m.id};;${m.uri}`}_removeMarkerFromLink(m,k){const x=m.lines.indexOf(k);x!==-1&&(m.lines.splice(x,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};i.OscLinkService=p=u([d(0,_.IBufferService)],p)},8343:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createDecorator=i.getServiceDependencies=i.serviceRegistry=void 0;const c="di$target",u="di$dependencies";i.serviceRegistry=new Map,i.getServiceDependencies=function(d){return d[u]||[]},i.createDecorator=function(d){if(i.serviceRegistry.has(d))return i.serviceRegistry.get(d);const _=function(p,m,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,v,b){v[c]===v?v[u].push({id:x,index:b}):(v[u]=[{id:x,index:b}],v[c]=v)})(_,p,k)};return _.toString=()=>d,i.serviceRegistry.set(d,_),_}},2585:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.IDecorationService=i.IUnicodeService=i.IOscLinkService=i.IOptionsService=i.ILogService=i.LogLevelEnum=i.IInstantiationService=i.ICharsetService=i.ICoreService=i.ICoreMouseService=i.IBufferService=void 0;const u=c(8343);var d;i.IBufferService=(0,u.createDecorator)("BufferService"),i.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),i.ICoreService=(0,u.createDecorator)("CoreService"),i.ICharsetService=(0,u.createDecorator)("CharsetService"),i.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(_){_[_.TRACE=0]="TRACE",_[_.DEBUG=1]="DEBUG",_[_.INFO=2]="INFO",_[_.WARN=3]="WARN",_[_.ERROR=4]="ERROR",_[_.OFF=5]="OFF"})(d||(i.LogLevelEnum=d={})),i.ILogService=(0,u.createDecorator)("LogService"),i.IOptionsService=(0,u.createDecorator)("OptionsService"),i.IOscLinkService=(0,u.createDecorator)("OscLinkService"),i.IUnicodeService=(0,u.createDecorator)("UnicodeService"),i.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeService=void 0;const u=c(8460),d=c(225);class _{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,k,x=!1){return(16777215&m)<<3|(3&k)<<1|(x?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new d.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(m){if(!this._providers[m])throw new Error(`unknown Unicode version "${m}"`);this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)}register(m){this._providers[m.version]=m}wcwidth(m){return this._activeProvider.wcwidth(m)}getStringCellWidth(m){let k=0,x=0;const v=m.length;for(let b=0;b=v)return k+this.wcwidth(w);const z=m.charCodeAt(b);56320<=z&&z<=57343?w=1024*(w-55296)+z-56320+65536:k+=this.wcwidth(z)}const y=this.charProperties(w,x);let S=_.extractWidth(y);_.extractShouldJoin(y)&&(S-=_.extractWidth(x)),k+=S,x=y}return k}charProperties(m,k){return this._activeProvider.charProperties(m,k)}}i.UnicodeService=_}},n={};function s(a){var i=n[a];if(i!==void 0)return i.exports;var c=n[a]={exports:{}};return t[a].call(c.exports,c,c.exports,s),c.exports}var o={};return(()=>{var a=o;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const i=s(9042),c=s(3236),u=s(844),d=s(5741),_=s(8285),p=s(7975),m=s(7090),k=["cols","rows"];class x extends u.Disposable{constructor(b){super(),this._core=this.register(new c.Terminal(b)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const w=S=>this._core.options[S],y=(S,z)=>{this._checkReadonlyOptions(S),this._core.options[S]=z};for(const S in this._core.options){const z={get:w.bind(this,S),set:y.bind(this,S)};Object.defineProperty(this._publicOptions,S,z)}}_checkReadonlyOptions(b){if(k.includes(b))throw new Error(`Option "${b}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new m.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new _.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let w="none";switch(this._core.coreMouseService.activeProtocol){case"X10":w="x10";break;case"VT200":w="vt200";break;case"DRAG":w="drag";break;case"ANY":w="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:w,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const w in b)this._publicOptions[w]=b[w]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,w=!0){this._core.input(b,w)}resize(b,w){this._verifyIntegers(b,w),this._core.resize(b,w)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,w,y){this._verifyIntegers(b,w,y),this._core.select(b,w,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,w){this._verifyIntegers(b,w),this._core.selectLines(b,w)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,w){this._core.write(b,w)}writeln(b,w){this._core.write(b),this._core.write(`\r +`,w)}paste(b){this._core.paste(b)}refresh(b,w){this._verifyIntegers(b,w),this._core.refresh(b,w)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return i}_verifyIntegers(...b){for(const w of b)if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const w of b)if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}}a.Terminal=x})(),o})()))})(U2)),U2.exports}var ZI=TEn();const REn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function oA(e,r){const t=document.documentElement,n=getComputedStyle(t),s=a=>n.getPropertyValue(r==="app"?`--term-app-${a}`:`--term-${a}`).trim(),o={};if(r==="app"&&t.dataset.theme!=="dark")for(const a of REn){const i=n.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`).trim();i&&(o[a]=i)}return{...o,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function Ay(e,r,t=!1,n="dark"){const s=getComputedStyle(document.documentElement),o=new ZI.Terminal({convertEol:!0,disableStdin:r,cursorBlink:!r,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:oA(r,n)}),a=n==="app"?new MutationObserver(()=>{o.options.theme=oA(o.options.disableStdin??r,n)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const i=new EEn.FitAddon;o.loadAddon(i),t&&o.loadAddon(new AEn.WebLinksAddon((w,y)=>{let S;try{S=new URL(y)}catch{return}(S.protocol==="http:"||S.protocol==="https:")&&window.open(S,"_blank","noopener,noreferrer")}));const c=e.style.overflowY;e.style.overflowY="auto",o.open(e);let u=!0,d=null;const _=()=>{if(d===e.scrollTop){d=null;return}d=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",_);const p=()=>{var E;const w=o.element,y=w==null?void 0:w.querySelector(".xterm-screen"),S=w==null?void 0:w.querySelector(".xterm-viewport");if(!w||!(y instanceof HTMLElement)||!(S instanceof HTMLElement))return;const z=o.buffer.active;let N=Math.max(0,z.baseY+z.cursorY-z.viewportY+1);for(let M=o.rows-1;M>=N;M--)if((E=z.getLine(z.viewportY+M))!=null&&E.translateToString(!0).trim()){N=M+1;break}const A=y.getBoundingClientRect().height;w.style.height=`${Math.max(e.clientHeight,Math.min(N,o.rows)*A/o.rows)}px`,w.style.overflow="hidden",S.style.height=`${A}px`},m=()=>{try{const w=i.proposeDimensions();w&&(o.resize(w.cols,Math.max(w.rows,r?1:40)),p())}catch{}};m();const k=new ResizeObserver(m);k.observe(e);const x=o.onWriteParsed(()=>{var y;const w=u&&o.buffer.active.viewportY===o.buffer.active.baseY;if(p(),w){const S=(y=o.element)==null?void 0:y.querySelector(".xterm-screen");if(S instanceof HTMLElement){const z=(o.buffer.active.cursorY+1)*S.getBoundingClientRect().height/o.rows;e.scrollTop=Math.max(0,z-e.clientHeight),d=e.scrollTop}}}),v=o.onScroll(p),b=w=>{(w.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof r=="string")}function MEn(e){return vd(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||eP(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function OEn(e){return vd(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&eP(e.partitions)&&(e.error===null||typeof e.error=="string")}function $En(e){return!vd(e)||e.type!=="complete"?null:e.backend==="ssh"&&MEn(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&OEn(e.result)?{backend:"slurm",result:e.result}:null}function tP(e){return vd(e)&&e.type==="complete"}function DEn(e){return vd(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function vS({host:e,backend:r,path:t="/api/settings/ssh/connect",active:n=!0,onComplete:s,onError:o}){const a=new URLSearchParams({host:e,backend:r});return f.jsx(Ty,{path:`${t}?${a}`,label:SL({host:Ee(e)}),active:n,onError:o,onComplete:i=>{const c=$En(i);return c?(s(c),!0):!1}})}function LEn({login:e,onComplete:r,onError:t}){return f.jsx(Ty,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:n=>tP(n)?(r(),!0):!1})}function rP({path:e,label:r,className:t="mt-4 overflow-hidden rounded-lg border border-border",heightClass:n="h-80",onComplete:s,onError:o,onClose:a}){const[i,c]=T.useState("running");return f.jsxs("div",{className:t,children:[f.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[f.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:r}),f.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:i==="running"?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{className:"border-t-accent-amber"})," ",Obr()]}):i==="done"?f.jsxs(f.Fragment,{children:[f.jsx(_o,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",hbr()]}):i==="failed"?f.jsxs(f.Fragment,{children:[f.jsx(pn,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",jbr()]}):sbr()}),f.jsx("button",{type:"button",onClick:a,"aria-label":iN(),title:iN(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:f.jsx(pn,{size:14})})]}),f.jsx(Ty,{path:e,label:r,heightClass:n,frame:"bare",palette:"app",shellAfter:!0,onError:(u,d)=>{c("failed"),d&&o(u)},onComplete:u=>tP(u)?(c("done"),s(),!0):!1,onClosed:()=>c(u=>u==="running"?"closed":u)})]})}function Ty({path:e,label:r,command:t,heightClass:n="h-40",frame:s="card",palette:o="dark",shellAfter:a=!1,active:i=!0,awaitingApproval:c=!1,onComplete:u,onError:d,onClosed:_}){const p=T.useRef(null),m=T.useRef(null),k=T.useRef(u),x=T.useRef(d),v=T.useRef(_),[b,w]=T.useState(null);return k.current=u,x.current=d,v.current=_,T.useEffect(()=>{const y=p.current;if(!y)return;const{terminal:S,dispose:z}=Ay(y,c,!0,o);if(m.current=S,c)return t&&S.writeln(`$ ${t}`),()=>{m.current=null,z()};S.focus();const N=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${N}//${location.host}`),E=new WebSocket(A);E.binaryType="arraybuffer";let M=!1,$=!1,D=!1;const I=(Q,K)=>{var J;if($){K||S.writeln(Q);return}$=!0,(!D||a)&&S.writeln(Q),(J=x.current)==null||J.call(x,Q,K),!(a&&!K)&&(S.options.disableStdin=!0,S.blur(),w(Q))},G=S.onData(Q=>{E.readyState===WebSocket.OPEN&&E.send(new TextEncoder().encode(Q))}),H=S.onResize(({cols:Q,rows:K})=>{E.readyState===WebSocket.OPEN&&E.send(JSON.stringify({type:"resize",cols:Q,rows:K}))});return E.onopen=()=>{t&&S.writeln(`$ ${t}`),E.send(JSON.stringify({type:"resize",cols:S.cols,rows:S.rows}))},E.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){D=!0,S.write(new Uint8Array(Q.data));return}if(typeof Q.data!="string")return;let K;try{K=JSON.parse(Q.data)}catch{return}if(k.current(K)){M=!0,a||E.close();return}const J=DEn(K);J&&(M?S.writeln(J):I(J,!a))},E.onerror=()=>I(gb(),!0),E.onclose=()=>{var Q;if(!M&&!$){I(gb(),!0);return}a&&(S.options.disableStdin=!0,S.blur(),(Q=v.current)==null||Q.call(v))},()=>{E.onopen=null,E.onmessage=null,E.onerror=null,E.onclose=null,G.dispose(),H.dispose(),E.close(),m.current=null,z()}},[e,t,c,o,a]),T.useEffect(()=>{const y=m.current;y&&(y.options.disableStdin=c||!i||b!==null,!c&&i&&b===null?y.focus():y.blur())},[i,b,c]),f.jsxs("div",{className:s==="card"?"mt-3":"contents",children:[f.jsx("div",{className:`${n} ${s==="card"?JI:`overflow-hidden p-3 ${o==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":r,children:f.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),b?f.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function IEn({host:e,transcript:r}){const t=T.useRef(null);return T.useEffect(()=>{const n=t.current;if(!n)return;const{terminal:s,dispose:o}=Ay(n,!0,!0);return s.write(r),o},[r]),f.jsx("div",{className:`mt-3 h-40 ${JI}`,role:"group","aria-label":SL({host:Ee(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Cb=null,Lm=0;const nP=()=>Cb;function sP(){const e=Lm;return XI(async(r,t)=>{if(e!==Lm)return;const n=await Qjn(r,t);e===Lm&&Je.setQueryData(f0().queryKey,s=>s?{...s,workspace:n.workspace}:n)},r=>{e===Lm&&tr(r instanceof Error?r.message:String(r),"error",{id:"workspace-save",action:{label:Ks(),onClick:()=>void bS.retry()}})})}let P1=sP();function PEn(){Lm++,Cb=null,P1=sP()}const bS={flush:(e=!1)=>P1.flush(e),retry:()=>P1.retry(),queue(e,r=0){const t=Cb;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Cb=e,P1.queue(e,r))}};window.addEventListener("pagehide",()=>void bS.flush(!0));function Yl(e,r){if(typeof e=="string")return{kind:"home",view:e};if("code"in e)return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};if("kind"in e)return e.kind==="plan"?{kind:"plan",sessionId:e.sessionId,promptId:e.promptId}:e.kind==="side"?{kind:"side",sessionId:e.sessionId}:{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};if("path"in e)return{kind:"file",path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};const t=r===void 0?e.runId:r;return{kind:"experiment",experimentId:e.id,view:e.view,...t?{runId:t}:{}}}function Ki(e){switch(e.kind){case"home":return e.view;case"experiment":return{id:e.experimentId,view:e.view,...e.runId?{runId:e.runId}:{}};case"file":return{path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};case"code":return{code:!0,experimentId:e.experimentId,branch:e.branch,view:e.view,toggled:new Set};case"plan":return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId,plan:""};case"subagent":return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};case"side":return{kind:"side",sessionId:e.sessionId}}}function oP(e,r,t){const n=[];e.filesTabOpen&&n.push("files"),e.terminalTabOpen&&n.push("terminal"),e.artifactsTabOpen&&n.push("artifacts"),e.experimentsTabOpen&&n.push("experiments");const s=[...e.expTabs,...e.fileTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs,...e.codeTabs],o=new Map(s.map(u=>[Bt(u),u])),a=e.contentTabOrder.flatMap(u=>{const d=o.get(u);return d?[d]:[]}),i=Bt(e.rightTab);return{tabs:[...n,...a].map(u=>Yl(u,Bt(u)===i?e.selectedRunId:void 0)),active:e.panelOpen?Yl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Bt(e.previewTab):null,history:e.tabHistory.map(Bt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Bt(u),[...u.toggled]])]),scroll:r,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function BEn(e,r){const t=xS();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const n=[...(e==null?void 0:e.tabs)??[]];if(r){const o=n.findIndex(a=>Bt(Ki(a))===Bt(Ki(r)));o===-1?n.push(r):n[o]=r}for(const o of n){const a=Ki(o);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[Bt(a)])??[]),t.codeTabs.push(a)):"path"in a?t.fileTabs.push(a):"kind"in a?a.kind==="plan"?t.planTabs.push(a):a.kind==="side"?t.sideTabs.push(a):t.subagentTabs.push(a):t.expTabs.push(a),t.contentTabOrder.push(Bt(a))}const s=new Map(n.map(o=>{const a=Ki(o);return[Bt(a),a]}));return t.tabHistory=((e==null?void 0:e.history)??[]).flatMap(o=>{const a=s.get(o);return a?[a]:[]}),t.previewTab=e!=null&&e.previewKey?s.get(e.previewKey)??null:null,t.rightTab=r?Ki(r):e!=null&&e.active?Ki(e.active):"experiments",t.panelOpen=r!==void 0,t.selectedRunId=(r==null?void 0:r.kind)==="experiment"?r.runId??null:null,iP(t,r)}const G2=(e,r)=>e.id===r.id&&e.view===r.view,cf=(e,r)=>e.path===r.path&&(e.source??"repo")===(r.source??"repo")&&e.sessionId===r.sessionId&&e.ref===r.ref,yS=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,uo=(e,r,t)=>`${e}:${r??""}:${yS(t)}`,aP=e=>({...e,lineScrollRequest:void 0});function Kv(e){return typeof e=="object"&&"path"in e?aP(e):e}const nh=(e,r)=>e.branch===r.branch;function Bt(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:e.kind==="side"?`side:${e.sessionId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${yS(e)}`:`experiment:${e.id}:${e.view}`}function wm(e,r){const t=e.filter(n=>Bt(n)!==r);return t.length===e.length?e:t}function FEn(e){return e!==void 0}function xS(e,r=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],sideTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===zh&&r){const n="experiments";return{...t,rightTab:n,tabHistory:[n],experimentsTabOpen:!0,panelOpen:!0}}return t}function wS(e,r){const t=xS(e,r);return t.panelOpen?oP(t,{},{}):void 0}function iP(e,r){if(!r)return e;const t=Ki(r),n=Bt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs].find(c=>Bt(c)===n),o=(c,u)=>{const d=c.findIndex(_=>Bt(_)===n);return d<0?[...c,u]:JSON.stringify(Yl(c[d]))===JSON.stringify(Yl(u))?c:c.map((_,p)=>p===d?{..._,...u}:_)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!0:a.experimentsTabOpen=!0:("path"in t?a.fileTabs=o(e.fileTabs,t):"id"in t?a.expTabs=o(e.expTabs,{...t,runId:r.kind==="experiment"?r.runId:void 0}):"code"in t?a.codeTabs=o(e.codeTabs,{...t,toggled:s&&"code"in s?s.toggled:t.toggled}):t.kind==="plan"?a.planTabs=o(e.planTabs,t):t.kind==="side"?a.sideTabs=o(e.sideTabs,t):a.subagentTabs=o(e.subagentTabs,t),e.contentTabOrder.includes(n)||(a.contentTabOrder=[...e.contentTabOrder,n]));const i=e.tabHistory.at(-1);return i&&Bt(i)===n&&JSON.stringify(Yl(i))===JSON.stringify(Yl(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Bt(c)!==n),t]),a}let Vi=0;const mg=new Map,zb=new Map,R3=new Set,M3=()=>{for(const e of R3)e()},HEn=e=>(R3.add(e),()=>{R3.delete(e)}),gg=new Map,Qi=new Map,cP=e=>Qi.get(e);function qEn(){Vi++,Qi.clear(),gg.clear(),mg.clear(),zb.clear(),M3()}function UEn(e,r){const t=Qi.get(e);if(!(t!=null&&t.tasks.new)||v_(t,r))return;const n=t.tasks.new,s=a=>Object.fromEntries(n.tabs.flatMap(i=>{if(i.kind!=="file")return[];const c=Ki(i);if(typeof c=="string"||!("path"in c))return[];const u=uo(e,null,c);return u in a?[[uo(e,r,c),a[u]]]:[]})),o={...t.tasks,[r]:{...n,scroll:s(n.scroll),sourceModes:s(n.sourceModes)}};delete o.new,gg.set(e,r),Qi.set(e,{...t,tasks:o})}function GEn(e){let r=mg.get(e);if(!r){const t=Vi;r=XI(async(n,s)=>{if(t!==Vi)return;const o=await Vjn(e,n,s);t===Vi&&Je.setQueryData(oS(e).queryKey,o),t===Vi&&zb.delete(e)&&M3()},n=>{t===Vi&&(zb.set(e,n instanceof Error?n.message:String(n)),M3())}),mg.set(e,r)}return r}function W2(e,r,t,n){const s=Qi.get(e);if(!s||t==="new"&&gg.has(e))return;const o=Ny(r)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,i=t?v_(s,t):void 0;if(o===s.lastLocation&&a===s.lastTaskId&&(!n||JSON.stringify(n)===JSON.stringify(i)))return;const c={...s,lastLocation:o,lastTaskId:a,tasks:t&&n?{...s.tasks,[t]:n}:s.tasks},u=i&&n&&o===s.lastLocation&&JSON.stringify({...i,scroll:{},sourceModes:{}})===JSON.stringify({...n,scroll:{},sourceModes:{}});Qi.set(e,c),GEn(e).queue(c,u?250:0)}function aA(e,r,t,n){const s=new Set(e.state.fileTabs.map(d=>uo(t,n==="new"?null:n,d))),o=Object.fromEntries(Object.entries(e.getScroll()).filter(([d])=>s.has(d))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([d])=>s.has(d))),i=oP(e.state,o,a),c=e.pane??(r==null?void 0:r.active),u=c?Bt(Ki(c)):null;return i.active=i.tabs.find(d=>Bt(Ki(d))===u)??null,i}function WEn(e){const{projectId:r,taskKey:t,location:n,pane:s,isTask:o,firstDemoOpen:a,state:i,apply:c,getScroll:u,sourceModes:d,revision:_}=e,p=T.useRef(tA()),m=T.useSyncExternalStore(HEn,()=>r?zb.get(r)??null:null),[k,x]=T.useState(null),[v,b]=T.useState(0),[w,y]=T.useState(null),[S,z]=T.useState(null),N=T.useRef(null),A=T.useRef(null),E=T.useRef(null),M=T.useRef(e);M.current=e;const $=JSON.stringify([r,t,o]),D=JSON.stringify(s??null),I=T.useCallback(()=>{const H=E.current;if(!H)return;const Q=aA({...M.current,state:H.state,pane:H.pane},v_(Qi.get(H.projectId),H.taskKey),H.projectId,H.taskKey);W2(H.projectId,H.location,H.taskKey,Q)},[]);T.useEffect(()=>{let H=!0;const Q=Vi;if(x(null),y(null),!!r)return Qi.has(r)?y(r):Je.fetchQuery(oS(r)).then(K=>{!H||Q!==Vi||(Qi.set(r,K??tA()),y(r))}).catch(K=>{H&&Q===Vi&&x(K instanceof Error?K.message:String(K))}),()=>{H=!1}},[r,v]),T.useLayoutEffect(()=>{if(E.current&&E.current.scope!==$){const K=E.current.projectId;I(),gg.get(K)===t&&gg.delete(K),E.current=null}if(!r||w!==r)return;const H=Qi.get(r);if(!H)return;if(p.current=H,N.current!==$){if(N.current=$,A.current=D,o){const K=v_(H,t)??(Ju(r)?wS(t,a):void 0);c(BEn(K,s),K,!0)}z($);return}if(S!==$)return;let Q=i;A.current!==D&&(A.current=D,o&&s&&(Q=iP(i,s),c(Q,void 0,!1))),o?(W2(r,n,t,aA({state:Q,pane:s,getScroll:u,sourceModes:d},v_(H,t),r,t)),E.current={projectId:r,taskKey:t,scope:$,location:n,pane:s,state:Q}):W2(r,n),p.current=Qi.get(r)??H},[r,t,n,s,D,o,a,i,c,u,d,_,w,$,S,I]),T.useEffect(()=>{const H=Vi,Q=J=>{if(H===Vi){I();for(const ee of mg.values())ee.flush(J)}},K=()=>Q(!0);return window.addEventListener("pagehide",K),()=>{window.removeEventListener("pagehide",K),Q(!1)}},[I]);const G=T.useCallback(()=>{var H;r&&(k?b(Q=>Q+1):(H=mg.get(r))==null||H.retry())},[r,k]);return{ready:r===null||w===r&&S===$,loaded:r===null||w===r,error:k??m,retry:G,capture:I,workspace:p}}const KEn="data:image/svg+xml,"+encodeURIComponent(''),O3=T.createContext(null);function VEn(e){var r;return e.kind==="local"?"local":`${e.session.id}:${((r=e.session.installPaths)==null?void 0:r.database)??""}`}function lP(){const e=T.useContext(O3);if(!e)throw new Error("Runtime is not connected");return e}function QEn(e){const r=document.querySelector('link[rel="icon"]');r&&(r.href=e?KEn:"/favicon.svg")}function iA(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function XEn(e){if(e.kind!=="ssh")return;const{theme:r,locale:t}=e.session.uiPreferences;!iA("orx:theme")&&(r==="light"||r==="dark"||r==="system")&&hI(r),!iA("orx:locale")&&t&&lD(t)&&_I(t)}function YEn(e){return e.includes("ssh ")&&e.includes("failed")}function cA({host:e,overlay:r=!1}){return f.jsx("div",{className:r?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:ZD({host:Ee(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:J4()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:Fir()})]})})}function lA({runtime:e,overlay:r=!1,retriedInteractiveError:t,setRetriedInteractiveError:n}){var M,$,D;const{session:s}=e,[o,a]=T.useState(s.installPaths),[i,c]=T.useState(!1),[u,d]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,($=s.installPaths)==null?void 0:$.database,(D=s.installPaths)==null?void 0:D.cache]);async function _(){if(o){c(!0);try{await _6n(o)}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}}async function p(I=!1){n(I?s.error:null),c(!0);try{await f6n()}catch(G){tr(G instanceof Error?G.message:String(G),"error")}finally{c(!1)}}async function m(){c(!0);try{await KL()}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}async function k(){c(!0);try{d(await VL())}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}async function x(){if(u){c(!0);try{await QL(u),d(null)}catch(I){d(null),tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}}async function v(){c(!0);try{await d6n()}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}const b=s.status==="applying"||i,w=s.status==="needsInstall",y=s.status==="needsUpdate",S=o&&w,z=["connecting","applying","reconnecting"].includes(s.status),N=s.status==="disconnected"&&s.error!==null&&YEn(s.error)&&t!==s.error&&!s.canStartNewHost,A=w?Kcr():y?Ehr():s.status==="applying"?wor({host:Ee(s.host)}):s.status==="reconnecting"?Iur({host:Ee(s.host)}):s.status==="disconnected"?s.error?Tir({host:Ee(s.host)}):s.canStartNewHost?icr({host:Ee(s.host)}):ZD({host:Ee(s.host)}):gar({host:Ee(s.host)}),E=s.error??(s.canStartNewHost?Yir():w?klr({user:Ee(s.user??""),host:Ee(s.host)}):y?vhr({host:Ee(s.host)}):s.status==="applying"?_or():s.status==="reconnecting"?Eur():s.status==="disconnected"?fir():iar());return f.jsxs(f.Fragment,{children:[f.jsx("main",{className:r?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[z&&f.jsx(Nt,{className:"mt-2"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:A}),!N&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:E})]})]}),N&&f.jsx(vS,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),S&&f.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[f.jsx("p",{className:"m-0 text-sm text-subtext",children:Lcr()}),[["binary",gcr()],["database",zcr()]].map(([I,G])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[G,f.jsx(Nn,{value:o[I],onChange:H=>a({...o,[I]:H.target.value}),disabled:b,dir:"ltr"})]},I)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx(Oe,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",nlr()]}):y?nN():_L()})})]}),y&&o&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx(Oe,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",Ihr()]}):nN()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void v(),children:[i?f.jsx(Nt,{}):null,s.error?tN():f_r()]}):f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void p(),children:[i?f.jsx(Nt,{}):null,tN()]})}),(s.status==="connecting"||s.status==="reconnecting")&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:f.jsx(Oe,{disabled:i,onClick:()=>void m(),children:s3()})}),y&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx(Oe,{disabled:i,onClick:()=>void m(),children:s3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[i?f.jsx(Nt,{}):null,eN()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid k(),children:[i?f.jsx(Nt,{}):null,JD()]})]}),w&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void p(),children:[i?f.jsx(Nt,{}):null,eN()]})})]})}),u&&f.jsx(MI,{host:s.host,preview:u,currentClientAttached:!1,stopping:i,onClose:()=>{i||d(null)},onConfirm:()=>void x()})]})}function ZEn({children:e}){const r=T.useRef(null);return T.useEffect(()=>{var t;return(t=r.current)==null?void 0:t.focus()},[]),f.jsx("div",{ref:r,role:"alertdialog","aria-modal":"true","aria-labelledby":"remote-setup-title",tabIndex:-1,className:"absolute inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-6",children:e})}function JEn(){const e=cu();T.useSyncExternalStore(P8,fV),T.useEffect(()=>P8(()=>{PEn(),qEn()}),[]);const r=gX({select:x=>x.pathname==="/remote-launch"}),[t,n]=T.useState(null),[s,o]=T.useState(null),a=T.useRef(!1),i=T.useRef(!1),c=T.useRef(!1),u=T.useRef(null),[d,_]=T.useState(null),p=dt({...OCn(),enabled:!r,refetchInterval:x=>{var v;return x.state.status==="error"||((v=x.state.data)==null?void 0:v.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(dt({...WCn(e),enabled:!r&&((t==null?void 0:t.kind)==="local"||(t==null?void 0:t.kind)==="ssh"&&t.session.status==="connected")}),T.useEffect(()=>{var b,w;if(r)return;const x=p.data;if(!x){o(((b=p.error)==null?void 0:b.message)??null);return}const v=VEn(x);dV(v),u.current!==null&&u.current!==v&&(a.current=!1,i.current=!1,c.current=!1),u.current=v,x.kind==="ssh"&&(c.current||(c.current=!0,XEn(x)),x.session.status==="connected"?(a.current=!0,i.current=!0,_(null)):x.session.status==="disconnected"&&x.session.error===null&&(i.current=!1)),n(x),o(((w=p.error)==null?void 0:w.message)??null)},[r,p.data,p.error]),T.useEffect(()=>{const x=(t==null?void 0:t.kind)==="ssh";QEn(x),x&&(!a.current||t.session.status==="disconnected"&&!t.session.error)&&(document.title="OpenResearch")},[t]),r)return f.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[f.jsx(Nt,{})," ",lur()]});if(!t)return f.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:s?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:s}),f.jsx(Oe,{onClick:()=>location.reload(),children:Ks()})]}):f.jsx(Nt,{})});if(t.kind==="local")return f.jsxs(O3,{value:t,children:[f.jsx(DN,{}),f.jsx(lg,{})]},Si()[1]);if(!(i.current&&(t.session.status!=="disconnected"||t.session.error!==null))&&t.session.status!=="connected")return s?f.jsx(cA,{host:t.session.host}):f.jsx(lA,{runtime:t,retriedInteractiveError:d,setRetriedInteractiveError:_});const k=t.session.status!=="connected"||s!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:k,children:f.jsxs(O3,{value:t,children:[f.jsx(DN,{}),f.jsx(lg,{})]},Si()[1])}),k&&f.jsx(ZEn,{children:s?f.jsx(cA,{host:t.session.host,overlay:!0}):f.jsx(lA,{runtime:t,overlay:!0,retriedInteractiveError:d,setRetriedInteractiveError:_})})]})}const Ry=eX()({component:JEn}),kS="orx:demo-read-sessions";function uP(){try{const e=JSON.parse(sessionStorage.getItem(kS)??"[]");return new Set(Array.isArray(e)?e.filter(r=>typeof r=="string"):[])}catch{return new Set}}function eNn(e){try{const r=uP();r.add(e),sessionStorage.setItem(kS,JSON.stringify([...r]))}catch{}}function tNn(){try{sessionStorage.removeItem(kS)}catch{}}function _P(e,r){const t=Zf(e.split("?")[0]);return!!(t&&(!t.sessionId||r.some(n=>n.id===t.sessionId&&n.projectId===t.projectId)))}async function rNn(e=Je){var a;const[r,t]=await Promise.all([e.fetchQuery(f0()),e.fetchQuery(Vf())]),n=Ny((a=nP()??r.workspace)==null?void 0:a.lastLocation),s=()=>t[0]?fP(t[0].id,e):Promise.resolve("/projects");if(!n)return s();const o=Zf(n.split("?")[0]);return!(o!=null&&o.projectId)||!t.some(i=>i.id===o.projectId)||o.sessionId&&!_P(n,await e.fetchQuery(So(o.projectId)))?s():n}async function fP(e,r=Je){var d;const[t,n]=await Promise.all([r.fetchQuery(oS(e)),r.fetchQuery(So(e))]),s=cP(e)??t,o=Ny(s==null?void 0:s.lastLocation);if(o&&((d=Zf(o.split("?")[0]))==null?void 0:d.projectId)===e&&_P(o,n))return o;const a=n.find(_=>!_.archived&&!_.sideParentSessionId),i=Ju(e)?wS(a==null?void 0:a.id,!(await r.fetchQuery(f0())).tourCompleted):void 0,c=v_(s,(a==null?void 0:a.id)??"new"),u=c?c.active:i==null?void 0:i.active;return I1(e,(a==null?void 0:a.id)??null,u)}function My(){return f.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function K2(){return f.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[f.jsx(My,{}),"OpenResearch"]})}const uA="inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text";function nNn({cmd:e,onRun:r}){const[t,n]=T.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),r&&f.jsx("button",{type:"button",className:`cmd-inline-run ${uA}`,onClick:r,"aria-label":z9({value:Ee(e)}),title:z9({value:Ee(e)}),children:f.jsx(Y9n,{size:11})}),f.jsx("button",{type:"button",className:`cmd-inline-copy ${uA}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),1500)}).catch(()=>{})},"aria-label":t?qf():hZ({value:Ee(e)}),title:t?qf():Uj(),children:t?f.jsx(_o,{size:11,strokeWidth:3}):f.jsx(hd,{size:11})})]})}function x_(e,r){return e?e.split(/`([^`]+)`/).map((t,n)=>n%2===1?f.jsx(nNn,{cmd:t,onRun:r!=null&&r.canRun(t)?()=>r.onRun(t):void 0},n):t):null}function m0(e){if(e.id!=="claude-code")return null;switch(e.authProvider){case"bedrock":return"Amazon Bedrock";case"vertex":return"Google Vertex AI";case"foundry":return"Microsoft Foundry";case"firstParty":return null;default:return e.authProvider??null}}function sp({harness:e,size:r=16}){const t="block shrink-0";return e==="claude-code"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:f.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):e==="opencode"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?f.jsxs("svg",{className:t,width:r,height:r,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[f.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),f.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),f.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),f.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),f.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:f.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):f.jsx("svg",{className:t,width:r,height:r,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z"})})}function $3(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function sNn(e,r){return e.needsConfigRepair?"error":r==="login"?"running":"preview"}function _A(e,r){return r||e==="preview"}function oNn(e,r){if(!e||e.needsConfigRepair)return null;const t=$3(e);return t===r?null:t}function dP({harness:e,commands:r,onReady:t,onClose:n}){const s=T.useRef(null),o=T.useRef(!1),[a,i]=T.useState(()=>$3(e)),[c,u]=T.useState(0),[d,_]=T.useState(()=>sNn(e,$3(e))),[p,m]=T.useState(d==="running"),[k,x]=T.useState(e.needsConfigRepair),[v,b]=T.useState(e.needsConfigRepair?e.agentNote??null:null),w=d==="running"||d==="checking",y=r[a].includes(` +`)?void 0:r[a];T.useEffect(()=>{o.current=!1;const z=s.current;return z==null||z.showModal(),()=>{o.current=!0,z==null||z.close()}},[]);const S=async(z=!0)=>{_("checking"),b(null);try{const N=z?await Kf(!0,!0):await nI();if(o.current)return;const A=N.find(E=>E.id===e.id);if(x((A==null?void 0:A.needsConfigRepair)??!1),A!=null&&A.agentReady&&(a!=="login"||A.authenticated))t==null||t(A),_("success"),e.id==="antigravity"&&a==="login"&&n();else if(a!=="login"&&(A!=null&&A.installed)&&!A.installBroken&&!A.needsConfigRepair&&A.authState==="needsLogin")i("login"),m(!0),_("running");else if(z){const E=oNn(A,a);E&&(i(E),m(!1)),b((A==null?void 0:A.agentNote)??LD()),_("error")}else return S(!0)}catch(N){if(o.current)return;b(N instanceof Error?N.message:String(N)),_("error")}};return f.jsxs("dialog",{ref:s,className:"m-auto w-180 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"harness-setup-title",onKeyDown:z=>{z.key==="Escape"&&w&&z.preventDefault()},onCancel:z=>{z.preventDefault(),w||n()},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(sp,{harness:e.id,size:26}),f.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:NE({agent:e.name})})]}),d==="preview"?f.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?Lxt({agent:e.name}):m2t({agent:e.name})}):y&&_A(d,p)?f.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:x_(Fwt({command:y}))}):null,d!=="running"&&d!=="preview"&&f.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[d==="checking"&&f.jsx(Nt,{}),d==="success"?cxt({agent:e.name}):d==="error"?$D():Zyt()]}),a==="install"&&r.requiresNpm&&f.jsx("p",{className:"text-sm text-subtext",children:Twt()}),_A(d,p)&&f.jsx(Ty,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:NE({agent:e.name}),command:y,heightClass:"h-96",active:d==="running",awaitingApproval:d==="preview",onComplete:z=>typeof z!="object"||z===null||!("type"in z)||z.type!=="complete"?!1:(S(!1),!0),onError:z=>{b(z),_("error")}},`${a}-${c}`),v&&f.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:x_(v)}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[d==="error"&&f.jsx(Oe,{variant:"ghost",onClick:()=>{b(null),S()},children:hb()}),d==="error"&&!k&&f.jsx(Oe,{onClick:()=>{b(null),m(!0),_("running"),u(z=>z+1)},children:Ks()}),f.jsx(Oe,{variant:d==="success"?"primary":"default",onClick:n,children:d==="success"?NL():w?Hyt():fg()}),d==="preview"&&f.jsx(Oe,{variant:"primary",onClick:()=>{m(!0),_("running")},children:Ryt()})]})]})}const aNn=600,fA=700,D3=1300,hP=900,V2=2.6,Vv=.06;function iNn(e){if(e{const t=r.current,n=t==null?void 0:t.getContext("2d");if(!t||!n||matchMedia("(prefers-reduced-motion: reduce)").matches)return;const s=Array.from({length:aNn},()=>dA());let o=0,a=0;const i=()=>{const p=window.devicePixelRatio||1;o=t.clientWidth,a=t.clientHeight,t.width=o*p,t.height=a*p,n.setTransform(p,0,0,p,0,0)};i(),window.addEventListener("resize",i);const c=performance.now();let u=c,d=0;const _=p=>{if(p-c>D3+hP&&p-u<33){d=requestAnimationFrame(_);return}const m=Math.min(p-u,50)/1e3;u=p;const k=iNn(p-c),x=getComputedStyle(document.documentElement),v=x.getPropertyValue("--text"),b=x.getPropertyValue("--primary"),w=o/2,y=a/2,S=Math.max(o,a)*.5,z=Math.min(.6,k*.12);n.clearRect(0,0,o,a),n.lineCap="round";for(const N of s){N.z-=k*m,N.z<=.02&&Object.assign(N,dA(1));const A=w+N.x/N.z*S,E=y+N.y/N.z*S,M=N.z+z,$=w+N.x/M*S,D=y+N.y/M*S,I=1-N.z;n.globalAlpha=Math.min(1,I*1.4)*(N.tinted?1:.8),n.strokeStyle=N.tinted?b:v,n.lineWidth=.6+I*2.2,n.beginPath(),n.moveTo($,D),n.lineTo(A+.01,E),n.stroke()}d=requestAnimationFrame(_)};return d=requestAnimationFrame(_),()=>{cancelAnimationFrame(d),window.removeEventListener("resize",i)}},[]),f.jsx("canvas",{ref:r,"aria-hidden":"true",className:e})}const lNn={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function vg({variant:e="list",className:r,...t}){return f.jsx("span",{className:Ls("title",lNn[e],r),...t})}const hA=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),h_=["onb-card-meta text-sm text-subtext [&_code]:font-mono","[&_code]:text-xs [&_code]:bg-surface","[&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs","[&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap"].join(" "),Im=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),pP=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),uNn=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),_Nn=[{id:"AI/ML",label:XDt},{id:"Biology",label:aLt},{id:"Physics",label:CLt},{id:"Other",label:mLt}],fNn=["welcome","environment","profile"];function dNn({onDone:e,preferredAgent:r,remote:t}){var Ie,Ye;const n=mr({mutationFn:Ae=>Yjn(...Ae)}),[s,o]=T.useState(0);T.useEffect(()=>{const Ae=fNn[s];Ae&&e_({name:"onboarding_step_viewed",step:Ae})},[s]);const a=dt(su()),i=dt(Vm()),c=dt(nS()),[u,d]=T.useState(null),[_,p]=T.useState(!1),m=T.useRef(null),k=T.useRef(""),x=T.useRef(null),v=T.useRef(!1);T.useEffect(()=>()=>{var Ae;return(Ae=m.current)==null?void 0:Ae.close()},[]);const b=a.data??null,w=(Ie=i.data)==null?void 0:Ie.gitVersion,y=!t&&((Ye=i.data)==null?void 0:Ye.gitInstallable)===!0,[S,z]=T.useState(!1),[N,A]=T.useState(null),[E,M]=T.useState(""),[$,D]=T.useState(null),[I,G]=T.useState(!1),[H,Q]=T.useState([]),[K,J]=T.useState(""),[ee,P]=T.useState(""),[L,F]=T.useState([]),[q,U]=T.useState(""),[oe,ie]=T.useState([]),[ce,re]=T.useState(!1),W=T.useRef(0),[ae,le]=T.useState(!1),[me,be]=T.useState(!1),Se=(b==null?void 0:b.some(Ae=>Ae.agentReady&&!Ae.catalogPending))??!1,Be=(b==null?void 0:b.some(Ae=>Ae.catalogPending))??!1,Xe=w!=null,Me=T.useRef(0),Fe=(Ae,Ve=!1)=>{const Ze=++Me.current;G(!0),le(!1),be(!1);const at=()=>Ze===Me.current;Promise.allSettled([Kf(Ae,Ve),Je.fetchQuery({...Vm(),staleTime:Ae?0:3e4})]).then(([At,Pe])=>{at()&&(At.status==="rejected"&&le(!0),Pe.status==="rejected"&&be(!0))}).finally(()=>at()&&G(!1))};T.useEffect(()=>Fe(!1),[]);const pt=mr({mutationFn:Jjn,onSuccess:()=>Fe(!0)}),Ct=f.jsx(vNn,{pending:pt.isPending,error:pt.error,disabled:I,onInstall:()=>pt.mutate()});T.useEffect(()=>{if(b===null)return;const Ae=b.filter(Ve=>Ve.agentReady&&!Ve.catalogPending);D(Ve=>{var at;if(Ve&&Ae.some(At=>At.id===Ve))return Ve;const Ze=r&&Ae.find(At=>At.id===r.harness);return(Ze==null?void 0:Ze.id)??((at=Ae[0])==null?void 0:at.id)??null})},[b,r]),T.useEffect(()=>le(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>be(i.isError),[i.isError,i.dataUpdatedAt]),T.useEffect(()=>{Je.fetchQuery(DCn()).then(Ae=>{Q(Ae.researchAreas),J(Ae.otherArea??""),P(Ae.background??""),F(Ae.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const Ae=q.trim();if(Ae.length<3){ie([]),re(!1);return}const Ve=++W.current;re(!0);const Ze=setTimeout(()=>{Je.fetchQuery(uI(Ae)).then(at=>Ve===W.current&&ie(at)).catch(()=>Ve===W.current&&ie([])).finally(()=>Ve===W.current&&re(!1))},350);return()=>clearTimeout(Ze)},[q]);const Vt=Ae=>{const Ve=L.some(Ze=>Ze.paperId===Ae.paperId);F(Ze=>Ze.some(at=>at.paperId===Ae.paperId)?Ze:[...Ze,{paperId:Ae.paperId,title:pA(Ae.title)}]),U(""),ie([]),Ve||Je.fetchQuery(S3(Ae.paperId)).then(Ze=>{var At;const at=(At=Ze.title)==null?void 0:At.trim();at&&F(Pe=>Pe.map(Jt=>Jt.paperId===Ae.paperId?{...Jt,title:at}:Jt))}).catch(()=>{})},Ut=Ae=>F(Ve=>Ve.filter(Ze=>Ze.paperId!==Ae)),Gt=Ae=>{Q(Ve=>Ve.includes(Ae)?Ve.filter(Ze=>Ze!==Ae):[...Ve,Ae])},De=H.length>0&&(!H.includes("Other")||K.trim().length>0),ct=()=>{if(x.current)return x.current;k.current="",v.current=!0,p(!0);const Ae=(async()=>{await new Promise((at,At)=>{const Pe=location.protocol==="https:"?"wss:":"ws:",Jt=new WebSocket(`${Pe}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);Jt.binaryType="arraybuffer";const Tt=new TextDecoder,Zr=new ZI.Terminal;Zr.onData(nr=>{Jt.readyState===WebSocket.OPEN&&Jt.send(new TextEncoder().encode(nr))}),m.current=Jt;let cr=!1;Jt.onmessage=nr=>{if(nr.data instanceof ArrayBuffer){Zr.write(new Uint8Array(nr.data)),k.current=(k.current+Tt.decode(nr.data,{stream:!0})).slice(-65536);return}if(typeof nr.data!="string")return;let Wt;try{Wt=JSON.parse(nr.data)}catch{return}typeof Wt!="object"||Wt===null||!("type"in Wt)||(Wt.type==="complete"?(cr=!0,Jt.close(),at()):Wt.type==="error"&&(Jt.close(),At(new Error("error"in Wt&&typeof Wt.error=="string"?Wt.error:$D()))))},Jt.onerror=()=>{Jt.close(),At(new Error(gb()))},Jt.onclose=()=>{Zr.dispose(),m.current=null,cr||At(new Error(gb()))}});const Ze=(await Kf(!0,!0)).find(at=>at.id==="opencode"&&at.agentReady);if(!Ze)throw new Error(PHt());return D("opencode"),Ze})();return x.current=Ae,Ae.catch(()=>{}),Ae};T.useEffect(()=>{t||v.current||!(b!=null&&b.length)||b.some(Ae=>Ae.catalogPending)||!b.every(Ae=>!Ae.installed&&!Ae.installBroken)||ct()},[b,t]),T.useEffect(()=>{s===1&&_&&o(2)},[s,_]);const lt=()=>{o(_?2:1)},xe=async(Ae="complete")=>{var Ve;if(!(S||Ae==="complete"&&(!De||!Xe))){z(!0),A(null),M("");try{const Ze=_?await ct():b==null?void 0:b.find(Pe=>Pe.id===$&&Pe.agentReady&&!Pe.catalogPending);if(!Ze)throw new Error(LD());if(Ae==="setup")return;const at=pNn(Ze,((Ve=Ze.models[0])==null?void 0:Ve.id)??null),At=await n.mutateAsync([at,{researchAreas:H,otherArea:H.includes("Other")?K:null,background:ee||null,papers:L}]);e(At.project,At.selection)}catch(Ze){_&&(x.current=null);const at=Ze instanceof Error?Ze.message:String(Ze);A(at),M([k.current,at].filter(Boolean).join(` -`))}finally{z(!1)}}};return f.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-background onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&c.data&&f.jsx(dP,{harness:u,commands:c.data[u.id],onReady:Ae=>{D(Ae.id)},onClose:()=>{d(null)}}),f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?f.jsxs("div",{className:"onb-intro flex min-h-dvh flex-col items-center justify-center gap-6 text-center",children:[f.jsx(cNn,{className:"pointer-events-none fixed inset-0 size-full"}),f.jsx("div",{className:"onb-intro-brand relative text-6xl font-semibold leading-none tracking-[-0.035em] animate-[onb-warp-in_700ms_cubic-bezier(0.16,1,0.3,1)_1250ms_both] motion-reduce:animate-none",children:f.jsx(K2,{})}),f.jsx("h2",{className:"onb-title relative m-0 text-2xl font-medium text-muted tracking-[-0.02em] animate-[onb-welcome-in_700ms_ease-out_1700ms_both] motion-reduce:animate-none",children:bWt()}),f.jsx("div",{className:"relative mt-6 animate-[onb-welcome-in_600ms_ease-out_2300ms_both] motion-reduce:animate-none",children:f.jsxs(Oe,{variant:"primary",size:"large",onClick:lt,disabled:I&&b===null,children:[I&&b===null?f.jsx(Nt,{}):null,VE()," ",f.jsx(L1,{size:20})]})})]}):s===1?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(K2,{}),f.jsx("span",{children:MGt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:yIt()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:NHt()}),b!==null&&!Se&&!Be&&f.jsx("p",{className:hA,children:dGt()}),b!==null&&Se&&$===null&&f.jsx("p",{className:hA,children:AIt()}),(x===null||me)&&f.jsxs("div",{className:"onb-git-check mt-7 mb-5.5",role:"status","aria-live":"polite",children:[f.jsx(mA,{gitVersion:x,error:me}),me?f.jsx("p",{className:Im,children:M2()}):y?Ct:f.jsx("p",{className:Im,children:QE()})]}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(Ae=>{var Ve;return f.jsx(gNn,{h:Ae,remote:t,selected:$===Ae.id,onSelect:()=>D(Ae.id),commands:(Ve=c.data)==null?void 0:Ve[Ae.id],onSetup:()=>d(Ae)},Ae.id)}):ae?f.jsx("div",{className:h_,children:M2()}):f.jsxs(Gn,{className:"py-2",children:[f.jsx(Nt,{})," ",GPt()]})}),c.isError&&f.jsxs("p",{className:h_,children:[Kxt()," ",f.jsx(Oe,{variant:"ghost",onClick:()=>void c.refetch(),children:Ks()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Oe,{variant:"ghost",onClick:()=>o(0),children:[f.jsx(Sb,{size:12})," ",KE()]}),f.jsxs(Oe,{variant:"ghost",onClick:()=>Fe(!0,!0),disabled:I,children:[f.jsx(Ei,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",hb()]}),f.jsx("div",{className:"flex-1"}),f.jsxs(Oe,{variant:"primary",onClick:()=>o(2),disabled:I||!Se||$===null||!Xe,title:I||!Se&&Be?sKt():Se?$===null?mPt():me?kqt():x===void 0?VWt():x===null?mFt():void 0:nGt(),children:[VE()," ",f.jsx(L1,{size:13})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(K2,{}),!_&&f.jsx("span",{children:qGt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:JGt()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:pP,children:[f.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[f.jsx("legend",{children:hKt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:aPt()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:_Nn.map(Ae=>f.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[f.jsx("input",{type:"checkbox",checked:H.includes(Ae.id),onChange:()=>Gt(Ae.id),disabled:S}),f.jsx("span",{children:Ae.label()})]},Ae.id))}),H.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:K,onChange:Ae=>J(Ae.target.value),disabled:S,placeholder:lWt(),"aria-label":QHt()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:qqt()}),f.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:ee,onChange:Ae=>P(Ae.target.value),disabled:S,rows:4,placeholder:tBt()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:Mqt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:TDt()}),f.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[f.jsx("input",{id:"onb-paper-search",value:q,onChange:Ae=>U(Ae.target.value),disabled:S,placeholder:cUt()}),ce?f.jsx("div",{className:h_,children:vUt()}):oe.length>0?f.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:oe.map(Ae=>f.jsxs("button",{type:"button",onClick:()=>Vt(Ae),disabled:S,children:[f.jsx(vg,{children:pA(Ae.title)}),f.jsx("span",{className:"id",children:Ae.paperId})]},Ae.paperId))}):null]}),L.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:L.map(Ae=>f.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[f.jsx(vg,{children:Ae.title||Ae.paperId}),f.jsx("span",{className:"id",children:Ae.paperId}),f.jsx("button",{type:"button","aria-label":vte({name:Ee(Ae.paperId)}),onClick:()=>Ut(Ae.paperId),disabled:S,children:f.jsx(pn,{size:12})})]},Ae.paperId))})]})}),!De&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:H.length===0?XIt():$Pt()}),_&&!Xe&&f.jsxs("div",{className:"mt-5",role:"status",children:[f.jsx(mA,{gitVersion:x,error:me}),me?f.jsx("p",{className:Im,children:M2()}):y?Ct:f.jsx("p",{className:Im,children:QE()}),f.jsx(Oe,{className:"mt-2.5",onClick:()=>Fe(!0,!0),disabled:I,children:hb()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Oe,{variant:"ghost",onClick:()=>o(_?0:1),disabled:S,children:[f.jsx(Sb,{size:12})," ",KE()]}),f.jsx("div",{className:"flex-1"}),f.jsx(Oe,{variant:"primary",onClick:()=>void xe(),disabled:S||!Xe||!_&&$===null||!De,children:S?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",KUt()]}):f.jsxs(f.Fragment,{children:[xBt()," ",f.jsx(L1,{size:13})]})})]}),$===null&&!_&&f.jsx("p",{className:uNn,children:jKt()}),E&&f.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[f.jsx(_S,{size:16,className:"shrink-0 text-accent-red"}),f.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:E}),_&&f.jsx(Oe,{size:"small",onClick:()=>void xe(De&&Xe?"complete":"setup"),disabled:S,children:Ks()}),_&&f.jsx(Oe,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:S,onClick:()=>{p(!1),A(null),o(1)},children:BIt()}),f.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:_Bt()}),f.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:N||E})]})]})]})})]})}function pA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function hNn(e){return e.catalogPending?{tone:"warning",label:Uf()}:e.authCheckFailed?{tone:"warning",label:O2()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||m0(e)?u0():e.authMethod==="local"||!e.authenticated?Wj():kGt()}:e.installed?e.installBroken?{tone:"warning",label:BBt()}:e.authMethod==="local"?{tone:"warning",label:UD()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:O2()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:O2()}:e.authState==="unsupported"?{tone:"warning",label:IWt()}:e.installed?{tone:"warning",label:qD()}:{tone:"neutral",label:XE()}:{tone:"neutral",label:XE()}}function pNn(e,r){var t;return{harness:e.id,model:r,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:wy(e,r).defaultId}}function mNn({harness:e}){return f.jsx(sp,{harness:e,size:26})}function gNn({h:e,remote:r,selected:t,onSelect:n,commands:s,onSetup:o}){var w;const a=e.id==="claude-code"?!!e.loginEligible:e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown"),i=!r&&!e.needsConfigRepair&&!e.catalogPending&&(!e.installed||e.installBroken||e.authState==="unsupported"||a),c=!e.agentReady&&i,u=i&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),d=hNn(e),_=t&&!e.authCheckFailed?{tone:"success",label:EUt()}:d,p=(w=e.version)==null?void 0:w.replace(/\s*\(.*\)$/,""),m=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),k=f.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[f.jsx(mNn,{harness:e.id}),f.jsxs("span",{className:"flex flex-col gap-1",children:[f.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,u&&f.jsx(Eh,{tone:d.tone,className:"font-normal",children:d.label})]}),c&&!u&&f.jsx(Eh,{tone:_.tone,children:_.label})]})]}),c?f.jsxs(Oe,{size:"small",onClick:o,disabled:!s,"aria-haspopup":"dialog",title:xwt(),children:[f.jsx(Gc,{size:14}),!e.installed||e.installBroken?zxt():e.authState==="unsupported"?a2t():DD()]}):f.jsx(Eh,{tone:_.tone,children:_.label})]});return e.agentReady?f.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${t?" selected":""}`,"aria-pressed":t,onClick:n,children:[k,e.id!=="opencode"&&f.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",DFt()]}):f.jsxs(f.Fragment,{children:[m0(e)??e.account??(e.authMethod==="apiKey"?Gj():null),e.plan?` · ${e.plan}`:""]})}),m&&f.jsx("div",{className:h_,children:m}),e.authCheckFailed&&e.agentNote&&f.jsx("div",{className:h_,children:x_(e.agentNote)})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[k,e.authState==="unsupported"&&p&&f.jsx("div",{className:h_,children:p}),!c&&e.agentNote&&f.jsx("div",{className:`${h_} [&_code]:whitespace-pre-wrap break-words`,children:x_(e.agentNote)})]})}function vNn({pending:e,error:r,disabled:t,onInstall:n}){return f.jsxs("div",{className:"flex flex-col items-start gap-2.5",children:[f.jsx("p",{className:Im,children:aFt()}),f.jsxs(Oe,{variant:"primary",onClick:n,disabled:e||t,children:[e&&f.jsx(Nt,{}),e?CFt():XBt()]}),r&&f.jsx("p",{className:"text-accent-red text-sm m-0",children:r.message})]})}function mA({gitVersion:e,error:r}){return f.jsxs("div",{className:pP,children:[f.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[f.jsx("span",{className:"onb-card-name font-semibold text-base",children:WFt()}),f.jsx(Eh,{tone:e?"success":r||e===null?"danger":"warning",children:e?Wj():r?GLt():e===null?HD():Uf()})]}),(e||!r&&e===void 0)&&f.jsx("div",{className:h_,children:e??uIt()})]})}function mP(){const e=T.useSyncExternalStore(r7n,TN,TN);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":J4()}),!e&&f.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[f.jsx(_S,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:J4()})]})]})}function bNn({onClose:e,onConfigureSsh:r}){var v,b,x;const t=mr({mutationFn:y=>u6n(...y)}),n=dt(rI()),s=dt($Cn()),o=((v=n.data)==null?void 0:v.hosts)??null,a=s.data??[],[i,c]=T.useState(""),u=o?null:((b=n.error)==null?void 0:b.message)??((x=s.error)==null?void 0:x.message)??null,[d,_]=T.useState(null),p=T.useRef(null);xp(p,e);async function m(y){const S="__ORX_DESKTOP__"in window,z=S?null:window.open("/remote-launch","_blank");if(!S&&!z){tr(Jlr(),"error");return}_(y);try{const E=await t.mutateAsync([y,{theme:w7n(),locale:C()}]);z?z.location.replace(E.gatewayUrl):window.open(E.gatewayUrl,"_blank"),e()}catch(E){z==null||z.close(),tr(E instanceof Error?E.message:String(E),"error")}finally{_(null)}}const k=o==null?void 0:o.filter(y=>y.host.toLocaleLowerCase().includes(i.trim().toLocaleLowerCase())),w=new Map(a.map(y=>[y.host,y]));return _o.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&e()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":Ear(),onClick:e,children:f.jsx(pn,{size:16})}),f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:n3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:Iar()}),f.jsx(Nn,{"data-initial-focus":!0,className:"mt-4",value:i,onChange:y=>c(y.target.value),placeholder:rN(),"aria-label":rN()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):o===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(Nt,{})," ",mL()]}):(k==null?void 0:k.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:dlr()}):k==null?void 0:k.map(y=>{const S=w.get(y.host);return f.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:d===y.host,onClick:()=>void m(y.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:y.host}),d===y.host?f.jsx(Nt,{}):S?f.jsx("span",{className:"text-sm text-subtext",children:Mlr()}):null]},y.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:r,children:[f.jsx(VI,{size:15}),EL()]})})]})}),document.body)}function Eb({size:e=16,className:r}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:r,"aria-hidden":"true",children:[f.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),f.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}const yNn="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",xNn="/assets/ollama-logo-Bt9O-2K_.png",wNn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",gP={id:"lmstudio",label:"LM Studio",icon:yNn,url:"http://127.0.0.1:1234/v1"},B1=[gP,{id:"omlx",label:"oMLX",icon:wNn,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:xNn,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function vP({installed:e,onConnected:r,dialogOnly:t=!1,onClose:n}){var K,J;const s=dt({...GCn(),enabled:!t}),o=dt(su()),a=(K=o.data)==null?void 0:K.find(ee=>ee.id==="opencode"),[i,c]=T.useState(t),u=()=>{c(!1),n==null||n()},[d,_]=T.useState("lmstudio"),p=B1.find(ee=>ee.id===d)??gP,[m,k]=T.useState({}),w=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:b,model:x,contextWindow:y,error:S}=w,z=p.id==="ollama"?"":w.apiKey,E=ee=>{k(P=>({...P,[p.id]:{...P[p.id]??w,...ee}}))},A=mr({mutationFn:kCn}),N=mr({mutationFn:async ee=>{var F;const P=await jCn(ee);if(!((F=(await Kf(!0)).find(q=>q.id==="opencode"))!=null&&F.models.some(q=>q.id===P.model)))throw new Error(ujt());return P}}),M=mr({mutationFn:CCn}),$=Number(y),D=A.isPending||N.isPending,I=(ee={})=>E({models:[],model:null,error:null,...ee}),G=async()=>{I();try{const ee=await A.mutateAsync({baseUrl:v.trim(),apiKey:z});E({models:ee.models,model:ee.models[0]??null})}catch(ee){E({error:ee instanceof Error?ee.message:String(ee)})}},H=async()=>{if(x){E({error:null});try{const ee=await N.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:z,model:x,contextWindow:$});u(),r==null||r(ee.model)}catch(ee){E({error:ee instanceof Error?ee.message:String(ee)})}}},Q=async ee=>{try{await M.mutateAsync(ee)}catch(P){tr(P instanceof Error?P.message:String(P),"error")}};return f.jsxs(f.Fragment,{children:[!t&&f.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":$E(),children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("h3",{className:"text-base font-medium",children:$E()}),f.jsxs(Oe,{disabled:D,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[f.jsx(pd,{size:14}),ID()]})]}),s.error&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:s.error.message}),f.jsx("div",{className:"space-y-3",children:(J=s.data)==null?void 0:J.map(ee=>f.jsx(kNn,{connection:ee,harnessReady:(a==null?void 0:a.agentReady)??!1,availableModels:(a==null?void 0:a.models.map(P=>P.id))??[],checking:o.isFetching||((a==null?void 0:a.catalogPending)??!1),unknown:o.isError||!o.data,disabled:D||M.isPending,onRemove:()=>void Q(ee.id)},ee.id))})]}),i&&f.jsx(jNn,{busy:D,onClose:u,footer:f.jsxs(Oe,{variant:"primary",disabled:D||!e||b.length>0&&(!x||!Number.isSafeInteger($)||$<4096),onClick:()=>void(b.length>0?H():G()),children:[D&&f.jsx(Nt,{}),b.length>0?GSt():G5t()]}),children:f.jsxs("div",{className:"space-y-4",children:[!e&&f.jsxs("div",{className:"text-sm text-text",children:[f.jsx("p",{children:SSt()}),f.jsx(Xf,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:pSt()})]}),f.jsx(tc,{choices:B1,value:d,title:OE(),header:OE(),variant:"field",floating:!0,dropDown:!0,disabled:D,renderLabel:ee=>f.jsxs(f.Fragment,{children:[ee.id==="openai-compatible"?qj():ee.label,ee.id==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:PD()})]}),renderIcon:ee=>{var L;const P=(L=B1.find(F=>F.id===ee.id))==null?void 0:L.icon;return P?f.jsx("img",{src:P,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${ee.id==="ollama"?" dark:invert":""}`}):f.jsx(qI,{size:14,className:"shrink-0"})},onSelect:_}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:$5t()}),f.jsx(Nn,{value:v,disabled:D,onChange:ee=>{I({baseUrl:ee.target.value})}})]}),p.id!=="ollama"&&f.jsxs("details",{className:"text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:aL()}),f.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[f.jsx("span",{children:p.id==="lmstudio"?b6t():$St()}),f.jsx(Nn,{type:"password",autoComplete:"off",value:z,disabled:D,onChange:ee=>I({apiKey:ee.target.value})})]})]},p.id),b.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(tc,{choices:b.map(ee=>({id:ee,label:ee})),value:x,searchPlaceholder:W8t(),title:Wm(),header:Wm(),variant:"field",floating:!0,dropDown:!0,disabled:D,onSelect:ee=>{E({model:ee})}}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:Ajt()}),f.jsx(Nn,{type:"number",min:4096,step:1024,value:y,disabled:D,onChange:ee=>{E({contextWindow:ee.target.value})}})]}),f.jsx("p",{className:"text-sm text-subtext",children:Bjt()})]}),S&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:S})]})})]})}function kNn({connection:e,harnessReady:r,availableModels:t,checking:n,unknown:s,disabled:o,onRemove:a}){const i=mr({mutationFn:async()=>{try{await SCn(e.id)}finally{await Kf(!0)}}}),c=B1.find(k=>k.label===e.name||k.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),d=u.length>0&&r&&u.every(k=>t.includes(`${e.id}/${k}`)),_=i.isPending||n,p=s,m=d;return f.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[f.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[c!=null&&c.icon?f.jsx("img",{src:c.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${c.id==="ollama"?" dark:invert":""}`}):f.jsx(qI,{size:20,className:"mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 space-y-1",children:[f.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),f.jsxs("div",{className:"text-sm text-subtext break-all",children:[(c==null?void 0:c.id)==="openai-compatible"?qj():(c==null?void 0:c.label)??e.name,(c==null?void 0:c.id)==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:PD()})," · ",e.baseUrl]})]})]}),f.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[f.jsx("span",{role:"status",children:f.jsx(Zt,{variant:_||p?"default":m?"success":"warning",children:_?Ga():p?vL():m?yjt():wi()})}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(Oe,{variant:"ghost",disabled:o||i.isPending,onClick:()=>i.mutate(),children:[f.jsx(Ei,{size:14}),hb()]}),f.jsx(Rt,{"aria-label":oSt({name:e.name}),disabled:o||i.isPending,onClick:a,children:f.jsx(gd,{size:14})})]})]})]}),i.error&&!m&&f.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:i.error.message})]})}function jNn({busy:e,onClose:r,footer:t,children:n}){const s=T.useRef(null),o=()=>{e||r()};return xp(s,o,"input"),_o.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&o()},children:f.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[f.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:f.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:ID()})}),f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":Gf(),onClick:o,disabled:e,children:f.jsx(pn,{size:16})}),f.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:n}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[f.jsx(Oe,{onClick:o,disabled:e,children:Gf()}),t]})]})}),document.body)}const bP=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),Q2=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-surface [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),t_={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function SNn(e){var n,s;const r=e.find(o=>o.agentReady);if(!r)return null;const t=((n=r.models[0])==null?void 0:n.id)??null;return{harness:r.id,model:t,serviceTier:xb(r,t,null),permissionMode:((s=r.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:wy(r,t).defaultId}}function ba(e){const[r,t]=T.useState(!1),n=T.useRef(null);return T.useEffect(()=>{if(!r)return;const s=a=>{var i,c;a.target instanceof Node&&!((i=n.current)!=null&&i.contains(a.target))&&!((c=e==null?void 0:e.current)!=null&&c.contains(a.target))&&t(!1)},o=a=>{var i;a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),t(!1),(i=e==null?void 0:e.current)==null||i.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",o,!0)}},[r,e]),{open:r,setOpen:t,ref:n}}function CNn({value:e,onSelect:r,onOpenSettings:t,permissionChoices:n=[],defaultPermissionId:s,onSelectPermission:o,reasoningChoices:a=[],defaultReasoningId:i,onSelectReasoning:c,autonomy:u,onSelectAutonomy:d,lockHarness:_=!1,openRequest:p=0,className:m}){var Xe,Me,Fe,pt,Ct,Vt,Ut,Gt;const{data:k=zNn}=dt(su()),w=o0(),[v,b]=T.useState(!1),x=T.useRef(null),y=T.useRef(null),{open:S,setOpen:z,ref:E}=ba(x),[A,N]=T.useState(""),[M,$]=T.useState("root"),D=()=>{z(!1),$("root"),N("")},I=T.useRef(p);T.useEffect(()=>{p!==I.current&&(I.current=p,$("models"),N(""),z(!0))},[p,z]),T.useEffect(()=>{var De;S&&(M==="reasoning"||M==="speed"||M==="permissions")&&((De=y.current)==null||De.focus())},[S,M]);const G=T.useMemo(()=>{const De=A.trim().toLowerCase();return(_&&e?k.filter(lt=>lt.id===e.harness):k).map(lt=>{let xe=lt.models;return De?xe=xe.filter(Ie=>`${Ie.id} ${$1(Ie)}`.toLowerCase().includes(De)):(lt.id==="opencode"||lt.id==="cursor"||lt.id==="antigravity")&&(xe=xe.slice(0,5)),{harness:lt,models:xe,hidden:De?0:lt.models.length-xe.length}})},[k,A,_,e]),H=(De,ct)=>{var xe;const lt=(e==null?void 0:e.harness)===De.id;r({harness:De.id,model:ct,serviceTier:xb(De,ct,lt?e==null?void 0:e.serviceTier:null),permissionMode:lt?e.permissionMode:((xe=De.options)==null?void 0:xe.defaultPermissionMode)??null,reasoningLevel:JL(De,ct,lt&&De.models.some(Ie=>Ie.id===ct)?e.reasoningLevel:null)}),D()},Q=(e==null?void 0:e.model)!=null?(Xe=k.find(De=>De.id===e.harness))==null?void 0:Xe.models.find(De=>De.id===e.model):void 0,K=e?e.model?Q?$1(Q):`${f3(e.model)} · ${PE()}`:Y4():Wm(),J=(e==null?void 0:e.reasoningLevel)??i??((Me=a[0])==null?void 0:Me.id),ee=(Fe=a.find(De=>De.id===J))==null?void 0:Fe.label,P=(e==null?void 0:e.permissionMode)??s??((pt=n[0])==null?void 0:pt.id),L=(Ct=n.find(De=>De.id===P))==null?void 0:Ct.label,F=(e==null?void 0:e.harness)==="opencode"?oEt():Hzt(),q=k.find(De=>De.id===(e==null?void 0:e.harness)),U=ZL(q,e==null?void 0:e.model),oe=xb(q,e==null?void 0:e.model,e==null?void 0:e.serviceTier),ie=(Vt=U.find(De=>De.id===oe))==null?void 0:Vt.label,ce=De=>{c==null||c(De),D()},re=De=>{o==null||o(De),D()},W=[{id:"agentic",label:v7t(),description:E7t()},{id:"copilot",label:I7t(),description:V7t()}],ae=(Ut=W.find(De=>De.id===u))==null?void 0:Ut.label,le=De=>{const ct=W.find(lt=>lt.id===De);ct&&(d==null||d(ct.id)),D()},me=De=>{e&&r({...e,serviceTier:De}),D()},be=(De,ct,lt)=>f.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>$(lt),children:[f.jsx("span",{className:"flex-1",children:De}),ct&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:ct}),f.jsx(Xa,{size:14,className:"shrink-0 text-muted"})]}),Se=De=>f.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[f.jsx(Rt,{ref:y,type:"button",size:"small",className:"model-submenu-header","aria-label":XD(),onClick:()=>{$("root"),N("")},children:f.jsx(uS,{size:15})}),f.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:De}),M==="models"&&f.jsx(Rt,{type:"button",size:"small","aria-label":a3(),onClick:()=>{D(),t()},children:f.jsx(Ey,{size:15,"aria-hidden":"true"})})]}),Be=(De,ct,lt,xe)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:De.map(Ie=>f.jsxs(_r,{onClick:()=>xe(Ie.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[Ie.label,Ie.id===lt&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",BD()]})]}),Ie.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Ie.description})]}),Ie.id===ct&&f.jsx(uo,{size:13})]},Ie.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:E,children:[f.jsxs("button",{ref:x,type:"button",className:Ls("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",m),title:EY({label:`${K}${ee?` · ${ee}`:""}${ie?` · ${ie}`:""}`}),"aria-haspopup":"menu","aria-expanded":S,onClick:()=>{S?D():($("root"),z(!0))},children:[oe==="priority"?f.jsx(jEn,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(sp,{harness:e.harness,size:14}):null,oe==="priority"&&f.jsxs("span",{className:"sr-only",children:[Zzt()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[K,ee&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:ee})]}),f.jsx(Zc,{size:14,className:"shrink-0 text-muted"})]}),S&&f.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[M==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[be(Wm(),K,"models"),a.length>0&&be(F,ee,"reasoning"),U.length>0&&be(IE(),ie,"speed"),n.length>0&&be(LE(),L,"permissions"),d&&be(DE(),ae,"autonomy")]}),M==="models"&&f.jsxs(f.Fragment,{children:[Se(Wm()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:r9t(),value:A,onChange:De=>N(De.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[G.map(({harness:De,models:ct,hidden:lt})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:bP,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(sp,{harness:De.id,size:14}),De.name]}),!De.agentReady&&f.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:De.catalogPending?Uf():f.jsxs(f.Fragment,{children:[f.jsx(JN,{size:10})," ",wi()]})})]}),De.agentReady?f.jsxs(f.Fragment,{children:[!A.trim()&&f.jsxs(_r,{onClick:()=>H(De,null),children:[f.jsx("span",{children:Y4()}),(e==null?void 0:e.harness)===De.id&&(e==null?void 0:e.model)===null&&f.jsx(uo,{size:13})]}),De.models.length===0&&De.agentNote&&f.jsx("div",{className:Q2,children:x_(De.agentNote)}),ct.map(xe=>f.jsxs(_r,{title:xe.id,onClick:()=>H(De,xe.id),children:[f.jsx("span",{children:$1(xe)}),(e==null?void 0:e.harness)===De.id&&(e==null?void 0:e.model)===xe.id&&f.jsx(uo,{size:13})]},xe.id)),A.trim().length>0&&!De.models.some(xe=>xe.id===A.trim())&&f.jsx(_r,{onClick:()=>H(De,A.trim()),children:f.jsxs("span",{children:[Q9t({id:Ee(A.trim())})," · ",PE()]})})]}):f.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-surface [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:De.catalogPending?Uf():De.agentNote?x_(De.agentNote):D8t()}),De.id==="opencode"&&f.jsx(_r,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var xe;D(),(xe=x.current)==null||xe.focus(),b(!0)},children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[JCt(),f.jsx(pd,{size:14,"aria-hidden":"true"})]})}),De.agentReady&<>0&&f.jsx("div",{className:Q2,children:C8t({count:fr(lt)})})]},De.id)),k.length===0&&f.jsx("div",{className:Q2,children:Rzt()})]}),_&&e&&k.length>1&&f.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[f.jsx(JN,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),f9t()]})]}),M==="reasoning"&&f.jsxs(f.Fragment,{children:[Se(F),Be(a,J,i,ce)]}),M==="permissions"&&f.jsxs(f.Fragment,{children:[Se(LE()),Be(n,P,s,re)]}),M==="autonomy"&&f.jsxs(f.Fragment,{children:[Se(DE()),Be(W,u,l3,le)]}),M==="speed"&&f.jsxs(f.Fragment,{children:[Se(IE()),Be(U,oe??void 0,"default",me)]})]}),v&&f.jsx(vP,{dialogOnly:!0,installed:((Gt=k.find(De=>De.id==="opencode"))==null?void 0:Gt.installed)??!1,onClose:()=>b(!1),onConnected:De=>{var lt;const ct=(lt=w.getQueryData(su().queryKey))==null?void 0:lt.find(xe=>xe.id==="opencode");ct&&(!_||(e==null?void 0:e.harness)==="opencode")&&H(ct,De)}})]})}function tc({choices:e,value:r,defaultId:t,header:n,align:s="left",dropDown:o=!1,disabled:a=!1,variant:i="pill",title:c,numbered:u=!1,searchPlaceholder:d,renderIcon:_,renderLabel:p,floating:m=!1,onSelect:k,className:w}){var Q,K;const v=T.useRef(null),{open:b,setOpen:x,ref:y}=ba(v),S=T.useRef(null),[z,E]=T.useState("");if(T.useLayoutEffect(()=>{var L;const J=S.current,ee=y.current;if(!b||!m||!J||!ee)return;J.matches(":popover-open")||(J.showPopover(),(L=J.querySelector("input"))==null||L.focus());const P=()=>{const F=ee.getBoundingClientRect(),q=window.innerHeight-F.bottom-12,U=F.top-12,oe=Math.min(380,J.scrollHeight),ie=o?q>=oe||q>=U:UU;J.style.width=`${F.width}px`,J.style.minWidth="0",J.style.maxHeight=`${Math.max(0,Math.min(380,ie?q:U))}px`,J.style.left=`${F.left}px`,J.style.top=`${ie?F.bottom+4:F.top-J.getBoundingClientRect().height-4}px`};return P(),window.addEventListener("resize",P),window.addEventListener("scroll",P,!0),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,!0)}},[b,m,o,z,e.length,y]),e.length===0)return null;const A=r??t??((Q=e[0])==null?void 0:Q.id)??null,N=e.find(J=>J.id===A),M=e.find(J=>J.id===t),$=i==="bare"&&(M==null?void 0:M.id)===yb?M:void 0,I=($?e.filter(J=>J.id!==$.id):e).filter(J=>`${J.label} ${J.id}`.toLowerCase().includes(z.toLowerCase())),G=(N==null?void 0:N.label)??((K=e[0])==null?void 0:K.label)??"",H=J=>{var ee;k(J),x(!1),(ee=v.current)==null||ee.focus()};return f.jsxs("div",{className:`option-picker relative inline-flex${i==="field"?" w-full":""}`,ref:y,children:[f.jsxs("button",{ref:v,type:"button",className:Ls(i==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${i==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,w),title:c,"aria-haspopup":"menu","aria-expanded":b,disabled:a,onClick:()=>{E(""),x(J=>!J)},children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[N&&(_==null?void 0:_(N)),f.jsx("span",{className:"truncate",children:N?(p==null?void 0:p(N))??G:G})]}),f.jsx(Zc,{size:12})]}),b&&f.jsxs("div",{ref:S,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(J=>J.description)?"min-w-80":""} ${i==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${o?"drop-down":""}`,children:[n&&f.jsx("div",{className:bP,children:n}),d&&f.jsx("input",{autoFocus:!0,"aria-label":d,placeholder:d,value:z,onChange:J=>E(J.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),f.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[$&&f.jsxs(f.Fragment,{children:[f.jsxs(_r,{type:"button",onClick:()=>H($.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_($),f.jsxs("span",{children:[(p==null?void 0:p($))??$.label,f.jsx("span",{className:"option-default text-muted font-normal",children:szt()})]})]}),A===$.id&&f.jsx(uo,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),I.map((J,ee)=>f.jsxs(_r,{type:"button",onClick:()=>H(J.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(J),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[(p==null?void 0:p(J))??J.label,!$&&J.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",BD()]})]}),J.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:J.description})]})]}),A===J.id?f.jsx(uo,{size:13}):u&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:ee+1})]},J.id))]})]})]})}const zNn=[];function L3({runtime:e,corner:r=!1}){const[t,n]=T.useState(!1),[s,o]=T.useState(!1),[a,i]=T.useState(!1),[c,u]=T.useState(null),d=ba();async function _(){if(c){i(!0);try{await QL(c),u(null)}catch(p){u(null),tr(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:r?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:d.ref,children:[d.open&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[f.jsx("div",{className:"text-sm font-medium text-text",children:Yor({host:Ee(e.session.host),user:Ee(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ee(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(_r,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{n(!0);try{await KL(),d.setOpen(!1)}catch(p){tr(p instanceof Error?p.message:String(p),"error")}finally{n(!1)}},children:t?For():s3()}),f.jsx(d0,{content:qlr(),className:"me-2 shrink-0 text-subtext",children:f.jsx(dS,{size:15})})]}),f.jsx(_r,{danger:!0,disabled:s,onClick:async()=>{o(!0);try{u(await VL()),d.setOpen(!1)}catch(p){tr(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}},children:JD()})]}),r?f.jsxs(Oe,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:[f.jsx(Eb,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:$2({host:Ee(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Rt,{size:"small","aria-label":$2({host:Ee(e.session.host)}),"aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:f.jsx(Eb,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:$2({host:Ee(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ee(e.session.version??"…")]})]})]})]}),c&&f.jsx(MI,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void _()})]})}const Nb="code-source-text",yP="code-source-wrap",xP="file-view-gutter text-right text-muted select-none";function wP(e){const r=String(e).length+2;return{ruleCh:r,codeCh:r+2}}const ENn={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},NNn={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function I3(e){const r=e.trim().toLowerCase();return ENn[r]??r}function jS(e){var s;if(!e)return null;const r=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=NNn[r];if(t)return I3(t);const n=r.lastIndexOf(".");return n===-1||n===r.length-1?null:I3(r.slice(n+1))}Jc.displayName="clike";Jc.aliases=[];function Jc(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}g0.displayName="c";g0.aliases=[];function g0(e){e.register(Jc),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}Oy.displayName="cpp";Oy.aliases=[];function Oy(e){e.register(g0),(function(r){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});r.languages.cpp=r.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),r.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),r.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:r.languages.cpp}}}}),r.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),r.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:r.languages.extend("cpp",{})}}),r.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},r.languages.cpp["base-clause"])})(e)}SS.displayName="arduino";SS.aliases=["ino"];function SS(e){e.register(Oy),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}CS.displayName="bash";CS.aliases=["sh","shell"];function CS(e){(function(r){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};r.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=r.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=s.variable[1].inside,i=0;i>/g,function(q,U){return"(?:"+F[+U]+")"})}function n(L,F,q){return RegExp(t(L,F),"")}function s(L,F){for(var q=0;q>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var o={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function a(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var i=a(o.typeDeclaration),c=RegExp(a(o.type+" "+o.typeDeclaration+" "+o.contextual+" "+o.other)),u=a(o.typeDeclaration+" "+o.contextual+" "+o.other),d=a(o.type+" "+o.typeDeclaration+" "+o.other),_=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,k=t(/<<0>>(?:\s*<<1>>)?/.source,[m,_]),w=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,k]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[w,v]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[_,p,v]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),S=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,w,v]),z={keyword:c,punctuation:/[<>()?,.:[\]]/},E=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,N=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;r.languages.csharp=r.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[N]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[w]),lookbehind:!0,inside:z},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,S]),lookbehind:!0,inside:z},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[i,k]),lookbehind:!0,inside:z},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[w]),lookbehind:!0,inside:z},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:z},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[S,d,m]),inside:z}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),r.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),r.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),r.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:z},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[S,w]),inside:z,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[S]),lookbehind:!0,inside:z,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,_]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(_),alias:"class-name",inside:z}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[i,k,m,S,c.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[k,p]),lookbehind:!0,greedy:!0,inside:r.languages.csharp},keyword:c,"class-name":{pattern:RegExp(S),greedy:!0,inside:z},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=A+"|"+E,$=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),D=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[$]),2),I=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,G=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[w,D]);r.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[I,G]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[I]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[D]),inside:r.languages.csharp},"class-name":{pattern:RegExp(w),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var H=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[$]),2),K=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,H]),J=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),ee=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[J,H]);function P(L,F){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,H]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:r.languages.csharp}}},string:/[\s\S]+/}}r.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[K]),lookbehind:!0,greedy:!0,inside:P(K,Q)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[ee]),lookbehind:!0,greedy:!0,inside:P(ee,J)}],char:{pattern:RegExp(E),greedy:!0}}),r.languages.dotnet=r.languages.cs=r.languages.csharp})(e)}v0.displayName="markup";v0.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function v0(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var s={};s["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},s.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:s}};o["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(r,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}kp.displayName="css";kp.aliases=[];function kp(e){(function(r){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var n=r.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(e)}ES.displayName="diff";ES.aliases=[];function ES(e){(function(r){r.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var s=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),n==="diff"&&o.push("bold"),r.languages.diff[n]={pattern:RegExp("^(?:["+s+`].*(?:\r +`))}finally{z(!1)}}};return f.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-background onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&c.data&&f.jsx(dP,{harness:u,commands:c.data[u.id],onReady:Ae=>{D(Ae.id)},onClose:()=>{d(null)}}),f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?f.jsxs("div",{className:"onb-intro flex min-h-dvh flex-col items-center justify-center gap-6 text-center",children:[f.jsx(cNn,{className:"pointer-events-none fixed inset-0 size-full"}),f.jsx("div",{className:"onb-intro-brand relative text-6xl font-semibold leading-none tracking-[-0.035em] animate-[onb-warp-in_700ms_cubic-bezier(0.16,1,0.3,1)_1250ms_both] motion-reduce:animate-none",children:f.jsx(K2,{})}),f.jsx("h2",{className:"onb-title relative m-0 text-2xl font-medium text-muted tracking-[-0.02em] animate-[onb-welcome-in_700ms_ease-out_1700ms_both] motion-reduce:animate-none",children:bWt()}),f.jsx("div",{className:"relative mt-6 animate-[onb-welcome-in_600ms_ease-out_2300ms_both] motion-reduce:animate-none",children:f.jsxs(Oe,{variant:"primary",size:"large",onClick:lt,disabled:I&&b===null,children:[I&&b===null?f.jsx(Nt,{}):null,VE()," ",f.jsx(L1,{size:20})]})})]}):s===1?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(K2,{}),f.jsx("span",{children:MGt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:yIt()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:NHt()}),b!==null&&!Se&&!Be&&f.jsx("p",{className:hA,children:dGt()}),b!==null&&Se&&$===null&&f.jsx("p",{className:hA,children:AIt()}),(w===null||me)&&f.jsxs("div",{className:"onb-git-check mt-7 mb-5.5",role:"status","aria-live":"polite",children:[f.jsx(mA,{gitVersion:w,error:me}),me?f.jsx("p",{className:Im,children:M2()}):y?Ct:f.jsx("p",{className:Im,children:QE()})]}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(Ae=>{var Ve;return f.jsx(gNn,{h:Ae,remote:t,selected:$===Ae.id,onSelect:()=>D(Ae.id),commands:(Ve=c.data)==null?void 0:Ve[Ae.id],onSetup:()=>d(Ae)},Ae.id)}):ae?f.jsx("div",{className:h_,children:M2()}):f.jsxs(Gn,{className:"py-2",children:[f.jsx(Nt,{})," ",GPt()]})}),c.isError&&f.jsxs("p",{className:h_,children:[Kxt()," ",f.jsx(Oe,{variant:"ghost",onClick:()=>void c.refetch(),children:Ks()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Oe,{variant:"ghost",onClick:()=>o(0),children:[f.jsx(Sb,{size:12})," ",KE()]}),f.jsxs(Oe,{variant:"ghost",onClick:()=>Fe(!0,!0),disabled:I,children:[f.jsx(Ei,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",hb()]}),f.jsx("div",{className:"flex-1"}),f.jsxs(Oe,{variant:"primary",onClick:()=>o(2),disabled:I||!Se||$===null||!Xe,title:I||!Se&&Be?sKt():Se?$===null?mPt():me?kqt():w===void 0?VWt():w===null?mFt():void 0:nGt(),children:[VE()," ",f.jsx(L1,{size:13})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(K2,{}),!_&&f.jsx("span",{children:qGt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:JGt()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:pP,children:[f.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[f.jsx("legend",{children:hKt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:aPt()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:_Nn.map(Ae=>f.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[f.jsx("input",{type:"checkbox",checked:H.includes(Ae.id),onChange:()=>Gt(Ae.id),disabled:S}),f.jsx("span",{children:Ae.label()})]},Ae.id))}),H.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:K,onChange:Ae=>J(Ae.target.value),disabled:S,placeholder:lWt(),"aria-label":QHt()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:qqt()}),f.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:ee,onChange:Ae=>P(Ae.target.value),disabled:S,rows:4,placeholder:tBt()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:Mqt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:TDt()}),f.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[f.jsx("input",{id:"onb-paper-search",value:q,onChange:Ae=>U(Ae.target.value),disabled:S,placeholder:cUt()}),ce?f.jsx("div",{className:h_,children:vUt()}):oe.length>0?f.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:oe.map(Ae=>f.jsxs("button",{type:"button",onClick:()=>Vt(Ae),disabled:S,children:[f.jsx(vg,{children:pA(Ae.title)}),f.jsx("span",{className:"id",children:Ae.paperId})]},Ae.paperId))}):null]}),L.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:L.map(Ae=>f.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[f.jsx(vg,{children:Ae.title||Ae.paperId}),f.jsx("span",{className:"id",children:Ae.paperId}),f.jsx("button",{type:"button","aria-label":vte({name:Ee(Ae.paperId)}),onClick:()=>Ut(Ae.paperId),disabled:S,children:f.jsx(pn,{size:12})})]},Ae.paperId))})]})}),!De&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:H.length===0?XIt():$Pt()}),_&&!Xe&&f.jsxs("div",{className:"mt-5",role:"status",children:[f.jsx(mA,{gitVersion:w,error:me}),me?f.jsx("p",{className:Im,children:M2()}):y?Ct:f.jsx("p",{className:Im,children:QE()}),f.jsx(Oe,{className:"mt-2.5",onClick:()=>Fe(!0,!0),disabled:I,children:hb()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Oe,{variant:"ghost",onClick:()=>o(_?0:1),disabled:S,children:[f.jsx(Sb,{size:12})," ",KE()]}),f.jsx("div",{className:"flex-1"}),f.jsx(Oe,{variant:"primary",onClick:()=>void xe(),disabled:S||!Xe||!_&&$===null||!De,children:S?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",KUt()]}):f.jsxs(f.Fragment,{children:[xBt()," ",f.jsx(L1,{size:13})]})})]}),$===null&&!_&&f.jsx("p",{className:uNn,children:jKt()}),N&&f.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[f.jsx(_S,{size:16,className:"shrink-0 text-accent-red"}),f.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:N}),_&&f.jsx(Oe,{size:"small",onClick:()=>void xe(De&&Xe?"complete":"setup"),disabled:S,children:Ks()}),_&&f.jsx(Oe,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:S,onClick:()=>{p(!1),A(null),o(1)},children:BIt()}),f.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:_Bt()}),f.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:E||N})]})]})]})})]})}function pA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function hNn(e){return e.catalogPending?{tone:"warning",label:Uf()}:e.authCheckFailed?{tone:"warning",label:O2()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||m0(e)?u0():e.authMethod==="local"||!e.authenticated?Wj():kGt()}:e.installed?e.installBroken?{tone:"warning",label:BBt()}:e.authMethod==="local"?{tone:"warning",label:UD()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:O2()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:O2()}:e.authState==="unsupported"?{tone:"warning",label:IWt()}:e.installed?{tone:"warning",label:qD()}:{tone:"neutral",label:XE()}:{tone:"neutral",label:XE()}}function pNn(e,r){var t;return{harness:e.id,model:r,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:wy(e,r).defaultId}}function mNn({harness:e}){return f.jsx(sp,{harness:e,size:26})}function gNn({h:e,remote:r,selected:t,onSelect:n,commands:s,onSetup:o}){var x;const a=e.id==="claude-code"?!!e.loginEligible:e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown"),i=!r&&!e.needsConfigRepair&&!e.catalogPending&&(!e.installed||e.installBroken||e.authState==="unsupported"||a),c=!e.agentReady&&i,u=i&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),d=hNn(e),_=t&&!e.authCheckFailed?{tone:"success",label:EUt()}:d,p=(x=e.version)==null?void 0:x.replace(/\s*\(.*\)$/,""),m=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),k=f.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[f.jsx(mNn,{harness:e.id}),f.jsxs("span",{className:"flex flex-col gap-1",children:[f.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,u&&f.jsx(Eh,{tone:d.tone,className:"font-normal",children:d.label})]}),c&&!u&&f.jsx(Eh,{tone:_.tone,children:_.label})]})]}),c?f.jsxs(Oe,{size:"small",onClick:o,disabled:!s,"aria-haspopup":"dialog",title:xwt(),children:[f.jsx(Gc,{size:14}),!e.installed||e.installBroken?zxt():e.authState==="unsupported"?a2t():DD()]}):f.jsx(Eh,{tone:_.tone,children:_.label})]});return e.agentReady?f.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${t?" selected":""}`,"aria-pressed":t,onClick:n,children:[k,e.id!=="opencode"&&f.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",DFt()]}):f.jsxs(f.Fragment,{children:[m0(e)??e.account??(e.authMethod==="apiKey"?Gj():null),e.plan?` · ${e.plan}`:""]})}),m&&f.jsx("div",{className:h_,children:m}),e.authCheckFailed&&e.agentNote&&f.jsx("div",{className:h_,children:x_(e.agentNote)})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[k,e.authState==="unsupported"&&p&&f.jsx("div",{className:h_,children:p}),!c&&e.agentNote&&f.jsx("div",{className:`${h_} [&_code]:whitespace-pre-wrap break-words`,children:x_(e.agentNote)})]})}function vNn({pending:e,error:r,disabled:t,onInstall:n}){return f.jsxs("div",{className:"flex flex-col items-start gap-2.5",children:[f.jsx("p",{className:Im,children:aFt()}),f.jsxs(Oe,{variant:"primary",onClick:n,disabled:e||t,children:[e&&f.jsx(Nt,{}),e?CFt():XBt()]}),r&&f.jsx("p",{className:"text-accent-red text-sm m-0",children:r.message})]})}function mA({gitVersion:e,error:r}){return f.jsxs("div",{className:pP,children:[f.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[f.jsx("span",{className:"onb-card-name font-semibold text-base",children:WFt()}),f.jsx(Eh,{tone:e?"success":r||e===null?"danger":"warning",children:e?Wj():r?GLt():e===null?HD():Uf()})]}),(e||!r&&e===void 0)&&f.jsx("div",{className:h_,children:e??uIt()})]})}function mP(){const e=T.useSyncExternalStore(r7n,TN,TN);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":J4()}),!e&&f.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[f.jsx(_S,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:J4()})]})]})}function bNn({onClose:e,onConfigureSsh:r}){var v,b,w;const t=mr({mutationFn:y=>u6n(...y)}),n=dt(rI()),s=dt($Cn()),o=((v=n.data)==null?void 0:v.hosts)??null,a=s.data??[],[i,c]=T.useState(""),u=o?null:((b=n.error)==null?void 0:b.message)??((w=s.error)==null?void 0:w.message)??null,[d,_]=T.useState(null),p=T.useRef(null);xp(p,e);async function m(y){const S="__ORX_DESKTOP__"in window,z=S?null:window.open("/remote-launch","_blank");if(!S&&!z){tr(Jlr(),"error");return}_(y);try{const N=await t.mutateAsync([y,{theme:w7n(),locale:C()}]);z?z.location.replace(N.gatewayUrl):window.open(N.gatewayUrl,"_blank"),e()}catch(N){z==null||z.close(),tr(N instanceof Error?N.message:String(N),"error")}finally{_(null)}}const k=o==null?void 0:o.filter(y=>y.host.toLocaleLowerCase().includes(i.trim().toLocaleLowerCase())),x=new Map(a.map(y=>[y.host,y]));return Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&e()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":Ear(),onClick:e,children:f.jsx(pn,{size:16})}),f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:n3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:Iar()}),f.jsx(Nn,{"data-initial-focus":!0,className:"mt-4",value:i,onChange:y=>c(y.target.value),placeholder:rN(),"aria-label":rN()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):o===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(Nt,{})," ",mL()]}):(k==null?void 0:k.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:dlr()}):k==null?void 0:k.map(y=>{const S=x.get(y.host);return f.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:d===y.host,onClick:()=>void m(y.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:y.host}),d===y.host?f.jsx(Nt,{}):S?f.jsx("span",{className:"text-sm text-subtext",children:Mlr()}):null]},y.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:r,children:[f.jsx(VI,{size:15}),EL()]})})]})}),document.body)}function Eb({size:e=16,className:r}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:r,"aria-hidden":"true",children:[f.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),f.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}const yNn="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",xNn="/assets/ollama-logo-Bt9O-2K_.png",wNn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",gP={id:"lmstudio",label:"LM Studio",icon:yNn,url:"http://127.0.0.1:1234/v1"},B1=[gP,{id:"omlx",label:"oMLX",icon:wNn,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:xNn,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function vP({installed:e,onConnected:r,dialogOnly:t=!1,onClose:n}){var K,J;const s=dt({...GCn(),enabled:!t}),o=dt(su()),a=(K=o.data)==null?void 0:K.find(ee=>ee.id==="opencode"),[i,c]=T.useState(t),u=()=>{c(!1),n==null||n()},[d,_]=T.useState("lmstudio"),p=B1.find(ee=>ee.id===d)??gP,[m,k]=T.useState({}),x=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:b,model:w,contextWindow:y,error:S}=x,z=p.id==="ollama"?"":x.apiKey,N=ee=>{k(P=>({...P,[p.id]:{...P[p.id]??x,...ee}}))},A=mr({mutationFn:kCn}),E=mr({mutationFn:async ee=>{var F;const P=await jCn(ee);if(!((F=(await Kf(!0)).find(q=>q.id==="opencode"))!=null&&F.models.some(q=>q.id===P.model)))throw new Error(ujt());return P}}),M=mr({mutationFn:CCn}),$=Number(y),D=A.isPending||E.isPending,I=(ee={})=>N({models:[],model:null,error:null,...ee}),G=async()=>{I();try{const ee=await A.mutateAsync({baseUrl:v.trim(),apiKey:z});N({models:ee.models,model:ee.models[0]??null})}catch(ee){N({error:ee instanceof Error?ee.message:String(ee)})}},H=async()=>{if(w){N({error:null});try{const ee=await E.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:z,model:w,contextWindow:$});u(),r==null||r(ee.model)}catch(ee){N({error:ee instanceof Error?ee.message:String(ee)})}}},Q=async ee=>{try{await M.mutateAsync(ee)}catch(P){tr(P instanceof Error?P.message:String(P),"error")}};return f.jsxs(f.Fragment,{children:[!t&&f.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":$E(),children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("h3",{className:"text-base font-medium",children:$E()}),f.jsxs(Oe,{disabled:D,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[f.jsx(pd,{size:14}),ID()]})]}),s.error&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:s.error.message}),f.jsx("div",{className:"space-y-3",children:(J=s.data)==null?void 0:J.map(ee=>f.jsx(kNn,{connection:ee,harnessReady:(a==null?void 0:a.agentReady)??!1,availableModels:(a==null?void 0:a.models.map(P=>P.id))??[],checking:o.isFetching||((a==null?void 0:a.catalogPending)??!1),unknown:o.isError||!o.data,disabled:D||M.isPending,onRemove:()=>void Q(ee.id)},ee.id))})]}),i&&f.jsx(jNn,{busy:D,onClose:u,footer:f.jsxs(Oe,{variant:"primary",disabled:D||!e||b.length>0&&(!w||!Number.isSafeInteger($)||$<4096),onClick:()=>void(b.length>0?H():G()),children:[D&&f.jsx(Nt,{}),b.length>0?GSt():G5t()]}),children:f.jsxs("div",{className:"space-y-4",children:[!e&&f.jsxs("div",{className:"text-sm text-text",children:[f.jsx("p",{children:SSt()}),f.jsx(Xf,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:pSt()})]}),f.jsx(tc,{choices:B1,value:d,title:OE(),header:OE(),variant:"field",floating:!0,dropDown:!0,disabled:D,renderLabel:ee=>f.jsxs(f.Fragment,{children:[ee.id==="openai-compatible"?qj():ee.label,ee.id==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:PD()})]}),renderIcon:ee=>{var L;const P=(L=B1.find(F=>F.id===ee.id))==null?void 0:L.icon;return P?f.jsx("img",{src:P,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${ee.id==="ollama"?" dark:invert":""}`}):f.jsx(qI,{size:14,className:"shrink-0"})},onSelect:_}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:$5t()}),f.jsx(Nn,{value:v,disabled:D,onChange:ee=>{I({baseUrl:ee.target.value})}})]}),p.id!=="ollama"&&f.jsxs("details",{className:"text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:aL()}),f.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[f.jsx("span",{children:p.id==="lmstudio"?b6t():$St()}),f.jsx(Nn,{type:"password",autoComplete:"off",value:z,disabled:D,onChange:ee=>I({apiKey:ee.target.value})})]})]},p.id),b.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(tc,{choices:b.map(ee=>({id:ee,label:ee})),value:w,searchPlaceholder:W8t(),title:Wm(),header:Wm(),variant:"field",floating:!0,dropDown:!0,disabled:D,onSelect:ee=>{N({model:ee})}}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:Ajt()}),f.jsx(Nn,{type:"number",min:4096,step:1024,value:y,disabled:D,onChange:ee=>{N({contextWindow:ee.target.value})}})]}),f.jsx("p",{className:"text-sm text-subtext",children:Bjt()})]}),S&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:S})]})})]})}function kNn({connection:e,harnessReady:r,availableModels:t,checking:n,unknown:s,disabled:o,onRemove:a}){const i=mr({mutationFn:async()=>{try{await SCn(e.id)}finally{await Kf(!0)}}}),c=B1.find(k=>k.label===e.name||k.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),d=u.length>0&&r&&u.every(k=>t.includes(`${e.id}/${k}`)),_=i.isPending||n,p=s,m=d;return f.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[f.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[c!=null&&c.icon?f.jsx("img",{src:c.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${c.id==="ollama"?" dark:invert":""}`}):f.jsx(qI,{size:20,className:"mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 space-y-1",children:[f.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),f.jsxs("div",{className:"text-sm text-subtext break-all",children:[(c==null?void 0:c.id)==="openai-compatible"?qj():(c==null?void 0:c.label)??e.name,(c==null?void 0:c.id)==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:PD()})," · ",e.baseUrl]})]})]}),f.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[f.jsx("span",{role:"status",children:f.jsx(Zt,{variant:_||p?"default":m?"success":"warning",children:_?Ga():p?vL():m?yjt():wi()})}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(Oe,{variant:"ghost",disabled:o||i.isPending,onClick:()=>i.mutate(),children:[f.jsx(Ei,{size:14}),hb()]}),f.jsx(Rt,{"aria-label":oSt({name:e.name}),disabled:o||i.isPending,onClick:a,children:f.jsx(gd,{size:14})})]})]})]}),i.error&&!m&&f.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:i.error.message})]})}function jNn({busy:e,onClose:r,footer:t,children:n}){const s=T.useRef(null),o=()=>{e||r()};return xp(s,o,"input"),Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&o()},children:f.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[f.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:f.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:ID()})}),f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":Gf(),onClick:o,disabled:e,children:f.jsx(pn,{size:16})}),f.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:n}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[f.jsx(Oe,{onClick:o,disabled:e,children:Gf()}),t]})]})}),document.body)}const bP=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),Q2=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-surface [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),t_={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function SNn(e){var n,s;const r=e.find(o=>o.agentReady);if(!r)return null;const t=((n=r.models[0])==null?void 0:n.id)??null;return{harness:r.id,model:t,serviceTier:xb(r,t,null),permissionMode:((s=r.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:wy(r,t).defaultId}}function ba(e){const[r,t]=T.useState(!1),n=T.useRef(null);return T.useEffect(()=>{if(!r)return;const s=a=>{var i,c;a.target instanceof Node&&!((i=n.current)!=null&&i.contains(a.target))&&!((c=e==null?void 0:e.current)!=null&&c.contains(a.target))&&t(!1)},o=a=>{var i;a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),t(!1),(i=e==null?void 0:e.current)==null||i.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",o,!0)}},[r,e]),{open:r,setOpen:t,ref:n}}function CNn({value:e,onSelect:r,onOpenSettings:t,permissionChoices:n=[],defaultPermissionId:s,onSelectPermission:o,reasoningChoices:a=[],defaultReasoningId:i,onSelectReasoning:c,autonomy:u,onSelectAutonomy:d,lockHarness:_=!1,openRequest:p=0,className:m}){var Xe,Me,Fe,pt,Ct,Vt,Ut,Gt;const{data:k=zNn}=dt(su()),x=o0(),[v,b]=T.useState(!1),w=T.useRef(null),y=T.useRef(null),{open:S,setOpen:z,ref:N}=ba(w),[A,E]=T.useState(""),[M,$]=T.useState("root"),D=()=>{z(!1),$("root"),E("")},I=T.useRef(p);T.useEffect(()=>{p!==I.current&&(I.current=p,$("models"),E(""),z(!0))},[p,z]),T.useEffect(()=>{var De;S&&(M==="reasoning"||M==="speed"||M==="permissions")&&((De=y.current)==null||De.focus())},[S,M]);const G=T.useMemo(()=>{const De=A.trim().toLowerCase();return(_&&e?k.filter(lt=>lt.id===e.harness):k).map(lt=>{let xe=lt.models;return De?xe=xe.filter(Ie=>`${Ie.id} ${$1(Ie)}`.toLowerCase().includes(De)):(lt.id==="opencode"||lt.id==="cursor"||lt.id==="antigravity")&&(xe=xe.slice(0,5)),{harness:lt,models:xe,hidden:De?0:lt.models.length-xe.length}})},[k,A,_,e]),H=(De,ct)=>{var xe;const lt=(e==null?void 0:e.harness)===De.id;r({harness:De.id,model:ct,serviceTier:xb(De,ct,lt?e==null?void 0:e.serviceTier:null),permissionMode:lt?e.permissionMode:((xe=De.options)==null?void 0:xe.defaultPermissionMode)??null,reasoningLevel:JL(De,ct,lt&&De.models.some(Ie=>Ie.id===ct)?e.reasoningLevel:null)}),D()},Q=(e==null?void 0:e.model)!=null?(Xe=k.find(De=>De.id===e.harness))==null?void 0:Xe.models.find(De=>De.id===e.model):void 0,K=e?e.model?Q?$1(Q):`${f3(e.model)} · ${PE()}`:Y4():Wm(),J=(e==null?void 0:e.reasoningLevel)??i??((Me=a[0])==null?void 0:Me.id),ee=(Fe=a.find(De=>De.id===J))==null?void 0:Fe.label,P=(e==null?void 0:e.permissionMode)??s??((pt=n[0])==null?void 0:pt.id),L=(Ct=n.find(De=>De.id===P))==null?void 0:Ct.label,F=(e==null?void 0:e.harness)==="opencode"?oEt():Hzt(),q=k.find(De=>De.id===(e==null?void 0:e.harness)),U=ZL(q,e==null?void 0:e.model),oe=xb(q,e==null?void 0:e.model,e==null?void 0:e.serviceTier),ie=(Vt=U.find(De=>De.id===oe))==null?void 0:Vt.label,ce=De=>{c==null||c(De),D()},re=De=>{o==null||o(De),D()},W=[{id:"agentic",label:v7t(),description:E7t()},{id:"copilot",label:I7t(),description:V7t()}],ae=(Ut=W.find(De=>De.id===u))==null?void 0:Ut.label,le=De=>{const ct=W.find(lt=>lt.id===De);ct&&(d==null||d(ct.id)),D()},me=De=>{e&&r({...e,serviceTier:De}),D()},be=(De,ct,lt)=>f.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>$(lt),children:[f.jsx("span",{className:"flex-1",children:De}),ct&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:ct}),f.jsx(Xa,{size:14,className:"shrink-0 text-muted"})]}),Se=De=>f.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[f.jsx(Rt,{ref:y,type:"button",size:"small",className:"model-submenu-header","aria-label":XD(),onClick:()=>{$("root"),E("")},children:f.jsx(uS,{size:15})}),f.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:De}),M==="models"&&f.jsx(Rt,{type:"button",size:"small","aria-label":a3(),onClick:()=>{D(),t()},children:f.jsx(Ey,{size:15,"aria-hidden":"true"})})]}),Be=(De,ct,lt,xe)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:De.map(Ie=>f.jsxs(_r,{onClick:()=>xe(Ie.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[Ie.label,Ie.id===lt&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",BD()]})]}),Ie.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Ie.description})]}),Ie.id===ct&&f.jsx(_o,{size:13})]},Ie.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:N,children:[f.jsxs("button",{ref:w,type:"button",className:Ls("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",m),title:EY({label:`${K}${ee?` · ${ee}`:""}${ie?` · ${ie}`:""}`}),"aria-haspopup":"menu","aria-expanded":S,onClick:()=>{S?D():($("root"),z(!0))},children:[oe==="priority"?f.jsx(jEn,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(sp,{harness:e.harness,size:14}):null,oe==="priority"&&f.jsxs("span",{className:"sr-only",children:[Zzt()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[K,ee&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:ee})]}),f.jsx(Zc,{size:14,className:"shrink-0 text-muted"})]}),S&&f.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[M==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[be(Wm(),K,"models"),a.length>0&&be(F,ee,"reasoning"),U.length>0&&be(IE(),ie,"speed"),n.length>0&&be(LE(),L,"permissions"),d&&be(DE(),ae,"autonomy")]}),M==="models"&&f.jsxs(f.Fragment,{children:[Se(Wm()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:r9t(),value:A,onChange:De=>E(De.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[G.map(({harness:De,models:ct,hidden:lt})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:bP,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(sp,{harness:De.id,size:14}),De.name]}),!De.agentReady&&f.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:De.catalogPending?Uf():f.jsxs(f.Fragment,{children:[f.jsx(JN,{size:10})," ",wi()]})})]}),De.agentReady?f.jsxs(f.Fragment,{children:[!A.trim()&&f.jsxs(_r,{onClick:()=>H(De,null),children:[f.jsx("span",{children:Y4()}),(e==null?void 0:e.harness)===De.id&&(e==null?void 0:e.model)===null&&f.jsx(_o,{size:13})]}),De.models.length===0&&De.agentNote&&f.jsx("div",{className:Q2,children:x_(De.agentNote)}),ct.map(xe=>f.jsxs(_r,{title:xe.id,onClick:()=>H(De,xe.id),children:[f.jsx("span",{children:$1(xe)}),(e==null?void 0:e.harness)===De.id&&(e==null?void 0:e.model)===xe.id&&f.jsx(_o,{size:13})]},xe.id)),A.trim().length>0&&!De.models.some(xe=>xe.id===A.trim())&&f.jsx(_r,{onClick:()=>H(De,A.trim()),children:f.jsxs("span",{children:[Q9t({id:Ee(A.trim())})," · ",PE()]})})]}):f.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-surface [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:De.catalogPending?Uf():De.agentNote?x_(De.agentNote):D8t()}),De.id==="opencode"&&f.jsx(_r,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var xe;D(),(xe=w.current)==null||xe.focus(),b(!0)},children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[JCt(),f.jsx(pd,{size:14,"aria-hidden":"true"})]})}),De.agentReady&<>0&&f.jsx("div",{className:Q2,children:C8t({count:fr(lt)})})]},De.id)),k.length===0&&f.jsx("div",{className:Q2,children:Rzt()})]}),_&&e&&k.length>1&&f.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[f.jsx(JN,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),f9t()]})]}),M==="reasoning"&&f.jsxs(f.Fragment,{children:[Se(F),Be(a,J,i,ce)]}),M==="permissions"&&f.jsxs(f.Fragment,{children:[Se(LE()),Be(n,P,s,re)]}),M==="autonomy"&&f.jsxs(f.Fragment,{children:[Se(DE()),Be(W,u,l3,le)]}),M==="speed"&&f.jsxs(f.Fragment,{children:[Se(IE()),Be(U,oe??void 0,"default",me)]})]}),v&&f.jsx(vP,{dialogOnly:!0,installed:((Gt=k.find(De=>De.id==="opencode"))==null?void 0:Gt.installed)??!1,onClose:()=>b(!1),onConnected:De=>{var lt;const ct=(lt=x.getQueryData(su().queryKey))==null?void 0:lt.find(xe=>xe.id==="opencode");ct&&(!_||(e==null?void 0:e.harness)==="opencode")&&H(ct,De)}})]})}function tc({choices:e,value:r,defaultId:t,header:n,align:s="left",dropDown:o=!1,disabled:a=!1,variant:i="pill",title:c,numbered:u=!1,searchPlaceholder:d,renderIcon:_,renderLabel:p,floating:m=!1,onSelect:k,className:x}){var Q,K;const v=T.useRef(null),{open:b,setOpen:w,ref:y}=ba(v),S=T.useRef(null),[z,N]=T.useState("");if(T.useLayoutEffect(()=>{var L;const J=S.current,ee=y.current;if(!b||!m||!J||!ee)return;J.matches(":popover-open")||(J.showPopover(),(L=J.querySelector("input"))==null||L.focus());const P=()=>{const F=ee.getBoundingClientRect(),q=window.innerHeight-F.bottom-12,U=F.top-12,oe=Math.min(380,J.scrollHeight),ie=o?q>=oe||q>=U:UU;J.style.width=`${F.width}px`,J.style.minWidth="0",J.style.maxHeight=`${Math.max(0,Math.min(380,ie?q:U))}px`,J.style.left=`${F.left}px`,J.style.top=`${ie?F.bottom+4:F.top-J.getBoundingClientRect().height-4}px`};return P(),window.addEventListener("resize",P),window.addEventListener("scroll",P,!0),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,!0)}},[b,m,o,z,e.length,y]),e.length===0)return null;const A=r??t??((Q=e[0])==null?void 0:Q.id)??null,E=e.find(J=>J.id===A),M=e.find(J=>J.id===t),$=i==="bare"&&(M==null?void 0:M.id)===yb?M:void 0,I=($?e.filter(J=>J.id!==$.id):e).filter(J=>`${J.label} ${J.id}`.toLowerCase().includes(z.toLowerCase())),G=(E==null?void 0:E.label)??((K=e[0])==null?void 0:K.label)??"",H=J=>{var ee;k(J),w(!1),(ee=v.current)==null||ee.focus()};return f.jsxs("div",{className:`option-picker relative inline-flex${i==="field"?" w-full":""}`,ref:y,children:[f.jsxs("button",{ref:v,type:"button",className:Ls(i==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${i==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,x),title:c,"aria-haspopup":"menu","aria-expanded":b,disabled:a,onClick:()=>{N(""),w(J=>!J)},children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[E&&(_==null?void 0:_(E)),f.jsx("span",{className:"truncate",children:E?(p==null?void 0:p(E))??G:G})]}),f.jsx(Zc,{size:12})]}),b&&f.jsxs("div",{ref:S,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(J=>J.description)?"min-w-80":""} ${i==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${o?"drop-down":""}`,children:[n&&f.jsx("div",{className:bP,children:n}),d&&f.jsx("input",{autoFocus:!0,"aria-label":d,placeholder:d,value:z,onChange:J=>N(J.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),f.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[$&&f.jsxs(f.Fragment,{children:[f.jsxs(_r,{type:"button",onClick:()=>H($.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_($),f.jsxs("span",{children:[(p==null?void 0:p($))??$.label,f.jsx("span",{className:"option-default text-muted font-normal",children:szt()})]})]}),A===$.id&&f.jsx(_o,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),I.map((J,ee)=>f.jsxs(_r,{type:"button",onClick:()=>H(J.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(J),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[(p==null?void 0:p(J))??J.label,!$&&J.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",BD()]})]}),J.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:J.description})]})]}),A===J.id?f.jsx(_o,{size:13}):u&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:ee+1})]},J.id))]})]})]})}const zNn=[];function L3({runtime:e,corner:r=!1}){const[t,n]=T.useState(!1),[s,o]=T.useState(!1),[a,i]=T.useState(!1),[c,u]=T.useState(null),d=ba();async function _(){if(c){i(!0);try{await QL(c),u(null)}catch(p){u(null),tr(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:r?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:d.ref,children:[d.open&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[f.jsx("div",{className:"text-sm font-medium text-text",children:Yor({host:Ee(e.session.host),user:Ee(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ee(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(_r,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{n(!0);try{await KL(),d.setOpen(!1)}catch(p){tr(p instanceof Error?p.message:String(p),"error")}finally{n(!1)}},children:t?For():s3()}),f.jsx(d0,{content:qlr(),className:"me-2 shrink-0 text-subtext",children:f.jsx(dS,{size:15})})]}),f.jsx(_r,{danger:!0,disabled:s,onClick:async()=>{o(!0);try{u(await VL()),d.setOpen(!1)}catch(p){tr(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}},children:JD()})]}),r?f.jsxs(Oe,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:[f.jsx(Eb,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:$2({host:Ee(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Rt,{size:"small","aria-label":$2({host:Ee(e.session.host)}),"aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:f.jsx(Eb,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:$2({host:Ee(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ee(e.session.version??"…")]})]})]})]}),c&&f.jsx(MI,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void _()})]})}const Nb="code-source-text",yP="code-source-wrap",xP="file-view-gutter text-right text-muted select-none";function wP(e){const r=String(e).length+2;return{ruleCh:r,codeCh:r+2}}const ENn={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},NNn={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function I3(e){const r=e.trim().toLowerCase();return ENn[r]??r}function jS(e){var s;if(!e)return null;const r=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=NNn[r];if(t)return I3(t);const n=r.lastIndexOf(".");return n===-1||n===r.length-1?null:I3(r.slice(n+1))}Jc.displayName="clike";Jc.aliases=[];function Jc(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}g0.displayName="c";g0.aliases=[];function g0(e){e.register(Jc),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}Oy.displayName="cpp";Oy.aliases=[];function Oy(e){e.register(g0),(function(r){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});r.languages.cpp=r.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),r.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),r.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:r.languages.cpp}}}}),r.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),r.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:r.languages.extend("cpp",{})}}),r.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},r.languages.cpp["base-clause"])})(e)}SS.displayName="arduino";SS.aliases=["ino"];function SS(e){e.register(Oy),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}CS.displayName="bash";CS.aliases=["sh","shell"];function CS(e){(function(r){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};r.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=r.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=s.variable[1].inside,i=0;i>/g,function(q,U){return"(?:"+F[+U]+")"})}function n(L,F,q){return RegExp(t(L,F),"")}function s(L,F){for(var q=0;q>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var o={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function a(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var i=a(o.typeDeclaration),c=RegExp(a(o.type+" "+o.typeDeclaration+" "+o.contextual+" "+o.other)),u=a(o.typeDeclaration+" "+o.contextual+" "+o.other),d=a(o.type+" "+o.typeDeclaration+" "+o.other),_=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,k=t(/<<0>>(?:\s*<<1>>)?/.source,[m,_]),x=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,k]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[x,v]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[_,p,v]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),S=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,x,v]),z={keyword:c,punctuation:/[<>()?,.:[\]]/},N=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,E=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;r.languages.csharp=r.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[x]),lookbehind:!0,inside:z},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,S]),lookbehind:!0,inside:z},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[i,k]),lookbehind:!0,inside:z},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[x]),lookbehind:!0,inside:z},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:z},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[S,d,m]),inside:z}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),r.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),r.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),r.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:z},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[S,x]),inside:z,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[S]),lookbehind:!0,inside:z,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,_]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(_),alias:"class-name",inside:z}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[i,k,m,S,c.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[k,p]),lookbehind:!0,greedy:!0,inside:r.languages.csharp},keyword:c,"class-name":{pattern:RegExp(S),greedy:!0,inside:z},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=A+"|"+N,$=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),D=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[$]),2),I=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,G=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[x,D]);r.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[I,G]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[I]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[D]),inside:r.languages.csharp},"class-name":{pattern:RegExp(x),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var H=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[$]),2),K=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,H]),J=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),ee=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[J,H]);function P(L,F){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,H]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:r.languages.csharp}}},string:/[\s\S]+/}}r.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[K]),lookbehind:!0,greedy:!0,inside:P(K,Q)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[ee]),lookbehind:!0,greedy:!0,inside:P(ee,J)}],char:{pattern:RegExp(N),greedy:!0}}),r.languages.dotnet=r.languages.cs=r.languages.csharp})(e)}v0.displayName="markup";v0.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function v0(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var s={};s["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},s.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:s}};o["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(r,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}kp.displayName="css";kp.aliases=[];function kp(e){(function(r){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var n=r.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(e)}ES.displayName="diff";ES.aliases=[];function ES(e){(function(r){r.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var s=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),n==="diff"&&o.push("bold"),r.languages.diff[n]={pattern:RegExp("^(?:["+s+`].*(?:\r ?| -|(?![\\s\\S])))+`,"m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(r.languages.diff,"PREFIXES",{value:t})})(e)}NS.displayName="go";NS.aliases=[];function NS(e){e.register(Jc),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}AS.displayName="ini";AS.aliases=[];function AS(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}TS.displayName="java";TS.aliases=[];function TS(e){e.register(Jc),(function(r){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};r.languages.java=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[r.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),r.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),r.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}RS.displayName="regex";RS.aliases=[];function RS(e){(function(r){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},a="(?:[^\\\\-]|"+n.source+")",i=RegExp(a+"-"+a),c={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};r.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":o,escape:n}},"special-escape":t,"char-set":s,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":c}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}MS.displayName="json";MS.aliases=["webmanifest"];function MS(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}OS.displayName="kotlin";OS.aliases=["kt","kts"];function OS(e){e.register(Jc),(function(r){r.languages.kotlin=r.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete r.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:r.languages.kotlin}};r.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete r.languages.kotlin.string,r.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),r.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),r.languages.kt=r.languages.kotlin,r.languages.kts=r.languages.kotlin})(e)}$S.displayName="less";$S.aliases=[];function $S(e){e.register(kp),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}DS.displayName="lua";DS.aliases=[];function DS(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}LS.displayName="makefile";LS.aliases=[];function LS(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}IS.displayName="yaml";IS.aliases=["yml"];function IS(e){(function(r){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(c,u){u=(u||"").replace(/m/g,"")+"m";var d=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(d,u)}r.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return"(?:"+o+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},r.languages.yml=r.languages.yaml})(e)}PS.displayName="markdown";PS.aliases=["md"];function PS(e){e.register(v0),(function(r){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(i){return i=i.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+i+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;r.languages.markdown=r.languages.extend("markup",{}),r.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:r.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:r.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:r.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(i){["url","bold","italic","strike","code-snippet"].forEach(function(c){i!==c&&(r.languages.markdown[i].inside.content.inside[c]=r.languages.markdown[c])})}),r.hooks.add("after-tokenize",function(i){if(i.language!=="markdown"&&i.language!=="md")return;function c(u){if(!(!u||typeof u=="string"))for(var d=0,_=u.length;d<_;d++){var p=u[d];if(p.type!=="code"){c(p.content);continue}var m=p.content[1],k=p.content[3];if(m&&k&&m.type==="code-language"&&k.type==="code-block"&&typeof m.content=="string"){var w=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");w=(/[a-z][\w-]*/i.exec(w)||[""])[0].toLowerCase();var v="language-"+w;k.alias?typeof k.alias=="string"?k.alias=[k.alias,v]:k.alias.push(v):k.alias=[v]}}}c(i.tokens)}),r.hooks.add("wrap",function(i){if(i.type==="code-block"){for(var c="",u=0,d=i.classes.length;u]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}FS.displayName="perl";FS.aliases=[];function FS(e){(function(r){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;r.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}Dy.displayName="markup-templating";Dy.aliases=[];function Dy(e){e.register(v0),(function(r){function t(n,s){return"___"+n.toUpperCase()+s+"___"}Object.defineProperties(r.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,s,o,a){if(n.language===s){var i=n.tokenStack=[];n.code=n.code.replace(o,function(c){if(typeof a=="function"&&!a(c))return c;for(var u=i.length,d;n.code.indexOf(d=t(s,u))!==-1;)++u;return i[u]=c,d}),n.grammar=r.languages.markup}}},tokenizePlaceholders:{value:function(n,s){if(n.language!==s||!n.tokenStack)return;n.grammar=r.languages[s];var o=0,a=Object.keys(n.tokenStack);function i(c){for(var u=0;u=a.length);u++){var d=c[u];if(typeof d=="string"||d.content&&typeof d.content=="string"){var _=a[o],p=n.tokenStack[_],m=typeof d=="string"?d:d.content,k=t(s,_),w=m.indexOf(k);if(w>-1){++o;var v=m.substring(0,w),b=new r.Token(s,r.tokenize(p,n.grammar),"language-"+s,p),x=m.substring(w+k.length),y=[];v&&y.push.apply(y,i([v])),y.push(b),x&&y.push.apply(y,i([x])),typeof d=="string"?c.splice.apply(c,[u,1].concat(y)):d.content=y}}else d.content&&i(d.content)}return c}i(n.tokens)}}})})(e)}HS.displayName="php";HS.aliases=[];function HS(e){e.register(Dy),(function(r){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],s=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;r.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:s,operator:o,punctuation:a};var i={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:r.languages.php},c=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:i}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:i}}];r.languages.insertBefore("php","variable",{string:c,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:c,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:s,operator:o,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),r.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var d=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;r.languages["markup-templating"].buildPlaceholders(u,"php",d)}}),r.hooks.add("after-tokenize",function(u){r.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}qS.displayName="python";qS.aliases=["py"];function qS(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}US.displayName="r";US.aliases=[];function US(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}GS.displayName="ruby";GS.aliases=["rb"];function GS(e){e.register(Jc),(function(r){r.languages.ruby=r.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),r.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:r.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete r.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",s=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;r.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+s),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+s+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),r.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete r.languages.ruby.string,r.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),r.languages.rb=r.languages.ruby})(e)}WS.displayName="rust";WS.aliases=[];function WS(e){(function(r){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),r.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},r.languages.rust["closure-params"].inside.rest=r.languages.rust,r.languages.rust.attribute.inside.string=r.languages.rust.string})(e)}KS.displayName="sass";KS.aliases=[];function KS(e){e.register(kp),(function(r){r.languages.sass=r.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),r.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete r.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];r.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:r.languages.sass.important}}}),delete r.languages.sass.property,delete r.languages.sass.important,r.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}VS.displayName="scss";VS.aliases=[];function VS(e){e.register(kp),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}QS.displayName="sql";QS.aliases=[];function QS(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}XS.displayName="swift";XS.aliases=[];function XS(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(r){r.inside.interpolation.inside=e.languages.swift})}YS.displayName="typescript";YS.aliases=["ts"];function YS(e){e.register($y),(function(r){r.languages.typescript=r.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),r.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete r.languages.typescript.parameter,delete r.languages.typescript["literal-property"];var t=r.languages.extend("typescript",{});delete t["class-name"],r.languages.typescript["class-name"].inside=t,r.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),r.languages.ts=r.languages.typescript})(e)}Ly.displayName="basic";Ly.aliases=[];function Ly(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}ZS.displayName="vbnet";ZS.aliases=[];function ZS(e){e.register(Ly),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}class b0{constructor(r,t,n){this.normal=t,this.property=r,n&&(this.space=n)}}b0.prototype.normal={};b0.prototype.property={};b0.prototype.space=void 0;function kP(e,r){const t={},n={};for(const s of e)Object.assign(t,s.property),Object.assign(n,s.normal);return new b0(t,n,r)}function bg(e){return e.toLowerCase()}class ya{constructor(r,t){this.attribute=t,this.property=r}}ya.prototype.attribute="";ya.prototype.booleanish=!1;ya.prototype.boolean=!1;ya.prototype.commaOrSpaceSeparated=!1;ya.prototype.commaSeparated=!1;ya.prototype.defined=!1;ya.prototype.mustUseProperty=!1;ya.prototype.number=!1;ya.prototype.overloadedBoolean=!1;ya.prototype.property="";ya.prototype.spaceSeparated=!1;ya.prototype.space=void 0;let ANn=0;const ar=bd(),js=bd(),P3=bd(),et=bd(),gn=bd(),If=bd(),Oa=bd();function bd(){return 2**++ANn}const B3=Object.freeze(Object.defineProperty({__proto__:null,boolean:ar,booleanish:js,commaOrSpaceSeparated:Oa,commaSeparated:If,number:et,overloadedBoolean:P3,spaceSeparated:gn},Symbol.toStringTag,{value:"Module"})),X2=Object.keys(B3);class JS extends ya{constructor(r,t,n,s){let o=-1;if(super(r,t),gA(this,"space",s),typeof n=="number")for(;++o4&&t.slice(0,4)==="data"&&$Nn.test(r)){if(r.charAt(4)==="-"){const o=r.slice(5).replace(vA,LNn);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=r.slice(4);if(!vA.test(o)){let a=o.replace(ONn,DNn);a.charAt(0)!=="-"&&(a="-"+a),r="data"+a}}s=JS}return new s(n,r)}function DNn(e){return"-"+e.toLowerCase()}function LNn(e){return e.charAt(1).toUpperCase()}const TP=kP([jP,TNn,zP,EP,NP],"html"),Iy=kP([jP,RNn,zP,EP,NP],"svg");function bA(e){const r=[],t=String(e||"");let n=t.indexOf(","),s=0,o=!1;for(;!o;){n===-1&&(n=t.length,o=!0);const a=t.slice(s,n).trim();(a||!o)&&r.push(a),s=n+1,n=t.indexOf(",",s)}return r}function INn(e,r){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const yA=/[#.]/g;function PNn(e,r){const t=e||"",n={};let s=0,o,a;for(;s=48&&r<=57}function VNn(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}function QNn(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}function jA(e){return QNn(e)||OP(e)}const SA=document.createElement("i");function yg(e){const r="&"+e+";";SA.innerHTML=r;const t=SA.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===r?!1:t}const XNn=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function YNn(e,r){const t={},n=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let o=0,a=-1,i="",c,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,c=t.position.start):c=t.position);let d=(c?c.line:0)||1,_=(c?c.column:0)||1,p=k(),m;for(o--;++o<=e.length;)if(m===10&&(_=(u?u[a]:0)||1),m=e.charCodeAt(o),m===38){const b=e.charCodeAt(o+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||n&&b===n){i+=String.fromCharCode(m),_++;continue}const x=o+1;let y=x,S=x,z;if(b===35){S=++y;const G=e.charCodeAt(S);G===88||G===120?(z="hexadecimal",S=++y):z="decimal"}else z="named";let E="",A="",N="";const M=z==="named"?jA:z==="decimal"?OP:VNn;for(S--;++S<=e.length;){const G=e.charCodeAt(S);if(!M(G))break;N+=String.fromCharCode(G),z==="named"&&KNn.includes(N)&&(E=N,A=yg(N))}let $=e.charCodeAt(S)===59;if($){S++;const G=z==="named"?yg(N):!1;G&&(E=N,A=G)}let D=1+S-x,I="";if(!(!$&&t.nonTerminated===!1))if(!N)z!=="named"&&w(4,D);else if(z==="named"){if($&&!A)w(5,1);else if(E!==N&&(S=y+E.length,D=1+S-y,$=!1),!$){const G=E?1:3;if(t.attribute){const H=e.charCodeAt(S);H===61?(w(G,D),A=""):jA(H)?A="":w(G,D)}else w(G,D)}I=A}else{$||w(2,D);let G=Number.parseInt(N,z==="hexadecimal"?16:10);if(ZNn(G))w(7,D),I="�";else if(G in kA)w(6,D),I=kA[G];else{let H="";JNn(G)&&w(6,D),G>65535&&(G-=65536,H+=String.fromCharCode(G>>>10|55296),G=56320|G&1023),I=H+String.fromCharCode(G)}}if(I){v(),p=k(),o=S-1,_+=S-x+1,s.push(I);const G=k();G.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,I,{start:p,end:G},e.slice(x-1,S)),p=G}else N=e.slice(x-1,S),i+=N,_+=N.length,o=S-1}else m===10&&(d++,a++,_=0),Number.isNaN(m)?v():(i+=String.fromCharCode(m),_++);return s.join("");function k(){return{line:d,column:_,offset:o+((c?c.offset:0)||0)}}function w(b,x){let y;t.warning&&(y=k(),y.column+=x,y.offset+=x,t.warning.call(t.warningContext||void 0,XNn[b],y,b))}function v(){i&&(s.push(i),t.text&&t.text.call(t.textContext||void 0,i,{start:p,end:k()}),i="")}}function ZNn(e){return e>=55296&&e<=57343||e>1114111}function JNn(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var eAn=0,Qv={},Ws={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++eAn}),e.__id},clone:function e(r,t){t=t||{};var n,s;switch(Ws.util.type(r)){case"Object":if(s=Ws.util.objId(r),t[s])return t[s];n={},t[s]=n;for(var o in r)r.hasOwnProperty(o)&&(n[o]=e(r[o],t));return n;case"Array":return s=Ws.util.objId(r),t[s]?t[s]:(n=[],t[s]=n,r.forEach(function(a,i){n[i]=e(a,t)}),n);default:return r}}},languages:{plain:Qv,plaintext:Qv,text:Qv,txt:Qv,extend:function(e,r){var t=Ws.util.clone(Ws.languages[e]);for(var n in r)t[n]=r[n];return t},insertBefore:function(e,r,t,n){n=n||Ws.languages;var s=n[e],o={};for(var a in s)if(s.hasOwnProperty(a)){if(a==r)for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);t.hasOwnProperty(a)||(o[a]=s[a])}var c=n[e];return n[e]=o,Ws.languages.DFS(Ws.languages,function(u,d){d===c&&u!=e&&(this[u]=o)}),o},DFS:function e(r,t,n,s){s=s||{};var o=Ws.util.objId;for(var a in r)if(r.hasOwnProperty(a)){t.call(r,a,r[a],n||a);var i=r[a],c=Ws.util.type(i);c==="Object"&&!s[o(i)]?(s[o(i)]=!0,e(i,t,null,s)):c==="Array"&&!s[o(i)]&&(s[o(i)]=!0,e(i,t,a,s))}}},plugins:{},highlight:function(e,r,t){var n={code:e,grammar:r,language:t};if(Ws.hooks.run("before-tokenize",n),!n.grammar)throw new Error('The language "'+n.language+'" has no grammar.');return n.tokens=Ws.tokenize(n.code,n.grammar),Ws.hooks.run("after-tokenize",n),Qm.stringify(Ws.util.encode(n.tokens),n.language)},tokenize:function(e,r){var t=r.rest;if(t){for(var n in t)r[n]=t[n];delete r.rest}var s=new tAn;return F1(s,s.head,e),$P(e,s,r,s.head,0),nAn(s)},hooks:{all:{},add:function(e,r){var t=Ws.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){var t=Ws.hooks.all[e];if(!(!t||!t.length))for(var n=0,s;s=t[n++];)s(r)}},Token:Qm};function Qm(e,r,t,n){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0}function CA(e,r,t,n){e.lastIndex=r;var s=e.exec(t);if(s&&n&&s[1]){var o=s[1].length;s.index+=o,s[0]=s[0].slice(o)}return s}function $P(e,r,t,n,s,o){for(var a in t)if(!(!t.hasOwnProperty(a)||!t[a])){var i=t[a];i=Array.isArray(i)?i:[i];for(var c=0;c=o.reach);b+=v.value.length,v=v.next){var x=v.value;if(r.length>e.length)return;if(!(x instanceof Qm)){var y=1,S;if(p){if(S=CA(w,b,e,_),!S||S.index>=e.length)break;var N=S.index,z=S.index+S[0].length,E=b;for(E+=v.value.length;N>=E;)v=v.next,E+=v.value.length;if(E-=v.value.length,b=E,v.value instanceof Qm)continue;for(var A=v;A!==r.tail&&(Eo.reach&&(o.reach=I);var G=v.prev;$&&(G=F1(r,G,$),b+=$.length),rAn(r,G,y);var H=new Qm(a,d?Ws.tokenize(M,d):M,m,M);if(v=F1(r,G,H),D&&F1(r,v,D),y>1){var Q={cause:a+","+c,reach:I};$P(e,r,t,v.prev,b,Q),o&&Q.reach>o.reach&&(o.reach=Q.reach)}}}}}}function tAn(){var e={value:null,prev:null,next:null},r={value:null,prev:e,next:null};e.next=r,this.head=e,this.tail=r,this.length=0}function F1(e,r,t){var n=r.next,s={value:t,prev:r,next:n};return r.next=s,n.prev=s,e.length++,s}function rAn(e,r,t){for(var n=r.next,s=0;st)return null;try{return Ft.highlight(e,r).children}catch{return null}}function PP(e,r){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:f.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(PP)},r)}function _An(e,r,t=3e5){var n;return((n=IP(e,r,t))==null?void 0:n.map(PP))??e}function BP(e,r,t=3e5){const n=IP(e,r,t);if(!n)return e.split(` +|(?![\\s\\S])))+`,"m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(r.languages.diff,"PREFIXES",{value:t})})(e)}NS.displayName="go";NS.aliases=[];function NS(e){e.register(Jc),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}AS.displayName="ini";AS.aliases=[];function AS(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}TS.displayName="java";TS.aliases=[];function TS(e){e.register(Jc),(function(r){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};r.languages.java=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[r.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),r.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),r.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}RS.displayName="regex";RS.aliases=[];function RS(e){(function(r){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},a="(?:[^\\\\-]|"+n.source+")",i=RegExp(a+"-"+a),c={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};r.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":o,escape:n}},"special-escape":t,"char-set":s,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":c}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}MS.displayName="json";MS.aliases=["webmanifest"];function MS(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}OS.displayName="kotlin";OS.aliases=["kt","kts"];function OS(e){e.register(Jc),(function(r){r.languages.kotlin=r.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete r.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:r.languages.kotlin}};r.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete r.languages.kotlin.string,r.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),r.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),r.languages.kt=r.languages.kotlin,r.languages.kts=r.languages.kotlin})(e)}$S.displayName="less";$S.aliases=[];function $S(e){e.register(kp),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}DS.displayName="lua";DS.aliases=[];function DS(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}LS.displayName="makefile";LS.aliases=[];function LS(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}IS.displayName="yaml";IS.aliases=["yml"];function IS(e){(function(r){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(c,u){u=(u||"").replace(/m/g,"")+"m";var d=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(d,u)}r.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return"(?:"+o+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},r.languages.yml=r.languages.yaml})(e)}PS.displayName="markdown";PS.aliases=["md"];function PS(e){e.register(v0),(function(r){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(i){return i=i.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+i+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;r.languages.markdown=r.languages.extend("markup",{}),r.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:r.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:r.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:r.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(i){["url","bold","italic","strike","code-snippet"].forEach(function(c){i!==c&&(r.languages.markdown[i].inside.content.inside[c]=r.languages.markdown[c])})}),r.hooks.add("after-tokenize",function(i){if(i.language!=="markdown"&&i.language!=="md")return;function c(u){if(!(!u||typeof u=="string"))for(var d=0,_=u.length;d<_;d++){var p=u[d];if(p.type!=="code"){c(p.content);continue}var m=p.content[1],k=p.content[3];if(m&&k&&m.type==="code-language"&&k.type==="code-block"&&typeof m.content=="string"){var x=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");x=(/[a-z][\w-]*/i.exec(x)||[""])[0].toLowerCase();var v="language-"+x;k.alias?typeof k.alias=="string"?k.alias=[k.alias,v]:k.alias.push(v):k.alias=[v]}}}c(i.tokens)}),r.hooks.add("wrap",function(i){if(i.type==="code-block"){for(var c="",u=0,d=i.classes.length;u]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}FS.displayName="perl";FS.aliases=[];function FS(e){(function(r){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;r.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}Dy.displayName="markup-templating";Dy.aliases=[];function Dy(e){e.register(v0),(function(r){function t(n,s){return"___"+n.toUpperCase()+s+"___"}Object.defineProperties(r.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,s,o,a){if(n.language===s){var i=n.tokenStack=[];n.code=n.code.replace(o,function(c){if(typeof a=="function"&&!a(c))return c;for(var u=i.length,d;n.code.indexOf(d=t(s,u))!==-1;)++u;return i[u]=c,d}),n.grammar=r.languages.markup}}},tokenizePlaceholders:{value:function(n,s){if(n.language!==s||!n.tokenStack)return;n.grammar=r.languages[s];var o=0,a=Object.keys(n.tokenStack);function i(c){for(var u=0;u=a.length);u++){var d=c[u];if(typeof d=="string"||d.content&&typeof d.content=="string"){var _=a[o],p=n.tokenStack[_],m=typeof d=="string"?d:d.content,k=t(s,_),x=m.indexOf(k);if(x>-1){++o;var v=m.substring(0,x),b=new r.Token(s,r.tokenize(p,n.grammar),"language-"+s,p),w=m.substring(x+k.length),y=[];v&&y.push.apply(y,i([v])),y.push(b),w&&y.push.apply(y,i([w])),typeof d=="string"?c.splice.apply(c,[u,1].concat(y)):d.content=y}}else d.content&&i(d.content)}return c}i(n.tokens)}}})})(e)}HS.displayName="php";HS.aliases=[];function HS(e){e.register(Dy),(function(r){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],s=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;r.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:s,operator:o,punctuation:a};var i={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:r.languages.php},c=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:i}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:i}}];r.languages.insertBefore("php","variable",{string:c,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:c,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:s,operator:o,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),r.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var d=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;r.languages["markup-templating"].buildPlaceholders(u,"php",d)}}),r.hooks.add("after-tokenize",function(u){r.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}qS.displayName="python";qS.aliases=["py"];function qS(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}US.displayName="r";US.aliases=[];function US(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}GS.displayName="ruby";GS.aliases=["rb"];function GS(e){e.register(Jc),(function(r){r.languages.ruby=r.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),r.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:r.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete r.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",s=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;r.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+s),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+s+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),r.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete r.languages.ruby.string,r.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),r.languages.rb=r.languages.ruby})(e)}WS.displayName="rust";WS.aliases=[];function WS(e){(function(r){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),r.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},r.languages.rust["closure-params"].inside.rest=r.languages.rust,r.languages.rust.attribute.inside.string=r.languages.rust.string})(e)}KS.displayName="sass";KS.aliases=[];function KS(e){e.register(kp),(function(r){r.languages.sass=r.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),r.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete r.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];r.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:r.languages.sass.important}}}),delete r.languages.sass.property,delete r.languages.sass.important,r.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}VS.displayName="scss";VS.aliases=[];function VS(e){e.register(kp),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}QS.displayName="sql";QS.aliases=[];function QS(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}XS.displayName="swift";XS.aliases=[];function XS(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(r){r.inside.interpolation.inside=e.languages.swift})}YS.displayName="typescript";YS.aliases=["ts"];function YS(e){e.register($y),(function(r){r.languages.typescript=r.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),r.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete r.languages.typescript.parameter,delete r.languages.typescript["literal-property"];var t=r.languages.extend("typescript",{});delete t["class-name"],r.languages.typescript["class-name"].inside=t,r.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),r.languages.ts=r.languages.typescript})(e)}Ly.displayName="basic";Ly.aliases=[];function Ly(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}ZS.displayName="vbnet";ZS.aliases=[];function ZS(e){e.register(Ly),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}class b0{constructor(r,t,n){this.normal=t,this.property=r,n&&(this.space=n)}}b0.prototype.normal={};b0.prototype.property={};b0.prototype.space=void 0;function kP(e,r){const t={},n={};for(const s of e)Object.assign(t,s.property),Object.assign(n,s.normal);return new b0(t,n,r)}function bg(e){return e.toLowerCase()}class ya{constructor(r,t){this.attribute=t,this.property=r}}ya.prototype.attribute="";ya.prototype.booleanish=!1;ya.prototype.boolean=!1;ya.prototype.commaOrSpaceSeparated=!1;ya.prototype.commaSeparated=!1;ya.prototype.defined=!1;ya.prototype.mustUseProperty=!1;ya.prototype.number=!1;ya.prototype.overloadedBoolean=!1;ya.prototype.property="";ya.prototype.spaceSeparated=!1;ya.prototype.space=void 0;let ANn=0;const ar=bd(),js=bd(),P3=bd(),et=bd(),gn=bd(),If=bd(),Oa=bd();function bd(){return 2**++ANn}const B3=Object.freeze(Object.defineProperty({__proto__:null,boolean:ar,booleanish:js,commaOrSpaceSeparated:Oa,commaSeparated:If,number:et,overloadedBoolean:P3,spaceSeparated:gn},Symbol.toStringTag,{value:"Module"})),X2=Object.keys(B3);class JS extends ya{constructor(r,t,n,s){let o=-1;if(super(r,t),gA(this,"space",s),typeof n=="number")for(;++o4&&t.slice(0,4)==="data"&&$Nn.test(r)){if(r.charAt(4)==="-"){const o=r.slice(5).replace(vA,LNn);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=r.slice(4);if(!vA.test(o)){let a=o.replace(ONn,DNn);a.charAt(0)!=="-"&&(a="-"+a),r="data"+a}}s=JS}return new s(n,r)}function DNn(e){return"-"+e.toLowerCase()}function LNn(e){return e.charAt(1).toUpperCase()}const TP=kP([jP,TNn,zP,EP,NP],"html"),Iy=kP([jP,RNn,zP,EP,NP],"svg");function bA(e){const r=[],t=String(e||"");let n=t.indexOf(","),s=0,o=!1;for(;!o;){n===-1&&(n=t.length,o=!0);const a=t.slice(s,n).trim();(a||!o)&&r.push(a),s=n+1,n=t.indexOf(",",s)}return r}function INn(e,r){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const yA=/[#.]/g;function PNn(e,r){const t=e||"",n={};let s=0,o,a;for(;s=48&&r<=57}function VNn(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}function QNn(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}function jA(e){return QNn(e)||OP(e)}const SA=document.createElement("i");function yg(e){const r="&"+e+";";SA.innerHTML=r;const t=SA.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===r?!1:t}const XNn=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function YNn(e,r){const t={},n=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let o=0,a=-1,i="",c,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,c=t.position.start):c=t.position);let d=(c?c.line:0)||1,_=(c?c.column:0)||1,p=k(),m;for(o--;++o<=e.length;)if(m===10&&(_=(u?u[a]:0)||1),m=e.charCodeAt(o),m===38){const b=e.charCodeAt(o+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||n&&b===n){i+=String.fromCharCode(m),_++;continue}const w=o+1;let y=w,S=w,z;if(b===35){S=++y;const G=e.charCodeAt(S);G===88||G===120?(z="hexadecimal",S=++y):z="decimal"}else z="named";let N="",A="",E="";const M=z==="named"?jA:z==="decimal"?OP:VNn;for(S--;++S<=e.length;){const G=e.charCodeAt(S);if(!M(G))break;E+=String.fromCharCode(G),z==="named"&&KNn.includes(E)&&(N=E,A=yg(E))}let $=e.charCodeAt(S)===59;if($){S++;const G=z==="named"?yg(E):!1;G&&(N=E,A=G)}let D=1+S-w,I="";if(!(!$&&t.nonTerminated===!1))if(!E)z!=="named"&&x(4,D);else if(z==="named"){if($&&!A)x(5,1);else if(N!==E&&(S=y+N.length,D=1+S-y,$=!1),!$){const G=N?1:3;if(t.attribute){const H=e.charCodeAt(S);H===61?(x(G,D),A=""):jA(H)?A="":x(G,D)}else x(G,D)}I=A}else{$||x(2,D);let G=Number.parseInt(E,z==="hexadecimal"?16:10);if(ZNn(G))x(7,D),I="�";else if(G in kA)x(6,D),I=kA[G];else{let H="";JNn(G)&&x(6,D),G>65535&&(G-=65536,H+=String.fromCharCode(G>>>10|55296),G=56320|G&1023),I=H+String.fromCharCode(G)}}if(I){v(),p=k(),o=S-1,_+=S-w+1,s.push(I);const G=k();G.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,I,{start:p,end:G},e.slice(w-1,S)),p=G}else E=e.slice(w-1,S),i+=E,_+=E.length,o=S-1}else m===10&&(d++,a++,_=0),Number.isNaN(m)?v():(i+=String.fromCharCode(m),_++);return s.join("");function k(){return{line:d,column:_,offset:o+((c?c.offset:0)||0)}}function x(b,w){let y;t.warning&&(y=k(),y.column+=w,y.offset+=w,t.warning.call(t.warningContext||void 0,XNn[b],y,b))}function v(){i&&(s.push(i),t.text&&t.text.call(t.textContext||void 0,i,{start:p,end:k()}),i="")}}function ZNn(e){return e>=55296&&e<=57343||e>1114111}function JNn(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var eAn=0,Qv={},Ws={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++eAn}),e.__id},clone:function e(r,t){t=t||{};var n,s;switch(Ws.util.type(r)){case"Object":if(s=Ws.util.objId(r),t[s])return t[s];n={},t[s]=n;for(var o in r)r.hasOwnProperty(o)&&(n[o]=e(r[o],t));return n;case"Array":return s=Ws.util.objId(r),t[s]?t[s]:(n=[],t[s]=n,r.forEach(function(a,i){n[i]=e(a,t)}),n);default:return r}}},languages:{plain:Qv,plaintext:Qv,text:Qv,txt:Qv,extend:function(e,r){var t=Ws.util.clone(Ws.languages[e]);for(var n in r)t[n]=r[n];return t},insertBefore:function(e,r,t,n){n=n||Ws.languages;var s=n[e],o={};for(var a in s)if(s.hasOwnProperty(a)){if(a==r)for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);t.hasOwnProperty(a)||(o[a]=s[a])}var c=n[e];return n[e]=o,Ws.languages.DFS(Ws.languages,function(u,d){d===c&&u!=e&&(this[u]=o)}),o},DFS:function e(r,t,n,s){s=s||{};var o=Ws.util.objId;for(var a in r)if(r.hasOwnProperty(a)){t.call(r,a,r[a],n||a);var i=r[a],c=Ws.util.type(i);c==="Object"&&!s[o(i)]?(s[o(i)]=!0,e(i,t,null,s)):c==="Array"&&!s[o(i)]&&(s[o(i)]=!0,e(i,t,a,s))}}},plugins:{},highlight:function(e,r,t){var n={code:e,grammar:r,language:t};if(Ws.hooks.run("before-tokenize",n),!n.grammar)throw new Error('The language "'+n.language+'" has no grammar.');return n.tokens=Ws.tokenize(n.code,n.grammar),Ws.hooks.run("after-tokenize",n),Qm.stringify(Ws.util.encode(n.tokens),n.language)},tokenize:function(e,r){var t=r.rest;if(t){for(var n in t)r[n]=t[n];delete r.rest}var s=new tAn;return F1(s,s.head,e),$P(e,s,r,s.head,0),nAn(s)},hooks:{all:{},add:function(e,r){var t=Ws.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){var t=Ws.hooks.all[e];if(!(!t||!t.length))for(var n=0,s;s=t[n++];)s(r)}},Token:Qm};function Qm(e,r,t,n){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0}function CA(e,r,t,n){e.lastIndex=r;var s=e.exec(t);if(s&&n&&s[1]){var o=s[1].length;s.index+=o,s[0]=s[0].slice(o)}return s}function $P(e,r,t,n,s,o){for(var a in t)if(!(!t.hasOwnProperty(a)||!t[a])){var i=t[a];i=Array.isArray(i)?i:[i];for(var c=0;c=o.reach);b+=v.value.length,v=v.next){var w=v.value;if(r.length>e.length)return;if(!(w instanceof Qm)){var y=1,S;if(p){if(S=CA(x,b,e,_),!S||S.index>=e.length)break;var E=S.index,z=S.index+S[0].length,N=b;for(N+=v.value.length;E>=N;)v=v.next,N+=v.value.length;if(N-=v.value.length,b=N,v.value instanceof Qm)continue;for(var A=v;A!==r.tail&&(No.reach&&(o.reach=I);var G=v.prev;$&&(G=F1(r,G,$),b+=$.length),rAn(r,G,y);var H=new Qm(a,d?Ws.tokenize(M,d):M,m,M);if(v=F1(r,G,H),D&&F1(r,v,D),y>1){var Q={cause:a+","+c,reach:I};$P(e,r,t,v.prev,b,Q),o&&Q.reach>o.reach&&(o.reach=Q.reach)}}}}}}function tAn(){var e={value:null,prev:null,next:null},r={value:null,prev:e,next:null};e.next=r,this.head=e,this.tail=r,this.length=0}function F1(e,r,t){var n=r.next,s={value:t,prev:r,next:n};return r.next=s,n.prev=s,e.length++,s}function rAn(e,r,t){for(var n=r.next,s=0;st)return null;try{return Ft.highlight(e,r).children}catch{return null}}function PP(e,r){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:f.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(PP)},r)}function _An(e,r,t=3e5){var n;return((n=IP(e,r,t))==null?void 0:n.map(PP))??e}function BP(e,r,t=3e5){const n=IP(e,r,t);if(!n)return e.split(` `);const s=[];let o=[];const a=[];let i=0;const c=d=>{let _=d;for(let p=a.length-1;p>=0;p--)_=f.jsx("span",{className:a[p],children:_},i++);o.push(_)},u=d=>{var _;if(d.type==="text"){(d.value??"").split(` -`).forEach((p,m)=>{m>0&&(s.push(o),o=[]),p&&c(p)});return}d.type==="element"&&(a.push((((_=d.properties)==null?void 0:_.className)??[]).join(" ")),(d.children??[]).forEach(u),a.pop())};return n.forEach(u),s.push(o),s}function FP(e){return Array.isArray(e)?e.length===0:e===""}function HP({value:e,onChange:r,onSave:t,onBlur:n,readOnly:s=!1,path:o,highlightLine:a,scrollRequest:i,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:d}){const _=T.useMemo(()=>BP(e,jS(o)),[e,o]),{ruleCh:p,codeCh:m}=wP(_.length),k=T.useRef(null),w=T.useRef(null),v=()=>{const S=k.current;S&&w.current&&(w.current.scrollTop=S.scrollTop)},b=T.useRef(u);T.useLayoutEffect(()=>{const S=k.current;!S||!b.current||(S.scrollTop=b.current.top,S.scrollLeft=b.current.left,v())},[o]),T.useLayoutEffect(v,[e]),T.useLayoutEffect(()=>{var M;const S=k.current;if(!S||!a||i===void 0)return;const z=e.split(` -`),E=Math.min(Math.max(Math.trunc(a),1),z.length);let A=0;for(let $=0;${if(!s){if((S.metaKey||S.ctrlKey)&&S.key.toLowerCase()==="s"){S.preventDefault(),t();return}if(S.key==="Tab"){S.preventDefault();const z=S.currentTarget,{selectionStart:E,selectionEnd:A}=z,N=e.slice(0,E)+" "+e.slice(A);r(N),requestAnimationFrame(()=>{z.selectionStart=z.selectionEnd=E+1})}}},y=`absolute inset-0 m-0 py-3.5 pe-4 ${Nb} ${yP} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Nb}`,children:[f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${p}ch`},"aria-hidden":"true"}),f.jsx("div",{ref:w,className:`file-view-code ${y} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:_.map((S,z)=>f.jsxs("div",{"data-line":z+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[f.jsx("span",{className:`${xP} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:z+1}),FP(S)?f.jsx("br",{}):S]},z))}),f.jsx("textarea",{ref:k,className:`file-view-editarea ${y} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${m}ch`},value:e,onChange:S=>{s||r(S.target.value)},onScroll:S=>{v(),d==null||d({top:Math.max(0,S.currentTarget.scrollTop),left:Math.max(0,S.currentTarget.scrollLeft)})},onKeyDown:x,onBlur:s?void 0:n,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function qP({onClose:e,onSaved:r}){const t=MCn(),n=dt(t),[s,o]=T.useState(()=>n.data??null),[a,i]=T.useState(()=>{var y;return((y=n.data)==null?void 0:y.content)??""}),c=!s&&n.error?n.error.message:null,u=mr({mutationFn:({content:y,previous:S})=>a6n(y,S)}),[d,_]=T.useState(!1),p=T.useRef(null),m=T.useRef(e),k=s!==null&&a!==s.content,w=T.useRef(k),v=T.useRef(d);w.current=k,v.current=d,m.current=e,T.useEffect(()=>{!n.data||w.current||v.current||(o(n.data),i(n.data.content))},[n.data]);const b=()=>{v.current||w.current&&!window.confirm(Cun())||m.current()};xp(p,b,"textarea");async function x(){if(!(!s||!k||d)){_(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!Wr(t.queryKey))return;ts(t.queryKey,{...s,content:a}),o({...s,content:a}),r==null||r(),tr(Wun(),"success")}catch(y){tr(y instanceof Error?y.message:String(y),"error")}finally{_(!1)}}}return _o.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&b()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(48rem,calc(100vh-2.5rem))] w-200 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"ssh-config-dialog-title",tabIndex:-1,children:[f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:r_n()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":mun(),onClick:b,disabled:d,children:f.jsx(pn,{size:16})}),f.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:c?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:c}):s===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(Nt,{})," ",Dun()]}):f.jsx(HP,{value:a,onChange:i,onSave:()=>void x(),path:s.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx(Oe,{onClick:b,disabled:d,children:Gf()}),f.jsx(Oe,{variant:"primary",onClick:()=>void x(),disabled:!k||d,children:d?Qa():nc()})]})]})}),document.body)}function UP({runtime:e,corner:r=!1}){const[t,n]=T.useState(null);return e.kind==="ssh"?f.jsx(L3,{runtime:e,corner:r}):f.jsxs(f.Fragment,{children:[r?f.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:f.jsxs(Oe,{className:"h-auto max-w-48 justify-start rounded-none border-b-0 border-s-0 px-2.5 py-1.5 font-normal",title:n3(),"aria-haspopup":"dialog",onClick:()=>n("hosts"),children:[f.jsx(Eb,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:r3()})]})}):f.jsx("div",{className:"relative shrink-0 border-t border-border",children:f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Rt,{size:"small","aria-label":n3(),"aria-haspopup":"dialog",onClick:()=>n("hosts"),children:f.jsx(Eb,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"truncate text-sm leading-tight",children:r3()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ee(e.version)]})]})]})}),t==="hosts"&&f.jsx(bNn,{onClose:()=>n(null),onConfigureSsh:()=>n("config")}),t==="config"&&f.jsx(qP,{onClose:()=>n("hosts")})]})}function t6(e=!0){var n;const r=wb(),t=dt({...r,enabled:e});return{status:t.data??null,error:((n=t.error)==null?void 0:n.message)??null,apply:s=>ts(r.queryKey,s)}}const fAn=36e4,dAn=500,GP=e=>`https://github.com/alphaXiv/OpenResearch/releases/tag/${e.split("/").map(encodeURIComponent).join("/")}`;function WP(e){const[r,t]=T.useState(!1),[n,s]=T.useState(null),o=T.useRef(!1);T.useEffect(()=>(o.current=!1,()=>{o.current=!0}),[]);const a=e!=null&&e.restartRequired?e.instance:null;return{restarting:r,error:n,restart:()=>{if(!a||r)return;const c=wb(),u=()=>o.current||!Wr(c.queryKey);t(!0),s(null),(async()=>{try{if(await qSn(),u())return;const d=Date.now()+fAn;for(;Date.now()setTimeout(p,dAn)),u())return;const _=await Je.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(_&&_.instance!==a){window.location.reload();return}}throw new Error(Pwn())}catch(d){if(u())return;s(d instanceof Error?d.message:String(d)),t(!1)}})()}}}function KP({status:e}){const[r,t]=T.useState(null),n=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:o,restart:a}=WP(e);return!n||r===n?null:f.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-blue-subtle border-b border-b-accent-blue-border",role:"status",children:[f.jsx(Ei,{size:13,className:`shrink-0 text-accent-blue-strong${s?" animate-spin":""}`}),f.jsx("span",{className:"min-w-0",children:o?$L({error:o}):twn({version:Ee(n)})}),(e==null?void 0:e.installedTag)&&f.jsx("a",{href:GP(e.installedTag),target:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:kL()}),(e==null?void 0:e.canRestart)&&f.jsx(Oe,{type:"button",size:"small",disabled:s,onClick:a,children:s?DL():OL()}),f.jsx(Rt,{type:"button",size:"small",className:"ms-auto","aria-label":_wn(),disabled:s,onClick:()=>t(n),children:f.jsx(pn,{size:13})})]})}const VP="desktop-app-banner-dismissed-on",zA="https://github.com/alphaXiv/OpenResearch/releases/latest";function hAn(){const e=navigator.platform;return/Mac/.test(e)?"OpenResearch.dmg":/Win/.test(e)?"OpenResearch-Setup.exe":/Linux x86_64/.test(e)?"OpenResearch-x86_64.AppImage":/Linux aarch64/.test(e)?"OpenResearch-aarch64.AppImage":null}function QP(){return new Date().toDateString()}function EA(){try{return localStorage.getItem(VP)===QP()}catch{return!1}}function XP(){const[e,r]=T.useState(EA);if(T.useEffect(()=>{const s=()=>r(EA());return window.addEventListener("focus",s),()=>window.removeEventListener("focus",s)},[]),"__ORX_DESKTOP__"in window||e)return null;const t=()=>{try{localStorage.setItem(VP,QP())}catch{}r(!0)},n=hAn();return f.jsxs("div",{className:"desktop-app-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-blue-subtle border-b border-b-accent-blue-border",children:[f.jsx(GI,{size:13,className:"shrink-0 text-accent-blue-strong"}),f.jsx("span",{className:"min-w-0",children:frt()}),f.jsx(Xf,{size:"small",href:n?`${zA}/download/${n}`:zA,target:n?void 0:"_blank",rel:"noreferrer",children:rrt()}),f.jsx(Rt,{type:"button",size:"small",className:"ms-auto","aria-label":Wtt(),onClick:t,children:f.jsx(pn,{size:13})})]})}function r6(){return f.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:f.jsx(Nt,{})})}function pAn(){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{children:wi()}),f.jsx(gy,{to:"/projects",children:Gm()})]})}function n6({error:e,reset:r}){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{role:"alert",children:e.message}),f.jsx(Oe,{onClick:r,children:Ks()}),f.jsx(gy,{to:"/projects",children:Gm()})]})}function YP({projectId:e}){const{queryClient:r}=Rj({from:"__root__"}),t=a0(),[n,s]=T.useState(null),[o,a]=T.useState(0);return T.useEffect(()=>{let i=!0;return s(null),(e?fP(e,r):rNn(r)).then(c=>{i&&t({href:c,replace:!0})}).catch(c=>{i&&(WK(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{i=!1}},[e,o,t,r]),n?f.jsx(n6,{error:n,reset:()=>a(i=>i+1)}):f.jsx(r6,{})}function ZP(){return f.jsx(YP,{})}function mAn({projectId:e}){return f.jsx(YP,{projectId:e})}function gAn(){const e=lP(),r=a0(),t=Vf(),n=dt(t),s=dt(f0()),o=n.data,a=s.data,i=(o==null?void 0:o.length)===0,c=n.error??s.error,u=()=>{n.refetch(),s.refetch()},{status:d}=t6(e.kind==="local");T.useEffect(()=>{document.title="OpenResearch"},[]);const _=p=>void r({to:"/projects/$projectId",params:{projectId:p}});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsxs(f.Fragment,{children:[f.jsx(mP,{}),f.jsx(KP,{status:d})]}),f.jsx(XP,{}),c&&(!o||!a)?f.jsx(n6,{error:c,reset:u}):!o||!a?f.jsx(r6,{}):i?f.jsx(dNn,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{tNn(),_(p.id)}}):f.jsx(ZP,{}),(e.kind==="ssh"||o&&a&&!i)&&f.jsx(UP,{runtime:e,corner:!0})]})}const vAn=Xc()({component:ZP}),bAn=Xc()({component:lg}),yAn=Xc()({}),xAn=Xc()({component:gAn}),wAn=e=>({queryKey:Mt("getRunDiff",e),queryFn:({signal:r})=>hSn(e,r),staleTime:3e4}),JP=e=>({queryKey:Mt("getExperimentDiff",e),queryFn:({signal:r})=>pSn(e,r),staleTime:3e4}),Ab=(e,r,t={})=>({queryKey:Mt("getProjectFile",e,r,{...t}),queryFn:({signal:n})=>mSn(e,r,t,n),staleTime:t.ref?np(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),eB=e=>({queryKey:Mt("getAbsoluteFile",e),queryFn:({signal:r})=>gSn(e,r),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),s6=(e,r={})=>({queryKey:Mt("getCodeTree",e,{...r}),queryFn:({signal:t})=>$Sn(e,r,t),staleTime:r.ref&&np(r.ref)?1/0:3e4}),Tb=e=>({queryKey:Mt("getSessionWorktree",e),queryFn:({signal:r})=>DSn(e,r),staleTime:3e4}),kAn=e=>({queryKey:Mt("getArtifacts",e),queryFn:({signal:r})=>k6n(e,r),staleTime:3e4}),o6=(e,r)=>({queryKey:Mt("getArtifactFileText",e,r),queryFn:({signal:t})=>z6n(e,r,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),tB=(e,r)=>({queryKey:Mt("getArtifactFileMetadata",e,r),queryFn:({signal:t})=>N6n(e,r,t),staleTime:2e3}),jAn=()=>({queryKey:Mt("getLatexEngine"),queryFn:({signal:e})=>xSn(e),staleTime:3e5}),SAn=()=>({queryKey:Mt("getOverleafSettings"),queryFn:({signal:e})=>kSn(e),staleTime:3e5}),CAn=(e,r,t={})=>({queryKey:Mt("getOverleafState",e,r,{...t}),queryFn:({signal:n})=>NSn(e,r,t,n),staleTime:3e5}),zAn=(e,r,t={})=>({queryKey:Mt("getOverleafStatus",e,r,{...t}),queryFn:({signal:n})=>MSn(e,r,t,n),staleTime:3e4}),rB=(e,r,t,n,s)=>({queryKey:Mt("resolvedFile",e,r,t,n??null,s??null),staleTime:s&&!np(s)?3e4:1/0,refetchOnMount:s?!0:"always",refetchOnWindowFocus:s?!0:"always",queryFn:async({signal:o,client:a})=>{const i=async m=>{o.throwIfAborted();const k=await a.fetchQuery({...m,staleTime:s?m.staleTime:0});return o.throwIfAborted(),k},c=t==="abs",u=t==="artifacts",d=async()=>{const m=await i(tB(e,r)),k=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",w=m&&k?await i(o6(e,r)):null,v=m===null||k&&w===null;return{path:r,content:(w==null?void 0:w.content)??"",truncated:(w==null?void 0:w.truncated)??!1,binary:(w==null?void 0:w.binary)??(m==null?void 0:m.presentation)==="download",notFound:v,presentation:w?w.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},_=async()=>{for(const m of[`artifacts/${r}`,r]){const k=await i(Ab(e,m,{sessionId:n})).catch(()=>(o.throwIfAborted(),null));if(k&&!k.notFound)return k}return null},p=await(c?i(eB(r)).then(m=>({source:"absolute",file:m})):u?d().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const k=await _();return k?{source:"checkout",file:k}:{source:"artifact",file:m}}):i(Ab(e,r,{sessionId:n,ref:s})).then(m=>m.notFound&&!s?d().then(k=>k.notFound?{source:"checkout",file:m}:{source:"artifact",file:k,checkoutRoot:m.root}):{source:"checkout",file:m}));return o.throwIfAborted(),p}});async function EAn(e,r,t,n,s){if(np(s))return;const o=rB(e,r,t,n,s),a=[o.queryKey,...t==="abs"?[eB(r).queryKey]:[Ab(e,r,{sessionId:n,ref:s}).queryKey,Ab(e,`artifacts/${r}`,{sessionId:n}).queryKey,o6(e,r).queryKey,tB(e,r).queryKey]];await Promise.all(a.map(i=>Je.cancelQueries({queryKey:i,exact:!0}))),await Promise.all(a.map(i=>Je.invalidateQueries({queryKey:i,exact:!0,refetchType:"none"}))),await Je.invalidateQueries({queryKey:o.queryKey,exact:!0})}const Rb=360,NAn=272,AAn=380,TAn=NAn+56;function vh(){return Math.max(Rb,window.innerWidth-TAn-AAn)}const RAn=500,MAn=.33;function NA(){return Math.min(vh(),Math.max(RAn,Math.round(window.innerWidth*MAn)))}function OAn(){const e=vh();return Math.max(Rb,Math.min(480,e,Math.round(window.innerWidth*.25)))}function $An(e,r,t){return t?r.flatMap(n=>{if(n.status!=="starting"&&n.status!=="running")return[];const s=e.find(o=>o.id===n.experimentId&&o.chatSessionId===t);return s?[{experiment:s,run:n}]:[]}):[]}const AA={done:{tone:"success",live:!1},failed:{tone:"danger",live:!1},running:{tone:"info",live:!0},starting:{tone:"warning",live:!0},cancelling:{tone:"caution",live:!0},cancelled:{tone:"caution",live:!1},editing:{tone:"accent",live:!0},idle:{tone:"neutral",live:!1}};function DAn(e){return AA[e]??AA.idle}const LAn={done:NL,failed:rdn,running:wdn,starting:Rdn,cancelling:zfn,cancelled:gfn,editing:Wfn,idle:fdn};function a6(e){const r=LAn[e];return r?r():e.charAt(0).toUpperCase()+e.slice(1)}function tu({status:e,label:r,className:t}){const n=DAn(e);return f.jsx(Eh,{tone:n.tone,live:n.live,className:t,children:r??a6(e)})}const Jf={local:ND,tinker:ZJe,hf:zZe,modal:rJe,k8s:LZe,ssh:HJe,slurm:RJe,ray:wJe,openresearch:fJe};function TA(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,n)}return t}function Vr(e){for(var r=1;r=0||(d[c]=a[c]);return d})(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function Pr(e,r){return sB(e)||(function(t,n){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var o,a,i,c,u=[],d=!0,_=!1;try{if(i=(s=s.call(t)).next,n===0){if(Object(s)!==s)return;d=!1}else for(;!(d=(o=i.call(s)).done)&&(u.push(o.value),u.length!==n);d=!0);}catch(p){_=!0,a=p}finally{try{if(!d&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(_)throw a}}return u}})(e,r)||Py(e,r)||aB()}function nB(e){return sB(e)||oB(e)||Py(e)||aB()}function Fa(e){return(function(r){if(Array.isArray(r))return U3(r)})(e)||oB(e)||Py(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +`).forEach((p,m)=>{m>0&&(s.push(o),o=[]),p&&c(p)});return}d.type==="element"&&(a.push((((_=d.properties)==null?void 0:_.className)??[]).join(" ")),(d.children??[]).forEach(u),a.pop())};return n.forEach(u),s.push(o),s}function FP(e){return Array.isArray(e)?e.length===0:e===""}function HP({value:e,onChange:r,onSave:t,onBlur:n,readOnly:s=!1,path:o,highlightLine:a,scrollRequest:i,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:d}){const _=T.useMemo(()=>BP(e,jS(o)),[e,o]),{ruleCh:p,codeCh:m}=wP(_.length),k=T.useRef(null),x=T.useRef(null),v=()=>{const S=k.current;S&&x.current&&(x.current.scrollTop=S.scrollTop)},b=T.useRef(u);T.useLayoutEffect(()=>{const S=k.current;!S||!b.current||(S.scrollTop=b.current.top,S.scrollLeft=b.current.left,v())},[o]),T.useLayoutEffect(v,[e]),T.useLayoutEffect(()=>{var M;const S=k.current;if(!S||!a||i===void 0)return;const z=e.split(` +`),N=Math.min(Math.max(Math.trunc(a),1),z.length);let A=0;for(let $=0;${if(!s){if((S.metaKey||S.ctrlKey)&&S.key.toLowerCase()==="s"){S.preventDefault(),t();return}if(S.key==="Tab"){S.preventDefault();const z=S.currentTarget,{selectionStart:N,selectionEnd:A}=z,E=e.slice(0,N)+" "+e.slice(A);r(E),requestAnimationFrame(()=>{z.selectionStart=z.selectionEnd=N+1})}}},y=`absolute inset-0 m-0 py-3.5 pe-4 ${Nb} ${yP} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Nb}`,children:[f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${p}ch`},"aria-hidden":"true"}),f.jsx("div",{ref:x,className:`file-view-code ${y} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:_.map((S,z)=>f.jsxs("div",{"data-line":z+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[f.jsx("span",{className:`${xP} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:z+1}),FP(S)?f.jsx("br",{}):S]},z))}),f.jsx("textarea",{ref:k,className:`file-view-editarea ${y} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${m}ch`},value:e,onChange:S=>{s||r(S.target.value)},onScroll:S=>{v(),d==null||d({top:Math.max(0,S.currentTarget.scrollTop),left:Math.max(0,S.currentTarget.scrollLeft)})},onKeyDown:w,onBlur:s?void 0:n,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function qP({onClose:e,onSaved:r}){const t=MCn(),n=dt(t),[s,o]=T.useState(()=>n.data??null),[a,i]=T.useState(()=>{var y;return((y=n.data)==null?void 0:y.content)??""}),c=!s&&n.error?n.error.message:null,u=mr({mutationFn:({content:y,previous:S})=>a6n(y,S)}),[d,_]=T.useState(!1),p=T.useRef(null),m=T.useRef(e),k=s!==null&&a!==s.content,x=T.useRef(k),v=T.useRef(d);x.current=k,v.current=d,m.current=e,T.useEffect(()=>{!n.data||x.current||v.current||(o(n.data),i(n.data.content))},[n.data]);const b=()=>{v.current||x.current&&!window.confirm(Cun())||m.current()};xp(p,b,"textarea");async function w(){if(!(!s||!k||d)){_(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!Wr(t.queryKey))return;ts(t.queryKey,{...s,content:a}),o({...s,content:a}),r==null||r(),tr(Wun(),"success")}catch(y){tr(y instanceof Error?y.message:String(y),"error")}finally{_(!1)}}}return Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&b()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(48rem,calc(100vh-2.5rem))] w-200 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"ssh-config-dialog-title",tabIndex:-1,children:[f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:r_n()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":mun(),onClick:b,disabled:d,children:f.jsx(pn,{size:16})}),f.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:c?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:c}):s===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(Nt,{})," ",Dun()]}):f.jsx(HP,{value:a,onChange:i,onSave:()=>void w(),path:s.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx(Oe,{onClick:b,disabled:d,children:Gf()}),f.jsx(Oe,{variant:"primary",onClick:()=>void w(),disabled:!k||d,children:d?Qa():nc()})]})]})}),document.body)}function UP({runtime:e,corner:r=!1}){const[t,n]=T.useState(null);return e.kind==="ssh"?f.jsx(L3,{runtime:e,corner:r}):f.jsxs(f.Fragment,{children:[r?f.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:f.jsxs(Oe,{className:"h-auto max-w-48 justify-start rounded-none border-b-0 border-s-0 px-2.5 py-1.5 font-normal",title:n3(),"aria-haspopup":"dialog",onClick:()=>n("hosts"),children:[f.jsx(Eb,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:r3()})]})}):f.jsx("div",{className:"relative shrink-0 border-t border-border",children:f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Rt,{size:"small","aria-label":n3(),"aria-haspopup":"dialog",onClick:()=>n("hosts"),children:f.jsx(Eb,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"truncate text-sm leading-tight",children:r3()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ee(e.version)]})]})]})}),t==="hosts"&&f.jsx(bNn,{onClose:()=>n(null),onConfigureSsh:()=>n("config")}),t==="config"&&f.jsx(qP,{onClose:()=>n("hosts")})]})}function t6(e=!0){var n;const r=wb(),t=dt({...r,enabled:e});return{status:t.data??null,error:((n=t.error)==null?void 0:n.message)??null,apply:s=>ts(r.queryKey,s)}}const fAn=36e4,dAn=500,GP=e=>`https://github.com/alphaXiv/OpenResearch/releases/tag/${e.split("/").map(encodeURIComponent).join("/")}`;function WP(e){const[r,t]=T.useState(!1),[n,s]=T.useState(null),o=T.useRef(!1);T.useEffect(()=>(o.current=!1,()=>{o.current=!0}),[]);const a=e!=null&&e.restartRequired?e.instance:null;return{restarting:r,error:n,restart:()=>{if(!a||r)return;const c=wb(),u=()=>o.current||!Wr(c.queryKey);t(!0),s(null),(async()=>{try{if(await qSn(),u())return;const d=Date.now()+fAn;for(;Date.now()setTimeout(p,dAn)),u())return;const _=await Je.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(_&&_.instance!==a){window.location.reload();return}}throw new Error(Pwn())}catch(d){if(u())return;s(d instanceof Error?d.message:String(d)),t(!1)}})()}}}function KP({status:e}){const[r,t]=T.useState(null),n=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:o,restart:a}=WP(e);return!n||r===n?null:f.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-blue-subtle border-b border-b-accent-blue-border",role:"status",children:[f.jsx(Ei,{size:13,className:`shrink-0 text-accent-blue-strong${s?" animate-spin":""}`}),f.jsx("span",{className:"min-w-0",children:o?$L({error:o}):twn({version:Ee(n)})}),(e==null?void 0:e.installedTag)&&f.jsx("a",{href:GP(e.installedTag),target:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:kL()}),(e==null?void 0:e.canRestart)&&f.jsx(Oe,{type:"button",size:"small",disabled:s,onClick:a,children:s?DL():OL()}),f.jsx(Rt,{type:"button",size:"small",className:"ms-auto","aria-label":_wn(),disabled:s,onClick:()=>t(n),children:f.jsx(pn,{size:13})})]})}const VP="desktop-app-banner-dismissed-on",zA="https://github.com/alphaXiv/OpenResearch/releases/latest";function hAn(){const e=navigator.platform;return/Mac/.test(e)?"OpenResearch.dmg":/Win/.test(e)?"OpenResearch-Setup.exe":/Linux x86_64/.test(e)?"OpenResearch-x86_64.AppImage":/Linux aarch64/.test(e)?"OpenResearch-aarch64.AppImage":null}function QP(){return new Date().toDateString()}function EA(){try{return localStorage.getItem(VP)===QP()}catch{return!1}}function XP(){const[e,r]=T.useState(EA);if(T.useEffect(()=>{const s=()=>r(EA());return window.addEventListener("focus",s),()=>window.removeEventListener("focus",s)},[]),"__ORX_DESKTOP__"in window||e)return null;const t=()=>{try{localStorage.setItem(VP,QP())}catch{}r(!0)},n=hAn();return f.jsxs("div",{className:"desktop-app-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-blue-subtle border-b border-b-accent-blue-border",children:[f.jsx(GI,{size:13,className:"shrink-0 text-accent-blue-strong"}),f.jsx("span",{className:"min-w-0",children:frt()}),f.jsx(Xf,{size:"small",href:n?`${zA}/download/${n}`:zA,target:n?void 0:"_blank",rel:"noreferrer",children:rrt()}),f.jsx(Rt,{type:"button",size:"small",className:"ms-auto","aria-label":Wtt(),onClick:t,children:f.jsx(pn,{size:13})})]})}function r6(){return f.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:f.jsx(Nt,{})})}function pAn(){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{children:wi()}),f.jsx(gy,{to:"/projects",children:Gm()})]})}function n6({error:e,reset:r}){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{role:"alert",children:e.message}),f.jsx(Oe,{onClick:r,children:Ks()}),f.jsx(gy,{to:"/projects",children:Gm()})]})}function YP({projectId:e}){const{queryClient:r}=Rj({from:"__root__"}),t=a0(),[n,s]=T.useState(null),[o,a]=T.useState(0);return T.useEffect(()=>{let i=!0;return s(null),(e?fP(e,r):rNn(r)).then(c=>{i&&t({href:c,replace:!0})}).catch(c=>{i&&(WK(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{i=!1}},[e,o,t,r]),n?f.jsx(n6,{error:n,reset:()=>a(i=>i+1)}):f.jsx(r6,{})}function ZP(){return f.jsx(YP,{})}function mAn({projectId:e}){return f.jsx(YP,{projectId:e})}function gAn(){const e=lP(),r=a0(),t=Vf(),n=dt(t),s=dt(f0()),o=n.data,a=s.data,i=(o==null?void 0:o.length)===0,c=n.error??s.error,u=()=>{n.refetch(),s.refetch()},{status:d}=t6(e.kind==="local");T.useEffect(()=>{document.title="OpenResearch"},[]);const _=p=>void r({to:"/projects/$projectId",params:{projectId:p}});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsxs(f.Fragment,{children:[f.jsx(mP,{}),f.jsx(KP,{status:d})]}),f.jsx(XP,{}),c&&(!o||!a)?f.jsx(n6,{error:c,reset:u}):!o||!a?f.jsx(r6,{}):i?f.jsx(dNn,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{tNn(),_(p.id)}}):f.jsx(ZP,{}),(e.kind==="ssh"||o&&a&&!i)&&f.jsx(UP,{runtime:e,corner:!0})]})}const vAn=Xc()({component:ZP}),bAn=Xc()({component:lg}),yAn=Xc()({}),xAn=Xc()({component:gAn}),wAn=e=>({queryKey:Mt("getRunDiff",e),queryFn:({signal:r})=>hSn(e,r),staleTime:3e4}),JP=e=>({queryKey:Mt("getExperimentDiff",e),queryFn:({signal:r})=>pSn(e,r),staleTime:3e4}),Ab=(e,r,t={})=>({queryKey:Mt("getProjectFile",e,r,{...t}),queryFn:({signal:n})=>mSn(e,r,t,n),staleTime:t.ref?np(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),eB=e=>({queryKey:Mt("getAbsoluteFile",e),queryFn:({signal:r})=>gSn(e,r),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),s6=(e,r={})=>({queryKey:Mt("getCodeTree",e,{...r}),queryFn:({signal:t})=>$Sn(e,r,t),staleTime:r.ref&&np(r.ref)?1/0:3e4}),Tb=e=>({queryKey:Mt("getSessionWorktree",e),queryFn:({signal:r})=>DSn(e,r),staleTime:3e4}),kAn=e=>({queryKey:Mt("getArtifacts",e),queryFn:({signal:r})=>k6n(e,r),staleTime:3e4}),o6=(e,r)=>({queryKey:Mt("getArtifactFileText",e,r),queryFn:({signal:t})=>z6n(e,r,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),tB=(e,r)=>({queryKey:Mt("getArtifactFileMetadata",e,r),queryFn:({signal:t})=>N6n(e,r,t),staleTime:2e3}),jAn=()=>({queryKey:Mt("getLatexEngine"),queryFn:({signal:e})=>xSn(e),staleTime:3e5}),SAn=()=>({queryKey:Mt("getOverleafSettings"),queryFn:({signal:e})=>kSn(e),staleTime:3e5}),CAn=(e,r,t={})=>({queryKey:Mt("getOverleafState",e,r,{...t}),queryFn:({signal:n})=>NSn(e,r,t,n),staleTime:3e5}),zAn=(e,r,t={})=>({queryKey:Mt("getOverleafStatus",e,r,{...t}),queryFn:({signal:n})=>MSn(e,r,t,n),staleTime:3e4}),rB=(e,r,t,n,s)=>({queryKey:Mt("resolvedFile",e,r,t,n??null,s??null),staleTime:s&&!np(s)?3e4:1/0,refetchOnMount:s?!0:"always",refetchOnWindowFocus:s?!0:"always",queryFn:async({signal:o,client:a})=>{const i=async m=>{o.throwIfAborted();const k=await a.fetchQuery({...m,staleTime:s?m.staleTime:0});return o.throwIfAborted(),k},c=t==="abs",u=t==="artifacts",d=async()=>{const m=await i(tB(e,r)),k=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",x=m&&k?await i(o6(e,r)):null,v=m===null||k&&x===null;return{path:r,content:(x==null?void 0:x.content)??"",truncated:(x==null?void 0:x.truncated)??!1,binary:(x==null?void 0:x.binary)??(m==null?void 0:m.presentation)==="download",notFound:v,presentation:x?x.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},_=async()=>{for(const m of[`artifacts/${r}`,r]){const k=await i(Ab(e,m,{sessionId:n})).catch(()=>(o.throwIfAborted(),null));if(k&&!k.notFound)return k}return null},p=await(c?i(eB(r)).then(m=>({source:"absolute",file:m})):u?d().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const k=await _();return k?{source:"checkout",file:k}:{source:"artifact",file:m}}):i(Ab(e,r,{sessionId:n,ref:s})).then(m=>m.notFound&&!s?d().then(k=>k.notFound?{source:"checkout",file:m}:{source:"artifact",file:k,checkoutRoot:m.root}):{source:"checkout",file:m}));return o.throwIfAborted(),p}});async function EAn(e,r,t,n,s){if(np(s))return;const o=rB(e,r,t,n,s),a=[o.queryKey,...t==="abs"?[eB(r).queryKey]:[Ab(e,r,{sessionId:n,ref:s}).queryKey,Ab(e,`artifacts/${r}`,{sessionId:n}).queryKey,o6(e,r).queryKey,tB(e,r).queryKey]];await Promise.all(a.map(i=>Je.cancelQueries({queryKey:i,exact:!0}))),await Promise.all(a.map(i=>Je.invalidateQueries({queryKey:i,exact:!0,refetchType:"none"}))),await Je.invalidateQueries({queryKey:o.queryKey,exact:!0})}const Rb=360,NAn=272,AAn=380,TAn=NAn+56;function vh(){return Math.max(Rb,window.innerWidth-TAn-AAn)}const RAn=500,MAn=.33;function NA(){return Math.min(vh(),Math.max(RAn,Math.round(window.innerWidth*MAn)))}function OAn(){const e=vh();return Math.max(Rb,Math.min(480,e,Math.round(window.innerWidth*.25)))}function $An(e,r,t){return t?r.flatMap(n=>{if(n.status!=="starting"&&n.status!=="running")return[];const s=e.find(o=>o.id===n.experimentId&&o.chatSessionId===t);return s?[{experiment:s,run:n}]:[]}):[]}const AA={done:{tone:"success",live:!1},failed:{tone:"danger",live:!1},running:{tone:"info",live:!0},starting:{tone:"warning",live:!0},cancelling:{tone:"caution",live:!0},cancelled:{tone:"caution",live:!1},editing:{tone:"accent",live:!0},idle:{tone:"neutral",live:!1}};function DAn(e){return AA[e]??AA.idle}const LAn={done:NL,failed:rdn,running:wdn,starting:Rdn,cancelling:zfn,cancelled:gfn,editing:Wfn,idle:fdn};function a6(e){const r=LAn[e];return r?r():e.charAt(0).toUpperCase()+e.slice(1)}function tu({status:e,label:r,className:t}){const n=DAn(e);return f.jsx(Eh,{tone:n.tone,live:n.live,className:t,children:r??a6(e)})}const Jf={local:ND,tinker:ZJe,hf:zZe,modal:rJe,k8s:LZe,ssh:HJe,slurm:RJe,ray:wJe,openresearch:fJe};function TA(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,n)}return t}function Vr(e){for(var r=1;r=0||(d[c]=a[c]);return d})(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function Pr(e,r){return sB(e)||(function(t,n){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var o,a,i,c,u=[],d=!0,_=!1;try{if(i=(s=s.call(t)).next,n===0){if(Object(s)!==s)return;d=!1}else for(;!(d=(o=i.call(s)).done)&&(u.push(o.value),u.length!==n);d=!0);}catch(p){_=!0,a=p}finally{try{if(!d&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(_)throw a}}return u}})(e,r)||Py(e,r)||aB()}function nB(e){return sB(e)||oB(e)||Py(e)||aB()}function Fa(e){return(function(r){if(Array.isArray(r))return U3(r)})(e)||oB(e)||Py(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function sB(e){if(Array.isArray(e))return e}function oB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Py(e,r){if(e){if(typeof e=="string")return U3(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?U3(e,r):void 0}}function U3(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,i=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return a=c.done,c},e:function(c){i=!0,o=c},f:function(){try{a||t.return==null||t.return()}finally{if(i)throw o}}}}var Xv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function y0(e,r){return e(r={exports:{}},r.exports),r.exports}var Pa=y0((function(e){/*! @@ -592,39 +592,39 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(){var r={}.hasOwnProperty;function t(){for(var n=[],s=0;s-1?b.slice(0,y):S;switch(S){case"diff":w--;break e;case"deleted":case"new":var z=b.slice(y+1);z.indexOf("file mode")===0&&(a[S==="new"?"newMode":"oldMode"]=z.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var E=b.slice(y+1).split(" "),A=E[0].split("..");a.oldRevision=A[0],a.newRevision=A[1],E[1]&&(a.oldMode=a.newMode=E[1]);break;case"copy":case"rename":var N=b.slice(y+1);N.indexOf("from")===0?a.oldPath=N.slice(5):a.newPath=N.slice(3),x=S;break;case"---":var M=b.slice(y+1),$=m[++w].slice(4);M==="/dev/null"?($=$.slice(2),x="add"):$==="/dev/null"?(M=M.slice(2),x="delete"):(x="modify",M=M.slice(2),$=$.slice(2)),M&&(a.oldPath=M),$&&(a.newPath=$),p=5;break e}}a.type=x||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(v.indexOf("@@")===0){var D=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);i={content:v,oldStart:D[1]-0,newStart:D[4]-0,oldLines:D[3]-0||1,newLines:D[6]-0||1,changes:[]},a.hunks.push(i),c=i.oldStart,u=i.newStart}else{var I=v.slice(0,1),G={content:v.slice(1)};switch(I){case"+":G.type="insert",G.isInsert=!0,G.lineNumber=u,u++;break;case"-":G.type="delete",G.isDelete=!0,G.lineNumber=c,c++;break;case" ":G.type="normal",G.isNormal=!0,G.oldLineNumber=c,G.newLineNumber=u,c++,u++;break;case"\\":var H=i.changes[i.changes.length-1];H.isDelete||(a.newEndingNewLine=!1),H.isInsert||(a.oldEndingNewLine=!1)}G.type&&i.changes.push(G)}w++}return _}};e.exports=s})()}));function T_(e){return e.type==="insert"}function Ha(e){return e.type==="delete"}function ou(e){return e.type==="normal"}function FAn(e,r){var t=r.nearbySequences==="zip"?(function(n){var s=n.reduce((function(o,a,i){var c=Pr(o,3),u=c[0],d=c[1],_=c[2];return d?T_(a)&&_>=0?(u.splice(_+1,0,a),[u,a,_+2]):(u.push(a),[u,a,Ha(a)&&Ha(d)?_:i]):(u.push(a),[u,a,Ha(a)?i:-1])}),[[],null,-1]);return Pr(s,1)[0]})(e.changes):e.changes;return Vr(Vr({},e),{},{isPlain:!1,changes:t})}function G3(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=(function(n){if(n.startsWith("diff --git"))return n;var s=n.indexOf(` +`),k=m.length,x=0;x-1?b.slice(0,y):S;switch(S){case"diff":x--;break e;case"deleted":case"new":var z=b.slice(y+1);z.indexOf("file mode")===0&&(a[S==="new"?"newMode":"oldMode"]=z.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var N=b.slice(y+1).split(" "),A=N[0].split("..");a.oldRevision=A[0],a.newRevision=A[1],N[1]&&(a.oldMode=a.newMode=N[1]);break;case"copy":case"rename":var E=b.slice(y+1);E.indexOf("from")===0?a.oldPath=E.slice(5):a.newPath=E.slice(3),w=S;break;case"---":var M=b.slice(y+1),$=m[++x].slice(4);M==="/dev/null"?($=$.slice(2),w="add"):$==="/dev/null"?(M=M.slice(2),w="delete"):(w="modify",M=M.slice(2),$=$.slice(2)),M&&(a.oldPath=M),$&&(a.newPath=$),p=5;break e}}a.type=w||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(v.indexOf("@@")===0){var D=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);i={content:v,oldStart:D[1]-0,newStart:D[4]-0,oldLines:D[3]-0||1,newLines:D[6]-0||1,changes:[]},a.hunks.push(i),c=i.oldStart,u=i.newStart}else{var I=v.slice(0,1),G={content:v.slice(1)};switch(I){case"+":G.type="insert",G.isInsert=!0,G.lineNumber=u,u++;break;case"-":G.type="delete",G.isDelete=!0,G.lineNumber=c,c++;break;case" ":G.type="normal",G.isNormal=!0,G.oldLineNumber=c,G.newLineNumber=u,c++,u++;break;case"\\":var H=i.changes[i.changes.length-1];H.isDelete||(a.newEndingNewLine=!1),H.isInsert||(a.oldEndingNewLine=!1)}G.type&&i.changes.push(G)}x++}return _}};e.exports=s})()}));function T_(e){return e.type==="insert"}function Ha(e){return e.type==="delete"}function ou(e){return e.type==="normal"}function FAn(e,r){var t=r.nearbySequences==="zip"?(function(n){var s=n.reduce((function(o,a,i){var c=Pr(o,3),u=c[0],d=c[1],_=c[2];return d?T_(a)&&_>=0?(u.splice(_+1,0,a),[u,a,_+2]):(u.push(a),[u,a,Ha(a)&&Ha(d)?_:i]):(u.push(a),[u,a,Ha(a)?i:-1])}),[[],null,-1]);return Pr(s,1)[0]})(e.changes):e.changes;return Vr(Vr({},e),{},{isPlain:!1,changes:t})}function G3(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=(function(n){if(n.startsWith("diff --git"))return n;var s=n.indexOf(` `),o=n.indexOf(` `,s+1),a=n.slice(0,s),i=n.slice(s+1,o),c=a.split(" ").slice(1,-3).join(" "),u=i.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(c," b/").concat(u),"index 1111111..2222222 100644","--- a/".concat(c),"+++ b/".concat(u),n.slice(o+1)].join(` -`)})(e.trimStart());return BAn.parse(t).map((function(n){return(function(s,o){var a=s.hunks.map((function(i){return FAn(i,o)}));return Vr(Vr({},s),{},{hunks:a})})(n,r)}))}function HAn(e){return e[0]}function qAn(e){return e[e.length-1]}function W3(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function xg(e){return e==="old"?function(r){return T_(r)?-1:ou(r)?r.oldLineNumber:r.lineNumber}:function(r){return Ha(r)?-1:ou(r)?r.newLineNumber:r.lineNumber}}function cB(e,r){return function(t,n){var s=t[e],o=s+t[r];return n>=s&&n=o&&s-1},YAn=function(e,r){var t=this.__data__,n=By(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this};function fh(e){var r=-1,t=e==null?0:e.length;for(this.clear();++ri))return!1;var u=o.get(e),d=o.get(r);if(u&&d)return u==r&&d==e;var _=-1,p=!0,m=2&t?new OTn:void 0;for(o.set(e,r),o.set(r,e);++_-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},En={};En["[object Float32Array]"]=En["[object Float64Array]"]=En["[object Int8Array]"]=En["[object Int16Array]"]=En["[object Int32Array]"]=En["[object Uint8Array]"]=En["[object Uint8ClampedArray]"]=En["[object Uint16Array]"]=En["[object Uint32Array]"]=!0,En["[object Arguments]"]=En["[object Array]"]=En["[object ArrayBuffer]"]=En["[object Boolean]"]=En["[object DataView]"]=En["[object Date]"]=En["[object Error]"]=En["[object Function]"]=En["[object Map]"]=En["[object Number]"]=En["[object Object]"]=En["[object RegExp]"]=En["[object Set]"]=En["[object String]"]=En["[object WeakMap]"]=!1;var XTn=function(e){return op(e)&&l6(e.length)&&!!En[Sp(e)]},YTn=function(e){return function(r){return e(r)}},PA=y0((function(e,r){var t=r&&!r.nodeType&&r,n=t&&e&&!e.nodeType&&e,s=n&&n.exports===t&&_B.process,o=(function(){try{var a=n&&n.require&&n.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}})();e.exports=o})),BA=PA&&PA.isTypedArray,u6=BA?YTn(BA):XTn,ZTn=Object.prototype.hasOwnProperty,JTn=function(e,r){var t=Wa(e),n=!t&&Uy(e),s=!t&&!n&&Mb(e),o=!t&&!n&&!s&&u6(e),a=t||n||s||o,i=a?GTn(e.length,String):[],c=i.length;for(var u in e)!ZTn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||gB(u,c))||i.push(u);return i},eRn=Object.prototype,vB=function(e){var r=e&&e.constructor;return e===(typeof r=="function"&&r.prototype||eRn)},tRn=(function(e,r){return function(t){return e(r(t))}})(Object.keys,Object),rRn=Object.prototype.hasOwnProperty,bB=function(e){if(!vB(e))return tRn(e);var r=[];for(var t in Object(e))rRn.call(e,t)&&t!="constructor"&&r.push(t);return r},Gy=function(e){return e!=null&&l6(e.length)&&!dB(e)},_6=function(e){return Gy(e)?JTn(e):bB(e)},FA=function(e){return BTn(e,_6,UTn)},nRn=Object.prototype.hasOwnProperty,sRn=function(e,r,t,n,s,o){var a=1&t,i=FA(e),c=i.length;if(c!=FA(r).length&&!a)return!1;for(var u=c;u--;){var d=i[u];if(!(a?d in r:nRn.call(r,d)))return!1}var _=o.get(e),p=o.get(r);if(_&&p)return _==r&&p==e;var m=!0;o.set(e,r),o.set(r,e);for(var k=a;++u1)return!1;if(e.length===1){var r=Pr(e,1)[0];return r.type==="text"&&!r.value}return!0}function WRn(e){var r=e.changeKey,t=e.text,n=e.tokens,s=e.renderToken,o=w_(e,URn),a=s?function(i,c){return s(i,WA,c)}:WA;return f.jsx("td",Vr(Vr({},o),{},{"data-change-key":r,children:n?GRn(n)?" ":n.map(a):t||" "}))}var zB=T.memo(WRn);function EB(e,r){return function(){var t=r==="old"?Xy(e):Yy(e);return t===-1?void 0:t}}function NB(e,r){return function(t){return e&&t?f.jsx("a",{href:r?"#"+r:void 0,children:t}):t}}function Ob(e,r){return r?function(t){e(),r(t)}:e}function KA(e,r,t,n){return T.useMemo((function(){var s=CB(e,(function(o){return function(a){return o&&o(r,a)}}));return s.onMouseEnter=Ob(t,s.onMouseEnter),s.onMouseLeave=Ob(n,s.onMouseLeave),s}),[e,t,n,r])}function VA(e,r,t,n,s,o,a,i,c){var u={change:r,side:n,inHoverState:i,renderDefault:EB(r,n),wrapInAnchor:NB(s,o)};return f.jsx("td",Vr(Vr({className:e},a),{},{"data-change-key":t,children:c(u)}))}function KRn(e){var r,t,n,s=e.change,o=e.selected,a=e.tokens,i=e.className,c=e.generateLineClassName,u=e.gutterClassName,d=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,k=e.gutterAnchor,w=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,x=s.type,y=s.content,S=b_(s),z=(r=Pr(T.useState(!1),2),t=r[0],n=r[1],[t,T.useCallback((function(){return n(!0)}),[]),T.useCallback((function(){return n(!1)}),[])]),E=Pr(z,3),A=E[0],N=E[1],M=E[2],$=T.useMemo((function(){return{change:s}}),[s]),D=KA(_,$,N,M),I=KA(p,$,N,M),G=w(s),H=c({changes:[s],defaultGenerate:function(){return i}}),Q=Pa("diff-gutter","diff-gutter-".concat(x),u,{"diff-gutter-selected":o}),K=Pa("diff-code","diff-code-".concat(x),d,{"diff-code-selected":o});return f.jsxs("tr",{id:G,className:Pa("diff-line",H),children:[!m&&VA(Q,s,S,"old",k,G,D,A,b),!m&&VA(Q,s,S,"new",k,G,D,A,b),f.jsx(zB,Vr({className:K,changeKey:S,text:y,tokens:a,renderToken:v},I))]})}var VRn=T.memo(KRn);function QRn(e){var r=e.hideGutter,t=e.element;return f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?1:3,className:"diff-widget-content",children:t})})}var XRn=["hideGutter","selectedChanges","tokens","lineClassName"],YRn=["hunk","widgets","className"];function ZRn(e){var r=e.hunk,t=e.widgets,n=e.className,s=w_(e,YRn),o=(function(a,i){return a.reduce((function(c,u){var d=b_(u);c.push(["change",d,u]);var _=i[d];return _&&c.push(["widget",d,_]),c}),[])})(r.changes,t);return f.jsx("tbody",{className:Pa("diff-hunk",n),children:o.map((function(a){return(function(i,c){var u=Pr(i,3),d=u[0],_=u[1],p=u[2],m=c.hideGutter,k=c.selectedChanges,w=c.tokens,v=c.lineClassName,b=w_(c,XRn);if(d==="change"){var x=Ha(p)?"old":"new",y=Ha(p)?Xy(p):Yy(p),S=w?w[x][y-1]:null;return f.jsx(VRn,Vr({className:v,change:p,hideGutter:m,selected:k.includes(_),tokens:S},b),"change".concat(_))}return d==="widget"?f.jsx(QRn,{hideGutter:m,element:p},"widget".concat(_)):null})(a,s)}))})}var AB=0;function Zv(e,r,t,n){var s=T.useCallback((function(){return r(e)}),[e,r]),o=T.useCallback((function(){return r("")}),[r]);return T.useMemo((function(){var a=CB(n,(function(i){return function(c){return i&&i({side:e,change:t},c)}}));return a.onMouseEnter=Ob(s,a.onMouseEnter),a.onMouseLeave=Ob(o,a.onMouseLeave),a}),[t,n,s,e,o])}function J2(e){var r=e.change,t=e.side,n=e.selected,s=e.tokens,o=e.gutterClassName,a=e.codeClassName,i=e.gutterEvents,c=e.codeEvents,u=e.anchorID,d=e.gutterAnchor,_=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,k=e.renderToken,w=e.renderGutter;if(!r){var v=Pa("diff-gutter","diff-gutter-omit",o),b=Pa("diff-code","diff-code-omit",a);return[!p&&f.jsx("td",{className:v},"gutter"),f.jsx("td",{className:b},"code")]}var x=r.type,y=r.content,S=b_(r),z=t===AB?"old":"new",E=Vr({id:u||void 0,className:Pa("diff-gutter","diff-gutter-".concat(x),q3({"diff-gutter-selected":n},"diff-line-hover-"+z,m),o),children:w({change:r,side:z,inHoverState:m,renderDefault:EB(r,z),wrapInAnchor:NB(d,_)})},i),A=Pa("diff-code","diff-code-".concat(x),q3({"diff-code-selected":n},"diff-line-hover-"+z,m),a);return[!p&&f.jsx("td",Vr(Vr({},E),{},{"data-change-key":S}),"gutter"),f.jsx(zB,Vr({className:A,changeKey:S,text:y,tokens:s,renderToken:k},c),"code")]}function JRn(e){var r=e.className,t=e.oldChange,n=e.newChange,s=e.oldSelected,o=e.newSelected,a=e.oldTokens,i=e.newTokens,c=e.monotonous,u=e.gutterClassName,d=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,k=e.generateAnchorID,w=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,x=e.renderGutter,y=Pr(T.useState(""),2),S=y[0],z=y[1],E=Zv("old",z,t,_),A=Zv("new",z,n,_),N=Zv("old",z,t,p),M=Zv("new",z,n,p),$=t&&k(t),D=n&&k(n),I=w({changes:[t,n],defaultGenerate:function(){return r}}),G={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:d,gutterEvents:_,codeEvents:p,renderToken:b,renderGutter:x},H=Vr(Vr({},G),{},{change:t,side:AB,selected:s,tokens:a,gutterEvents:E,codeEvents:N,anchorID:$,gutterAnchor:v,gutterAnchorTarget:$,hover:S==="old"}),Q=Vr(Vr({},G),{},{change:n,side:1,selected:o,tokens:i,gutterEvents:A,codeEvents:M,anchorID:t===n?null:D,gutterAnchor:v,gutterAnchorTarget:t===n?$:D,hover:S==="new"});if(c)return f.jsx("tr",{className:Pa("diff-line",I),children:J2(t?H:Q)});var K=(function(J,ee){return J&&!ee?"diff-line-old-only":!J&&ee?"diff-line-new-only":J===ee?"diff-line-normal":"diff-line-compare"})(t,n);return f.jsxs("tr",{className:Pa("diff-line",K,I),children:[J2(H),J2(Q)]})}var eMn=T.memo(JRn);function tMn(e){var r=e.hideGutter,t=e.oldElement,n=e.newElement;return e.monotonous?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:t||n})}):t===n?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?2:4,className:"diff-widget-content",children:t})}):f.jsxs("tr",{className:"diff-widget",children:[f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:t}),f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:n})]})}var rMn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],nMn=["hunk","widgets","className"];function Jv(e,r){return(e?b_(e):"00")+(r?b_(r):"00")}function sMn(e){var r=e.hunk,t=e.widgets,n=e.className,s=w_(e,nMn),o=(function(a,i){for(var c=function(b){if(!b)return null;var x=b_(b);return i[x]||null},u=[],d=0;d=s&&n=o&&s-1},YAn=function(e,r){var t=this.__data__,n=By(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this};function fh(e){var r=-1,t=e==null?0:e.length;for(this.clear();++ri))return!1;var u=o.get(e),d=o.get(r);if(u&&d)return u==r&&d==e;var _=-1,p=!0,m=2&t?new OTn:void 0;for(o.set(e,r),o.set(r,e);++_-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},En={};En["[object Float32Array]"]=En["[object Float64Array]"]=En["[object Int8Array]"]=En["[object Int16Array]"]=En["[object Int32Array]"]=En["[object Uint8Array]"]=En["[object Uint8ClampedArray]"]=En["[object Uint16Array]"]=En["[object Uint32Array]"]=!0,En["[object Arguments]"]=En["[object Array]"]=En["[object ArrayBuffer]"]=En["[object Boolean]"]=En["[object DataView]"]=En["[object Date]"]=En["[object Error]"]=En["[object Function]"]=En["[object Map]"]=En["[object Number]"]=En["[object Object]"]=En["[object RegExp]"]=En["[object Set]"]=En["[object String]"]=En["[object WeakMap]"]=!1;var XTn=function(e){return op(e)&&l6(e.length)&&!!En[Sp(e)]},YTn=function(e){return function(r){return e(r)}},PA=y0((function(e,r){var t=r&&!r.nodeType&&r,n=t&&e&&!e.nodeType&&e,s=n&&n.exports===t&&_B.process,o=(function(){try{var a=n&&n.require&&n.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}})();e.exports=o})),BA=PA&&PA.isTypedArray,u6=BA?YTn(BA):XTn,ZTn=Object.prototype.hasOwnProperty,JTn=function(e,r){var t=Wa(e),n=!t&&Uy(e),s=!t&&!n&&Mb(e),o=!t&&!n&&!s&&u6(e),a=t||n||s||o,i=a?GTn(e.length,String):[],c=i.length;for(var u in e)!ZTn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||gB(u,c))||i.push(u);return i},eRn=Object.prototype,vB=function(e){var r=e&&e.constructor;return e===(typeof r=="function"&&r.prototype||eRn)},tRn=(function(e,r){return function(t){return e(r(t))}})(Object.keys,Object),rRn=Object.prototype.hasOwnProperty,bB=function(e){if(!vB(e))return tRn(e);var r=[];for(var t in Object(e))rRn.call(e,t)&&t!="constructor"&&r.push(t);return r},Gy=function(e){return e!=null&&l6(e.length)&&!dB(e)},_6=function(e){return Gy(e)?JTn(e):bB(e)},FA=function(e){return BTn(e,_6,UTn)},nRn=Object.prototype.hasOwnProperty,sRn=function(e,r,t,n,s,o){var a=1&t,i=FA(e),c=i.length;if(c!=FA(r).length&&!a)return!1;for(var u=c;u--;){var d=i[u];if(!(a?d in r:nRn.call(r,d)))return!1}var _=o.get(e),p=o.get(r);if(_&&p)return _==r&&p==e;var m=!0;o.set(e,r),o.set(r,e);for(var k=a;++u1)return!1;if(e.length===1){var r=Pr(e,1)[0];return r.type==="text"&&!r.value}return!0}function WRn(e){var r=e.changeKey,t=e.text,n=e.tokens,s=e.renderToken,o=w_(e,URn),a=s?function(i,c){return s(i,WA,c)}:WA;return f.jsx("td",Vr(Vr({},o),{},{"data-change-key":r,children:n?GRn(n)?" ":n.map(a):t||" "}))}var zB=T.memo(WRn);function EB(e,r){return function(){var t=r==="old"?Xy(e):Yy(e);return t===-1?void 0:t}}function NB(e,r){return function(t){return e&&t?f.jsx("a",{href:r?"#"+r:void 0,children:t}):t}}function Ob(e,r){return r?function(t){e(),r(t)}:e}function KA(e,r,t,n){return T.useMemo((function(){var s=CB(e,(function(o){return function(a){return o&&o(r,a)}}));return s.onMouseEnter=Ob(t,s.onMouseEnter),s.onMouseLeave=Ob(n,s.onMouseLeave),s}),[e,t,n,r])}function VA(e,r,t,n,s,o,a,i,c){var u={change:r,side:n,inHoverState:i,renderDefault:EB(r,n),wrapInAnchor:NB(s,o)};return f.jsx("td",Vr(Vr({className:e},a),{},{"data-change-key":t,children:c(u)}))}function KRn(e){var r,t,n,s=e.change,o=e.selected,a=e.tokens,i=e.className,c=e.generateLineClassName,u=e.gutterClassName,d=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,k=e.gutterAnchor,x=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,w=s.type,y=s.content,S=b_(s),z=(r=Pr(T.useState(!1),2),t=r[0],n=r[1],[t,T.useCallback((function(){return n(!0)}),[]),T.useCallback((function(){return n(!1)}),[])]),N=Pr(z,3),A=N[0],E=N[1],M=N[2],$=T.useMemo((function(){return{change:s}}),[s]),D=KA(_,$,E,M),I=KA(p,$,E,M),G=x(s),H=c({changes:[s],defaultGenerate:function(){return i}}),Q=Pa("diff-gutter","diff-gutter-".concat(w),u,{"diff-gutter-selected":o}),K=Pa("diff-code","diff-code-".concat(w),d,{"diff-code-selected":o});return f.jsxs("tr",{id:G,className:Pa("diff-line",H),children:[!m&&VA(Q,s,S,"old",k,G,D,A,b),!m&&VA(Q,s,S,"new",k,G,D,A,b),f.jsx(zB,Vr({className:K,changeKey:S,text:y,tokens:a,renderToken:v},I))]})}var VRn=T.memo(KRn);function QRn(e){var r=e.hideGutter,t=e.element;return f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?1:3,className:"diff-widget-content",children:t})})}var XRn=["hideGutter","selectedChanges","tokens","lineClassName"],YRn=["hunk","widgets","className"];function ZRn(e){var r=e.hunk,t=e.widgets,n=e.className,s=w_(e,YRn),o=(function(a,i){return a.reduce((function(c,u){var d=b_(u);c.push(["change",d,u]);var _=i[d];return _&&c.push(["widget",d,_]),c}),[])})(r.changes,t);return f.jsx("tbody",{className:Pa("diff-hunk",n),children:o.map((function(a){return(function(i,c){var u=Pr(i,3),d=u[0],_=u[1],p=u[2],m=c.hideGutter,k=c.selectedChanges,x=c.tokens,v=c.lineClassName,b=w_(c,XRn);if(d==="change"){var w=Ha(p)?"old":"new",y=Ha(p)?Xy(p):Yy(p),S=x?x[w][y-1]:null;return f.jsx(VRn,Vr({className:v,change:p,hideGutter:m,selected:k.includes(_),tokens:S},b),"change".concat(_))}return d==="widget"?f.jsx(QRn,{hideGutter:m,element:p},"widget".concat(_)):null})(a,s)}))})}var AB=0;function Zv(e,r,t,n){var s=T.useCallback((function(){return r(e)}),[e,r]),o=T.useCallback((function(){return r("")}),[r]);return T.useMemo((function(){var a=CB(n,(function(i){return function(c){return i&&i({side:e,change:t},c)}}));return a.onMouseEnter=Ob(s,a.onMouseEnter),a.onMouseLeave=Ob(o,a.onMouseLeave),a}),[t,n,s,e,o])}function J2(e){var r=e.change,t=e.side,n=e.selected,s=e.tokens,o=e.gutterClassName,a=e.codeClassName,i=e.gutterEvents,c=e.codeEvents,u=e.anchorID,d=e.gutterAnchor,_=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,k=e.renderToken,x=e.renderGutter;if(!r){var v=Pa("diff-gutter","diff-gutter-omit",o),b=Pa("diff-code","diff-code-omit",a);return[!p&&f.jsx("td",{className:v},"gutter"),f.jsx("td",{className:b},"code")]}var w=r.type,y=r.content,S=b_(r),z=t===AB?"old":"new",N=Vr({id:u||void 0,className:Pa("diff-gutter","diff-gutter-".concat(w),q3({"diff-gutter-selected":n},"diff-line-hover-"+z,m),o),children:x({change:r,side:z,inHoverState:m,renderDefault:EB(r,z),wrapInAnchor:NB(d,_)})},i),A=Pa("diff-code","diff-code-".concat(w),q3({"diff-code-selected":n},"diff-line-hover-"+z,m),a);return[!p&&f.jsx("td",Vr(Vr({},N),{},{"data-change-key":S}),"gutter"),f.jsx(zB,Vr({className:A,changeKey:S,text:y,tokens:s,renderToken:k},c),"code")]}function JRn(e){var r=e.className,t=e.oldChange,n=e.newChange,s=e.oldSelected,o=e.newSelected,a=e.oldTokens,i=e.newTokens,c=e.monotonous,u=e.gutterClassName,d=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,k=e.generateAnchorID,x=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,w=e.renderGutter,y=Pr(T.useState(""),2),S=y[0],z=y[1],N=Zv("old",z,t,_),A=Zv("new",z,n,_),E=Zv("old",z,t,p),M=Zv("new",z,n,p),$=t&&k(t),D=n&&k(n),I=x({changes:[t,n],defaultGenerate:function(){return r}}),G={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:d,gutterEvents:_,codeEvents:p,renderToken:b,renderGutter:w},H=Vr(Vr({},G),{},{change:t,side:AB,selected:s,tokens:a,gutterEvents:N,codeEvents:E,anchorID:$,gutterAnchor:v,gutterAnchorTarget:$,hover:S==="old"}),Q=Vr(Vr({},G),{},{change:n,side:1,selected:o,tokens:i,gutterEvents:A,codeEvents:M,anchorID:t===n?null:D,gutterAnchor:v,gutterAnchorTarget:t===n?$:D,hover:S==="new"});if(c)return f.jsx("tr",{className:Pa("diff-line",I),children:J2(t?H:Q)});var K=(function(J,ee){return J&&!ee?"diff-line-old-only":!J&&ee?"diff-line-new-only":J===ee?"diff-line-normal":"diff-line-compare"})(t,n);return f.jsxs("tr",{className:Pa("diff-line",K,I),children:[J2(H),J2(Q)]})}var eMn=T.memo(JRn);function tMn(e){var r=e.hideGutter,t=e.oldElement,n=e.newElement;return e.monotonous?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:t||n})}):t===n?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?2:4,className:"diff-widget-content",children:t})}):f.jsxs("tr",{className:"diff-widget",children:[f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:t}),f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:n})]})}var rMn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],nMn=["hunk","widgets","className"];function Jv(e,r){return(e?b_(e):"00")+(r?b_(r):"00")}function sMn(e){var r=e.hunk,t=e.widgets,n=e.className,s=w_(e,nMn),o=(function(a,i){for(var c=function(b){if(!b)return null;var w=b_(b);return i[w]||null},u=[],d=0;d=(o==null?void 0:o.value.length))return[e];var i=function(_,p){var m=o.value.slice(_,p);return[].concat(Fa(s),[Vr(Vr({},o),{},{value:m})])};if(r>0){var c=i(0,r);a.push(bh(c))}var u=i(Math.max(r,0),t);if(a.push(n?(function(_,p){return[p].concat(Fa(bh(_)))})(u,n):bh(u)),t1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.children){var n=e.children,s=w_(e,jMn);t.push(s);var o,a=i6(n);try{for(a.s();!(o=a.n()).done;)OB(o.value,r,t)}catch(i){a.e(i)}finally{a.f()}t.pop()}else r.push(bh([].concat(Fa(t.slice(1)),[e])));return r}function SMn(e){return e.reduce((function(r,t){var n=r[r.length-1],s=(function(c){var u=m6(c);return u.value.includes(` `)?u.value.split(` -`).map((function(d){return xMn(c,Vr(Vr({},u),{},{value:d}))})):[c]})(t),o=nB(s),a=o[0],i=o.slice(1);return[].concat(Fa(r.slice(0,-1)),[[].concat(Fa(n),[a])],Fa(i.map((function(c){return[c]}))))}),[[]])}function ZA(e){return SMn(OB(e))}var CMn=function(e,r,t){var n=(t=typeof t=="function"?t:void 0)?t(e,r):void 0;return n===void 0?Wy(e,r,void 0,t):!!n},zMn=function(e,r){return Wy(e,r)},EMn=function(e){var r=e==null?0:e.length;return r?e[r-1]:void 0};function NMn(e,r){if(!e.children)throw new Error("parent node missing children property");var t,n,s=EMn(e.children);return s&&(n=r,(t=s).type===n.type&&(t.type==="text"||t.children&&n.children&&CMn(t,n,(function(o,a,i){return i==="chlidren"||zMn(o,a)}))))?e.children[e.children.length-1]=(function(o,a){return"value"in o&&"value"in a?Vr(Vr({},o),{},{value:"".concat(o.value).concat(a.value)}):o})(s,r):e.children.push(r),e.children[e.children.length-1]}function JA(e){var r,t={type:"root",children:[]},n=i6(e);try{var s=function(){var o=r.value;o.reduce((function(a,i,c){return NMn(a,c===o.length-1?Vr({},i):Vr(Vr({},i),{},{children:[]}))}),t)};for(n.s();!(r=n.n()).done;)s()}catch(o){n.e(o)}finally{n.f()}return t}var AMn=Object.prototype.hasOwnProperty,TMn=RB((function(e,r,t){AMn.call(e,t)?e[t].push(r):h6(e,t,[r])})),RMn=Object.prototype.hasOwnProperty,MMn=function(e){if(e==null)return!0;if(Gy(e)&&(Wa(e)||typeof e=="string"||typeof e.splice=="function"||Mb(e)||u6(e)||Uy(e)))return!e.length;var r=Y3(e);if(r=="[object Map]"||r=="[object Set]")return!e.size;if(vB(e))return!bB(e).length;for(var t in e)if(RMn.call(e,t))return!1;return!0},OMn=function(e,r){var t=r.start,n=r.length,s=t+n,o=e.reduce((function(a,i){var c=Pr(a,2),u=c[0],d=c[1],_=d+m6(i).value.length;if(d>s||_n.length?t:n,c=t.length>n.length?n:t,u=i.indexOf(c);if(u!=-1)return a=[new r.Diff(1,i.substring(0,u)),new r.Diff(0,c),new r.Diff(1,i.substring(u+c.length))],t.length>n.length&&(a[0][0]=a[2][0]=-1),a;if(c.length==1)return[new r.Diff(-1,t),new r.Diff(1,n)];var d=this.diff_halfMatch_(t,n);if(d){var _=d[0],p=d[1],m=d[2],k=d[3],w=d[4],v=this.diff_main(_,m,s,o),b=this.diff_main(p,k,s,o);return v.concat([new r.Diff(0,w)],b)}return s&&t.length>100&&n.length>100?this.diff_lineMode_(t,n,o):this.diff_bisect_(t,n,o)},r.prototype.diff_lineMode_=function(t,n,s){var o=this.diff_linesToChars_(t,n);t=o.chars1,n=o.chars2;var a=o.lineArray,i=this.diff_main(t,n,!1,s);this.diff_charsToLines_(i,a),this.diff_cleanupSemantic(i),i.push(new r.Diff(0,""));for(var c=0,u=0,d=0,_="",p="";c=1&&d>=1){i.splice(c-u-d,u+d),c=c-u-d;for(var m=this.diff_main(_,p,!1,s),k=m.length-1;k>=0;k--)i.splice(c,0,m[k]);c+=m.length}d=0,u=0,_="",p=""}c++}return i.pop(),i},r.prototype.diff_bisect_=function(t,n,s){for(var o=t.length,a=n.length,i=Math.ceil((o+a)/2),c=i,u=2*i,d=new Array(u),_=new Array(u),p=0;ps);y++){for(var S=-y+w;S<=y-v;S+=2){for(var z=c+S,E=(D=S==-y||S!=y&&d[z-1]o)v+=2;else if(E>a)w+=2;else if(k&&(M=c+m-S)>=0&&M=(N=o-_[M]))return this.diff_bisectSplit_(t,n,D,E,s)}for(var A=-y+b;A<=y-x;A+=2){for(var N,M=c+A,$=(N=A==-y||A!=y&&_[M-1]<_[M+1]?_[M+1]:_[M-1]+1)-A;No)x+=2;else if($>a)b+=2;else if(!k&&(z=c+m-A)>=0&&z=(N=o-N))return this.diff_bisectSplit_(t,n,D,E,s)}}}return[new r.Diff(-1,t),new r.Diff(1,n)]},r.prototype.diff_bisectSplit_=function(t,n,s,o,a){var i=t.substring(0,s),c=n.substring(0,o),u=t.substring(s),d=n.substring(o),_=this.diff_main(i,c,!1,a),p=this.diff_main(u,d,!1,a);return _.concat(p)},r.prototype.diff_linesToChars_=function(t,n){var s=[],o={};function a(u){for(var d="",_=0,p=-1,m=s.length;po?t=t.substring(s-o):sn.length?t:n,o=t.length>n.length?n:t;if(s.length<4||2*o.length=w.length?[x,y,S,z,N]:null}var c,u,d,_,p,m=i(s,o,Math.ceil(s.length/4)),k=i(s,o,Math.ceil(s.length/2));return m||k?(c=k?m&&m[4].length>k[4].length?m:k:m,t.length>n.length?(u=c[0],d=c[1],_=c[2],p=c[3]):(_=c[0],p=c[1],u=c[2],d=c[3]),[u,d,_,p,c[4]]):null},r.prototype.diff_cleanupSemantic=function(t){for(var n=!1,s=[],o=0,a=null,i=0,c=0,u=0,d=0,_=0;i0?s[o-1]:-1,c=0,u=0,d=0,_=0,a=null,n=!0)),i++;for(n&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),i=1;i=w?(k>=p.length/2||k>=m.length/2)&&(t.splice(i,0,new r.Diff(0,m.substring(0,k))),t[i-1][1]=p.substring(0,p.length-k),t[i+1][1]=m.substring(k),i++):(w>=p.length/2||w>=m.length/2)&&(t.splice(i,0,new r.Diff(0,p.substring(0,w))),t[i-1][0]=1,t[i-1][1]=m.substring(0,m.length-w),t[i+1][0]=-1,t[i+1][1]=p.substring(w),i++),i++}i++}},r.prototype.diff_cleanupSemanticLossless=function(t){function n(w,v){if(!w||!v)return 6;var b=w.charAt(w.length-1),x=v.charAt(0),y=b.match(r.nonAlphaNumericRegex_),S=x.match(r.nonAlphaNumericRegex_),z=y&&b.match(r.whitespaceRegex_),E=S&&x.match(r.whitespaceRegex_),A=z&&b.match(r.linebreakRegex_),N=E&&x.match(r.linebreakRegex_),M=A&&w.match(r.blanklineEndRegex_),$=N&&v.match(r.blanklineStartRegex_);return M||$?5:A||N?4:y&&!z&&E?3:z||E?2:y||S?1:0}for(var s=1;s=m&&(m=k,d=o,_=a,p=i)}t[s-1][1]!=d&&(d?t[s-1][1]=d:(t.splice(s-1,1),s--),t[s][1]=_,p?t[s+1][1]=p:(t.splice(s+1,1),s--))}s++}},r.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,r.whitespaceRegex_=/\s/,r.linebreakRegex_=/[\r\n]/,r.blanklineEndRegex_=/\n\r?\n$/,r.blanklineStartRegex_=/^\r?\n\r?\n/,r.prototype.diff_cleanupEfficiency=function(t){for(var n=!1,s=[],o=0,a=null,i=0,c=!1,u=!1,d=!1,_=!1;i0?s[o-1]:-1,d=_=!1),n=!0)),i++;n&&this.diff_cleanupMerge(t)},r.prototype.diff_cleanupMerge=function(t){t.push(new r.Diff(0,""));for(var n,s=0,o=0,a=0,i="",c="";s1?(o!==0&&a!==0&&((n=this.diff_commonPrefix(c,i))!==0&&(s-o-a>0&&t[s-o-a-1][0]==0?t[s-o-a-1][1]+=c.substring(0,n):(t.splice(0,0,new r.Diff(0,c.substring(0,n))),s++),c=c.substring(n),i=i.substring(n)),(n=this.diff_commonSuffix(c,i))!==0&&(t[s][1]=c.substring(c.length-n)+t[s][1],c=c.substring(0,c.length-n),i=i.substring(0,i.length-n))),s-=o+a,t.splice(s,o+a),i.length&&(t.splice(s,0,new r.Diff(-1,i)),s++),c.length&&(t.splice(s,0,new r.Diff(1,c)),s++),s++):s!==0&&t[s-1][0]==0?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,a=0,o=0,i="",c=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sn));s++)i=o,c=a;return t.length!=s&&t[s][0]===-1?c:c+(n-i)},r.prototype.diff_prettyHtml=function(t){for(var n=[],s=/&/g,o=//g,i=/\n/g,c=0;c");switch(u){case 1:n[c]=''+d+"";break;case-1:n[c]=''+d+"";break;case 0:n[c]=""+d+""}}return n.join("")},r.prototype.diff_text1=function(t){for(var n=[],s=0;sthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var o=this.match_alphabet_(n),a=this;function i(E,A){var N=E/n.length,M=Math.abs(s-A);return a.Match_Distance?N+M/a.Match_Distance:M?1:N}var c=this.Match_Threshold,u=t.indexOf(n,s);u!=-1&&(c=Math.min(i(0,u),c),(u=t.lastIndexOf(n,s+n.length))!=-1&&(c=Math.min(i(0,u),c)));var d,_,p=1<=v;y--){var S=o[t.charAt(y-1)];if(x[y]=w===0?(x[y+1]<<1|1)&S:(x[y+1]<<1|1)&S|(m[y+1]|m[y])<<1|1|m[y+1],x[y]&p){var z=i(w,y-1);if(z<=c){if(c=z,!((u=y-1)>s))break;v=Math.max(1,2*s-u)}}}if(i(w+1,s)>c)break;m=x}return u},r.prototype.match_alphabet_=function(t){for(var n={},s=0;s2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(t&&typeof t=="object"&&n===void 0&&s===void 0)a=t,o=this.diff_text1(a);else if(typeof t=="string"&&n&&typeof n=="object"&&s===void 0)o=t,a=n;else{if(typeof t!="string"||typeof n!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");o=t,a=s}if(a.length===0)return[];for(var i=[],c=new r.patch_obj,u=0,d=0,_=0,p=o,m=o,k=0;k=2*this.Patch_Margin&&u&&(this.patch_addContext_(c,p),i.push(c),c=new r.patch_obj,u=0,p=m,d=_)}w!==1&&(d+=v.length),w!==-1&&(_+=v.length)}return u&&(this.patch_addContext_(c,p),i.push(c)),i},r.prototype.patch_deepCopy=function(t){for(var n=[],s=0;sthis.Match_MaxBits?(c=this.match_main(n,_.substring(0,this.Match_MaxBits),d))!=-1&&((p=this.match_main(n,_.substring(_.length-this.Match_MaxBits),d+_.length-this.Match_MaxBits))==-1||c>=p)&&(c=-1):c=this.match_main(n,_,d),c==-1)a[i]=!1,o-=t[i].length2-t[i].length1;else if(a[i]=!0,o=c-d,_==(u=p==-1?n.substring(c,c+_.length):n.substring(c,p+this.Match_MaxBits)))n=n.substring(0,c)+this.diff_text2(t[i].diffs)+n.substring(c+_.length);else{var m=this.diff_main(_,u,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(m)/_.length>this.Patch_DeleteThreshold)a[i]=!1;else{this.diff_cleanupSemanticLossless(m);for(var k,w=0,v=0;vi[0][1].length){var c=n-i[0][1].length;i[0][1]=s.substring(i[0][1].length)+i[0][1],a.start1-=c,a.start2-=c,a.length1+=c,a.length2+=c}return(i=(a=t[t.length-1]).diffs).length==0||i[i.length-1][0]!=0?(i.push(new r.Diff(0,s)),a.length1+=n,a.length2+=n):n>i[i.length-1][1].length&&(c=n-i[i.length-1][1].length,i[i.length-1][1]+=s.substring(0,c),a.length1+=c,a.length2+=c),s},r.prototype.patch_splitMax=function(t){for(var n=this.Match_MaxBits,s=0;s2*n?(u.length1+=p.length,a+=p.length,d=!1,u.diffs.push(new r.Diff(_,p)),o.diffs.shift()):(p=p.substring(0,n-u.length1-this.Patch_Margin),u.length1+=p.length,a+=p.length,_===0?(u.length2+=p.length,i+=p.length):d=!1,u.diffs.push(new r.Diff(_,p)),p==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(p.length))}c=(c=this.diff_text2(u.diffs)).substring(c.length-this.Patch_Margin);var m=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);m!==""&&(u.length1+=m.length,u.length2+=m.length,u.diffs.length!==0&&u.diffs[u.diffs.length-1][0]===0?u.diffs[u.diffs.length-1][1]+=m:u.diffs.push(new r.Diff(0,m))),d||t.splice(++s,0,u)}}},r.prototype.patch_toText=function(t){for(var n=[],s=0;ss||_n.length?t:n,c=t.length>n.length?n:t,u=i.indexOf(c);if(u!=-1)return a=[new r.Diff(1,i.substring(0,u)),new r.Diff(0,c),new r.Diff(1,i.substring(u+c.length))],t.length>n.length&&(a[0][0]=a[2][0]=-1),a;if(c.length==1)return[new r.Diff(-1,t),new r.Diff(1,n)];var d=this.diff_halfMatch_(t,n);if(d){var _=d[0],p=d[1],m=d[2],k=d[3],x=d[4],v=this.diff_main(_,m,s,o),b=this.diff_main(p,k,s,o);return v.concat([new r.Diff(0,x)],b)}return s&&t.length>100&&n.length>100?this.diff_lineMode_(t,n,o):this.diff_bisect_(t,n,o)},r.prototype.diff_lineMode_=function(t,n,s){var o=this.diff_linesToChars_(t,n);t=o.chars1,n=o.chars2;var a=o.lineArray,i=this.diff_main(t,n,!1,s);this.diff_charsToLines_(i,a),this.diff_cleanupSemantic(i),i.push(new r.Diff(0,""));for(var c=0,u=0,d=0,_="",p="";c=1&&d>=1){i.splice(c-u-d,u+d),c=c-u-d;for(var m=this.diff_main(_,p,!1,s),k=m.length-1;k>=0;k--)i.splice(c,0,m[k]);c+=m.length}d=0,u=0,_="",p=""}c++}return i.pop(),i},r.prototype.diff_bisect_=function(t,n,s){for(var o=t.length,a=n.length,i=Math.ceil((o+a)/2),c=i,u=2*i,d=new Array(u),_=new Array(u),p=0;ps);y++){for(var S=-y+x;S<=y-v;S+=2){for(var z=c+S,N=(D=S==-y||S!=y&&d[z-1]o)v+=2;else if(N>a)x+=2;else if(k&&(M=c+m-S)>=0&&M=(E=o-_[M]))return this.diff_bisectSplit_(t,n,D,N,s)}for(var A=-y+b;A<=y-w;A+=2){for(var E,M=c+A,$=(E=A==-y||A!=y&&_[M-1]<_[M+1]?_[M+1]:_[M-1]+1)-A;Eo)w+=2;else if($>a)b+=2;else if(!k&&(z=c+m-A)>=0&&z=(E=o-E))return this.diff_bisectSplit_(t,n,D,N,s)}}}return[new r.Diff(-1,t),new r.Diff(1,n)]},r.prototype.diff_bisectSplit_=function(t,n,s,o,a){var i=t.substring(0,s),c=n.substring(0,o),u=t.substring(s),d=n.substring(o),_=this.diff_main(i,c,!1,a),p=this.diff_main(u,d,!1,a);return _.concat(p)},r.prototype.diff_linesToChars_=function(t,n){var s=[],o={};function a(u){for(var d="",_=0,p=-1,m=s.length;po?t=t.substring(s-o):sn.length?t:n,o=t.length>n.length?n:t;if(s.length<4||2*o.length=x.length?[w,y,S,z,E]:null}var c,u,d,_,p,m=i(s,o,Math.ceil(s.length/4)),k=i(s,o,Math.ceil(s.length/2));return m||k?(c=k?m&&m[4].length>k[4].length?m:k:m,t.length>n.length?(u=c[0],d=c[1],_=c[2],p=c[3]):(_=c[0],p=c[1],u=c[2],d=c[3]),[u,d,_,p,c[4]]):null},r.prototype.diff_cleanupSemantic=function(t){for(var n=!1,s=[],o=0,a=null,i=0,c=0,u=0,d=0,_=0;i0?s[o-1]:-1,c=0,u=0,d=0,_=0,a=null,n=!0)),i++;for(n&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),i=1;i=x?(k>=p.length/2||k>=m.length/2)&&(t.splice(i,0,new r.Diff(0,m.substring(0,k))),t[i-1][1]=p.substring(0,p.length-k),t[i+1][1]=m.substring(k),i++):(x>=p.length/2||x>=m.length/2)&&(t.splice(i,0,new r.Diff(0,p.substring(0,x))),t[i-1][0]=1,t[i-1][1]=m.substring(0,m.length-x),t[i+1][0]=-1,t[i+1][1]=p.substring(x),i++),i++}i++}},r.prototype.diff_cleanupSemanticLossless=function(t){function n(x,v){if(!x||!v)return 6;var b=x.charAt(x.length-1),w=v.charAt(0),y=b.match(r.nonAlphaNumericRegex_),S=w.match(r.nonAlphaNumericRegex_),z=y&&b.match(r.whitespaceRegex_),N=S&&w.match(r.whitespaceRegex_),A=z&&b.match(r.linebreakRegex_),E=N&&w.match(r.linebreakRegex_),M=A&&x.match(r.blanklineEndRegex_),$=E&&v.match(r.blanklineStartRegex_);return M||$?5:A||E?4:y&&!z&&N?3:z||N?2:y||S?1:0}for(var s=1;s=m&&(m=k,d=o,_=a,p=i)}t[s-1][1]!=d&&(d?t[s-1][1]=d:(t.splice(s-1,1),s--),t[s][1]=_,p?t[s+1][1]=p:(t.splice(s+1,1),s--))}s++}},r.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,r.whitespaceRegex_=/\s/,r.linebreakRegex_=/[\r\n]/,r.blanklineEndRegex_=/\n\r?\n$/,r.blanklineStartRegex_=/^\r?\n\r?\n/,r.prototype.diff_cleanupEfficiency=function(t){for(var n=!1,s=[],o=0,a=null,i=0,c=!1,u=!1,d=!1,_=!1;i0?s[o-1]:-1,d=_=!1),n=!0)),i++;n&&this.diff_cleanupMerge(t)},r.prototype.diff_cleanupMerge=function(t){t.push(new r.Diff(0,""));for(var n,s=0,o=0,a=0,i="",c="";s1?(o!==0&&a!==0&&((n=this.diff_commonPrefix(c,i))!==0&&(s-o-a>0&&t[s-o-a-1][0]==0?t[s-o-a-1][1]+=c.substring(0,n):(t.splice(0,0,new r.Diff(0,c.substring(0,n))),s++),c=c.substring(n),i=i.substring(n)),(n=this.diff_commonSuffix(c,i))!==0&&(t[s][1]=c.substring(c.length-n)+t[s][1],c=c.substring(0,c.length-n),i=i.substring(0,i.length-n))),s-=o+a,t.splice(s,o+a),i.length&&(t.splice(s,0,new r.Diff(-1,i)),s++),c.length&&(t.splice(s,0,new r.Diff(1,c)),s++),s++):s!==0&&t[s-1][0]==0?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,a=0,o=0,i="",c=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sn));s++)i=o,c=a;return t.length!=s&&t[s][0]===-1?c:c+(n-i)},r.prototype.diff_prettyHtml=function(t){for(var n=[],s=/&/g,o=//g,i=/\n/g,c=0;c");switch(u){case 1:n[c]=''+d+"";break;case-1:n[c]=''+d+"";break;case 0:n[c]=""+d+""}}return n.join("")},r.prototype.diff_text1=function(t){for(var n=[],s=0;sthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var o=this.match_alphabet_(n),a=this;function i(N,A){var E=N/n.length,M=Math.abs(s-A);return a.Match_Distance?E+M/a.Match_Distance:M?1:E}var c=this.Match_Threshold,u=t.indexOf(n,s);u!=-1&&(c=Math.min(i(0,u),c),(u=t.lastIndexOf(n,s+n.length))!=-1&&(c=Math.min(i(0,u),c)));var d,_,p=1<=v;y--){var S=o[t.charAt(y-1)];if(w[y]=x===0?(w[y+1]<<1|1)&S:(w[y+1]<<1|1)&S|(m[y+1]|m[y])<<1|1|m[y+1],w[y]&p){var z=i(x,y-1);if(z<=c){if(c=z,!((u=y-1)>s))break;v=Math.max(1,2*s-u)}}}if(i(x+1,s)>c)break;m=w}return u},r.prototype.match_alphabet_=function(t){for(var n={},s=0;s2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(t&&typeof t=="object"&&n===void 0&&s===void 0)a=t,o=this.diff_text1(a);else if(typeof t=="string"&&n&&typeof n=="object"&&s===void 0)o=t,a=n;else{if(typeof t!="string"||typeof n!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");o=t,a=s}if(a.length===0)return[];for(var i=[],c=new r.patch_obj,u=0,d=0,_=0,p=o,m=o,k=0;k=2*this.Patch_Margin&&u&&(this.patch_addContext_(c,p),i.push(c),c=new r.patch_obj,u=0,p=m,d=_)}x!==1&&(d+=v.length),x!==-1&&(_+=v.length)}return u&&(this.patch_addContext_(c,p),i.push(c)),i},r.prototype.patch_deepCopy=function(t){for(var n=[],s=0;sthis.Match_MaxBits?(c=this.match_main(n,_.substring(0,this.Match_MaxBits),d))!=-1&&((p=this.match_main(n,_.substring(_.length-this.Match_MaxBits),d+_.length-this.Match_MaxBits))==-1||c>=p)&&(c=-1):c=this.match_main(n,_,d),c==-1)a[i]=!1,o-=t[i].length2-t[i].length1;else if(a[i]=!0,o=c-d,_==(u=p==-1?n.substring(c,c+_.length):n.substring(c,p+this.Match_MaxBits)))n=n.substring(0,c)+this.diff_text2(t[i].diffs)+n.substring(c+_.length);else{var m=this.diff_main(_,u,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(m)/_.length>this.Patch_DeleteThreshold)a[i]=!1;else{this.diff_cleanupSemanticLossless(m);for(var k,x=0,v=0;vi[0][1].length){var c=n-i[0][1].length;i[0][1]=s.substring(i[0][1].length)+i[0][1],a.start1-=c,a.start2-=c,a.length1+=c,a.length2+=c}return(i=(a=t[t.length-1]).diffs).length==0||i[i.length-1][0]!=0?(i.push(new r.Diff(0,s)),a.length1+=n,a.length2+=n):n>i[i.length-1][1].length&&(c=n-i[i.length-1][1].length,i[i.length-1][1]+=s.substring(0,c),a.length1+=c,a.length2+=c),s},r.prototype.patch_splitMax=function(t){for(var n=this.Match_MaxBits,s=0;s2*n?(u.length1+=p.length,a+=p.length,d=!1,u.diffs.push(new r.Diff(_,p)),o.diffs.shift()):(p=p.substring(0,n-u.length1-this.Patch_Margin),u.length1+=p.length,a+=p.length,_===0?(u.length2+=p.length,i+=p.length):d=!1,u.diffs.push(new r.Diff(_,p)),p==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(p.length))}c=(c=this.diff_text2(u.diffs)).substring(c.length-this.Patch_Margin);var m=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);m!==""&&(u.length1+=m.length,u.length2+=m.length,u.diffs.length!==0&&u.diffs[u.diffs.length-1][0]===0?u.diffs[u.diffs.length-1][1]+=m:u.diffs.push(new r.Diff(0,m))),d||t.splice(++s,0,u)}}},r.prototype.patch_toText=function(t){for(var n=[],s=0;s1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(r===void 0?"block":r)==="block"?BMn:FMn,n=p6(e.map((function(i){return i.changes})),$B).map(t).reduce((function(i,c){var u=Pr(i,2),d=u[0],_=u[1],p=Pr(c,2),m=p[0],k=p[1];return[d.concat(m),_.concat(k)]}),[[],[]]),s=Pr(n,2),o=s[0],a=s[1];return $Mn(tT(o),tT(a))}var qMn=["enhancers"],oT=function(e){var r,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.enhancers,s=n===void 0?[]:n,o=Pr(yMn(e,w_(t,qMn)),2),a=o[0],i=o[1],c=[ZA(a),ZA(i)],u=(r=[c[0],c[1]],s.reduce((function(w,v){return v(w)}),r)),d=Pr(u,2),_=d[0],p=d[1],m=[_.map(JA),p.map(JA)],k=m[1];return{old:m[0].map((function(w){var v;return(v=w.children)!==null&&v!==void 0?v:[]})),new:k.map((function(w){var v;return(v=w.children)!==null&&v!==void 0?v:[]}))}};const J3=["openresearch-diff flex flex-col gap-4","[&_.openresearch-diff-file]:[--diff-background-color:var(--base)]","[&_.openresearch-diff-file]:[--diff-text-color:var(--text)]","[&_.openresearch-diff-file]:[--diff-font-family:var(--mono)]","[&_.openresearch-diff-file]:[--diff-selection-text-color:var(--selection-text)]","[&_.openresearch-diff-file]:[--diff-selection-background-color:var(--color-diff-selection)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)]","[&_.openresearch-diff-file]:[--diff-code-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-code-selected-background-color:var(--diff-selection-background-color)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-text-color:var(--accent-green)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-text-color:var(--accent-red)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)]","[&_.openresearch-diff-file]:[--diff-code-insert-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-background-color:var(--color-diff-insert-code)]","[&_.openresearch-diff-file]:[--diff-code-delete-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-background-color:var(--color-diff-delete-code)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)]","[&_.openresearch-diff-file]:[--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)]","[&_.openresearch-diff-file]:w-full","[&_.openresearch-diff-file.diff-unified]:table-fixed","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:collapse","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:w-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:p-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:ps-[2ch] [&_.openresearch-diff-file_.diff-code]:pe-4","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),UMn=2e3,GMn={highlight(e,r){return Ft.highlight(e,r).children}};function WMn(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function Jy(e){let r=0,t=0;for(const n of e.hunks)for(const s of n.changes)s.type==="insert"?r++:s.type==="delete"&&t++;return{additions:r,deletions:t}}function KMn(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function e5(e){switch(e.type){case"delete":return e.oldPath;case"add":case"modify":return e.newPath;case"rename":case"copy":return`${e.oldPath} → ${e.newPath}`}}function VMn(e){const r=[HMn(e.hunks,{type:"line"})],t=jS(KMn(e));return t&&Ft.registered(t)?oT(e.hunks,{enhancers:r,highlight:!0,language:t,refractor:GMn}):oT(e.hunks,{enhancers:r,highlight:!1})}function LB(e,r){if(!e.trim())return{files:[],failed:!1};try{return{files:G3(e,{nearbySequences:"zip"}),failed:!1}}catch{if(r){const t=Array.from(e.matchAll(/^diff --git /gm),s=>s.index),n=t[t.length-1];if(t.length>1&&n!==void 0)try{return{files:G3(e.slice(0,n),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const QMn=({change:e,side:r})=>r==="old"?null:WMn(e);function IB({bytesRead:e,byteLimit:r}){return f.jsxs("div",{className:"truncated-notice border border-accent-amber rounded-md bg-accent-amber-subtle py-3 px-3.5 text-sm [&_h4]:mt-0 [&_h4]:mx-0 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:text-accent-amber [&_p]:m-0 [&_p]:text-subtext",children:[f.jsx("h4",{children:x1t()}),f.jsx("p",{children:Wbt({limit:Ee(Xl(r)),read:Ee(Xl(e))})})]})}function PB({file:e,defaultExpanded:r}){const[t,n]=T.useState(r),{additions:s,deletions:o}=T.useMemo(()=>Jy(e),[e]),a=t&&s+o<=UMn,i=T.useMemo(()=>{if(a)try{return VMn(e)}catch{return}},[e,a]);return f.jsxs("section",{className:`diff-file-card overflow-hidden border border-border rounded-md bg-background [&.expanded_.diff-file-header]:border-b [&.expanded_.diff-file-header]:border-b-border ${t?"expanded":""}`,children:[f.jsxs("button",{className:"diff-file-header sticky top-0 z-10 flex items-center justify-between gap-3 w-full text-start py-2 px-3 bg-surface cursor-pointer [&_.chev]:text-muted [&_.chev]:text-xs [&_.chev]:shrink-0 [&_.chev]:w-3 [&_.path]:flex [&_.path]:items-center [&_.path]:gap-2 [&_.path]:min-w-0 [&_.path]:flex-1 [&_.path_code]:min-w-0 [&_.path_code]:flex-1 [&_.path_code]:overflow-hidden [&_.path_code]:text-ellipsis [&_.path_code]:whitespace-nowrap [&_.path_code]:font-mono [&_.path_code]:text-xs [&_.path_code]:font-medium [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>n(c=>!c),children:[f.jsx("span",{className:"chev",children:t?f.jsx(Zc,{size:14}):f.jsx(Xa,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:e5(e)})}),f.jsxs("span",{className:"stats",children:[f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",o]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:ibt()}):f.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:f.jsx(uMn,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:QMn,tokens:i,viewType:"unified"})}))]})}function XMn({files:e,className:r}){return f.jsx("div",{className:r?`${J3} ${r}`:J3,children:e.map((t,n)=>f.jsx(PB,{file:t,defaultExpanded:n===0},`${t.oldPath}→${t.newPath}#${n}`))})}function YMn(e){switch(e.type){case"add":return"A";case"delete":return"D";case"rename":return"R";case"copy":return"C";case"modify":return"M"}}function BB({diff:e,partial:r=!1}){var p;const t=T.useMemo(()=>LB(e,r),[e,r]),n=t.files,s=T.useMemo(()=>n.map((m,k)=>({file:m,key:`${m.oldPath}→${m.newPath}#${k}`,changes:Jy(m)})),[n]),[o,a]=T.useState(null),[i,c]=T.useState(!1),u=i&&!r,d=s.some(m=>m.key===o)?o:((p=s[0])==null?void 0:p.key)??null,_=s.find(m=>m.key===d)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:r?Y1t():Dbt()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:F1t()}):f.jsxs("div",{className:"diff-explorer @container",children:[f.jsxs("div",{className:"diff-explorer-toolbar flex items-center justify-between gap-3 mb-2.5 text-sm [&_button]:py-0.5 [&_button]:px-0 [&_button]:text-muted [&_button]:text-sm [&_button]:font-medium [&_button:hover]:text-text [&_button:hover]:underline [&_button:hover]:underline-offset-2",children:[f.jsx("strong",{className:"font-medium",children:r?s.length===1?Cbt():T1t({count:fr(s.length)}):s.length===1?OD():MD({count:fr(s.length)})}),!r&&f.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?Wvt():ryt()})]}),u?f.jsx(XMn,{files:n}):f.jsxs("div",{className:"diff-explorer-layout grid grid-cols-[minmax(180px,_260px)_minmax(0,_1fr)] items-start gap-3.5 [@container((max-width:_960px))]:grid-cols-1",children:[f.jsx("div",{className:"diff-explorer-files sticky top-0 max-h-[min(70vh,_720px)] overflow-auto border border-border rounded-md bg-background [&_button]:grid [&_button]:grid-cols-[18px_minmax(0,_1fr)_auto_auto] [&_button]:items-center [&_button]:gap-[7px] [&_button]:w-full [&_button]:py-2 [&_button]:px-[9px] [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_button.active]:bg-panel [&_button.active]:shadow-diff-active [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap [&_code]:text-xs [@container((max-width:_960px))]:static [@container((max-width:_960px))]:max-h-55","aria-label":_1t(),children:s.map(m=>f.jsxs("button",{type:"button",className:m.key===d?"active":"","aria-pressed":m.key===d,onClick:()=>a(m.key),children:[f.jsx("span",{className:`diff-file-status font-mono text-xs font-medium text-muted [&.status-add]:text-accent-green [&.status-delete]:text-accent-red [&.status-rename]:text-accent-blue [&.status-copy]:text-accent-blue status-${m.file.type}`,children:YMn(m.file)}),f.jsx("code",{title:e5(m.file),children:e5(m.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),f.jsx("div",{className:`${J3} diff-explorer-preview min-w-0`,children:_&&f.jsx(PB,{file:_.file,defaultExpanded:!0},_.key)})]})]})}const ZMn="/assets/slurm-logo-aGSXVZcE.svg",JMn="/assets/thinking-machines-BOdslTfm.png";function eOn(e){switch(e){case"modal_job":return"Modal";case"hf_job":return"Hugging Face";case"k8s_job":return"Kubernetes";case"ssh_job":return"SSH";case"slurm_job":return"Slurm";case"ray_job":return"Ray";case"openresearch_job":return"OpenResearch";case"local_job":return ND();case"tinker_job":return"Tinker";default:return e||"—"}}function tOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[f.jsx("path",{d:"M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z",fill:"#FF9D0B"}),f.jsx("path",{d:"M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z",fill:"#FFD21E"}),f.jsx("path",{d:"M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-0.576-.393-.394-1.023-.089-0.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-0.586 0 1.107.79 3.263 3.25 3.263h-.003z",fill:"#FF323D"}),f.jsx("path",{d:"M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003z",fill:"#3A3B45"}),f.jsx("path",{d:"M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8z",fill:"#3A3B45"}),f.jsx("path",{d:"M4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-0.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-0.553.718-.694.244-.162.523-.265.814-.3l.176-.012z",fill:"#FF9D0B"}),f.jsx("path",{d:"M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-0.573.534-.375-.677-1.405-2.416-1.94-2.751-0.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-0.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-0.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-0.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-0.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-0.522z",fill:"#FFD21E"})]})}function rOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[f.jsx("path",{d:"M121.683 75.25L149.997 124L91.4816 224.75C90.3128 226.757 88.155 228 85.8174 228H32.9664C31.7976 228 30.6778 227.691 29.697 227.131C28.7161 226.57 27.8906 225.758 27.3021 224.75L0.876625 179.25C-0.292208 177.243 -0.292208 174.765 0.876625 172.75L57.512 75.25C58.0923 74.2425 58.9259 73.43 59.9068 72.8694C60.8876 72.3088 62.0074 72 63.1762 72H116.027C118.365 72 120.523 73.2431 121.692 75.25H121.683ZM299.125 172.75L242.49 75.25C241.91 74.2425 241.076 73.43 240.095 72.8694C239.114 72.3088 237.995 72 236.826 72H183.975C181.637 72 179.479 73.2431 178.311 75.25L149.997 124L208.512 224.75C209.681 226.757 211.839 228 214.177 228H267.027C268.196 228 269.316 227.691 270.297 227.131C271.278 226.57 272.103 225.758 272.692 224.75L299.117 179.25C300.286 177.243 300.286 174.765 299.117 172.75H299.125Z",fill:"#62DE61"}),f.jsx("path",{d:"M89.6018 124H150.005L121.692 75.25C120.523 73.2431 118.365 72 116.027 72H63.1763C62.0074 72 60.8876 72.3088 59.9068 72.8694L89.6018 124Z",fill:"url(#orxModalA)"}),f.jsx("path",{d:"M89.6018 124L59.9068 72.8694C58.9259 73.43 58.1005 74.2425 57.512 75.25L0.876625 172.75C-0.292208 174.765 -0.292208 177.235 0.876625 179.25L27.3021 224.75C27.8825 225.758 28.7161 226.57 29.697 227.131L89.5936 124H89.6018Z",fill:"url(#orxModalB)"}),f.jsx("path",{d:"M149.997 124H89.5936L29.697 227.131C30.6778 227.691 31.7976 228 32.9664 228H85.8174C88.155 228 90.3128 226.757 91.4816 224.75L149.997 124Z",fill:"#09AF58"}),f.jsx("path",{d:"M299.125 179.25C299.706 178.243 300 177.121 300 176H240.61L210.915 227.131C211.896 227.691 213.016 228 214.185 228H267.036C269.373 228 271.531 226.757 272.7 224.75L299.125 179.25Z",fill:"#09AF58"}),f.jsx("path",{d:"M183.975 72C182.806 72 181.686 72.3088 180.705 72.8694L240.602 176H299.992C299.992 174.879 299.698 173.758 299.117 172.75L242.49 75.25C241.321 73.2431 239.163 72 236.826 72H183.967H183.975Z",fill:"url(#orxModalC)"}),f.jsx("path",{d:"M210.907 227.131L240.602 176L180.705 72.8694C179.725 73.43 178.899 74.2425 178.311 75.25L149.997 124L208.512 224.75C209.093 225.758 209.926 226.57 210.907 227.131Z",fill:"url(#orxModalD)"}),f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),f.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function nOn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:f.jsx("path",{d:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-0.5-.623h-.804l-0.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-0.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-0.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-0.52.123-.736-.172-.216-0.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-0.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-0.555-0.5-0.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-0.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-0.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-0.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z"})})}function sOn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:f.jsx("path",{d:"M16.153 12.826c-.63-.183-1.03.15-1.378.846-0.58 1.13-1.643 1.644-2.888 1.594-1.245-.05-2.257-.63-2.788-1.776-.233-.498-.498-.664-1.046-.68-.93-.017-1.643.016-2.174 1.062-.631 1.261-2.258 1.693-3.619 1.261a3.234 3.234 0 0 1-2.257-3.22 3.198 3.198 0 0 1 2.29-3.02 3.276 3.276 0 0 1 3.702 1.327c.216.315.216.863.597.93.648.1 1.328.033 1.992.033.299 0 .316-.266.399-.465.58-1.295 1.61-1.959 2.987-1.975 1.361-.017 2.39.647 2.955 1.892.215.465.48.598.946.548.166-.017.332.016.498 0 .464-.083 1.062.282 1.344-.448.282-.73-.382-.913-.68-1.245-.847-.946-1.81-1.793-2.673-2.706-.415-.465-.763-.614-1.41-.415-1.876.614-3.619-.431-4.15-2.357-.448-1.676.714-3.535 2.44-3.917a3.293 3.293 0 0 1 3.95 2.457c.017.05.017.083.033.133.117.564.117 1.145-.132 1.626-.283.531-.133.83.249 1.195a152.61 152.61 0 0 1 3.286 3.27c.299.299.498.349.913.2 1.51-0.565 2.97-.1 3.884 1.161a3.266 3.266 0 0 1-.067 3.801c-.896 1.195-2.357 1.643-3.834 1.079-.381-.15-0.58-.1-.846.182a163.619 163.619 0 0 1-3.403 3.386c-.299.3-.415.532-.232.98a3.198 3.198 0 0 1-1.278 3.917A3.298 3.298 0 0 1 9.646 23c-1.062-1.062-1.228-2.688-.415-4.033a3.196 3.196 0 0 1 3.835-1.294c.498.182.78.083 1.145-.283 1.012-1.045 2.058-2.058 3.087-3.103.266-.266.68-.449.432-1.03-.233-0.547-.631-.414-1.03-.431zM11.97 4.942c.913.016 1.643-.714 1.66-1.627v-.05a1.646 1.646 0 0 0-1.76-1.56 1.63 1.63 0 0 0-1.543 1.527 1.638 1.638 0 0 0 1.577 1.71zm.033 5.41a1.658 1.658 0 0 0-1.676 1.61v.084a1.73 1.73 0 0 0 1.643 1.66c.847.016 1.643-.78 1.677-1.627a1.648 1.648 0 0 0-1.577-1.71c-.017-.016-.05-.016-.067-.016zm7.088 1.694c.016.896.747 1.61 1.626 1.643a1.723 1.723 0 0 0 1.66-1.726 1.666 1.666 0 0 0-1.66-1.61 1.623 1.623 0 0 0-1.643 1.577c.017.05.017.083.017.116zM3.24 10.353a1.692 1.692 0 0 0-1.66 1.626c-.017.847.863 1.727 1.693 1.71a1.687 1.687 0 0 0 1.626-1.743 1.615 1.615 0 0 0-1.643-1.593Zm8.68 12c.98.033 1.71-.647 1.727-1.593a1.646 1.646 0 0 0-1.51-1.793 1.646 1.646 0 0 0-1.793 1.51v.233a1.609 1.609 0 0 0 1.543 1.66c0-.017.017-.017.033-.017z"})})}function oOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function aOn({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:JMn,width:e,height:e,style:{transform:e>=48?`translateX(${Math.round(e*.18)}px) scale(1.65)`:"scale(1.22)"},alt:"","aria-hidden":"true"})}function iOn({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:ZMn,width:e,height:e,alt:"","aria-hidden":"true"})}function g6({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-0.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-0.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})})}function Cp({kind:e,size:r=16}){switch(e){case"modal_job":return f.jsx(rOn,{size:r});case"hf_job":return f.jsx(tOn,{size:r});case"k8s_job":return f.jsx(nOn,{size:r});case"ssh_job":return f.jsx(eA,{size:r,strokeWidth:1.5});case"slurm_job":return f.jsx(iOn,{size:r});case"ray_job":return f.jsx(sOn,{size:r});case"openresearch_job":return f.jsx(oOn,{size:r});case"tinker_job":return f.jsx(aOn,{size:r});case"local_job":return f.jsx(x9n,{size:r,strokeWidth:1.5});default:return f.jsx(eA,{size:r})}}function v6({backend:e}){const r=tS(e),t=xCn(e);return r?f.jsxs("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted",children:[f.jsx(Cp,{kind:r}),f.jsx("span",{className:"backend-name",children:eOn(r)}),t&&f.jsx("span",{className:"backend-detail text-sm",children:t})]}):f.jsx("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted muted text-muted",children:"—"})}function cOn({expanded:e,experiments:r,runs:t,onOpenExperiment:n,rightOffset:s,activeView:o,projectId:a,onCompute:i,sessionId:c,busy:u,onChanges:d,onFiles:_,onTerminal:p,onArtifacts:m,onExperiments:k,onSideChat:w}){var A,N;const v=$An(r,t,c),b=T.useRef(null),x=ba(b),y=dt({...tI(a),enabled:e}),S=((A=y.data)==null?void 0:A.configuredDefaultBackend)??((N=y.data)==null?void 0:N.defaultBackend),z=S?Jf[S]():y.isPending?"…":y.isError?wi():o3(),E=[{id:"files",label:G4(),Icon:Ci,onClick:_},{id:"artifacts",label:mD(),Icon:hS,onClick:m},{id:"experiments",label:gD(),Icon:h0,onClick:k}];return f.jsx("div",{className:`workspace-tools absolute end-3.5 top-7 z-30 ${s===void 0?"win-titlebar:top-10":""}`,style:{insetInlineEnd:s},children:e?f.jsxs("nav",{"aria-label":D2(),className:"workspace-tools-card flex w-60 flex-col gap-0.5 rounded-xl border border-border bg-background px-1.5 py-2 shadow-elevated",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:D2()}),E.filter(M=>M.id!=="files").map(({id:M,label:$,Icon:D,onClick:I})=>f.jsx(_r,{className:"min-h-7 py-1","data-onboarding":M==="artifacts"?"nav-artifacts":void 0,onClick:I,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(D,{size:15}),$]})},M)),f.jsx(_r,{className:"py-1",onClick:i,children:f.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[f.jsx(fS,{size:15,className:"shrink-0"}),r3n()]}),f.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[S&&f.jsx(Cp,{kind:`${S}_job`,size:12}),f.jsx("span",{className:"wrap-anywhere",children:z})]})]})}),f.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:o5n()}),f.jsx(_r,{className:"min-h-7 py-1",onClick:_,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Ci,{size:15}),G4()]})}),f.jsx(_r,{className:"min-h-7 py-1",onClick:p,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Gc,{size:15}),bb()]})}),w&&f.jsx(_r,{className:"min-h-7 py-1",onClick:w,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(pg,{size:15}),i3()]})}),c&&f.jsx(lOn,{sessionId:c,busy:u,onChanges:d},c),v.length>0&&f.jsxs("div",{children:[f.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[f.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:f.jsx(Eh,{tone:"success",live:!0})}),f.jsx("span",{children:W4n()})]}),v.map(M=>f.jsx(_r,{className:"min-h-7 py-1",onClick:()=>n(M.experiment.id,M.run.id),children:f.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${M.experiment.title||M.experiment.slug} · ${a6(Ba(M.run))}`,children:M.experiment.title||M.experiment.slug})},M.run.id))]})]})]}):f.jsxs("nav",{"aria-label":D2(),className:"flex items-center justify-end gap-3",children:[E.map(({id:M,label:$,Icon:D,onClick:I})=>f.jsx(Rt,{active:o===M,className:"text-text [&.active]:text-text","data-tip":$,"data-tip-align":M==="experiments"?"end":void 0,"aria-label":$,"aria-pressed":o===M,onClick:I,children:f.jsx(D,{size:15})},M)),f.jsxs("div",{className:"relative",children:[f.jsx(Rt,{ref:b,active:o==="terminal"||x.open,className:"text-text [&.active]:text-text","data-tip":x.open?void 0:xN(),"data-tip-align":"end","aria-label":xN(),"aria-expanded":x.open,"aria-haspopup":"menu",onClick:()=>x.setOpen(M=>!M),children:f.jsx(wp,{size:15})}),x.open&&f.jsxs("div",{ref:x.ref,role:"menu",className:"absolute end-0 top-[calc(100%_+_4px)] z-50 flex min-w-40 flex-col rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsx(_r,{role:"menuitem",onClick:()=>{x.setOpen(!1),p()},children:f.jsxs("span",{className:"flex items-center gap-2.5",children:[f.jsx(Gc,{size:15}),bb()]})}),w&&f.jsx(_r,{role:"menuitem",onClick:()=>{x.setOpen(!1),w()},children:f.jsxs("span",{className:"flex items-center gap-2.5",children:[f.jsx(pg,{size:15}),i3()]})})]})]})]})})}function lOn({sessionId:e,busy:r,onChanges:t}){var c,u;const n=dt({...Tb(e),refetchInterval:r?5e3:!1}),s=T.useRef(r),{refetch:o}=n;T.useEffect(()=>{s.current&&!r&&o(),s.current=r},[r,o]);const a=n.data,i=T.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const d=LB(a.diff.diff,!1);return d.failed?null:d.files.map(Jy).reduce((_,p)=>({additions:_.additions+p.additions,deletions:_.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?f.jsxs(_r,{className:"min-h-7 py-1",onClick:t,title:a.branch??Qj(),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[f.jsx(p0,{size:15,className:"shrink-0"}),f.jsx("span",{children:zD()})]}),i?f.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[f.jsxs("span",{className:"text-accent-green",children:["+",fr(i.additions)]}),f.jsxs("span",{className:"text-accent-red",children:["−",fr(i.deletions)]})]}):f.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?OD():MD({count:fr(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function uOn({projectId:e,sessionId:r,active:t}){const n=T.useRef(null),s=T.useRef(null),[o,a]=T.useState(null),[i,c]=T.useState(0);return T.useEffect(()=>{const u=n.current;if(!u)return;const d=Ay(u,!1,!0,"app"),{terminal:_,dispose:p}=d;s.current=d,a(null);const m=location.protocol==="https:"?"wss:":"ws:",k=new URL(`/api/projects/${encodeURIComponent(e)}/terminal`,`${m}//${location.host}`);r&&k.searchParams.set("sessionId",r);const w=new WebSocket(k);w.binaryType="arraybuffer";let v=!1;const b=S=>{v||(v=!0,_.options.disableStdin=!0,_.blur(),_.writeln(`\r -${S}`),a(S))},x=_.onData(S=>{w.readyState===WebSocket.OPEN&&w.send(new TextEncoder().encode(S))}),y=_.onResize(({cols:S,rows:z})=>{w.readyState===WebSocket.OPEN&&w.send(JSON.stringify({type:"resize",cols:S,rows:z}))});return w.onopen=()=>{w.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))},w.onmessage=S=>{if(S.data instanceof ArrayBuffer){_.write(new Uint8Array(S.data));return}if(typeof S.data!="string")return;let z;try{z=JSON.parse(S.data)}catch{return}vd(z)&&(z.type==="exit"?b(P3n({code:String(z.code)})):z.type==="error"&&typeof z.error=="string"&&b(z.error))},w.onclose=()=>b(wN()),w.onerror=()=>b(wN()),()=>{w.onopen=null,w.onmessage=null,w.onerror=null,w.onclose=null,x.dispose(),y.dispose(),w.close(),s.current=null,p()}},[e,r,i]),T.useEffect(()=>{if(!t||o!==null)return;const u=requestAnimationFrame(()=>{var d,_;(d=s.current)==null||d.fit(),(_=s.current)==null||_.terminal.focus()});return()=>cancelAnimationFrame(u)},[t,o,i]),f.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-terminal-app p-2",role:"group","aria-label":bb(),children:[f.jsx("div",{ref:n,className:"min-h-0 flex-1 overflow-hidden"}),f.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:o??""}),o!==null&&f.jsx("div",{className:"flex shrink-0 justify-end pt-2",children:f.jsx(Oe,{autoFocus:!0,onClick:()=>c(u=>u+1),children:Q3n()})})]})}const _On=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fOn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dOn={};function aT(e,r){return(dOn.jsx?fOn:_On).test(e)}const hOn=/[ \t\n\f\r]/g;function pOn(e){return typeof e=="object"?e.type==="text"?iT(e.value):!1:iT(e)}function iT(e){return e.replace(hOn,"")===""}var sh={},ek,cT;function mOn(){if(cT)return ek;cT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,t=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,i=/^\s+|\s+$/g,c=` -`,u="/",d="*",_="",p="comment",m="declaration";function k(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var x=1,y=1;function S(H){var Q=H.match(r);Q&&(x+=Q.length);var K=H.lastIndexOf(c);y=~K?H.length-K:y+H.length}function z(){var H={line:x,column:y};return function(Q){return Q.position=new E(H),M(),Q}}function E(H){this.start=H,this.end={line:x,column:y},this.source=b.source}E.prototype.content=v;function A(H){var Q=new Error(b.source+":"+x+":"+y+": "+H);if(Q.reason=H,Q.filename=b.source,Q.line=x,Q.column=y,Q.source=v,!b.silent)throw Q}function N(H){var Q=H.exec(v);if(Q){var K=Q[0];return S(K),v=v.slice(K.length),Q}}function M(){N(t)}function $(H){var Q;for(H=H||[];Q=D();)Q!==!1&&H.push(Q);return H}function D(){var H=z();if(!(u!=v.charAt(0)||d!=v.charAt(1))){for(var Q=2;_!=v.charAt(Q)&&(d!=v.charAt(Q)||u!=v.charAt(Q+1));)++Q;if(Q+=2,_===v.charAt(Q-1))return A("End of comment missing");var K=v.slice(2,Q-2);return y+=2,S(K),v=v.slice(Q),y+=2,H({type:p,comment:K})}}function I(){var H=z(),Q=N(n);if(Q){if(D(),!N(s))return A("property missing ':'");var K=N(o),J=H({type:m,property:w(Q[0].replace(e,_)),value:K?w(K[0].replace(e,_)):_});return N(a),J}}function G(){var H=[];$(H);for(var Q;Q=I();)Q!==!1&&(H.push(Q),$(H));return H}return M(),G()}function w(v){return v?v.replace(i,_):_}return ek=k,ek}var lT;function gOn(){if(lT)return sh;lT=1;var e=sh&&sh.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sh,"__esModule",{value:!0}),sh.default=t;const r=e(mOn());function t(n,s){let o=null;if(!n||typeof n!="string")return o;const a=(0,r.default)(n),i=typeof s=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:d}=c;i?s(u,d,c):d&&(o=o||{},o[u]=d)}),o}return sh}var jm={},uT;function vOn(){if(uT)return jm;uT=1,Object.defineProperty(jm,"__esModule",{value:!0}),jm.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,t=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(u){return!u||t.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},i=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}),o(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(s,i):u=u.replace(n,i),u.replace(r,a))};return jm.camelCase=c,jm}var Sm,_T;function bOn(){if(_T)return Sm;_T=1;var e=Sm&&Sm.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=e(gOn()),t=vOn();function n(s,o){var a={};return!s||typeof s!="string"||(0,r.default)(s,function(i,c){i&&c&&(a[(0,t.camelCase)(i,o)]=c)}),a}return n.default=n,Sm=n,Sm}var yOn=bOn();const xOn=n0(yOn),FB=HB("end"),b6=HB("start");function HB(e){return r;function r(t){const n=t&&t.position&&t.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function wOn(e){const r=b6(e),t=FB(e);if(r&&t)return{start:r,end:t}}function Xm(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fT(e.position):"start"in e||"end"in e?fT(e):"line"in e||"column"in e?t5(e):""}function t5(e){return dT(e&&e.line)+":"+dT(e&&e.column)}function fT(e){return t5(e&&e.start)+"-"+t5(e&&e.end)}function dT(e){return e&&typeof e=="number"?e:1}class No extends Error{constructor(r,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let s="",o={},a=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof r=="string"?s=r:!o.cause&&r&&(a=!0,s=r.message,o.cause=r),!o.ruleId&&!o.source&&typeof n=="string"){const c=n.indexOf(":");c===-1?o.ruleId=n:(o.source=n.slice(0,c),o.ruleId=n.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const i=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=i?i.line:void 0,this.name=Xm(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}No.prototype.file="";No.prototype.name="";No.prototype.reason="";No.prototype.message="";No.prototype.stack="";No.prototype.column=void 0;No.prototype.line=void 0;No.prototype.ancestors=void 0;No.prototype.cause=void 0;No.prototype.fatal=void 0;No.prototype.place=void 0;No.prototype.ruleId=void 0;No.prototype.source=void 0;const y6={}.hasOwnProperty,kOn=new Map,jOn=/[A-Z]/g,SOn=new Set(["table","tbody","thead","tfoot","tr"]),COn=new Set(["td","th"]),qB="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function UB(e,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=r.filePath||void 0;let n;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=OOn(t,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=MOn(t,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:n,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Iy:TP,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},o=GB(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function GB(e,r,t){if(r.type==="element")return zOn(e,r,t);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return EOn(e,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return AOn(e,r,t);if(r.type==="mdxjsEsm")return NOn(e,r);if(r.type==="root")return TOn(e,r,t);if(r.type==="text")return ROn(e,r)}function zOn(e,r,t){const n=e.schema;let s=n;r.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=Iy,e.schema=s),e.ancestors.push(r);const o=KB(e,r.tagName,!1),a=$On(e,r);let i=w6(e,r);return SOn.has(r.tagName)&&(i=i.filter(function(c){return typeof c=="string"?!pOn(c):!0})),WB(e,a,o,r),x6(a,i),e.ancestors.pop(),e.schema=n,e.create(r,o,a,t)}function EOn(e,r){if(r.data&&r.data.estree&&e.evaluater){const n=r.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Sg(e,r.position)}function NOn(e,r){if(r.data&&r.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(r.data.estree);Sg(e,r.position)}function AOn(e,r,t){const n=e.schema;let s=n;r.name==="svg"&&n.space==="html"&&(s=Iy,e.schema=s),e.ancestors.push(r);const o=r.name===null?e.Fragment:KB(e,r.name,!0),a=DOn(e,r),i=w6(e,r);return WB(e,a,o,r),x6(a,i),e.ancestors.pop(),e.schema=n,e.create(r,o,a,t)}function TOn(e,r,t){const n={};return x6(n,w6(e,r)),e.create(r,e.Fragment,n,t)}function ROn(e,r){return r.value}function WB(e,r,t,n){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(r.node=n)}function x6(e,r){if(r.length>0){const t=r.length>1?r:r[0];t&&(e.children=t)}}function MOn(e,r,t){return n;function n(s,o,a,i){const u=Array.isArray(a.children)?t:r;return i?u(o,a,i):u(o,a)}}function OOn(e,r){return t;function t(n,s,o,a){const i=Array.isArray(o.children),c=b6(n);return r(s,o,a,i,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function $On(e,r){const t={};let n,s;for(s in r.properties)if(s!=="children"&&y6.call(r.properties,s)){const o=LOn(e,s,r.properties[s]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&a==="align"&&typeof i=="string"&&COn.has(r.tagName)?n=i:t[a]=i}}if(n){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return t}function DOn(e,r){const t={};for(const n of r.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const o=n.data.estree.body[0];o.type;const a=o.expression;a.type;const i=a.properties[0];i.type,Object.assign(t,e.evaluater.evaluateExpression(i.argument))}else Sg(e,r.position);else{const s=n.name;let o;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const i=n.value.data.estree.body[0];i.type,o=e.evaluater.evaluateExpression(i.expression)}else Sg(e,r.position);else o=n.value===null?!0:n.value;t[s]=o}return t}function w6(e,r){const t=[];let n=-1;const s=e.passKeys?new Map:kOn;for(;++ns?0:s+r:r=r>s?s:r,t=t>0?t:0,n.length<1e4)a=Array.from(n),a.unshift(r,t),e.splice(...a);else for(t&&e.splice(r,t);o0?(qa(e,e.length,0,r),e):r}const pT={}.hasOwnProperty;function QB(e){const r={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Ji(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wo=R_(/[A-Za-z]/),Co=R_(/[\dA-Za-z]/),WOn=R_(/[#-'*+\--9=?A-Z^-~]/);function $b(e){return e!==null&&(e<32||e===127)}const r5=R_(/\d/),KOn=R_(/[\dA-Fa-f]/),VOn=R_(/[!-/:-@[-`{-~]/);function Pt(e){return e!==null&&e<-2}function vn(e){return e!==null&&(e<0||e===32)}function Rr(e){return e===-2||e===-1||e===32}const ex=R_(new RegExp("\\p{P}|\\p{S}","u")),ed=R_(/\s/);function R_(e){return r;function r(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function zp(e){const r=[];let t=-1,n=0,s=0;for(;++t55295&&o<57344){const i=e.charCodeAt(t+1);o<56320&&i>56319&&i<57344?(a=String.fromCharCode(o,i),s=1):a="�"}else a=String.fromCharCode(o);a&&(r.push(e.slice(n,t),encodeURIComponent(a)),n=t+s+1,a=""),s&&(t+=s,s=0)}return r.join("")+e.slice(n)}function Nr(e,r,t,n){const s=n?n-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(c){return Rr(c)?(e.enter(t),i(c)):r(c)}function i(c){return Rr(c)&&o++a))return;const A=r.events.length;let N=A,M,$;for(;N--;)if(r.events[N][0]==="exit"&&r.events[N][1].type==="chunkFlow"){if(M){$=r.events[N][1].end;break}M=!0}for(b(n),E=A;Ey;){const z=t[S];r.containerState=z[1],z[0].exit.call(r,e)}t.length=y}function x(){s.write([null]),o=void 0,s=void 0,r.containerState._closeFlow=void 0}}function JOn(e,r,t){return Nr(e,e.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ap(e){if(e===null||vn(e)||ed(e))return 1;if(ex(e))return 2}function tx(e,r,t){const n=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const _={...e[n][1].end},p={...e[t][1].start};gT(_,-c),gT(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:_,end:{...e[n][1].end}},i={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},o={type:c>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...a.start},end:{...i.end}},e[n][1].end={...a.start},e[t][1].start={...i.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=xi(u,[["enter",e[n][1],r],["exit",e[n][1],r]])),u=xi(u,[["enter",s,r],["enter",a,r],["exit",a,r],["enter",o,r]]),u=xi(u,tx(r.parser.constructs.insideSpan.null,e.slice(n+1,t),r)),u=xi(u,[["exit",o,r],["enter",i,r],["exit",i,r],["exit",s,r]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,u=xi(u,[["enter",e[t][1],r],["exit",e[t][1],r]])):d=0,qa(e,n-1,t-n+3,u),t=n+u.length-d-2;break}}for(t=-1;++t0&&Rr(E)?Nr(e,x,"linePrefix",o+1)(E):x(E)}function x(E){return E===null||Pt(E)?e.check(vT,w,S)(E):(e.enter("codeFlowValue"),y(E))}function y(E){return E===null||Pt(E)?(e.exit("codeFlowValue"),x(E)):(e.consume(E),y)}function S(E){return e.exit("codeFenced"),r(E)}function z(E,A,N){let M=0;return $;function $(Q){return E.enter("lineEnding"),E.consume(Q),E.exit("lineEnding"),D}function D(Q){return E.enter("codeFencedFence"),Rr(Q)?Nr(E,I,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):I(Q)}function I(Q){return Q===i?(E.enter("codeFencedFenceSequence"),G(Q)):N(Q)}function G(Q){return Q===i?(M++,E.consume(Q),G):M>=a?(E.exit("codeFencedFenceSequence"),Rr(Q)?Nr(E,H,"whitespace")(Q):H(Q)):N(Q)}function H(Q){return Q===null||Pt(Q)?(E.exit("codeFencedFence"),A(Q)):N(Q)}}}function _$n(e,r,t){const n=this;return s;function s(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return n.parser.lazy[n.now().line]?t(a):r(a)}}const rk={name:"codeIndented",tokenize:d$n},f$n={partial:!0,tokenize:h$n};function d$n(e,r,t){const n=this;return s;function s(u){return e.enter("codeIndented"),Nr(e,o,"linePrefix",5)(u)}function o(u){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Pt(u)?e.attempt(f$n,a,c)(u):(e.enter("codeFlowValue"),i(u))}function i(u){return u===null||Pt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),i)}function c(u){return e.exit("codeIndented"),r(u)}}function h$n(e,r,t){const n=this;return s;function s(a){return n.parser.lazy[n.now().line]?t(a):Pt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Nr(e,o,"linePrefix",5)(a)}function o(a){const i=n.events[n.events.length-1];return i&&i[1].type==="linePrefix"&&i[2].sliceSerialize(i[1],!0).length>=4?r(a):Pt(a)?s(a):t(a)}}const p$n={name:"codeText",previous:g$n,resolve:m$n,tokenize:v$n};function m$n(e){let r=e.length-4,t=3,n,s;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(n=t;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return rthis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(r,t,n){const s=t||0;this.setCursor(Math.trunc(r));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return n&&Cm(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Cm(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Cm(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r=4?r(a):e.interrupt(n.parser.constructs.flow,t,r)(a)}}function tF(e,r,t,n,s,o,a,i,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return _;function _(b){return b===60?(e.enter(n),e.enter(s),e.enter(o),e.consume(b),e.exit(o),p):b===null||b===32||b===41||$b(b)?t(b):(e.enter(n),e.enter(a),e.enter(i),e.enter("chunkString",{contentType:"string"}),w(b))}function p(b){return b===62?(e.enter(o),e.consume(b),e.exit(o),e.exit(s),e.exit(n),r):(e.enter(i),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(i),p(b)):b===null||b===60||Pt(b)?t(b):(e.consume(b),b===92?k:m)}function k(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function w(b){return!d&&(b===null||b===41||vn(b))?(e.exit("chunkString"),e.exit(i),e.exit(a),e.exit(n),r(b)):d999||m===null||m===91||m===93&&!c||m===94&&!i&&"_hiddenFootnoteSupport"in a.parser.constructs?t(m):m===93?(e.exit(o),e.enter(s),e.consume(m),e.exit(s),e.exit(n),r):Pt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===null||m===91||m===93||Pt(m)||i++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!Rr(m)),m===92?p:_)}function p(m){return m===91||m===92||m===93?(e.consume(m),i++,_):_(m)}}function nF(e,r,t,n,s,o){let a;return i;function i(p){return p===34||p===39||p===40?(e.enter(n),e.enter(s),e.consume(p),e.exit(s),a=p===40?41:p,c):t(p)}function c(p){return p===a?(e.enter(s),e.consume(p),e.exit(s),e.exit(n),r):(e.enter(o),u(p))}function u(p){return p===a?(e.exit(o),c(a)):p===null?t(p):Pt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Nr(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===a||p===null||Pt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?_:d)}function _(p){return p===a||p===92?(e.consume(p),d):d(p)}}function Ym(e,r){let t;return n;function n(s){return Pt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,n):Rr(s)?Nr(e,n,t?"linePrefix":"lineSuffix")(s):r(s)}}const C$n={name:"definition",tokenize:E$n},z$n={partial:!0,tokenize:N$n};function E$n(e,r,t){const n=this;let s;return o;function o(m){return e.enter("definition"),a(m)}function a(m){return rF.call(n,e,i,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function i(m){return s=Ji(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):t(m)}function c(m){return vn(m)?Ym(e,u)(m):u(m)}function u(m){return tF(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(z$n,_,_)(m)}function _(m){return Rr(m)?Nr(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Pt(m)?(e.exit("definition"),n.parser.defined.push(s),r(m)):t(m)}}function N$n(e,r,t){return n;function n(i){return vn(i)?Ym(e,s)(i):t(i)}function s(i){return nF(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(i)}function o(i){return Rr(i)?Nr(e,a,"whitespace")(i):a(i)}function a(i){return i===null||Pt(i)?r(i):t(i)}}const A$n={name:"hardBreakEscape",tokenize:T$n};function T$n(e,r,t){return n;function n(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Pt(o)?(e.exit("hardBreakEscape"),r(o)):t(o)}}const R$n={name:"headingAtx",resolve:M$n,tokenize:O$n};function M$n(e,r){let t=e.length-2,n=3,s,o;return e[n][1].type==="whitespace"&&(n+=2),t-2>n&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&e[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(s={type:"atxHeadingText",start:e[n][1].start,end:e[t][1].end},o={type:"chunkText",start:e[n][1].start,end:e[t][1].end,contentType:"text"},qa(e,n,t-n+1,[["enter",s,r],["enter",o,r],["exit",o,r],["exit",s,r]])),e}function O$n(e,r,t){let n=0;return s;function s(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&n++<6?(e.consume(d),a):d===null||vn(d)?(e.exit("atxHeadingSequence"),i(d)):t(d)}function i(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||Pt(d)?(e.exit("atxHeading"),r(d)):Rr(d)?Nr(e,i,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),i(d))}function u(d){return d===null||d===35||vn(d)?(e.exit("atxHeadingText"),i(d)):(e.consume(d),u)}}const $$n=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],yT=["pre","script","style","textarea"],D$n={concrete:!0,name:"htmlFlow",resolveTo:P$n,tokenize:B$n},L$n={partial:!0,tokenize:H$n},I$n={partial:!0,tokenize:F$n};function P$n(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function B$n(e,r,t){const n=this;let s,o,a,i,c;return u;function u(U){return d(U)}function d(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),_}function _(U){return U===33?(e.consume(U),p):U===47?(e.consume(U),o=!0,w):U===63?(e.consume(U),s=3,n.interrupt?r:L):Wo(U)?(e.consume(U),a=String.fromCharCode(U),v):t(U)}function p(U){return U===45?(e.consume(U),s=2,m):U===91?(e.consume(U),s=5,i=0,k):Wo(U)?(e.consume(U),s=4,n.interrupt?r:L):t(U)}function m(U){return U===45?(e.consume(U),n.interrupt?r:L):t(U)}function k(U){const oe="CDATA[";return U===oe.charCodeAt(i++)?(e.consume(U),i===oe.length?n.interrupt?r:I:k):t(U)}function w(U){return Wo(U)?(e.consume(U),a=String.fromCharCode(U),v):t(U)}function v(U){if(U===null||U===47||U===62||vn(U)){const oe=U===47,ie=a.toLowerCase();return!oe&&!o&&yT.includes(ie)?(s=1,n.interrupt?r(U):I(U)):$$n.includes(a.toLowerCase())?(s=6,oe?(e.consume(U),b):n.interrupt?r(U):I(U)):(s=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(U):o?x(U):y(U))}return U===45||Co(U)?(e.consume(U),a+=String.fromCharCode(U),v):t(U)}function b(U){return U===62?(e.consume(U),n.interrupt?r:I):t(U)}function x(U){return Rr(U)?(e.consume(U),x):$(U)}function y(U){return U===47?(e.consume(U),$):U===58||U===95||Wo(U)?(e.consume(U),S):Rr(U)?(e.consume(U),y):$(U)}function S(U){return U===45||U===46||U===58||U===95||Co(U)?(e.consume(U),S):z(U)}function z(U){return U===61?(e.consume(U),E):Rr(U)?(e.consume(U),z):y(U)}function E(U){return U===null||U===60||U===61||U===62||U===96?t(U):U===34||U===39?(e.consume(U),c=U,A):Rr(U)?(e.consume(U),E):N(U)}function A(U){return U===c?(e.consume(U),c=null,M):U===null||Pt(U)?t(U):(e.consume(U),A)}function N(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||vn(U)?z(U):(e.consume(U),N)}function M(U){return U===47||U===62||Rr(U)?y(U):t(U)}function $(U){return U===62?(e.consume(U),D):t(U)}function D(U){return U===null||Pt(U)?I(U):Rr(U)?(e.consume(U),D):t(U)}function I(U){return U===45&&s===2?(e.consume(U),K):U===60&&s===1?(e.consume(U),J):U===62&&s===4?(e.consume(U),F):U===63&&s===3?(e.consume(U),L):U===93&&s===5?(e.consume(U),P):Pt(U)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(L$n,q,G)(U)):U===null||Pt(U)?(e.exit("htmlFlowData"),G(U)):(e.consume(U),I)}function G(U){return e.check(I$n,H,q)(U)}function H(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),Q}function Q(U){return U===null||Pt(U)?G(U):(e.enter("htmlFlowData"),I(U))}function K(U){return U===45?(e.consume(U),L):I(U)}function J(U){return U===47?(e.consume(U),a="",ee):I(U)}function ee(U){if(U===62){const oe=a.toLowerCase();return yT.includes(oe)?(e.consume(U),F):I(U)}return Wo(U)&&a.length<8?(e.consume(U),a+=String.fromCharCode(U),ee):I(U)}function P(U){return U===93?(e.consume(U),L):I(U)}function L(U){return U===62?(e.consume(U),F):U===45&&s===2?(e.consume(U),L):I(U)}function F(U){return U===null||Pt(U)?(e.exit("htmlFlowData"),q(U)):(e.consume(U),F)}function q(U){return e.exit("htmlFlow"),r(U)}}function F$n(e,r,t){const n=this;return s;function s(a){return Pt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):t(a)}function o(a){return n.parser.lazy[n.now().line]?t(a):r(a)}}function H$n(e,r,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(x0,r,t)}}const q$n={name:"htmlText",tokenize:U$n};function U$n(e,r,t){const n=this;let s,o,a;return i;function i(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),z):L===63?(e.consume(L),y):Wo(L)?(e.consume(L),N):t(L)}function u(L){return L===45?(e.consume(L),d):L===91?(e.consume(L),o=0,k):Wo(L)?(e.consume(L),x):t(L)}function d(L){return L===45?(e.consume(L),m):t(L)}function _(L){return L===null?t(L):L===45?(e.consume(L),p):Pt(L)?(a=_,J(L)):(e.consume(L),_)}function p(L){return L===45?(e.consume(L),m):_(L)}function m(L){return L===62?K(L):L===45?p(L):_(L)}function k(L){const F="CDATA[";return L===F.charCodeAt(o++)?(e.consume(L),o===F.length?w:k):t(L)}function w(L){return L===null?t(L):L===93?(e.consume(L),v):Pt(L)?(a=w,J(L)):(e.consume(L),w)}function v(L){return L===93?(e.consume(L),b):w(L)}function b(L){return L===62?K(L):L===93?(e.consume(L),b):w(L)}function x(L){return L===null||L===62?K(L):Pt(L)?(a=x,J(L)):(e.consume(L),x)}function y(L){return L===null?t(L):L===63?(e.consume(L),S):Pt(L)?(a=y,J(L)):(e.consume(L),y)}function S(L){return L===62?K(L):y(L)}function z(L){return Wo(L)?(e.consume(L),E):t(L)}function E(L){return L===45||Co(L)?(e.consume(L),E):A(L)}function A(L){return Pt(L)?(a=A,J(L)):Rr(L)?(e.consume(L),A):K(L)}function N(L){return L===45||Co(L)?(e.consume(L),N):L===47||L===62||vn(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),K):L===58||L===95||Wo(L)?(e.consume(L),$):Pt(L)?(a=M,J(L)):Rr(L)?(e.consume(L),M):K(L)}function $(L){return L===45||L===46||L===58||L===95||Co(L)?(e.consume(L),$):D(L)}function D(L){return L===61?(e.consume(L),I):Pt(L)?(a=D,J(L)):Rr(L)?(e.consume(L),D):M(L)}function I(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,G):Pt(L)?(a=I,J(L)):Rr(L)?(e.consume(L),I):(e.consume(L),H)}function G(L){return L===s?(e.consume(L),s=void 0,Q):L===null?t(L):Pt(L)?(a=G,J(L)):(e.consume(L),G)}function H(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||vn(L)?M(L):(e.consume(L),H)}function Q(L){return L===47||L===62||vn(L)?M(L):t(L)}function K(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),r):t(L)}function J(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),ee}function ee(L){return Rr(L)?Nr(e,P,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):P(L)}function P(L){return e.enter("htmlTextData"),a(L)}}const j6={name:"labelEnd",resolveAll:V$n,resolveTo:Q$n,tokenize:X$n},G$n={tokenize:Y$n},W$n={tokenize:Z$n},K$n={tokenize:J$n};function V$n(e){let r=-1;const t=[];for(;++r=3&&(u===null||Pt(u))?(e.exit("thematicBreak"),r(u)):t(u)}function c(u){return u===s?(e.consume(u),n++,c):(e.exit("thematicBreakSequence"),Rr(u)?Nr(e,i,"whitespace")(u):i(u))}}const fa={continuation:{tokenize:lDn},exit:_Dn,name:"list",tokenize:cDn},aDn={partial:!0,tokenize:fDn},iDn={partial:!0,tokenize:uDn};function cDn(e,r,t){const n=this,s=n.events[n.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return i;function i(m){const k=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:r5(m)){if(n.containerState.type||(n.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(U1,t,u)(m):u(m);if(!n.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return t(m)}function c(m){return r5(m)&&++a<10?(e.consume(m),c):(!n.interrupt||a<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):t(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,e.check(x0,n.interrupt?t:d,e.attempt(aDn,p,_))}function d(m){return n.containerState.initialBlankLine=!0,o++,p(m)}function _(m){return Rr(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):t(m)}function p(m){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(m)}}function lDn(e,r,t){const n=this;return n.containerState._closeFlow=void 0,e.check(x0,s,o);function s(i){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Nr(e,r,"listItemIndent",n.containerState.size+1)(i)}function o(i){return n.containerState.furtherBlankLines||!Rr(i)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(i)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(iDn,r,a)(i))}function a(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,Nr(e,e.attempt(fa,r,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}function uDn(e,r,t){const n=this;return Nr(e,s,"listItemIndent",n.containerState.size+1);function s(o){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?r(o):t(o)}}function _Dn(e){e.exit(this.containerState.type)}function fDn(e,r,t){const n=this;return Nr(e,s,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const a=n.events[n.events.length-1];return!Rr(o)&&a&&a[1].type==="listItemPrefixWhitespace"?r(o):t(o)}}const xT={name:"setextUnderline",resolveTo:dDn,tokenize:hDn};function dDn(e,r){let t=e.length,n,s,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){n=t;break}e[t][1].type==="paragraph"&&(s=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",a,r]),e.splice(o+1,0,["exit",e[n][1],r]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,r]),e}function hDn(e,r,t){const n=this;let s;return o;function o(u){let d=n.events.length,_;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){_=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||_)?(e.enter("setextHeadingLine"),s=u,a(u)):t(u)}function a(u){return e.enter("setextHeadingLineSequence"),i(u)}function i(u){return u===s?(e.consume(u),i):(e.exit("setextHeadingLineSequence"),Rr(u)?Nr(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Pt(u)?(e.exit("setextHeadingLine"),r(u)):t(u)}}const pDn={tokenize:mDn};function mDn(e){const r=this,t=e.attempt(x0,n,e.attempt(this.parser.constructs.flowInitial,s,Nr(e,e.attempt(this.parser.constructs.flow,s,e.attempt(x$n,s)),"linePrefix")));return t;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r.currentConstruct=void 0,t}}const gDn={resolveAll:oF()},vDn=sF("string"),bDn=sF("text");function sF(e){return{resolveAll:oF(e==="text"?yDn:void 0),tokenize:r};function r(t){const n=this,s=this.parser.constructs[e],o=t.attempt(s,a,i);return a;function a(d){return u(d)?o(d):i(d)}function i(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),c}function c(d){return u(d)?(t.exit("data"),o(d)):(t.consume(d),c)}function u(d){if(d===null)return!0;const _=s[d];let p=-1;if(_)for(;++p<_.length;){const m=_[p];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}function oF(e){return r;function r(t,n){let s=-1,o;for(;++s<=t.length;)o===void 0?t[s]&&t[s][1].type==="data"&&(o=s,s++):(!t[s]||t[s][1].type!=="data")&&(s!==o+2&&(t[o][1].end=t[s-1][1].end,t.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(t,n):t}}function yDn(e,r){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const n=e[t-1][1],s=r.sliceStream(n);let o=s.length,a=-1,i=0,c;for(;o--;){const u=s[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)i++,a--;if(a)break;a=-1}else if(u===-2)c=!0,i++;else if(u!==-1){o++;break}}if(r._contentTypeTextTrailing&&t===e.length&&(i=0),i){const u={type:t===e.length||c||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:n.start._bufferIndex+a,_index:n.start._index+o,line:n.end.line,column:n.end.column-i,offset:n.end.offset-i},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(t,0,["enter",u,r],["exit",u,r]),t+=2)}t++}return e}const xDn={42:fa,43:fa,45:fa,48:fa,49:fa,50:fa,51:fa,52:fa,53:fa,54:fa,55:fa,56:fa,57:fa,62:YB},wDn={91:C$n},kDn={[-2]:rk,[-1]:rk,32:rk},jDn={35:R$n,42:U1,45:[xT,U1],60:D$n,61:xT,95:U1,96:bT,126:bT},SDn={38:JB,92:ZB},CDn={[-5]:nk,[-4]:nk,[-3]:nk,33:eDn,38:JB,42:n5,60:[r$n,q$n],91:rDn,92:[A$n,ZB],93:j6,95:n5,96:p$n},zDn={null:[n5,gDn]},EDn={null:[42,95]},NDn={null:[]},ADn=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:EDn,contentInitial:wDn,disable:NDn,document:xDn,flow:jDn,flowInitial:kDn,insideSpan:zDn,string:SDn,text:CDn},Symbol.toStringTag,{value:"Module"}));function TDn(e,r,t){let n={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const s={},o=[];let a=[],i=[];const c={attempt:A(z),check:A(E),consume:x,enter:y,exit:S,interrupt:A(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:w,events:[],now:k,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:_};let d=r.tokenize.call(u,c);return r.resolveAll&&o.push(r),u;function _(D){return a=xi(a,D),v(),a[a.length-1]!==null?[]:(N(r,0),u.events=tx(o,u.events,u),u.events)}function p(D,I){return MDn(m(D),I)}function m(D){return RDn(a,D)}function k(){const{_bufferIndex:D,_index:I,line:G,column:H,offset:Q}=n;return{_bufferIndex:D,_index:I,line:G,column:H,offset:Q}}function w(D){s[D.line]=D.column,$()}function v(){let D;for(;n._index-1){const i=a[0];typeof i=="string"?a[0]=i.slice(n):a.shift()}o>0&&a.push(e[s].slice(0,o))}return a}function MDn(e,r){let t=-1;const n=[];let s;for(;++t1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(r===void 0?"block":r)==="block"?BMn:FMn,n=p6(e.map((function(i){return i.changes})),$B).map(t).reduce((function(i,c){var u=Pr(i,2),d=u[0],_=u[1],p=Pr(c,2),m=p[0],k=p[1];return[d.concat(m),_.concat(k)]}),[[],[]]),s=Pr(n,2),o=s[0],a=s[1];return $Mn(tT(o),tT(a))}var qMn=["enhancers"],oT=function(e){var r,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.enhancers,s=n===void 0?[]:n,o=Pr(yMn(e,w_(t,qMn)),2),a=o[0],i=o[1],c=[ZA(a),ZA(i)],u=(r=[c[0],c[1]],s.reduce((function(x,v){return v(x)}),r)),d=Pr(u,2),_=d[0],p=d[1],m=[_.map(JA),p.map(JA)],k=m[1];return{old:m[0].map((function(x){var v;return(v=x.children)!==null&&v!==void 0?v:[]})),new:k.map((function(x){var v;return(v=x.children)!==null&&v!==void 0?v:[]}))}};const J3=["openresearch-diff flex flex-col gap-4","[&_.openresearch-diff-file]:[--diff-background-color:var(--base)]","[&_.openresearch-diff-file]:[--diff-text-color:var(--text)]","[&_.openresearch-diff-file]:[--diff-font-family:var(--mono)]","[&_.openresearch-diff-file]:[--diff-selection-text-color:var(--selection-text)]","[&_.openresearch-diff-file]:[--diff-selection-background-color:var(--color-diff-selection)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)]","[&_.openresearch-diff-file]:[--diff-code-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-code-selected-background-color:var(--diff-selection-background-color)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-text-color:var(--accent-green)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-text-color:var(--accent-red)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)]","[&_.openresearch-diff-file]:[--diff-code-insert-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-background-color:var(--color-diff-insert-code)]","[&_.openresearch-diff-file]:[--diff-code-delete-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-background-color:var(--color-diff-delete-code)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)]","[&_.openresearch-diff-file]:[--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)]","[&_.openresearch-diff-file]:w-full","[&_.openresearch-diff-file.diff-unified]:table-fixed","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:collapse","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:w-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:p-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:ps-[2ch] [&_.openresearch-diff-file_.diff-code]:pe-4","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),UMn=2e3,GMn={highlight(e,r){return Ft.highlight(e,r).children}};function WMn(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function Jy(e){let r=0,t=0;for(const n of e.hunks)for(const s of n.changes)s.type==="insert"?r++:s.type==="delete"&&t++;return{additions:r,deletions:t}}function KMn(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function e5(e){switch(e.type){case"delete":return e.oldPath;case"add":case"modify":return e.newPath;case"rename":case"copy":return`${e.oldPath} → ${e.newPath}`}}function VMn(e){const r=[HMn(e.hunks,{type:"line"})],t=jS(KMn(e));return t&&Ft.registered(t)?oT(e.hunks,{enhancers:r,highlight:!0,language:t,refractor:GMn}):oT(e.hunks,{enhancers:r,highlight:!1})}function LB(e,r){if(!e.trim())return{files:[],failed:!1};try{return{files:G3(e,{nearbySequences:"zip"}),failed:!1}}catch{if(r){const t=Array.from(e.matchAll(/^diff --git /gm),s=>s.index),n=t[t.length-1];if(t.length>1&&n!==void 0)try{return{files:G3(e.slice(0,n),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const QMn=({change:e,side:r})=>r==="old"?null:WMn(e);function IB({bytesRead:e,byteLimit:r}){return f.jsxs("div",{className:"truncated-notice border border-accent-amber rounded-md bg-accent-amber-subtle py-3 px-3.5 text-sm [&_h4]:mt-0 [&_h4]:mx-0 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:text-accent-amber [&_p]:m-0 [&_p]:text-subtext",children:[f.jsx("h4",{children:x1t()}),f.jsx("p",{children:Wbt({limit:Ee(Xl(r)),read:Ee(Xl(e))})})]})}function PB({file:e,defaultExpanded:r}){const[t,n]=T.useState(r),{additions:s,deletions:o}=T.useMemo(()=>Jy(e),[e]),a=t&&s+o<=UMn,i=T.useMemo(()=>{if(a)try{return VMn(e)}catch{return}},[e,a]);return f.jsxs("section",{className:`diff-file-card overflow-hidden border border-border rounded-md bg-background [&.expanded_.diff-file-header]:border-b [&.expanded_.diff-file-header]:border-b-border ${t?"expanded":""}`,children:[f.jsxs("button",{className:"diff-file-header sticky top-0 z-10 flex items-center justify-between gap-3 w-full text-start py-2 px-3 bg-surface cursor-pointer [&_.chev]:text-muted [&_.chev]:text-xs [&_.chev]:shrink-0 [&_.chev]:w-3 [&_.path]:flex [&_.path]:items-center [&_.path]:gap-2 [&_.path]:min-w-0 [&_.path]:flex-1 [&_.path_code]:min-w-0 [&_.path_code]:flex-1 [&_.path_code]:overflow-hidden [&_.path_code]:text-ellipsis [&_.path_code]:whitespace-nowrap [&_.path_code]:font-mono [&_.path_code]:text-xs [&_.path_code]:font-medium [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>n(c=>!c),children:[f.jsx("span",{className:"chev",children:t?f.jsx(Zc,{size:14}):f.jsx(Xa,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:e5(e)})}),f.jsxs("span",{className:"stats",children:[f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",o]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:ibt()}):f.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:f.jsx(uMn,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:QMn,tokens:i,viewType:"unified"})}))]})}function XMn({files:e,className:r}){return f.jsx("div",{className:r?`${J3} ${r}`:J3,children:e.map((t,n)=>f.jsx(PB,{file:t,defaultExpanded:n===0},`${t.oldPath}→${t.newPath}#${n}`))})}function YMn(e){switch(e.type){case"add":return"A";case"delete":return"D";case"rename":return"R";case"copy":return"C";case"modify":return"M"}}function BB({diff:e,partial:r=!1}){var p;const t=T.useMemo(()=>LB(e,r),[e,r]),n=t.files,s=T.useMemo(()=>n.map((m,k)=>({file:m,key:`${m.oldPath}→${m.newPath}#${k}`,changes:Jy(m)})),[n]),[o,a]=T.useState(null),[i,c]=T.useState(!1),u=i&&!r,d=s.some(m=>m.key===o)?o:((p=s[0])==null?void 0:p.key)??null,_=s.find(m=>m.key===d)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:r?Y1t():Dbt()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:F1t()}):f.jsxs("div",{className:"diff-explorer @container",children:[f.jsxs("div",{className:"diff-explorer-toolbar flex items-center justify-between gap-3 mb-2.5 text-sm [&_button]:py-0.5 [&_button]:px-0 [&_button]:text-muted [&_button]:text-sm [&_button]:font-medium [&_button:hover]:text-text [&_button:hover]:underline [&_button:hover]:underline-offset-2",children:[f.jsx("strong",{className:"font-medium",children:r?s.length===1?Cbt():T1t({count:fr(s.length)}):s.length===1?OD():MD({count:fr(s.length)})}),!r&&f.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?Wvt():ryt()})]}),u?f.jsx(XMn,{files:n}):f.jsxs("div",{className:"diff-explorer-layout grid grid-cols-[minmax(180px,_260px)_minmax(0,_1fr)] items-start gap-3.5 [@container((max-width:_960px))]:grid-cols-1",children:[f.jsx("div",{className:"diff-explorer-files sticky top-0 max-h-[min(70vh,_720px)] overflow-auto border border-border rounded-md bg-background [&_button]:grid [&_button]:grid-cols-[18px_minmax(0,_1fr)_auto_auto] [&_button]:items-center [&_button]:gap-[7px] [&_button]:w-full [&_button]:py-2 [&_button]:px-[9px] [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_button.active]:bg-panel [&_button.active]:shadow-diff-active [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap [&_code]:text-xs [@container((max-width:_960px))]:static [@container((max-width:_960px))]:max-h-55","aria-label":_1t(),children:s.map(m=>f.jsxs("button",{type:"button",className:m.key===d?"active":"","aria-pressed":m.key===d,onClick:()=>a(m.key),children:[f.jsx("span",{className:`diff-file-status font-mono text-xs font-medium text-muted [&.status-add]:text-accent-green [&.status-delete]:text-accent-red [&.status-rename]:text-accent-blue [&.status-copy]:text-accent-blue status-${m.file.type}`,children:YMn(m.file)}),f.jsx("code",{title:e5(m.file),children:e5(m.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),f.jsx("div",{className:`${J3} diff-explorer-preview min-w-0`,children:_&&f.jsx(PB,{file:_.file,defaultExpanded:!0},_.key)})]})]})}const ZMn="/assets/slurm-logo-aGSXVZcE.svg",JMn="/assets/thinking-machines-BOdslTfm.png";function eOn(e){switch(e){case"modal_job":return"Modal";case"hf_job":return"Hugging Face";case"k8s_job":return"Kubernetes";case"ssh_job":return"SSH";case"slurm_job":return"Slurm";case"ray_job":return"Ray";case"openresearch_job":return"OpenResearch";case"local_job":return ND();case"tinker_job":return"Tinker";default:return e||"—"}}function tOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[f.jsx("path",{d:"M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z",fill:"#FF9D0B"}),f.jsx("path",{d:"M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z",fill:"#FFD21E"}),f.jsx("path",{d:"M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-0.576-.393-.394-1.023-.089-0.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-0.586 0 1.107.79 3.263 3.25 3.263h-.003z",fill:"#FF323D"}),f.jsx("path",{d:"M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003z",fill:"#3A3B45"}),f.jsx("path",{d:"M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8z",fill:"#3A3B45"}),f.jsx("path",{d:"M4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-0.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-0.553.718-.694.244-.162.523-.265.814-.3l.176-.012z",fill:"#FF9D0B"}),f.jsx("path",{d:"M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-0.573.534-.375-.677-1.405-2.416-1.94-2.751-0.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-0.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-0.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-0.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-0.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-0.522z",fill:"#FFD21E"})]})}function rOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[f.jsx("path",{d:"M121.683 75.25L149.997 124L91.4816 224.75C90.3128 226.757 88.155 228 85.8174 228H32.9664C31.7976 228 30.6778 227.691 29.697 227.131C28.7161 226.57 27.8906 225.758 27.3021 224.75L0.876625 179.25C-0.292208 177.243 -0.292208 174.765 0.876625 172.75L57.512 75.25C58.0923 74.2425 58.9259 73.43 59.9068 72.8694C60.8876 72.3088 62.0074 72 63.1762 72H116.027C118.365 72 120.523 73.2431 121.692 75.25H121.683ZM299.125 172.75L242.49 75.25C241.91 74.2425 241.076 73.43 240.095 72.8694C239.114 72.3088 237.995 72 236.826 72H183.975C181.637 72 179.479 73.2431 178.311 75.25L149.997 124L208.512 224.75C209.681 226.757 211.839 228 214.177 228H267.027C268.196 228 269.316 227.691 270.297 227.131C271.278 226.57 272.103 225.758 272.692 224.75L299.117 179.25C300.286 177.243 300.286 174.765 299.117 172.75H299.125Z",fill:"#62DE61"}),f.jsx("path",{d:"M89.6018 124H150.005L121.692 75.25C120.523 73.2431 118.365 72 116.027 72H63.1763C62.0074 72 60.8876 72.3088 59.9068 72.8694L89.6018 124Z",fill:"url(#orxModalA)"}),f.jsx("path",{d:"M89.6018 124L59.9068 72.8694C58.9259 73.43 58.1005 74.2425 57.512 75.25L0.876625 172.75C-0.292208 174.765 -0.292208 177.235 0.876625 179.25L27.3021 224.75C27.8825 225.758 28.7161 226.57 29.697 227.131L89.5936 124H89.6018Z",fill:"url(#orxModalB)"}),f.jsx("path",{d:"M149.997 124H89.5936L29.697 227.131C30.6778 227.691 31.7976 228 32.9664 228H85.8174C88.155 228 90.3128 226.757 91.4816 224.75L149.997 124Z",fill:"#09AF58"}),f.jsx("path",{d:"M299.125 179.25C299.706 178.243 300 177.121 300 176H240.61L210.915 227.131C211.896 227.691 213.016 228 214.185 228H267.036C269.373 228 271.531 226.757 272.7 224.75L299.125 179.25Z",fill:"#09AF58"}),f.jsx("path",{d:"M183.975 72C182.806 72 181.686 72.3088 180.705 72.8694L240.602 176H299.992C299.992 174.879 299.698 173.758 299.117 172.75L242.49 75.25C241.321 73.2431 239.163 72 236.826 72H183.967H183.975Z",fill:"url(#orxModalC)"}),f.jsx("path",{d:"M210.907 227.131L240.602 176L180.705 72.8694C179.725 73.43 178.899 74.2425 178.311 75.25L149.997 124L208.512 224.75C209.093 225.758 209.926 226.57 210.907 227.131Z",fill:"url(#orxModalD)"}),f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),f.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function nOn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:f.jsx("path",{d:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-0.5-.623h-.804l-0.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-0.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-0.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-0.52.123-.736-.172-.216-0.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-0.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-0.555-0.5-0.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-0.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-0.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-0.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z"})})}function sOn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:f.jsx("path",{d:"M16.153 12.826c-.63-.183-1.03.15-1.378.846-0.58 1.13-1.643 1.644-2.888 1.594-1.245-.05-2.257-.63-2.788-1.776-.233-.498-.498-.664-1.046-.68-.93-.017-1.643.016-2.174 1.062-.631 1.261-2.258 1.693-3.619 1.261a3.234 3.234 0 0 1-2.257-3.22 3.198 3.198 0 0 1 2.29-3.02 3.276 3.276 0 0 1 3.702 1.327c.216.315.216.863.597.93.648.1 1.328.033 1.992.033.299 0 .316-.266.399-.465.58-1.295 1.61-1.959 2.987-1.975 1.361-.017 2.39.647 2.955 1.892.215.465.48.598.946.548.166-.017.332.016.498 0 .464-.083 1.062.282 1.344-.448.282-.73-.382-.913-.68-1.245-.847-.946-1.81-1.793-2.673-2.706-.415-.465-.763-.614-1.41-.415-1.876.614-3.619-.431-4.15-2.357-.448-1.676.714-3.535 2.44-3.917a3.293 3.293 0 0 1 3.95 2.457c.017.05.017.083.033.133.117.564.117 1.145-.132 1.626-.283.531-.133.83.249 1.195a152.61 152.61 0 0 1 3.286 3.27c.299.299.498.349.913.2 1.51-0.565 2.97-.1 3.884 1.161a3.266 3.266 0 0 1-.067 3.801c-.896 1.195-2.357 1.643-3.834 1.079-.381-.15-0.58-.1-.846.182a163.619 163.619 0 0 1-3.403 3.386c-.299.3-.415.532-.232.98a3.198 3.198 0 0 1-1.278 3.917A3.298 3.298 0 0 1 9.646 23c-1.062-1.062-1.228-2.688-.415-4.033a3.196 3.196 0 0 1 3.835-1.294c.498.182.78.083 1.145-.283 1.012-1.045 2.058-2.058 3.087-3.103.266-.266.68-.449.432-1.03-.233-0.547-.631-.414-1.03-.431zM11.97 4.942c.913.016 1.643-.714 1.66-1.627v-.05a1.646 1.646 0 0 0-1.76-1.56 1.63 1.63 0 0 0-1.543 1.527 1.638 1.638 0 0 0 1.577 1.71zm.033 5.41a1.658 1.658 0 0 0-1.676 1.61v.084a1.73 1.73 0 0 0 1.643 1.66c.847.016 1.643-.78 1.677-1.627a1.648 1.648 0 0 0-1.577-1.71c-.017-.016-.05-.016-.067-.016zm7.088 1.694c.016.896.747 1.61 1.626 1.643a1.723 1.723 0 0 0 1.66-1.726 1.666 1.666 0 0 0-1.66-1.61 1.623 1.623 0 0 0-1.643 1.577c.017.05.017.083.017.116zM3.24 10.353a1.692 1.692 0 0 0-1.66 1.626c-.017.847.863 1.727 1.693 1.71a1.687 1.687 0 0 0 1.626-1.743 1.615 1.615 0 0 0-1.643-1.593Zm8.68 12c.98.033 1.71-.647 1.727-1.593a1.646 1.646 0 0 0-1.51-1.793 1.646 1.646 0 0 0-1.793 1.51v.233a1.609 1.609 0 0 0 1.543 1.66c0-.017.017-.017.033-.017z"})})}function oOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function aOn({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:JMn,width:e,height:e,style:{transform:e>=48?`translateX(${Math.round(e*.18)}px) scale(1.65)`:"scale(1.22)"},alt:"","aria-hidden":"true"})}function iOn({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:ZMn,width:e,height:e,alt:"","aria-hidden":"true"})}function g6({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-0.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-0.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})})}function Cp({kind:e,size:r=16}){switch(e){case"modal_job":return f.jsx(rOn,{size:r});case"hf_job":return f.jsx(tOn,{size:r});case"k8s_job":return f.jsx(nOn,{size:r});case"ssh_job":return f.jsx(eA,{size:r,strokeWidth:1.5});case"slurm_job":return f.jsx(iOn,{size:r});case"ray_job":return f.jsx(sOn,{size:r});case"openresearch_job":return f.jsx(oOn,{size:r});case"tinker_job":return f.jsx(aOn,{size:r});case"local_job":return f.jsx(x9n,{size:r,strokeWidth:1.5});default:return f.jsx(eA,{size:r})}}function v6({backend:e}){const r=tS(e),t=xCn(e);return r?f.jsxs("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted",children:[f.jsx(Cp,{kind:r}),f.jsx("span",{className:"backend-name",children:eOn(r)}),t&&f.jsx("span",{className:"backend-detail text-sm",children:t})]}):f.jsx("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted muted text-muted",children:"—"})}function cOn({expanded:e,experiments:r,runs:t,onOpenExperiment:n,rightOffset:s,activeView:o,projectId:a,onCompute:i,sessionId:c,busy:u,onChanges:d,onFiles:_,onTerminal:p,onArtifacts:m,onExperiments:k,onSideChat:x}){var A,E;const v=$An(r,t,c),b=T.useRef(null),w=ba(b),y=dt({...tI(a),enabled:e}),S=((A=y.data)==null?void 0:A.configuredDefaultBackend)??((E=y.data)==null?void 0:E.defaultBackend),z=S?Jf[S]():y.isPending?"…":y.isError?wi():o3(),N=[{id:"files",label:G4(),Icon:Ci,onClick:_},{id:"artifacts",label:mD(),Icon:hS,onClick:m},{id:"experiments",label:gD(),Icon:h0,onClick:k}];return f.jsx("div",{className:`workspace-tools absolute end-3.5 top-7 z-30 ${s===void 0?"win-titlebar:top-10":""}`,style:{insetInlineEnd:s},children:e?f.jsxs("nav",{"aria-label":D2(),className:"workspace-tools-card flex w-60 flex-col gap-0.5 rounded-xl border border-border bg-background px-1.5 py-2 shadow-elevated",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:D2()}),N.filter(M=>M.id!=="files").map(({id:M,label:$,Icon:D,onClick:I})=>f.jsx(_r,{className:"min-h-7 py-1","data-onboarding":M==="artifacts"?"nav-artifacts":void 0,onClick:I,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(D,{size:15}),$]})},M)),f.jsx(_r,{className:"py-1",onClick:i,children:f.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[f.jsx(fS,{size:15,className:"shrink-0"}),r3n()]}),f.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[S&&f.jsx(Cp,{kind:`${S}_job`,size:12}),f.jsx("span",{className:"wrap-anywhere",children:z})]})]})}),f.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:o5n()}),f.jsx(_r,{className:"min-h-7 py-1",onClick:_,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Ci,{size:15}),G4()]})}),f.jsx(_r,{className:"min-h-7 py-1",onClick:p,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Gc,{size:15}),bb()]})}),x&&f.jsx(_r,{className:"min-h-7 py-1",onClick:x,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(pg,{size:15}),i3()]})}),c&&f.jsx(lOn,{sessionId:c,busy:u,onChanges:d},c),v.length>0&&f.jsxs("div",{children:[f.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[f.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:f.jsx(Eh,{tone:"success",live:!0})}),f.jsx("span",{children:W4n()})]}),v.map(M=>f.jsx(_r,{className:"min-h-7 py-1",onClick:()=>n(M.experiment.id,M.run.id),children:f.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${M.experiment.title||M.experiment.slug} · ${a6(Ba(M.run))}`,children:M.experiment.title||M.experiment.slug})},M.run.id))]})]})]}):f.jsxs("nav",{"aria-label":D2(),className:"flex items-center justify-end gap-3",children:[N.map(({id:M,label:$,Icon:D,onClick:I})=>f.jsx(Rt,{active:o===M,className:"text-text [&.active]:text-text","data-tip":$,"data-tip-align":M==="experiments"?"end":void 0,"aria-label":$,"aria-pressed":o===M,onClick:I,children:f.jsx(D,{size:15})},M)),f.jsxs("div",{className:"relative",children:[f.jsx(Rt,{ref:b,active:o==="terminal"||w.open,className:"text-text [&.active]:text-text","data-tip":w.open?void 0:xN(),"data-tip-align":"end","aria-label":xN(),"aria-expanded":w.open,"aria-haspopup":"menu",onClick:()=>w.setOpen(M=>!M),children:f.jsx(wp,{size:15})}),w.open&&f.jsxs("div",{ref:w.ref,role:"menu",className:"absolute end-0 top-[calc(100%_+_4px)] z-50 flex min-w-40 flex-col rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsx(_r,{role:"menuitem",onClick:()=>{w.setOpen(!1),p()},children:f.jsxs("span",{className:"flex items-center gap-2.5",children:[f.jsx(Gc,{size:15}),bb()]})}),x&&f.jsx(_r,{role:"menuitem",onClick:()=>{w.setOpen(!1),x()},children:f.jsxs("span",{className:"flex items-center gap-2.5",children:[f.jsx(pg,{size:15}),i3()]})})]})]})]})})}function lOn({sessionId:e,busy:r,onChanges:t}){var c,u;const n=dt({...Tb(e),refetchInterval:r?5e3:!1}),s=T.useRef(r),{refetch:o}=n;T.useEffect(()=>{s.current&&!r&&o(),s.current=r},[r,o]);const a=n.data,i=T.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const d=LB(a.diff.diff,!1);return d.failed?null:d.files.map(Jy).reduce((_,p)=>({additions:_.additions+p.additions,deletions:_.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?f.jsxs(_r,{className:"min-h-7 py-1",onClick:t,title:a.branch??Qj(),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[f.jsx(p0,{size:15,className:"shrink-0"}),f.jsx("span",{children:zD()})]}),i?f.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[f.jsxs("span",{className:"text-accent-green",children:["+",fr(i.additions)]}),f.jsxs("span",{className:"text-accent-red",children:["−",fr(i.deletions)]})]}):f.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?OD():MD({count:fr(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function uOn({projectId:e,sessionId:r,active:t}){const n=T.useRef(null),s=T.useRef(null),[o,a]=T.useState(null),[i,c]=T.useState(0);return T.useEffect(()=>{const u=n.current;if(!u)return;const d=Ay(u,!1,!0,"app"),{terminal:_,dispose:p}=d;s.current=d,a(null);const m=location.protocol==="https:"?"wss:":"ws:",k=new URL(`/api/projects/${encodeURIComponent(e)}/terminal`,`${m}//${location.host}`);r&&k.searchParams.set("sessionId",r);const x=new WebSocket(k);x.binaryType="arraybuffer";let v=!1;const b=S=>{v||(v=!0,_.options.disableStdin=!0,_.blur(),_.writeln(`\r +${S}`),a(S))},w=_.onData(S=>{x.readyState===WebSocket.OPEN&&x.send(new TextEncoder().encode(S))}),y=_.onResize(({cols:S,rows:z})=>{x.readyState===WebSocket.OPEN&&x.send(JSON.stringify({type:"resize",cols:S,rows:z}))});return x.onopen=()=>{x.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))},x.onmessage=S=>{if(S.data instanceof ArrayBuffer){_.write(new Uint8Array(S.data));return}if(typeof S.data!="string")return;let z;try{z=JSON.parse(S.data)}catch{return}vd(z)&&(z.type==="exit"?b(P3n({code:String(z.code)})):z.type==="error"&&typeof z.error=="string"&&b(z.error))},x.onclose=()=>b(wN()),x.onerror=()=>b(wN()),()=>{x.onopen=null,x.onmessage=null,x.onerror=null,x.onclose=null,w.dispose(),y.dispose(),x.close(),s.current=null,p()}},[e,r,i]),T.useEffect(()=>{if(!t||o!==null)return;const u=requestAnimationFrame(()=>{var d,_;(d=s.current)==null||d.fit(),(_=s.current)==null||_.terminal.focus()});return()=>cancelAnimationFrame(u)},[t,o,i]),f.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-terminal-app p-2",role:"group","aria-label":bb(),children:[f.jsx("div",{ref:n,className:"min-h-0 flex-1 overflow-hidden"}),f.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:o??""}),o!==null&&f.jsx("div",{className:"flex shrink-0 justify-end pt-2",children:f.jsx(Oe,{autoFocus:!0,onClick:()=>c(u=>u+1),children:Q3n()})})]})}const _On=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fOn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dOn={};function aT(e,r){return(dOn.jsx?fOn:_On).test(e)}const hOn=/[ \t\n\f\r]/g;function pOn(e){return typeof e=="object"?e.type==="text"?iT(e.value):!1:iT(e)}function iT(e){return e.replace(hOn,"")===""}var sh={},ek,cT;function mOn(){if(cT)return ek;cT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,t=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,i=/^\s+|\s+$/g,c=` +`,u="/",d="*",_="",p="comment",m="declaration";function k(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var w=1,y=1;function S(H){var Q=H.match(r);Q&&(w+=Q.length);var K=H.lastIndexOf(c);y=~K?H.length-K:y+H.length}function z(){var H={line:w,column:y};return function(Q){return Q.position=new N(H),M(),Q}}function N(H){this.start=H,this.end={line:w,column:y},this.source=b.source}N.prototype.content=v;function A(H){var Q=new Error(b.source+":"+w+":"+y+": "+H);if(Q.reason=H,Q.filename=b.source,Q.line=w,Q.column=y,Q.source=v,!b.silent)throw Q}function E(H){var Q=H.exec(v);if(Q){var K=Q[0];return S(K),v=v.slice(K.length),Q}}function M(){E(t)}function $(H){var Q;for(H=H||[];Q=D();)Q!==!1&&H.push(Q);return H}function D(){var H=z();if(!(u!=v.charAt(0)||d!=v.charAt(1))){for(var Q=2;_!=v.charAt(Q)&&(d!=v.charAt(Q)||u!=v.charAt(Q+1));)++Q;if(Q+=2,_===v.charAt(Q-1))return A("End of comment missing");var K=v.slice(2,Q-2);return y+=2,S(K),v=v.slice(Q),y+=2,H({type:p,comment:K})}}function I(){var H=z(),Q=E(n);if(Q){if(D(),!E(s))return A("property missing ':'");var K=E(o),J=H({type:m,property:x(Q[0].replace(e,_)),value:K?x(K[0].replace(e,_)):_});return E(a),J}}function G(){var H=[];$(H);for(var Q;Q=I();)Q!==!1&&(H.push(Q),$(H));return H}return M(),G()}function x(v){return v?v.replace(i,_):_}return ek=k,ek}var lT;function gOn(){if(lT)return sh;lT=1;var e=sh&&sh.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sh,"__esModule",{value:!0}),sh.default=t;const r=e(mOn());function t(n,s){let o=null;if(!n||typeof n!="string")return o;const a=(0,r.default)(n),i=typeof s=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:d}=c;i?s(u,d,c):d&&(o=o||{},o[u]=d)}),o}return sh}var jm={},uT;function vOn(){if(uT)return jm;uT=1,Object.defineProperty(jm,"__esModule",{value:!0}),jm.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,t=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(u){return!u||t.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},i=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}),o(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(s,i):u=u.replace(n,i),u.replace(r,a))};return jm.camelCase=c,jm}var Sm,_T;function bOn(){if(_T)return Sm;_T=1;var e=Sm&&Sm.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=e(gOn()),t=vOn();function n(s,o){var a={};return!s||typeof s!="string"||(0,r.default)(s,function(i,c){i&&c&&(a[(0,t.camelCase)(i,o)]=c)}),a}return n.default=n,Sm=n,Sm}var yOn=bOn();const xOn=n0(yOn),FB=HB("end"),b6=HB("start");function HB(e){return r;function r(t){const n=t&&t.position&&t.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function wOn(e){const r=b6(e),t=FB(e);if(r&&t)return{start:r,end:t}}function Xm(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fT(e.position):"start"in e||"end"in e?fT(e):"line"in e||"column"in e?t5(e):""}function t5(e){return dT(e&&e.line)+":"+dT(e&&e.column)}function fT(e){return t5(e&&e.start)+"-"+t5(e&&e.end)}function dT(e){return e&&typeof e=="number"?e:1}class No extends Error{constructor(r,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let s="",o={},a=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof r=="string"?s=r:!o.cause&&r&&(a=!0,s=r.message,o.cause=r),!o.ruleId&&!o.source&&typeof n=="string"){const c=n.indexOf(":");c===-1?o.ruleId=n:(o.source=n.slice(0,c),o.ruleId=n.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const i=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=i?i.line:void 0,this.name=Xm(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}No.prototype.file="";No.prototype.name="";No.prototype.reason="";No.prototype.message="";No.prototype.stack="";No.prototype.column=void 0;No.prototype.line=void 0;No.prototype.ancestors=void 0;No.prototype.cause=void 0;No.prototype.fatal=void 0;No.prototype.place=void 0;No.prototype.ruleId=void 0;No.prototype.source=void 0;const y6={}.hasOwnProperty,kOn=new Map,jOn=/[A-Z]/g,SOn=new Set(["table","tbody","thead","tfoot","tr"]),COn=new Set(["td","th"]),qB="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function UB(e,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=r.filePath||void 0;let n;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=OOn(t,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=MOn(t,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:n,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Iy:TP,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},o=GB(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function GB(e,r,t){if(r.type==="element")return zOn(e,r,t);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return EOn(e,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return AOn(e,r,t);if(r.type==="mdxjsEsm")return NOn(e,r);if(r.type==="root")return TOn(e,r,t);if(r.type==="text")return ROn(e,r)}function zOn(e,r,t){const n=e.schema;let s=n;r.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=Iy,e.schema=s),e.ancestors.push(r);const o=KB(e,r.tagName,!1),a=$On(e,r);let i=w6(e,r);return SOn.has(r.tagName)&&(i=i.filter(function(c){return typeof c=="string"?!pOn(c):!0})),WB(e,a,o,r),x6(a,i),e.ancestors.pop(),e.schema=n,e.create(r,o,a,t)}function EOn(e,r){if(r.data&&r.data.estree&&e.evaluater){const n=r.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Sg(e,r.position)}function NOn(e,r){if(r.data&&r.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(r.data.estree);Sg(e,r.position)}function AOn(e,r,t){const n=e.schema;let s=n;r.name==="svg"&&n.space==="html"&&(s=Iy,e.schema=s),e.ancestors.push(r);const o=r.name===null?e.Fragment:KB(e,r.name,!0),a=DOn(e,r),i=w6(e,r);return WB(e,a,o,r),x6(a,i),e.ancestors.pop(),e.schema=n,e.create(r,o,a,t)}function TOn(e,r,t){const n={};return x6(n,w6(e,r)),e.create(r,e.Fragment,n,t)}function ROn(e,r){return r.value}function WB(e,r,t,n){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(r.node=n)}function x6(e,r){if(r.length>0){const t=r.length>1?r:r[0];t&&(e.children=t)}}function MOn(e,r,t){return n;function n(s,o,a,i){const u=Array.isArray(a.children)?t:r;return i?u(o,a,i):u(o,a)}}function OOn(e,r){return t;function t(n,s,o,a){const i=Array.isArray(o.children),c=b6(n);return r(s,o,a,i,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function $On(e,r){const t={};let n,s;for(s in r.properties)if(s!=="children"&&y6.call(r.properties,s)){const o=LOn(e,s,r.properties[s]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&a==="align"&&typeof i=="string"&&COn.has(r.tagName)?n=i:t[a]=i}}if(n){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return t}function DOn(e,r){const t={};for(const n of r.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const o=n.data.estree.body[0];o.type;const a=o.expression;a.type;const i=a.properties[0];i.type,Object.assign(t,e.evaluater.evaluateExpression(i.argument))}else Sg(e,r.position);else{const s=n.name;let o;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const i=n.value.data.estree.body[0];i.type,o=e.evaluater.evaluateExpression(i.expression)}else Sg(e,r.position);else o=n.value===null?!0:n.value;t[s]=o}return t}function w6(e,r){const t=[];let n=-1;const s=e.passKeys?new Map:kOn;for(;++ns?0:s+r:r=r>s?s:r,t=t>0?t:0,n.length<1e4)a=Array.from(n),a.unshift(r,t),e.splice(...a);else for(t&&e.splice(r,t);o0?(qa(e,e.length,0,r),e):r}const pT={}.hasOwnProperty;function QB(e){const r={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Ji(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wo=R_(/[A-Za-z]/),Co=R_(/[\dA-Za-z]/),WOn=R_(/[#-'*+\--9=?A-Z^-~]/);function $b(e){return e!==null&&(e<32||e===127)}const r5=R_(/\d/),KOn=R_(/[\dA-Fa-f]/),VOn=R_(/[!-/:-@[-`{-~]/);function Pt(e){return e!==null&&e<-2}function vn(e){return e!==null&&(e<0||e===32)}function Rr(e){return e===-2||e===-1||e===32}const ex=R_(new RegExp("\\p{P}|\\p{S}","u")),ed=R_(/\s/);function R_(e){return r;function r(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function zp(e){const r=[];let t=-1,n=0,s=0;for(;++t55295&&o<57344){const i=e.charCodeAt(t+1);o<56320&&i>56319&&i<57344?(a=String.fromCharCode(o,i),s=1):a="�"}else a=String.fromCharCode(o);a&&(r.push(e.slice(n,t),encodeURIComponent(a)),n=t+s+1,a=""),s&&(t+=s,s=0)}return r.join("")+e.slice(n)}function Nr(e,r,t,n){const s=n?n-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(c){return Rr(c)?(e.enter(t),i(c)):r(c)}function i(c){return Rr(c)&&o++a))return;const A=r.events.length;let E=A,M,$;for(;E--;)if(r.events[E][0]==="exit"&&r.events[E][1].type==="chunkFlow"){if(M){$=r.events[E][1].end;break}M=!0}for(b(n),N=A;Ny;){const z=t[S];r.containerState=z[1],z[0].exit.call(r,e)}t.length=y}function w(){s.write([null]),o=void 0,s=void 0,r.containerState._closeFlow=void 0}}function JOn(e,r,t){return Nr(e,e.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ap(e){if(e===null||vn(e)||ed(e))return 1;if(ex(e))return 2}function tx(e,r,t){const n=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const _={...e[n][1].end},p={...e[t][1].start};gT(_,-c),gT(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:_,end:{...e[n][1].end}},i={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},o={type:c>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...a.start},end:{...i.end}},e[n][1].end={...a.start},e[t][1].start={...i.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=xi(u,[["enter",e[n][1],r],["exit",e[n][1],r]])),u=xi(u,[["enter",s,r],["enter",a,r],["exit",a,r],["enter",o,r]]),u=xi(u,tx(r.parser.constructs.insideSpan.null,e.slice(n+1,t),r)),u=xi(u,[["exit",o,r],["enter",i,r],["exit",i,r],["exit",s,r]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,u=xi(u,[["enter",e[t][1],r],["exit",e[t][1],r]])):d=0,qa(e,n-1,t-n+3,u),t=n+u.length-d-2;break}}for(t=-1;++t0&&Rr(N)?Nr(e,w,"linePrefix",o+1)(N):w(N)}function w(N){return N===null||Pt(N)?e.check(vT,x,S)(N):(e.enter("codeFlowValue"),y(N))}function y(N){return N===null||Pt(N)?(e.exit("codeFlowValue"),w(N)):(e.consume(N),y)}function S(N){return e.exit("codeFenced"),r(N)}function z(N,A,E){let M=0;return $;function $(Q){return N.enter("lineEnding"),N.consume(Q),N.exit("lineEnding"),D}function D(Q){return N.enter("codeFencedFence"),Rr(Q)?Nr(N,I,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):I(Q)}function I(Q){return Q===i?(N.enter("codeFencedFenceSequence"),G(Q)):E(Q)}function G(Q){return Q===i?(M++,N.consume(Q),G):M>=a?(N.exit("codeFencedFenceSequence"),Rr(Q)?Nr(N,H,"whitespace")(Q):H(Q)):E(Q)}function H(Q){return Q===null||Pt(Q)?(N.exit("codeFencedFence"),A(Q)):E(Q)}}}function _$n(e,r,t){const n=this;return s;function s(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return n.parser.lazy[n.now().line]?t(a):r(a)}}const rk={name:"codeIndented",tokenize:d$n},f$n={partial:!0,tokenize:h$n};function d$n(e,r,t){const n=this;return s;function s(u){return e.enter("codeIndented"),Nr(e,o,"linePrefix",5)(u)}function o(u){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Pt(u)?e.attempt(f$n,a,c)(u):(e.enter("codeFlowValue"),i(u))}function i(u){return u===null||Pt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),i)}function c(u){return e.exit("codeIndented"),r(u)}}function h$n(e,r,t){const n=this;return s;function s(a){return n.parser.lazy[n.now().line]?t(a):Pt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Nr(e,o,"linePrefix",5)(a)}function o(a){const i=n.events[n.events.length-1];return i&&i[1].type==="linePrefix"&&i[2].sliceSerialize(i[1],!0).length>=4?r(a):Pt(a)?s(a):t(a)}}const p$n={name:"codeText",previous:g$n,resolve:m$n,tokenize:v$n};function m$n(e){let r=e.length-4,t=3,n,s;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(n=t;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return rthis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(r,t,n){const s=t||0;this.setCursor(Math.trunc(r));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return n&&Cm(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Cm(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Cm(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r=4?r(a):e.interrupt(n.parser.constructs.flow,t,r)(a)}}function tF(e,r,t,n,s,o,a,i,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return _;function _(b){return b===60?(e.enter(n),e.enter(s),e.enter(o),e.consume(b),e.exit(o),p):b===null||b===32||b===41||$b(b)?t(b):(e.enter(n),e.enter(a),e.enter(i),e.enter("chunkString",{contentType:"string"}),x(b))}function p(b){return b===62?(e.enter(o),e.consume(b),e.exit(o),e.exit(s),e.exit(n),r):(e.enter(i),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(i),p(b)):b===null||b===60||Pt(b)?t(b):(e.consume(b),b===92?k:m)}function k(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function x(b){return!d&&(b===null||b===41||vn(b))?(e.exit("chunkString"),e.exit(i),e.exit(a),e.exit(n),r(b)):d999||m===null||m===91||m===93&&!c||m===94&&!i&&"_hiddenFootnoteSupport"in a.parser.constructs?t(m):m===93?(e.exit(o),e.enter(s),e.consume(m),e.exit(s),e.exit(n),r):Pt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===null||m===91||m===93||Pt(m)||i++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!Rr(m)),m===92?p:_)}function p(m){return m===91||m===92||m===93?(e.consume(m),i++,_):_(m)}}function nF(e,r,t,n,s,o){let a;return i;function i(p){return p===34||p===39||p===40?(e.enter(n),e.enter(s),e.consume(p),e.exit(s),a=p===40?41:p,c):t(p)}function c(p){return p===a?(e.enter(s),e.consume(p),e.exit(s),e.exit(n),r):(e.enter(o),u(p))}function u(p){return p===a?(e.exit(o),c(a)):p===null?t(p):Pt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Nr(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===a||p===null||Pt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?_:d)}function _(p){return p===a||p===92?(e.consume(p),d):d(p)}}function Ym(e,r){let t;return n;function n(s){return Pt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,n):Rr(s)?Nr(e,n,t?"linePrefix":"lineSuffix")(s):r(s)}}const C$n={name:"definition",tokenize:E$n},z$n={partial:!0,tokenize:N$n};function E$n(e,r,t){const n=this;let s;return o;function o(m){return e.enter("definition"),a(m)}function a(m){return rF.call(n,e,i,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function i(m){return s=Ji(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):t(m)}function c(m){return vn(m)?Ym(e,u)(m):u(m)}function u(m){return tF(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(z$n,_,_)(m)}function _(m){return Rr(m)?Nr(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Pt(m)?(e.exit("definition"),n.parser.defined.push(s),r(m)):t(m)}}function N$n(e,r,t){return n;function n(i){return vn(i)?Ym(e,s)(i):t(i)}function s(i){return nF(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(i)}function o(i){return Rr(i)?Nr(e,a,"whitespace")(i):a(i)}function a(i){return i===null||Pt(i)?r(i):t(i)}}const A$n={name:"hardBreakEscape",tokenize:T$n};function T$n(e,r,t){return n;function n(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Pt(o)?(e.exit("hardBreakEscape"),r(o)):t(o)}}const R$n={name:"headingAtx",resolve:M$n,tokenize:O$n};function M$n(e,r){let t=e.length-2,n=3,s,o;return e[n][1].type==="whitespace"&&(n+=2),t-2>n&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&e[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(s={type:"atxHeadingText",start:e[n][1].start,end:e[t][1].end},o={type:"chunkText",start:e[n][1].start,end:e[t][1].end,contentType:"text"},qa(e,n,t-n+1,[["enter",s,r],["enter",o,r],["exit",o,r],["exit",s,r]])),e}function O$n(e,r,t){let n=0;return s;function s(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&n++<6?(e.consume(d),a):d===null||vn(d)?(e.exit("atxHeadingSequence"),i(d)):t(d)}function i(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||Pt(d)?(e.exit("atxHeading"),r(d)):Rr(d)?Nr(e,i,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),i(d))}function u(d){return d===null||d===35||vn(d)?(e.exit("atxHeadingText"),i(d)):(e.consume(d),u)}}const $$n=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],yT=["pre","script","style","textarea"],D$n={concrete:!0,name:"htmlFlow",resolveTo:P$n,tokenize:B$n},L$n={partial:!0,tokenize:H$n},I$n={partial:!0,tokenize:F$n};function P$n(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function B$n(e,r,t){const n=this;let s,o,a,i,c;return u;function u(U){return d(U)}function d(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),_}function _(U){return U===33?(e.consume(U),p):U===47?(e.consume(U),o=!0,x):U===63?(e.consume(U),s=3,n.interrupt?r:L):Wo(U)?(e.consume(U),a=String.fromCharCode(U),v):t(U)}function p(U){return U===45?(e.consume(U),s=2,m):U===91?(e.consume(U),s=5,i=0,k):Wo(U)?(e.consume(U),s=4,n.interrupt?r:L):t(U)}function m(U){return U===45?(e.consume(U),n.interrupt?r:L):t(U)}function k(U){const oe="CDATA[";return U===oe.charCodeAt(i++)?(e.consume(U),i===oe.length?n.interrupt?r:I:k):t(U)}function x(U){return Wo(U)?(e.consume(U),a=String.fromCharCode(U),v):t(U)}function v(U){if(U===null||U===47||U===62||vn(U)){const oe=U===47,ie=a.toLowerCase();return!oe&&!o&&yT.includes(ie)?(s=1,n.interrupt?r(U):I(U)):$$n.includes(a.toLowerCase())?(s=6,oe?(e.consume(U),b):n.interrupt?r(U):I(U)):(s=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(U):o?w(U):y(U))}return U===45||Co(U)?(e.consume(U),a+=String.fromCharCode(U),v):t(U)}function b(U){return U===62?(e.consume(U),n.interrupt?r:I):t(U)}function w(U){return Rr(U)?(e.consume(U),w):$(U)}function y(U){return U===47?(e.consume(U),$):U===58||U===95||Wo(U)?(e.consume(U),S):Rr(U)?(e.consume(U),y):$(U)}function S(U){return U===45||U===46||U===58||U===95||Co(U)?(e.consume(U),S):z(U)}function z(U){return U===61?(e.consume(U),N):Rr(U)?(e.consume(U),z):y(U)}function N(U){return U===null||U===60||U===61||U===62||U===96?t(U):U===34||U===39?(e.consume(U),c=U,A):Rr(U)?(e.consume(U),N):E(U)}function A(U){return U===c?(e.consume(U),c=null,M):U===null||Pt(U)?t(U):(e.consume(U),A)}function E(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||vn(U)?z(U):(e.consume(U),E)}function M(U){return U===47||U===62||Rr(U)?y(U):t(U)}function $(U){return U===62?(e.consume(U),D):t(U)}function D(U){return U===null||Pt(U)?I(U):Rr(U)?(e.consume(U),D):t(U)}function I(U){return U===45&&s===2?(e.consume(U),K):U===60&&s===1?(e.consume(U),J):U===62&&s===4?(e.consume(U),F):U===63&&s===3?(e.consume(U),L):U===93&&s===5?(e.consume(U),P):Pt(U)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(L$n,q,G)(U)):U===null||Pt(U)?(e.exit("htmlFlowData"),G(U)):(e.consume(U),I)}function G(U){return e.check(I$n,H,q)(U)}function H(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),Q}function Q(U){return U===null||Pt(U)?G(U):(e.enter("htmlFlowData"),I(U))}function K(U){return U===45?(e.consume(U),L):I(U)}function J(U){return U===47?(e.consume(U),a="",ee):I(U)}function ee(U){if(U===62){const oe=a.toLowerCase();return yT.includes(oe)?(e.consume(U),F):I(U)}return Wo(U)&&a.length<8?(e.consume(U),a+=String.fromCharCode(U),ee):I(U)}function P(U){return U===93?(e.consume(U),L):I(U)}function L(U){return U===62?(e.consume(U),F):U===45&&s===2?(e.consume(U),L):I(U)}function F(U){return U===null||Pt(U)?(e.exit("htmlFlowData"),q(U)):(e.consume(U),F)}function q(U){return e.exit("htmlFlow"),r(U)}}function F$n(e,r,t){const n=this;return s;function s(a){return Pt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):t(a)}function o(a){return n.parser.lazy[n.now().line]?t(a):r(a)}}function H$n(e,r,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(x0,r,t)}}const q$n={name:"htmlText",tokenize:U$n};function U$n(e,r,t){const n=this;let s,o,a;return i;function i(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),z):L===63?(e.consume(L),y):Wo(L)?(e.consume(L),E):t(L)}function u(L){return L===45?(e.consume(L),d):L===91?(e.consume(L),o=0,k):Wo(L)?(e.consume(L),w):t(L)}function d(L){return L===45?(e.consume(L),m):t(L)}function _(L){return L===null?t(L):L===45?(e.consume(L),p):Pt(L)?(a=_,J(L)):(e.consume(L),_)}function p(L){return L===45?(e.consume(L),m):_(L)}function m(L){return L===62?K(L):L===45?p(L):_(L)}function k(L){const F="CDATA[";return L===F.charCodeAt(o++)?(e.consume(L),o===F.length?x:k):t(L)}function x(L){return L===null?t(L):L===93?(e.consume(L),v):Pt(L)?(a=x,J(L)):(e.consume(L),x)}function v(L){return L===93?(e.consume(L),b):x(L)}function b(L){return L===62?K(L):L===93?(e.consume(L),b):x(L)}function w(L){return L===null||L===62?K(L):Pt(L)?(a=w,J(L)):(e.consume(L),w)}function y(L){return L===null?t(L):L===63?(e.consume(L),S):Pt(L)?(a=y,J(L)):(e.consume(L),y)}function S(L){return L===62?K(L):y(L)}function z(L){return Wo(L)?(e.consume(L),N):t(L)}function N(L){return L===45||Co(L)?(e.consume(L),N):A(L)}function A(L){return Pt(L)?(a=A,J(L)):Rr(L)?(e.consume(L),A):K(L)}function E(L){return L===45||Co(L)?(e.consume(L),E):L===47||L===62||vn(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),K):L===58||L===95||Wo(L)?(e.consume(L),$):Pt(L)?(a=M,J(L)):Rr(L)?(e.consume(L),M):K(L)}function $(L){return L===45||L===46||L===58||L===95||Co(L)?(e.consume(L),$):D(L)}function D(L){return L===61?(e.consume(L),I):Pt(L)?(a=D,J(L)):Rr(L)?(e.consume(L),D):M(L)}function I(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,G):Pt(L)?(a=I,J(L)):Rr(L)?(e.consume(L),I):(e.consume(L),H)}function G(L){return L===s?(e.consume(L),s=void 0,Q):L===null?t(L):Pt(L)?(a=G,J(L)):(e.consume(L),G)}function H(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||vn(L)?M(L):(e.consume(L),H)}function Q(L){return L===47||L===62||vn(L)?M(L):t(L)}function K(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),r):t(L)}function J(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),ee}function ee(L){return Rr(L)?Nr(e,P,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):P(L)}function P(L){return e.enter("htmlTextData"),a(L)}}const j6={name:"labelEnd",resolveAll:V$n,resolveTo:Q$n,tokenize:X$n},G$n={tokenize:Y$n},W$n={tokenize:Z$n},K$n={tokenize:J$n};function V$n(e){let r=-1;const t=[];for(;++r=3&&(u===null||Pt(u))?(e.exit("thematicBreak"),r(u)):t(u)}function c(u){return u===s?(e.consume(u),n++,c):(e.exit("thematicBreakSequence"),Rr(u)?Nr(e,i,"whitespace")(u):i(u))}}const fa={continuation:{tokenize:lDn},exit:_Dn,name:"list",tokenize:cDn},aDn={partial:!0,tokenize:fDn},iDn={partial:!0,tokenize:uDn};function cDn(e,r,t){const n=this,s=n.events[n.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return i;function i(m){const k=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:r5(m)){if(n.containerState.type||(n.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(U1,t,u)(m):u(m);if(!n.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return t(m)}function c(m){return r5(m)&&++a<10?(e.consume(m),c):(!n.interrupt||a<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):t(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,e.check(x0,n.interrupt?t:d,e.attempt(aDn,p,_))}function d(m){return n.containerState.initialBlankLine=!0,o++,p(m)}function _(m){return Rr(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):t(m)}function p(m){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(m)}}function lDn(e,r,t){const n=this;return n.containerState._closeFlow=void 0,e.check(x0,s,o);function s(i){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Nr(e,r,"listItemIndent",n.containerState.size+1)(i)}function o(i){return n.containerState.furtherBlankLines||!Rr(i)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(i)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(iDn,r,a)(i))}function a(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,Nr(e,e.attempt(fa,r,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}function uDn(e,r,t){const n=this;return Nr(e,s,"listItemIndent",n.containerState.size+1);function s(o){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?r(o):t(o)}}function _Dn(e){e.exit(this.containerState.type)}function fDn(e,r,t){const n=this;return Nr(e,s,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const a=n.events[n.events.length-1];return!Rr(o)&&a&&a[1].type==="listItemPrefixWhitespace"?r(o):t(o)}}const xT={name:"setextUnderline",resolveTo:dDn,tokenize:hDn};function dDn(e,r){let t=e.length,n,s,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){n=t;break}e[t][1].type==="paragraph"&&(s=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",a,r]),e.splice(o+1,0,["exit",e[n][1],r]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,r]),e}function hDn(e,r,t){const n=this;let s;return o;function o(u){let d=n.events.length,_;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){_=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||_)?(e.enter("setextHeadingLine"),s=u,a(u)):t(u)}function a(u){return e.enter("setextHeadingLineSequence"),i(u)}function i(u){return u===s?(e.consume(u),i):(e.exit("setextHeadingLineSequence"),Rr(u)?Nr(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Pt(u)?(e.exit("setextHeadingLine"),r(u)):t(u)}}const pDn={tokenize:mDn};function mDn(e){const r=this,t=e.attempt(x0,n,e.attempt(this.parser.constructs.flowInitial,s,Nr(e,e.attempt(this.parser.constructs.flow,s,e.attempt(x$n,s)),"linePrefix")));return t;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r.currentConstruct=void 0,t}}const gDn={resolveAll:oF()},vDn=sF("string"),bDn=sF("text");function sF(e){return{resolveAll:oF(e==="text"?yDn:void 0),tokenize:r};function r(t){const n=this,s=this.parser.constructs[e],o=t.attempt(s,a,i);return a;function a(d){return u(d)?o(d):i(d)}function i(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),c}function c(d){return u(d)?(t.exit("data"),o(d)):(t.consume(d),c)}function u(d){if(d===null)return!0;const _=s[d];let p=-1;if(_)for(;++p<_.length;){const m=_[p];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}function oF(e){return r;function r(t,n){let s=-1,o;for(;++s<=t.length;)o===void 0?t[s]&&t[s][1].type==="data"&&(o=s,s++):(!t[s]||t[s][1].type!=="data")&&(s!==o+2&&(t[o][1].end=t[s-1][1].end,t.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(t,n):t}}function yDn(e,r){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const n=e[t-1][1],s=r.sliceStream(n);let o=s.length,a=-1,i=0,c;for(;o--;){const u=s[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)i++,a--;if(a)break;a=-1}else if(u===-2)c=!0,i++;else if(u!==-1){o++;break}}if(r._contentTypeTextTrailing&&t===e.length&&(i=0),i){const u={type:t===e.length||c||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:n.start._bufferIndex+a,_index:n.start._index+o,line:n.end.line,column:n.end.column-i,offset:n.end.offset-i},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(t,0,["enter",u,r],["exit",u,r]),t+=2)}t++}return e}const xDn={42:fa,43:fa,45:fa,48:fa,49:fa,50:fa,51:fa,52:fa,53:fa,54:fa,55:fa,56:fa,57:fa,62:YB},wDn={91:C$n},kDn={[-2]:rk,[-1]:rk,32:rk},jDn={35:R$n,42:U1,45:[xT,U1],60:D$n,61:xT,95:U1,96:bT,126:bT},SDn={38:JB,92:ZB},CDn={[-5]:nk,[-4]:nk,[-3]:nk,33:eDn,38:JB,42:n5,60:[r$n,q$n],91:rDn,92:[A$n,ZB],93:j6,95:n5,96:p$n},zDn={null:[n5,gDn]},EDn={null:[42,95]},NDn={null:[]},ADn=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:EDn,contentInitial:wDn,disable:NDn,document:xDn,flow:jDn,flowInitial:kDn,insideSpan:zDn,string:SDn,text:CDn},Symbol.toStringTag,{value:"Module"}));function TDn(e,r,t){let n={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const s={},o=[];let a=[],i=[];const c={attempt:A(z),check:A(N),consume:w,enter:y,exit:S,interrupt:A(N,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:k,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:_};let d=r.tokenize.call(u,c);return r.resolveAll&&o.push(r),u;function _(D){return a=xi(a,D),v(),a[a.length-1]!==null?[]:(E(r,0),u.events=tx(o,u.events,u),u.events)}function p(D,I){return MDn(m(D),I)}function m(D){return RDn(a,D)}function k(){const{_bufferIndex:D,_index:I,line:G,column:H,offset:Q}=n;return{_bufferIndex:D,_index:I,line:G,column:H,offset:Q}}function x(D){s[D.line]=D.column,$()}function v(){let D;for(;n._index-1){const i=a[0];typeof i=="string"?a[0]=i.slice(n):a.shift()}o>0&&a.push(e[s].slice(0,o))}return a}function MDn(e,r){let t=-1;const n=[];let s;for(;++t0){const Ze=Ye.tokenStack[Ye.tokenStack.length-1];(Ze[1]||kT).call(Ye,void 0,Ze[0])}for(Ie.position={start:Wu(xe.length>0?xe[0][1].start:{line:1,column:1,offset:0}),end:Wu(xe.length>0?xe[xe.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve0){const Ze=Ye.tokenStack[Ye.tokenStack.length-1];(Ze[1]||kT).call(Ye,void 0,Ze[0])}for(Ie.position={start:Wu(xe.length>0?xe[0][1].start:{line:1,column:1,offset:0}),end:Wu(xe.length>0?xe[xe.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve0&&(n.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:n,children:[{type:"text",value:t}]};return r.meta&&(o.data={meta:r.meta}),e.patch(r,o),o=e.applyData(r,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(r,o),o}function WDn(e,r){const t={type:"element",tagName:"del",properties:{},children:e.all(r)};return e.patch(r,t),e.applyData(r,t)}function KDn(e,r){const t={type:"element",tagName:"em",properties:{},children:e.all(r)};return e.patch(r,t),e.applyData(r,t)}function VDn(e,r){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(r.identifier).toUpperCase(),s=zp(n.toLowerCase()),o=e.footnoteOrder.indexOf(n);let a,i=e.footnoteCounts.get(n);i===void 0?(i=0,e.footnoteOrder.push(n),a=e.footnoteOrder.length):a=o+1,i+=1,e.footnoteCounts.set(n,i);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(r,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(r,u),e.applyData(r,u)}function QDn(e,r){const t={type:"element",tagName:"h"+r.depth,properties:{},children:e.all(r)};return e.patch(r,t),e.applyData(r,t)}function XDn(e,r){if(e.options.allowDangerousHtml){const t={type:"raw",value:r.value};return e.patch(r,t),e.applyData(r,t)}}function cF(e,r){const t=r.referenceType;let n="]";if(t==="collapsed"?n+="[]":t==="full"&&(n+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+n}];const s=e.all(r),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=n:s.push({type:"text",value:n}),s}function YDn(e,r){const t=String(r.identifier).toUpperCase(),n=e.definitionById.get(t);if(!n)return cF(e,r);const s={src:zp(n.url||""),alt:r.alt};n.title!==null&&n.title!==void 0&&(s.title=n.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(r,o),e.applyData(r,o)}function ZDn(e,r){const t={src:zp(r.url)};r.alt!==null&&r.alt!==void 0&&(t.alt=r.alt),r.title!==null&&r.title!==void 0&&(t.title=r.title);const n={type:"element",tagName:"img",properties:t,children:[]};return e.patch(r,n),e.applyData(r,n)}function JDn(e,r){const t={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,t);const n={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(r,n),e.applyData(r,n)}function eLn(e,r){const t=String(r.identifier).toUpperCase(),n=e.definitionById.get(t);if(!n)return cF(e,r);const s={href:zp(n.url||"")};n.title!==null&&n.title!==void 0&&(s.title=n.title);const o={type:"element",tagName:"a",properties:s,children:e.all(r)};return e.patch(r,o),e.applyData(r,o)}function tLn(e,r){const t={href:zp(r.url)};r.title!==null&&r.title!==void 0&&(t.title=r.title);const n={type:"element",tagName:"a",properties:t,children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function rLn(e,r,t){const n=e.all(r),s=t?nLn(t):lF(r),o={},a=[];if(typeof r.checked=="boolean"){const d=n[0];let _;d&&d.type==="element"&&d.tagName==="p"?_=d:(_={type:"element",tagName:"p",properties:{},children:[]},n.unshift(_)),_.children.length>0&&_.children.unshift({type:"text",value:" "}),_.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let i=-1;for(;++i1}function sLn(e,r){const t={},n=e.all(r);let s=-1;for(typeof r.start=="number"&&r.start!==1&&(t.start=r.start);++s0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},i=b6(r.children[1]),c=FB(r.children[r.children.length-1]);i&&c&&(a.position={start:i,end:c}),s.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(r,o),e.applyData(r,o)}function lLn(e,r,t){const n=t?t.children:void 0,o=(n?n.indexOf(r):1)===0?"th":"td",a=t&&t.type==="table"?t.align:void 0,i=a?a.length:r.children.length;let c=-1;const u=[];for(;++c0,!0),n[0]),s=n.index+n[0].length,n=t.exec(r);return o.push(CT(r.slice(s),s>0,!1)),o.join("")}function CT(e,r,t){let n=0,s=e.length;if(r){let o=e.codePointAt(n);for(;o===jT||o===ST;)n++,o=e.codePointAt(n)}if(t){let o=e.codePointAt(s-1);for(;o===jT||o===ST;)s--,o=e.codePointAt(s-1)}return s>n?e.slice(n,s):""}function fLn(e,r){const t={type:"text",value:_Ln(String(r.value))};return e.patch(r,t),e.applyData(r,t)}function dLn(e,r){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,t),e.applyData(r,t)}const hLn={blockquote:qDn,break:UDn,code:GDn,delete:WDn,emphasis:KDn,footnoteReference:VDn,heading:QDn,html:XDn,imageReference:YDn,image:ZDn,inlineCode:JDn,linkReference:eLn,link:tLn,listItem:rLn,list:sLn,paragraph:oLn,root:aLn,strong:iLn,table:cLn,tableCell:uLn,tableRow:lLn,text:fLn,thematicBreak:dLn,toml:t1,yaml:t1,definition:t1,footnoteDefinition:t1};function t1(){}const uF=-1,nx=0,Zm=1,Db=2,S6=3,C6=4,z6=5,E6=6,_F=7,fF=8,pLn=typeof self=="object"?self:globalThis,zT=(e,r)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new pLn[e](r)},mLn=(e,r)=>{const t=(s,o)=>(e.set(o,s),s),n=s=>{if(e.has(s))return e.get(s);const[o,a]=r[s];switch(o){case nx:case uF:return t(a,s);case Zm:{const i=t([],s);for(const c of a)i.push(n(c));return i}case Db:{const i=t({},s);for(const[c,u]of a)i[n(c)]=n(u);return i}case S6:return t(new Date(a),s);case C6:{const{source:i,flags:c}=a;return t(new RegExp(i,c),s)}case z6:{const i=t(new Map,s);for(const[c,u]of a)i.set(n(c),n(u));return i}case E6:{const i=t(new Set,s);for(const c of a)i.add(n(c));return i}case _F:{const{name:i,message:c}=a;return t(zT(i,c),s)}case fF:return t(BigInt(a),s);case"BigInt":return t(Object(BigInt(a)),s);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:i}=new Uint8Array(a);return t(new DataView(i),a)}}return t(zT(o,a),s)};return n},ET=e=>mLn(new Map,e)(0),hf="",{toString:gLn}={},{keys:vLn}=Object,zm=e=>{const r=typeof e;if(r!=="object"||!e)return[nx,r];const t=gLn.call(e).slice(8,-1);switch(t){case"Array":return[Zm,hf];case"Object":return[Db,hf];case"Date":return[S6,hf];case"RegExp":return[C6,hf];case"Map":return[z6,hf];case"Set":return[E6,hf];case"DataView":return[Zm,t]}return t.includes("Array")?[Zm,t]:t.includes("Error")?[_F,t]:[Db,t]},r1=([e,r])=>e===nx&&(r==="function"||r==="symbol"),bLn=(e,r,t,n)=>{const s=(a,i)=>{const c=n.push(a)-1;return t.set(i,c),c},o=a=>{if(t.has(a))return t.get(a);let[i,c]=zm(a);switch(i){case nx:{let d=a;switch(c){case"bigint":i=fF,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return s([uF],a)}return s([i,d],a)}case Zm:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const d=[],_=s([i,d],a);for(const p of a)d.push(o(p));return _}case Db:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(r&&"toJSON"in a)return o(a.toJSON());const d=[],_=s([i,d],a);for(const p of vLn(a))(e||!r1(zm(a[p])))&&d.push([o(p),o(a[p])]);return _}case S6:return s([i,isNaN(a.getTime())?hf:a.toISOString()],a);case C6:{const{source:d,flags:_}=a;return s([i,{source:d,flags:_}],a)}case z6:{const d=[],_=s([i,d],a);for(const[p,m]of a)(e||!(r1(zm(p))||r1(zm(m))))&&d.push([o(p),o(m)]);return _}case E6:{const d=[],_=s([i,d],a);for(const p of a)(e||!r1(zm(p)))&&d.push(o(p));return _}}const{message:u}=a;return s([i,{name:c,message:u}],a)};return o},NT=(e,{json:r,lossy:t}={})=>{const n=[];return bLn(!(r||t),!!r,new Map,n)(e),n},Lb=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?ET(NT(e,r)):structuredClone(e):(e,r)=>ET(NT(e,r));function yLn(e,r){const t=[{type:"text",value:"↩"}];return r>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),t}function xLn(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function wLn(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||yLn,n=e.options.footnoteBackLabel||xLn,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},i=[];let c=-1;for(;++c0&&k.push({type:"text",value:" "});let x=typeof t=="string"?t:t(c,m);typeof x=="string"&&(x={type:"text",value:x}),k.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(c,m),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const x=v.children[v.children.length-1];x&&x.type==="text"?x.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...k)}else d.push(...k);const b={type:"element",tagName:"li",properties:{id:r+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,b),i.push(b)}if(i.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Lb(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(r,u),e.applyData(r,u)}function nLn(e){let r=!1;if(e.type==="list"){r=e.spread||!1;const t=e.children;let n=-1;for(;!r&&++n1}function sLn(e,r){const t={},n=e.all(r);let s=-1;for(typeof r.start=="number"&&r.start!==1&&(t.start=r.start);++s0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},i=b6(r.children[1]),c=FB(r.children[r.children.length-1]);i&&c&&(a.position={start:i,end:c}),s.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(r,o),e.applyData(r,o)}function lLn(e,r,t){const n=t?t.children:void 0,o=(n?n.indexOf(r):1)===0?"th":"td",a=t&&t.type==="table"?t.align:void 0,i=a?a.length:r.children.length;let c=-1;const u=[];for(;++c0,!0),n[0]),s=n.index+n[0].length,n=t.exec(r);return o.push(CT(r.slice(s),s>0,!1)),o.join("")}function CT(e,r,t){let n=0,s=e.length;if(r){let o=e.codePointAt(n);for(;o===jT||o===ST;)n++,o=e.codePointAt(n)}if(t){let o=e.codePointAt(s-1);for(;o===jT||o===ST;)s--,o=e.codePointAt(s-1)}return s>n?e.slice(n,s):""}function fLn(e,r){const t={type:"text",value:_Ln(String(r.value))};return e.patch(r,t),e.applyData(r,t)}function dLn(e,r){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,t),e.applyData(r,t)}const hLn={blockquote:qDn,break:UDn,code:GDn,delete:WDn,emphasis:KDn,footnoteReference:VDn,heading:QDn,html:XDn,imageReference:YDn,image:ZDn,inlineCode:JDn,linkReference:eLn,link:tLn,listItem:rLn,list:sLn,paragraph:oLn,root:aLn,strong:iLn,table:cLn,tableCell:uLn,tableRow:lLn,text:fLn,thematicBreak:dLn,toml:t1,yaml:t1,definition:t1,footnoteDefinition:t1};function t1(){}const uF=-1,nx=0,Zm=1,Db=2,S6=3,C6=4,z6=5,E6=6,_F=7,fF=8,pLn=typeof self=="object"?self:globalThis,zT=(e,r)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new pLn[e](r)},mLn=(e,r)=>{const t=(s,o)=>(e.set(o,s),s),n=s=>{if(e.has(s))return e.get(s);const[o,a]=r[s];switch(o){case nx:case uF:return t(a,s);case Zm:{const i=t([],s);for(const c of a)i.push(n(c));return i}case Db:{const i=t({},s);for(const[c,u]of a)i[n(c)]=n(u);return i}case S6:return t(new Date(a),s);case C6:{const{source:i,flags:c}=a;return t(new RegExp(i,c),s)}case z6:{const i=t(new Map,s);for(const[c,u]of a)i.set(n(c),n(u));return i}case E6:{const i=t(new Set,s);for(const c of a)i.add(n(c));return i}case _F:{const{name:i,message:c}=a;return t(zT(i,c),s)}case fF:return t(BigInt(a),s);case"BigInt":return t(Object(BigInt(a)),s);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:i}=new Uint8Array(a);return t(new DataView(i),a)}}return t(zT(o,a),s)};return n},ET=e=>mLn(new Map,e)(0),hf="",{toString:gLn}={},{keys:vLn}=Object,zm=e=>{const r=typeof e;if(r!=="object"||!e)return[nx,r];const t=gLn.call(e).slice(8,-1);switch(t){case"Array":return[Zm,hf];case"Object":return[Db,hf];case"Date":return[S6,hf];case"RegExp":return[C6,hf];case"Map":return[z6,hf];case"Set":return[E6,hf];case"DataView":return[Zm,t]}return t.includes("Array")?[Zm,t]:t.includes("Error")?[_F,t]:[Db,t]},r1=([e,r])=>e===nx&&(r==="function"||r==="symbol"),bLn=(e,r,t,n)=>{const s=(a,i)=>{const c=n.push(a)-1;return t.set(i,c),c},o=a=>{if(t.has(a))return t.get(a);let[i,c]=zm(a);switch(i){case nx:{let d=a;switch(c){case"bigint":i=fF,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return s([uF],a)}return s([i,d],a)}case Zm:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const d=[],_=s([i,d],a);for(const p of a)d.push(o(p));return _}case Db:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(r&&"toJSON"in a)return o(a.toJSON());const d=[],_=s([i,d],a);for(const p of vLn(a))(e||!r1(zm(a[p])))&&d.push([o(p),o(a[p])]);return _}case S6:return s([i,isNaN(a.getTime())?hf:a.toISOString()],a);case C6:{const{source:d,flags:_}=a;return s([i,{source:d,flags:_}],a)}case z6:{const d=[],_=s([i,d],a);for(const[p,m]of a)(e||!(r1(zm(p))||r1(zm(m))))&&d.push([o(p),o(m)]);return _}case E6:{const d=[],_=s([i,d],a);for(const p of a)(e||!r1(zm(p)))&&d.push(o(p));return _}}const{message:u}=a;return s([i,{name:c,message:u}],a)};return o},NT=(e,{json:r,lossy:t}={})=>{const n=[];return bLn(!(r||t),!!r,new Map,n)(e),n},Lb=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?ET(NT(e,r)):structuredClone(e):(e,r)=>ET(NT(e,r));function yLn(e,r){const t=[{type:"text",value:"↩"}];return r>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),t}function xLn(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function wLn(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||yLn,n=e.options.footnoteBackLabel||xLn,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},i=[];let c=-1;for(;++c0&&k.push({type:"text",value:" "});let w=typeof t=="string"?t:t(c,m);typeof w=="string"&&(w={type:"text",value:w}),k.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(c,m),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const w=v.children[v.children.length-1];w&&w.type==="text"?w.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...k)}else d.push(...k);const b={type:"element",tagName:"li",properties:{id:r+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,b),i.push(b)}if(i.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Lb(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(i,!0)},{type:"text",value:` -`}]}}const w0=(function(e){if(e==null)return CLn;if(typeof e=="function")return sx(e);if(typeof e=="object")return Array.isArray(e)?kLn(e):jLn(e);if(typeof e=="string")return SLn(e);throw new Error("Expected function, string, or object as test")});function kLn(e){const r=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let m=dF,k,w,v;if((!r||o(c,u,d[d.length-1]||void 0))&&(m=NLn(t(c,d)),m[0]===s5))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==hF)for(w=(n?b.children.length:-1)+a,v=d.concat(b);w>-1&&w":""))+")"})}return p;function p(){let m=dF,k,x,v;if((!r||o(c,u,d[d.length-1]||void 0))&&(m=NLn(t(c,d)),m[0]===s5))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==hF)for(x=(n?b.children.length:-1)+a,v=d.concat(b);x>-1&&x0&&t.push({type:"text",value:` `}),t}function AT(e){let r=0,t=e.charCodeAt(r);for(;t===9||t===32;)r++,t=e.charCodeAt(r);return e.slice(r)}function TT(e,r){const t=TLn(e,r),n=t.one(e,void 0),s=wLn(t),o=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return s&&o.children.push({type:"text",value:` -`},s),o}function Ib(e,r){return e&&"run"in e?async function(t,n){const s=TT(t,{file:n,...r});await e.run(s,n)}:function(t,n){return TT(t,{file:n,...e||r})}}function RT(e){if(e)throw e}var sk,MT;function DLn(){if(MT)return sk;MT=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):r.call(u)==="[object Array]"},o=function(u){if(!u||r.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),_=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!_)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,d){t&&d.name==="__proto__"?t(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},i=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(n)return n(u,d).value}else return;return u[d]};return sk=function c(){var u,d,_,p,m,k,w=arguments[0],v=1,b=arguments.length,x=!1;for(typeof w=="boolean"&&(x=w,w=arguments[1]||{},v=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});va.length;let c;i&&a.push(s);try{c=e.apply(this,a)}catch(u){const d=u;if(i&&t)throw d;return s(d)}i||(c&&c.then&&typeof c.then=="function"?c.then(o,s):c instanceof Error?s(c):o(c))}function s(a,...i){t||(t=!0,r(a,...i))}function o(a){s(null,a)}}const Ec={basename:BLn,dirname:FLn,extname:HLn,join:qLn,sep:"/"};function BLn(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');k0(e);let t=0,n=-1,s=e.length,o;if(r===void 0||r.length===0||r.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){t=s+1;break}}else n<0&&(o=!0,n=s+1);return n<0?"":e.slice(t,n)}if(r===e)return"";let a=-1,i=r.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){t=s+1;break}}else a<0&&(o=!0,a=s+1),i>-1&&(e.codePointAt(s)===r.codePointAt(i--)?i<0&&(n=s):(i=-1,n=a));return t===n?n=a:n<0&&(n=e.length),e.slice(t,n)}function FLn(e){if(k0(e),e.length===0)return".";let r=-1,t=e.length,n;for(;--t;)if(e.codePointAt(t)===47){if(n){r=t;break}}else n||(n=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function HLn(e){k0(e);let r=e.length,t=-1,n=0,s=-1,o=0,a;for(;r--;){const i=e.codePointAt(r);if(i===47){if(a){n=r+1;break}continue}t<0&&(a=!0,t=r+1),i===46?s<0?s=r:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||t<0||o===0||o===1&&s===t-1&&s===n+1?"":e.slice(s,t)}function qLn(...e){let r=-1,t;for(;++r0&&e.codePointAt(e.length-1)===47&&(t+="/"),r?"/"+t:t}function GLn(e,r){let t="",n=0,s=-1,o=0,a=-1,i,c;for(;++a<=e.length;){if(a2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",n=0):(t=t.slice(0,c),n=t.length-1-t.lastIndexOf("/")),s=a,o=0;continue}}else if(t.length>0){t="",n=0,s=a,o=0;continue}}r&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+e.slice(s+1,a):t=e.slice(s+1,a),n=a-s-1;s=a,o=0}else i===46&&o>-1?o++:o=-1}return t}function k0(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const WLn={cwd:KLn};function KLn(){return"/"}function i5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function VLn(e){if(typeof e=="string")e=new URL(e);else if(!i5(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return QLn(e)}function QLn(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const r=e.pathname;let t=-1;for(;++t0){let[m,...k]=d;const w=n[p][1];a5(w)&&a5(m)&&(m=ok(!0,w,m)),n[p]=[u,m,...k]}}}}const ox=new T6().freeze();function lk(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uk(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _k(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $T(e){if(!a5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function DT(e,r,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function n1(e){return JLn(e)?e:new pF(e)}function JLn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eIn(e){return typeof e=="string"||tIn(e)}function tIn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rIn="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",LT=[],IT={allowDangerousHtml:!0},nIn=/^(https?|ircs?|mailto|xmpp)$/i,sIn=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function oIn(e){const r=aIn(e),t=iIn(e);return cIn(r.runSync(r.parse(t),t),e)}function aIn(e){const r=e.rehypePlugins||LT,t=e.remarkPlugins||LT,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...IT}:IT;return ox().use(rx).use(t).use(Ib,n).use(r)}function iIn(e){const r=e.children||"",t=new pF;return typeof r=="string"&&(t.value=r),t}function cIn(e,r){const t=r.allowedElements,n=r.allowElement,s=r.components,o=r.disallowedElements,a=r.skipHtml,i=r.unwrapDisallowed,c=r.urlTransform||mF;for(const d of sIn)Object.hasOwn(r,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+rIn+d.id,void 0);return A6(e,u),UB(e,{Fragment:f.Fragment,components:s,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(d,_,p){if(d.type==="raw"&&p&&typeof _=="number")return a?p.children.splice(_,1):p.children[_]={type:"text",value:d.value},_;if(d.type==="element"){let m;for(m in tk)if(Object.hasOwn(tk,m)&&Object.hasOwn(d.properties,m)){const k=d.properties[m],w=tk[m];(w===null||w.includes(d.tagName))&&(d.properties[m]=c(String(k||""),m,d))}}if(d.type==="element"){let m=t?!t.includes(d.tagName):o?o.includes(d.tagName):!1;if(!m&&n&&typeof _=="number"&&(m=!n(d,_,p)),m&&p&&typeof _=="number")return i&&d.children?p.children.splice(_,1,...d.children):p.children.splice(_,1),_}}}function mF(e){const r=e.indexOf(":"),t=e.indexOf("?"),n=e.indexOf("#"),s=e.indexOf("/");return r===-1||s!==-1&&r>s||t!==-1&&r>t||n!==-1&&r>n||nIn.test(e.slice(0,r))?e:""}function ax(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function Pb(e,r,t=!1){const n=r.indexOf("#"),s=n===-1?r:r.slice(0,n),o=n===-1?"":r.slice(n),a=s.indexOf("?"),i=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1);let u;try{u=decodeURIComponent(i)}catch{return null}if(!u||u.includes("\0"))return null;const d=u.startsWith("/"),_=d?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(_.length===0)return null;_.pop();continue}_.push(p)}return _.length===0?null:{path:`${t&&(d||e.startsWith("/"))?"/":""}${_.join("/")}`,query:c,hash:o}}function gF(e){return e.replace(/[%#?:]/g,encodeURIComponent)}function lIn(e,r){let t;try{t=decodeURIComponent(e.replaceAll("\\","/").split("/").slice(0,-1).join("/"))}catch{return null}const n=Pb(t,r,!0);return n?gF(n.path)+n.hash:null}function uIn(e,r){if(r)return r(e);try{return decodeURI(e)}catch{return null}}function _In(e,r){return`${e}${r.query?`&${r.query}`:""}${r.hash}`}function c5(e){const r=/^(.+?)(?::(\d+)(?:[:-]\d+)?|#L(\d+)(?:C\d+)?(?:-L?\d+(?:C\d+)?)?)$/.exec(e);if(!r)return{path:e};const t=Number(r[2]??r[3]);return t>0?{path:r[1],line:t}:{path:r[1]}}function fIn(e){const r=Number.parseInt(e.replace(/^L/i,""),10);return r>0?r:void 0}function Bb(e){return/^[a-z]:[\\/]/i.test(e)}function l5(e){const r=Bb(e);if(!r&&ax(e))return null;const t=Pb("",r?e.replaceAll("\\","/"):e,!0);if(!t)return null;const n={path:t.path,hash:t.hash};return Bb(n.path)?{...n,path:n.path.replaceAll("\\","/"),source:"absolute"}:n.path.startsWith("/")||n.path.startsWith("~/")||r?{...n,source:"absolute"}:n.path.startsWith("artifacts/")?{...n,path:n.path.slice(10),source:"artifact"}:{...n,source:"checkout"}}function dIn(){return e=>{const r=t=>{var n;for(const s of["href","src"])if(t.properties&&Object.hasOwn(t.properties,s)){const o=String(t.properties[s]||"");s==="href"&&c5(o).line!=null&&(t.properties["data-cited-href"]=o),t.properties[s]=s==="src"&&t.tagName==="img"&&Bb(o)?o:mF(o)}(n=t.children)==null||n.forEach(r)};r(e)}}function hIn({projects:e,activity:r,projectId:t,projectName:n,onSelect:s,onNewProject:o}){const{open:a,setOpen:i,ref:c}=ba(),u=new Map(r.map(_=>[_.projectId,_.lastActivityAt])),d=[...e].sort((_,p)=>+(p.id===t)-+(_.id===t)||Math.max(u.get(p.id)??0,p.updatedAt)-Math.max(u.get(_.id)??0,_.updatedAt));return f.jsxs("div",{ref:c,className:"relative mb-2 w-fit max-w-full",children:[f.jsxs(Oe,{className:"max-w-full gap-2 rounded-lg px-3 text-sm font-normal text-text","aria-haspopup":"menu","aria-expanded":a,onClick:()=>i(_=>!_),children:[f.jsx(Ci,{size:15,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:n}),f.jsx(Zc,{size:12,className:"shrink-0 text-subtext"})]}),a&&f.jsxs("div",{role:"menu","aria-label":Kj(),className:"absolute bottom-full start-0 z-50 mb-2 w-64 max-w-[calc(100vw-2rem)] rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsx("div",{className:"px-2 py-1 text-sm text-subtext",children:CD()}),f.jsx("div",{className:"max-h-64 overflow-y-auto pb-1.5",children:d.map(_=>f.jsxs(_r,{role:"menuitemradio","aria-checked":_.id===t,size:"compact",className:"text-sm",onClick:()=>{i(!1),s(_.id)},children:[f.jsx("span",{className:"truncate",children:_.name}),_.id===t&&f.jsx(uo,{size:13,className:"shrink-0"})]},_.id))}),f.jsx("div",{className:"mb-1 border-t border-border"}),f.jsx(_r,{role:"menuitem",size:"compact",className:"text-sm",onClick:()=>{i(!1),o()},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(pd,{size:14}),pb()]})})]})]})}function vF(e){const r=e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo);return`${qnr({name:e.name})} +`},s),o}function Ib(e,r){return e&&"run"in e?async function(t,n){const s=TT(t,{file:n,...r});await e.run(s,n)}:function(t,n){return TT(t,{file:n,...e||r})}}function RT(e){if(e)throw e}var sk,MT;function DLn(){if(MT)return sk;MT=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):r.call(u)==="[object Array]"},o=function(u){if(!u||r.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),_=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!_)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,d){t&&d.name==="__proto__"?t(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},i=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(n)return n(u,d).value}else return;return u[d]};return sk=function c(){var u,d,_,p,m,k,x=arguments[0],v=1,b=arguments.length,w=!1;for(typeof x=="boolean"&&(w=x,x=arguments[1]||{},v=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});va.length;let c;i&&a.push(s);try{c=e.apply(this,a)}catch(u){const d=u;if(i&&t)throw d;return s(d)}i||(c&&c.then&&typeof c.then=="function"?c.then(o,s):c instanceof Error?s(c):o(c))}function s(a,...i){t||(t=!0,r(a,...i))}function o(a){s(null,a)}}const Ec={basename:BLn,dirname:FLn,extname:HLn,join:qLn,sep:"/"};function BLn(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');k0(e);let t=0,n=-1,s=e.length,o;if(r===void 0||r.length===0||r.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){t=s+1;break}}else n<0&&(o=!0,n=s+1);return n<0?"":e.slice(t,n)}if(r===e)return"";let a=-1,i=r.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){t=s+1;break}}else a<0&&(o=!0,a=s+1),i>-1&&(e.codePointAt(s)===r.codePointAt(i--)?i<0&&(n=s):(i=-1,n=a));return t===n?n=a:n<0&&(n=e.length),e.slice(t,n)}function FLn(e){if(k0(e),e.length===0)return".";let r=-1,t=e.length,n;for(;--t;)if(e.codePointAt(t)===47){if(n){r=t;break}}else n||(n=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function HLn(e){k0(e);let r=e.length,t=-1,n=0,s=-1,o=0,a;for(;r--;){const i=e.codePointAt(r);if(i===47){if(a){n=r+1;break}continue}t<0&&(a=!0,t=r+1),i===46?s<0?s=r:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||t<0||o===0||o===1&&s===t-1&&s===n+1?"":e.slice(s,t)}function qLn(...e){let r=-1,t;for(;++r0&&e.codePointAt(e.length-1)===47&&(t+="/"),r?"/"+t:t}function GLn(e,r){let t="",n=0,s=-1,o=0,a=-1,i,c;for(;++a<=e.length;){if(a2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",n=0):(t=t.slice(0,c),n=t.length-1-t.lastIndexOf("/")),s=a,o=0;continue}}else if(t.length>0){t="",n=0,s=a,o=0;continue}}r&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+e.slice(s+1,a):t=e.slice(s+1,a),n=a-s-1;s=a,o=0}else i===46&&o>-1?o++:o=-1}return t}function k0(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const WLn={cwd:KLn};function KLn(){return"/"}function i5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function VLn(e){if(typeof e=="string")e=new URL(e);else if(!i5(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return QLn(e)}function QLn(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const r=e.pathname;let t=-1;for(;++t0){let[m,...k]=d;const x=n[p][1];a5(x)&&a5(m)&&(m=ok(!0,x,m)),n[p]=[u,m,...k]}}}}const ox=new T6().freeze();function lk(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uk(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _k(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $T(e){if(!a5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function DT(e,r,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function n1(e){return JLn(e)?e:new pF(e)}function JLn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eIn(e){return typeof e=="string"||tIn(e)}function tIn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rIn="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",LT=[],IT={allowDangerousHtml:!0},nIn=/^(https?|ircs?|mailto|xmpp)$/i,sIn=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function oIn(e){const r=aIn(e),t=iIn(e);return cIn(r.runSync(r.parse(t),t),e)}function aIn(e){const r=e.rehypePlugins||LT,t=e.remarkPlugins||LT,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...IT}:IT;return ox().use(rx).use(t).use(Ib,n).use(r)}function iIn(e){const r=e.children||"",t=new pF;return typeof r=="string"&&(t.value=r),t}function cIn(e,r){const t=r.allowedElements,n=r.allowElement,s=r.components,o=r.disallowedElements,a=r.skipHtml,i=r.unwrapDisallowed,c=r.urlTransform||mF;for(const d of sIn)Object.hasOwn(r,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+rIn+d.id,void 0);return A6(e,u),UB(e,{Fragment:f.Fragment,components:s,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(d,_,p){if(d.type==="raw"&&p&&typeof _=="number")return a?p.children.splice(_,1):p.children[_]={type:"text",value:d.value},_;if(d.type==="element"){let m;for(m in tk)if(Object.hasOwn(tk,m)&&Object.hasOwn(d.properties,m)){const k=d.properties[m],x=tk[m];(x===null||x.includes(d.tagName))&&(d.properties[m]=c(String(k||""),m,d))}}if(d.type==="element"){let m=t?!t.includes(d.tagName):o?o.includes(d.tagName):!1;if(!m&&n&&typeof _=="number"&&(m=!n(d,_,p)),m&&p&&typeof _=="number")return i&&d.children?p.children.splice(_,1,...d.children):p.children.splice(_,1),_}}}function mF(e){const r=e.indexOf(":"),t=e.indexOf("?"),n=e.indexOf("#"),s=e.indexOf("/");return r===-1||s!==-1&&r>s||t!==-1&&r>t||n!==-1&&r>n||nIn.test(e.slice(0,r))?e:""}function ax(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function Pb(e,r,t=!1){const n=r.indexOf("#"),s=n===-1?r:r.slice(0,n),o=n===-1?"":r.slice(n),a=s.indexOf("?"),i=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1);let u;try{u=decodeURIComponent(i)}catch{return null}if(!u||u.includes("\0"))return null;const d=u.startsWith("/"),_=d?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(_.length===0)return null;_.pop();continue}_.push(p)}return _.length===0?null:{path:`${t&&(d||e.startsWith("/"))?"/":""}${_.join("/")}`,query:c,hash:o}}function gF(e){return e.replace(/[%#?:]/g,encodeURIComponent)}function lIn(e,r){let t;try{t=decodeURIComponent(e.replaceAll("\\","/").split("/").slice(0,-1).join("/"))}catch{return null}const n=Pb(t,r,!0);return n?gF(n.path)+n.hash:null}function uIn(e,r){if(r)return r(e);try{return decodeURI(e)}catch{return null}}function _In(e,r){return`${e}${r.query?`&${r.query}`:""}${r.hash}`}function c5(e){const r=/^(.+?)(?::(\d+)(?:[:-]\d+)?|#L(\d+)(?:C\d+)?(?:-L?\d+(?:C\d+)?)?)$/.exec(e);if(!r)return{path:e};const t=Number(r[2]??r[3]);return t>0?{path:r[1],line:t}:{path:r[1]}}function fIn(e){const r=Number.parseInt(e.replace(/^L/i,""),10);return r>0?r:void 0}function Bb(e){return/^[a-z]:[\\/]/i.test(e)}function l5(e){const r=Bb(e);if(!r&&ax(e))return null;const t=Pb("",r?e.replaceAll("\\","/"):e,!0);if(!t)return null;const n={path:t.path,hash:t.hash};return Bb(n.path)?{...n,path:n.path.replaceAll("\\","/"),source:"absolute"}:n.path.startsWith("/")||n.path.startsWith("~/")||r?{...n,source:"absolute"}:n.path.startsWith("artifacts/")?{...n,path:n.path.slice(10),source:"artifact"}:{...n,source:"checkout"}}function dIn(){return e=>{const r=t=>{var n;for(const s of["href","src"])if(t.properties&&Object.hasOwn(t.properties,s)){const o=String(t.properties[s]||"");s==="href"&&c5(o).line!=null&&(t.properties["data-cited-href"]=o),t.properties[s]=s==="src"&&t.tagName==="img"&&Bb(o)?o:mF(o)}(n=t.children)==null||n.forEach(r)};r(e)}}function hIn({projects:e,activity:r,projectId:t,projectName:n,onSelect:s,onNewProject:o}){const{open:a,setOpen:i,ref:c}=ba(),u=new Map(r.map(_=>[_.projectId,_.lastActivityAt])),d=[...e].sort((_,p)=>+(p.id===t)-+(_.id===t)||Math.max(u.get(p.id)??0,p.updatedAt)-Math.max(u.get(_.id)??0,_.updatedAt));return f.jsxs("div",{ref:c,className:"relative mb-2 w-fit max-w-full",children:[f.jsxs(Oe,{className:"max-w-full gap-2 rounded-lg px-3 text-sm font-normal text-text","aria-haspopup":"menu","aria-expanded":a,onClick:()=>i(_=>!_),children:[f.jsx(Ci,{size:15,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:n}),f.jsx(Zc,{size:12,className:"shrink-0 text-subtext"})]}),a&&f.jsxs("div",{role:"menu","aria-label":Kj(),className:"absolute bottom-full start-0 z-50 mb-2 w-64 max-w-[calc(100vw-2rem)] rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsx("div",{className:"px-2 py-1 text-sm text-subtext",children:CD()}),f.jsx("div",{className:"max-h-64 overflow-y-auto pb-1.5",children:d.map(_=>f.jsxs(_r,{role:"menuitemradio","aria-checked":_.id===t,size:"compact",className:"text-sm",onClick:()=>{i(!1),s(_.id)},children:[f.jsx("span",{className:"truncate",children:_.name}),_.id===t&&f.jsx(_o,{size:13,className:"shrink-0"})]},_.id))}),f.jsx("div",{className:"mb-1 border-t border-border"}),f.jsx(_r,{role:"menuitem",size:"compact",className:"text-sm",onClick:()=>{i(!1),o()},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(pd,{size:14}),pb()]})})]})]})}function vF(e){const r=e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo);return`${qnr({name:e.name})} -${r?vsr():Esr()}`}function pIn({project:e,chatCount:r,collapsed:t,busy:n,onToggleCollapsed:s,onRemoved:o,onNewChat:a,pinned:i,onPin:c}){const u=T.useRef(null),d=T.useRef(null),_=T.useId(),[p,m]=T.useState(!1),[k,w]=T.useState(!1),[v,b]=T.useState(!1);T.useEffect(()=>{const z=E=>{var A,N;E.target instanceof Node&&((A=d.current)!=null&&A.contains(E.target))||(N=d.current)==null||N.hidePopover()};return window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[]);function x(z,E){if(!z||!E)return;z.showPopover();const A=E.getBoundingClientRect(),N=z.getBoundingClientRect(),M=A.right+12+N.width<=window.innerWidth-8?A.right+12:Math.max(8,A.left-N.width-12);z.style.left=`${M}px`,z.style.top=`${Math.max(8,Math.min(A.top,window.innerHeight-N.height-8))}px`}function y(){var z;(z=d.current)==null||z.hidePopover(),w(!0)}async function S(){var z;if((z=d.current)==null||z.hidePopover(),!(v||!window.confirm(vF(e)))){b(!0);try{await BL(e.id),o()}catch(E){tr(E instanceof Error?E.message:String(E),"error")}finally{b(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button","aria-expanded":!t,onClick:s,className:"flex h-7 min-w-0 flex-1 cursor-pointer items-center gap-[7px] rounded-sm py-1 text-start text-sm font-normal text-text focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2",children:[t?f.jsx(FI,{size:15,className:"shrink-0"}):f.jsx(Ci,{size:15,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:e.name}),n&&f.jsx("span",{"aria-hidden":!0,className:"size-[7px] shrink-0 rounded-full bg-primary animate-[or-pulse_1.2s_infinite]"})]}),f.jsx(Rt,{ref:u,size:"small",className:`text-text group-hover:opacity-100 group-focus-within:opacity-100 ${p?"bg-surface opacity-100":"opacity-0"}`,"aria-label":Snn({name:e.name}),"aria-controls":_,"aria-haspopup":"menu","aria-expanded":p,onClick:()=>{var z,E,A;(z=d.current)!=null&&z.matches(":popover-open")?d.current.hidePopover():(x(d.current,u.current),(A=(E=d.current)==null?void 0:E.querySelector("button"))==null||A.focus())},children:f.jsx(wp,{size:15})}),f.jsx(d0,{interactive:!0,content:W4(),className:"rounded-sm",children:f.jsx(Rt,{size:"small",className:"text-text opacity-0 group-hover:opacity-100 group-focus-within:opacity-100","aria-label":`${W4()} · ${e.name}`,onClick:a,children:f.jsx(pd,{size:15})})}),f.jsxs("div",{ref:d,id:_,popover:"auto",role:"menu","aria-label":e.name,onToggle:z=>m(z.newState==="open"),onKeyDown:z=>{var N;if(z.key!=="ArrowDown"&&z.key!=="ArrowUp")return;z.preventDefault();const E=[...z.currentTarget.querySelectorAll("button:not(:disabled)")],A=E.findIndex(M=>M===document.activeElement);(N=E[(A+(z.key==="ArrowDown"?1:E.length-1))%E.length])==null||N.focus()},className:"fixed inset-auto m-0 w-72 max-w-[calc(100vw-1rem)] rounded-xl border border-border bg-background p-2 text-text shadow-modal",children:[f.jsxs("div",{role:"presentation",className:"mb-1 border-b border-border px-2 pb-2 pt-1 text-sm",children:[f.jsx("div",{className:"truncate font-medium",children:e.name}),f.jsxs("div",{className:"mt-1 flex items-center gap-1.5 text-subtext",children:[f.jsx(T9n,{size:13}),r===void 0?"…":pnn({count:r})]}),f.jsx("div",{className:"mt-2 break-all text-xs text-subtext",children:e.repoPath})]}),f.jsx(_r,{role:"menuitem",onClick:()=>{var z;c(),(z=d.current)==null||z.hidePopover()},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Q9n,{size:16}),i?tsn():onn()]})}),f.jsx(_r,{role:"menuitem",onClick:y,children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Ey,{size:16}),hD()]})}),f.jsx(_r,{role:"menuitem",onClick:()=>{var z;(z=d.current)==null||z.hidePopover(),qL(e.id,".").catch(E=>tr(E instanceof Error?E.message:String(E),"error"))},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Ci,{size:16}),$nn()]})}),f.jsx("div",{className:"my-1 border-t border-border"}),f.jsx(_r,{role:"menuitem",danger:!0,disabled:v,onClick:()=>void S(),children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(gd,{size:16}),YD()]})})]}),k&&_o.createPortal(f.jsx(mIn,{project:e,onClose:()=>w(!1),onRemoved:o}),document.body)]})}function mIn({project:e,onClose:r,onRemoved:t}){const n=T.useRef(null),s=T.useId(),o=T.useId(),[a,i]=T.useState(e.name),[c,u]=T.useState(!1),[d,_]=T.useState(""),p=()=>{c||r()};xp(n,p);async function m(){if(!(c||!a.trim())){u(!0),_("");try{await iSn(e.id,{name:a.trim()}),r()}catch(w){_(w instanceof Error?w.message:String(w))}finally{u(!1)}}}async function k(){if(!(c||!window.confirm(vF(e)))){u(!0),_("");try{await BL(e.id),r(),t()}catch(w){_(w instanceof Error?w.message:String(w))}finally{u(!1)}}}return f.jsx("div",{className:"modal-backdrop fixed inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-5",onClick:w=>{w.target===w.currentTarget&&p()},children:f.jsxs("div",{ref:n,role:"dialog","aria-modal":"true","aria-labelledby":s,tabIndex:-1,className:"modal w-120 max-w-full max-h-[calc(100vh-2.5rem)] overflow-y-auto rounded-xl border border-border bg-background p-6 text-text shadow-modal",children:[f.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[f.jsx("h2",{id:s,className:"m-0 text-xl font-medium",children:brn()}),f.jsx(Rt,{"aria-label":vb(),onClick:p,disabled:c,children:f.jsx(pn,{size:16})})]}),f.jsxs("form",{onSubmit:w=>{w.preventDefault(),m()},children:[f.jsx("label",{htmlFor:o,className:"sr-only",children:Z4()}),f.jsxs("div",{className:"relative",children:[f.jsx(Ci,{size:16,className:"pointer-events-none absolute start-3 top-3 text-subtext"}),f.jsx(Nn,{id:o,"data-initial-focus":!0,value:a,onChange:w=>i(w.target.value),disabled:c,required:!0,className:"h-10 ps-10"})]}),f.jsx("div",{className:"mt-5 mb-2 text-sm font-medium",children:Gnn()}),f.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border p-3 text-sm",children:[f.jsx(Ci,{size:16,className:"mt-0.5 shrink-0 text-subtext"}),f.jsx("span",{className:"min-w-0 break-all",children:e.repoPath})]}),d&&f.jsx("p",{role:"alert",className:"mt-3 text-sm text-accent-red",children:d}),f.jsxs("div",{className:"mt-6 flex items-center gap-2",children:[f.jsx(Oe,{type:"button",variant:"danger",disabled:c,onClick:()=>void k(),children:YD()}),f.jsx("div",{className:"flex-1"}),f.jsx(Oe,{type:"button",variant:"ghost",disabled:c,onClick:p,children:Jnr()}),f.jsx(Oe,{type:"submit",variant:"primary",disabled:c||!a.trim(),children:nc()})]})]})]})})}const Jm=e=>e.kind==="project"?36:34;function PT(e,r,t){const n=e.find(i=>i.kind==="chat"&&i.session.id===t),s=n&&e.find(i=>i.kind==="project"&&i.project.id===n.project.id),o=(i,c)=>{const u=[];let d=0;for(const p of i){if(d+Jm(p)>c)break;u.push(p),d+=Jm(p)}const _=u.at(-1);return(_==null?void 0:_.kind)==="project"&&!_.collapsed&&u.pop(),u},a=o(e,r);return!n||a.includes(n)?a:s?r<70?a:[...o(e.filter(i=>i.project.id!==n.project.id),r-70),s,n]:r<34?a:[...o(e.filter(i=>i!==n),r-34),n]}function gIn(e,r,t){const n=new Array(e);return new Proxy(n,{get(s,o,a){if(typeof o=="string"){const i=o.charCodeAt(0);if(i>=48&&i<=57){const c=+o;if(Number.isInteger(c)&&c>=0&&cn[d]!==u))&&(n=i,s=r(...i),t!=null&&t.onChange&&!(o&&t.skipInitialOnChange)&&t.onChange(s),o=!1),s}return a.updateDeps=i=>{n=i},a}function BT(e,r){if(e===void 0)throw new Error("Unexpected undefined");return e}const vIn=(e,r)=>Math.abs(e-r)<1.01,bIn=(e,r,t)=>{let n;return Object.assign(function(...s){e.clearTimeout(n),n=e.setTimeout(()=>r.apply(this,s),t)},{cancel:()=>{e.clearTimeout(n)}})};let Em;const fk=()=>{if(Em!==void 0)return Em;if(typeof navigator>"u")return Em=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Em=!0;const e=navigator.maxTouchPoints;return Em=navigator.platform==="MacIntel"&&e!==void 0&&e>0},FT=e=>{const{offsetWidth:r,offsetHeight:t}=e;return{width:r,height:t}},yIn=e=>e,R6=e=>{const r=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-r+1,s=new Array(n);for(let o=0;o{const t=e.scrollElement;if(!t)return;const n=e.targetWindow;if(!n)return;const s=a=>{const{width:i,height:c}=a;r({width:Math.round(i),height:Math.round(c)})};if(s(FT(t)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const i=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(FT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return o.observe(t,{box:"border-box"}),()=>{o.unobserve(t)}},Fb={passive:!0},wIn=typeof window>"u"?!0:"onscrollend"in window,kIn=(e,r,t)=>{const n=e.scrollElement;if(!n)return;const s=e.targetWindow;if(!s)return;const o=e.options.useScrollendEvent&&wIn;let a=0;const i=o?null:bIn(s,()=>r(a,!1),e.options.isScrollingResetDelay),c=_=>()=>{a=t(n),i==null||i(),r(a,_)},u=c(!0),d=c(!1);return n.addEventListener("scroll",u,Fb),o&&n.addEventListener("scrollend",d,Fb),()=>{n.removeEventListener("scroll",u),o&&n.removeEventListener("scrollend",d),i==null||i.cancel()}},jIn=(e,r)=>kIn(e,r,t=>{const{horizontal:n,isRtl:s}=e.options;return n?t.scrollLeft*(s&&-1||1):t.scrollTop}),SIn=(e,r,t)=>{if(t.options.useCachedMeasurements){const n=t.indexFromElement(e),s=t.options.getItemKey(n);return t.itemSizeCache.get(s)??t.options.estimateSize(n)}if(r!=null&&r.borderBoxSize){const n=r.borderBoxSize[0];if(n)return Math.round(n[t.options.horizontal?"inlineSize":"blockSize"])}if(!r){const n=t.indexFromElement(e),s=t.options.getItemKey(n),o=t.itemSizeCache.get(s);if(o!==void 0)return o}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},CIn=(e,{adjustments:r=0,behavior:t},n)=>{var s,o;(o=(s=n.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[n.options.horizontal?"left":"top"]:e+r,behavior:t})},zIn=CIn;class EIn{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,n,s;return((s=(n=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:n.now)==null?void 0:s.call(n))??Date.now()},this.observer=(()=>{let t=null;const n=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const a=()=>{const i=o.target,c=this.indexFromElement(i);if(!i.isConnected){this.observer.unobserve(i);for(const[u,d]of this.elementsCache)if(d===i){this.elementsCache.delete(u);break}return}this.isIndexInRange(c)&&this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(i,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var s;(s=n())==null||s.disconnect(),t=null},observe:s=>{var o;return(o=n())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=n())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var n,s;const o={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:yIn,rangeExtractor:R6,onChange:()=>{},measureElement:SIn,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const p in t){const m=t[p];m!==void 0&&(o[p]=m)}const a=this.options;let i=null,c=null,u=!1;if(a!==void 0&&a.enabled&&o.enabled&&o.anchorTo==="end"&&this.scrollElement!==null){const p=a.count,m=o.count,k=this.getMeasurements(),w=p>0?((n=k[0])==null?void 0:n.key)??a.getItemKey(0):null,v=p>0?((s=k[p-1])==null?void 0:s.key)??a.getItemKey(p-1):null;if(m!==p||p>0&&m>0&&(o.getItemKey(0)!==w||o.getItemKey(m-1)!==v)){u=!0;const y=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??k[0]:null;y&&(i=[y.key,this.getScrollOffset()-y.start]);const S=o.followOnAppend===!0?"auto":o.followOnAppend||null;S&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||o.getItemKey(m-1)!==v)&&(c=S)}}this.options=o,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let d=!1,_=0;if(i&&this.scrollOffset!==null){const[p,m]=i,k=this.getMeasurements(),{count:w,getItemKey:v}=this.options;let b=0;for(;b{var n,s;(s=(n=this.options).onChange)==null||s.call(n,this,t)},this.maybeNotify=oh(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}if(this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{if(a&&this._intendedScrollOffset===null&&o===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(o-this._intendedScrollOffset)<1.5&&(o=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(o-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const i=this.getScrollOffset();this.scrollDirection=a?i===o?this.scrollDirection:i{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},i=()=>{this._iosTouching=!1,!(!fk()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};o.addEventListener("touchstart",a,Fb),o.addEventListener("touchend",i,Fb),this.unsubs.push(()=>{o.removeEventListener("touchstart",a),o.removeEventListener("touchend",i),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[o,a,i,c]=s;o!==null&&!i&&(fk()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),i&&this.scrollToEnd({behavior:i})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:n}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>n+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),n=this.getMaxScrollOffset();if(t<0||t>n)return;if(this._iosDeferredAdjustment<0&&t>=n-1){this._iosDeferredAdjustment=0;return}const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=oh(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,n,s,o,a,i,c,u)=>(this.prevLanes!==void 0&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:t,paddingStart:n,scrollMargin:s,getItemKey:o,enabled:a,lanes:i,laneAssignmentMode:c,gap:u}),{key:!1}),this.isIndexInRange=t=>t>=0&&t[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:n,scrollMargin:s,getItemKey:o,enabled:a,lanes:i,laneAssignmentMode:c,gap:u},d)=>{const _=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const p=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),i===1){const b=t*2;let x=this._flatMeasurements;if(!x||x.length0&&z.set(x.subarray(0,p*2)),x=z,this._flatMeasurements=x}let y;if(p===0)y=n+s;else{const z=p-1;y=x[z*2]+x[z*2+1]+u}for(let z=p;z1){S=y;const $=k[S],D=$!==void 0?m[$]:void 0;z=D?D.end+u:n+s}else if(v===i){let $=0,D=w[0],I=k[0];for(let G=1;Gthis.options.debug}),this.calculateRange=oh(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,n,s,o)=>t.length===0||n===0?(this.range=null,null):(this.range=AIn(t,n,s,o,o===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=oh(()=>{let t=null,n=null;const s=this.calculateRange();return s&&(t=s.startIndex,n=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,n]},(t,n,s,o,a)=>o===null||a===null?[]:t({startIndex:o,endIndex:a,overscan:n,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const n=this.options.indexAttribute,s=t.getAttribute(n);return s?parseInt(s,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(s!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,s-o),i=Math.min(this.options.count-1,s+o);return t>=a&&t<=i}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((a,i)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(i))});return}const n=this.indexFromElement(t);if(!this.isIndexInRange(n))return;const s=this.options.getItemKey(n),o=this.elementsCache.get(s);o!==t&&(o&&this.observer.unobserve(o),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,n)=>{var s,o;if(!this.isIndexInRange(t))return;let a,i,c;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)c=this.options.getItemKey(t),i=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;c=p.key,i=p.start,a=p.size}const d=this.itemSizeCache.get(c)??a,_=n-d;if(_!==0){const p=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=p?this.getTotalSize():0,k=this.getScrollOffset()+this.scrollAdjustments,v=!this.itemSizeCache.has(c)?i[this.getVirtualIndexes(),this.getMeasurements()],(t,n)=>{const s=[];for(let o=0,a=t.length;othis.options.debug}),this.getVirtualItemForOffset=t=>{const n=this.getMeasurements();if(n.length===0)return;const s=this._flatMeasurements,o=this.options.lanes===1&&s!=null,a=bF(0,n.length-1,o?i=>s[i*2]:i=>BT(n[i]).start,t);return BT(n[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,n,s=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=t>=a+o?"end":"start"),n==="center"?t+=(s-o)/2:n==="end"&&(t-=o);const i=this.getMaxScrollOffset();return Math.max(Math.min(i,t),0)},this.getOffsetForIndex=(t,n="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[t];if(!a)return;if(n==="auto")if(a.end>=o+s-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),n];const i=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,n,a.size),n]},this.scrollToOffset=(t,{align:n="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;const o=this.getOffsetForAlignment(t,n),a=this.now();this.scrollState={index:null,align:n,behavior:s,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:n="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getOffsetForIndex(t,n);if(!o)return;const[a,i]=o,c=this.now();this.scrollState={index:t,align:i,behavior:s,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:n="auto"}={})=>{const s=this.getScrollOffset()+t,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const n=this.getMeasurements();let s;if(n.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const o=n.length-1,a=this._flatMeasurements;a!=null?s=a[o*2]+a[o*2+1]:s=((t=n[o])==null?void 0:t.end)??0}else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(i=>i===null);){const i=n[a];o[i.lane]===null&&(o[i.lane]=i.end),a--}s=Math.max(...o.filter(i=>i!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const n=this.getMeasurements();for(const s of n)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:n,behavior:s})=>{this._intendedScrollOffset=t+(n??0),this.options.scrollToFn(t,{behavior:s,adjustments:n},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(r)}applyScrollAdjustment(r,t){if(r===0)return!1;if(fk()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=r,!1;{const n=this.getScrollOffset()+this.scrollAdjustments+r,s=this.scrollElement,o=s!==null&&("scrollHeight"in s||"document"in s)?this.getMaxScrollOffset():null;return this._clampedAdjustment=o!==null&&n>o+.5?{target:n,maxAtWrite:o}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=n?n[0]:this.scrollState.lastTargetOffset,o=1,a=s!==this.scrollState.lastTargetOffset;if(!a&&vIn(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const i=this.getSize()||600,c=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&c>i;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const bF=(e,r,t,n)=>{for(;e<=r;){const s=(e+r)/2|0,o=t(s);if(on)r=s-1;else return s}return e>0?e-1:0};function NIn(e,r,t){let n=0;for(;n<=r;){const s=(n+r)/2|0,o=e[s*2];if(ot)r=s-1;else return s}return n>0?n-1:0}function AIn(e,r,t,n,s){const o=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:o};if(n===1&&s!==null){const u=NIn(s,o,t);let d=u;const _=t+r;for(;de[u].start,t),c=i;if(n===1)for(;c1){const u=Array(n).fill(0);for(;c_=0&&d.some(_=>_>=t);){const _=e[i];d[_.lane]=_.start,i--}i=Math.max(0,i-i%n),c=Math.min(o,c+(n-1-c%n))}return{startIndex:i,endIndex:c}}const dk=typeof document<"u"?T.useLayoutEffect:T.useEffect;function TIn({useFlushSync:e=!0,directDomUpdates:r=!1,directDomUpdatesMode:t="transform",...n}){const s=T.useReducer(d=>d+1,0)[1],o=T.useRef({enabled:r,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=r,o.current.mode=t;const a=d=>{const _=o.current;if(!_.enabled||!_.container)return;const p=d.getTotalSize();if(p!==_.lastSize){_.lastSize=p;const m=d.options.horizontal?"width":"height";_.container.style[m]=`${p}px`}},i=d=>{const _=o.current;if(!_.enabled||!_.container)return;a(d);const p=!!d.options.horizontal,m=_.mode==="transform",k=p?"left":"top",w=d.options.scrollMargin,v=d.getVirtualItems();for(const b of v){const x=b.start-w,y=d.elementsCache.get(b.key);y&&_.lastPositions.get(y)!==x&&(_.lastPositions.set(y,x),m?y.style.transform=p?`translate3d(${x}px, 0, 0)`:`translate3d(0, ${x}px, 0)`:y.style[k]=`${x}px`)}},c={...n,onChange:(d,_)=>{var p;const m=o.current;let k=!0;if(m.enabled){i(d);const w=d.range,v=m.prevRange;k=!v||v.isScrolling!==d.isScrolling||v.startIndex!==(w==null?void 0:w.startIndex)||v.endIndex!==(w==null?void 0:w.endIndex),k&&(m.prevRange=w?{startIndex:w.startIndex,endIndex:w.endIndex,isScrolling:d.isScrolling}:null)}k&&(e&&_?_o.flushSync(s):s()),(p=n.onChange)==null||p.call(n,d,_)}},[u]=T.useState(()=>{const d=new EIn(c);return Object.assign(d,{containerRef:_=>{const p=o.current;if(p.container=_,p.lastSize=null,_&&p.enabled){const m=d.getTotalSize();p.lastSize=m;const k=d.options.horizontal?"width":"height";_.style[k]=`${m}px`}}})});return u.setOptions(c),dk(()=>u._didMount(),[]),dk(()=>(a(u),u._willUpdate())),dk(()=>{i(u)}),u}function yF(e){return TIn({observeElementRect:xIn,observeElementOffset:jIn,scrollToFn:zIn,...e})}const RIn=50;function MIn(e,r){if(r<0||r>e.length)return null;let t=r;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="@")return null;let n=r;for(;nHT(t,!0)),...e.map(t=>HT(t,!1))]}function DIn(e,r){const t=r.toLowerCase(),n=t===""||t.endsWith("/"),s=[];for(const o of e){const{lower:a,lowerName:i}=o;if(n){if(!a.startsWith(t)||a===t)continue;const u=a.slice(t.length),d=u.indexOf("/");if(d!==-1&&d!==u.length-1)continue;s.push({match:o,rank:o.directory?0:1});continue}const c=i.startsWith(t)?0:i.includes(t)?1:a.includes(t)?2:-1;c!==-1&&s.push({match:o,rank:c})}return s.sort((o,a)=>o.rank-a.rank||(n?0:o.match.depth-a.match.depth||o.match.path.length-a.match.path.length)||(o.match.lowera.match.lower?1:0)||(o.match.patha.match.path?1:0)),s.slice(0,RIn).map(({match:o})=>({path:o.path,directory:o.directory}))}function LIn(e,r,t){const n=/\s/.test(t.path),s=n||!t.directory,o=`${e.slice(0,r.start)}@${n?`"${t.path}"`:t.path}`;let a=e.slice(r.end);return s&&!/^\s/.test(a)&&(a=` ${a}`),{text:o+a,cursor:o.length+(s&&a.startsWith(" ")?1:0)}}function IIn(e,r){if(!r)return e;const t=new Map(e.map(o=>[o.id,o]));let n=t.get(r);if(!n)return e;const s=[];for(;n;)s.push(n),n=n.parentId?t.get(n.parentId):void 0;return s.reverse()}function PIn(e,r,t){var a;let n=e;for(;n&&n.role!=="user";)n=n.parentId?r.get(n.parentId):void 0;const s=e.role==="user"?e.parentId??null:(n==null?void 0:n.id)??null,o=(a=t.get(s))==null?void 0:a.filter(i=>i.role===e.role);return o!=null&&o.length?o:[e]}function BIn(e,r,t,n){const s=e.filter(u=>!n(u.id)),o=new Map(s.map(u=>[u.id,u])),a=new Map;for(const u of s){const d=u.parentId??null,_=a.get(d);_?_.push(u):a.set(d,[u])}const i=new Set(r.map(u=>u.id)),c=new Map;for(const u of t){const d=PIn(u,o,a),_=d.findIndex(p=>i.has(p.id));c.set(u.id,{count:d.length,index:_,prevId:_>0?d[_-1].id:void 0,nextId:_=0;o--)for(const a of e[o].parts)if(!(a.type!=="prompt"||(n=a.prompt)!=null&&n.resolved||((s=a.prompt)==null?void 0:s.kind)!=="question"))return a.prompt.nativeId&&!t?null:a.id;return null}function ip(e,r){var t;if(e.type==="tool"&&((t=e.tool)==null?void 0:t.toLowerCase())==="interrupted")return!1;if(e.type==="prompt"){if(!e.prompt)return!1;if(e.prompt.kind==="permission"){if(e.prompt.resolved)return!1;if(r!==void 0)return e.id===r}return!0}return e.type==="reasoning"?!1:e.type==="text"?!!e.text:!0}function j0(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function HIn(e,r){var n,s;const t=e.at(-1);return(r==null?void 0:r.id)==="turn-recovery"&&(t==null?void 0:t.type)==="tool"&&t.tool==="error"&&((n=t.state)!=null&&n.error)&&t.state.error===((s=r.state)==null?void 0:s.error)?e.slice(0,-1):e}function xF(e){var r;for(let t=e.length-1;t>=0;t--){const n=e[t];if(!(n.type==="steer"||j0(n)||!ip(n)))return n.type!=="tool"||((r=n.state)==null?void 0:r.status)==="error"?null:n.id}return null}function wF(e){const r=e.at(-1);if((r==null?void 0:r.role)!=="assistant")return null;const t=xF(r.parts);return t?{messageId:r.id,toolId:t}:null}function qIn(e){const r=e.at(-1);if((r==null?void 0:r.role)!=="assistant")return!1;for(let t=r.parts.length-1;t>=0;t--){const n=r.parts[t];if(!(n.type==="steer"||j0(n)))return n.type==="text"&&!!n.text}return!1}function UIn(e,r,t,n,s){const o=[...r].filter(i=>!t.has(i)&&n.some(c=>c.id===i)&&i!==s);if(o.length===0&&!(s&&e.has(s)))return e;const a=new Set(e);for(const i of o)a.add(i);return s&&a.delete(s),a}function kF(e,r){if(e.some(n=>{var s;return n.type==="prompt"&&!((s=n.prompt)!=null&&s.resolved)}))return{work:[],answer:e};let t=e.findIndex(n=>n.type==="text"&&n.phase==="final_answer");if(t<0&&!r&&!e.some(n=>n.phase))for(let n=e.length-1;n>=0;n--){const s=e[n];if(s.type!=="reasoning"){if(s.type!=="text")break;s.text&&(t=n)}}return t<0||!r&&!e.slice(t).some(n=>ip(n))||!e.slice(0,t).some(n=>ip(n))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function jF(e){return e.flatMap(r=>{var n;const t=r.type==="text"?(n=r.text)==null?void 0:n.trim():void 0;return t?[t]:[]}).join(` +${r?vsr():Esr()}`}function pIn({project:e,chatCount:r,collapsed:t,busy:n,onToggleCollapsed:s,onRemoved:o,onNewChat:a,pinned:i,onPin:c}){const u=T.useRef(null),d=T.useRef(null),_=T.useId(),[p,m]=T.useState(!1),[k,x]=T.useState(!1),[v,b]=T.useState(!1);T.useEffect(()=>{const z=N=>{var A,E;N.target instanceof Node&&((A=d.current)!=null&&A.contains(N.target))||(E=d.current)==null||E.hidePopover()};return window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[]);function w(z,N){if(!z||!N)return;z.showPopover();const A=N.getBoundingClientRect(),E=z.getBoundingClientRect(),M=A.right+12+E.width<=window.innerWidth-8?A.right+12:Math.max(8,A.left-E.width-12);z.style.left=`${M}px`,z.style.top=`${Math.max(8,Math.min(A.top,window.innerHeight-E.height-8))}px`}function y(){var z;(z=d.current)==null||z.hidePopover(),x(!0)}async function S(){var z;if((z=d.current)==null||z.hidePopover(),!(v||!window.confirm(vF(e)))){b(!0);try{await BL(e.id),o()}catch(N){tr(N instanceof Error?N.message:String(N),"error")}finally{b(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button","aria-expanded":!t,onClick:s,className:"flex h-7 min-w-0 flex-1 cursor-pointer items-center gap-[7px] rounded-sm py-1 text-start text-sm font-normal text-text focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2",children:[t?f.jsx(FI,{size:15,className:"shrink-0"}):f.jsx(Ci,{size:15,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:e.name}),n&&f.jsx("span",{"aria-hidden":!0,className:"size-[7px] shrink-0 rounded-full bg-primary animate-[or-pulse_1.2s_infinite]"})]}),f.jsx(Rt,{ref:u,size:"small",className:`text-text group-hover:opacity-100 group-focus-within:opacity-100 ${p?"bg-surface opacity-100":"opacity-0"}`,"aria-label":Snn({name:e.name}),"aria-controls":_,"aria-haspopup":"menu","aria-expanded":p,onClick:()=>{var z,N,A;(z=d.current)!=null&&z.matches(":popover-open")?d.current.hidePopover():(w(d.current,u.current),(A=(N=d.current)==null?void 0:N.querySelector("button"))==null||A.focus())},children:f.jsx(wp,{size:15})}),f.jsx(d0,{interactive:!0,content:W4(),className:"rounded-sm",children:f.jsx(Rt,{size:"small",className:"text-text opacity-0 group-hover:opacity-100 group-focus-within:opacity-100","aria-label":`${W4()} · ${e.name}`,onClick:a,children:f.jsx(pd,{size:15})})}),f.jsxs("div",{ref:d,id:_,popover:"auto",role:"menu","aria-label":e.name,onToggle:z=>m(z.newState==="open"),onKeyDown:z=>{var E;if(z.key!=="ArrowDown"&&z.key!=="ArrowUp")return;z.preventDefault();const N=[...z.currentTarget.querySelectorAll("button:not(:disabled)")],A=N.findIndex(M=>M===document.activeElement);(E=N[(A+(z.key==="ArrowDown"?1:N.length-1))%N.length])==null||E.focus()},className:"fixed inset-auto m-0 w-72 max-w-[calc(100vw-1rem)] rounded-xl border border-border bg-background p-2 text-text shadow-modal",children:[f.jsxs("div",{role:"presentation",className:"mb-1 border-b border-border px-2 pb-2 pt-1 text-sm",children:[f.jsx("div",{className:"truncate font-medium",children:e.name}),f.jsxs("div",{className:"mt-1 flex items-center gap-1.5 text-subtext",children:[f.jsx(T9n,{size:13}),r===void 0?"…":pnn({count:r})]}),f.jsx("div",{className:"mt-2 break-all text-xs text-subtext",children:e.repoPath})]}),f.jsx(_r,{role:"menuitem",onClick:()=>{var z;c(),(z=d.current)==null||z.hidePopover()},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Q9n,{size:16}),i?tsn():onn()]})}),f.jsx(_r,{role:"menuitem",onClick:y,children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Ey,{size:16}),hD()]})}),f.jsx(_r,{role:"menuitem",onClick:()=>{var z;(z=d.current)==null||z.hidePopover(),qL(e.id,".").catch(N=>tr(N instanceof Error?N.message:String(N),"error"))},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Ci,{size:16}),$nn()]})}),f.jsx("div",{className:"my-1 border-t border-border"}),f.jsx(_r,{role:"menuitem",danger:!0,disabled:v,onClick:()=>void S(),children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(gd,{size:16}),YD()]})})]}),k&&Vs.createPortal(f.jsx(mIn,{project:e,onClose:()=>x(!1),onRemoved:o}),document.body)]})}function mIn({project:e,onClose:r,onRemoved:t}){const n=T.useRef(null),s=T.useId(),o=T.useId(),[a,i]=T.useState(e.name),[c,u]=T.useState(!1),[d,_]=T.useState(""),p=()=>{c||r()};xp(n,p);async function m(){if(!(c||!a.trim())){u(!0),_("");try{await iSn(e.id,{name:a.trim()}),r()}catch(x){_(x instanceof Error?x.message:String(x))}finally{u(!1)}}}async function k(){if(!(c||!window.confirm(vF(e)))){u(!0),_("");try{await BL(e.id),r(),t()}catch(x){_(x instanceof Error?x.message:String(x))}finally{u(!1)}}}return f.jsx("div",{className:"modal-backdrop fixed inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-5",onClick:x=>{x.target===x.currentTarget&&p()},children:f.jsxs("div",{ref:n,role:"dialog","aria-modal":"true","aria-labelledby":s,tabIndex:-1,className:"modal w-120 max-w-full max-h-[calc(100vh-2.5rem)] overflow-y-auto rounded-xl border border-border bg-background p-6 text-text shadow-modal",children:[f.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[f.jsx("h2",{id:s,className:"m-0 text-xl font-medium",children:brn()}),f.jsx(Rt,{"aria-label":vb(),onClick:p,disabled:c,children:f.jsx(pn,{size:16})})]}),f.jsxs("form",{onSubmit:x=>{x.preventDefault(),m()},children:[f.jsx("label",{htmlFor:o,className:"sr-only",children:Z4()}),f.jsxs("div",{className:"relative",children:[f.jsx(Ci,{size:16,className:"pointer-events-none absolute start-3 top-3 text-subtext"}),f.jsx(Nn,{id:o,"data-initial-focus":!0,value:a,onChange:x=>i(x.target.value),disabled:c,required:!0,className:"h-10 ps-10"})]}),f.jsx("div",{className:"mt-5 mb-2 text-sm font-medium",children:Gnn()}),f.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border p-3 text-sm",children:[f.jsx(Ci,{size:16,className:"mt-0.5 shrink-0 text-subtext"}),f.jsx("span",{className:"min-w-0 break-all",children:e.repoPath})]}),d&&f.jsx("p",{role:"alert",className:"mt-3 text-sm text-accent-red",children:d}),f.jsxs("div",{className:"mt-6 flex items-center gap-2",children:[f.jsx(Oe,{type:"button",variant:"danger",disabled:c,onClick:()=>void k(),children:YD()}),f.jsx("div",{className:"flex-1"}),f.jsx(Oe,{type:"button",variant:"ghost",disabled:c,onClick:p,children:Jnr()}),f.jsx(Oe,{type:"submit",variant:"primary",disabled:c||!a.trim(),children:nc()})]})]})]})})}const Jm=e=>e.kind==="project"?36:34;function PT(e,r,t){const n=e.find(i=>i.kind==="chat"&&i.session.id===t),s=n&&e.find(i=>i.kind==="project"&&i.project.id===n.project.id),o=(i,c)=>{const u=[];let d=0;for(const p of i){if(d+Jm(p)>c)break;u.push(p),d+=Jm(p)}const _=u.at(-1);return(_==null?void 0:_.kind)==="project"&&!_.collapsed&&u.pop(),u},a=o(e,r);return!n||a.includes(n)?a:s?r<70?a:[...o(e.filter(i=>i.project.id!==n.project.id),r-70),s,n]:r<34?a:[...o(e.filter(i=>i!==n),r-34),n]}function gIn(e,r,t){const n=new Array(e);return new Proxy(n,{get(s,o,a){if(typeof o=="string"){const i=o.charCodeAt(0);if(i>=48&&i<=57){const c=+o;if(Number.isInteger(c)&&c>=0&&cn[d]!==u))&&(n=i,s=r(...i),t!=null&&t.onChange&&!(o&&t.skipInitialOnChange)&&t.onChange(s),o=!1),s}return a.updateDeps=i=>{n=i},a}function BT(e,r){if(e===void 0)throw new Error("Unexpected undefined");return e}const vIn=(e,r)=>Math.abs(e-r)<1.01,bIn=(e,r,t)=>{let n;return Object.assign(function(...s){e.clearTimeout(n),n=e.setTimeout(()=>r.apply(this,s),t)},{cancel:()=>{e.clearTimeout(n)}})};let Em;const fk=()=>{if(Em!==void 0)return Em;if(typeof navigator>"u")return Em=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Em=!0;const e=navigator.maxTouchPoints;return Em=navigator.platform==="MacIntel"&&e!==void 0&&e>0},FT=e=>{const{offsetWidth:r,offsetHeight:t}=e;return{width:r,height:t}},yIn=e=>e,R6=e=>{const r=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-r+1,s=new Array(n);for(let o=0;o{const t=e.scrollElement;if(!t)return;const n=e.targetWindow;if(!n)return;const s=a=>{const{width:i,height:c}=a;r({width:Math.round(i),height:Math.round(c)})};if(s(FT(t)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const i=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(FT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return o.observe(t,{box:"border-box"}),()=>{o.unobserve(t)}},Fb={passive:!0},wIn=typeof window>"u"?!0:"onscrollend"in window,kIn=(e,r,t)=>{const n=e.scrollElement;if(!n)return;const s=e.targetWindow;if(!s)return;const o=e.options.useScrollendEvent&&wIn;let a=0;const i=o?null:bIn(s,()=>r(a,!1),e.options.isScrollingResetDelay),c=_=>()=>{a=t(n),i==null||i(),r(a,_)},u=c(!0),d=c(!1);return n.addEventListener("scroll",u,Fb),o&&n.addEventListener("scrollend",d,Fb),()=>{n.removeEventListener("scroll",u),o&&n.removeEventListener("scrollend",d),i==null||i.cancel()}},jIn=(e,r)=>kIn(e,r,t=>{const{horizontal:n,isRtl:s}=e.options;return n?t.scrollLeft*(s&&-1||1):t.scrollTop}),SIn=(e,r,t)=>{if(t.options.useCachedMeasurements){const n=t.indexFromElement(e),s=t.options.getItemKey(n);return t.itemSizeCache.get(s)??t.options.estimateSize(n)}if(r!=null&&r.borderBoxSize){const n=r.borderBoxSize[0];if(n)return Math.round(n[t.options.horizontal?"inlineSize":"blockSize"])}if(!r){const n=t.indexFromElement(e),s=t.options.getItemKey(n),o=t.itemSizeCache.get(s);if(o!==void 0)return o}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},CIn=(e,{adjustments:r=0,behavior:t},n)=>{var s,o;(o=(s=n.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[n.options.horizontal?"left":"top"]:e+r,behavior:t})},zIn=CIn;class EIn{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,n,s;return((s=(n=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:n.now)==null?void 0:s.call(n))??Date.now()},this.observer=(()=>{let t=null;const n=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const a=()=>{const i=o.target,c=this.indexFromElement(i);if(!i.isConnected){this.observer.unobserve(i);for(const[u,d]of this.elementsCache)if(d===i){this.elementsCache.delete(u);break}return}this.isIndexInRange(c)&&this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(i,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var s;(s=n())==null||s.disconnect(),t=null},observe:s=>{var o;return(o=n())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=n())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var n,s;const o={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:yIn,rangeExtractor:R6,onChange:()=>{},measureElement:SIn,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const p in t){const m=t[p];m!==void 0&&(o[p]=m)}const a=this.options;let i=null,c=null,u=!1;if(a!==void 0&&a.enabled&&o.enabled&&o.anchorTo==="end"&&this.scrollElement!==null){const p=a.count,m=o.count,k=this.getMeasurements(),x=p>0?((n=k[0])==null?void 0:n.key)??a.getItemKey(0):null,v=p>0?((s=k[p-1])==null?void 0:s.key)??a.getItemKey(p-1):null;if(m!==p||p>0&&m>0&&(o.getItemKey(0)!==x||o.getItemKey(m-1)!==v)){u=!0;const y=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??k[0]:null;y&&(i=[y.key,this.getScrollOffset()-y.start]);const S=o.followOnAppend===!0?"auto":o.followOnAppend||null;S&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||o.getItemKey(m-1)!==v)&&(c=S)}}this.options=o,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let d=!1,_=0;if(i&&this.scrollOffset!==null){const[p,m]=i,k=this.getMeasurements(),{count:x,getItemKey:v}=this.options;let b=0;for(;b{var n,s;(s=(n=this.options).onChange)==null||s.call(n,this,t)},this.maybeNotify=oh(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}if(this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{if(a&&this._intendedScrollOffset===null&&o===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(o-this._intendedScrollOffset)<1.5&&(o=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(o-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const i=this.getScrollOffset();this.scrollDirection=a?i===o?this.scrollDirection:i{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},i=()=>{this._iosTouching=!1,!(!fk()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};o.addEventListener("touchstart",a,Fb),o.addEventListener("touchend",i,Fb),this.unsubs.push(()=>{o.removeEventListener("touchstart",a),o.removeEventListener("touchend",i),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[o,a,i,c]=s;o!==null&&!i&&(fk()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),i&&this.scrollToEnd({behavior:i})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:n}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>n+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),n=this.getMaxScrollOffset();if(t<0||t>n)return;if(this._iosDeferredAdjustment<0&&t>=n-1){this._iosDeferredAdjustment=0;return}const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=oh(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,n,s,o,a,i,c,u)=>(this.prevLanes!==void 0&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:t,paddingStart:n,scrollMargin:s,getItemKey:o,enabled:a,lanes:i,laneAssignmentMode:c,gap:u}),{key:!1}),this.isIndexInRange=t=>t>=0&&t[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:n,scrollMargin:s,getItemKey:o,enabled:a,lanes:i,laneAssignmentMode:c,gap:u},d)=>{const _=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const p=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),i===1){const b=t*2;let w=this._flatMeasurements;if(!w||w.length0&&z.set(w.subarray(0,p*2)),w=z,this._flatMeasurements=w}let y;if(p===0)y=n+s;else{const z=p-1;y=w[z*2]+w[z*2+1]+u}for(let z=p;z1){S=y;const $=k[S],D=$!==void 0?m[$]:void 0;z=D?D.end+u:n+s}else if(v===i){let $=0,D=x[0],I=k[0];for(let G=1;Gthis.options.debug}),this.calculateRange=oh(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,n,s,o)=>t.length===0||n===0?(this.range=null,null):(this.range=AIn(t,n,s,o,o===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=oh(()=>{let t=null,n=null;const s=this.calculateRange();return s&&(t=s.startIndex,n=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,n]},(t,n,s,o,a)=>o===null||a===null?[]:t({startIndex:o,endIndex:a,overscan:n,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const n=this.options.indexAttribute,s=t.getAttribute(n);return s?parseInt(s,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(s!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,s-o),i=Math.min(this.options.count-1,s+o);return t>=a&&t<=i}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((a,i)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(i))});return}const n=this.indexFromElement(t);if(!this.isIndexInRange(n))return;const s=this.options.getItemKey(n),o=this.elementsCache.get(s);o!==t&&(o&&this.observer.unobserve(o),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,n)=>{var s,o;if(!this.isIndexInRange(t))return;let a,i,c;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)c=this.options.getItemKey(t),i=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;c=p.key,i=p.start,a=p.size}const d=this.itemSizeCache.get(c)??a,_=n-d;if(_!==0){const p=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=p?this.getTotalSize():0,k=this.getScrollOffset()+this.scrollAdjustments,v=!this.itemSizeCache.has(c)?i[this.getVirtualIndexes(),this.getMeasurements()],(t,n)=>{const s=[];for(let o=0,a=t.length;othis.options.debug}),this.getVirtualItemForOffset=t=>{const n=this.getMeasurements();if(n.length===0)return;const s=this._flatMeasurements,o=this.options.lanes===1&&s!=null,a=bF(0,n.length-1,o?i=>s[i*2]:i=>BT(n[i]).start,t);return BT(n[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,n,s=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=t>=a+o?"end":"start"),n==="center"?t+=(s-o)/2:n==="end"&&(t-=o);const i=this.getMaxScrollOffset();return Math.max(Math.min(i,t),0)},this.getOffsetForIndex=(t,n="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[t];if(!a)return;if(n==="auto")if(a.end>=o+s-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),n];const i=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,n,a.size),n]},this.scrollToOffset=(t,{align:n="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;const o=this.getOffsetForAlignment(t,n),a=this.now();this.scrollState={index:null,align:n,behavior:s,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:n="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getOffsetForIndex(t,n);if(!o)return;const[a,i]=o,c=this.now();this.scrollState={index:t,align:i,behavior:s,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:n="auto"}={})=>{const s=this.getScrollOffset()+t,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const n=this.getMeasurements();let s;if(n.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const o=n.length-1,a=this._flatMeasurements;a!=null?s=a[o*2]+a[o*2+1]:s=((t=n[o])==null?void 0:t.end)??0}else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(i=>i===null);){const i=n[a];o[i.lane]===null&&(o[i.lane]=i.end),a--}s=Math.max(...o.filter(i=>i!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const n=this.getMeasurements();for(const s of n)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:n,behavior:s})=>{this._intendedScrollOffset=t+(n??0),this.options.scrollToFn(t,{behavior:s,adjustments:n},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(r)}applyScrollAdjustment(r,t){if(r===0)return!1;if(fk()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=r,!1;{const n=this.getScrollOffset()+this.scrollAdjustments+r,s=this.scrollElement,o=s!==null&&("scrollHeight"in s||"document"in s)?this.getMaxScrollOffset():null;return this._clampedAdjustment=o!==null&&n>o+.5?{target:n,maxAtWrite:o}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=n?n[0]:this.scrollState.lastTargetOffset,o=1,a=s!==this.scrollState.lastTargetOffset;if(!a&&vIn(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const i=this.getSize()||600,c=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&c>i;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const bF=(e,r,t,n)=>{for(;e<=r;){const s=(e+r)/2|0,o=t(s);if(on)r=s-1;else return s}return e>0?e-1:0};function NIn(e,r,t){let n=0;for(;n<=r;){const s=(n+r)/2|0,o=e[s*2];if(ot)r=s-1;else return s}return n>0?n-1:0}function AIn(e,r,t,n,s){const o=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:o};if(n===1&&s!==null){const u=NIn(s,o,t);let d=u;const _=t+r;for(;de[u].start,t),c=i;if(n===1)for(;c1){const u=Array(n).fill(0);for(;c_=0&&d.some(_=>_>=t);){const _=e[i];d[_.lane]=_.start,i--}i=Math.max(0,i-i%n),c=Math.min(o,c+(n-1-c%n))}return{startIndex:i,endIndex:c}}const dk=typeof document<"u"?T.useLayoutEffect:T.useEffect;function TIn({useFlushSync:e=!0,directDomUpdates:r=!1,directDomUpdatesMode:t="transform",...n}){const s=T.useReducer(d=>d+1,0)[1],o=T.useRef({enabled:r,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=r,o.current.mode=t;const a=d=>{const _=o.current;if(!_.enabled||!_.container)return;const p=d.getTotalSize();if(p!==_.lastSize){_.lastSize=p;const m=d.options.horizontal?"width":"height";_.container.style[m]=`${p}px`}},i=d=>{const _=o.current;if(!_.enabled||!_.container)return;a(d);const p=!!d.options.horizontal,m=_.mode==="transform",k=p?"left":"top",x=d.options.scrollMargin,v=d.getVirtualItems();for(const b of v){const w=b.start-x,y=d.elementsCache.get(b.key);y&&_.lastPositions.get(y)!==w&&(_.lastPositions.set(y,w),m?y.style.transform=p?`translate3d(${w}px, 0, 0)`:`translate3d(0, ${w}px, 0)`:y.style[k]=`${w}px`)}},c={...n,onChange:(d,_)=>{var p;const m=o.current;let k=!0;if(m.enabled){i(d);const x=d.range,v=m.prevRange;k=!v||v.isScrolling!==d.isScrolling||v.startIndex!==(x==null?void 0:x.startIndex)||v.endIndex!==(x==null?void 0:x.endIndex),k&&(m.prevRange=x?{startIndex:x.startIndex,endIndex:x.endIndex,isScrolling:d.isScrolling}:null)}k&&(e&&_?Vs.flushSync(s):s()),(p=n.onChange)==null||p.call(n,d,_)}},[u]=T.useState(()=>{const d=new EIn(c);return Object.assign(d,{containerRef:_=>{const p=o.current;if(p.container=_,p.lastSize=null,_&&p.enabled){const m=d.getTotalSize();p.lastSize=m;const k=d.options.horizontal?"width":"height";_.style[k]=`${m}px`}}})});return u.setOptions(c),dk(()=>u._didMount(),[]),dk(()=>(a(u),u._willUpdate())),dk(()=>{i(u)}),u}function yF(e){return TIn({observeElementRect:xIn,observeElementOffset:jIn,scrollToFn:zIn,...e})}const RIn=50;function MIn(e,r){if(r<0||r>e.length)return null;let t=r;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="@")return null;let n=r;for(;nHT(t,!0)),...e.map(t=>HT(t,!1))]}function DIn(e,r){const t=r.toLowerCase(),n=t===""||t.endsWith("/"),s=[];for(const o of e){const{lower:a,lowerName:i}=o;if(n){if(!a.startsWith(t)||a===t)continue;const u=a.slice(t.length),d=u.indexOf("/");if(d!==-1&&d!==u.length-1)continue;s.push({match:o,rank:o.directory?0:1});continue}const c=i.startsWith(t)?0:i.includes(t)?1:a.includes(t)?2:-1;c!==-1&&s.push({match:o,rank:c})}return s.sort((o,a)=>o.rank-a.rank||(n?0:o.match.depth-a.match.depth||o.match.path.length-a.match.path.length)||(o.match.lowera.match.lower?1:0)||(o.match.patha.match.path?1:0)),s.slice(0,RIn).map(({match:o})=>({path:o.path,directory:o.directory}))}function LIn(e,r,t){const n=/\s/.test(t.path),s=n||!t.directory,o=`${e.slice(0,r.start)}@${n?`"${t.path}"`:t.path}`;let a=e.slice(r.end);return s&&!/^\s/.test(a)&&(a=` ${a}`),{text:o+a,cursor:o.length+(s&&a.startsWith(" ")?1:0)}}function IIn(e,r){if(!r)return e;const t=new Map(e.map(o=>[o.id,o]));let n=t.get(r);if(!n)return e;const s=[];for(;n;)s.push(n),n=n.parentId?t.get(n.parentId):void 0;return s.reverse()}function PIn(e,r,t){var a;let n=e;for(;n&&n.role!=="user";)n=n.parentId?r.get(n.parentId):void 0;const s=e.role==="user"?e.parentId??null:(n==null?void 0:n.id)??null,o=(a=t.get(s))==null?void 0:a.filter(i=>i.role===e.role);return o!=null&&o.length?o:[e]}function BIn(e,r,t,n){const s=e.filter(u=>!n(u.id)),o=new Map(s.map(u=>[u.id,u])),a=new Map;for(const u of s){const d=u.parentId??null,_=a.get(d);_?_.push(u):a.set(d,[u])}const i=new Set(r.map(u=>u.id)),c=new Map;for(const u of t){const d=PIn(u,o,a),_=d.findIndex(p=>i.has(p.id));c.set(u.id,{count:d.length,index:_,prevId:_>0?d[_-1].id:void 0,nextId:_=0;o--)for(const a of e[o].parts)if(!(a.type!=="prompt"||(n=a.prompt)!=null&&n.resolved||((s=a.prompt)==null?void 0:s.kind)!=="question"))return a.prompt.nativeId&&!t?null:a.id;return null}function ip(e,r){var t;if(e.type==="tool"&&((t=e.tool)==null?void 0:t.toLowerCase())==="interrupted")return!1;if(e.type==="prompt"){if(!e.prompt)return!1;if(e.prompt.kind==="permission"){if(e.prompt.resolved)return!1;if(r!==void 0)return e.id===r}return!0}return e.type==="reasoning"?!1:e.type==="text"?!!e.text:!0}function j0(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function HIn(e,r){var n,s;const t=e.at(-1);return(r==null?void 0:r.id)==="turn-recovery"&&(t==null?void 0:t.type)==="tool"&&t.tool==="error"&&((n=t.state)!=null&&n.error)&&t.state.error===((s=r.state)==null?void 0:s.error)?e.slice(0,-1):e}function xF(e){var r;for(let t=e.length-1;t>=0;t--){const n=e[t];if(!(n.type==="steer"||j0(n)||!ip(n)))return n.type!=="tool"||((r=n.state)==null?void 0:r.status)==="error"?null:n.id}return null}function wF(e){const r=e.at(-1);if((r==null?void 0:r.role)!=="assistant")return null;const t=xF(r.parts);return t?{messageId:r.id,toolId:t}:null}function qIn(e){const r=e.at(-1);if((r==null?void 0:r.role)!=="assistant")return!1;for(let t=r.parts.length-1;t>=0;t--){const n=r.parts[t];if(!(n.type==="steer"||j0(n)))return n.type==="text"&&!!n.text}return!1}function UIn(e,r,t,n,s){const o=[...r].filter(i=>!t.has(i)&&n.some(c=>c.id===i)&&i!==s);if(o.length===0&&!(s&&e.has(s)))return e;const a=new Set(e);for(const i of o)a.add(i);return s&&a.delete(s),a}function kF(e,r){if(e.some(n=>{var s;return n.type==="prompt"&&!((s=n.prompt)!=null&&s.resolved)}))return{work:[],answer:e};let t=e.findIndex(n=>n.type==="text"&&n.phase==="final_answer");if(t<0&&!r&&!e.some(n=>n.phase))for(let n=e.length-1;n>=0;n--){const s=e[n];if(s.type!=="reasoning"){if(s.type!=="text")break;s.text&&(t=n)}}return t<0||!r&&!e.slice(t).some(n=>ip(n))||!e.slice(0,t).some(n=>ip(n))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function jF(e){return e.flatMap(r=>{var n;const t=r.type==="text"?(n=r.text)==null?void 0:n.trim():void 0;return t?[t]:[]}).join(` `)}function SF(e){return jF(kF(e.parts,!1).answer)}function GIn(e){for(let r=e.length-1;r>=0;r--){if(e[r].role!=="assistant")continue;const t=SF(e[r]);if(t)return t}return""}function WIn(e,r,t){const n=r.flatMap(s=>{const o=jF(s.parts);return o?[`## ${s.role==="user"?t.user:t.assistant} @@ -781,7 +781,7 @@ ${o}`]:[]});return n.length===0?null:[`# ${e}`,...n].join(` /> `,iPn=`Pm -`,NF={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv",pubmed:"PubMed"},cPn={alphaxiv:sPn,openalex:aPn,biorxiv:oPn,pubmed:iPn};function AF({source:e,size:r=16,decorative:t=!1,className:n=""}){return f.jsx("span",{className:`lit-logo flex-none inline-flex items-center justify-center p-[1.5px] box-border bg-white rounded-[3px] shadow-logo [&_svg]:w-full [&_svg]:h-full [&_svg]:block ${n}`,style:{width:r,height:r},...t?{"aria-hidden":!0}:{role:"img","aria-label":NF[e]},dangerouslySetInnerHTML:{__html:cPn[e]}})}function lPn(e){const t=e.trim().replace(/^https?:\/\/doi\.org\//i,"").replace(/^doi:/i,"").match(/10\.\d+\/[^\s?#]+/);return t?t[0].replace(/[.,)]+$/,"").replace(/v\d+(\.[a-z][a-z-]*)*$/i,""):null}function uPn(e,r){const t=r.trim();if(e==="alphaxiv"){const o=(t.split(/[?#]/)[0].split("/").pop()||t).replace(/\.(pdf|md)$/i,"");return`https://www.alphaxiv.org/abs/${encodeURIComponent(o)}`}if(e==="pubmed"){const s=t.split(/[?#]/)[0],o=/^pmid:/i.test(s)?s.slice(5).trim():s.replace(/\/+$/,"").split("/").pop();if(o&&/^\d{1,9}$/.test(o))return`https://pubmed.ncbi.nlm.nih.gov/${o}/`}const n=lPn(t);if(n)return`https://doi.org/${n}`;if(e==="openalex"){const s=t.split("/").pop()||t;return`https://openalex.org/${encodeURIComponent(s)}`}return`https://doi.org/${t}`}const _Pn=["alphaxiv","openalex","biorxiv","pubmed"];function fPn(){const e=LCn(),{data:r}=dt(e),t=mr({mutationFn:R6n,onSuccess:o=>ts(e.queryKey,o)}),n=t.isPending,s=o=>{r&&!n&&t.mutate({...r,[o]:!r[o]})};return r?f.jsx("div",{className:"flex flex-col",children:_Pn.map(o=>{const a=r[o];return f.jsxs(_r,{type:"button",role:"switch","aria-checked":a,disabled:n,onClick:()=>s(o),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(AF,{source:o,size:16,decorative:!0}),NF[o]]}),f.jsx(Szn,{checked:a,"aria-hidden":"true"})]},o)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:m5t()})}function pk(e,r){if(!e)throw new Error("Assertion Error")}function lf(e,r){if(e==null)throw new Error(`Unexpected ${e}`);return e}var GT=Object.prototype.hasOwnProperty;function WT(e,r,t){for(t of e.keys())if(eg(t,r))return t}function eg(e,r){var t,n,s;if(e===r)return!0;if(e&&r&&(t=e.constructor)===r.constructor){if(t===Date)return e.getTime()===r.getTime();if(t===RegExp)return e.toString()===r.toString();if(t===Array){if((n=e.length)===r.length)for(;n--&&eg(e[n],r[n]););return n===-1}if(t===Set){if(e.size!==r.size)return!1;for(n of e)if(s=n,s&&typeof s=="object"&&(s=WT(r,s),!s)||!r.has(s))return!1;return!0}if(t===Map){if(e.size!==r.size)return!1;for(n of e)if(s=n[0],s&&typeof s=="object"&&(s=WT(r,s),!s)||!eg(n[1],r.get(s)))return!1;return!0}if(t===ArrayBuffer)e=new Uint8Array(e),r=new Uint8Array(r);else if(t===DataView){if((n=e.byteLength)===r.byteLength)for(;n--&&e.getInt8(n)===r.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===r.byteLength)for(;n--&&e[n]===r[n];);return n===-1}if(!t||typeof e=="object"){n=0;for(t in e)if(GT.call(e,t)&&++n&&!GT.call(r,t)||!(t in r)||!eg(e[t],r[t]))return!1;return Object.keys(r).length===n}}return e!==e&&r!==r}const dPn=new Set(["table","tbody","thead","tfoot","tr"]),hPn=/^[\t\n\f\r ]*$/;function pPn(e,r,t={}){const n=TF(e,r??null,{Fragment:f.Fragment,components:t,jsx:f.jsx,jsxs:f.jsxs},void 0);return{react:n.react,state:n}}function TF(e,r,t,n){var w,v,b,x;if(r&&r.key===n&&e===r.node)return r;if(!("children"in e)||!Array.isArray(e.children))return r&&r.key===n&&Nh(e,r.node)?r:{children:[],key:n,node:e,react:e.type==="text"&&"value"in e&&typeof e.value=="string"?e.value:void 0,shell:null};const s=(r==null?void 0:r.children)??[],o=[],a=[],i=new Map,c=new Set(s.map(y=>y.key).filter(y=>y!==void 0));let u=0;for(;u=e.children.length-d&&(E=s.length-(e.children.length-y)),E>=0&&(z=((b=s[E])==null?void 0:b.key)??z);z&&c.has(z)&&((x=s[E])==null?void 0:x.key)!==z;)z=`${z}+`;z&&c.add(z);const A=TF(S,s[E]??null,t,z);o.push(A),A.react!==void 0&&a.push(A.react)}const _=r!==null&&mPn(e,r.node);if(r&&r.key===n&&_&&s.length===o.length&&o.every((y,S)=>y===s[S]))return r;const p=e.type==="element"&&dPn.has(e.tagName)?a.filter(y=>typeof y!="string"||!hPn.test(y)):a,m=p.length>0?p.length===1?p[0]:p:null;let k=_?r==null?void 0:r.shell:null;if(!k){const y=UB({...e,children:[]},t);k={props:y.props,type:y.type}}return{children:o,key:n,node:e,react:f.jsx(k.type,{...k.props,children:m},n),shell:k}}function mPn(e,r){if(e===r)return!0;const{children:t,position:n,...s}=e,{children:o,position:a,...i}=r;return eg(s,i)}function Nh(e,r){if(e===r)return!0;if(Array.isArray(e)||Array.isArray(r)){if(!Array.isArray(e)||!Array.isArray(r)||e.length!==r.length)return!1;for(let a=0;a0&&(Ge(this,__,ue(this,__)+t.slice(0,n.commitIndex)),t=t.slice(n.commitIndex),n=KT(t)),ue(this,__)+NPn(t,n)}}__=new WeakMap;const vPn=new Set(["*","**","_","__"]);function KT(e){const r={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;tts(e.queryKey,o)}),n=t.isPending,s=o=>{r&&!n&&t.mutate({...r,[o]:!r[o]})};return r?f.jsx("div",{className:"flex flex-col",children:_Pn.map(o=>{const a=r[o];return f.jsxs(_r,{type:"button",role:"switch","aria-checked":a,disabled:n,onClick:()=>s(o),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(AF,{source:o,size:16,decorative:!0}),NF[o]]}),f.jsx(Szn,{checked:a,"aria-hidden":"true"})]},o)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:m5t()})}function pk(e,r){if(!e)throw new Error("Assertion Error")}function lf(e,r){if(e==null)throw new Error(`Unexpected ${e}`);return e}var GT=Object.prototype.hasOwnProperty;function WT(e,r,t){for(t of e.keys())if(eg(t,r))return t}function eg(e,r){var t,n,s;if(e===r)return!0;if(e&&r&&(t=e.constructor)===r.constructor){if(t===Date)return e.getTime()===r.getTime();if(t===RegExp)return e.toString()===r.toString();if(t===Array){if((n=e.length)===r.length)for(;n--&&eg(e[n],r[n]););return n===-1}if(t===Set){if(e.size!==r.size)return!1;for(n of e)if(s=n,s&&typeof s=="object"&&(s=WT(r,s),!s)||!r.has(s))return!1;return!0}if(t===Map){if(e.size!==r.size)return!1;for(n of e)if(s=n[0],s&&typeof s=="object"&&(s=WT(r,s),!s)||!eg(n[1],r.get(s)))return!1;return!0}if(t===ArrayBuffer)e=new Uint8Array(e),r=new Uint8Array(r);else if(t===DataView){if((n=e.byteLength)===r.byteLength)for(;n--&&e.getInt8(n)===r.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===r.byteLength)for(;n--&&e[n]===r[n];);return n===-1}if(!t||typeof e=="object"){n=0;for(t in e)if(GT.call(e,t)&&++n&&!GT.call(r,t)||!(t in r)||!eg(e[t],r[t]))return!1;return Object.keys(r).length===n}}return e!==e&&r!==r}const dPn=new Set(["table","tbody","thead","tfoot","tr"]),hPn=/^[\t\n\f\r ]*$/;function pPn(e,r,t={}){const n=TF(e,r??null,{Fragment:f.Fragment,components:t,jsx:f.jsx,jsxs:f.jsxs},void 0);return{react:n.react,state:n}}function TF(e,r,t,n){var x,v,b,w;if(r&&r.key===n&&e===r.node)return r;if(!("children"in e)||!Array.isArray(e.children))return r&&r.key===n&&Nh(e,r.node)?r:{children:[],key:n,node:e,react:e.type==="text"&&"value"in e&&typeof e.value=="string"?e.value:void 0,shell:null};const s=(r==null?void 0:r.children)??[],o=[],a=[],i=new Map,c=new Set(s.map(y=>y.key).filter(y=>y!==void 0));let u=0;for(;u=e.children.length-d&&(N=s.length-(e.children.length-y)),N>=0&&(z=((b=s[N])==null?void 0:b.key)??z);z&&c.has(z)&&((w=s[N])==null?void 0:w.key)!==z;)z=`${z}+`;z&&c.add(z);const A=TF(S,s[N]??null,t,z);o.push(A),A.react!==void 0&&a.push(A.react)}const _=r!==null&&mPn(e,r.node);if(r&&r.key===n&&_&&s.length===o.length&&o.every((y,S)=>y===s[S]))return r;const p=e.type==="element"&&dPn.has(e.tagName)?a.filter(y=>typeof y!="string"||!hPn.test(y)):a,m=p.length>0?p.length===1?p[0]:p:null;let k=_?r==null?void 0:r.shell:null;if(!k){const y=UB({...e,children:[]},t);k={props:y.props,type:y.type}}return{children:o,key:n,node:e,react:f.jsx(k.type,{...k.props,children:m},n),shell:k}}function mPn(e,r){if(e===r)return!0;const{children:t,position:n,...s}=e,{children:o,position:a,...i}=r;return eg(s,i)}function Nh(e,r){if(e===r)return!0;if(Array.isArray(e)||Array.isArray(r)){if(!Array.isArray(e)||!Array.isArray(r)||e.length!==r.length)return!1;for(let a=0;a0&&(Ge(this,__,ue(this,__)+t.slice(0,n.commitIndex)),t=t.slice(n.commitIndex),n=KT(t)),ue(this,__)+NPn(t,n)}}__=new WeakMap;const vPn=new Set(["*","**","_","__"]);function KT(e){const r={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;tt){t=s-1;continue}if(r.exclusive)continue;if(EPn(r)){VT(r,t,n);continue}const o=kPn(r,e,t);if(o>t){t=o-1;continue}const a=jPn(r,e,t);if(a>t){t=a-1;continue}ec(e,t)||VT(r,t,n)}return r}function bPn(e,r,t){const n=r[t];return n==="`"?yPn(e,r,t):n==="$"?xPn(e,r,t):n==="~"?wPn(e,r,t):t}function yPn(e,r,t){const n=M6(r,t),s="`".repeat(n),o=e.exclusive;return(o==null?void 0:o.kind)==="fence"?(o.token[0]==="`"&&Hb(r,t)&&!ec(r,t)&&n>=o.token.length&&(e.exclusive=null),t+n):(o==null?void 0:o.kind)==="code"?(!ec(r,t)&&n>=o.token.length&&(e.exclusive=null),t+n):o||ec(r,t)?t+n:n>=3&&Hb(r,t)?(e.exclusive={kind:"fence",start:t,token:s},t+n):(e.exclusive={kind:"code",start:t,token:s},t+n)}function xPn(e,r,t){const n=M6(r,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!ec(r,t)&&n>=s.token.length&&(e.exclusive=null),t+n):(s||ec(r,t)||(e.exclusive={kind:"math",start:t,token:n>=2?"$$":"$"}),t+n)}function wPn(e,r,t){const n=M6(r,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(Hb(r,t)&&!ec(r,t)&&n>=s.token.length&&(e.exclusive=null),t+n):s||n<3||!Hb(r,t)||ec(r,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(n)},t+n)}function kPn(e,r,t){if(r[t]!=="<"||ec(r,t))return t;const n=r[t+1];if(n!==void 0&&!OF(n))return t;e.pendingHtml=t;for(let s=t+1;s"||r[s]===` `)return e.pendingHtml=null,s+1;return r.length}function jPn(e,r,t){const n=SPn(r,t);if(!n)return t;if(ec(r,t))return t+n.length;const s=e.delims.findLastIndex(o=>o.token===n);return s!==-1?(e.delims.splice(s,1),t+n.length):t+n.length===r.length?(e.pendingDelim={start:t,token:n},t+n.length):(CPn(r,t,n)&&e.delims.push({start:t,token:n}),t+n.length)}function SPn(e,r){const t=e[r];if(t==="*")return e.startsWith("***",r)?"***":e.startsWith("**",r)?"**":"*";if(t==="_")return e.startsWith("__",r)?"__":"_";if(t==="~"&&e.startsWith("~~",r))return"~~"}function CPn(e,r,t){const n=e[r+t.length];if(!n||/\s/.test(n))return!1;const s=e[r-1];return!YT(s)||!YT(n)}function VT(e,r,t){const n=e.links.at(-1);if(t==="["){e.links.push({phase:"text",start:r});return}if(t==="]"&&(n==null?void 0:n.phase)==="text"){e.links[e.links.length-1]={phase:"url_wait",start:n.start,textEnd:r};return}if(t==="("&&(n==null?void 0:n.phase)==="url_wait"){e.links[e.links.length-1]={phase:"url",start:n.start,textEnd:n.textEnd,parenDepth:0};return}if(t==="("&&(n==null?void 0:n.phase)==="url"){n.parenDepth+=1;return}if(t===")"&&(n==null?void 0:n.phase)==="url"){if(n.parenDepth>0){n.parenDepth-=1;return}e.links.pop()}}function zPn(e){var r,t;e.delims.length=0,e.links.length=0,((r=e.exclusive)==null?void 0:r.kind)!=="fence"&&(((t=e.exclusive)==null?void 0:t.kind)==="math"&&e.exclusive.token==="$$"||(e.exclusive=null))}function EPn(e){var t;const r=(t=e.links.at(-1))==null?void 0:t.phase;return r==="url_wait"||r==="url"}function NPn(e,r){r.pendingHtml!==null&&(e=e.slice(0,RPn(e,r.pendingHtml)));const t=r.links.at(-1);if(t)return Sc(APn(e,t));const n=TPn(r);if(n)return Sc(yh(e,n));const s=$Pn(r);return s?s.kind==="delim"?Sc(_5(e,s.start,s.token.length)?RF(e,s.token):e.slice(0,s.start)):_5(e,s.start,s.token.length)?s.kind==="fence"?Sc(e):s.kind==="code"?Sc(yh(e,s.token)):s.token==="$$"?Sc(yh(e,(e.endsWith(` @@ -792,11 +792,11 @@ ${o}`]:[]});return n.length===0?null:[`# ${e}`,...n].join(` `),t=r===-1?0:r+2,n=e.slice(0,t),s=e.slice(t),o=s.indexOf(` `),a=o===-1?s:s.slice(0,o),i=(v=a.match(/^( *)\|/))==null?void 0:v[1];if(i===void 0)return e;if(QT(a)<2&&!DPn(a,i))return n;const c=a.trimEnd().endsWith("|")?a:RF(a," |"),u=QT(c),d=u<2?0:c.trimEnd().endsWith("|")?u-1:u;if(d===0)return e;const _=o===-1?"":s.slice(o+1),p=XT(i,Array.from({length:d},()=>"-"));if(_.length===0)return n+c+` `+p;const m=_.indexOf(` -`),k=m===-1?_:_.slice(0,m),w=m===-1?"":_.slice(m);if(LPn(k,i,d))return e;if(k.startsWith(i+"|")&&/^[ |:\-\t]*$/.test(k.slice(i.length))){const b=MF(k,i).map(x=>{const y=x.trim();if(y.length===0)return"-";let S=0;for(let z=0;z1&&y.endsWith(":")?":":"")});for(;b.length{const y=w.trim();if(y.length===0)return"-";let S=0;for(let z=0;z1&&y.endsWith(":")?":":"")});for(;b.length0;t-=1)if(e.endsWith(r.slice(0,t)))return t;return 0}function $Pn(e){const r=e.delims.at(-1);return e.exclusive&&(!r||e.exclusive.start>r.start)?e.exclusive:r?{kind:"delim",start:r.start,token:r.token}:e.exclusive}function QT(e){let r=0;for(let t=0;t0}function XT(e,r){return e+"|"+r.map(t=>` ${t} |`).join("")}function MF(e,r){const t=e.slice(r.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function LPn(e,r,t){if(!e.startsWith(r))return!1;const n=e.slice(r.length).trim();if(!n.startsWith("|")||!n.endsWith("|"))return!1;const s=MF(n,"").map(o=>o.trim());return s.length===t&&s.every(o=>/^:?-+:?$/.test(o))}function M6(e,r){let t=r+1;for(;tr+t}function Hb(e,r){return r===0||e[r-1]===` -`}function ec(e,r){let t=0;for(let n=r-1;n>=0&&e[n]==="\\";n--)t+=1;return t%2===1}function YT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function OF(e){return!!e&&/[A-Za-z]/.test(e)}const $F=ox().use(rx);var Zg,Yh,Zh,Mf,Jh,Jg,e0,t0,Of,r0,$f;class IPn{constructor(){ft(this,Zg,$F);ft(this,Yh,null);ft(this,Zh,{});ft(this,Mf,null);ft(this,Jh,"");ft(this,Jg,[]);ft(this,e0,[]);ft(this,t0,[]);ft(this,Of,0);ft(this,r0,[]);ft(this,$f,[])}reconfigure(r,t,n){ue(this,Yh)!==null&&ue(this,Zg)===r&&DF(ue(this,Zh),n)&&!!ue(this,Mf)===t||(Ge(this,Zg,r),r.attachers.some(s=>s[0]===Ib)||(r=r(),r.use(Ib),r.freeze()),Ge(this,Yh,r),Ge(this,Zh,n),Ge(this,Jh,""),Ge(this,Jg,[]),Ge(this,e0,[]),Ge(this,t0,[]),Ge(this,Of,0),Ge(this,r0,[]),Ge(this,Mf,t?new gPn:null))}update(r){ue(this,Mf)&&(r=ue(this,Mf).update(r));let t=ue(this,Jh);if(r===t)return ue(this,$f);const n=ue(this,Jg),s=PPn(r,t);let o=n.length-1;for(;o>=0&&!(s>=n[o]);o-=1);let a=n[o]??0;o===-1&&(o=0);const i=lf(ue(this,Yh)),c=ue(this,e0),u=c.slice(o).some(E=>E.some(f5));let d=i.parse(r.slice(a)),_=d.children.map(E=>lf(lf(E.position).start.offset)+a);Ge(this,Jh,r),pk(n.length===c.length),n.splice(o,n.length-o,..._);{const E=mk(d,_,a);pk(E.length===_.length),c.splice(o,c.length-o,...E)}if(u||f5(d)){o=0,a=0,d=i.parse(r),_=d.children.map(A=>lf(lf(A.position).start.offset)+a),n.splice(0,n.length,..._);const E=mk(d,_,a);pk(E.length===_.length),c.splice(0,c.length,...E)}const p=mk(i.runSync(d),_,a),m=ue(this,t0),k=ue(this,r0),w=ue(this,$f),v=k.length;let b=null,x=0;for(;xv&&(m.length=k.length=n.length);for(let E=n.length=S?M=v-(n.length-A):A=v){m[A]=String(ue(this,Of)),Ge(this,Of,ue(this,Of)+1),k[A]=null,b&&(b[A]=void 0);continue}m[A]=m[M]??String(hm(this,Of)._++),k[A]=k[M]??null,b&&(b[A]=w[M])}n.length[]);let s=0;for(const a of e.children){const i=(o=a.position)==null?void 0:o.start.offset;if(i!==void 0){for(;s+1u&&(u=d):d&&(u!==void 0&&u>-1&&c.push(` +`}function ec(e,r){let t=0;for(let n=r-1;n>=0&&e[n]==="\\";n--)t+=1;return t%2===1}function YT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function OF(e){return!!e&&/[A-Za-z]/.test(e)}const $F=ox().use(rx);var Zg,Yh,Zh,Mf,Jh,Jg,e0,t0,Of,r0,$f;class IPn{constructor(){ft(this,Zg,$F);ft(this,Yh,null);ft(this,Zh,{});ft(this,Mf,null);ft(this,Jh,"");ft(this,Jg,[]);ft(this,e0,[]);ft(this,t0,[]);ft(this,Of,0);ft(this,r0,[]);ft(this,$f,[])}reconfigure(r,t,n){ue(this,Yh)!==null&&ue(this,Zg)===r&&DF(ue(this,Zh),n)&&!!ue(this,Mf)===t||(Ge(this,Zg,r),r.attachers.some(s=>s[0]===Ib)||(r=r(),r.use(Ib),r.freeze()),Ge(this,Yh,r),Ge(this,Zh,n),Ge(this,Jh,""),Ge(this,Jg,[]),Ge(this,e0,[]),Ge(this,t0,[]),Ge(this,Of,0),Ge(this,r0,[]),Ge(this,Mf,t?new gPn:null))}update(r){ue(this,Mf)&&(r=ue(this,Mf).update(r));let t=ue(this,Jh);if(r===t)return ue(this,$f);const n=ue(this,Jg),s=PPn(r,t);let o=n.length-1;for(;o>=0&&!(s>=n[o]);o-=1);let a=n[o]??0;o===-1&&(o=0);const i=lf(ue(this,Yh)),c=ue(this,e0),u=c.slice(o).some(N=>N.some(f5));let d=i.parse(r.slice(a)),_=d.children.map(N=>lf(lf(N.position).start.offset)+a);Ge(this,Jh,r),pk(n.length===c.length),n.splice(o,n.length-o,..._);{const N=mk(d,_,a);pk(N.length===_.length),c.splice(o,c.length-o,...N)}if(u||f5(d)){o=0,a=0,d=i.parse(r),_=d.children.map(A=>lf(lf(A.position).start.offset)+a),n.splice(0,n.length,..._);const N=mk(d,_,a);pk(N.length===_.length),c.splice(0,c.length,...N)}const p=mk(i.runSync(d),_,a),m=ue(this,t0),k=ue(this,r0),x=ue(this,$f),v=k.length;let b=null,w=0;for(;wv&&(m.length=k.length=n.length);for(let N=n.length=S?M=v-(n.length-A):A=v){m[A]=String(ue(this,Of)),Ge(this,Of,ue(this,Of)+1),k[A]=null,b&&(b[A]=void 0);continue}m[A]=m[M]??String(hm(this,Of)._++),k[A]=k[M]??null,b&&(b[A]=x[M])}n.length[]);let s=0;for(const a of e.children){const i=(o=a.position)==null?void 0:o.start.offset;if(i!==void 0){for(;s+1u&&(u=d):d&&(u!==void 0&&u>-1&&c.push(` `.repeat(u)||" "),u=-1,c.push(d))}return c.join("")}function BF(e,r,t){return e.type==="element"?aBn(e,r,t):e.type==="text"?t.whitespace==="normal"?FF(e,t):iBn(e):[]}function aBn(e,r,t){const n=HF(e,t),s=e.children||[];let o=-1,a=[];if(sBn(e))return a;let i,c;for(d5(e)||sR(e)&&eR(r,e,sR)?c=` `:nBn(e)?(i=2,c=2):PF(e)&&(i=1,c=1);++o15?u="…"+i.slice(s-15,s):u=i.slice(0,s);var d;o+15e.replace(fBn,"-$1").toLowerCase(),hBn={"&":"&",">":">","<":"<",'"':""","'":"'"},pBn=/[&><"']/g,zo=e=>String(e).replace(pBn,r=>hBn[r]),G1=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?G1(e.body[0]):e:e.type==="font"?G1(e.body):e,mBn=new Set(["mathord","textord","atom"]),uu=e=>mBn.has(G1(e).type),gBn=e=>{var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},h5={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,r)=>(r.push(e),r)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function vBn(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function bBn(e){if(e.default!==void 0)return e.default;var r=Array.isArray(e.type)?e.type[0]:e.type;return vBn(r)}function yBn(e,r,t,n){var s=t[r];e[r]=s!==void 0?n.processor?n.processor(s):s:bBn(n)}class $6{constructor(r){r===void 0&&(r={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,r=r||{};for(var t of Object.keys(h5)){var n=h5[t];n&&yBn(this,t,r,n)}}reportNonstrict(r,t,n){var s=this.strict;if(typeof s=="function"&&(s=s(r,t,n)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new tt("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+r+"]"),n);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+r+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+r+"]"))}}useStrictBehavior(r,t,n){var s=this.strict;if(typeof s=="function")try{s=s(r,t,n)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+r+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+r+"]")),!1)}isTrusted(r){if("url"in r&&r.url&&!r.protocol){var t=gBn(r.url);if(t==null)return!1;r.protocol=t}var n=typeof this.trust=="function"?this.trust(r):this.trust;return!!n}}class Ku{constructor(r,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=r,this.size=t,this.cramped=n}sup(){return Oc[xBn[this.id]]}sub(){return Oc[wBn[this.id]]}fracNum(){return Oc[kBn[this.id]]}fracDen(){return Oc[jBn[this.id]]}cramp(){return Oc[SBn[this.id]]}text(){return Oc[CBn[this.id]]}isTight(){return this.size>=2}}var D6=0,qb=1,Ah=2,ru=3,zg=4,ki=5,cp=6,Ko=7,Oc=[new Ku(D6,0,!1),new Ku(qb,0,!0),new Ku(Ah,1,!1),new Ku(ru,1,!0),new Ku(zg,2,!1),new Ku(ki,2,!0),new Ku(cp,3,!1),new Ku(Ko,3,!0)],xBn=[zg,ki,zg,ki,cp,Ko,cp,Ko],wBn=[ki,ki,ki,ki,Ko,Ko,Ko,Ko],kBn=[Ah,ru,zg,ki,cp,Ko,cp,Ko],jBn=[ru,ru,ki,ki,Ko,Ko,Ko,Ko],SBn=[qb,qb,ru,ru,ki,ki,Ko,Ko],CBn=[D6,qb,Ah,ru,Ah,ru,Ah,ru],ir={DISPLAY:Oc[D6],TEXT:Oc[Ah],SCRIPT:Oc[zg],SCRIPTSCRIPT:Oc[cp]},p5=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function zBn(e){for(var r=0;r=s[0]&&e<=s[1])return t.name}return null}var W1=[];p5.forEach(e=>e.blocks.forEach(r=>W1.push(...r)));function qF(e){for(var r=0;r=W1[r]&&e<=W1[r+1])return!0;return!1}var Ds=e=>e+" "+e,ah=80,EBn=function(r,t){return"M95,"+(622+r+t)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 @@ -1048,14 +1048,14 @@ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function IBn(e){return"toText"in e}class Ep{constructor(r){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=r,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(r){return this.classes.includes(r)}toNode(){for(var r=document.createDocumentFragment(),t=0;t{if(IBn(r))return r.toText();throw new Error("Expected MathDomNode with toText, got "+r.constructor.name)}).join("")}}var m5={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},PBn={ex:!0,em:!0,mu:!0},UF=function(r){return typeof r!="string"&&(r=r.unit),r in m5||r in PBn||r==="ex"},Un=function(r,t){var n;if(r.unit in m5)n=m5[r.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(r.unit==="mu")n=t.fontMetrics().cssEmPerMu;else{var s;if(t.style.isTight()?s=t.havingStyle(t.style.text()):s=t,r.unit==="ex")n=s.fontMetrics().xHeight;else if(r.unit==="em")n=s.fontMetrics().quad;else throw new tt("Invalid unit: '"+r.unit+"'");s!==t&&(n*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(r.number*n,t.maxSize)},ot=function(r){return+r.toFixed(4)+"em"},k_=function(r){return r.filter(t=>t).join(" ")},L6=function(r){var t="";for(var n of Object.keys(r)){var s=r[n];s!==void 0&&(t+=dBn(n)+":"+s+";")}return t},GF=function(r,t,n){if(this.classes=r||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var s=t.getColor();s&&(this.style.color=s)}},WF=function(r){var t=document.createElement(r);t.className=k_(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var s=0;s/=\x00-\x1f]/,KF=function(r){var t="<"+r;this.classes.length&&(t+=' class="'+zo(k_(this.classes))+'"');var n=L6(this.style);n&&(t+=' style="'+zo(n)+'"');for(var s of Object.keys(this.attributes)){if(BBn.test(s))throw new tt("Invalid attribute name '"+s+"'");t+=" "+s+'="'+zo(this.attributes[s])+'"'}t+=">";for(var o=0;o",t};class Np{constructor(r,t,n,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,GF.call(this,r,n,s),this.children=t||[]}setAttribute(r,t){this.attributes[r]=t}hasClass(r){return this.classes.includes(r)}toNode(){return WF.call(this,"span")}toMarkup(){return KF.call(this,"span")}}class ix{constructor(r,t,n,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,GF.call(this,t,s),this.children=n||[],this.setAttribute("href",r)}setAttribute(r,t){this.attributes[r]=t}hasClass(r){return this.classes.includes(r)}toNode(){return WF.call(this,"a")}toMarkup(){return KF.call(this,"a")}}class FBn{constructor(r,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=r,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(r){return this.classes.includes(r)}toNode(){var r=document.createElement("img");return r.src=this.src,r.alt=this.alt,r.className="mord",Object.assign(r.style,this.style),r}toMarkup(){var r=''+zo(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=ot(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=k_(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(r),t):r}toMarkup(){var r=!1,t="0&&(n+="margin-right:"+ot(this.italic)+";"),n+=L6(this.style),n&&(r=!0,t+=' style="'+zo(n)+'"');var s=zo(this.text);return r?(t+=">",t+=s,t+="",t):s}}class au{constructor(r,t){this.children=void 0,this.attributes=void 0,this.children=r||[],this.attributes=t||{}}toNode(){var r="http://www.w3.org/2000/svg",t=document.createElementNS(r,"svg");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var s=0;s':''}}class g5{constructor(r){this.attributes=void 0,this.attributes=r||{}}toNode(){var r="http://www.w3.org/2000/svg",t=document.createElementNS(r,"line");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var r=" but got "+String(e)+".")}var GBn=e=>e instanceof Np||e instanceof ix||e instanceof Ep,Dc={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},s1={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},aR={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function WBn(e,r){Dc[e]=r}function I6(e,r,t){if(!Dc[r])throw new Error("Font metrics not found for font: "+r+".");var n=e.charCodeAt(0),s=Dc[r][n];if(!s&&e[0]in aR&&(n=aR[e[0]].charCodeAt(0),s=Dc[r][n]),!s&&t==="text"&&qF(n)&&(s=Dc[r][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var vk={};function KBn(e){var r;if(e>=5?r=0:e>=3?r=1:r=2,!vk[r]){var t=vk[r]={cssEmPerMu:s1.quad[r]/18};for(var n in s1)s1.hasOwnProperty(n)&&(t[n]=s1[n][r])}return vk[r]}var $n={math:{},text:{}};function B(e,r,t,n,s,o){$n[e][s]={font:r,group:t,replace:n},o&&n&&($n[e][n]=$n[e][s])}var V="math",We="text",te="main",de="ams",Ln="accent-token",yt="bin",Qo="close",Ap="inner",Qt="mathord",zs="op-token",Ya="open",C0="punct",he="rel",_u="spacing",ve="textord";B(V,te,he,"≡","\\equiv",!0);B(V,te,he,"≺","\\prec",!0);B(V,te,he,"≻","\\succ",!0);B(V,te,he,"∼","\\sim",!0);B(V,te,he,"⊥","\\perp");B(V,te,he,"⪯","\\preceq",!0);B(V,te,he,"⪰","\\succeq",!0);B(V,te,he,"≃","\\simeq",!0);B(V,te,he,"∣","\\mid",!0);B(V,te,he,"≪","\\ll",!0);B(V,te,he,"≫","\\gg",!0);B(V,te,he,"≍","\\asymp",!0);B(V,te,he,"∥","\\parallel");B(V,te,he,"⋈","\\bowtie",!0);B(V,te,he,"⌣","\\smile",!0);B(V,te,he,"⊑","\\sqsubseteq",!0);B(V,te,he,"⊒","\\sqsupseteq",!0);B(V,te,he,"≐","\\doteq",!0);B(V,te,he,"⌢","\\frown",!0);B(V,te,he,"∋","\\ni",!0);B(V,te,he,"∝","\\propto",!0);B(V,te,he,"⊢","\\vdash",!0);B(V,te,he,"⊣","\\dashv",!0);B(V,te,he,"∋","\\owns");B(V,te,C0,".","\\ldotp");B(V,te,C0,"⋅","\\cdotp");B(V,te,C0,"⋅","·");B(We,te,ve,"⋅","·");B(V,te,ve,"#","\\#");B(We,te,ve,"#","\\#");B(V,te,ve,"&","\\&");B(We,te,ve,"&","\\&");B(V,te,ve,"ℵ","\\aleph",!0);B(V,te,ve,"∀","\\forall",!0);B(V,te,ve,"ℏ","\\hbar",!0);B(V,te,ve,"∃","\\exists",!0);B(V,te,ve,"∇","\\nabla",!0);B(V,te,ve,"♭","\\flat",!0);B(V,te,ve,"ℓ","\\ell",!0);B(V,te,ve,"♮","\\natural",!0);B(V,te,ve,"♣","\\clubsuit",!0);B(V,te,ve,"℘","\\wp",!0);B(V,te,ve,"♯","\\sharp",!0);B(V,te,ve,"♢","\\diamondsuit",!0);B(V,te,ve,"ℜ","\\Re",!0);B(V,te,ve,"♡","\\heartsuit",!0);B(V,te,ve,"ℑ","\\Im",!0);B(V,te,ve,"♠","\\spadesuit",!0);B(V,te,ve,"§","\\S",!0);B(We,te,ve,"§","\\S");B(V,te,ve,"¶","\\P",!0);B(We,te,ve,"¶","\\P");B(V,te,ve,"†","\\dag");B(We,te,ve,"†","\\dag");B(We,te,ve,"†","\\textdagger");B(V,te,ve,"‡","\\ddag");B(We,te,ve,"‡","\\ddag");B(We,te,ve,"‡","\\textdaggerdbl");B(V,te,Qo,"⎱","\\rmoustache",!0);B(V,te,Ya,"⎰","\\lmoustache",!0);B(V,te,Qo,"⟯","\\rgroup",!0);B(V,te,Ya,"⟮","\\lgroup",!0);B(V,te,yt,"∓","\\mp",!0);B(V,te,yt,"⊖","\\ominus",!0);B(V,te,yt,"⊎","\\uplus",!0);B(V,te,yt,"⊓","\\sqcap",!0);B(V,te,yt,"∗","\\ast");B(V,te,yt,"⊔","\\sqcup",!0);B(V,te,yt,"◯","\\bigcirc",!0);B(V,te,yt,"∙","\\bullet",!0);B(V,te,yt,"‡","\\ddagger");B(V,te,yt,"≀","\\wr",!0);B(V,te,yt,"⨿","\\amalg");B(V,te,yt,"&","\\And");B(V,te,he,"⟵","\\longleftarrow",!0);B(V,te,he,"⇐","\\Leftarrow",!0);B(V,te,he,"⟸","\\Longleftarrow",!0);B(V,te,he,"⟶","\\longrightarrow",!0);B(V,te,he,"⇒","\\Rightarrow",!0);B(V,te,he,"⟹","\\Longrightarrow",!0);B(V,te,he,"↔","\\leftrightarrow",!0);B(V,te,he,"⟷","\\longleftrightarrow",!0);B(V,te,he,"⇔","\\Leftrightarrow",!0);B(V,te,he,"⟺","\\Longleftrightarrow",!0);B(V,te,he,"↦","\\mapsto",!0);B(V,te,he,"⟼","\\longmapsto",!0);B(V,te,he,"↗","\\nearrow",!0);B(V,te,he,"↩","\\hookleftarrow",!0);B(V,te,he,"↪","\\hookrightarrow",!0);B(V,te,he,"↘","\\searrow",!0);B(V,te,he,"↼","\\leftharpoonup",!0);B(V,te,he,"⇀","\\rightharpoonup",!0);B(V,te,he,"↙","\\swarrow",!0);B(V,te,he,"↽","\\leftharpoondown",!0);B(V,te,he,"⇁","\\rightharpoondown",!0);B(V,te,he,"↖","\\nwarrow",!0);B(V,te,he,"⇌","\\rightleftharpoons",!0);B(V,de,he,"≮","\\nless",!0);B(V,de,he,"","\\@nleqslant");B(V,de,he,"","\\@nleqq");B(V,de,he,"⪇","\\lneq",!0);B(V,de,he,"≨","\\lneqq",!0);B(V,de,he,"","\\@lvertneqq");B(V,de,he,"⋦","\\lnsim",!0);B(V,de,he,"⪉","\\lnapprox",!0);B(V,de,he,"⊀","\\nprec",!0);B(V,de,he,"⋠","\\npreceq",!0);B(V,de,he,"⋨","\\precnsim",!0);B(V,de,he,"⪹","\\precnapprox",!0);B(V,de,he,"≁","\\nsim",!0);B(V,de,he,"","\\@nshortmid");B(V,de,he,"∤","\\nmid",!0);B(V,de,he,"⊬","\\nvdash",!0);B(V,de,he,"⊭","\\nvDash",!0);B(V,de,he,"⋪","\\ntriangleleft");B(V,de,he,"⋬","\\ntrianglelefteq",!0);B(V,de,he,"⊊","\\subsetneq",!0);B(V,de,he,"","\\@varsubsetneq");B(V,de,he,"⫋","\\subsetneqq",!0);B(V,de,he,"","\\@varsubsetneqq");B(V,de,he,"≯","\\ngtr",!0);B(V,de,he,"","\\@ngeqslant");B(V,de,he,"","\\@ngeqq");B(V,de,he,"⪈","\\gneq",!0);B(V,de,he,"≩","\\gneqq",!0);B(V,de,he,"","\\@gvertneqq");B(V,de,he,"⋧","\\gnsim",!0);B(V,de,he,"⪊","\\gnapprox",!0);B(V,de,he,"⊁","\\nsucc",!0);B(V,de,he,"⋡","\\nsucceq",!0);B(V,de,he,"⋩","\\succnsim",!0);B(V,de,he,"⪺","\\succnapprox",!0);B(V,de,he,"≆","\\ncong",!0);B(V,de,he,"","\\@nshortparallel");B(V,de,he,"∦","\\nparallel",!0);B(V,de,he,"⊯","\\nVDash",!0);B(V,de,he,"⋫","\\ntriangleright");B(V,de,he,"⋭","\\ntrianglerighteq",!0);B(V,de,he,"","\\@nsupseteqq");B(V,de,he,"⊋","\\supsetneq",!0);B(V,de,he,"","\\@varsupsetneq");B(V,de,he,"⫌","\\supsetneqq",!0);B(V,de,he,"","\\@varsupsetneqq");B(V,de,he,"⊮","\\nVdash",!0);B(V,de,he,"⪵","\\precneqq",!0);B(V,de,he,"⪶","\\succneqq",!0);B(V,de,he,"","\\@nsubseteqq");B(V,de,yt,"⊴","\\unlhd");B(V,de,yt,"⊵","\\unrhd");B(V,de,he,"↚","\\nleftarrow",!0);B(V,de,he,"↛","\\nrightarrow",!0);B(V,de,he,"⇍","\\nLeftarrow",!0);B(V,de,he,"⇏","\\nRightarrow",!0);B(V,de,he,"↮","\\nleftrightarrow",!0);B(V,de,he,"⇎","\\nLeftrightarrow",!0);B(V,de,he,"△","\\vartriangle");B(V,de,ve,"ℏ","\\hslash");B(V,de,ve,"▽","\\triangledown");B(V,de,ve,"◊","\\lozenge");B(V,de,ve,"Ⓢ","\\circledS");B(V,de,ve,"®","\\circledR");B(We,de,ve,"®","\\circledR");B(V,de,ve,"∡","\\measuredangle",!0);B(V,de,ve,"∄","\\nexists");B(V,de,ve,"℧","\\mho");B(V,de,ve,"Ⅎ","\\Finv",!0);B(V,de,ve,"⅁","\\Game",!0);B(V,de,ve,"‵","\\backprime");B(V,de,ve,"▲","\\blacktriangle");B(V,de,ve,"▼","\\blacktriangledown");B(V,de,ve,"■","\\blacksquare");B(V,de,ve,"⧫","\\blacklozenge");B(V,de,ve,"★","\\bigstar");B(V,de,ve,"∢","\\sphericalangle",!0);B(V,de,ve,"∁","\\complement",!0);B(V,de,ve,"ð","\\eth",!0);B(We,te,ve,"ð","ð");B(V,de,ve,"╱","\\diagup");B(V,de,ve,"╲","\\diagdown");B(V,de,ve,"□","\\square");B(V,de,ve,"□","\\Box");B(V,de,ve,"◊","\\Diamond");B(V,de,ve,"¥","\\yen",!0);B(We,de,ve,"¥","\\yen",!0);B(V,de,ve,"✓","\\checkmark",!0);B(We,de,ve,"✓","\\checkmark");B(V,de,ve,"ℶ","\\beth",!0);B(V,de,ve,"ℸ","\\daleth",!0);B(V,de,ve,"ℷ","\\gimel",!0);B(V,de,ve,"ϝ","\\digamma",!0);B(V,de,ve,"ϰ","\\varkappa");B(V,de,Ya,"┌","\\@ulcorner",!0);B(V,de,Qo,"┐","\\@urcorner",!0);B(V,de,Ya,"└","\\@llcorner",!0);B(V,de,Qo,"┘","\\@lrcorner",!0);B(V,de,he,"≦","\\leqq",!0);B(V,de,he,"⩽","\\leqslant",!0);B(V,de,he,"⪕","\\eqslantless",!0);B(V,de,he,"≲","\\lesssim",!0);B(V,de,he,"⪅","\\lessapprox",!0);B(V,de,he,"≊","\\approxeq",!0);B(V,de,yt,"⋖","\\lessdot");B(V,de,he,"⋘","\\lll",!0);B(V,de,he,"≶","\\lessgtr",!0);B(V,de,he,"⋚","\\lesseqgtr",!0);B(V,de,he,"⪋","\\lesseqqgtr",!0);B(V,de,he,"≑","\\doteqdot");B(V,de,he,"≓","\\risingdotseq",!0);B(V,de,he,"≒","\\fallingdotseq",!0);B(V,de,he,"∽","\\backsim",!0);B(V,de,he,"⋍","\\backsimeq",!0);B(V,de,he,"⫅","\\subseteqq",!0);B(V,de,he,"⋐","\\Subset",!0);B(V,de,he,"⊏","\\sqsubset",!0);B(V,de,he,"≼","\\preccurlyeq",!0);B(V,de,he,"⋞","\\curlyeqprec",!0);B(V,de,he,"≾","\\precsim",!0);B(V,de,he,"⪷","\\precapprox",!0);B(V,de,he,"⊲","\\vartriangleleft");B(V,de,he,"⊴","\\trianglelefteq");B(V,de,he,"⊨","\\vDash",!0);B(V,de,he,"⊪","\\Vvdash",!0);B(V,de,he,"⌣","\\smallsmile");B(V,de,he,"⌢","\\smallfrown");B(V,de,he,"≏","\\bumpeq",!0);B(V,de,he,"≎","\\Bumpeq",!0);B(V,de,he,"≧","\\geqq",!0);B(V,de,he,"⩾","\\geqslant",!0);B(V,de,he,"⪖","\\eqslantgtr",!0);B(V,de,he,"≳","\\gtrsim",!0);B(V,de,he,"⪆","\\gtrapprox",!0);B(V,de,yt,"⋗","\\gtrdot");B(V,de,he,"⋙","\\ggg",!0);B(V,de,he,"≷","\\gtrless",!0);B(V,de,he,"⋛","\\gtreqless",!0);B(V,de,he,"⪌","\\gtreqqless",!0);B(V,de,he,"≖","\\eqcirc",!0);B(V,de,he,"≗","\\circeq",!0);B(V,de,he,"≜","\\triangleq",!0);B(V,de,he,"∼","\\thicksim");B(V,de,he,"≈","\\thickapprox");B(V,de,he,"⫆","\\supseteqq",!0);B(V,de,he,"⋑","\\Supset",!0);B(V,de,he,"⊐","\\sqsupset",!0);B(V,de,he,"≽","\\succcurlyeq",!0);B(V,de,he,"⋟","\\curlyeqsucc",!0);B(V,de,he,"≿","\\succsim",!0);B(V,de,he,"⪸","\\succapprox",!0);B(V,de,he,"⊳","\\vartriangleright");B(V,de,he,"⊵","\\trianglerighteq");B(V,de,he,"⊩","\\Vdash",!0);B(V,de,he,"∣","\\shortmid");B(V,de,he,"∥","\\shortparallel");B(V,de,he,"≬","\\between",!0);B(V,de,he,"⋔","\\pitchfork",!0);B(V,de,he,"∝","\\varpropto");B(V,de,he,"◀","\\blacktriangleleft");B(V,de,he,"∴","\\therefore",!0);B(V,de,he,"∍","\\backepsilon");B(V,de,he,"▶","\\blacktriangleright");B(V,de,he,"∵","\\because",!0);B(V,de,he,"⋘","\\llless");B(V,de,he,"⋙","\\gggtr");B(V,de,yt,"⊲","\\lhd");B(V,de,yt,"⊳","\\rhd");B(V,de,he,"≂","\\eqsim",!0);B(V,te,he,"⋈","\\Join");B(V,de,he,"≑","\\Doteq",!0);B(V,de,yt,"∔","\\dotplus",!0);B(V,de,yt,"∖","\\smallsetminus");B(V,de,yt,"⋒","\\Cap",!0);B(V,de,yt,"⋓","\\Cup",!0);B(V,de,yt,"⩞","\\doublebarwedge",!0);B(V,de,yt,"⊟","\\boxminus",!0);B(V,de,yt,"⊞","\\boxplus",!0);B(V,de,yt,"⋇","\\divideontimes",!0);B(V,de,yt,"⋉","\\ltimes",!0);B(V,de,yt,"⋊","\\rtimes",!0);B(V,de,yt,"⋋","\\leftthreetimes",!0);B(V,de,yt,"⋌","\\rightthreetimes",!0);B(V,de,yt,"⋏","\\curlywedge",!0);B(V,de,yt,"⋎","\\curlyvee",!0);B(V,de,yt,"⊝","\\circleddash",!0);B(V,de,yt,"⊛","\\circledast",!0);B(V,de,yt,"⋅","\\centerdot");B(V,de,yt,"⊺","\\intercal",!0);B(V,de,yt,"⋒","\\doublecap");B(V,de,yt,"⋓","\\doublecup");B(V,de,yt,"⊠","\\boxtimes",!0);B(V,de,he,"⇢","\\dashrightarrow",!0);B(V,de,he,"⇠","\\dashleftarrow",!0);B(V,de,he,"⇇","\\leftleftarrows",!0);B(V,de,he,"⇆","\\leftrightarrows",!0);B(V,de,he,"⇚","\\Lleftarrow",!0);B(V,de,he,"↞","\\twoheadleftarrow",!0);B(V,de,he,"↢","\\leftarrowtail",!0);B(V,de,he,"↫","\\looparrowleft",!0);B(V,de,he,"⇋","\\leftrightharpoons",!0);B(V,de,he,"↶","\\curvearrowleft",!0);B(V,de,he,"↺","\\circlearrowleft",!0);B(V,de,he,"↰","\\Lsh",!0);B(V,de,he,"⇈","\\upuparrows",!0);B(V,de,he,"↿","\\upharpoonleft",!0);B(V,de,he,"⇃","\\downharpoonleft",!0);B(V,te,he,"⊶","\\origof",!0);B(V,te,he,"⊷","\\imageof",!0);B(V,de,he,"⊸","\\multimap",!0);B(V,de,he,"↭","\\leftrightsquigarrow",!0);B(V,de,he,"⇉","\\rightrightarrows",!0);B(V,de,he,"⇄","\\rightleftarrows",!0);B(V,de,he,"↠","\\twoheadrightarrow",!0);B(V,de,he,"↣","\\rightarrowtail",!0);B(V,de,he,"↬","\\looparrowright",!0);B(V,de,he,"↷","\\curvearrowright",!0);B(V,de,he,"↻","\\circlearrowright",!0);B(V,de,he,"↱","\\Rsh",!0);B(V,de,he,"⇊","\\downdownarrows",!0);B(V,de,he,"↾","\\upharpoonright",!0);B(V,de,he,"⇂","\\downharpoonright",!0);B(V,de,he,"⇝","\\rightsquigarrow",!0);B(V,de,he,"⇝","\\leadsto");B(V,de,he,"⇛","\\Rrightarrow",!0);B(V,de,he,"↾","\\restriction");B(V,te,ve,"‘","`");B(V,te,ve,"$","\\$");B(We,te,ve,"$","\\$");B(We,te,ve,"$","\\textdollar");B(V,te,ve,"%","\\%");B(We,te,ve,"%","\\%");B(V,te,ve,"_","\\_");B(We,te,ve,"_","\\_");B(We,te,ve,"_","\\textunderscore");B(V,te,ve,"∠","\\angle",!0);B(V,te,ve,"∞","\\infty",!0);B(V,te,ve,"′","\\prime");B(V,te,ve,"△","\\triangle");B(V,te,ve,"Γ","\\Gamma",!0);B(V,te,ve,"Δ","\\Delta",!0);B(V,te,ve,"Θ","\\Theta",!0);B(V,te,ve,"Λ","\\Lambda",!0);B(V,te,ve,"Ξ","\\Xi",!0);B(V,te,ve,"Π","\\Pi",!0);B(V,te,ve,"Σ","\\Sigma",!0);B(V,te,ve,"Υ","\\Upsilon",!0);B(V,te,ve,"Φ","\\Phi",!0);B(V,te,ve,"Ψ","\\Psi",!0);B(V,te,ve,"Ω","\\Omega",!0);B(V,te,ve,"A","Α");B(V,te,ve,"B","Β");B(V,te,ve,"E","Ε");B(V,te,ve,"Z","Ζ");B(V,te,ve,"H","Η");B(V,te,ve,"I","Ι");B(V,te,ve,"K","Κ");B(V,te,ve,"M","Μ");B(V,te,ve,"N","Ν");B(V,te,ve,"O","Ο");B(V,te,ve,"P","Ρ");B(V,te,ve,"T","Τ");B(V,te,ve,"X","Χ");B(V,te,ve,"¬","\\neg",!0);B(V,te,ve,"¬","\\lnot");B(V,te,ve,"⊤","\\top");B(V,te,ve,"⊥","\\bot");B(V,te,ve,"∅","\\emptyset");B(V,de,ve,"∅","\\varnothing");B(V,te,Qt,"α","\\alpha",!0);B(V,te,Qt,"β","\\beta",!0);B(V,te,Qt,"γ","\\gamma",!0);B(V,te,Qt,"δ","\\delta",!0);B(V,te,Qt,"ϵ","\\epsilon",!0);B(V,te,Qt,"ζ","\\zeta",!0);B(V,te,Qt,"η","\\eta",!0);B(V,te,Qt,"θ","\\theta",!0);B(V,te,Qt,"ι","\\iota",!0);B(V,te,Qt,"κ","\\kappa",!0);B(V,te,Qt,"λ","\\lambda",!0);B(V,te,Qt,"μ","\\mu",!0);B(V,te,Qt,"ν","\\nu",!0);B(V,te,Qt,"ξ","\\xi",!0);B(V,te,Qt,"ο","\\omicron",!0);B(V,te,Qt,"π","\\pi",!0);B(V,te,Qt,"ρ","\\rho",!0);B(V,te,Qt,"σ","\\sigma",!0);B(V,te,Qt,"τ","\\tau",!0);B(V,te,Qt,"υ","\\upsilon",!0);B(V,te,Qt,"ϕ","\\phi",!0);B(V,te,Qt,"χ","\\chi",!0);B(V,te,Qt,"ψ","\\psi",!0);B(V,te,Qt,"ω","\\omega",!0);B(V,te,Qt,"ε","\\varepsilon",!0);B(V,te,Qt,"ϑ","\\vartheta",!0);B(V,te,Qt,"ϖ","\\varpi",!0);B(V,te,Qt,"ϱ","\\varrho",!0);B(V,te,Qt,"ς","\\varsigma",!0);B(V,te,Qt,"φ","\\varphi",!0);B(V,te,yt,"∗","*",!0);B(V,te,yt,"+","+");B(V,te,yt,"−","-",!0);B(V,te,yt,"⋅","\\cdot",!0);B(V,te,yt,"∘","\\circ",!0);B(V,te,yt,"÷","\\div",!0);B(V,te,yt,"±","\\pm",!0);B(V,te,yt,"×","\\times",!0);B(V,te,yt,"∩","\\cap",!0);B(V,te,yt,"∪","\\cup",!0);B(V,te,yt,"∖","\\setminus",!0);B(V,te,yt,"∧","\\land");B(V,te,yt,"∨","\\lor");B(V,te,yt,"∧","\\wedge",!0);B(V,te,yt,"∨","\\vee",!0);B(V,te,ve,"√","\\surd");B(V,te,Ya,"⟨","\\langle",!0);B(V,te,Ya,"∣","\\lvert");B(V,te,Ya,"∥","\\lVert");B(V,te,Qo,"?","?");B(V,te,Qo,"!","!");B(V,te,Qo,"⟩","\\rangle",!0);B(V,te,Qo,"∣","\\rvert");B(V,te,Qo,"∥","\\rVert");B(V,te,he,"=","=");B(V,te,he,":",":");B(V,te,he,"≈","\\approx",!0);B(V,te,he,"≅","\\cong",!0);B(V,te,he,"≥","\\ge");B(V,te,he,"≥","\\geq",!0);B(V,te,he,"←","\\gets");B(V,te,he,">","\\gt",!0);B(V,te,he,"∈","\\in",!0);B(V,te,he,"","\\@not");B(V,te,he,"⊂","\\subset",!0);B(V,te,he,"⊃","\\supset",!0);B(V,te,he,"⊆","\\subseteq",!0);B(V,te,he,"⊇","\\supseteq",!0);B(V,de,he,"⊈","\\nsubseteq",!0);B(V,de,he,"⊉","\\nsupseteq",!0);B(V,te,he,"⊨","\\models");B(V,te,he,"←","\\leftarrow",!0);B(V,te,he,"≤","\\le");B(V,te,he,"≤","\\leq",!0);B(V,te,he,"<","\\lt",!0);B(V,te,he,"→","\\rightarrow",!0);B(V,te,he,"→","\\to");B(V,de,he,"≱","\\ngeq",!0);B(V,de,he,"≰","\\nleq",!0);B(V,te,_u," ","\\ ");B(V,te,_u," ","\\space");B(V,te,_u," ","\\nobreakspace");B(We,te,_u," ","\\ ");B(We,te,_u," "," ");B(We,te,_u," ","\\space");B(We,te,_u," ","\\nobreakspace");B(V,te,_u,"","\\nobreak");B(V,te,_u,"","\\allowbreak");B(V,te,C0,",",",");B(V,te,C0,";",";");B(V,de,yt,"⊼","\\barwedge",!0);B(V,de,yt,"⊻","\\veebar",!0);B(V,te,yt,"⊙","\\odot",!0);B(V,te,yt,"⊕","\\oplus",!0);B(V,te,yt,"⊗","\\otimes",!0);B(V,te,ve,"∂","\\partial",!0);B(V,te,yt,"⊘","\\oslash",!0);B(V,de,yt,"⊚","\\circledcirc",!0);B(V,de,yt,"⊡","\\boxdot",!0);B(V,te,yt,"△","\\bigtriangleup");B(V,te,yt,"▽","\\bigtriangledown");B(V,te,yt,"†","\\dagger");B(V,te,yt,"⋄","\\diamond");B(V,te,yt,"⋆","\\star");B(V,te,yt,"◃","\\triangleleft");B(V,te,yt,"▹","\\triangleright");B(V,te,Ya,"{","\\{");B(We,te,ve,"{","\\{");B(We,te,ve,"{","\\textbraceleft");B(V,te,Qo,"}","\\}");B(We,te,ve,"}","\\}");B(We,te,ve,"}","\\textbraceright");B(V,te,Ya,"{","\\lbrace");B(V,te,Qo,"}","\\rbrace");B(V,te,Ya,"[","\\lbrack",!0);B(We,te,ve,"[","\\lbrack",!0);B(V,te,Qo,"]","\\rbrack",!0);B(We,te,ve,"]","\\rbrack",!0);B(V,te,Ya,"(","\\lparen",!0);B(V,te,Qo,")","\\rparen",!0);B(We,te,ve,"<","\\textless",!0);B(We,te,ve,">","\\textgreater",!0);B(V,te,Ya,"⌊","\\lfloor",!0);B(V,te,Qo,"⌋","\\rfloor",!0);B(V,te,Ya,"⌈","\\lceil",!0);B(V,te,Qo,"⌉","\\rceil",!0);B(V,te,ve,"\\","\\backslash");B(V,te,ve,"∣","|");B(V,te,ve,"∣","\\vert");B(We,te,ve,"|","\\textbar",!0);B(V,te,ve,"∥","\\|");B(V,te,ve,"∥","\\Vert");B(We,te,ve,"∥","\\textbardbl");B(We,te,ve,"~","\\textasciitilde");B(We,te,ve,"\\","\\textbackslash");B(We,te,ve,"^","\\textasciicircum");B(V,te,he,"↑","\\uparrow",!0);B(V,te,he,"⇑","\\Uparrow",!0);B(V,te,he,"↓","\\downarrow",!0);B(V,te,he,"⇓","\\Downarrow",!0);B(V,te,he,"↕","\\updownarrow",!0);B(V,te,he,"⇕","\\Updownarrow",!0);B(V,te,zs,"∐","\\coprod");B(V,te,zs,"⋁","\\bigvee");B(V,te,zs,"⋀","\\bigwedge");B(V,te,zs,"⨄","\\biguplus");B(V,te,zs,"⋂","\\bigcap");B(V,te,zs,"⋃","\\bigcup");B(V,te,zs,"∫","\\int");B(V,te,zs,"∫","\\intop");B(V,te,zs,"∬","\\iint");B(V,te,zs,"∭","\\iiint");B(V,te,zs,"∏","\\prod");B(V,te,zs,"∑","\\sum");B(V,te,zs,"⨂","\\bigotimes");B(V,te,zs,"⨁","\\bigoplus");B(V,te,zs,"⨀","\\bigodot");B(V,te,zs,"∮","\\oint");B(V,te,zs,"∯","\\oiint");B(V,te,zs,"∰","\\oiiint");B(V,te,zs,"⨆","\\bigsqcup");B(V,te,zs,"∫","\\smallint");B(We,te,Ap,"…","\\textellipsis");B(V,te,Ap,"…","\\mathellipsis");B(We,te,Ap,"…","\\ldots",!0);B(V,te,Ap,"…","\\ldots",!0);B(V,te,Ap,"⋯","\\@cdots",!0);B(V,te,Ap,"⋱","\\ddots",!0);B(V,te,ve,"⋮","\\varvdots");B(We,te,ve,"⋮","\\varvdots");B(V,te,Ln,"ˊ","\\acute");B(V,te,Ln,"ˋ","\\grave");B(V,te,Ln,"¨","\\ddot");B(V,te,Ln,"~","\\tilde");B(V,te,Ln,"ˉ","\\bar");B(V,te,Ln,"˘","\\breve");B(V,te,Ln,"ˇ","\\check");B(V,te,Ln,"^","\\hat");B(V,te,Ln,"⃗","\\vec");B(V,te,Ln,"˙","\\dot");B(V,te,Ln,"˚","\\mathring");B(V,te,Qt,"","\\@imath");B(V,te,Qt,"","\\@jmath");B(V,te,ve,"ı","ı");B(V,te,ve,"ȷ","ȷ");B(We,te,ve,"ı","\\i",!0);B(We,te,ve,"ȷ","\\j",!0);B(We,te,ve,"ß","\\ss",!0);B(We,te,ve,"æ","\\ae",!0);B(We,te,ve,"œ","\\oe",!0);B(We,te,ve,"ø","\\o",!0);B(We,te,ve,"Æ","\\AE",!0);B(We,te,ve,"Œ","\\OE",!0);B(We,te,ve,"Ø","\\O",!0);B(We,te,Ln,"ˊ","\\'");B(We,te,Ln,"ˋ","\\`");B(We,te,Ln,"ˆ","\\^");B(We,te,Ln,"˜","\\~");B(We,te,Ln,"ˉ","\\=");B(We,te,Ln,"˘","\\u");B(We,te,Ln,"˙","\\.");B(We,te,Ln,"¸","\\c");B(We,te,Ln,"˚","\\r");B(We,te,Ln,"ˇ","\\v");B(We,te,Ln,"¨",'\\"');B(We,te,Ln,"˝","\\H");B(We,te,Ln,"◯","\\textcircled");var VF={"--":!0,"---":!0,"``":!0,"''":!0};B(We,te,ve,"–","--",!0);B(We,te,ve,"–","\\textendash");B(We,te,ve,"—","---",!0);B(We,te,ve,"—","\\textemdash");B(We,te,ve,"‘","`",!0);B(We,te,ve,"‘","\\textquoteleft");B(We,te,ve,"’","'",!0);B(We,te,ve,"’","\\textquoteright");B(We,te,ve,"“","``",!0);B(We,te,ve,"“","\\textquotedblleft");B(We,te,ve,"”","''",!0);B(We,te,ve,"”","\\textquotedblright");B(V,te,ve,"°","\\degree",!0);B(We,te,ve,"°","\\degree");B(We,te,ve,"°","\\textdegree",!0);B(V,te,ve,"£","\\pounds");B(V,te,ve,"£","\\mathsterling",!0);B(We,te,ve,"£","\\pounds");B(We,te,ve,"£","\\textsterling",!0);B(V,de,ve,"✠","\\maltese");B(We,de,ve,"✠","\\maltese");var iR='0123456789/@."';for(var bk=0;bk{var r=e.charCodeAt(0),t=e.charCodeAt(1),n=(r-55296)*1024+(t-56320)+65536;if(119808<=n&&n<120484){var s=Math.floor((n-119808)/26);return gR[s]}else if(120782<=n&&n<=120831){var o=Math.floor((n-120782)/10);return QBn[o]}else{if(n===120485||n===120486)return gR[0];if(120486{if(k_(e.classes)!==k_(r.classes)||e.skew!==r.skew||e.maxFontSize!==r.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var t=e.classes[0];if(t==="mbin"||t==="mord")return!1}for(var n of Object.keys(e.style))if(e.style[n]!==r.style[n])return!1;for(var s of Object.keys(r.style))if(e.style[s]!==r.style[s])return!1;return!0},QF=e=>{for(var r=0;rt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>s&&(s=a.maxFontSize)}r.height=t,r.depth=n,r.maxFontSize=s},Qe=function(r,t,n,s){var o=new Np(r,t,n,s);return B6(o),o},S_=(e,r,t,n)=>new Np(e,r,t,n),lp=function(r,t,n){var s=Qe([r],[],t);return s.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=ot(s.height),s.maxFontSize=1,s},JBn=function(r,t,n,s){var o=new ix(r,t,n,s);return B6(o),o},fu=function(r){var t=new Ep(r);return B6(t),t},up=function(r,t){return r instanceof Ep?Qe([],[r],t):r},eFn=function(r){if(r.positionType==="individualShift"){for(var t=r.children,n=[t[0]],s=-t[0].shift-t[0].elem.depth,o=s,a=1;a{var t=Qe(["mspace"],[],r),n=Un(e,r);return t.style.marginRight=ot(n),t},i1=(e,r,t)=>{var n,s;switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return r==="textbf"&&t==="textit"?s="BoldItalic":r==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",n+"-"+s},k5={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},YF={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ZF=function(r,t){var[n,s,o]=YF[r],a=new j_(n),i=new au([a],{width:ot(s),height:ot(o),style:"width:"+ot(s),viewBox:"0 0 "+1e3*s+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),c=S_(["overlay"],[i],t);return c.height=o,c.style.height=ot(o),c.style.width=ot(s),c},Hn={number:3,unit:"mu"},_f={number:4,unit:"mu"},Ll={number:5,unit:"mu"},tFn={mord:{mop:Hn,mbin:_f,mrel:Ll,minner:Hn},mop:{mord:Hn,mop:Hn,mrel:Ll,minner:Hn},mbin:{mord:_f,mop:_f,mopen:_f,minner:_f},mrel:{mord:Ll,mop:Ll,mopen:Ll,minner:Ll},mopen:{},mclose:{mop:Hn,mbin:_f,mrel:Ll,minner:Hn},mpunct:{mord:Hn,mop:Hn,mrel:Ll,mopen:Hn,mclose:Hn,mpunct:Hn,minner:Hn},minner:{mord:Hn,mop:Hn,mbin:_f,mrel:Ll,mopen:Hn,mpunct:Hn,minner:Hn}},rFn={mord:{mop:Hn},mop:{mord:Hn,mop:Hn},mbin:{},mrel:{},mopen:{},mclose:{mop:Hn},mpunct:{},minner:{mop:Hn}},JF={},Gb={},Wb={};function gt(e){for(var{type:r,names:t,props:n,handler:s,htmlBuilder:o,mathmlBuilder:a}=e,i={type:r,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:s},c=0;c{var v=w.classes[0],b=k.classes[0];v==="mbin"&&sFn.has(b)?w.classes[0]="mord":b==="mbin"&&nFn.has(v)&&(k.classes[0]="mord")},{node:_},p,m),j5(o,(k,w)=>{var v,b,x=C5(w),y=C5(k),S=x&&y?k.hasClass("mtight")?(v=rFn[x])==null?void 0:v[y]:(b=tFn[x])==null?void 0:b[y]:null;if(S)return XF(S,u)},{node:_},p,m),o},j5=function(r,t,n,s,o){s&&r.push(s);for(var a=0;ap=>{r.splice(_+1,0,p),a++})(a)}s&&r.pop()},eH=function(r){return r instanceof Ep||r instanceof ix||r instanceof Np&&r.hasClass("enclosing")?r:null},S5=function(r,t){var n=eH(r);if(n){var s=n.children;if(s.length){if(t==="right")return S5(s[s.length-1],"right");if(t==="left")return S5(s[0],"left")}}return r},C5=function(r,t){if(!r)return null;t&&(r=S5(r,t));var n=r.classes[0];return aFn[n]||null},Eg=function(r,t){var n=["nulldelimiter"].concat(r.baseSizingClasses());return Qe(t.concat(n))},Yr=function(r,t,n){if(!r)return Qe();if(Gb[r.type]){var s=Gb[r.type](r,t);if(n&&t.size!==n.size){s=Qe(t.sizingClasses(n),[s],t);var o=t.sizeMultiplier/n.sizeMultiplier;s.height*=o,s.depth*=o}return s}else throw new tt("Got group of unknown type: '"+r.type+"'")};function c1(e,r){var t=Qe(["base"],e,r),n=Qe(["strut"]);return n.style.height=ot(t.height+t.depth),t.depth&&(n.style.verticalAlign=ot(-t.depth)),t.children.unshift(n),t}function z5(e,r){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var n=Is(e,r,"root"),s;n.length===2&&n[1].hasClass("tag")&&(s=n.pop());for(var o=[],a=[],i=0;i0&&(o.push(c1(a,r)),a=[]),o.push(n[i]));a.length>0&&o.push(c1(a,r));var u;t?(u=c1(Is(t,r,!0),r),u.classes=["tag"],o.push(u)):s&&o.push(s);var d=Qe(["katex-html"],o);if(d.setAttribute("aria-hidden","true"),u){var _=u.children[0];_.style.height=ot(d.height+d.depth),d.depth&&(_.style.verticalAlign=ot(-d.depth))}return d}function tH(e){return new Ep(e)}class rt{constructor(r,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=r,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(r,t){this.attributes[r]=t}getAttribute(r){return this.attributes[r]}toNode(){var r=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&r.setAttribute(t,this.attributes[t]);this.classes.length>0&&(r.className=k_(this.classes));for(var n=0;n0&&(r+=' class ="'+zo(k_(this.classes))+'"'),r+=">";for(var n=0;n",r}toText(){return this.children.map(r=>r.toText()).join("")}}class Cs{constructor(r){this.text=void 0,this.text=r}toNode(){return document.createTextNode(this.text)}toMarkup(){return zo(this.toText())}toText(){return this.text}}class rH{constructor(r){this.width=void 0,this.character=void 0,this.width=r,r>=.05555&&r<=.05556?this.character=" ":r>=.1666&&r<=.1667?this.character=" ":r>=.2222&&r<=.2223?this.character=" ":r>=.2777&&r<=.2778?this.character="  ":r>=-.05556&&r<=-.05555?this.character=" ⁣":r>=-.1667&&r<=-.1666?this.character=" ⁣":r>=-.2223&&r<=-.2222?this.character=" ⁣":r>=-.2778&&r<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var r=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return r.setAttribute("width",ot(this.width)),r}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var iFn=new Set(["\\imath","\\jmath"]),cFn=new Set(["mrow","mtable"]),zi=function(r,t,n){return $n[t][r]&&$n[t][r].replace&&r.charCodeAt(0)!==55349&&!(VF.hasOwnProperty(r)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(r=$n[t][r].replace),new Cs(r)},F6=function(r){return r.length===1?r[0]:new rt("mrow",r)},lFn={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},H6=(e,r)=>{if(e.mode==="text"){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold"}var t=r.font;if(!t||t==="mathnormal")return null;var n=e.mode,s=lFn[t];if(s)return typeof s=="function"?s(e):s;var o=e.text;if(iFn.has(o))return null;if($n[n][o]){var a=$n[n][o].replace;a&&(o=a)}var i=k5[t].fontName;return I6(o,i,n)?k5[t].variant:null};function kk(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var r=e.children[0];return r instanceof Cs&&r.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var t=e.children[0];return t instanceof Cs&&t.text===","}else return!1}var Za=function(r,t,n){if(r.length===1){var s=bn(r[0],t);return n&&s instanceof rt&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var o=[],a,i=0;i=1&&(a.type==="mn"||kk(a))){var u=c.children[0];u instanceof rt&&u.type==="mn"&&(u.children=[...a.children,...u.children],o.pop())}else if(a.type==="mi"&&a.children.length===1){var d=a.children[0];if(d instanceof Cs&&d.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var _=c.children[0];_ instanceof Cs&&_.text.length>0&&(_.text=_.text.slice(0,1)+"̸"+_.text.slice(1),o.pop())}}}o.push(c),a=c}return o},C_=function(r,t,n){return F6(Za(r,t,n))},bn=function(r,t){if(!r)return new rt("mrow");if(Wb[r.type])return Wb[r.type](r,t);throw new tt("Got group of unknown type: '"+r.type+"'")};function vR(e,r,t,n,s){var o=Za(e,t),a;o.length===1&&o[0]instanceof rt&&cFn.has(o[0].type)?a=o[0]:a=new rt("mrow",o);var i=new rt("annotation",[new Cs(r)]);i.setAttribute("encoding","application/x-tex");var c=new rt("semantics",[a,i]),u=new rt("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var d=s?"katex":"katex-mathml";return Qe([d],[u])}var uFn=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],bR=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],yR=function(r,t){return t.size<2?r:uFn[r-1][t.size-1]};class Hl{constructor(r){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=r.style,this.color=r.color,this.size=r.size||Hl.BASESIZE,this.textSize=r.textSize||this.size,this.phantom=!!r.phantom,this.font=r.font||"",this.fontFamily=r.fontFamily||"",this.fontWeight=r.fontWeight||"",this.fontShape=r.fontShape||"",this.sizeMultiplier=bR[this.size-1],this.maxSize=r.maxSize,this.minRuleThickness=r.minRuleThickness,this._fontMetrics=void 0}extend(r){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,r),new Hl(t)}havingStyle(r){return this.style===r?this:this.extend({style:r,size:yR(this.textSize,r)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(r){return this.size===r&&this.textSize===r?this:this.extend({style:this.style.text(),size:r,textSize:r,sizeMultiplier:bR[r-1]})}havingBaseStyle(r){r=r||this.style.text();var t=yR(Hl.BASESIZE,r);return this.size===t&&this.textSize===Hl.BASESIZE&&this.style===r?this:this.extend({style:r,size:t})}havingBaseSizing(){var r;switch(this.style.id){case 4:case 5:r=3;break;case 6:case 7:r=1;break;default:r=6}return this.extend({style:this.style.text(),size:r})}withColor(r){return this.extend({color:r})}withPhantom(){return this.extend({phantom:!0})}withFont(r){return this.extend({font:r})}withTextFontFamily(r){return this.extend({fontFamily:r,font:""})}withTextFontWeight(r){return this.extend({fontWeight:r,font:""})}withTextFontShape(r){return this.extend({fontShape:r,font:""})}sizingClasses(r){return r.size!==this.size?["sizing","reset-size"+r.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Hl.BASESIZE?["sizing","reset-size"+this.size,"size"+Hl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=KBn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Hl.BASESIZE=6;var nH=function(r){return new Hl({style:r.displayMode?ir.DISPLAY:ir.TEXT,maxSize:r.maxSize,minRuleThickness:r.minRuleThickness})},sH=function(r,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),r=Qe(n,[r])}return r},_Fn=function(r,t,n){var s=nH(n),o;if(n.output==="mathml")return vR(r,t,s,n.displayMode,!0);if(n.output==="html"){var a=z5(r,s);o=Qe(["katex"],[a])}else{var i=vR(r,t,s,n.displayMode,!1),c=z5(r,s);o=Qe(["katex"],[i,c])}return sH(o,n)},fFn=function(r,t,n){var s=nH(n),o=z5(r,s),a=Qe(["katex"],[o]);return sH(a,n)},dFn={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},ux=function(r){var t=new rt("mo",[new Cs(dFn[r.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},hFn={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},pFn=new Set(["widehat","widecheck","widetilde","utilde"]),_x=function(r,t){function n(){var i=4e5,c=r.label.slice(1);if(pFn.has(c)&&"base"in r){var u=r.base.type==="ordgroup"?r.base.body.length:1,d,_,p;if(u>5)c==="widehat"||c==="widecheck"?(d=420,i=2364,p=.42,_=c+"4"):(d=312,i=2340,p=.34,_="tilde4");else{var m=[1,1,2,2,3,3][u];c==="widehat"||c==="widecheck"?(i=[0,1062,2364,2364,2364][m],d=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],_=c+m):(i=[0,600,1033,2339,2340][m],d=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],_="tilde"+m)}var k=new j_(_),w=new au([k],{width:"100%",height:ot(p),viewBox:"0 0 "+i+" "+d,preserveAspectRatio:"none"});return{span:S_([],[w],t),minWidth:0,height:p}}else{var v=[],b=hFn[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[x,y,S]=b,z=S/1e3,E=x.length,A,N;if(E===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');A=["hide-tail"],N=[b[3]]}else if(E===2)A=["halfarrow-left","halfarrow-right"],N=["xMinYMin","xMaxYMin"];else if(E===3)A=["brace-left","brace-center","brace-right"],N=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+E+" children.");for(var M=0;M0&&(s.style.minWidth=ot(o)),s},mFn=function(r,t,n,s,o){var a,i=r.height+r.depth+n+s;if(/fbox|color|angl/.test(t)){if(a=Qe(["stretchy",t],[],o),t==="fbox"){var c=o.color&&o.getColor();c&&(a.style.borderColor=c)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new g5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new g5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new au(u,{width:"100%",height:ot(i)});a=S_([],[d],o)}return a.height=i,a.style.height=ot(i),a},gFn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},vFn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function bFn(e){return e in gFn}function br(e,r){if(!e||e.type!==r)throw new Error("Expected node of type "+r+", but got "+(e?"node of type "+e.type:String(e)));return e}function fx(e){var r=dx(e);if(!r)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return r}function dx(e){return e&&(e.type==="atom"||vFn.hasOwnProperty(e.type))?e:null}var oH=e=>{if(e instanceof Ka)return e;if(GBn(e)&&e.children.length===1)return oH(e.children[0])},q6=(e,r)=>{var t,n,s;e&&e.type==="supsub"?(n=br(e.base,"accent"),t=n.base,e.base=t,s=UBn(Yr(e,r)),e.base=n):(n=br(e,"accent"),t=n.base);var o=Yr(t,r.havingCrampedStyle()),a=n.isShifty&&uu(t),i=0;if(a){var c,u;i=(c=(u=oH(o))==null?void 0:u.skew)!=null?c:0}var d=n.label==="\\c",_=d?o.height+o.depth:Math.min(o.height,r.fontMetrics().xHeight),p;if(n.isStretchy)p=_x(n,r),p=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+ot(2*i)+")",marginLeft:ot(2*i)}:void 0}]});else{var m,k;n.label==="\\vec"?(m=ZF("vec",r),k=YF.vec[1]):(m=lx({mode:n.mode,text:n.label},r,"textord"),m=qBn(m),m.italic=0,k=m.width,d&&(_+=m.depth)),p=Qe(["accent-body"],[m]);var w=n.label==="\\textcircled";w&&(p.classes.push("accent-full"),_=o.height);var v=i;w||(v-=k/2),p.style.left=ot(v),n.label==="\\textcircled"&&(p.style.top=".2em"),p=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-_},{type:"elem",elem:p}]})}var b=Qe(["mord","accent"],[p],r);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},aH=(e,r)=>{var t=e.isStretchy?ux(e.label):new rt("mo",[zi(e.label,e.mode)]),n=new rt("mover",[bn(e.base,r),t]);return n.setAttribute("accent","true"),n},yFn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));gt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,r)=>{var t=Kb(r[0]),n=!yFn.test(e.funcName),s=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:s,base:t}},htmlBuilder:q6,mathmlBuilder:aH});gt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,r)=>{var t=r[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:q6,mathmlBuilder:aH});gt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"accentUnder",mode:t.mode,label:n,base:s}},htmlBuilder:(e,r)=>{var t=Yr(e.base,r),n=_x(e,r),s=e.label==="\\utilde"?.12:0,o=Qr({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Qe(["mord","accentunder"],[o],r)},mathmlBuilder:(e,r)=>{var t=ux(e.label),n=new rt("munder",[bn(e.base,r),t]);return n.setAttribute("accentunder","true"),n}});var l1=e=>{var r=new rt("mpadded",e?[e]:[]);return r.setAttribute("width","+0.6em"),r.setAttribute("lspace","0.3em"),r};gt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,r,t){var{parser:n,funcName:s}=e;return{type:"xArrow",mode:n.mode,label:s,body:r[0],below:t[0]}},htmlBuilder(e,r){var t=r.style,n=r.havingStyle(t.sup()),s=up(Yr(e.body,n,r),r),o=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(o+"-arrow-pad");var a;e.below&&(n=r.havingStyle(t.sub()),a=up(Yr(e.below,n,r),r),a.classes.push(o+"-arrow-pad"));var i=_x(e,r),c=-r.fontMetrics().axisHeight+.5*i.height,u=-r.fontMetrics().axisHeight-.5*i.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var d;if(a){var _=-r.fontMetrics().axisHeight+a.height+.5*i.height+.111;d=Qr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:i,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:_}]})}else d=Qr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:i,shift:c,wrapperClasses:["svg-align"]}]});return Qe(["mrel","x-arrow"],[d],r)},mathmlBuilder(e,r){var t=ux(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var s=l1(bn(e.body,r));if(e.below){var o=l1(bn(e.below,r));n=new rt("munderover",[t,o,s])}else n=new rt("mover",[t,s])}else if(e.below){var a=l1(bn(e.below,r));n=new rt("munder",[t,a])}else n=l1(),n=new rt("mover",[t,n]);return n}});function iH(e,r){var t=Is(e.body,r,!0);return Qe([e.mclass],t,r)}function cH(e,r){var t,n=Za(e.body,r);return e.mclass==="minner"?t=new rt("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(t=n[0],t.type="mi"):t=new rt("mi",n):(e.isCharacterBox?(t=n[0],t.type="mo"):t=new rt("mo",n),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}gt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"mclass",mode:t.mode,mclass:"m"+n.slice(5),body:Ss(s),isCharacterBox:uu(s)}},htmlBuilder:iH,mathmlBuilder:cH});var hx=e=>{var r=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return r.type==="atom"&&(r.family==="bin"||r.family==="rel")?"m"+r.family:"mord"};gt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,r){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:hx(r[0]),body:Ss(r[1]),isCharacterBox:uu(r[1])}}});gt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,r){var{parser:t,funcName:n}=e,s=r[1],o=r[0],a;n!=="\\stackrel"?a=hx(s):a="mrel";var i={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Ss(s)},c={type:"supsub",mode:o.mode,base:i,sup:n==="\\underset"?null:o,sub:n==="\\underset"?o:null};return{type:"mclass",mode:t.mode,mclass:a,body:[c],isCharacterBox:uu(c)}},htmlBuilder:iH,mathmlBuilder:cH});gt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:hx(r[0]),body:Ss(r[0])}},htmlBuilder(e,r){var t=Is(e.body,r,!0),n=Qe([e.mclass],t,r);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,r){var t=Za(e.body,r),n=new rt("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var xFn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},xR=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),wR=e=>e.type==="textord"&&e.text==="@",wFn=(e,r)=>(e.type==="mathord"||e.type==="atom")&&e.text===r;function kFn(e,r,t){var n=xFn[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(n,[r[0]],[r[1]]);case"\\uparrow":case"\\downarrow":{var s=t.callFunction("\\\\cdleft",[r[0]],[]),o={type:"atom",text:n,mode:"math",family:"rel"},a=t.callFunction("\\Big",[o],[]),i=t.callFunction("\\\\cdright",[r[1]],[]),c={type:"ordgroup",mode:"math",body:[s,a,i]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function jFn(e){var r=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){r.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var t=e.fetch().text;if(t==="&"||t==="\\\\")e.consume();else if(t==="\\end"){r[r.length-1].length===0&&r.pop();break}else throw new tt("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],s=[n],o=0;oAV".includes(u))for(var _=0;_<2;_++){for(var p=!0,m=c+1;mAV=|." after @',a[c]);var k=kFn(u,d,e),w={type:"styling",body:[k],mode:"math",style:"display",resetFont:!0};n.push(w),i=xR()}o%2===0?n.push(i):n.shift(),n=[],s.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var v=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}gt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e;return{type:"cdlabel",mode:t.mode,side:n.slice(4),label:r[0]}},htmlBuilder(e,r){var t=r.havingStyle(r.style.sup()),n=up(Yr(e.label,t,r),r);return n.classes.push("cd-label-"+e.side),n.style.bottom=ot(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,r){var t=new rt("mrow",[bn(e.label,r)]);return t=new rt("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new rt("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});gt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,r){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:r[0]}},htmlBuilder(e,r){var t=up(Yr(e.fragment,r),r);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,r){return new rt("mrow",[bn(e.fragment,r)])}});gt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,r){for(var{parser:t}=e,n=br(r[0],"ordgroup"),s=n.body,o="",a=0;a=1114111)throw new tt("\\@char with invalid code point "+o);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var lH=(e,r)=>{var t=Is(e.body,r.withColor(e.color),!1);return fu(t)},uH=(e,r)=>{var t=Za(e.body,r.withColor(e.color)),n=new rt("mstyle",t);return n.setAttribute("mathcolor",e.color),n};gt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,r){var{parser:t}=e,n=br(r[0],"color-token").color,s=r[1];return{type:"color",mode:t.mode,color:n,body:Ss(s)}},htmlBuilder:lH,mathmlBuilder:uH});gt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,r){var{parser:t,breakOnTokenText:n}=e,s=br(r[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var o=t.parseExpression(!0,n);return{type:"color",mode:t.mode,color:s,body:o}},htmlBuilder:lH,mathmlBuilder:uH});gt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,r,t){var{parser:n}=e,s=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,o=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:o,size:s&&br(s,"size").value}},htmlBuilder(e,r){var t=Qe(["mspace"],[],r);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=ot(Un(e.size,r)))),t},mathmlBuilder(e,r){var t=new rt("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",ot(Un(e.size,r)))),t}});var E5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},_H=e=>{var r=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new tt("Expected a control sequence",e);return r},SFn=e=>{var r=e.gullet.popToken();return r.text==="="&&(r=e.gullet.popToken(),r.text===" "&&(r=e.gullet.popToken())),r},fH=(e,r,t,n)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(r,s,n)};gt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:r,funcName:t}=e;r.consumeSpaces();var n=r.fetch();if(E5[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=E5[n.text]),br(r.parseFunction(),"internal");throw new tt("Invalid token after macro prefix",n)}});gt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=r.gullet.popToken(),s=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new tt("Expected a control sequence",n);for(var o=0,a,i=[[]];r.gullet.future().text!=="{";)if(n=r.gullet.popToken(),n.text==="#"){if(r.gullet.future().text==="{"){a=r.gullet.future(),i[o].push("{");break}if(n=r.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new tt('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==o+1)throw new tt('Argument number "'+n.text+'" out of order');o++,i.push([])}else{if(n.text==="EOF")throw new tt("Expected a macro definition");i[o].push(n.text)}var{tokens:c}=r.gullet.consumeArg();return a&&c.unshift(a),(t==="\\edef"||t==="\\xdef")&&(c=r.gullet.expandTokens(c),c.reverse()),r.gullet.macros.set(s,{tokens:c,numArgs:o,delimiters:i},t===E5[t]),{type:"internal",mode:r.mode}}});gt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=_H(r.gullet.popToken());r.gullet.consumeSpaces();var s=SFn(r);return fH(r,n,s,t==="\\\\globallet"),{type:"internal",mode:r.mode}}});gt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=_H(r.gullet.popToken()),s=r.gullet.popToken(),o=r.gullet.popToken();return fH(r,n,o,t==="\\\\globalfuture"),r.gullet.pushToken(o),r.gullet.pushToken(s),{type:"internal",mode:r.mode}}});var Pm=function(r,t,n){var s=$n.math[r]&&$n.math[r].replace,o=I6(s||r,t,n);if(!o)throw new Error("Unsupported symbol "+r+" and font size "+t+".");return o},U6=function(r,t,n,s){var o=n.havingBaseStyle(t),a=Qe(s.concat(o.sizingClasses(n)),[r],n),i=o.sizeMultiplier/n.sizeMultiplier;return a.height*=i,a.depth*=i,a.maxFontSize=o.sizeMultiplier,a},dH=function(r,t,n){var s=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;r.classes.push("delimcenter"),r.style.top=ot(o),r.height-=o,r.depth+=o},CFn=function(r,t,n,s,o,a){var i=Go(r,"Main-Regular",o,s),c=U6(i,t,s,a);return dH(c,s,t),c},zFn=function(r,t,n,s){return Go(r,"Size"+t+"-Regular",n,s)},hH=function(r,t,n,s,o,a){var i=zFn(r,t,o,s),c=U6(Qe(["delimsizing","size"+t],[i],s),ir.TEXT,s,a);return n&&dH(c,s,ir.TEXT),c},jk=function(r,t,n){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var o=Qe(["delimsizinginner",s],[Qe([],[Go(r,t,n)])]);return{type:"elem",elem:o}},Sk=function(r,t,n){var s=Dc["Size4-Regular"][r.charCodeAt(0)]?Dc["Size4-Regular"][r.charCodeAt(0)][4]:Dc["Size1-Regular"][r.charCodeAt(0)][4],o=new j_("inner",DBn(r,Math.round(1e3*t))),a=new au([o],{width:ot(s),height:ot(t),style:"width:"+ot(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=S_([],[a],n);return i.height=t,i.style.height=ot(t),i.style.width=ot(s),{type:"elem",elem:i}},N5=.008,u1={type:"kern",size:-1*N5},EFn=new Set(["|","\\lvert","\\rvert","\\vert"]),NFn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),pH=function(r,t,n,s,o,a){var i,c,u,d,_="",p=0;i=u=d=r,c=null;var m="Size1-Regular";r==="\\uparrow"?u=d="⏐":r==="\\Uparrow"?u=d="‖":r==="\\downarrow"?i=u="⏐":r==="\\Downarrow"?i=u="‖":r==="\\updownarrow"?(i="\\uparrow",u="⏐",d="\\downarrow"):r==="\\Updownarrow"?(i="\\Uparrow",u="‖",d="\\Downarrow"):EFn.has(r)?(u="∣",_="vert",p=333):NFn.has(r)?(u="∥",_="doublevert",p=556):r==="["||r==="\\lbrack"?(i="⎡",u="⎢",d="⎣",m="Size4-Regular",_="lbrack",p=667):r==="]"||r==="\\rbrack"?(i="⎤",u="⎥",d="⎦",m="Size4-Regular",_="rbrack",p=667):r==="\\lfloor"||r==="⌊"?(u=i="⎢",d="⎣",m="Size4-Regular",_="lfloor",p=667):r==="\\lceil"||r==="⌈"?(i="⎡",u=d="⎢",m="Size4-Regular",_="lceil",p=667):r==="\\rfloor"||r==="⌋"?(u=i="⎥",d="⎦",m="Size4-Regular",_="rfloor",p=667):r==="\\rceil"||r==="⌉"?(i="⎤",u=d="⎥",m="Size4-Regular",_="rceil",p=667):r==="("||r==="\\lparen"?(i="⎛",u="⎜",d="⎝",m="Size4-Regular",_="lparen",p=875):r===")"||r==="\\rparen"?(i="⎞",u="⎟",d="⎠",m="Size4-Regular",_="rparen",p=875):r==="\\{"||r==="\\lbrace"?(i="⎧",c="⎨",d="⎩",u="⎪",m="Size4-Regular"):r==="\\}"||r==="\\rbrace"?(i="⎫",c="⎬",d="⎭",u="⎪",m="Size4-Regular"):r==="\\lgroup"||r==="⟮"?(i="⎧",d="⎩",u="⎪",m="Size4-Regular"):r==="\\rgroup"||r==="⟯"?(i="⎫",d="⎭",u="⎪",m="Size4-Regular"):r==="\\lmoustache"||r==="⎰"?(i="⎧",d="⎭",u="⎪",m="Size4-Regular"):(r==="\\rmoustache"||r==="⎱")&&(i="⎫",d="⎩",u="⎪",m="Size4-Regular");var k=Pm(i,m,o),w=k.height+k.depth,v=Pm(u,m,o),b=v.height+v.depth,x=Pm(d,m,o),y=x.height+x.depth,S=0,z=1;if(c!==null){var E=Pm(c,m,o);S=E.height+E.depth,z=2}var A=w+y+S,N=Math.max(0,Math.ceil((t-A)/(z*b))),M=A+N*z*b,$=s.fontMetrics().axisHeight;n&&($*=s.sizeMultiplier);var D=M/2-$,I=[];if(_.length>0){var G=M-w-y,H=Math.round(M*1e3),Q=LBn(_,Math.round(G*1e3)),K=new j_(_,Q),J=ot(p/1e3),ee=ot(H/1e3),P=new au([K],{width:J,height:ee,viewBox:"0 0 "+p+" "+H}),L=S_([],[P],s);L.height=H/1e3,L.style.width=J,L.style.height=ee,I.push({type:"elem",elem:L})}else{if(I.push(jk(d,m,o)),I.push(u1),c===null){var F=M-w-y+2*N5;I.push(Sk(u,F,s))}else{var q=(M-w-y-S)/2+2*N5;I.push(Sk(u,q,s)),I.push(u1),I.push(jk(c,m,o)),I.push(u1),I.push(Sk(u,q,s))}I.push(u1),I.push(jk(i,m,o))}var U=s.havingBaseStyle(ir.TEXT),oe=Qr({positionType:"bottom",positionData:D,children:I});return U6(Qe(["delimsizing","mult"],[oe],U),ir.TEXT,s,a)},Ck=80,zk=.08,Ek=function(r,t,n,s,o){var a=$Bn(r,s,n),i=new j_(r,a),c=new au([i],{width:"400em",height:ot(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return S_(["hide-tail"],[c],o)},AFn=function(r,t){var n=t.havingBaseSizing(),s=yH("\\surd",r*n.sizeMultiplier,bH,n),o=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),i,c,u,d,_;return s.type==="small"?(d=1e3+1e3*a+Ck,r<1?o=1:r<1.4&&(o=.7),c=(1+a+zk)/o,u=(1+a)/o,i=Ek("sqrtMain",c,d,a,t),i.style.minWidth="0.853em",_=.833/o):s.type==="large"?(d=(1e3+Ck)*tg[s.size],u=(tg[s.size]+a)/o,c=(tg[s.size]+a+zk)/o,i=Ek("sqrtSize"+s.size,c,d,a,t),i.style.minWidth="1.02em",_=1/o):(c=r+a+zk,u=r+a,d=Math.floor(1e3*r+a)+Ck,i=Ek("sqrtTall",c,d,a,t),i.style.minWidth="0.742em",_=1.056),i.height=u,i.style.height=ot(c),{span:i,advanceWidth:_,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*o}},mH=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),TFn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),gH=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),tg=[0,1.2,1.8,2.4,3],vH=function(r,t,n,s,o){if(r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle"),mH.has(r)||gH.has(r))return hH(r,t,!1,n,s,o);if(TFn.has(r))return pH(r,tg[t],!1,n,s,o);throw new tt("Illegal delimiter: '"+r+"'")},RFn=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],MFn=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"stack"}],bH=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],OFn=function(r){if(r.type==="small")return"Main-Regular";if(r.type==="large")return"Size"+r.size+"-Regular";if(r.type==="stack")return"Size4-Regular";var t=r.type;throw new Error("Add support for delim type '"+t+"' here.")},yH=function(r,t,n,s){for(var o=Math.min(2,3-s.style.size),a=o;at)return i}return n[n.length-1]},A5=function(r,t,n,s,o,a){r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle");var i;gH.has(r)?i=RFn:mH.has(r)?i=bH:i=MFn;var c=yH(r,t,i,s);return c.type==="small"?CFn(r,c.style,n,s,o,a):c.type==="large"?hH(r,c.size,n,s,o,a):pH(r,t,n,s,o,a)},Nk=function(r,t,n,s,o,a){var i=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,d=Math.max(t-i,n+i),_=Math.max(d/500*c,2*d-u);return A5(r,_,!0,s,o,a)},kR={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},$Fn=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function jR(e){return"isMiddle"in e}function px(e,r){var t=dx(e);if(t&&$Fn.has(t.text))return t;throw t?new tt("Invalid delimiter '"+t.text+"' after '"+r.funcName+"'",e):new tt("Invalid delimiter type '"+e.type+"'",e)}gt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,r)=>{var t=px(r[0],e);return{type:"delimsizing",mode:e.parser.mode,size:kR[e.funcName].size,mclass:kR[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,r)=>e.delim==="."?Qe([e.mclass]):vH(e.delim,e.size,r,e.mode,[e.mclass]),mathmlBuilder:e=>{var r=[];e.delim!=="."&&r.push(zi(e.delim,e.mode));var t=new rt("mo",r);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=ot(tg[e.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function SR(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}gt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new tt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:px(r[0],e).text,color:t}}});gt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=px(r[0],e),n=e.parser;++n.leftrightDepth;var s=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=br(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:s,left:t.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,r)=>{SR(e);for(var t=Is(e.body,r,!0,["mopen","mclose"]),n=0,s=0,o=!1,a=0;a{SR(e);var t=Za(e.body,r);if(e.left!=="."){var n=new rt("mo",[zi(e.left,e.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(e.right!=="."){var s=new rt("mo",[zi(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return F6(t)}});gt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=px(r[0],e);if(!e.parser.leftrightDepth)throw new tt("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,r)=>{var t;return e.delim==="."?t=Eg(r,[]):(t=vH(e.delim,1,r,e.mode,[]),t.isMiddle={delim:e.delim,options:r}),t},mathmlBuilder:(e,r)=>{var t=e.delim==="\\vert"||e.delim==="|"?zi("|","text"):zi(e.delim,e.mode),n=new rt("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var mx=(e,r)=>{var t=up(Yr(e.body,r),r),n=e.label.slice(1),s=r.sizeMultiplier,o,a,i=uu(e.body);if(n==="sout")o=Qe(["stretchy","sout"]),o.height=r.fontMetrics().defaultRuleThickness/s,a=-.5*r.fontMetrics().xHeight;else if(n==="phase"){var c=Un({number:.6,unit:"pt"},r),u=Un({number:.35,unit:"ex"},r),d=r.havingBaseSizing();s=s/d.sizeMultiplier;var _=t.height+t.depth+c+u;t.style.paddingLeft=ot(_/2+c);var p=Math.floor(1e3*_*s),m=MBn(p),k=new au([new j_("phase",m)],{width:"400em",height:ot(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});o=S_(["hide-tail"],[k],r),o.style.height=ot(_),a=t.depth+c+u}else{/cancel/.test(n)?i||t.classes.push("cancel-pad"):n==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var w,v,b=0;/box/.test(n)?(b=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness),w=r.fontMetrics().fboxsep+(n==="colorbox"?0:b),v=w):n==="angl"?(b=Math.max(r.fontMetrics().defaultRuleThickness,r.minRuleThickness),w=4*b,v=Math.max(0,.25-t.depth)):(w=i?.2:0,v=w),o=mFn(t,n,w,v,r),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=ot(b)):n==="angl"&&b!==.049&&(o.style.borderTopWidth=ot(b),o.style.borderRightWidth=ot(b)),a=t.depth+v,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var x;if(e.backgroundColor)x=Qr({positionType:"individualShift",children:[{type:"elem",elem:o,shift:a},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(n)?["svg-align"]:[];x=Qr({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:o,shift:a,wrapperClasses:y}]})}return/cancel/.test(n)&&(x.height=t.height,x.depth=t.depth),/cancel/.test(n)&&!i?Qe(["mord","cancel-lap"],[x],r):Qe(["mord"],[x],r)},gx=(e,r)=>{var t,n=new rt(e.label.includes("colorbox")?"mpadded":"menclose",[bn(e.body,r)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=r.fontMetrics().fboxsep*r.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*t+"pt"),n.setAttribute("height","+"+2*t+"pt"),n.setAttribute("lspace",t+"pt"),n.setAttribute("voffset",t+"pt"),e.label==="\\fcolorbox"){var s=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness);n.setAttribute("style","border: "+ot(s)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};gt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,r,t){var{parser:n,funcName:s}=e,o=br(r[0],"color-token").color,a=r[1];return{type:"enclose",mode:n.mode,label:s,backgroundColor:o,body:a}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,r,t){var{parser:n,funcName:s}=e,o=br(r[0],"color-token").color,a=br(r[1],"color-token").color,i=r[2];return{type:"enclose",mode:n.mode,label:s,backgroundColor:a,borderColor:o,body:i}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:r[0]}}});gt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"enclose",mode:t.mode,label:n,body:s}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=r[0];return{type:"enclose",mode:t.mode,label:n,body:s}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,r){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:r[0]}}});var xH={};function el(e){for(var{type:r,names:t,props:n,handler:s,htmlBuilder:o,mathmlBuilder:a}=e,i={type:r,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},c=0;c{var r=e.parser.settings;if(!r.displayMode)throw new tt("{"+e.envName+"} can be used only in display mode.")},DFn=new Set(["gather","gather*"]);function G6(e){if(!e.includes("ed"))return!e.includes("*")}function M_(e,r,t){var{hskipBeforeAndAfter:n,addJot:s,cols:o,arraystretch:a,colSeparationType:i,autoTag:c,singleRow:u,emptySingleRow:d,maxNumCols:_,leqno:p}=r;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new tt("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var k=[],w=[k],v=[],b=[],x=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function S(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new Ua("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),b.push(CR(e));;){var z=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var E={type:"ordgroup",mode:e.mode,body:z};t&&(E={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[E]}),k.push(E);var A=e.fetch().text;if(A==="&"){if(_&&k.length===_){if(u||i)throw new tt("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(A==="\\end"){S(),k.length===1&&E.type==="styling"&&E.body.length===1&&E.body[0].type==="ordgroup"&&E.body[0].body.length===0&&(w.length>1||!d)&&w.pop(),b.length0&&(y+=.25),u.push({pos:y,isDashed:Ye[Ae]})}for(S(a[0]),n=0;n0&&(D+=x,AYe))for(n=0;n=i)){var ae=void 0;if(s>0||r.hskipBeforeAndAfter){var le,me;ae=(le=(me=U)==null?void 0:me.pregap)!=null?le:p,ae!==0&&(Q=Qe(["arraycolsep"],[]),Q.style.width=ot(ae),H.push(Q))}var be=[];for(n=0;n0){for(var Ut=lp("hline",t,d),Gt=lp("hdashline",t,d),De=[{type:"elem",elem:Vt,shift:0}];u.length>0;){var ct=u.pop(),lt=ct.pos-I;ct.isDashed?De.push({type:"elem",elem:Gt,shift:lt}):De.push({type:"elem",elem:Ut,shift:lt})}Vt=Qr({positionType:"individualShift",children:De})}if(J.length===0)return Qe(["mord"],[Vt],t);var xe=Qr({positionType:"individualShift",children:J}),Ie=Qe(["tag"],[xe],t);return fu([Vt,Ie])},LFn={c:"center ",l:"left ",r:"right "},rl=function(r,t){for(var n=[],s=new rt("mtd",[],["mtr-glue"]),o=new rt("mtd",[],["mml-eqn-num"]),a=0;a0){var k=r.cols,w="",v=!1,b=0,x=k.length;k[0].type==="separator"&&(p+="top ",b=1),k[k.length-1].type==="separator"&&(p+="bottom ",x-=1);for(var y=b;y0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var $=1;$0&&m&&(v=1),n[k]={type:"align",align:w,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};el({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,r){var t=dx(r[0]),n=t?[r[0]]:br(r[0],"ordgroup").body,s=n.map(function(a){var i=fx(a),c=i.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new tt("Unknown column alignment: "+c,a)}),o={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return M_(e.parser,o,W6(e.envName))},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var r={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],t="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),t=s.fetch().text,!"lcr".includes(t))throw new tt("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),n.cols=[{type:"align",align:t}]}}var o=M_(e.parser,n,W6(e.envName)),a=Math.max(0,...o.body.map(i=>i.length));return o.cols=new Array(a).fill({type:"align",align:t}),r?{type:"leftright",mode:e.mode,body:[o],left:r[0],right:r[1],rightColor:void 0}:o},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var r={arraystretch:.5},t=M_(e.parser,r,"script");return t.colSeparationType="small",t},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["subarray"],props:{numArgs:1},handler(e,r){var t=dx(r[0]),n=t?[r[0]]:br(r[0],"ordgroup").body,s=n.map(function(i){var c=fx(i),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new tt("Unknown column alignment: "+u,i)});if(s.length>1)throw new tt("{subarray} can contain only one column");var o={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=M_(e.parser,o,"script");if(a.body.length>0&&a.body[0].length>1)throw new tt("{subarray} can contain only one column");return a},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var r={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=M_(e.parser,r,W6(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:kH,htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){DFn.has(e.envName)&&vx(e);var r={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:G6(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return M_(e.parser,r,"display")},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:kH,htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){vx(e);var r={autoTag:G6(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return M_(e.parser,r,"display")},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["CD"],props:{numArgs:0},handler(e){return vx(e),jFn(e.parser)},htmlBuilder:tl,mathmlBuilder:rl});se("\\nonumber","\\gdef\\@eqnsw{0}");se("\\notag","\\nonumber");gt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,r){throw new tt(e.funcName+" valid only within array environment")}});var zR=xH;gt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];if(s.type!=="ordgroup")throw new tt("Invalid environment name",s);for(var o="",a=0;a{var t=e.font,n=r.withFont(t);return Yr(e.body,n)},SH=(e,r)=>{var t=e.font,n=r.withFont(t);return bn(e.body,n)},ER={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};gt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=Kb(r[0]),o=n;return o in ER&&(o=ER[o]),{type:"font",mode:t.mode,font:o.slice(1),body:s}},htmlBuilder:jH,mathmlBuilder:SH});gt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"mclass",mode:t.mode,mclass:hx(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:uu(n)}}});gt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,r)=>{var{parser:t,funcName:n,breakOnTokenText:s}=e,{mode:o}=t,a=t.parseExpression(!0,s);return{type:"font",mode:o,font:"math"+n.slice(1),body:{type:"ordgroup",mode:t.mode,body:a}}},htmlBuilder:jH,mathmlBuilder:SH});var IFn=(e,r)=>{var t=r.style,n=t.fracNum(),s=t.fracDen(),o;o=r.havingStyle(n);var a=Yr(e.numer,o,r);if(e.continued){var i=8.5/r.fontMetrics().ptPerEm,c=3.5/r.fontMetrics().ptPerEm;a.height=a.height0?k=3*p:k=7*p,w=r.fontMetrics().denom1):(_>0?(m=r.fontMetrics().num2,k=p):(m=r.fontMetrics().num3,k=3*p),w=r.fontMetrics().denom2);var v;if(d){var x=r.fontMetrics().axisHeight;m-a.depth-(x+.5*_){var t=new rt("mfrac",[bn(e.numer,r),bn(e.denom,r)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var n=Un(e.barSize,r);t.setAttribute("linethickness",ot(n))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var o=new rt("mo",[new Cs(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(t),e.rightDelim!=null){var a=new rt("mo",[new Cs(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return F6(s)}return t},CH=(e,r)=>{if(!r)return e;var t={type:"styling",mode:e.mode,style:r,body:[e]};return t};gt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0],o=r[1],a,i=null,c=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,i="(",c=")";break;case"\\\\bracefrac":a=!1,i="\\{",c="\\}";break;case"\\\\brackfrac":a=!1,i="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var u=n==="\\cfrac",d=null;return u||n.startsWith("\\d")?d="display":n.startsWith("\\t")&&(d="text"),CH({type:"genfrac",mode:t.mode,numer:s,denom:o,continued:u,hasBarLine:a,leftDelim:i,rightDelim:c,barSize:null},d)},htmlBuilder:IFn,mathmlBuilder:PFn});gt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:r,funcName:t,token:n}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:s,token:n}}});var NR=["display","text","script","scriptscript"],AR=function(r){var t=null;return r.length>0&&(t=r,t=t==="."?null:t),t};gt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,r){var{parser:t}=e,n=r[4],s=r[5],o=Kb(r[0]),a=o.type==="atom"&&o.family==="open"?AR(o.text):null,i=Kb(r[1]),c=i.type==="atom"&&i.family==="close"?AR(i.text):null,u=br(r[2],"size"),d,_=null;u.isBlank?d=!0:(_=u.value,d=_.number>0);var p=null,m=r[3];if(m.type==="ordgroup"){if(m.body.length>0){var k=br(m.body[0],"textord");p=NR[Number(k.text)]}}else m=br(m,"textord"),p=NR[Number(m.text)];return CH({type:"genfrac",mode:t.mode,numer:n,denom:s,continued:!1,hasBarLine:d,barSize:_,leftDelim:a,rightDelim:c},p)}});gt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,r){var{parser:t,funcName:n,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:br(r[0],"size").value,token:s}}});gt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0],o=br(r[1],"infix").size;if(!o)throw new Error("\\\\abovefrac expected size, but got "+String(o));var a=r[2],i=o.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:a,continued:!1,hasBarLine:i,barSize:o,leftDelim:null,rightDelim:null}}});var zH=(e,r)=>{var t=r.style,n,s;e.type==="supsub"?(n=e.sup?Yr(e.sup,r.havingStyle(t.sup()),r):Yr(e.sub,r.havingStyle(t.sub()),r),s=br(e.base,"horizBrace")):s=br(e,"horizBrace");var o=Yr(s.base,r.havingBaseStyle(ir.DISPLAY)),a=_x(s,r),i;if(s.isOver?i=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):i=Qr({positionType:"bottom",positionData:o.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:o}]}),n){var c=Qe(["minner",s.isOver?"mover":"munder"],[i],r);s.isOver?i=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:n}]}):i=Qr({positionType:"bottom",positionData:c.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Qe(["minner",s.isOver?"mover":"munder"],[i],r)},BFn=(e,r)=>{var t=ux(e.label);return new rt(e.isOver?"mover":"munder",[bn(e.base,r),t])};gt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e;return{type:"horizBrace",mode:t.mode,label:n,isOver:n.includes("\\over"),base:r[0]}},htmlBuilder:zH,mathmlBuilder:BFn});gt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[1],s=br(r[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:Ss(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,r)=>{var t=Is(e.body,r,!1);return JBn(e.href,[],t,r)},mathmlBuilder:(e,r)=>{var t=C_(e.body,r);return t instanceof rt||(t=new rt("mrow",[t])),t.setAttribute("href",e.href),t}});gt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=br(r[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:n}))return t.formatUnsupportedCmd("\\url");for(var s=[],o=0;o{var{parser:t,funcName:n,token:s}=e,o=br(r[0],"raw").string,a=r[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i,c={};switch(n){case"\\htmlClass":c.class=o,i={command:"\\htmlClass",class:o};break;case"\\htmlId":c.id=o,i={command:"\\htmlId",id:o};break;case"\\htmlStyle":c.style=o,i={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var u=o.split(","),d=0;d{var t=Is(e.body,r,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var s=Qe(n,t,r);for(var o in e.attributes)o!=="class"&&e.attributes.hasOwnProperty(o)&&s.setAttribute(o,e.attributes[o]);return s},mathmlBuilder:(e,r)=>C_(e.body,r)});gt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:Ss(r[0]),mathml:Ss(r[1])}},htmlBuilder:(e,r)=>{var t=Is(e.html,r,!1);return fu(t)},mathmlBuilder:(e,r)=>C_(e.mathml,r)});var Ak=function(r){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(r))return{number:+r,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r);if(!t)throw new tt("Invalid size: '"+r+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!UF(n))throw new tt("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};gt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,r,t)=>{var{parser:n}=e,s={number:0,unit:"em"},o={number:.9,unit:"em"},a={number:0,unit:"em"},i="";if(t[0])for(var c=br(t[0],"raw").string,u=c.split(","),d=0;d{var t=Un(e.height,r),n=0;e.totalheight.number>0&&(n=Un(e.totalheight,r)-t);var s=0;e.width.number>0&&(s=Un(e.width,r));var o={height:ot(t+n)};s>0&&(o.width=ot(s)),n>0&&(o.verticalAlign=ot(-n));var a=new FBn(e.src,e.alt,o);return a.height=t,a.depth=n,a},mathmlBuilder:(e,r)=>{var t=new rt("mglyph",[]);t.setAttribute("alt",e.alt);var n=Un(e.height,r),s=0;if(e.totalheight.number>0&&(s=Un(e.totalheight,r)-n,t.setAttribute("valign",ot(-s))),t.setAttribute("height",ot(n+s)),e.width.number>0){var o=Un(e.width,r);t.setAttribute("width",ot(o))}return t.setAttribute("src",e.src),t}});gt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e,s=br(r[0],"size");if(t.settings.strict){var o=n[1]==="m",a=s.value.unit==="mu";o?(a||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+s.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):a&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:s.value}},htmlBuilder(e,r){return XF(e.dimension,r)},mathmlBuilder(e,r){var t=Un(e.dimension,r);return new rH(t)}});gt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"lap",mode:t.mode,alignment:n.slice(5),body:s}},htmlBuilder:(e,r)=>{var t;e.alignment==="clap"?(t=Qe([],[Yr(e.body,r)]),t=Qe(["inner"],[t],r)):t=Qe(["inner"],[Yr(e.body,r)]);var n=Qe(["fix"],[]),s=Qe([e.alignment],[t,n],r),o=Qe(["strut"]);return o.style.height=ot(s.height+s.depth),s.depth&&(o.style.verticalAlign=ot(-s.depth)),s.children.unshift(o),s=Qe(["thinbox"],[s],r),Qe(["mord","vbox"],[s],r)},mathmlBuilder:(e,r)=>{var t=new rt("mpadded",[bn(e.body,r)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",n+"width")}return t.setAttribute("width","0px"),t}});gt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,r){var{funcName:t,parser:n}=e,s=n.mode;n.switchMode("math");var o=t==="\\("?"\\)":"$",a=n.parseExpression(!1,o);return n.expect(o),n.switchMode(s),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:a}}});gt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,r){throw new tt("Mismatched "+e.funcName)}});var TR=(e,r)=>{switch(r.style.size){case ir.DISPLAY.size:return e.display;case ir.TEXT.size:return e.text;case ir.SCRIPT.size:return e.script;case ir.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};gt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,r)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:Ss(r[0]),text:Ss(r[1]),script:Ss(r[2]),scriptscript:Ss(r[3])}},htmlBuilder:(e,r)=>{var t=TR(e,r),n=Is(t,r,!1);return fu(n)},mathmlBuilder:(e,r)=>{var t=TR(e,r);return C_(t,r)}});var EH=(e,r,t,n,s,o,a)=>{e=Qe([],[e]);var i=t&&uu(t),c,u;if(r){var d=Yr(r,n.havingStyle(s.sup()),n);u={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var _=Yr(t,n.havingStyle(s.sub()),n);c={elem:_,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-_.height)}}var p;if(u&&c){var m=n.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+a;p=Qr({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:ot(-o)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ot(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(c){var k=e.height-a;p=Qr({positionType:"top",positionData:k,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:ot(-o)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var w=e.depth+a;p=Qr({positionType:"bottom",positionData:w,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ot(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&o!==0&&!i){var b=Qe(["mspace"],[],n);b.style.marginRight=ot(o),v.unshift(b)}return Qe(["mop","op-limits"],v,n)},NH=new Set(["\\smallint"]),Tp=(e,r)=>{var t,n,s=!1,o;e.type==="supsub"?(t=e.sup,n=e.sub,o=br(e.base,"op"),s=!0):o=br(e,"op");var a=r.style,i=!1;a.size===ir.DISPLAY.size&&o.symbol&&!NH.has(o.name)&&(i=!0);var c,u;if(o.symbol){var d=i?"Size2-Regular":"Size1-Regular",_="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(_=o.name.slice(1),o.name=_==="oiint"?"\\iint":"\\iiint"),c=Go(o.name,d,"math",r,["mop","op-symbol",i?"large-op":"small-op"]),u=c.italic,_.length>0){var p=ZF(_+"Size"+(i?"2":"1"),r);c=Qr({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:p,shift:i?.08:0}]}),o.name="\\"+_,c.classes.unshift("mop"),c.italic=u}}else if(o.body){var m=Is(o.body,r,!0);m.length===1&&m[0]instanceof Ka?(c=m[0],c.classes[0]="mop"):c=Qe(["mop"],m,r)}else{for(var k=[],w=1;w{var t;if(e.symbol)t=new rt("mo",[zi(e.name,e.mode)]),NH.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new rt("mo",Za(e.body,r));else{t=new rt("mi",[new Cs(e.name.slice(1))]);var n=new rt("mo",[zi("⁡","text")]);e.parentIsSupSub?t=new rt("mrow",[t,n]):t=tH([t,n])}return t},FFn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};gt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=n;return s.length===1&&(s=FFn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ss(n)}},htmlBuilder:Tp,mathmlBuilder:z0});var HFn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};gt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:r,funcName:t}=e;return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:r,funcName:t}=e;return{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:r,funcName:t}=e,n=t;return n.length===1&&(n=HFn[n]),{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Tp,mathmlBuilder:z0});var AH=(e,r)=>{var t,n,s=!1,o;e.type==="supsub"?(t=e.sup,n=e.sub,o=br(e.base,"operatorname"),s=!0):o=br(e,"operatorname");var a;if(o.body.length>0){for(var i=o.body.map(_=>{var p="text"in _?_.text:void 0;return typeof p=="string"?{type:"textord",mode:_.mode,text:p}:_}),c=Is(i,r.withFont("mathrm"),!0),u=0;u{for(var t=Za(e.body,r.withFont("mathrm")),n=!0,s=0;sd.toText()).join("");t=[new Cs(i)]}var c=new rt("mi",t);c.setAttribute("mathvariant","normal");var u=new rt("mo",[zi("⁡","text")]);return e.parentIsSupSub?new rt("mrow",[c,u]):tH([c,u])};gt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"operatorname",mode:t.mode,body:Ss(s),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:AH,mathmlBuilder:qFn});se("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");kd({type:"ordgroup",htmlBuilder(e,r){return e.semisimple?fu(Is(e.body,r,!1)):Qe(["mord"],Is(e.body,r,!0),r)},mathmlBuilder(e,r){return C_(e.body,r,!0)}});gt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,r){var{parser:t}=e,n=r[0];return{type:"overline",mode:t.mode,body:n}},htmlBuilder(e,r){var t=Yr(e.body,r.havingCrampedStyle()),n=lp("overline-line",r),s=r.fontMetrics().defaultRuleThickness,o=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:n},{type:"kern",size:s}]});return Qe(["mord","overline"],[o],r)},mathmlBuilder(e,r){var t=new rt("mo",[new Cs("‾")]);t.setAttribute("stretchy","true");var n=new rt("mover",[bn(e.body,r),t]);return n.setAttribute("accent","true"),n}});gt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"phantom",mode:t.mode,body:Ss(n)}},htmlBuilder:(e,r)=>{var t=Is(e.body,r.withPhantom(),!1);return fu(t)},mathmlBuilder:(e,r)=>{var t=Za(e.body,r);return new rt("mphantom",t)}});se("\\hphantom","\\smash{\\phantom{#1}}");gt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"vphantom",mode:t.mode,body:n}},htmlBuilder:(e,r)=>{var t=Qe(["inner"],[Yr(e.body,r.withPhantom())]),n=Qe(["fix"],[]);return Qe(["mord","rlap"],[t,n],r)},mathmlBuilder:(e,r)=>{var t=Za(Ss(e.body),r),n=new rt("mphantom",t),s=new rt("mpadded",[n]);return s.setAttribute("width","0px"),s}});gt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,r){var{parser:t}=e,n=br(r[0],"size").value,s=r[1];return{type:"raisebox",mode:t.mode,dy:n,body:s}},htmlBuilder(e,r){var t=Yr(e.body,r),n=Un(e.dy,r);return Qr({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,r){var t=new rt("mpadded",[bn(e.body,r)]),n=e.dy.number+e.dy.unit;return t.setAttribute("voffset",n),t}});gt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:r}=e;return{type:"internal",mode:r.mode}}});gt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,r,t){var{parser:n}=e,s=t[0],o=br(r[0],"size"),a=br(r[1],"size");return{type:"rule",mode:n.mode,shift:s&&br(s,"size").value,width:o.value,height:a.value}},htmlBuilder(e,r){var t=Qe(["mord","rule"],[],r),n=Un(e.width,r),s=Un(e.height,r),o=e.shift?Un(e.shift,r):0;return t.style.borderRightWidth=ot(n),t.style.borderTopWidth=ot(s),t.style.bottom=ot(o),t.width=n,t.height=s+o,t.depth=-o,t.maxFontSize=s*1.125*r.sizeMultiplier,t},mathmlBuilder(e,r){var t=Un(e.width,r),n=Un(e.height,r),s=e.shift?Un(e.shift,r):0,o=r.color&&r.getColor()||"black",a=new rt("mspace");a.setAttribute("mathbackground",o),a.setAttribute("width",ot(t)),a.setAttribute("height",ot(n));var i=new rt("mpadded",[a]);return s>=0?i.setAttribute("height",ot(s)):(i.setAttribute("height",ot(s)),i.setAttribute("depth",ot(-s))),i.setAttribute("voffset",ot(s)),i}});function TH(e,r,t){for(var n=Is(e,r,!1),s=r.sizeMultiplier/t.sizeMultiplier,o=0;o{var t=r.havingSize(e.size);return TH(e.body,t,r)};gt({type:"sizing",names:RR,props:{numArgs:0,allowedInText:!0},handler:(e,r)=>{var{breakOnTokenText:t,funcName:n,parser:s}=e,o=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:RR.indexOf(n)+1,body:o}},htmlBuilder:UFn,mathmlBuilder:(e,r)=>{var t=r.havingSize(e.size),n=Za(e.body,t),s=new rt("mstyle",n);return s.setAttribute("mathsize",ot(t.sizeMultiplier)),s}});gt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,r,t)=>{var{parser:n}=e,s=!1,o=!1,a=t[0]&&br(t[0],"ordgroup");if(a)for(var i,c=0;c{var t=Qe([],[Yr(e.body,r)]);if(!e.smashHeight&&!e.smashDepth)return t;if(e.smashHeight&&(t.height=0),e.smashDepth&&(t.depth=0),e.smashHeight&&e.smashDepth)return Qe(["mord","smash"],[t],r);if(t.children)for(var n=0;n{var t=new rt("mpadded",[bn(e.body,r)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});gt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,r,t){var{parser:n}=e,s=t[0],o=r[0];return{type:"sqrt",mode:n.mode,body:o,index:s}},htmlBuilder(e,r){var t=Yr(e.body,r.havingCrampedStyle());t.height===0&&(t.height=r.fontMetrics().xHeight),t=up(t,r);var n=r.fontMetrics(),s=n.defaultRuleThickness,o=s;r.style.idt.height+t.depth+a&&(a=(a+_-t.height-t.depth)/2);var p=c.height-t.height-a-u;t.style.paddingLeft=ot(d);var m=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:c},{type:"kern",size:u}]});if(e.index){var k=r.havingStyle(ir.SCRIPTSCRIPT),w=Yr(e.index,k,r),v=.6*(m.height-m.depth),b=Qr({positionType:"shift",positionData:-v,children:[{type:"elem",elem:w}]}),x=Qe(["root"],[b]);return Qe(["mord","sqrt"],[x,m],r)}else return Qe(["mord","sqrt"],[m],r)},mathmlBuilder(e,r){var{body:t,index:n}=e;return n?new rt("mroot",[bn(t,r),bn(n,r)]):new rt("msqrt",[bn(t,r)])}});var T5={display:ir.DISPLAY,text:ir.TEXT,script:ir.SCRIPT,scriptscript:ir.SCRIPTSCRIPT};function GFn(e){return e in T5}gt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,r){var{breakOnTokenText:t,funcName:n,parser:s}=e,o=s.parseExpression(!0,t),a=n.slice(1,n.length-5);if(!GFn(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:o}},htmlBuilder(e,r){var t=T5[e.style],n=r.havingStyle(t);return e.resetFont&&(n=n.withFont("")),TH(e.body,n,r)},mathmlBuilder(e,r){var t=T5[e.style],n=r.havingStyle(t);e.resetFont&&(n=n.withFont(""));var s=Za(e.body,n),o=new rt("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},i=a[e.style];return o.setAttribute("scriptlevel",i[0]),o.setAttribute("displaystyle",i[1]),o}});var WFn=function(r,t){var n=r.base;if(n)if(n.type==="op"){var s=n.limits&&(t.style.size===ir.DISPLAY.size||n.alwaysHandleSupSub);return s?Tp:null}else if(n.type==="operatorname"){var o=n.alwaysHandleSupSub&&(t.style.size===ir.DISPLAY.size||n.limits);return o?AH:null}else{if(n.type==="accent")return uu(n.base)?q6:null;if(n.type==="horizBrace"){var a=!r.sub;return a===n.isOver?zH:null}else return null}else return null};kd({type:"supsub",htmlBuilder(e,r){var t=WFn(e,r);if(t)return t(e,r);var{base:n,sup:s,sub:o}=e,a=Yr(n,r),i,c,u=r.fontMetrics(),d=0,_=0,p=n&&uu(n);if(s){var m=r.havingStyle(r.style.sup());i=Yr(s,m,r),p||(d=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/r.sizeMultiplier)}if(o){var k=r.havingStyle(r.style.sub());c=Yr(o,k,r),p||(_=a.depth+k.fontMetrics().subDrop*k.sizeMultiplier/r.sizeMultiplier)}var w;r.style===ir.DISPLAY?w=u.sup1:r.style.cramped?w=u.sup3:w=u.sup2;var v=r.sizeMultiplier,b=ot(.5/u.ptPerEm/v),x=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof Ka||y){var S;x=ot(-((S=a.italic)!=null?S:0))}}var z;if(i&&c){d=Math.max(d,w,i.depth+.25*u.xHeight),_=Math.max(_,u.sub2);var E=u.defaultRuleThickness,A=4*E;if(d-i.depth-(c.height-_)0&&(d+=N,_-=N)}var M=[{type:"elem",elem:c,shift:_,marginRight:b,marginLeft:x},{type:"elem",elem:i,shift:-d,marginRight:b}];z=Qr({positionType:"individualShift",children:M})}else if(c){_=Math.max(_,u.sub1,c.height-.8*u.xHeight);var $=[{type:"elem",elem:c,marginLeft:x,marginRight:b}];z=Qr({positionType:"shift",positionData:_,children:$})}else if(i)d=Math.max(d,w,i.depth+.25*u.xHeight),z=Qr({positionType:"shift",positionData:-d,children:[{type:"elem",elem:i,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var D=C5(a,"right")||"mord";return Qe([D],[a,Qe(["msupsub"],[z])],r)},mathmlBuilder(e,r){var t=!1,n,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(t=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var o=[bn(e.base,r)];e.sub&&o.push(bn(e.sub,r)),e.sup&&o.push(bn(e.sup,r));var a;if(t)a=n?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&r.style===ir.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(r.style===ir.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(r.style===ir.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||r.style===ir.DISPLAY)?a="munder":a="msub"}else{var i=e.base;i&&i.type==="op"&&i.limits&&(r.style===ir.DISPLAY||i.alwaysHandleSupSub)||i&&i.type==="operatorname"&&i.alwaysHandleSupSub&&(i.limits||r.style===ir.DISPLAY)?a="mover":a="msup"}return new rt(a,o)}});kd({type:"atom",htmlBuilder(e,r){return P6(e.text,e.mode,r,["m"+e.family])},mathmlBuilder(e,r){var t=new rt("mo",[zi(e.text,e.mode)]);if(e.family==="bin"){var n=H6(e,r);n==="bold-italic"&&t.setAttribute("mathvariant",n)}else e.family==="punct"?t.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&t.setAttribute("stretchy","false");return t}});var RH={mi:"italic",mn:"normal",mtext:"normal"};kd({type:"mathord",htmlBuilder(e,r){return lx(e,r,"mathord")},mathmlBuilder(e,r){var t=new rt("mi",[zi(e.text,e.mode,r)]),n=H6(e,r)||"italic";return n!==RH[t.type]&&t.setAttribute("mathvariant",n),t}});kd({type:"textord",htmlBuilder(e,r){return lx(e,r,"textord")},mathmlBuilder(e,r){var t=zi(e.text,e.mode,r),n=H6(e,r)||"normal",s;return e.mode==="text"?s=new rt("mtext",[t]):/[0-9]/.test(e.text)?s=new rt("mn",[t]):e.text==="\\prime"?s=new rt("mo",[t]):s=new rt("mi",[t]),n!==RH[s.type]&&s.setAttribute("mathvariant",n),s}});var Tk={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Rk={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};kd({type:"spacing",htmlBuilder(e,r){if(Rk.hasOwnProperty(e.text)){var t=Rk[e.text].className||"";if(e.mode==="text"){var n=lx(e,r,"textord");return n.classes.push(t),n}else return Qe(["mspace",t],[P6(e.text,e.mode,r)],r)}else{if(Tk.hasOwnProperty(e.text))return Qe(["mspace",Tk[e.text]],[],r);throw new tt('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,r){var t;if(Rk.hasOwnProperty(e.text))t=new rt("mtext",[new Cs(" ")]);else{if(Tk.hasOwnProperty(e.text))return new rt("mspace");throw new tt('Unknown type of space "'+e.text+'"')}return t}});var MR=()=>{var e=new rt("mtd",[]);return e.setAttribute("width","50%"),e};kd({type:"tag",mathmlBuilder(e,r){var t=new rt("mtable",[new rt("mtr",[MR(),new rt("mtd",[C_(e.body,r)]),MR(),new rt("mtd",[C_(e.tag,r)])])]);return t.setAttribute("width","100%"),t}});var OR={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},$R={"\\textbf":"textbf","\\textmd":"textmd"},KFn={"\\textit":"textit","\\textup":"textup"},DR=(e,r)=>{var t=e.font;if(t){if(OR[t])return r.withTextFontFamily(OR[t]);if($R[t])return r.withTextFontWeight($R[t]);if(t==="\\emph")return r.fontShape==="textit"?r.withTextFontShape("textup"):r.withTextFontShape("textit")}else return r;return r.withTextFontShape(KFn[t])};gt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"text",mode:t.mode,body:Ss(s),font:n}},htmlBuilder(e,r){var t=DR(e,r),n=Is(e.body,t,!0);return Qe(["mord","text"],n,t)},mathmlBuilder(e,r){var t=DR(e,r);return C_(e.body,t)}});gt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"underline",mode:t.mode,body:r[0]}},htmlBuilder(e,r){var t=Yr(e.body,r),n=lp("underline-line",r),s=r.fontMetrics().defaultRuleThickness,o=Qr({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Qe(["mord","underline"],[o],r)},mathmlBuilder(e,r){var t=new rt("mo",[new Cs("‾")]);t.setAttribute("stretchy","true");var n=new rt("munder",[bn(e.body,r),t]);return n.setAttribute("accentunder","true"),n}});gt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,r){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:r[0]}},htmlBuilder(e,r){var t=Yr(e.body,r),n=r.fontMetrics().axisHeight,s=.5*(t.height-n-(t.depth+n));return Qr({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,r){var t=new rt("mpadded",[bn(e.body,r)],["vcenter"]);return new rt("mrow",[t])}});gt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,r,t){throw new tt("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,r){for(var t=LR(e),n=[],s=r.havingStyle(r.style.text()),o=0;oe.body.replace(/ /g,e.star?"␣":" "),p_=JF,MH=`[ \r +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function IBn(e){return"toText"in e}class Ep{constructor(r){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=r,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(r){return this.classes.includes(r)}toNode(){for(var r=document.createDocumentFragment(),t=0;t{if(IBn(r))return r.toText();throw new Error("Expected MathDomNode with toText, got "+r.constructor.name)}).join("")}}var m5={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},PBn={ex:!0,em:!0,mu:!0},UF=function(r){return typeof r!="string"&&(r=r.unit),r in m5||r in PBn||r==="ex"},Un=function(r,t){var n;if(r.unit in m5)n=m5[r.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(r.unit==="mu")n=t.fontMetrics().cssEmPerMu;else{var s;if(t.style.isTight()?s=t.havingStyle(t.style.text()):s=t,r.unit==="ex")n=s.fontMetrics().xHeight;else if(r.unit==="em")n=s.fontMetrics().quad;else throw new tt("Invalid unit: '"+r.unit+"'");s!==t&&(n*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(r.number*n,t.maxSize)},ot=function(r){return+r.toFixed(4)+"em"},k_=function(r){return r.filter(t=>t).join(" ")},L6=function(r){var t="";for(var n of Object.keys(r)){var s=r[n];s!==void 0&&(t+=dBn(n)+":"+s+";")}return t},GF=function(r,t,n){if(this.classes=r||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var s=t.getColor();s&&(this.style.color=s)}},WF=function(r){var t=document.createElement(r);t.className=k_(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var s=0;s/=\x00-\x1f]/,KF=function(r){var t="<"+r;this.classes.length&&(t+=' class="'+zo(k_(this.classes))+'"');var n=L6(this.style);n&&(t+=' style="'+zo(n)+'"');for(var s of Object.keys(this.attributes)){if(BBn.test(s))throw new tt("Invalid attribute name '"+s+"'");t+=" "+s+'="'+zo(this.attributes[s])+'"'}t+=">";for(var o=0;o",t};class Np{constructor(r,t,n,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,GF.call(this,r,n,s),this.children=t||[]}setAttribute(r,t){this.attributes[r]=t}hasClass(r){return this.classes.includes(r)}toNode(){return WF.call(this,"span")}toMarkup(){return KF.call(this,"span")}}class ix{constructor(r,t,n,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,GF.call(this,t,s),this.children=n||[],this.setAttribute("href",r)}setAttribute(r,t){this.attributes[r]=t}hasClass(r){return this.classes.includes(r)}toNode(){return WF.call(this,"a")}toMarkup(){return KF.call(this,"a")}}class FBn{constructor(r,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=r,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(r){return this.classes.includes(r)}toNode(){var r=document.createElement("img");return r.src=this.src,r.alt=this.alt,r.className="mord",Object.assign(r.style,this.style),r}toMarkup(){var r=''+zo(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=ot(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=k_(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(r),t):r}toMarkup(){var r=!1,t="0&&(n+="margin-right:"+ot(this.italic)+";"),n+=L6(this.style),n&&(r=!0,t+=' style="'+zo(n)+'"');var s=zo(this.text);return r?(t+=">",t+=s,t+="",t):s}}class au{constructor(r,t){this.children=void 0,this.attributes=void 0,this.children=r||[],this.attributes=t||{}}toNode(){var r="http://www.w3.org/2000/svg",t=document.createElementNS(r,"svg");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var s=0;s':''}}class g5{constructor(r){this.attributes=void 0,this.attributes=r||{}}toNode(){var r="http://www.w3.org/2000/svg",t=document.createElementNS(r,"line");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var r=" but got "+String(e)+".")}var GBn=e=>e instanceof Np||e instanceof ix||e instanceof Ep,Dc={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},s1={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},aR={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function WBn(e,r){Dc[e]=r}function I6(e,r,t){if(!Dc[r])throw new Error("Font metrics not found for font: "+r+".");var n=e.charCodeAt(0),s=Dc[r][n];if(!s&&e[0]in aR&&(n=aR[e[0]].charCodeAt(0),s=Dc[r][n]),!s&&t==="text"&&qF(n)&&(s=Dc[r][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var vk={};function KBn(e){var r;if(e>=5?r=0:e>=3?r=1:r=2,!vk[r]){var t=vk[r]={cssEmPerMu:s1.quad[r]/18};for(var n in s1)s1.hasOwnProperty(n)&&(t[n]=s1[n][r])}return vk[r]}var $n={math:{},text:{}};function B(e,r,t,n,s,o){$n[e][s]={font:r,group:t,replace:n},o&&n&&($n[e][n]=$n[e][s])}var V="math",We="text",te="main",de="ams",Ln="accent-token",yt="bin",Qo="close",Ap="inner",Qt="mathord",zs="op-token",Ya="open",C0="punct",he="rel",_u="spacing",ve="textord";B(V,te,he,"≡","\\equiv",!0);B(V,te,he,"≺","\\prec",!0);B(V,te,he,"≻","\\succ",!0);B(V,te,he,"∼","\\sim",!0);B(V,te,he,"⊥","\\perp");B(V,te,he,"⪯","\\preceq",!0);B(V,te,he,"⪰","\\succeq",!0);B(V,te,he,"≃","\\simeq",!0);B(V,te,he,"∣","\\mid",!0);B(V,te,he,"≪","\\ll",!0);B(V,te,he,"≫","\\gg",!0);B(V,te,he,"≍","\\asymp",!0);B(V,te,he,"∥","\\parallel");B(V,te,he,"⋈","\\bowtie",!0);B(V,te,he,"⌣","\\smile",!0);B(V,te,he,"⊑","\\sqsubseteq",!0);B(V,te,he,"⊒","\\sqsupseteq",!0);B(V,te,he,"≐","\\doteq",!0);B(V,te,he,"⌢","\\frown",!0);B(V,te,he,"∋","\\ni",!0);B(V,te,he,"∝","\\propto",!0);B(V,te,he,"⊢","\\vdash",!0);B(V,te,he,"⊣","\\dashv",!0);B(V,te,he,"∋","\\owns");B(V,te,C0,".","\\ldotp");B(V,te,C0,"⋅","\\cdotp");B(V,te,C0,"⋅","·");B(We,te,ve,"⋅","·");B(V,te,ve,"#","\\#");B(We,te,ve,"#","\\#");B(V,te,ve,"&","\\&");B(We,te,ve,"&","\\&");B(V,te,ve,"ℵ","\\aleph",!0);B(V,te,ve,"∀","\\forall",!0);B(V,te,ve,"ℏ","\\hbar",!0);B(V,te,ve,"∃","\\exists",!0);B(V,te,ve,"∇","\\nabla",!0);B(V,te,ve,"♭","\\flat",!0);B(V,te,ve,"ℓ","\\ell",!0);B(V,te,ve,"♮","\\natural",!0);B(V,te,ve,"♣","\\clubsuit",!0);B(V,te,ve,"℘","\\wp",!0);B(V,te,ve,"♯","\\sharp",!0);B(V,te,ve,"♢","\\diamondsuit",!0);B(V,te,ve,"ℜ","\\Re",!0);B(V,te,ve,"♡","\\heartsuit",!0);B(V,te,ve,"ℑ","\\Im",!0);B(V,te,ve,"♠","\\spadesuit",!0);B(V,te,ve,"§","\\S",!0);B(We,te,ve,"§","\\S");B(V,te,ve,"¶","\\P",!0);B(We,te,ve,"¶","\\P");B(V,te,ve,"†","\\dag");B(We,te,ve,"†","\\dag");B(We,te,ve,"†","\\textdagger");B(V,te,ve,"‡","\\ddag");B(We,te,ve,"‡","\\ddag");B(We,te,ve,"‡","\\textdaggerdbl");B(V,te,Qo,"⎱","\\rmoustache",!0);B(V,te,Ya,"⎰","\\lmoustache",!0);B(V,te,Qo,"⟯","\\rgroup",!0);B(V,te,Ya,"⟮","\\lgroup",!0);B(V,te,yt,"∓","\\mp",!0);B(V,te,yt,"⊖","\\ominus",!0);B(V,te,yt,"⊎","\\uplus",!0);B(V,te,yt,"⊓","\\sqcap",!0);B(V,te,yt,"∗","\\ast");B(V,te,yt,"⊔","\\sqcup",!0);B(V,te,yt,"◯","\\bigcirc",!0);B(V,te,yt,"∙","\\bullet",!0);B(V,te,yt,"‡","\\ddagger");B(V,te,yt,"≀","\\wr",!0);B(V,te,yt,"⨿","\\amalg");B(V,te,yt,"&","\\And");B(V,te,he,"⟵","\\longleftarrow",!0);B(V,te,he,"⇐","\\Leftarrow",!0);B(V,te,he,"⟸","\\Longleftarrow",!0);B(V,te,he,"⟶","\\longrightarrow",!0);B(V,te,he,"⇒","\\Rightarrow",!0);B(V,te,he,"⟹","\\Longrightarrow",!0);B(V,te,he,"↔","\\leftrightarrow",!0);B(V,te,he,"⟷","\\longleftrightarrow",!0);B(V,te,he,"⇔","\\Leftrightarrow",!0);B(V,te,he,"⟺","\\Longleftrightarrow",!0);B(V,te,he,"↦","\\mapsto",!0);B(V,te,he,"⟼","\\longmapsto",!0);B(V,te,he,"↗","\\nearrow",!0);B(V,te,he,"↩","\\hookleftarrow",!0);B(V,te,he,"↪","\\hookrightarrow",!0);B(V,te,he,"↘","\\searrow",!0);B(V,te,he,"↼","\\leftharpoonup",!0);B(V,te,he,"⇀","\\rightharpoonup",!0);B(V,te,he,"↙","\\swarrow",!0);B(V,te,he,"↽","\\leftharpoondown",!0);B(V,te,he,"⇁","\\rightharpoondown",!0);B(V,te,he,"↖","\\nwarrow",!0);B(V,te,he,"⇌","\\rightleftharpoons",!0);B(V,de,he,"≮","\\nless",!0);B(V,de,he,"","\\@nleqslant");B(V,de,he,"","\\@nleqq");B(V,de,he,"⪇","\\lneq",!0);B(V,de,he,"≨","\\lneqq",!0);B(V,de,he,"","\\@lvertneqq");B(V,de,he,"⋦","\\lnsim",!0);B(V,de,he,"⪉","\\lnapprox",!0);B(V,de,he,"⊀","\\nprec",!0);B(V,de,he,"⋠","\\npreceq",!0);B(V,de,he,"⋨","\\precnsim",!0);B(V,de,he,"⪹","\\precnapprox",!0);B(V,de,he,"≁","\\nsim",!0);B(V,de,he,"","\\@nshortmid");B(V,de,he,"∤","\\nmid",!0);B(V,de,he,"⊬","\\nvdash",!0);B(V,de,he,"⊭","\\nvDash",!0);B(V,de,he,"⋪","\\ntriangleleft");B(V,de,he,"⋬","\\ntrianglelefteq",!0);B(V,de,he,"⊊","\\subsetneq",!0);B(V,de,he,"","\\@varsubsetneq");B(V,de,he,"⫋","\\subsetneqq",!0);B(V,de,he,"","\\@varsubsetneqq");B(V,de,he,"≯","\\ngtr",!0);B(V,de,he,"","\\@ngeqslant");B(V,de,he,"","\\@ngeqq");B(V,de,he,"⪈","\\gneq",!0);B(V,de,he,"≩","\\gneqq",!0);B(V,de,he,"","\\@gvertneqq");B(V,de,he,"⋧","\\gnsim",!0);B(V,de,he,"⪊","\\gnapprox",!0);B(V,de,he,"⊁","\\nsucc",!0);B(V,de,he,"⋡","\\nsucceq",!0);B(V,de,he,"⋩","\\succnsim",!0);B(V,de,he,"⪺","\\succnapprox",!0);B(V,de,he,"≆","\\ncong",!0);B(V,de,he,"","\\@nshortparallel");B(V,de,he,"∦","\\nparallel",!0);B(V,de,he,"⊯","\\nVDash",!0);B(V,de,he,"⋫","\\ntriangleright");B(V,de,he,"⋭","\\ntrianglerighteq",!0);B(V,de,he,"","\\@nsupseteqq");B(V,de,he,"⊋","\\supsetneq",!0);B(V,de,he,"","\\@varsupsetneq");B(V,de,he,"⫌","\\supsetneqq",!0);B(V,de,he,"","\\@varsupsetneqq");B(V,de,he,"⊮","\\nVdash",!0);B(V,de,he,"⪵","\\precneqq",!0);B(V,de,he,"⪶","\\succneqq",!0);B(V,de,he,"","\\@nsubseteqq");B(V,de,yt,"⊴","\\unlhd");B(V,de,yt,"⊵","\\unrhd");B(V,de,he,"↚","\\nleftarrow",!0);B(V,de,he,"↛","\\nrightarrow",!0);B(V,de,he,"⇍","\\nLeftarrow",!0);B(V,de,he,"⇏","\\nRightarrow",!0);B(V,de,he,"↮","\\nleftrightarrow",!0);B(V,de,he,"⇎","\\nLeftrightarrow",!0);B(V,de,he,"△","\\vartriangle");B(V,de,ve,"ℏ","\\hslash");B(V,de,ve,"▽","\\triangledown");B(V,de,ve,"◊","\\lozenge");B(V,de,ve,"Ⓢ","\\circledS");B(V,de,ve,"®","\\circledR");B(We,de,ve,"®","\\circledR");B(V,de,ve,"∡","\\measuredangle",!0);B(V,de,ve,"∄","\\nexists");B(V,de,ve,"℧","\\mho");B(V,de,ve,"Ⅎ","\\Finv",!0);B(V,de,ve,"⅁","\\Game",!0);B(V,de,ve,"‵","\\backprime");B(V,de,ve,"▲","\\blacktriangle");B(V,de,ve,"▼","\\blacktriangledown");B(V,de,ve,"■","\\blacksquare");B(V,de,ve,"⧫","\\blacklozenge");B(V,de,ve,"★","\\bigstar");B(V,de,ve,"∢","\\sphericalangle",!0);B(V,de,ve,"∁","\\complement",!0);B(V,de,ve,"ð","\\eth",!0);B(We,te,ve,"ð","ð");B(V,de,ve,"╱","\\diagup");B(V,de,ve,"╲","\\diagdown");B(V,de,ve,"□","\\square");B(V,de,ve,"□","\\Box");B(V,de,ve,"◊","\\Diamond");B(V,de,ve,"¥","\\yen",!0);B(We,de,ve,"¥","\\yen",!0);B(V,de,ve,"✓","\\checkmark",!0);B(We,de,ve,"✓","\\checkmark");B(V,de,ve,"ℶ","\\beth",!0);B(V,de,ve,"ℸ","\\daleth",!0);B(V,de,ve,"ℷ","\\gimel",!0);B(V,de,ve,"ϝ","\\digamma",!0);B(V,de,ve,"ϰ","\\varkappa");B(V,de,Ya,"┌","\\@ulcorner",!0);B(V,de,Qo,"┐","\\@urcorner",!0);B(V,de,Ya,"└","\\@llcorner",!0);B(V,de,Qo,"┘","\\@lrcorner",!0);B(V,de,he,"≦","\\leqq",!0);B(V,de,he,"⩽","\\leqslant",!0);B(V,de,he,"⪕","\\eqslantless",!0);B(V,de,he,"≲","\\lesssim",!0);B(V,de,he,"⪅","\\lessapprox",!0);B(V,de,he,"≊","\\approxeq",!0);B(V,de,yt,"⋖","\\lessdot");B(V,de,he,"⋘","\\lll",!0);B(V,de,he,"≶","\\lessgtr",!0);B(V,de,he,"⋚","\\lesseqgtr",!0);B(V,de,he,"⪋","\\lesseqqgtr",!0);B(V,de,he,"≑","\\doteqdot");B(V,de,he,"≓","\\risingdotseq",!0);B(V,de,he,"≒","\\fallingdotseq",!0);B(V,de,he,"∽","\\backsim",!0);B(V,de,he,"⋍","\\backsimeq",!0);B(V,de,he,"⫅","\\subseteqq",!0);B(V,de,he,"⋐","\\Subset",!0);B(V,de,he,"⊏","\\sqsubset",!0);B(V,de,he,"≼","\\preccurlyeq",!0);B(V,de,he,"⋞","\\curlyeqprec",!0);B(V,de,he,"≾","\\precsim",!0);B(V,de,he,"⪷","\\precapprox",!0);B(V,de,he,"⊲","\\vartriangleleft");B(V,de,he,"⊴","\\trianglelefteq");B(V,de,he,"⊨","\\vDash",!0);B(V,de,he,"⊪","\\Vvdash",!0);B(V,de,he,"⌣","\\smallsmile");B(V,de,he,"⌢","\\smallfrown");B(V,de,he,"≏","\\bumpeq",!0);B(V,de,he,"≎","\\Bumpeq",!0);B(V,de,he,"≧","\\geqq",!0);B(V,de,he,"⩾","\\geqslant",!0);B(V,de,he,"⪖","\\eqslantgtr",!0);B(V,de,he,"≳","\\gtrsim",!0);B(V,de,he,"⪆","\\gtrapprox",!0);B(V,de,yt,"⋗","\\gtrdot");B(V,de,he,"⋙","\\ggg",!0);B(V,de,he,"≷","\\gtrless",!0);B(V,de,he,"⋛","\\gtreqless",!0);B(V,de,he,"⪌","\\gtreqqless",!0);B(V,de,he,"≖","\\eqcirc",!0);B(V,de,he,"≗","\\circeq",!0);B(V,de,he,"≜","\\triangleq",!0);B(V,de,he,"∼","\\thicksim");B(V,de,he,"≈","\\thickapprox");B(V,de,he,"⫆","\\supseteqq",!0);B(V,de,he,"⋑","\\Supset",!0);B(V,de,he,"⊐","\\sqsupset",!0);B(V,de,he,"≽","\\succcurlyeq",!0);B(V,de,he,"⋟","\\curlyeqsucc",!0);B(V,de,he,"≿","\\succsim",!0);B(V,de,he,"⪸","\\succapprox",!0);B(V,de,he,"⊳","\\vartriangleright");B(V,de,he,"⊵","\\trianglerighteq");B(V,de,he,"⊩","\\Vdash",!0);B(V,de,he,"∣","\\shortmid");B(V,de,he,"∥","\\shortparallel");B(V,de,he,"≬","\\between",!0);B(V,de,he,"⋔","\\pitchfork",!0);B(V,de,he,"∝","\\varpropto");B(V,de,he,"◀","\\blacktriangleleft");B(V,de,he,"∴","\\therefore",!0);B(V,de,he,"∍","\\backepsilon");B(V,de,he,"▶","\\blacktriangleright");B(V,de,he,"∵","\\because",!0);B(V,de,he,"⋘","\\llless");B(V,de,he,"⋙","\\gggtr");B(V,de,yt,"⊲","\\lhd");B(V,de,yt,"⊳","\\rhd");B(V,de,he,"≂","\\eqsim",!0);B(V,te,he,"⋈","\\Join");B(V,de,he,"≑","\\Doteq",!0);B(V,de,yt,"∔","\\dotplus",!0);B(V,de,yt,"∖","\\smallsetminus");B(V,de,yt,"⋒","\\Cap",!0);B(V,de,yt,"⋓","\\Cup",!0);B(V,de,yt,"⩞","\\doublebarwedge",!0);B(V,de,yt,"⊟","\\boxminus",!0);B(V,de,yt,"⊞","\\boxplus",!0);B(V,de,yt,"⋇","\\divideontimes",!0);B(V,de,yt,"⋉","\\ltimes",!0);B(V,de,yt,"⋊","\\rtimes",!0);B(V,de,yt,"⋋","\\leftthreetimes",!0);B(V,de,yt,"⋌","\\rightthreetimes",!0);B(V,de,yt,"⋏","\\curlywedge",!0);B(V,de,yt,"⋎","\\curlyvee",!0);B(V,de,yt,"⊝","\\circleddash",!0);B(V,de,yt,"⊛","\\circledast",!0);B(V,de,yt,"⋅","\\centerdot");B(V,de,yt,"⊺","\\intercal",!0);B(V,de,yt,"⋒","\\doublecap");B(V,de,yt,"⋓","\\doublecup");B(V,de,yt,"⊠","\\boxtimes",!0);B(V,de,he,"⇢","\\dashrightarrow",!0);B(V,de,he,"⇠","\\dashleftarrow",!0);B(V,de,he,"⇇","\\leftleftarrows",!0);B(V,de,he,"⇆","\\leftrightarrows",!0);B(V,de,he,"⇚","\\Lleftarrow",!0);B(V,de,he,"↞","\\twoheadleftarrow",!0);B(V,de,he,"↢","\\leftarrowtail",!0);B(V,de,he,"↫","\\looparrowleft",!0);B(V,de,he,"⇋","\\leftrightharpoons",!0);B(V,de,he,"↶","\\curvearrowleft",!0);B(V,de,he,"↺","\\circlearrowleft",!0);B(V,de,he,"↰","\\Lsh",!0);B(V,de,he,"⇈","\\upuparrows",!0);B(V,de,he,"↿","\\upharpoonleft",!0);B(V,de,he,"⇃","\\downharpoonleft",!0);B(V,te,he,"⊶","\\origof",!0);B(V,te,he,"⊷","\\imageof",!0);B(V,de,he,"⊸","\\multimap",!0);B(V,de,he,"↭","\\leftrightsquigarrow",!0);B(V,de,he,"⇉","\\rightrightarrows",!0);B(V,de,he,"⇄","\\rightleftarrows",!0);B(V,de,he,"↠","\\twoheadrightarrow",!0);B(V,de,he,"↣","\\rightarrowtail",!0);B(V,de,he,"↬","\\looparrowright",!0);B(V,de,he,"↷","\\curvearrowright",!0);B(V,de,he,"↻","\\circlearrowright",!0);B(V,de,he,"↱","\\Rsh",!0);B(V,de,he,"⇊","\\downdownarrows",!0);B(V,de,he,"↾","\\upharpoonright",!0);B(V,de,he,"⇂","\\downharpoonright",!0);B(V,de,he,"⇝","\\rightsquigarrow",!0);B(V,de,he,"⇝","\\leadsto");B(V,de,he,"⇛","\\Rrightarrow",!0);B(V,de,he,"↾","\\restriction");B(V,te,ve,"‘","`");B(V,te,ve,"$","\\$");B(We,te,ve,"$","\\$");B(We,te,ve,"$","\\textdollar");B(V,te,ve,"%","\\%");B(We,te,ve,"%","\\%");B(V,te,ve,"_","\\_");B(We,te,ve,"_","\\_");B(We,te,ve,"_","\\textunderscore");B(V,te,ve,"∠","\\angle",!0);B(V,te,ve,"∞","\\infty",!0);B(V,te,ve,"′","\\prime");B(V,te,ve,"△","\\triangle");B(V,te,ve,"Γ","\\Gamma",!0);B(V,te,ve,"Δ","\\Delta",!0);B(V,te,ve,"Θ","\\Theta",!0);B(V,te,ve,"Λ","\\Lambda",!0);B(V,te,ve,"Ξ","\\Xi",!0);B(V,te,ve,"Π","\\Pi",!0);B(V,te,ve,"Σ","\\Sigma",!0);B(V,te,ve,"Υ","\\Upsilon",!0);B(V,te,ve,"Φ","\\Phi",!0);B(V,te,ve,"Ψ","\\Psi",!0);B(V,te,ve,"Ω","\\Omega",!0);B(V,te,ve,"A","Α");B(V,te,ve,"B","Β");B(V,te,ve,"E","Ε");B(V,te,ve,"Z","Ζ");B(V,te,ve,"H","Η");B(V,te,ve,"I","Ι");B(V,te,ve,"K","Κ");B(V,te,ve,"M","Μ");B(V,te,ve,"N","Ν");B(V,te,ve,"O","Ο");B(V,te,ve,"P","Ρ");B(V,te,ve,"T","Τ");B(V,te,ve,"X","Χ");B(V,te,ve,"¬","\\neg",!0);B(V,te,ve,"¬","\\lnot");B(V,te,ve,"⊤","\\top");B(V,te,ve,"⊥","\\bot");B(V,te,ve,"∅","\\emptyset");B(V,de,ve,"∅","\\varnothing");B(V,te,Qt,"α","\\alpha",!0);B(V,te,Qt,"β","\\beta",!0);B(V,te,Qt,"γ","\\gamma",!0);B(V,te,Qt,"δ","\\delta",!0);B(V,te,Qt,"ϵ","\\epsilon",!0);B(V,te,Qt,"ζ","\\zeta",!0);B(V,te,Qt,"η","\\eta",!0);B(V,te,Qt,"θ","\\theta",!0);B(V,te,Qt,"ι","\\iota",!0);B(V,te,Qt,"κ","\\kappa",!0);B(V,te,Qt,"λ","\\lambda",!0);B(V,te,Qt,"μ","\\mu",!0);B(V,te,Qt,"ν","\\nu",!0);B(V,te,Qt,"ξ","\\xi",!0);B(V,te,Qt,"ο","\\omicron",!0);B(V,te,Qt,"π","\\pi",!0);B(V,te,Qt,"ρ","\\rho",!0);B(V,te,Qt,"σ","\\sigma",!0);B(V,te,Qt,"τ","\\tau",!0);B(V,te,Qt,"υ","\\upsilon",!0);B(V,te,Qt,"ϕ","\\phi",!0);B(V,te,Qt,"χ","\\chi",!0);B(V,te,Qt,"ψ","\\psi",!0);B(V,te,Qt,"ω","\\omega",!0);B(V,te,Qt,"ε","\\varepsilon",!0);B(V,te,Qt,"ϑ","\\vartheta",!0);B(V,te,Qt,"ϖ","\\varpi",!0);B(V,te,Qt,"ϱ","\\varrho",!0);B(V,te,Qt,"ς","\\varsigma",!0);B(V,te,Qt,"φ","\\varphi",!0);B(V,te,yt,"∗","*",!0);B(V,te,yt,"+","+");B(V,te,yt,"−","-",!0);B(V,te,yt,"⋅","\\cdot",!0);B(V,te,yt,"∘","\\circ",!0);B(V,te,yt,"÷","\\div",!0);B(V,te,yt,"±","\\pm",!0);B(V,te,yt,"×","\\times",!0);B(V,te,yt,"∩","\\cap",!0);B(V,te,yt,"∪","\\cup",!0);B(V,te,yt,"∖","\\setminus",!0);B(V,te,yt,"∧","\\land");B(V,te,yt,"∨","\\lor");B(V,te,yt,"∧","\\wedge",!0);B(V,te,yt,"∨","\\vee",!0);B(V,te,ve,"√","\\surd");B(V,te,Ya,"⟨","\\langle",!0);B(V,te,Ya,"∣","\\lvert");B(V,te,Ya,"∥","\\lVert");B(V,te,Qo,"?","?");B(V,te,Qo,"!","!");B(V,te,Qo,"⟩","\\rangle",!0);B(V,te,Qo,"∣","\\rvert");B(V,te,Qo,"∥","\\rVert");B(V,te,he,"=","=");B(V,te,he,":",":");B(V,te,he,"≈","\\approx",!0);B(V,te,he,"≅","\\cong",!0);B(V,te,he,"≥","\\ge");B(V,te,he,"≥","\\geq",!0);B(V,te,he,"←","\\gets");B(V,te,he,">","\\gt",!0);B(V,te,he,"∈","\\in",!0);B(V,te,he,"","\\@not");B(V,te,he,"⊂","\\subset",!0);B(V,te,he,"⊃","\\supset",!0);B(V,te,he,"⊆","\\subseteq",!0);B(V,te,he,"⊇","\\supseteq",!0);B(V,de,he,"⊈","\\nsubseteq",!0);B(V,de,he,"⊉","\\nsupseteq",!0);B(V,te,he,"⊨","\\models");B(V,te,he,"←","\\leftarrow",!0);B(V,te,he,"≤","\\le");B(V,te,he,"≤","\\leq",!0);B(V,te,he,"<","\\lt",!0);B(V,te,he,"→","\\rightarrow",!0);B(V,te,he,"→","\\to");B(V,de,he,"≱","\\ngeq",!0);B(V,de,he,"≰","\\nleq",!0);B(V,te,_u," ","\\ ");B(V,te,_u," ","\\space");B(V,te,_u," ","\\nobreakspace");B(We,te,_u," ","\\ ");B(We,te,_u," "," ");B(We,te,_u," ","\\space");B(We,te,_u," ","\\nobreakspace");B(V,te,_u,"","\\nobreak");B(V,te,_u,"","\\allowbreak");B(V,te,C0,",",",");B(V,te,C0,";",";");B(V,de,yt,"⊼","\\barwedge",!0);B(V,de,yt,"⊻","\\veebar",!0);B(V,te,yt,"⊙","\\odot",!0);B(V,te,yt,"⊕","\\oplus",!0);B(V,te,yt,"⊗","\\otimes",!0);B(V,te,ve,"∂","\\partial",!0);B(V,te,yt,"⊘","\\oslash",!0);B(V,de,yt,"⊚","\\circledcirc",!0);B(V,de,yt,"⊡","\\boxdot",!0);B(V,te,yt,"△","\\bigtriangleup");B(V,te,yt,"▽","\\bigtriangledown");B(V,te,yt,"†","\\dagger");B(V,te,yt,"⋄","\\diamond");B(V,te,yt,"⋆","\\star");B(V,te,yt,"◃","\\triangleleft");B(V,te,yt,"▹","\\triangleright");B(V,te,Ya,"{","\\{");B(We,te,ve,"{","\\{");B(We,te,ve,"{","\\textbraceleft");B(V,te,Qo,"}","\\}");B(We,te,ve,"}","\\}");B(We,te,ve,"}","\\textbraceright");B(V,te,Ya,"{","\\lbrace");B(V,te,Qo,"}","\\rbrace");B(V,te,Ya,"[","\\lbrack",!0);B(We,te,ve,"[","\\lbrack",!0);B(V,te,Qo,"]","\\rbrack",!0);B(We,te,ve,"]","\\rbrack",!0);B(V,te,Ya,"(","\\lparen",!0);B(V,te,Qo,")","\\rparen",!0);B(We,te,ve,"<","\\textless",!0);B(We,te,ve,">","\\textgreater",!0);B(V,te,Ya,"⌊","\\lfloor",!0);B(V,te,Qo,"⌋","\\rfloor",!0);B(V,te,Ya,"⌈","\\lceil",!0);B(V,te,Qo,"⌉","\\rceil",!0);B(V,te,ve,"\\","\\backslash");B(V,te,ve,"∣","|");B(V,te,ve,"∣","\\vert");B(We,te,ve,"|","\\textbar",!0);B(V,te,ve,"∥","\\|");B(V,te,ve,"∥","\\Vert");B(We,te,ve,"∥","\\textbardbl");B(We,te,ve,"~","\\textasciitilde");B(We,te,ve,"\\","\\textbackslash");B(We,te,ve,"^","\\textasciicircum");B(V,te,he,"↑","\\uparrow",!0);B(V,te,he,"⇑","\\Uparrow",!0);B(V,te,he,"↓","\\downarrow",!0);B(V,te,he,"⇓","\\Downarrow",!0);B(V,te,he,"↕","\\updownarrow",!0);B(V,te,he,"⇕","\\Updownarrow",!0);B(V,te,zs,"∐","\\coprod");B(V,te,zs,"⋁","\\bigvee");B(V,te,zs,"⋀","\\bigwedge");B(V,te,zs,"⨄","\\biguplus");B(V,te,zs,"⋂","\\bigcap");B(V,te,zs,"⋃","\\bigcup");B(V,te,zs,"∫","\\int");B(V,te,zs,"∫","\\intop");B(V,te,zs,"∬","\\iint");B(V,te,zs,"∭","\\iiint");B(V,te,zs,"∏","\\prod");B(V,te,zs,"∑","\\sum");B(V,te,zs,"⨂","\\bigotimes");B(V,te,zs,"⨁","\\bigoplus");B(V,te,zs,"⨀","\\bigodot");B(V,te,zs,"∮","\\oint");B(V,te,zs,"∯","\\oiint");B(V,te,zs,"∰","\\oiiint");B(V,te,zs,"⨆","\\bigsqcup");B(V,te,zs,"∫","\\smallint");B(We,te,Ap,"…","\\textellipsis");B(V,te,Ap,"…","\\mathellipsis");B(We,te,Ap,"…","\\ldots",!0);B(V,te,Ap,"…","\\ldots",!0);B(V,te,Ap,"⋯","\\@cdots",!0);B(V,te,Ap,"⋱","\\ddots",!0);B(V,te,ve,"⋮","\\varvdots");B(We,te,ve,"⋮","\\varvdots");B(V,te,Ln,"ˊ","\\acute");B(V,te,Ln,"ˋ","\\grave");B(V,te,Ln,"¨","\\ddot");B(V,te,Ln,"~","\\tilde");B(V,te,Ln,"ˉ","\\bar");B(V,te,Ln,"˘","\\breve");B(V,te,Ln,"ˇ","\\check");B(V,te,Ln,"^","\\hat");B(V,te,Ln,"⃗","\\vec");B(V,te,Ln,"˙","\\dot");B(V,te,Ln,"˚","\\mathring");B(V,te,Qt,"","\\@imath");B(V,te,Qt,"","\\@jmath");B(V,te,ve,"ı","ı");B(V,te,ve,"ȷ","ȷ");B(We,te,ve,"ı","\\i",!0);B(We,te,ve,"ȷ","\\j",!0);B(We,te,ve,"ß","\\ss",!0);B(We,te,ve,"æ","\\ae",!0);B(We,te,ve,"œ","\\oe",!0);B(We,te,ve,"ø","\\o",!0);B(We,te,ve,"Æ","\\AE",!0);B(We,te,ve,"Œ","\\OE",!0);B(We,te,ve,"Ø","\\O",!0);B(We,te,Ln,"ˊ","\\'");B(We,te,Ln,"ˋ","\\`");B(We,te,Ln,"ˆ","\\^");B(We,te,Ln,"˜","\\~");B(We,te,Ln,"ˉ","\\=");B(We,te,Ln,"˘","\\u");B(We,te,Ln,"˙","\\.");B(We,te,Ln,"¸","\\c");B(We,te,Ln,"˚","\\r");B(We,te,Ln,"ˇ","\\v");B(We,te,Ln,"¨",'\\"');B(We,te,Ln,"˝","\\H");B(We,te,Ln,"◯","\\textcircled");var VF={"--":!0,"---":!0,"``":!0,"''":!0};B(We,te,ve,"–","--",!0);B(We,te,ve,"–","\\textendash");B(We,te,ve,"—","---",!0);B(We,te,ve,"—","\\textemdash");B(We,te,ve,"‘","`",!0);B(We,te,ve,"‘","\\textquoteleft");B(We,te,ve,"’","'",!0);B(We,te,ve,"’","\\textquoteright");B(We,te,ve,"“","``",!0);B(We,te,ve,"“","\\textquotedblleft");B(We,te,ve,"”","''",!0);B(We,te,ve,"”","\\textquotedblright");B(V,te,ve,"°","\\degree",!0);B(We,te,ve,"°","\\degree");B(We,te,ve,"°","\\textdegree",!0);B(V,te,ve,"£","\\pounds");B(V,te,ve,"£","\\mathsterling",!0);B(We,te,ve,"£","\\pounds");B(We,te,ve,"£","\\textsterling",!0);B(V,de,ve,"✠","\\maltese");B(We,de,ve,"✠","\\maltese");var iR='0123456789/@."';for(var bk=0;bk{var r=e.charCodeAt(0),t=e.charCodeAt(1),n=(r-55296)*1024+(t-56320)+65536;if(119808<=n&&n<120484){var s=Math.floor((n-119808)/26);return gR[s]}else if(120782<=n&&n<=120831){var o=Math.floor((n-120782)/10);return QBn[o]}else{if(n===120485||n===120486)return gR[0];if(120486{if(k_(e.classes)!==k_(r.classes)||e.skew!==r.skew||e.maxFontSize!==r.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var t=e.classes[0];if(t==="mbin"||t==="mord")return!1}for(var n of Object.keys(e.style))if(e.style[n]!==r.style[n])return!1;for(var s of Object.keys(r.style))if(e.style[s]!==r.style[s])return!1;return!0},QF=e=>{for(var r=0;rt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>s&&(s=a.maxFontSize)}r.height=t,r.depth=n,r.maxFontSize=s},Qe=function(r,t,n,s){var o=new Np(r,t,n,s);return B6(o),o},S_=(e,r,t,n)=>new Np(e,r,t,n),lp=function(r,t,n){var s=Qe([r],[],t);return s.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=ot(s.height),s.maxFontSize=1,s},JBn=function(r,t,n,s){var o=new ix(r,t,n,s);return B6(o),o},fu=function(r){var t=new Ep(r);return B6(t),t},up=function(r,t){return r instanceof Ep?Qe([],[r],t):r},eFn=function(r){if(r.positionType==="individualShift"){for(var t=r.children,n=[t[0]],s=-t[0].shift-t[0].elem.depth,o=s,a=1;a{var t=Qe(["mspace"],[],r),n=Un(e,r);return t.style.marginRight=ot(n),t},i1=(e,r,t)=>{var n,s;switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return r==="textbf"&&t==="textit"?s="BoldItalic":r==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",n+"-"+s},k5={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},YF={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ZF=function(r,t){var[n,s,o]=YF[r],a=new j_(n),i=new au([a],{width:ot(s),height:ot(o),style:"width:"+ot(s),viewBox:"0 0 "+1e3*s+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),c=S_(["overlay"],[i],t);return c.height=o,c.style.height=ot(o),c.style.width=ot(s),c},Hn={number:3,unit:"mu"},_f={number:4,unit:"mu"},Ll={number:5,unit:"mu"},tFn={mord:{mop:Hn,mbin:_f,mrel:Ll,minner:Hn},mop:{mord:Hn,mop:Hn,mrel:Ll,minner:Hn},mbin:{mord:_f,mop:_f,mopen:_f,minner:_f},mrel:{mord:Ll,mop:Ll,mopen:Ll,minner:Ll},mopen:{},mclose:{mop:Hn,mbin:_f,mrel:Ll,minner:Hn},mpunct:{mord:Hn,mop:Hn,mrel:Ll,mopen:Hn,mclose:Hn,mpunct:Hn,minner:Hn},minner:{mord:Hn,mop:Hn,mbin:_f,mrel:Ll,mopen:Hn,mpunct:Hn,minner:Hn}},rFn={mord:{mop:Hn},mop:{mord:Hn,mop:Hn},mbin:{},mrel:{},mopen:{},mclose:{mop:Hn},mpunct:{},minner:{mop:Hn}},JF={},Gb={},Wb={};function gt(e){for(var{type:r,names:t,props:n,handler:s,htmlBuilder:o,mathmlBuilder:a}=e,i={type:r,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:s},c=0;c{var v=x.classes[0],b=k.classes[0];v==="mbin"&&sFn.has(b)?x.classes[0]="mord":b==="mbin"&&nFn.has(v)&&(k.classes[0]="mord")},{node:_},p,m),j5(o,(k,x)=>{var v,b,w=C5(x),y=C5(k),S=w&&y?k.hasClass("mtight")?(v=rFn[w])==null?void 0:v[y]:(b=tFn[w])==null?void 0:b[y]:null;if(S)return XF(S,u)},{node:_},p,m),o},j5=function(r,t,n,s,o){s&&r.push(s);for(var a=0;ap=>{r.splice(_+1,0,p),a++})(a)}s&&r.pop()},eH=function(r){return r instanceof Ep||r instanceof ix||r instanceof Np&&r.hasClass("enclosing")?r:null},S5=function(r,t){var n=eH(r);if(n){var s=n.children;if(s.length){if(t==="right")return S5(s[s.length-1],"right");if(t==="left")return S5(s[0],"left")}}return r},C5=function(r,t){if(!r)return null;t&&(r=S5(r,t));var n=r.classes[0];return aFn[n]||null},Eg=function(r,t){var n=["nulldelimiter"].concat(r.baseSizingClasses());return Qe(t.concat(n))},Yr=function(r,t,n){if(!r)return Qe();if(Gb[r.type]){var s=Gb[r.type](r,t);if(n&&t.size!==n.size){s=Qe(t.sizingClasses(n),[s],t);var o=t.sizeMultiplier/n.sizeMultiplier;s.height*=o,s.depth*=o}return s}else throw new tt("Got group of unknown type: '"+r.type+"'")};function c1(e,r){var t=Qe(["base"],e,r),n=Qe(["strut"]);return n.style.height=ot(t.height+t.depth),t.depth&&(n.style.verticalAlign=ot(-t.depth)),t.children.unshift(n),t}function z5(e,r){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var n=Is(e,r,"root"),s;n.length===2&&n[1].hasClass("tag")&&(s=n.pop());for(var o=[],a=[],i=0;i0&&(o.push(c1(a,r)),a=[]),o.push(n[i]));a.length>0&&o.push(c1(a,r));var u;t?(u=c1(Is(t,r,!0),r),u.classes=["tag"],o.push(u)):s&&o.push(s);var d=Qe(["katex-html"],o);if(d.setAttribute("aria-hidden","true"),u){var _=u.children[0];_.style.height=ot(d.height+d.depth),d.depth&&(_.style.verticalAlign=ot(-d.depth))}return d}function tH(e){return new Ep(e)}class rt{constructor(r,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=r,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(r,t){this.attributes[r]=t}getAttribute(r){return this.attributes[r]}toNode(){var r=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&r.setAttribute(t,this.attributes[t]);this.classes.length>0&&(r.className=k_(this.classes));for(var n=0;n0&&(r+=' class ="'+zo(k_(this.classes))+'"'),r+=">";for(var n=0;n",r}toText(){return this.children.map(r=>r.toText()).join("")}}class Cs{constructor(r){this.text=void 0,this.text=r}toNode(){return document.createTextNode(this.text)}toMarkup(){return zo(this.toText())}toText(){return this.text}}class rH{constructor(r){this.width=void 0,this.character=void 0,this.width=r,r>=.05555&&r<=.05556?this.character=" ":r>=.1666&&r<=.1667?this.character=" ":r>=.2222&&r<=.2223?this.character=" ":r>=.2777&&r<=.2778?this.character="  ":r>=-.05556&&r<=-.05555?this.character=" ⁣":r>=-.1667&&r<=-.1666?this.character=" ⁣":r>=-.2223&&r<=-.2222?this.character=" ⁣":r>=-.2778&&r<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var r=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return r.setAttribute("width",ot(this.width)),r}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var iFn=new Set(["\\imath","\\jmath"]),cFn=new Set(["mrow","mtable"]),zi=function(r,t,n){return $n[t][r]&&$n[t][r].replace&&r.charCodeAt(0)!==55349&&!(VF.hasOwnProperty(r)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(r=$n[t][r].replace),new Cs(r)},F6=function(r){return r.length===1?r[0]:new rt("mrow",r)},lFn={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},H6=(e,r)=>{if(e.mode==="text"){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold"}var t=r.font;if(!t||t==="mathnormal")return null;var n=e.mode,s=lFn[t];if(s)return typeof s=="function"?s(e):s;var o=e.text;if(iFn.has(o))return null;if($n[n][o]){var a=$n[n][o].replace;a&&(o=a)}var i=k5[t].fontName;return I6(o,i,n)?k5[t].variant:null};function kk(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var r=e.children[0];return r instanceof Cs&&r.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var t=e.children[0];return t instanceof Cs&&t.text===","}else return!1}var Za=function(r,t,n){if(r.length===1){var s=bn(r[0],t);return n&&s instanceof rt&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var o=[],a,i=0;i=1&&(a.type==="mn"||kk(a))){var u=c.children[0];u instanceof rt&&u.type==="mn"&&(u.children=[...a.children,...u.children],o.pop())}else if(a.type==="mi"&&a.children.length===1){var d=a.children[0];if(d instanceof Cs&&d.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var _=c.children[0];_ instanceof Cs&&_.text.length>0&&(_.text=_.text.slice(0,1)+"̸"+_.text.slice(1),o.pop())}}}o.push(c),a=c}return o},C_=function(r,t,n){return F6(Za(r,t,n))},bn=function(r,t){if(!r)return new rt("mrow");if(Wb[r.type])return Wb[r.type](r,t);throw new tt("Got group of unknown type: '"+r.type+"'")};function vR(e,r,t,n,s){var o=Za(e,t),a;o.length===1&&o[0]instanceof rt&&cFn.has(o[0].type)?a=o[0]:a=new rt("mrow",o);var i=new rt("annotation",[new Cs(r)]);i.setAttribute("encoding","application/x-tex");var c=new rt("semantics",[a,i]),u=new rt("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var d=s?"katex":"katex-mathml";return Qe([d],[u])}var uFn=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],bR=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],yR=function(r,t){return t.size<2?r:uFn[r-1][t.size-1]};class Hl{constructor(r){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=r.style,this.color=r.color,this.size=r.size||Hl.BASESIZE,this.textSize=r.textSize||this.size,this.phantom=!!r.phantom,this.font=r.font||"",this.fontFamily=r.fontFamily||"",this.fontWeight=r.fontWeight||"",this.fontShape=r.fontShape||"",this.sizeMultiplier=bR[this.size-1],this.maxSize=r.maxSize,this.minRuleThickness=r.minRuleThickness,this._fontMetrics=void 0}extend(r){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,r),new Hl(t)}havingStyle(r){return this.style===r?this:this.extend({style:r,size:yR(this.textSize,r)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(r){return this.size===r&&this.textSize===r?this:this.extend({style:this.style.text(),size:r,textSize:r,sizeMultiplier:bR[r-1]})}havingBaseStyle(r){r=r||this.style.text();var t=yR(Hl.BASESIZE,r);return this.size===t&&this.textSize===Hl.BASESIZE&&this.style===r?this:this.extend({style:r,size:t})}havingBaseSizing(){var r;switch(this.style.id){case 4:case 5:r=3;break;case 6:case 7:r=1;break;default:r=6}return this.extend({style:this.style.text(),size:r})}withColor(r){return this.extend({color:r})}withPhantom(){return this.extend({phantom:!0})}withFont(r){return this.extend({font:r})}withTextFontFamily(r){return this.extend({fontFamily:r,font:""})}withTextFontWeight(r){return this.extend({fontWeight:r,font:""})}withTextFontShape(r){return this.extend({fontShape:r,font:""})}sizingClasses(r){return r.size!==this.size?["sizing","reset-size"+r.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Hl.BASESIZE?["sizing","reset-size"+this.size,"size"+Hl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=KBn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Hl.BASESIZE=6;var nH=function(r){return new Hl({style:r.displayMode?ir.DISPLAY:ir.TEXT,maxSize:r.maxSize,minRuleThickness:r.minRuleThickness})},sH=function(r,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),r=Qe(n,[r])}return r},_Fn=function(r,t,n){var s=nH(n),o;if(n.output==="mathml")return vR(r,t,s,n.displayMode,!0);if(n.output==="html"){var a=z5(r,s);o=Qe(["katex"],[a])}else{var i=vR(r,t,s,n.displayMode,!1),c=z5(r,s);o=Qe(["katex"],[i,c])}return sH(o,n)},fFn=function(r,t,n){var s=nH(n),o=z5(r,s),a=Qe(["katex"],[o]);return sH(a,n)},dFn={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},ux=function(r){var t=new rt("mo",[new Cs(dFn[r.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},hFn={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},pFn=new Set(["widehat","widecheck","widetilde","utilde"]),_x=function(r,t){function n(){var i=4e5,c=r.label.slice(1);if(pFn.has(c)&&"base"in r){var u=r.base.type==="ordgroup"?r.base.body.length:1,d,_,p;if(u>5)c==="widehat"||c==="widecheck"?(d=420,i=2364,p=.42,_=c+"4"):(d=312,i=2340,p=.34,_="tilde4");else{var m=[1,1,2,2,3,3][u];c==="widehat"||c==="widecheck"?(i=[0,1062,2364,2364,2364][m],d=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],_=c+m):(i=[0,600,1033,2339,2340][m],d=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],_="tilde"+m)}var k=new j_(_),x=new au([k],{width:"100%",height:ot(p),viewBox:"0 0 "+i+" "+d,preserveAspectRatio:"none"});return{span:S_([],[x],t),minWidth:0,height:p}}else{var v=[],b=hFn[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[w,y,S]=b,z=S/1e3,N=w.length,A,E;if(N===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');A=["hide-tail"],E=[b[3]]}else if(N===2)A=["halfarrow-left","halfarrow-right"],E=["xMinYMin","xMaxYMin"];else if(N===3)A=["brace-left","brace-center","brace-right"],E=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+N+" children.");for(var M=0;M0&&(s.style.minWidth=ot(o)),s},mFn=function(r,t,n,s,o){var a,i=r.height+r.depth+n+s;if(/fbox|color|angl/.test(t)){if(a=Qe(["stretchy",t],[],o),t==="fbox"){var c=o.color&&o.getColor();c&&(a.style.borderColor=c)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new g5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new g5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new au(u,{width:"100%",height:ot(i)});a=S_([],[d],o)}return a.height=i,a.style.height=ot(i),a},gFn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},vFn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function bFn(e){return e in gFn}function br(e,r){if(!e||e.type!==r)throw new Error("Expected node of type "+r+", but got "+(e?"node of type "+e.type:String(e)));return e}function fx(e){var r=dx(e);if(!r)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return r}function dx(e){return e&&(e.type==="atom"||vFn.hasOwnProperty(e.type))?e:null}var oH=e=>{if(e instanceof Ka)return e;if(GBn(e)&&e.children.length===1)return oH(e.children[0])},q6=(e,r)=>{var t,n,s;e&&e.type==="supsub"?(n=br(e.base,"accent"),t=n.base,e.base=t,s=UBn(Yr(e,r)),e.base=n):(n=br(e,"accent"),t=n.base);var o=Yr(t,r.havingCrampedStyle()),a=n.isShifty&&uu(t),i=0;if(a){var c,u;i=(c=(u=oH(o))==null?void 0:u.skew)!=null?c:0}var d=n.label==="\\c",_=d?o.height+o.depth:Math.min(o.height,r.fontMetrics().xHeight),p;if(n.isStretchy)p=_x(n,r),p=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+ot(2*i)+")",marginLeft:ot(2*i)}:void 0}]});else{var m,k;n.label==="\\vec"?(m=ZF("vec",r),k=YF.vec[1]):(m=lx({mode:n.mode,text:n.label},r,"textord"),m=qBn(m),m.italic=0,k=m.width,d&&(_+=m.depth)),p=Qe(["accent-body"],[m]);var x=n.label==="\\textcircled";x&&(p.classes.push("accent-full"),_=o.height);var v=i;x||(v-=k/2),p.style.left=ot(v),n.label==="\\textcircled"&&(p.style.top=".2em"),p=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-_},{type:"elem",elem:p}]})}var b=Qe(["mord","accent"],[p],r);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},aH=(e,r)=>{var t=e.isStretchy?ux(e.label):new rt("mo",[zi(e.label,e.mode)]),n=new rt("mover",[bn(e.base,r),t]);return n.setAttribute("accent","true"),n},yFn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));gt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,r)=>{var t=Kb(r[0]),n=!yFn.test(e.funcName),s=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:s,base:t}},htmlBuilder:q6,mathmlBuilder:aH});gt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,r)=>{var t=r[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:q6,mathmlBuilder:aH});gt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"accentUnder",mode:t.mode,label:n,base:s}},htmlBuilder:(e,r)=>{var t=Yr(e.base,r),n=_x(e,r),s=e.label==="\\utilde"?.12:0,o=Qr({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Qe(["mord","accentunder"],[o],r)},mathmlBuilder:(e,r)=>{var t=ux(e.label),n=new rt("munder",[bn(e.base,r),t]);return n.setAttribute("accentunder","true"),n}});var l1=e=>{var r=new rt("mpadded",e?[e]:[]);return r.setAttribute("width","+0.6em"),r.setAttribute("lspace","0.3em"),r};gt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,r,t){var{parser:n,funcName:s}=e;return{type:"xArrow",mode:n.mode,label:s,body:r[0],below:t[0]}},htmlBuilder(e,r){var t=r.style,n=r.havingStyle(t.sup()),s=up(Yr(e.body,n,r),r),o=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(o+"-arrow-pad");var a;e.below&&(n=r.havingStyle(t.sub()),a=up(Yr(e.below,n,r),r),a.classes.push(o+"-arrow-pad"));var i=_x(e,r),c=-r.fontMetrics().axisHeight+.5*i.height,u=-r.fontMetrics().axisHeight-.5*i.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var d;if(a){var _=-r.fontMetrics().axisHeight+a.height+.5*i.height+.111;d=Qr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:i,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:_}]})}else d=Qr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:i,shift:c,wrapperClasses:["svg-align"]}]});return Qe(["mrel","x-arrow"],[d],r)},mathmlBuilder(e,r){var t=ux(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var s=l1(bn(e.body,r));if(e.below){var o=l1(bn(e.below,r));n=new rt("munderover",[t,o,s])}else n=new rt("mover",[t,s])}else if(e.below){var a=l1(bn(e.below,r));n=new rt("munder",[t,a])}else n=l1(),n=new rt("mover",[t,n]);return n}});function iH(e,r){var t=Is(e.body,r,!0);return Qe([e.mclass],t,r)}function cH(e,r){var t,n=Za(e.body,r);return e.mclass==="minner"?t=new rt("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(t=n[0],t.type="mi"):t=new rt("mi",n):(e.isCharacterBox?(t=n[0],t.type="mo"):t=new rt("mo",n),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}gt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"mclass",mode:t.mode,mclass:"m"+n.slice(5),body:Ss(s),isCharacterBox:uu(s)}},htmlBuilder:iH,mathmlBuilder:cH});var hx=e=>{var r=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return r.type==="atom"&&(r.family==="bin"||r.family==="rel")?"m"+r.family:"mord"};gt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,r){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:hx(r[0]),body:Ss(r[1]),isCharacterBox:uu(r[1])}}});gt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,r){var{parser:t,funcName:n}=e,s=r[1],o=r[0],a;n!=="\\stackrel"?a=hx(s):a="mrel";var i={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Ss(s)},c={type:"supsub",mode:o.mode,base:i,sup:n==="\\underset"?null:o,sub:n==="\\underset"?o:null};return{type:"mclass",mode:t.mode,mclass:a,body:[c],isCharacterBox:uu(c)}},htmlBuilder:iH,mathmlBuilder:cH});gt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:hx(r[0]),body:Ss(r[0])}},htmlBuilder(e,r){var t=Is(e.body,r,!0),n=Qe([e.mclass],t,r);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,r){var t=Za(e.body,r),n=new rt("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var xFn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},xR=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),wR=e=>e.type==="textord"&&e.text==="@",wFn=(e,r)=>(e.type==="mathord"||e.type==="atom")&&e.text===r;function kFn(e,r,t){var n=xFn[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(n,[r[0]],[r[1]]);case"\\uparrow":case"\\downarrow":{var s=t.callFunction("\\\\cdleft",[r[0]],[]),o={type:"atom",text:n,mode:"math",family:"rel"},a=t.callFunction("\\Big",[o],[]),i=t.callFunction("\\\\cdright",[r[1]],[]),c={type:"ordgroup",mode:"math",body:[s,a,i]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function jFn(e){var r=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){r.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var t=e.fetch().text;if(t==="&"||t==="\\\\")e.consume();else if(t==="\\end"){r[r.length-1].length===0&&r.pop();break}else throw new tt("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],s=[n],o=0;oAV".includes(u))for(var _=0;_<2;_++){for(var p=!0,m=c+1;mAV=|." after @',a[c]);var k=kFn(u,d,e),x={type:"styling",body:[k],mode:"math",style:"display",resetFont:!0};n.push(x),i=xR()}o%2===0?n.push(i):n.shift(),n=[],s.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var v=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}gt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e;return{type:"cdlabel",mode:t.mode,side:n.slice(4),label:r[0]}},htmlBuilder(e,r){var t=r.havingStyle(r.style.sup()),n=up(Yr(e.label,t,r),r);return n.classes.push("cd-label-"+e.side),n.style.bottom=ot(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,r){var t=new rt("mrow",[bn(e.label,r)]);return t=new rt("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new rt("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});gt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,r){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:r[0]}},htmlBuilder(e,r){var t=up(Yr(e.fragment,r),r);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,r){return new rt("mrow",[bn(e.fragment,r)])}});gt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,r){for(var{parser:t}=e,n=br(r[0],"ordgroup"),s=n.body,o="",a=0;a=1114111)throw new tt("\\@char with invalid code point "+o);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var lH=(e,r)=>{var t=Is(e.body,r.withColor(e.color),!1);return fu(t)},uH=(e,r)=>{var t=Za(e.body,r.withColor(e.color)),n=new rt("mstyle",t);return n.setAttribute("mathcolor",e.color),n};gt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,r){var{parser:t}=e,n=br(r[0],"color-token").color,s=r[1];return{type:"color",mode:t.mode,color:n,body:Ss(s)}},htmlBuilder:lH,mathmlBuilder:uH});gt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,r){var{parser:t,breakOnTokenText:n}=e,s=br(r[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var o=t.parseExpression(!0,n);return{type:"color",mode:t.mode,color:s,body:o}},htmlBuilder:lH,mathmlBuilder:uH});gt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,r,t){var{parser:n}=e,s=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,o=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:o,size:s&&br(s,"size").value}},htmlBuilder(e,r){var t=Qe(["mspace"],[],r);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=ot(Un(e.size,r)))),t},mathmlBuilder(e,r){var t=new rt("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",ot(Un(e.size,r)))),t}});var E5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},_H=e=>{var r=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new tt("Expected a control sequence",e);return r},SFn=e=>{var r=e.gullet.popToken();return r.text==="="&&(r=e.gullet.popToken(),r.text===" "&&(r=e.gullet.popToken())),r},fH=(e,r,t,n)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(r,s,n)};gt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:r,funcName:t}=e;r.consumeSpaces();var n=r.fetch();if(E5[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=E5[n.text]),br(r.parseFunction(),"internal");throw new tt("Invalid token after macro prefix",n)}});gt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=r.gullet.popToken(),s=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new tt("Expected a control sequence",n);for(var o=0,a,i=[[]];r.gullet.future().text!=="{";)if(n=r.gullet.popToken(),n.text==="#"){if(r.gullet.future().text==="{"){a=r.gullet.future(),i[o].push("{");break}if(n=r.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new tt('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==o+1)throw new tt('Argument number "'+n.text+'" out of order');o++,i.push([])}else{if(n.text==="EOF")throw new tt("Expected a macro definition");i[o].push(n.text)}var{tokens:c}=r.gullet.consumeArg();return a&&c.unshift(a),(t==="\\edef"||t==="\\xdef")&&(c=r.gullet.expandTokens(c),c.reverse()),r.gullet.macros.set(s,{tokens:c,numArgs:o,delimiters:i},t===E5[t]),{type:"internal",mode:r.mode}}});gt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=_H(r.gullet.popToken());r.gullet.consumeSpaces();var s=SFn(r);return fH(r,n,s,t==="\\\\globallet"),{type:"internal",mode:r.mode}}});gt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=_H(r.gullet.popToken()),s=r.gullet.popToken(),o=r.gullet.popToken();return fH(r,n,o,t==="\\\\globalfuture"),r.gullet.pushToken(o),r.gullet.pushToken(s),{type:"internal",mode:r.mode}}});var Pm=function(r,t,n){var s=$n.math[r]&&$n.math[r].replace,o=I6(s||r,t,n);if(!o)throw new Error("Unsupported symbol "+r+" and font size "+t+".");return o},U6=function(r,t,n,s){var o=n.havingBaseStyle(t),a=Qe(s.concat(o.sizingClasses(n)),[r],n),i=o.sizeMultiplier/n.sizeMultiplier;return a.height*=i,a.depth*=i,a.maxFontSize=o.sizeMultiplier,a},dH=function(r,t,n){var s=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;r.classes.push("delimcenter"),r.style.top=ot(o),r.height-=o,r.depth+=o},CFn=function(r,t,n,s,o,a){var i=Go(r,"Main-Regular",o,s),c=U6(i,t,s,a);return dH(c,s,t),c},zFn=function(r,t,n,s){return Go(r,"Size"+t+"-Regular",n,s)},hH=function(r,t,n,s,o,a){var i=zFn(r,t,o,s),c=U6(Qe(["delimsizing","size"+t],[i],s),ir.TEXT,s,a);return n&&dH(c,s,ir.TEXT),c},jk=function(r,t,n){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var o=Qe(["delimsizinginner",s],[Qe([],[Go(r,t,n)])]);return{type:"elem",elem:o}},Sk=function(r,t,n){var s=Dc["Size4-Regular"][r.charCodeAt(0)]?Dc["Size4-Regular"][r.charCodeAt(0)][4]:Dc["Size1-Regular"][r.charCodeAt(0)][4],o=new j_("inner",DBn(r,Math.round(1e3*t))),a=new au([o],{width:ot(s),height:ot(t),style:"width:"+ot(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=S_([],[a],n);return i.height=t,i.style.height=ot(t),i.style.width=ot(s),{type:"elem",elem:i}},N5=.008,u1={type:"kern",size:-1*N5},EFn=new Set(["|","\\lvert","\\rvert","\\vert"]),NFn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),pH=function(r,t,n,s,o,a){var i,c,u,d,_="",p=0;i=u=d=r,c=null;var m="Size1-Regular";r==="\\uparrow"?u=d="⏐":r==="\\Uparrow"?u=d="‖":r==="\\downarrow"?i=u="⏐":r==="\\Downarrow"?i=u="‖":r==="\\updownarrow"?(i="\\uparrow",u="⏐",d="\\downarrow"):r==="\\Updownarrow"?(i="\\Uparrow",u="‖",d="\\Downarrow"):EFn.has(r)?(u="∣",_="vert",p=333):NFn.has(r)?(u="∥",_="doublevert",p=556):r==="["||r==="\\lbrack"?(i="⎡",u="⎢",d="⎣",m="Size4-Regular",_="lbrack",p=667):r==="]"||r==="\\rbrack"?(i="⎤",u="⎥",d="⎦",m="Size4-Regular",_="rbrack",p=667):r==="\\lfloor"||r==="⌊"?(u=i="⎢",d="⎣",m="Size4-Regular",_="lfloor",p=667):r==="\\lceil"||r==="⌈"?(i="⎡",u=d="⎢",m="Size4-Regular",_="lceil",p=667):r==="\\rfloor"||r==="⌋"?(u=i="⎥",d="⎦",m="Size4-Regular",_="rfloor",p=667):r==="\\rceil"||r==="⌉"?(i="⎤",u=d="⎥",m="Size4-Regular",_="rceil",p=667):r==="("||r==="\\lparen"?(i="⎛",u="⎜",d="⎝",m="Size4-Regular",_="lparen",p=875):r===")"||r==="\\rparen"?(i="⎞",u="⎟",d="⎠",m="Size4-Regular",_="rparen",p=875):r==="\\{"||r==="\\lbrace"?(i="⎧",c="⎨",d="⎩",u="⎪",m="Size4-Regular"):r==="\\}"||r==="\\rbrace"?(i="⎫",c="⎬",d="⎭",u="⎪",m="Size4-Regular"):r==="\\lgroup"||r==="⟮"?(i="⎧",d="⎩",u="⎪",m="Size4-Regular"):r==="\\rgroup"||r==="⟯"?(i="⎫",d="⎭",u="⎪",m="Size4-Regular"):r==="\\lmoustache"||r==="⎰"?(i="⎧",d="⎭",u="⎪",m="Size4-Regular"):(r==="\\rmoustache"||r==="⎱")&&(i="⎫",d="⎩",u="⎪",m="Size4-Regular");var k=Pm(i,m,o),x=k.height+k.depth,v=Pm(u,m,o),b=v.height+v.depth,w=Pm(d,m,o),y=w.height+w.depth,S=0,z=1;if(c!==null){var N=Pm(c,m,o);S=N.height+N.depth,z=2}var A=x+y+S,E=Math.max(0,Math.ceil((t-A)/(z*b))),M=A+E*z*b,$=s.fontMetrics().axisHeight;n&&($*=s.sizeMultiplier);var D=M/2-$,I=[];if(_.length>0){var G=M-x-y,H=Math.round(M*1e3),Q=LBn(_,Math.round(G*1e3)),K=new j_(_,Q),J=ot(p/1e3),ee=ot(H/1e3),P=new au([K],{width:J,height:ee,viewBox:"0 0 "+p+" "+H}),L=S_([],[P],s);L.height=H/1e3,L.style.width=J,L.style.height=ee,I.push({type:"elem",elem:L})}else{if(I.push(jk(d,m,o)),I.push(u1),c===null){var F=M-x-y+2*N5;I.push(Sk(u,F,s))}else{var q=(M-x-y-S)/2+2*N5;I.push(Sk(u,q,s)),I.push(u1),I.push(jk(c,m,o)),I.push(u1),I.push(Sk(u,q,s))}I.push(u1),I.push(jk(i,m,o))}var U=s.havingBaseStyle(ir.TEXT),oe=Qr({positionType:"bottom",positionData:D,children:I});return U6(Qe(["delimsizing","mult"],[oe],U),ir.TEXT,s,a)},Ck=80,zk=.08,Ek=function(r,t,n,s,o){var a=$Bn(r,s,n),i=new j_(r,a),c=new au([i],{width:"400em",height:ot(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return S_(["hide-tail"],[c],o)},AFn=function(r,t){var n=t.havingBaseSizing(),s=yH("\\surd",r*n.sizeMultiplier,bH,n),o=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),i,c,u,d,_;return s.type==="small"?(d=1e3+1e3*a+Ck,r<1?o=1:r<1.4&&(o=.7),c=(1+a+zk)/o,u=(1+a)/o,i=Ek("sqrtMain",c,d,a,t),i.style.minWidth="0.853em",_=.833/o):s.type==="large"?(d=(1e3+Ck)*tg[s.size],u=(tg[s.size]+a)/o,c=(tg[s.size]+a+zk)/o,i=Ek("sqrtSize"+s.size,c,d,a,t),i.style.minWidth="1.02em",_=1/o):(c=r+a+zk,u=r+a,d=Math.floor(1e3*r+a)+Ck,i=Ek("sqrtTall",c,d,a,t),i.style.minWidth="0.742em",_=1.056),i.height=u,i.style.height=ot(c),{span:i,advanceWidth:_,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*o}},mH=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),TFn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),gH=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),tg=[0,1.2,1.8,2.4,3],vH=function(r,t,n,s,o){if(r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle"),mH.has(r)||gH.has(r))return hH(r,t,!1,n,s,o);if(TFn.has(r))return pH(r,tg[t],!1,n,s,o);throw new tt("Illegal delimiter: '"+r+"'")},RFn=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],MFn=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"stack"}],bH=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],OFn=function(r){if(r.type==="small")return"Main-Regular";if(r.type==="large")return"Size"+r.size+"-Regular";if(r.type==="stack")return"Size4-Regular";var t=r.type;throw new Error("Add support for delim type '"+t+"' here.")},yH=function(r,t,n,s){for(var o=Math.min(2,3-s.style.size),a=o;at)return i}return n[n.length-1]},A5=function(r,t,n,s,o,a){r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle");var i;gH.has(r)?i=RFn:mH.has(r)?i=bH:i=MFn;var c=yH(r,t,i,s);return c.type==="small"?CFn(r,c.style,n,s,o,a):c.type==="large"?hH(r,c.size,n,s,o,a):pH(r,t,n,s,o,a)},Nk=function(r,t,n,s,o,a){var i=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,d=Math.max(t-i,n+i),_=Math.max(d/500*c,2*d-u);return A5(r,_,!0,s,o,a)},kR={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},$Fn=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function jR(e){return"isMiddle"in e}function px(e,r){var t=dx(e);if(t&&$Fn.has(t.text))return t;throw t?new tt("Invalid delimiter '"+t.text+"' after '"+r.funcName+"'",e):new tt("Invalid delimiter type '"+e.type+"'",e)}gt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,r)=>{var t=px(r[0],e);return{type:"delimsizing",mode:e.parser.mode,size:kR[e.funcName].size,mclass:kR[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,r)=>e.delim==="."?Qe([e.mclass]):vH(e.delim,e.size,r,e.mode,[e.mclass]),mathmlBuilder:e=>{var r=[];e.delim!=="."&&r.push(zi(e.delim,e.mode));var t=new rt("mo",r);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=ot(tg[e.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function SR(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}gt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new tt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:px(r[0],e).text,color:t}}});gt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=px(r[0],e),n=e.parser;++n.leftrightDepth;var s=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=br(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:s,left:t.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,r)=>{SR(e);for(var t=Is(e.body,r,!0,["mopen","mclose"]),n=0,s=0,o=!1,a=0;a{SR(e);var t=Za(e.body,r);if(e.left!=="."){var n=new rt("mo",[zi(e.left,e.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(e.right!=="."){var s=new rt("mo",[zi(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return F6(t)}});gt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=px(r[0],e);if(!e.parser.leftrightDepth)throw new tt("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,r)=>{var t;return e.delim==="."?t=Eg(r,[]):(t=vH(e.delim,1,r,e.mode,[]),t.isMiddle={delim:e.delim,options:r}),t},mathmlBuilder:(e,r)=>{var t=e.delim==="\\vert"||e.delim==="|"?zi("|","text"):zi(e.delim,e.mode),n=new rt("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var mx=(e,r)=>{var t=up(Yr(e.body,r),r),n=e.label.slice(1),s=r.sizeMultiplier,o,a,i=uu(e.body);if(n==="sout")o=Qe(["stretchy","sout"]),o.height=r.fontMetrics().defaultRuleThickness/s,a=-.5*r.fontMetrics().xHeight;else if(n==="phase"){var c=Un({number:.6,unit:"pt"},r),u=Un({number:.35,unit:"ex"},r),d=r.havingBaseSizing();s=s/d.sizeMultiplier;var _=t.height+t.depth+c+u;t.style.paddingLeft=ot(_/2+c);var p=Math.floor(1e3*_*s),m=MBn(p),k=new au([new j_("phase",m)],{width:"400em",height:ot(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});o=S_(["hide-tail"],[k],r),o.style.height=ot(_),a=t.depth+c+u}else{/cancel/.test(n)?i||t.classes.push("cancel-pad"):n==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var x,v,b=0;/box/.test(n)?(b=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness),x=r.fontMetrics().fboxsep+(n==="colorbox"?0:b),v=x):n==="angl"?(b=Math.max(r.fontMetrics().defaultRuleThickness,r.minRuleThickness),x=4*b,v=Math.max(0,.25-t.depth)):(x=i?.2:0,v=x),o=mFn(t,n,x,v,r),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=ot(b)):n==="angl"&&b!==.049&&(o.style.borderTopWidth=ot(b),o.style.borderRightWidth=ot(b)),a=t.depth+v,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var w;if(e.backgroundColor)w=Qr({positionType:"individualShift",children:[{type:"elem",elem:o,shift:a},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(n)?["svg-align"]:[];w=Qr({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:o,shift:a,wrapperClasses:y}]})}return/cancel/.test(n)&&(w.height=t.height,w.depth=t.depth),/cancel/.test(n)&&!i?Qe(["mord","cancel-lap"],[w],r):Qe(["mord"],[w],r)},gx=(e,r)=>{var t,n=new rt(e.label.includes("colorbox")?"mpadded":"menclose",[bn(e.body,r)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=r.fontMetrics().fboxsep*r.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*t+"pt"),n.setAttribute("height","+"+2*t+"pt"),n.setAttribute("lspace",t+"pt"),n.setAttribute("voffset",t+"pt"),e.label==="\\fcolorbox"){var s=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness);n.setAttribute("style","border: "+ot(s)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};gt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,r,t){var{parser:n,funcName:s}=e,o=br(r[0],"color-token").color,a=r[1];return{type:"enclose",mode:n.mode,label:s,backgroundColor:o,body:a}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,r,t){var{parser:n,funcName:s}=e,o=br(r[0],"color-token").color,a=br(r[1],"color-token").color,i=r[2];return{type:"enclose",mode:n.mode,label:s,backgroundColor:a,borderColor:o,body:i}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:r[0]}}});gt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"enclose",mode:t.mode,label:n,body:s}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=r[0];return{type:"enclose",mode:t.mode,label:n,body:s}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,r){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:r[0]}}});var xH={};function el(e){for(var{type:r,names:t,props:n,handler:s,htmlBuilder:o,mathmlBuilder:a}=e,i={type:r,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},c=0;c{var r=e.parser.settings;if(!r.displayMode)throw new tt("{"+e.envName+"} can be used only in display mode.")},DFn=new Set(["gather","gather*"]);function G6(e){if(!e.includes("ed"))return!e.includes("*")}function M_(e,r,t){var{hskipBeforeAndAfter:n,addJot:s,cols:o,arraystretch:a,colSeparationType:i,autoTag:c,singleRow:u,emptySingleRow:d,maxNumCols:_,leqno:p}=r;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new tt("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var k=[],x=[k],v=[],b=[],w=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function S(){w&&(e.gullet.macros.get("\\df@tag")?(w.push(e.subparse([new Ua("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):w.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),b.push(CR(e));;){var z=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var N={type:"ordgroup",mode:e.mode,body:z};t&&(N={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[N]}),k.push(N);var A=e.fetch().text;if(A==="&"){if(_&&k.length===_){if(u||i)throw new tt("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(A==="\\end"){S(),k.length===1&&N.type==="styling"&&N.body.length===1&&N.body[0].type==="ordgroup"&&N.body[0].body.length===0&&(x.length>1||!d)&&x.pop(),b.length0&&(y+=.25),u.push({pos:y,isDashed:Ye[Ae]})}for(S(a[0]),n=0;n0&&(D+=w,AYe))for(n=0;n=i)){var ae=void 0;if(s>0||r.hskipBeforeAndAfter){var le,me;ae=(le=(me=U)==null?void 0:me.pregap)!=null?le:p,ae!==0&&(Q=Qe(["arraycolsep"],[]),Q.style.width=ot(ae),H.push(Q))}var be=[];for(n=0;n0){for(var Ut=lp("hline",t,d),Gt=lp("hdashline",t,d),De=[{type:"elem",elem:Vt,shift:0}];u.length>0;){var ct=u.pop(),lt=ct.pos-I;ct.isDashed?De.push({type:"elem",elem:Gt,shift:lt}):De.push({type:"elem",elem:Ut,shift:lt})}Vt=Qr({positionType:"individualShift",children:De})}if(J.length===0)return Qe(["mord"],[Vt],t);var xe=Qr({positionType:"individualShift",children:J}),Ie=Qe(["tag"],[xe],t);return fu([Vt,Ie])},LFn={c:"center ",l:"left ",r:"right "},rl=function(r,t){for(var n=[],s=new rt("mtd",[],["mtr-glue"]),o=new rt("mtd",[],["mml-eqn-num"]),a=0;a0){var k=r.cols,x="",v=!1,b=0,w=k.length;k[0].type==="separator"&&(p+="top ",b=1),k[k.length-1].type==="separator"&&(p+="bottom ",w-=1);for(var y=b;y0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var $=1;$0&&m&&(v=1),n[k]={type:"align",align:x,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};el({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,r){var t=dx(r[0]),n=t?[r[0]]:br(r[0],"ordgroup").body,s=n.map(function(a){var i=fx(a),c=i.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new tt("Unknown column alignment: "+c,a)}),o={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return M_(e.parser,o,W6(e.envName))},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var r={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],t="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),t=s.fetch().text,!"lcr".includes(t))throw new tt("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),n.cols=[{type:"align",align:t}]}}var o=M_(e.parser,n,W6(e.envName)),a=Math.max(0,...o.body.map(i=>i.length));return o.cols=new Array(a).fill({type:"align",align:t}),r?{type:"leftright",mode:e.mode,body:[o],left:r[0],right:r[1],rightColor:void 0}:o},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var r={arraystretch:.5},t=M_(e.parser,r,"script");return t.colSeparationType="small",t},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["subarray"],props:{numArgs:1},handler(e,r){var t=dx(r[0]),n=t?[r[0]]:br(r[0],"ordgroup").body,s=n.map(function(i){var c=fx(i),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new tt("Unknown column alignment: "+u,i)});if(s.length>1)throw new tt("{subarray} can contain only one column");var o={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=M_(e.parser,o,"script");if(a.body.length>0&&a.body[0].length>1)throw new tt("{subarray} can contain only one column");return a},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var r={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=M_(e.parser,r,W6(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:kH,htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){DFn.has(e.envName)&&vx(e);var r={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:G6(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return M_(e.parser,r,"display")},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:kH,htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){vx(e);var r={autoTag:G6(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return M_(e.parser,r,"display")},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["CD"],props:{numArgs:0},handler(e){return vx(e),jFn(e.parser)},htmlBuilder:tl,mathmlBuilder:rl});se("\\nonumber","\\gdef\\@eqnsw{0}");se("\\notag","\\nonumber");gt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,r){throw new tt(e.funcName+" valid only within array environment")}});var zR=xH;gt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];if(s.type!=="ordgroup")throw new tt("Invalid environment name",s);for(var o="",a=0;a{var t=e.font,n=r.withFont(t);return Yr(e.body,n)},SH=(e,r)=>{var t=e.font,n=r.withFont(t);return bn(e.body,n)},ER={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};gt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=Kb(r[0]),o=n;return o in ER&&(o=ER[o]),{type:"font",mode:t.mode,font:o.slice(1),body:s}},htmlBuilder:jH,mathmlBuilder:SH});gt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"mclass",mode:t.mode,mclass:hx(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:uu(n)}}});gt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,r)=>{var{parser:t,funcName:n,breakOnTokenText:s}=e,{mode:o}=t,a=t.parseExpression(!0,s);return{type:"font",mode:o,font:"math"+n.slice(1),body:{type:"ordgroup",mode:t.mode,body:a}}},htmlBuilder:jH,mathmlBuilder:SH});var IFn=(e,r)=>{var t=r.style,n=t.fracNum(),s=t.fracDen(),o;o=r.havingStyle(n);var a=Yr(e.numer,o,r);if(e.continued){var i=8.5/r.fontMetrics().ptPerEm,c=3.5/r.fontMetrics().ptPerEm;a.height=a.height0?k=3*p:k=7*p,x=r.fontMetrics().denom1):(_>0?(m=r.fontMetrics().num2,k=p):(m=r.fontMetrics().num3,k=3*p),x=r.fontMetrics().denom2);var v;if(d){var w=r.fontMetrics().axisHeight;m-a.depth-(w+.5*_){var t=new rt("mfrac",[bn(e.numer,r),bn(e.denom,r)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var n=Un(e.barSize,r);t.setAttribute("linethickness",ot(n))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var o=new rt("mo",[new Cs(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(t),e.rightDelim!=null){var a=new rt("mo",[new Cs(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return F6(s)}return t},CH=(e,r)=>{if(!r)return e;var t={type:"styling",mode:e.mode,style:r,body:[e]};return t};gt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0],o=r[1],a,i=null,c=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,i="(",c=")";break;case"\\\\bracefrac":a=!1,i="\\{",c="\\}";break;case"\\\\brackfrac":a=!1,i="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var u=n==="\\cfrac",d=null;return u||n.startsWith("\\d")?d="display":n.startsWith("\\t")&&(d="text"),CH({type:"genfrac",mode:t.mode,numer:s,denom:o,continued:u,hasBarLine:a,leftDelim:i,rightDelim:c,barSize:null},d)},htmlBuilder:IFn,mathmlBuilder:PFn});gt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:r,funcName:t,token:n}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:s,token:n}}});var NR=["display","text","script","scriptscript"],AR=function(r){var t=null;return r.length>0&&(t=r,t=t==="."?null:t),t};gt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,r){var{parser:t}=e,n=r[4],s=r[5],o=Kb(r[0]),a=o.type==="atom"&&o.family==="open"?AR(o.text):null,i=Kb(r[1]),c=i.type==="atom"&&i.family==="close"?AR(i.text):null,u=br(r[2],"size"),d,_=null;u.isBlank?d=!0:(_=u.value,d=_.number>0);var p=null,m=r[3];if(m.type==="ordgroup"){if(m.body.length>0){var k=br(m.body[0],"textord");p=NR[Number(k.text)]}}else m=br(m,"textord"),p=NR[Number(m.text)];return CH({type:"genfrac",mode:t.mode,numer:n,denom:s,continued:!1,hasBarLine:d,barSize:_,leftDelim:a,rightDelim:c},p)}});gt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,r){var{parser:t,funcName:n,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:br(r[0],"size").value,token:s}}});gt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0],o=br(r[1],"infix").size;if(!o)throw new Error("\\\\abovefrac expected size, but got "+String(o));var a=r[2],i=o.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:a,continued:!1,hasBarLine:i,barSize:o,leftDelim:null,rightDelim:null}}});var zH=(e,r)=>{var t=r.style,n,s;e.type==="supsub"?(n=e.sup?Yr(e.sup,r.havingStyle(t.sup()),r):Yr(e.sub,r.havingStyle(t.sub()),r),s=br(e.base,"horizBrace")):s=br(e,"horizBrace");var o=Yr(s.base,r.havingBaseStyle(ir.DISPLAY)),a=_x(s,r),i;if(s.isOver?i=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):i=Qr({positionType:"bottom",positionData:o.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:o}]}),n){var c=Qe(["minner",s.isOver?"mover":"munder"],[i],r);s.isOver?i=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:n}]}):i=Qr({positionType:"bottom",positionData:c.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Qe(["minner",s.isOver?"mover":"munder"],[i],r)},BFn=(e,r)=>{var t=ux(e.label);return new rt(e.isOver?"mover":"munder",[bn(e.base,r),t])};gt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e;return{type:"horizBrace",mode:t.mode,label:n,isOver:n.includes("\\over"),base:r[0]}},htmlBuilder:zH,mathmlBuilder:BFn});gt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[1],s=br(r[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:Ss(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,r)=>{var t=Is(e.body,r,!1);return JBn(e.href,[],t,r)},mathmlBuilder:(e,r)=>{var t=C_(e.body,r);return t instanceof rt||(t=new rt("mrow",[t])),t.setAttribute("href",e.href),t}});gt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=br(r[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:n}))return t.formatUnsupportedCmd("\\url");for(var s=[],o=0;o{var{parser:t,funcName:n,token:s}=e,o=br(r[0],"raw").string,a=r[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i,c={};switch(n){case"\\htmlClass":c.class=o,i={command:"\\htmlClass",class:o};break;case"\\htmlId":c.id=o,i={command:"\\htmlId",id:o};break;case"\\htmlStyle":c.style=o,i={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var u=o.split(","),d=0;d{var t=Is(e.body,r,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var s=Qe(n,t,r);for(var o in e.attributes)o!=="class"&&e.attributes.hasOwnProperty(o)&&s.setAttribute(o,e.attributes[o]);return s},mathmlBuilder:(e,r)=>C_(e.body,r)});gt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:Ss(r[0]),mathml:Ss(r[1])}},htmlBuilder:(e,r)=>{var t=Is(e.html,r,!1);return fu(t)},mathmlBuilder:(e,r)=>C_(e.mathml,r)});var Ak=function(r){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(r))return{number:+r,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r);if(!t)throw new tt("Invalid size: '"+r+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!UF(n))throw new tt("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};gt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,r,t)=>{var{parser:n}=e,s={number:0,unit:"em"},o={number:.9,unit:"em"},a={number:0,unit:"em"},i="";if(t[0])for(var c=br(t[0],"raw").string,u=c.split(","),d=0;d{var t=Un(e.height,r),n=0;e.totalheight.number>0&&(n=Un(e.totalheight,r)-t);var s=0;e.width.number>0&&(s=Un(e.width,r));var o={height:ot(t+n)};s>0&&(o.width=ot(s)),n>0&&(o.verticalAlign=ot(-n));var a=new FBn(e.src,e.alt,o);return a.height=t,a.depth=n,a},mathmlBuilder:(e,r)=>{var t=new rt("mglyph",[]);t.setAttribute("alt",e.alt);var n=Un(e.height,r),s=0;if(e.totalheight.number>0&&(s=Un(e.totalheight,r)-n,t.setAttribute("valign",ot(-s))),t.setAttribute("height",ot(n+s)),e.width.number>0){var o=Un(e.width,r);t.setAttribute("width",ot(o))}return t.setAttribute("src",e.src),t}});gt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e,s=br(r[0],"size");if(t.settings.strict){var o=n[1]==="m",a=s.value.unit==="mu";o?(a||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+s.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):a&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:s.value}},htmlBuilder(e,r){return XF(e.dimension,r)},mathmlBuilder(e,r){var t=Un(e.dimension,r);return new rH(t)}});gt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"lap",mode:t.mode,alignment:n.slice(5),body:s}},htmlBuilder:(e,r)=>{var t;e.alignment==="clap"?(t=Qe([],[Yr(e.body,r)]),t=Qe(["inner"],[t],r)):t=Qe(["inner"],[Yr(e.body,r)]);var n=Qe(["fix"],[]),s=Qe([e.alignment],[t,n],r),o=Qe(["strut"]);return o.style.height=ot(s.height+s.depth),s.depth&&(o.style.verticalAlign=ot(-s.depth)),s.children.unshift(o),s=Qe(["thinbox"],[s],r),Qe(["mord","vbox"],[s],r)},mathmlBuilder:(e,r)=>{var t=new rt("mpadded",[bn(e.body,r)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",n+"width")}return t.setAttribute("width","0px"),t}});gt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,r){var{funcName:t,parser:n}=e,s=n.mode;n.switchMode("math");var o=t==="\\("?"\\)":"$",a=n.parseExpression(!1,o);return n.expect(o),n.switchMode(s),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:a}}});gt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,r){throw new tt("Mismatched "+e.funcName)}});var TR=(e,r)=>{switch(r.style.size){case ir.DISPLAY.size:return e.display;case ir.TEXT.size:return e.text;case ir.SCRIPT.size:return e.script;case ir.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};gt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,r)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:Ss(r[0]),text:Ss(r[1]),script:Ss(r[2]),scriptscript:Ss(r[3])}},htmlBuilder:(e,r)=>{var t=TR(e,r),n=Is(t,r,!1);return fu(n)},mathmlBuilder:(e,r)=>{var t=TR(e,r);return C_(t,r)}});var EH=(e,r,t,n,s,o,a)=>{e=Qe([],[e]);var i=t&&uu(t),c,u;if(r){var d=Yr(r,n.havingStyle(s.sup()),n);u={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var _=Yr(t,n.havingStyle(s.sub()),n);c={elem:_,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-_.height)}}var p;if(u&&c){var m=n.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+a;p=Qr({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:ot(-o)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ot(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(c){var k=e.height-a;p=Qr({positionType:"top",positionData:k,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:ot(-o)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var x=e.depth+a;p=Qr({positionType:"bottom",positionData:x,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ot(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&o!==0&&!i){var b=Qe(["mspace"],[],n);b.style.marginRight=ot(o),v.unshift(b)}return Qe(["mop","op-limits"],v,n)},NH=new Set(["\\smallint"]),Tp=(e,r)=>{var t,n,s=!1,o;e.type==="supsub"?(t=e.sup,n=e.sub,o=br(e.base,"op"),s=!0):o=br(e,"op");var a=r.style,i=!1;a.size===ir.DISPLAY.size&&o.symbol&&!NH.has(o.name)&&(i=!0);var c,u;if(o.symbol){var d=i?"Size2-Regular":"Size1-Regular",_="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(_=o.name.slice(1),o.name=_==="oiint"?"\\iint":"\\iiint"),c=Go(o.name,d,"math",r,["mop","op-symbol",i?"large-op":"small-op"]),u=c.italic,_.length>0){var p=ZF(_+"Size"+(i?"2":"1"),r);c=Qr({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:p,shift:i?.08:0}]}),o.name="\\"+_,c.classes.unshift("mop"),c.italic=u}}else if(o.body){var m=Is(o.body,r,!0);m.length===1&&m[0]instanceof Ka?(c=m[0],c.classes[0]="mop"):c=Qe(["mop"],m,r)}else{for(var k=[],x=1;x{var t;if(e.symbol)t=new rt("mo",[zi(e.name,e.mode)]),NH.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new rt("mo",Za(e.body,r));else{t=new rt("mi",[new Cs(e.name.slice(1))]);var n=new rt("mo",[zi("⁡","text")]);e.parentIsSupSub?t=new rt("mrow",[t,n]):t=tH([t,n])}return t},FFn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};gt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=n;return s.length===1&&(s=FFn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ss(n)}},htmlBuilder:Tp,mathmlBuilder:z0});var HFn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};gt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:r,funcName:t}=e;return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:r,funcName:t}=e;return{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:r,funcName:t}=e,n=t;return n.length===1&&(n=HFn[n]),{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Tp,mathmlBuilder:z0});var AH=(e,r)=>{var t,n,s=!1,o;e.type==="supsub"?(t=e.sup,n=e.sub,o=br(e.base,"operatorname"),s=!0):o=br(e,"operatorname");var a;if(o.body.length>0){for(var i=o.body.map(_=>{var p="text"in _?_.text:void 0;return typeof p=="string"?{type:"textord",mode:_.mode,text:p}:_}),c=Is(i,r.withFont("mathrm"),!0),u=0;u{for(var t=Za(e.body,r.withFont("mathrm")),n=!0,s=0;sd.toText()).join("");t=[new Cs(i)]}var c=new rt("mi",t);c.setAttribute("mathvariant","normal");var u=new rt("mo",[zi("⁡","text")]);return e.parentIsSupSub?new rt("mrow",[c,u]):tH([c,u])};gt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"operatorname",mode:t.mode,body:Ss(s),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:AH,mathmlBuilder:qFn});se("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");kd({type:"ordgroup",htmlBuilder(e,r){return e.semisimple?fu(Is(e.body,r,!1)):Qe(["mord"],Is(e.body,r,!0),r)},mathmlBuilder(e,r){return C_(e.body,r,!0)}});gt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,r){var{parser:t}=e,n=r[0];return{type:"overline",mode:t.mode,body:n}},htmlBuilder(e,r){var t=Yr(e.body,r.havingCrampedStyle()),n=lp("overline-line",r),s=r.fontMetrics().defaultRuleThickness,o=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:n},{type:"kern",size:s}]});return Qe(["mord","overline"],[o],r)},mathmlBuilder(e,r){var t=new rt("mo",[new Cs("‾")]);t.setAttribute("stretchy","true");var n=new rt("mover",[bn(e.body,r),t]);return n.setAttribute("accent","true"),n}});gt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"phantom",mode:t.mode,body:Ss(n)}},htmlBuilder:(e,r)=>{var t=Is(e.body,r.withPhantom(),!1);return fu(t)},mathmlBuilder:(e,r)=>{var t=Za(e.body,r);return new rt("mphantom",t)}});se("\\hphantom","\\smash{\\phantom{#1}}");gt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"vphantom",mode:t.mode,body:n}},htmlBuilder:(e,r)=>{var t=Qe(["inner"],[Yr(e.body,r.withPhantom())]),n=Qe(["fix"],[]);return Qe(["mord","rlap"],[t,n],r)},mathmlBuilder:(e,r)=>{var t=Za(Ss(e.body),r),n=new rt("mphantom",t),s=new rt("mpadded",[n]);return s.setAttribute("width","0px"),s}});gt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,r){var{parser:t}=e,n=br(r[0],"size").value,s=r[1];return{type:"raisebox",mode:t.mode,dy:n,body:s}},htmlBuilder(e,r){var t=Yr(e.body,r),n=Un(e.dy,r);return Qr({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,r){var t=new rt("mpadded",[bn(e.body,r)]),n=e.dy.number+e.dy.unit;return t.setAttribute("voffset",n),t}});gt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:r}=e;return{type:"internal",mode:r.mode}}});gt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,r,t){var{parser:n}=e,s=t[0],o=br(r[0],"size"),a=br(r[1],"size");return{type:"rule",mode:n.mode,shift:s&&br(s,"size").value,width:o.value,height:a.value}},htmlBuilder(e,r){var t=Qe(["mord","rule"],[],r),n=Un(e.width,r),s=Un(e.height,r),o=e.shift?Un(e.shift,r):0;return t.style.borderRightWidth=ot(n),t.style.borderTopWidth=ot(s),t.style.bottom=ot(o),t.width=n,t.height=s+o,t.depth=-o,t.maxFontSize=s*1.125*r.sizeMultiplier,t},mathmlBuilder(e,r){var t=Un(e.width,r),n=Un(e.height,r),s=e.shift?Un(e.shift,r):0,o=r.color&&r.getColor()||"black",a=new rt("mspace");a.setAttribute("mathbackground",o),a.setAttribute("width",ot(t)),a.setAttribute("height",ot(n));var i=new rt("mpadded",[a]);return s>=0?i.setAttribute("height",ot(s)):(i.setAttribute("height",ot(s)),i.setAttribute("depth",ot(-s))),i.setAttribute("voffset",ot(s)),i}});function TH(e,r,t){for(var n=Is(e,r,!1),s=r.sizeMultiplier/t.sizeMultiplier,o=0;o{var t=r.havingSize(e.size);return TH(e.body,t,r)};gt({type:"sizing",names:RR,props:{numArgs:0,allowedInText:!0},handler:(e,r)=>{var{breakOnTokenText:t,funcName:n,parser:s}=e,o=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:RR.indexOf(n)+1,body:o}},htmlBuilder:UFn,mathmlBuilder:(e,r)=>{var t=r.havingSize(e.size),n=Za(e.body,t),s=new rt("mstyle",n);return s.setAttribute("mathsize",ot(t.sizeMultiplier)),s}});gt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,r,t)=>{var{parser:n}=e,s=!1,o=!1,a=t[0]&&br(t[0],"ordgroup");if(a)for(var i,c=0;c{var t=Qe([],[Yr(e.body,r)]);if(!e.smashHeight&&!e.smashDepth)return t;if(e.smashHeight&&(t.height=0),e.smashDepth&&(t.depth=0),e.smashHeight&&e.smashDepth)return Qe(["mord","smash"],[t],r);if(t.children)for(var n=0;n{var t=new rt("mpadded",[bn(e.body,r)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});gt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,r,t){var{parser:n}=e,s=t[0],o=r[0];return{type:"sqrt",mode:n.mode,body:o,index:s}},htmlBuilder(e,r){var t=Yr(e.body,r.havingCrampedStyle());t.height===0&&(t.height=r.fontMetrics().xHeight),t=up(t,r);var n=r.fontMetrics(),s=n.defaultRuleThickness,o=s;r.style.idt.height+t.depth+a&&(a=(a+_-t.height-t.depth)/2);var p=c.height-t.height-a-u;t.style.paddingLeft=ot(d);var m=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:c},{type:"kern",size:u}]});if(e.index){var k=r.havingStyle(ir.SCRIPTSCRIPT),x=Yr(e.index,k,r),v=.6*(m.height-m.depth),b=Qr({positionType:"shift",positionData:-v,children:[{type:"elem",elem:x}]}),w=Qe(["root"],[b]);return Qe(["mord","sqrt"],[w,m],r)}else return Qe(["mord","sqrt"],[m],r)},mathmlBuilder(e,r){var{body:t,index:n}=e;return n?new rt("mroot",[bn(t,r),bn(n,r)]):new rt("msqrt",[bn(t,r)])}});var T5={display:ir.DISPLAY,text:ir.TEXT,script:ir.SCRIPT,scriptscript:ir.SCRIPTSCRIPT};function GFn(e){return e in T5}gt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,r){var{breakOnTokenText:t,funcName:n,parser:s}=e,o=s.parseExpression(!0,t),a=n.slice(1,n.length-5);if(!GFn(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:o}},htmlBuilder(e,r){var t=T5[e.style],n=r.havingStyle(t);return e.resetFont&&(n=n.withFont("")),TH(e.body,n,r)},mathmlBuilder(e,r){var t=T5[e.style],n=r.havingStyle(t);e.resetFont&&(n=n.withFont(""));var s=Za(e.body,n),o=new rt("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},i=a[e.style];return o.setAttribute("scriptlevel",i[0]),o.setAttribute("displaystyle",i[1]),o}});var WFn=function(r,t){var n=r.base;if(n)if(n.type==="op"){var s=n.limits&&(t.style.size===ir.DISPLAY.size||n.alwaysHandleSupSub);return s?Tp:null}else if(n.type==="operatorname"){var o=n.alwaysHandleSupSub&&(t.style.size===ir.DISPLAY.size||n.limits);return o?AH:null}else{if(n.type==="accent")return uu(n.base)?q6:null;if(n.type==="horizBrace"){var a=!r.sub;return a===n.isOver?zH:null}else return null}else return null};kd({type:"supsub",htmlBuilder(e,r){var t=WFn(e,r);if(t)return t(e,r);var{base:n,sup:s,sub:o}=e,a=Yr(n,r),i,c,u=r.fontMetrics(),d=0,_=0,p=n&&uu(n);if(s){var m=r.havingStyle(r.style.sup());i=Yr(s,m,r),p||(d=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/r.sizeMultiplier)}if(o){var k=r.havingStyle(r.style.sub());c=Yr(o,k,r),p||(_=a.depth+k.fontMetrics().subDrop*k.sizeMultiplier/r.sizeMultiplier)}var x;r.style===ir.DISPLAY?x=u.sup1:r.style.cramped?x=u.sup3:x=u.sup2;var v=r.sizeMultiplier,b=ot(.5/u.ptPerEm/v),w=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof Ka||y){var S;w=ot(-((S=a.italic)!=null?S:0))}}var z;if(i&&c){d=Math.max(d,x,i.depth+.25*u.xHeight),_=Math.max(_,u.sub2);var N=u.defaultRuleThickness,A=4*N;if(d-i.depth-(c.height-_)0&&(d+=E,_-=E)}var M=[{type:"elem",elem:c,shift:_,marginRight:b,marginLeft:w},{type:"elem",elem:i,shift:-d,marginRight:b}];z=Qr({positionType:"individualShift",children:M})}else if(c){_=Math.max(_,u.sub1,c.height-.8*u.xHeight);var $=[{type:"elem",elem:c,marginLeft:w,marginRight:b}];z=Qr({positionType:"shift",positionData:_,children:$})}else if(i)d=Math.max(d,x,i.depth+.25*u.xHeight),z=Qr({positionType:"shift",positionData:-d,children:[{type:"elem",elem:i,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var D=C5(a,"right")||"mord";return Qe([D],[a,Qe(["msupsub"],[z])],r)},mathmlBuilder(e,r){var t=!1,n,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(t=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var o=[bn(e.base,r)];e.sub&&o.push(bn(e.sub,r)),e.sup&&o.push(bn(e.sup,r));var a;if(t)a=n?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&r.style===ir.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(r.style===ir.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(r.style===ir.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||r.style===ir.DISPLAY)?a="munder":a="msub"}else{var i=e.base;i&&i.type==="op"&&i.limits&&(r.style===ir.DISPLAY||i.alwaysHandleSupSub)||i&&i.type==="operatorname"&&i.alwaysHandleSupSub&&(i.limits||r.style===ir.DISPLAY)?a="mover":a="msup"}return new rt(a,o)}});kd({type:"atom",htmlBuilder(e,r){return P6(e.text,e.mode,r,["m"+e.family])},mathmlBuilder(e,r){var t=new rt("mo",[zi(e.text,e.mode)]);if(e.family==="bin"){var n=H6(e,r);n==="bold-italic"&&t.setAttribute("mathvariant",n)}else e.family==="punct"?t.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&t.setAttribute("stretchy","false");return t}});var RH={mi:"italic",mn:"normal",mtext:"normal"};kd({type:"mathord",htmlBuilder(e,r){return lx(e,r,"mathord")},mathmlBuilder(e,r){var t=new rt("mi",[zi(e.text,e.mode,r)]),n=H6(e,r)||"italic";return n!==RH[t.type]&&t.setAttribute("mathvariant",n),t}});kd({type:"textord",htmlBuilder(e,r){return lx(e,r,"textord")},mathmlBuilder(e,r){var t=zi(e.text,e.mode,r),n=H6(e,r)||"normal",s;return e.mode==="text"?s=new rt("mtext",[t]):/[0-9]/.test(e.text)?s=new rt("mn",[t]):e.text==="\\prime"?s=new rt("mo",[t]):s=new rt("mi",[t]),n!==RH[s.type]&&s.setAttribute("mathvariant",n),s}});var Tk={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Rk={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};kd({type:"spacing",htmlBuilder(e,r){if(Rk.hasOwnProperty(e.text)){var t=Rk[e.text].className||"";if(e.mode==="text"){var n=lx(e,r,"textord");return n.classes.push(t),n}else return Qe(["mspace",t],[P6(e.text,e.mode,r)],r)}else{if(Tk.hasOwnProperty(e.text))return Qe(["mspace",Tk[e.text]],[],r);throw new tt('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,r){var t;if(Rk.hasOwnProperty(e.text))t=new rt("mtext",[new Cs(" ")]);else{if(Tk.hasOwnProperty(e.text))return new rt("mspace");throw new tt('Unknown type of space "'+e.text+'"')}return t}});var MR=()=>{var e=new rt("mtd",[]);return e.setAttribute("width","50%"),e};kd({type:"tag",mathmlBuilder(e,r){var t=new rt("mtable",[new rt("mtr",[MR(),new rt("mtd",[C_(e.body,r)]),MR(),new rt("mtd",[C_(e.tag,r)])])]);return t.setAttribute("width","100%"),t}});var OR={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},$R={"\\textbf":"textbf","\\textmd":"textmd"},KFn={"\\textit":"textit","\\textup":"textup"},DR=(e,r)=>{var t=e.font;if(t){if(OR[t])return r.withTextFontFamily(OR[t]);if($R[t])return r.withTextFontWeight($R[t]);if(t==="\\emph")return r.fontShape==="textit"?r.withTextFontShape("textup"):r.withTextFontShape("textit")}else return r;return r.withTextFontShape(KFn[t])};gt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"text",mode:t.mode,body:Ss(s),font:n}},htmlBuilder(e,r){var t=DR(e,r),n=Is(e.body,t,!0);return Qe(["mord","text"],n,t)},mathmlBuilder(e,r){var t=DR(e,r);return C_(e.body,t)}});gt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"underline",mode:t.mode,body:r[0]}},htmlBuilder(e,r){var t=Yr(e.body,r),n=lp("underline-line",r),s=r.fontMetrics().defaultRuleThickness,o=Qr({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Qe(["mord","underline"],[o],r)},mathmlBuilder(e,r){var t=new rt("mo",[new Cs("‾")]);t.setAttribute("stretchy","true");var n=new rt("munder",[bn(e.body,r),t]);return n.setAttribute("accentunder","true"),n}});gt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,r){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:r[0]}},htmlBuilder(e,r){var t=Yr(e.body,r),n=r.fontMetrics().axisHeight,s=.5*(t.height-n-(t.depth+n));return Qr({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,r){var t=new rt("mpadded",[bn(e.body,r)],["vcenter"]);return new rt("mrow",[t])}});gt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,r,t){throw new tt("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,r){for(var t=LR(e),n=[],s=r.havingStyle(r.style.text()),o=0;oe.body.replace(/ /g,e.star?"␣":" "),p_=JF,MH=`[ \r ]`,VFn="\\\\[a-zA-Z@]+",QFn="\\\\[^\uD800-\uDFFF]",XFn="("+VFn+")"+MH+"*",YFn=`\\\\( |[ \r ]+ ?)[ \r ]*`,R5="[̀-ͯ]",ZFn=new RegExp(R5+"+$"),JFn="("+MH+"+)|"+(YFn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(R5+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(R5+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+XFn)+("|"+QFn+")");class IR{constructor(r,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=r,this.settings=t,this.tokenRegex=new RegExp(JFn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(r,t){this.catcodes[r]=t}lex(){var r=this.input,t=this.tokenRegex.lastIndex;if(t===r.length)return new Ua("EOF",new pa(this,t,t));var n=this.tokenRegex.exec(r);if(n===null||n.index!==t)throw new tt("Unexpected character: '"+r[t]+"'",new Ua(r[t],new pa(this,t,t+1)));var s=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[s]===14){var o=r.indexOf(` `,this.tokenRegex.lastIndex);return o===-1?(this.tokenRegex.lastIndex=r.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new Ua(s,new pa(this,t,this.tokenRegex.lastIndex))}}class eHn{constructor(r,t){r===void 0&&(r={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=r,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new tt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var r=this.undefStack.pop();for(var t in r)r.hasOwnProperty(t)&&(r[t]==null?delete this.current[t]:this.current[t]=r[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(r){return this.current.hasOwnProperty(r)||this.builtins.hasOwnProperty(r)}get(r){return this.current.hasOwnProperty(r)?this.current[r]:this.builtins[r]}set(r,t,n){if(n===void 0&&(n=!1),n){for(var s=0;s0&&(this.undefStack[this.undefStack.length-1][r]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(r)&&(o[r]=this.current[r])}t==null?delete this.current[r]:this.current[r]=t}}var tHn=wH;se("\\noexpand",function(e){var r=e.popToken();return e.isExpandable(r.text)&&(r.noexpand=!0,r.treatAsRelax=!0),{tokens:[r],numArgs:0}});se("\\expandafter",function(e){var r=e.popToken();return e.expandOnce(!0),{tokens:[r],numArgs:0}});se("\\@firstoftwo",function(e){var r=e.consumeArgs(2);return{tokens:r[0],numArgs:0}});se("\\@secondoftwo",function(e){var r=e.consumeArgs(2);return{tokens:r[1],numArgs:0}});se("\\@ifnextchar",function(e){var r=e.consumeArgs(3);e.consumeSpaces();var t=e.future();return r[0].length===1&&r[0][0].text===t.text?{tokens:r[1],numArgs:0}:{tokens:r[2],numArgs:0}});se("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");se("\\TextOrMath",function(e){var r=e.consumeArgs(2);return e.mode==="text"?{tokens:r[0],numArgs:0}:{tokens:r[1],numArgs:0}});var PR={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};se("\\char",function(e){var r=e.popToken(),t,n=0;if(r.text==="'")t=8,r=e.popToken();else if(r.text==='"')t=16,r=e.popToken();else if(r.text==="`")if(r=e.popToken(),r.text[0]==="\\")n=r.text.charCodeAt(1);else{if(r.text==="EOF")throw new tt("\\char` missing argument");n=r.text.charCodeAt(0)}else t=10;if(t){if(n=PR[r.text],n==null||n>=t)throw new tt("Invalid base-"+t+" digit "+r.text);for(var s;(s=PR[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new tt("\\newcommand's first argument must be a macro name");var o=s[0].text,a=e.isDefined(o);if(a&&!r)throw new tt("\\newcommand{"+o+"} attempting to redefine "+(o+"; use \\renewcommand"));if(!a&&!t)throw new tt("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var i=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var c="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)c+=u.text,u=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new tt("Invalid number of arguments: "+c);i=parseInt(c),s=e.consumeArg().tokens}return a&&n||e.macros.set(o,{tokens:s,numArgs:i}),""};se("\\newcommand",e=>K6(e,!1,!0,!1));se("\\renewcommand",e=>K6(e,!0,!1,!1));se("\\providecommand",e=>K6(e,!0,!0,!0));se("\\message",e=>{var r=e.consumeArgs(1)[0];return console.log(r.reverse().map(t=>t.text).join("")),""});se("\\errmessage",e=>{var r=e.consumeArgs(1)[0];return console.error(r.reverse().map(t=>t.text).join("")),""});se("\\show",e=>{var r=e.popToken(),t=r.text;return console.log(r,e.macros.get(t),p_[t],$n.math[t],$n.text[t]),""});se("\\bgroup","{");se("\\egroup","}");se("~","\\nobreakspace");se("\\lq","`");se("\\rq","'");se("\\aa","\\r a");se("\\AA","\\r A");se("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");se("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");se("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");se("ℬ","\\mathscr{B}");se("ℰ","\\mathscr{E}");se("ℱ","\\mathscr{F}");se("ℋ","\\mathscr{H}");se("ℐ","\\mathscr{I}");se("ℒ","\\mathscr{L}");se("ℳ","\\mathscr{M}");se("ℛ","\\mathscr{R}");se("ℭ","\\mathfrak{C}");se("ℌ","\\mathfrak{H}");se("ℨ","\\mathfrak{Z}");se("\\Bbbk","\\Bbb{k}");se("\\llap","\\mathllap{\\textrm{#1}}");se("\\rlap","\\mathrlap{\\textrm{#1}}");se("\\clap","\\mathclap{\\textrm{#1}}");se("\\mathstrut","\\vphantom{(}");se("\\underbar","\\underline{\\text{#1}}");se("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');se("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");se("\\ne","\\neq");se("≠","\\neq");se("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");se("∉","\\notin");se("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");se("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");se("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");se("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");se("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");se("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");se("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");se("⟂","\\perp");se("‼","\\mathclose{!\\mkern-0.8mu!}");se("∌","\\notni");se("⌜","\\ulcorner");se("⌝","\\urcorner");se("⌞","\\llcorner");se("⌟","\\lrcorner");se("©","\\copyright");se("®","\\textregistered");se("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');se("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');se("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');se("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');se("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");se("⋮","\\vdots");se("\\varGamma","\\mathit{\\Gamma}");se("\\varDelta","\\mathit{\\Delta}");se("\\varTheta","\\mathit{\\Theta}");se("\\varLambda","\\mathit{\\Lambda}");se("\\varXi","\\mathit{\\Xi}");se("\\varPi","\\mathit{\\Pi}");se("\\varSigma","\\mathit{\\Sigma}");se("\\varUpsilon","\\mathit{\\Upsilon}");se("\\varPhi","\\mathit{\\Phi}");se("\\varPsi","\\mathit{\\Psi}");se("\\varOmega","\\mathit{\\Omega}");se("\\substack","\\begin{subarray}{c}#1\\end{subarray}");se("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");se("\\boxed","\\fbox{$\\displaystyle{#1}$}");se("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");se("\\implies","\\DOTSB\\;\\Longrightarrow\\;");se("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");se("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");se("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var BR={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},rHn=new Set(["bin","rel"]);se("\\dots",function(e){var r="\\dotso",t=e.expandAfterFuture().text;return t in BR?r=BR[t]:(t.slice(0,4)==="\\not"||t in $n.math&&rHn.has($n.math[t].group))&&(r="\\dotsb"),r});var V6={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};se("\\dotso",function(e){var r=e.future().text;return r in V6?"\\ldots\\,":"\\ldots"});se("\\dotsc",function(e){var r=e.future().text;return r in V6&&r!==","?"\\ldots\\,":"\\ldots"});se("\\cdots",function(e){var r=e.future().text;return r in V6?"\\@cdots\\,":"\\@cdots"});se("\\dotsb","\\cdots");se("\\dotsm","\\cdots");se("\\dotsi","\\!\\cdots");se("\\dotsx","\\ldots\\,");se("\\DOTSI","\\relax");se("\\DOTSB","\\relax");se("\\DOTSX","\\relax");se("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");se("\\,","\\tmspace+{3mu}{.1667em}");se("\\thinspace","\\,");se("\\>","\\mskip{4mu}");se("\\:","\\tmspace+{4mu}{.2222em}");se("\\medspace","\\:");se("\\;","\\tmspace+{5mu}{.2777em}");se("\\thickspace","\\;");se("\\!","\\tmspace-{3mu}{.1667em}");se("\\negthinspace","\\!");se("\\negmedspace","\\tmspace-{4mu}{.2222em}");se("\\negthickspace","\\tmspace-{5mu}{.277em}");se("\\enspace","\\kern.5em ");se("\\enskip","\\hskip.5em\\relax");se("\\quad","\\hskip1em\\relax");se("\\qquad","\\hskip2em\\relax");se("\\tag","\\@ifstar\\tag@literal\\tag@paren");se("\\tag@paren","\\tag@literal{({#1})}");se("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new tt("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});se("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");se("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");se("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");se("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");se("\\newline","\\\\\\relax");se("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var OH=ot(Dc["Main-Regular"][84][1]-.7*Dc["Main-Regular"][65][1]);se("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+OH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");se("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+OH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");se("\\hspace","\\@ifstar\\@hspacer\\@hspace");se("\\@hspace","\\hskip #1\\relax");se("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");se("\\ordinarycolon",":");se("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");se("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');se("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');se("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');se("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');se("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');se("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');se("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');se("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');se("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');se("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');se("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');se("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');se("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');se("∷","\\dblcolon");se("∹","\\eqcolon");se("≔","\\coloneqq");se("≕","\\eqqcolon");se("⩴","\\Coloneqq");se("\\ratio","\\vcentcolon");se("\\coloncolon","\\dblcolon");se("\\colonequals","\\coloneqq");se("\\coloncolonequals","\\Coloneqq");se("\\equalscolon","\\eqqcolon");se("\\equalscoloncolon","\\Eqqcolon");se("\\colonminus","\\coloneq");se("\\coloncolonminus","\\Coloneq");se("\\minuscolon","\\eqcolon");se("\\minuscoloncolon","\\Eqcolon");se("\\coloncolonapprox","\\Colonapprox");se("\\coloncolonsim","\\Colonsim");se("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");se("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");se("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");se("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");se("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");se("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");se("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");se("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");se("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");se("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");se("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");se("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");se("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");se("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");se("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");se("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");se("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");se("\\nleqq","\\html@mathml{\\@nleqq}{≰}");se("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");se("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");se("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");se("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");se("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");se("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");se("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");se("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");se("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");se("\\imath","\\html@mathml{\\@imath}{ı}");se("\\jmath","\\html@mathml{\\@jmath}{ȷ}");se("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");se("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");se("⟦","\\llbracket");se("⟧","\\rrbracket");se("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");se("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");se("⦃","\\lBrace");se("⦄","\\rBrace");se("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");se("⦵","\\minuso");se("\\darr","\\downarrow");se("\\dArr","\\Downarrow");se("\\Darr","\\Downarrow");se("\\lang","\\langle");se("\\rang","\\rangle");se("\\uarr","\\uparrow");se("\\uArr","\\Uparrow");se("\\Uarr","\\Uparrow");se("\\N","\\mathbb{N}");se("\\R","\\mathbb{R}");se("\\Z","\\mathbb{Z}");se("\\alef","\\aleph");se("\\alefsym","\\aleph");se("\\Alpha","\\mathrm{A}");se("\\Beta","\\mathrm{B}");se("\\bull","\\bullet");se("\\Chi","\\mathrm{X}");se("\\clubs","\\clubsuit");se("\\cnums","\\mathbb{C}");se("\\Complex","\\mathbb{C}");se("\\Dagger","\\ddagger");se("\\diamonds","\\diamondsuit");se("\\empty","\\emptyset");se("\\Epsilon","\\mathrm{E}");se("\\Eta","\\mathrm{H}");se("\\exist","\\exists");se("\\harr","\\leftrightarrow");se("\\hArr","\\Leftrightarrow");se("\\Harr","\\Leftrightarrow");se("\\hearts","\\heartsuit");se("\\image","\\Im");se("\\infin","\\infty");se("\\Iota","\\mathrm{I}");se("\\isin","\\in");se("\\Kappa","\\mathrm{K}");se("\\larr","\\leftarrow");se("\\lArr","\\Leftarrow");se("\\Larr","\\Leftarrow");se("\\lrarr","\\leftrightarrow");se("\\lrArr","\\Leftrightarrow");se("\\Lrarr","\\Leftrightarrow");se("\\Mu","\\mathrm{M}");se("\\natnums","\\mathbb{N}");se("\\Nu","\\mathrm{N}");se("\\Omicron","\\mathrm{O}");se("\\plusmn","\\pm");se("\\rarr","\\rightarrow");se("\\rArr","\\Rightarrow");se("\\Rarr","\\Rightarrow");se("\\real","\\Re");se("\\reals","\\mathbb{R}");se("\\Reals","\\mathbb{R}");se("\\Rho","\\mathrm{P}");se("\\sdot","\\cdot");se("\\sect","\\S");se("\\spades","\\spadesuit");se("\\sub","\\subset");se("\\sube","\\subseteq");se("\\supe","\\supseteq");se("\\Tau","\\mathrm{T}");se("\\thetasym","\\vartheta");se("\\weierp","\\wp");se("\\Zeta","\\mathrm{Z}");se("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");se("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");se("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");se("\\bra","\\mathinner{\\langle{#1}|}");se("\\ket","\\mathinner{|{#1}\\rangle}");se("\\braket","\\mathinner{\\langle{#1}\\rangle}");se("\\Bra","\\left\\langle#1\\right|");se("\\Ket","\\left|#1\\right\\rangle");var $H=e=>r=>{var t=r.consumeArg().tokens,n=r.consumeArg().tokens,s=r.consumeArg().tokens,o=r.consumeArg().tokens,a=r.macros.get("|"),i=r.macros.get("\\|");r.macros.beginGroup();var c=_=>p=>{e&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",i));var m=_;if(!_&&s.length){var k=p.future();k.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?s:n,numArgs:0}};r.macros.set("|",c(!1)),s.length&&r.macros.set("\\|",c(!0));var u=r.consumeArg().tokens,d=r.expandTokens([...o,...u,...t]);return r.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};se("\\bra@ket",$H(!1));se("\\bra@set",$H(!0));se("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");se("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");se("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");se("\\angln","{\\angl n}");se("\\blue","\\textcolor{##6495ed}{#1}");se("\\orange","\\textcolor{##ffa500}{#1}");se("\\pink","\\textcolor{##ff00af}{#1}");se("\\red","\\textcolor{##df0030}{#1}");se("\\green","\\textcolor{##28ae7b}{#1}");se("\\gray","\\textcolor{gray}{#1}");se("\\purple","\\textcolor{##9d38bd}{#1}");se("\\blueA","\\textcolor{##ccfaff}{#1}");se("\\blueB","\\textcolor{##80f6ff}{#1}");se("\\blueC","\\textcolor{##63d9ea}{#1}");se("\\blueD","\\textcolor{##11accd}{#1}");se("\\blueE","\\textcolor{##0c7f99}{#1}");se("\\tealA","\\textcolor{##94fff5}{#1}");se("\\tealB","\\textcolor{##26edd5}{#1}");se("\\tealC","\\textcolor{##01d1c1}{#1}");se("\\tealD","\\textcolor{##01a995}{#1}");se("\\tealE","\\textcolor{##208170}{#1}");se("\\greenA","\\textcolor{##b6ffb0}{#1}");se("\\greenB","\\textcolor{##8af281}{#1}");se("\\greenC","\\textcolor{##74cf70}{#1}");se("\\greenD","\\textcolor{##1fab54}{#1}");se("\\greenE","\\textcolor{##0d923f}{#1}");se("\\goldA","\\textcolor{##ffd0a9}{#1}");se("\\goldB","\\textcolor{##ffbb71}{#1}");se("\\goldC","\\textcolor{##ff9c39}{#1}");se("\\goldD","\\textcolor{##e07d10}{#1}");se("\\goldE","\\textcolor{##a75a05}{#1}");se("\\redA","\\textcolor{##fca9a9}{#1}");se("\\redB","\\textcolor{##ff8482}{#1}");se("\\redC","\\textcolor{##f9685d}{#1}");se("\\redD","\\textcolor{##e84d39}{#1}");se("\\redE","\\textcolor{##bc2612}{#1}");se("\\maroonA","\\textcolor{##ffbde0}{#1}");se("\\maroonB","\\textcolor{##ff92c6}{#1}");se("\\maroonC","\\textcolor{##ed5fa6}{#1}");se("\\maroonD","\\textcolor{##ca337c}{#1}");se("\\maroonE","\\textcolor{##9e034e}{#1}");se("\\purpleA","\\textcolor{##ddd7ff}{#1}");se("\\purpleB","\\textcolor{##c6b9fc}{#1}");se("\\purpleC","\\textcolor{##aa87ff}{#1}");se("\\purpleD","\\textcolor{##7854ab}{#1}");se("\\purpleE","\\textcolor{##543b78}{#1}");se("\\mintA","\\textcolor{##f5f9e8}{#1}");se("\\mintB","\\textcolor{##edf2df}{#1}");se("\\mintC","\\textcolor{##e0e5cc}{#1}");se("\\grayA","\\textcolor{##f6f7f7}{#1}");se("\\grayB","\\textcolor{##f0f1f2}{#1}");se("\\grayC","\\textcolor{##e3e5e6}{#1}");se("\\grayD","\\textcolor{##d6d8da}{#1}");se("\\grayE","\\textcolor{##babec2}{#1}");se("\\grayF","\\textcolor{##888d93}{#1}");se("\\grayG","\\textcolor{##626569}{#1}");se("\\grayH","\\textcolor{##3b3e40}{#1}");se("\\grayI","\\textcolor{##21242c}{#1}");se("\\kaBlue","\\textcolor{##314453}{#1}");se("\\kaGreen","\\textcolor{##71B307}{#1}");var DH={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class nHn{constructor(r,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(r),this.macros=new eHn(tHn,t.macros),this.mode=n,this.stack=[]}feed(r){this.lexer=new IR(r,this.settings)}switchMode(r){this.mode=r}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(r){this.stack.push(r)}pushTokens(r){this.stack.push(...r)}scanArgument(r){var t,n,s;if(r){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:s,end:n}=this.consumeArg(["]"])}else({tokens:s,start:t,end:n}=this.consumeArg());return this.pushToken(new Ua("EOF",n.loc)),this.pushTokens(s),new Ua("",pa.range(t,n))}consumeSpaces(){for(;;){var r=this.future();if(r.text===" ")this.stack.pop();else break}}consumeArg(r){var t=[],n=r&&r.length>0;n||this.consumeSpaces();var s=this.future(),o,a=0,i=0;do{if(o=this.popToken(),t.push(o),o.text==="{")++a;else if(o.text==="}"){if(--a,a===-1)throw new tt("Extra }",o)}else if(o.text==="EOF")throw new tt("Unexpected end of input in a macro argument, expected '"+(r&&n?r[i]:"}")+"'",o);if(r&&n)if((a===0||a===1&&r[i]==="{")&&o.text===r[i]){if(++i,i===r.length){t.splice(-i,i);break}}else i=0}while(a!==0||n);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:o}}consumeArgs(r,t){if(t){if(t.length!==r+1)throw new tt("The length of delimiters doesn't match the number of args!");for(var n=t[0],s=0;sthis.settings.maxExpand)throw new tt("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(r){var t=this.popToken(),n=t.text,s=t.noexpand?null:this._getExpansion(n);if(s==null||r&&s.unexpandable){if(r&&s==null&&n[0]==="\\"&&!this.isDefined(n))throw new tt("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var o=s.tokens,a=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){o=o.slice();for(var i=o.length-1;i>=0;--i){var c=o[i];if(c.text==="#"){if(i===0)throw new tt("Incomplete placeholder at end of macro body",c);if(c=o[--i],c.text==="#")o.splice(i+1,1);else if(/^[1-9]$/.test(c.text))o.splice(i,2,...a[+c.text-1]);else throw new tt("Not a valid argument number",c)}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var r=this.stack.pop();return r.treatAsRelax&&(r.text="\\relax"),r}}expandMacro(r){return this.macros.has(r)?this.expandTokens([new Ua(r)]):void 0}expandTokens(r){var t=[],n=this.stack.length;for(this.pushTokens(r);this.stack.length>n;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),t.push(s)}return this.countExpansion(t.length),t}expandMacroAsText(r){var t=this.expandMacro(r);return t&&t.map(n=>n.text).join("")}_getExpansion(r){var t=this.macros.get(r);if(t==null)return t;if(r.length===1){var n=this.lexer.catcodes[r];if(n!=null&&n!==13)return}var s=typeof t=="function"?t(this):t;if(typeof s=="string"){var o=0;if(s.includes("#"))for(var a=s.replace(/##/g,"");a.includes("#"+(o+1));)++o;for(var i=new IR(s,this.settings),c=[],u=i.lex();u.text!=="EOF";)c.push(u),u=i.lex();c.reverse();var d={tokens:c,numArgs:o};return d}return s}isDefined(r){return this.macros.has(r)||p_.hasOwnProperty(r)||$n.math.hasOwnProperty(r)||$n.text.hasOwnProperty(r)||DH.hasOwnProperty(r)}isExpandable(r){var t=this.macros.get(r);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:p_.hasOwnProperty(r)&&!p_[r].primitive}}var FR=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,_1=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Mk={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},HR={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class bx{constructor(r,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new nHn(r,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(r,t){if(t===void 0&&(t=!0),this.fetch().text!==r)throw new tt("Expected '"+r+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(r){this.mode=r,this.gullet.switchMode(r)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var r=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),r}finally{this.gullet.endGroups()}}subparse(r){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Ua("}")),this.gullet.pushTokens(r);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(r,t){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(bx.endOfExpression.has(s.text)||t&&s.text===t||r&&p_[s.text]&&p_[s.text].infix)break;var o=this.parseAtom(t);if(o){if(o.type==="internal")continue}else break;n.push(o)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(r){for(var t=-1,n,s=0;s=128)this.settings.strict&&(qF(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',r):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),r)),a={type:"textord",mode:"text",loc:pa.range(r),text:t};else return null;if(this.consume(),o)for(var d=0;d0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=S+1:(k!==S&&x.push({type:"text",value:u.value.slice(k,S)}),Array.isArray(E)?x.push(...E):E&&x.push(E),k=S+y[0].length,b=!0),!p.global)break;y=p.exec(u.value)}return b?(k?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let t=r[0],n=t.indexOf(")");const s=UR(e,"(");let o=UR(e,")");for(;n!==-1&&s>o;)e+=t.slice(0,n+1),t=t.slice(n+1),n=t.indexOf(")"),o++;return[e,t]}function BH(e,r){const t=e.input.charCodeAt(e.index-1);return(e.index===0||ed(t)||ex(t))&&(!r||t!==47)}FH.peek=DHn;function EHn(){this.buffer()}function NHn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function AHn(){this.buffer()}function THn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function RHn(e){const r=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ji(this.sliceSerialize(e)).toLowerCase(),t.label=r}function MHn(e){this.exit(e)}function OHn(e){const r=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ji(this.sliceSerialize(e)).toLowerCase(),t.label=r}function $Hn(e){this.exit(e)}function DHn(){return"["}function FH(e,r,t,n){const s=t.createTracker(n);let o=s.move("[^");const a=t.enter("footnoteReference"),i=t.enter("reference");return o+=s.move(t.safe(t.associationId(e),{after:"]",before:o})),i(),a(),o+=s.move("]"),o}function LHn(){return{enter:{gfmFootnoteCallString:EHn,gfmFootnoteCall:NHn,gfmFootnoteDefinitionLabelString:AHn,gfmFootnoteDefinition:THn},exit:{gfmFootnoteCallString:RHn,gfmFootnoteCall:MHn,gfmFootnoteDefinitionLabelString:OHn,gfmFootnoteDefinition:$Hn}}}function IHn(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:t,footnoteReference:FH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(n,s,o,a){const i=o.createTracker(a);let c=i.move("[^");const u=o.enter("footnoteDefinition"),d=o.enter("label");return c+=i.move(o.safe(o.associationId(n),{before:c,after:"]"})),d(),c+=i.move("]:"),n.children&&n.children.length>0&&(i.shift(4),c+=i.move((r?` -`:" ")+o.indentLines(o.containerFlow(n,i.current()),r?HH:PHn))),u(),c}}function PHn(e,r,t){return r===0?e:HH(e,r,t)}function HH(e,r,t){return(t?"":" ")+e}const BHn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qH.peek=GHn;function FHn(){return{canContainEols:["delete"],enter:{strikethrough:qHn},exit:{strikethrough:UHn}}}function HHn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:BHn}],handlers:{delete:qH}}}function qHn(e){this.enter({type:"delete",children:[]},e)}function UHn(e){this.exit(e)}function qH(e,r,t,n){const s=t.createTracker(n),o=t.enter("strikethrough");let a=s.move("~~");return a+=t.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),o(),a}function GHn(){return"~"}function WHn(e){return e.length}function KHn(e,r){const t=r||{},n=(t.align||[]).concat(),s=t.stringLength||WHn,o=[],a=[],i=[],c=[];let u=0,d=-1;for(;++du&&(u=e[d].length);++bc[b])&&(c[b]=y)}w.push(x)}a[d]=w,i[d]=v}let _=-1;if(typeof n=="object"&&"length"in n)for(;++_c[_]&&(c[_]=x),m[_]=x),p[_]=y}a.splice(1,0,p),i.splice(1,0,m),d=-1;const k=[];for(;++d=128)this.settings.strict&&(qF(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',r):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),r)),a={type:"textord",mode:"text",loc:pa.range(r),text:t};else return null;if(this.consume(),o)for(var d=0;d0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=S+1:(k!==S&&w.push({type:"text",value:u.value.slice(k,S)}),Array.isArray(N)?w.push(...N):N&&w.push(N),k=S+y[0].length,b=!0),!p.global)break;y=p.exec(u.value)}return b?(k?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let t=r[0],n=t.indexOf(")");const s=UR(e,"(");let o=UR(e,")");for(;n!==-1&&s>o;)e+=t.slice(0,n+1),t=t.slice(n+1),n=t.indexOf(")"),o++;return[e,t]}function BH(e,r){const t=e.input.charCodeAt(e.index-1);return(e.index===0||ed(t)||ex(t))&&(!r||t!==47)}FH.peek=DHn;function EHn(){this.buffer()}function NHn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function AHn(){this.buffer()}function THn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function RHn(e){const r=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ji(this.sliceSerialize(e)).toLowerCase(),t.label=r}function MHn(e){this.exit(e)}function OHn(e){const r=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ji(this.sliceSerialize(e)).toLowerCase(),t.label=r}function $Hn(e){this.exit(e)}function DHn(){return"["}function FH(e,r,t,n){const s=t.createTracker(n);let o=s.move("[^");const a=t.enter("footnoteReference"),i=t.enter("reference");return o+=s.move(t.safe(t.associationId(e),{after:"]",before:o})),i(),a(),o+=s.move("]"),o}function LHn(){return{enter:{gfmFootnoteCallString:EHn,gfmFootnoteCall:NHn,gfmFootnoteDefinitionLabelString:AHn,gfmFootnoteDefinition:THn},exit:{gfmFootnoteCallString:RHn,gfmFootnoteCall:MHn,gfmFootnoteDefinitionLabelString:OHn,gfmFootnoteDefinition:$Hn}}}function IHn(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:t,footnoteReference:FH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(n,s,o,a){const i=o.createTracker(a);let c=i.move("[^");const u=o.enter("footnoteDefinition"),d=o.enter("label");return c+=i.move(o.safe(o.associationId(n),{before:c,after:"]"})),d(),c+=i.move("]:"),n.children&&n.children.length>0&&(i.shift(4),c+=i.move((r?` +`:" ")+o.indentLines(o.containerFlow(n,i.current()),r?HH:PHn))),u(),c}}function PHn(e,r,t){return r===0?e:HH(e,r,t)}function HH(e,r,t){return(t?"":" ")+e}const BHn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qH.peek=GHn;function FHn(){return{canContainEols:["delete"],enter:{strikethrough:qHn},exit:{strikethrough:UHn}}}function HHn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:BHn}],handlers:{delete:qH}}}function qHn(e){this.enter({type:"delete",children:[]},e)}function UHn(e){this.exit(e)}function qH(e,r,t,n){const s=t.createTracker(n),o=t.enter("strikethrough");let a=s.move("~~");return a+=t.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),o(),a}function GHn(){return"~"}function WHn(e){return e.length}function KHn(e,r){const t=r||{},n=(t.align||[]).concat(),s=t.stringLength||WHn,o=[],a=[],i=[],c=[];let u=0,d=-1;for(;++du&&(u=e[d].length);++bc[b])&&(c[b]=y)}x.push(w)}a[d]=x,i[d]=v}let _=-1;if(typeof n=="object"&&"length"in n)for(;++_c[_]&&(c[_]=w),m[_]=w),p[_]=y}a.splice(1,0,p),i.splice(1,0,m),d=-1;const k=[];for(;++d "),o.shift(2);const a=t.indentLines(t.containerFlow(e,o.current()),XHn);return s(),a}function XHn(e,r,t){return">"+(t?"":" ")+e}function YHn(e,r){return WR(e,r.inConstruct,!0)&&!WR(e,r.notInConstruct,!1)}function WR(e,r,t){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return t;let n=-1;for(;++na&&(a=o):o=1,s=n+r.length,n=t.indexOf(r,s);return a}function ZHn(e,r){return!!(r.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function JHn(e){const r=e.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function eqn(e,r,t,n){const s=JHn(t),o=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(ZHn(e,t)){const _=t.enter("codeIndented"),p=t.indentLines(o,tqn);return _(),p}const i=t.createTracker(n),c=s.repeat(Math.max(UH(o,s)+1,3)),u=t.enter("codeFenced");let d=i.move(c);if(e.lang){const _=t.enter(`codeFencedLang${a}`);d+=i.move(t.safe(e.lang,{before:d,after:" ",encode:["`"],...i.current()})),_()}if(e.lang&&e.meta){const _=t.enter(`codeFencedMeta${a}`);d+=i.move(" "),d+=i.move(t.safe(e.meta,{before:d,after:` @@ -1068,20 +1068,20 @@ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, `+(s===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` `))+1))}const a="#".repeat(s),i=t.enter("headingAtx"),c=t.enter("phrasing");o.move(a+" ");let u=t.containerPhrasing(e,{before:"# ",after:` `,...o.current()});return/^[\t ]/.test(u)&&(u=Ng(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),c(),i(),u}WH.peek=iqn;function WH(e){return e.value||""}function iqn(){return"<"}KH.peek=cqn;function KH(e,r,t,n){const s=Y6(t),o=s==='"'?"Quote":"Apostrophe",a=t.enter("image");let i=t.enter("label");const c=t.createTracker(n);let u=c.move("![");return u+=c.move(t.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),i(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(i=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(i=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),i(),e.title&&(i=t.enter(`title${o}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),i()),u+=c.move(")"),a(),u}function cqn(){return"!"}VH.peek=lqn;function VH(e,r,t,n){const s=e.referenceType,o=t.enter("imageReference");let a=t.enter("label");const i=t.createTracker(n);let c=i.move("![");const u=t.safe(e.alt,{before:c,after:"]",...i.current()});c+=i.move(u+"]["),a();const d=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...i.current()});return a(),t.stack=d,o(),s==="full"||!u||u!==_?c+=i.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=i.move("]"),c}function lqn(){return"!"}QH.peek=uqn;function QH(e,r,t){let n=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(n);)s+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o\u007F]/.test(e.url))}YH.peek=_qn;function YH(e,r,t,n){const s=Y6(t),o=s==='"'?"Quote":"Apostrophe",a=t.createTracker(n);let i,c;if(XH(e,t)){const d=t.stack;t.stack=[],i=t.enter("autolink");let _=a.move("<");return _+=a.move(t.containerPhrasing(e,{before:_,after:">",...a.current()})),_+=a.move(">"),i(),t.stack=d,_}i=t.enter("link"),c=t.enter("label");let u=a.move("[");return u+=a.move(t.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(t.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=t.enter("destinationRaw"),u+=a.move(t.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=t.enter(`title${o}`),u+=a.move(" "+s),u+=a.move(t.safe(e.title,{before:u,after:s,...a.current()})),u+=a.move(s),c()),u+=a.move(")"),i(),u}function _qn(e,r,t){return XH(e,t)?"<":"["}ZH.peek=fqn;function ZH(e,r,t,n){const s=e.referenceType,o=t.enter("linkReference");let a=t.enter("label");const i=t.createTracker(n);let c=i.move("[");const u=t.containerPhrasing(e,{before:c,after:"]",...i.current()});c+=i.move(u+"]["),a();const d=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...i.current()});return a(),t.stack=d,o(),s==="full"||!u||u!==_?c+=i.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=i.move("]"),c}function fqn(){return"["}function Z6(e){const r=e.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function dqn(e){const r=Z6(e),t=e.options.bulletOther;if(!t)return r==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+t+"`) to be different");return t}function hqn(e){const r=e.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function JH(e){const r=e.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function pqn(e,r,t,n){const s=t.enter("list"),o=t.bulletCurrent;let a=e.ordered?hqn(t):Z6(t);const i=e.ordered?a==="."?")":".":dqn(t);let c=r&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),JH(t)===a&&d){let _=-1;for(;++_-1?r.start:1)+(t.options.incrementListMarker===!1?0:r.children.indexOf(e))+o);let a=o.length+1;(s==="tab"||s==="mixed"&&(r&&r.type==="list"&&r.spread||e.spread))&&(a=Math.ceil(a/4)*4);const i=t.createTracker(n);i.move(o+" ".repeat(a-o.length)),i.shift(a);const c=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,i.current()),d);return c(),u;function d(_,p,m){return p?(m?"":" ".repeat(a))+_:(m?o:o+" ".repeat(a-o.length))+_}}function vqn(e,r,t,n){const s=t.enter("paragraph"),o=t.enter("phrasing"),a=t.containerPhrasing(e,n);return o(),s(),a}const bqn=w0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function yqn(e,r,t,n){return(e.children.some(function(a){return bqn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,n)}function xqn(e){const r=e.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}eq.peek=wqn;function eq(e,r,t,n){const s=xqn(t),o=t.enter("strong"),a=t.createTracker(n),i=a.move(s+s);let c=a.move(t.containerPhrasing(e,{after:s,before:i,...a.current()}));const u=c.charCodeAt(0),d=Vb(n.before.charCodeAt(n.before.length-1),u,s);d.inside&&(c=Ng(u)+c.slice(1));const _=c.charCodeAt(c.length-1),p=Vb(n.after.charCodeAt(0),_,s);p.inside&&(c=c.slice(0,-1)+Ng(_));const m=a.move(s+s);return o(),t.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},i+c+m}function wqn(e,r,t){return t.options.strong||"*"}function kqn(e,r,t,n){return t.safe(e.value,n)}function jqn(e){const r=e.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function Sqn(e,r,t){const n=(JH(t)+(t.options.ruleSpaces?" ":"")).repeat(jqn(t));return t.options.ruleSpaces?n.slice(0,-1):n}const tq={blockquote:QHn,break:KR,code:eqn,definition:rqn,emphasis:GH,hardBreak:KR,heading:aqn,html:WH,image:KH,imageReference:VH,inlineCode:QH,link:YH,linkReference:ZH,list:pqn,listItem:gqn,paragraph:vqn,root:yqn,strong:eq,text:kqn,thematicBreak:Sqn};function Cqn(){return{enter:{table:zqn,tableData:VR,tableHeader:VR,tableRow:Nqn},exit:{codeText:Aqn,table:Eqn,tableData:Lk,tableHeader:Lk,tableRow:Lk}}}function zqn(e){const r=e._align;this.enter({type:"table",align:r.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Eqn(e){this.exit(e),this.data.inTable=void 0}function Nqn(e){this.enter({type:"tableRow",children:[]},e)}function Lk(e){this.exit(e)}function VR(e){this.enter({type:"tableCell",children:[]},e)}function Aqn(e){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,Tqn));const t=this.stack[this.stack.length-1];t.type,t.value=r,this.exit(e)}function Tqn(e,r){return r==="|"?r:e}function Rqn(e){const r=e||{},t=r.tableCellPadding,n=r.tablePipeAlign,s=r.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:i}};function a(m,k,w,v){return u(d(m,w,v),m.align)}function i(m,k,w,v){const b=_(m,w,v),x=u([b]);return x.slice(0,x.indexOf(` -`))}function c(m,k,w,v){const b=w.enter("tableCell"),x=w.enter("phrasing"),y=w.containerPhrasing(m,{...v,before:o,after:o});return x(),b(),y}function u(m,k){return KHn(m,{align:k,alignDelimiters:n,padding:t,stringLength:s})}function d(m,k,w){const v=m.children;let b=-1;const x=[],y=k.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Xqn={tokenize:sUn,partial:!0};function Yqn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tUn,continuation:{tokenize:rUn},exit:nUn}},text:{91:{name:"gfmFootnoteCall",tokenize:eUn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Zqn,resolveTo:Jqn}}}}function Zqn(e,r,t){const n=this;let s=n.events.length;const o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;s--;){const c=n.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return i;function i(c){if(!a||!a._balanced)return t(c);const u=Ji(n.sliceSerialize({start:a.end,end:n.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),r(c))}}function Jqn(e,r){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},i=[e[t+1],e[t+2],["enter",n,r],e[t+3],e[t+4],["enter",s,r],["exit",s,r],["enter",o,r],["enter",a,r],["exit",a,r],["exit",o,r],e[e.length-2],e[e.length-1],["exit",n,r]];return e.splice(t,e.length-t+1,...i),e}function eUn(e,r,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o=0,a;return i;function i(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),c}function c(_){return _!==94?t(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(_){if(o>999||_===93&&!a||_===null||_===91||vn(_))return t(_);if(_===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(Ji(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):t(_)}return vn(_)||(a=!0),o++,e.consume(_),_===92?d:u}function d(_){return _===91||_===92||_===93?(e.consume(_),o++,u):u(_)}}function tUn(e,r,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a=0,i;return c;function c(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):t(k)}function d(k){if(a>999||k===93&&!i||k===null||k===91||vn(k))return t(k);if(k===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Ji(n.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return vn(k)||(i=!0),a++,e.consume(k),k===92?_:d}function _(k){return k===91||k===92||k===93?(e.consume(k),a++,d):d(k)}function p(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(o)||s.push(o),Nr(e,m,"gfmFootnoteDefinitionWhitespace")):t(k)}function m(k){return r(k)}}function rUn(e,r,t){return e.check(x0,r,e.attempt(Xqn,r,t))}function nUn(e){e.exit("gfmFootnoteDefinition")}function sUn(e,r,t){const n=this;return Nr(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?r(o):t(o)}}function oUn(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:o,resolveAll:s};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function s(a,i){let c=-1;for(;++c1?c(k):(a.consume(k),_++,m);if(_<2&&!t)return c(k);const v=a.exit("strikethroughSequenceTemporary"),b=ap(k);return v._open=!b||b===2&&!!w,v._close=!w||w===2&&!!b,i(k)}}}class aUn{constructor(){this.map=[]}add(r,t,n){iUn(this,r,t,n)}consume(r){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(r.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),r.length=this.map[t][0];n.push(r.slice()),r.length=0;let s=n.pop();for(;s;){for(const o of s)r.push(o);s=n.pop()}this.map.length=0}}function iUn(e,r,t,n){let s=0;if(!(t===0&&n.length===0)){for(;s-1;){const H=n.events[D][1].type;if(H==="lineEnding"||H==="linePrefix")D--;else break}const I=D>-1?n.events[D][1].type:null,G=I==="tableHead"||I==="tableRow"?E:c;return G===E&&n.parser.lazy[n.now().line]?t($):G($)}function c($){return e.enter("tableHead"),e.enter("tableRow"),u($)}function u($){return $===124||(a=!0,o+=1),d($)}function d($){return $===null?t($):Pt($)?o>1?(o=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),m):t($):Rr($)?Nr(e,d,"whitespace")($):(o+=1,a&&(a=!1,s+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),_($)))}function _($){return $===null||$===124||vn($)?(e.exit("data"),d($)):(e.consume($),$===92?p:_)}function p($){return $===92||$===124?(e.consume($),_):_($)}function m($){return n.interrupt=!1,n.parser.lazy[n.now().line]?t($):(e.enter("tableDelimiterRow"),a=!1,Rr($)?Nr(e,k,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):k($))}function k($){return $===45||$===58?v($):$===124?(a=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),w):z($)}function w($){return Rr($)?Nr(e,v,"whitespace")($):v($)}function v($){return $===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),b):$===45?(o+=1,b($)):$===null||Pt($)?S($):z($)}function b($){return $===45?(e.enter("tableDelimiterFiller"),x($)):z($)}function x($){return $===45?(e.consume($),x):$===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y($))}function y($){return Rr($)?Nr(e,S,"whitespace")($):S($)}function S($){return $===124?k($):$===null||Pt($)?!a||s!==o?z($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r($)):z($)}function z($){return t($)}function E($){return e.enter("tableRow"),A($)}function A($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),A):$===null||Pt($)?(e.exit("tableRow"),r($)):Rr($)?Nr(e,A,"whitespace")($):(e.enter("data"),N($))}function N($){return $===null||$===124||vn($)?(e.exit("data"),A($)):(e.consume($),$===92?M:N)}function M($){return $===92||$===124?(e.consume($),N):N($)}}function _Un(e,r){let t=-1,n=!0,s=0,o=[0,0,0,0],a=[0,0,0,0],i=!1,c=0,u,d,_;const p=new aUn;for(;++tt[2]+1){const k=t[2]+1,w=t[3]-t[2]-1;e.add(k,w,[])}}e.add(t[3]+1,0,[["exit",_,r]])}return s!==void 0&&(o.end=Object.assign({},mh(r.events,s)),e.add(s,0,[["exit",o,r]]),o=void 0),o}function XR(e,r,t,n,s){const o=[],a=mh(r.events,t);s&&(s.end=Object.assign({},a),o.push(["exit",s,r])),n.end=Object.assign({},a),o.push(["exit",n,r]),e.add(t+1,0,o)}function mh(e,r){const t=e[r],n=t[0]==="enter"?"start":"end";return t[1][n]}const fUn={name:"tasklistCheck",tokenize:hUn};function dUn(){return{text:{91:fUn}}}function hUn(e,r,t){const n=this;return s;function s(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return vn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):t(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):t(c)}function i(c){return Pt(c)?r(c):Rr(c)?e.check({tokenize:pUn},r,t)(c):t(c)}}function pUn(e,r,t){return Nr(e,n,"whitespace");function n(s){return s===null?t(s):r(s)}}function mUn(e){return QB([Fqn(),Yqn(),oUn(e),lUn(),dUn()])}const gUn={};function uq(e){const r=this,t=e||gUn,n=r.data(),s=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);s.push(mUn(t)),o.push(Lqn()),a.push(Iqn(t))}function vUn(){return{enter:{mathFlow:e,mathFlowFenceMeta:r,mathText:o},exit:{mathFlow:s,mathFlowFence:n,mathFlowFenceMeta:t,mathFlowValue:i,mathText:a,mathTextData:i}};function e(c){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},c)}function r(){this.buffer()}function t(){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=c}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u;const _=d.data.hChildren[0];_.type,_.tagName,_.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function o(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function a(c){const u=this.resume(),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u,d.data.hChildren.push({type:"text",value:u})}function i(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function bUn(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),n.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:i}};function a(m,k,x,v){return u(d(m,x,v),m.align)}function i(m,k,x,v){const b=_(m,x,v),w=u([b]);return w.slice(0,w.indexOf(` +`))}function c(m,k,x,v){const b=x.enter("tableCell"),w=x.enter("phrasing"),y=x.containerPhrasing(m,{...v,before:o,after:o});return w(),b(),y}function u(m,k){return KHn(m,{align:k,alignDelimiters:n,padding:t,stringLength:s})}function d(m,k,x){const v=m.children;let b=-1;const w=[],y=k.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Xqn={tokenize:sUn,partial:!0};function Yqn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tUn,continuation:{tokenize:rUn},exit:nUn}},text:{91:{name:"gfmFootnoteCall",tokenize:eUn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Zqn,resolveTo:Jqn}}}}function Zqn(e,r,t){const n=this;let s=n.events.length;const o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;s--;){const c=n.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return i;function i(c){if(!a||!a._balanced)return t(c);const u=Ji(n.sliceSerialize({start:a.end,end:n.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),r(c))}}function Jqn(e,r){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},i=[e[t+1],e[t+2],["enter",n,r],e[t+3],e[t+4],["enter",s,r],["exit",s,r],["enter",o,r],["enter",a,r],["exit",a,r],["exit",o,r],e[e.length-2],e[e.length-1],["exit",n,r]];return e.splice(t,e.length-t+1,...i),e}function eUn(e,r,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o=0,a;return i;function i(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),c}function c(_){return _!==94?t(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(_){if(o>999||_===93&&!a||_===null||_===91||vn(_))return t(_);if(_===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(Ji(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):t(_)}return vn(_)||(a=!0),o++,e.consume(_),_===92?d:u}function d(_){return _===91||_===92||_===93?(e.consume(_),o++,u):u(_)}}function tUn(e,r,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a=0,i;return c;function c(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):t(k)}function d(k){if(a>999||k===93&&!i||k===null||k===91||vn(k))return t(k);if(k===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return o=Ji(n.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return vn(k)||(i=!0),a++,e.consume(k),k===92?_:d}function _(k){return k===91||k===92||k===93?(e.consume(k),a++,d):d(k)}function p(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(o)||s.push(o),Nr(e,m,"gfmFootnoteDefinitionWhitespace")):t(k)}function m(k){return r(k)}}function rUn(e,r,t){return e.check(x0,r,e.attempt(Xqn,r,t))}function nUn(e){e.exit("gfmFootnoteDefinition")}function sUn(e,r,t){const n=this;return Nr(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?r(o):t(o)}}function oUn(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:o,resolveAll:s};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function s(a,i){let c=-1;for(;++c1?c(k):(a.consume(k),_++,m);if(_<2&&!t)return c(k);const v=a.exit("strikethroughSequenceTemporary"),b=ap(k);return v._open=!b||b===2&&!!x,v._close=!x||x===2&&!!b,i(k)}}}class aUn{constructor(){this.map=[]}add(r,t,n){iUn(this,r,t,n)}consume(r){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(r.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),r.length=this.map[t][0];n.push(r.slice()),r.length=0;let s=n.pop();for(;s;){for(const o of s)r.push(o);s=n.pop()}this.map.length=0}}function iUn(e,r,t,n){let s=0;if(!(t===0&&n.length===0)){for(;s-1;){const H=n.events[D][1].type;if(H==="lineEnding"||H==="linePrefix")D--;else break}const I=D>-1?n.events[D][1].type:null,G=I==="tableHead"||I==="tableRow"?N:c;return G===N&&n.parser.lazy[n.now().line]?t($):G($)}function c($){return e.enter("tableHead"),e.enter("tableRow"),u($)}function u($){return $===124||(a=!0,o+=1),d($)}function d($){return $===null?t($):Pt($)?o>1?(o=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),m):t($):Rr($)?Nr(e,d,"whitespace")($):(o+=1,a&&(a=!1,s+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),_($)))}function _($){return $===null||$===124||vn($)?(e.exit("data"),d($)):(e.consume($),$===92?p:_)}function p($){return $===92||$===124?(e.consume($),_):_($)}function m($){return n.interrupt=!1,n.parser.lazy[n.now().line]?t($):(e.enter("tableDelimiterRow"),a=!1,Rr($)?Nr(e,k,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):k($))}function k($){return $===45||$===58?v($):$===124?(a=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),x):z($)}function x($){return Rr($)?Nr(e,v,"whitespace")($):v($)}function v($){return $===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),b):$===45?(o+=1,b($)):$===null||Pt($)?S($):z($)}function b($){return $===45?(e.enter("tableDelimiterFiller"),w($)):z($)}function w($){return $===45?(e.consume($),w):$===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y($))}function y($){return Rr($)?Nr(e,S,"whitespace")($):S($)}function S($){return $===124?k($):$===null||Pt($)?!a||s!==o?z($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r($)):z($)}function z($){return t($)}function N($){return e.enter("tableRow"),A($)}function A($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),A):$===null||Pt($)?(e.exit("tableRow"),r($)):Rr($)?Nr(e,A,"whitespace")($):(e.enter("data"),E($))}function E($){return $===null||$===124||vn($)?(e.exit("data"),A($)):(e.consume($),$===92?M:E)}function M($){return $===92||$===124?(e.consume($),E):E($)}}function _Un(e,r){let t=-1,n=!0,s=0,o=[0,0,0,0],a=[0,0,0,0],i=!1,c=0,u,d,_;const p=new aUn;for(;++tt[2]+1){const k=t[2]+1,x=t[3]-t[2]-1;e.add(k,x,[])}}e.add(t[3]+1,0,[["exit",_,r]])}return s!==void 0&&(o.end=Object.assign({},mh(r.events,s)),e.add(s,0,[["exit",o,r]]),o=void 0),o}function XR(e,r,t,n,s){const o=[],a=mh(r.events,t);s&&(s.end=Object.assign({},a),o.push(["exit",s,r])),n.end=Object.assign({},a),o.push(["exit",n,r]),e.add(t+1,0,o)}function mh(e,r){const t=e[r],n=t[0]==="enter"?"start":"end";return t[1][n]}const fUn={name:"tasklistCheck",tokenize:hUn};function dUn(){return{text:{91:fUn}}}function hUn(e,r,t){const n=this;return s;function s(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return vn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):t(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):t(c)}function i(c){return Pt(c)?r(c):Rr(c)?e.check({tokenize:pUn},r,t)(c):t(c)}}function pUn(e,r,t){return Nr(e,n,"whitespace");function n(s){return s===null?t(s):r(s)}}function mUn(e){return QB([Fqn(),Yqn(),oUn(e),lUn(),dUn()])}const gUn={};function uq(e){const r=this,t=e||gUn,n=r.data(),s=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);s.push(mUn(t)),o.push(Lqn()),a.push(Iqn(t))}function vUn(){return{enter:{mathFlow:e,mathFlowFenceMeta:r,mathText:o},exit:{mathFlow:s,mathFlowFence:n,mathFlowFenceMeta:t,mathFlowValue:i,mathText:a,mathTextData:i}};function e(c){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},c)}function r(){this.buffer()}function t(){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=c}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u;const _=d.data.hChildren[0];_.type,_.tagName,_.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function o(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function a(c){const u=this.resume(),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u,d.data.hChildren.push({type:"text",value:u})}function i(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function bUn(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),n.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` `,inConstruct:"mathFlowMeta"},{character:"$",after:r?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:n}};function t(o,a,i,c){const u=o.value||"",d=i.createTracker(c),_="$".repeat(Math.max(UH(u,"$")+1,2)),p=i.enter("mathFlow");let m=d.move(_);if(o.meta){const k=i.enter("mathFlowMeta");m+=d.move(i.safe(o.meta,{after:` `,before:m,encode:["$"],...d.current()})),k()}return m+=d.move(` `),u&&(m+=d.move(u+` -`)),m+=d.move(_),p(),m}function n(o,a,i){let c=o.value||"",u=1;for(r||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(c);)u++;const d="$".repeat(u);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let _=-1;for(;++_{var w,v;const k=(w=m.children)==null?void 0:w[0];return(m.type==="paperFigure"||m.type==="paragraph"&&((v=m.children)==null?void 0:v.length)===1)&&(k==null?void 0:k.type)==="image"&&!/\.html?(?:[?#]|$)/i.test(k.url??"")};for(let m=0;m1&&a.splice(m,k-m,{type:"imageCarousel",data:{hName:"image-carousel"},children:a.slice(m,k)})}}s(r)}}const ZR=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function _p(e,r,t){let n=r;for(;e[n]===t;)n+=1;return n-r}function Ag(e,r){let t=0;for(let n=r-1;n>=0&&e[n]==="\\";n-=1)t+=1;return t%2===1}function O5(e){var a;let r=!1,t=0,n=0,s=0;for(;n[ \t]?/.exec(e.slice(n));if(i){n+=i[0].length,s+=1;continue}const c=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(n));if(!c)break;n+=c[0].length,t+=c[0].length,r=!0}const o=((a=/^[ \t]*/.exec(e.slice(n)))==null?void 0:a[0].length)??0;return{hasListMarker:r,indentation:o,listIndent:t,offset:n+o,quoteDepth:s}}function AUn(e,r){const t=e[r];if(t!=="`"&&t!=="~"||Ag(e,r)||_p(e,r,t)<3)return!1;const n=e.lastIndexOf(` +`)),m+=d.move(_),p(),m}function n(o,a,i){let c=o.value||"",u=1;for(r||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(c);)u++;const d="$".repeat(u);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let _=-1;for(;++_{var x,v;const k=(x=m.children)==null?void 0:x[0];return(m.type==="paperFigure"||m.type==="paragraph"&&((v=m.children)==null?void 0:v.length)===1)&&(k==null?void 0:k.type)==="image"&&!/\.html?(?:[?#]|$)/i.test(k.url??"")};for(let m=0;m1&&a.splice(m,k-m,{type:"imageCarousel",data:{hName:"image-carousel"},children:a.slice(m,k)})}}s(r)}}const ZR=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function _p(e,r,t){let n=r;for(;e[n]===t;)n+=1;return n-r}function Ag(e,r){let t=0;for(let n=r-1;n>=0&&e[n]==="\\";n-=1)t+=1;return t%2===1}function O5(e){var a;let r=!1,t=0,n=0,s=0;for(;n[ \t]?/.exec(e.slice(n));if(i){n+=i[0].length,s+=1;continue}const c=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(n));if(!c)break;n+=c[0].length,t+=c[0].length,r=!0}const o=((a=/^[ \t]*/.exec(e.slice(n)))==null?void 0:a[0].length)??0;return{hasListMarker:r,indentation:o,listIndent:t,offset:n+o,quoteDepth:s}}function AUn(e,r){const t=e[r];if(t!=="`"&&t!=="~"||Ag(e,r)||_p(e,r,t)<3)return!1;const n=e.lastIndexOf(` `,r-1)+1,s=e.indexOf(` `,r),o=e.slice(n,s===-1?e.length:s),a=O5(o);return a.indentation<=3&&n+a.offset===r}function TUn(e,r){const t=e[r],n=_p(e,r,t),s=e.lastIndexOf(` `,r-1)+1,o=e.indexOf(` `,r),a=O5(e.slice(s,o===-1?e.length:o));let i=e.indexOf(` `,r+n);if(i===-1)return e.length;for(i+=1;i=a.listIndent&&_.indentation<=a.listIndent+3&&m>=n&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return c===-1?e.length:c+1;if(c===-1)return e.length;i=c+1}return e.length}function RUn(e,r,t){const n=_p(e,r,"`");let s=r+n;for(;s")return s+1}return t?e.length:null}function OUn(e){const r=[];for(let t=0;t|()[\]-]+$/.test(t)?/^[eE][+-]?\d+$/.test(t)||/[+*/=^_{}\\<>|()]/.test(t)?!0:/^[A-Za-z][A-Za-z0-9]*$/.test(t):!1:!0}function DUn(e,{predictMath:r=!1}={}){const t=OUn(e),n=new Set,s=new Set;for(let u=0;u=a.listIndent&&_.indentation<=a.listIndent+3&&m>=n&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return c===-1?e.length:c+1;if(c===-1)return e.length;i=c+1}return e.length}function RUn(e,r,t){const n=_p(e,r,"`");let s=r+n;for(;s")return s+1}return t?e.length:null}function OUn(e){const r=[];for(let t=0;t|()[\]-]+$/.test(t)?/^[eE][+-]?\d+$/.test(t)||/[+*/=^_{}\\<>|()]/.test(t)?!0:/^[A-Za-z][A-Za-z0-9]*$/.test(t):!1:!0}function DUn(e,{predictMath:r=!1}={}){const t=OUn(e),n=new Set,s=new Set;for(let u=0;u`$$${s}$$`).replace(/\\\(([\s\S]+?)\\\)/g,(n,s)=>`$$${s}$$`);return r.predictMath&&(t=t.replace(/\\\[([\s\S]*)$/,(n,s)=>`$$${s}`).replace(/\\\(([\s\S]*)$/,(n,s)=>`$$${s}`)),DUn(t,r)}function dq(e,r={}){let t="",n=0,s=0;for(;ss!==r);return{order:e.order.filter(s=>s!==r),previewKey:e.previewKey===r?null:e.previewKey,fallbackKey:n[n.length-1]??null}}function PUn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function rs(e,r={}){const t=n=>{r.stopPropagation&&n.stopPropagation()};return{onClick:n=>{t(n),e("preview")},onDoubleClick:n=>{t(n),e("keepOpen")},onAuxClick:n=>{n.button===1&&(n.preventDefault(),t(n),e("keepOpen"))},onKeyDown:n=>{const s=PUn(n.key);s&&(n.preventDefault(),t(n),e(s))}}}function BUn(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.min(1200,Math.ceil(e)):null}const eM=[{selector:"img[src]",attribute:"src",typePrefixes:["image/"]},{selector:"source[src]",attribute:"src",typePrefixes:["image/","audio/","video/"]},{selector:"video[poster]",attribute:"poster",typePrefixes:["image/"]},{selector:"video[src]",attribute:"src",typePrefixes:["video/"]},{selector:"audio[src]",attribute:"src",typePrefixes:["audio/"]},{selector:'link[rel~="stylesheet"][href]',attribute:"href",typePrefixes:["text/css"]},{selector:"script[src]",attribute:"src",typePrefixes:["text/javascript"]}],FUn=4e6,HUn=200,tM=16e6,qUn=e=>new Promise(r=>{const t=new FileReader;t.onload=()=>r(typeof t.result=="string"?t.result:null),t.onerror=()=>r(null),t.readAsDataURL(e)}),rM=e=>e.startsWith("//")?`https:${e}`:e;async function UUn(e,r){var s;let t=FUn;const n=new Map;for(const{element:o,attribute:a,url:i,typePrefixes:c}of e){if(n.has(i)){const k=n.get(i);k&&o.setAttribute(a,k);continue}if(r.aborted)return;if(n.size>=HUn)continue;n.set(i,null);const u=await fetch(i,{signal:r}).catch(()=>null);if(!(u!=null&&u.ok))continue;const d=u.headers.get("content-type")??"",_=Number(u.headers.get("content-length"));if(!c.some(k=>d.startsWith(k))||!(Number.isFinite(_)&&_>0&&_<=t)){await((s=u.body)==null?void 0:s.cancel().catch(()=>{}));continue}const p=await u.blob().catch(()=>null),m=p&&await qUn(p);!p||!m||(t-=p.size,n.set(i,m),o.setAttribute(a,m))}}async function GUn(e,r,t){var a;const n=new DOMParser().parseFromString(e,"text/html"),s=[];for(const i of n.querySelectorAll(eM.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:u,typePrefixes:d}of eM){if(!i.matches(c))continue;const _=i.getAttribute(u);if(!_)continue;const p=r(_);p&&(p===_?i.setAttribute(u,rM(_)):s.push({element:i,attribute:u,url:p,typePrefixes:d}))}await UUn(s,t);for(const i of n.querySelectorAll("a[href]")){const c=i.getAttribute("href");!c||!ax(c)||(i.setAttribute("href",rM(c)),i.setAttribute("target","_blank"),i.setAttribute("rel","noopener noreferrer"))}const o=((a=n.querySelector("base[href]"))==null?void 0:a.getAttribute("href"))??"";if(!/^https?:\/\//i.test(o)){const i=n.createElement("base");i.setAttribute("href","about:srcdoc"),n.head.prepend(i)}return`${n.doctype?``:""}${n.documentElement.outerHTML}`}async function WUn(e,r,t,n){var i;if(!r)return{text:e,partial:!1};const s=await fetch(t,{signal:n,headers:{Range:`bytes=0-${tM-1}`}}).catch(()=>null),o=s!=null&&s.ok?await s.text().catch(()=>null):null;if(o===null)return{text:e,partial:!0};const a=Number((i=s==null?void 0:s.headers.get("content-range"))==null?void 0:i.split("/").pop());return{text:o,partial:Number.isFinite(a)&&a>tM}}function hq({html:e,truncated:r,url:t,name:n,resolveSrc:s,fitContent:o=!1}){const[a,i]=T.useState(null),c=T.useRef(null),[u,d]=T.useState(360),[_,p]=T.useState(null);return T.useEffect(()=>{if(!o)return;const m=k=>{var v;const w=k.data;if(!(k.source!==((v=c.current)==null?void 0:v.contentWindow)||typeof w!="object"||w===null)){if("type"in w&&w.type==="orx-html-size"&&"height"in w){const b=BUn(w.height);b!==null&&d(b)}if("type"in w&&w.type==="orx-chart-picker"&&"choices"in w&&Array.isArray(w.choices)&&"value"in w&&typeof w.value=="string"&&"left"in w&&typeof w.left=="number"&&Number.isFinite(w.left)&&"top"in w&&typeof w.top=="number"&&Number.isFinite(w.top)&&"width"in w&&typeof w.width=="number"&&Number.isFinite(w.width)&&w.width>0){const b=[];for(const x of w.choices){if(typeof x!="object"||x===null||!("id"in x)||typeof x.id!="string"||!("label"in x)||typeof x.label!="string")return;b.push({id:x.id,label:x.label})}p({choices:b,value:w.value,left:w.left,top:w.top,width:w.width})}}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[o]),T.useEffect(()=>{let m=!1;const k=new AbortController;return i(null),d(360),p(null),WUn(e,r,t,k.signal).then(async({text:w,partial:v})=>({source:await GUn(w,s,k.signal)+(o?` - + +
void; onDelete: () => void; }) { - const { open, setOpen, ref } = usePopover(); + const triggerRef = useRef(null); + const { open, setOpen, ref } = usePopover(triggerRef); const title = session.title?.trim() || "Untitled"; const [editing, setEditing] = useState(false); // Seeded by startEditing() before the input mounts; "" is just a placeholder. const [draft, setDraft] = useState(""); const inputRef = useRef(null); + useLayoutEffect(() => { + if (!open || !ref.current || !triggerRef.current) return; + const anchor = triggerRef.current.getBoundingClientRect(); + const bounds = ref.current.getBoundingClientRect(); + const left = getComputedStyle(triggerRef.current).direction === "rtl" ? anchor.left : anchor.right - bounds.width; + ref.current.style.left = `${Math.max(8, Math.min(left, window.innerWidth - bounds.width - 8))}px`; + ref.current.style.top = `${Math.max(8, Math.min(anchor.bottom + 4, window.innerHeight - bounds.height - 8))}px`; + const dismiss = (event: Event) => { + if (event.target instanceof Node && ref.current?.contains(event.target)) return; + setOpen(false); + }; + window.addEventListener("scroll", dismiss, true); + window.addEventListener("resize", dismiss); + return () => { + window.removeEventListener("scroll", dismiss, true); + window.removeEventListener("resize", dismiss); + }; + }, [open, ref, setOpen]); + function startEditing() { setDraft(session.title?.trim() || ""); setEditing(true); @@ -4064,7 +4085,6 @@ function SessionRow({ // Not a - {open && ( -
+ {open && createPortal( +
{ e.stopPropagation(); @@ -4169,7 +4191,7 @@ function SessionRow({ > {m.chat_panel_delete()} -
+
, document.body, )}
); diff --git a/ui/tests/sidebar-layout.test.mjs b/ui/tests/sidebar-layout.test.mjs index 104e3bf23..556fa7255 100644 --- a/ui/tests/sidebar-layout.test.mjs +++ b/ui/tests/sidebar-layout.test.mjs @@ -1,7 +1,55 @@ import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; import { test } from "node:test"; +import ts from "typescript"; import { fitSidebarRows, sidebarRowHeight } from "../src/sidebarLayout.ts"; +const source = readFileSync(new URL("../src/components/ChatPanel.tsx", import.meta.url), "utf8"); +const file = ts.createSourceFile("ChatPanel.tsx", source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX); +const sessionRow = file.statements.find(node => ts.isFunctionDeclaration(node) && node.name?.text === "SessionRow"); + +test("session menus escape transformed sidebar rows and their scroll clipping", () => { + const row = sessionRow.getText(file); + assert.match(row, /createPortal\([\s\S]*document\.body/); + assert.match(row, /ref=\{ref\} className="[^"]*fixed z-70/); + assert.match(row, /usePopover\(triggerRef\)/); +}); + +test("session menus stay in the viewport and dismiss when their anchor moves", () => { + const effect = sessionRow.body.statements.find(node => ts.isExpressionStatement(node) + && ts.isCallExpression(node.expression) && node.expression.expression.getText(file) === "useLayoutEffect").expression.arguments[0]; + const js = ts.transpileModule(`return ${effect.getText(file)}`, { compilerOptions: { target: ts.ScriptTarget.ES2022 } }).outputText; + for (const [direction, anchor, expected] of [ + ["ltr", { left: 250, right: 266, bottom: 80 }, { left: "126px", top: "84px" }], + ["ltr", { left: 10, right: 26, bottom: 390 }, { left: "8px", top: "272px" }], + ["rtl", { left: 470, right: 486, bottom: 80 }, { left: "352px", top: "84px" }], + ]) { + const listeners = new Map(); + const style = {}; + let dismissed = 0; + const inside = new EventTarget(); + const cleanup = new Function("open", "ref", "triggerRef", "getComputedStyle", "window", "Node", "setOpen", js)( + true, + { current: { getBoundingClientRect: () => ({ width: 140, height: 120 }), style, contains: target => target === inside } }, + { current: { getBoundingClientRect: () => anchor } }, + () => ({ direction }), + { innerWidth: 500, innerHeight: 400, + addEventListener: (name, handler) => listeners.set(name, handler), + removeEventListener: (name, handler) => { assert.equal(listeners.get(name), handler); listeners.delete(name); } }, + EventTarget, + value => { assert.equal(value, false); dismissed++; }, + )(); + assert.deepEqual(style, expected); + listeners.get("scroll")({ target: inside }); + assert.equal(dismissed, 0); + listeners.get("scroll")({ target: new EventTarget() }); + listeners.get("resize")({}); + assert.equal(dismissed, 2); + cleanup(); + assert.equal(listeners.size, 0); + } +}); + test("sidebar fits complete rows and keeps an older selected chat visible", () => { const first = { id: "first" }; const second = { id: "second" }; From ab5ff14ec46b296d84b4e36b7889f6d7b1714bd7 Mon Sep 17 00:00:00 2001 From: Daniel Kim Date: Wed, 14 Oct 2026 20:05:31 +0000 Subject: [PATCH 2/4] fix: preserve session-menu focus and dismissal behavior --- ...iew-D9ODVenE.js => PdfPreview-Ct62q5gr.js} | 2 +- .../{index-BT1BW2gt.js => index-7MTG4lhL.js} | 124 +++++++++--------- ui/dist/index.html | 2 +- ui/src/components/ChatPanel.tsx | 9 +- ui/src/components/ModelPicker.tsx | 6 +- ui/tests/sidebar-layout.test.mjs | 58 ++++++-- 6 files changed, 123 insertions(+), 78 deletions(-) rename ui/dist/assets/{PdfPreview-D9ODVenE.js => PdfPreview-Ct62q5gr.js} (99%) rename ui/dist/assets/{index-BT1BW2gt.js => index-7MTG4lhL.js} (87%) diff --git a/ui/dist/assets/PdfPreview-D9ODVenE.js b/ui/dist/assets/PdfPreview-Ct62q5gr.js similarity index 99% rename from ui/dist/assets/PdfPreview-D9ODVenE.js rename to ui/dist/assets/PdfPreview-Ct62q5gr.js index eb151195f..67ae8a842 100644 --- a/ui/dist/assets/PdfPreview-D9ODVenE.js +++ b/ui/dist/assets/PdfPreview-Ct62q5gr.js @@ -1,4 +1,4 @@ -var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-BT1BW2gt.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جست‌وجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",A1=()=>"문서에서 찾기",x1=()=>"文書内を検索",S1=()=>"Znajdź w dokumencie",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():t==="ko"?A1():t==="ja"?x1():t==="pl"?S1():m1()}),T1=()=>"Fit to width",C1=()=>"适应宽度",P1=()=>"متناسب با عرض",I1=()=>"ملاءمة العرض",R1=()=>"Ajustar al ancho",O1=()=>"चौड़ाई में फ़िट करें",M1=()=>"너비에 맞추기",D1=()=>"幅に合わせる",L1=()=>"Dopasuj do szerokości",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?C1():t==="fa"?P1():t==="ar"?I1():t==="es"?R1():t==="hi"?O1():t==="ko"?M1():t==="ja"?D1():t==="pl"?L1():T1()}),N1=()=>"Next match",F1=()=>"下一个匹配项",k1=()=>"مورد بعدی",B1=()=>"التطابق التالي",j1=()=>"Coincidencia siguiente",U1=()=>"अगला मिलान",$1=()=>"다음 일치 항목",H1=()=>"次の一致",V1=()=>"Następne dopasowanie",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?F1():t==="fa"?k1():t==="ar"?B1():t==="es"?j1():t==="hi"?U1():t==="ko"?$1():t==="ja"?H1():t==="pl"?V1():N1()}),z1=()=>"Previous match",W1=()=>"上一个匹配项",G1=()=>"مورد قبلی",_1=()=>"التطابق السابق",X1=()=>"Coincidencia anterior",Y1=()=>"पिछला मिलान",K1=()=>"이전 일치 항목",J1=()=>"前の一致",Z1=()=>"Poprzednie dopasowanie",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?W1():t==="fa"?G1():t==="ar"?_1():t==="es"?X1():t==="hi"?Y1():t==="ko"?K1():t==="ja"?J1():t==="pl"?Z1():z1()});/** +var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-7MTG4lhL.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جست‌وجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",A1=()=>"문서에서 찾기",x1=()=>"文書内を検索",S1=()=>"Znajdź w dokumencie",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():t==="ko"?A1():t==="ja"?x1():t==="pl"?S1():m1()}),T1=()=>"Fit to width",C1=()=>"适应宽度",P1=()=>"متناسب با عرض",I1=()=>"ملاءمة العرض",R1=()=>"Ajustar al ancho",O1=()=>"चौड़ाई में फ़िट करें",M1=()=>"너비에 맞추기",D1=()=>"幅に合わせる",L1=()=>"Dopasuj do szerokości",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?C1():t==="fa"?P1():t==="ar"?I1():t==="es"?R1():t==="hi"?O1():t==="ko"?M1():t==="ja"?D1():t==="pl"?L1():T1()}),N1=()=>"Next match",F1=()=>"下一个匹配项",k1=()=>"مورد بعدی",B1=()=>"التطابق التالي",j1=()=>"Coincidencia siguiente",U1=()=>"अगला मिलान",$1=()=>"다음 일치 항목",H1=()=>"次の一致",V1=()=>"Następne dopasowanie",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?F1():t==="fa"?k1():t==="ar"?B1():t==="es"?j1():t==="hi"?U1():t==="ko"?$1():t==="ja"?H1():t==="pl"?V1():N1()}),z1=()=>"Previous match",W1=()=>"上一个匹配项",G1=()=>"مورد قبلی",_1=()=>"التطابق السابق",X1=()=>"Coincidencia anterior",Y1=()=>"पिछला मिलान",K1=()=>"이전 일치 항목",J1=()=>"前の一致",Z1=()=>"Poprzednie dopasowanie",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?W1():t==="fa"?G1():t==="ar"?_1():t==="es"?X1():t==="hi"?Y1():t==="ko"?K1():t==="ja"?J1():t==="pl"?Z1():z1()});/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. diff --git a/ui/dist/assets/index-BT1BW2gt.js b/ui/dist/assets/index-7MTG4lhL.js similarity index 87% rename from ui/dist/assets/index-BT1BW2gt.js rename to ui/dist/assets/index-7MTG4lhL.js index 66a1b3d88..53d2a9daf 100644 --- a/ui/dist/assets/index-BT1BW2gt.js +++ b/ui/dist/assets/index-7MTG4lhL.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-D9ODVenE.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-Ct62q5gr.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); var jK=Object.defineProperty;var k8=e=>{throw TypeError(e)};var SK=(e,r,t)=>r in e?jK(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var bo=(e,r,t)=>SK(e,typeof r!="symbol"?r+"":r,t),_2=(e,r,t)=>r.has(e)||k8("Cannot "+t);var ue=(e,r,t)=>(_2(e,r,"read from private field"),t?t.call(e):r.get(e)),ft=(e,r,t)=>r.has(e)?k8("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),Ge=(e,r,t,n)=>(_2(e,r,"write to private field"),n?n.call(e,t):r.set(e,t),t),Kt=(e,r,t)=>(_2(e,r,"access private method"),t);var hm=(e,r,t,n)=>({set _(s){Ge(e,r,s,t)},get _(){return ue(e,r,n)}});(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=t(s);fetch(s.href,o)}})();function n0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f2={exports:{}},pm={};/** * @license React * react-jsx-runtime.production.js @@ -15,7 +15,7 @@ var jK=Object.defineProperty;var k8=e=>{throw TypeError(e)};var SK=(e,r,t)=>r in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var C8;function EK(){if(C8)return ur;C8=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function b(F,q,U){this.props=F,this.context=q,this.refs=v,this.updater=U||k}b.prototype.isReactComponent={},b.prototype.setState=function(F,q){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,q,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function w(){}w.prototype=b.prototype;function y(F,q,U){this.props=F,this.context=q,this.refs=v,this.updater=U||k}var S=y.prototype=new w;S.constructor=y,x(S,b.prototype),S.isPureReactComponent=!0;var z=Array.isArray;function N(){}var A={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function M(F,q,U){var oe=U.ref;return{$$typeof:e,type:F,key:q,ref:oe!==void 0?oe:null,props:U}}function $(F,q){return M(F.type,q,F.props)}function D(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function I(F){var q={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(U){return q[U]})}var G=/\/+/g;function H(F,q){return typeof F=="object"&&F!==null&&F.key!=null?I(""+F.key):q.toString(36)}function Q(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(N,N):(F.status="pending",F.then(function(q){F.status==="pending"&&(F.status="fulfilled",F.value=q)},function(q){F.status==="pending"&&(F.status="rejected",F.reason=q)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function K(F,q,U,oe,ie){var ce=typeof F;(ce==="undefined"||ce==="boolean")&&(F=null);var re=!1;if(F===null)re=!0;else switch(ce){case"bigint":case"string":case"number":re=!0;break;case"object":switch(F.$$typeof){case e:case r:re=!0;break;case d:return re=F._init,K(re(F._payload),q,U,oe,ie)}}if(re)return ie=ie(F),re=oe===""?"."+H(F,0):oe,z(ie)?(U="",re!=null&&(U=re.replace(G,"$&/")+"/"),K(ie,q,U,"",function(le){return le})):ie!=null&&(D(ie)&&(ie=$(ie,U+(ie.key==null||F&&F.key===ie.key?"":(""+ie.key).replace(G,"$&/")+"/")+re)),q.push(ie)),1;re=0;var W=oe===""?".":oe+":";if(z(F))for(var ae=0;ae{const r=T.useContext(s$);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},NK=({client:e,children:r})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(s$.Provider,{value:e,children:r})),AK={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)};var n_,dj,WO,TK=(WO=class{constructor(){ft(this,n_,AK);ft(this,dj,!1)}setTimeoutProvider(e){Ge(this,n_,e)}setTimeout(e,r){return ue(this,n_).setTimeout(e,r)}clearTimeout(e){ue(this,n_).clearTimeout(e)}setInterval(e,r){return ue(this,n_).setInterval(e,r)}clearInterval(e){ue(this,n_).clearInterval(e)}},n_=new WeakMap,dj=new WeakMap,WO);const vf=new TK;function RK(e){setTimeout(e,0)}const MK=typeof window>"u"||"Deno"in globalThis;function jo(){}function OK(e,r){return typeof e=="function"?e(r):e}function o$(e){return typeof e=="number"&&e>=0&&e!==1/0}function a$(e,r){return Math.max(e+(r||0)-Date.now(),0)}function es(e,r){return typeof e=="function"?e(r):e}function E8(e,r){const{type:t="all",exact:n,fetchStatus:s,predicate:o,queryKey:a,stale:i}=e;if(a){if(n){if(r.queryHash!==hj(a,r.options))return!1}else if(!ep(r.queryKey,a))return!1}if(t!=="all"){const c=r.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof i=="boolean"&&r.isStale()!==i||s&&s!==r.state.fetchStatus||o&&!o(r))}function N8(e,r){const{exact:t,status:n,predicate:s,mutationKey:o}=e;if(o){if(!r.options.mutationKey)return!1;if(t){if(Hf(r.options.mutationKey)!==Hf(o))return!1}else if(!ep(r.options.mutationKey,o))return!1}return!(n&&r.state.status!==n||s&&!s(r))}function hj(e,r){return((r==null?void 0:r.queryKeyHashFn)||Hf)(e)}function Hf(e){return JSON.stringify(e,(r,t)=>m4(t)?Object.keys(t).sort().reduce((n,s)=>(n[s]=t[s],n),{}):t)}function ep(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(Array.isArray(e)&&Array.isArray(r)){for(let n=0;n500)return r;const n=A8(e)&&A8(r);if(!n&&!(m4(e)&&m4(r)))return r;const s=(n?e:Object.keys(e)).length,o=n?r:Object.keys(r),a=o.length,i=n?new Array(a):{};let c=0;for(let u=0;u{vf.setTimeout(r,e)})}function g4(e,r,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,r):t.structuralSharing!==!1?pj(e,r):r}function LK(e,r,t=0){const n=[...e,r];return t&&n.length>t?n.slice(1):n}function IK(e,r,t=0){const n=[r,...e];return t&&n.length>t?n.slice(0,-1):n}const mj=Symbol();function i$(e,r){return!e.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!e.queryFn||e.queryFn===mj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gj(e,r){return typeof e=="function"?e(...r):!!e}function PK(e,r,t){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=r()),n||(n=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}let BK=()=>MK;const vj=()=>BK();var ld=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},wf,s_,Dh,KO,FK=(KO=class extends ld{constructor(){super();ft(this,wf);ft(this,s_);ft(this,Dh);Ge(this,Dh,r=>{if(typeof window<"u"&&window.addEventListener){const t=()=>r();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,s_)||this.setEventListener(ue(this,Dh))}onUnsubscribe(){var r;this.hasListeners()||((r=ue(this,s_))==null||r.call(this),Ge(this,s_,void 0))}setEventListener(r){var t;Ge(this,Dh,r),(t=ue(this,s_))==null||t.call(this),Ge(this,s_,r(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(r){ue(this,wf)!==r&&(Ge(this,wf,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(t=>{t(r)})}isFocused(){var r;return typeof ue(this,wf)=="boolean"?ue(this,wf):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},wf=new WeakMap,s_=new WeakMap,Dh=new WeakMap,KO);const bj=new FK,HK=RK;function qK(){let e=[],r=0,t=i=>{i()},n=i=>{i()},s=HK;const o=i=>{r?e.push(i):s(()=>{t(i)})},a=()=>{const i=e;e=[],i.length&&s(()=>{n(()=>{i.forEach(c=>{t(c)})})})};return{batch:i=>{let c;r++;try{c=i()}finally{r--,r||a()}return c},batchCalls:i=>(...c)=>{o(()=>{i(...c)})},schedule:o,setNotifyFunction:i=>{t=i},setBatchNotifyFunction:i=>{n=i},setScheduler:i=>{s=i}}}const qn=qK();var Lh,o_,Ih,VO,UK=(VO=class extends ld{constructor(){super();ft(this,Lh,!0);ft(this,o_);ft(this,Ih);Ge(this,Ih,r=>{if(typeof window<"u"&&window.addEventListener){const t=()=>r(!0),n=()=>r(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){ue(this,o_)||this.setEventListener(ue(this,Ih))}onUnsubscribe(){var r;this.hasListeners()||((r=ue(this,o_))==null||r.call(this),Ge(this,o_,void 0))}setEventListener(r){var t;Ge(this,Ih,r),(t=ue(this,o_))==null||t.call(this),Ge(this,o_,r(this.setOnline.bind(this)))}setOnline(r){ue(this,Lh)!==r&&(Ge(this,Lh,r),this.listeners.forEach(t=>{t(r)}))}isOnline(){return ue(this,Lh)}},Lh=new WeakMap,o_=new WeakMap,Ih=new WeakMap,VO);const tb=new UK;function GK(e){return Math.min(1e3*2**e,3e4)}function c$(e){return(e??"online")==="online"?tb.isOnline():!0}var rb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function WK(e){return e instanceof rb}function l$(e){let r=!1,t=0,n,s="pending",o,a;const i=new Promise((w,y)=>{o=w,a=y});i.catch(jo);const c=()=>s!=="pending",u=w=>{var y;if(!c()){const S=new rb(w);x(S),(y=e.onCancel)==null||y.call(e,S)}},d=()=>{r=!0},_=()=>{r=!1},p=()=>bj.isFocused()&&(e.networkMode==="always"||tb.isOnline())&&e.canRun(),m=()=>c$(e.networkMode)&&e.canRun(),k=w=>{c()||(n==null||n(),s="resolved",o(w))},x=w=>{c()||(n==null||n(),s="rejected",a(w))},v=()=>new Promise(w=>{var y;n=S=>{(c()||p())&&w(S)},(y=e.onPause)==null||y.call(e)}).then(()=>{var w;n=void 0,c()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(c())return;let w;const y=t===0?e.initialPromise:void 0;try{w=y??e.fn()}catch(S){w=Promise.reject(S)}Promise.resolve(w).then(k).catch(S=>{var M;if(c())return;const z=e.retry??(vj()?0:3),N=e.retryDelay??GK,A=typeof N=="function"?N(t,S):N,E=z===!0||typeof z=="number"&&tp()?void 0:v()).then(()=>{r?x(S):b()})})};return{promise:i,status:()=>s,cancel:u,continue:()=>(n==null||n(),i),cancelRetry:d,continueRetry:_,canStart:m,start:()=>(m()?b():v().then(b),i)}}var kf,QO,u$=(QO=class{constructor(){ft(this,kf)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),o$(this.gcTime)&&Ge(this,kf,vf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vj()?1/0:3e5))}clearGcTimeout(){ue(this,kf)!==void 0&&(vf.clearTimeout(ue(this,kf)),Ge(this,kf,void 0))}},kf=new WeakMap,QO);function KK(e){return{onFetch:(r,t)=>{var d,_,p,m,k;const n=r.options,s=(p=(_=(d=r.fetchOptions)==null?void 0:d.meta)==null?void 0:_.fetchMore)==null?void 0:p.direction,o=((m=r.state.data)==null?void 0:m.pages)||[],a=((k=r.state.data)==null?void 0:k.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const u=async()=>{let x=!1;const v=y=>{PK(y,()=>r.signal,()=>x=!0)},b=i$(r.options,r.fetchOptions),w=async(y,S,z)=>{if(x)return Promise.reject(r.signal.reason);if(S==null&&y.pages.length)return Promise.resolve(y);const A=(()=>{const D={client:r.client,queryKey:r.queryKey,pageParam:S,direction:z?"backward":"forward",meta:r.options.meta};return v(D),D})(),E=await b(A),{maxPages:M}=r.options,$=z?IK:LK;return{pages:$(y.pages,E,M),pageParams:$(y.pageParams,S,M)}};if(s&&o.length){const y=s==="backward",S=y?_$:v4,z={pages:o,pageParams:a};i=await w(z,S(n,z),y)}else{const y=e??o.length;do{const S=c===0?a[0]??n.initialPageParam:v4(n,i);if(c>0&&S==null)break;i=await w(i,S),c++}while(c{var x,v;return(v=(x=r.options).persister)==null?void 0:v.call(x,u,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},t)}:r.fetchFn=u}}}function v4(e,{pages:r,pageParams:t}){const n=r.length-1;return r.length>0?e.getNextPageParam(r[n],r,t[n],t):void 0}function _$(e,{pages:r,pageParams:t}){var n;return r.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,r[0],r,t[0],t):void 0}function VK(e,r){return r?v4(e,r)!=null:!1}function QK(e,r){return!r||!e.getPreviousPageParam?!1:_$(e,r)!=null}var Ph,jf,Bh,bi,Sf,$s,qg,Cf,Ui,Pl,XO,XK=(XO=class extends u${constructor(r){super();ft(this,Ui);ft(this,Ph);ft(this,jf);ft(this,Bh);ft(this,bi);ft(this,Sf);ft(this,$s);ft(this,qg);ft(this,Cf);Ge(this,Cf,!1),Ge(this,qg,r.defaultOptions),this.setOptions(r.options),this.observers=[],Ge(this,Sf,r.client),Ge(this,bi,ue(this,Sf).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,Ge(this,jf,M8(this.options)),this.state=r.state??ue(this,jf),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ph)}get promise(){var r;return(r=ue(this,$s))==null?void 0:r.promise}setOptions(r){if(this.options={...ue(this,qg),...r},r!=null&&r._type&&Ge(this,Ph,r._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=M8(this.options);t.data!==void 0&&(this.setState(R8(t.data,t.dataUpdatedAt)),Ge(this,jf,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,bi).remove(this)}setData(r,t){const n=g4(this.state.data,r,this.options);return Kt(this,Ui,Pl).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(r){Kt(this,Ui,Pl).call(this,{type:"setState",state:r})}cancel(r){var n,s;const t=(n=ue(this,$s))==null?void 0:n.promise;return(s=ue(this,$s))==null||s.cancel(r),t?t.then(jo).catch(jo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,jf)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(r=>es(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mj||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>es(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!a$(this.state.dataUpdatedAt,r)}onFocus(){var r,t;(r=this.observers.find(n=>n.shouldFetchOnWindowFocus()))==null||r.refetch({cancelRefetch:!1}),(t=ue(this,$s))==null||t.continue()}onOnline(){var r,t;(r=this.observers.find(n=>n.shouldFetchOnReconnect()))==null||r.refetch({cancelRefetch:!1}),(t=ue(this,$s))==null||t.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),ue(this,bi).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){const t=this.observers.indexOf(r);t!==-1&&(this.observers.splice(t,1),this.observers.length||(ue(this,$s)&&(ue(this,Cf)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,$s).cancel({revert:!0}):ue(this,$s).cancelRetry()),this.scheduleGc()),ue(this,bi).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Kt(this,Ui,Pl).call(this,{type:"invalidate"})}async fetch(r,t){var u,d,_,p,m,k,x,v,b,w,y,S;if(this.state.fetchStatus!=="idle"&&((u=ue(this,$s))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,$s))return ue(this,$s).continueRetry(),ue(this,$s).promise}if(r&&this.setOptions(r),!this.options.queryFn){const z=this.observers.find(N=>N.options.queryFn);z&&this.setOptions(z.options)}const n=new AbortController,s=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(Ge(this,Cf,!0),n.signal)})},o=()=>{const z=i$(this.options,t),A=(()=>{const E={client:ue(this,Sf),queryKey:this.queryKey,meta:this.meta};return s(E),E})();return Ge(this,Cf,!1),this.options.persister?this.options.persister(z,A,this):z(A)},i=(()=>{const z={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,Sf),state:this.state,fetchFn:o};return s(z),z})();(d=ue(this,Ph)==="infinite"?KK(this.options.pages):this.options.behavior)==null||d.onFetch(i,this),Ge(this,Bh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((_=i.fetchOptions)==null?void 0:_.meta))&&Kt(this,Ui,Pl).call(this,{type:"fetch",meta:(p=i.fetchOptions)==null?void 0:p.meta});const c=Ge(this,$s,l$({initialPromise:t==null?void 0:t.initialPromise,fn:i.fetchFn,onCancel:z=>{z instanceof rb&&z.revert&&this.setState({...ue(this,Bh),fetchStatus:"idle"}),n.abort()},onFail:(z,N)=>{Kt(this,Ui,Pl).call(this,{type:"failed",failureCount:z,error:N})},onPause:()=>{Kt(this,Ui,Pl).call(this,{type:"pause"})},onContinue:()=>{Kt(this,Ui,Pl).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const z=await c.start();if(z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(z),(k=(m=ue(this,bi).config).onSuccess)==null||k.call(m,z,this),(v=(x=ue(this,bi).config).onSettled)==null||v.call(x,z,this.state.error,this),z}catch(z){if(z instanceof rb){if(z.silent)return ue(this,$s).promise;if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw Kt(this,Ui,Pl).call(this,{type:"error",error:z}),(w=(b=ue(this,bi).config).onError)==null||w.call(b,z,this),(S=(y=ue(this,bi).config).onSettled)==null||S.call(y,this.state.data,z,this),z}finally{ue(this,$s)===c&&Ge(this,$s,void 0),this.scheduleGc()}}},Ph=new WeakMap,jf=new WeakMap,Bh=new WeakMap,bi=new WeakMap,Sf=new WeakMap,$s=new WeakMap,qg=new WeakMap,Cf=new WeakMap,Ui=new WeakSet,Pl=function(r){const t=n=>{switch(r.type){case"failed":return{...n,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...f$(n.data,this.options),fetchMeta:r.meta??null};case"success":const s={...n,...R8(r.data,r.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,Bh,r.manual?s:void 0),s;case"error":const o=r.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...r.state}}};this.state=t(this.state),qn.batch(()=>{this.observers.slice().forEach(n=>{n.onQueryUpdate()}),ue(this,bi).notify({query:this,type:"updated",action:r})})},XO);function f$(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:c$(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function R8(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function M8(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,t=r!==void 0,n=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Ho,Ir,Ug,qo,zf,Fh,ql,Gg,Hh,qh,Ef,Nf,a_,Uh,Xr,$m,b4,y4,x4,w4,k4,j4,S4,C4,YO,_y=(YO=class extends ld{constructor(r,t){super();ft(this,Xr);ft(this,Ho);ft(this,Ir);ft(this,Ug);ft(this,qo);ft(this,zf);ft(this,Fh);ft(this,ql);ft(this,Gg);ft(this,Hh);ft(this,qh);ft(this,Ef);ft(this,Nf);ft(this,a_);ft(this,Uh,new Set);this.options=t,Ge(this,Ho,r),Ge(this,ql,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Ir).addObserver(this),O8(ue(this,Ir),this.options)?Kt(this,Xr,$m).call(this):this.updateResult(),Kt(this,Xr,k4).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return z4(ue(this,Ir),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return z4(ue(this,Ir),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Kt(this,Xr,j4).call(this),Kt(this,Xr,S4).call(this),ue(this,Ir).removeObserver(this)}setOptions(r){const t=this.options,n=ue(this,Ir);if(this.options=ue(this,Ho).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof es(this.options.enabled,ue(this,Ir))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Kt(this,Xr,C4).call(this),ue(this,Ir).setOptions(this.options),t._defaulted&&!Hm(this.options,t)&&ue(this,Ho).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Ir),observer:this});const s=this.hasListeners();s&&$8(ue(this,Ir),n,this.options,t)&&Kt(this,Xr,$m).call(this),this.updateResult(),s&&(ue(this,Ir)!==n||es(this.options.enabled,ue(this,Ir))!==es(t.enabled,ue(this,Ir))||es(this.options.staleTime,ue(this,Ir))!==es(t.staleTime,ue(this,Ir)))&&Kt(this,Xr,y4).call(this);const o=Kt(this,Xr,x4).call(this);s&&(ue(this,Ir)!==n||es(this.options.enabled,ue(this,Ir))!==es(t.enabled,ue(this,Ir))||o!==ue(this,a_))&&Kt(this,Xr,w4).call(this,o)}getOptimisticResult(r){const t=ue(this,Ho).getQueryCache().build(ue(this,Ho),r),n=this.createResult(t,r);return Hm(this.getCurrentResult(),n)||(Ge(this,qo,n),Ge(this,Fh,this.options),Ge(this,zf,ue(this,Ir).state)),n}getCurrentResult(){return ue(this,qo)}trackResult(r,t){return new Proxy(r,{get:(n,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(n,s))})}trackProp(r){ue(this,Uh).add(r)}getCurrentQuery(){return ue(this,Ir)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const t=ue(this,Ho).defaultQueryOptions(r),n=ue(this,Ho).getQueryCache().build(ue(this,Ho),t);let s=()=>{},o;const a=new Promise(i=>{o=i,s=ue(this,Ho).getQueryCache().subscribe(c=>{c.type==="updated"&&c.query.queryHash===n.queryHash&&n.state.data!==void 0&&(s(),i(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{const i=this.createResult(n,t);return o==null||o(i),i}).finally(()=>{s()}),a])}fetch(r){return Kt(this,Xr,$m).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,qo)))}createResult(r,t){var N;const n=ue(this,Ir),s=this.options,o=ue(this,qo),a=ue(this,zf),i=ue(this,Fh),c=r!==n?r.state:ue(this,Ug),{state:u}=r;let d={...u},_=!1,p;if(t._optimisticResults){const A=this.hasListeners(),E=!A&&O8(r,t),M=A&&$8(r,n,t,s);(E||M)&&(d={...d,...f$(u.data,r.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:k,status:x}=d;p=d.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&x==="pending"){let A;o!=null&&o.isPlaceholderData&&t.placeholderData===(i==null?void 0:i.placeholderData)?(A=o.data,v=!0):A=typeof t.placeholderData=="function"?t.placeholderData((N=ue(this,qh))==null?void 0:N.state.data,ue(this,qh)):t.placeholderData,A!==void 0&&(x="success",p=g4(o==null?void 0:o.data,A,t),_=!0)}if(t.select&&p!==void 0&&!v)if(o&&p===(a==null?void 0:a.data)&&t.select===ue(this,Gg))p=ue(this,Hh);else try{Ge(this,Gg,t.select),p=t.select(p),p=g4(o==null?void 0:o.data,p,t),Ge(this,Hh,p),Ge(this,ql,null)}catch(A){Ge(this,ql,A)}else p===void 0&&Ge(this,ql,null);ue(this,ql)&&(m=ue(this,ql),p=ue(this,Hh),k=Date.now(),x="error",_=!1);const b=d.fetchStatus==="fetching",w=x==="pending",y=x==="error",S=w&&b,z=p!==void 0;return{status:x,fetchStatus:d.fetchStatus,isPending:w,isSuccess:x==="success",isError:y,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:k,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:r.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:y&&!z,isPaused:d.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:y&&z,isStale:yj(r,t),refetch:this.refetch,isEnabled:es(t.enabled,r)!==!1}}updateResult(){const r=ue(this,qo),t=this.createResult(ue(this,Ir),this.options);if(Ge(this,zf,ue(this,Ir).state),Ge(this,Fh,this.options),ue(this,zf).data!==void 0&&Ge(this,qh,ue(this,Ir)),Hm(t,r))return;Ge(this,qo,t);const s=(()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!ue(this,Uh).size)return!0;const i=new Set(a??ue(this,Uh));return this.options.throwOnError&&i.add("error"),Object.keys(ue(this,qo)).some(c=>{const u=c;return ue(this,qo)[u]!==r[u]&&i.has(u)})})();qn.batch(()=>{s&&this.listeners.forEach(o=>{o(ue(this,qo))}),ue(this,Ho).getQueryCache().notify({query:ue(this,Ir),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Kt(this,Xr,k4).call(this)}},Ho=new WeakMap,Ir=new WeakMap,Ug=new WeakMap,qo=new WeakMap,zf=new WeakMap,Fh=new WeakMap,ql=new WeakMap,Gg=new WeakMap,Hh=new WeakMap,qh=new WeakMap,Ef=new WeakMap,Nf=new WeakMap,a_=new WeakMap,Uh=new WeakMap,Xr=new WeakSet,$m=function(r){Kt(this,Xr,C4).call(this);let t=ue(this,Ir).fetch(this.options,r);return r!=null&&r.throwOnError||(t=t.catch(jo)),t},b4=function(r){return!vj()&&es(this.options.enabled,ue(this,Ir))!==!1&&o$(r)},y4=function(){Kt(this,Xr,j4).call(this);const r=es(this.options.staleTime,ue(this,Ir));if(ue(this,qo).isStale||!Kt(this,Xr,b4).call(this,r))return;const t=a$(ue(this,qo).dataUpdatedAt,r)+1;Ge(this,Ef,vf.setTimeout(()=>{ue(this,qo).isStale||this.updateResult()},t))},x4=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Ir)):this.options.refetchInterval)??!1},w4=function(r){Kt(this,Xr,S4).call(this),Ge(this,a_,r),!(ue(this,a_)===0||!Kt(this,Xr,b4).call(this,ue(this,a_)))&&Ge(this,Nf,vf.setInterval(()=>{(this.options.refetchIntervalInBackground||bj.isFocused())&&Kt(this,Xr,$m).call(this)},ue(this,a_)))},k4=function(){Kt(this,Xr,y4).call(this),Kt(this,Xr,w4).call(this,Kt(this,Xr,x4).call(this))},j4=function(){ue(this,Ef)!==void 0&&(vf.clearTimeout(ue(this,Ef)),Ge(this,Ef,void 0))},S4=function(){ue(this,Nf)!==void 0&&(vf.clearInterval(ue(this,Nf)),Ge(this,Nf,void 0))},C4=function(){const r=ue(this,Ho).getQueryCache().build(ue(this,Ho),this.options);if(r===ue(this,Ir))return;const t=ue(this,Ir);Ge(this,Ir,r),Ge(this,Ug,r.state),this.hasListeners()&&(t==null||t.removeObserver(this),r.addObserver(this))},YO);function YK(e,r){return es(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&es(r.retryOnMount,e)===!1)}function O8(e,r){return YK(e,r)||e.state.data!==void 0&&z4(e,r,r.refetchOnMount)}function z4(e,r,t){if(es(r.enabled,e)!==!1&&es(r.staleTime,e)!=="static"){const n=typeof t=="function"?t(e):t;return n==="always"||n!==!1&&yj(e,r)}return!1}function $8(e,r,t,n){return(e!==r||es(n.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&yj(e,t)}function yj(e,r){return es(r.enabled,e)!==!1&&e.isStaleByTime(es(r.staleTime,e))}var ZK=class extends _y{constructor(e,r){super(e,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,r){var m,k;const{state:t}=e,n=super.createResult(e,r),{isFetching:s,isRefetching:o,isError:a,isRefetchError:i}=n,c=(k=(m=t.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:k.direction,u=a&&c==="forward",d=s&&c==="forward",_=a&&c==="backward",p=s&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:VK(r,t.data),hasPreviousPage:QK(r,t.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:_,isFetchingPreviousPage:p,isRefetchError:i&&!u&&!_,isRefetching:o&&!d&&!p}}},Wg,Tc,xo,Af,Rc,Yu,ZO,JK=(ZO=class extends u${constructor(r){super();ft(this,Rc);ft(this,Wg);ft(this,Tc);ft(this,xo);ft(this,Af);Ge(this,Wg,r.client),this.mutationId=r.mutationId,Ge(this,xo,r.mutationCache),Ge(this,Tc,[]),this.state=r.state||d$(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){ue(this,Tc).includes(r)||(ue(this,Tc).push(r),this.clearGcTimeout(),ue(this,xo).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){Ge(this,Tc,ue(this,Tc).filter(t=>t!==r)),this.scheduleGc(),ue(this,xo).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){ue(this,Tc).length||(this.state.status==="pending"?this.scheduleGc():ue(this,xo).remove(this))}continue(){var r;return((r=ue(this,Af))==null?void 0:r.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(r){var i,c,u,d,_,p,m,k,x,v,b,w,y,S,z,N,A,E;const t=()=>{Kt(this,Rc,Yu).call(this,{type:"continue"})},n={client:ue(this,Wg),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,Af,l$({fn:()=>this.options.mutationFn?this.options.mutationFn(r,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,$)=>{Kt(this,Rc,Yu).call(this,{type:"failed",failureCount:M,error:$})},onPause:()=>{Kt(this,Rc,Yu).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,xo).canRun(this)})),o=this.state.status==="pending",a=!s.canStart();try{if(o)t();else{Kt(this,Rc,Yu).call(this,{type:"pending",variables:r,isPaused:a}),ue(this,xo).config.onMutate&&await ue(this,xo).config.onMutate(r,this,n);const $=await((c=(i=this.options).onMutate)==null?void 0:c.call(i,r,n));$!==this.state.context&&Kt(this,Rc,Yu).call(this,{type:"pending",context:$,variables:r,isPaused:a})}const M=await s.start();return await((d=(u=ue(this,xo).config).onSuccess)==null?void 0:d.call(u,M,r,this.state.context,this,n)),await((p=(_=this.options).onSuccess)==null?void 0:p.call(_,M,r,this.state.context,n)),await((k=(m=ue(this,xo).config).onSettled)==null?void 0:k.call(m,M,null,this.state.variables,this.state.context,this,n)),await((v=(x=this.options).onSettled)==null?void 0:v.call(x,M,null,r,this.state.context,n)),Kt(this,Rc,Yu).call(this,{type:"success",data:M}),M}catch(M){try{await((w=(b=ue(this,xo).config).onError)==null?void 0:w.call(b,M,r,this.state.context,this,n))}catch($){Promise.reject($)}try{await((S=(y=this.options).onError)==null?void 0:S.call(y,M,r,this.state.context,n))}catch($){Promise.reject($)}try{await((N=(z=ue(this,xo).config).onSettled)==null?void 0:N.call(z,void 0,M,this.state.variables,this.state.context,this,n))}catch($){Promise.reject($)}try{await((E=(A=this.options).onSettled)==null?void 0:E.call(A,void 0,M,r,this.state.context,n))}catch($){Promise.reject($)}throw Kt(this,Rc,Yu).call(this,{type:"error",error:M}),M}finally{ue(this,Af)===s&&Ge(this,Af,void 0),ue(this,xo).runNext(this)}}},Wg=new WeakMap,Tc=new WeakMap,xo=new WeakMap,Af=new WeakMap,Rc=new WeakSet,Yu=function(r){const t=n=>{switch(r.type){case"failed":return{...n,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...n,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:r.error,failureCount:n.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=t(this.state),qn.batch(()=>{ue(this,Tc).forEach(n=>{n.onMutationUpdate(r)}),ue(this,xo).notify({mutation:this,type:"updated",action:r})})},ZO);function d$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ul,Gi,Kg,JO,eV=(JO=class extends ld{constructor(r={}){super();ft(this,Ul);ft(this,Gi);ft(this,Kg);this.config=r,Ge(this,Ul,new Set),Ge(this,Gi,new Map),Ge(this,Kg,0)}build(r,t,n){const s=new JK({client:r,mutationCache:this,mutationId:++hm(this,Kg)._,options:r.defaultMutationOptions(t),state:n});return this.add(s),s}add(r){ue(this,Ul).add(r);const t=Nv(r);if(typeof t=="string"){const n=ue(this,Gi).get(t);n?n.push(r):ue(this,Gi).set(t,[r])}this.notify({type:"added",mutation:r})}remove(r){if(ue(this,Ul).delete(r)){const t=Nv(r);if(typeof t=="string"){const n=ue(this,Gi).get(t);if(n)if(n.length>1){const s=n.indexOf(r);s!==-1&&n.splice(s,1)}else n[0]===r&&ue(this,Gi).delete(t)}}this.notify({type:"removed",mutation:r})}canRun(r){var n;const t=Nv(r);if(typeof t=="string"){const s=(n=ue(this,Gi).get(t))==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===r}else return!0}runNext(r){var n,s;const t=Nv(r);return typeof t=="string"?((s=(n=ue(this,Gi).get(t))==null?void 0:n.find(o=>o!==r&&o.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){qn.batch(()=>{ue(this,Ul).forEach(r=>{this.notify({type:"removed",mutation:r})}),ue(this,Ul).clear(),ue(this,Gi).clear()})}getAll(){return Array.from(ue(this,Ul))}find(r){const t={exact:!0,...r};return this.getAll().find(n=>N8(t,n))}findAll(r={}){return this.getAll().filter(t=>N8(r,t))}notify(r){qn.batch(()=>{this.listeners.forEach(t=>{t(r)})})}resumePausedMutations(){const r=this.getAll().filter(t=>t.state.isPaused);return qn.batch(()=>Promise.all(r.map(t=>t.continue().catch(jo))))}},Ul=new WeakMap,Gi=new WeakMap,Kg=new WeakMap,JO);function Nv(e){var r;return(r=e.options.scope)==null?void 0:r.id}var Gl,i_,wo,Wl,Ic,Dm,E4,e$,tV=(e$=class extends ld{constructor(t,n){super();ft(this,Ic);ft(this,Gl);ft(this,i_);ft(this,wo);ft(this,Wl);Ge(this,Gl,t),this.setOptions(n),this.bindMethods(),Kt(this,Ic,Dm).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=ue(this,Gl).defaultMutationOptions(t),Hm(this.options,n)||ue(this,Gl).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,wo),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Hf(n.mutationKey)!==Hf(this.options.mutationKey)?this.reset():((s=ue(this,wo))==null?void 0:s.state.status)==="pending"&&ue(this,wo).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,wo)&&(ue(this,wo).addObserver(this),Kt(this,Ic,Dm).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,wo))==null||t.removeObserver(this)}onMutationUpdate(t){Kt(this,Ic,Dm).call(this),Kt(this,Ic,E4).call(this,t)}getCurrentResult(){return ue(this,i_)}reset(){var t;(t=ue(this,wo))==null||t.removeObserver(this),Ge(this,wo,void 0),Kt(this,Ic,Dm).call(this),Kt(this,Ic,E4).call(this)}mutate(t,n){var s;return Ge(this,Wl,n),(s=ue(this,wo))==null||s.removeObserver(this),Ge(this,wo,ue(this,Gl).getMutationCache().build(ue(this,Gl),this.options)),ue(this,wo).addObserver(this),ue(this,wo).execute(t)}},Gl=new WeakMap,i_=new WeakMap,wo=new WeakMap,Wl=new WeakMap,Ic=new WeakSet,Dm=function(){var n;const t=((n=ue(this,wo))==null?void 0:n.state)??d$();Ge(this,i_,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},E4=function(t){qn.batch(()=>{var n,s,o,a,i,c,u,d;if(ue(this,Wl)&&this.hasListeners()){const _=ue(this,i_).variables,p=ue(this,i_).context,m={client:ue(this,Gl),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(n=ue(this,Wl)).onSuccess)==null||s.call(n,t.data,_,p,m)}catch(k){Promise.reject(k)}try{(a=(o=ue(this,Wl)).onSettled)==null||a.call(o,t.data,null,_,p,m)}catch(k){Promise.reject(k)}}else if((t==null?void 0:t.type)==="error"){try{(c=(i=ue(this,Wl)).onError)==null||c.call(i,t.error,_,p,m)}catch(k){Promise.reject(k)}try{(d=(u=ue(this,Wl)).onSettled)==null||d.call(u,void 0,t.error,_,p,m)}catch(k){Promise.reject(k)}}}this.listeners.forEach(_=>{_(ue(this,i_))})})},e$);function D8(e,r){const t=new Set(r);return e.filter(n=>!t.has(n))}var Gh,Uo,Wh,Tf,Da,Rf,Vg,Qg,Xg,Yg,Ps,N4,A4,h$,T4,R4,M4,t$,rV=(t$=class extends ld{constructor(r,t,n){super();ft(this,Ps);ft(this,Gh);ft(this,Uo);ft(this,Wh);ft(this,Tf);ft(this,Da);ft(this,Rf);ft(this,Vg);ft(this,Qg);ft(this,Xg);ft(this,Yg,[]);Ge(this,Gh,r),Ge(this,Tf,n),Ge(this,Wh,[]),Ge(this,Da,[]),Ge(this,Uo,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,Da).forEach(r=>{r.subscribe(t=>{Kt(this,Ps,R4).call(this,r,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,Da).forEach(r=>{r.destroy()})}setQueries(r,t){Ge(this,Wh,r),Ge(this,Tf,t),qn.batch(()=>{const n=ue(this,Da),s=Kt(this,Ps,T4).call(this,ue(this,Wh));s.forEach(_=>_.observer.setOptions(_.defaultedQueryOptions));const o=s.map(_=>_.observer),a=o.map(_=>_.getCurrentResult()),i=n.length!==o.length,c=o.some((_,p)=>_!==n[p]),u=i||c,d=u?!0:a.some((_,p)=>{const m=ue(this,Uo)[p];return!m||!Hm(_,m)});!u&&!d||(u&&(Ge(this,Yg,s),Ge(this,Da,o)),Ge(this,Uo,a),this.hasListeners()&&(u&&(D8(n,o).forEach(_=>{_.destroy()}),D8(o,n).forEach(_=>{_.subscribe(p=>{Kt(this,Ps,R4).call(this,_,p)})})),Kt(this,Ps,M4).call(this)))})}getCurrentResult(){return ue(this,Uo)}getQueries(){return ue(this,Da).map(r=>r.getCurrentQuery())}getObservers(){return ue(this,Da)}getOptimisticResult(r,t){const n=Kt(this,Ps,T4).call(this,r),s=n.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),o=n.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Kt(this,Ps,A4).call(this,a??s,t,o),()=>Kt(this,Ps,N4).call(this,s,n)]}},Gh=new WeakMap,Uo=new WeakMap,Wh=new WeakMap,Tf=new WeakMap,Da=new WeakMap,Rf=new WeakMap,Vg=new WeakMap,Qg=new WeakMap,Xg=new WeakMap,Yg=new WeakMap,Ps=new WeakSet,N4=function(r,t){const n=new Set;return t.map((s,o)=>{const a=r[o];return s.defaultedQueryOptions.notifyOnChangeProps?a:s.observer.trackResult(a,i=>{n.has(i)||(n.add(i),t.forEach(c=>{c.observer.trackProp(i)}))})})},A4=function(r,t,n){if(t){const s=ue(this,Xg),o=n!==void 0&&s!==void 0&&(s.length!==n.length||n.some((a,i)=>a!==s[i]));return(ue(this,Uo)!==ue(this,Qg)||o||t!==ue(this,Vg))&&(Ge(this,Vg,t),Ge(this,Qg,ue(this,Uo)),n!==void 0&&Ge(this,Xg,n),Ge(this,Rf,pj(ue(this,Rf),t(r)))),ue(this,Rf)}return r},h$=function(){var r;return!((r=ue(this,Tf))!=null&&r.combine)||ue(this,Da).some((t,n)=>{var s;return t.options.suspense&&((s=ue(this,Uo)[n])==null?void 0:s.data)===void 0})},T4=function(r){const t=new Map;ue(this,Da).forEach(s=>{const o=s.options.queryHash;if(!o)return;const a=t.get(o);a?a.push(s):t.set(o,[s])});const n=[];return r.forEach(s=>{var i;const o=ue(this,Gh).defaultQueryOptions(s),a=((i=t.get(o.queryHash))==null?void 0:i.shift())??new _y(ue(this,Gh),o);n.push({defaultedQueryOptions:o,observer:a})}),n},R4=function(r,t){const n=ue(this,Da).indexOf(r);n!==-1&&(Ge(this,Uo,ue(this,Uo).slice()),ue(this,Uo)[n]=t,Kt(this,Ps,M4).call(this))},M4=function(){var r;if(this.hasListeners()){const t=Kt(this,Ps,h$).call(this),n=ue(this,Rf),s=t?n:Kt(this,Ps,A4).call(this,Kt(this,Ps,N4).call(this,ue(this,Uo),ue(this,Yg)),(r=ue(this,Tf))==null?void 0:r.combine);(t||n!==s)&&qn.batch(()=>{this.listeners.forEach(o=>{o(ue(this,Uo))})})}},t$),Mc,r$,nV=(r$=class extends ld{constructor(r={}){super();ft(this,Mc);this.config=r,Ge(this,Mc,new Map)}build(r,t,n){const s=t.queryKey,o=t.queryHash??hj(s,t);let a=this.get(o);return a||(a=new XK({client:r,queryKey:s,queryHash:o,options:r.defaultQueryOptions(t),state:n,defaultOptions:r.getQueryDefaults(s)}),this.add(a)),a}add(r){ue(this,Mc).has(r.queryHash)||(ue(this,Mc).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const t=ue(this,Mc).get(r.queryHash);t&&(r.destroy(),t===r&&ue(this,Mc).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){qn.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return ue(this,Mc).get(r)}getAll(){return[...ue(this,Mc).values()]}find(r){const t={exact:!0,...r};return this.getAll().find(n=>E8(t,n))}findAll(r={}){const t=this.getAll();return Object.keys(r).length>0?t.filter(n=>E8(r,n)):t}notify(r){qn.batch(()=>{this.listeners.forEach(t=>{t(r)})})}onFocus(){qn.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){qn.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},Mc=new WeakMap,r$),Fn,c_,l_,Kh,Vh,u_,Qh,Xh,n$,sV=(n$=class{constructor(e={}){ft(this,Fn);ft(this,c_);ft(this,l_);ft(this,Kh);ft(this,Vh);ft(this,u_);ft(this,Qh);ft(this,Xh);Ge(this,Fn,e.queryCache||new nV),Ge(this,c_,e.mutationCache||new eV),Ge(this,l_,e.defaultOptions||{}),Ge(this,Kh,new Map),Ge(this,Vh,new Map),Ge(this,u_,0)}mount(){hm(this,u_)._++,ue(this,u_)===1&&(Ge(this,Qh,bj.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Fn).onFocus())})),Ge(this,Xh,tb.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Fn).onOnline())})))}unmount(){var e,r;hm(this,u_)._--,ue(this,u_)===0&&((e=ue(this,Qh))==null||e.call(this),Ge(this,Qh,void 0),(r=ue(this,Xh))==null||r.call(this),Ge(this,Xh,void 0))}isFetching(e){return ue(this,Fn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,c_).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Fn).get(r.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),t=ue(this,Fn).build(this,r),n=t.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(es(r.staleTime,t))&&this.prefetchQuery(r),Promise.resolve(n))}getQueriesData(e){return ue(this,Fn).findAll(e).map(({queryKey:r,state:t})=>[r,t.data])}setQueryData(e,r,t){var a;const n=this.defaultQueryOptions({queryKey:e}),s=(a=ue(this,Fn).get(n.queryHash))==null?void 0:a.state.data,o=OK(r,s);if(o!==void 0)return ue(this,Fn).build(this,n).setData(o,{...t,manual:!0})}setQueriesData(e,r,t){return qn.batch(()=>ue(this,Fn).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,r,t)]))}getQueryState(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Fn).get(r.queryHash))==null?void 0:t.state}removeQueries(e){const r=ue(this,Fn);qn.batch(()=>{r.findAll(e).forEach(t=>{r.remove(t)})})}resetQueries(e,r){const t=ue(this,Fn);return qn.batch(()=>{const n=t.findAll(e),s=new Set(n);return n.forEach(o=>{o.reset()}),this.refetchQueries({type:"active",predicate:o=>s.has(o)},r)})}cancelQueries(e,r={}){const t={revert:!0,...r},n=qn.batch(()=>ue(this,Fn).findAll(e).map(s=>s.cancel(t)));return Promise.all(n).then(jo).catch(jo)}invalidateQueries(e,r={}){return qn.batch(()=>(ue(this,Fn).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},r)))}refetchQueries(e,r={}){const t={...r,cancelRefetch:r.cancelRefetch??!0},n=qn.batch(()=>ue(this,Fn).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,t);return t.throwOnError||(o=o.catch(jo)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(jo)}async query(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const t=ue(this,Fn).build(this,r),n=t.isStaleByTime(es(r.staleTime,t))?await t.fetch(r):t.state.data,s=r.select;return s?s(n):n}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const t=ue(this,Fn).build(this,r);return t.isStaleByTime(es(r.staleTime,t))?t.fetch(r):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jo).catch(jo)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jo).catch(jo)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return tb.isOnline()?ue(this,c_).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Fn)}getMutationCache(){return ue(this,c_)}getDefaultOptions(){return ue(this,l_)}setDefaultOptions(e){Ge(this,l_,e)}setQueryDefaults(e,r){ue(this,Kh).set(Hf(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...ue(this,Kh).values()],t={};return r.forEach(n=>{ep(e,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(e,r){ue(this,Vh).set(Hf(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...ue(this,Vh).values()],t={};return r.forEach(n=>{ep(e,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const r={...ue(this,l_).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=hj(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===mj&&(r.enabled=!1),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,l_).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Fn).clear(),ue(this,c_).clear()}},Fn=new WeakMap,c_=new WeakMap,l_=new WeakMap,Kh=new WeakMap,Vh=new WeakMap,u_=new WeakMap,Qh=new WeakMap,Xh=new WeakMap,n$);const p$=T.createContext(!1),m$=()=>T.useContext(p$);p$.Provider;function oV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const aV=T.createContext(oV()),g$=()=>T.useContext(aV),v$=(e,r,t)=>{const n=t!=null&&t.state.error&&typeof e.throwOnError=="function"?gj(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||n)&&(r.isReset()||(e.retryOnMount=!1))},b$=e=>{T.useEffect(()=>{e.clearReset()},[e])},y$=({result:e,errorResetBoundary:r,throwOnError:t,query:n,suspense:s})=>e.isError&&!r.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||gj(t,[e.error,n])),x$=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>t(n(...s)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},O4=(e,r)=>(e==null?void 0:e.suspense)&&r.isPending,w$=(e,r,t)=>r.fetchOptimistic(e).catch(()=>{t.clearReset()});function k$({queries:e,...r},t){const n=o0(),s=m$(),o=g$(),a=r.subscribed!==!1,i=T.useMemo(()=>e.map(x=>{const v=n.defaultQueryOptions(x);return v._optimisticResults=s?"isRestoring":a?"optimistic":void 0,v}),[e,n,s,a]);i.forEach(x=>{x$(x);const v=n.getQueryCache().get(x.queryHash);v$(x,o,v)}),b$(o);const[c]=T.useState(()=>new rV(n,i,r)),[u,d,_]=c.getOptimisticResult(i,r.combine),p=!s&&a;T.useSyncExternalStore(T.useCallback(x=>p?c.subscribe(qn.batchCalls(x)):jo,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setQueries(i,r)},[i,r,c]);const m=u.some((x,v)=>O4(i[v],x))?u.flatMap((x,v)=>{const b=i[v];if(b&&O4(b,x)){const w=new _y(n,b);return w$(b,w,o)}return[]}):[];if(m.length>0)throw Promise.all(m);const k=u.find((x,v)=>{const b=i[v];return b&&y$({result:x,errorResetBoundary:o,throwOnError:b.throwOnError,query:n.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(k)throw k.error;return d(_())}function j$(e,r,t){const n=m$(),s=g$(),o=o0(),a=o.defaultQueryOptions(e),i=o.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=n?"isRestoring":c?"optimistic":void 0,x$(a),v$(a,s,i),b$(s);const[u]=T.useState(()=>new r(o,a)),d=u.getOptimisticResult(a),_=!n&&c;if(T.useSyncExternalStore(T.useCallback(p=>{const m=_?u.subscribe(qn.batchCalls(p)):jo;return u.updateResult(),m},[u,_]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),T.useEffect(()=>{u.setOptions(a)},[a,u]),O4(a,d))throw w$(a,u,s);if(y$({result:d,errorResetBoundary:s,throwOnError:a.throwOnError,query:i,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:u.trackResult(d)}function dt(e,r){return j$(e,_y)}function iV(e,r){const t=o0(),n=t.getQueryCache();return T.useSyncExternalStore(T.useCallback(s=>n.subscribe(qn.batchCalls(s)),[n]),()=>t.isFetching(e),()=>t.isFetching(e))}function mr(e,r){const t=o0(),[n]=T.useState(()=>new tV(t,e));T.useEffect(()=>{n.setOptions(e)},[n,e]);const s=T.useSyncExternalStore(T.useCallback(a=>n.subscribe(qn.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=T.useCallback((...a)=>{n.mutate(a[0],a[1]).catch(jo)},[n]);if(s.error&&gj(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}function cV(e,r){return j$(e,ZK)}const lV="modulepreload",uV=function(e){return"/"+e},L8={},_V=function(r,t,n){let s=Promise.resolve();if(t&&t.length>0){let a=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),c=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=a(t.map(u=>{if(u=uV(u),u in L8)return;L8[u]=!0;const d=u.endsWith(".css"),_=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${_}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":lV,d||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((m,k)=>{p.addEventListener("load",m),p.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=a,window.dispatchEvent(i),!i.defaultPrevented)throw a}return s.then(a=>{for(const i of a||[])i.status==="rejected"&&o(i.reason);return r().catch(o)})},Je=new sV({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),Pc=new Set;let I8=null,fy=0;const $4=new Set,fV=()=>fy,P8=e=>($4.add(e),()=>{$4.delete(e)}),Si=()=>["workspace",fy],Mt=(e,...r)=>[...Si(),e,...r];function dV(e,r=!1){if(I8===e&&!r)return!1;const t=Si();return I8=e,fy++,Pc.clear(),xj({queryKey:t}),$4.forEach(n=>n()),!0}const Wr=e=>e[1]===fy;async function xj(e){await Je.cancelQueries(e,{revert:!1}),Je.removeQueries(e)}function ts(e,r){if(Wr(e))return Je.setQueryData(e,r)}var h2={exports:{}},mm={},p2={exports:{}},m2={};/** + */var C8;function EK(){if(C8)return ur;C8=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),p=Symbol.iterator;function m(H){return H===null||typeof H!="object"?null:(H=p&&H[p]||H["@@iterator"],typeof H=="function"?H:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,v={};function b(H,q,U){this.props=H,this.context=q,this.refs=v,this.updater=U||k}b.prototype.isReactComponent={},b.prototype.setState=function(H,q){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,q,"setState")},b.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function x(){}x.prototype=b.prototype;function y(H,q,U){this.props=H,this.context=q,this.refs=v,this.updater=U||k}var S=y.prototype=new x;S.constructor=y,w(S,b.prototype),S.isPureReactComponent=!0;var E=Array.isArray;function N(){}var A={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function M(H,q,U){var oe=U.ref;return{$$typeof:e,type:H,key:q,ref:oe!==void 0?oe:null,props:U}}function $(H,q){return M(H.type,q,H.props)}function D(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function I(H){var q={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(U){return q[U]})}var G=/\/+/g;function F(H,q){return typeof H=="object"&&H!==null&&H.key!=null?I(""+H.key):q.toString(36)}function Q(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(N,N):(H.status="pending",H.then(function(q){H.status==="pending"&&(H.status="fulfilled",H.value=q)},function(q){H.status==="pending"&&(H.status="rejected",H.reason=q)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function K(H,q,U,oe,ie){var ce=typeof H;(ce==="undefined"||ce==="boolean")&&(H=null);var re=!1;if(H===null)re=!0;else switch(ce){case"bigint":case"string":case"number":re=!0;break;case"object":switch(H.$$typeof){case e:case r:re=!0;break;case d:return re=H._init,K(re(H._payload),q,U,oe,ie)}}if(re)return ie=ie(H),re=oe===""?"."+F(H,0):oe,E(ie)?(U="",re!=null&&(U=re.replace(G,"$&/")+"/"),K(ie,q,U,"",function(le){return le})):ie!=null&&(D(ie)&&(ie=$(ie,U+(ie.key==null||H&&H.key===ie.key?"":(""+ie.key).replace(G,"$&/")+"/")+re)),q.push(ie)),1;re=0;var W=oe===""?".":oe+":";if(E(H))for(var ae=0;ae{const r=T.useContext(s$);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},NK=({client:e,children:r})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(s$.Provider,{value:e,children:r})),AK={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)};var n_,dj,WO,TK=(WO=class{constructor(){ft(this,n_,AK);ft(this,dj,!1)}setTimeoutProvider(e){Ge(this,n_,e)}setTimeout(e,r){return ue(this,n_).setTimeout(e,r)}clearTimeout(e){ue(this,n_).clearTimeout(e)}setInterval(e,r){return ue(this,n_).setInterval(e,r)}clearInterval(e){ue(this,n_).clearInterval(e)}},n_=new WeakMap,dj=new WeakMap,WO);const vf=new TK;function RK(e){setTimeout(e,0)}const MK=typeof window>"u"||"Deno"in globalThis;function jo(){}function OK(e,r){return typeof e=="function"?e(r):e}function o$(e){return typeof e=="number"&&e>=0&&e!==1/0}function a$(e,r){return Math.max(e+(r||0)-Date.now(),0)}function es(e,r){return typeof e=="function"?e(r):e}function E8(e,r){const{type:t="all",exact:n,fetchStatus:s,predicate:o,queryKey:a,stale:i}=e;if(a){if(n){if(r.queryHash!==hj(a,r.options))return!1}else if(!ep(r.queryKey,a))return!1}if(t!=="all"){const c=r.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof i=="boolean"&&r.isStale()!==i||s&&s!==r.state.fetchStatus||o&&!o(r))}function N8(e,r){const{exact:t,status:n,predicate:s,mutationKey:o}=e;if(o){if(!r.options.mutationKey)return!1;if(t){if(Hf(r.options.mutationKey)!==Hf(o))return!1}else if(!ep(r.options.mutationKey,o))return!1}return!(n&&r.state.status!==n||s&&!s(r))}function hj(e,r){return((r==null?void 0:r.queryKeyHashFn)||Hf)(e)}function Hf(e){return JSON.stringify(e,(r,t)=>m4(t)?Object.keys(t).sort().reduce((n,s)=>(n[s]=t[s],n),{}):t)}function ep(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(Array.isArray(e)&&Array.isArray(r)){for(let n=0;n500)return r;const n=A8(e)&&A8(r);if(!n&&!(m4(e)&&m4(r)))return r;const s=(n?e:Object.keys(e)).length,o=n?r:Object.keys(r),a=o.length,i=n?new Array(a):{};let c=0;for(let u=0;u{vf.setTimeout(r,e)})}function g4(e,r,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,r):t.structuralSharing!==!1?pj(e,r):r}function LK(e,r,t=0){const n=[...e,r];return t&&n.length>t?n.slice(1):n}function IK(e,r,t=0){const n=[r,...e];return t&&n.length>t?n.slice(0,-1):n}const mj=Symbol();function i$(e,r){return!e.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!e.queryFn||e.queryFn===mj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gj(e,r){return typeof e=="function"?e(...r):!!e}function PK(e,r,t){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=r()),n||(n=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}let BK=()=>MK;const vj=()=>BK();var ld=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},wf,s_,Dh,KO,FK=(KO=class extends ld{constructor(){super();ft(this,wf);ft(this,s_);ft(this,Dh);Ge(this,Dh,r=>{if(typeof window<"u"&&window.addEventListener){const t=()=>r();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,s_)||this.setEventListener(ue(this,Dh))}onUnsubscribe(){var r;this.hasListeners()||((r=ue(this,s_))==null||r.call(this),Ge(this,s_,void 0))}setEventListener(r){var t;Ge(this,Dh,r),(t=ue(this,s_))==null||t.call(this),Ge(this,s_,r(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(r){ue(this,wf)!==r&&(Ge(this,wf,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(t=>{t(r)})}isFocused(){var r;return typeof ue(this,wf)=="boolean"?ue(this,wf):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},wf=new WeakMap,s_=new WeakMap,Dh=new WeakMap,KO);const bj=new FK,HK=RK;function qK(){let e=[],r=0,t=i=>{i()},n=i=>{i()},s=HK;const o=i=>{r?e.push(i):s(()=>{t(i)})},a=()=>{const i=e;e=[],i.length&&s(()=>{n(()=>{i.forEach(c=>{t(c)})})})};return{batch:i=>{let c;r++;try{c=i()}finally{r--,r||a()}return c},batchCalls:i=>(...c)=>{o(()=>{i(...c)})},schedule:o,setNotifyFunction:i=>{t=i},setBatchNotifyFunction:i=>{n=i},setScheduler:i=>{s=i}}}const qn=qK();var Lh,o_,Ih,VO,UK=(VO=class extends ld{constructor(){super();ft(this,Lh,!0);ft(this,o_);ft(this,Ih);Ge(this,Ih,r=>{if(typeof window<"u"&&window.addEventListener){const t=()=>r(!0),n=()=>r(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){ue(this,o_)||this.setEventListener(ue(this,Ih))}onUnsubscribe(){var r;this.hasListeners()||((r=ue(this,o_))==null||r.call(this),Ge(this,o_,void 0))}setEventListener(r){var t;Ge(this,Ih,r),(t=ue(this,o_))==null||t.call(this),Ge(this,o_,r(this.setOnline.bind(this)))}setOnline(r){ue(this,Lh)!==r&&(Ge(this,Lh,r),this.listeners.forEach(t=>{t(r)}))}isOnline(){return ue(this,Lh)}},Lh=new WeakMap,o_=new WeakMap,Ih=new WeakMap,VO);const tb=new UK;function GK(e){return Math.min(1e3*2**e,3e4)}function c$(e){return(e??"online")==="online"?tb.isOnline():!0}var rb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function WK(e){return e instanceof rb}function l$(e){let r=!1,t=0,n,s="pending",o,a;const i=new Promise((x,y)=>{o=x,a=y});i.catch(jo);const c=()=>s!=="pending",u=x=>{var y;if(!c()){const S=new rb(x);w(S),(y=e.onCancel)==null||y.call(e,S)}},d=()=>{r=!0},_=()=>{r=!1},p=()=>bj.isFocused()&&(e.networkMode==="always"||tb.isOnline())&&e.canRun(),m=()=>c$(e.networkMode)&&e.canRun(),k=x=>{c()||(n==null||n(),s="resolved",o(x))},w=x=>{c()||(n==null||n(),s="rejected",a(x))},v=()=>new Promise(x=>{var y;n=S=>{(c()||p())&&x(S)},(y=e.onPause)==null||y.call(e)}).then(()=>{var x;n=void 0,c()||(x=e.onContinue)==null||x.call(e)}),b=()=>{if(c())return;let x;const y=t===0?e.initialPromise:void 0;try{x=y??e.fn()}catch(S){x=Promise.reject(S)}Promise.resolve(x).then(k).catch(S=>{var M;if(c())return;const E=e.retry??(vj()?0:3),N=e.retryDelay??GK,A=typeof N=="function"?N(t,S):N,z=E===!0||typeof E=="number"&&tp()?void 0:v()).then(()=>{r?w(S):b()})})};return{promise:i,status:()=>s,cancel:u,continue:()=>(n==null||n(),i),cancelRetry:d,continueRetry:_,canStart:m,start:()=>(m()?b():v().then(b),i)}}var kf,QO,u$=(QO=class{constructor(){ft(this,kf)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),o$(this.gcTime)&&Ge(this,kf,vf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vj()?1/0:3e5))}clearGcTimeout(){ue(this,kf)!==void 0&&(vf.clearTimeout(ue(this,kf)),Ge(this,kf,void 0))}},kf=new WeakMap,QO);function KK(e){return{onFetch:(r,t)=>{var d,_,p,m,k;const n=r.options,s=(p=(_=(d=r.fetchOptions)==null?void 0:d.meta)==null?void 0:_.fetchMore)==null?void 0:p.direction,o=((m=r.state.data)==null?void 0:m.pages)||[],a=((k=r.state.data)==null?void 0:k.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const u=async()=>{let w=!1;const v=y=>{PK(y,()=>r.signal,()=>w=!0)},b=i$(r.options,r.fetchOptions),x=async(y,S,E)=>{if(w)return Promise.reject(r.signal.reason);if(S==null&&y.pages.length)return Promise.resolve(y);const A=(()=>{const D={client:r.client,queryKey:r.queryKey,pageParam:S,direction:E?"backward":"forward",meta:r.options.meta};return v(D),D})(),z=await b(A),{maxPages:M}=r.options,$=E?IK:LK;return{pages:$(y.pages,z,M),pageParams:$(y.pageParams,S,M)}};if(s&&o.length){const y=s==="backward",S=y?_$:v4,E={pages:o,pageParams:a};i=await x(E,S(n,E),y)}else{const y=e??o.length;do{const S=c===0?a[0]??n.initialPageParam:v4(n,i);if(c>0&&S==null)break;i=await x(i,S),c++}while(c{var w,v;return(v=(w=r.options).persister)==null?void 0:v.call(w,u,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},t)}:r.fetchFn=u}}}function v4(e,{pages:r,pageParams:t}){const n=r.length-1;return r.length>0?e.getNextPageParam(r[n],r,t[n],t):void 0}function _$(e,{pages:r,pageParams:t}){var n;return r.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,r[0],r,t[0],t):void 0}function VK(e,r){return r?v4(e,r)!=null:!1}function QK(e,r){return!r||!e.getPreviousPageParam?!1:_$(e,r)!=null}var Ph,jf,Bh,bi,Sf,$s,qg,Cf,Ui,Pl,XO,XK=(XO=class extends u${constructor(r){super();ft(this,Ui);ft(this,Ph);ft(this,jf);ft(this,Bh);ft(this,bi);ft(this,Sf);ft(this,$s);ft(this,qg);ft(this,Cf);Ge(this,Cf,!1),Ge(this,qg,r.defaultOptions),this.setOptions(r.options),this.observers=[],Ge(this,Sf,r.client),Ge(this,bi,ue(this,Sf).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,Ge(this,jf,M8(this.options)),this.state=r.state??ue(this,jf),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ph)}get promise(){var r;return(r=ue(this,$s))==null?void 0:r.promise}setOptions(r){if(this.options={...ue(this,qg),...r},r!=null&&r._type&&Ge(this,Ph,r._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=M8(this.options);t.data!==void 0&&(this.setState(R8(t.data,t.dataUpdatedAt)),Ge(this,jf,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,bi).remove(this)}setData(r,t){const n=g4(this.state.data,r,this.options);return Kt(this,Ui,Pl).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(r){Kt(this,Ui,Pl).call(this,{type:"setState",state:r})}cancel(r){var n,s;const t=(n=ue(this,$s))==null?void 0:n.promise;return(s=ue(this,$s))==null||s.cancel(r),t?t.then(jo).catch(jo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,jf)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(r=>es(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mj||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>es(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!a$(this.state.dataUpdatedAt,r)}onFocus(){var r,t;(r=this.observers.find(n=>n.shouldFetchOnWindowFocus()))==null||r.refetch({cancelRefetch:!1}),(t=ue(this,$s))==null||t.continue()}onOnline(){var r,t;(r=this.observers.find(n=>n.shouldFetchOnReconnect()))==null||r.refetch({cancelRefetch:!1}),(t=ue(this,$s))==null||t.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),ue(this,bi).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){const t=this.observers.indexOf(r);t!==-1&&(this.observers.splice(t,1),this.observers.length||(ue(this,$s)&&(ue(this,Cf)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,$s).cancel({revert:!0}):ue(this,$s).cancelRetry()),this.scheduleGc()),ue(this,bi).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Kt(this,Ui,Pl).call(this,{type:"invalidate"})}async fetch(r,t){var u,d,_,p,m,k,w,v,b,x,y,S;if(this.state.fetchStatus!=="idle"&&((u=ue(this,$s))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,$s))return ue(this,$s).continueRetry(),ue(this,$s).promise}if(r&&this.setOptions(r),!this.options.queryFn){const E=this.observers.find(N=>N.options.queryFn);E&&this.setOptions(E.options)}const n=new AbortController,s=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Ge(this,Cf,!0),n.signal)})},o=()=>{const E=i$(this.options,t),A=(()=>{const z={client:ue(this,Sf),queryKey:this.queryKey,meta:this.meta};return s(z),z})();return Ge(this,Cf,!1),this.options.persister?this.options.persister(E,A,this):E(A)},i=(()=>{const E={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,Sf),state:this.state,fetchFn:o};return s(E),E})();(d=ue(this,Ph)==="infinite"?KK(this.options.pages):this.options.behavior)==null||d.onFetch(i,this),Ge(this,Bh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((_=i.fetchOptions)==null?void 0:_.meta))&&Kt(this,Ui,Pl).call(this,{type:"fetch",meta:(p=i.fetchOptions)==null?void 0:p.meta});const c=Ge(this,$s,l$({initialPromise:t==null?void 0:t.initialPromise,fn:i.fetchFn,onCancel:E=>{E instanceof rb&&E.revert&&this.setState({...ue(this,Bh),fetchStatus:"idle"}),n.abort()},onFail:(E,N)=>{Kt(this,Ui,Pl).call(this,{type:"failed",failureCount:E,error:N})},onPause:()=>{Kt(this,Ui,Pl).call(this,{type:"pause"})},onContinue:()=>{Kt(this,Ui,Pl).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const E=await c.start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(k=(m=ue(this,bi).config).onSuccess)==null||k.call(m,E,this),(v=(w=ue(this,bi).config).onSettled)==null||v.call(w,E,this.state.error,this),E}catch(E){if(E instanceof rb){if(E.silent)return ue(this,$s).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw Kt(this,Ui,Pl).call(this,{type:"error",error:E}),(x=(b=ue(this,bi).config).onError)==null||x.call(b,E,this),(S=(y=ue(this,bi).config).onSettled)==null||S.call(y,this.state.data,E,this),E}finally{ue(this,$s)===c&&Ge(this,$s,void 0),this.scheduleGc()}}},Ph=new WeakMap,jf=new WeakMap,Bh=new WeakMap,bi=new WeakMap,Sf=new WeakMap,$s=new WeakMap,qg=new WeakMap,Cf=new WeakMap,Ui=new WeakSet,Pl=function(r){const t=n=>{switch(r.type){case"failed":return{...n,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...f$(n.data,this.options),fetchMeta:r.meta??null};case"success":const s={...n,...R8(r.data,r.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,Bh,r.manual?s:void 0),s;case"error":const o=r.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...r.state}}};this.state=t(this.state),qn.batch(()=>{this.observers.slice().forEach(n=>{n.onQueryUpdate()}),ue(this,bi).notify({query:this,type:"updated",action:r})})},XO);function f$(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:c$(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function R8(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function M8(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,t=r!==void 0,n=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Ho,Ir,Ug,qo,zf,Fh,ql,Gg,Hh,qh,Ef,Nf,a_,Uh,Xr,$m,b4,y4,x4,w4,k4,j4,S4,C4,YO,_y=(YO=class extends ld{constructor(r,t){super();ft(this,Xr);ft(this,Ho);ft(this,Ir);ft(this,Ug);ft(this,qo);ft(this,zf);ft(this,Fh);ft(this,ql);ft(this,Gg);ft(this,Hh);ft(this,qh);ft(this,Ef);ft(this,Nf);ft(this,a_);ft(this,Uh,new Set);this.options=t,Ge(this,Ho,r),Ge(this,ql,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Ir).addObserver(this),O8(ue(this,Ir),this.options)?Kt(this,Xr,$m).call(this):this.updateResult(),Kt(this,Xr,k4).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return z4(ue(this,Ir),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return z4(ue(this,Ir),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Kt(this,Xr,j4).call(this),Kt(this,Xr,S4).call(this),ue(this,Ir).removeObserver(this)}setOptions(r){const t=this.options,n=ue(this,Ir);if(this.options=ue(this,Ho).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof es(this.options.enabled,ue(this,Ir))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Kt(this,Xr,C4).call(this),ue(this,Ir).setOptions(this.options),t._defaulted&&!Hm(this.options,t)&&ue(this,Ho).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Ir),observer:this});const s=this.hasListeners();s&&$8(ue(this,Ir),n,this.options,t)&&Kt(this,Xr,$m).call(this),this.updateResult(),s&&(ue(this,Ir)!==n||es(this.options.enabled,ue(this,Ir))!==es(t.enabled,ue(this,Ir))||es(this.options.staleTime,ue(this,Ir))!==es(t.staleTime,ue(this,Ir)))&&Kt(this,Xr,y4).call(this);const o=Kt(this,Xr,x4).call(this);s&&(ue(this,Ir)!==n||es(this.options.enabled,ue(this,Ir))!==es(t.enabled,ue(this,Ir))||o!==ue(this,a_))&&Kt(this,Xr,w4).call(this,o)}getOptimisticResult(r){const t=ue(this,Ho).getQueryCache().build(ue(this,Ho),r),n=this.createResult(t,r);return Hm(this.getCurrentResult(),n)||(Ge(this,qo,n),Ge(this,Fh,this.options),Ge(this,zf,ue(this,Ir).state)),n}getCurrentResult(){return ue(this,qo)}trackResult(r,t){return new Proxy(r,{get:(n,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(n,s))})}trackProp(r){ue(this,Uh).add(r)}getCurrentQuery(){return ue(this,Ir)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const t=ue(this,Ho).defaultQueryOptions(r),n=ue(this,Ho).getQueryCache().build(ue(this,Ho),t);let s=()=>{},o;const a=new Promise(i=>{o=i,s=ue(this,Ho).getQueryCache().subscribe(c=>{c.type==="updated"&&c.query.queryHash===n.queryHash&&n.state.data!==void 0&&(s(),i(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{const i=this.createResult(n,t);return o==null||o(i),i}).finally(()=>{s()}),a])}fetch(r){return Kt(this,Xr,$m).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,qo)))}createResult(r,t){var N;const n=ue(this,Ir),s=this.options,o=ue(this,qo),a=ue(this,zf),i=ue(this,Fh),c=r!==n?r.state:ue(this,Ug),{state:u}=r;let d={...u},_=!1,p;if(t._optimisticResults){const A=this.hasListeners(),z=!A&&O8(r,t),M=A&&$8(r,n,t,s);(z||M)&&(d={...d,...f$(u.data,r.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:k,status:w}=d;p=d.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&w==="pending"){let A;o!=null&&o.isPlaceholderData&&t.placeholderData===(i==null?void 0:i.placeholderData)?(A=o.data,v=!0):A=typeof t.placeholderData=="function"?t.placeholderData((N=ue(this,qh))==null?void 0:N.state.data,ue(this,qh)):t.placeholderData,A!==void 0&&(w="success",p=g4(o==null?void 0:o.data,A,t),_=!0)}if(t.select&&p!==void 0&&!v)if(o&&p===(a==null?void 0:a.data)&&t.select===ue(this,Gg))p=ue(this,Hh);else try{Ge(this,Gg,t.select),p=t.select(p),p=g4(o==null?void 0:o.data,p,t),Ge(this,Hh,p),Ge(this,ql,null)}catch(A){Ge(this,ql,A)}else p===void 0&&Ge(this,ql,null);ue(this,ql)&&(m=ue(this,ql),p=ue(this,Hh),k=Date.now(),w="error",_=!1);const b=d.fetchStatus==="fetching",x=w==="pending",y=w==="error",S=x&&b,E=p!==void 0;return{status:w,fetchStatus:d.fetchStatus,isPending:x,isSuccess:w==="success",isError:y,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:k,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:r.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:y&&!E,isPaused:d.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:y&&E,isStale:yj(r,t),refetch:this.refetch,isEnabled:es(t.enabled,r)!==!1}}updateResult(){const r=ue(this,qo),t=this.createResult(ue(this,Ir),this.options);if(Ge(this,zf,ue(this,Ir).state),Ge(this,Fh,this.options),ue(this,zf).data!==void 0&&Ge(this,qh,ue(this,Ir)),Hm(t,r))return;Ge(this,qo,t);const s=(()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!ue(this,Uh).size)return!0;const i=new Set(a??ue(this,Uh));return this.options.throwOnError&&i.add("error"),Object.keys(ue(this,qo)).some(c=>{const u=c;return ue(this,qo)[u]!==r[u]&&i.has(u)})})();qn.batch(()=>{s&&this.listeners.forEach(o=>{o(ue(this,qo))}),ue(this,Ho).getQueryCache().notify({query:ue(this,Ir),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Kt(this,Xr,k4).call(this)}},Ho=new WeakMap,Ir=new WeakMap,Ug=new WeakMap,qo=new WeakMap,zf=new WeakMap,Fh=new WeakMap,ql=new WeakMap,Gg=new WeakMap,Hh=new WeakMap,qh=new WeakMap,Ef=new WeakMap,Nf=new WeakMap,a_=new WeakMap,Uh=new WeakMap,Xr=new WeakSet,$m=function(r){Kt(this,Xr,C4).call(this);let t=ue(this,Ir).fetch(this.options,r);return r!=null&&r.throwOnError||(t=t.catch(jo)),t},b4=function(r){return!vj()&&es(this.options.enabled,ue(this,Ir))!==!1&&o$(r)},y4=function(){Kt(this,Xr,j4).call(this);const r=es(this.options.staleTime,ue(this,Ir));if(ue(this,qo).isStale||!Kt(this,Xr,b4).call(this,r))return;const t=a$(ue(this,qo).dataUpdatedAt,r)+1;Ge(this,Ef,vf.setTimeout(()=>{ue(this,qo).isStale||this.updateResult()},t))},x4=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Ir)):this.options.refetchInterval)??!1},w4=function(r){Kt(this,Xr,S4).call(this),Ge(this,a_,r),!(ue(this,a_)===0||!Kt(this,Xr,b4).call(this,ue(this,a_)))&&Ge(this,Nf,vf.setInterval(()=>{(this.options.refetchIntervalInBackground||bj.isFocused())&&Kt(this,Xr,$m).call(this)},ue(this,a_)))},k4=function(){Kt(this,Xr,y4).call(this),Kt(this,Xr,w4).call(this,Kt(this,Xr,x4).call(this))},j4=function(){ue(this,Ef)!==void 0&&(vf.clearTimeout(ue(this,Ef)),Ge(this,Ef,void 0))},S4=function(){ue(this,Nf)!==void 0&&(vf.clearInterval(ue(this,Nf)),Ge(this,Nf,void 0))},C4=function(){const r=ue(this,Ho).getQueryCache().build(ue(this,Ho),this.options);if(r===ue(this,Ir))return;const t=ue(this,Ir);Ge(this,Ir,r),Ge(this,Ug,r.state),this.hasListeners()&&(t==null||t.removeObserver(this),r.addObserver(this))},YO);function YK(e,r){return es(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&es(r.retryOnMount,e)===!1)}function O8(e,r){return YK(e,r)||e.state.data!==void 0&&z4(e,r,r.refetchOnMount)}function z4(e,r,t){if(es(r.enabled,e)!==!1&&es(r.staleTime,e)!=="static"){const n=typeof t=="function"?t(e):t;return n==="always"||n!==!1&&yj(e,r)}return!1}function $8(e,r,t,n){return(e!==r||es(n.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&yj(e,t)}function yj(e,r){return es(r.enabled,e)!==!1&&e.isStaleByTime(es(r.staleTime,e))}var ZK=class extends _y{constructor(e,r){super(e,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,r){var m,k;const{state:t}=e,n=super.createResult(e,r),{isFetching:s,isRefetching:o,isError:a,isRefetchError:i}=n,c=(k=(m=t.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:k.direction,u=a&&c==="forward",d=s&&c==="forward",_=a&&c==="backward",p=s&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:VK(r,t.data),hasPreviousPage:QK(r,t.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:_,isFetchingPreviousPage:p,isRefetchError:i&&!u&&!_,isRefetching:o&&!d&&!p}}},Wg,Tc,xo,Af,Rc,Yu,ZO,JK=(ZO=class extends u${constructor(r){super();ft(this,Rc);ft(this,Wg);ft(this,Tc);ft(this,xo);ft(this,Af);Ge(this,Wg,r.client),this.mutationId=r.mutationId,Ge(this,xo,r.mutationCache),Ge(this,Tc,[]),this.state=r.state||d$(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){ue(this,Tc).includes(r)||(ue(this,Tc).push(r),this.clearGcTimeout(),ue(this,xo).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){Ge(this,Tc,ue(this,Tc).filter(t=>t!==r)),this.scheduleGc(),ue(this,xo).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){ue(this,Tc).length||(this.state.status==="pending"?this.scheduleGc():ue(this,xo).remove(this))}continue(){var r;return((r=ue(this,Af))==null?void 0:r.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(r){var i,c,u,d,_,p,m,k,w,v,b,x,y,S,E,N,A,z;const t=()=>{Kt(this,Rc,Yu).call(this,{type:"continue"})},n={client:ue(this,Wg),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,Af,l$({fn:()=>this.options.mutationFn?this.options.mutationFn(r,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,$)=>{Kt(this,Rc,Yu).call(this,{type:"failed",failureCount:M,error:$})},onPause:()=>{Kt(this,Rc,Yu).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,xo).canRun(this)})),o=this.state.status==="pending",a=!s.canStart();try{if(o)t();else{Kt(this,Rc,Yu).call(this,{type:"pending",variables:r,isPaused:a}),ue(this,xo).config.onMutate&&await ue(this,xo).config.onMutate(r,this,n);const $=await((c=(i=this.options).onMutate)==null?void 0:c.call(i,r,n));$!==this.state.context&&Kt(this,Rc,Yu).call(this,{type:"pending",context:$,variables:r,isPaused:a})}const M=await s.start();return await((d=(u=ue(this,xo).config).onSuccess)==null?void 0:d.call(u,M,r,this.state.context,this,n)),await((p=(_=this.options).onSuccess)==null?void 0:p.call(_,M,r,this.state.context,n)),await((k=(m=ue(this,xo).config).onSettled)==null?void 0:k.call(m,M,null,this.state.variables,this.state.context,this,n)),await((v=(w=this.options).onSettled)==null?void 0:v.call(w,M,null,r,this.state.context,n)),Kt(this,Rc,Yu).call(this,{type:"success",data:M}),M}catch(M){try{await((x=(b=ue(this,xo).config).onError)==null?void 0:x.call(b,M,r,this.state.context,this,n))}catch($){Promise.reject($)}try{await((S=(y=this.options).onError)==null?void 0:S.call(y,M,r,this.state.context,n))}catch($){Promise.reject($)}try{await((N=(E=ue(this,xo).config).onSettled)==null?void 0:N.call(E,void 0,M,this.state.variables,this.state.context,this,n))}catch($){Promise.reject($)}try{await((z=(A=this.options).onSettled)==null?void 0:z.call(A,void 0,M,r,this.state.context,n))}catch($){Promise.reject($)}throw Kt(this,Rc,Yu).call(this,{type:"error",error:M}),M}finally{ue(this,Af)===s&&Ge(this,Af,void 0),ue(this,xo).runNext(this)}}},Wg=new WeakMap,Tc=new WeakMap,xo=new WeakMap,Af=new WeakMap,Rc=new WeakSet,Yu=function(r){const t=n=>{switch(r.type){case"failed":return{...n,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...n,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:r.error,failureCount:n.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=t(this.state),qn.batch(()=>{ue(this,Tc).forEach(n=>{n.onMutationUpdate(r)}),ue(this,xo).notify({mutation:this,type:"updated",action:r})})},ZO);function d$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ul,Gi,Kg,JO,eV=(JO=class extends ld{constructor(r={}){super();ft(this,Ul);ft(this,Gi);ft(this,Kg);this.config=r,Ge(this,Ul,new Set),Ge(this,Gi,new Map),Ge(this,Kg,0)}build(r,t,n){const s=new JK({client:r,mutationCache:this,mutationId:++hm(this,Kg)._,options:r.defaultMutationOptions(t),state:n});return this.add(s),s}add(r){ue(this,Ul).add(r);const t=Nv(r);if(typeof t=="string"){const n=ue(this,Gi).get(t);n?n.push(r):ue(this,Gi).set(t,[r])}this.notify({type:"added",mutation:r})}remove(r){if(ue(this,Ul).delete(r)){const t=Nv(r);if(typeof t=="string"){const n=ue(this,Gi).get(t);if(n)if(n.length>1){const s=n.indexOf(r);s!==-1&&n.splice(s,1)}else n[0]===r&&ue(this,Gi).delete(t)}}this.notify({type:"removed",mutation:r})}canRun(r){var n;const t=Nv(r);if(typeof t=="string"){const s=(n=ue(this,Gi).get(t))==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===r}else return!0}runNext(r){var n,s;const t=Nv(r);return typeof t=="string"?((s=(n=ue(this,Gi).get(t))==null?void 0:n.find(o=>o!==r&&o.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){qn.batch(()=>{ue(this,Ul).forEach(r=>{this.notify({type:"removed",mutation:r})}),ue(this,Ul).clear(),ue(this,Gi).clear()})}getAll(){return Array.from(ue(this,Ul))}find(r){const t={exact:!0,...r};return this.getAll().find(n=>N8(t,n))}findAll(r={}){return this.getAll().filter(t=>N8(r,t))}notify(r){qn.batch(()=>{this.listeners.forEach(t=>{t(r)})})}resumePausedMutations(){const r=this.getAll().filter(t=>t.state.isPaused);return qn.batch(()=>Promise.all(r.map(t=>t.continue().catch(jo))))}},Ul=new WeakMap,Gi=new WeakMap,Kg=new WeakMap,JO);function Nv(e){var r;return(r=e.options.scope)==null?void 0:r.id}var Gl,i_,wo,Wl,Ic,Dm,E4,e$,tV=(e$=class extends ld{constructor(t,n){super();ft(this,Ic);ft(this,Gl);ft(this,i_);ft(this,wo);ft(this,Wl);Ge(this,Gl,t),this.setOptions(n),this.bindMethods(),Kt(this,Ic,Dm).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=ue(this,Gl).defaultMutationOptions(t),Hm(this.options,n)||ue(this,Gl).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,wo),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Hf(n.mutationKey)!==Hf(this.options.mutationKey)?this.reset():((s=ue(this,wo))==null?void 0:s.state.status)==="pending"&&ue(this,wo).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,wo)&&(ue(this,wo).addObserver(this),Kt(this,Ic,Dm).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,wo))==null||t.removeObserver(this)}onMutationUpdate(t){Kt(this,Ic,Dm).call(this),Kt(this,Ic,E4).call(this,t)}getCurrentResult(){return ue(this,i_)}reset(){var t;(t=ue(this,wo))==null||t.removeObserver(this),Ge(this,wo,void 0),Kt(this,Ic,Dm).call(this),Kt(this,Ic,E4).call(this)}mutate(t,n){var s;return Ge(this,Wl,n),(s=ue(this,wo))==null||s.removeObserver(this),Ge(this,wo,ue(this,Gl).getMutationCache().build(ue(this,Gl),this.options)),ue(this,wo).addObserver(this),ue(this,wo).execute(t)}},Gl=new WeakMap,i_=new WeakMap,wo=new WeakMap,Wl=new WeakMap,Ic=new WeakSet,Dm=function(){var n;const t=((n=ue(this,wo))==null?void 0:n.state)??d$();Ge(this,i_,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},E4=function(t){qn.batch(()=>{var n,s,o,a,i,c,u,d;if(ue(this,Wl)&&this.hasListeners()){const _=ue(this,i_).variables,p=ue(this,i_).context,m={client:ue(this,Gl),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(n=ue(this,Wl)).onSuccess)==null||s.call(n,t.data,_,p,m)}catch(k){Promise.reject(k)}try{(a=(o=ue(this,Wl)).onSettled)==null||a.call(o,t.data,null,_,p,m)}catch(k){Promise.reject(k)}}else if((t==null?void 0:t.type)==="error"){try{(c=(i=ue(this,Wl)).onError)==null||c.call(i,t.error,_,p,m)}catch(k){Promise.reject(k)}try{(d=(u=ue(this,Wl)).onSettled)==null||d.call(u,void 0,t.error,_,p,m)}catch(k){Promise.reject(k)}}}this.listeners.forEach(_=>{_(ue(this,i_))})})},e$);function D8(e,r){const t=new Set(r);return e.filter(n=>!t.has(n))}var Gh,Uo,Wh,Tf,Da,Rf,Vg,Qg,Xg,Yg,Ps,N4,A4,h$,T4,R4,M4,t$,rV=(t$=class extends ld{constructor(r,t,n){super();ft(this,Ps);ft(this,Gh);ft(this,Uo);ft(this,Wh);ft(this,Tf);ft(this,Da);ft(this,Rf);ft(this,Vg);ft(this,Qg);ft(this,Xg);ft(this,Yg,[]);Ge(this,Gh,r),Ge(this,Tf,n),Ge(this,Wh,[]),Ge(this,Da,[]),Ge(this,Uo,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,Da).forEach(r=>{r.subscribe(t=>{Kt(this,Ps,R4).call(this,r,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,Da).forEach(r=>{r.destroy()})}setQueries(r,t){Ge(this,Wh,r),Ge(this,Tf,t),qn.batch(()=>{const n=ue(this,Da),s=Kt(this,Ps,T4).call(this,ue(this,Wh));s.forEach(_=>_.observer.setOptions(_.defaultedQueryOptions));const o=s.map(_=>_.observer),a=o.map(_=>_.getCurrentResult()),i=n.length!==o.length,c=o.some((_,p)=>_!==n[p]),u=i||c,d=u?!0:a.some((_,p)=>{const m=ue(this,Uo)[p];return!m||!Hm(_,m)});!u&&!d||(u&&(Ge(this,Yg,s),Ge(this,Da,o)),Ge(this,Uo,a),this.hasListeners()&&(u&&(D8(n,o).forEach(_=>{_.destroy()}),D8(o,n).forEach(_=>{_.subscribe(p=>{Kt(this,Ps,R4).call(this,_,p)})})),Kt(this,Ps,M4).call(this)))})}getCurrentResult(){return ue(this,Uo)}getQueries(){return ue(this,Da).map(r=>r.getCurrentQuery())}getObservers(){return ue(this,Da)}getOptimisticResult(r,t){const n=Kt(this,Ps,T4).call(this,r),s=n.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),o=n.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Kt(this,Ps,A4).call(this,a??s,t,o),()=>Kt(this,Ps,N4).call(this,s,n)]}},Gh=new WeakMap,Uo=new WeakMap,Wh=new WeakMap,Tf=new WeakMap,Da=new WeakMap,Rf=new WeakMap,Vg=new WeakMap,Qg=new WeakMap,Xg=new WeakMap,Yg=new WeakMap,Ps=new WeakSet,N4=function(r,t){const n=new Set;return t.map((s,o)=>{const a=r[o];return s.defaultedQueryOptions.notifyOnChangeProps?a:s.observer.trackResult(a,i=>{n.has(i)||(n.add(i),t.forEach(c=>{c.observer.trackProp(i)}))})})},A4=function(r,t,n){if(t){const s=ue(this,Xg),o=n!==void 0&&s!==void 0&&(s.length!==n.length||n.some((a,i)=>a!==s[i]));return(ue(this,Uo)!==ue(this,Qg)||o||t!==ue(this,Vg))&&(Ge(this,Vg,t),Ge(this,Qg,ue(this,Uo)),n!==void 0&&Ge(this,Xg,n),Ge(this,Rf,pj(ue(this,Rf),t(r)))),ue(this,Rf)}return r},h$=function(){var r;return!((r=ue(this,Tf))!=null&&r.combine)||ue(this,Da).some((t,n)=>{var s;return t.options.suspense&&((s=ue(this,Uo)[n])==null?void 0:s.data)===void 0})},T4=function(r){const t=new Map;ue(this,Da).forEach(s=>{const o=s.options.queryHash;if(!o)return;const a=t.get(o);a?a.push(s):t.set(o,[s])});const n=[];return r.forEach(s=>{var i;const o=ue(this,Gh).defaultQueryOptions(s),a=((i=t.get(o.queryHash))==null?void 0:i.shift())??new _y(ue(this,Gh),o);n.push({defaultedQueryOptions:o,observer:a})}),n},R4=function(r,t){const n=ue(this,Da).indexOf(r);n!==-1&&(Ge(this,Uo,ue(this,Uo).slice()),ue(this,Uo)[n]=t,Kt(this,Ps,M4).call(this))},M4=function(){var r;if(this.hasListeners()){const t=Kt(this,Ps,h$).call(this),n=ue(this,Rf),s=t?n:Kt(this,Ps,A4).call(this,Kt(this,Ps,N4).call(this,ue(this,Uo),ue(this,Yg)),(r=ue(this,Tf))==null?void 0:r.combine);(t||n!==s)&&qn.batch(()=>{this.listeners.forEach(o=>{o(ue(this,Uo))})})}},t$),Mc,r$,nV=(r$=class extends ld{constructor(r={}){super();ft(this,Mc);this.config=r,Ge(this,Mc,new Map)}build(r,t,n){const s=t.queryKey,o=t.queryHash??hj(s,t);let a=this.get(o);return a||(a=new XK({client:r,queryKey:s,queryHash:o,options:r.defaultQueryOptions(t),state:n,defaultOptions:r.getQueryDefaults(s)}),this.add(a)),a}add(r){ue(this,Mc).has(r.queryHash)||(ue(this,Mc).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const t=ue(this,Mc).get(r.queryHash);t&&(r.destroy(),t===r&&ue(this,Mc).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){qn.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return ue(this,Mc).get(r)}getAll(){return[...ue(this,Mc).values()]}find(r){const t={exact:!0,...r};return this.getAll().find(n=>E8(t,n))}findAll(r={}){const t=this.getAll();return Object.keys(r).length>0?t.filter(n=>E8(r,n)):t}notify(r){qn.batch(()=>{this.listeners.forEach(t=>{t(r)})})}onFocus(){qn.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){qn.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},Mc=new WeakMap,r$),Fn,c_,l_,Kh,Vh,u_,Qh,Xh,n$,sV=(n$=class{constructor(e={}){ft(this,Fn);ft(this,c_);ft(this,l_);ft(this,Kh);ft(this,Vh);ft(this,u_);ft(this,Qh);ft(this,Xh);Ge(this,Fn,e.queryCache||new nV),Ge(this,c_,e.mutationCache||new eV),Ge(this,l_,e.defaultOptions||{}),Ge(this,Kh,new Map),Ge(this,Vh,new Map),Ge(this,u_,0)}mount(){hm(this,u_)._++,ue(this,u_)===1&&(Ge(this,Qh,bj.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Fn).onFocus())})),Ge(this,Xh,tb.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Fn).onOnline())})))}unmount(){var e,r;hm(this,u_)._--,ue(this,u_)===0&&((e=ue(this,Qh))==null||e.call(this),Ge(this,Qh,void 0),(r=ue(this,Xh))==null||r.call(this),Ge(this,Xh,void 0))}isFetching(e){return ue(this,Fn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,c_).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Fn).get(r.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),t=ue(this,Fn).build(this,r),n=t.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(es(r.staleTime,t))&&this.prefetchQuery(r),Promise.resolve(n))}getQueriesData(e){return ue(this,Fn).findAll(e).map(({queryKey:r,state:t})=>[r,t.data])}setQueryData(e,r,t){var a;const n=this.defaultQueryOptions({queryKey:e}),s=(a=ue(this,Fn).get(n.queryHash))==null?void 0:a.state.data,o=OK(r,s);if(o!==void 0)return ue(this,Fn).build(this,n).setData(o,{...t,manual:!0})}setQueriesData(e,r,t){return qn.batch(()=>ue(this,Fn).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,r,t)]))}getQueryState(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Fn).get(r.queryHash))==null?void 0:t.state}removeQueries(e){const r=ue(this,Fn);qn.batch(()=>{r.findAll(e).forEach(t=>{r.remove(t)})})}resetQueries(e,r){const t=ue(this,Fn);return qn.batch(()=>{const n=t.findAll(e),s=new Set(n);return n.forEach(o=>{o.reset()}),this.refetchQueries({type:"active",predicate:o=>s.has(o)},r)})}cancelQueries(e,r={}){const t={revert:!0,...r},n=qn.batch(()=>ue(this,Fn).findAll(e).map(s=>s.cancel(t)));return Promise.all(n).then(jo).catch(jo)}invalidateQueries(e,r={}){return qn.batch(()=>(ue(this,Fn).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},r)))}refetchQueries(e,r={}){const t={...r,cancelRefetch:r.cancelRefetch??!0},n=qn.batch(()=>ue(this,Fn).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,t);return t.throwOnError||(o=o.catch(jo)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(jo)}async query(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const t=ue(this,Fn).build(this,r),n=t.isStaleByTime(es(r.staleTime,t))?await t.fetch(r):t.state.data,s=r.select;return s?s(n):n}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const t=ue(this,Fn).build(this,r);return t.isStaleByTime(es(r.staleTime,t))?t.fetch(r):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jo).catch(jo)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jo).catch(jo)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return tb.isOnline()?ue(this,c_).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Fn)}getMutationCache(){return ue(this,c_)}getDefaultOptions(){return ue(this,l_)}setDefaultOptions(e){Ge(this,l_,e)}setQueryDefaults(e,r){ue(this,Kh).set(Hf(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...ue(this,Kh).values()],t={};return r.forEach(n=>{ep(e,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(e,r){ue(this,Vh).set(Hf(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...ue(this,Vh).values()],t={};return r.forEach(n=>{ep(e,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const r={...ue(this,l_).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=hj(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===mj&&(r.enabled=!1),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,l_).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Fn).clear(),ue(this,c_).clear()}},Fn=new WeakMap,c_=new WeakMap,l_=new WeakMap,Kh=new WeakMap,Vh=new WeakMap,u_=new WeakMap,Qh=new WeakMap,Xh=new WeakMap,n$);const p$=T.createContext(!1),m$=()=>T.useContext(p$);p$.Provider;function oV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const aV=T.createContext(oV()),g$=()=>T.useContext(aV),v$=(e,r,t)=>{const n=t!=null&&t.state.error&&typeof e.throwOnError=="function"?gj(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||n)&&(r.isReset()||(e.retryOnMount=!1))},b$=e=>{T.useEffect(()=>{e.clearReset()},[e])},y$=({result:e,errorResetBoundary:r,throwOnError:t,query:n,suspense:s})=>e.isError&&!r.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||gj(t,[e.error,n])),x$=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>t(n(...s)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},O4=(e,r)=>(e==null?void 0:e.suspense)&&r.isPending,w$=(e,r,t)=>r.fetchOptimistic(e).catch(()=>{t.clearReset()});function k$({queries:e,...r},t){const n=o0(),s=m$(),o=g$(),a=r.subscribed!==!1,i=T.useMemo(()=>e.map(w=>{const v=n.defaultQueryOptions(w);return v._optimisticResults=s?"isRestoring":a?"optimistic":void 0,v}),[e,n,s,a]);i.forEach(w=>{x$(w);const v=n.getQueryCache().get(w.queryHash);v$(w,o,v)}),b$(o);const[c]=T.useState(()=>new rV(n,i,r)),[u,d,_]=c.getOptimisticResult(i,r.combine),p=!s&&a;T.useSyncExternalStore(T.useCallback(w=>p?c.subscribe(qn.batchCalls(w)):jo,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setQueries(i,r)},[i,r,c]);const m=u.some((w,v)=>O4(i[v],w))?u.flatMap((w,v)=>{const b=i[v];if(b&&O4(b,w)){const x=new _y(n,b);return w$(b,x,o)}return[]}):[];if(m.length>0)throw Promise.all(m);const k=u.find((w,v)=>{const b=i[v];return b&&y$({result:w,errorResetBoundary:o,throwOnError:b.throwOnError,query:n.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(k)throw k.error;return d(_())}function j$(e,r,t){const n=m$(),s=g$(),o=o0(),a=o.defaultQueryOptions(e),i=o.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=n?"isRestoring":c?"optimistic":void 0,x$(a),v$(a,s,i),b$(s);const[u]=T.useState(()=>new r(o,a)),d=u.getOptimisticResult(a),_=!n&&c;if(T.useSyncExternalStore(T.useCallback(p=>{const m=_?u.subscribe(qn.batchCalls(p)):jo;return u.updateResult(),m},[u,_]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),T.useEffect(()=>{u.setOptions(a)},[a,u]),O4(a,d))throw w$(a,u,s);if(y$({result:d,errorResetBoundary:s,throwOnError:a.throwOnError,query:i,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:u.trackResult(d)}function dt(e,r){return j$(e,_y)}function iV(e,r){const t=o0(),n=t.getQueryCache();return T.useSyncExternalStore(T.useCallback(s=>n.subscribe(qn.batchCalls(s)),[n]),()=>t.isFetching(e),()=>t.isFetching(e))}function mr(e,r){const t=o0(),[n]=T.useState(()=>new tV(t,e));T.useEffect(()=>{n.setOptions(e)},[n,e]);const s=T.useSyncExternalStore(T.useCallback(a=>n.subscribe(qn.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=T.useCallback((...a)=>{n.mutate(a[0],a[1]).catch(jo)},[n]);if(s.error&&gj(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}function cV(e,r){return j$(e,ZK)}const lV="modulepreload",uV=function(e){return"/"+e},L8={},_V=function(r,t,n){let s=Promise.resolve();if(t&&t.length>0){let a=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),c=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=a(t.map(u=>{if(u=uV(u),u in L8)return;L8[u]=!0;const d=u.endsWith(".css"),_=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${_}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":lV,d||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((m,k)=>{p.addEventListener("load",m),p.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=a,window.dispatchEvent(i),!i.defaultPrevented)throw a}return s.then(a=>{for(const i of a||[])i.status==="rejected"&&o(i.reason);return r().catch(o)})},Je=new sV({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),Pc=new Set;let I8=null,fy=0;const $4=new Set,fV=()=>fy,P8=e=>($4.add(e),()=>{$4.delete(e)}),Si=()=>["workspace",fy],Mt=(e,...r)=>[...Si(),e,...r];function dV(e,r=!1){if(I8===e&&!r)return!1;const t=Si();return I8=e,fy++,Pc.clear(),xj({queryKey:t}),$4.forEach(n=>n()),!0}const Wr=e=>e[1]===fy;async function xj(e){await Je.cancelQueries(e,{revert:!1}),Je.removeQueries(e)}function ts(e,r){if(Wr(e))return Je.setQueryData(e,r)}var h2={exports:{}},mm={},p2={exports:{}},m2={};/** * @license React * scheduler.production.js * @@ -23,7 +23,7 @@ var jK=Object.defineProperty;var k8=e=>{throw TypeError(e)};var SK=(e,r,t)=>r in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var B8;function hV(){return B8||(B8=1,(function(e){function r(K,J){var ee=K.length;K.push(J);e:for(;0>>1,L=K[P];if(0>>1;Ps(U,ee))oes(ie,U)?(K[P]=ie,K[oe]=ee,P=oe):(K[P]=U,K[q]=ee,P=q);else if(oes(ie,ee))K[P]=ie,K[oe]=ee,P=oe;else break e}}return J}function s(K,J){var ee=K.sortIndex-J.sortIndex;return ee!==0?ee:K.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,i=a.now();e.unstable_now=function(){return a.now()-i}}var c=[],u=[],d=1,_=null,p=3,m=!1,k=!1,x=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function S(K){for(var J=t(u);J!==null;){if(J.callback===null)n(u);else if(J.startTime<=K)n(u),J.sortIndex=J.expirationTime,r(c,J);else break;J=t(u)}}function z(K){if(x=!1,S(K),!k)if(t(c)!==null)k=!0,N||(N=!0,I());else{var J=t(u);J!==null&&Q(z,J.startTime-K)}}var N=!1,A=-1,E=5,M=-1;function $(){return v?!0:!(e.unstable_now()-MK&&$());){var P=_.callback;if(typeof P=="function"){_.callback=null,p=_.priorityLevel;var L=P(_.expirationTime<=K);if(K=e.unstable_now(),typeof L=="function"){_.callback=L,S(K),J=!0;break t}_===t(c)&&n(c),S(K)}else n(c);_=t(c)}if(_!==null)J=!0;else{var F=t(u);F!==null&&Q(z,F.startTime-K),J=!1}}break e}finally{_=null,p=ee,m=!1}J=void 0}}finally{J?I():N=!1}}}var I;if(typeof y=="function")I=function(){y(D)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,H=G.port2;G.port1.onmessage=D,I=function(){H.postMessage(null)}}else I=function(){b(D,0)};function Q(K,J){A=b(function(){K(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125P?(K.sortIndex=ee,r(u,K),t(c)===null&&K===t(u)&&(x?(w(A),A=-1):x=!0,Q(z,ee-P))):(K.sortIndex=L,r(c,K),k||m||(k=!0,N||(N=!0,I()))),K},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(K){var J=p;return function(){var ee=p;p=J;try{return K.apply(this,arguments)}finally{p=ee}}}})(m2)),m2}var F8;function pV(){return F8||(F8=1,p2.exports=hV()),p2.exports}var g2={exports:{}},yo={};/** + */var B8;function hV(){return B8||(B8=1,(function(e){function r(K,J){var ee=K.length;K.push(J);e:for(;0>>1,L=K[P];if(0>>1;Ps(U,ee))oes(ie,U)?(K[P]=ie,K[oe]=ee,P=oe):(K[P]=U,K[q]=ee,P=q);else if(oes(ie,ee))K[P]=ie,K[oe]=ee,P=oe;else break e}}return J}function s(K,J){var ee=K.sortIndex-J.sortIndex;return ee!==0?ee:K.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,i=a.now();e.unstable_now=function(){return a.now()-i}}var c=[],u=[],d=1,_=null,p=3,m=!1,k=!1,w=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function S(K){for(var J=t(u);J!==null;){if(J.callback===null)n(u);else if(J.startTime<=K)n(u),J.sortIndex=J.expirationTime,r(c,J);else break;J=t(u)}}function E(K){if(w=!1,S(K),!k)if(t(c)!==null)k=!0,N||(N=!0,I());else{var J=t(u);J!==null&&Q(E,J.startTime-K)}}var N=!1,A=-1,z=5,M=-1;function $(){return v?!0:!(e.unstable_now()-MK&&$());){var P=_.callback;if(typeof P=="function"){_.callback=null,p=_.priorityLevel;var L=P(_.expirationTime<=K);if(K=e.unstable_now(),typeof L=="function"){_.callback=L,S(K),J=!0;break t}_===t(c)&&n(c),S(K)}else n(c);_=t(c)}if(_!==null)J=!0;else{var H=t(u);H!==null&&Q(E,H.startTime-K),J=!1}}break e}finally{_=null,p=ee,m=!1}J=void 0}}finally{J?I():N=!1}}}var I;if(typeof y=="function")I=function(){y(D)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,F=G.port2;G.port1.onmessage=D,I=function(){F.postMessage(null)}}else I=function(){b(D,0)};function Q(K,J){A=b(function(){K(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125P?(K.sortIndex=ee,r(u,K),t(c)===null&&K===t(u)&&(w?(x(A),A=-1):w=!0,Q(E,ee-P))):(K.sortIndex=L,r(c,K),k||m||(k=!0,N||(N=!0,I()))),K},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(K){var J=p;return function(){var ee=p;p=J;try{return K.apply(this,arguments)}finally{p=ee}}}})(m2)),m2}var F8;function pV(){return F8||(F8=1,p2.exports=hV()),p2.exports}var g2={exports:{}},yo={};/** * @license React * react-dom.production.js * @@ -39,15 +39,15 @@ var jK=Object.defineProperty;var k8=e=>{throw TypeError(e)};var SK=(e,r,t)=>r in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var U8;function gV(){if(U8)return mm;U8=1;var e=pV(),r=s0(),t=S$();function n(l){var h="https://react.dev/errors/"+l;if(1L||(l.current=P[L],P[L]=null,L--)}function U(l,h){L++,P[L]=l.current,l.current=h}var oe=F(null),ie=F(null),ce=F(null),re=F(null);function W(l,h){switch(U(ce,h),U(ie,l),U(oe,null),h.nodeType){case 9:case 11:l=(l=h.documentElement)&&(l=l.namespaceURI)?Wz(l):0;break;default:if(l=h.tagName,h=h.namespaceURI)h=Wz(h),l=Kz(h,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}q(oe),U(oe,l)}function ae(){q(oe),q(ie),q(ce)}function le(l){l.memoizedState!==null&&U(re,l);var h=oe.current,g=Kz(h,l.type);h!==g&&(U(ie,l),U(oe,g))}function me(l){ie.current===l&&(q(oe),q(ie)),re.current===l&&(q(re),um._currentValue=ee)}var be,Se;function Be(l){if(be===void 0)try{throw Error()}catch(g){var h=g.stack.trim().match(/\n( *(at )?)/);be=h&&h[1]||"",Se=-1L||(l.current=P[L],P[L]=null,L--)}function U(l,h){L++,P[L]=l.current,l.current=h}var oe=H(null),ie=H(null),ce=H(null),re=H(null);function W(l,h){switch(U(ce,h),U(ie,l),U(oe,null),h.nodeType){case 9:case 11:l=(l=h.documentElement)&&(l=l.namespaceURI)?Wz(l):0;break;default:if(l=h.tagName,h=h.namespaceURI)h=Wz(h),l=Kz(h,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}q(oe),U(oe,l)}function ae(){q(oe),q(ie),q(ce)}function le(l){l.memoizedState!==null&&U(re,l);var h=oe.current,g=Kz(h,l.type);h!==g&&(U(ie,l),U(oe,g))}function me(l){ie.current===l&&(q(oe),q(ie)),re.current===l&&(q(re),um._currentValue=ee)}var be,Se;function Be(l){if(be===void 0)try{throw Error()}catch(g){var h=g.stack.trim().match(/\n( *(at )?)/);be=h&&h[1]||"",Se=-1)":-1R||pe[j]!==ze[R]){var He=` `+pe[j].replace(" at new "," at ");return l.displayName&&He.includes("")&&(He=He.replace("",l.displayName)),He}while(1<=j&&0<=R);break}}}finally{Xe=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?Be(g):""}function Fe(l,h){switch(l.tag){case 26:case 27:case 5:return Be(l.type);case 16:return Be("Lazy");case 13:return l.child!==h&&h!==null?Be("Suspense Fallback"):Be("Suspense");case 19:return Be("SuspenseList");case 0:case 15:return Me(l.type,!1);case 11:return Me(l.type.render,!1);case 1:return Me(l.type,!0);case 31:return Be("Activity");default:return""}}function pt(l){try{var h="",g=null;do h+=Fe(l,g),g=l,l=l.return;while(l);return h}catch(j){return` Error generating stack: `+j.message+` -`+j.stack}}var Ct=Object.prototype.hasOwnProperty,Vt=e.unstable_scheduleCallback,Ut=e.unstable_cancelCallback,Gt=e.unstable_shouldYield,De=e.unstable_requestPaint,ct=e.unstable_now,lt=e.unstable_getCurrentPriorityLevel,xe=e.unstable_ImmediatePriority,Ie=e.unstable_UserBlockingPriority,Ye=e.unstable_NormalPriority,Ae=e.unstable_LowPriority,Ve=e.unstable_IdlePriority,Ze=e.log,at=e.unstable_setDisableYieldValue,At=null,Pe=null;function Jt(l){if(typeof Ze=="function"&&at(l),Pe&&typeof Pe.setStrictMode=="function")try{Pe.setStrictMode(At,l)}catch{}}var Tt=Math.clz32?Math.clz32:nr,Zr=Math.log,cr=Math.LN2;function nr(l){return l>>>=0,l===0?32:31-(Zr(l)/cr|0)|0}var Wt=256,wt=262144,ns=4194304;function Hr(l){var h=l&42;if(h!==0)return h;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function en(l,h,g){var j=l.pendingLanes;if(j===0)return 0;var R=0,O=l.suspendedLanes,X=l.pingedLanes;l=l.warmLanes;var ne=j&134217727;return ne!==0?(j=ne&~O,j!==0?R=Hr(j):(X&=ne,X!==0?R=Hr(X):g||(g=ne&~l,g!==0&&(R=Hr(g))))):(ne=j&~O,ne!==0?R=Hr(ne):X!==0?R=Hr(X):g||(g=j&~l,g!==0&&(R=Hr(g)))),R===0?0:h!==0&&h!==R&&(h&O)===0&&(O=R&-R,g=h&-h,O>=g||O===32&&(g&4194048)!==0)?h:R}function gr(l,h){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&h)===0}function ut(l,h){switch(l){case 1:case 2:case 4:case 8:case 64:return h+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dr(){var l=ns;return ns<<=1,(ns&62914560)===0&&(ns=4194304),l}function Cr(l){for(var h=[],g=0;31>g;g++)h.push(l);return h}function $r(l,h){l.pendingLanes|=h,h!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function wn(l,h,g,j,R,O){var X=l.pendingLanes;l.pendingLanes=g,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=g,l.entangledLanes&=g,l.errorRecoveryDisabledLanes&=g,l.shellSuspendCounter=0;var ne=l.entanglements,pe=l.expirationTimes,ze=l.hiddenUpdates;for(g=X&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var ho=/[\n"\\]/g;function Kn(l){return l.replace(ho,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Ys(l,h,g,j,R,O,X,ne){l.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?l.type=X:l.removeAttribute("type"),h!=null?X==="number"?(h===0&&l.value===""||l.value!=h)&&(l.value=""+As(h)):l.value!==""+As(h)&&(l.value=""+As(h)):X!=="submit"&&X!=="reset"||l.removeAttribute("value"),h!=null?To(l,X,As(h)):g!=null?To(l,X,As(g)):j!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?l.name=""+As(ne):l.removeAttribute("name")}function Zs(l,h,g,j,R,O,X,ne){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),h!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||h!=null)){ti(l);return}g=g!=null?""+As(g):"",h=h!=null?""+As(h):g,ne||h===l.value||(l.value=h),l.defaultValue=h}j=j??R,j=typeof j!="function"&&typeof j!="symbol"&&!!j,l.checked=ne?l.checked:!!j,l.defaultChecked=!!j,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(l.name=X),ti(l)}function To(l,h,g){h==="number"&&Tn(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function Zo(l,h,g,j){if(l=l.options,h){h={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),il=!1;if(ea)try{var Ri={};Object.defineProperty(Ri,"passive",{get:function(){il=!0}}),window.addEventListener("test",Ri,Ri),window.removeEventListener("test",Ri,Ri)}catch{il=!1}var Et=null,pu=null,hs=null;function mu(){if(hs)return hs;var l,h=pu,g=h.length,j,R="value"in Et?Et.value:Et.textContent,O=R.length;for(l=0;l=si),no=" ",ta=!1;function Oi(l,h){switch(l){case"keyup":return P_.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yu(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var xn=!1;function Ts(l,h){switch(l){case"compositionend":return yu(h);case"keypress":return h.which!==32?null:(ta=!0,no);case"textInput":return l=h.data,l===no&&ta?null:l;default:return null}}function Sn(l,h){if(xn)return l==="compositionend"||!gl&&Oi(l,h)?(l=mu(),hs=pu=Et=null,xn=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1=h)return{node:g,offset:h-l};l=j}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=G_(g)}}function W_(l,h){return l&&h?l===h?!0:l&&l.nodeType===3?!1:h&&h.nodeType===3?W_(l,h.parentNode):"contains"in l?l.contains(h):l.compareDocumentPosition?!!(l.compareDocumentPosition(h)&16):!1:!1}function Vn(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var h=Tn(l.document);h instanceof l.HTMLIFrameElement;){try{var g=typeof h.contentWindow.location.href=="string"}catch{g=!1}if(g)l=h.contentWindow;else break;h=Tn(l.document)}return h}function ii(l){var h=l&&l.nodeName&&l.nodeName.toLowerCase();return h&&(h==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||h==="textarea"||l.contentEditable==="true")}var bl=ea&&"documentMode"in document&&11>=document.documentMode,Do=null,ci=null,li=null,ps=!1;function ms(l,h,g){var j=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;ps||Do==null||Do!==Tn(j)||(j=Do,"selectionStart"in j&&ii(j)?j={start:j.selectionStart,end:j.selectionEnd}:(j=(j.ownerDocument&&j.ownerDocument.defaultView||window).getSelection(),j={anchorNode:j.anchorNode,anchorOffset:j.anchorOffset,focusNode:j.focusNode,focusOffset:j.focusOffset}),li&&ai(li,j)||(li=j,j=hv(ci,"onSelect"),0>=X,R-=X,za=1<<32-Tt(h)+R|g<vr?(Or=Ot,Ot=null):Or=Ot.sibling;var Gr=Ne(je,Ot,Ce[vr],qe);if(Gr===null){Ot===null&&(Ot=Or);break}l&&Ot&&Gr.alternate===null&&h(je,Ot),ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr,Ot=Or}if(vr===Ce.length)return g(je,Ot),Er&&di(je,vr),qt;if(Ot===null){for(;vrvr?(Or=Ot,Ot=null):Or=Ot.sibling;var Uu=Ne(je,Ot,Gr.value,qe);if(Uu===null){Ot===null&&(Ot=Or);break}l&&Ot&&Uu.alternate===null&&h(je,Ot),ge=O(Uu,ge,vr),Ur===null?qt=Uu:Ur.sibling=Uu,Ur=Uu,Ot=Or}if(Gr.done)return g(je,Ot),Er&&di(je,vr),qt;if(Ot===null){for(;!Gr.done;vr++,Gr=Ce.next())Gr=Ue(je,Gr.value,qe),Gr!==null&&(ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr);return Er&&di(je,vr),qt}for(Ot=j(Ot);!Gr.done;vr++,Gr=Ce.next())Gr=$e(Ot,je,vr,Gr.value,qe),Gr!==null&&(l&&Gr.alternate!==null&&Ot.delete(Gr.key===null?vr:Gr.key),ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr);return l&&Ot.forEach(function(kK){return h(je,kK)}),Er&&di(je,vr),qt}function hn(je,ge,Ce,qe){if(typeof Ce=="object"&&Ce!==null&&Ce.type===x&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case m:e:{for(var qt=Ce.key;ge!==null;){if(ge.key===qt){if(qt=Ce.type,qt===x){if(ge.tag===7){g(je,ge.sibling),qe=R(ge,Ce.props.children),qe.return=je,je=qe;break e}}else if(ge.elementType===qt||typeof qt=="object"&&qt!==null&&qt.$$typeof===E&&Z_(qt)===ge.type){g(je,ge.sibling),qe=R(ge,Ce.props),Fp(qe,Ce),qe.return=je,je=qe;break e}g(je,ge);break}else h(je,ge);ge=ge.sibling}Ce.type===x?(qe=Lo(Ce.props.children,je.mode,qe,Ce.key),qe.return=je,je=qe):(qe=Ca(Ce.type,Ce.key,Ce.props,null,je.mode,qe),Fp(qe,Ce),qe.return=je,je=qe)}return X(je);case k:e:{for(qt=Ce.key;ge!==null;){if(ge.key===qt)if(ge.tag===4&&ge.stateNode.containerInfo===Ce.containerInfo&&ge.stateNode.implementation===Ce.implementation){g(je,ge.sibling),qe=R(ge,Ce.children||[]),qe.return=je,je=qe;break e}else{g(je,ge);break}else h(je,ge);ge=ge.sibling}qe=_i(Ce,je.mode,qe),qe.return=je,je=qe}return X(je);case E:return Ce=Z_(Ce),hn(je,ge,Ce,qe)}if(Q(Ce))return St(je,ge,Ce,qe);if(I(Ce)){if(qt=I(Ce),typeof qt!="function")throw Error(n(150));return Ce=qt.call(Ce),Xt(je,ge,Ce,qe)}if(typeof Ce.then=="function")return hn(je,ge,I0(Ce),qe);if(Ce.$$typeof===y)return hn(je,ge,bc(je,Ce),qe);P0(je,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint"?(Ce=""+Ce,ge!==null&&ge.tag===6?(g(je,ge.sibling),qe=R(ge,Ce),qe.return=je,je=qe):(g(je,ge),qe=pc(Ce,je.mode,qe),qe.return=je,je=qe),X(je)):g(je,ge)}return function(je,ge,Ce,qe){try{Bp=0;var qt=hn(je,ge,Ce,qe);return Id=null,qt}catch(Ot){if(Ot===Ld||Ot===D0)throw Ot;var Ur=un(29,Ot,null,je.mode);return Ur.lanes=qe,Ur.return=je,Ur}finally{}}}var ef=LC(!0),IC=LC(!1),zu=!1;function Fx(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hx(l,h){l=l.updateQueue,h.updateQueue===l&&(h.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Eu(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Nu(l,h,g){var j=l.updateQueue;if(j===null)return null;if(j=j.shared,(Kr&2)!==0){var R=j.pending;return R===null?h.next=h:(h.next=R.next,R.next=h),j.pending=h,h=_t(l),mt(l,null,g),h}return we(l,j,h,g),_t(l)}function Hp(l,h,g){if(h=h.updateQueue,h!==null&&(h=h.shared,(g&4194048)!==0)){var j=h.lanes;j&=l.pendingLanes,g|=j,h.lanes=g,yr(l,g)}}function qx(l,h){var g=l.updateQueue,j=l.alternate;if(j!==null&&(j=j.updateQueue,g===j)){var R=null,O=null;if(g=g.firstBaseUpdate,g!==null){do{var X={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};O===null?R=O=X:O=O.next=X,g=g.next}while(g!==null);O===null?R=O=h:O=O.next=h}else R=O=h;g={baseState:j.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:j.shared,callbacks:j.callbacks},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=h:l.next=h,g.lastBaseUpdate=h}var Ux=!1;function qp(){if(Ux){var l=sa;if(l!==null)throw l}}function Up(l,h,g,j){Ux=!1;var R=l.updateQueue;zu=!1;var O=R.firstBaseUpdate,X=R.lastBaseUpdate,ne=R.shared.pending;if(ne!==null){R.shared.pending=null;var pe=ne,ze=pe.next;pe.next=null,X===null?O=ze:X.next=ze,X=pe;var He=l.alternate;He!==null&&(He=He.updateQueue,ne=He.lastBaseUpdate,ne!==X&&(ne===null?He.firstBaseUpdate=ze:ne.next=ze,He.lastBaseUpdate=pe))}if(O!==null){var Ue=R.baseState;X=0,He=ze=pe=null,ne=O;do{var Ne=ne.lane&-536870913,$e=Ne!==ne.lane;if($e?(Mr&Ne)===Ne:(j&Ne)===Ne){Ne!==0&&Ne===Lr&&(Ux=!0),He!==null&&(He=He.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var St=l,Xt=ne;Ne=h;var hn=g;switch(Xt.tag){case 1:if(St=Xt.payload,typeof St=="function"){Ue=St.call(hn,Ue,Ne);break e}Ue=St;break e;case 3:St.flags=St.flags&-65537|128;case 0:if(St=Xt.payload,Ne=typeof St=="function"?St.call(hn,Ue,Ne):St,Ne==null)break e;Ue=_({},Ue,Ne);break e;case 2:zu=!0}}Ne=ne.callback,Ne!==null&&(l.flags|=64,$e&&(l.flags|=8192),$e=R.callbacks,$e===null?R.callbacks=[Ne]:$e.push(Ne))}else $e={lane:Ne,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},He===null?(ze=He=$e,pe=Ue):He=He.next=$e,X|=Ne;if(ne=ne.next,ne===null){if(ne=R.shared.pending,ne===null)break;$e=ne,ne=$e.next,$e.next=null,R.lastBaseUpdate=$e,R.shared.pending=null}}while(!0);He===null&&(pe=Ue),R.baseState=pe,R.firstBaseUpdate=ze,R.lastBaseUpdate=He,O===null&&(R.shared.lanes=0),Ou|=X,l.lanes=X,l.memoizedState=Ue}}function PC(l,h){if(typeof l!="function")throw Error(n(191,l));l.call(h)}function BC(l,h){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var X=K.T,ne={};K.T=ne,lw(l,!1,h,g);try{var pe=R(),ze=K.S;if(ze!==null&&ze(ne,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var He=Dd(pe,j);Kp(l,h,He,Ma(l))}else Kp(l,h,j,Ma(l))}catch(Ue){Kp(l,h,{then:function(){},status:"rejected",reason:Ue},Ma())}finally{J.p=O,X!==null&&ne.types!==null&&(X.types=ne.types),K.T=X}}function vW(){}function iw(l,h,g,j){if(l.tag!==5)throw Error(n(476));var R=v7(l).queue;g7(l,R,h,ee,g===null?vW:function(){return b7(l),g(j)})}function v7(l){var h=l.memoizedState;if(h!==null)return h;h={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:ee},next:null};var g={};return h.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:g},next:null},l.memoizedState=h,l=l.alternate,l!==null&&(l.memoizedState=h),h}function b7(l){var h=v7(l);h.next===null&&(h=l.alternate.memoizedState),Kp(l,h.next.queue,{},Ma())}function cw(){return bs(um)}function y7(){return cs().memoizedState}function x7(){return cs().memoizedState}function bW(l){for(var h=l.return;h!==null;){switch(h.tag){case 24:case 3:var g=Ma();l=Eu(g);var j=Nu(h,l,g);j!==null&&(la(j,h,g),Hp(j,h,g)),h={cache:Od()},l.payload=h;return}h=h.return}}function yW(l,h,g){var j=Ma();g={lane:j,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Q0(l)?k7(h,g):(g=Re(l,h,g,j),g!==null&&(la(g,l,j),j7(g,h,j)))}function w7(l,h,g){var j=Ma();Kp(l,h,g,j)}function Kp(l,h,g,j){var R={lane:j,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(Q0(l))k7(h,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=h.lastRenderedReducer,O!==null))try{var X=h.lastRenderedState,ne=O(X,g);if(R.hasEagerState=!0,R.eagerState=ne,Yt(ne,X))return we(l,h,R,0),mn===null&&fe(),!1}catch{}finally{}if(g=Re(l,h,R,j),g!==null)return la(g,l,j),j7(g,h,j),!0}return!1}function lw(l,h,g,j){if(j={lane:2,revertLane:Fw(),gesture:null,action:j,hasEagerState:!1,eagerState:null,next:null},Q0(l)){if(h)throw Error(n(479))}else h=Re(l,g,j,2),h!==null&&la(h,l,2)}function Q0(l){var h=l.alternate;return l===pr||h!==null&&h===pr}function k7(l,h){Bd=H0=!0;var g=l.pending;g===null?h.next=h:(h.next=g.next,g.next=h),l.pending=h}function j7(l,h,g){if((g&4194048)!==0){var j=h.lanes;j&=l.pendingLanes,g|=j,h.lanes=g,yr(l,g)}}var Vp={readContext:bs,use:G0,useCallback:Yn,useContext:Yn,useEffect:Yn,useImperativeHandle:Yn,useLayoutEffect:Yn,useInsertionEffect:Yn,useMemo:Yn,useReducer:Yn,useRef:Yn,useState:Yn,useDebugValue:Yn,useDeferredValue:Yn,useTransition:Yn,useSyncExternalStore:Yn,useId:Yn,useHostTransitionStatus:Yn,useFormState:Yn,useActionState:Yn,useOptimistic:Yn,useMemoCache:Yn,useCacheRefresh:Yn};Vp.useEffectEvent=Yn;var S7={readContext:bs,use:G0,useCallback:function(l,h){return Bo().memoizedState=[l,h===void 0?null:h],l},useContext:bs,useEffect:c7,useImperativeHandle:function(l,h,g){g=g!=null?g.concat([l]):null,K0(4194308,4,f7.bind(null,h,l),g)},useLayoutEffect:function(l,h){return K0(4194308,4,l,h)},useInsertionEffect:function(l,h){K0(4,2,l,h)},useMemo:function(l,h){var g=Bo();h=h===void 0?null:h;var j=l();if(tf){Jt(!0);try{l()}finally{Jt(!1)}}return g.memoizedState=[j,h],j},useReducer:function(l,h,g){var j=Bo();if(g!==void 0){var R=g(h);if(tf){Jt(!0);try{g(h)}finally{Jt(!1)}}}else R=h;return j.memoizedState=j.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},j.queue=l,l=l.dispatch=yW.bind(null,pr,l),[j.memoizedState,l]},useRef:function(l){var h=Bo();return l={current:l},h.memoizedState=l},useState:function(l){l=rw(l);var h=l.queue,g=w7.bind(null,pr,h);return h.dispatch=g,[l.memoizedState,g]},useDebugValue:ow,useDeferredValue:function(l,h){var g=Bo();return aw(g,l,h)},useTransition:function(){var l=rw(!1);return l=g7.bind(null,pr,l.queue,!0,!1),Bo().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,h,g){var j=pr,R=Bo();if(Er){if(g===void 0)throw Error(n(407));g=g()}else{if(g=h(),mn===null)throw Error(n(349));(Mr&127)!==0||WC(j,h,g)}R.memoizedState=g;var O={value:g,getSnapshot:h};return R.queue=O,c7(VC.bind(null,j,O,l),[l]),j.flags|=2048,Hd(9,{destroy:void 0},KC.bind(null,j,O,g,h),null),g},useId:function(){var l=Bo(),h=mn.identifierPrefix;if(Er){var g=fi,j=za;g=(j&~(1<<32-Tt(j)-1)).toString(32)+g,h="_"+h+"R_"+g,g=q0++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof j.is=="string"?X.createElement("select",{is:j.is}):X.createElement("select"),j.multiple?O.multiple=!0:j.size&&(O.size=j.size);break;default:O=typeof j.is=="string"?X.createElement(R,{is:j.is}):X.createElement(R)}}O[cn]=h,O[Dt]=j;e:for(X=h.child;X!==null;){if(X.tag===5||X.tag===6)O.appendChild(X.stateNode);else if(X.tag!==4&&X.tag!==27&&X.child!==null){X.child.return=X,X=X.child;continue}if(X===h)break e;for(;X.sibling===null;){if(X.return===null||X.return===h)break e;X=X.return}X.sibling.return=X.return,X=X.sibling}h.stateNode=O;e:switch(lo(O,R,j),R){case"button":case"input":case"select":case"textarea":j=!!j.autoFocus;break e;case"img":j=!0;break e;default:j=!1}j&&Cl(h)}}return zn(h),kw(h,h.type,l===null?null:l.memoizedProps,h.pendingProps,g),null;case 6:if(l&&h.stateNode!=null)l.memoizedProps!==j&&Cl(h);else{if(typeof j!="string"&&h.stateNode===null)throw Error(n(166));if(l=ce.current,bt(h)){if(l=h.stateNode,g=h.memoizedProps,j=null,R=gs,R!==null)switch(R.tag){case 27:case 5:j=R.memoizedProps}l[cn]=h,l=!!(l.nodeValue===g||j!==null&&j.suppressHydrationWarning===!0||Uz(l.nodeValue,g)),l||ke(h,!0)}else l=pv(l).createTextNode(j),l[cn]=h,h.stateNode=l}return zn(h),null;case 31:if(g=h.memoizedState,l===null||l.memoizedState!==null){if(j=bt(h),g!==null){if(l===null){if(!j)throw Error(n(318));if(l=h.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(n(557));l[cn]=h}else ht(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;zn(h),l=!1}else g=kr(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return h.flags&256?(Aa(h),h):(Aa(h),null);if((h.flags&128)!==0)throw Error(n(558))}return zn(h),null;case 13:if(j=h.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=bt(h),j!==null&&j.dehydrated!==null){if(l===null){if(!R)throw Error(n(318));if(R=h.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(n(317));R[cn]=h}else ht(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;zn(h),R=!1}else R=kr(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return h.flags&256?(Aa(h),h):(Aa(h),null)}return Aa(h),(h.flags&128)!==0?(h.lanes=g,h):(g=j!==null,l=l!==null&&l.memoizedState!==null,g&&(j=h.child,R=null,j.alternate!==null&&j.alternate.memoizedState!==null&&j.alternate.memoizedState.cachePool!==null&&(R=j.alternate.memoizedState.cachePool.pool),O=null,j.memoizedState!==null&&j.memoizedState.cachePool!==null&&(O=j.memoizedState.cachePool.pool),O!==R&&(j.flags|=2048)),g!==l&&g&&(h.child.flags|=8192),ev(h,h.updateQueue),zn(h),null);case 4:return ae(),l===null&&Gw(h.stateNode.containerInfo),zn(h),null;case 10:return Pi(h.type),zn(h),null;case 19:if(q(is),j=h.memoizedState,j===null)return zn(h),null;if(R=(h.flags&128)!==0,O=j.rendering,O===null)if(R)Xp(j,!1);else{if(Zn!==0||l!==null&&(l.flags&128)!==0)for(l=h.child;l!==null;){if(O=F0(l),O!==null){for(h.flags|=128,Xp(j,!1),l=O.updateQueue,h.updateQueue=l,ev(h,l),h.subtreeFlags=0,l=g,g=h.child;g!==null;)ui(g,l),g=g.sibling;return U(is,is.current&1|2),Er&&di(h,j.treeForkCount),h.child}l=l.sibling}j.tail!==null&&ct()>ov&&(h.flags|=128,R=!0,Xp(j,!1),h.lanes=4194304)}else{if(!R)if(l=F0(O),l!==null){if(h.flags|=128,R=!0,l=l.updateQueue,h.updateQueue=l,ev(h,l),Xp(j,!0),j.tail===null&&j.tailMode==="hidden"&&!O.alternate&&!Er)return zn(h),null}else 2*ct()-j.renderingStartTime>ov&&g!==536870912&&(h.flags|=128,R=!0,Xp(j,!1),h.lanes=4194304);j.isBackwards?(O.sibling=h.child,h.child=O):(l=j.last,l!==null?l.sibling=O:h.child=O,j.last=O)}return j.tail!==null?(l=j.tail,j.rendering=l,j.tail=l.sibling,j.renderingStartTime=ct(),l.sibling=null,g=is.current,U(is,R?g&1|2:g&1),Er&&di(h,j.treeForkCount),l):(zn(h),null);case 22:case 23:return Aa(h),Wx(),j=h.memoizedState!==null,l!==null?l.memoizedState!==null!==j&&(h.flags|=8192):j&&(h.flags|=8192),j?(g&536870912)!==0&&(h.flags&128)===0&&(zn(h),h.subtreeFlags&6&&(h.flags|=8192)):zn(h),g=h.updateQueue,g!==null&&ev(h,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),j=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(j=h.memoizedState.cachePool.pool),j!==g&&(h.flags|=2048),l!==null&&q(yc),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),h.memoizedState.cache!==g&&(h.flags|=2048),Pi(Bn),zn(h),null;case 25:return null;case 30:return null}throw Error(n(156,h.tag))}function SW(l,h){switch(Rd(h),h.tag){case 1:return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 3:return Pi(Bn),ae(),l=h.flags,(l&65536)!==0&&(l&128)===0?(h.flags=l&-65537|128,h):null;case 26:case 27:case 5:return me(h),null;case 31:if(h.memoizedState!==null){if(Aa(h),h.alternate===null)throw Error(n(340));ht()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 13:if(Aa(h),l=h.memoizedState,l!==null&&l.dehydrated!==null){if(h.alternate===null)throw Error(n(340));ht()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 19:return q(is),null;case 4:return ae(),null;case 10:return Pi(h.type),null;case 22:case 23:return Aa(h),Wx(),l!==null&&q(yc),l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 24:return Pi(Bn),null;case 25:return null;default:return null}}function Q7(l,h){switch(Rd(h),h.tag){case 3:Pi(Bn),ae();break;case 26:case 27:case 5:me(h);break;case 4:ae();break;case 31:h.memoizedState!==null&&Aa(h);break;case 13:Aa(h);break;case 19:q(is);break;case 10:Pi(h.type);break;case 22:case 23:Aa(h),Wx(),l!==null&&q(yc);break;case 24:Pi(Bn)}}function Yp(l,h){try{var g=h.updateQueue,j=g!==null?g.lastEffect:null;if(j!==null){var R=j.next;g=R;do{if((g.tag&l)===l){j=void 0;var O=g.create,X=g.inst;j=O(),X.destroy=j}g=g.next}while(g!==R)}}catch(ne){an(h,h.return,ne)}}function Ru(l,h,g){try{var j=h.updateQueue,R=j!==null?j.lastEffect:null;if(R!==null){var O=R.next;j=O;do{if((j.tag&l)===l){var X=j.inst,ne=X.destroy;if(ne!==void 0){X.destroy=void 0,R=h;var pe=g,ze=ne;try{ze()}catch(He){an(R,pe,He)}}}j=j.next}while(j!==O)}}catch(He){an(h,h.return,He)}}function X7(l){var h=l.updateQueue;if(h!==null){var g=l.stateNode;try{BC(h,g)}catch(j){an(l,l.return,j)}}}function Y7(l,h,g){g.props=rf(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(j){an(l,h,j)}}function Zp(l,h){try{var g=l.ref;if(g!==null){switch(l.tag){case 26:case 27:case 5:var j=l.stateNode;break;case 30:j=l.stateNode;break;default:j=l.stateNode}typeof g=="function"?l.refCleanup=g(j):g.current=j}}catch(R){an(l,h,R)}}function xc(l,h){var g=l.ref,j=l.refCleanup;if(g!==null)if(typeof j=="function")try{j()}catch(R){an(l,h,R)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(R){an(l,h,R)}else g.current=null}function Z7(l){var h=l.type,g=l.memoizedProps,j=l.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":g.autoFocus&&j.focus();break e;case"img":g.src?j.src=g.src:g.srcSet&&(j.srcset=g.srcSet)}}catch(R){an(l,l.return,R)}}function jw(l,h,g){try{var j=l.stateNode;KW(j,l.type,g,h),j[Dt]=h}catch(R){an(l,l.return,R)}}function J7(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&Pu(l.type)||l.tag===4}function Sw(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||J7(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&Pu(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Cw(l,h,g){var j=l.tag;if(j===5||j===6)l=l.stateNode,h?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,h):(h=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,h.appendChild(l),g=g._reactRootContainer,g!=null||h.onclick!==null||(h.onclick=as));else if(j!==4&&(j===27&&Pu(l.type)&&(g=l.stateNode,h=null),l=l.child,l!==null))for(Cw(l,h,g),l=l.sibling;l!==null;)Cw(l,h,g),l=l.sibling}function tv(l,h,g){var j=l.tag;if(j===5||j===6)l=l.stateNode,h?g.insertBefore(l,h):g.appendChild(l);else if(j!==4&&(j===27&&Pu(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(tv(l,h,g),l=l.sibling;l!==null;)tv(l,h,g),l=l.sibling}function ez(l){var h=l.stateNode,g=l.memoizedProps;try{for(var j=l.type,R=h.attributes;R.length;)h.removeAttributeNode(R[0]);lo(h,j,g),h[cn]=l,h[Dt]=g}catch(O){an(l,l.return,O)}}var zl=!1,ks=!1,zw=!1,tz=typeof WeakSet=="function"?WeakSet:Set,Gs=null;function CW(l,h){if(l=l.containerInfo,Vw=wv,l=Vn(l),ii(l)){if("selectionStart"in l)var g={start:l.selectionStart,end:l.selectionEnd};else e:{g=(g=l.ownerDocument)&&g.defaultView||window;var j=g.getSelection&&g.getSelection();if(j&&j.rangeCount!==0){g=j.anchorNode;var R=j.anchorOffset,O=j.focusNode;j=j.focusOffset;try{g.nodeType,O.nodeType}catch{g=null;break e}var X=0,ne=-1,pe=-1,ze=0,He=0,Ue=l,Ne=null;t:for(;;){for(var $e;Ue!==g||R!==0&&Ue.nodeType!==3||(ne=X+R),Ue!==O||j!==0&&Ue.nodeType!==3||(pe=X+j),Ue.nodeType===3&&(X+=Ue.nodeValue.length),($e=Ue.firstChild)!==null;)Ne=Ue,Ue=$e;for(;;){if(Ue===l)break t;if(Ne===g&&++ze===R&&(ne=X),Ne===O&&++He===j&&(pe=X),($e=Ue.nextSibling)!==null)break;Ue=Ne,Ne=Ue.parentNode}Ue=$e}g=ne===-1||pe===-1?null:{start:ne,end:pe}}else g=null}g=g||{start:0,end:0}}else g=null;for(Qw={focusedElem:l,selectionRange:g},wv=!1,Gs=h;Gs!==null;)if(h=Gs,l=h.child,(h.subtreeFlags&1028)!==0&&l!==null)l.return=h,Gs=l;else for(;Gs!==null;){switch(h=Gs,O=h.alternate,l=h.flags,h.tag){case 0:if((l&4)!==0&&(l=h.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),lo(O,j,g),O[cn]=l,xr(O),j=O;break e;case"link":var X=i8("link","href",R).get(j+(g.href||""));if(X){for(var ne=0;nehn&&(X=hn,hn=Xt,Xt=X);var je=vl(ne,Xt),ge=vl(ne,hn);if(je&&ge&&($e.rangeCount!==1||$e.anchorNode!==je.node||$e.anchorOffset!==je.offset||$e.focusNode!==ge.node||$e.focusOffset!==ge.offset)){var Ce=Ue.createRange();Ce.setStart(je.node,je.offset),$e.removeAllRanges(),Xt>hn?($e.addRange(Ce),$e.extend(ge.node,ge.offset)):(Ce.setEnd(ge.node,ge.offset),$e.addRange(Ce))}}}}for(Ue=[],$e=ne;$e=$e.parentNode;)$e.nodeType===1&&Ue.push({element:$e,left:$e.scrollLeft,top:$e.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;neg?32:g,K.T=null,g=Ow,Ow=null;var O=Du,X=Rl;if(Ms=0,Kd=Du=null,Rl=0,(Kr&6)!==0)throw Error(n(331));var ne=Kr;if(Kr|=4,fz(O.current),lz(O,O.current,X,g),Kr=ne,sm(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot=="function")try{Pe.onPostCommitFiberRoot(At,O)}catch{}return!0}finally{J.p=R,K.T=j,Az(l,h)}}function Rz(l,h,g){h=Io(g,h),h=dw(l.stateNode,h,2),l=Nu(l,h,2),l!==null&&($r(l,2),wc(l))}function an(l,h,g){if(l.tag===3)Rz(l,l,g);else for(;h!==null;){if(h.tag===3){Rz(h,l,g);break}else if(h.tag===1){var j=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof j.componentDidCatch=="function"&&($u===null||!$u.has(j))){l=Io(g,l),g=M7(2),j=Nu(h,g,2),j!==null&&(O7(g,j,h,l),$r(j,2),wc(j));break}}h=h.return}}function Iw(l,h,g){var j=l.pingCache;if(j===null){j=l.pingCache=new NW;var R=new Set;j.set(h,R)}else R=j.get(h),R===void 0&&(R=new Set,j.set(h,R));R.has(g)||(Aw=!0,R.add(g),l=OW.bind(null,l,h,g),h.then(l,l))}function OW(l,h,g){var j=l.pingCache;j!==null&&j.delete(h),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,mn===l&&(Mr&g)===g&&(Zn===4||Zn===3&&(Mr&62914560)===Mr&&300>ct()-sv?(Kr&2)===0&&Vd(l,0):Tw|=g,Wd===Mr&&(Wd=0)),wc(l)}function Mz(l,h){h===0&&(h=dr()),l=Te(l,h),l!==null&&($r(l,h),wc(l))}function $W(l){var h=l.memoizedState,g=0;h!==null&&(g=h.retryLane),Mz(l,g)}function DW(l,h){var g=0;switch(l.tag){case 31:case 13:var j=l.stateNode,R=l.memoizedState;R!==null&&(g=R.retryLane);break;case 19:j=l.stateNode;break;case 22:j=l.stateNode._retryCache;break;default:throw Error(n(314))}j!==null&&j.delete(h),Mz(l,g)}function LW(l,h){return Vt(l,h)}var _v=null,Xd=null,Pw=!1,fv=!1,Bw=!1,Iu=0;function wc(l){l!==Xd&&l.next===null&&(Xd===null?_v=Xd=l:Xd=Xd.next=l),fv=!0,Pw||(Pw=!0,PW())}function sm(l,h){if(!Bw&&fv){Bw=!0;do for(var g=!1,j=_v;j!==null;){if(l!==0){var R=j.pendingLanes;if(R===0)var O=0;else{var X=j.suspendedLanes,ne=j.pingedLanes;O=(1<<31-Tt(42|l)+1)-1,O&=R&~(X&~ne),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,Lz(j,O))}else O=Mr,O=en(j,j===mn?O:0,j.cancelPendingCommit!==null||j.timeoutHandle!==-1),(O&3)===0||gr(j,O)||(g=!0,Lz(j,O));j=j.next}while(g);Bw=!1}}function IW(){Oz()}function Oz(){fv=Pw=!1;var l=0;Iu!==0&&QW()&&(l=Iu);for(var h=ct(),g=null,j=_v;j!==null;){var R=j.next,O=$z(j,h);O===0?(j.next=null,g===null?_v=R:g.next=R,R===null&&(Xd=g)):(g=j,(l!==0||(O&3)!==0)&&(fv=!0)),j=R}Ms!==0&&Ms!==5||sm(l),Iu!==0&&(Iu=0)}function $z(l,h){for(var g=l.suspendedLanes,j=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0ne)break;var He=pe.transferSize,Ue=pe.initiatorType;He&&Gz(Ue)&&(pe=pe.responseEnd,X+=He*(pe"u"?null:document;function n8(l,h,g){var j=Yd;if(j&&typeof h=="string"&&h){var R=Kn(h);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),r8.has(R)||(r8.add(R),l={rel:l,crossOrigin:g,href:h},j.querySelector(R)===null&&(h=j.createElement("link"),lo(h,"link",l),xr(h),j.head.appendChild(h)))}}function sK(l){Ml.D(l),n8("dns-prefetch",l,null)}function oK(l,h){Ml.C(l,h),n8("preconnect",l,h)}function aK(l,h,g){Ml.L(l,h,g);var j=Yd;if(j&&l&&h){var R='link[rel="preload"][as="'+Kn(h)+'"]';h==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+Kn(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+Kn(g.imageSizes)+'"]')):R+='[href="'+Kn(l)+'"]';var O=R;switch(h){case"style":O=Zd(l);break;case"script":O=Jd(l)}gi.has(O)||(l=_({rel:"preload",href:h==="image"&&g&&g.imageSrcSet?void 0:l,as:h},g),gi.set(O,l),j.querySelector(R)!==null||h==="style"&&j.querySelector(cm(O))||h==="script"&&j.querySelector(lm(O))||(h=j.createElement("link"),lo(h,"link",l),xr(h),j.head.appendChild(h)))}}function iK(l,h){Ml.m(l,h);var g=Yd;if(g&&l){var j=h&&typeof h.as=="string"?h.as:"script",R='link[rel="modulepreload"][as="'+Kn(j)+'"][href="'+Kn(l)+'"]',O=R;switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Jd(l)}if(!gi.has(O)&&(l=_({rel:"modulepreload",href:l},h),gi.set(O,l),g.querySelector(R)===null)){switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(lm(O)))return}j=g.createElement("link"),lo(j,"link",l),xr(j),g.head.appendChild(j)}}}function cK(l,h,g){Ml.S(l,h,g);var j=Yd;if(j&&l){var R=zr(j).hoistableStyles,O=Zd(l);h=h||"default";var X=R.get(O);if(!X){var ne={loading:0,preload:null};if(X=j.querySelector(cm(O)))ne.loading=5;else{l=_({rel:"stylesheet",href:l,"data-precedence":h},g),(g=gi.get(O))&&r2(l,g);var pe=X=j.createElement("link");xr(pe),lo(pe,"link",l),pe._p=new Promise(function(ze,He){pe.onload=ze,pe.onerror=He}),pe.addEventListener("load",function(){ne.loading|=1}),pe.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,gv(X,h,j)}X={type:"stylesheet",instance:X,count:1,state:ne},R.set(O,X)}}}function lK(l,h){Ml.X(l,h);var g=Yd;if(g&&l){var j=zr(g).hoistableScripts,R=Jd(l),O=j.get(R);O||(O=g.querySelector(lm(R)),O||(l=_({src:l,async:!0},h),(h=gi.get(R))&&n2(l,h),O=g.createElement("script"),xr(O),lo(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},j.set(R,O))}}function uK(l,h){Ml.M(l,h);var g=Yd;if(g&&l){var j=zr(g).hoistableScripts,R=Jd(l),O=j.get(R);O||(O=g.querySelector(lm(R)),O||(l=_({src:l,async:!0,type:"module"},h),(h=gi.get(R))&&n2(l,h),O=g.createElement("script"),xr(O),lo(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},j.set(R,O))}}function s8(l,h,g,j){var R=(R=ce.current)?mv(R):null;if(!R)throw Error(n(446));switch(l){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(h=Zd(g.href),g=zr(R).hoistableStyles,j=g.get(h),j||(j={type:"style",instance:null,count:0,state:null},g.set(h,j)),j):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){l=Zd(g.href);var O=zr(R).hoistableStyles,X=O.get(l);if(X||(R=R.ownerDocument||R,X={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(l,X),(O=R.querySelector(cm(l)))&&!O._p&&(X.instance=O,X.state.loading=5),gi.has(l)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},gi.set(l,g),O||_K(R,l,g,X.state))),h&&j===null)throw Error(n(528,""));return X}if(h&&j!==null)throw Error(n(529,""));return null;case"script":return h=g.async,g=g.src,typeof g=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=Jd(g),g=zr(R).hoistableScripts,j=g.get(h),j||(j={type:"script",instance:null,count:0,state:null},g.set(h,j)),j):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,l))}}function Zd(l){return'href="'+Kn(l)+'"'}function cm(l){return'link[rel="stylesheet"]['+l+"]"}function o8(l){return _({},l,{"data-precedence":l.precedence,precedence:null})}function _K(l,h,g,j){l.querySelector('link[rel="preload"][as="style"]['+h+"]")?j.loading=1:(h=l.createElement("link"),j.preload=h,h.addEventListener("load",function(){return j.loading|=1}),h.addEventListener("error",function(){return j.loading|=2}),lo(h,"link",g),xr(h),l.head.appendChild(h))}function Jd(l){return'[src="'+Kn(l)+'"]'}function lm(l){return"script[async]"+l}function a8(l,h,g){if(h.count++,h.instance===null)switch(h.type){case"style":var j=l.querySelector('style[data-href~="'+Kn(g.href)+'"]');if(j)return h.instance=j,xr(j),j;var R=_({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return j=(l.ownerDocument||l).createElement("style"),xr(j),lo(j,"style",R),gv(j,g.precedence,l),h.instance=j;case"stylesheet":R=Zd(g.href);var O=l.querySelector(cm(R));if(O)return h.state.loading|=4,h.instance=O,xr(O),O;j=o8(g),(R=gi.get(R))&&r2(j,R),O=(l.ownerDocument||l).createElement("link"),xr(O);var X=O;return X._p=new Promise(function(ne,pe){X.onload=ne,X.onerror=pe}),lo(O,"link",j),h.state.loading|=4,gv(O,g.precedence,l),h.instance=O;case"script":return O=Jd(g.src),(R=l.querySelector(lm(O)))?(h.instance=R,xr(R),R):(j=g,(R=gi.get(O))&&(j=_({},g),n2(j,R)),l=l.ownerDocument||l,R=l.createElement("script"),xr(R),lo(R,"link",j),l.head.appendChild(R),h.instance=R);case"void":return null;default:throw Error(n(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(j=h.instance,h.state.loading|=4,gv(j,g.precedence,l));return h.instance}function gv(l,h,g){for(var j=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=j.length?j[j.length-1]:null,O=R,X=0;X title"):null)}function fK(l,h,g){if(g===1||h.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return l=h.disabled,typeof h.precedence=="string"&&l==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function l8(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function dK(l,h,g,j){if(g.type==="stylesheet"&&(typeof j.media!="string"||matchMedia(j.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var R=Zd(j.href),O=h.querySelector(cm(R));if(O){h=O._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(l.count++,l=bv.bind(l),h.then(l,l)),g.state.loading|=4,g.instance=O,xr(O);return}O=h.ownerDocument||h,j=o8(j),(R=gi.get(R))&&r2(j,R),O=O.createElement("link"),xr(O);var X=O;X._p=new Promise(function(ne,pe){X.onload=ne,X.onerror=pe}),lo(O,"link",j),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,h),(h=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=bv.bind(l),h.addEventListener("load",g),h.addEventListener("error",g))}}var s2=0;function hK(l,h){return l.stylesheets&&l.count===0&&xv(l,l.stylesheets),0s2?50:800)+h);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(j),clearTimeout(R)}}:null}function bv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xv(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var yv=null;function xv(l,h){l.stylesheets=null,l.unsuspend!==null&&(l.count++,yv=new Map,h.forEach(pK,l),yv=null,bv.call(l))}function pK(l,h){if(!(h.state.loading&4)){var g=yv.get(l);if(g)var j=g.get(null);else{g=new Map,yv.set(l,g);for(var R=l.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),h2.exports=gV(),h2.exports}var bV=vV();const yV=!1;var C$=T.useLayoutEffect;function xV(e,r,t){T.useEffect(()=>{if(!e.current||t||typeof IntersectionObserver!="function")return()=>r();const n=new IntersectionObserver(s=>{r(s.pop())},{rootMargin:"100px"});return n.observe(e.current),()=>{n.disconnect(),r()}},[r,t,e])}function wV(e){const r=T.useRef(null);return T.useImperativeHandle(e,()=>r.current,[]),r}function og(e){return e[e.length-1]}function tp(e,r){return typeof e=="function"?e(r):e}const z$=Object.prototype.hasOwnProperty,kV=Object.prototype.propertyIsEnumerable;function E$(e){for(const r in e)if(z$.call(e,r))return!0;return!1}const jV=()=>Object.create(null),of=(e,r)=>bf(e,r,jV);function bf(e,r,t=()=>({}),n=0){if(e===r)return e;if(n>500)return r;const s=r,o=V8(e)&&V8(s);if(!o&&!(nb(e)&&nb(s)))return s;const a=o?e:W8(e);if(!a)return s;const i=o?s:W8(s);if(!i)return s;const c=a.length,u=i.length,d=o?new Array(u):t();let _=0;for(let p=0;p"u")return!0;const t=r.prototype;return!(!K8(t)||!t.hasOwnProperty("isPrototypeOf"))}function K8(e){return Object.prototype.toString.call(e)==="[object Object]"}function V8(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function m_(e,r,t){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let n=0,s=e.length;ns||!m_(e[a],r[a],t)))return!1;return s===o}return!1}const SV=/[\x00-\x1f\x7f"<>`{}]/g;function CV(e){return e.replace(SV,r=>"%"+r.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function Q8(e){let r;try{r=decodeURI(e)}catch{r=e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}return CV(r)}const zV=["http:","https:","mailto:","tel:"];function sb(e,r){if(!e)return!1;try{const t=new URL(e);return!r.has(t.protocol)}catch{return!1}}function gm(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const r=/%25|%5C/gi;let t=0,n="",s;for(;(s=r.exec(e))!==null;)n+=Q8(e.slice(t,s.index))+s[0],t=r.lastIndex;n=n+Q8(t?e.slice(t):e);let o=!1;return n.startsWith("//")&&(o=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:o}}function EV(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function NV(e,r){if(e===r)return!0;if(e.length!==r.length)return!1;for(let t=0;t{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,n&&(n.next=o,o.prev=n)):(o.next.prev=void 0,t=o.next,o.next=void 0,n&&(o.prev=n,n.next=o)),n=o)};return{get(o){const a=r.get(o);if(a)return s(a),a.value},set(o,a){if(r.size>=e&&t){const c=t;r.delete(c.key),c.next&&(t=c.next,c.next.prev=void 0),c===n&&(n=void 0)}const i=r.get(o);if(i)i.value=a,s(i);else{const c={key:o,value:a,prev:n};n&&(n.next=c),n=c,t||(t=c),r.set(o,c)}},clear(){r.clear(),t=void 0,n=void 0}}}const f_=4,N$=5;function A$(e,r,t=new Uint16Array(6)){const n=e.indexOf("/",r),s=n===-1?e.length:n,o=e.substring(r,s);if(!o||!o.includes("$"))return t[0]=0,t[1]=r,t[2]=r,t[3]=s,t[4]=s,t[5]=s,t;if(o==="$"){const c=e.length;return t[0]=2,t[1]=r,t[2]=r,t[3]=c,t[4]=c,t[5]=c,t}if(o.charCodeAt(0)===36)return t[0]=1,t[1]=r,t[2]=r+1,t[3]=s,t[4]=s,t[5]=s,t;const a=o.indexOf("{");let i;if(a!==-1&&a+1!D.parse&&D.caseSensitive===E&&D.prefix===N&&D.suffix===A));if($)w=$;else{const D=AV(z,_,E,N,A);w=D,D.parent=s,D.depth=o;let I;z===1?I=s.dynamic??(s.dynamic=[]):z===3?I=s.optional??(s.optional=[]):I=s.wildcard??(s.wildcard=[]),I.push(D),I.length===2&&(a==null||a.push(I))}break}}s=w}if(x&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=kh(_);b.kind=N$,b.parent=s,o++,b.depth=o,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&_.endsWith("/")){const b=kh(_);b.kind=f_,b.parent=s,o++,b.depth=o,s.index=b,s=b}s.parse=x??null,s.priority=((d=p==null?void 0:p.params)==null?void 0:d.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=_)}if(t.children)for(const _ of t.children)dy(e,r,_,c,s,o,a,i)}function T$(e,r){if(e.parse&&!r.parse)return-1;if(!e.parse&&r.parse)return 1;if(e.parse&&r.parse&&(e.priority||r.priority))return r.priority-e.priority;if(e.prefix&&r.prefix&&e.prefix!==r.prefix){if(e.prefix.startsWith(r.prefix))return-1;if(r.prefix.startsWith(e.prefix))return 1}if(e.suffix&&r.suffix&&e.suffix!==r.suffix){if(e.suffix.endsWith(r.suffix))return-1;if(r.suffix.endsWith(e.suffix))return 1}return e.prefix&&!r.prefix?-1:!e.prefix&&r.prefix?1:e.suffix&&!r.suffix?-1:!e.suffix&&r.suffix?1:e.caseSensitive&&!r.caseSensitive?-1:!e.caseSensitive&&r.caseSensitive?1:0}function kh(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function AV(e,r,t,n,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:r,parent:null,parse:null,priority:0,caseSensitive:t,prefix:n,suffix:s}}function TV(e,r){const t=kh("/"),n=new Uint16Array(6),s=[];for(const o of e)dy(!1,n,o,1,t,0,s);for(const o of s)o.sort(T$);r.masksTree=t,r.flatCache=ob(1e3)}function RV(e,r){e||(e="/");const t=r.flatCache.get(e);if(t!==void 0)return t;const n=kj(e,r.masksTree);return r.flatCache.set(e,n),n}function MV(e,r,t,n,s){e||(e="/"),n||(n="/");const o=r?`case\0${e}`:e;let a=s.singleCache.get(o);return a||(a=kh("/"),dy(r,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(o,a)),kj(n,a,t)}function OV(e,r,t=!1){const n=t?e:`nofuzz\0${e}`,s=r.matchCache.get(n);if(s!==void 0)return s;e||(e="/");let o;try{o=kj(e,r.segmentTree,t)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=M$(o.route)),r.matchCache.set(n,o),o}function $V(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function DV(e,r=!1,t){const n=kh(e.fullPath),s=new Uint16Array(6),o=[],a={},i={};let c=0;dy(r,s,e,1,n,0,o,u=>{if(t==null||t(u,c),u.id in a&&wj(),a[u.id]=u,c!==0&&u.path){const d=$V(u.fullPath);(!i[d]||u.fullPath.endsWith("/"))&&(i[d]=u)}c++});for(const u of o)u.sort(T$);return{processedTree:{segmentTree:n,singleCache:ob(1e3),matchCache:ob(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:i}}function kj(e,r,t=!1){const n=e.split("/"),s=IV(e,n,r,t);if(!s)return null;const[o]=R$(e,n,s);return{route:s.node.route,rawParams:o}}function R$(e,r,t){var d,_,p,m;const n=LV(t.node);let s=null;const o=Object.create(null);let a=((d=t.extract)==null?void 0:d.part)??0,i=((_=t.extract)==null?void 0:_.node)??0,c=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;i=0;N--){const A=_.wildcard[N],{prefix:E,suffix:M}=A;if(!(E&&(y||!(A.caseSensitive?S:z??(z=S.toLowerCase())).startsWith(E)))){if(M){if(y)continue;const $=r.slice(p).join("/"),D=$.slice(-M.length);if((A.caseSensitive?D:D.toLowerCase())!==M||$.length-M.length=0;A--){const E=_.optional[A];i.push({node:E,index:p,skipped:N,statics:k,dynamics:x,optionals:v,extract:b,rawParams:w})}if(!y)for(let A=_.optional.length-1;A>=0;A--){const E=_.optional[A],{prefix:M,suffix:$}=E;if(M||$){const D=E.caseSensitive?S:z??(z=S.toLowerCase());if(M&&!D.startsWith(M)||$&&D.indexOf($,D.length-$.length)=0;N--){const A=_.dynamic[N],{prefix:E,suffix:M}=A;if(E||M){const $=A.caseSensitive?S:z??(z=S.toLowerCase());if(E&&!$.startsWith(E)||M&&$.indexOf(M,$.length-M.length)=0;N--){const A=_.pathless[N];i.push({node:A,index:p,skipped:m,statics:k,dynamics:x,optionals:v,extract:b,rawParams:w})}}if(u)return u;if(n&&c){let d=c.index;for(let p=0;pe.statics||r.statics===e.statics&&(r.dynamics>e.dynamics||r.dynamics===e.dynamics&&(r.optionals>e.optionals||r.optionals===e.optionals&&((r.node.kind===f_)>(e.node.kind===f_)||r.node.kind===f_==(e.node.kind===f_)&&r.node.depth>e.node.depth))):!0}function E1(e){return N1(e.filter(r=>r!==void 0).join("/"))}function N1(e){return e.replace(/\/{2,}/g,"/")}function O$(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Kl(e){const r=e.length;return r>1&&e[r-1]==="/"?e.replace(/\/{1,}$/,""):e}function $$(e){return Kl(O$(e))}function ab(e,r){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${r}/`?e.slice(0,-1):e}function BV(e,r,t){return ab(e,t)===ab(r,t)}function FV({base:e,to:r,trailingSlash:t="never",cache:n}){if(r.includes("//")&&(r=N1(r)),r.startsWith("/"))return r.length===1||t==="preserve"?r:t==="always"?r.endsWith("/")?r:`${r}/`:r.endsWith("/")?r.slice(0,-1):r;const s=r===".";let o;if(n){o=s?e:e+"\0"+r;const u=n.get(o);if(u)return u}let a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=N1(e)),a=e.split("/");a.length>1&&og(a)==="";)a.pop();const u=r.split("/");for(let d=0,_=u.length;d<_;d++){const p=u[d];p===""?d?d===_-1&&a.push(p):a=[p]:p===".."?a.length>1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(og(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const i=a.join("/"),c=(s?N1(i):i)||"/";return o&&n&&n.set(o,c),c}function HV(e){const r=new Map(e.map(s=>[encodeURIComponent(s),s])),t=Array.from(r.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(t,"g");return s=>s.replace(n,o=>r.get(o)??o)}function v2(e,r,t){const n=r[e];return typeof n!="string"?n:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(s=>Z8(s,t)).join("/"):Z8(n,t)}function Y8({path:e,params:r,decoder:t,...n}){let s=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:s};const a=e.length;let i=0,c,u="";for(;ie.state.__TSR_key||e.href;function QV(e){const r=e.getAttribute(J8);if(r)return`[${J8}="${r}"]`;let t="",n=e,s;for(;s=n.parentNode;){let o=1,a=n;for(;a=a.previousElementSibling;)o++;const i=`${n.localName}:nth-child(${o})`;t=t?`${i} > ${t}`:i,n=s}return t}let Rv=!1;const A1="window";function D4(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function e9(e){const r=new Set;for(const t of e){if(t===A1)continue;const n=D4(t);n&&r.add(n)}return r}function XV(e,r){const t=e.options.scrollRestoration,n=e._scroll;t&&(n.restoring=!0);const s=e.options.getScrollRestorationKey||VV,o=new Set,a=i=>{const c=Zu[i]||(Zu[i]={});for(const u of o)u===document?c[A1]={scrollX,scrollY}:u.isConnected&&(c[QV(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!n.restoration&&(n.restoration=!0,Rv=!1,history.scrollRestoration="manual",document.addEventListener("scroll",i=>{Rv||o.add(i.target)},!0),e.subscribe("onBeforeLoad",i=>{i.fromLocation&&a(s(i.fromLocation)),o.clear()}),addEventListener("pagehide",()=>{a(s(e.stores.resolvedLocation.get()??e.stores.location.get())),KV()})),!n.reset&&(n.reset=!0,e.subscribe("onRendered",i=>{var x;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,d=n.next,_=n.hash;let p;if(o.clear(),n.next=!0,n.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=s(i.toLocation),k=i.fromLocation&&s(i.fromLocation);if(n.restoring&&k&&k!==m){const v=Zu[k];if(v){let b=Zu[m];for(const w in v){if(w===A1){if(d)continue}else{const y=D4(w);if(!y||d&&u&&(p??(p=e9(u)),p.has(y)))continue}b||(b=Zu[m]={}),b[w]??(b[w]=v[w])}}}Rv=!0;try{const v=i.toLocation.hash,b=i.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(d){!v&&u&&(p??(p=e9(u)));const y=v&&b&&_,S=n.restoring?Zu[m]:void 0;if(S)for(const z in S){const{scrollX:N,scrollY:A}=S[z];if(z===A1){if(y)continue;scrollTo({top:A,left:N,behavior:c}),w=!0}else{const E=D4(z);E&&(E.scrollLeft=N,E.scrollTop=A,p==null||p.delete(E))}}if(!v){const z={top:0,left:0,behavior:c};if(w||scrollTo(z),p)for(const N of p)N.scrollTo(z)}}!w&&v&&b&&((x=document.getElementById(v))==null||x.scrollIntoView(b))}finally{Rv=!1}}))}function YV(e,r=String){const t=new URLSearchParams;for(const n in e){const s=e[n];s!==void 0&&t.set(n,r(s))}return t.toString()}function b2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function ZV(e){const r=new URLSearchParams(e),t=Object.create(null);for(const[n,s]of r.entries()){const o=t[n];o==null?t[n]=b2(s):Array.isArray(o)?o.push(b2(s)):t[n]=[o,b2(s)]}return t}const JV=/^(?:\s|["[{\d-]|fa|nu|tr)/,eQ=rQ(JSON.parse),tQ=nQ(JSON.stringify,JSON.parse);function rQ(e){return r=>{r[0]==="?"&&(r=r.substring(1));const t=ZV(r);for(const n in t){const s=t[n];if(typeof s=="string")try{t[n]=e(s)}catch{}}return t}}function nQ(e,r){const t=r===JSON.parse;function n(s){if(s&&typeof s=="object")try{return e(s)}catch{}else if(r&&typeof s=="string"){if(t&&!JV.test(s))return s;try{return r(s),e(s)}catch{}}return s}return s=>{const o=YV(s,n);return o?`?${o}`:""}}const Sh="__root__";function sQ(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const r=new Headers(e.headers);e.href&&r.get("Location")===null&&r.set("Location",e.href);const t=new Response(null,{status:e.statusCode,headers:r});if(t.options=e,e.throw)throw t;return t}function D$(e){return e instanceof Response&&!!e.options}function oQ(e){return{input:({url:r})=>{for(const t of e)r=L4(t,r);return r},output:({url:r})=>{for(let t=e.length-1;t>=0;t--)r=L$(e[t],r);return r}}}function aQ(e){const r=$$(e.basepath),t=`/${r}`,n=e.caseSensitive?t:t.toLowerCase(),s=`${n}/`;return{input:({url:o})=>{const a=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===n?o.pathname="/":a.startsWith(s)&&(o.pathname=o.pathname.slice(t.length)),o},output:({url:o})=>(o.pathname=E1(["/",r,o.pathname]),o)}}function L4(e,r){var n;const t=(n=e==null?void 0:e.input)==null?void 0:n.call(e,{url:r});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return r}function L$(e,r){var n;const t=(n=e==null?void 0:e.output)==null?void 0:n.call(e,{url:r});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return r}function iQ(e,r){const{createMutableStore:t,createReadonlyStore:n,batch:s}=r,o=new Map,a=t("idle"),i=t(e),c=t(void 0),u=t([]),d=n(()=>u.get().map(x=>o.get(x).get())),_=n(()=>({status:a.get(),isLoading:a.get()==="pending",matches:d.get(),location:i.get(),resolvedLocation:c.get()}));function p(x){let v=o.get(x);return v||(v=t(void 0),o.set(x,v)),v}const m={status:a,location:i,resolvedLocation:c,ids:u,matches:d,byRoute:o,__store:_,getMatchStore:p,setMatches:k};function k(x){const v=u.get(),b=x.map(w=>w.routeId);s(()=>{NV(v,b)||u.set(b);for(const w of v)b.includes(w)||o.get(w).set(()=>{});for(const w of x){const y=p(w.routeId);y.get()!==w&&y.set(w)}})}return m}var g_="__TSR_index",t9="popstate",r9="beforeunload";function cQ(e){let r=e.getLocation();const t=new Set,n=a=>{r=e.getLocation(),t.forEach(i=>i({location:r,action:a}))},s=a=>{e.notifyOnIndexChange??!0?n(a):r=e.getLocation()},o=async({task:a,navigateOpts:i,...c})=>{var _,p;if((i==null?void 0:i.ignoreBlocker)??!1){a();return}const u=((_=e.getBlockers)==null?void 0:_.call(e))??[],d=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&d)for(const m of u){const k=ib(c.path,c.state);if(await m.blockerFn({currentLocation:r,nextLocation:k,action:c.type})){(p=e.onBlocked)==null||p.call(e);return}}a()};return{get location(){return r},get length(){return e.getLength()},subscribers:t,subscribe:a=>(t.add(a),()=>{t.delete(a)}),push:(a,i,c)=>{const u=r.state[g_];i=n9(u+1,i),o({task:()=>{e.pushState(a,i),n({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:i})},replace:(a,i,c)=>{const u=r.state[g_];i=n9(u,i),o({task:()=>{e.replaceState(a,i),n({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:i})},go:(a,i)=>{o({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:i,type:"GO"})},back:a=>{o({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>r.state[g_]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const i=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...i,a]),()=>{var d,_;const u=((d=e.getBlockers)==null?void 0:d.call(e))??[];(_=e.setBlockers)==null||_.call(e,u.filter(p=>p!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:n}}function n9(e,r){r||(r={});const t=jj();return{...r,key:t,__TSR_key:t,[g_]:e}}function lQ(e){var A,E;const r=typeof document<"u"?window:void 0,t=r.history.pushState,n=r.history.replaceState;let s=[];const o=()=>s,a=M=>s=M,i=(M=>M),c=(()=>ib(`${r.location.pathname}${r.location.search}${r.location.hash}`,r.history.state));if(!((A=r.history.state)!=null&&A.__TSR_key)&&!((E=r.history.state)!=null&&E.key)){const M=jj();r.history.replaceState({[g_]:0,key:M,__TSR_key:M},"")}let u=c(),d,_=!1,p=!1,m=!1,k=!1;const x=()=>u;let v;const b=()=>{v&&(N._ignoreSubscribers=!0,(v[2]?r.history.pushState:r.history.replaceState)(v[1],"",v[0]),N._ignoreSubscribers=!1,v=void 0,d=void 0)},w=(M,$,D)=>{const I=i($),G=!!v;G||(d=u),u=ib($,D),v=[I,D,(v==null?void 0:v[2])||M],G||queueMicrotask(()=>b())},y=M=>{u=c(),N.notify({type:M})},S=async()=>{if(p){p=!1;return}const M=c(),$=M.state[g_]-u.state[g_],D=$===1,I=$===-1,G=!D&&!I||_;_=!1;const H=G?"GO":I?"BACK":"FORWARD",Q=G?{type:"GO",index:$}:{type:I?"BACK":"FORWARD"};if(m)m=!1;else{const K=o();if(typeof document<"u"&&K.length){for(const J of K)if(await J.blockerFn({currentLocation:u,nextLocation:M,action:H})){p=!0,r.history.go(1),N.notify(Q);return}}}u=c(),N.notify(Q)},z=M=>{if(k){k=!1;return}let $=!1;const D=o();if(typeof document<"u"&&D.length)for(const I of D){const G=I.enableBeforeUnload??!0;if(G===!0){$=!0;break}if(typeof G=="function"&&G()===!0){$=!0;break}}if($)return M.preventDefault(),M.returnValue=""},N=cQ({getLocation:x,getLength:()=>r.history.length,pushState:(M,$)=>w(!0,M,$),replaceState:(M,$)=>w(!1,M,$),back:M=>(M&&(m=!0),k=!0,r.history.back()),forward:M=>{M&&(m=!0),k=!0,r.history.forward()},go:M=>{_=!0,r.history.go(M)},createHref:M=>i(M),flush:b,destroy:()=>{r.history.pushState=t,r.history.replaceState=n,r.removeEventListener(r9,z,{capture:!0}),r.removeEventListener(t9,S)},onBlocked:()=>{d&&u!==d&&(u=d)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return r.addEventListener(r9,z,{capture:!0}),r.addEventListener(t9,S),r.history.pushState=function(...M){const $=t.apply(r.history,M);return N._ignoreSubscribers||y("PUSH"),$},r.history.replaceState=function(...M){const $=n.apply(r.history,M);return N._ignoreSubscribers||y("REPLACE"),$},N}function uQ(e){let r=e.replace(/[\x00-\x1f\x7f]/g,"");return r.startsWith("//")&&(r="/"+r.replace(/^\/+/,"")),r}function ib(e,r){const t=uQ(e),n=t.indexOf("#"),s=t.indexOf("?"),o=jj();return{href:t,pathname:t.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:t.length),hash:n>-1?t.substring(n):"",search:s>-1?t.slice(s,n===-1?void 0:n):"",state:r||{[g_]:0,key:o,__TSR_key:o}}}function jj(){return(Math.random()+1).toString(36).substring(7)}function s9(e){var r,t;return e.options.loader||e.options.beforeLoad||e.lazyFn||((r=e.options.component)==null?void 0:r.preload)||((t=e.options.pendingComponent)==null?void 0:t.preload)}function hy(e,r){return{fromLocation:r,toLocation:e,pathChanged:(r==null?void 0:r.pathname)!==e.pathname,hrefChanged:(r==null?void 0:r.href)!==e.href,hashChanged:(r==null?void 0:r.hash)!==e.hash}}function o9({key:e,__TSR_key:r,__TSR_index:t,__hashScrollIntoViewOptions:n,...s}){return s}function _Q(e,r,t,n){var s,o,a,i;for(const c of r){if(n&&e._tx!==n)return;t.some(u=>u.routeId===c.routeId)||(o=(s=e.routesById[c.routeId].options).onLeave)==null||o.call(s,c)}for(const c of t){if(n&&e._tx!==n)return;(i=(a=e.routesById[c.routeId].options)[r.some(u=>u.routeId===c.routeId)?"onStay":"onEnter"])==null||i.call(a,c)}}var fQ=class{constructor(e,r){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async t=>(t(),!1),this.update=t=>{const n=this.options,s=this.basepath??(n==null?void 0:n.basepath)??"/",o=this.basepath===void 0,a=n==null?void 0:n.rewrite;if(this.options={...n,...t},this.isServer=this.options.isServer??yV??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=HV(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=lQ()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let u;this.resolvePathCache=ob(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=iQ(this.latestLocation,u),XV(this)}const i=this.options.basepath??"/",c=this.options.rewrite;if(o||s!==i||a!==c){this.basepath=i;const u=[],d=$$(i);d&&d!=="/"&&u.push(aQ({basepath:i})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:oQ(u),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const t=DV(this.routeTree,this.options.caseSensitive,(n,s)=>{n.init({originalIndex:s})});return this.options.routeMasks&&TV(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,n)=>{const s={eventType:t,fn:n};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{for(const n of this.subscribers)if(n.eventType===t.type)try{n.fn(t)}catch(s){console.error(s)}},this.parseLocation=(t,n)=>{const s=({pathname:c,search:u,hash:d,href:_,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const b=this.options.parseSearch(u),w=this.options.stringifySearch(b);return{href:c+w+d,publicHref:c+w+d,pathname:gm(c).path,external:!1,searchStr:w,search:of(n==null?void 0:n.search,b),hash:gm(d.slice(1)).path,state:bf(n==null?void 0:n.state,p)}}const m=new URL(_,this.origin),k=L4(this.rewrite,m),x=this.options.parseSearch(k.search),v=this.options.stringifySearch(x);return k.search=v,{href:k.href.replace(k.origin,""),publicHref:_,pathname:gm(k.pathname).path,external:!!this.rewrite&&k.origin!==this.origin,searchStr:v,search:of(n==null?void 0:n.search,x),hash:gm(k.hash.slice(1)).path,state:bf(n==null?void 0:n.state,p)}},o=s(t),{__tempLocation:a,__tempKey:i}=o.state;if(a&&(!i||i===this.tempLocationKey)){const c=s(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(t,n)=>FV({base:t,to:n,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,n,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:n},s):this.matchRoutesInternal(t,n),this.getMatchedRoutes=t=>{const n=Object.create(null),s=OV(Kl(t),this.processedTree,!0);return s&&Object.assign(n,s.rawParams),[(s==null?void 0:s.branch)||[this.routesById.__root__],n,s==null?void 0:s.route]},this.buildLocation=t=>{const n=(o={})=>{var M,$;if(o.href){const D=ib(o.href,{});o={...o,to:L4(this.rewrite,new URL(D.pathname,this.origin)).pathname,search:this.options.parseSearch(D.search),hash:D.hash.slice(1)}}const a=o._fromLocation||this._pendingLocation||this.latestLocation,i=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??i[1],u=i[2],d=i[3],_=this.resolvePathWithBase(c,o.to?`${o.to}`:".");let p=a9(o.params,d);const m=this.routesByPath[Kl(_)];let k;if(m)k=this.getRouteBranch(m);else if(_.includes("$"))k=[];else{const[D,I,G]=this.getMatchedRoutes(_);k=D,this.options.notFoundRoute&&(!G||G.path!=="/"&&I["**"])&&(k=[...k,this.options.notFoundRoute])}if(k.length&&E$(p))for(const D of k){const I=((M=D.options.params)==null?void 0:M.stringify)??D.options.stringifyParams;if(I){p===d&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,I(p))}catch{}}}const x=t.leaveParams?_:gm(Y8({path:_,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=u;if(t._includeValidateSearch&&(($=this.options.search)!=null&&$.strict)){const D={};k.forEach(I=>{if(I.options.validateSearch)try{Object.assign(D,T1(I.options.validateSearch,{...D,...v}))}catch{}}),v=D}v=hQ(v,o,k,t._includeValidateSearch),v=of(u,v);const b=this.options.stringifySearch(v),w=o.hash===!0?a.hash:o.hash?tp(o.hash,a.hash):void 0,y=w?`#${w}`:"";let S=o.state===!0?a.state:o.state?tp(o.state,a.state):{};o.state&&(S=bf(a.state,S));const z=`${x}${b}${y}`;let N,A,E=!1;if(this.rewrite){const D=new URL(z,this.origin),I=L$(this.rewrite,D);N=D.href.replace(D.origin,""),I.origin!==this.origin?(A=I.href,E=!0):A=I.pathname+I.search+I.hash}else N=EV(z),A=N;return{publicHref:A,href:N,pathname:x,search:v,searchStr:b,state:S,hash:w??"",external:E,unmaskOnReload:o.unmaskOnReload}},s=n(t);if(t.mask)s.maskedLocation=n({from:t.from,...t.mask});else if(this.options.routeMasks){const o=RV(s.pathname,this.processedTree);if(o){const a=Object.assign(Object.create(null),o.rawParams),{from:i,params:c,...u}=o.route,d=a9(c,a);s.maskedLocation=n({from:t.from,...u,params:d})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:n,...s})=>{let o;const a=Kl(this.latestLocation.href)===Kl(s.href)&&m_(o9(s.state),o9(this.latestLocation.state)),i=this._commitPromise;let c;const u=new Promise(d=>{c=d});if(u.resolve=()=>{c(),i==null||i.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:d,hashScrollIntoView:_,...p}=s;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=_??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,o=s.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n}),this.history.subscribers.size||this.load({action:{type:o}})}return this._scroll.next=s.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:t,resetScroll:n,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:a,...i}={})=>{const c=this.buildLocation({...i,_includeValidateSearch:!0});this._pendingLocation=c;const u=this.commitLocation({...c,viewTransition:o,replace:t,resetScroll:n,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:n,href:s,publicHref:o,...a})=>{var c,u;let i=!1;if(s)try{new URL(`${s}`),i=!0}catch{}if(i&&!n&&(n=!0),n){if(t!==void 0||!s){const _=this.buildLocation({to:t,...a});s=s??_.publicHref,o=o??_.publicHref}const d=!i&&o?o:s;if(sb(d,this.protocolAllowlist))return;if(!a.ignoreBlocker){const _=((u=(c=this.history).getBlockers)==null?void 0:u.call(c))??[];for(const p of _)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(d):window.location.href=d;return}return this.buildAndCommitLocation({...a,href:s,to:t,_isNavigate:!0})},this.load=async t=>{this.updateLatestLocation(),t!=null&&t.action&&(this._scroll.hash=t.action.type==="PUSH"||t.action.type==="REPLACE"),await kQ(this,t)},this.startViewTransition=t=>{var s,o;const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document.startViewTransition=="function"){let a;if(typeof n=="object"&&((o=(s=window.CSS)==null?void 0:s.supports)!=null&&o.call(s,"selector(:active-view-transition-type(a))"))){const i=this.latestLocation,c=this.stores.resolvedLocation.get(),u=typeof n.types=="function"?n.types(hy(i,c)):n.types;if(u===!1)return t();a={update:t,types:u}}else a=t;return document.startViewTransition(a).updateCallbackDone}return t()},this.invalidate=t=>{var u,d;const n=this._committed,s=t==null?void 0:t.filter,o=this._preloads,a=new Set([...n,...this._cache.values(),...[...(o==null?void 0:o.values())??[]].flat(),...((u=this._tx)==null?void 0:u[3])??[]].filter(_=>!s||s(_)).map(_=>_.id)),i=[];for(const[_,p]of o??[])p.some(m=>a.has(m.id))&&(o.delete(_),i.push(_));const c=_=>{if(a.has(_.id)){const p=this.routesById[_.routeId],m={..._,invalid:!0,...(t!=null&&t.forcePending||_.status==="error"||_.status==="notFound")&&s9(p)?{status:"pending",error:void 0}:void 0};return _._flight=void 0,m}return _};this._committed=n.map(c);for(const[_,p]of this._cache)a.has(_)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const _ of a)(d=this._flights)==null||d.delete(_);for(const _ of i)_.abort();return this.shouldViewTransition=!1,this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const n=t.headers.get("Location");if(t.options.href){if(n)try{const s=new URL(n);if(this.origin&&s.origin===this.origin){const o=s.pathname+s.search+s.hash;t.options.href=o,t.headers.set("Location",o)}}catch{}}else{const s=this.buildLocation(t.options).publicHref||"/";t.options.href=s,t.headers.set("Location",s)}if(t.options.href&&sb(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{var u;const n=this._cache,s=this._preloads,o=t==null?void 0:t.filter,a=[],i=[];for(const[d,_]of n)(!o||o(_))&&(i.push(d),a.push(_));const c=[];for(const[d,_]of s??[])(!o||_.some(o))&&(c.push(d),a.push(..._));for(const d of i)n.delete(d);for(const d of c)s.delete(d);for(const d of a){const _=d._flight;d._flight=void 0,_&&!--_[2]&&(((u=this._flights)==null?void 0:u.get(d.id))===_&&this._flights.delete(d.id),c.push(_[1]))}for(const d of c)d.abort()},this.loadRouteChunk=Ch,this.preloadRoute=t=>jQ(this,t),this.matchRoute=(t,n)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},o=this.buildLocation(s),a=this.stores.status.get()==="pending";if(n!=null&&n.pending&&!a)return!1;const i=(n==null?void 0:n.pending)??!a?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=MV(o.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,i.pathname,this.processedTree);return!c||t.params&&!m_(c.rawParams,t.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?m_(i.search,o.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.getStoreConfig=r,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??tQ,parseSearch:e.parseSearch??eQ,protocolAllowlist:e.protocolAllowlist??zV}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:r,processedTree:t}){this.routesById=e,this.routesByPath=r,this.processedTree=t;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}getRouteBranch(e){let r=this.routeBranchCache.get(e);return r||(r=M$(e),this.routeBranchCache.set(e,r)),r}matchRoutesInternal(e,r){var p,m;const[t,n,s]=this.getMatchedRoutes(e.pathname);let o=t,a=!1;(s?s.path!=="/"&&n["**"]:Kl(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const i=a?pQ(this.options.notFoundMode,o):void 0,c=new Array(o.length),u=this._committed,d=(k,x)=>{const v=u[x];return(v==null?void 0:v.routeId)===k.id?v:k===this.options.notFoundRoute?u.find(b=>b.routeId===k.id):void 0};let _;for(let k=0;k{const m=p(c.preSearchFilters?c.preSearchFilters.reduce((k,x)=>x(k),_):_);return c.postSearchFilters?c.postSearchFilters.reduce((k,x)=>x(k),m):m};s.push(d)}const u=c.validateSearch;if(n&&u){const d=({search:_,next:p,meta:m})=>{const k=p(_);try{const x=T1(u,k);if(m&&x)for(const v in x)v in k||(m.defaulted||(m.defaulted=new Map)).set(v,x[v]);return{...k,...x}}catch{}return k};s.push(d)}}const o=(i,c,u)=>{if(i>=s.length){if(!r.search)return{};if(r.search===!0)return c;const _=tp(r.search,c);return u&&(u.explicit=_),_}const d=(_,p)=>{if(p){const m=u||{};return{search:o(i+1,_,m),meta:m}}return o(i+1,_,u)};return s[i]({search:c,next:d,meta:u})};return o(0,e)}function pQ(e,r){if(e!=="root"){let t;for(let n=r.length-1;n>=0;n--){const s=r[n];if(s.options.notFoundComponent)return s.id;t||(t=s.children&&s.id)}if(t)return t}return Sh}function a9(e,r){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return r;const t=Object.assign(Object.create(null),r);return Object.assign(t,tp(e,t))}function i9(e,r){var n;const t=((n=e.options.params)==null?void 0:n.parse)??e.options.parseParams;t&&Object.assign(r,t(r))}function I4(e,r){var t,n;return(n=(t=e.options[r])==null?void 0:t.preload)==null?void 0:n.call(t)}function mQ(e,r){const t=I4(e,"component");let n=I4(e,"pendingComponent");return r&&(n?n=n.then(r):r()),t&&n?Promise.all([t,n]).then(()=>{}):t??n}function Ch(e,r,t){const n=()=>r===!1?void 0:r?I4(e,r):mQ(e,t),s=e._lazy;if(s)return s===!0?n():s.then(n);if(!e.lazyFn)return n();const o=e.lazyFn().then(a=>{{const{id:i,...c}=a.options;Object.assign(e.options,c),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=o,o.then(n)}function Sj(e){const r=e.findIndex(t=>t.status!=="success"||t._notFound)+1;return r&&r{const s=()=>n(r);r.addEventListener("abort",s,{once:!0}),Promise.resolve(e).then(t,n).finally(()=>r.removeEventListener("abort",s))})}function _d(e,r){return e.routesById[r.routeId]}function ig(e,r,t){return D$(e)?[Ia,e]:rp(e)?(e.routeId||(e.routeId=t),[py,e]):r?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[eu,e]):[Bc,e]}function Cj(e,r){var n,s;let t=ig(r,!0,e.id);if(t[0]!==eu)return t;try{(s=(n=e.options).onError)==null||s.call(n,t[1])}catch(o){t=ig(o,!0,e.id)}return t}function qm(e,r,t,n,s){return s[0].signal.aborted?y_:Nj(e,r,t,Cj(t,n),s)}async function gQ(e,r,t,n,s,o){var d,_;const[a,i]=r,c=t[0].signal,u=!!t[3];for(let p=t[6]??0;pe.navigate({...S,_fromLocation:a}),buildLocation:e.buildLocation,cause:u?"preload":m.cause,abortController:t[0],preload:u,matches:i,routeId:k.id};try{const S=m._ctx||(m._ctx=k.options.context?k.options.context({...v,deps:m.loaderDeps,context:x})||{}:void 0);m.context={...x,...S}}catch(S){return Ql(e,m),[p,qm(e,r,k,S,t)]}if(c.aborted)return[p,y_];const b=m.paramsError??m.searchError;if(b!==void 0)return Ql(e,m),[p,qm(e,r,k,b,t)];const w=k.options.beforeLoad;if(!w)continue;const y=m.status;p>=o&&(m.status="pending",(_=t[7])==null||_.call(t));try{cg(e,m,"beforeLoad",t[0]);const S=await ud(w({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,y_];const z=Nj(e,r,k,ig(S,!1,k.id),t);if(z[0]!==Bc)return Ql(e,m),[p,z];m.context={...m.context,...S}}catch(S){return Ql(e,m),[p,qm(e,r,k,S,t)]}finally{m.status=y,cg(e,m,!1,t[0])}}s()}function zj(e,r,t){var n;if(!(!t||--t[2])){if(((n=e._flights)==null?void 0:n.get(r.id))===t){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(r)&&s[3].some(o=>o.id===r.id)&&s[3].some(o=>o.isFetching==="beforeLoad"))return;e._flights.delete(r.id)}return t[1]}}function Ql(e,r){var n;const t=r._flight;r._flight=void 0,(n=zj(e,r,t))==null||n.abort()}function ma(e,r,t,n){var o;const s=[];for(const a of r)if(!(t!=null&&t.includes(a))){const i=a._flight;if(a._flight=void 0,n&&(i==null?void 0:i[2])===1&&((o=e._flights)==null?void 0:o.get(a.id))===i&&(t!=null&&t.some(c=>c.id===a.id)))i[2]=0;else{const c=zj(e,a,i);c&&s.push(c)}}for(const a of s)a.abort()}function Ej(e){for(const r of e){const t=r._flight;t&&t[2]++}}function cg(e,r,t,n){var a;if(r.isFetching=t,n&&((a=e._tx)==null?void 0:a[0])!==n)return;const s=e.stores.byRoute.get(r.routeId),o=s==null?void 0:s.get();(o==null?void 0:o.id)===r.id&&s.set({...o,isFetching:t})}function I$(e,r,t,n,s,o,a){const i=r[0];return{params:t.params,location:i,navigate:c=>e.navigate({...c,_fromLocation:i}),cause:a?"preload":t.cause,abortController:s,preload:a,deps:t.loaderDeps,parentMatchPromise:o,context:t.context,route:n,...e.options.additionalContext}}async function c9(e,r,t,n,s,o,a){const i=a[0],c=i.signal;if(c.aborted)return y_;if(!s)return[Bc,void 0];let u=t._flight;cg(e,t,"loader",i);try{if(!u){const d=new AbortController;u=[Promise.resolve().then(()=>s(I$(e,r,t,n,d,o,!!a[3]))).then(_=>ig(_,!1,n.id),_=>ig(_,!0,n.id)).then(_=>{var p;return _[0]!==Bc&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||d.abort()),_[0]===eu&&u[2]?Cj(n,_[1]):_}),d,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],Nj(e,r,n,await ud(u[0],c),a)}catch(d){if(d!==c||!c.aborted)throw d;return Ql(e,t),y_}finally{cg(e,t,!1,i)}}function l9(e,r,t){r[0]!==Ia&&(e.status="success",e.error=void 0,r[0]===Bc?(e.loaderData=r[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function vQ(e,r,t){const n=e._cache.get(r.id);if(n!==t||e._committed.some(o=>o.id===r.id&&o._flight===r._flight))return;const s={...r,_notFound:void 0,context:{}};s._flight&&s._flight[2]++,e._cache.set(r.id,s),n&&Ql(e,n)}function u9(e,r){return r[0]===eu||r[0]===py?{...e,status:r[0]===eu?"error":"notFound",error:r[1],_flight:void 0}:e}function bQ(e,r,t,n,s,o,a){var I,G;const i=r[1][t],c=_d(e,i),u=!!o[3],d=e._cache.get(i.id);let _,p=!1,m;try{if(i.status==="success"&&(_=c.options.shouldReload,typeof _=="function"&&(_=_(I$(e,r,i,c,o[0],s,u))),o[0].signal.aborted&&(m=y_)),!m)if(i.status!=="success")p=!0;else{const H=u||i.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;p=!!(i.invalid||_||_===void 0&&Date.now()-i.updatedAt>=H&&(o[5]||i.cause==="enter"||o[2].some(Q=>Q.routeId===i.routeId&&Q.id!==i.id)))}}catch(H){i.invalid=!0,Ql(e,i),m=qm(e,r,c,H,o)}const k=c.options.loader,x=typeof k=="function",v=x?k:k==null?void 0:k.handler,b=!u||c.options.preload!==!1;let w=b&&k?(I=e._flights)==null?void 0:I.get(i.id):void 0;w===i._flight||m?w=void 0:w&&!p&&!u&&_===void 0?p=!0:p||(w=void 0);const y=!!(k&&p&&i.status==="success"&&!u&&!o[4]&&((x?void 0:k.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),S=p&&b,z=S&&!y&&(i.status!=="success"||!!k),N=t>=a?o[7]:void 0,A=c.lazyFn&&c._lazy!==!0?N:void 0;if(S&&!k&&(i.invalid=!1,i.updatedAt=Date.now()),w&&w[2]++,z){const H=i._flight;i._flight=w,(G=zj(e,i,H))==null||G.abort(),t>=a&&(i.status="pending"),N==null||N()}S||(i.isFetching=!1);const E=(m?Promise.resolve(m):z?c9(e,r,i,c,v,s,o):Promise.resolve([Bc,i.loaderData])).then(H=>(z&&(l9(i,H,u),H[0]===Bc&&(k&&!o[0].signal.aborted&&vQ(e,i,d),t>=a&&(i.status="pending"))),H)),M=ud(Promise.resolve().then(()=>Ch(c,void 0,A)),o[0].signal).then(()=>{},H=>r[1].some((Q,K)=>K<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,qm(e,r,c,H,o)]).then(H=>E.then(Q=>(z&&!H&&Q[0]===Bc&&i.status==="pending"&&!o[0].signal.aborted&&(i.status="success",N==null||N()),H)));if(n.push([t,E,M]),!y)return E.then(H=>u9(i,H));const $={...i,status:"pending",preload:!1,_flight:w};i.invalid=!1,i.isFetching="loader";const D=c9(e,r,$,c,v,s,o).then(H=>(i.isFetching=!1,l9($,H,!1),H));return(r[2]??(r[2]=[])).push([t,D,M,$]),D.then(H=>u9($,H))}async function P4(e,r,t,n,s=0){const o=t==null?void 0:t[1][1];let a=o!=null&&o.routeId?r.findIndex(i=>i.routeId===o.routeId):(t==null?void 0:t[0])??r.length-1;a<0&&(a=0);for(let i=a;i>=0;i--){const c=_d(e,r[i]);try{const u=Ch(c,!1);u&&await ud(u,n)}catch(u){if(u===n&&n.aborted)throw u}if(c.options.notFoundComponent)return i}return o!=null&&o.routeId?a:s}function Df(e,r){r[2]&&(ma(e,r[2].map(t=>t[3])),r[2]=void 0)}async function _9(e,r,t,n){let s;try{await Promise.all(e.map(o=>o[1].then(async a=>{const i=o[0];if(!(n&&i>=await n)){if(a[0]>=Ia)throw[i,a];!s&&a[0]!==Bc&&(s=[i,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=i))return c[1].then(u=>{if(u[0]===Ia)throw[c[0],u]})})))}})))}catch(o){return o}return r??s}function Nj(e,r,t,n,s,o){for(;n[0]===Ia;){const a=n[1],i=a.options;if(i.reloadDocument?s[3]:s[1]>=20)return n;try{return i.href&&i.reloadDocument?(e.resolveRedirect(a),n):[Ia,a,e.buildLocation({...i,_fromLocation:r[0],_includeValidateSearch:!0})]}catch(c){n=o?[eu,c]:Cj(t,c),o=!0}}return n}async function P$(e,r,t,n,s,o){const a=r[1];let i=await s,c=!1;const u=a.findIndex(m=>m._notFound),d=m=>m[1][0]===py?P4(e,a,m,n.signal):m[0];let _=u<0?a.length:u;if(((i==null?void 0:i[1][0])??0)>=Ia)_=0;else if(i){_=i[2]??(i[2]=await d(i));for(const m of t){if(m[0]>=_)break;const k=await m[1];if(k[0]!==Bc&&k[0]=_)break;const k=await m[2];if(k){i=k;break}}if(((i==null?void 0:i[1][0])??0)>=Ia){const m=i[1];if(m[0]!==Ia||m[1].options.reloadDocument||m[2])return Df(e,r),m;c=!0,i=[0,[eu,new Error("Too many redirects")]]}const p=i?i[2]??await d(i):u;if(p>=0){const m=i==null?void 0:i[1],k=m==null?void 0:m[0],x=a[p],v=m==null?void 0:m[1],b=()=>{m&&(x._notFound=void 0,k===eu?x.status="error":(v.routeId=x.routeId,x.routeId===e.routeTree.id?(x.status="success",x._notFound=!0):x.status="notFound"),x.error=v,x.isFetching=!1)};b(),m||o==null||o();const w=_d(e,x);try{await ud(m?Promise.resolve().then(()=>Ch(w,k===eu?"errorComponent":"notFoundComponent")):Promise.all([Ch(w),Ch(w,"notFoundComponent")]),n.signal)}catch(y){if(y===n.signal&&n.signal.aborted)return Df(e,r),y_}m?c&&(n.abort(),await Promise.all([...t.map(y=>y[1]),...t.map(y=>y[2]),...(r[2]??[]).map(y=>y[1])]),Df(e,r),ma(e,a),b()):x.status="success"}return r}async function B$(e,r,t,n=0,s=r[1].length){var a,i;const o=r[1];for(let c=n;cw._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const w=await P4(e,t,void 0,o,u);t[u]._notFound=void 0,t[w]._notFound=!0,u=w}let d=u<0?t.length:u+1,_=0;for(;_{for(let w=m;w=Ia&&(d=0);x()}if(!o.aborted&&!n[3]){const w=[];for(const[y,S]of e._flights??[])S[2]||(e._flights.delete(y),w.push(S[1]));for(const y of w)y.abort()}const b=P$(e,s,p,n[0],_9(p,v,s[2]),n[7]);(i=s[2])!=null&&i.length&&(s[3]=_9(s[2],void 0,void 0,b.then(w=>ag(w)?0:Sj(t).length,()=>0))),a=await b}catch(c){if(Df(e,s),c===o&&o.aborted)return y_;throw c}return ag(a)?a:B$(e,a,o,n[6]===t.length?n[6]:0)}function B4(e,r){var o,a;if(e._tx!==r)return;const t=r[3],n=e.stores.matches.get();let s=e._pending;for(let i=0;i0){s[3]=setTimeout(()=>B4(e,r),w);return}s[2]=0}const v=t.map(w=>({...w,_flight:void 0}));v[i].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(w=>(w&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+k),w));return}}function vm(e,r){var n;const t=e._pending;(e._tx===r||!((n=e._tx)!=null&&n[3].some(s=>s.id===(t==null?void 0:t[1]))))&&(clearTimeout(t==null?void 0:t[3]),e._pending=void 0)}async function f9(e,r){const t=e._pending;if(!t)return;clearTimeout(t[3]);const n=t[2]-Date.now();if(!t[4]||n<=0||!Sj(r[3]).some(o=>o.id===t[1]))return;let s;try{await ud(new Promise(o=>{s=setTimeout(o,n)}),r[0].signal)}catch{}clearTimeout(s)}function H$(e,r){e._committed=r,e.stores.setMatches(r)}function yQ(e,r,t,n){const s=e._committed,o=e._cache;for(const c of t)c.preload=!1,n&&(c._assetEnd=void 0);const a=Sj(t).length,i=new Map;{const c=Date.now();for(const u of[...s,...o.values()]){if(u.status!=="success"||t.some((_,p)=>_.id===u.id&&(p=(u.preload?d.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:d.options.gcTime??e.options.defaultGcTime??3e5)||i.set(u.id,o.get(u.id)===u?u:{...u,_flight:void 0,isFetching:!1,context:{}})}}r[3]=[],e._cache=i,H$(e,t),ma(e,[...o.values(),...s],[...t,...i.values()]),_Q(e,s,t,r)}async function Mv(e,r){let t=e._tx;for(;t&&t!==r;){if(await t[5],e._tx===t)return;t=e._tx}}function q$(e,r,t){const n=t[1].options,s=t[2];if(!s)return e.navigate({...n,replace:!0,ignoreBlocker:!0});if(n.reloadDocument)return e.navigate({href:s.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});s._redirects=r[1]+1,e._pendingLocation=s;const o=e.commitLocation({...s,viewTransition:n.viewTransition,replace:!0,resetScroll:n.resetScroll,hashScrollIntoView:n.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===s&&(e._pendingLocation=void 0)}),o}async function xQ(e,r,t,n,s){const o=t.map(c=>({...c}));Ej(o);for(const c of n)Ql(e,o[c[0]]),o[c[0]]=c[3];const a=[r[2],o];let i;try{i=await P$(e,a,n,r[0],s)}catch(c){throw ma(e,o),c}if(ag(i)){ma(e,o),i[0]===Ia&&e._tx===r&&e._committed===t&&await q$(e,r,i);return}if(await B$(e,i,r[0].signal),e._tx!==r||e._committed!==t){ma(e,o);return}for(const c of o){const u=e._cache.get(c.id);u!=null&&u._flight&&u._flight===c._flight&&(e._cache.delete(c.id),Ql(e,u))}H$(e,o),ma(e,t,o)}async function wQ(e,r,t,n,s,o){const a=await F$(e,r[2],r[3],[r[0],r[1],e._committed,void 0,s,t,o,n]);if(ag(a)){const _=a[0]===Ia&&e._tx===r;if((!_||a[1].options.reloadDocument)&&vm(e,r),ma(e,r[3]),r[3]=[],!_)return;if(e._tx!==r){vm(e,r);return}await q$(e,r,a);return}const i=a[1];if(e._tx===r&&await f9(e,r),e._tx!==r){vm(e,r),ma(e,i),Df(e,a);return}const c=r[2],u=hy(c,e.stores.resolvedLocation.get()),d=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===r&&await f9(e,r),e._tx!==r){vm(e,r),ma(e,i),Df(e,a);return}const _=()=>{vm(e,r),yQ(e,r,i,o),e._tx===r&&(e.emit({type:"onLoad",...u}),e._tx===r&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(_,i);if(e._tx!==r){Df(e,a);return}d!=null&&d.length&&xQ(e,r,i,d,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set("idle"),e._tx===r&&e.emit({type:"onResolved",...u}),p&&e._tx===r&&e.emit({type:"onRendered",...u})}),e._tx===r&&((m=e._commitPromise)==null||m.resolve(),e._commitPromise=void 0)})}async function kQ(e,r){var S;const t=e._tx,n=e.stores.resolvedLocation.get(),s=n??e.stores.location.get(),o=e.latestLocation,a=e._pendingLocation,i=(a==null?void 0:a.href)===o.href?a._redirects??0:0,c=e._handoff,u=c==null?void 0:c[0](),d=new AbortController,_=e._preflight;if(e._preflight=d,u||c==null||c[1](),_==null||_.abort(),!d.signal.aborted){const z=hy(o,n);e.emit({type:"onBeforeNavigate",...z}),d.signal.aborted||e.emit({type:"onBeforeLoad",...z})}if(d.signal.aborted){await Mv(e,t);return}const p=s.href===o.href;let m=d;const k=e.matchRoutes(o,{_controller:d});Ej(k);const x=u?c[1](k):void 0;if(x?m=u:u==null||u.abort(),d.signal.aborted){ma(e,k),await Mv(e,t);return}e._preflight=void 0;let v;const b=()=>wQ(e,y,p,()=>B4(e,y),r==null?void 0:r.sync,x),w=r!=null&&r.sync?new Promise(z=>v=z):Promise.resolve().then(b).then(),y=[m,i,o,k,Date.now(),w];if(e._tx=y,t){for(const z of e.stores.matches.get()){if(e._tx!==y)break;z.isFetching&&cg(e,z,!1)}t[0].abort(),ma(e,t[3],y[3],!0)}if(e._tx!==y){ma(e,y[3]),y[3]=[],v==null||v(),await Mv(e,y);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(o)}),(x||!e._committed.length&&((S=k[0])==null?void 0:S.status)!=="success"&&!k.some(z=>z._notFound))&&B4(e,y),v==null||v(b()),await w,await Mv(e,y)}async function jQ(e,r){let t=e.buildLocation(r);for(let n=0;;n++){const s=e._committed,o=new AbortController;let a,i,c;try{try{a=e.matchRoutes(t,{_controller:o}),Ej(a),i=(e._preloads??(e._preloads=new Map)).set(o,a),c=await F$(e,t,a,[o,n,s,!0])}finally{i&&(i=i.delete(o),ma(e,a)),o.abort()}if(!ag(c))return c[1];if(!i||c.length<3)return;t=c[2]}catch(u){rp(u)||console.error(u);return}}}const SQ="Error preloading route! ☝️";var U$=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=r=>{var c,u;this.originalIndex=r.originalIndex;const t=this.options,n=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(c=this.options).getParentRoute)==null?void 0:u.call(c),n?this._path=Sh:this.parentRoute||wj();let s=n?Sh:t==null?void 0:t.path;s&&s!=="/"&&(s=O$(s));const o=(t==null?void 0:t.id)||s;let a=n?Sh:E1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=E1(["/",a]));const i=a==="__root__"?"/":E1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=i,this._to=Kl(i)},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.redirect=r=>sQ({from:this.fullPath,...r}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},CQ=class extends U${constructor(e){super(e)}},Aj=class extends T.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,r){const t=e.getResetKey();return r.error&&r.resetKey!==t?{resetKey:t,error:null}:{resetKey:t}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,r){var t,n;(n=(t=this.props).onCatch)==null||n.call(t,e,r)}render(){const e=this.state.error;return e?T.createElement(this.props.errorComponent??zQ,{error:e,reset:this.reset}):this.props.children}};function zQ({error:e}){const[r,t]=T.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(n=>!n),children:r?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),r?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function EQ({children:e,fallback:r=null}){return f.jsx(st.Fragment,{children:G$()?e:r})}function G$(){return st.useSyncExternalStore(NQ,()=>!0,()=>!1)}function NQ(){return()=>{}}var W$=T.createContext(null);function Vo(e){return T.useContext(W$)}var my=T.createContext(void 0),AQ=T.createContext(void 0),On=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(On||{});function TQ({update:e,notify:r,unwatched:t}){return{link:n,unlink:s,propagate:o,checkDirty:a,shallowPropagate:i};function n(u,d,_){const p=d.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:d.deps;if(m!==void 0&&m.dep===u){m.version=_,d.depsTail=m;return}const k=u.subsTail;if(k!==void 0&&k.version===_&&k.sub===d)return;const x=d.depsTail=u.subsTail={version:_,dep:u,sub:d,prevDep:p,nextDep:m,prevSub:k,nextSub:void 0};m!==void 0&&(m.prevDep=x),p!==void 0?p.nextDep=x:d.deps=x,k!==void 0?k.nextSub=x:u.subs=x}function s(u,d=u.sub){const _=u.dep,p=u.prevDep,m=u.nextDep,k=u.nextSub,x=u.prevSub;return m!==void 0?m.prevDep=p:d.depsTail=p,p!==void 0?p.nextDep=m:d.deps=m,k!==void 0?k.prevSub=x:_.subsTail=x,x!==void 0?x.nextSub=k:(_.subs=k)===void 0&&t(_),m}function o(u){let d=u.nextSub,_;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&c(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&r(p),m&1){const k=p.subs;if(k!==void 0){const x=(u=k).nextSub;x!==void 0&&(_={value:d,prev:_},d=x);continue}}if((u=d)!==void 0){d=u.nextSub;continue}for(;_!==void 0;)if(u=_.value,_=_.prev,u!==void 0){d=u.nextSub;continue e}break}while(!0)}function a(u,d){let _,p=0,m=!1;e:do{const k=u.dep,x=k.flags;if(d.flags&16)m=!0;else if((x&17)===17){if(e(k)){const v=k.subs;v.nextSub!==void 0&&i(v),m=!0}}else if((x&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(_={value:u,prev:_}),u=k.deps,d=k,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=d.subs,b=v.nextSub!==void 0;if(b?(u=_.value,_=_.prev):u=v,m){if(e(d)){b&&i(v),d=u.sub;continue}m=!1}else d.flags&=-33;d=u.sub;const w=u.nextDep;if(w!==void 0){u=w;continue e}}return m}while(!0)}function i(u){do{const d=u.sub,_=d.flags;(_&48)===32&&(d.flags=_|16,(_&6)===2&&r(d))}while((u=u.nextSub)!==void 0)}function c(u,d){let _=d.depsTail;for(;_!==void 0;){if(_===u)return!0;_=_.prevDep}return!1}}function RQ(e,r,t){var o,a,i;const n=typeof e=="object",s=n?e:void 0;return{next:(o=n?e.next:e)==null?void 0:o.bind(s),error:(a=n?e.error:r)==null?void 0:a.bind(s),complete:(i=n?e.complete:t)==null?void 0:i.bind(s)}}const F4=[];let R1=0;const{link:d9,unlink:MQ,propagate:OQ,checkDirty:K$,shallowPropagate:h9}=TQ({update(e){return e._update()},notify(e){F4[H4++]=e,e.flags&=~On.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=On.Mutable|On.Dirty,lb(e))}});let Ov=0,H4=0,Ac,q4=0;function $Q(e){try{++q4,e()}finally{--q4||V$()}}function lb(e){const r=e.depsTail;let t=r!==void 0?r.nextDep:e.deps;for(;t!==void 0;)t=MQ(t,e)}function V$(){if(!(q4>0)){for(;Ov{var u;s.get(),i.current?(u=a.next)==null||u.call(a,s._snapshot):i.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=Ac,i=(r==null?void 0:r.compare)??Object.is;if(t)Ac=s,++R1,s.depsTail=void 0;else if(o===void 0)return!1;t&&(s.flags=On.Mutable|On.RecursedCheck);try{const c=s._snapshot,u=typeof o=="function"?o(c):o===void 0&&t?n(c):o;return c===void 0||!i(c,u)?(s._snapshot=u,!0):!1}finally{Ac=a,t&&(s.flags&=~On.RecursedCheck),lb(s)}}};return t?(s.flags=On.Mutable|On.Dirty,s.get=function(){const o=s.flags;if(o&On.Dirty||o&On.Pending&&K$(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&h9(a)}}else o&On.Pending&&(s.flags=o&~On.Pending);return Ac!==void 0&&d9(s,Ac,R1),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(OQ(a),h9(a),V$())}},s}function DQ(e){const r=()=>{const n=Ac;Ac=t,++R1,t.depsTail=void 0,t.flags=On.Watching|On.RecursedCheck;try{return e()}finally{Ac=n,t.flags&=~On.RecursedCheck,lb(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:On.Watching|On.RecursedCheck,notify(){const n=this.flags;n&On.Dirty||n&On.Pending&&K$(this.deps,this)?r():this.flags=On.Watching},stop(){this.flags=On.None,this.depsTail=void 0,lb(this)}};return r(),t}var y2={exports:{}},x2={},w2={exports:{}},k2={};/** +`+j.stack}}var Ct=Object.prototype.hasOwnProperty,Vt=e.unstable_scheduleCallback,Ut=e.unstable_cancelCallback,Gt=e.unstable_shouldYield,De=e.unstable_requestPaint,ct=e.unstable_now,lt=e.unstable_getCurrentPriorityLevel,xe=e.unstable_ImmediatePriority,Ie=e.unstable_UserBlockingPriority,Ye=e.unstable_NormalPriority,Ae=e.unstable_LowPriority,Ve=e.unstable_IdlePriority,Ze=e.log,at=e.unstable_setDisableYieldValue,At=null,Pe=null;function Jt(l){if(typeof Ze=="function"&&at(l),Pe&&typeof Pe.setStrictMode=="function")try{Pe.setStrictMode(At,l)}catch{}}var Tt=Math.clz32?Math.clz32:nr,Zr=Math.log,cr=Math.LN2;function nr(l){return l>>>=0,l===0?32:31-(Zr(l)/cr|0)|0}var Wt=256,wt=262144,ns=4194304;function Hr(l){var h=l&42;if(h!==0)return h;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function en(l,h,g){var j=l.pendingLanes;if(j===0)return 0;var R=0,O=l.suspendedLanes,X=l.pingedLanes;l=l.warmLanes;var ne=j&134217727;return ne!==0?(j=ne&~O,j!==0?R=Hr(j):(X&=ne,X!==0?R=Hr(X):g||(g=ne&~l,g!==0&&(R=Hr(g))))):(ne=j&~O,ne!==0?R=Hr(ne):X!==0?R=Hr(X):g||(g=j&~l,g!==0&&(R=Hr(g)))),R===0?0:h!==0&&h!==R&&(h&O)===0&&(O=R&-R,g=h&-h,O>=g||O===32&&(g&4194048)!==0)?h:R}function gr(l,h){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&h)===0}function ut(l,h){switch(l){case 1:case 2:case 4:case 8:case 64:return h+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dr(){var l=ns;return ns<<=1,(ns&62914560)===0&&(ns=4194304),l}function Cr(l){for(var h=[],g=0;31>g;g++)h.push(l);return h}function $r(l,h){l.pendingLanes|=h,h!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function wn(l,h,g,j,R,O){var X=l.pendingLanes;l.pendingLanes=g,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=g,l.entangledLanes&=g,l.errorRecoveryDisabledLanes&=g,l.shellSuspendCounter=0;var ne=l.entanglements,pe=l.expirationTimes,ze=l.hiddenUpdates;for(g=X&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var ho=/[\n"\\]/g;function Kn(l){return l.replace(ho,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Ys(l,h,g,j,R,O,X,ne){l.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?l.type=X:l.removeAttribute("type"),h!=null?X==="number"?(h===0&&l.value===""||l.value!=h)&&(l.value=""+As(h)):l.value!==""+As(h)&&(l.value=""+As(h)):X!=="submit"&&X!=="reset"||l.removeAttribute("value"),h!=null?To(l,X,As(h)):g!=null?To(l,X,As(g)):j!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?l.name=""+As(ne):l.removeAttribute("name")}function Zs(l,h,g,j,R,O,X,ne){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),h!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||h!=null)){ti(l);return}g=g!=null?""+As(g):"",h=h!=null?""+As(h):g,ne||h===l.value||(l.value=h),l.defaultValue=h}j=j??R,j=typeof j!="function"&&typeof j!="symbol"&&!!j,l.checked=ne?l.checked:!!j,l.defaultChecked=!!j,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(l.name=X),ti(l)}function To(l,h,g){h==="number"&&Tn(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function Zo(l,h,g,j){if(l=l.options,h){h={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),il=!1;if(ea)try{var Ri={};Object.defineProperty(Ri,"passive",{get:function(){il=!0}}),window.addEventListener("test",Ri,Ri),window.removeEventListener("test",Ri,Ri)}catch{il=!1}var Et=null,pu=null,hs=null;function mu(){if(hs)return hs;var l,h=pu,g=h.length,j,R="value"in Et?Et.value:Et.textContent,O=R.length;for(l=0;l=si),no=" ",ta=!1;function Oi(l,h){switch(l){case"keyup":return P_.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yu(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var xn=!1;function Ts(l,h){switch(l){case"compositionend":return yu(h);case"keypress":return h.which!==32?null:(ta=!0,no);case"textInput":return l=h.data,l===no&&ta?null:l;default:return null}}function Sn(l,h){if(xn)return l==="compositionend"||!gl&&Oi(l,h)?(l=mu(),hs=pu=Et=null,xn=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1=h)return{node:g,offset:h-l};l=j}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=G_(g)}}function W_(l,h){return l&&h?l===h?!0:l&&l.nodeType===3?!1:h&&h.nodeType===3?W_(l,h.parentNode):"contains"in l?l.contains(h):l.compareDocumentPosition?!!(l.compareDocumentPosition(h)&16):!1:!1}function Vn(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var h=Tn(l.document);h instanceof l.HTMLIFrameElement;){try{var g=typeof h.contentWindow.location.href=="string"}catch{g=!1}if(g)l=h.contentWindow;else break;h=Tn(l.document)}return h}function ii(l){var h=l&&l.nodeName&&l.nodeName.toLowerCase();return h&&(h==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||h==="textarea"||l.contentEditable==="true")}var bl=ea&&"documentMode"in document&&11>=document.documentMode,Do=null,ci=null,li=null,ps=!1;function ms(l,h,g){var j=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;ps||Do==null||Do!==Tn(j)||(j=Do,"selectionStart"in j&&ii(j)?j={start:j.selectionStart,end:j.selectionEnd}:(j=(j.ownerDocument&&j.ownerDocument.defaultView||window).getSelection(),j={anchorNode:j.anchorNode,anchorOffset:j.anchorOffset,focusNode:j.focusNode,focusOffset:j.focusOffset}),li&&ai(li,j)||(li=j,j=hv(ci,"onSelect"),0>=X,R-=X,za=1<<32-Tt(h)+R|g<vr?(Or=Ot,Ot=null):Or=Ot.sibling;var Gr=Ne(je,Ot,Ce[vr],qe);if(Gr===null){Ot===null&&(Ot=Or);break}l&&Ot&&Gr.alternate===null&&h(je,Ot),ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr,Ot=Or}if(vr===Ce.length)return g(je,Ot),Er&&di(je,vr),qt;if(Ot===null){for(;vrvr?(Or=Ot,Ot=null):Or=Ot.sibling;var Uu=Ne(je,Ot,Gr.value,qe);if(Uu===null){Ot===null&&(Ot=Or);break}l&&Ot&&Uu.alternate===null&&h(je,Ot),ge=O(Uu,ge,vr),Ur===null?qt=Uu:Ur.sibling=Uu,Ur=Uu,Ot=Or}if(Gr.done)return g(je,Ot),Er&&di(je,vr),qt;if(Ot===null){for(;!Gr.done;vr++,Gr=Ce.next())Gr=Ue(je,Gr.value,qe),Gr!==null&&(ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr);return Er&&di(je,vr),qt}for(Ot=j(Ot);!Gr.done;vr++,Gr=Ce.next())Gr=$e(Ot,je,vr,Gr.value,qe),Gr!==null&&(l&&Gr.alternate!==null&&Ot.delete(Gr.key===null?vr:Gr.key),ge=O(Gr,ge,vr),Ur===null?qt=Gr:Ur.sibling=Gr,Ur=Gr);return l&&Ot.forEach(function(kK){return h(je,kK)}),Er&&di(je,vr),qt}function hn(je,ge,Ce,qe){if(typeof Ce=="object"&&Ce!==null&&Ce.type===w&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case m:e:{for(var qt=Ce.key;ge!==null;){if(ge.key===qt){if(qt=Ce.type,qt===w){if(ge.tag===7){g(je,ge.sibling),qe=R(ge,Ce.props.children),qe.return=je,je=qe;break e}}else if(ge.elementType===qt||typeof qt=="object"&&qt!==null&&qt.$$typeof===z&&Z_(qt)===ge.type){g(je,ge.sibling),qe=R(ge,Ce.props),Fp(qe,Ce),qe.return=je,je=qe;break e}g(je,ge);break}else h(je,ge);ge=ge.sibling}Ce.type===w?(qe=Lo(Ce.props.children,je.mode,qe,Ce.key),qe.return=je,je=qe):(qe=Ca(Ce.type,Ce.key,Ce.props,null,je.mode,qe),Fp(qe,Ce),qe.return=je,je=qe)}return X(je);case k:e:{for(qt=Ce.key;ge!==null;){if(ge.key===qt)if(ge.tag===4&&ge.stateNode.containerInfo===Ce.containerInfo&&ge.stateNode.implementation===Ce.implementation){g(je,ge.sibling),qe=R(ge,Ce.children||[]),qe.return=je,je=qe;break e}else{g(je,ge);break}else h(je,ge);ge=ge.sibling}qe=_i(Ce,je.mode,qe),qe.return=je,je=qe}return X(je);case z:return Ce=Z_(Ce),hn(je,ge,Ce,qe)}if(Q(Ce))return St(je,ge,Ce,qe);if(I(Ce)){if(qt=I(Ce),typeof qt!="function")throw Error(n(150));return Ce=qt.call(Ce),Xt(je,ge,Ce,qe)}if(typeof Ce.then=="function")return hn(je,ge,I0(Ce),qe);if(Ce.$$typeof===y)return hn(je,ge,bc(je,Ce),qe);P0(je,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint"?(Ce=""+Ce,ge!==null&&ge.tag===6?(g(je,ge.sibling),qe=R(ge,Ce),qe.return=je,je=qe):(g(je,ge),qe=pc(Ce,je.mode,qe),qe.return=je,je=qe),X(je)):g(je,ge)}return function(je,ge,Ce,qe){try{Bp=0;var qt=hn(je,ge,Ce,qe);return Id=null,qt}catch(Ot){if(Ot===Ld||Ot===D0)throw Ot;var Ur=un(29,Ot,null,je.mode);return Ur.lanes=qe,Ur.return=je,Ur}finally{}}}var ef=LC(!0),IC=LC(!1),zu=!1;function Fx(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hx(l,h){l=l.updateQueue,h.updateQueue===l&&(h.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Eu(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Nu(l,h,g){var j=l.updateQueue;if(j===null)return null;if(j=j.shared,(Kr&2)!==0){var R=j.pending;return R===null?h.next=h:(h.next=R.next,R.next=h),j.pending=h,h=_t(l),mt(l,null,g),h}return we(l,j,h,g),_t(l)}function Hp(l,h,g){if(h=h.updateQueue,h!==null&&(h=h.shared,(g&4194048)!==0)){var j=h.lanes;j&=l.pendingLanes,g|=j,h.lanes=g,yr(l,g)}}function qx(l,h){var g=l.updateQueue,j=l.alternate;if(j!==null&&(j=j.updateQueue,g===j)){var R=null,O=null;if(g=g.firstBaseUpdate,g!==null){do{var X={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};O===null?R=O=X:O=O.next=X,g=g.next}while(g!==null);O===null?R=O=h:O=O.next=h}else R=O=h;g={baseState:j.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:j.shared,callbacks:j.callbacks},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=h:l.next=h,g.lastBaseUpdate=h}var Ux=!1;function qp(){if(Ux){var l=sa;if(l!==null)throw l}}function Up(l,h,g,j){Ux=!1;var R=l.updateQueue;zu=!1;var O=R.firstBaseUpdate,X=R.lastBaseUpdate,ne=R.shared.pending;if(ne!==null){R.shared.pending=null;var pe=ne,ze=pe.next;pe.next=null,X===null?O=ze:X.next=ze,X=pe;var He=l.alternate;He!==null&&(He=He.updateQueue,ne=He.lastBaseUpdate,ne!==X&&(ne===null?He.firstBaseUpdate=ze:ne.next=ze,He.lastBaseUpdate=pe))}if(O!==null){var Ue=R.baseState;X=0,He=ze=pe=null,ne=O;do{var Ne=ne.lane&-536870913,$e=Ne!==ne.lane;if($e?(Mr&Ne)===Ne:(j&Ne)===Ne){Ne!==0&&Ne===Lr&&(Ux=!0),He!==null&&(He=He.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var St=l,Xt=ne;Ne=h;var hn=g;switch(Xt.tag){case 1:if(St=Xt.payload,typeof St=="function"){Ue=St.call(hn,Ue,Ne);break e}Ue=St;break e;case 3:St.flags=St.flags&-65537|128;case 0:if(St=Xt.payload,Ne=typeof St=="function"?St.call(hn,Ue,Ne):St,Ne==null)break e;Ue=_({},Ue,Ne);break e;case 2:zu=!0}}Ne=ne.callback,Ne!==null&&(l.flags|=64,$e&&(l.flags|=8192),$e=R.callbacks,$e===null?R.callbacks=[Ne]:$e.push(Ne))}else $e={lane:Ne,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},He===null?(ze=He=$e,pe=Ue):He=He.next=$e,X|=Ne;if(ne=ne.next,ne===null){if(ne=R.shared.pending,ne===null)break;$e=ne,ne=$e.next,$e.next=null,R.lastBaseUpdate=$e,R.shared.pending=null}}while(!0);He===null&&(pe=Ue),R.baseState=pe,R.firstBaseUpdate=ze,R.lastBaseUpdate=He,O===null&&(R.shared.lanes=0),Ou|=X,l.lanes=X,l.memoizedState=Ue}}function PC(l,h){if(typeof l!="function")throw Error(n(191,l));l.call(h)}function BC(l,h){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var X=K.T,ne={};K.T=ne,lw(l,!1,h,g);try{var pe=R(),ze=K.S;if(ze!==null&&ze(ne,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var He=Dd(pe,j);Kp(l,h,He,Ma(l))}else Kp(l,h,j,Ma(l))}catch(Ue){Kp(l,h,{then:function(){},status:"rejected",reason:Ue},Ma())}finally{J.p=O,X!==null&&ne.types!==null&&(X.types=ne.types),K.T=X}}function vW(){}function iw(l,h,g,j){if(l.tag!==5)throw Error(n(476));var R=v7(l).queue;g7(l,R,h,ee,g===null?vW:function(){return b7(l),g(j)})}function v7(l){var h=l.memoizedState;if(h!==null)return h;h={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:ee},next:null};var g={};return h.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:g},next:null},l.memoizedState=h,l=l.alternate,l!==null&&(l.memoizedState=h),h}function b7(l){var h=v7(l);h.next===null&&(h=l.alternate.memoizedState),Kp(l,h.next.queue,{},Ma())}function cw(){return bs(um)}function y7(){return cs().memoizedState}function x7(){return cs().memoizedState}function bW(l){for(var h=l.return;h!==null;){switch(h.tag){case 24:case 3:var g=Ma();l=Eu(g);var j=Nu(h,l,g);j!==null&&(la(j,h,g),Hp(j,h,g)),h={cache:Od()},l.payload=h;return}h=h.return}}function yW(l,h,g){var j=Ma();g={lane:j,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Q0(l)?k7(h,g):(g=Re(l,h,g,j),g!==null&&(la(g,l,j),j7(g,h,j)))}function w7(l,h,g){var j=Ma();Kp(l,h,g,j)}function Kp(l,h,g,j){var R={lane:j,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(Q0(l))k7(h,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=h.lastRenderedReducer,O!==null))try{var X=h.lastRenderedState,ne=O(X,g);if(R.hasEagerState=!0,R.eagerState=ne,Yt(ne,X))return we(l,h,R,0),mn===null&&fe(),!1}catch{}finally{}if(g=Re(l,h,R,j),g!==null)return la(g,l,j),j7(g,h,j),!0}return!1}function lw(l,h,g,j){if(j={lane:2,revertLane:Fw(),gesture:null,action:j,hasEagerState:!1,eagerState:null,next:null},Q0(l)){if(h)throw Error(n(479))}else h=Re(l,g,j,2),h!==null&&la(h,l,2)}function Q0(l){var h=l.alternate;return l===pr||h!==null&&h===pr}function k7(l,h){Bd=H0=!0;var g=l.pending;g===null?h.next=h:(h.next=g.next,g.next=h),l.pending=h}function j7(l,h,g){if((g&4194048)!==0){var j=h.lanes;j&=l.pendingLanes,g|=j,h.lanes=g,yr(l,g)}}var Vp={readContext:bs,use:G0,useCallback:Yn,useContext:Yn,useEffect:Yn,useImperativeHandle:Yn,useLayoutEffect:Yn,useInsertionEffect:Yn,useMemo:Yn,useReducer:Yn,useRef:Yn,useState:Yn,useDebugValue:Yn,useDeferredValue:Yn,useTransition:Yn,useSyncExternalStore:Yn,useId:Yn,useHostTransitionStatus:Yn,useFormState:Yn,useActionState:Yn,useOptimistic:Yn,useMemoCache:Yn,useCacheRefresh:Yn};Vp.useEffectEvent=Yn;var S7={readContext:bs,use:G0,useCallback:function(l,h){return Bo().memoizedState=[l,h===void 0?null:h],l},useContext:bs,useEffect:c7,useImperativeHandle:function(l,h,g){g=g!=null?g.concat([l]):null,K0(4194308,4,f7.bind(null,h,l),g)},useLayoutEffect:function(l,h){return K0(4194308,4,l,h)},useInsertionEffect:function(l,h){K0(4,2,l,h)},useMemo:function(l,h){var g=Bo();h=h===void 0?null:h;var j=l();if(tf){Jt(!0);try{l()}finally{Jt(!1)}}return g.memoizedState=[j,h],j},useReducer:function(l,h,g){var j=Bo();if(g!==void 0){var R=g(h);if(tf){Jt(!0);try{g(h)}finally{Jt(!1)}}}else R=h;return j.memoizedState=j.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},j.queue=l,l=l.dispatch=yW.bind(null,pr,l),[j.memoizedState,l]},useRef:function(l){var h=Bo();return l={current:l},h.memoizedState=l},useState:function(l){l=rw(l);var h=l.queue,g=w7.bind(null,pr,h);return h.dispatch=g,[l.memoizedState,g]},useDebugValue:ow,useDeferredValue:function(l,h){var g=Bo();return aw(g,l,h)},useTransition:function(){var l=rw(!1);return l=g7.bind(null,pr,l.queue,!0,!1),Bo().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,h,g){var j=pr,R=Bo();if(Er){if(g===void 0)throw Error(n(407));g=g()}else{if(g=h(),mn===null)throw Error(n(349));(Mr&127)!==0||WC(j,h,g)}R.memoizedState=g;var O={value:g,getSnapshot:h};return R.queue=O,c7(VC.bind(null,j,O,l),[l]),j.flags|=2048,Hd(9,{destroy:void 0},KC.bind(null,j,O,g,h),null),g},useId:function(){var l=Bo(),h=mn.identifierPrefix;if(Er){var g=fi,j=za;g=(j&~(1<<32-Tt(j)-1)).toString(32)+g,h="_"+h+"R_"+g,g=q0++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof j.is=="string"?X.createElement("select",{is:j.is}):X.createElement("select"),j.multiple?O.multiple=!0:j.size&&(O.size=j.size);break;default:O=typeof j.is=="string"?X.createElement(R,{is:j.is}):X.createElement(R)}}O[cn]=h,O[Dt]=j;e:for(X=h.child;X!==null;){if(X.tag===5||X.tag===6)O.appendChild(X.stateNode);else if(X.tag!==4&&X.tag!==27&&X.child!==null){X.child.return=X,X=X.child;continue}if(X===h)break e;for(;X.sibling===null;){if(X.return===null||X.return===h)break e;X=X.return}X.sibling.return=X.return,X=X.sibling}h.stateNode=O;e:switch(lo(O,R,j),R){case"button":case"input":case"select":case"textarea":j=!!j.autoFocus;break e;case"img":j=!0;break e;default:j=!1}j&&Cl(h)}}return zn(h),kw(h,h.type,l===null?null:l.memoizedProps,h.pendingProps,g),null;case 6:if(l&&h.stateNode!=null)l.memoizedProps!==j&&Cl(h);else{if(typeof j!="string"&&h.stateNode===null)throw Error(n(166));if(l=ce.current,bt(h)){if(l=h.stateNode,g=h.memoizedProps,j=null,R=gs,R!==null)switch(R.tag){case 27:case 5:j=R.memoizedProps}l[cn]=h,l=!!(l.nodeValue===g||j!==null&&j.suppressHydrationWarning===!0||Uz(l.nodeValue,g)),l||ke(h,!0)}else l=pv(l).createTextNode(j),l[cn]=h,h.stateNode=l}return zn(h),null;case 31:if(g=h.memoizedState,l===null||l.memoizedState!==null){if(j=bt(h),g!==null){if(l===null){if(!j)throw Error(n(318));if(l=h.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(n(557));l[cn]=h}else ht(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;zn(h),l=!1}else g=kr(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return h.flags&256?(Aa(h),h):(Aa(h),null);if((h.flags&128)!==0)throw Error(n(558))}return zn(h),null;case 13:if(j=h.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=bt(h),j!==null&&j.dehydrated!==null){if(l===null){if(!R)throw Error(n(318));if(R=h.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(n(317));R[cn]=h}else ht(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;zn(h),R=!1}else R=kr(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return h.flags&256?(Aa(h),h):(Aa(h),null)}return Aa(h),(h.flags&128)!==0?(h.lanes=g,h):(g=j!==null,l=l!==null&&l.memoizedState!==null,g&&(j=h.child,R=null,j.alternate!==null&&j.alternate.memoizedState!==null&&j.alternate.memoizedState.cachePool!==null&&(R=j.alternate.memoizedState.cachePool.pool),O=null,j.memoizedState!==null&&j.memoizedState.cachePool!==null&&(O=j.memoizedState.cachePool.pool),O!==R&&(j.flags|=2048)),g!==l&&g&&(h.child.flags|=8192),ev(h,h.updateQueue),zn(h),null);case 4:return ae(),l===null&&Gw(h.stateNode.containerInfo),zn(h),null;case 10:return Pi(h.type),zn(h),null;case 19:if(q(is),j=h.memoizedState,j===null)return zn(h),null;if(R=(h.flags&128)!==0,O=j.rendering,O===null)if(R)Xp(j,!1);else{if(Zn!==0||l!==null&&(l.flags&128)!==0)for(l=h.child;l!==null;){if(O=F0(l),O!==null){for(h.flags|=128,Xp(j,!1),l=O.updateQueue,h.updateQueue=l,ev(h,l),h.subtreeFlags=0,l=g,g=h.child;g!==null;)ui(g,l),g=g.sibling;return U(is,is.current&1|2),Er&&di(h,j.treeForkCount),h.child}l=l.sibling}j.tail!==null&&ct()>ov&&(h.flags|=128,R=!0,Xp(j,!1),h.lanes=4194304)}else{if(!R)if(l=F0(O),l!==null){if(h.flags|=128,R=!0,l=l.updateQueue,h.updateQueue=l,ev(h,l),Xp(j,!0),j.tail===null&&j.tailMode==="hidden"&&!O.alternate&&!Er)return zn(h),null}else 2*ct()-j.renderingStartTime>ov&&g!==536870912&&(h.flags|=128,R=!0,Xp(j,!1),h.lanes=4194304);j.isBackwards?(O.sibling=h.child,h.child=O):(l=j.last,l!==null?l.sibling=O:h.child=O,j.last=O)}return j.tail!==null?(l=j.tail,j.rendering=l,j.tail=l.sibling,j.renderingStartTime=ct(),l.sibling=null,g=is.current,U(is,R?g&1|2:g&1),Er&&di(h,j.treeForkCount),l):(zn(h),null);case 22:case 23:return Aa(h),Wx(),j=h.memoizedState!==null,l!==null?l.memoizedState!==null!==j&&(h.flags|=8192):j&&(h.flags|=8192),j?(g&536870912)!==0&&(h.flags&128)===0&&(zn(h),h.subtreeFlags&6&&(h.flags|=8192)):zn(h),g=h.updateQueue,g!==null&&ev(h,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),j=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(j=h.memoizedState.cachePool.pool),j!==g&&(h.flags|=2048),l!==null&&q(yc),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),h.memoizedState.cache!==g&&(h.flags|=2048),Pi(Bn),zn(h),null;case 25:return null;case 30:return null}throw Error(n(156,h.tag))}function SW(l,h){switch(Rd(h),h.tag){case 1:return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 3:return Pi(Bn),ae(),l=h.flags,(l&65536)!==0&&(l&128)===0?(h.flags=l&-65537|128,h):null;case 26:case 27:case 5:return me(h),null;case 31:if(h.memoizedState!==null){if(Aa(h),h.alternate===null)throw Error(n(340));ht()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 13:if(Aa(h),l=h.memoizedState,l!==null&&l.dehydrated!==null){if(h.alternate===null)throw Error(n(340));ht()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 19:return q(is),null;case 4:return ae(),null;case 10:return Pi(h.type),null;case 22:case 23:return Aa(h),Wx(),l!==null&&q(yc),l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 24:return Pi(Bn),null;case 25:return null;default:return null}}function Q7(l,h){switch(Rd(h),h.tag){case 3:Pi(Bn),ae();break;case 26:case 27:case 5:me(h);break;case 4:ae();break;case 31:h.memoizedState!==null&&Aa(h);break;case 13:Aa(h);break;case 19:q(is);break;case 10:Pi(h.type);break;case 22:case 23:Aa(h),Wx(),l!==null&&q(yc);break;case 24:Pi(Bn)}}function Yp(l,h){try{var g=h.updateQueue,j=g!==null?g.lastEffect:null;if(j!==null){var R=j.next;g=R;do{if((g.tag&l)===l){j=void 0;var O=g.create,X=g.inst;j=O(),X.destroy=j}g=g.next}while(g!==R)}}catch(ne){an(h,h.return,ne)}}function Ru(l,h,g){try{var j=h.updateQueue,R=j!==null?j.lastEffect:null;if(R!==null){var O=R.next;j=O;do{if((j.tag&l)===l){var X=j.inst,ne=X.destroy;if(ne!==void 0){X.destroy=void 0,R=h;var pe=g,ze=ne;try{ze()}catch(He){an(R,pe,He)}}}j=j.next}while(j!==O)}}catch(He){an(h,h.return,He)}}function X7(l){var h=l.updateQueue;if(h!==null){var g=l.stateNode;try{BC(h,g)}catch(j){an(l,l.return,j)}}}function Y7(l,h,g){g.props=rf(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(j){an(l,h,j)}}function Zp(l,h){try{var g=l.ref;if(g!==null){switch(l.tag){case 26:case 27:case 5:var j=l.stateNode;break;case 30:j=l.stateNode;break;default:j=l.stateNode}typeof g=="function"?l.refCleanup=g(j):g.current=j}}catch(R){an(l,h,R)}}function xc(l,h){var g=l.ref,j=l.refCleanup;if(g!==null)if(typeof j=="function")try{j()}catch(R){an(l,h,R)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(R){an(l,h,R)}else g.current=null}function Z7(l){var h=l.type,g=l.memoizedProps,j=l.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":g.autoFocus&&j.focus();break e;case"img":g.src?j.src=g.src:g.srcSet&&(j.srcset=g.srcSet)}}catch(R){an(l,l.return,R)}}function jw(l,h,g){try{var j=l.stateNode;KW(j,l.type,g,h),j[Dt]=h}catch(R){an(l,l.return,R)}}function J7(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&Pu(l.type)||l.tag===4}function Sw(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||J7(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&Pu(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Cw(l,h,g){var j=l.tag;if(j===5||j===6)l=l.stateNode,h?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,h):(h=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,h.appendChild(l),g=g._reactRootContainer,g!=null||h.onclick!==null||(h.onclick=as));else if(j!==4&&(j===27&&Pu(l.type)&&(g=l.stateNode,h=null),l=l.child,l!==null))for(Cw(l,h,g),l=l.sibling;l!==null;)Cw(l,h,g),l=l.sibling}function tv(l,h,g){var j=l.tag;if(j===5||j===6)l=l.stateNode,h?g.insertBefore(l,h):g.appendChild(l);else if(j!==4&&(j===27&&Pu(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(tv(l,h,g),l=l.sibling;l!==null;)tv(l,h,g),l=l.sibling}function ez(l){var h=l.stateNode,g=l.memoizedProps;try{for(var j=l.type,R=h.attributes;R.length;)h.removeAttributeNode(R[0]);lo(h,j,g),h[cn]=l,h[Dt]=g}catch(O){an(l,l.return,O)}}var zl=!1,ks=!1,zw=!1,tz=typeof WeakSet=="function"?WeakSet:Set,Gs=null;function CW(l,h){if(l=l.containerInfo,Vw=wv,l=Vn(l),ii(l)){if("selectionStart"in l)var g={start:l.selectionStart,end:l.selectionEnd};else e:{g=(g=l.ownerDocument)&&g.defaultView||window;var j=g.getSelection&&g.getSelection();if(j&&j.rangeCount!==0){g=j.anchorNode;var R=j.anchorOffset,O=j.focusNode;j=j.focusOffset;try{g.nodeType,O.nodeType}catch{g=null;break e}var X=0,ne=-1,pe=-1,ze=0,He=0,Ue=l,Ne=null;t:for(;;){for(var $e;Ue!==g||R!==0&&Ue.nodeType!==3||(ne=X+R),Ue!==O||j!==0&&Ue.nodeType!==3||(pe=X+j),Ue.nodeType===3&&(X+=Ue.nodeValue.length),($e=Ue.firstChild)!==null;)Ne=Ue,Ue=$e;for(;;){if(Ue===l)break t;if(Ne===g&&++ze===R&&(ne=X),Ne===O&&++He===j&&(pe=X),($e=Ue.nextSibling)!==null)break;Ue=Ne,Ne=Ue.parentNode}Ue=$e}g=ne===-1||pe===-1?null:{start:ne,end:pe}}else g=null}g=g||{start:0,end:0}}else g=null;for(Qw={focusedElem:l,selectionRange:g},wv=!1,Gs=h;Gs!==null;)if(h=Gs,l=h.child,(h.subtreeFlags&1028)!==0&&l!==null)l.return=h,Gs=l;else for(;Gs!==null;){switch(h=Gs,O=h.alternate,l=h.flags,h.tag){case 0:if((l&4)!==0&&(l=h.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),lo(O,j,g),O[cn]=l,xr(O),j=O;break e;case"link":var X=i8("link","href",R).get(j+(g.href||""));if(X){for(var ne=0;nehn&&(X=hn,hn=Xt,Xt=X);var je=vl(ne,Xt),ge=vl(ne,hn);if(je&&ge&&($e.rangeCount!==1||$e.anchorNode!==je.node||$e.anchorOffset!==je.offset||$e.focusNode!==ge.node||$e.focusOffset!==ge.offset)){var Ce=Ue.createRange();Ce.setStart(je.node,je.offset),$e.removeAllRanges(),Xt>hn?($e.addRange(Ce),$e.extend(ge.node,ge.offset)):(Ce.setEnd(ge.node,ge.offset),$e.addRange(Ce))}}}}for(Ue=[],$e=ne;$e=$e.parentNode;)$e.nodeType===1&&Ue.push({element:$e,left:$e.scrollLeft,top:$e.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;neg?32:g,K.T=null,g=Ow,Ow=null;var O=Du,X=Rl;if(Ms=0,Kd=Du=null,Rl=0,(Kr&6)!==0)throw Error(n(331));var ne=Kr;if(Kr|=4,fz(O.current),lz(O,O.current,X,g),Kr=ne,sm(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot=="function")try{Pe.onPostCommitFiberRoot(At,O)}catch{}return!0}finally{J.p=R,K.T=j,Az(l,h)}}function Rz(l,h,g){h=Io(g,h),h=dw(l.stateNode,h,2),l=Nu(l,h,2),l!==null&&($r(l,2),wc(l))}function an(l,h,g){if(l.tag===3)Rz(l,l,g);else for(;h!==null;){if(h.tag===3){Rz(h,l,g);break}else if(h.tag===1){var j=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof j.componentDidCatch=="function"&&($u===null||!$u.has(j))){l=Io(g,l),g=M7(2),j=Nu(h,g,2),j!==null&&(O7(g,j,h,l),$r(j,2),wc(j));break}}h=h.return}}function Iw(l,h,g){var j=l.pingCache;if(j===null){j=l.pingCache=new NW;var R=new Set;j.set(h,R)}else R=j.get(h),R===void 0&&(R=new Set,j.set(h,R));R.has(g)||(Aw=!0,R.add(g),l=OW.bind(null,l,h,g),h.then(l,l))}function OW(l,h,g){var j=l.pingCache;j!==null&&j.delete(h),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,mn===l&&(Mr&g)===g&&(Zn===4||Zn===3&&(Mr&62914560)===Mr&&300>ct()-sv?(Kr&2)===0&&Vd(l,0):Tw|=g,Wd===Mr&&(Wd=0)),wc(l)}function Mz(l,h){h===0&&(h=dr()),l=Te(l,h),l!==null&&($r(l,h),wc(l))}function $W(l){var h=l.memoizedState,g=0;h!==null&&(g=h.retryLane),Mz(l,g)}function DW(l,h){var g=0;switch(l.tag){case 31:case 13:var j=l.stateNode,R=l.memoizedState;R!==null&&(g=R.retryLane);break;case 19:j=l.stateNode;break;case 22:j=l.stateNode._retryCache;break;default:throw Error(n(314))}j!==null&&j.delete(h),Mz(l,g)}function LW(l,h){return Vt(l,h)}var _v=null,Xd=null,Pw=!1,fv=!1,Bw=!1,Iu=0;function wc(l){l!==Xd&&l.next===null&&(Xd===null?_v=Xd=l:Xd=Xd.next=l),fv=!0,Pw||(Pw=!0,PW())}function sm(l,h){if(!Bw&&fv){Bw=!0;do for(var g=!1,j=_v;j!==null;){if(l!==0){var R=j.pendingLanes;if(R===0)var O=0;else{var X=j.suspendedLanes,ne=j.pingedLanes;O=(1<<31-Tt(42|l)+1)-1,O&=R&~(X&~ne),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,Lz(j,O))}else O=Mr,O=en(j,j===mn?O:0,j.cancelPendingCommit!==null||j.timeoutHandle!==-1),(O&3)===0||gr(j,O)||(g=!0,Lz(j,O));j=j.next}while(g);Bw=!1}}function IW(){Oz()}function Oz(){fv=Pw=!1;var l=0;Iu!==0&&QW()&&(l=Iu);for(var h=ct(),g=null,j=_v;j!==null;){var R=j.next,O=$z(j,h);O===0?(j.next=null,g===null?_v=R:g.next=R,R===null&&(Xd=g)):(g=j,(l!==0||(O&3)!==0)&&(fv=!0)),j=R}Ms!==0&&Ms!==5||sm(l),Iu!==0&&(Iu=0)}function $z(l,h){for(var g=l.suspendedLanes,j=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0ne)break;var He=pe.transferSize,Ue=pe.initiatorType;He&&Gz(Ue)&&(pe=pe.responseEnd,X+=He*(pe"u"?null:document;function n8(l,h,g){var j=Yd;if(j&&typeof h=="string"&&h){var R=Kn(h);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),r8.has(R)||(r8.add(R),l={rel:l,crossOrigin:g,href:h},j.querySelector(R)===null&&(h=j.createElement("link"),lo(h,"link",l),xr(h),j.head.appendChild(h)))}}function sK(l){Ml.D(l),n8("dns-prefetch",l,null)}function oK(l,h){Ml.C(l,h),n8("preconnect",l,h)}function aK(l,h,g){Ml.L(l,h,g);var j=Yd;if(j&&l&&h){var R='link[rel="preload"][as="'+Kn(h)+'"]';h==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+Kn(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+Kn(g.imageSizes)+'"]')):R+='[href="'+Kn(l)+'"]';var O=R;switch(h){case"style":O=Zd(l);break;case"script":O=Jd(l)}gi.has(O)||(l=_({rel:"preload",href:h==="image"&&g&&g.imageSrcSet?void 0:l,as:h},g),gi.set(O,l),j.querySelector(R)!==null||h==="style"&&j.querySelector(cm(O))||h==="script"&&j.querySelector(lm(O))||(h=j.createElement("link"),lo(h,"link",l),xr(h),j.head.appendChild(h)))}}function iK(l,h){Ml.m(l,h);var g=Yd;if(g&&l){var j=h&&typeof h.as=="string"?h.as:"script",R='link[rel="modulepreload"][as="'+Kn(j)+'"][href="'+Kn(l)+'"]',O=R;switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Jd(l)}if(!gi.has(O)&&(l=_({rel:"modulepreload",href:l},h),gi.set(O,l),g.querySelector(R)===null)){switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(lm(O)))return}j=g.createElement("link"),lo(j,"link",l),xr(j),g.head.appendChild(j)}}}function cK(l,h,g){Ml.S(l,h,g);var j=Yd;if(j&&l){var R=zr(j).hoistableStyles,O=Zd(l);h=h||"default";var X=R.get(O);if(!X){var ne={loading:0,preload:null};if(X=j.querySelector(cm(O)))ne.loading=5;else{l=_({rel:"stylesheet",href:l,"data-precedence":h},g),(g=gi.get(O))&&r2(l,g);var pe=X=j.createElement("link");xr(pe),lo(pe,"link",l),pe._p=new Promise(function(ze,He){pe.onload=ze,pe.onerror=He}),pe.addEventListener("load",function(){ne.loading|=1}),pe.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,gv(X,h,j)}X={type:"stylesheet",instance:X,count:1,state:ne},R.set(O,X)}}}function lK(l,h){Ml.X(l,h);var g=Yd;if(g&&l){var j=zr(g).hoistableScripts,R=Jd(l),O=j.get(R);O||(O=g.querySelector(lm(R)),O||(l=_({src:l,async:!0},h),(h=gi.get(R))&&n2(l,h),O=g.createElement("script"),xr(O),lo(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},j.set(R,O))}}function uK(l,h){Ml.M(l,h);var g=Yd;if(g&&l){var j=zr(g).hoistableScripts,R=Jd(l),O=j.get(R);O||(O=g.querySelector(lm(R)),O||(l=_({src:l,async:!0,type:"module"},h),(h=gi.get(R))&&n2(l,h),O=g.createElement("script"),xr(O),lo(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},j.set(R,O))}}function s8(l,h,g,j){var R=(R=ce.current)?mv(R):null;if(!R)throw Error(n(446));switch(l){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(h=Zd(g.href),g=zr(R).hoistableStyles,j=g.get(h),j||(j={type:"style",instance:null,count:0,state:null},g.set(h,j)),j):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){l=Zd(g.href);var O=zr(R).hoistableStyles,X=O.get(l);if(X||(R=R.ownerDocument||R,X={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(l,X),(O=R.querySelector(cm(l)))&&!O._p&&(X.instance=O,X.state.loading=5),gi.has(l)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},gi.set(l,g),O||_K(R,l,g,X.state))),h&&j===null)throw Error(n(528,""));return X}if(h&&j!==null)throw Error(n(529,""));return null;case"script":return h=g.async,g=g.src,typeof g=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=Jd(g),g=zr(R).hoistableScripts,j=g.get(h),j||(j={type:"script",instance:null,count:0,state:null},g.set(h,j)),j):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,l))}}function Zd(l){return'href="'+Kn(l)+'"'}function cm(l){return'link[rel="stylesheet"]['+l+"]"}function o8(l){return _({},l,{"data-precedence":l.precedence,precedence:null})}function _K(l,h,g,j){l.querySelector('link[rel="preload"][as="style"]['+h+"]")?j.loading=1:(h=l.createElement("link"),j.preload=h,h.addEventListener("load",function(){return j.loading|=1}),h.addEventListener("error",function(){return j.loading|=2}),lo(h,"link",g),xr(h),l.head.appendChild(h))}function Jd(l){return'[src="'+Kn(l)+'"]'}function lm(l){return"script[async]"+l}function a8(l,h,g){if(h.count++,h.instance===null)switch(h.type){case"style":var j=l.querySelector('style[data-href~="'+Kn(g.href)+'"]');if(j)return h.instance=j,xr(j),j;var R=_({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return j=(l.ownerDocument||l).createElement("style"),xr(j),lo(j,"style",R),gv(j,g.precedence,l),h.instance=j;case"stylesheet":R=Zd(g.href);var O=l.querySelector(cm(R));if(O)return h.state.loading|=4,h.instance=O,xr(O),O;j=o8(g),(R=gi.get(R))&&r2(j,R),O=(l.ownerDocument||l).createElement("link"),xr(O);var X=O;return X._p=new Promise(function(ne,pe){X.onload=ne,X.onerror=pe}),lo(O,"link",j),h.state.loading|=4,gv(O,g.precedence,l),h.instance=O;case"script":return O=Jd(g.src),(R=l.querySelector(lm(O)))?(h.instance=R,xr(R),R):(j=g,(R=gi.get(O))&&(j=_({},g),n2(j,R)),l=l.ownerDocument||l,R=l.createElement("script"),xr(R),lo(R,"link",j),l.head.appendChild(R),h.instance=R);case"void":return null;default:throw Error(n(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(j=h.instance,h.state.loading|=4,gv(j,g.precedence,l));return h.instance}function gv(l,h,g){for(var j=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=j.length?j[j.length-1]:null,O=R,X=0;X title"):null)}function fK(l,h,g){if(g===1||h.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return l=h.disabled,typeof h.precedence=="string"&&l==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function l8(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function dK(l,h,g,j){if(g.type==="stylesheet"&&(typeof j.media!="string"||matchMedia(j.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var R=Zd(j.href),O=h.querySelector(cm(R));if(O){h=O._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(l.count++,l=bv.bind(l),h.then(l,l)),g.state.loading|=4,g.instance=O,xr(O);return}O=h.ownerDocument||h,j=o8(j),(R=gi.get(R))&&r2(j,R),O=O.createElement("link"),xr(O);var X=O;X._p=new Promise(function(ne,pe){X.onload=ne,X.onerror=pe}),lo(O,"link",j),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,h),(h=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=bv.bind(l),h.addEventListener("load",g),h.addEventListener("error",g))}}var s2=0;function hK(l,h){return l.stylesheets&&l.count===0&&xv(l,l.stylesheets),0s2?50:800)+h);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(j),clearTimeout(R)}}:null}function bv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xv(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var yv=null;function xv(l,h){l.stylesheets=null,l.unsuspend!==null&&(l.count++,yv=new Map,h.forEach(pK,l),yv=null,bv.call(l))}function pK(l,h){if(!(h.state.loading&4)){var g=yv.get(l);if(g)var j=g.get(null);else{g=new Map,yv.set(l,g);for(var R=l.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),h2.exports=gV(),h2.exports}var bV=vV();const yV=!1;var C$=T.useLayoutEffect;function xV(e,r,t){T.useEffect(()=>{if(!e.current||t||typeof IntersectionObserver!="function")return()=>r();const n=new IntersectionObserver(s=>{r(s.pop())},{rootMargin:"100px"});return n.observe(e.current),()=>{n.disconnect(),r()}},[r,t,e])}function wV(e){const r=T.useRef(null);return T.useImperativeHandle(e,()=>r.current,[]),r}function og(e){return e[e.length-1]}function tp(e,r){return typeof e=="function"?e(r):e}const z$=Object.prototype.hasOwnProperty,kV=Object.prototype.propertyIsEnumerable;function E$(e){for(const r in e)if(z$.call(e,r))return!0;return!1}const jV=()=>Object.create(null),of=(e,r)=>bf(e,r,jV);function bf(e,r,t=()=>({}),n=0){if(e===r)return e;if(n>500)return r;const s=r,o=V8(e)&&V8(s);if(!o&&!(nb(e)&&nb(s)))return s;const a=o?e:W8(e);if(!a)return s;const i=o?s:W8(s);if(!i)return s;const c=a.length,u=i.length,d=o?new Array(u):t();let _=0;for(let p=0;p"u")return!0;const t=r.prototype;return!(!K8(t)||!t.hasOwnProperty("isPrototypeOf"))}function K8(e){return Object.prototype.toString.call(e)==="[object Object]"}function V8(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function m_(e,r,t){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let n=0,s=e.length;ns||!m_(e[a],r[a],t)))return!1;return s===o}return!1}const SV=/[\x00-\x1f\x7f"<>`{}]/g;function CV(e){return e.replace(SV,r=>"%"+r.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function Q8(e){let r;try{r=decodeURI(e)}catch{r=e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}return CV(r)}const zV=["http:","https:","mailto:","tel:"];function sb(e,r){if(!e)return!1;try{const t=new URL(e);return!r.has(t.protocol)}catch{return!1}}function gm(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const r=/%25|%5C/gi;let t=0,n="",s;for(;(s=r.exec(e))!==null;)n+=Q8(e.slice(t,s.index))+s[0],t=r.lastIndex;n=n+Q8(t?e.slice(t):e);let o=!1;return n.startsWith("//")&&(o=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:o}}function EV(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function NV(e,r){if(e===r)return!0;if(e.length!==r.length)return!1;for(let t=0;t{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,n&&(n.next=o,o.prev=n)):(o.next.prev=void 0,t=o.next,o.next=void 0,n&&(o.prev=n,n.next=o)),n=o)};return{get(o){const a=r.get(o);if(a)return s(a),a.value},set(o,a){if(r.size>=e&&t){const c=t;r.delete(c.key),c.next&&(t=c.next,c.next.prev=void 0),c===n&&(n=void 0)}const i=r.get(o);if(i)i.value=a,s(i);else{const c={key:o,value:a,prev:n};n&&(n.next=c),n=c,t||(t=c),r.set(o,c)}},clear(){r.clear(),t=void 0,n=void 0}}}const f_=4,N$=5;function A$(e,r,t=new Uint16Array(6)){const n=e.indexOf("/",r),s=n===-1?e.length:n,o=e.substring(r,s);if(!o||!o.includes("$"))return t[0]=0,t[1]=r,t[2]=r,t[3]=s,t[4]=s,t[5]=s,t;if(o==="$"){const c=e.length;return t[0]=2,t[1]=r,t[2]=r,t[3]=c,t[4]=c,t[5]=c,t}if(o.charCodeAt(0)===36)return t[0]=1,t[1]=r,t[2]=r+1,t[3]=s,t[4]=s,t[5]=s,t;const a=o.indexOf("{");let i;if(a!==-1&&a+1!D.parse&&D.caseSensitive===z&&D.prefix===N&&D.suffix===A));if($)x=$;else{const D=AV(E,_,z,N,A);x=D,D.parent=s,D.depth=o;let I;E===1?I=s.dynamic??(s.dynamic=[]):E===3?I=s.optional??(s.optional=[]):I=s.wildcard??(s.wildcard=[]),I.push(D),I.length===2&&(a==null||a.push(I))}break}}s=x}if(w&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=kh(_);b.kind=N$,b.parent=s,o++,b.depth=o,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&_.endsWith("/")){const b=kh(_);b.kind=f_,b.parent=s,o++,b.depth=o,s.index=b,s=b}s.parse=w??null,s.priority=((d=p==null?void 0:p.params)==null?void 0:d.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=_)}if(t.children)for(const _ of t.children)dy(e,r,_,c,s,o,a,i)}function T$(e,r){if(e.parse&&!r.parse)return-1;if(!e.parse&&r.parse)return 1;if(e.parse&&r.parse&&(e.priority||r.priority))return r.priority-e.priority;if(e.prefix&&r.prefix&&e.prefix!==r.prefix){if(e.prefix.startsWith(r.prefix))return-1;if(r.prefix.startsWith(e.prefix))return 1}if(e.suffix&&r.suffix&&e.suffix!==r.suffix){if(e.suffix.endsWith(r.suffix))return-1;if(r.suffix.endsWith(e.suffix))return 1}return e.prefix&&!r.prefix?-1:!e.prefix&&r.prefix?1:e.suffix&&!r.suffix?-1:!e.suffix&&r.suffix?1:e.caseSensitive&&!r.caseSensitive?-1:!e.caseSensitive&&r.caseSensitive?1:0}function kh(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function AV(e,r,t,n,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:r,parent:null,parse:null,priority:0,caseSensitive:t,prefix:n,suffix:s}}function TV(e,r){const t=kh("/"),n=new Uint16Array(6),s=[];for(const o of e)dy(!1,n,o,1,t,0,s);for(const o of s)o.sort(T$);r.masksTree=t,r.flatCache=ob(1e3)}function RV(e,r){e||(e="/");const t=r.flatCache.get(e);if(t!==void 0)return t;const n=kj(e,r.masksTree);return r.flatCache.set(e,n),n}function MV(e,r,t,n,s){e||(e="/"),n||(n="/");const o=r?`case\0${e}`:e;let a=s.singleCache.get(o);return a||(a=kh("/"),dy(r,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(o,a)),kj(n,a,t)}function OV(e,r,t=!1){const n=t?e:`nofuzz\0${e}`,s=r.matchCache.get(n);if(s!==void 0)return s;e||(e="/");let o;try{o=kj(e,r.segmentTree,t)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=M$(o.route)),r.matchCache.set(n,o),o}function $V(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function DV(e,r=!1,t){const n=kh(e.fullPath),s=new Uint16Array(6),o=[],a={},i={};let c=0;dy(r,s,e,1,n,0,o,u=>{if(t==null||t(u,c),u.id in a&&wj(),a[u.id]=u,c!==0&&u.path){const d=$V(u.fullPath);(!i[d]||u.fullPath.endsWith("/"))&&(i[d]=u)}c++});for(const u of o)u.sort(T$);return{processedTree:{segmentTree:n,singleCache:ob(1e3),matchCache:ob(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:i}}function kj(e,r,t=!1){const n=e.split("/"),s=IV(e,n,r,t);if(!s)return null;const[o]=R$(e,n,s);return{route:s.node.route,rawParams:o}}function R$(e,r,t){var d,_,p,m;const n=LV(t.node);let s=null;const o=Object.create(null);let a=((d=t.extract)==null?void 0:d.part)??0,i=((_=t.extract)==null?void 0:_.node)??0,c=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;i=0;N--){const A=_.wildcard[N],{prefix:z,suffix:M}=A;if(!(z&&(y||!(A.caseSensitive?S:E??(E=S.toLowerCase())).startsWith(z)))){if(M){if(y)continue;const $=r.slice(p).join("/"),D=$.slice(-M.length);if((A.caseSensitive?D:D.toLowerCase())!==M||$.length-M.length=0;A--){const z=_.optional[A];i.push({node:z,index:p,skipped:N,statics:k,dynamics:w,optionals:v,extract:b,rawParams:x})}if(!y)for(let A=_.optional.length-1;A>=0;A--){const z=_.optional[A],{prefix:M,suffix:$}=z;if(M||$){const D=z.caseSensitive?S:E??(E=S.toLowerCase());if(M&&!D.startsWith(M)||$&&D.indexOf($,D.length-$.length)=0;N--){const A=_.dynamic[N],{prefix:z,suffix:M}=A;if(z||M){const $=A.caseSensitive?S:E??(E=S.toLowerCase());if(z&&!$.startsWith(z)||M&&$.indexOf(M,$.length-M.length)=0;N--){const A=_.pathless[N];i.push({node:A,index:p,skipped:m,statics:k,dynamics:w,optionals:v,extract:b,rawParams:x})}}if(u)return u;if(n&&c){let d=c.index;for(let p=0;pe.statics||r.statics===e.statics&&(r.dynamics>e.dynamics||r.dynamics===e.dynamics&&(r.optionals>e.optionals||r.optionals===e.optionals&&((r.node.kind===f_)>(e.node.kind===f_)||r.node.kind===f_==(e.node.kind===f_)&&r.node.depth>e.node.depth))):!0}function E1(e){return N1(e.filter(r=>r!==void 0).join("/"))}function N1(e){return e.replace(/\/{2,}/g,"/")}function O$(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Kl(e){const r=e.length;return r>1&&e[r-1]==="/"?e.replace(/\/{1,}$/,""):e}function $$(e){return Kl(O$(e))}function ab(e,r){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${r}/`?e.slice(0,-1):e}function BV(e,r,t){return ab(e,t)===ab(r,t)}function FV({base:e,to:r,trailingSlash:t="never",cache:n}){if(r.includes("//")&&(r=N1(r)),r.startsWith("/"))return r.length===1||t==="preserve"?r:t==="always"?r.endsWith("/")?r:`${r}/`:r.endsWith("/")?r.slice(0,-1):r;const s=r===".";let o;if(n){o=s?e:e+"\0"+r;const u=n.get(o);if(u)return u}let a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=N1(e)),a=e.split("/");a.length>1&&og(a)==="";)a.pop();const u=r.split("/");for(let d=0,_=u.length;d<_;d++){const p=u[d];p===""?d?d===_-1&&a.push(p):a=[p]:p===".."?a.length>1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(og(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const i=a.join("/"),c=(s?N1(i):i)||"/";return o&&n&&n.set(o,c),c}function HV(e){const r=new Map(e.map(s=>[encodeURIComponent(s),s])),t=Array.from(r.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(t,"g");return s=>s.replace(n,o=>r.get(o)??o)}function v2(e,r,t){const n=r[e];return typeof n!="string"?n:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(s=>Z8(s,t)).join("/"):Z8(n,t)}function Y8({path:e,params:r,decoder:t,...n}){let s=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:s};const a=e.length;let i=0,c,u="";for(;ie.state.__TSR_key||e.href;function QV(e){const r=e.getAttribute(J8);if(r)return`[${J8}="${r}"]`;let t="",n=e,s;for(;s=n.parentNode;){let o=1,a=n;for(;a=a.previousElementSibling;)o++;const i=`${n.localName}:nth-child(${o})`;t=t?`${i} > ${t}`:i,n=s}return t}let Rv=!1;const A1="window";function D4(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function e9(e){const r=new Set;for(const t of e){if(t===A1)continue;const n=D4(t);n&&r.add(n)}return r}function XV(e,r){const t=e.options.scrollRestoration,n=e._scroll;t&&(n.restoring=!0);const s=e.options.getScrollRestorationKey||VV,o=new Set,a=i=>{const c=Zu[i]||(Zu[i]={});for(const u of o)u===document?c[A1]={scrollX,scrollY}:u.isConnected&&(c[QV(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!n.restoration&&(n.restoration=!0,Rv=!1,history.scrollRestoration="manual",document.addEventListener("scroll",i=>{Rv||o.add(i.target)},!0),e.subscribe("onBeforeLoad",i=>{i.fromLocation&&a(s(i.fromLocation)),o.clear()}),addEventListener("pagehide",()=>{a(s(e.stores.resolvedLocation.get()??e.stores.location.get())),KV()})),!n.reset&&(n.reset=!0,e.subscribe("onRendered",i=>{var w;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,d=n.next,_=n.hash;let p;if(o.clear(),n.next=!0,n.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=s(i.toLocation),k=i.fromLocation&&s(i.fromLocation);if(n.restoring&&k&&k!==m){const v=Zu[k];if(v){let b=Zu[m];for(const x in v){if(x===A1){if(d)continue}else{const y=D4(x);if(!y||d&&u&&(p??(p=e9(u)),p.has(y)))continue}b||(b=Zu[m]={}),b[x]??(b[x]=v[x])}}}Rv=!0;try{const v=i.toLocation.hash,b=i.toLocation.state.__hashScrollIntoViewOptions??!0;let x=!1;if(d){!v&&u&&(p??(p=e9(u)));const y=v&&b&&_,S=n.restoring?Zu[m]:void 0;if(S)for(const E in S){const{scrollX:N,scrollY:A}=S[E];if(E===A1){if(y)continue;scrollTo({top:A,left:N,behavior:c}),x=!0}else{const z=D4(E);z&&(z.scrollLeft=N,z.scrollTop=A,p==null||p.delete(z))}}if(!v){const E={top:0,left:0,behavior:c};if(x||scrollTo(E),p)for(const N of p)N.scrollTo(E)}}!x&&v&&b&&((w=document.getElementById(v))==null||w.scrollIntoView(b))}finally{Rv=!1}}))}function YV(e,r=String){const t=new URLSearchParams;for(const n in e){const s=e[n];s!==void 0&&t.set(n,r(s))}return t.toString()}function b2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function ZV(e){const r=new URLSearchParams(e),t=Object.create(null);for(const[n,s]of r.entries()){const o=t[n];o==null?t[n]=b2(s):Array.isArray(o)?o.push(b2(s)):t[n]=[o,b2(s)]}return t}const JV=/^(?:\s|["[{\d-]|fa|nu|tr)/,eQ=rQ(JSON.parse),tQ=nQ(JSON.stringify,JSON.parse);function rQ(e){return r=>{r[0]==="?"&&(r=r.substring(1));const t=ZV(r);for(const n in t){const s=t[n];if(typeof s=="string")try{t[n]=e(s)}catch{}}return t}}function nQ(e,r){const t=r===JSON.parse;function n(s){if(s&&typeof s=="object")try{return e(s)}catch{}else if(r&&typeof s=="string"){if(t&&!JV.test(s))return s;try{return r(s),e(s)}catch{}}return s}return s=>{const o=YV(s,n);return o?`?${o}`:""}}const Sh="__root__";function sQ(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const r=new Headers(e.headers);e.href&&r.get("Location")===null&&r.set("Location",e.href);const t=new Response(null,{status:e.statusCode,headers:r});if(t.options=e,e.throw)throw t;return t}function D$(e){return e instanceof Response&&!!e.options}function oQ(e){return{input:({url:r})=>{for(const t of e)r=L4(t,r);return r},output:({url:r})=>{for(let t=e.length-1;t>=0;t--)r=L$(e[t],r);return r}}}function aQ(e){const r=$$(e.basepath),t=`/${r}`,n=e.caseSensitive?t:t.toLowerCase(),s=`${n}/`;return{input:({url:o})=>{const a=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===n?o.pathname="/":a.startsWith(s)&&(o.pathname=o.pathname.slice(t.length)),o},output:({url:o})=>(o.pathname=E1(["/",r,o.pathname]),o)}}function L4(e,r){var n;const t=(n=e==null?void 0:e.input)==null?void 0:n.call(e,{url:r});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return r}function L$(e,r){var n;const t=(n=e==null?void 0:e.output)==null?void 0:n.call(e,{url:r});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return r}function iQ(e,r){const{createMutableStore:t,createReadonlyStore:n,batch:s}=r,o=new Map,a=t("idle"),i=t(e),c=t(void 0),u=t([]),d=n(()=>u.get().map(w=>o.get(w).get())),_=n(()=>({status:a.get(),isLoading:a.get()==="pending",matches:d.get(),location:i.get(),resolvedLocation:c.get()}));function p(w){let v=o.get(w);return v||(v=t(void 0),o.set(w,v)),v}const m={status:a,location:i,resolvedLocation:c,ids:u,matches:d,byRoute:o,__store:_,getMatchStore:p,setMatches:k};function k(w){const v=u.get(),b=w.map(x=>x.routeId);s(()=>{NV(v,b)||u.set(b);for(const x of v)b.includes(x)||o.get(x).set(()=>{});for(const x of w){const y=p(x.routeId);y.get()!==x&&y.set(x)}})}return m}var g_="__TSR_index",t9="popstate",r9="beforeunload";function cQ(e){let r=e.getLocation();const t=new Set,n=a=>{r=e.getLocation(),t.forEach(i=>i({location:r,action:a}))},s=a=>{e.notifyOnIndexChange??!0?n(a):r=e.getLocation()},o=async({task:a,navigateOpts:i,...c})=>{var _,p;if((i==null?void 0:i.ignoreBlocker)??!1){a();return}const u=((_=e.getBlockers)==null?void 0:_.call(e))??[],d=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&d)for(const m of u){const k=ib(c.path,c.state);if(await m.blockerFn({currentLocation:r,nextLocation:k,action:c.type})){(p=e.onBlocked)==null||p.call(e);return}}a()};return{get location(){return r},get length(){return e.getLength()},subscribers:t,subscribe:a=>(t.add(a),()=>{t.delete(a)}),push:(a,i,c)=>{const u=r.state[g_];i=n9(u+1,i),o({task:()=>{e.pushState(a,i),n({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:i})},replace:(a,i,c)=>{const u=r.state[g_];i=n9(u,i),o({task:()=>{e.replaceState(a,i),n({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:i})},go:(a,i)=>{o({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:i,type:"GO"})},back:a=>{o({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>r.state[g_]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const i=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...i,a]),()=>{var d,_;const u=((d=e.getBlockers)==null?void 0:d.call(e))??[];(_=e.setBlockers)==null||_.call(e,u.filter(p=>p!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:n}}function n9(e,r){r||(r={});const t=jj();return{...r,key:t,__TSR_key:t,[g_]:e}}function lQ(e){var A,z;const r=typeof document<"u"?window:void 0,t=r.history.pushState,n=r.history.replaceState;let s=[];const o=()=>s,a=M=>s=M,i=(M=>M),c=(()=>ib(`${r.location.pathname}${r.location.search}${r.location.hash}`,r.history.state));if(!((A=r.history.state)!=null&&A.__TSR_key)&&!((z=r.history.state)!=null&&z.key)){const M=jj();r.history.replaceState({[g_]:0,key:M,__TSR_key:M},"")}let u=c(),d,_=!1,p=!1,m=!1,k=!1;const w=()=>u;let v;const b=()=>{v&&(N._ignoreSubscribers=!0,(v[2]?r.history.pushState:r.history.replaceState)(v[1],"",v[0]),N._ignoreSubscribers=!1,v=void 0,d=void 0)},x=(M,$,D)=>{const I=i($),G=!!v;G||(d=u),u=ib($,D),v=[I,D,(v==null?void 0:v[2])||M],G||queueMicrotask(()=>b())},y=M=>{u=c(),N.notify({type:M})},S=async()=>{if(p){p=!1;return}const M=c(),$=M.state[g_]-u.state[g_],D=$===1,I=$===-1,G=!D&&!I||_;_=!1;const F=G?"GO":I?"BACK":"FORWARD",Q=G?{type:"GO",index:$}:{type:I?"BACK":"FORWARD"};if(m)m=!1;else{const K=o();if(typeof document<"u"&&K.length){for(const J of K)if(await J.blockerFn({currentLocation:u,nextLocation:M,action:F})){p=!0,r.history.go(1),N.notify(Q);return}}}u=c(),N.notify(Q)},E=M=>{if(k){k=!1;return}let $=!1;const D=o();if(typeof document<"u"&&D.length)for(const I of D){const G=I.enableBeforeUnload??!0;if(G===!0){$=!0;break}if(typeof G=="function"&&G()===!0){$=!0;break}}if($)return M.preventDefault(),M.returnValue=""},N=cQ({getLocation:w,getLength:()=>r.history.length,pushState:(M,$)=>x(!0,M,$),replaceState:(M,$)=>x(!1,M,$),back:M=>(M&&(m=!0),k=!0,r.history.back()),forward:M=>{M&&(m=!0),k=!0,r.history.forward()},go:M=>{_=!0,r.history.go(M)},createHref:M=>i(M),flush:b,destroy:()=>{r.history.pushState=t,r.history.replaceState=n,r.removeEventListener(r9,E,{capture:!0}),r.removeEventListener(t9,S)},onBlocked:()=>{d&&u!==d&&(u=d)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return r.addEventListener(r9,E,{capture:!0}),r.addEventListener(t9,S),r.history.pushState=function(...M){const $=t.apply(r.history,M);return N._ignoreSubscribers||y("PUSH"),$},r.history.replaceState=function(...M){const $=n.apply(r.history,M);return N._ignoreSubscribers||y("REPLACE"),$},N}function uQ(e){let r=e.replace(/[\x00-\x1f\x7f]/g,"");return r.startsWith("//")&&(r="/"+r.replace(/^\/+/,"")),r}function ib(e,r){const t=uQ(e),n=t.indexOf("#"),s=t.indexOf("?"),o=jj();return{href:t,pathname:t.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:t.length),hash:n>-1?t.substring(n):"",search:s>-1?t.slice(s,n===-1?void 0:n):"",state:r||{[g_]:0,key:o,__TSR_key:o}}}function jj(){return(Math.random()+1).toString(36).substring(7)}function s9(e){var r,t;return e.options.loader||e.options.beforeLoad||e.lazyFn||((r=e.options.component)==null?void 0:r.preload)||((t=e.options.pendingComponent)==null?void 0:t.preload)}function hy(e,r){return{fromLocation:r,toLocation:e,pathChanged:(r==null?void 0:r.pathname)!==e.pathname,hrefChanged:(r==null?void 0:r.href)!==e.href,hashChanged:(r==null?void 0:r.hash)!==e.hash}}function o9({key:e,__TSR_key:r,__TSR_index:t,__hashScrollIntoViewOptions:n,...s}){return s}function _Q(e,r,t,n){var s,o,a,i;for(const c of r){if(n&&e._tx!==n)return;t.some(u=>u.routeId===c.routeId)||(o=(s=e.routesById[c.routeId].options).onLeave)==null||o.call(s,c)}for(const c of t){if(n&&e._tx!==n)return;(i=(a=e.routesById[c.routeId].options)[r.some(u=>u.routeId===c.routeId)?"onStay":"onEnter"])==null||i.call(a,c)}}var fQ=class{constructor(e,r){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async t=>(t(),!1),this.update=t=>{const n=this.options,s=this.basepath??(n==null?void 0:n.basepath)??"/",o=this.basepath===void 0,a=n==null?void 0:n.rewrite;if(this.options={...n,...t},this.isServer=this.options.isServer??yV??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=HV(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=lQ()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let u;this.resolvePathCache=ob(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=iQ(this.latestLocation,u),XV(this)}const i=this.options.basepath??"/",c=this.options.rewrite;if(o||s!==i||a!==c){this.basepath=i;const u=[],d=$$(i);d&&d!=="/"&&u.push(aQ({basepath:i})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:oQ(u),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const t=DV(this.routeTree,this.options.caseSensitive,(n,s)=>{n.init({originalIndex:s})});return this.options.routeMasks&&TV(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,n)=>{const s={eventType:t,fn:n};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{for(const n of this.subscribers)if(n.eventType===t.type)try{n.fn(t)}catch(s){console.error(s)}},this.parseLocation=(t,n)=>{const s=({pathname:c,search:u,hash:d,href:_,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const b=this.options.parseSearch(u),x=this.options.stringifySearch(b);return{href:c+x+d,publicHref:c+x+d,pathname:gm(c).path,external:!1,searchStr:x,search:of(n==null?void 0:n.search,b),hash:gm(d.slice(1)).path,state:bf(n==null?void 0:n.state,p)}}const m=new URL(_,this.origin),k=L4(this.rewrite,m),w=this.options.parseSearch(k.search),v=this.options.stringifySearch(w);return k.search=v,{href:k.href.replace(k.origin,""),publicHref:_,pathname:gm(k.pathname).path,external:!!this.rewrite&&k.origin!==this.origin,searchStr:v,search:of(n==null?void 0:n.search,w),hash:gm(k.hash.slice(1)).path,state:bf(n==null?void 0:n.state,p)}},o=s(t),{__tempLocation:a,__tempKey:i}=o.state;if(a&&(!i||i===this.tempLocationKey)){const c=s(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(t,n)=>FV({base:t,to:n,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,n,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:n},s):this.matchRoutesInternal(t,n),this.getMatchedRoutes=t=>{const n=Object.create(null),s=OV(Kl(t),this.processedTree,!0);return s&&Object.assign(n,s.rawParams),[(s==null?void 0:s.branch)||[this.routesById.__root__],n,s==null?void 0:s.route]},this.buildLocation=t=>{const n=(o={})=>{var M,$;if(o.href){const D=ib(o.href,{});o={...o,to:L4(this.rewrite,new URL(D.pathname,this.origin)).pathname,search:this.options.parseSearch(D.search),hash:D.hash.slice(1)}}const a=o._fromLocation||this._pendingLocation||this.latestLocation,i=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??i[1],u=i[2],d=i[3],_=this.resolvePathWithBase(c,o.to?`${o.to}`:".");let p=a9(o.params,d);const m=this.routesByPath[Kl(_)];let k;if(m)k=this.getRouteBranch(m);else if(_.includes("$"))k=[];else{const[D,I,G]=this.getMatchedRoutes(_);k=D,this.options.notFoundRoute&&(!G||G.path!=="/"&&I["**"])&&(k=[...k,this.options.notFoundRoute])}if(k.length&&E$(p))for(const D of k){const I=((M=D.options.params)==null?void 0:M.stringify)??D.options.stringifyParams;if(I){p===d&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,I(p))}catch{}}}const w=t.leaveParams?_:gm(Y8({path:_,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=u;if(t._includeValidateSearch&&(($=this.options.search)!=null&&$.strict)){const D={};k.forEach(I=>{if(I.options.validateSearch)try{Object.assign(D,T1(I.options.validateSearch,{...D,...v}))}catch{}}),v=D}v=hQ(v,o,k,t._includeValidateSearch),v=of(u,v);const b=this.options.stringifySearch(v),x=o.hash===!0?a.hash:o.hash?tp(o.hash,a.hash):void 0,y=x?`#${x}`:"";let S=o.state===!0?a.state:o.state?tp(o.state,a.state):{};o.state&&(S=bf(a.state,S));const E=`${w}${b}${y}`;let N,A,z=!1;if(this.rewrite){const D=new URL(E,this.origin),I=L$(this.rewrite,D);N=D.href.replace(D.origin,""),I.origin!==this.origin?(A=I.href,z=!0):A=I.pathname+I.search+I.hash}else N=EV(E),A=N;return{publicHref:A,href:N,pathname:w,search:v,searchStr:b,state:S,hash:x??"",external:z,unmaskOnReload:o.unmaskOnReload}},s=n(t);if(t.mask)s.maskedLocation=n({from:t.from,...t.mask});else if(this.options.routeMasks){const o=RV(s.pathname,this.processedTree);if(o){const a=Object.assign(Object.create(null),o.rawParams),{from:i,params:c,...u}=o.route,d=a9(c,a);s.maskedLocation=n({from:t.from,...u,params:d})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:n,...s})=>{let o;const a=Kl(this.latestLocation.href)===Kl(s.href)&&m_(o9(s.state),o9(this.latestLocation.state)),i=this._commitPromise;let c;const u=new Promise(d=>{c=d});if(u.resolve=()=>{c(),i==null||i.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:d,hashScrollIntoView:_,...p}=s;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=_??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,o=s.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n}),this.history.subscribers.size||this.load({action:{type:o}})}return this._scroll.next=s.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:t,resetScroll:n,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:a,...i}={})=>{const c=this.buildLocation({...i,_includeValidateSearch:!0});this._pendingLocation=c;const u=this.commitLocation({...c,viewTransition:o,replace:t,resetScroll:n,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:n,href:s,publicHref:o,...a})=>{var c,u;let i=!1;if(s)try{new URL(`${s}`),i=!0}catch{}if(i&&!n&&(n=!0),n){if(t!==void 0||!s){const _=this.buildLocation({to:t,...a});s=s??_.publicHref,o=o??_.publicHref}const d=!i&&o?o:s;if(sb(d,this.protocolAllowlist))return;if(!a.ignoreBlocker){const _=((u=(c=this.history).getBlockers)==null?void 0:u.call(c))??[];for(const p of _)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(d):window.location.href=d;return}return this.buildAndCommitLocation({...a,href:s,to:t,_isNavigate:!0})},this.load=async t=>{this.updateLatestLocation(),t!=null&&t.action&&(this._scroll.hash=t.action.type==="PUSH"||t.action.type==="REPLACE"),await kQ(this,t)},this.startViewTransition=t=>{var s,o;const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document.startViewTransition=="function"){let a;if(typeof n=="object"&&((o=(s=window.CSS)==null?void 0:s.supports)!=null&&o.call(s,"selector(:active-view-transition-type(a))"))){const i=this.latestLocation,c=this.stores.resolvedLocation.get(),u=typeof n.types=="function"?n.types(hy(i,c)):n.types;if(u===!1)return t();a={update:t,types:u}}else a=t;return document.startViewTransition(a).updateCallbackDone}return t()},this.invalidate=t=>{var u,d;const n=this._committed,s=t==null?void 0:t.filter,o=this._preloads,a=new Set([...n,...this._cache.values(),...[...(o==null?void 0:o.values())??[]].flat(),...((u=this._tx)==null?void 0:u[3])??[]].filter(_=>!s||s(_)).map(_=>_.id)),i=[];for(const[_,p]of o??[])p.some(m=>a.has(m.id))&&(o.delete(_),i.push(_));const c=_=>{if(a.has(_.id)){const p=this.routesById[_.routeId],m={..._,invalid:!0,...(t!=null&&t.forcePending||_.status==="error"||_.status==="notFound")&&s9(p)?{status:"pending",error:void 0}:void 0};return _._flight=void 0,m}return _};this._committed=n.map(c);for(const[_,p]of this._cache)a.has(_)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const _ of a)(d=this._flights)==null||d.delete(_);for(const _ of i)_.abort();return this.shouldViewTransition=!1,this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const n=t.headers.get("Location");if(t.options.href){if(n)try{const s=new URL(n);if(this.origin&&s.origin===this.origin){const o=s.pathname+s.search+s.hash;t.options.href=o,t.headers.set("Location",o)}}catch{}}else{const s=this.buildLocation(t.options).publicHref||"/";t.options.href=s,t.headers.set("Location",s)}if(t.options.href&&sb(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{var u;const n=this._cache,s=this._preloads,o=t==null?void 0:t.filter,a=[],i=[];for(const[d,_]of n)(!o||o(_))&&(i.push(d),a.push(_));const c=[];for(const[d,_]of s??[])(!o||_.some(o))&&(c.push(d),a.push(..._));for(const d of i)n.delete(d);for(const d of c)s.delete(d);for(const d of a){const _=d._flight;d._flight=void 0,_&&!--_[2]&&(((u=this._flights)==null?void 0:u.get(d.id))===_&&this._flights.delete(d.id),c.push(_[1]))}for(const d of c)d.abort()},this.loadRouteChunk=Ch,this.preloadRoute=t=>jQ(this,t),this.matchRoute=(t,n)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},o=this.buildLocation(s),a=this.stores.status.get()==="pending";if(n!=null&&n.pending&&!a)return!1;const i=(n==null?void 0:n.pending)??!a?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=MV(o.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,i.pathname,this.processedTree);return!c||t.params&&!m_(c.rawParams,t.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?m_(i.search,o.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.getStoreConfig=r,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??tQ,parseSearch:e.parseSearch??eQ,protocolAllowlist:e.protocolAllowlist??zV}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:r,processedTree:t}){this.routesById=e,this.routesByPath=r,this.processedTree=t;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}getRouteBranch(e){let r=this.routeBranchCache.get(e);return r||(r=M$(e),this.routeBranchCache.set(e,r)),r}matchRoutesInternal(e,r){var p,m;const[t,n,s]=this.getMatchedRoutes(e.pathname);let o=t,a=!1;(s?s.path!=="/"&&n["**"]:Kl(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const i=a?pQ(this.options.notFoundMode,o):void 0,c=new Array(o.length),u=this._committed,d=(k,w)=>{const v=u[w];return(v==null?void 0:v.routeId)===k.id?v:k===this.options.notFoundRoute?u.find(b=>b.routeId===k.id):void 0};let _;for(let k=0;k{const m=p(c.preSearchFilters?c.preSearchFilters.reduce((k,w)=>w(k),_):_);return c.postSearchFilters?c.postSearchFilters.reduce((k,w)=>w(k),m):m};s.push(d)}const u=c.validateSearch;if(n&&u){const d=({search:_,next:p,meta:m})=>{const k=p(_);try{const w=T1(u,k);if(m&&w)for(const v in w)v in k||(m.defaulted||(m.defaulted=new Map)).set(v,w[v]);return{...k,...w}}catch{}return k};s.push(d)}}const o=(i,c,u)=>{if(i>=s.length){if(!r.search)return{};if(r.search===!0)return c;const _=tp(r.search,c);return u&&(u.explicit=_),_}const d=(_,p)=>{if(p){const m=u||{};return{search:o(i+1,_,m),meta:m}}return o(i+1,_,u)};return s[i]({search:c,next:d,meta:u})};return o(0,e)}function pQ(e,r){if(e!=="root"){let t;for(let n=r.length-1;n>=0;n--){const s=r[n];if(s.options.notFoundComponent)return s.id;t||(t=s.children&&s.id)}if(t)return t}return Sh}function a9(e,r){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return r;const t=Object.assign(Object.create(null),r);return Object.assign(t,tp(e,t))}function i9(e,r){var n;const t=((n=e.options.params)==null?void 0:n.parse)??e.options.parseParams;t&&Object.assign(r,t(r))}function I4(e,r){var t,n;return(n=(t=e.options[r])==null?void 0:t.preload)==null?void 0:n.call(t)}function mQ(e,r){const t=I4(e,"component");let n=I4(e,"pendingComponent");return r&&(n?n=n.then(r):r()),t&&n?Promise.all([t,n]).then(()=>{}):t??n}function Ch(e,r,t){const n=()=>r===!1?void 0:r?I4(e,r):mQ(e,t),s=e._lazy;if(s)return s===!0?n():s.then(n);if(!e.lazyFn)return n();const o=e.lazyFn().then(a=>{{const{id:i,...c}=a.options;Object.assign(e.options,c),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=o,o.then(n)}function Sj(e){const r=e.findIndex(t=>t.status!=="success"||t._notFound)+1;return r&&r{const s=()=>n(r);r.addEventListener("abort",s,{once:!0}),Promise.resolve(e).then(t,n).finally(()=>r.removeEventListener("abort",s))})}function _d(e,r){return e.routesById[r.routeId]}function ig(e,r,t){return D$(e)?[Ia,e]:rp(e)?(e.routeId||(e.routeId=t),[py,e]):r?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[eu,e]):[Bc,e]}function Cj(e,r){var n,s;let t=ig(r,!0,e.id);if(t[0]!==eu)return t;try{(s=(n=e.options).onError)==null||s.call(n,t[1])}catch(o){t=ig(o,!0,e.id)}return t}function qm(e,r,t,n,s){return s[0].signal.aborted?y_:Nj(e,r,t,Cj(t,n),s)}async function gQ(e,r,t,n,s,o){var d,_;const[a,i]=r,c=t[0].signal,u=!!t[3];for(let p=t[6]??0;pe.navigate({...S,_fromLocation:a}),buildLocation:e.buildLocation,cause:u?"preload":m.cause,abortController:t[0],preload:u,matches:i,routeId:k.id};try{const S=m._ctx||(m._ctx=k.options.context?k.options.context({...v,deps:m.loaderDeps,context:w})||{}:void 0);m.context={...w,...S}}catch(S){return Ql(e,m),[p,qm(e,r,k,S,t)]}if(c.aborted)return[p,y_];const b=m.paramsError??m.searchError;if(b!==void 0)return Ql(e,m),[p,qm(e,r,k,b,t)];const x=k.options.beforeLoad;if(!x)continue;const y=m.status;p>=o&&(m.status="pending",(_=t[7])==null||_.call(t));try{cg(e,m,"beforeLoad",t[0]);const S=await ud(x({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,y_];const E=Nj(e,r,k,ig(S,!1,k.id),t);if(E[0]!==Bc)return Ql(e,m),[p,E];m.context={...m.context,...S}}catch(S){return Ql(e,m),[p,qm(e,r,k,S,t)]}finally{m.status=y,cg(e,m,!1,t[0])}}s()}function zj(e,r,t){var n;if(!(!t||--t[2])){if(((n=e._flights)==null?void 0:n.get(r.id))===t){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(r)&&s[3].some(o=>o.id===r.id)&&s[3].some(o=>o.isFetching==="beforeLoad"))return;e._flights.delete(r.id)}return t[1]}}function Ql(e,r){var n;const t=r._flight;r._flight=void 0,(n=zj(e,r,t))==null||n.abort()}function ma(e,r,t,n){var o;const s=[];for(const a of r)if(!(t!=null&&t.includes(a))){const i=a._flight;if(a._flight=void 0,n&&(i==null?void 0:i[2])===1&&((o=e._flights)==null?void 0:o.get(a.id))===i&&(t!=null&&t.some(c=>c.id===a.id)))i[2]=0;else{const c=zj(e,a,i);c&&s.push(c)}}for(const a of s)a.abort()}function Ej(e){for(const r of e){const t=r._flight;t&&t[2]++}}function cg(e,r,t,n){var a;if(r.isFetching=t,n&&((a=e._tx)==null?void 0:a[0])!==n)return;const s=e.stores.byRoute.get(r.routeId),o=s==null?void 0:s.get();(o==null?void 0:o.id)===r.id&&s.set({...o,isFetching:t})}function I$(e,r,t,n,s,o,a){const i=r[0];return{params:t.params,location:i,navigate:c=>e.navigate({...c,_fromLocation:i}),cause:a?"preload":t.cause,abortController:s,preload:a,deps:t.loaderDeps,parentMatchPromise:o,context:t.context,route:n,...e.options.additionalContext}}async function c9(e,r,t,n,s,o,a){const i=a[0],c=i.signal;if(c.aborted)return y_;if(!s)return[Bc,void 0];let u=t._flight;cg(e,t,"loader",i);try{if(!u){const d=new AbortController;u=[Promise.resolve().then(()=>s(I$(e,r,t,n,d,o,!!a[3]))).then(_=>ig(_,!1,n.id),_=>ig(_,!0,n.id)).then(_=>{var p;return _[0]!==Bc&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||d.abort()),_[0]===eu&&u[2]?Cj(n,_[1]):_}),d,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],Nj(e,r,n,await ud(u[0],c),a)}catch(d){if(d!==c||!c.aborted)throw d;return Ql(e,t),y_}finally{cg(e,t,!1,i)}}function l9(e,r,t){r[0]!==Ia&&(e.status="success",e.error=void 0,r[0]===Bc?(e.loaderData=r[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function vQ(e,r,t){const n=e._cache.get(r.id);if(n!==t||e._committed.some(o=>o.id===r.id&&o._flight===r._flight))return;const s={...r,_notFound:void 0,context:{}};s._flight&&s._flight[2]++,e._cache.set(r.id,s),n&&Ql(e,n)}function u9(e,r){return r[0]===eu||r[0]===py?{...e,status:r[0]===eu?"error":"notFound",error:r[1],_flight:void 0}:e}function bQ(e,r,t,n,s,o,a){var I,G;const i=r[1][t],c=_d(e,i),u=!!o[3],d=e._cache.get(i.id);let _,p=!1,m;try{if(i.status==="success"&&(_=c.options.shouldReload,typeof _=="function"&&(_=_(I$(e,r,i,c,o[0],s,u))),o[0].signal.aborted&&(m=y_)),!m)if(i.status!=="success")p=!0;else{const F=u||i.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;p=!!(i.invalid||_||_===void 0&&Date.now()-i.updatedAt>=F&&(o[5]||i.cause==="enter"||o[2].some(Q=>Q.routeId===i.routeId&&Q.id!==i.id)))}}catch(F){i.invalid=!0,Ql(e,i),m=qm(e,r,c,F,o)}const k=c.options.loader,w=typeof k=="function",v=w?k:k==null?void 0:k.handler,b=!u||c.options.preload!==!1;let x=b&&k?(I=e._flights)==null?void 0:I.get(i.id):void 0;x===i._flight||m?x=void 0:x&&!p&&!u&&_===void 0?p=!0:p||(x=void 0);const y=!!(k&&p&&i.status==="success"&&!u&&!o[4]&&((w?void 0:k.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),S=p&&b,E=S&&!y&&(i.status!=="success"||!!k),N=t>=a?o[7]:void 0,A=c.lazyFn&&c._lazy!==!0?N:void 0;if(S&&!k&&(i.invalid=!1,i.updatedAt=Date.now()),x&&x[2]++,E){const F=i._flight;i._flight=x,(G=zj(e,i,F))==null||G.abort(),t>=a&&(i.status="pending"),N==null||N()}S||(i.isFetching=!1);const z=(m?Promise.resolve(m):E?c9(e,r,i,c,v,s,o):Promise.resolve([Bc,i.loaderData])).then(F=>(E&&(l9(i,F,u),F[0]===Bc&&(k&&!o[0].signal.aborted&&vQ(e,i,d),t>=a&&(i.status="pending"))),F)),M=ud(Promise.resolve().then(()=>Ch(c,void 0,A)),o[0].signal).then(()=>{},F=>r[1].some((Q,K)=>K<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,qm(e,r,c,F,o)]).then(F=>z.then(Q=>(E&&!F&&Q[0]===Bc&&i.status==="pending"&&!o[0].signal.aborted&&(i.status="success",N==null||N()),F)));if(n.push([t,z,M]),!y)return z.then(F=>u9(i,F));const $={...i,status:"pending",preload:!1,_flight:x};i.invalid=!1,i.isFetching="loader";const D=c9(e,r,$,c,v,s,o).then(F=>(i.isFetching=!1,l9($,F,!1),F));return(r[2]??(r[2]=[])).push([t,D,M,$]),D.then(F=>u9($,F))}async function P4(e,r,t,n,s=0){const o=t==null?void 0:t[1][1];let a=o!=null&&o.routeId?r.findIndex(i=>i.routeId===o.routeId):(t==null?void 0:t[0])??r.length-1;a<0&&(a=0);for(let i=a;i>=0;i--){const c=_d(e,r[i]);try{const u=Ch(c,!1);u&&await ud(u,n)}catch(u){if(u===n&&n.aborted)throw u}if(c.options.notFoundComponent)return i}return o!=null&&o.routeId?a:s}function Df(e,r){r[2]&&(ma(e,r[2].map(t=>t[3])),r[2]=void 0)}async function _9(e,r,t,n){let s;try{await Promise.all(e.map(o=>o[1].then(async a=>{const i=o[0];if(!(n&&i>=await n)){if(a[0]>=Ia)throw[i,a];!s&&a[0]!==Bc&&(s=[i,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=i))return c[1].then(u=>{if(u[0]===Ia)throw[c[0],u]})})))}})))}catch(o){return o}return r??s}function Nj(e,r,t,n,s,o){for(;n[0]===Ia;){const a=n[1],i=a.options;if(i.reloadDocument?s[3]:s[1]>=20)return n;try{return i.href&&i.reloadDocument?(e.resolveRedirect(a),n):[Ia,a,e.buildLocation({...i,_fromLocation:r[0],_includeValidateSearch:!0})]}catch(c){n=o?[eu,c]:Cj(t,c),o=!0}}return n}async function P$(e,r,t,n,s,o){const a=r[1];let i=await s,c=!1;const u=a.findIndex(m=>m._notFound),d=m=>m[1][0]===py?P4(e,a,m,n.signal):m[0];let _=u<0?a.length:u;if(((i==null?void 0:i[1][0])??0)>=Ia)_=0;else if(i){_=i[2]??(i[2]=await d(i));for(const m of t){if(m[0]>=_)break;const k=await m[1];if(k[0]!==Bc&&k[0]=_)break;const k=await m[2];if(k){i=k;break}}if(((i==null?void 0:i[1][0])??0)>=Ia){const m=i[1];if(m[0]!==Ia||m[1].options.reloadDocument||m[2])return Df(e,r),m;c=!0,i=[0,[eu,new Error("Too many redirects")]]}const p=i?i[2]??await d(i):u;if(p>=0){const m=i==null?void 0:i[1],k=m==null?void 0:m[0],w=a[p],v=m==null?void 0:m[1],b=()=>{m&&(w._notFound=void 0,k===eu?w.status="error":(v.routeId=w.routeId,w.routeId===e.routeTree.id?(w.status="success",w._notFound=!0):w.status="notFound"),w.error=v,w.isFetching=!1)};b(),m||o==null||o();const x=_d(e,w);try{await ud(m?Promise.resolve().then(()=>Ch(x,k===eu?"errorComponent":"notFoundComponent")):Promise.all([Ch(x),Ch(x,"notFoundComponent")]),n.signal)}catch(y){if(y===n.signal&&n.signal.aborted)return Df(e,r),y_}m?c&&(n.abort(),await Promise.all([...t.map(y=>y[1]),...t.map(y=>y[2]),...(r[2]??[]).map(y=>y[1])]),Df(e,r),ma(e,a),b()):w.status="success"}return r}async function B$(e,r,t,n=0,s=r[1].length){var a,i;const o=r[1];for(let c=n;cx._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const x=await P4(e,t,void 0,o,u);t[u]._notFound=void 0,t[x]._notFound=!0,u=x}let d=u<0?t.length:u+1,_=0;for(;_{for(let x=m;x=Ia&&(d=0);w()}if(!o.aborted&&!n[3]){const x=[];for(const[y,S]of e._flights??[])S[2]||(e._flights.delete(y),x.push(S[1]));for(const y of x)y.abort()}const b=P$(e,s,p,n[0],_9(p,v,s[2]),n[7]);(i=s[2])!=null&&i.length&&(s[3]=_9(s[2],void 0,void 0,b.then(x=>ag(x)?0:Sj(t).length,()=>0))),a=await b}catch(c){if(Df(e,s),c===o&&o.aborted)return y_;throw c}return ag(a)?a:B$(e,a,o,n[6]===t.length?n[6]:0)}function B4(e,r){var o,a;if(e._tx!==r)return;const t=r[3],n=e.stores.matches.get();let s=e._pending;for(let i=0;i0){s[3]=setTimeout(()=>B4(e,r),x);return}s[2]=0}const v=t.map(x=>({...x,_flight:void 0}));v[i].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(x=>(x&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+k),x));return}}function vm(e,r){var n;const t=e._pending;(e._tx===r||!((n=e._tx)!=null&&n[3].some(s=>s.id===(t==null?void 0:t[1]))))&&(clearTimeout(t==null?void 0:t[3]),e._pending=void 0)}async function f9(e,r){const t=e._pending;if(!t)return;clearTimeout(t[3]);const n=t[2]-Date.now();if(!t[4]||n<=0||!Sj(r[3]).some(o=>o.id===t[1]))return;let s;try{await ud(new Promise(o=>{s=setTimeout(o,n)}),r[0].signal)}catch{}clearTimeout(s)}function H$(e,r){e._committed=r,e.stores.setMatches(r)}function yQ(e,r,t,n){const s=e._committed,o=e._cache;for(const c of t)c.preload=!1,n&&(c._assetEnd=void 0);const a=Sj(t).length,i=new Map;{const c=Date.now();for(const u of[...s,...o.values()]){if(u.status!=="success"||t.some((_,p)=>_.id===u.id&&(p=(u.preload?d.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:d.options.gcTime??e.options.defaultGcTime??3e5)||i.set(u.id,o.get(u.id)===u?u:{...u,_flight:void 0,isFetching:!1,context:{}})}}r[3]=[],e._cache=i,H$(e,t),ma(e,[...o.values(),...s],[...t,...i.values()]),_Q(e,s,t,r)}async function Mv(e,r){let t=e._tx;for(;t&&t!==r;){if(await t[5],e._tx===t)return;t=e._tx}}function q$(e,r,t){const n=t[1].options,s=t[2];if(!s)return e.navigate({...n,replace:!0,ignoreBlocker:!0});if(n.reloadDocument)return e.navigate({href:s.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});s._redirects=r[1]+1,e._pendingLocation=s;const o=e.commitLocation({...s,viewTransition:n.viewTransition,replace:!0,resetScroll:n.resetScroll,hashScrollIntoView:n.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===s&&(e._pendingLocation=void 0)}),o}async function xQ(e,r,t,n,s){const o=t.map(c=>({...c}));Ej(o);for(const c of n)Ql(e,o[c[0]]),o[c[0]]=c[3];const a=[r[2],o];let i;try{i=await P$(e,a,n,r[0],s)}catch(c){throw ma(e,o),c}if(ag(i)){ma(e,o),i[0]===Ia&&e._tx===r&&e._committed===t&&await q$(e,r,i);return}if(await B$(e,i,r[0].signal),e._tx!==r||e._committed!==t){ma(e,o);return}for(const c of o){const u=e._cache.get(c.id);u!=null&&u._flight&&u._flight===c._flight&&(e._cache.delete(c.id),Ql(e,u))}H$(e,o),ma(e,t,o)}async function wQ(e,r,t,n,s,o){const a=await F$(e,r[2],r[3],[r[0],r[1],e._committed,void 0,s,t,o,n]);if(ag(a)){const _=a[0]===Ia&&e._tx===r;if((!_||a[1].options.reloadDocument)&&vm(e,r),ma(e,r[3]),r[3]=[],!_)return;if(e._tx!==r){vm(e,r);return}await q$(e,r,a);return}const i=a[1];if(e._tx===r&&await f9(e,r),e._tx!==r){vm(e,r),ma(e,i),Df(e,a);return}const c=r[2],u=hy(c,e.stores.resolvedLocation.get()),d=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===r&&await f9(e,r),e._tx!==r){vm(e,r),ma(e,i),Df(e,a);return}const _=()=>{vm(e,r),yQ(e,r,i,o),e._tx===r&&(e.emit({type:"onLoad",...u}),e._tx===r&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(_,i);if(e._tx!==r){Df(e,a);return}d!=null&&d.length&&xQ(e,r,i,d,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set("idle"),e._tx===r&&e.emit({type:"onResolved",...u}),p&&e._tx===r&&e.emit({type:"onRendered",...u})}),e._tx===r&&((m=e._commitPromise)==null||m.resolve(),e._commitPromise=void 0)})}async function kQ(e,r){var S;const t=e._tx,n=e.stores.resolvedLocation.get(),s=n??e.stores.location.get(),o=e.latestLocation,a=e._pendingLocation,i=(a==null?void 0:a.href)===o.href?a._redirects??0:0,c=e._handoff,u=c==null?void 0:c[0](),d=new AbortController,_=e._preflight;if(e._preflight=d,u||c==null||c[1](),_==null||_.abort(),!d.signal.aborted){const E=hy(o,n);e.emit({type:"onBeforeNavigate",...E}),d.signal.aborted||e.emit({type:"onBeforeLoad",...E})}if(d.signal.aborted){await Mv(e,t);return}const p=s.href===o.href;let m=d;const k=e.matchRoutes(o,{_controller:d});Ej(k);const w=u?c[1](k):void 0;if(w?m=u:u==null||u.abort(),d.signal.aborted){ma(e,k),await Mv(e,t);return}e._preflight=void 0;let v;const b=()=>wQ(e,y,p,()=>B4(e,y),r==null?void 0:r.sync,w),x=r!=null&&r.sync?new Promise(E=>v=E):Promise.resolve().then(b).then(),y=[m,i,o,k,Date.now(),x];if(e._tx=y,t){for(const E of e.stores.matches.get()){if(e._tx!==y)break;E.isFetching&&cg(e,E,!1)}t[0].abort(),ma(e,t[3],y[3],!0)}if(e._tx!==y){ma(e,y[3]),y[3]=[],v==null||v(),await Mv(e,y);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(o)}),(w||!e._committed.length&&((S=k[0])==null?void 0:S.status)!=="success"&&!k.some(E=>E._notFound))&&B4(e,y),v==null||v(b()),await x,await Mv(e,y)}async function jQ(e,r){let t=e.buildLocation(r);for(let n=0;;n++){const s=e._committed,o=new AbortController;let a,i,c;try{try{a=e.matchRoutes(t,{_controller:o}),Ej(a),i=(e._preloads??(e._preloads=new Map)).set(o,a),c=await F$(e,t,a,[o,n,s,!0])}finally{i&&(i=i.delete(o),ma(e,a)),o.abort()}if(!ag(c))return c[1];if(!i||c.length<3)return;t=c[2]}catch(u){rp(u)||console.error(u);return}}}const SQ="Error preloading route! ☝️";var U$=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=r=>{var c,u;this.originalIndex=r.originalIndex;const t=this.options,n=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(c=this.options).getParentRoute)==null?void 0:u.call(c),n?this._path=Sh:this.parentRoute||wj();let s=n?Sh:t==null?void 0:t.path;s&&s!=="/"&&(s=O$(s));const o=(t==null?void 0:t.id)||s;let a=n?Sh:E1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=E1(["/",a]));const i=a==="__root__"?"/":E1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=i,this._to=Kl(i)},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.redirect=r=>sQ({from:this.fullPath,...r}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},CQ=class extends U${constructor(e){super(e)}},Aj=class extends T.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,r){const t=e.getResetKey();return r.error&&r.resetKey!==t?{resetKey:t,error:null}:{resetKey:t}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,r){var t,n;(n=(t=this.props).onCatch)==null||n.call(t,e,r)}render(){const e=this.state.error;return e?T.createElement(this.props.errorComponent??zQ,{error:e,reset:this.reset}):this.props.children}};function zQ({error:e}){const[r,t]=T.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(n=>!n),children:r?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),r?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function EQ({children:e,fallback:r=null}){return f.jsx(st.Fragment,{children:G$()?e:r})}function G$(){return st.useSyncExternalStore(NQ,()=>!0,()=>!1)}function NQ(){return()=>{}}var W$=T.createContext(null);function Vo(e){return T.useContext(W$)}var my=T.createContext(void 0),AQ=T.createContext(void 0),On=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(On||{});function TQ({update:e,notify:r,unwatched:t}){return{link:n,unlink:s,propagate:o,checkDirty:a,shallowPropagate:i};function n(u,d,_){const p=d.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:d.deps;if(m!==void 0&&m.dep===u){m.version=_,d.depsTail=m;return}const k=u.subsTail;if(k!==void 0&&k.version===_&&k.sub===d)return;const w=d.depsTail=u.subsTail={version:_,dep:u,sub:d,prevDep:p,nextDep:m,prevSub:k,nextSub:void 0};m!==void 0&&(m.prevDep=w),p!==void 0?p.nextDep=w:d.deps=w,k!==void 0?k.nextSub=w:u.subs=w}function s(u,d=u.sub){const _=u.dep,p=u.prevDep,m=u.nextDep,k=u.nextSub,w=u.prevSub;return m!==void 0?m.prevDep=p:d.depsTail=p,p!==void 0?p.nextDep=m:d.deps=m,k!==void 0?k.prevSub=w:_.subsTail=w,w!==void 0?w.nextSub=k:(_.subs=k)===void 0&&t(_),m}function o(u){let d=u.nextSub,_;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&c(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&r(p),m&1){const k=p.subs;if(k!==void 0){const w=(u=k).nextSub;w!==void 0&&(_={value:d,prev:_},d=w);continue}}if((u=d)!==void 0){d=u.nextSub;continue}for(;_!==void 0;)if(u=_.value,_=_.prev,u!==void 0){d=u.nextSub;continue e}break}while(!0)}function a(u,d){let _,p=0,m=!1;e:do{const k=u.dep,w=k.flags;if(d.flags&16)m=!0;else if((w&17)===17){if(e(k)){const v=k.subs;v.nextSub!==void 0&&i(v),m=!0}}else if((w&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(_={value:u,prev:_}),u=k.deps,d=k,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=d.subs,b=v.nextSub!==void 0;if(b?(u=_.value,_=_.prev):u=v,m){if(e(d)){b&&i(v),d=u.sub;continue}m=!1}else d.flags&=-33;d=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return m}while(!0)}function i(u){do{const d=u.sub,_=d.flags;(_&48)===32&&(d.flags=_|16,(_&6)===2&&r(d))}while((u=u.nextSub)!==void 0)}function c(u,d){let _=d.depsTail;for(;_!==void 0;){if(_===u)return!0;_=_.prevDep}return!1}}function RQ(e,r,t){var o,a,i;const n=typeof e=="object",s=n?e:void 0;return{next:(o=n?e.next:e)==null?void 0:o.bind(s),error:(a=n?e.error:r)==null?void 0:a.bind(s),complete:(i=n?e.complete:t)==null?void 0:i.bind(s)}}const F4=[];let R1=0;const{link:d9,unlink:MQ,propagate:OQ,checkDirty:K$,shallowPropagate:h9}=TQ({update(e){return e._update()},notify(e){F4[H4++]=e,e.flags&=~On.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=On.Mutable|On.Dirty,lb(e))}});let Ov=0,H4=0,Ac,q4=0;function $Q(e){try{++q4,e()}finally{--q4||V$()}}function lb(e){const r=e.depsTail;let t=r!==void 0?r.nextDep:e.deps;for(;t!==void 0;)t=MQ(t,e)}function V$(){if(!(q4>0)){for(;Ov{var u;s.get(),i.current?(u=a.next)==null||u.call(a,s._snapshot):i.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=Ac,i=(r==null?void 0:r.compare)??Object.is;if(t)Ac=s,++R1,s.depsTail=void 0;else if(o===void 0)return!1;t&&(s.flags=On.Mutable|On.RecursedCheck);try{const c=s._snapshot,u=typeof o=="function"?o(c):o===void 0&&t?n(c):o;return c===void 0||!i(c,u)?(s._snapshot=u,!0):!1}finally{Ac=a,t&&(s.flags&=~On.RecursedCheck),lb(s)}}};return t?(s.flags=On.Mutable|On.Dirty,s.get=function(){const o=s.flags;if(o&On.Dirty||o&On.Pending&&K$(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&h9(a)}}else o&On.Pending&&(s.flags=o&~On.Pending);return Ac!==void 0&&d9(s,Ac,R1),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(OQ(a),h9(a),V$())}},s}function DQ(e){const r=()=>{const n=Ac;Ac=t,++R1,t.depsTail=void 0,t.flags=On.Watching|On.RecursedCheck;try{return e()}finally{Ac=n,t.flags&=~On.RecursedCheck,lb(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:On.Watching|On.RecursedCheck,notify(){const n=this.flags;n&On.Dirty||n&On.Pending&&K$(this.deps,this)?r():this.flags=On.Watching},stop(){this.flags=On.None,this.depsTail=void 0,lb(this)}};return r(),t}var y2={exports:{}},x2={},w2={exports:{}},k2={};/** * @license React * use-sync-external-store-shim.production.js * @@ -55,7 +55,7 @@ Error generating stack: `+j.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var m9;function LQ(){if(m9)return k2;m9=1;var e=s0();function r(_,p){return _===p&&(_!==0||1/_===1/p)||_!==_&&p!==p}var t=typeof Object.is=="function"?Object.is:r,n=e.useState,s=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function i(_,p){var m=p(),k=n({inst:{value:m,getSnapshot:p}}),x=k[0].inst,v=k[1];return o(function(){x.value=m,x.getSnapshot=p,c(x)&&v({inst:x})},[_,m,p]),s(function(){return c(x)&&v({inst:x}),_(function(){c(x)&&v({inst:x})})},[_]),a(m),m}function c(_){var p=_.getSnapshot;_=_.value;try{var m=p();return!t(_,m)}catch{return!0}}function u(_,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return k2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,k2}var g9;function IQ(){return g9||(g9=1,w2.exports=LQ()),w2.exports}/** + */var m9;function LQ(){if(m9)return k2;m9=1;var e=s0();function r(_,p){return _===p&&(_!==0||1/_===1/p)||_!==_&&p!==p}var t=typeof Object.is=="function"?Object.is:r,n=e.useState,s=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function i(_,p){var m=p(),k=n({inst:{value:m,getSnapshot:p}}),w=k[0].inst,v=k[1];return o(function(){w.value=m,w.getSnapshot=p,c(w)&&v({inst:w})},[_,m,p]),s(function(){return c(w)&&v({inst:w}),_(function(){c(w)&&v({inst:w})})},[_]),a(m),m}function c(_){var p=_.getSnapshot;_=_.value;try{var m=p();return!t(_,m)}catch{return!0}}function u(_,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return k2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,k2}var g9;function IQ(){return g9||(g9=1,w2.exports=LQ()),w2.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -63,7 +63,7 @@ Error generating stack: `+j.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var v9;function PQ(){if(v9)return x2;v9=1;var e=s0(),r=IQ();function t(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var n=typeof Object.is=="function"?Object.is:t,s=r.useSyncExternalStore,o=e.useRef,a=e.useEffect,i=e.useMemo,c=e.useDebugValue;return x2.useSyncExternalStoreWithSelector=function(u,d,_,p,m){var k=o(null);if(k.current===null){var x={hasValue:!1,value:null};k.current=x}else x=k.current;k=i(function(){function b(N){if(!w){if(w=!0,y=N,N=p(N),m!==void 0&&x.hasValue){var A=x.value;if(m(A,N))return S=A}return S=N}if(A=S,n(y,N))return A;var E=p(N);return m!==void 0&&m(A,E)?(y=N,A):(y=N,S=E)}var w=!1,y,S,z=_===void 0?null:_;return[function(){return b(d())},z===null?void 0:function(){return b(z())}]},[d,_,p,m]);var v=s(u,k[0],k[1]);return a(function(){x.hasValue=!0,x.value=v},[v]),c(v),v},x2}var b9;function BQ(){return b9||(b9=1,y2.exports=PQ()),y2.exports}var Q$=BQ();const FQ=n0(Q$);function HQ(e,r){return e===r}function qc(e,r,t=HQ){const n=T.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:i}=e.subscribe(a);return i},[e]),s=T.useCallback(()=>e==null?void 0:e.get(),[e]);return Q$.useSyncExternalStoreWithSelector(n,s,s,r,t)}var y9={};function Tj(e,r){const t=T.useRef();return n=>{const s=e!=null&&e.select?e.select(n):n;return(e==null?void 0:e.structuralSharing)??r.options.defaultStructuralSharing?t.current=bf(t.current,s):s}}function fd(e){const r=Vo(),t=T.useContext(e.from?AQ:my),n=e.from??t,s=r.stores.getMatchStore(n),o=Tj(e,r),a=qc(s,i=>i?o(i):y9);if(a!==y9)return a;(e.shouldThrow??!0)&&wj()}function X$(e){return fd({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:r=>e.select?e.select(r.loaderData):r.loaderData})}function Y$(e){const{select:r,...t}=e;return fd({...t,select:n=>r?r(n.loaderDeps):n.loaderDeps})}function Z$(e){return fd({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:r=>{const t=e.strict===!1?r.params:r._strictParams;return e.select?e.select(t):t}})}function J$(e){return fd({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:r=>e.select?e.select(r.search):r.search})}function a0(e){const r=Vo();return T.useCallback(t=>r.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,r])}function Rj(e){return fd({...e,select:r=>e.select?e.select(r.context):r.context})}function j2(e){const r=T.useRef(e);return m_(r.current,e,{ignoreUndefined:!1})||(r.current=e),r.current}function qQ(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]}function UQ(e,r,t){if(e!=null&&e.external)return sb(e.href,t)?void 0:e.href;if(!YQ(r)&&!(typeof r!="string"||r.indexOf(":")===-1))try{return new URL(r),sb(r,t)?void 0:r}catch{}}function GQ(e,r,t,n,s,o){if(o)return!1;if(t!=null&&t.exact){if(!BV(e.pathname,r.pathname,n))return!1}else{const a=ab(e.pathname,n),i=ab(r.pathname,n);if(!(a.startsWith(i)&&(a.length===i.length||a[i.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!m_(e.search,r.search,{partial:!(t!=null&&t.exact),ignoreUndefined:!(t!=null&&t.explicitUndefined)})?!1:t!=null&&t.includeHash?s&&e.hash===r.hash:!0}function WQ(e,r){const t=Vo(),n=wV(r),{activeProps:s,inactiveProps:o,activeOptions:a,to:i,preload:c,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:_,replace:p,startTransition:m,resetScroll:k,viewTransition:x,children:v,target:b,disabled:w,style:y,className:S,onClick:z,onBlur:N,onFocus:A,onMouseEnter:E,onMouseLeave:M,onTouchStart:$,ignoreBlocker:D,params:I,search:G,hash:H,state:Q,mask:K,reloadDocument:J,unsafeRelative:ee,from:P,_fromLocation:L,...F}=e,q=G$(),U=j2(e.search),oe=j2(e.params),ie=j2(a),ce=T.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,U,oe,e.state,e.mask,e.unsafeRelative]),re=T.useCallback(De=>{const ct=t.buildLocation({_fromLocation:De,...ce}),lt=XQ(ct.maskedLocation?ct.maskedLocation.publicHref:ct.publicHref,ct.maskedLocation?ct.maskedLocation.external:ct.external,t.history,w),xe=UQ(lt,i,t.protocolAllowlist);return[lt==null?void 0:lt.href,xe,GQ(De,ct,ie,t.basepath,q,xe!==void 0)]},[ie,w,q,ce,t,i]),[W,ae,le]=qc(t.stores.location,re,qQ),me=le?tp(s,{})??KQ:S2,be=le?S2:tp(o,{})??S2,Se=[S,me.className,be.className].filter(Boolean).join(" "),Be=(y||me.style||be.style)&&{...y,...me.style,...be.style},Xe=T.useRef(!1),Me=e.reloadDocument||ae||w?!1:c??t.options.defaultPreload,Fe=u??t.options.defaultPreloadDelay??0,pt=T.useCallback(()=>{t.preloadRoute(ce).catch(De=>{console.warn(De),console.warn(SQ)})},[t,ce]),Ct=T.useCallback(De=>{if(!De){C2(n);return}if(!(De.isIntersecting??Me==="intent")){De.isIntersecting===!1&&C2(n);return}if(!Fe){pt();return}Um.has(n)||Um.set(n,setTimeout(()=>{Um.delete(n),pt()},Fe))},[pt,n,Me,Fe]);xV(n,Ct,Me!=="viewport"),T.useEffect(()=>{Xe.current||Me==="render"&&(pt(),Xe.current=!0)},[pt,Me]);const Vt=De=>{const ct=De.currentTarget.getAttribute("target"),lt=b!==void 0?b:ct;!w&&!(De.metaKey||De.altKey||De.ctrlKey||De.shiftKey)&&!De.defaultPrevented&&(!lt||lt==="_self")&&De.button===0&&(De.preventDefault(),t.navigate({...ce,replace:p,resetScroll:k,hashScrollIntoView:_,startTransition:m,viewTransition:x,ignoreBlocker:D}))};if(ae)return{...F,ref:n,href:ae,...v&&{children:v},...b&&{target:b},...w&&{disabled:w},...y&&{style:y},...S&&{className:S},...z&&{onClick:z},...N&&{onBlur:N},...A&&{onFocus:A},...E&&{onMouseEnter:E},...M&&{onMouseLeave:M},...$&&{onTouchStart:$}};const Ut=()=>{Me==="intent"&&pt()},Gt=()=>{Me==="intent"&&C2(n)};return{...F,...me,...be,href:W,ref:n,onClick:th([z,Vt]),onBlur:th([N,Gt]),onFocus:th([A,Ct]),onMouseEnter:th([E,Ct]),onMouseLeave:th([M,Gt]),onTouchStart:th([$,Ut]),disabled:!!w,target:b,...Be&&{style:Be},...Se&&{className:Se},...w&&VQ,...le&&QQ}}var S2={},KQ={className:"active"},VQ={role:"link","aria-disabled":!0},QQ={"data-status":"active","aria-current":"page"},Um=new WeakMap,C2=e=>{clearTimeout(Um.get(e)),Um.delete(e)},th=e=>r=>{for(const t of e)if(t){if(r.defaultPrevented)return;t(r)}};function XQ(e,r,t,n){if(!n)return r?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function YQ(e){if(typeof e!="string")return!1;const r=e.charCodeAt(0);return r===47?e.charCodeAt(1)!==47:r===46}var gy=T.forwardRef((e,r)=>{const{_asChild:t,...n}=e,{type:s,...o}=WQ(n,r),a=typeof n.children=="function"?n.children({isActive:o["data-status"]==="active"}):n.children;if(!t){const{disabled:i,...c}=o;return T.createElement("a",c,a)}return T.createElement(t,o,a)}),ZQ=class extends U${constructor(r){super(r),this.useMatch=t=>fd({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Rj({...t,from:this.id}),this.useSearch=t=>J$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Z$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Y$({...t,from:this.id}),this.useLoaderData=t=>X$({...t,from:this.id}),this.useNavigate=()=>a0({from:this.fullPath}),this.Link=st.forwardRef((t,n)=>f.jsx(gy,{ref:n,from:this.fullPath,...t}))}};function JQ(e){return new ZQ(e)}function eX(){return e=>rX(e)}var tX=class extends CQ{constructor(e){super(e),this.useMatch=r=>fd({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Rj({...r,from:this.id}),this.useSearch=r=>J$({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Z$({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Y$({...r,from:this.id}),this.useLoaderData=r=>X$({...r,from:this.id}),this.useNavigate=()=>a0({from:this.fullPath}),this.Link=st.forwardRef((r,t)=>f.jsx(gy,{ref:t,from:this.fullPath,...r}))}};function rX(e){return new tX(e)}function Xc(e){return r=>{const t=JQ(r);return t.isRoot=!1,t}}function nX(e){const r=Vo(),t=`not-found-${qc(r.stores.location,n=>n.pathname)}-${qc(r.stores.status,n=>n)}`;return f.jsx(Aj,{getResetKey:()=>t,onCatch:(n,s)=>{var o;if(rp(n))(o=e.onCatch)==null||o.call(e,n,s);else throw n},errorComponent:({error:n})=>{var s;if(rp(n))return(s=e.fallback)==null?void 0:s.call(e,n);throw n},children:e.children})}function sX(){return f.jsx("p",{children:"Not Found"})}function uh(e){return f.jsx(f.Fragment,{children:e.children})}function eD(e,r,t){return r.options.notFoundComponent?f.jsx(r.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...t}):f.jsx(sX,{})}function vy(e,r){const t=(r==null?void 0:r.options.pendingComponent)??e.options.defaultPendingComponent;return t?f.jsx(t,{}):null}var oX=(e,r)=>e[0]===r[0]&&e[1]===r[1],tD=(e,r,t)=>!r.isRoot||r.options.shellComponent||r.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,rD=T.memo(function({routeId:r}){const t=Vo();return f.jsx(aX,{router:t,match:qc(t.stores.getMatchStore(r),n=>n)})});function aX({router:e,match:r}){var _,p;const t=e.routesById[r.routeId],n=vy(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,o=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((_=e.options.notFoundRoute)==null?void 0:_.options.component):t.options.notFoundComponent,i=r.ssr===!1||r.ssr==="data-only",c=tD(e,t,r.ssr)&&(t.options.wrapInSuspense??n??(((p=t.options.errorComponent)==null?void 0:p.preload)||i))?T.Suspense:uh,u=s?Aj:uh,d=a?nX:uh;return f.jsxs(t.isRoot?t.options.shellComponent??uh:uh,{children:[f.jsx(my.Provider,{value:r.routeId,children:f.jsx(c,{fallback:n,children:f.jsx(u,{getResetKey:()=>r,errorComponent:s,onCatch:(m,k)=>{if(rp(m))throw m.routeId??(m.routeId=r.routeId),m;o==null||o(m,k)},children:f.jsx(d,{fallback:m=>{if(m.routeId??(m.routeId=r.routeId),m.routeId!==r.routeId)throw m;return T.createElement(a,m)},children:i?f.jsx(EQ,{fallback:n,children:f.jsx(x9,{match:r})}):f.jsx(x9,{match:r})})})})}),null]})}var x9=T.memo(function({match:r}){const t=Vo(),n=r.routeId,s=t.routesById[n],o=T.useMemo(()=>{var c;const i=(c=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:c({routeId:n,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return i?JSON.stringify(i):void 0},[n,r.loaderDeps,r._strictParams,r._strictSearch,s.options.remountDeps,t.options.defaultRemountDeps]),a=T.useMemo(()=>{const i=s.options.component??t.options.defaultComponent;return i?f.jsx(i,{},o):f.jsx(lg,{})},[o,s.options.component,t.options.defaultComponent]);if(r.status==="pending"){if(t.ssr&&!tD(t,s,r.ssr))return a;if(t._tx)throw t._tx[5];return vy(t,s)}if(r.status==="notFound")return eD(t,s,r.error);if(r.status==="error")throw r.error;return a}),lg=T.memo(function(){const r=Vo(),t=T.useContext(my);let n,s,o;{const i=r.stores.getMatchStore(t);[n,s]=qc(i,c=>[!!c._notFound,c.error],oX),o=qc(r.stores.ids,c=>c[c.indexOf(t)+1])}if(n)return eD(r,r.routesById[t],s);if(!o)return null;const a=f.jsx(rD,{routeId:o});return t===Sh?f.jsx(T.Suspense,{fallback:vy(r),children:a}):a});function nD(e,r){const t=e[1];e.length=0,t==null||t(r)}function iX({t:e}){const r=Vo(),t=r._rendered??(r._rendered=[]);return r.startTransition=(n,s)=>new Promise(o=>{nD(t,!1),t.push(s,o),e(r),T.startTransition(n)}),C$(()=>{const n=r.history.subscribe(r.load);r.updateLatestLocation();const s=r.latestLocation,o=r.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Kl(s.publicHref)!==Kl(o.publicHref))return r.commitLocation({...o,replace:!0,ignoreBlocker:!0}),n;const a=r.stores.resolvedLocation.get();return(a==null?void 0:a.href)===s.href&&a.state.__TSR_key===s.state.__TSR_key?t.push(r.stores.matches.get(),i=>{i&&r.emit({type:"onRendered",...hy(a,a)})}):r._tx||r.load({sync:!0}).catch(console.error),n},[r,r.history]),null}function cX(){const e=Vo(),r=e.routesById[Sh],t=vy(e,r),n=e.ssr?uh:T.Suspense,s=f.jsxs(f.Fragment,{children:[f.jsx(iX,{t:T.useState()[1]}),f.jsx(n,{fallback:t,children:f.jsx(lX,{})})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:s}):s}function lX(){const e=Vo(),r=e._rendered,t=qc(e.stores.matches,a=>r[0]??a),n=t[0],s=n==null?void 0:n.routeId;C$(()=>{r[0]===t&&nD(r,!0)},[r,t]);const o=s?f.jsx(rD,{routeId:s}):null;return f.jsx(my.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?o:f.jsx(Aj,{getResetKey:()=>n,onCatch:void 0,children:o})})}var uX=e=>({createMutableStore:p9,createReadonlyStore:p9,batch:$Q}),_X=e=>new fX(e),fX=class extends fQ{constructor(e){super(e,uX)}};function dX({router:e,children:r,...t}){E$(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const n=f.jsx(W$.Provider,{value:e,children:r});return e.options.Wrap?f.jsx(e.options.Wrap,{children:n}):n}function hX({router:e,...r}){return f.jsx(dX,{router:e,...r,children:f.jsx(cX,{})})}function pX(e,r){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function")return{shouldBlockFn:async()=>await e(),enableBeforeUnload:!0,withResolver:!1};const t=!!(e.condition??!0),n=e.blockerFn;return{shouldBlockFn:async()=>t&&n!==void 0?await n():t,enableBeforeUnload:t,withResolver:n===void 0}}function mX(e,r){const{shouldBlockFn:t,enableBeforeUnload:n=!0,disabled:s=!1,withResolver:o=!1}=pX(e),a=Vo(),{history:i}=a,[c,u]=T.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return T.useEffect(()=>{const d=async _=>{function p(b){const w=a.parseLocation(b),[,y,S]=a.getMatchedRoutes(w.pathname);return S===void 0?{routeId:"__notFound__",fullPath:w.pathname,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}:{routeId:S.id,fullPath:S.fullPath,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}}const m=p(_.currentLocation),k=p(_.nextLocation);if(m.routeId==="__notFound__"&&k.routeId!=="__notFound__")return!1;const x=await t({action:_.action,current:m,next:k});if(!o)return x;if(!x)return!1;const v=await new Promise(b=>{u({status:"blocked",current:m,next:k,action:_.action,proceed:()=>b(!1),reset:()=>b(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return s?void 0:i.block({blockerFn:d,enableBeforeUnload:n})},[t,n,s,o,i,a]),c}function sD(e){const r=Vo({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||r;return qc(t.stores.__store,Tj(e,t))}function gX(e){const r=Vo();return qc(r.stores.location,Tj(e,r))}const ub=new WeakMap,M1=new WeakMap;function yi(e,r,t="*"){var n;for(const s of e.getQueryCache().findAll({queryKey:r}))ub.set(s,(ub.get(s)??0)+1),(n=M1.get(s))==null||n.add(t)}function i0(e,r,t,n=!0){if(!r)return e;const s=new Map(r.map(c=>[c.id,c])),o=new Set(e.map(c=>c.id)),a=r.filter(c=>t.has(c.id)&&!o.has(c.id)),i=e.filter(c=>!t.has(c.id)||s.has(c.id)).map(c=>t.has(c.id)?s.get(c.id)??c:c);return n?[...a,...i]:[...i,...a]}async function vp(e,r,t,n=(s,o)=>o??s){const s=e.getQueryCache().find({queryKey:r,exact:!0}),o=s?ub.get(s):void 0,a=await t();if(!s||ub.get(s)===o||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:r,exact:!0})!==s)return a;e.setQueryData(r,c=>c??a);const i=new Set;M1.set(s,i);try{const c=await t();return i.size?n(c,e.getQueryData(r),i):c}finally{M1.get(s)===i&&M1.delete(s)}}const np=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function oD(e){const r=e.queryKey[2];if(r==="resolvedFile")return np(e.queryKey[7]);const t=r==="getProjectFile"?e.queryKey[5]:r==="getCodeTree"?e.queryKey[4]:null;return typeof t=="object"&&t!==null&&"ref"in t&&np(t.ref)}function $a(e,r=Si(),t,n=!1){if(!Wr(r))return;const s={queryKey:r,predicate:o=>e.includes(String(o.queryKey[2]))&&!oD(o)&&(!t||t(o))};n?Je.cancelQueries(s).then(()=>{Wr(r)&&Je.invalidateQueries(s)}):Je.invalidateQueries(s)}const aD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],Mj=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],vX=["listProjects","listProjectActivity","listSidebarChatSessions","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...Mj,...aD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function bX(e,r=Si(),t=!1){const n=Je.getQueryData([...r,"listChatSessions",e])??[],s=Je.getQueryData([...r,"listRuns",e])??[],o=Je.getQueryData([...r,"listExperiments",e])??[];$a([...aD,...Mj,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],r,a=>{const i=a.queryKey[2];return i==="getRunDiff"?s.some(c=>c.id===a.queryKey[3]):i==="getExperimentDiff"?o.some(c=>c.id===a.queryKey[3]):i==="getSessionWorktree"?n.some(c=>c.id===a.queryKey[3]):i==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function by(e){const r=Si();Pc.add(e),yi(Je,[...r,"listChatSessions"],e),Je.setQueriesData({queryKey:[...r,"listChatSessions"]},t=>t==null?void 0:t.filter(n=>n.id!==e));for(const t of["getChatMessages","getSessionWorktree"])xj({queryKey:[...r,t,e]})}function yX(e){const r=Si(),t=Je.getQueryData([...r,"listChatSessions",e]);for(const n of t??[])by(n.id);xj({queryKey:r,predicate:n=>n.queryKey.slice(3).includes(e)})}const xX={hf:["getHfSettings","getComputeSettings","getEnvVars"],tinker:["getTinkerSettings","getComputeSettings","getEnvVars"],k8s:["getK8sSettings","getComputeSettings"],modal:["getModalSettings","getComputeSettings","getEnvVars"],slurm:["getSlurmSettings","getComputeSettings"],ray:["getRaySettings","getComputeSettings"],env:["getEnvVars","getHfSettings","getTinkerSettings","getModalSettings","getSlurmSettings","getRaySettings","getK8sSettings","getOpenResearchSettings","getComputeSettings","getHarnesses"],"data-dir":["getDataDir"],ssh:["getSshSettings","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function wX(e,r){var a;if(!Wr(r))return;const t=(i,c=r,u)=>$a(i,c,u,!0),n=e.split("?")[0];if(/\/(ui-state|open|reveal|prewarm|validate|preflight)$/.test(n))return;const s=(a=/^\/api\/settings\/([^/]+)/.exec(n))==null?void 0:a[1];if(s){t(xX[s]??[],r);return}if(n.startsWith("/api/local-models")&&!/\/(discover|check)$/.test(n)){t(["getLocalModels","getHarnesses"],r);return}if(n==="/api/user-skills"){t(["listUserSkills","getSkills","getSkillContent"],r);return}if(n==="/api/latex-templates"){t(["listLatexTemplates"],r);return}if(n==="/api/overleaf/token"){t(["getOverleafSettings","getOverleafState","getOverleafStatus"],r);return}if(n.startsWith("/api/update/")){t(["getUpdateStatus","getLocalMachine"],r);return}if(n.startsWith("/api/remote/")||n.startsWith("/_orx/")){t(["listRemoteSessions"],r),Je.invalidateQueries({queryKey:["gateway","runtime"]});return}if(n.startsWith("/api/chat/")){t(["listSidebarChatSessions"],r),n==="/api/chat/sessions"&&t(["getProjectStarterPrompts","listProjectActivity"],r);return}const o=/^\/api\/projects\/([^/]+)(.*)$/.exec(n);if(o){const[,i,c]=o;if(c.startsWith("/file")){bX(i,r,!0);return}t(["listProjects","listProjectActivity","listSidebarChatSessions"],r),t(["getProjectGitStatus","getCodeTree","getProjectStarterPrompts"],r,u=>u.queryKey[3]===i);return}(n==="/api/projects"||n==="/api/onboarding/complete")&&t(["listProjects","listProjectActivity","getUiState","getProfile"],r)}const kX={},jX="en",Oj=["en","zh-CN","fa","ar","es","hi","ko","ja","pl"],iD="orx:locale",$j=["localStorage","preferredLanguage","baseLocale"],w9=[],ug=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let k9=!1,C=()=>{var t;let e=$j;!ug&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=uD(window.location.href));const r=SX(e);if(r)return k9||(k9=!0,cD(r,{reload:!1})),r;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function SX(e,r){let t;for(const n of e){if(n==="baseLocale")t=jX;else if(n==="preferredLanguage"&&!ug)t=AX();else if(n==="localStorage"&&!ug)t=localStorage.getItem(iD)??void 0;else if(_D(n)&&_b.has(n)){const o=_b.get(n);if(o){const a=o.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return EX(a)}}const s=_g(t);if(s)return s}}const CX=e=>{window.location.reload()};let cD=(e,r)=>{var i;const t={reload:!0,...r};let n;try{n=C()}catch{}const s=[];let o=$j;!ug&&typeof window<"u"&&((i=window.location)!=null&&i.href)&&(o=uD(window.location.href));for(const c of o)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(iD,e);else if(_D(c)&&_b.has(c)){const u=_b.get(c);if(u){let d=u.setLocale(e);d instanceof Promise&&(d=d.catch(_=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:_})}),s.push(d))}}}const a=()=>{!ug&&t.reload&&window.location&&e!==n&&CX()};if(s.length)return Promise.all(s).then(()=>{a()});a()},zX=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function _g(e){if(typeof e!="string")return;const r=e.toLowerCase();for(const t of Oj)if(t.toLowerCase()===r)return t}function lD(e){return!!e&&Oj.some(r=>r===e)}function EX(e){const r=_g(e);if(r)return r;throw new Error(`Invalid locale: ${e}. Expected one of: ${Oj.join(", ")}`)}function NX(e,r){return e.exec(r.href)}function AX(){var r;if(!((r=navigator==null?void 0:navigator.languages)!=null&&r.length))return;const e=navigator.languages.map(t=>({fullTag:t,baseTag:t.split("-")[0]}));for(const t of e){const n=_g(t.fullTag);if(n)return n;const s=_g(t.baseTag);if(s)return s}}function TX(e){return RX(e)}function RX(e){const r=typeof e=="string"?new URL(e,zX()):new URL(e),t=r.pathname.split("/").filter(Boolean);return t.length>0&&_g(t[0])&&(r.pathname="/"+t.slice(1).join("/")),r}let j9,S9;function MX(e){if(w9.length===0)return;const r=typeof e=="string"?e:e.href;if(j9===r)return S9;const t=new URL(r,"http://example.com"),n=TX(t),s=n.href===t.href?[t]:[t,n];let o;for(const a of s){for(const i of w9){const c=new kX(i.match,a.href);if(NX(c,a)){o=i;break}}if(o)break}return j9=r,S9=o,o}function uD(e){const r=MX(e);return r&&r.exclude!==!0&&Array.isArray(r.strategy)?r.strategy:$j}const _b=new Map;function _D(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const OX=e=>`Actions for ${e==null?void 0:e.name}`,$X=e=>`${e==null?void 0:e.name} 的操作`,DX=e=>`عملیات ${e==null?void 0:e.name}`,LX=e=>`إجراءات ${e==null?void 0:e.name}`,IX=e=>`Acciones para ${e==null?void 0:e.name}`,PX=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,BX=e=>`${e==null?void 0:e.name} 작업`,FX=e=>`${e==null?void 0:e.name} の操作`,HX=e=>`Operacje na elemencie ${e==null?void 0:e.name}`,qX=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?$X(e):t==="fa"?DX(e):t==="ar"?LX(e):t==="es"?IX(e):t==="hi"?PX(e):t==="ko"?BX(e):t==="ja"?FX(e):t==="pl"?HX(e):OX(e)}),UX=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,GX=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,WX=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,KX=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,VX=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,QX=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,XX=e=>`${e==null?void 0:e.path} — Space로 미리보기; 더블 클릭하거나 Enter를 눌러 탭에서 열린 상태 유지`,YX=e=>`${e==null?void 0:e.path} — Space でプレビュー。ダブルクリックまたは Enter でタブを開いたままにする`,ZX=e=>`${e==null?void 0:e.path} — naciśnij spację, aby wyświetlić podgląd; kliknij dwukrotnie lub naciśnij Enter, aby pozostawić kartę otwartą`,JX=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?GX(e):t==="fa"?WX(e):t==="ar"?KX(e):t==="es"?VX(e):t==="hi"?QX(e):t==="ko"?XX(e):t==="ja"?YX(e):t==="pl"?ZX(e):UX(e)}),eY=e=>`Branch: ${e==null?void 0:e.branch}`,tY=e=>`分支:${e==null?void 0:e.branch}`,rY=e=>`شاخه: ${e==null?void 0:e.branch}`,nY=e=>`الفرع: ${e==null?void 0:e.branch}`,sY=e=>`Rama: ${e==null?void 0:e.branch}`,oY=e=>`ब्रांच: ${e==null?void 0:e.branch}`,aY=e=>`브랜치: ${e==null?void 0:e.branch}`,iY=e=>`ブランチ: ${e==null?void 0:e.branch}`,cY=e=>`Gałąź: ${e==null?void 0:e.branch}`,lY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?tY(e):t==="fa"?rY(e):t==="ar"?nY(e):t==="es"?sY(e):t==="hi"?oY(e):t==="ko"?aY(e):t==="ja"?iY(e):t==="pl"?cY(e):eY(e)}),uY=e=>`Browse code on ${e==null?void 0:e.branch}`,_Y=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,fY=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,dY=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,hY=e=>`Explorar el código en ${e==null?void 0:e.branch}`,pY=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,mY=e=>`${e==null?void 0:e.branch}의 코드 탐색`,gY=e=>`${e==null?void 0:e.branch} のコードを閲覧`,vY=e=>`Przeglądaj kod gałęzi ${e==null?void 0:e.branch}`,fD=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?_Y(e):t==="fa"?fY(e):t==="ar"?dY(e):t==="es"?hY(e):t==="hi"?pY(e):t==="ko"?mY(e):t==="ja"?gY(e):t==="pl"?vY(e):uY(e)}),bY=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,yY=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,xY=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,wY=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,kY=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,jY=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,SY=e=>`이 채팅의 에이전트 환경 및 모델: ${e==null?void 0:e.label}`,CY=e=>`このチャットのエージェント環境とモデル: ${e==null?void 0:e.label}`,zY=e=>`Środowisko agenta i model dla tego czatu: ${e==null?void 0:e.label}`,EY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yY(e):t==="fa"?xY(e):t==="ar"?wY(e):t==="es"?kY(e):t==="hi"?jY(e):t==="ko"?SY(e):t==="ja"?CY(e):t==="pl"?zY(e):bY(e)}),NY=e=>`Collapse ${e==null?void 0:e.name}`,AY=e=>`折叠 ${e==null?void 0:e.name}`,TY=e=>`بستن ${e==null?void 0:e.name}`,RY=e=>`طيّ ${e==null?void 0:e.name}`,MY=e=>`Contraer ${e==null?void 0:e.name}`,OY=e=>`${e==null?void 0:e.name} समेटें`,$Y=e=>`${e==null?void 0:e.name} 접기`,DY=e=>`${e==null?void 0:e.name} を折りたたむ`,LY=e=>`Zwiń ${e==null?void 0:e.name}`,IY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?AY(e):t==="fa"?TY(e):t==="ar"?RY(e):t==="es"?MY(e):t==="hi"?OY(e):t==="ko"?$Y(e):t==="ja"?DY(e):t==="pl"?LY(e):NY(e)}),PY=e=>`Committed changes versus ${e==null?void 0:e.parent}`,BY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,FY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,HY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,qY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,UY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,GY=e=>`${e==null?void 0:e.parent} 대비 커밋된 변경 사항`,WY=e=>`${e==null?void 0:e.parent} に対するコミット済みの変更`,KY=e=>`Zatwierdzone zmiany względem ${e==null?void 0:e.parent}`,VY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?BY(e):t==="fa"?FY(e):t==="ar"?HY(e):t==="es"?qY(e):t==="hi"?UY(e):t==="ko"?GY(e):t==="ja"?WY(e):t==="pl"?KY(e):PY(e)}),QY=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,XY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,YY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,ZY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,JY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,eZ=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,tZ=e=>`${e==null?void 0:e.parent} 대비 커밋된 변경 사항 (차이가 잘렸으며 개수는 최솟값입니다)`,rZ=e=>`${e==null?void 0:e.parent} に対するコミット済みの変更(差分は省略されており、件数は下限値です)`,nZ=e=>`Zatwierdzone zmiany względem ${e==null?void 0:e.parent} (diff został ucięty, liczniki podają wartości minimalne)`,sZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?XY(e):t==="fa"?YY(e):t==="ar"?ZY(e):t==="es"?JY(e):t==="hi"?eZ(e):t==="ko"?tZ(e):t==="ja"?rZ(e):t==="pl"?nZ(e):QY(e)}),oZ=e=>`Copy ${e==null?void 0:e.value}`,aZ=e=>`复制 ${e==null?void 0:e.value}`,iZ=e=>`کپی ${e==null?void 0:e.value}`,cZ=e=>`نسخ ${e==null?void 0:e.value}`,lZ=e=>`Copiar ${e==null?void 0:e.value}`,uZ=e=>`${e==null?void 0:e.value} कॉपी करें`,_Z=e=>`${e==null?void 0:e.value} 복사`,fZ=e=>`${e==null?void 0:e.value} をコピー`,dZ=e=>`Kopiuj ${e==null?void 0:e.value}`,hZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?aZ(e):t==="fa"?iZ(e):t==="ar"?cZ(e):t==="es"?lZ(e):t==="hi"?uZ(e):t==="ko"?_Z(e):t==="ja"?fZ(e):t==="pl"?dZ(e):oZ(e)}),pZ=e=>`Delete ${e==null?void 0:e.name}`,mZ=e=>`删除 ${e==null?void 0:e.name}`,gZ=e=>`حذف ${e==null?void 0:e.name}`,vZ=e=>`حذف ${e==null?void 0:e.name}`,bZ=e=>`Eliminar ${e==null?void 0:e.name}`,yZ=e=>`${e==null?void 0:e.name} हटाएं`,xZ=e=>`${e==null?void 0:e.name} 삭제`,wZ=e=>`${e==null?void 0:e.name} を削除`,kZ=e=>`Usuń ${e==null?void 0:e.name}`,C9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mZ(e):t==="fa"?gZ(e):t==="ar"?vZ(e):t==="es"?bZ(e):t==="hi"?yZ(e):t==="ko"?xZ(e):t==="ja"?wZ(e):t==="pl"?kZ(e):pZ(e)}),jZ=e=>`Download ${e==null?void 0:e.name}`,SZ=e=>`下载 ${e==null?void 0:e.name}`,CZ=e=>`بارگیری ${e==null?void 0:e.name}`,zZ=e=>`تنزيل ${e==null?void 0:e.name}`,EZ=e=>`Descargar ${e==null?void 0:e.name}`,NZ=e=>`${e==null?void 0:e.name} डाउनलोड करें`,AZ=e=>`${e==null?void 0:e.name} 다운로드`,TZ=e=>`${e==null?void 0:e.name} をダウンロード`,RZ=e=>`Pobierz ${e==null?void 0:e.name}`,fb=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?SZ(e):t==="fa"?CZ(e):t==="ar"?zZ(e):t==="es"?EZ(e):t==="hi"?NZ(e):t==="ko"?AZ(e):t==="ja"?TZ(e):t==="pl"?RZ(e):jZ(e)}),MZ=e=>`Expand ${e==null?void 0:e.name}`,OZ=e=>`展开 ${e==null?void 0:e.name}`,$Z=e=>`باز کردن ${e==null?void 0:e.name}`,DZ=e=>`توسيع ${e==null?void 0:e.name}`,LZ=e=>`Expandir ${e==null?void 0:e.name}`,IZ=e=>`${e==null?void 0:e.name} फैलाएं`,PZ=e=>`${e==null?void 0:e.name} 펼치기`,BZ=e=>`${e==null?void 0:e.name} を展開`,FZ=e=>`Rozwiń ${e==null?void 0:e.name}`,HZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?OZ(e):t==="fa"?$Z(e):t==="ar"?DZ(e):t==="es"?LZ(e):t==="hi"?IZ(e):t==="ko"?PZ(e):t==="ja"?BZ(e):t==="pl"?FZ(e):MZ(e)}),qZ=e=>`Hide additional ${e==null?void 0:e.target}`,UZ=e=>`隐藏其余${e==null?void 0:e.target}`,GZ=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,WZ=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,KZ=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,VZ=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,QZ=e=>`추가 ${e==null?void 0:e.target} 숨기기`,XZ=e=>`追加の ${e==null?void 0:e.target} を非表示`,YZ=e=>`Ukryj dodatkowe ${e==null?void 0:e.target}`,ZZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?UZ(e):t==="fa"?GZ(e):t==="ar"?WZ(e):t==="es"?KZ(e):t==="hi"?VZ(e):t==="ko"?QZ(e):t==="ja"?XZ(e):t==="pl"?YZ(e):qZ(e)}),JZ=e=>`Hide error details for ${e==null?void 0:e.activity}`,eJ=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,tJ=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,rJ=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,nJ=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,sJ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,oJ=e=>`${e==null?void 0:e.activity} 오류 상세 정보 숨기기`,aJ=e=>`${e==null?void 0:e.activity} のエラー詳細を非表示`,iJ=e=>`Ukryj szczegóły błędu działania ${e==null?void 0:e.activity}`,cJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?eJ(e):t==="fa"?tJ(e):t==="ar"?rJ(e):t==="es"?nJ(e):t==="hi"?sJ(e):t==="ko"?oJ(e):t==="ja"?aJ(e):t==="pl"?iJ(e):JZ(e)}),lJ=e=>`${e==null?void 0:e.count} consecutive identical calls`,uJ=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,_J=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,fJ=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,dJ=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,hJ=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,pJ=e=>`동일한 호출 ${e==null?void 0:e.count}회 연속`,mJ=e=>`同一の呼び出しが ${e==null?void 0:e.count} 回連続`,gJ=e=>`Kolejne identyczne wywołania: ${e==null?void 0:e.count}`,vJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?uJ(e):t==="fa"?_J(e):t==="ar"?fJ(e):t==="es"?dJ(e):t==="hi"?hJ(e):t==="ko"?pJ(e):t==="ja"?mJ(e):t==="pl"?gJ(e):lJ(e)}),bJ=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,yJ=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,xJ=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,wJ=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,kJ=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,jJ=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,SJ=e=>`${e==null?void 0:e.name} — 더블 클릭하거나 Enter를 눌러 열린 상태 유지`,CJ=e=>`${e==null?void 0:e.name} — ダブルクリックまたは Enter で開いたままにする`,zJ=e=>`${e==null?void 0:e.name} — kliknij dwukrotnie lub naciśnij Enter, aby pozostawić otwarte`,EJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yJ(e):t==="fa"?xJ(e):t==="ar"?wJ(e):t==="es"?kJ(e):t==="hi"?jJ(e):t==="ko"?SJ(e):t==="ja"?CJ(e):t==="pl"?zJ(e):bJ(e)}),NJ=e=>`Open ${e==null?void 0:e.branch} on GitHub`,AJ=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,TJ=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,RJ=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,MJ=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,OJ=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,$J=e=>`GitHub에서 ${e==null?void 0:e.branch} 열기`,DJ=e=>`GitHub で ${e==null?void 0:e.branch} を開く`,LJ=e=>`Otwórz gałąź ${e==null?void 0:e.branch} w GitHubie`,dD=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?AJ(e):t==="fa"?TJ(e):t==="ar"?RJ(e):t==="es"?MJ(e):t==="hi"?OJ(e):t==="ko"?$J(e):t==="ja"?DJ(e):t==="pl"?LJ(e):NJ(e)}),IJ=e=>`Open experiment ${e==null?void 0:e.name}`,PJ=e=>`打开实验 ${e==null?void 0:e.name}`,BJ=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,FJ=e=>`فتح التجربة ${e==null?void 0:e.name}`,HJ=e=>`Abrir el experimento ${e==null?void 0:e.name}`,qJ=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,UJ=e=>`실험 ${e==null?void 0:e.name} 열기`,GJ=e=>`実験 ${e==null?void 0:e.name} を開く`,WJ=e=>`Otwórz eksperyment ${e==null?void 0:e.name}`,KJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?PJ(e):t==="fa"?BJ(e):t==="ar"?FJ(e):t==="es"?HJ(e):t==="hi"?qJ(e):t==="ko"?UJ(e):t==="ja"?GJ(e):t==="pl"?WJ(e):IJ(e)}),VJ=e=>`Open ${e==null?void 0:e.path} in the right pane`,QJ=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,XJ=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,YJ=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,ZJ=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,JJ=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,eee=e=>`오른쪽 패널에서 ${e==null?void 0:e.path} 열기`,tee=e=>`右側のペインで ${e==null?void 0:e.path} を開く`,ree=e=>`Otwórz ${e==null?void 0:e.path} w prawym panelu`,nee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?QJ(e):t==="fa"?XJ(e):t==="ar"?YJ(e):t==="es"?ZJ(e):t==="hi"?JJ(e):t==="ko"?eee(e):t==="ja"?tee(e):t==="pl"?ree(e):VJ(e)}),see=e=>`Open logs for run ${e==null?void 0:e.run}`,oee=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,aee=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,iee=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,cee=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,lee=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,uee=e=>`실행 ${e==null?void 0:e.run}의 로그 열기`,_ee=e=>`実行 ${e==null?void 0:e.run} のログを開く`,fee=e=>`Otwórz logi uruchomienia ${e==null?void 0:e.run}`,dee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?oee(e):t==="fa"?aee(e):t==="ar"?iee(e):t==="es"?cee(e):t==="hi"?lee(e):t==="ko"?uee(e):t==="ja"?_ee(e):t==="pl"?fee(e):see(e)}),hee=e=>`Open ${e==null?void 0:e.name} on GitHub`,pee=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,mee=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,gee=e=>`فتح ${e==null?void 0:e.name} على GitHub`,vee=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,bee=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,yee=e=>`GitHub에서 ${e==null?void 0:e.name} 열기`,xee=e=>`GitHub で ${e==null?void 0:e.name} を開く`,wee=e=>`Otwórz ${e==null?void 0:e.name} w GitHubie`,U4=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?pee(e):t==="fa"?mee(e):t==="ar"?gee(e):t==="es"?vee(e):t==="hi"?bee(e):t==="ko"?yee(e):t==="ja"?xee(e):t==="pl"?wee(e):hee(e)}),kee=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,jee=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,See=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,Cee=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,zee=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,Eee=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,Nee=e=>`오른쪽 패널에서 실행 ${e==null?void 0:e.id}의 로그 열기`,Aee=e=>`右側のペインで実行 ${e==null?void 0:e.id} のログを開く`,Tee=e=>`Otwórz logi uruchomienia ${e==null?void 0:e.id} w prawym panelu`,Ree=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?jee(e):t==="fa"?See(e):t==="ar"?Cee(e):t==="es"?zee(e):t==="hi"?Eee(e):t==="ko"?Nee(e):t==="ja"?Aee(e):t==="pl"?Tee(e):kee(e)}),Mee=e=>`Overleaf — ${e==null?void 0:e.status}`,Oee=e=>`Overleaf — ${e==null?void 0:e.status}`,$ee=e=>`Overleaf — ${e==null?void 0:e.status}`,Dee=e=>`Overleaf — ${e==null?void 0:e.status}`,Lee=e=>`Overleaf — ${e==null?void 0:e.status}`,Iee=e=>`Overleaf — ${e==null?void 0:e.status}`,Pee=e=>`Overleaf — ${e==null?void 0:e.status}`,Bee=e=>`Overleaf — ${e==null?void 0:e.status}`,Fee=e=>`Overleaf — ${e==null?void 0:e.status}`,Hee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Oee(e):t==="fa"?$ee(e):t==="ar"?Dee(e):t==="es"?Lee(e):t==="hi"?Iee(e):t==="ko"?Pee(e):t==="ja"?Bee(e):t==="pl"?Fee(e):Mee(e)}),qee=e=>`Preview /${e==null?void 0:e.name} skill`,Uee=e=>`预览 /${e==null?void 0:e.name} 技能`,Gee=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,Wee=e=>`معاينة مهارة /${e==null?void 0:e.name}`,Kee=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,Vee=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,Qee=e=>`/${e==null?void 0:e.name} 스킬 미리보기`,Xee=e=>`/${e==null?void 0:e.name} スキルをプレビュー`,Yee=e=>`Podgląd umiejętności /${e==null?void 0:e.name}`,Zee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Uee(e):t==="fa"?Gee(e):t==="ar"?Wee(e):t==="es"?Kee(e):t==="hi"?Vee(e):t==="ko"?Qee(e):t==="ja"?Xee(e):t==="pl"?Yee(e):qee(e)}),Jee=e=>`Remove annotation ${e==null?void 0:e.number}`,ete=e=>`移除批注 ${e==null?void 0:e.number}`,tte=e=>`حذف یادداشت ${e==null?void 0:e.number}`,rte=e=>`إزالة التعليق ${e==null?void 0:e.number}`,nte=e=>`Quitar la anotación ${e==null?void 0:e.number}`,ste=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,ote=e=>`주석 ${e==null?void 0:e.number} 제거`,ate=e=>`注釈 ${e==null?void 0:e.number} を削除`,ite=e=>`Usuń adnotację ${e==null?void 0:e.number}`,cte=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ete(e):t==="fa"?tte(e):t==="ar"?rte(e):t==="es"?nte(e):t==="hi"?ste(e):t==="ko"?ote(e):t==="ja"?ate(e):t==="pl"?ite(e):Jee(e)}),lte=e=>`Remove ${e==null?void 0:e.name}`,ute=e=>`移除 ${e==null?void 0:e.name}`,_te=e=>`حذف ${e==null?void 0:e.name}`,fte=e=>`إزالة ${e==null?void 0:e.name}`,dte=e=>`Quitar ${e==null?void 0:e.name}`,hte=e=>`${e==null?void 0:e.name} हटाएं`,pte=e=>`${e==null?void 0:e.name} 제거`,mte=e=>`${e==null?void 0:e.name} を削除`,gte=e=>`Usuń ${e==null?void 0:e.name}`,vte=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ute(e):t==="fa"?_te(e):t==="ar"?fte(e):t==="es"?dte(e):t==="hi"?hte(e):t==="ko"?pte(e):t==="ja"?mte(e):t==="pl"?gte(e):lte(e)}),bte=e=>`Remove queued message: ${e==null?void 0:e.text}`,yte=e=>`移除排队消息:${e==null?void 0:e.text}`,xte=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,wte=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,kte=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,jte=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,Ste=e=>`대기 메시지 제거: ${e==null?void 0:e.text}`,Cte=e=>`待機中のメッセージを削除: ${e==null?void 0:e.text}`,zte=e=>`Usuń wiadomość z kolejki: ${e==null?void 0:e.text}`,Ete=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yte(e):t==="fa"?xte(e):t==="ar"?wte(e):t==="es"?kte(e):t==="hi"?jte(e):t==="ko"?Ste(e):t==="ja"?Cte(e):t==="pl"?zte(e):bte(e)}),Nte=e=>`Retry queued message: ${e==null?void 0:e.text}`,Ate=e=>`重试排队消息:${e==null?void 0:e.text}`,Tte=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,Rte=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,Mte=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,Ote=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,$te=e=>`대기 메시지 다시 시도: ${e==null?void 0:e.text}`,Dte=e=>`待機中のメッセージを再試行: ${e==null?void 0:e.text}`,Lte=e=>`Ponów wiadomość z kolejki: ${e==null?void 0:e.text}`,Ite=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Ate(e):t==="fa"?Tte(e):t==="ar"?Rte(e):t==="es"?Mte(e):t==="hi"?Ote(e):t==="ko"?$te(e):t==="ja"?Dte(e):t==="pl"?Lte(e):Nte(e)}),Pte=e=>`Run ${e==null?void 0:e.value} in a terminal here`,Bte=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,Fte=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,Hte=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,qte=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,Ute=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,Gte=e=>`여기 터미널에서 ${e==null?void 0:e.value} 실행`,Wte=e=>`ここにあるターミナルで ${e==null?void 0:e.value} を実行`,Kte=e=>`Uruchom ${e==null?void 0:e.value} w terminalu tutaj`,z9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Bte(e):t==="fa"?Fte(e):t==="ar"?Hte(e):t==="es"?qte(e):t==="hi"?Ute(e):t==="ko"?Gte(e):t==="ja"?Wte(e):t==="pl"?Kte(e):Pte(e)}),Vte=e=>`Run ${e==null?void 0:e.id}`,Qte=e=>`运行 ${e==null?void 0:e.id}`,Xte=e=>`اجرای ${e==null?void 0:e.id}`,Yte=e=>`تشغيل ${e==null?void 0:e.id}`,Zte=e=>`Ejecución ${e==null?void 0:e.id}`,Jte=e=>`रन ${e==null?void 0:e.id}`,ere=e=>`실행 ${e==null?void 0:e.id}`,tre=e=>`実行 ${e==null?void 0:e.id}`,rre=e=>`Uruchomienie ${e==null?void 0:e.id}`,nre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Qte(e):t==="fa"?Xte(e):t==="ar"?Yte(e):t==="es"?Zte(e):t==="hi"?Jte(e):t==="ko"?ere(e):t==="ja"?tre(e):t==="pl"?rre(e):Vte(e)}),sre=e=>`Show error details for ${e==null?void 0:e.activity}`,ore=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,are=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,ire=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,cre=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,lre=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,ure=e=>`${e==null?void 0:e.activity} 오류 상세 정보 표시`,_re=e=>`${e==null?void 0:e.activity} のエラー詳細を表示`,fre=e=>`Pokaż szczegóły błędu działania ${e==null?void 0:e.activity}`,dre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ore(e):t==="fa"?are(e):t==="ar"?ire(e):t==="es"?cre(e):t==="hi"?lre(e):t==="ko"?ure(e):t==="ja"?_re(e):t==="pl"?fre(e):sre(e)}),hre=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,pre=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,mre=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,gre=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,vre=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,bre=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,yre=e=>`${e==null?void 0:e.target} ${e==null?void 0:e.count}개 더 표시`,xre=e=>`${e==null?void 0:e.target} をさらに ${e==null?void 0:e.count} 件表示`,wre=e=>`Pokaż więcej (${e==null?void 0:e.count}): ${e==null?void 0:e.target}`,kre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?pre(e):t==="fa"?mre(e):t==="ar"?gre(e):t==="es"?vre(e):t==="hi"?bre(e):t==="ko"?yre(e):t==="ja"?xre(e):t==="pl"?wre(e):hre(e)}),jre=e=>`${e==null?void 0:e.name} skill`,Sre=e=>`${e==null?void 0:e.name} 技能`,Cre=e=>`مهارت ${e==null?void 0:e.name}`,zre=e=>`مهارة ${e==null?void 0:e.name}`,Ere=e=>`Skill ${e==null?void 0:e.name}`,Nre=e=>`${e==null?void 0:e.name} स्किल`,Are=e=>`${e==null?void 0:e.name} 스킬`,Tre=e=>`${e==null?void 0:e.name} スキル`,Rre=e=>`Umiejętność ${e==null?void 0:e.name}`,Mre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Sre(e):t==="fa"?Cre(e):t==="ar"?zre(e):t==="es"?Ere(e):t==="hi"?Nre(e):t==="ko"?Are(e):t==="ja"?Tre(e):t==="pl"?Rre(e):jre(e)}),Ore=e=>`Value for ${e==null?void 0:e.name}`,$re=e=>`${e==null?void 0:e.name} 的值`,Dre=e=>`مقدار ${e==null?void 0:e.name}`,Lre=e=>`قيمة ${e==null?void 0:e.name}`,Ire=e=>`Valor de ${e==null?void 0:e.name}`,Pre=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,Bre=e=>`${e==null?void 0:e.name}의 값`,Fre=e=>`${e==null?void 0:e.name} の値`,Hre=e=>`Wartość dla ${e==null?void 0:e.name}`,qre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?$re(e):t==="fa"?Dre(e):t==="ar"?Lre(e):t==="es"?Ire(e):t==="hi"?Pre(e):t==="ko"?Bre(e):t==="ja"?Fre(e):t==="pl"?Hre(e):Ore(e)}),Ure=()=>"Agent reported back",Gre=()=>"智能体已返回结果",Wre=()=>"عامل نتیجه را گزارش کرد",Kre=()=>"أبلغ الوكيل بالنتيجة",Vre=()=>"El agente informó de los resultados",Qre=()=>"एजेंट ने रिपोर्ट भेजी",Xre=()=>"에이전트 결과 보고됨",Yre=()=>"エージェントが結果を報告しました",Zre=()=>"Agent przekazał wyniki",Jre=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Gre():t==="fa"?Wre():t==="ar"?Kre():t==="es"?Vre():t==="hi"?Qre():t==="ko"?Xre():t==="ja"?Yre():t==="pl"?Zre():Ure()}),ene=()=>"Browse",tne=()=>"浏览",rne=()=>"مرور",nne=()=>"تصفّح",sne=()=>"Navegar",one=()=>"ब्राउज़ करें",ane=()=>"탐색",ine=()=>"閲覧",cne=()=>"Przeglądaj",lne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?tne():t==="fa"?rne():t==="ar"?nne():t==="es"?sne():t==="hi"?one():t==="ko"?ane():t==="ja"?ine():t==="pl"?cne():ene()}),une=()=>"Browsing…",_ne=()=>"正在浏览…",fne=()=>"در حال مرور…",dne=()=>"جارٍ التصفّح…",hne=()=>"Navegando…",pne=()=>"ब्राउज़ कर रहा है…",mne=()=>"탐색 중…",gne=()=>"閲覧中…",vne=()=>"Przeglądanie…",bne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_ne():t==="fa"?fne():t==="ar"?dne():t==="es"?hne():t==="hi"?pne():t==="ko"?mne():t==="ja"?gne():t==="pl"?vne():une()}),yne=()=>"Checked experiment status and updated notes",xne=()=>"已检查实验状态并更新笔记",wne=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",kne=()=>"فحص حالة التجربة وحدّث الملاحظات",jne=()=>"Consultó el estado del experimento y actualizó las notas",Sne=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",Cne=()=>"실험 상태 확인 및 노트 업데이트 완료",zne=()=>"実験の状態を確認してノートを更新しました",Ene=()=>"Sprawdzono stan eksperymentu i zaktualizowano notatki",Nne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xne():t==="fa"?wne():t==="ar"?kne():t==="es"?jne():t==="hi"?Sne():t==="ko"?Cne():t==="ja"?zne():t==="pl"?Ene():yne()}),Ane=()=>"Closed an agent",Tne=()=>"已关闭智能体",Rne=()=>"عامل بسته شد",Mne=()=>"أغلق وكيلًا",One=()=>"Cerró un agente",$ne=()=>"एक एजेंट बंद किया",Dne=()=>"에이전트 종료 완료",Lne=()=>"エージェントを閉じました",Ine=()=>"Zamknięto agenta",Pne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Tne():t==="fa"?Rne():t==="ar"?Mne():t==="es"?One():t==="hi"?$ne():t==="ko"?Dne():t==="ja"?Lne():t==="pl"?Ine():Ane()}),Bne=()=>"Context compacted",Fne=()=>"上下文已压缩",Hne=()=>"زمینه فشرده شد",qne=()=>"تم ضغط السياق",Une=()=>"Contexto comprimido",Gne=()=>"कॉन्टेक्स्ट छोटा किया गया",Wne=()=>"컨텍스트 압축 완료",Kne=()=>"コンテキストを圧縮しました",Vne=()=>"Skrócono kontekst",Qne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fne():t==="fa"?Hne():t==="ar"?qne():t==="es"?Une():t==="hi"?Gne():t==="ko"?Wne():t==="ja"?Kne():t==="pl"?Vne():Bne()}),Xne=()=>"Compacting conversation…",Yne=()=>"正在压缩对话…",Zne=()=>"در حال فشرده‌سازی گفت‌وگو…",Jne=()=>"جارٍ ضغط المحادثة…",ese=()=>"Comprimiendo la conversación…",tse=()=>"बातचीत छोटी की जा रही है…",rse=()=>"대화 압축 중…",nse=()=>"会話を圧縮中…",sse=()=>"Skracanie kontekstu rozmowy…",E9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yne():t==="fa"?Zne():t==="ar"?Jne():t==="es"?ese():t==="hi"?tse():t==="ko"?rse():t==="ja"?nse():t==="pl"?sse():Xne()}),ose=()=>"Compacting failed",ase=()=>"压缩失败",ise=()=>"فشرده‌سازی ناموفق بود",cse=()=>"فشل الضغط",lse=()=>"Error al comprimir",use=()=>"छोटा करना विफल",_se=()=>"압축 실패",fse=()=>"圧縮に失敗しました",dse=()=>"Nie udało się skrócić kontekstu",hse=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ase():t==="fa"?ise():t==="ar"?cse():t==="es"?lse():t==="hi"?use():t==="ko"?_se():t==="ja"?fse():t==="pl"?dse():ose()}),pse=e=>`Created ${e==null?void 0:e.target}`,mse=e=>`已创建 ${e==null?void 0:e.target}`,gse=e=>`${e==null?void 0:e.target} ایجاد شد`,vse=e=>`أنشأ ${e==null?void 0:e.target}`,bse=e=>`Creó ${e==null?void 0:e.target}`,yse=e=>`${e==null?void 0:e.target} बनाया`,xse=e=>`${e==null?void 0:e.target} 생성 완료`,wse=e=>`${e==null?void 0:e.target} を作成しました`,kse=e=>`Utworzono ${e==null?void 0:e.target}`,jse=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mse(e):t==="fa"?gse(e):t==="ar"?vse(e):t==="es"?bse(e):t==="hi"?yse(e):t==="ko"?xse(e):t==="ja"?wse(e):t==="pl"?kse(e):pse(e)}),Sse=()=>"Delegate",Cse=()=>"委派",zse=()=>"واگذاری",Ese=()=>"تفويض",Nse=()=>"Delegar",Ase=()=>"सौंपें",Tse=()=>"위임",Rse=()=>"委任",Mse=()=>"Przekaż",Ose=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cse():t==="fa"?zse():t==="ar"?Ese():t==="es"?Nse():t==="hi"?Ase():t==="ko"?Tse():t==="ja"?Rse():t==="pl"?Mse():Sse()}),$se=()=>"Delegating…",Dse=()=>"正在委派…",Lse=()=>"در حال واگذاری…",Ise=()=>"جارٍ التفويض…",Pse=()=>"Delegando…",Bse=()=>"सौंप रहा है…",Fse=()=>"위임 중…",Hse=()=>"委任中…",qse=()=>"Przekazywanie zadania…",Use=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dse():t==="fa"?Lse():t==="ar"?Ise():t==="es"?Pse():t==="hi"?Bse():t==="ko"?Fse():t==="ja"?Hse():t==="pl"?qse():$se()}),Gse=e=>`Deleted ${e==null?void 0:e.target}`,Wse=e=>`已删除 ${e==null?void 0:e.target}`,Kse=e=>`${e==null?void 0:e.target} حذف شد`,Vse=e=>`حذف ${e==null?void 0:e.target}`,Qse=e=>`Eliminó ${e==null?void 0:e.target}`,Xse=e=>`${e==null?void 0:e.target} हटाया`,Yse=e=>`${e==null?void 0:e.target} 삭제 완료`,Zse=e=>`${e==null?void 0:e.target} を削除しました`,Jse=e=>`Usunięto ${e==null?void 0:e.target}`,eoe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Wse(e):t==="fa"?Kse(e):t==="ar"?Vse(e):t==="es"?Qse(e):t==="hi"?Xse(e):t==="ko"?Yse(e):t==="ja"?Zse(e):t==="pl"?Jse(e):Gse(e)}),toe=()=>"Edit",roe=()=>"编辑",noe=()=>"ویرایش",soe=()=>"تعديل",ooe=()=>"Editar",aoe=()=>"संपादित करें",ioe=()=>"편집",coe=()=>"編集",loe=()=>"Edytuj",hD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?roe():t==="fa"?noe():t==="ar"?soe():t==="es"?ooe():t==="hi"?aoe():t==="ko"?ioe():t==="ja"?coe():t==="pl"?loe():toe()}),uoe=e=>`Edited ${e==null?void 0:e.target}`,_oe=e=>`已编辑 ${e==null?void 0:e.target}`,foe=e=>`${e==null?void 0:e.target} ویرایش شد`,doe=e=>`عدّل ${e==null?void 0:e.target}`,hoe=e=>`Editó ${e==null?void 0:e.target}`,poe=e=>`${e==null?void 0:e.target} संपादित किया`,moe=e=>`${e==null?void 0:e.target} 수정 완료`,goe=e=>`${e==null?void 0:e.target} を編集しました`,voe=e=>`Edytowano ${e==null?void 0:e.target}`,boe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?_oe(e):t==="fa"?foe(e):t==="ar"?doe(e):t==="es"?hoe(e):t==="hi"?poe(e):t==="ko"?moe(e):t==="ja"?goe(e):t==="pl"?voe(e):uoe(e)}),yoe=()=>"Editing…",xoe=()=>"正在编辑…",woe=()=>"در حال ویرایش…",koe=()=>"جارٍ التعديل…",joe=()=>"Editando…",Soe=()=>"संपादित कर रहा है…",Coe=()=>"편집 중…",zoe=()=>"編集中…",Eoe=()=>"Edytowanie…",Noe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xoe():t==="fa"?woe():t==="ar"?koe():t==="es"?joe():t==="hi"?Soe():t==="ko"?Coe():t==="ja"?zoe():t==="pl"?Eoe():yoe()}),Aoe=e=>`${e==null?void 0:e.activity} for ${e==null?void 0:e.count} queries`,Toe=e=>`${e==null?void 0:e.activity},共 ${e==null?void 0:e.count} 个查询`,Roe=e=>`${e==null?void 0:e.activity} برای ${e==null?void 0:e.count} جستجو`,Moe=e=>`${e==null?void 0:e.activity} لـ ${e==null?void 0:e.count} استعلامات`,Ooe=e=>`${e==null?void 0:e.activity} para ${e==null?void 0:e.count} consultas`,$oe=e=>`${e==null?void 0:e.activity}: ${e==null?void 0:e.count} क्वेरी`,Doe=e=>`${e==null?void 0:e.count}개 검색어에 대한 ${e==null?void 0:e.activity}`,Loe=e=>`${e==null?void 0:e.count} 件の検索語について ${e==null?void 0:e.activity}`,Ioe=e=>`${e==null?void 0:e.activity} dla ${e==null?void 0:e.count} zapytań`,Poe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Toe(e):t==="fa"?Roe(e):t==="ar"?Moe(e):t==="es"?Ooe(e):t==="hi"?$oe(e):t==="ko"?Doe(e):t==="ja"?Loe(e):t==="pl"?Ioe(e):Aoe(e)}),Boe=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,Foe=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,Hoe=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,qoe=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,Uoe=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,Goe=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,Woe=e=>`“${e==null?void 0:e.query}”에 대한 ${e==null?void 0:e.activity}`,Koe=e=>`「${e==null?void 0:e.query}」について ${e==null?void 0:e.activity}`,Voe=e=>`${e==null?void 0:e.activity} dla „${e==null?void 0:e.query}”`,N9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Foe(e):t==="fa"?Hoe(e):t==="ar"?qoe(e):t==="es"?Uoe(e):t==="hi"?Goe(e):t==="ko"?Woe(e):t==="ja"?Koe(e):t==="pl"?Voe(e):Boe(e)}),Qoe=()=>"Imported from your terminal — new turns continue in the agent's own history",Xoe=()=>"从你的终端导入 — 新的回合将在智能体自己的历史中继续",Yoe=()=>"از ترمینال شما وارد شد — نوبت‌های جدید در تاریخچهٔ خود عامل ادامه می‌یابند",Zoe=()=>"مستورد من طرفيتك — الجولات الجديدة تتابع في سجل الوكيل نفسه",Joe=()=>"Importado desde tu terminal — los turnos nuevos continúan en el historial del agente",eae=()=>"आपके टर्मिनल से इम्पोर्ट किया गया — नए टर्न एजेंट के अपने इतिहास में जारी रहेंगे",tae=()=>"터미널에서 가져왔습니다. 새 대화는 에이전트 자체 기록에서 계속됩니다",rae=()=>"ターミナルから取り込みました。新しいターンはエージェント自身の履歴で続きます",nae=()=>"Zaimportowano z terminala — kolejne wiadomości będą zapisywane w historii agenta",sae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xoe():t==="fa"?Yoe():t==="ar"?Zoe():t==="es"?Joe():t==="hi"?eae():t==="ko"?tae():t==="ja"?rae():t==="pl"?nae():Qoe()}),oae=e=>`Listed files matching ${e==null?void 0:e.pattern}`,aae=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,iae=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,cae=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,lae=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,uae=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,_ae=e=>`${e==null?void 0:e.pattern}과(와) 일치하는 파일 목록 확인 완료`,fae=e=>`${e==null?void 0:e.pattern} に一致するファイルを一覧表示しました`,dae=e=>`Wyświetlono pliki pasujące do ${e==null?void 0:e.pattern}`,hae=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?aae(e):t==="fa"?iae(e):t==="ar"?cae(e):t==="es"?lae(e):t==="hi"?uae(e):t==="ko"?_ae(e):t==="ja"?fae(e):t==="pl"?dae(e):oae(e)}),pae=()=>"Load",mae=()=>"加载",gae=()=>"بارگیری",vae=()=>"تحميل",bae=()=>"Cargar",yae=()=>"लोड करें",xae=()=>"불러오기",wae=()=>"読み込み",kae=()=>"Wczytaj",jae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mae():t==="fa"?gae():t==="ar"?vae():t==="es"?bae():t==="hi"?yae():t==="ko"?xae():t==="ja"?wae():t==="pl"?kae():pae()}),Sae=()=>"Loaded a skill",Cae=()=>"已加载技能",zae=()=>"یک مهارت بارگیری شد",Eae=()=>"حمّل مهارة",Nae=()=>"Cargó una skill",Aae=()=>"एक स्किल लोड की",Tae=()=>"스킬 불러오기 완료",Rae=()=>"スキルを読み込みました",Mae=()=>"Wczytano umiejętność",Oae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cae():t==="fa"?zae():t==="ar"?Eae():t==="es"?Nae():t==="hi"?Aae():t==="ko"?Tae():t==="ja"?Rae():t==="pl"?Mae():Sae()}),$ae=e=>`Loaded ${e==null?void 0:e.name} skill`,Dae=e=>`已加载技能 ${e==null?void 0:e.name}`,Lae=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,Iae=e=>`حمّل مهارة ${e==null?void 0:e.name}`,Pae=e=>`Cargó la skill ${e==null?void 0:e.name}`,Bae=e=>`${e==null?void 0:e.name} स्किल लोड की`,Fae=e=>`${e==null?void 0:e.name} 스킬 불러오기 완료`,Hae=e=>`スキル ${e==null?void 0:e.name} を読み込みました`,qae=e=>`Wczytano umiejętność ${e==null?void 0:e.name}`,Uae=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Dae(e):t==="fa"?Lae(e):t==="ar"?Iae(e):t==="es"?Pae(e):t==="hi"?Bae(e):t==="ko"?Fae(e):t==="ja"?Hae(e):t==="pl"?qae(e):$ae(e)}),Gae=()=>"Loading…",Wae=()=>"正在加载…",Kae=()=>"در حال بارگیری…",Vae=()=>"جارٍ التحميل…",Qae=()=>"Cargando…",Xae=()=>"लोड हो रहा है…",Yae=()=>"불러오는 중…",Zae=()=>"読み込み中…",Jae=()=>"Wczytywanie…",eie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wae():t==="fa"?Kae():t==="ar"?Vae():t==="es"?Qae():t==="hi"?Xae():t==="ko"?Yae():t==="ja"?Zae():t==="pl"?Jae():Gae()}),tie=e=>`Opened ${e==null?void 0:e.target}`,rie=e=>`已打开 ${e==null?void 0:e.target}`,nie=e=>`${e==null?void 0:e.target} باز شد`,sie=e=>`فتح ${e==null?void 0:e.target}`,oie=e=>`Abrió ${e==null?void 0:e.target}`,aie=e=>`${e==null?void 0:e.target} खोला`,iie=e=>`${e==null?void 0:e.target} 열기 완료`,cie=e=>`${e==null?void 0:e.target} を開きました`,lie=e=>`Otwarto ${e==null?void 0:e.target}`,uie=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?rie(e):t==="fa"?nie(e):t==="ar"?sie(e):t==="es"?oie(e):t==="hi"?aie(e):t==="ko"?iie(e):t==="ja"?cie(e):t==="pl"?lie(e):tie(e)}),_ie=e=>`Ran ${e==null?void 0:e.command}`,fie=e=>`已运行 ${e==null?void 0:e.command}`,die=e=>`${e==null?void 0:e.command} اجرا شد`,hie=e=>`نفّذ ${e==null?void 0:e.command}`,pie=e=>`Ejecutó ${e==null?void 0:e.command}`,mie=e=>`${e==null?void 0:e.command} चलाया`,gie=e=>`${e==null?void 0:e.command} 실행 완료`,vie=e=>`${e==null?void 0:e.command} を実行しました`,bie=e=>`Uruchomiono ${e==null?void 0:e.command}`,yie=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fie(e):t==="fa"?die(e):t==="ar"?hie(e):t==="es"?pie(e):t==="hi"?mie(e):t==="ko"?gie(e):t==="ja"?vie(e):t==="pl"?bie(e):_ie(e)}),xie=()=>"Ran a sub-agent",wie=()=>"已运行子智能体",kie=()=>"یک عامل فرعی اجرا شد",jie=()=>"شغّل وكيلًا فرعيًا",Sie=()=>"Ejecutó un subagente",Cie=()=>"एक सब-एजेंट चलाया",zie=()=>"하위 에이전트 실행 완료",Eie=()=>"サブエージェントを実行しました",Nie=()=>"Uruchomiono podagenta",Aie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wie():t==="fa"?kie():t==="ar"?jie():t==="es"?Sie():t==="hi"?Cie():t==="ko"?zie():t==="ja"?Eie():t==="pl"?Nie():xie()}),Tie=()=>"Read",Rie=()=>"读取",Mie=()=>"خواندن",Oie=()=>"قراءة",$ie=()=>"Leer",Die=()=>"पढ़ें",Lie=()=>"읽기",Iie=()=>"読む",Pie=()=>"Odczytaj",Bie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rie():t==="fa"?Mie():t==="ar"?Oie():t==="es"?$ie():t==="hi"?Die():t==="ko"?Lie():t==="ja"?Iie():t==="pl"?Pie():Tie()}),Fie=()=>"Read experiment notes",Hie=()=>"已读取实验笔记",qie=()=>"یادداشت‌های آزمایش خوانده شد",Uie=()=>"قرأ ملاحظات التجربة",Gie=()=>"Leyó las notas del experimento",Wie=()=>"प्रयोग के नोट्स पढ़े",Kie=()=>"실험 노트 읽기 완료",Vie=()=>"実験ノートを読みました",Qie=()=>"Odczytano notatki eksperymentu",Xie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hie():t==="fa"?qie():t==="ar"?Uie():t==="es"?Gie():t==="hi"?Wie():t==="ko"?Kie():t==="ja"?Vie():t==="pl"?Qie():Fie()}),Yie=()=>"Read a paper",Zie=()=>"已读取论文",Jie=()=>"یک مقاله خوانده شد",ece=()=>"قرأ ورقة",tce=()=>"Leyó un paper",rce=()=>"एक पेपर पढ़ा",nce=()=>"논문 읽기 완료",sce=()=>"論文を読みました",oce=()=>"Przeczytano publikację",ace=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zie():t==="fa"?Jie():t==="ar"?ece():t==="es"?tce():t==="hi"?rce():t==="ko"?nce():t==="ja"?sce():t==="pl"?oce():Yie()}),ice=e=>`Read ${e==null?void 0:e.name} skill`,cce=e=>`已读取技能 ${e==null?void 0:e.name}`,lce=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,uce=e=>`قرأ مهارة ${e==null?void 0:e.name}`,_ce=e=>`Leyó la skill ${e==null?void 0:e.name}`,fce=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,dce=e=>`${e==null?void 0:e.name} 스킬 읽기 완료`,hce=e=>`スキル ${e==null?void 0:e.name} を読みました`,pce=e=>`Odczytano umiejętność ${e==null?void 0:e.name}`,z2=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?cce(e):t==="fa"?lce(e):t==="ar"?uce(e):t==="es"?_ce(e):t==="hi"?fce(e):t==="ko"?dce(e):t==="ja"?hce(e):t==="pl"?pce(e):ice(e)}),mce=e=>`Read ${e==null?void 0:e.target}`,gce=e=>`已读取 ${e==null?void 0:e.target}`,vce=e=>`${e==null?void 0:e.target} خوانده شد`,bce=e=>`قرأ ${e==null?void 0:e.target}`,yce=e=>`Leyó ${e==null?void 0:e.target}`,xce=e=>`${e==null?void 0:e.target} पढ़ा`,wce=e=>`${e==null?void 0:e.target} 읽기 완료`,kce=e=>`${e==null?void 0:e.target} を読みました`,jce=e=>`Odczytano ${e==null?void 0:e.target}`,bm=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?gce(e):t==="fa"?vce(e):t==="ar"?bce(e):t==="es"?yce(e):t==="hi"?xce(e):t==="ko"?wce(e):t==="ja"?kce(e):t==="pl"?jce(e):mce(e)}),Sce=()=>"Read a web page",Cce=()=>"已读取网页",zce=()=>"یک صفحهٔ وب خوانده شد",Ece=()=>"قرأ صفحة ويب",Nce=()=>"Leyó una página web",Ace=()=>"एक वेब पेज पढ़ा",Tce=()=>"웹 페이지 읽기 완료",Rce=()=>"ウェブページを読みました",Mce=()=>"Odczytano stronę internetową",Oce=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cce():t==="fa"?zce():t==="ar"?Ece():t==="es"?Nce():t==="hi"?Ace():t==="ko"?Tce():t==="ja"?Rce():t==="pl"?Mce():Sce()}),$ce=()=>"Reading…",Dce=()=>"正在读取…",Lce=()=>"در حال خواندن…",Ice=()=>"جارٍ القراءة…",Pce=()=>"Leyendo…",Bce=()=>"पढ़ रहा है…",Fce=()=>"읽는 중…",Hce=()=>"読み取り中…",qce=()=>"Odczytywanie…",Uce=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dce():t==="fa"?Lce():t==="ar"?Ice():t==="es"?Pce():t==="hi"?Bce():t==="ko"?Fce():t==="ja"?Hce():t==="pl"?qce():$ce()}),Gce=()=>"Resumed an agent",Wce=()=>"已恢复智能体",Kce=()=>"عامل از سر گرفته شد",Vce=()=>"استأنف عمل وكيل",Qce=()=>"Reanudó un agente",Xce=()=>"एक एजेंट फिर से शुरू किया",Yce=()=>"에이전트 재개 완료",Zce=()=>"エージェントを再開しました",Jce=()=>"Wznowiono działanie agenta",ele=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wce():t==="fa"?Kce():t==="ar"?Vce():t==="es"?Qce():t==="hi"?Xce():t==="ko"?Yce():t==="ja"?Zce():t==="pl"?Jce():Gce()}),tle=()=>"Review",rle=()=>"查看",nle=()=>"بازبینی",sle=()=>"مراجعة",ole=()=>"Revisar",ale=()=>"समीक्षा करें",ile=()=>"검토",cle=()=>"レビュー",lle=()=>"Przejrzyj",ule=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rle():t==="fa"?nle():t==="ar"?sle():t==="es"?ole():t==="hi"?ale():t==="ko"?ile():t==="ja"?cle():t==="pl"?lle():tle()}),_le=()=>"Reviewed run log",fle=()=>"已查看运行日志",dle=()=>"گزارش اجرا بازبینی شد",hle=()=>"راجع سجل التشغيل",ple=()=>"Revisó el log de la ejecución",mle=()=>"रन लॉग की समीक्षा की",gle=()=>"실행 로그 검토 완료",vle=()=>"実行ログを確認しました",ble=()=>"Przejrzano log uruchomienia",yle=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fle():t==="fa"?dle():t==="ar"?hle():t==="es"?ple():t==="hi"?mle():t==="ko"?gle():t==="ja"?vle():t==="pl"?ble():_le()}),xle=()=>"Reviewed run logs",wle=()=>"已查看运行日志",kle=()=>"گزارش‌های اجرا بازبینی شد",jle=()=>"راجع سجلات التشغيل",Sle=()=>"Revisó los logs de las ejecuciones",Cle=()=>"रन लॉग की समीक्षा की",zle=()=>"실행 로그 검토 완료",Ele=()=>"実行ログを確認しました",Nle=()=>"Przejrzano logi uruchomień",Ale=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wle():t==="fa"?kle():t==="ar"?jle():t==="es"?Sle():t==="hi"?Cle():t==="ko"?zle():t==="ja"?Ele():t==="pl"?Nle():xle()}),Tle=()=>"Reviewed experiment status and notes",Rle=()=>"已查看实验状态和笔记",Mle=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",Ole=()=>"راجع حالة التجربة وملاحظاتها",$le=()=>"Revisó el estado y las notas del experimento",Dle=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",Lle=()=>"실험 상태와 노트 검토 완료",Ile=()=>"実験の状態とノートを確認しました",Ple=()=>"Przejrzano stan eksperymentu i notatki",Ble=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rle():t==="fa"?Mle():t==="ar"?Ole():t==="es"?$le():t==="hi"?Dle():t==="ko"?Lle():t==="ja"?Ile():t==="pl"?Ple():Tle()}),Fle=()=>"Reviewing…",Hle=()=>"正在查看…",qle=()=>"در حال بازبینی…",Ule=()=>"جارٍ المراجعة…",Gle=()=>"Revisando…",Wle=()=>"समीक्षा कर रहा है…",Kle=()=>"검토 중…",Vle=()=>"レビュー中…",Qle=()=>"Przeglądanie…",Xle=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hle():t==="fa"?qle():t==="ar"?Ule():t==="es"?Gle():t==="hi"?Wle():t==="ko"?Kle():t==="ja"?Vle():t==="pl"?Qle():Fle()}),Yle=()=>"Run",Zle=()=>"运行",Jle=()=>"اجرا",eue=()=>"تشغيل",tue=()=>"Ejecutar",rue=()=>"चलाएं",nue=()=>"실행",sue=()=>"実行",oue=()=>"Uruchom",aue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zle():t==="fa"?Jle():t==="ar"?eue():t==="es"?tue():t==="hi"?rue():t==="ko"?nue():t==="ja"?sue():t==="pl"?oue():Yle()}),iue=()=>"Running…",cue=()=>"正在运行…",lue=()=>"در حال اجرا…",uue=()=>"جارٍ التشغيل…",_ue=()=>"Ejecutando…",fue=()=>"चल रहा है…",due=()=>"실행 중…",hue=()=>"実行中…",pue=()=>"Uruchamianie…",pD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?cue():t==="fa"?lue():t==="ar"?uue():t==="es"?_ue():t==="hi"?fue():t==="ko"?due():t==="ja"?hue():t==="pl"?pue():iue()}),mue=()=>"Search",gue=()=>"搜索",vue=()=>"جست‌وجو",bue=()=>"بحث",yue=()=>"Buscar",xue=()=>"खोजें",wue=()=>"검색",kue=()=>"検索",jue=()=>"Szukaj",Sue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gue():t==="fa"?vue():t==="ar"?bue():t==="es"?yue():t==="hi"?xue():t==="ko"?wue():t==="ja"?kue():t==="pl"?jue():mue()}),Cue=()=>"Searched alphaXiv full text",zue=()=>"已搜索 alphaXiv 全文",Eue=()=>"متن کامل alphaXiv جست‌وجو شد",Nue=()=>"بحث في نص alphaXiv الكامل",Aue=()=>"Buscó en el texto completo de alphaXiv",Tue=()=>"alphaXiv का पूरा टेक्स्ट खोजा",Rue=()=>"alphaXiv 전문 검색 완료",Mue=()=>"alphaXiv の全文を検索しました",Oue=()=>"Przeszukano pełne teksty w alphaXiv",$ue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zue():t==="fa"?Eue():t==="ar"?Nue():t==="es"?Aue():t==="hi"?Tue():t==="ko"?Rue():t==="ja"?Mue():t==="pl"?Oue():Cue()}),Due=()=>"Searched alphaXiv semantically",Lue=()=>"已对 alphaXiv 进行语义搜索",Iue=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",Pue=()=>"أجرى بحثًا دلاليًا في alphaXiv",Bue=()=>"Hizo una búsqueda semántica en alphaXiv",Fue=()=>"alphaXiv को सिमेंटिक रूप से खोजा",Hue=()=>"alphaXiv 의미 기반 검색 완료",que=()=>"alphaXiv で意味検索しました",Uue=()=>"Przeszukano semantycznie alphaXiv",Gue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lue():t==="fa"?Iue():t==="ar"?Pue():t==="es"?Bue():t==="hi"?Fue():t==="ko"?Hue():t==="ja"?que():t==="pl"?Uue():Due()}),Wue=()=>"Searched bioRxiv",Kue=()=>"已搜索 bioRxiv",Vue=()=>"bioRxiv جست‌وجو شد",Que=()=>"بحث في bioRxiv",Xue=()=>"Buscó en bioRxiv",Yue=()=>"bioRxiv खोजा",Zue=()=>"bioRxiv 검색 완료",Jue=()=>"bioRxiv を検索しました",e_e=()=>"Przeszukano bioRxiv",t_e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kue():t==="fa"?Vue():t==="ar"?Que():t==="es"?Xue():t==="hi"?Yue():t==="ko"?Zue():t==="ja"?Jue():t==="pl"?e_e():Wue()}),r_e=()=>"Searched code",n_e=()=>"已搜索代码",s_e=()=>"کد جست‌وجو شد",o_e=()=>"بحث في الشيفرة",a_e=()=>"Buscó en el código",i_e=()=>"कोड खोजा",c_e=()=>"코드 검색 완료",l_e=()=>"コードを検索しました",u_e=()=>"Przeszukano kod",E2=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?n_e():t==="fa"?s_e():t==="ar"?o_e():t==="es"?a_e():t==="hi"?i_e():t==="ko"?c_e():t==="ja"?l_e():t==="pl"?u_e():r_e()}),__e=e=>`Searched code for “${e==null?void 0:e.pattern}”`,f_e=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,d_e=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,h_e=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,p_e=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,m_e=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,g_e=e=>`코드에서 “${e==null?void 0:e.pattern}” 검색 완료`,v_e=e=>`コードで「${e==null?void 0:e.pattern}」を検索しました`,b_e=e=>`Przeszukano kod pod kątem „${e==null?void 0:e.pattern}”`,N2=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?f_e(e):t==="fa"?d_e(e):t==="ar"?h_e(e):t==="es"?p_e(e):t==="hi"?m_e(e):t==="ko"?g_e(e):t==="ja"?v_e(e):t==="pl"?b_e(e):__e(e)}),y_e=e=>`Searched images for “${e==null?void 0:e.query}”`,x_e=e=>`已搜索图片“${e==null?void 0:e.query}”`,w_e=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,k_e=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,j_e=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,S_e=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,C_e=e=>`“${e==null?void 0:e.query}” 이미지 검색 완료`,z_e=e=>`「${e==null?void 0:e.query}」の画像を検索しました`,E_e=e=>`Wyszukano obrazy: „${e==null?void 0:e.query}”`,N_e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?x_e(e):t==="fa"?w_e(e):t==="ar"?k_e(e):t==="es"?j_e(e):t==="hi"?S_e(e):t==="ko"?C_e(e):t==="ja"?z_e(e):t==="pl"?E_e(e):y_e(e)}),A_e=()=>"Searched the literature",T_e=()=>"已搜索文献",R_e=()=>"منابع علمی جست‌وجو شد",M_e=()=>"بحث في الأدبيات",O_e=()=>"Buscó en la literatura",$_e=()=>"साहित्य खोजा",D_e=()=>"문헌 검색 완료",L_e=()=>"文献を検索しました",I_e=()=>"Przeszukano literaturę",$v=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?T_e():t==="fa"?R_e():t==="ar"?M_e():t==="es"?O_e():t==="hi"?$_e():t==="ko"?D_e():t==="ja"?L_e():t==="pl"?I_e():A_e()}),P_e=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,B_e=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,F_e=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,H_e=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,q_e=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,U_e=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,G_e=e=>`페이지에서 “${e==null?void 0:e.pattern}” 검색 완료`,W_e=e=>`ページで「${e==null?void 0:e.pattern}」を検索しました`,K_e=e=>`Wyszukano na stronie „${e==null?void 0:e.pattern}”`,V_e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?B_e(e):t==="fa"?F_e(e):t==="ar"?H_e(e):t==="es"?q_e(e):t==="hi"?U_e(e):t==="ko"?G_e(e):t==="ja"?W_e(e):t==="pl"?K_e(e):P_e(e)}),Q_e=()=>"Searched OpenAlex",X_e=()=>"已搜索 OpenAlex",Y_e=()=>"OpenAlex جست‌وجو شد",Z_e=()=>"بحث في OpenAlex",J_e=()=>"Buscó en OpenAlex",efe=()=>"OpenAlex खोजा",tfe=()=>"OpenAlex 검색 완료",rfe=()=>"OpenAlex を検索しました",nfe=()=>"Przeszukano OpenAlex",sfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?X_e():t==="fa"?Y_e():t==="ar"?Z_e():t==="es"?J_e():t==="hi"?efe():t==="ko"?tfe():t==="ja"?rfe():t==="pl"?nfe():Q_e()}),ofe=()=>"Searched PubMed",afe=()=>"已搜索 PubMed",ife=()=>"PubMed جست‌وجو شد",cfe=()=>"بحث في PubMed",lfe=()=>"Buscó en PubMed",ufe=()=>"PubMed खोजा",_fe=()=>"PubMed 검색 완료",ffe=()=>"PubMed を検索しました",dfe=()=>"Przeszukano PubMed",hfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?afe():t==="fa"?ife():t==="ar"?cfe():t==="es"?lfe():t==="hi"?ufe():t==="ko"?_fe():t==="ja"?ffe():t==="pl"?dfe():ofe()}),pfe=e=>`Searched the web for “${e==null?void 0:e.query}”`,mfe=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,gfe=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,vfe=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,bfe=e=>`Buscó “${e==null?void 0:e.query}” en la web`,yfe=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,xfe=e=>`“${e==null?void 0:e.query}” 웹 검색 완료`,wfe=e=>`「${e==null?void 0:e.query}」をウェブで検索しました`,kfe=e=>`Przeszukano internet: „${e==null?void 0:e.query}”`,A9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mfe(e):t==="fa"?gfe(e):t==="ar"?vfe(e):t==="es"?bfe(e):t==="hi"?yfe(e):t==="ko"?xfe(e):t==="ja"?wfe(e):t==="pl"?kfe(e):pfe(e)}),jfe=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,Sfe=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,Cfe=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,zfe=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,Efe=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,Nfe=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,Afe=e=>`웹 페이지에서 “${e==null?void 0:e.pattern}” 검색 완료`,Tfe=e=>`ウェブページで「${e==null?void 0:e.pattern}」を検索しました`,Rfe=e=>`Wyszukano na stronie internetowej: „${e==null?void 0:e.pattern}”`,Mfe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Sfe(e):t==="fa"?Cfe(e):t==="ar"?zfe(e):t==="es"?Efe(e):t==="hi"?Nfe(e):t==="ko"?Afe(e):t==="ja"?Tfe(e):t==="pl"?Rfe(e):jfe(e)}),Ofe=()=>"Searching…",$fe=()=>"正在搜索…",Dfe=()=>"در حال جست‌وجو…",Lfe=()=>"جارٍ البحث…",Ife=()=>"Buscando…",Pfe=()=>"खोज रहा है…",Bfe=()=>"검색 중…",Ffe=()=>"検索中…",Hfe=()=>"Wyszukiwanie…",qfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?$fe():t==="fa"?Dfe():t==="ar"?Lfe():t==="es"?Ife():t==="hi"?Pfe():t==="ko"?Bfe():t==="ja"?Ffe():t==="pl"?Hfe():Ofe()}),Ufe=()=>"Sent input to an agent",Gfe=()=>"已向智能体发送输入",Wfe=()=>"ورودی به عامل فرستاده شد",Kfe=()=>"أرسل مدخلًا إلى وكيل",Vfe=()=>"Envió información a un agente",Qfe=()=>"एक एजेंट को इनपुट भेजा",Xfe=()=>"에이전트에 입력 전송 완료",Yfe=()=>"エージェントに入力を送信しました",Zfe=()=>"Wysłano dane wejściowe do agenta",Jfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Gfe():t==="fa"?Wfe():t==="ar"?Kfe():t==="es"?Vfe():t==="hi"?Qfe():t==="ko"?Xfe():t==="ja"?Yfe():t==="pl"?Zfe():Ufe()}),ede=()=>"Spawned an agent",tde=()=>"已创建智能体",rde=()=>"یک عامل ساخته شد",nde=()=>"أنشأ وكيلًا",sde=()=>"Creó un agente",ode=()=>"एक एजेंट शुरू किया",ade=()=>"에이전트 생성 완료",ide=()=>"エージェントを作成しました",cde=()=>"Utworzono agenta",lde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?tde():t==="fa"?rde():t==="ar"?nde():t==="es"?sde():t==="hi"?ode():t==="ko"?ade():t==="ja"?ide():t==="pl"?cde():ede()}),ude=()=>"Sub-agent",_de=()=>"子智能体",fde=()=>"عامل فرعی",dde=()=>"وكيل فرعي",hde=()=>"Subagente",pde=()=>"सब-एजेंट",mde=()=>"하위 에이전트",gde=()=>"サブエージェント",vde=()=>"Podagent",bde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_de():t==="fa"?fde():t==="ar"?dde():t==="es"?hde():t==="hi"?pde():t==="ko"?mde():t==="ja"?gde():t==="pl"?vde():ude()}),yde=()=>"Sub-agent interrupted",xde=()=>"子智能体已中断",wde=()=>"عامل فرعی متوقف شد",kde=()=>"قُوطع الوكيل الفرعي",jde=()=>"Subagente interrumpido",Sde=()=>"सब-एजेंट बाधित हुआ",Cde=()=>"하위 에이전트 중단됨",zde=()=>"サブエージェントが中断されました",Ede=()=>"Przerwano działanie podagenta",Nde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xde():t==="fa"?wde():t==="ar"?kde():t==="es"?jde():t==="hi"?Sde():t==="ko"?Cde():t==="ja"?zde():t==="pl"?Ede():yde()}),Ade=()=>"Sub-agent started",Tde=()=>"子智能体已启动",Rde=()=>"عامل فرعی آغاز شد",Mde=()=>"بدأ الوكيل الفرعي",Ode=()=>"Subagente iniciado",$de=()=>"सब-एजेंट शुरू हुआ",Dde=()=>"하위 에이전트 시작됨",Lde=()=>"サブエージェントが開始しました",Ide=()=>"Uruchomiono podagenta",Pde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Tde():t==="fa"?Rde():t==="ar"?Mde():t==="es"?Ode():t==="hi"?$de():t==="ko"?Dde():t==="ja"?Lde():t==="pl"?Ide():Ade()}),Bde=()=>"Updated experiment notes",Fde=()=>"已更新实验笔记",Hde=()=>"یادداشت‌های آزمایش به‌روز شد",qde=()=>"حدّث ملاحظات التجربة",Ude=()=>"Actualizó las notas del experimento",Gde=()=>"प्रयोग के नोट्स अपडेट किए",Wde=()=>"실험 노트 업데이트 완료",Kde=()=>"実験ノートを更新しました",Vde=()=>"Zaktualizowano notatki eksperymentu",Qde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fde():t==="fa"?Hde():t==="ar"?qde():t==="es"?Ude():t==="hi"?Gde():t==="ko"?Wde():t==="ja"?Kde():t==="pl"?Vde():Bde()}),Xde=()=>"Waiting on an agent",Yde=()=>"正在等待智能体",Zde=()=>"در انتظار عامل",Jde=()=>"في انتظار وكيل",ehe=()=>"Esperando a un agente",the=()=>"एजेंट का इंतज़ार है",rhe=()=>"에이전트 대기 중",nhe=()=>"エージェントを待機中",she=()=>"Oczekiwanie na agenta",ohe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yde():t==="fa"?Zde():t==="ar"?Jde():t==="es"?ehe():t==="hi"?the():t==="ko"?rhe():t==="ja"?nhe():t==="pl"?she():Xde()}),ahe=e=>`Approval required: ${e==null?void 0:e.label}`,ihe=e=>`需要批准:${e==null?void 0:e.label}`,che=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,lhe=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,uhe=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,_he=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,fhe=e=>`승인 필요: ${e==null?void 0:e.label}`,dhe=e=>`承認が必要: ${e==null?void 0:e.label}`,hhe=e=>`Wymagane zatwierdzenie: ${e==null?void 0:e.label}`,T9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ihe(e):t==="fa"?che(e):t==="ar"?lhe(e):t==="es"?uhe(e):t==="hi"?_he(e):t==="ko"?fhe(e):t==="ja"?dhe(e):t==="pl"?hhe(e):ahe(e)}),phe=()=>"The CLI is retrying the turn.",mhe=()=>"CLI 正在重试本轮。",ghe=()=>"CLI در حال تلاش دوباره برای این نوبت است.",vhe=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",bhe=()=>"La CLI está reintentando el turno.",yhe=()=>"CLI टर्न फिर से कोशिश कर रहा है।",xhe=()=>"CLI가 턴을 다시 시도하고 있습니다.",whe=()=>"CLI がターンを再試行しています。",khe=()=>"CLI ponawia próbę.",jhe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mhe():t==="fa"?ghe():t==="ar"?vhe():t==="es"?bhe():t==="hi"?yhe():t==="ko"?xhe():t==="ja"?whe():t==="pl"?khe():phe()}),She=()=>"Continue is available.",Che=()=>"可以继续。",zhe=()=>"ادامه در دسترس است.",Ehe=()=>"المتابعة متاحة.",Nhe=()=>"Puedes continuar.",Ahe=()=>"जारी रखना उपलब्ध है।",The=()=>"계속할 수 있습니다.",Rhe=()=>"続行できます。",Mhe=()=>"Można kontynuować.",Ohe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Che():t==="fa"?zhe():t==="ar"?Ehe():t==="es"?Nhe():t==="hi"?Ahe():t==="ko"?The():t==="ja"?Rhe():t==="pl"?Mhe():She()}),$he=()=>"Retry is available.",Dhe=()=>"可以重试。",Lhe=()=>"تلاش دوباره در دسترس است.",Ihe=()=>"إعادة المحاولة متاحة.",Phe=()=>"Puedes reintentarlo.",Bhe=()=>"फिर से कोशिश करना उपलब्ध है।",Fhe=()=>"다시 시도할 수 있습니다.",Hhe=()=>"再試行できます。",qhe=()=>"Można ponowić próbę.",Uhe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dhe():t==="fa"?Lhe():t==="ar"?Ihe():t==="es"?Phe():t==="hi"?Bhe():t==="ko"?Fhe():t==="ja"?Hhe():t==="pl"?qhe():$he()}),Ghe=()=>"Running a tool",Whe=()=>"正在运行工具",Khe=()=>"در حال اجرای ابزار",Vhe=()=>"جارٍ تشغيل أداة",Qhe=()=>"Ejecutando una herramienta",Xhe=()=>"एक टूल चल रहा है",Yhe=()=>"도구 실행 중",Zhe=()=>"ツールを実行中",Jhe=()=>"Narzędzie jest uruchomione",epe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Whe():t==="fa"?Khe():t==="ar"?Vhe():t==="es"?Qhe():t==="hi"?Xhe():t==="ko"?Yhe():t==="ja"?Zhe():t==="pl"?Jhe():Ghe()}),tpe=()=>"Tool activity completed",rpe=()=>"工具活动已完成",npe=()=>"فعالیت ابزار کامل شد",spe=()=>"اكتمل نشاط الأداة",ope=()=>"Actividad de la herramienta completada",ape=()=>"टूल गतिविधि पूरी हुई",ipe=()=>"도구 작업 완료",cpe=()=>"ツールの処理が完了しました",lpe=()=>"Narzędzie zakończyło działanie",upe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rpe():t==="fa"?npe():t==="ar"?spe():t==="es"?ope():t==="hi"?ape():t==="ko"?ipe():t==="ja"?cpe():t==="pl"?lpe():tpe()}),_pe=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,fpe=e=>`工具活动失败:${e==null?void 0:e.labels}`,dpe=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,hpe=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,ppe=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,mpe=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,gpe=e=>`도구 작업 실패: ${e==null?void 0:e.labels}`,vpe=e=>`ツールの処理に失敗: ${e==null?void 0:e.labels}`,bpe=e=>`Błąd działania narzędzia: ${e==null?void 0:e.labels}`,ype=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fpe(e):t==="fa"?dpe(e):t==="ar"?hpe(e):t==="es"?ppe(e):t==="hi"?mpe(e):t==="ko"?gpe(e):t==="ja"?vpe(e):t==="pl"?bpe(e):_pe(e)}),xpe=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,wpe=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,kpe=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,jpe=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,Spe=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,Cpe=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,zpe=e=>`도구 작업 ${e==null?void 0:e.count}개 실패: ${e==null?void 0:e.labels}`,Epe=e=>`${e==null?void 0:e.count} 件のツール処理に失敗: ${e==null?void 0:e.labels}`,Npe=e=>`Wystąpiły błędy w ${e==null?void 0:e.count} działaniach narzędzi: ${e==null?void 0:e.labels}`,Ape=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?wpe(e):t==="fa"?kpe(e):t==="ar"?jpe(e):t==="es"?Spe(e):t==="hi"?Cpe(e):t==="ko"?zpe(e):t==="ja"?Epe(e):t==="pl"?Npe(e):xpe(e)}),Tpe=()=>"Turn did not finish.",Rpe=()=>"本轮未完成。",Mpe=()=>"این نوبت کامل نشد.",Ope=()=>"لم تكتمل الجولة.",$pe=()=>"El turno no terminó.",Dpe=()=>"यह टर्न पूरा नहीं हुआ।",Lpe=()=>"턴이 완료되지 않았습니다.",Ipe=()=>"ターンが完了しませんでした。",Ppe=()=>"Odpowiedź nie została ukończona.",Bpe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rpe():t==="fa"?Mpe():t==="ar"?Ope():t==="es"?$pe():t==="hi"?Dpe():t==="ko"?Lpe():t==="ja"?Ipe():t==="pl"?Ppe():Tpe()}),Fpe=()=>"Artifacts",Hpe=()=>"产物",qpe=()=>"خروجی‌ها",Upe=()=>"المُخرَجات",Gpe=()=>"Artefactos",Wpe=()=>"आर्टिफ़ैक्ट",Kpe=()=>"결과물",Vpe=()=>"成果物",Qpe=()=>"Artefakty",mD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hpe():t==="fa"?qpe():t==="ar"?Upe():t==="es"?Gpe():t==="hi"?Wpe():t==="ko"?Kpe():t==="ja"?Vpe():t==="pl"?Qpe():Fpe()}),Xpe=()=>"Close panel",Ype=()=>"关闭面板",Zpe=()=>"بستن پنل",Jpe=()=>"إغلاق اللوحة",eme=()=>"Cerrar panel",tme=()=>"पैनल बंद करें",rme=()=>"패널 닫기",nme=()=>"パネルを閉じる",sme=()=>"Zamknij panel",fg=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ype():t==="fa"?Zpe():t==="ar"?Jpe():t==="es"?eme():t==="hi"?tme():t==="ko"?rme():t==="ja"?nme():t==="pl"?sme():Xpe()}),ome=()=>"Current task",ame=()=>"当前任务",ime=()=>"وظیفهٔ فعلی",cme=()=>"المهمة الحالية",lme=()=>"Tarea actual",ume=()=>"मौजूदा टास्क",_me=()=>"현재 작업",fme=()=>"現在のタスク",dme=()=>"Bieżące zadanie",R9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ame():t==="fa"?ime():t==="ar"?cme():t==="es"?lme():t==="hi"?ume():t==="ko"?_me():t==="ja"?fme():t==="pl"?dme():ome()}),hme=()=>"Drag to resize panel",pme=()=>"拖动以调整面板大小",mme=()=>"برای تغییر اندازهٔ پنل بکشید",gme=()=>"اسحب لتغيير حجم اللوحة",vme=()=>"Arrastra para cambiar el tamaño del panel",bme=()=>"पैनल का आकार बदलने के लिए खींचें",yme=()=>"드래그하여 패널 크기 조정",xme=()=>"ドラッグしてパネルのサイズを変更",wme=()=>"Przeciągnij, aby zmienić rozmiar panelu",kme=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?pme():t==="fa"?mme():t==="ar"?gme():t==="es"?vme():t==="hi"?bme():t==="ko"?yme():t==="ja"?xme():t==="pl"?wme():hme()}),jme=()=>"Drag toward the center to restore panel",Sme=()=>"向中央拖动以恢复面板",Cme=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",zme=()=>"اسحب نحو المنتصف لاستعادة اللوحة",Eme=()=>"Arrastra hacia el centro para restaurar el panel",Nme=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",Ame=()=>"패널을 복원하려면 중앙으로 드래그",Tme=()=>"中央にドラッグしてパネルを復元",Rme=()=>"Przeciągnij w kierunku środka, aby przywrócić panel",Mme=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Sme():t==="fa"?Cme():t==="ar"?zme():t==="es"?Eme():t==="hi"?Nme():t==="ko"?Ame():t==="ja"?Tme():t==="pl"?Rme():jme()}),Ome=()=>"Entire project",$me=()=>"整个项目",Dme=()=>"کل پروژه",Lme=()=>"المشروع بالكامل",Ime=()=>"Todo el proyecto",Pme=()=>"पूरा प्रोजेक्ट",Bme=()=>"전체 프로젝트",Fme=()=>"プロジェクト全体",Hme=()=>"Cały projekt",M9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?$me():t==="fa"?Dme():t==="ar"?Lme():t==="es"?Ime():t==="hi"?Pme():t==="ko"?Bme():t==="ja"?Fme():t==="pl"?Hme():Ome()}),qme=()=>"Expand panel",Ume=()=>"展开面板",Gme=()=>"گسترش پنل",Wme=()=>"توسيع اللوحة",Kme=()=>"Expandir panel",Vme=()=>"पैनल फैलाएं",Qme=()=>"패널 확장",Xme=()=>"パネルを拡大",Yme=()=>"Rozwiń panel",O9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ume():t==="fa"?Gme():t==="ar"?Wme():t==="es"?Kme():t==="hi"?Vme():t==="ko"?Qme():t==="ja"?Xme():t==="pl"?Yme():qme()}),Zme=e=>`Experiment filter: ${e==null?void 0:e.scope}`,Jme=e=>`实验筛选:${e==null?void 0:e.scope}`,ege=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,tge=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,rge=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,nge=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,sge=e=>`실험 필터: ${e==null?void 0:e.scope}`,oge=e=>`実験フィルター: ${e==null?void 0:e.scope}`,age=e=>`Filtr eksperymentów: ${e==null?void 0:e.scope}`,ige=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Jme(e):t==="fa"?ege(e):t==="ar"?tge(e):t==="es"?rge(e):t==="hi"?nge(e):t==="ko"?sge(e):t==="ja"?oge(e):t==="pl"?age(e):Zme(e)}),cge=()=>"Experiment view",lge=()=>"实验视图",uge=()=>"نمای آزمایش",_ge=()=>"عرض التجربة",fge=()=>"Vista de experimento",dge=()=>"प्रयोग व्यू",hge=()=>"실험 보기",pge=()=>"実験表示",mge=()=>"Widok eksperymentu",gge=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?lge():t==="fa"?uge():t==="ar"?_ge():t==="es"?fge():t==="hi"?dge():t==="ko"?hge():t==="ja"?pge():t==="pl"?mge():cge()}),vge=()=>"Experiments",bge=()=>"实验",yge=()=>"آزمایش‌ها",xge=()=>"التجارب",wge=()=>"Experimentos",kge=()=>"प्रयोग",jge=()=>"실험",Sge=()=>"実験",Cge=()=>"Eksperymenty",gD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?bge():t==="fa"?yge():t==="ar"?xge():t==="es"?wge():t==="hi"?kge():t==="ko"?jge():t==="ja"?Sge():t==="pl"?Cge():vge()}),zge=()=>"Files",Ege=()=>"文件",Nge=()=>"فایل‌ها",Age=()=>"الملفات",Tge=()=>"Archivos",Rge=()=>"फ़ाइलें",Mge=()=>"파일",Oge=()=>"ファイル",$ge=()=>"Pliki",G4=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ege():t==="fa"?Nge():t==="ar"?Age():t==="es"?Tge():t==="hi"?Rge():t==="ko"?Mge():t==="ja"?Oge():t==="pl"?$ge():zge()}),Dge=()=>"Filter experiments",Lge=()=>"筛选实验",Ige=()=>"فیلتر آزمایش‌ها",Pge=()=>"تصفية التجارب",Bge=()=>"Filtrar experimentos",Fge=()=>"प्रयोग फ़िल्टर करें",Hge=()=>"실험 필터링",qge=()=>"実験を絞り込む",Uge=()=>"Filtruj eksperymenty",Gge=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lge():t==="fa"?Ige():t==="ar"?Pge():t==="es"?Bge():t==="hi"?Fge():t==="ko"?Hge():t==="ja"?qge():t==="pl"?Uge():Dge()}),Wge=()=>"Current task filtering is unavailable for unattributed experiments",Kge=()=>"存在无法归属的实验时,不能按当前任务筛选",Vge=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",Qge=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",Xge=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",Yge=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",Zge=()=>"작업에 연결되지 않은 실험은 현재 작업 필터를 사용할 수 없습니다",Jge=()=>"タスクに紐付いていない実験では、現在のタスクによる絞り込みは利用できません",e0e=()=>"Filtrowanie według bieżącego zadania jest niedostępne dla eksperymentów bez przypisania",t0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kge():t==="fa"?Vge():t==="ar"?Qge():t==="es"?Xge():t==="hi"?Yge():t==="ko"?Zge():t==="ja"?Jge():t==="pl"?e0e():Wge()}),r0e=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",n0e=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",s0e=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",o0e=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",a0e=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",i0e=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",c0e=()=>"현재 작업에서 생성한 실험이 아직 없습니다. 전체 프로젝트로 전환하여 모든 실험을 확인하세요.",l0e=()=>"現在のタスクの実験はまだありません。プロジェクト全体に切り替えて、すべての実験を確認してください。",u0e=()=>"Brak eksperymentów w bieżącym zadaniu. Przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty.",_0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?n0e():t==="fa"?s0e():t==="ar"?o0e():t==="es"?a0e():t==="hi"?i0e():t==="ko"?c0e():t==="ja"?l0e():t==="pl"?u0e():r0e()}),f0e=()=>"Open a task to filter to its experiments",d0e=()=>"请打开一个任务以筛选其实验",h0e=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",p0e=()=>"افتح مهمة لعرض تجاربها فقط",m0e=()=>"Abre una tarea para filtrar por sus experimentos",g0e=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",v0e=()=>"작업을 열어 해당 실험만 표시",b0e=()=>"タスクを開いて、その実験に絞り込む",y0e=()=>"Otwórz zadanie, aby filtrować jego eksperymenty",x0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?d0e():t==="fa"?h0e():t==="ar"?p0e():t==="es"?m0e():t==="hi"?g0e():t==="ko"?v0e():t==="ja"?b0e():t==="pl"?y0e():f0e()}),w0e=()=>"projects",k0e=()=>"项目",j0e=()=>"پروژه‌ها",S0e=()=>"المشاريع",C0e=()=>"los proyectos",z0e=()=>"प्रोजेक्ट",E0e=()=>"프로젝트",N0e=()=>"プロジェクト",A0e=()=>"projekty",Gm=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?k0e():t==="fa"?j0e():t==="ar"?S0e():t==="es"?C0e():t==="hi"?z0e():t==="ko"?E0e():t==="ja"?N0e():t==="pl"?A0e():w0e()}),T0e=()=>"Restore panel",R0e=()=>"还原面板",M0e=()=>"بازگرداندن اندازهٔ پنل",O0e=()=>"استعادة اللوحة",$0e=()=>"Restaurar panel",D0e=()=>"पैनल वापस लाएं",L0e=()=>"패널 복원",I0e=()=>"パネルを復元",P0e=()=>"Przywróć panel",$9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?R0e():t==="fa"?M0e():t==="ar"?O0e():t==="es"?$0e():t==="hi"?D0e():t==="ko"?L0e():t==="ja"?I0e():t==="pl"?P0e():T0e()}),B0e=()=>"Retry",F0e=()=>"重试",H0e=()=>"تلاش دوباره",q0e=()=>"إعادة المحاولة",U0e=()=>"Reintentar",G0e=()=>"फिर से कोशिश करें",W0e=()=>"다시 시도",K0e=()=>"再試行",V0e=()=>"Ponów",Ks=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F0e():t==="fa"?H0e():t==="ar"?q0e():t==="es"?U0e():t==="hi"?G0e():t==="ko"?W0e():t==="ja"?K0e():t==="pl"?V0e():B0e()}),Q0e=()=>"Select a project to browse its files.",X0e=()=>"选择一个项目以浏览其文件。",Y0e=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Z0e=()=>"اختر مشروعًا لتصفح ملفاته.",J0e=()=>"Selecciona un proyecto para explorar sus archivos.",eve=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",tve=()=>"파일을 탐색할 프로젝트를 선택하세요.",rve=()=>"ファイルを閲覧するプロジェクトを選択してください。",nve=()=>"Wybierz projekt, aby przeglądać jego pliki.",sve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?X0e():t==="fa"?Y0e():t==="ar"?Z0e():t==="es"?J0e():t==="hi"?eve():t==="ko"?tve():t==="ja"?rve():t==="pl"?nve():Q0e()}),ove=()=>"settings",ave=()=>"设置",ive=()=>"تنظیمات",cve=()=>"الإعدادات",lve=()=>"la configuración",uve=()=>"सेटिंग्स",_ve=()=>"설정",fve=()=>"設定",dve=()=>"ustawienia",hve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ave():t==="fa"?ive():t==="ar"?cve():t==="es"?lve():t==="hi"?uve():t==="ko"?_ve():t==="ja"?fve():t==="pl"?dve():ove()}),pve=()=>"Show archived",mve=()=>"显示已归档",gve=()=>"نمایش بایگانی‌شده‌ها",vve=()=>"إظهار المؤرشف",bve=()=>"Mostrar archivados",yve=()=>"संग्रहीत दिखाएँ",xve=()=>"보관된 실험 표시",wve=()=>"アーカイブ済みを表示",kve=()=>"Pokaż zarchiwizowane",jve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mve():t==="fa"?gve():t==="ar"?vve():t==="es"?bve():t==="hi"?yve():t==="ko"?xve():t==="ja"?wve():t==="pl"?kve():pve()}),Sve=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,Cve=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,zve=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,Eve=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,Nve=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,Ave=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,Tve=e=>`OpenResearch ${e==null?void 0:e.items}을(를) 불러올 수 없습니다.`,Rve=e=>`OpenResearch の ${e==null?void 0:e.items} を読み込めませんでした。`,Mve=e=>`Nie udało się wczytać elementów OpenResearch: ${e==null?void 0:e.items}.`,Ove=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Cve(e):t==="fa"?zve(e):t==="ar"?Eve(e):t==="es"?Nve(e):t==="hi"?Ave(e):t==="ko"?Tve(e):t==="ja"?Rve(e):t==="pl"?Mve(e):Sve(e)}),$ve=()=>"Sub-agent",Dve=()=>"子智能体",Lve=()=>"عامل فرعی",Ive=()=>"وكيل فرعي",Pve=()=>"Subagente",Bve=()=>"सब-एजेंट",Fve=()=>"하위 에이전트",Hve=()=>"サブエージェント",qve=()=>"Podagent",Uve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dve():t==="fa"?Lve():t==="ar"?Ive():t==="es"?Pve():t==="hi"?Bve():t==="ko"?Fve():t==="ja"?Hve():t==="pl"?qve():$ve()}),Gve=()=>"Table",Wve=()=>"表格",Kve=()=>"جدول",Vve=()=>"جدول",Qve=()=>"Tabla",Xve=()=>"टेबल",Yve=()=>"표",Zve=()=>"表",Jve=()=>"Tabela",e1e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wve():t==="fa"?Kve():t==="ar"?Vve():t==="es"?Qve():t==="hi"?Xve():t==="ko"?Yve():t==="ja"?Zve():t==="pl"?Jve():Gve()}),t1e=()=>"Tree",r1e=()=>"树状图",n1e=()=>"درخت",s1e=()=>"شجرة",o1e=()=>"Árbol",a1e=()=>"ट्री",i1e=()=>"트리",c1e=()=>"ツリー",l1e=()=>"Drzewo",u1e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?r1e():t==="fa"?n1e():t==="ar"?s1e():t==="es"?o1e():t==="hi"?a1e():t==="ko"?i1e():t==="ja"?c1e():t==="pl"?l1e():t1e()}),_1e=e=>`Collapse ${e==null?void 0:e.name}`,f1e=e=>`折叠 ${e==null?void 0:e.name}`,d1e=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,h1e=e=>`طيّ ${e==null?void 0:e.name}`,p1e=e=>`Contraer ${e==null?void 0:e.name}`,m1e=e=>`${e==null?void 0:e.name} समेटें`,g1e=e=>`${e==null?void 0:e.name} 접기`,v1e=e=>`${e==null?void 0:e.name} を折りたたむ`,b1e=e=>`Zwiń folder ${e==null?void 0:e.name}`,y1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?f1e(e):t==="fa"?d1e(e):t==="ar"?h1e(e):t==="es"?p1e(e):t==="hi"?m1e(e):t==="ko"?g1e(e):t==="ja"?v1e(e):t==="pl"?b1e(e):_1e(e)}),x1e=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,w1e=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,k1e=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,j1e=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,S1e=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,C1e=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,z1e=e=>`결과물 디렉터리에서 “${e==null?void 0:e.path}”을(를) 삭제할까요?`,E1e=e=>`成果物ディレクトリから「${e==null?void 0:e.path}」を削除しますか?`,N1e=e=>`Usunąć „${e==null?void 0:e.path}” z katalogu artefaktów?`,Dj=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?w1e(e):t==="fa"?k1e(e):t==="ar"?j1e(e):t==="es"?S1e(e):t==="hi"?C1e(e):t==="ko"?z1e(e):t==="ja"?E1e(e):t==="pl"?N1e(e):x1e(e)}),A1e=e=>`Delete folder ${e==null?void 0:e.name}`,T1e=e=>`删除文件夹 ${e==null?void 0:e.name}`,R1e=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,M1e=e=>`حذف المجلد ${e==null?void 0:e.name}`,O1e=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,$1e=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,D1e=e=>`${e==null?void 0:e.name} 폴더 삭제`,L1e=e=>`フォルダー ${e==null?void 0:e.name} を削除`,I1e=e=>`Usuń folder ${e==null?void 0:e.name}`,P1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T1e(e):t==="fa"?R1e(e):t==="ar"?M1e(e):t==="es"?O1e(e):t==="hi"?$1e(e):t==="ko"?D1e(e):t==="ja"?L1e(e):t==="pl"?I1e(e):A1e(e)}),B1e=e=>`Expand ${e==null?void 0:e.name}`,F1e=e=>`展开 ${e==null?void 0:e.name}`,H1e=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,q1e=e=>`توسيع ${e==null?void 0:e.name}`,U1e=e=>`Expandir ${e==null?void 0:e.name}`,G1e=e=>`${e==null?void 0:e.name} फैलाएं`,W1e=e=>`${e==null?void 0:e.name} 펼치기`,K1e=e=>`${e==null?void 0:e.name} を展開`,V1e=e=>`Rozwiń folder ${e==null?void 0:e.name}`,Q1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?F1e(e):t==="fa"?H1e(e):t==="ar"?q1e(e):t==="es"?U1e(e):t==="hi"?G1e(e):t==="ko"?W1e(e):t==="ja"?K1e(e):t==="pl"?V1e(e):B1e(e)}),X1e=()=>"Binary or unsupported file — no inline preview.",Y1e=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",Z1e=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",J1e=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",ebe=()=>"Archivo binario o no compatible — sin vista previa.",tbe=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",rbe=()=>"바이너리 또는 지원하지 않는 파일은 인라인 미리보기를 지원하지 않습니다.",nbe=()=>"バイナリまたは未対応のファイルにはインラインプレビューがありません。",sbe=()=>"Plik binarny lub nieobsługiwany — podgląd jest niedostępny.",obe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y1e():t==="fa"?Z1e():t==="ar"?J1e():t==="es"?ebe():t==="hi"?tbe():t==="ko"?rbe():t==="ja"?nbe():t==="pl"?sbe():X1e()}),abe=()=>"Copy path",ibe=()=>"复制路径",cbe=()=>"کپی مسیر",lbe=()=>"نسخ المسار",ube=()=>"Copiar ruta",_be=()=>"पथ कॉपी करें",fbe=()=>"경로 복사",dbe=()=>"パスをコピー",hbe=()=>"Kopiuj ścieżkę",pbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ibe():t==="fa"?cbe():t==="ar"?lbe():t==="es"?ube():t==="hi"?_be():t==="ko"?fbe():t==="ja"?dbe():t==="pl"?hbe():abe()}),mbe=()=>"Artifact not found",gbe=()=>"找不到产物",vbe=()=>"خروجی پیدا نشد",bbe=()=>"لم يُعثر على المُخرَج",ybe=()=>"No se encontró el artefacto",xbe=()=>"आर्टिफ़ैक्ट नहीं मिला",wbe=()=>"결과물을 찾지 못했습니다",kbe=()=>"成果物が見つかりません",jbe=()=>"Nie znaleziono artefaktu",Sbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gbe():t==="fa"?vbe():t==="ar"?bbe():t==="es"?ybe():t==="hi"?xbe():t==="ko"?wbe():t==="ja"?kbe():t==="pl"?jbe():mbe()}),Cbe=()=>"Open raw",zbe=()=>"打开原始文件",Ebe=()=>"باز کردن فایل خام",Nbe=()=>"فتح الملف الخام",Abe=()=>"Abrir sin formato",Tbe=()=>"रॉ खोलें",Rbe=()=>"원본 열기",Mbe=()=>"元のファイルを開く",Obe=()=>"Otwórz surowy plik",$be=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zbe():t==="fa"?Ebe():t==="ar"?Nbe():t==="es"?Abe():t==="hi"?Tbe():t==="ko"?Rbe():t==="ja"?Mbe():t==="pl"?Obe():Cbe()}),Dbe=()=>"Click an artifact to view it",Lbe=()=>"点击产物即可查看",Ibe=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Pbe=()=>"انقر على مُخرَج لعرضه",Bbe=()=>"Selecciona un artefacto para verlo",Fbe=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",Hbe=()=>"결과물을 클릭하여 확인하세요",qbe=()=>"成果物をクリックして表示",Ube=()=>"Kliknij artefakt, aby go wyświetlić",Gbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lbe():t==="fa"?Ibe():t==="ar"?Pbe():t==="es"?Bbe():t==="hi"?Fbe():t==="ko"?Hbe():t==="ja"?qbe():t==="pl"?Ube():Dbe()}),Wbe=()=>"Delete artifact",Kbe=()=>"删除产物",Vbe=()=>"حذف خروجی",Qbe=()=>"حذف المُخرَج",Xbe=()=>"Eliminar artefacto",Ybe=()=>"आर्टिफ़ैक्ट हटाएं",Zbe=()=>"결과물 삭제",Jbe=()=>"成果物を削除",eye=()=>"Usuń artefakt",D9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kbe():t==="fa"?Vbe():t==="ar"?Qbe():t==="es"?Xbe():t==="hi"?Ybe():t==="ko"?Zbe():t==="ja"?Jbe():t==="pl"?eye():Wbe()}),tye=()=>"Delete folder",rye=()=>"删除文件夹",nye=()=>"حذف پوشه",sye=()=>"حذف المجلد",oye=()=>"Eliminar carpeta",aye=()=>"फ़ोल्डर हटाएं",iye=()=>"폴더 삭제",cye=()=>"フォルダーを削除",lye=()=>"Usuń folder",uye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rye():t==="fa"?nye():t==="ar"?sye():t==="es"?oye():t==="hi"?aye():t==="ko"?iye():t==="ja"?cye():t==="pl"?lye():tye()}),_ye=()=>"Failed to load:",fye=()=>"加载失败:",dye=()=>"بارگیری ناموفق بود:",hye=()=>"تعذّر التحميل:",pye=()=>"Error al cargar:",mye=()=>"लोड नहीं हो सका:",gye=()=>"불러오기 실패:",vye=()=>"読み込みに失敗:",bye=()=>"Nie udało się wczytać:",yye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fye():t==="fa"?dye():t==="ar"?hye():t==="es"?pye():t==="hi"?mye():t==="ko"?gye():t==="ja"?vye():t==="pl"?bye():_ye()}),xye=()=>"File truncated — showing the first 512 KB.",wye=()=>"文件已截断——仅显示前 512 KB。",kye=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",jye=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",Sye=()=>"Archivo truncado — se muestran los primeros 512 KB.",Cye=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",zye=()=>"파일이 잘렸습니다. 처음 512 KB만 표시합니다.",Eye=()=>"ファイルが省略されています。先頭の 512 KB を表示しています。",Nye=()=>"Plik został ucięty — wyświetlono pierwsze 512 KB.",Aye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wye():t==="fa"?kye():t==="ar"?jye():t==="es"?Sye():t==="hi"?Cye():t==="ko"?zye():t==="ja"?Eye():t==="pl"?Nye():xye()}),Tye=()=>"Listing truncated — the folder has more artifacts.",Rye=()=>"列表已截断——文件夹中还有更多产物。",Mye=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",Oye=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",$ye=()=>"Listado truncado — la carpeta tiene más artefactos.",Dye=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",Lye=()=>"목록이 잘렸습니다. 폴더에 더 많은 결과물이 있습니다.",Iye=()=>"一覧が省略されています。フォルダーには他にも成果物があります。",Pye=()=>"Lista została ucięta — folder zawiera więcej artefaktów.",Bye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rye():t==="fa"?Mye():t==="ar"?Oye():t==="es"?$ye():t==="hi"?Dye():t==="ko"?Lye():t==="ja"?Iye():t==="pl"?Pye():Tye()}),Fye=()=>"Loading…",Hye=()=>"正在加载…",qye=()=>"در حال بارگیری…",Uye=()=>"جارٍ التحميل…",Gye=()=>"Cargando…",Wye=()=>"लोड हो रहा है…",Kye=()=>"불러오는 중…",Vye=()=>"読み込み中…",Qye=()=>"Wczytywanie…",vD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hye():t==="fa"?qye():t==="ar"?Uye():t==="es"?Gye():t==="hi"?Wye():t==="ko"?Kye():t==="ja"?Vye():t==="pl"?Qye():Fye()}),Xye=()=>"Loading artifacts…",Yye=()=>"正在加载产物…",Zye=()=>"در حال بارگیری خروجی‌ها…",Jye=()=>"جارٍ تحميل المُخرَجات…",exe=()=>"Cargando artefactos…",txe=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",rxe=()=>"결과물 불러오는 중…",nxe=()=>"成果物を読み込み中…",sxe=()=>"Wczytywanie artefaktów…",oxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yye():t==="fa"?Zye():t==="ar"?Jye():t==="es"?exe():t==="hi"?txe():t==="ko"?rxe():t==="ja"?nxe():t==="pl"?sxe():Xye()}),axe=()=>"Modified",ixe=()=>"修改时间",cxe=()=>"ویرایش‌شده",lxe=()=>"عُدّل",uxe=()=>"Modificado",_xe=()=>"बदला गया",fxe=()=>"수정됨",dxe=()=>"変更済み",hxe=()=>"Zmodyfikowano",pxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ixe():t==="fa"?cxe():t==="ar"?lxe():t==="es"?uxe():t==="hi"?_xe():t==="ko"?fxe():t==="ja"?dxe():t==="pl"?hxe():axe()}),mxe=()=>"No artifacts yet",gxe=()=>"尚无产物",vxe=()=>"هنوز خروجی‌ای وجود ندارد",bxe=()=>"لا توجد مُخرَجات بعد",yxe=()=>"Aún no hay artefactos",xxe=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",wxe=()=>"아직 결과물이 없습니다",kxe=()=>"成果物はまだありません",jxe=()=>"Brak artefaktów",Sxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gxe():t==="fa"?vxe():t==="ar"?bxe():t==="es"?yxe():t==="hi"?xxe():t==="ko"?wxe():t==="ja"?kxe():t==="pl"?jxe():mxe()}),Cxe=()=>"Open raw in new tab",zxe=()=>"在新标签页中打开原始文件",Exe=()=>"باز کردن فایل خام در زبانهٔ جدید",Nxe=()=>"فتح الملف الخام في تبويب جديد",Axe=()=>"Abrir sin formato en una pestaña nueva",Txe=()=>"नए टैब में रॉ खोलें",Rxe=()=>"새 탭에서 원본 열기",Mxe=()=>"新しいタブで元のファイルを開く",Oxe=()=>"Otwórz surowy plik w nowej karcie",L9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zxe():t==="fa"?Exe():t==="ar"?Nxe():t==="es"?Axe():t==="hi"?Txe():t==="ko"?Rxe():t==="ja"?Mxe():t==="pl"?Oxe():Cxe()}),$xe=()=>"This is the project's durable output space for reports, figures, images, CSVs, PDFs, and other research artifacts. Ask the agent for a write-up or add your own files.",Dxe=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",Lxe=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",Ixe=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",Pxe=()=>"Este es el espacio de resultados permanente del proyecto: informes, figuras, imágenes, CSV, PDF y otros artefactos de investigación. Pídele al agente un informe o añade tus propios archivos.",Bxe=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",Fxe=()=>"보고서, 그림, 이미지, CSV, PDF 등 연구 결과물을 영구 보관하는 프로젝트 공간입니다. 에이전트에게 문서 작성을 요청하거나 직접 파일을 추가하세요.",Hxe=()=>"レポート、図、画像、CSV、PDF などの研究成果物を永続的に保存するプロジェクトの領域です。エージェントに文書の作成を依頼するか、ファイルを追加してください。",qxe=()=>"To miejsce na trwałe wyniki projektu: raporty, wykresy, obrazy, pliki CSV, PDF i inne artefakty badawcze. Poproś agenta o przygotowanie opracowania lub dodaj własne pliki.",Uxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dxe():t==="fa"?Lxe():t==="ar"?Ixe():t==="es"?Pxe():t==="hi"?Bxe():t==="ko"?Fxe():t==="ja"?Hxe():t==="pl"?qxe():$xe()}),Gxe=()=>"File too large to preview inline.",Wxe=()=>"文件太大,无法内嵌预览。",Kxe=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",Vxe=()=>"الملف كبير جدًا للمعاينة المضمّنة.",Qxe=()=>"El archivo es demasiado grande para previsualizarlo.",Xxe=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",Yxe=()=>"파일이 너무 커서 인라인 미리보기를 할 수 없습니다.",Zxe=()=>"ファイルが大きすぎるためインラインプレビューできません。",Jxe=()=>"Plik jest za duży, aby wyświetlić podgląd.",ewe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wxe():t==="fa"?Kxe():t==="ar"?Vxe():t==="es"?Qxe():t==="hi"?Xxe():t==="ko"?Yxe():t==="ja"?Zxe():t==="pl"?Jxe():Gxe()}),twe=()=>"This is the baseline branch, so there is no parent comparison.",rwe=()=>"这是基线分支,因此没有父分支可供比较。",nwe=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",swe=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",owe=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",awe=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",iwe=()=>"베이스라인 브랜치이므로 상위 브랜치와 비교할 수 없습니다.",cwe=()=>"これはベースラインブランチのため、親との比較はありません。",lwe=()=>"To gałąź bazowa, więc nie ma gałęzi nadrzędnej do porównania.",uwe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rwe():t==="fa"?nwe():t==="ar"?swe():t==="es"?owe():t==="hi"?awe():t==="ko"?iwe():t==="ja"?cwe():t==="pl"?lwe():twe()}),_we=()=>"Failed to load changes:",fwe=()=>"加载更改失败:",dwe=()=>"بارگیری تغییرات ناموفق بود:",hwe=()=>"تعذّر تحميل التغييرات:",pwe=()=>"Error al cargar los cambios:",mwe=()=>"बदलाव लोड नहीं हो सके:",gwe=()=>"변경 사항 불러오기 실패:",vwe=()=>"変更の読み込みに失敗:",bwe=()=>"Nie udało się wczytać zmian:",ywe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fwe():t==="fa"?dwe():t==="ar"?hwe():t==="es"?pwe():t==="hi"?mwe():t==="ko"?gwe():t==="ja"?vwe():t==="pl"?bwe():_we()}),xwe=()=>"Loading changes…",wwe=()=>"正在加载更改…",kwe=()=>"در حال بارگیری تغییرات…",jwe=()=>"جارٍ تحميل التغييرات…",Swe=()=>"Cargando cambios…",Cwe=()=>"बदलाव लोड हो रहे हैं…",zwe=()=>"변경 사항 불러오는 중…",Ewe=()=>"変更を読み込み中…",Nwe=()=>"Wczytywanie zmian…",Awe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wwe():t==="fa"?kwe():t==="ar"?jwe():t==="es"?Swe():t==="hi"?Cwe():t==="ko"?zwe():t==="ja"?Ewe():t==="pl"?Nwe():xwe()}),Twe=()=>"No committed changes from the parent branch.",Rwe=()=>"与父分支相比没有已提交的更改。",Mwe=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",Owe=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",$we=()=>"No hay cambios confirmados respecto a la rama padre.",Dwe=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",Lwe=()=>"상위 브랜치 대비 커밋된 변경 사항이 없습니다.",Iwe=()=>"親ブランチからのコミット済みの変更はありません。",Pwe=()=>"Brak zatwierdzonych zmian względem gałęzi nadrzędnej.",Bwe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rwe():t==="fa"?Mwe():t==="ar"?Owe():t==="es"?$we():t==="hi"?Dwe():t==="ko"?Lwe():t==="ja"?Iwe():t==="pl"?Pwe():Twe()}),Fwe=e=>`chat ${e==null?void 0:e.number}`,Hwe=e=>`聊天 ${e==null?void 0:e.number}`,qwe=e=>`گفتگو ${e==null?void 0:e.number}`,Uwe=e=>`محادثة ${e==null?void 0:e.number}`,Gwe=e=>`chat ${e==null?void 0:e.number}`,Wwe=e=>`चैट ${e==null?void 0:e.number}`,Kwe=e=>`채팅 ${e==null?void 0:e.number}`,Vwe=e=>`チャット ${e==null?void 0:e.number}`,Qwe=e=>`czat ${e==null?void 0:e.number}`,I9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Hwe(e):t==="fa"?qwe(e):t==="ar"?Uwe(e):t==="es"?Gwe(e):t==="hi"?Wwe(e):t==="ko"?Kwe(e):t==="ja"?Vwe(e):t==="pl"?Qwe(e):Fwe(e)}),Xwe=()=>"agent sessions",Ywe=()=>"智能体会话",Zwe=()=>"نشست‌های عامل‌ها",Jwe=()=>"جلسات الوكلاء",e2e=()=>"sesiones de agente",t2e=()=>"एजेंट सेशन",r2e=()=>"에이전트 세션",n2e=()=>"エージェントのセッション",s2e=()=>"sesje agentów",o2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ywe():t==="fa"?Zwe():t==="ar"?Jwe():t==="es"?e2e():t==="hi"?t2e():t==="ko"?r2e():t==="ja"?n2e():t==="pl"?s2e():Xwe()}),a2e=()=>"All sessions",i2e=()=>"所有会话",c2e=()=>"همهٔ نشست‌ها",l2e=()=>"كل الجلسات",u2e=()=>"Todas las sesiones",_2e=()=>"सभी सेशन",f2e=()=>"모든 세션",d2e=()=>"すべてのセッション",h2e=()=>"Wszystkie sesje",bD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i2e():t==="fa"?c2e():t==="ar"?l2e():t==="es"?u2e():t==="hi"?_2e():t==="ko"?f2e():t==="ja"?d2e():t==="pl"?h2e():a2e()}),p2e=e=>`${e==null?void 0:e.count} annotations`,m2e=e=>`${e==null?void 0:e.count} 条批注`,g2e=e=>`${e==null?void 0:e.count} یادداشت`,v2e=e=>`التعليقات: ${e==null?void 0:e.count}`,b2e=e=>`${e==null?void 0:e.count} anotaciones`,y2e=e=>`${e==null?void 0:e.count} एनोटेशन`,x2e=e=>`주석 ${e==null?void 0:e.count}개`,w2e=e=>`${e==null?void 0:e.count} 件の注釈`,k2e=e=>`Adnotacje: ${e==null?void 0:e.count}`,j2e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?m2e(e):t==="fa"?g2e(e):t==="ar"?v2e(e):t==="es"?b2e(e):t==="hi"?y2e(e):t==="ko"?x2e(e):t==="ja"?w2e(e):t==="pl"?k2e(e):p2e(e)}),S2e=()=>"Archive",C2e=()=>"归档",z2e=()=>"بایگانی",E2e=()=>"أرشفة",N2e=()=>"Archivar",A2e=()=>"आर्काइव करें",T2e=()=>"보관",R2e=()=>"アーカイブ",M2e=()=>"Archiwizuj",O2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?C2e():t==="fa"?z2e():t==="ar"?E2e():t==="es"?N2e():t==="hi"?A2e():t==="ko"?T2e():t==="ja"?R2e():t==="pl"?M2e():S2e()}),$2e=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",D2e=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",L2e=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",I2e=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",P2e=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",B2e=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",F2e=()=>"연구 에이전트에 질문… (명령과 스킬은 /, 셸은 !)",H2e=()=>"研究エージェントに質問…(/ でコマンドとスキル、! でシェル)",q2e=()=>"Zapytaj agenta badawczego… (/ — polecenia i umiejętności, ! — powłoka)",U2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?D2e():t==="fa"?L2e():t==="ar"?I2e():t==="es"?P2e():t==="hi"?B2e():t==="ko"?F2e():t==="ja"?H2e():t==="pl"?q2e():$2e()}),G2e=()=>"Asked about selected text",W2e=()=>"已询问所选文本",K2e=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",V2e=()=>"سأل عن النص المحدد",Q2e=()=>"Preguntó sobre el texto seleccionado",X2e=()=>"चयनित टेक्स्ट के बारे में पूछा",Y2e=()=>"선택한 텍스트에 대해 질문함",Z2e=()=>"選択したテキストについて質問しました",J2e=()=>"Zapytano o zaznaczony tekst",eke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W2e():t==="fa"?K2e():t==="ar"?V2e():t==="es"?Q2e():t==="hi"?X2e():t==="ko"?Y2e():t==="ja"?Z2e():t==="pl"?J2e():G2e()}),tke=()=>"Attachment",rke=()=>"附件",nke=()=>"پیوست",ske=()=>"مرفق",oke=()=>"Adjunto",ake=()=>"अटैचमेंट",ike=()=>"첨부 파일",cke=()=>"添付ファイル",lke=()=>"Załącznik",uke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rke():t==="fa"?nke():t==="ar"?ske():t==="es"?oke():t==="hi"?ake():t==="ko"?ike():t==="ja"?cke():t==="pl"?lke():tke()}),_ke=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,fke=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,dke=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,hke=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,pke=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,mke=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,gke=e=>`${e==null?void 0:e.name} 파일이 너무 큽니다. 첨부 파일당 크기는 30 MB 미만이어야 합니다.`,vke=e=>`${e==null?void 0:e.name} が大きすぎます。各添付ファイルは 30 MB 未満である必要があります。`,bke=e=>`${e==null?void 0:e.name} jest za duży — każdy załącznik musi mieć mniej niż 30 MB.`,yke=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fke(e):t==="fa"?dke(e):t==="ar"?hke(e):t==="es"?pke(e):t==="hi"?mke(e):t==="ko"?gke(e):t==="ja"?vke(e):t==="pl"?bke(e):_ke(e)}),xke=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",wke=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",kke=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",jke=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",Ske=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",Cke=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",zke=()=>"첨부 파일의 총 크기가 40 MB를 초과합니다. 하나를 제거한 뒤 다시 시도하세요.",Eke=()=>"添付ファイルの合計が上限の 40 MB を超えています。1 つ削除して再試行してください。",Nke=()=>"Załączniki przekraczają łączny limit 40 MB — usuń jeden z nich i spróbuj ponownie.",Ake=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wke():t==="fa"?kke():t==="ar"?jke():t==="es"?Ske():t==="hi"?Cke():t==="ko"?zke():t==="ja"?Eke():t==="pl"?Nke():xke()}),Tke=()=>"Wait for the turn to finish before running a command.",Rke=()=>"请等待本轮结束后再运行命令。",Mke=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",Oke=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",$ke=()=>"Espera a que termine el turno antes de ejecutar un comando.",Dke=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",Lke=()=>"명령을 실행하기 전에 턴이 끝날 때까지 기다리세요.",Ike=()=>"コマンドを実行する前に、ターンの完了を待ってください。",Pke=()=>"Poczekaj na zakończenie odpowiedzi przed uruchomieniem polecenia.",Bke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rke():t==="fa"?Mke():t==="ar"?Oke():t==="es"?$ke():t==="hi"?Dke():t==="ko"?Lke():t==="ja"?Ike():t==="pl"?Pke():Tke()}),Fke=e=>`Exited with code ${e==null?void 0:e.code}`,Hke=e=>`退出码 ${e==null?void 0:e.code}`,qke=e=>`با کد ${e==null?void 0:e.code} خارج شد`,Uke=e=>`خرج برمز ${e==null?void 0:e.code}`,Gke=e=>`Terminó con el código ${e==null?void 0:e.code}`,Wke=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,Kke=e=>`코드 ${e==null?void 0:e.code}로 종료됨`,Vke=e=>`コード ${e==null?void 0:e.code} で終了`,Qke=e=>`Zakończono z kodem ${e==null?void 0:e.code}`,Xke=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Hke(e):t==="fa"?qke(e):t==="ar"?Uke(e):t==="es"?Gke(e):t==="hi"?Wke(e):t==="ko"?Kke(e):t==="ja"?Vke(e):t==="pl"?Qke(e):Fke(e)}),Yke=e=>`Command not run: ${e==null?void 0:e.error}`,Zke=e=>`命令未运行:${e==null?void 0:e.error}`,Jke=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,e4e=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,t4e=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,r4e=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,n4e=e=>`명령이 실행되지 않았습니다: ${e==null?void 0:e.error}`,s4e=e=>`コマンドは実行されませんでした: ${e==null?void 0:e.error}`,o4e=e=>`Nie uruchomiono polecenia: ${e==null?void 0:e.error}`,P9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Zke(e):t==="fa"?Jke(e):t==="ar"?e4e(e):t==="es"?t4e(e):t==="hi"?r4e(e):t==="ko"?n4e(e):t==="ja"?s4e(e):t==="pl"?o4e(e):Yke(e)}),a4e=()=>"Collapse tool activity",i4e=()=>"折叠工具活动",c4e=()=>"بستن فعالیت ابزارها",l4e=()=>"طيّ نشاط الأداة",u4e=()=>"Contraer actividad de herramientas",_4e=()=>"टूल गतिविधि समेटें",f4e=()=>"도구 활동 접기",d4e=()=>"ツールのアクティビティを折りたたむ",h4e=()=>"Zwiń działania narzędzi",p4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i4e():t==="fa"?c4e():t==="ar"?l4e():t==="es"?u4e():t==="hi"?_4e():t==="ko"?f4e():t==="ja"?d4e():t==="pl"?h4e():a4e()}),m4e=()=>"Wait for the turn to finish before compacting.",g4e=()=>"请等待本轮结束后再压缩。",v4e=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",b4e=()=>"انتظر انتهاء الجولة قبل الضغط.",y4e=()=>"Espera a que termine el turno antes de comprimir.",x4e=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",w4e=()=>"압축하기 전에 턴이 끝날 때까지 기다리세요.",k4e=()=>"圧縮する前にターンの完了を待ってください。",j4e=()=>"Poczekaj na zakończenie odpowiedzi przed skróceniem kontekstu.",S4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?g4e():t==="fa"?v4e():t==="ar"?b4e():t==="es"?y4e():t==="hi"?x4e():t==="ko"?w4e():t==="ja"?k4e():t==="pl"?j4e():m4e()}),C4e=e=>`Compacting failed: ${e==null?void 0:e.error}`,z4e=e=>`压缩失败:${e==null?void 0:e.error}`,E4e=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,N4e=e=>`فشل الضغط: ${e==null?void 0:e.error}`,A4e=e=>`Error al comprimir: ${e==null?void 0:e.error}`,T4e=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,R4e=e=>`압축 실패: ${e==null?void 0:e.error}`,M4e=e=>`圧縮に失敗: ${e==null?void 0:e.error}`,O4e=e=>`Nie udało się skrócić kontekstu: ${e==null?void 0:e.error}`,$4e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?z4e(e):t==="fa"?E4e(e):t==="ar"?N4e(e):t==="es"?A4e(e):t==="hi"?T4e(e):t==="ko"?R4e(e):t==="ja"?M4e(e):t==="pl"?O4e(e):C4e(e)}),D4e=()=>"Continue",L4e=()=>"继续",I4e=()=>"ادامه",P4e=()=>"متابعة",B4e=()=>"Continuar",F4e=()=>"जारी रखें",H4e=()=>"계속",q4e=()=>"続行",U4e=()=>"Kontynuuj",G4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?L4e():t==="fa"?I4e():t==="ar"?P4e():t==="es"?B4e():t==="hi"?F4e():t==="ko"?H4e():t==="ja"?q4e():t==="pl"?U4e():D4e()}),W4e=()=>"Copy response",K4e=()=>"复制回复",V4e=()=>"کپی پاسخ",Q4e=()=>"نسخ الرد",X4e=()=>"Copiar respuesta",Y4e=()=>"जवाब कॉपी करें",Z4e=()=>"응답 복사",J4e=()=>"応答をコピー",e3e=()=>"Kopiuj odpowiedź",B9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?K4e():t==="fa"?V4e():t==="ar"?Q4e():t==="es"?X4e():t==="hi"?Y4e():t==="ko"?Z4e():t==="ja"?J4e():t==="pl"?e3e():W4e()}),t3e=e=>`Delete “${e==null?void 0:e.title}”? + */var v9;function PQ(){if(v9)return x2;v9=1;var e=s0(),r=IQ();function t(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var n=typeof Object.is=="function"?Object.is:t,s=r.useSyncExternalStore,o=e.useRef,a=e.useEffect,i=e.useMemo,c=e.useDebugValue;return x2.useSyncExternalStoreWithSelector=function(u,d,_,p,m){var k=o(null);if(k.current===null){var w={hasValue:!1,value:null};k.current=w}else w=k.current;k=i(function(){function b(N){if(!x){if(x=!0,y=N,N=p(N),m!==void 0&&w.hasValue){var A=w.value;if(m(A,N))return S=A}return S=N}if(A=S,n(y,N))return A;var z=p(N);return m!==void 0&&m(A,z)?(y=N,A):(y=N,S=z)}var x=!1,y,S,E=_===void 0?null:_;return[function(){return b(d())},E===null?void 0:function(){return b(E())}]},[d,_,p,m]);var v=s(u,k[0],k[1]);return a(function(){w.hasValue=!0,w.value=v},[v]),c(v),v},x2}var b9;function BQ(){return b9||(b9=1,y2.exports=PQ()),y2.exports}var Q$=BQ();const FQ=n0(Q$);function HQ(e,r){return e===r}function qc(e,r,t=HQ){const n=T.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:i}=e.subscribe(a);return i},[e]),s=T.useCallback(()=>e==null?void 0:e.get(),[e]);return Q$.useSyncExternalStoreWithSelector(n,s,s,r,t)}var y9={};function Tj(e,r){const t=T.useRef();return n=>{const s=e!=null&&e.select?e.select(n):n;return(e==null?void 0:e.structuralSharing)??r.options.defaultStructuralSharing?t.current=bf(t.current,s):s}}function fd(e){const r=Vo(),t=T.useContext(e.from?AQ:my),n=e.from??t,s=r.stores.getMatchStore(n),o=Tj(e,r),a=qc(s,i=>i?o(i):y9);if(a!==y9)return a;(e.shouldThrow??!0)&&wj()}function X$(e){return fd({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:r=>e.select?e.select(r.loaderData):r.loaderData})}function Y$(e){const{select:r,...t}=e;return fd({...t,select:n=>r?r(n.loaderDeps):n.loaderDeps})}function Z$(e){return fd({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:r=>{const t=e.strict===!1?r.params:r._strictParams;return e.select?e.select(t):t}})}function J$(e){return fd({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:r=>e.select?e.select(r.search):r.search})}function a0(e){const r=Vo();return T.useCallback(t=>r.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,r])}function Rj(e){return fd({...e,select:r=>e.select?e.select(r.context):r.context})}function j2(e){const r=T.useRef(e);return m_(r.current,e,{ignoreUndefined:!1})||(r.current=e),r.current}function qQ(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]}function UQ(e,r,t){if(e!=null&&e.external)return sb(e.href,t)?void 0:e.href;if(!YQ(r)&&!(typeof r!="string"||r.indexOf(":")===-1))try{return new URL(r),sb(r,t)?void 0:r}catch{}}function GQ(e,r,t,n,s,o){if(o)return!1;if(t!=null&&t.exact){if(!BV(e.pathname,r.pathname,n))return!1}else{const a=ab(e.pathname,n),i=ab(r.pathname,n);if(!(a.startsWith(i)&&(a.length===i.length||a[i.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!m_(e.search,r.search,{partial:!(t!=null&&t.exact),ignoreUndefined:!(t!=null&&t.explicitUndefined)})?!1:t!=null&&t.includeHash?s&&e.hash===r.hash:!0}function WQ(e,r){const t=Vo(),n=wV(r),{activeProps:s,inactiveProps:o,activeOptions:a,to:i,preload:c,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:_,replace:p,startTransition:m,resetScroll:k,viewTransition:w,children:v,target:b,disabled:x,style:y,className:S,onClick:E,onBlur:N,onFocus:A,onMouseEnter:z,onMouseLeave:M,onTouchStart:$,ignoreBlocker:D,params:I,search:G,hash:F,state:Q,mask:K,reloadDocument:J,unsafeRelative:ee,from:P,_fromLocation:L,...H}=e,q=G$(),U=j2(e.search),oe=j2(e.params),ie=j2(a),ce=T.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,U,oe,e.state,e.mask,e.unsafeRelative]),re=T.useCallback(De=>{const ct=t.buildLocation({_fromLocation:De,...ce}),lt=XQ(ct.maskedLocation?ct.maskedLocation.publicHref:ct.publicHref,ct.maskedLocation?ct.maskedLocation.external:ct.external,t.history,x),xe=UQ(lt,i,t.protocolAllowlist);return[lt==null?void 0:lt.href,xe,GQ(De,ct,ie,t.basepath,q,xe!==void 0)]},[ie,x,q,ce,t,i]),[W,ae,le]=qc(t.stores.location,re,qQ),me=le?tp(s,{})??KQ:S2,be=le?S2:tp(o,{})??S2,Se=[S,me.className,be.className].filter(Boolean).join(" "),Be=(y||me.style||be.style)&&{...y,...me.style,...be.style},Xe=T.useRef(!1),Me=e.reloadDocument||ae||x?!1:c??t.options.defaultPreload,Fe=u??t.options.defaultPreloadDelay??0,pt=T.useCallback(()=>{t.preloadRoute(ce).catch(De=>{console.warn(De),console.warn(SQ)})},[t,ce]),Ct=T.useCallback(De=>{if(!De){C2(n);return}if(!(De.isIntersecting??Me==="intent")){De.isIntersecting===!1&&C2(n);return}if(!Fe){pt();return}Um.has(n)||Um.set(n,setTimeout(()=>{Um.delete(n),pt()},Fe))},[pt,n,Me,Fe]);xV(n,Ct,Me!=="viewport"),T.useEffect(()=>{Xe.current||Me==="render"&&(pt(),Xe.current=!0)},[pt,Me]);const Vt=De=>{const ct=De.currentTarget.getAttribute("target"),lt=b!==void 0?b:ct;!x&&!(De.metaKey||De.altKey||De.ctrlKey||De.shiftKey)&&!De.defaultPrevented&&(!lt||lt==="_self")&&De.button===0&&(De.preventDefault(),t.navigate({...ce,replace:p,resetScroll:k,hashScrollIntoView:_,startTransition:m,viewTransition:w,ignoreBlocker:D}))};if(ae)return{...H,ref:n,href:ae,...v&&{children:v},...b&&{target:b},...x&&{disabled:x},...y&&{style:y},...S&&{className:S},...E&&{onClick:E},...N&&{onBlur:N},...A&&{onFocus:A},...z&&{onMouseEnter:z},...M&&{onMouseLeave:M},...$&&{onTouchStart:$}};const Ut=()=>{Me==="intent"&&pt()},Gt=()=>{Me==="intent"&&C2(n)};return{...H,...me,...be,href:W,ref:n,onClick:th([E,Vt]),onBlur:th([N,Gt]),onFocus:th([A,Ct]),onMouseEnter:th([z,Ct]),onMouseLeave:th([M,Gt]),onTouchStart:th([$,Ut]),disabled:!!x,target:b,...Be&&{style:Be},...Se&&{className:Se},...x&&VQ,...le&&QQ}}var S2={},KQ={className:"active"},VQ={role:"link","aria-disabled":!0},QQ={"data-status":"active","aria-current":"page"},Um=new WeakMap,C2=e=>{clearTimeout(Um.get(e)),Um.delete(e)},th=e=>r=>{for(const t of e)if(t){if(r.defaultPrevented)return;t(r)}};function XQ(e,r,t,n){if(!n)return r?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function YQ(e){if(typeof e!="string")return!1;const r=e.charCodeAt(0);return r===47?e.charCodeAt(1)!==47:r===46}var gy=T.forwardRef((e,r)=>{const{_asChild:t,...n}=e,{type:s,...o}=WQ(n,r),a=typeof n.children=="function"?n.children({isActive:o["data-status"]==="active"}):n.children;if(!t){const{disabled:i,...c}=o;return T.createElement("a",c,a)}return T.createElement(t,o,a)}),ZQ=class extends U${constructor(r){super(r),this.useMatch=t=>fd({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Rj({...t,from:this.id}),this.useSearch=t=>J$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Z$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Y$({...t,from:this.id}),this.useLoaderData=t=>X$({...t,from:this.id}),this.useNavigate=()=>a0({from:this.fullPath}),this.Link=st.forwardRef((t,n)=>f.jsx(gy,{ref:n,from:this.fullPath,...t}))}};function JQ(e){return new ZQ(e)}function eX(){return e=>rX(e)}var tX=class extends CQ{constructor(e){super(e),this.useMatch=r=>fd({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Rj({...r,from:this.id}),this.useSearch=r=>J$({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Z$({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Y$({...r,from:this.id}),this.useLoaderData=r=>X$({...r,from:this.id}),this.useNavigate=()=>a0({from:this.fullPath}),this.Link=st.forwardRef((r,t)=>f.jsx(gy,{ref:t,from:this.fullPath,...r}))}};function rX(e){return new tX(e)}function Xc(e){return r=>{const t=JQ(r);return t.isRoot=!1,t}}function nX(e){const r=Vo(),t=`not-found-${qc(r.stores.location,n=>n.pathname)}-${qc(r.stores.status,n=>n)}`;return f.jsx(Aj,{getResetKey:()=>t,onCatch:(n,s)=>{var o;if(rp(n))(o=e.onCatch)==null||o.call(e,n,s);else throw n},errorComponent:({error:n})=>{var s;if(rp(n))return(s=e.fallback)==null?void 0:s.call(e,n);throw n},children:e.children})}function sX(){return f.jsx("p",{children:"Not Found"})}function uh(e){return f.jsx(f.Fragment,{children:e.children})}function eD(e,r,t){return r.options.notFoundComponent?f.jsx(r.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...t}):f.jsx(sX,{})}function vy(e,r){const t=(r==null?void 0:r.options.pendingComponent)??e.options.defaultPendingComponent;return t?f.jsx(t,{}):null}var oX=(e,r)=>e[0]===r[0]&&e[1]===r[1],tD=(e,r,t)=>!r.isRoot||r.options.shellComponent||r.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,rD=T.memo(function({routeId:r}){const t=Vo();return f.jsx(aX,{router:t,match:qc(t.stores.getMatchStore(r),n=>n)})});function aX({router:e,match:r}){var _,p;const t=e.routesById[r.routeId],n=vy(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,o=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((_=e.options.notFoundRoute)==null?void 0:_.options.component):t.options.notFoundComponent,i=r.ssr===!1||r.ssr==="data-only",c=tD(e,t,r.ssr)&&(t.options.wrapInSuspense??n??(((p=t.options.errorComponent)==null?void 0:p.preload)||i))?T.Suspense:uh,u=s?Aj:uh,d=a?nX:uh;return f.jsxs(t.isRoot?t.options.shellComponent??uh:uh,{children:[f.jsx(my.Provider,{value:r.routeId,children:f.jsx(c,{fallback:n,children:f.jsx(u,{getResetKey:()=>r,errorComponent:s,onCatch:(m,k)=>{if(rp(m))throw m.routeId??(m.routeId=r.routeId),m;o==null||o(m,k)},children:f.jsx(d,{fallback:m=>{if(m.routeId??(m.routeId=r.routeId),m.routeId!==r.routeId)throw m;return T.createElement(a,m)},children:i?f.jsx(EQ,{fallback:n,children:f.jsx(x9,{match:r})}):f.jsx(x9,{match:r})})})})}),null]})}var x9=T.memo(function({match:r}){const t=Vo(),n=r.routeId,s=t.routesById[n],o=T.useMemo(()=>{var c;const i=(c=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:c({routeId:n,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return i?JSON.stringify(i):void 0},[n,r.loaderDeps,r._strictParams,r._strictSearch,s.options.remountDeps,t.options.defaultRemountDeps]),a=T.useMemo(()=>{const i=s.options.component??t.options.defaultComponent;return i?f.jsx(i,{},o):f.jsx(lg,{})},[o,s.options.component,t.options.defaultComponent]);if(r.status==="pending"){if(t.ssr&&!tD(t,s,r.ssr))return a;if(t._tx)throw t._tx[5];return vy(t,s)}if(r.status==="notFound")return eD(t,s,r.error);if(r.status==="error")throw r.error;return a}),lg=T.memo(function(){const r=Vo(),t=T.useContext(my);let n,s,o;{const i=r.stores.getMatchStore(t);[n,s]=qc(i,c=>[!!c._notFound,c.error],oX),o=qc(r.stores.ids,c=>c[c.indexOf(t)+1])}if(n)return eD(r,r.routesById[t],s);if(!o)return null;const a=f.jsx(rD,{routeId:o});return t===Sh?f.jsx(T.Suspense,{fallback:vy(r),children:a}):a});function nD(e,r){const t=e[1];e.length=0,t==null||t(r)}function iX({t:e}){const r=Vo(),t=r._rendered??(r._rendered=[]);return r.startTransition=(n,s)=>new Promise(o=>{nD(t,!1),t.push(s,o),e(r),T.startTransition(n)}),C$(()=>{const n=r.history.subscribe(r.load);r.updateLatestLocation();const s=r.latestLocation,o=r.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Kl(s.publicHref)!==Kl(o.publicHref))return r.commitLocation({...o,replace:!0,ignoreBlocker:!0}),n;const a=r.stores.resolvedLocation.get();return(a==null?void 0:a.href)===s.href&&a.state.__TSR_key===s.state.__TSR_key?t.push(r.stores.matches.get(),i=>{i&&r.emit({type:"onRendered",...hy(a,a)})}):r._tx||r.load({sync:!0}).catch(console.error),n},[r,r.history]),null}function cX(){const e=Vo(),r=e.routesById[Sh],t=vy(e,r),n=e.ssr?uh:T.Suspense,s=f.jsxs(f.Fragment,{children:[f.jsx(iX,{t:T.useState()[1]}),f.jsx(n,{fallback:t,children:f.jsx(lX,{})})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:s}):s}function lX(){const e=Vo(),r=e._rendered,t=qc(e.stores.matches,a=>r[0]??a),n=t[0],s=n==null?void 0:n.routeId;C$(()=>{r[0]===t&&nD(r,!0)},[r,t]);const o=s?f.jsx(rD,{routeId:s}):null;return f.jsx(my.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?o:f.jsx(Aj,{getResetKey:()=>n,onCatch:void 0,children:o})})}var uX=e=>({createMutableStore:p9,createReadonlyStore:p9,batch:$Q}),_X=e=>new fX(e),fX=class extends fQ{constructor(e){super(e,uX)}};function dX({router:e,children:r,...t}){E$(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const n=f.jsx(W$.Provider,{value:e,children:r});return e.options.Wrap?f.jsx(e.options.Wrap,{children:n}):n}function hX({router:e,...r}){return f.jsx(dX,{router:e,...r,children:f.jsx(cX,{})})}function pX(e,r){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function")return{shouldBlockFn:async()=>await e(),enableBeforeUnload:!0,withResolver:!1};const t=!!(e.condition??!0),n=e.blockerFn;return{shouldBlockFn:async()=>t&&n!==void 0?await n():t,enableBeforeUnload:t,withResolver:n===void 0}}function mX(e,r){const{shouldBlockFn:t,enableBeforeUnload:n=!0,disabled:s=!1,withResolver:o=!1}=pX(e),a=Vo(),{history:i}=a,[c,u]=T.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return T.useEffect(()=>{const d=async _=>{function p(b){const x=a.parseLocation(b),[,y,S]=a.getMatchedRoutes(x.pathname);return S===void 0?{routeId:"__notFound__",fullPath:x.pathname,pathname:x.pathname,params:y,search:a.options.parseSearch(b.search)}:{routeId:S.id,fullPath:S.fullPath,pathname:x.pathname,params:y,search:a.options.parseSearch(b.search)}}const m=p(_.currentLocation),k=p(_.nextLocation);if(m.routeId==="__notFound__"&&k.routeId!=="__notFound__")return!1;const w=await t({action:_.action,current:m,next:k});if(!o)return w;if(!w)return!1;const v=await new Promise(b=>{u({status:"blocked",current:m,next:k,action:_.action,proceed:()=>b(!1),reset:()=>b(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return s?void 0:i.block({blockerFn:d,enableBeforeUnload:n})},[t,n,s,o,i,a]),c}function sD(e){const r=Vo({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||r;return qc(t.stores.__store,Tj(e,t))}function gX(e){const r=Vo();return qc(r.stores.location,Tj(e,r))}const ub=new WeakMap,M1=new WeakMap;function yi(e,r,t="*"){var n;for(const s of e.getQueryCache().findAll({queryKey:r}))ub.set(s,(ub.get(s)??0)+1),(n=M1.get(s))==null||n.add(t)}function i0(e,r,t,n=!0){if(!r)return e;const s=new Map(r.map(c=>[c.id,c])),o=new Set(e.map(c=>c.id)),a=r.filter(c=>t.has(c.id)&&!o.has(c.id)),i=e.filter(c=>!t.has(c.id)||s.has(c.id)).map(c=>t.has(c.id)?s.get(c.id)??c:c);return n?[...a,...i]:[...i,...a]}async function vp(e,r,t,n=(s,o)=>o??s){const s=e.getQueryCache().find({queryKey:r,exact:!0}),o=s?ub.get(s):void 0,a=await t();if(!s||ub.get(s)===o||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:r,exact:!0})!==s)return a;e.setQueryData(r,c=>c??a);const i=new Set;M1.set(s,i);try{const c=await t();return i.size?n(c,e.getQueryData(r),i):c}finally{M1.get(s)===i&&M1.delete(s)}}const np=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function oD(e){const r=e.queryKey[2];if(r==="resolvedFile")return np(e.queryKey[7]);const t=r==="getProjectFile"?e.queryKey[5]:r==="getCodeTree"?e.queryKey[4]:null;return typeof t=="object"&&t!==null&&"ref"in t&&np(t.ref)}function $a(e,r=Si(),t,n=!1){if(!Wr(r))return;const s={queryKey:r,predicate:o=>e.includes(String(o.queryKey[2]))&&!oD(o)&&(!t||t(o))};n?Je.cancelQueries(s).then(()=>{Wr(r)&&Je.invalidateQueries(s)}):Je.invalidateQueries(s)}const aD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],Mj=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],vX=["listProjects","listProjectActivity","listSidebarChatSessions","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...Mj,...aD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function bX(e,r=Si(),t=!1){const n=Je.getQueryData([...r,"listChatSessions",e])??[],s=Je.getQueryData([...r,"listRuns",e])??[],o=Je.getQueryData([...r,"listExperiments",e])??[];$a([...aD,...Mj,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],r,a=>{const i=a.queryKey[2];return i==="getRunDiff"?s.some(c=>c.id===a.queryKey[3]):i==="getExperimentDiff"?o.some(c=>c.id===a.queryKey[3]):i==="getSessionWorktree"?n.some(c=>c.id===a.queryKey[3]):i==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function by(e){const r=Si();Pc.add(e),yi(Je,[...r,"listChatSessions"],e),Je.setQueriesData({queryKey:[...r,"listChatSessions"]},t=>t==null?void 0:t.filter(n=>n.id!==e));for(const t of["getChatMessages","getSessionWorktree"])xj({queryKey:[...r,t,e]})}function yX(e){const r=Si(),t=Je.getQueryData([...r,"listChatSessions",e]);for(const n of t??[])by(n.id);xj({queryKey:r,predicate:n=>n.queryKey.slice(3).includes(e)})}const xX={hf:["getHfSettings","getComputeSettings","getEnvVars"],tinker:["getTinkerSettings","getComputeSettings","getEnvVars"],k8s:["getK8sSettings","getComputeSettings"],modal:["getModalSettings","getComputeSettings","getEnvVars"],slurm:["getSlurmSettings","getComputeSettings"],ray:["getRaySettings","getComputeSettings"],env:["getEnvVars","getHfSettings","getTinkerSettings","getModalSettings","getSlurmSettings","getRaySettings","getK8sSettings","getOpenResearchSettings","getComputeSettings","getHarnesses"],"data-dir":["getDataDir"],ssh:["getSshSettings","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function wX(e,r){var a;if(!Wr(r))return;const t=(i,c=r,u)=>$a(i,c,u,!0),n=e.split("?")[0];if(/\/(ui-state|open|reveal|prewarm|validate|preflight)$/.test(n))return;const s=(a=/^\/api\/settings\/([^/]+)/.exec(n))==null?void 0:a[1];if(s){t(xX[s]??[],r);return}if(n.startsWith("/api/local-models")&&!/\/(discover|check)$/.test(n)){t(["getLocalModels","getHarnesses"],r);return}if(n==="/api/user-skills"){t(["listUserSkills","getSkills","getSkillContent"],r);return}if(n==="/api/latex-templates"){t(["listLatexTemplates"],r);return}if(n==="/api/overleaf/token"){t(["getOverleafSettings","getOverleafState","getOverleafStatus"],r);return}if(n.startsWith("/api/update/")){t(["getUpdateStatus","getLocalMachine"],r);return}if(n.startsWith("/api/remote/")||n.startsWith("/_orx/")){t(["listRemoteSessions"],r),Je.invalidateQueries({queryKey:["gateway","runtime"]});return}if(n.startsWith("/api/chat/")){t(["listSidebarChatSessions"],r),n==="/api/chat/sessions"&&t(["getProjectStarterPrompts","listProjectActivity"],r);return}const o=/^\/api\/projects\/([^/]+)(.*)$/.exec(n);if(o){const[,i,c]=o;if(c.startsWith("/file")){bX(i,r,!0);return}t(["listProjects","listProjectActivity","listSidebarChatSessions"],r),t(["getProjectGitStatus","getCodeTree","getProjectStarterPrompts"],r,u=>u.queryKey[3]===i);return}(n==="/api/projects"||n==="/api/onboarding/complete")&&t(["listProjects","listProjectActivity","getUiState","getProfile"],r)}const kX={},jX="en",Oj=["en","zh-CN","fa","ar","es","hi","ko","ja","pl"],iD="orx:locale",$j=["localStorage","preferredLanguage","baseLocale"],w9=[],ug=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let k9=!1,C=()=>{var t;let e=$j;!ug&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=uD(window.location.href));const r=SX(e);if(r)return k9||(k9=!0,cD(r,{reload:!1})),r;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function SX(e,r){let t;for(const n of e){if(n==="baseLocale")t=jX;else if(n==="preferredLanguage"&&!ug)t=AX();else if(n==="localStorage"&&!ug)t=localStorage.getItem(iD)??void 0;else if(_D(n)&&_b.has(n)){const o=_b.get(n);if(o){const a=o.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return EX(a)}}const s=_g(t);if(s)return s}}const CX=e=>{window.location.reload()};let cD=(e,r)=>{var i;const t={reload:!0,...r};let n;try{n=C()}catch{}const s=[];let o=$j;!ug&&typeof window<"u"&&((i=window.location)!=null&&i.href)&&(o=uD(window.location.href));for(const c of o)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(iD,e);else if(_D(c)&&_b.has(c)){const u=_b.get(c);if(u){let d=u.setLocale(e);d instanceof Promise&&(d=d.catch(_=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:_})}),s.push(d))}}}const a=()=>{!ug&&t.reload&&window.location&&e!==n&&CX()};if(s.length)return Promise.all(s).then(()=>{a()});a()},zX=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function _g(e){if(typeof e!="string")return;const r=e.toLowerCase();for(const t of Oj)if(t.toLowerCase()===r)return t}function lD(e){return!!e&&Oj.some(r=>r===e)}function EX(e){const r=_g(e);if(r)return r;throw new Error(`Invalid locale: ${e}. Expected one of: ${Oj.join(", ")}`)}function NX(e,r){return e.exec(r.href)}function AX(){var r;if(!((r=navigator==null?void 0:navigator.languages)!=null&&r.length))return;const e=navigator.languages.map(t=>({fullTag:t,baseTag:t.split("-")[0]}));for(const t of e){const n=_g(t.fullTag);if(n)return n;const s=_g(t.baseTag);if(s)return s}}function TX(e){return RX(e)}function RX(e){const r=typeof e=="string"?new URL(e,zX()):new URL(e),t=r.pathname.split("/").filter(Boolean);return t.length>0&&_g(t[0])&&(r.pathname="/"+t.slice(1).join("/")),r}let j9,S9;function MX(e){if(w9.length===0)return;const r=typeof e=="string"?e:e.href;if(j9===r)return S9;const t=new URL(r,"http://example.com"),n=TX(t),s=n.href===t.href?[t]:[t,n];let o;for(const a of s){for(const i of w9){const c=new kX(i.match,a.href);if(NX(c,a)){o=i;break}}if(o)break}return j9=r,S9=o,o}function uD(e){const r=MX(e);return r&&r.exclude!==!0&&Array.isArray(r.strategy)?r.strategy:$j}const _b=new Map;function _D(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const OX=e=>`Actions for ${e==null?void 0:e.name}`,$X=e=>`${e==null?void 0:e.name} 的操作`,DX=e=>`عملیات ${e==null?void 0:e.name}`,LX=e=>`إجراءات ${e==null?void 0:e.name}`,IX=e=>`Acciones para ${e==null?void 0:e.name}`,PX=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,BX=e=>`${e==null?void 0:e.name} 작업`,FX=e=>`${e==null?void 0:e.name} の操作`,HX=e=>`Operacje na elemencie ${e==null?void 0:e.name}`,qX=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?$X(e):t==="fa"?DX(e):t==="ar"?LX(e):t==="es"?IX(e):t==="hi"?PX(e):t==="ko"?BX(e):t==="ja"?FX(e):t==="pl"?HX(e):OX(e)}),UX=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,GX=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,WX=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,KX=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,VX=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,QX=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,XX=e=>`${e==null?void 0:e.path} — Space로 미리보기; 더블 클릭하거나 Enter를 눌러 탭에서 열린 상태 유지`,YX=e=>`${e==null?void 0:e.path} — Space でプレビュー。ダブルクリックまたは Enter でタブを開いたままにする`,ZX=e=>`${e==null?void 0:e.path} — naciśnij spację, aby wyświetlić podgląd; kliknij dwukrotnie lub naciśnij Enter, aby pozostawić kartę otwartą`,JX=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?GX(e):t==="fa"?WX(e):t==="ar"?KX(e):t==="es"?VX(e):t==="hi"?QX(e):t==="ko"?XX(e):t==="ja"?YX(e):t==="pl"?ZX(e):UX(e)}),eY=e=>`Branch: ${e==null?void 0:e.branch}`,tY=e=>`分支:${e==null?void 0:e.branch}`,rY=e=>`شاخه: ${e==null?void 0:e.branch}`,nY=e=>`الفرع: ${e==null?void 0:e.branch}`,sY=e=>`Rama: ${e==null?void 0:e.branch}`,oY=e=>`ब्रांच: ${e==null?void 0:e.branch}`,aY=e=>`브랜치: ${e==null?void 0:e.branch}`,iY=e=>`ブランチ: ${e==null?void 0:e.branch}`,cY=e=>`Gałąź: ${e==null?void 0:e.branch}`,lY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?tY(e):t==="fa"?rY(e):t==="ar"?nY(e):t==="es"?sY(e):t==="hi"?oY(e):t==="ko"?aY(e):t==="ja"?iY(e):t==="pl"?cY(e):eY(e)}),uY=e=>`Browse code on ${e==null?void 0:e.branch}`,_Y=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,fY=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,dY=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,hY=e=>`Explorar el código en ${e==null?void 0:e.branch}`,pY=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,mY=e=>`${e==null?void 0:e.branch}의 코드 탐색`,gY=e=>`${e==null?void 0:e.branch} のコードを閲覧`,vY=e=>`Przeglądaj kod gałęzi ${e==null?void 0:e.branch}`,fD=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?_Y(e):t==="fa"?fY(e):t==="ar"?dY(e):t==="es"?hY(e):t==="hi"?pY(e):t==="ko"?mY(e):t==="ja"?gY(e):t==="pl"?vY(e):uY(e)}),bY=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,yY=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,xY=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,wY=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,kY=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,jY=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,SY=e=>`이 채팅의 에이전트 환경 및 모델: ${e==null?void 0:e.label}`,CY=e=>`このチャットのエージェント環境とモデル: ${e==null?void 0:e.label}`,zY=e=>`Środowisko agenta i model dla tego czatu: ${e==null?void 0:e.label}`,EY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yY(e):t==="fa"?xY(e):t==="ar"?wY(e):t==="es"?kY(e):t==="hi"?jY(e):t==="ko"?SY(e):t==="ja"?CY(e):t==="pl"?zY(e):bY(e)}),NY=e=>`Collapse ${e==null?void 0:e.name}`,AY=e=>`折叠 ${e==null?void 0:e.name}`,TY=e=>`بستن ${e==null?void 0:e.name}`,RY=e=>`طيّ ${e==null?void 0:e.name}`,MY=e=>`Contraer ${e==null?void 0:e.name}`,OY=e=>`${e==null?void 0:e.name} समेटें`,$Y=e=>`${e==null?void 0:e.name} 접기`,DY=e=>`${e==null?void 0:e.name} を折りたたむ`,LY=e=>`Zwiń ${e==null?void 0:e.name}`,IY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?AY(e):t==="fa"?TY(e):t==="ar"?RY(e):t==="es"?MY(e):t==="hi"?OY(e):t==="ko"?$Y(e):t==="ja"?DY(e):t==="pl"?LY(e):NY(e)}),PY=e=>`Committed changes versus ${e==null?void 0:e.parent}`,BY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,FY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,HY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,qY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,UY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,GY=e=>`${e==null?void 0:e.parent} 대비 커밋된 변경 사항`,WY=e=>`${e==null?void 0:e.parent} に対するコミット済みの変更`,KY=e=>`Zatwierdzone zmiany względem ${e==null?void 0:e.parent}`,VY=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?BY(e):t==="fa"?FY(e):t==="ar"?HY(e):t==="es"?qY(e):t==="hi"?UY(e):t==="ko"?GY(e):t==="ja"?WY(e):t==="pl"?KY(e):PY(e)}),QY=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,XY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,YY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,ZY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,JY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,eZ=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,tZ=e=>`${e==null?void 0:e.parent} 대비 커밋된 변경 사항 (차이가 잘렸으며 개수는 최솟값입니다)`,rZ=e=>`${e==null?void 0:e.parent} に対するコミット済みの変更(差分は省略されており、件数は下限値です)`,nZ=e=>`Zatwierdzone zmiany względem ${e==null?void 0:e.parent} (diff został ucięty, liczniki podają wartości minimalne)`,sZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?XY(e):t==="fa"?YY(e):t==="ar"?ZY(e):t==="es"?JY(e):t==="hi"?eZ(e):t==="ko"?tZ(e):t==="ja"?rZ(e):t==="pl"?nZ(e):QY(e)}),oZ=e=>`Copy ${e==null?void 0:e.value}`,aZ=e=>`复制 ${e==null?void 0:e.value}`,iZ=e=>`کپی ${e==null?void 0:e.value}`,cZ=e=>`نسخ ${e==null?void 0:e.value}`,lZ=e=>`Copiar ${e==null?void 0:e.value}`,uZ=e=>`${e==null?void 0:e.value} कॉपी करें`,_Z=e=>`${e==null?void 0:e.value} 복사`,fZ=e=>`${e==null?void 0:e.value} をコピー`,dZ=e=>`Kopiuj ${e==null?void 0:e.value}`,hZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?aZ(e):t==="fa"?iZ(e):t==="ar"?cZ(e):t==="es"?lZ(e):t==="hi"?uZ(e):t==="ko"?_Z(e):t==="ja"?fZ(e):t==="pl"?dZ(e):oZ(e)}),pZ=e=>`Delete ${e==null?void 0:e.name}`,mZ=e=>`删除 ${e==null?void 0:e.name}`,gZ=e=>`حذف ${e==null?void 0:e.name}`,vZ=e=>`حذف ${e==null?void 0:e.name}`,bZ=e=>`Eliminar ${e==null?void 0:e.name}`,yZ=e=>`${e==null?void 0:e.name} हटाएं`,xZ=e=>`${e==null?void 0:e.name} 삭제`,wZ=e=>`${e==null?void 0:e.name} を削除`,kZ=e=>`Usuń ${e==null?void 0:e.name}`,C9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mZ(e):t==="fa"?gZ(e):t==="ar"?vZ(e):t==="es"?bZ(e):t==="hi"?yZ(e):t==="ko"?xZ(e):t==="ja"?wZ(e):t==="pl"?kZ(e):pZ(e)}),jZ=e=>`Download ${e==null?void 0:e.name}`,SZ=e=>`下载 ${e==null?void 0:e.name}`,CZ=e=>`بارگیری ${e==null?void 0:e.name}`,zZ=e=>`تنزيل ${e==null?void 0:e.name}`,EZ=e=>`Descargar ${e==null?void 0:e.name}`,NZ=e=>`${e==null?void 0:e.name} डाउनलोड करें`,AZ=e=>`${e==null?void 0:e.name} 다운로드`,TZ=e=>`${e==null?void 0:e.name} をダウンロード`,RZ=e=>`Pobierz ${e==null?void 0:e.name}`,fb=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?SZ(e):t==="fa"?CZ(e):t==="ar"?zZ(e):t==="es"?EZ(e):t==="hi"?NZ(e):t==="ko"?AZ(e):t==="ja"?TZ(e):t==="pl"?RZ(e):jZ(e)}),MZ=e=>`Expand ${e==null?void 0:e.name}`,OZ=e=>`展开 ${e==null?void 0:e.name}`,$Z=e=>`باز کردن ${e==null?void 0:e.name}`,DZ=e=>`توسيع ${e==null?void 0:e.name}`,LZ=e=>`Expandir ${e==null?void 0:e.name}`,IZ=e=>`${e==null?void 0:e.name} फैलाएं`,PZ=e=>`${e==null?void 0:e.name} 펼치기`,BZ=e=>`${e==null?void 0:e.name} を展開`,FZ=e=>`Rozwiń ${e==null?void 0:e.name}`,HZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?OZ(e):t==="fa"?$Z(e):t==="ar"?DZ(e):t==="es"?LZ(e):t==="hi"?IZ(e):t==="ko"?PZ(e):t==="ja"?BZ(e):t==="pl"?FZ(e):MZ(e)}),qZ=e=>`Hide additional ${e==null?void 0:e.target}`,UZ=e=>`隐藏其余${e==null?void 0:e.target}`,GZ=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,WZ=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,KZ=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,VZ=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,QZ=e=>`추가 ${e==null?void 0:e.target} 숨기기`,XZ=e=>`追加の ${e==null?void 0:e.target} を非表示`,YZ=e=>`Ukryj dodatkowe ${e==null?void 0:e.target}`,ZZ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?UZ(e):t==="fa"?GZ(e):t==="ar"?WZ(e):t==="es"?KZ(e):t==="hi"?VZ(e):t==="ko"?QZ(e):t==="ja"?XZ(e):t==="pl"?YZ(e):qZ(e)}),JZ=e=>`Hide error details for ${e==null?void 0:e.activity}`,eJ=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,tJ=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,rJ=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,nJ=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,sJ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,oJ=e=>`${e==null?void 0:e.activity} 오류 상세 정보 숨기기`,aJ=e=>`${e==null?void 0:e.activity} のエラー詳細を非表示`,iJ=e=>`Ukryj szczegóły błędu działania ${e==null?void 0:e.activity}`,cJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?eJ(e):t==="fa"?tJ(e):t==="ar"?rJ(e):t==="es"?nJ(e):t==="hi"?sJ(e):t==="ko"?oJ(e):t==="ja"?aJ(e):t==="pl"?iJ(e):JZ(e)}),lJ=e=>`${e==null?void 0:e.count} consecutive identical calls`,uJ=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,_J=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,fJ=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,dJ=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,hJ=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,pJ=e=>`동일한 호출 ${e==null?void 0:e.count}회 연속`,mJ=e=>`同一の呼び出しが ${e==null?void 0:e.count} 回連続`,gJ=e=>`Kolejne identyczne wywołania: ${e==null?void 0:e.count}`,vJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?uJ(e):t==="fa"?_J(e):t==="ar"?fJ(e):t==="es"?dJ(e):t==="hi"?hJ(e):t==="ko"?pJ(e):t==="ja"?mJ(e):t==="pl"?gJ(e):lJ(e)}),bJ=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,yJ=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,xJ=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,wJ=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,kJ=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,jJ=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,SJ=e=>`${e==null?void 0:e.name} — 더블 클릭하거나 Enter를 눌러 열린 상태 유지`,CJ=e=>`${e==null?void 0:e.name} — ダブルクリックまたは Enter で開いたままにする`,zJ=e=>`${e==null?void 0:e.name} — kliknij dwukrotnie lub naciśnij Enter, aby pozostawić otwarte`,EJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yJ(e):t==="fa"?xJ(e):t==="ar"?wJ(e):t==="es"?kJ(e):t==="hi"?jJ(e):t==="ko"?SJ(e):t==="ja"?CJ(e):t==="pl"?zJ(e):bJ(e)}),NJ=e=>`Open ${e==null?void 0:e.branch} on GitHub`,AJ=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,TJ=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,RJ=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,MJ=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,OJ=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,$J=e=>`GitHub에서 ${e==null?void 0:e.branch} 열기`,DJ=e=>`GitHub で ${e==null?void 0:e.branch} を開く`,LJ=e=>`Otwórz gałąź ${e==null?void 0:e.branch} w GitHubie`,dD=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?AJ(e):t==="fa"?TJ(e):t==="ar"?RJ(e):t==="es"?MJ(e):t==="hi"?OJ(e):t==="ko"?$J(e):t==="ja"?DJ(e):t==="pl"?LJ(e):NJ(e)}),IJ=e=>`Open experiment ${e==null?void 0:e.name}`,PJ=e=>`打开实验 ${e==null?void 0:e.name}`,BJ=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,FJ=e=>`فتح التجربة ${e==null?void 0:e.name}`,HJ=e=>`Abrir el experimento ${e==null?void 0:e.name}`,qJ=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,UJ=e=>`실험 ${e==null?void 0:e.name} 열기`,GJ=e=>`実験 ${e==null?void 0:e.name} を開く`,WJ=e=>`Otwórz eksperyment ${e==null?void 0:e.name}`,KJ=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?PJ(e):t==="fa"?BJ(e):t==="ar"?FJ(e):t==="es"?HJ(e):t==="hi"?qJ(e):t==="ko"?UJ(e):t==="ja"?GJ(e):t==="pl"?WJ(e):IJ(e)}),VJ=e=>`Open ${e==null?void 0:e.path} in the right pane`,QJ=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,XJ=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,YJ=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,ZJ=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,JJ=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,eee=e=>`오른쪽 패널에서 ${e==null?void 0:e.path} 열기`,tee=e=>`右側のペインで ${e==null?void 0:e.path} を開く`,ree=e=>`Otwórz ${e==null?void 0:e.path} w prawym panelu`,nee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?QJ(e):t==="fa"?XJ(e):t==="ar"?YJ(e):t==="es"?ZJ(e):t==="hi"?JJ(e):t==="ko"?eee(e):t==="ja"?tee(e):t==="pl"?ree(e):VJ(e)}),see=e=>`Open logs for run ${e==null?void 0:e.run}`,oee=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,aee=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,iee=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,cee=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,lee=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,uee=e=>`실행 ${e==null?void 0:e.run}의 로그 열기`,_ee=e=>`実行 ${e==null?void 0:e.run} のログを開く`,fee=e=>`Otwórz logi uruchomienia ${e==null?void 0:e.run}`,dee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?oee(e):t==="fa"?aee(e):t==="ar"?iee(e):t==="es"?cee(e):t==="hi"?lee(e):t==="ko"?uee(e):t==="ja"?_ee(e):t==="pl"?fee(e):see(e)}),hee=e=>`Open ${e==null?void 0:e.name} on GitHub`,pee=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,mee=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,gee=e=>`فتح ${e==null?void 0:e.name} على GitHub`,vee=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,bee=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,yee=e=>`GitHub에서 ${e==null?void 0:e.name} 열기`,xee=e=>`GitHub で ${e==null?void 0:e.name} を開く`,wee=e=>`Otwórz ${e==null?void 0:e.name} w GitHubie`,U4=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?pee(e):t==="fa"?mee(e):t==="ar"?gee(e):t==="es"?vee(e):t==="hi"?bee(e):t==="ko"?yee(e):t==="ja"?xee(e):t==="pl"?wee(e):hee(e)}),kee=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,jee=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,See=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,Cee=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,zee=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,Eee=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,Nee=e=>`오른쪽 패널에서 실행 ${e==null?void 0:e.id}의 로그 열기`,Aee=e=>`右側のペインで実行 ${e==null?void 0:e.id} のログを開く`,Tee=e=>`Otwórz logi uruchomienia ${e==null?void 0:e.id} w prawym panelu`,Ree=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?jee(e):t==="fa"?See(e):t==="ar"?Cee(e):t==="es"?zee(e):t==="hi"?Eee(e):t==="ko"?Nee(e):t==="ja"?Aee(e):t==="pl"?Tee(e):kee(e)}),Mee=e=>`Overleaf — ${e==null?void 0:e.status}`,Oee=e=>`Overleaf — ${e==null?void 0:e.status}`,$ee=e=>`Overleaf — ${e==null?void 0:e.status}`,Dee=e=>`Overleaf — ${e==null?void 0:e.status}`,Lee=e=>`Overleaf — ${e==null?void 0:e.status}`,Iee=e=>`Overleaf — ${e==null?void 0:e.status}`,Pee=e=>`Overleaf — ${e==null?void 0:e.status}`,Bee=e=>`Overleaf — ${e==null?void 0:e.status}`,Fee=e=>`Overleaf — ${e==null?void 0:e.status}`,Hee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Oee(e):t==="fa"?$ee(e):t==="ar"?Dee(e):t==="es"?Lee(e):t==="hi"?Iee(e):t==="ko"?Pee(e):t==="ja"?Bee(e):t==="pl"?Fee(e):Mee(e)}),qee=e=>`Preview /${e==null?void 0:e.name} skill`,Uee=e=>`预览 /${e==null?void 0:e.name} 技能`,Gee=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,Wee=e=>`معاينة مهارة /${e==null?void 0:e.name}`,Kee=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,Vee=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,Qee=e=>`/${e==null?void 0:e.name} 스킬 미리보기`,Xee=e=>`/${e==null?void 0:e.name} スキルをプレビュー`,Yee=e=>`Podgląd umiejętności /${e==null?void 0:e.name}`,Zee=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Uee(e):t==="fa"?Gee(e):t==="ar"?Wee(e):t==="es"?Kee(e):t==="hi"?Vee(e):t==="ko"?Qee(e):t==="ja"?Xee(e):t==="pl"?Yee(e):qee(e)}),Jee=e=>`Remove annotation ${e==null?void 0:e.number}`,ete=e=>`移除批注 ${e==null?void 0:e.number}`,tte=e=>`حذف یادداشت ${e==null?void 0:e.number}`,rte=e=>`إزالة التعليق ${e==null?void 0:e.number}`,nte=e=>`Quitar la anotación ${e==null?void 0:e.number}`,ste=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,ote=e=>`주석 ${e==null?void 0:e.number} 제거`,ate=e=>`注釈 ${e==null?void 0:e.number} を削除`,ite=e=>`Usuń adnotację ${e==null?void 0:e.number}`,cte=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ete(e):t==="fa"?tte(e):t==="ar"?rte(e):t==="es"?nte(e):t==="hi"?ste(e):t==="ko"?ote(e):t==="ja"?ate(e):t==="pl"?ite(e):Jee(e)}),lte=e=>`Remove ${e==null?void 0:e.name}`,ute=e=>`移除 ${e==null?void 0:e.name}`,_te=e=>`حذف ${e==null?void 0:e.name}`,fte=e=>`إزالة ${e==null?void 0:e.name}`,dte=e=>`Quitar ${e==null?void 0:e.name}`,hte=e=>`${e==null?void 0:e.name} हटाएं`,pte=e=>`${e==null?void 0:e.name} 제거`,mte=e=>`${e==null?void 0:e.name} を削除`,gte=e=>`Usuń ${e==null?void 0:e.name}`,vte=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ute(e):t==="fa"?_te(e):t==="ar"?fte(e):t==="es"?dte(e):t==="hi"?hte(e):t==="ko"?pte(e):t==="ja"?mte(e):t==="pl"?gte(e):lte(e)}),bte=e=>`Remove queued message: ${e==null?void 0:e.text}`,yte=e=>`移除排队消息:${e==null?void 0:e.text}`,xte=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,wte=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,kte=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,jte=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,Ste=e=>`대기 메시지 제거: ${e==null?void 0:e.text}`,Cte=e=>`待機中のメッセージを削除: ${e==null?void 0:e.text}`,zte=e=>`Usuń wiadomość z kolejki: ${e==null?void 0:e.text}`,Ete=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?yte(e):t==="fa"?xte(e):t==="ar"?wte(e):t==="es"?kte(e):t==="hi"?jte(e):t==="ko"?Ste(e):t==="ja"?Cte(e):t==="pl"?zte(e):bte(e)}),Nte=e=>`Retry queued message: ${e==null?void 0:e.text}`,Ate=e=>`重试排队消息:${e==null?void 0:e.text}`,Tte=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,Rte=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,Mte=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,Ote=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,$te=e=>`대기 메시지 다시 시도: ${e==null?void 0:e.text}`,Dte=e=>`待機中のメッセージを再試行: ${e==null?void 0:e.text}`,Lte=e=>`Ponów wiadomość z kolejki: ${e==null?void 0:e.text}`,Ite=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Ate(e):t==="fa"?Tte(e):t==="ar"?Rte(e):t==="es"?Mte(e):t==="hi"?Ote(e):t==="ko"?$te(e):t==="ja"?Dte(e):t==="pl"?Lte(e):Nte(e)}),Pte=e=>`Run ${e==null?void 0:e.value} in a terminal here`,Bte=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,Fte=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,Hte=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,qte=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,Ute=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,Gte=e=>`여기 터미널에서 ${e==null?void 0:e.value} 실행`,Wte=e=>`ここにあるターミナルで ${e==null?void 0:e.value} を実行`,Kte=e=>`Uruchom ${e==null?void 0:e.value} w terminalu tutaj`,z9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Bte(e):t==="fa"?Fte(e):t==="ar"?Hte(e):t==="es"?qte(e):t==="hi"?Ute(e):t==="ko"?Gte(e):t==="ja"?Wte(e):t==="pl"?Kte(e):Pte(e)}),Vte=e=>`Run ${e==null?void 0:e.id}`,Qte=e=>`运行 ${e==null?void 0:e.id}`,Xte=e=>`اجرای ${e==null?void 0:e.id}`,Yte=e=>`تشغيل ${e==null?void 0:e.id}`,Zte=e=>`Ejecución ${e==null?void 0:e.id}`,Jte=e=>`रन ${e==null?void 0:e.id}`,ere=e=>`실행 ${e==null?void 0:e.id}`,tre=e=>`実行 ${e==null?void 0:e.id}`,rre=e=>`Uruchomienie ${e==null?void 0:e.id}`,nre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Qte(e):t==="fa"?Xte(e):t==="ar"?Yte(e):t==="es"?Zte(e):t==="hi"?Jte(e):t==="ko"?ere(e):t==="ja"?tre(e):t==="pl"?rre(e):Vte(e)}),sre=e=>`Show error details for ${e==null?void 0:e.activity}`,ore=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,are=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,ire=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,cre=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,lre=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,ure=e=>`${e==null?void 0:e.activity} 오류 상세 정보 표시`,_re=e=>`${e==null?void 0:e.activity} のエラー詳細を表示`,fre=e=>`Pokaż szczegóły błędu działania ${e==null?void 0:e.activity}`,dre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ore(e):t==="fa"?are(e):t==="ar"?ire(e):t==="es"?cre(e):t==="hi"?lre(e):t==="ko"?ure(e):t==="ja"?_re(e):t==="pl"?fre(e):sre(e)}),hre=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,pre=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,mre=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,gre=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,vre=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,bre=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,yre=e=>`${e==null?void 0:e.target} ${e==null?void 0:e.count}개 더 표시`,xre=e=>`${e==null?void 0:e.target} をさらに ${e==null?void 0:e.count} 件表示`,wre=e=>`Pokaż więcej (${e==null?void 0:e.count}): ${e==null?void 0:e.target}`,kre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?pre(e):t==="fa"?mre(e):t==="ar"?gre(e):t==="es"?vre(e):t==="hi"?bre(e):t==="ko"?yre(e):t==="ja"?xre(e):t==="pl"?wre(e):hre(e)}),jre=e=>`${e==null?void 0:e.name} skill`,Sre=e=>`${e==null?void 0:e.name} 技能`,Cre=e=>`مهارت ${e==null?void 0:e.name}`,zre=e=>`مهارة ${e==null?void 0:e.name}`,Ere=e=>`Skill ${e==null?void 0:e.name}`,Nre=e=>`${e==null?void 0:e.name} स्किल`,Are=e=>`${e==null?void 0:e.name} 스킬`,Tre=e=>`${e==null?void 0:e.name} スキル`,Rre=e=>`Umiejętność ${e==null?void 0:e.name}`,Mre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Sre(e):t==="fa"?Cre(e):t==="ar"?zre(e):t==="es"?Ere(e):t==="hi"?Nre(e):t==="ko"?Are(e):t==="ja"?Tre(e):t==="pl"?Rre(e):jre(e)}),Ore=e=>`Value for ${e==null?void 0:e.name}`,$re=e=>`${e==null?void 0:e.name} 的值`,Dre=e=>`مقدار ${e==null?void 0:e.name}`,Lre=e=>`قيمة ${e==null?void 0:e.name}`,Ire=e=>`Valor de ${e==null?void 0:e.name}`,Pre=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,Bre=e=>`${e==null?void 0:e.name}의 값`,Fre=e=>`${e==null?void 0:e.name} の値`,Hre=e=>`Wartość dla ${e==null?void 0:e.name}`,qre=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?$re(e):t==="fa"?Dre(e):t==="ar"?Lre(e):t==="es"?Ire(e):t==="hi"?Pre(e):t==="ko"?Bre(e):t==="ja"?Fre(e):t==="pl"?Hre(e):Ore(e)}),Ure=()=>"Agent reported back",Gre=()=>"智能体已返回结果",Wre=()=>"عامل نتیجه را گزارش کرد",Kre=()=>"أبلغ الوكيل بالنتيجة",Vre=()=>"El agente informó de los resultados",Qre=()=>"एजेंट ने रिपोर्ट भेजी",Xre=()=>"에이전트 결과 보고됨",Yre=()=>"エージェントが結果を報告しました",Zre=()=>"Agent przekazał wyniki",Jre=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Gre():t==="fa"?Wre():t==="ar"?Kre():t==="es"?Vre():t==="hi"?Qre():t==="ko"?Xre():t==="ja"?Yre():t==="pl"?Zre():Ure()}),ene=()=>"Browse",tne=()=>"浏览",rne=()=>"مرور",nne=()=>"تصفّح",sne=()=>"Navegar",one=()=>"ब्राउज़ करें",ane=()=>"탐색",ine=()=>"閲覧",cne=()=>"Przeglądaj",lne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?tne():t==="fa"?rne():t==="ar"?nne():t==="es"?sne():t==="hi"?one():t==="ko"?ane():t==="ja"?ine():t==="pl"?cne():ene()}),une=()=>"Browsing…",_ne=()=>"正在浏览…",fne=()=>"در حال مرور…",dne=()=>"جارٍ التصفّح…",hne=()=>"Navegando…",pne=()=>"ब्राउज़ कर रहा है…",mne=()=>"탐색 중…",gne=()=>"閲覧中…",vne=()=>"Przeglądanie…",bne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_ne():t==="fa"?fne():t==="ar"?dne():t==="es"?hne():t==="hi"?pne():t==="ko"?mne():t==="ja"?gne():t==="pl"?vne():une()}),yne=()=>"Checked experiment status and updated notes",xne=()=>"已检查实验状态并更新笔记",wne=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",kne=()=>"فحص حالة التجربة وحدّث الملاحظات",jne=()=>"Consultó el estado del experimento y actualizó las notas",Sne=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",Cne=()=>"실험 상태 확인 및 노트 업데이트 완료",zne=()=>"実験の状態を確認してノートを更新しました",Ene=()=>"Sprawdzono stan eksperymentu i zaktualizowano notatki",Nne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xne():t==="fa"?wne():t==="ar"?kne():t==="es"?jne():t==="hi"?Sne():t==="ko"?Cne():t==="ja"?zne():t==="pl"?Ene():yne()}),Ane=()=>"Closed an agent",Tne=()=>"已关闭智能体",Rne=()=>"عامل بسته شد",Mne=()=>"أغلق وكيلًا",One=()=>"Cerró un agente",$ne=()=>"एक एजेंट बंद किया",Dne=()=>"에이전트 종료 완료",Lne=()=>"エージェントを閉じました",Ine=()=>"Zamknięto agenta",Pne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Tne():t==="fa"?Rne():t==="ar"?Mne():t==="es"?One():t==="hi"?$ne():t==="ko"?Dne():t==="ja"?Lne():t==="pl"?Ine():Ane()}),Bne=()=>"Context compacted",Fne=()=>"上下文已压缩",Hne=()=>"زمینه فشرده شد",qne=()=>"تم ضغط السياق",Une=()=>"Contexto comprimido",Gne=()=>"कॉन्टेक्स्ट छोटा किया गया",Wne=()=>"컨텍스트 압축 완료",Kne=()=>"コンテキストを圧縮しました",Vne=()=>"Skrócono kontekst",Qne=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fne():t==="fa"?Hne():t==="ar"?qne():t==="es"?Une():t==="hi"?Gne():t==="ko"?Wne():t==="ja"?Kne():t==="pl"?Vne():Bne()}),Xne=()=>"Compacting conversation…",Yne=()=>"正在压缩对话…",Zne=()=>"در حال فشرده‌سازی گفت‌وگو…",Jne=()=>"جارٍ ضغط المحادثة…",ese=()=>"Comprimiendo la conversación…",tse=()=>"बातचीत छोटी की जा रही है…",rse=()=>"대화 압축 중…",nse=()=>"会話を圧縮中…",sse=()=>"Skracanie kontekstu rozmowy…",E9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yne():t==="fa"?Zne():t==="ar"?Jne():t==="es"?ese():t==="hi"?tse():t==="ko"?rse():t==="ja"?nse():t==="pl"?sse():Xne()}),ose=()=>"Compacting failed",ase=()=>"压缩失败",ise=()=>"فشرده‌سازی ناموفق بود",cse=()=>"فشل الضغط",lse=()=>"Error al comprimir",use=()=>"छोटा करना विफल",_se=()=>"압축 실패",fse=()=>"圧縮に失敗しました",dse=()=>"Nie udało się skrócić kontekstu",hse=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ase():t==="fa"?ise():t==="ar"?cse():t==="es"?lse():t==="hi"?use():t==="ko"?_se():t==="ja"?fse():t==="pl"?dse():ose()}),pse=e=>`Created ${e==null?void 0:e.target}`,mse=e=>`已创建 ${e==null?void 0:e.target}`,gse=e=>`${e==null?void 0:e.target} ایجاد شد`,vse=e=>`أنشأ ${e==null?void 0:e.target}`,bse=e=>`Creó ${e==null?void 0:e.target}`,yse=e=>`${e==null?void 0:e.target} बनाया`,xse=e=>`${e==null?void 0:e.target} 생성 완료`,wse=e=>`${e==null?void 0:e.target} を作成しました`,kse=e=>`Utworzono ${e==null?void 0:e.target}`,jse=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mse(e):t==="fa"?gse(e):t==="ar"?vse(e):t==="es"?bse(e):t==="hi"?yse(e):t==="ko"?xse(e):t==="ja"?wse(e):t==="pl"?kse(e):pse(e)}),Sse=()=>"Delegate",Cse=()=>"委派",zse=()=>"واگذاری",Ese=()=>"تفويض",Nse=()=>"Delegar",Ase=()=>"सौंपें",Tse=()=>"위임",Rse=()=>"委任",Mse=()=>"Przekaż",Ose=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cse():t==="fa"?zse():t==="ar"?Ese():t==="es"?Nse():t==="hi"?Ase():t==="ko"?Tse():t==="ja"?Rse():t==="pl"?Mse():Sse()}),$se=()=>"Delegating…",Dse=()=>"正在委派…",Lse=()=>"در حال واگذاری…",Ise=()=>"جارٍ التفويض…",Pse=()=>"Delegando…",Bse=()=>"सौंप रहा है…",Fse=()=>"위임 중…",Hse=()=>"委任中…",qse=()=>"Przekazywanie zadania…",Use=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dse():t==="fa"?Lse():t==="ar"?Ise():t==="es"?Pse():t==="hi"?Bse():t==="ko"?Fse():t==="ja"?Hse():t==="pl"?qse():$se()}),Gse=e=>`Deleted ${e==null?void 0:e.target}`,Wse=e=>`已删除 ${e==null?void 0:e.target}`,Kse=e=>`${e==null?void 0:e.target} حذف شد`,Vse=e=>`حذف ${e==null?void 0:e.target}`,Qse=e=>`Eliminó ${e==null?void 0:e.target}`,Xse=e=>`${e==null?void 0:e.target} हटाया`,Yse=e=>`${e==null?void 0:e.target} 삭제 완료`,Zse=e=>`${e==null?void 0:e.target} を削除しました`,Jse=e=>`Usunięto ${e==null?void 0:e.target}`,eoe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Wse(e):t==="fa"?Kse(e):t==="ar"?Vse(e):t==="es"?Qse(e):t==="hi"?Xse(e):t==="ko"?Yse(e):t==="ja"?Zse(e):t==="pl"?Jse(e):Gse(e)}),toe=()=>"Edit",roe=()=>"编辑",noe=()=>"ویرایش",soe=()=>"تعديل",ooe=()=>"Editar",aoe=()=>"संपादित करें",ioe=()=>"편집",coe=()=>"編集",loe=()=>"Edytuj",hD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?roe():t==="fa"?noe():t==="ar"?soe():t==="es"?ooe():t==="hi"?aoe():t==="ko"?ioe():t==="ja"?coe():t==="pl"?loe():toe()}),uoe=e=>`Edited ${e==null?void 0:e.target}`,_oe=e=>`已编辑 ${e==null?void 0:e.target}`,foe=e=>`${e==null?void 0:e.target} ویرایش شد`,doe=e=>`عدّل ${e==null?void 0:e.target}`,hoe=e=>`Editó ${e==null?void 0:e.target}`,poe=e=>`${e==null?void 0:e.target} संपादित किया`,moe=e=>`${e==null?void 0:e.target} 수정 완료`,goe=e=>`${e==null?void 0:e.target} を編集しました`,voe=e=>`Edytowano ${e==null?void 0:e.target}`,boe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?_oe(e):t==="fa"?foe(e):t==="ar"?doe(e):t==="es"?hoe(e):t==="hi"?poe(e):t==="ko"?moe(e):t==="ja"?goe(e):t==="pl"?voe(e):uoe(e)}),yoe=()=>"Editing…",xoe=()=>"正在编辑…",woe=()=>"در حال ویرایش…",koe=()=>"جارٍ التعديل…",joe=()=>"Editando…",Soe=()=>"संपादित कर रहा है…",Coe=()=>"편집 중…",zoe=()=>"編集中…",Eoe=()=>"Edytowanie…",Noe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xoe():t==="fa"?woe():t==="ar"?koe():t==="es"?joe():t==="hi"?Soe():t==="ko"?Coe():t==="ja"?zoe():t==="pl"?Eoe():yoe()}),Aoe=e=>`${e==null?void 0:e.activity} for ${e==null?void 0:e.count} queries`,Toe=e=>`${e==null?void 0:e.activity},共 ${e==null?void 0:e.count} 个查询`,Roe=e=>`${e==null?void 0:e.activity} برای ${e==null?void 0:e.count} جستجو`,Moe=e=>`${e==null?void 0:e.activity} لـ ${e==null?void 0:e.count} استعلامات`,Ooe=e=>`${e==null?void 0:e.activity} para ${e==null?void 0:e.count} consultas`,$oe=e=>`${e==null?void 0:e.activity}: ${e==null?void 0:e.count} क्वेरी`,Doe=e=>`${e==null?void 0:e.count}개 검색어에 대한 ${e==null?void 0:e.activity}`,Loe=e=>`${e==null?void 0:e.count} 件の検索語について ${e==null?void 0:e.activity}`,Ioe=e=>`${e==null?void 0:e.activity} dla ${e==null?void 0:e.count} zapytań`,Poe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Toe(e):t==="fa"?Roe(e):t==="ar"?Moe(e):t==="es"?Ooe(e):t==="hi"?$oe(e):t==="ko"?Doe(e):t==="ja"?Loe(e):t==="pl"?Ioe(e):Aoe(e)}),Boe=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,Foe=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,Hoe=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,qoe=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,Uoe=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,Goe=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,Woe=e=>`“${e==null?void 0:e.query}”에 대한 ${e==null?void 0:e.activity}`,Koe=e=>`「${e==null?void 0:e.query}」について ${e==null?void 0:e.activity}`,Voe=e=>`${e==null?void 0:e.activity} dla „${e==null?void 0:e.query}”`,N9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Foe(e):t==="fa"?Hoe(e):t==="ar"?qoe(e):t==="es"?Uoe(e):t==="hi"?Goe(e):t==="ko"?Woe(e):t==="ja"?Koe(e):t==="pl"?Voe(e):Boe(e)}),Qoe=()=>"Imported from your terminal — new turns continue in the agent's own history",Xoe=()=>"从你的终端导入 — 新的回合将在智能体自己的历史中继续",Yoe=()=>"از ترمینال شما وارد شد — نوبت‌های جدید در تاریخچهٔ خود عامل ادامه می‌یابند",Zoe=()=>"مستورد من طرفيتك — الجولات الجديدة تتابع في سجل الوكيل نفسه",Joe=()=>"Importado desde tu terminal — los turnos nuevos continúan en el historial del agente",eae=()=>"आपके टर्मिनल से इम्पोर्ट किया गया — नए टर्न एजेंट के अपने इतिहास में जारी रहेंगे",tae=()=>"터미널에서 가져왔습니다. 새 대화는 에이전트 자체 기록에서 계속됩니다",rae=()=>"ターミナルから取り込みました。新しいターンはエージェント自身の履歴で続きます",nae=()=>"Zaimportowano z terminala — kolejne wiadomości będą zapisywane w historii agenta",sae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xoe():t==="fa"?Yoe():t==="ar"?Zoe():t==="es"?Joe():t==="hi"?eae():t==="ko"?tae():t==="ja"?rae():t==="pl"?nae():Qoe()}),oae=e=>`Listed files matching ${e==null?void 0:e.pattern}`,aae=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,iae=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,cae=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,lae=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,uae=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,_ae=e=>`${e==null?void 0:e.pattern}과(와) 일치하는 파일 목록 확인 완료`,fae=e=>`${e==null?void 0:e.pattern} に一致するファイルを一覧表示しました`,dae=e=>`Wyświetlono pliki pasujące do ${e==null?void 0:e.pattern}`,hae=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?aae(e):t==="fa"?iae(e):t==="ar"?cae(e):t==="es"?lae(e):t==="hi"?uae(e):t==="ko"?_ae(e):t==="ja"?fae(e):t==="pl"?dae(e):oae(e)}),pae=()=>"Load",mae=()=>"加载",gae=()=>"بارگیری",vae=()=>"تحميل",bae=()=>"Cargar",yae=()=>"लोड करें",xae=()=>"불러오기",wae=()=>"読み込み",kae=()=>"Wczytaj",jae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mae():t==="fa"?gae():t==="ar"?vae():t==="es"?bae():t==="hi"?yae():t==="ko"?xae():t==="ja"?wae():t==="pl"?kae():pae()}),Sae=()=>"Loaded a skill",Cae=()=>"已加载技能",zae=()=>"یک مهارت بارگیری شد",Eae=()=>"حمّل مهارة",Nae=()=>"Cargó una skill",Aae=()=>"एक स्किल लोड की",Tae=()=>"스킬 불러오기 완료",Rae=()=>"スキルを読み込みました",Mae=()=>"Wczytano umiejętność",Oae=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cae():t==="fa"?zae():t==="ar"?Eae():t==="es"?Nae():t==="hi"?Aae():t==="ko"?Tae():t==="ja"?Rae():t==="pl"?Mae():Sae()}),$ae=e=>`Loaded ${e==null?void 0:e.name} skill`,Dae=e=>`已加载技能 ${e==null?void 0:e.name}`,Lae=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,Iae=e=>`حمّل مهارة ${e==null?void 0:e.name}`,Pae=e=>`Cargó la skill ${e==null?void 0:e.name}`,Bae=e=>`${e==null?void 0:e.name} स्किल लोड की`,Fae=e=>`${e==null?void 0:e.name} 스킬 불러오기 완료`,Hae=e=>`スキル ${e==null?void 0:e.name} を読み込みました`,qae=e=>`Wczytano umiejętność ${e==null?void 0:e.name}`,Uae=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Dae(e):t==="fa"?Lae(e):t==="ar"?Iae(e):t==="es"?Pae(e):t==="hi"?Bae(e):t==="ko"?Fae(e):t==="ja"?Hae(e):t==="pl"?qae(e):$ae(e)}),Gae=()=>"Loading…",Wae=()=>"正在加载…",Kae=()=>"در حال بارگیری…",Vae=()=>"جارٍ التحميل…",Qae=()=>"Cargando…",Xae=()=>"लोड हो रहा है…",Yae=()=>"불러오는 중…",Zae=()=>"読み込み中…",Jae=()=>"Wczytywanie…",eie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wae():t==="fa"?Kae():t==="ar"?Vae():t==="es"?Qae():t==="hi"?Xae():t==="ko"?Yae():t==="ja"?Zae():t==="pl"?Jae():Gae()}),tie=e=>`Opened ${e==null?void 0:e.target}`,rie=e=>`已打开 ${e==null?void 0:e.target}`,nie=e=>`${e==null?void 0:e.target} باز شد`,sie=e=>`فتح ${e==null?void 0:e.target}`,oie=e=>`Abrió ${e==null?void 0:e.target}`,aie=e=>`${e==null?void 0:e.target} खोला`,iie=e=>`${e==null?void 0:e.target} 열기 완료`,cie=e=>`${e==null?void 0:e.target} を開きました`,lie=e=>`Otwarto ${e==null?void 0:e.target}`,uie=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?rie(e):t==="fa"?nie(e):t==="ar"?sie(e):t==="es"?oie(e):t==="hi"?aie(e):t==="ko"?iie(e):t==="ja"?cie(e):t==="pl"?lie(e):tie(e)}),_ie=e=>`Ran ${e==null?void 0:e.command}`,fie=e=>`已运行 ${e==null?void 0:e.command}`,die=e=>`${e==null?void 0:e.command} اجرا شد`,hie=e=>`نفّذ ${e==null?void 0:e.command}`,pie=e=>`Ejecutó ${e==null?void 0:e.command}`,mie=e=>`${e==null?void 0:e.command} चलाया`,gie=e=>`${e==null?void 0:e.command} 실행 완료`,vie=e=>`${e==null?void 0:e.command} を実行しました`,bie=e=>`Uruchomiono ${e==null?void 0:e.command}`,yie=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fie(e):t==="fa"?die(e):t==="ar"?hie(e):t==="es"?pie(e):t==="hi"?mie(e):t==="ko"?gie(e):t==="ja"?vie(e):t==="pl"?bie(e):_ie(e)}),xie=()=>"Ran a sub-agent",wie=()=>"已运行子智能体",kie=()=>"یک عامل فرعی اجرا شد",jie=()=>"شغّل وكيلًا فرعيًا",Sie=()=>"Ejecutó un subagente",Cie=()=>"एक सब-एजेंट चलाया",zie=()=>"하위 에이전트 실행 완료",Eie=()=>"サブエージェントを実行しました",Nie=()=>"Uruchomiono podagenta",Aie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wie():t==="fa"?kie():t==="ar"?jie():t==="es"?Sie():t==="hi"?Cie():t==="ko"?zie():t==="ja"?Eie():t==="pl"?Nie():xie()}),Tie=()=>"Read",Rie=()=>"读取",Mie=()=>"خواندن",Oie=()=>"قراءة",$ie=()=>"Leer",Die=()=>"पढ़ें",Lie=()=>"읽기",Iie=()=>"読む",Pie=()=>"Odczytaj",Bie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rie():t==="fa"?Mie():t==="ar"?Oie():t==="es"?$ie():t==="hi"?Die():t==="ko"?Lie():t==="ja"?Iie():t==="pl"?Pie():Tie()}),Fie=()=>"Read experiment notes",Hie=()=>"已读取实验笔记",qie=()=>"یادداشت‌های آزمایش خوانده شد",Uie=()=>"قرأ ملاحظات التجربة",Gie=()=>"Leyó las notas del experimento",Wie=()=>"प्रयोग के नोट्स पढ़े",Kie=()=>"실험 노트 읽기 완료",Vie=()=>"実験ノートを読みました",Qie=()=>"Odczytano notatki eksperymentu",Xie=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hie():t==="fa"?qie():t==="ar"?Uie():t==="es"?Gie():t==="hi"?Wie():t==="ko"?Kie():t==="ja"?Vie():t==="pl"?Qie():Fie()}),Yie=()=>"Read a paper",Zie=()=>"已读取论文",Jie=()=>"یک مقاله خوانده شد",ece=()=>"قرأ ورقة",tce=()=>"Leyó un paper",rce=()=>"एक पेपर पढ़ा",nce=()=>"논문 읽기 완료",sce=()=>"論文を読みました",oce=()=>"Przeczytano publikację",ace=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zie():t==="fa"?Jie():t==="ar"?ece():t==="es"?tce():t==="hi"?rce():t==="ko"?nce():t==="ja"?sce():t==="pl"?oce():Yie()}),ice=e=>`Read ${e==null?void 0:e.name} skill`,cce=e=>`已读取技能 ${e==null?void 0:e.name}`,lce=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,uce=e=>`قرأ مهارة ${e==null?void 0:e.name}`,_ce=e=>`Leyó la skill ${e==null?void 0:e.name}`,fce=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,dce=e=>`${e==null?void 0:e.name} 스킬 읽기 완료`,hce=e=>`スキル ${e==null?void 0:e.name} を読みました`,pce=e=>`Odczytano umiejętność ${e==null?void 0:e.name}`,z2=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?cce(e):t==="fa"?lce(e):t==="ar"?uce(e):t==="es"?_ce(e):t==="hi"?fce(e):t==="ko"?dce(e):t==="ja"?hce(e):t==="pl"?pce(e):ice(e)}),mce=e=>`Read ${e==null?void 0:e.target}`,gce=e=>`已读取 ${e==null?void 0:e.target}`,vce=e=>`${e==null?void 0:e.target} خوانده شد`,bce=e=>`قرأ ${e==null?void 0:e.target}`,yce=e=>`Leyó ${e==null?void 0:e.target}`,xce=e=>`${e==null?void 0:e.target} पढ़ा`,wce=e=>`${e==null?void 0:e.target} 읽기 완료`,kce=e=>`${e==null?void 0:e.target} を読みました`,jce=e=>`Odczytano ${e==null?void 0:e.target}`,bm=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?gce(e):t==="fa"?vce(e):t==="ar"?bce(e):t==="es"?yce(e):t==="hi"?xce(e):t==="ko"?wce(e):t==="ja"?kce(e):t==="pl"?jce(e):mce(e)}),Sce=()=>"Read a web page",Cce=()=>"已读取网页",zce=()=>"یک صفحهٔ وب خوانده شد",Ece=()=>"قرأ صفحة ويب",Nce=()=>"Leyó una página web",Ace=()=>"एक वेब पेज पढ़ा",Tce=()=>"웹 페이지 읽기 완료",Rce=()=>"ウェブページを読みました",Mce=()=>"Odczytano stronę internetową",Oce=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cce():t==="fa"?zce():t==="ar"?Ece():t==="es"?Nce():t==="hi"?Ace():t==="ko"?Tce():t==="ja"?Rce():t==="pl"?Mce():Sce()}),$ce=()=>"Reading…",Dce=()=>"正在读取…",Lce=()=>"در حال خواندن…",Ice=()=>"جارٍ القراءة…",Pce=()=>"Leyendo…",Bce=()=>"पढ़ रहा है…",Fce=()=>"읽는 중…",Hce=()=>"読み取り中…",qce=()=>"Odczytywanie…",Uce=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dce():t==="fa"?Lce():t==="ar"?Ice():t==="es"?Pce():t==="hi"?Bce():t==="ko"?Fce():t==="ja"?Hce():t==="pl"?qce():$ce()}),Gce=()=>"Resumed an agent",Wce=()=>"已恢复智能体",Kce=()=>"عامل از سر گرفته شد",Vce=()=>"استأنف عمل وكيل",Qce=()=>"Reanudó un agente",Xce=()=>"एक एजेंट फिर से शुरू किया",Yce=()=>"에이전트 재개 완료",Zce=()=>"エージェントを再開しました",Jce=()=>"Wznowiono działanie agenta",ele=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wce():t==="fa"?Kce():t==="ar"?Vce():t==="es"?Qce():t==="hi"?Xce():t==="ko"?Yce():t==="ja"?Zce():t==="pl"?Jce():Gce()}),tle=()=>"Review",rle=()=>"查看",nle=()=>"بازبینی",sle=()=>"مراجعة",ole=()=>"Revisar",ale=()=>"समीक्षा करें",ile=()=>"검토",cle=()=>"レビュー",lle=()=>"Przejrzyj",ule=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rle():t==="fa"?nle():t==="ar"?sle():t==="es"?ole():t==="hi"?ale():t==="ko"?ile():t==="ja"?cle():t==="pl"?lle():tle()}),_le=()=>"Reviewed run log",fle=()=>"已查看运行日志",dle=()=>"گزارش اجرا بازبینی شد",hle=()=>"راجع سجل التشغيل",ple=()=>"Revisó el log de la ejecución",mle=()=>"रन लॉग की समीक्षा की",gle=()=>"실행 로그 검토 완료",vle=()=>"実行ログを確認しました",ble=()=>"Przejrzano log uruchomienia",yle=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fle():t==="fa"?dle():t==="ar"?hle():t==="es"?ple():t==="hi"?mle():t==="ko"?gle():t==="ja"?vle():t==="pl"?ble():_le()}),xle=()=>"Reviewed run logs",wle=()=>"已查看运行日志",kle=()=>"گزارش‌های اجرا بازبینی شد",jle=()=>"راجع سجلات التشغيل",Sle=()=>"Revisó los logs de las ejecuciones",Cle=()=>"रन लॉग की समीक्षा की",zle=()=>"실행 로그 검토 완료",Ele=()=>"実行ログを確認しました",Nle=()=>"Przejrzano logi uruchomień",Ale=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wle():t==="fa"?kle():t==="ar"?jle():t==="es"?Sle():t==="hi"?Cle():t==="ko"?zle():t==="ja"?Ele():t==="pl"?Nle():xle()}),Tle=()=>"Reviewed experiment status and notes",Rle=()=>"已查看实验状态和笔记",Mle=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",Ole=()=>"راجع حالة التجربة وملاحظاتها",$le=()=>"Revisó el estado y las notas del experimento",Dle=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",Lle=()=>"실험 상태와 노트 검토 완료",Ile=()=>"実験の状態とノートを確認しました",Ple=()=>"Przejrzano stan eksperymentu i notatki",Ble=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rle():t==="fa"?Mle():t==="ar"?Ole():t==="es"?$le():t==="hi"?Dle():t==="ko"?Lle():t==="ja"?Ile():t==="pl"?Ple():Tle()}),Fle=()=>"Reviewing…",Hle=()=>"正在查看…",qle=()=>"در حال بازبینی…",Ule=()=>"جارٍ المراجعة…",Gle=()=>"Revisando…",Wle=()=>"समीक्षा कर रहा है…",Kle=()=>"검토 중…",Vle=()=>"レビュー中…",Qle=()=>"Przeglądanie…",Xle=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hle():t==="fa"?qle():t==="ar"?Ule():t==="es"?Gle():t==="hi"?Wle():t==="ko"?Kle():t==="ja"?Vle():t==="pl"?Qle():Fle()}),Yle=()=>"Run",Zle=()=>"运行",Jle=()=>"اجرا",eue=()=>"تشغيل",tue=()=>"Ejecutar",rue=()=>"चलाएं",nue=()=>"실행",sue=()=>"実行",oue=()=>"Uruchom",aue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zle():t==="fa"?Jle():t==="ar"?eue():t==="es"?tue():t==="hi"?rue():t==="ko"?nue():t==="ja"?sue():t==="pl"?oue():Yle()}),iue=()=>"Running…",cue=()=>"正在运行…",lue=()=>"در حال اجرا…",uue=()=>"جارٍ التشغيل…",_ue=()=>"Ejecutando…",fue=()=>"चल रहा है…",due=()=>"실행 중…",hue=()=>"実行中…",pue=()=>"Uruchamianie…",pD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?cue():t==="fa"?lue():t==="ar"?uue():t==="es"?_ue():t==="hi"?fue():t==="ko"?due():t==="ja"?hue():t==="pl"?pue():iue()}),mue=()=>"Search",gue=()=>"搜索",vue=()=>"جست‌وجو",bue=()=>"بحث",yue=()=>"Buscar",xue=()=>"खोजें",wue=()=>"검색",kue=()=>"検索",jue=()=>"Szukaj",Sue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gue():t==="fa"?vue():t==="ar"?bue():t==="es"?yue():t==="hi"?xue():t==="ko"?wue():t==="ja"?kue():t==="pl"?jue():mue()}),Cue=()=>"Searched alphaXiv full text",zue=()=>"已搜索 alphaXiv 全文",Eue=()=>"متن کامل alphaXiv جست‌وجو شد",Nue=()=>"بحث في نص alphaXiv الكامل",Aue=()=>"Buscó en el texto completo de alphaXiv",Tue=()=>"alphaXiv का पूरा टेक्स्ट खोजा",Rue=()=>"alphaXiv 전문 검색 완료",Mue=()=>"alphaXiv の全文を検索しました",Oue=()=>"Przeszukano pełne teksty w alphaXiv",$ue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zue():t==="fa"?Eue():t==="ar"?Nue():t==="es"?Aue():t==="hi"?Tue():t==="ko"?Rue():t==="ja"?Mue():t==="pl"?Oue():Cue()}),Due=()=>"Searched alphaXiv semantically",Lue=()=>"已对 alphaXiv 进行语义搜索",Iue=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",Pue=()=>"أجرى بحثًا دلاليًا في alphaXiv",Bue=()=>"Hizo una búsqueda semántica en alphaXiv",Fue=()=>"alphaXiv को सिमेंटिक रूप से खोजा",Hue=()=>"alphaXiv 의미 기반 검색 완료",que=()=>"alphaXiv で意味検索しました",Uue=()=>"Przeszukano semantycznie alphaXiv",Gue=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lue():t==="fa"?Iue():t==="ar"?Pue():t==="es"?Bue():t==="hi"?Fue():t==="ko"?Hue():t==="ja"?que():t==="pl"?Uue():Due()}),Wue=()=>"Searched bioRxiv",Kue=()=>"已搜索 bioRxiv",Vue=()=>"bioRxiv جست‌وجو شد",Que=()=>"بحث في bioRxiv",Xue=()=>"Buscó en bioRxiv",Yue=()=>"bioRxiv खोजा",Zue=()=>"bioRxiv 검색 완료",Jue=()=>"bioRxiv を検索しました",e_e=()=>"Przeszukano bioRxiv",t_e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kue():t==="fa"?Vue():t==="ar"?Que():t==="es"?Xue():t==="hi"?Yue():t==="ko"?Zue():t==="ja"?Jue():t==="pl"?e_e():Wue()}),r_e=()=>"Searched code",n_e=()=>"已搜索代码",s_e=()=>"کد جست‌وجو شد",o_e=()=>"بحث في الشيفرة",a_e=()=>"Buscó en el código",i_e=()=>"कोड खोजा",c_e=()=>"코드 검색 완료",l_e=()=>"コードを検索しました",u_e=()=>"Przeszukano kod",E2=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?n_e():t==="fa"?s_e():t==="ar"?o_e():t==="es"?a_e():t==="hi"?i_e():t==="ko"?c_e():t==="ja"?l_e():t==="pl"?u_e():r_e()}),__e=e=>`Searched code for “${e==null?void 0:e.pattern}”`,f_e=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,d_e=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,h_e=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,p_e=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,m_e=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,g_e=e=>`코드에서 “${e==null?void 0:e.pattern}” 검색 완료`,v_e=e=>`コードで「${e==null?void 0:e.pattern}」を検索しました`,b_e=e=>`Przeszukano kod pod kątem „${e==null?void 0:e.pattern}”`,N2=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?f_e(e):t==="fa"?d_e(e):t==="ar"?h_e(e):t==="es"?p_e(e):t==="hi"?m_e(e):t==="ko"?g_e(e):t==="ja"?v_e(e):t==="pl"?b_e(e):__e(e)}),y_e=e=>`Searched images for “${e==null?void 0:e.query}”`,x_e=e=>`已搜索图片“${e==null?void 0:e.query}”`,w_e=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,k_e=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,j_e=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,S_e=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,C_e=e=>`“${e==null?void 0:e.query}” 이미지 검색 완료`,z_e=e=>`「${e==null?void 0:e.query}」の画像を検索しました`,E_e=e=>`Wyszukano obrazy: „${e==null?void 0:e.query}”`,N_e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?x_e(e):t==="fa"?w_e(e):t==="ar"?k_e(e):t==="es"?j_e(e):t==="hi"?S_e(e):t==="ko"?C_e(e):t==="ja"?z_e(e):t==="pl"?E_e(e):y_e(e)}),A_e=()=>"Searched the literature",T_e=()=>"已搜索文献",R_e=()=>"منابع علمی جست‌وجو شد",M_e=()=>"بحث في الأدبيات",O_e=()=>"Buscó en la literatura",$_e=()=>"साहित्य खोजा",D_e=()=>"문헌 검색 완료",L_e=()=>"文献を検索しました",I_e=()=>"Przeszukano literaturę",$v=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?T_e():t==="fa"?R_e():t==="ar"?M_e():t==="es"?O_e():t==="hi"?$_e():t==="ko"?D_e():t==="ja"?L_e():t==="pl"?I_e():A_e()}),P_e=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,B_e=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,F_e=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,H_e=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,q_e=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,U_e=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,G_e=e=>`페이지에서 “${e==null?void 0:e.pattern}” 검색 완료`,W_e=e=>`ページで「${e==null?void 0:e.pattern}」を検索しました`,K_e=e=>`Wyszukano na stronie „${e==null?void 0:e.pattern}”`,V_e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?B_e(e):t==="fa"?F_e(e):t==="ar"?H_e(e):t==="es"?q_e(e):t==="hi"?U_e(e):t==="ko"?G_e(e):t==="ja"?W_e(e):t==="pl"?K_e(e):P_e(e)}),Q_e=()=>"Searched OpenAlex",X_e=()=>"已搜索 OpenAlex",Y_e=()=>"OpenAlex جست‌وجو شد",Z_e=()=>"بحث في OpenAlex",J_e=()=>"Buscó en OpenAlex",efe=()=>"OpenAlex खोजा",tfe=()=>"OpenAlex 검색 완료",rfe=()=>"OpenAlex を検索しました",nfe=()=>"Przeszukano OpenAlex",sfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?X_e():t==="fa"?Y_e():t==="ar"?Z_e():t==="es"?J_e():t==="hi"?efe():t==="ko"?tfe():t==="ja"?rfe():t==="pl"?nfe():Q_e()}),ofe=()=>"Searched PubMed",afe=()=>"已搜索 PubMed",ife=()=>"PubMed جست‌وجو شد",cfe=()=>"بحث في PubMed",lfe=()=>"Buscó en PubMed",ufe=()=>"PubMed खोजा",_fe=()=>"PubMed 검색 완료",ffe=()=>"PubMed を検索しました",dfe=()=>"Przeszukano PubMed",hfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?afe():t==="fa"?ife():t==="ar"?cfe():t==="es"?lfe():t==="hi"?ufe():t==="ko"?_fe():t==="ja"?ffe():t==="pl"?dfe():ofe()}),pfe=e=>`Searched the web for “${e==null?void 0:e.query}”`,mfe=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,gfe=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,vfe=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,bfe=e=>`Buscó “${e==null?void 0:e.query}” en la web`,yfe=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,xfe=e=>`“${e==null?void 0:e.query}” 웹 검색 완료`,wfe=e=>`「${e==null?void 0:e.query}」をウェブで検索しました`,kfe=e=>`Przeszukano internet: „${e==null?void 0:e.query}”`,A9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?mfe(e):t==="fa"?gfe(e):t==="ar"?vfe(e):t==="es"?bfe(e):t==="hi"?yfe(e):t==="ko"?xfe(e):t==="ja"?wfe(e):t==="pl"?kfe(e):pfe(e)}),jfe=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,Sfe=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,Cfe=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,zfe=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,Efe=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,Nfe=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,Afe=e=>`웹 페이지에서 “${e==null?void 0:e.pattern}” 검색 완료`,Tfe=e=>`ウェブページで「${e==null?void 0:e.pattern}」を検索しました`,Rfe=e=>`Wyszukano na stronie internetowej: „${e==null?void 0:e.pattern}”`,Mfe=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Sfe(e):t==="fa"?Cfe(e):t==="ar"?zfe(e):t==="es"?Efe(e):t==="hi"?Nfe(e):t==="ko"?Afe(e):t==="ja"?Tfe(e):t==="pl"?Rfe(e):jfe(e)}),Ofe=()=>"Searching…",$fe=()=>"正在搜索…",Dfe=()=>"در حال جست‌وجو…",Lfe=()=>"جارٍ البحث…",Ife=()=>"Buscando…",Pfe=()=>"खोज रहा है…",Bfe=()=>"검색 중…",Ffe=()=>"検索中…",Hfe=()=>"Wyszukiwanie…",qfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?$fe():t==="fa"?Dfe():t==="ar"?Lfe():t==="es"?Ife():t==="hi"?Pfe():t==="ko"?Bfe():t==="ja"?Ffe():t==="pl"?Hfe():Ofe()}),Ufe=()=>"Sent input to an agent",Gfe=()=>"已向智能体发送输入",Wfe=()=>"ورودی به عامل فرستاده شد",Kfe=()=>"أرسل مدخلًا إلى وكيل",Vfe=()=>"Envió información a un agente",Qfe=()=>"एक एजेंट को इनपुट भेजा",Xfe=()=>"에이전트에 입력 전송 완료",Yfe=()=>"エージェントに入力を送信しました",Zfe=()=>"Wysłano dane wejściowe do agenta",Jfe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Gfe():t==="fa"?Wfe():t==="ar"?Kfe():t==="es"?Vfe():t==="hi"?Qfe():t==="ko"?Xfe():t==="ja"?Yfe():t==="pl"?Zfe():Ufe()}),ede=()=>"Spawned an agent",tde=()=>"已创建智能体",rde=()=>"یک عامل ساخته شد",nde=()=>"أنشأ وكيلًا",sde=()=>"Creó un agente",ode=()=>"एक एजेंट शुरू किया",ade=()=>"에이전트 생성 완료",ide=()=>"エージェントを作成しました",cde=()=>"Utworzono agenta",lde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?tde():t==="fa"?rde():t==="ar"?nde():t==="es"?sde():t==="hi"?ode():t==="ko"?ade():t==="ja"?ide():t==="pl"?cde():ede()}),ude=()=>"Sub-agent",_de=()=>"子智能体",fde=()=>"عامل فرعی",dde=()=>"وكيل فرعي",hde=()=>"Subagente",pde=()=>"सब-एजेंट",mde=()=>"하위 에이전트",gde=()=>"サブエージェント",vde=()=>"Podagent",bde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_de():t==="fa"?fde():t==="ar"?dde():t==="es"?hde():t==="hi"?pde():t==="ko"?mde():t==="ja"?gde():t==="pl"?vde():ude()}),yde=()=>"Sub-agent interrupted",xde=()=>"子智能体已中断",wde=()=>"عامل فرعی متوقف شد",kde=()=>"قُوطع الوكيل الفرعي",jde=()=>"Subagente interrumpido",Sde=()=>"सब-एजेंट बाधित हुआ",Cde=()=>"하위 에이전트 중단됨",zde=()=>"サブエージェントが中断されました",Ede=()=>"Przerwano działanie podagenta",Nde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?xde():t==="fa"?wde():t==="ar"?kde():t==="es"?jde():t==="hi"?Sde():t==="ko"?Cde():t==="ja"?zde():t==="pl"?Ede():yde()}),Ade=()=>"Sub-agent started",Tde=()=>"子智能体已启动",Rde=()=>"عامل فرعی آغاز شد",Mde=()=>"بدأ الوكيل الفرعي",Ode=()=>"Subagente iniciado",$de=()=>"सब-एजेंट शुरू हुआ",Dde=()=>"하위 에이전트 시작됨",Lde=()=>"サブエージェントが開始しました",Ide=()=>"Uruchomiono podagenta",Pde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Tde():t==="fa"?Rde():t==="ar"?Mde():t==="es"?Ode():t==="hi"?$de():t==="ko"?Dde():t==="ja"?Lde():t==="pl"?Ide():Ade()}),Bde=()=>"Updated experiment notes",Fde=()=>"已更新实验笔记",Hde=()=>"یادداشت‌های آزمایش به‌روز شد",qde=()=>"حدّث ملاحظات التجربة",Ude=()=>"Actualizó las notas del experimento",Gde=()=>"प्रयोग के नोट्स अपडेट किए",Wde=()=>"실험 노트 업데이트 완료",Kde=()=>"実験ノートを更新しました",Vde=()=>"Zaktualizowano notatki eksperymentu",Qde=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fde():t==="fa"?Hde():t==="ar"?qde():t==="es"?Ude():t==="hi"?Gde():t==="ko"?Wde():t==="ja"?Kde():t==="pl"?Vde():Bde()}),Xde=()=>"Waiting on an agent",Yde=()=>"正在等待智能体",Zde=()=>"در انتظار عامل",Jde=()=>"في انتظار وكيل",ehe=()=>"Esperando a un agente",the=()=>"एजेंट का इंतज़ार है",rhe=()=>"에이전트 대기 중",nhe=()=>"エージェントを待機中",she=()=>"Oczekiwanie na agenta",ohe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yde():t==="fa"?Zde():t==="ar"?Jde():t==="es"?ehe():t==="hi"?the():t==="ko"?rhe():t==="ja"?nhe():t==="pl"?she():Xde()}),ahe=e=>`Approval required: ${e==null?void 0:e.label}`,ihe=e=>`需要批准:${e==null?void 0:e.label}`,che=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,lhe=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,uhe=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,_he=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,fhe=e=>`승인 필요: ${e==null?void 0:e.label}`,dhe=e=>`承認が必要: ${e==null?void 0:e.label}`,hhe=e=>`Wymagane zatwierdzenie: ${e==null?void 0:e.label}`,T9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?ihe(e):t==="fa"?che(e):t==="ar"?lhe(e):t==="es"?uhe(e):t==="hi"?_he(e):t==="ko"?fhe(e):t==="ja"?dhe(e):t==="pl"?hhe(e):ahe(e)}),phe=()=>"The CLI is retrying the turn.",mhe=()=>"CLI 正在重试本轮。",ghe=()=>"CLI در حال تلاش دوباره برای این نوبت است.",vhe=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",bhe=()=>"La CLI está reintentando el turno.",yhe=()=>"CLI टर्न फिर से कोशिश कर रहा है।",xhe=()=>"CLI가 턴을 다시 시도하고 있습니다.",whe=()=>"CLI がターンを再試行しています。",khe=()=>"CLI ponawia próbę.",jhe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mhe():t==="fa"?ghe():t==="ar"?vhe():t==="es"?bhe():t==="hi"?yhe():t==="ko"?xhe():t==="ja"?whe():t==="pl"?khe():phe()}),She=()=>"Continue is available.",Che=()=>"可以继续。",zhe=()=>"ادامه در دسترس است.",Ehe=()=>"المتابعة متاحة.",Nhe=()=>"Puedes continuar.",Ahe=()=>"जारी रखना उपलब्ध है।",The=()=>"계속할 수 있습니다.",Rhe=()=>"続行できます。",Mhe=()=>"Można kontynuować.",Ohe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Che():t==="fa"?zhe():t==="ar"?Ehe():t==="es"?Nhe():t==="hi"?Ahe():t==="ko"?The():t==="ja"?Rhe():t==="pl"?Mhe():She()}),$he=()=>"Retry is available.",Dhe=()=>"可以重试。",Lhe=()=>"تلاش دوباره در دسترس است.",Ihe=()=>"إعادة المحاولة متاحة.",Phe=()=>"Puedes reintentarlo.",Bhe=()=>"फिर से कोशिश करना उपलब्ध है।",Fhe=()=>"다시 시도할 수 있습니다.",Hhe=()=>"再試行できます。",qhe=()=>"Można ponowić próbę.",Uhe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dhe():t==="fa"?Lhe():t==="ar"?Ihe():t==="es"?Phe():t==="hi"?Bhe():t==="ko"?Fhe():t==="ja"?Hhe():t==="pl"?qhe():$he()}),Ghe=()=>"Running a tool",Whe=()=>"正在运行工具",Khe=()=>"در حال اجرای ابزار",Vhe=()=>"جارٍ تشغيل أداة",Qhe=()=>"Ejecutando una herramienta",Xhe=()=>"एक टूल चल रहा है",Yhe=()=>"도구 실행 중",Zhe=()=>"ツールを実行中",Jhe=()=>"Narzędzie jest uruchomione",epe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Whe():t==="fa"?Khe():t==="ar"?Vhe():t==="es"?Qhe():t==="hi"?Xhe():t==="ko"?Yhe():t==="ja"?Zhe():t==="pl"?Jhe():Ghe()}),tpe=()=>"Tool activity completed",rpe=()=>"工具活动已完成",npe=()=>"فعالیت ابزار کامل شد",spe=()=>"اكتمل نشاط الأداة",ope=()=>"Actividad de la herramienta completada",ape=()=>"टूल गतिविधि पूरी हुई",ipe=()=>"도구 작업 완료",cpe=()=>"ツールの処理が完了しました",lpe=()=>"Narzędzie zakończyło działanie",upe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rpe():t==="fa"?npe():t==="ar"?spe():t==="es"?ope():t==="hi"?ape():t==="ko"?ipe():t==="ja"?cpe():t==="pl"?lpe():tpe()}),_pe=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,fpe=e=>`工具活动失败:${e==null?void 0:e.labels}`,dpe=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,hpe=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,ppe=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,mpe=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,gpe=e=>`도구 작업 실패: ${e==null?void 0:e.labels}`,vpe=e=>`ツールの処理に失敗: ${e==null?void 0:e.labels}`,bpe=e=>`Błąd działania narzędzia: ${e==null?void 0:e.labels}`,ype=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fpe(e):t==="fa"?dpe(e):t==="ar"?hpe(e):t==="es"?ppe(e):t==="hi"?mpe(e):t==="ko"?gpe(e):t==="ja"?vpe(e):t==="pl"?bpe(e):_pe(e)}),xpe=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,wpe=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,kpe=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,jpe=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,Spe=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,Cpe=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,zpe=e=>`도구 작업 ${e==null?void 0:e.count}개 실패: ${e==null?void 0:e.labels}`,Epe=e=>`${e==null?void 0:e.count} 件のツール処理に失敗: ${e==null?void 0:e.labels}`,Npe=e=>`Wystąpiły błędy w ${e==null?void 0:e.count} działaniach narzędzi: ${e==null?void 0:e.labels}`,Ape=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?wpe(e):t==="fa"?kpe(e):t==="ar"?jpe(e):t==="es"?Spe(e):t==="hi"?Cpe(e):t==="ko"?zpe(e):t==="ja"?Epe(e):t==="pl"?Npe(e):xpe(e)}),Tpe=()=>"Turn did not finish.",Rpe=()=>"本轮未完成。",Mpe=()=>"این نوبت کامل نشد.",Ope=()=>"لم تكتمل الجولة.",$pe=()=>"El turno no terminó.",Dpe=()=>"यह टर्न पूरा नहीं हुआ।",Lpe=()=>"턴이 완료되지 않았습니다.",Ipe=()=>"ターンが完了しませんでした。",Ppe=()=>"Odpowiedź nie została ukończona.",Bpe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rpe():t==="fa"?Mpe():t==="ar"?Ope():t==="es"?$pe():t==="hi"?Dpe():t==="ko"?Lpe():t==="ja"?Ipe():t==="pl"?Ppe():Tpe()}),Fpe=()=>"Artifacts",Hpe=()=>"产物",qpe=()=>"خروجی‌ها",Upe=()=>"المُخرَجات",Gpe=()=>"Artefactos",Wpe=()=>"आर्टिफ़ैक्ट",Kpe=()=>"결과물",Vpe=()=>"成果物",Qpe=()=>"Artefakty",mD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hpe():t==="fa"?qpe():t==="ar"?Upe():t==="es"?Gpe():t==="hi"?Wpe():t==="ko"?Kpe():t==="ja"?Vpe():t==="pl"?Qpe():Fpe()}),Xpe=()=>"Close panel",Ype=()=>"关闭面板",Zpe=()=>"بستن پنل",Jpe=()=>"إغلاق اللوحة",eme=()=>"Cerrar panel",tme=()=>"पैनल बंद करें",rme=()=>"패널 닫기",nme=()=>"パネルを閉じる",sme=()=>"Zamknij panel",fg=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ype():t==="fa"?Zpe():t==="ar"?Jpe():t==="es"?eme():t==="hi"?tme():t==="ko"?rme():t==="ja"?nme():t==="pl"?sme():Xpe()}),ome=()=>"Current task",ame=()=>"当前任务",ime=()=>"وظیفهٔ فعلی",cme=()=>"المهمة الحالية",lme=()=>"Tarea actual",ume=()=>"मौजूदा टास्क",_me=()=>"현재 작업",fme=()=>"現在のタスク",dme=()=>"Bieżące zadanie",R9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ame():t==="fa"?ime():t==="ar"?cme():t==="es"?lme():t==="hi"?ume():t==="ko"?_me():t==="ja"?fme():t==="pl"?dme():ome()}),hme=()=>"Drag to resize panel",pme=()=>"拖动以调整面板大小",mme=()=>"برای تغییر اندازهٔ پنل بکشید",gme=()=>"اسحب لتغيير حجم اللوحة",vme=()=>"Arrastra para cambiar el tamaño del panel",bme=()=>"पैनल का आकार बदलने के लिए खींचें",yme=()=>"드래그하여 패널 크기 조정",xme=()=>"ドラッグしてパネルのサイズを変更",wme=()=>"Przeciągnij, aby zmienić rozmiar panelu",kme=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?pme():t==="fa"?mme():t==="ar"?gme():t==="es"?vme():t==="hi"?bme():t==="ko"?yme():t==="ja"?xme():t==="pl"?wme():hme()}),jme=()=>"Drag toward the center to restore panel",Sme=()=>"向中央拖动以恢复面板",Cme=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",zme=()=>"اسحب نحو المنتصف لاستعادة اللوحة",Eme=()=>"Arrastra hacia el centro para restaurar el panel",Nme=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",Ame=()=>"패널을 복원하려면 중앙으로 드래그",Tme=()=>"中央にドラッグしてパネルを復元",Rme=()=>"Przeciągnij w kierunku środka, aby przywrócić panel",Mme=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Sme():t==="fa"?Cme():t==="ar"?zme():t==="es"?Eme():t==="hi"?Nme():t==="ko"?Ame():t==="ja"?Tme():t==="pl"?Rme():jme()}),Ome=()=>"Entire project",$me=()=>"整个项目",Dme=()=>"کل پروژه",Lme=()=>"المشروع بالكامل",Ime=()=>"Todo el proyecto",Pme=()=>"पूरा प्रोजेक्ट",Bme=()=>"전체 프로젝트",Fme=()=>"プロジェクト全体",Hme=()=>"Cały projekt",M9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?$me():t==="fa"?Dme():t==="ar"?Lme():t==="es"?Ime():t==="hi"?Pme():t==="ko"?Bme():t==="ja"?Fme():t==="pl"?Hme():Ome()}),qme=()=>"Expand panel",Ume=()=>"展开面板",Gme=()=>"گسترش پنل",Wme=()=>"توسيع اللوحة",Kme=()=>"Expandir panel",Vme=()=>"पैनल फैलाएं",Qme=()=>"패널 확장",Xme=()=>"パネルを拡大",Yme=()=>"Rozwiń panel",O9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ume():t==="fa"?Gme():t==="ar"?Wme():t==="es"?Kme():t==="hi"?Vme():t==="ko"?Qme():t==="ja"?Xme():t==="pl"?Yme():qme()}),Zme=e=>`Experiment filter: ${e==null?void 0:e.scope}`,Jme=e=>`实验筛选:${e==null?void 0:e.scope}`,ege=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,tge=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,rge=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,nge=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,sge=e=>`실험 필터: ${e==null?void 0:e.scope}`,oge=e=>`実験フィルター: ${e==null?void 0:e.scope}`,age=e=>`Filtr eksperymentów: ${e==null?void 0:e.scope}`,ige=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Jme(e):t==="fa"?ege(e):t==="ar"?tge(e):t==="es"?rge(e):t==="hi"?nge(e):t==="ko"?sge(e):t==="ja"?oge(e):t==="pl"?age(e):Zme(e)}),cge=()=>"Experiment view",lge=()=>"实验视图",uge=()=>"نمای آزمایش",_ge=()=>"عرض التجربة",fge=()=>"Vista de experimento",dge=()=>"प्रयोग व्यू",hge=()=>"실험 보기",pge=()=>"実験表示",mge=()=>"Widok eksperymentu",gge=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?lge():t==="fa"?uge():t==="ar"?_ge():t==="es"?fge():t==="hi"?dge():t==="ko"?hge():t==="ja"?pge():t==="pl"?mge():cge()}),vge=()=>"Experiments",bge=()=>"实验",yge=()=>"آزمایش‌ها",xge=()=>"التجارب",wge=()=>"Experimentos",kge=()=>"प्रयोग",jge=()=>"실험",Sge=()=>"実験",Cge=()=>"Eksperymenty",gD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?bge():t==="fa"?yge():t==="ar"?xge():t==="es"?wge():t==="hi"?kge():t==="ko"?jge():t==="ja"?Sge():t==="pl"?Cge():vge()}),zge=()=>"Files",Ege=()=>"文件",Nge=()=>"فایل‌ها",Age=()=>"الملفات",Tge=()=>"Archivos",Rge=()=>"फ़ाइलें",Mge=()=>"파일",Oge=()=>"ファイル",$ge=()=>"Pliki",G4=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ege():t==="fa"?Nge():t==="ar"?Age():t==="es"?Tge():t==="hi"?Rge():t==="ko"?Mge():t==="ja"?Oge():t==="pl"?$ge():zge()}),Dge=()=>"Filter experiments",Lge=()=>"筛选实验",Ige=()=>"فیلتر آزمایش‌ها",Pge=()=>"تصفية التجارب",Bge=()=>"Filtrar experimentos",Fge=()=>"प्रयोग फ़िल्टर करें",Hge=()=>"실험 필터링",qge=()=>"実験を絞り込む",Uge=()=>"Filtruj eksperymenty",Gge=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lge():t==="fa"?Ige():t==="ar"?Pge():t==="es"?Bge():t==="hi"?Fge():t==="ko"?Hge():t==="ja"?qge():t==="pl"?Uge():Dge()}),Wge=()=>"Current task filtering is unavailable for unattributed experiments",Kge=()=>"存在无法归属的实验时,不能按当前任务筛选",Vge=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",Qge=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",Xge=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",Yge=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",Zge=()=>"작업에 연결되지 않은 실험은 현재 작업 필터를 사용할 수 없습니다",Jge=()=>"タスクに紐付いていない実験では、現在のタスクによる絞り込みは利用できません",e0e=()=>"Filtrowanie według bieżącego zadania jest niedostępne dla eksperymentów bez przypisania",t0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kge():t==="fa"?Vge():t==="ar"?Qge():t==="es"?Xge():t==="hi"?Yge():t==="ko"?Zge():t==="ja"?Jge():t==="pl"?e0e():Wge()}),r0e=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",n0e=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",s0e=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",o0e=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",a0e=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",i0e=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",c0e=()=>"현재 작업에서 생성한 실험이 아직 없습니다. 전체 프로젝트로 전환하여 모든 실험을 확인하세요.",l0e=()=>"現在のタスクの実験はまだありません。プロジェクト全体に切り替えて、すべての実験を確認してください。",u0e=()=>"Brak eksperymentów w bieżącym zadaniu. Przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty.",_0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?n0e():t==="fa"?s0e():t==="ar"?o0e():t==="es"?a0e():t==="hi"?i0e():t==="ko"?c0e():t==="ja"?l0e():t==="pl"?u0e():r0e()}),f0e=()=>"Open a task to filter to its experiments",d0e=()=>"请打开一个任务以筛选其实验",h0e=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",p0e=()=>"افتح مهمة لعرض تجاربها فقط",m0e=()=>"Abre una tarea para filtrar por sus experimentos",g0e=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",v0e=()=>"작업을 열어 해당 실험만 표시",b0e=()=>"タスクを開いて、その実験に絞り込む",y0e=()=>"Otwórz zadanie, aby filtrować jego eksperymenty",x0e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?d0e():t==="fa"?h0e():t==="ar"?p0e():t==="es"?m0e():t==="hi"?g0e():t==="ko"?v0e():t==="ja"?b0e():t==="pl"?y0e():f0e()}),w0e=()=>"projects",k0e=()=>"项目",j0e=()=>"پروژه‌ها",S0e=()=>"المشاريع",C0e=()=>"los proyectos",z0e=()=>"प्रोजेक्ट",E0e=()=>"프로젝트",N0e=()=>"プロジェクト",A0e=()=>"projekty",Gm=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?k0e():t==="fa"?j0e():t==="ar"?S0e():t==="es"?C0e():t==="hi"?z0e():t==="ko"?E0e():t==="ja"?N0e():t==="pl"?A0e():w0e()}),T0e=()=>"Restore panel",R0e=()=>"还原面板",M0e=()=>"بازگرداندن اندازهٔ پنل",O0e=()=>"استعادة اللوحة",$0e=()=>"Restaurar panel",D0e=()=>"पैनल वापस लाएं",L0e=()=>"패널 복원",I0e=()=>"パネルを復元",P0e=()=>"Przywróć panel",$9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?R0e():t==="fa"?M0e():t==="ar"?O0e():t==="es"?$0e():t==="hi"?D0e():t==="ko"?L0e():t==="ja"?I0e():t==="pl"?P0e():T0e()}),B0e=()=>"Retry",F0e=()=>"重试",H0e=()=>"تلاش دوباره",q0e=()=>"إعادة المحاولة",U0e=()=>"Reintentar",G0e=()=>"फिर से कोशिश करें",W0e=()=>"다시 시도",K0e=()=>"再試行",V0e=()=>"Ponów",Ks=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F0e():t==="fa"?H0e():t==="ar"?q0e():t==="es"?U0e():t==="hi"?G0e():t==="ko"?W0e():t==="ja"?K0e():t==="pl"?V0e():B0e()}),Q0e=()=>"Select a project to browse its files.",X0e=()=>"选择一个项目以浏览其文件。",Y0e=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Z0e=()=>"اختر مشروعًا لتصفح ملفاته.",J0e=()=>"Selecciona un proyecto para explorar sus archivos.",eve=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",tve=()=>"파일을 탐색할 프로젝트를 선택하세요.",rve=()=>"ファイルを閲覧するプロジェクトを選択してください。",nve=()=>"Wybierz projekt, aby przeglądać jego pliki.",sve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?X0e():t==="fa"?Y0e():t==="ar"?Z0e():t==="es"?J0e():t==="hi"?eve():t==="ko"?tve():t==="ja"?rve():t==="pl"?nve():Q0e()}),ove=()=>"settings",ave=()=>"设置",ive=()=>"تنظیمات",cve=()=>"الإعدادات",lve=()=>"la configuración",uve=()=>"सेटिंग्स",_ve=()=>"설정",fve=()=>"設定",dve=()=>"ustawienia",hve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ave():t==="fa"?ive():t==="ar"?cve():t==="es"?lve():t==="hi"?uve():t==="ko"?_ve():t==="ja"?fve():t==="pl"?dve():ove()}),pve=()=>"Show archived",mve=()=>"显示已归档",gve=()=>"نمایش بایگانی‌شده‌ها",vve=()=>"إظهار المؤرشف",bve=()=>"Mostrar archivados",yve=()=>"संग्रहीत दिखाएँ",xve=()=>"보관된 실험 표시",wve=()=>"アーカイブ済みを表示",kve=()=>"Pokaż zarchiwizowane",jve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mve():t==="fa"?gve():t==="ar"?vve():t==="es"?bve():t==="hi"?yve():t==="ko"?xve():t==="ja"?wve():t==="pl"?kve():pve()}),Sve=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,Cve=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,zve=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,Eve=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,Nve=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,Ave=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,Tve=e=>`OpenResearch ${e==null?void 0:e.items}을(를) 불러올 수 없습니다.`,Rve=e=>`OpenResearch の ${e==null?void 0:e.items} を読み込めませんでした。`,Mve=e=>`Nie udało się wczytać elementów OpenResearch: ${e==null?void 0:e.items}.`,Ove=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Cve(e):t==="fa"?zve(e):t==="ar"?Eve(e):t==="es"?Nve(e):t==="hi"?Ave(e):t==="ko"?Tve(e):t==="ja"?Rve(e):t==="pl"?Mve(e):Sve(e)}),$ve=()=>"Sub-agent",Dve=()=>"子智能体",Lve=()=>"عامل فرعی",Ive=()=>"وكيل فرعي",Pve=()=>"Subagente",Bve=()=>"सब-एजेंट",Fve=()=>"하위 에이전트",Hve=()=>"サブエージェント",qve=()=>"Podagent",Uve=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dve():t==="fa"?Lve():t==="ar"?Ive():t==="es"?Pve():t==="hi"?Bve():t==="ko"?Fve():t==="ja"?Hve():t==="pl"?qve():$ve()}),Gve=()=>"Table",Wve=()=>"表格",Kve=()=>"جدول",Vve=()=>"جدول",Qve=()=>"Tabla",Xve=()=>"टेबल",Yve=()=>"표",Zve=()=>"表",Jve=()=>"Tabela",e1e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wve():t==="fa"?Kve():t==="ar"?Vve():t==="es"?Qve():t==="hi"?Xve():t==="ko"?Yve():t==="ja"?Zve():t==="pl"?Jve():Gve()}),t1e=()=>"Tree",r1e=()=>"树状图",n1e=()=>"درخت",s1e=()=>"شجرة",o1e=()=>"Árbol",a1e=()=>"ट्री",i1e=()=>"트리",c1e=()=>"ツリー",l1e=()=>"Drzewo",u1e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?r1e():t==="fa"?n1e():t==="ar"?s1e():t==="es"?o1e():t==="hi"?a1e():t==="ko"?i1e():t==="ja"?c1e():t==="pl"?l1e():t1e()}),_1e=e=>`Collapse ${e==null?void 0:e.name}`,f1e=e=>`折叠 ${e==null?void 0:e.name}`,d1e=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,h1e=e=>`طيّ ${e==null?void 0:e.name}`,p1e=e=>`Contraer ${e==null?void 0:e.name}`,m1e=e=>`${e==null?void 0:e.name} समेटें`,g1e=e=>`${e==null?void 0:e.name} 접기`,v1e=e=>`${e==null?void 0:e.name} を折りたたむ`,b1e=e=>`Zwiń folder ${e==null?void 0:e.name}`,y1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?f1e(e):t==="fa"?d1e(e):t==="ar"?h1e(e):t==="es"?p1e(e):t==="hi"?m1e(e):t==="ko"?g1e(e):t==="ja"?v1e(e):t==="pl"?b1e(e):_1e(e)}),x1e=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,w1e=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,k1e=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,j1e=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,S1e=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,C1e=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,z1e=e=>`결과물 디렉터리에서 “${e==null?void 0:e.path}”을(를) 삭제할까요?`,E1e=e=>`成果物ディレクトリから「${e==null?void 0:e.path}」を削除しますか?`,N1e=e=>`Usunąć „${e==null?void 0:e.path}” z katalogu artefaktów?`,Dj=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?w1e(e):t==="fa"?k1e(e):t==="ar"?j1e(e):t==="es"?S1e(e):t==="hi"?C1e(e):t==="ko"?z1e(e):t==="ja"?E1e(e):t==="pl"?N1e(e):x1e(e)}),A1e=e=>`Delete folder ${e==null?void 0:e.name}`,T1e=e=>`删除文件夹 ${e==null?void 0:e.name}`,R1e=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,M1e=e=>`حذف المجلد ${e==null?void 0:e.name}`,O1e=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,$1e=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,D1e=e=>`${e==null?void 0:e.name} 폴더 삭제`,L1e=e=>`フォルダー ${e==null?void 0:e.name} を削除`,I1e=e=>`Usuń folder ${e==null?void 0:e.name}`,P1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T1e(e):t==="fa"?R1e(e):t==="ar"?M1e(e):t==="es"?O1e(e):t==="hi"?$1e(e):t==="ko"?D1e(e):t==="ja"?L1e(e):t==="pl"?I1e(e):A1e(e)}),B1e=e=>`Expand ${e==null?void 0:e.name}`,F1e=e=>`展开 ${e==null?void 0:e.name}`,H1e=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,q1e=e=>`توسيع ${e==null?void 0:e.name}`,U1e=e=>`Expandir ${e==null?void 0:e.name}`,G1e=e=>`${e==null?void 0:e.name} फैलाएं`,W1e=e=>`${e==null?void 0:e.name} 펼치기`,K1e=e=>`${e==null?void 0:e.name} を展開`,V1e=e=>`Rozwiń folder ${e==null?void 0:e.name}`,Q1e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?F1e(e):t==="fa"?H1e(e):t==="ar"?q1e(e):t==="es"?U1e(e):t==="hi"?G1e(e):t==="ko"?W1e(e):t==="ja"?K1e(e):t==="pl"?V1e(e):B1e(e)}),X1e=()=>"Binary or unsupported file — no inline preview.",Y1e=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",Z1e=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",J1e=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",ebe=()=>"Archivo binario o no compatible — sin vista previa.",tbe=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",rbe=()=>"바이너리 또는 지원하지 않는 파일은 인라인 미리보기를 지원하지 않습니다.",nbe=()=>"バイナリまたは未対応のファイルにはインラインプレビューがありません。",sbe=()=>"Plik binarny lub nieobsługiwany — podgląd jest niedostępny.",obe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y1e():t==="fa"?Z1e():t==="ar"?J1e():t==="es"?ebe():t==="hi"?tbe():t==="ko"?rbe():t==="ja"?nbe():t==="pl"?sbe():X1e()}),abe=()=>"Copy path",ibe=()=>"复制路径",cbe=()=>"کپی مسیر",lbe=()=>"نسخ المسار",ube=()=>"Copiar ruta",_be=()=>"पथ कॉपी करें",fbe=()=>"경로 복사",dbe=()=>"パスをコピー",hbe=()=>"Kopiuj ścieżkę",pbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ibe():t==="fa"?cbe():t==="ar"?lbe():t==="es"?ube():t==="hi"?_be():t==="ko"?fbe():t==="ja"?dbe():t==="pl"?hbe():abe()}),mbe=()=>"Artifact not found",gbe=()=>"找不到产物",vbe=()=>"خروجی پیدا نشد",bbe=()=>"لم يُعثر على المُخرَج",ybe=()=>"No se encontró el artefacto",xbe=()=>"आर्टिफ़ैक्ट नहीं मिला",wbe=()=>"결과물을 찾지 못했습니다",kbe=()=>"成果物が見つかりません",jbe=()=>"Nie znaleziono artefaktu",Sbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gbe():t==="fa"?vbe():t==="ar"?bbe():t==="es"?ybe():t==="hi"?xbe():t==="ko"?wbe():t==="ja"?kbe():t==="pl"?jbe():mbe()}),Cbe=()=>"Open raw",zbe=()=>"打开原始文件",Ebe=()=>"باز کردن فایل خام",Nbe=()=>"فتح الملف الخام",Abe=()=>"Abrir sin formato",Tbe=()=>"रॉ खोलें",Rbe=()=>"원본 열기",Mbe=()=>"元のファイルを開く",Obe=()=>"Otwórz surowy plik",$be=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zbe():t==="fa"?Ebe():t==="ar"?Nbe():t==="es"?Abe():t==="hi"?Tbe():t==="ko"?Rbe():t==="ja"?Mbe():t==="pl"?Obe():Cbe()}),Dbe=()=>"Click an artifact to view it",Lbe=()=>"点击产物即可查看",Ibe=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Pbe=()=>"انقر على مُخرَج لعرضه",Bbe=()=>"Selecciona un artefacto para verlo",Fbe=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",Hbe=()=>"결과물을 클릭하여 확인하세요",qbe=()=>"成果物をクリックして表示",Ube=()=>"Kliknij artefakt, aby go wyświetlić",Gbe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lbe():t==="fa"?Ibe():t==="ar"?Pbe():t==="es"?Bbe():t==="hi"?Fbe():t==="ko"?Hbe():t==="ja"?qbe():t==="pl"?Ube():Dbe()}),Wbe=()=>"Delete artifact",Kbe=()=>"删除产物",Vbe=()=>"حذف خروجی",Qbe=()=>"حذف المُخرَج",Xbe=()=>"Eliminar artefacto",Ybe=()=>"आर्टिफ़ैक्ट हटाएं",Zbe=()=>"결과물 삭제",Jbe=()=>"成果物を削除",eye=()=>"Usuń artefakt",D9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kbe():t==="fa"?Vbe():t==="ar"?Qbe():t==="es"?Xbe():t==="hi"?Ybe():t==="ko"?Zbe():t==="ja"?Jbe():t==="pl"?eye():Wbe()}),tye=()=>"Delete folder",rye=()=>"删除文件夹",nye=()=>"حذف پوشه",sye=()=>"حذف المجلد",oye=()=>"Eliminar carpeta",aye=()=>"फ़ोल्डर हटाएं",iye=()=>"폴더 삭제",cye=()=>"フォルダーを削除",lye=()=>"Usuń folder",uye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rye():t==="fa"?nye():t==="ar"?sye():t==="es"?oye():t==="hi"?aye():t==="ko"?iye():t==="ja"?cye():t==="pl"?lye():tye()}),_ye=()=>"Failed to load:",fye=()=>"加载失败:",dye=()=>"بارگیری ناموفق بود:",hye=()=>"تعذّر التحميل:",pye=()=>"Error al cargar:",mye=()=>"लोड नहीं हो सका:",gye=()=>"불러오기 실패:",vye=()=>"読み込みに失敗:",bye=()=>"Nie udało się wczytać:",yye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fye():t==="fa"?dye():t==="ar"?hye():t==="es"?pye():t==="hi"?mye():t==="ko"?gye():t==="ja"?vye():t==="pl"?bye():_ye()}),xye=()=>"File truncated — showing the first 512 KB.",wye=()=>"文件已截断——仅显示前 512 KB。",kye=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",jye=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",Sye=()=>"Archivo truncado — se muestran los primeros 512 KB.",Cye=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",zye=()=>"파일이 잘렸습니다. 처음 512 KB만 표시합니다.",Eye=()=>"ファイルが省略されています。先頭の 512 KB を表示しています。",Nye=()=>"Plik został ucięty — wyświetlono pierwsze 512 KB.",Aye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wye():t==="fa"?kye():t==="ar"?jye():t==="es"?Sye():t==="hi"?Cye():t==="ko"?zye():t==="ja"?Eye():t==="pl"?Nye():xye()}),Tye=()=>"Listing truncated — the folder has more artifacts.",Rye=()=>"列表已截断——文件夹中还有更多产物。",Mye=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",Oye=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",$ye=()=>"Listado truncado — la carpeta tiene más artefactos.",Dye=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",Lye=()=>"목록이 잘렸습니다. 폴더에 더 많은 결과물이 있습니다.",Iye=()=>"一覧が省略されています。フォルダーには他にも成果物があります。",Pye=()=>"Lista została ucięta — folder zawiera więcej artefaktów.",Bye=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rye():t==="fa"?Mye():t==="ar"?Oye():t==="es"?$ye():t==="hi"?Dye():t==="ko"?Lye():t==="ja"?Iye():t==="pl"?Pye():Tye()}),Fye=()=>"Loading…",Hye=()=>"正在加载…",qye=()=>"در حال بارگیری…",Uye=()=>"جارٍ التحميل…",Gye=()=>"Cargando…",Wye=()=>"लोड हो रहा है…",Kye=()=>"불러오는 중…",Vye=()=>"読み込み中…",Qye=()=>"Wczytywanie…",vD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hye():t==="fa"?qye():t==="ar"?Uye():t==="es"?Gye():t==="hi"?Wye():t==="ko"?Kye():t==="ja"?Vye():t==="pl"?Qye():Fye()}),Xye=()=>"Loading artifacts…",Yye=()=>"正在加载产物…",Zye=()=>"در حال بارگیری خروجی‌ها…",Jye=()=>"جارٍ تحميل المُخرَجات…",exe=()=>"Cargando artefactos…",txe=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",rxe=()=>"결과물 불러오는 중…",nxe=()=>"成果物を読み込み中…",sxe=()=>"Wczytywanie artefaktów…",oxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yye():t==="fa"?Zye():t==="ar"?Jye():t==="es"?exe():t==="hi"?txe():t==="ko"?rxe():t==="ja"?nxe():t==="pl"?sxe():Xye()}),axe=()=>"Modified",ixe=()=>"修改时间",cxe=()=>"ویرایش‌شده",lxe=()=>"عُدّل",uxe=()=>"Modificado",_xe=()=>"बदला गया",fxe=()=>"수정됨",dxe=()=>"変更済み",hxe=()=>"Zmodyfikowano",pxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ixe():t==="fa"?cxe():t==="ar"?lxe():t==="es"?uxe():t==="hi"?_xe():t==="ko"?fxe():t==="ja"?dxe():t==="pl"?hxe():axe()}),mxe=()=>"No artifacts yet",gxe=()=>"尚无产物",vxe=()=>"هنوز خروجی‌ای وجود ندارد",bxe=()=>"لا توجد مُخرَجات بعد",yxe=()=>"Aún no hay artefactos",xxe=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",wxe=()=>"아직 결과물이 없습니다",kxe=()=>"成果物はまだありません",jxe=()=>"Brak artefaktów",Sxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gxe():t==="fa"?vxe():t==="ar"?bxe():t==="es"?yxe():t==="hi"?xxe():t==="ko"?wxe():t==="ja"?kxe():t==="pl"?jxe():mxe()}),Cxe=()=>"Open raw in new tab",zxe=()=>"在新标签页中打开原始文件",Exe=()=>"باز کردن فایل خام در زبانهٔ جدید",Nxe=()=>"فتح الملف الخام في تبويب جديد",Axe=()=>"Abrir sin formato en una pestaña nueva",Txe=()=>"नए टैब में रॉ खोलें",Rxe=()=>"새 탭에서 원본 열기",Mxe=()=>"新しいタブで元のファイルを開く",Oxe=()=>"Otwórz surowy plik w nowej karcie",L9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zxe():t==="fa"?Exe():t==="ar"?Nxe():t==="es"?Axe():t==="hi"?Txe():t==="ko"?Rxe():t==="ja"?Mxe():t==="pl"?Oxe():Cxe()}),$xe=()=>"This is the project's durable output space for reports, figures, images, CSVs, PDFs, and other research artifacts. Ask the agent for a write-up or add your own files.",Dxe=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",Lxe=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",Ixe=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",Pxe=()=>"Este es el espacio de resultados permanente del proyecto: informes, figuras, imágenes, CSV, PDF y otros artefactos de investigación. Pídele al agente un informe o añade tus propios archivos.",Bxe=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",Fxe=()=>"보고서, 그림, 이미지, CSV, PDF 등 연구 결과물을 영구 보관하는 프로젝트 공간입니다. 에이전트에게 문서 작성을 요청하거나 직접 파일을 추가하세요.",Hxe=()=>"レポート、図、画像、CSV、PDF などの研究成果物を永続的に保存するプロジェクトの領域です。エージェントに文書の作成を依頼するか、ファイルを追加してください。",qxe=()=>"To miejsce na trwałe wyniki projektu: raporty, wykresy, obrazy, pliki CSV, PDF i inne artefakty badawcze. Poproś agenta o przygotowanie opracowania lub dodaj własne pliki.",Uxe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dxe():t==="fa"?Lxe():t==="ar"?Ixe():t==="es"?Pxe():t==="hi"?Bxe():t==="ko"?Fxe():t==="ja"?Hxe():t==="pl"?qxe():$xe()}),Gxe=()=>"File too large to preview inline.",Wxe=()=>"文件太大,无法内嵌预览。",Kxe=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",Vxe=()=>"الملف كبير جدًا للمعاينة المضمّنة.",Qxe=()=>"El archivo es demasiado grande para previsualizarlo.",Xxe=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",Yxe=()=>"파일이 너무 커서 인라인 미리보기를 할 수 없습니다.",Zxe=()=>"ファイルが大きすぎるためインラインプレビューできません。",Jxe=()=>"Plik jest za duży, aby wyświetlić podgląd.",ewe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wxe():t==="fa"?Kxe():t==="ar"?Vxe():t==="es"?Qxe():t==="hi"?Xxe():t==="ko"?Yxe():t==="ja"?Zxe():t==="pl"?Jxe():Gxe()}),twe=()=>"This is the baseline branch, so there is no parent comparison.",rwe=()=>"这是基线分支,因此没有父分支可供比较。",nwe=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",swe=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",owe=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",awe=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",iwe=()=>"베이스라인 브랜치이므로 상위 브랜치와 비교할 수 없습니다.",cwe=()=>"これはベースラインブランチのため、親との比較はありません。",lwe=()=>"To gałąź bazowa, więc nie ma gałęzi nadrzędnej do porównania.",uwe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rwe():t==="fa"?nwe():t==="ar"?swe():t==="es"?owe():t==="hi"?awe():t==="ko"?iwe():t==="ja"?cwe():t==="pl"?lwe():twe()}),_we=()=>"Failed to load changes:",fwe=()=>"加载更改失败:",dwe=()=>"بارگیری تغییرات ناموفق بود:",hwe=()=>"تعذّر تحميل التغييرات:",pwe=()=>"Error al cargar los cambios:",mwe=()=>"बदलाव लोड नहीं हो सके:",gwe=()=>"변경 사항 불러오기 실패:",vwe=()=>"変更の読み込みに失敗:",bwe=()=>"Nie udało się wczytać zmian:",ywe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fwe():t==="fa"?dwe():t==="ar"?hwe():t==="es"?pwe():t==="hi"?mwe():t==="ko"?gwe():t==="ja"?vwe():t==="pl"?bwe():_we()}),xwe=()=>"Loading changes…",wwe=()=>"正在加载更改…",kwe=()=>"در حال بارگیری تغییرات…",jwe=()=>"جارٍ تحميل التغييرات…",Swe=()=>"Cargando cambios…",Cwe=()=>"बदलाव लोड हो रहे हैं…",zwe=()=>"변경 사항 불러오는 중…",Ewe=()=>"変更を読み込み中…",Nwe=()=>"Wczytywanie zmian…",Awe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wwe():t==="fa"?kwe():t==="ar"?jwe():t==="es"?Swe():t==="hi"?Cwe():t==="ko"?zwe():t==="ja"?Ewe():t==="pl"?Nwe():xwe()}),Twe=()=>"No committed changes from the parent branch.",Rwe=()=>"与父分支相比没有已提交的更改。",Mwe=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",Owe=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",$we=()=>"No hay cambios confirmados respecto a la rama padre.",Dwe=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",Lwe=()=>"상위 브랜치 대비 커밋된 변경 사항이 없습니다.",Iwe=()=>"親ブランチからのコミット済みの変更はありません。",Pwe=()=>"Brak zatwierdzonych zmian względem gałęzi nadrzędnej.",Bwe=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rwe():t==="fa"?Mwe():t==="ar"?Owe():t==="es"?$we():t==="hi"?Dwe():t==="ko"?Lwe():t==="ja"?Iwe():t==="pl"?Pwe():Twe()}),Fwe=e=>`chat ${e==null?void 0:e.number}`,Hwe=e=>`聊天 ${e==null?void 0:e.number}`,qwe=e=>`گفتگو ${e==null?void 0:e.number}`,Uwe=e=>`محادثة ${e==null?void 0:e.number}`,Gwe=e=>`chat ${e==null?void 0:e.number}`,Wwe=e=>`चैट ${e==null?void 0:e.number}`,Kwe=e=>`채팅 ${e==null?void 0:e.number}`,Vwe=e=>`チャット ${e==null?void 0:e.number}`,Qwe=e=>`czat ${e==null?void 0:e.number}`,I9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Hwe(e):t==="fa"?qwe(e):t==="ar"?Uwe(e):t==="es"?Gwe(e):t==="hi"?Wwe(e):t==="ko"?Kwe(e):t==="ja"?Vwe(e):t==="pl"?Qwe(e):Fwe(e)}),Xwe=()=>"agent sessions",Ywe=()=>"智能体会话",Zwe=()=>"نشست‌های عامل‌ها",Jwe=()=>"جلسات الوكلاء",e2e=()=>"sesiones de agente",t2e=()=>"एजेंट सेशन",r2e=()=>"에이전트 세션",n2e=()=>"エージェントのセッション",s2e=()=>"sesje agentów",o2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ywe():t==="fa"?Zwe():t==="ar"?Jwe():t==="es"?e2e():t==="hi"?t2e():t==="ko"?r2e():t==="ja"?n2e():t==="pl"?s2e():Xwe()}),a2e=()=>"All sessions",i2e=()=>"所有会话",c2e=()=>"همهٔ نشست‌ها",l2e=()=>"كل الجلسات",u2e=()=>"Todas las sesiones",_2e=()=>"सभी सेशन",f2e=()=>"모든 세션",d2e=()=>"すべてのセッション",h2e=()=>"Wszystkie sesje",bD=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i2e():t==="fa"?c2e():t==="ar"?l2e():t==="es"?u2e():t==="hi"?_2e():t==="ko"?f2e():t==="ja"?d2e():t==="pl"?h2e():a2e()}),p2e=e=>`${e==null?void 0:e.count} annotations`,m2e=e=>`${e==null?void 0:e.count} 条批注`,g2e=e=>`${e==null?void 0:e.count} یادداشت`,v2e=e=>`التعليقات: ${e==null?void 0:e.count}`,b2e=e=>`${e==null?void 0:e.count} anotaciones`,y2e=e=>`${e==null?void 0:e.count} एनोटेशन`,x2e=e=>`주석 ${e==null?void 0:e.count}개`,w2e=e=>`${e==null?void 0:e.count} 件の注釈`,k2e=e=>`Adnotacje: ${e==null?void 0:e.count}`,j2e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?m2e(e):t==="fa"?g2e(e):t==="ar"?v2e(e):t==="es"?b2e(e):t==="hi"?y2e(e):t==="ko"?x2e(e):t==="ja"?w2e(e):t==="pl"?k2e(e):p2e(e)}),S2e=()=>"Archive",C2e=()=>"归档",z2e=()=>"بایگانی",E2e=()=>"أرشفة",N2e=()=>"Archivar",A2e=()=>"आर्काइव करें",T2e=()=>"보관",R2e=()=>"アーカイブ",M2e=()=>"Archiwizuj",O2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?C2e():t==="fa"?z2e():t==="ar"?E2e():t==="es"?N2e():t==="hi"?A2e():t==="ko"?T2e():t==="ja"?R2e():t==="pl"?M2e():S2e()}),$2e=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",D2e=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",L2e=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",I2e=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",P2e=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",B2e=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",F2e=()=>"연구 에이전트에 질문… (명령과 스킬은 /, 셸은 !)",H2e=()=>"研究エージェントに質問…(/ でコマンドとスキル、! でシェル)",q2e=()=>"Zapytaj agenta badawczego… (/ — polecenia i umiejętności, ! — powłoka)",U2e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?D2e():t==="fa"?L2e():t==="ar"?I2e():t==="es"?P2e():t==="hi"?B2e():t==="ko"?F2e():t==="ja"?H2e():t==="pl"?q2e():$2e()}),G2e=()=>"Asked about selected text",W2e=()=>"已询问所选文本",K2e=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",V2e=()=>"سأل عن النص المحدد",Q2e=()=>"Preguntó sobre el texto seleccionado",X2e=()=>"चयनित टेक्स्ट के बारे में पूछा",Y2e=()=>"선택한 텍스트에 대해 질문함",Z2e=()=>"選択したテキストについて質問しました",J2e=()=>"Zapytano o zaznaczony tekst",eke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W2e():t==="fa"?K2e():t==="ar"?V2e():t==="es"?Q2e():t==="hi"?X2e():t==="ko"?Y2e():t==="ja"?Z2e():t==="pl"?J2e():G2e()}),tke=()=>"Attachment",rke=()=>"附件",nke=()=>"پیوست",ske=()=>"مرفق",oke=()=>"Adjunto",ake=()=>"अटैचमेंट",ike=()=>"첨부 파일",cke=()=>"添付ファイル",lke=()=>"Załącznik",uke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rke():t==="fa"?nke():t==="ar"?ske():t==="es"?oke():t==="hi"?ake():t==="ko"?ike():t==="ja"?cke():t==="pl"?lke():tke()}),_ke=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,fke=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,dke=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,hke=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,pke=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,mke=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,gke=e=>`${e==null?void 0:e.name} 파일이 너무 큽니다. 첨부 파일당 크기는 30 MB 미만이어야 합니다.`,vke=e=>`${e==null?void 0:e.name} が大きすぎます。各添付ファイルは 30 MB 未満である必要があります。`,bke=e=>`${e==null?void 0:e.name} jest za duży — każdy załącznik musi mieć mniej niż 30 MB.`,yke=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?fke(e):t==="fa"?dke(e):t==="ar"?hke(e):t==="es"?pke(e):t==="hi"?mke(e):t==="ko"?gke(e):t==="ja"?vke(e):t==="pl"?bke(e):_ke(e)}),xke=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",wke=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",kke=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",jke=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",Ske=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",Cke=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",zke=()=>"첨부 파일의 총 크기가 40 MB를 초과합니다. 하나를 제거한 뒤 다시 시도하세요.",Eke=()=>"添付ファイルの合計が上限の 40 MB を超えています。1 つ削除して再試行してください。",Nke=()=>"Załączniki przekraczają łączny limit 40 MB — usuń jeden z nich i spróbuj ponownie.",Ake=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wke():t==="fa"?kke():t==="ar"?jke():t==="es"?Ske():t==="hi"?Cke():t==="ko"?zke():t==="ja"?Eke():t==="pl"?Nke():xke()}),Tke=()=>"Wait for the turn to finish before running a command.",Rke=()=>"请等待本轮结束后再运行命令。",Mke=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",Oke=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",$ke=()=>"Espera a que termine el turno antes de ejecutar un comando.",Dke=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",Lke=()=>"명령을 실행하기 전에 턴이 끝날 때까지 기다리세요.",Ike=()=>"コマンドを実行する前に、ターンの完了を待ってください。",Pke=()=>"Poczekaj na zakończenie odpowiedzi przed uruchomieniem polecenia.",Bke=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rke():t==="fa"?Mke():t==="ar"?Oke():t==="es"?$ke():t==="hi"?Dke():t==="ko"?Lke():t==="ja"?Ike():t==="pl"?Pke():Tke()}),Fke=e=>`Exited with code ${e==null?void 0:e.code}`,Hke=e=>`退出码 ${e==null?void 0:e.code}`,qke=e=>`با کد ${e==null?void 0:e.code} خارج شد`,Uke=e=>`خرج برمز ${e==null?void 0:e.code}`,Gke=e=>`Terminó con el código ${e==null?void 0:e.code}`,Wke=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,Kke=e=>`코드 ${e==null?void 0:e.code}로 종료됨`,Vke=e=>`コード ${e==null?void 0:e.code} で終了`,Qke=e=>`Zakończono z kodem ${e==null?void 0:e.code}`,Xke=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Hke(e):t==="fa"?qke(e):t==="ar"?Uke(e):t==="es"?Gke(e):t==="hi"?Wke(e):t==="ko"?Kke(e):t==="ja"?Vke(e):t==="pl"?Qke(e):Fke(e)}),Yke=e=>`Command not run: ${e==null?void 0:e.error}`,Zke=e=>`命令未运行:${e==null?void 0:e.error}`,Jke=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,e4e=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,t4e=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,r4e=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,n4e=e=>`명령이 실행되지 않았습니다: ${e==null?void 0:e.error}`,s4e=e=>`コマンドは実行されませんでした: ${e==null?void 0:e.error}`,o4e=e=>`Nie uruchomiono polecenia: ${e==null?void 0:e.error}`,P9=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Zke(e):t==="fa"?Jke(e):t==="ar"?e4e(e):t==="es"?t4e(e):t==="hi"?r4e(e):t==="ko"?n4e(e):t==="ja"?s4e(e):t==="pl"?o4e(e):Yke(e)}),a4e=()=>"Collapse tool activity",i4e=()=>"折叠工具活动",c4e=()=>"بستن فعالیت ابزارها",l4e=()=>"طيّ نشاط الأداة",u4e=()=>"Contraer actividad de herramientas",_4e=()=>"टूल गतिविधि समेटें",f4e=()=>"도구 활동 접기",d4e=()=>"ツールのアクティビティを折りたたむ",h4e=()=>"Zwiń działania narzędzi",p4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i4e():t==="fa"?c4e():t==="ar"?l4e():t==="es"?u4e():t==="hi"?_4e():t==="ko"?f4e():t==="ja"?d4e():t==="pl"?h4e():a4e()}),m4e=()=>"Wait for the turn to finish before compacting.",g4e=()=>"请等待本轮结束后再压缩。",v4e=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",b4e=()=>"انتظر انتهاء الجولة قبل الضغط.",y4e=()=>"Espera a que termine el turno antes de comprimir.",x4e=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",w4e=()=>"압축하기 전에 턴이 끝날 때까지 기다리세요.",k4e=()=>"圧縮する前にターンの完了を待ってください。",j4e=()=>"Poczekaj na zakończenie odpowiedzi przed skróceniem kontekstu.",S4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?g4e():t==="fa"?v4e():t==="ar"?b4e():t==="es"?y4e():t==="hi"?x4e():t==="ko"?w4e():t==="ja"?k4e():t==="pl"?j4e():m4e()}),C4e=e=>`Compacting failed: ${e==null?void 0:e.error}`,z4e=e=>`压缩失败:${e==null?void 0:e.error}`,E4e=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,N4e=e=>`فشل الضغط: ${e==null?void 0:e.error}`,A4e=e=>`Error al comprimir: ${e==null?void 0:e.error}`,T4e=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,R4e=e=>`압축 실패: ${e==null?void 0:e.error}`,M4e=e=>`圧縮に失敗: ${e==null?void 0:e.error}`,O4e=e=>`Nie udało się skrócić kontekstu: ${e==null?void 0:e.error}`,$4e=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?z4e(e):t==="fa"?E4e(e):t==="ar"?N4e(e):t==="es"?A4e(e):t==="hi"?T4e(e):t==="ko"?R4e(e):t==="ja"?M4e(e):t==="pl"?O4e(e):C4e(e)}),D4e=()=>"Continue",L4e=()=>"继续",I4e=()=>"ادامه",P4e=()=>"متابعة",B4e=()=>"Continuar",F4e=()=>"जारी रखें",H4e=()=>"계속",q4e=()=>"続行",U4e=()=>"Kontynuuj",G4e=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?L4e():t==="fa"?I4e():t==="ar"?P4e():t==="es"?B4e():t==="hi"?F4e():t==="ko"?H4e():t==="ja"?q4e():t==="pl"?U4e():D4e()}),W4e=()=>"Copy response",K4e=()=>"复制回复",V4e=()=>"کپی پاسخ",Q4e=()=>"نسخ الرد",X4e=()=>"Copiar respuesta",Y4e=()=>"जवाब कॉपी करें",Z4e=()=>"응답 복사",J4e=()=>"応答をコピー",e3e=()=>"Kopiuj odpowiedź",B9=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?K4e():t==="fa"?V4e():t==="ar"?Q4e():t==="es"?X4e():t==="hi"?Y4e():t==="ko"?Z4e():t==="ja"?J4e():t==="pl"?e3e():W4e()}),t3e=e=>`Delete “${e==null?void 0:e.title}”? Its transcript will be permanently removed.`,r3e=e=>`删除“${e==null?void 0:e.title}”? @@ -108,7 +108,7 @@ ${e==null?void 0:e.path} ストアを新しい場所にコピーし、そこで有効化します。実行やチャットが進行中の場合、移動はできません。`,ghn=e=>`Przenieść wszystkie dane orx do: ${e==null?void 0:e.path} -Magazyn danych zostanie skopiowany do nowej lokalizacji i tam aktywowany. Trwające uruchomienia lub czaty uniemożliwią przeniesienie.`,vhn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?uhn(e):t==="fa"?_hn(e):t==="ar"?fhn(e):t==="es"?dhn(e):t==="hi"?hhn(e):t==="ko"?phn(e):t==="ja"?mhn(e):t==="pl"?ghn(e):lhn(e)}),bhn=()=>"Move data here",yhn=()=>"将数据移动到此处",xhn=()=>"انتقال داده به اینجا",whn=()=>"نقل البيانات إلى هنا",khn=()=>"Mover los datos aquí",jhn=()=>"डेटा यहाँ ले जाएं",Shn=()=>"여기로 데이터 이동",Chn=()=>"ここにデータを移動",zhn=()=>"Przenieś dane tutaj",Ehn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?yhn():t==="fa"?xhn():t==="ar"?whn():t==="es"?khn():t==="hi"?jhn():t==="ko"?Shn():t==="ja"?Chn():t==="pl"?zhn():bhn()}),Nhn=()=>"Moving…",Ahn=()=>"正在移动…",Thn=()=>"در حال جابه‌جایی…",Rhn=()=>"جارٍ النقل…",Mhn=()=>"Moviendo…",Ohn=()=>"स्थानांतरित हो रहा है…",$hn=()=>"이동 중…",Dhn=()=>"移動中…",Lhn=()=>"Przenoszenie…",Ihn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ahn():t==="fa"?Thn():t==="ar"?Rhn():t==="es"?Mhn():t==="hi"?Ohn():t==="ko"?$hn():t==="ja"?Dhn():t==="pl"?Lhn():Nhn()}),Phn=()=>"Preparing…",Bhn=()=>"正在准备…",Fhn=()=>"در حال آماده‌سازی…",Hhn=()=>"جارٍ التحضير…",qhn=()=>"Preparando…",Uhn=()=>"तैयार हो रहा है…",Ghn=()=>"준비 중…",Whn=()=>"準備中…",Khn=()=>"Przygotowywanie…",Vhn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Bhn():t==="fa"?Fhn():t==="ar"?Hhn():t==="es"?qhn():t==="hi"?Uhn():t==="ko"?Ghn():t==="ja"?Whn():t==="pl"?Khn():Phn()}),Qhn=()=>" (same disk, instant)",Xhn=()=>"(同一磁盘,可立即完成)",Yhn=()=>" (روی همان دیسک، فوری)",Zhn=()=>" (القرص نفسه، فوري)",Jhn=()=>" (mismo disco, instantáneo)",epn=()=>" (उसी डिस्क पर, तुरंत)",tpn=()=>" (같은 디스크, 즉시 이동)",rpn=()=>"(同じディスク、即時)",npn=()=>" (ten sam dysk, natychmiastowo)",spn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xhn():t==="fa"?Yhn():t==="ar"?Zhn():t==="es"?Jhn():t==="hi"?epn():t==="ko"?tpn():t==="ja"?rpn():t==="pl"?npn():Qhn()}),opn=()=>"default location",apn=()=>"默认位置",ipn=()=>"محل پیش‌فرض",cpn=()=>"الموقع الافتراضي",lpn=()=>"ubicación predeterminada",upn=()=>"डिफ़ॉल्ट स्थान",_pn=()=>"기본 위치",fpn=()=>"既定の場所",dpn=()=>"domyślna lokalizacja",hpn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?apn():t==="fa"?ipn():t==="ar"?cpn():t==="es"?lpn():t==="hi"?upn():t==="ko"?_pn():t==="ja"?fpn():t==="pl"?dpn():opn()}),ppn=()=>"ORX_DATA_DIR environment variable",mpn=()=>"ORX_DATA_DIR 环境变量",gpn=()=>"متغیر محیطی ORX_DATA_DIR",vpn=()=>"متغيّر البيئة ORX_DATA_DIR",bpn=()=>"variable de entorno ORX_DATA_DIR",ypn=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",xpn=()=>"ORX_DATA_DIR 환경 변수",wpn=()=>"ORX_DATA_DIR 環境変数",kpn=()=>"Zmienna środowiskowa ORX_DATA_DIR",jpn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mpn():t==="fa"?gpn():t==="ar"?vpn():t==="es"?bpn():t==="hi"?ypn():t==="ko"?xpn():t==="ja"?wpn():t==="pl"?kpn():ppn()}),Spn=()=>"your saved setting",Cpn=()=>"已保存的设置",zpn=()=>"تنظیم ذخیره‌شدهٔ شما",Epn=()=>"إعدادك المحفوظ",Npn=()=>"tu ajuste guardado",Apn=()=>"आपकी सेव की गई सेटिंग",Tpn=()=>"저장한 설정",Rpn=()=>"保存済みの設定",Mpn=()=>"zapisane ustawienie",Opn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cpn():t==="fa"?zpn():t==="ar"?Epn():t==="es"?Npn():t==="hi"?Apn():t==="ko"?Tpn():t==="ja"?Rpn():t==="pl"?Mpn():Spn()}),$pn=()=>"XDG_DATA_HOME",Dpn=()=>"XDG_DATA_HOME",Lpn=()=>"XDG_DATA_HOME",Ipn=()=>"XDG_DATA_HOME",Ppn=()=>"XDG_DATA_HOME",Bpn=()=>"XDG_DATA_HOME",Fpn=()=>"XDG_DATA_HOME",Hpn=()=>"XDG_DATA_HOME",qpn=()=>"XDG_DATA_HOME",Upn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dpn():t==="fa"?Lpn():t==="ar"?Ipn():t==="es"?Ppn():t==="hi"?Bpn():t==="ko"?Fpn():t==="ja"?Hpn():t==="pl"?qpn():$pn()}),Gpn=()=>"Verifying…",Wpn=()=>"正在验证…",Kpn=()=>"در حال بررسی…",Vpn=()=>"جارٍ التحقق…",Qpn=()=>"Verificando…",Xpn=()=>"सत्यापित हो रहा है…",Ypn=()=>"검증 중…",Zpn=()=>"検証中…",Jpn=()=>"Weryfikowanie…",emn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wpn():t==="fa"?Kpn():t==="ar"?Vpn():t==="es"?Qpn():t==="hi"?Xpn():t==="ko"?Ypn():t==="ja"?Zpn():t==="pl"?Jpn():Gpn()}),tmn=()=>"Loading…",rmn=()=>"正在加载…",nmn=()=>"در حال بارگیری…",smn=()=>"جارٍ التحميل…",omn=()=>"Cargando…",amn=()=>"लोड हो रहा है…",imn=()=>"불러오는 중…",cmn=()=>"読み込み中…",lmn=()=>"Wczytywanie…",AL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rmn():t==="fa"?nmn():t==="ar"?smn():t==="es"?omn():t==="hi"?amn():t==="ko"?imn():t==="ja"?cmn():t==="pl"?lmn():tmn()}),umn=()=>"This sub-agent is no longer available.",_mn=()=>"此子智能体已不可用。",fmn=()=>"این عامل فرعی دیگر در دسترس نیست.",dmn=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",hmn=()=>"Este subagente ya no está disponible.",pmn=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",mmn=()=>"이 하위 에이전트는 더 이상 사용할 수 없습니다.",gmn=()=>"このサブエージェントはもう利用できません。",vmn=()=>"Ten podagent nie jest już dostępny.",bmn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_mn():t==="fa"?fmn():t==="ar"?dmn():t==="es"?hmn():t==="hi"?pmn():t==="ko"?mmn():t==="ja"?gmn():t==="pl"?vmn():umn()}),ymn=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,xmn=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,wmn=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,kmn=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,jmn=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,Smn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,Cmn=e=>`${e==null?void 0:e.label} (미리보기; 더블 클릭 또는 Command/Control K 다음 Enter로 열린 상태 유지)`,zmn=e=>`${e==null?void 0:e.label}(プレビュー。ダブルクリック、または Command/Control K の後に Enter で開いたままにする)`,Emn=e=>`${e==null?void 0:e.label} (podgląd; kliknij dwukrotnie lub naciśnij Command/Control K, a następnie Enter, aby pozostawić otwarte)`,Nmn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?xmn(e):t==="fa"?wmn(e):t==="ar"?kmn(e):t==="es"?jmn(e):t==="hi"?Smn(e):t==="ko"?Cmn(e):t==="ja"?zmn(e):t==="pl"?Emn(e):ymn(e)}),Amn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,Tmn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,Rmn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,Mmn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,Omn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,$mn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,Dmn=e=>`${e==null?void 0:e.label} (더블 클릭 또는 ⌘/Ctrl+K Enter로 열린 상태 유지)`,Lmn=e=>`${e==null?void 0:e.label}(ダブルクリックまたは ⌘/Ctrl+K Enter で開いたままにする)`,Imn=e=>`${e==null?void 0:e.label} (kliknij dwukrotnie lub naciśnij ⌘/Ctrl+K, Enter, aby pozostawić otwarte)`,Pmn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Tmn(e):t==="fa"?Rmn(e):t==="ar"?Mmn(e):t==="es"?Omn(e):t==="hi"?$mn(e):t==="ko"?Dmn(e):t==="ja"?Lmn(e):t==="pl"?Imn(e):Amn(e)}),Bmn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",Fmn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",Hmn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",qmn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",Umn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",Gmn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",Wmn=()=>"또는 에이전트에게 LaTeX 템플릿 추가를 요청하세요.",Kmn=()=>"エージェントに LaTeX テンプレートの追加を依頼することもできます。",Vmn=()=>"Możesz też poprosić agenta o dodanie szablonu LaTeX.",Qmn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fmn():t==="fa"?Hmn():t==="ar"?qmn():t==="es"?Umn():t==="hi"?Gmn():t==="ko"?Wmn():t==="ja"?Kmn():t==="pl"?Vmn():Bmn()}),Xmn=()=>", a repo for training a mini-GPT from scratch.",Ymn=()=>",一个从零训练迷你 GPT 的仓库。",Zmn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",Jmn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",egn=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",tgn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",rgn=()=>", 작은 GPT를 처음부터 학습하는 저장소입니다.",ngn=()=>"という、小さな GPT をゼロから学習するリポジトリです。",sgn=()=>", repozytorium do trenowania mini-GPT od podstaw.",ogn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ymn():t==="fa"?Zmn():t==="ar"?Jmn():t==="es"?egn():t==="hi"?tgn():t==="ko"?rgn():t==="ja"?ngn():t==="pl"?sgn():Xmn()}),agn=()=>"Close",ign=()=>"关闭",cgn=()=>"بستن",lgn=()=>"إغلاق",ugn=()=>"Cerrar",_gn=()=>"बंद करें",fgn=()=>"닫기",dgn=()=>"閉じる",hgn=()=>"Zamknij",vb=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ign():t==="fa"?cgn():t==="ar"?lgn():t==="es"?ugn():t==="hi"?_gn():t==="ko"?fgn():t==="ja"?dgn():t==="pl"?hgn():agn()}),pgn=()=>"Create a new project",mgn=()=>"新建项目",ggn=()=>"ایجاد پروژهٔ جدید",vgn=()=>"إنشاء مشروع جديد",bgn=()=>"Crear un proyecto nuevo",ygn=()=>"नया प्रोजेक्ट बनाएं",xgn=()=>"새 프로젝트 만들기",wgn=()=>"新しいプロジェクトを作成",kgn=()=>"Utwórz nowy projekt",jgn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mgn():t==="fa"?ggn():t==="ar"?vgn():t==="es"?bgn():t==="hi"?ygn():t==="ko"?xgn():t==="ja"?wgn():t==="pl"?kgn():pgn()}),Sgn=()=>"Demo project",Cgn=()=>"演示项目",zgn=()=>"پروژهٔ نمایشی",Egn=()=>"مشروع توضيحي",Ngn=()=>"Proyecto de demostración",Agn=()=>"डेमो प्रोजेक्ट",Tgn=()=>"데모 프로젝트",Rgn=()=>"デモプロジェクト",Mgn=()=>"Projekt demonstracyjny",Ogn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cgn():t==="fa"?zgn():t==="ar"?Egn():t==="es"?Ngn():t==="hi"?Agn():t==="ko"?Tgn():t==="ja"?Rgn():t==="pl"?Mgn():Sgn()}),$gn=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",Dgn=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Lgn=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Ign=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",Pgn=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Bgn=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",Fgn=()=>"에이전트 대화, 실험, 실행, 결과물을 살펴보고 OpenResearch에서 프로젝트가 구성되는 방식을 확인하세요.",Hgn=()=>"エージェントの会話、実験、実行、成果物を見て、OpenResearch でプロジェクトがどのように進むか確認してください。",qgn=()=>"Przejrzyj rozmowy z agentem, eksperymenty, uruchomienia i artefakty, aby zobaczyć, jak powstaje projekt w OpenResearch.",Ugn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dgn():t==="fa"?Lgn():t==="ar"?Ign():t==="es"?Pgn():t==="hi"?Bgn():t==="ko"?Fgn():t==="ja"?Hgn():t==="pl"?qgn():$gn()}),Ggn=()=>"nanochat",Wgn=()=>"nanochat",Kgn=()=>"nanochat",Vgn=()=>"nanochat",Qgn=()=>"nanochat",Xgn=()=>"nanochat",Ygn=()=>"nanochat",Zgn=()=>"nanochat",Jgn=()=>"nanochat",e0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wgn():t==="fa"?Kgn():t==="ar"?Vgn():t==="es"?Qgn():t==="hi"?Xgn():t==="ko"?Ygn():t==="ja"?Zgn():t==="pl"?Jgn():Ggn()}),t0n=()=>"Try the demo experiment",r0n=()=>"试试演示实验",n0n=()=>"آزمایش نمایشی را امتحان کنید",s0n=()=>"جرّب التجربة التوضيحية",o0n=()=>"Probar el experimento de demostración",a0n=()=>"डेमो प्रयोग आज़माएं",i0n=()=>"데모 실험 체험",c0n=()=>"デモ実験を試す",l0n=()=>"Wypróbuj eksperyment demonstracyjny",u0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?r0n():t==="fa"?n0n():t==="ar"?s0n():t==="es"?o0n():t==="hi"?a0n():t==="ko"?i0n():t==="ja"?c0n():t==="pl"?l0n():t0n()}),_0n=()=>"Couldn’t save your progress. Try again.",f0n=()=>"无法保存进度。请重试。",d0n=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",h0n=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",p0n=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",m0n=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",g0n=()=>"진행 상황을 저장할 수 없습니다. 다시 시도하세요.",v0n=()=>"進捗を保存できませんでした。再試行してください。",b0n=()=>"Nie udało się zapisać postępu. Spróbuj ponownie.",y0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?f0n():t==="fa"?d0n():t==="ar"?h0n():t==="es"?p0n():t==="hi"?m0n():t==="ko"?g0n():t==="ja"?v0n():t==="pl"?b0n():_0n()}),x0n=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",w0n=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",k0n=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",j0n=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",S0n=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",C0n=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",z0n=()=>"OpenResearch의 작동 방식을 보여주는 데모 프로젝트입니다. 이 데모는 Andrej Karpathy의 다음 저장소를 사용합니다:",E0n=()=>"OpenResearch の動作を示すデモプロジェクトです。このデモでは Andrej Karpathy の次のリポジトリを使用しています:",N0n=()=>"To projekt demonstracyjny pokazujący działanie OpenResearch. Wykorzystuje projekt Andreja Karpathy’ego",A0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w0n():t==="fa"?k0n():t==="ar"?j0n():t==="es"?S0n():t==="hi"?C0n():t==="ko"?z0n():t==="ja"?E0n():t==="pl"?N0n():x0n()}),T0n=()=>"Welcome to OpenResearch",R0n=()=>"欢迎使用 OpenResearch",M0n=()=>"به OpenResearch خوش آمدید",O0n=()=>"مرحبًا بك في OpenResearch",$0n=()=>"Te damos la bienvenida a OpenResearch",D0n=()=>"OpenResearch में आपका स्वागत है",L0n=()=>"OpenResearch에 오신 것을 환영합니다",I0n=()=>"OpenResearch へようこそ",P0n=()=>"Witaj w OpenResearch",B0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?R0n():t==="fa"?M0n():t==="ar"?O0n():t==="es"?$0n():t==="hi"?D0n():t==="ko"?L0n():t==="ja"?I0n():t==="pl"?P0n():T0n()}),F0n=()=>"All experiments are archived. Turn on Show archived to view them.",H0n=()=>"所有实验均已归档。开启“显示已归档”即可查看。",q0n=()=>"همه آزمایش‌ها بایگانی شده‌اند. برای دیدنشان نمایش بایگانی‌شده‌ها را فعال کنید.",U0n=()=>"جميع التجارب مؤرشفة. فعّل إظهار المؤرشف لعرضها.",G0n=()=>"Todos los experimentos están archivados. Activa Mostrar archivados para verlos.",W0n=()=>"सभी प्रयोग संग्रहीत हैं। उन्हें देखने के लिए संग्रहीत दिखाएँ चालू करें।",K0n=()=>"모든 실험이 보관되었습니다. 보려면 보관된 실험 표시를 켜세요.",V0n=()=>"すべての実験がアーカイブされています。「アーカイブ済みを表示」を有効にして確認してください。",Q0n=()=>"Wszystkie eksperymenty są zarchiwizowane. Włącz „Pokaż zarchiwizowane”, aby je wyświetlić.",X0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?H0n():t==="fa"?q0n():t==="ar"?U0n():t==="es"?G0n():t==="hi"?W0n():t==="ko"?K0n():t==="ja"?V0n():t==="pl"?Q0n():F0n()}),Y0n=()=>"Archive ancestors",Z0n=()=>"归档祖先节点",J0n=()=>"بایگانی نیاکان",evn=()=>"أرشفة الأسلاف",tvn=()=>"Archivar antepasados",rvn=()=>"पूर्वजों को संग्रहीत करें",nvn=()=>"상위 실험 보관",svn=()=>"祖先の実験をアーカイブ",ovn=()=>"Archiwizuj nadrzędne eksperymenty",avn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Z0n():t==="fa"?J0n():t==="ar"?evn():t==="es"?tvn():t==="hi"?rvn():t==="ko"?nvn():t==="ja"?svn():t==="pl"?ovn():Y0n()}),ivn=()=>"Archive descendants",cvn=()=>"归档后代节点",lvn=()=>"بایگانی نوادگان",uvn=()=>"أرشفة الفروع التابعة",_vn=()=>"Archivar descendientes",fvn=()=>"वंशजों को संग्रहीत करें",dvn=()=>"하위 실험 보관",hvn=()=>"子孫の実験をアーカイブ",pvn=()=>"Archiwizuj podrzędne eksperymenty",mvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?cvn():t==="fa"?lvn():t==="ar"?uvn():t==="es"?_vn():t==="hi"?fvn():t==="ko"?dvn():t==="ja"?hvn():t==="pl"?pvn():ivn()}),gvn=()=>"Manage",vvn=()=>"管理",bvn=()=>"مدیریت",yvn=()=>"إدارة",xvn=()=>"Gestionar",wvn=()=>"प्रबंधित करें",kvn=()=>"관리",jvn=()=>"管理",Svn=()=>"Zarządzaj",Cvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?vvn():t==="fa"?bvn():t==="ar"?yvn():t==="es"?xvn():t==="hi"?wvn():t==="ko"?kvn():t==="ja"?jvn():t==="pl"?Svn():gvn()}),zvn=e=>`Manage ${e==null?void 0:e.name}`,Evn=e=>`管理 ${e==null?void 0:e.name}`,Nvn=e=>`مدیریت ${e==null?void 0:e.name}`,Avn=e=>`إدارة ${e==null?void 0:e.name}`,Tvn=e=>`Gestionar ${e==null?void 0:e.name}`,Rvn=e=>`${e==null?void 0:e.name} प्रबंधित करें`,Mvn=e=>`${e==null?void 0:e.name} 관리`,Ovn=e=>`${e==null?void 0:e.name} を管理`,$vn=e=>`Zarządzaj eksperymentem ${e==null?void 0:e.name}`,yN=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Evn(e):t==="fa"?Nvn(e):t==="ar"?Avn(e):t==="es"?Tvn(e):t==="hi"?Rvn(e):t==="ko"?Mvn(e):t==="ja"?Ovn(e):t==="pl"?$vn(e):zvn(e)}),Dvn=()=>"Archive this experiment",Lvn=()=>"归档此实验",Ivn=()=>"بایگانی این آزمایش",Pvn=()=>"أرشفة هذه التجربة",Bvn=()=>"Archivar este experimento",Fvn=()=>"इस प्रयोग को संग्रहीत करें",Hvn=()=>"이 실험 보관",qvn=()=>"この実験をアーカイブ",Uvn=()=>"Archiwizuj ten eksperyment",Gvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lvn():t==="fa"?Ivn():t==="ar"?Pvn():t==="es"?Bvn():t==="hi"?Fvn():t==="ko"?Hvn():t==="ja"?qvn():t==="pl"?Uvn():Dvn()}),Wvn=()=>"Archived",Kvn=()=>"已归档",Vvn=()=>"بایگانی‌شده",Qvn=()=>"مؤرشف",Xvn=()=>"Archivado",Yvn=()=>"संग्रहीत",Zvn=()=>"보관됨",Jvn=()=>"アーカイブ済み",e1n=()=>"Zarchiwizowane",TL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kvn():t==="fa"?Vvn():t==="ar"?Qvn():t==="es"?Xvn():t==="hi"?Yvn():t==="ko"?Zvn():t==="ja"?Jvn():t==="pl"?e1n():Wvn()}),t1n=e=>`${e==null?void 0:e.count} archived`,r1n=e=>`${e==null?void 0:e.count} 个已归档`,n1n=e=>`${e==null?void 0:e.count} بایگانی‌شده`,s1n=e=>`${e==null?void 0:e.count} مؤرشفة`,o1n=e=>`${e==null?void 0:e.count} archivados`,a1n=e=>`${e==null?void 0:e.count} संग्रहीत`,i1n=e=>`${e==null?void 0:e.count}개 보관됨`,c1n=e=>`${e==null?void 0:e.count} 件アーカイブ済み`,l1n=e=>`Zarchiwizowane: ${e==null?void 0:e.count}`,u1n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?r1n(e):t==="fa"?n1n(e):t==="ar"?s1n(e):t==="es"?o1n(e):t==="hi"?a1n(e):t==="ko"?i1n(e):t==="ja"?c1n(e):t==="pl"?l1n(e):t1n(e)}),_1n=()=>"Baseline",f1n=()=>"基线",d1n=()=>"مبنا",h1n=()=>"الأساس",p1n=()=>"Base",m1n=()=>"बेसलाइन",g1n=()=>"베이스라인",v1n=()=>"ベースライン",b1n=()=>"Wariant bazowy",y1n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?f1n():t==="fa"?d1n():t==="ar"?h1n():t==="es"?p1n():t==="hi"?m1n():t==="ko"?g1n():t==="ja"?v1n():t==="pl"?b1n():_1n()}),x1n=()=>"Experiment",w1n=()=>"实验",k1n=()=>"آزمایش",j1n=()=>"تجربة",S1n=()=>"Experimento",C1n=()=>"प्रयोग",z1n=()=>"실험",E1n=()=>"実験",N1n=()=>"Eksperyment",Fl=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w1n():t==="fa"?k1n():t==="ar"?j1n():t==="es"?S1n():t==="hi"?C1n():t==="ko"?z1n():t==="ja"?E1n():t==="pl"?N1n():x1n()}),A1n=e=>`${e==null?void 0:e.count} experiments`,T1n=e=>`${e==null?void 0:e.count} 个实验`,R1n=e=>`${e==null?void 0:e.count} آزمایش`,M1n=e=>`التجارب: ${e==null?void 0:e.count}`,O1n=e=>`${e==null?void 0:e.count} experimentos`,$1n=e=>`${e==null?void 0:e.count} प्रयोग`,D1n=e=>`실험 ${e==null?void 0:e.count}개`,L1n=e=>`${e==null?void 0:e.count} 件の実験`,I1n=e=>`Eksperymenty: ${e==null?void 0:e.count}`,P1n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T1n(e):t==="fa"?R1n(e):t==="ar"?M1n(e):t==="es"?O1n(e):t==="hi"?$1n(e):t==="ko"?D1n(e):t==="ja"?L1n(e):t==="pl"?I1n(e):A1n(e)}),B1n=()=>"hidden",F1n=()=>"已隐藏",H1n=()=>"پنهان",q1n=()=>"مخفية",U1n=()=>"ocultos",G1n=()=>"छिपे हुए",W1n=()=>"숨김",K1n=()=>"非表示",V1n=()=>"ukryte",Q1n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F1n():t==="fa"?H1n():t==="ar"?q1n():t==="es"?U1n():t==="hi"?G1n():t==="ko"?W1n():t==="ja"?K1n():t==="pl"?V1n():B1n()}),X1n=()=>"1 experiment",Y1n=()=>"1 个实验",Z1n=()=>"۱ آزمایش",J1n=()=>"تجربة واحدة",ebn=()=>"1 experimento",tbn=()=>"1 प्रयोग",rbn=()=>"실험 1개",nbn=()=>"1 件の実験",sbn=()=>"1 eksperyment",obn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y1n():t==="fa"?Z1n():t==="ar"?J1n():t==="es"?ebn():t==="hi"?tbn():t==="ko"?rbn():t==="ja"?nbn():t==="pl"?sbn():X1n()}),abn=()=>"Restore archived ancestors",ibn=()=>"恢复已归档的祖先节点",cbn=()=>"بازیابی نیاکان بایگانی‌شده",lbn=()=>"استعادة الأسلاف المؤرشفين",ubn=()=>"Restaurar antepasados archivados",_bn=()=>"संग्रहीत पूर्वजों को पुनर्स्थापित करें",fbn=()=>"보관된 상위 실험 복원",dbn=()=>"アーカイブ済みの祖先の実験を復元",hbn=()=>"Przywróć zarchiwizowane eksperymenty nadrzędne",pbn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ibn():t==="fa"?cbn():t==="ar"?lbn():t==="es"?ubn():t==="hi"?_bn():t==="ko"?fbn():t==="ja"?dbn():t==="pl"?hbn():abn()}),mbn=e=>`Restore ${e==null?void 0:e.count} archived experiments`,gbn=e=>`恢复 ${e==null?void 0:e.count} 个已归档实验`,vbn=e=>`بازیابی ${e==null?void 0:e.count} آزمایش بایگانی‌شده`,bbn=e=>`استعادة ${e==null?void 0:e.count} تجارب مؤرشفة`,ybn=e=>`Restaurar ${e==null?void 0:e.count} experimentos archivados`,xbn=e=>`${e==null?void 0:e.count} संग्रहीत प्रयोग पुनर्स्थापित करें`,wbn=e=>`보관된 실험 ${e==null?void 0:e.count}개 복원`,kbn=e=>`アーカイブ済みの実験を ${e==null?void 0:e.count} 件復元`,jbn=e=>`Przywróć zarchiwizowane eksperymenty (${e==null?void 0:e.count})`,Sbn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?gbn(e):t==="fa"?vbn(e):t==="ar"?bbn(e):t==="es"?ybn(e):t==="hi"?xbn(e):t==="ko"?wbn(e):t==="ja"?kbn(e):t==="pl"?jbn(e):mbn(e)}),Cbn=()=>"Restore descendants",zbn=()=>"恢复后代节点",Ebn=()=>"بازیابی نوادگان",Nbn=()=>"استعادة الفروع التابعة",Abn=()=>"Restaurar descendientes",Tbn=()=>"वंशजों को पुनर्स्थापित करें",Rbn=()=>"하위 실험 복원",Mbn=()=>"子孫の実験を復元",Obn=()=>"Przywróć eksperymenty podrzędne",$bn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zbn():t==="fa"?Ebn():t==="ar"?Nbn():t==="es"?Abn():t==="hi"?Tbn():t==="ko"?Rbn():t==="ja"?Mbn():t==="pl"?Obn():Cbn()}),Dbn=()=>"Restore this experiment",Lbn=()=>"恢复此实验",Ibn=()=>"بازیابی این آزمایش",Pbn=()=>"استعادة هذه التجربة",Bbn=()=>"Restaurar este experimento",Fbn=()=>"इस प्रयोग को पुनर्स्थापित करें",Hbn=()=>"이 실험 복원",qbn=()=>"この実験を復元",Ubn=()=>"Przywróć ten eksperyment",RL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lbn():t==="fa"?Ibn():t==="ar"?Pbn():t==="es"?Bbn():t==="hi"?Fbn():t==="ko"?Hbn():t==="ja"?qbn():t==="pl"?Ubn():Dbn()}),Gbn=()=>"Running",Wbn=()=>"运行中",Kbn=()=>"در حال اجرا",Vbn=()=>"قيد التشغيل",Qbn=()=>"En ejecución",Xbn=()=>"चल रहा है",Ybn=()=>"실행 중",Zbn=()=>"実行中",Jbn=()=>"W toku",eyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wbn():t==="fa"?Kbn():t==="ar"?Vbn():t==="es"?Qbn():t==="hi"?Xbn():t==="ko"?Ybn():t==="ja"?Zbn():t==="pl"?Jbn():Gbn()}),tyn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",ryn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",nyn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",syn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",oyn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",ayn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",iyn=()=>"이 작업에서 실험 생성을 요청하거나 전체 프로젝트로 전환하여 모든 실험을 확인하세요.",cyn=()=>"このタスクで実験の作成を依頼するか、プロジェクト全体に切り替えてすべての実験を確認してください。",lyn=()=>"Poproś o utworzenie eksperymentu w tym zadaniu albo przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty.",uyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ryn():t==="fa"?nyn():t==="ar"?syn():t==="es"?oyn():t==="hi"?ayn():t==="ko"?iyn():t==="ja"?cyn():t==="pl"?lyn():tyn()}),_yn=()=>"Ask the agent in chat to create and run your first experiment.",fyn=()=>"在聊天中让智能体创建并运行你的第一个实验。",dyn=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",hyn=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",pyn=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",myn=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",gyn=()=>"채팅에서 에이전트에게 첫 실험의 생성과 실행을 요청하세요.",vyn=()=>"チャットでエージェントに最初の実験の作成と実行を依頼してください。",byn=()=>"Poproś agenta na czacie o utworzenie i uruchomienie pierwszego eksperymentu.",yyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fyn():t==="fa"?dyn():t==="ar"?hyn():t==="es"?pyn():t==="hi"?myn():t==="ko"?gyn():t==="ja"?vyn():t==="pl"?byn():_yn()}),xyn=()=>"Code",wyn=()=>"代码",kyn=()=>"کد",jyn=()=>"الشيفرة",Syn=()=>"Código",Cyn=()=>"कोड",zyn=()=>"코드",Eyn=()=>"コード",Nyn=()=>"Kod",Ayn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wyn():t==="fa"?kyn():t==="ar"?jyn():t==="es"?Syn():t==="hi"?Cyn():t==="ko"?zyn():t==="ja"?Eyn():t==="pl"?Nyn():xyn()}),Tyn=()=>"Logs",Ryn=()=>"日志",Myn=()=>"گزارش‌ها",Oyn=()=>"السجلات",$yn=()=>"Logs",Dyn=()=>"लॉग",Lyn=()=>"로그",Iyn=()=>"ログ",Pyn=()=>"Logi",ML=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ryn():t==="fa"?Myn():t==="ar"?Oyn():t==="es"?$yn():t==="hi"?Dyn():t==="ko"?Lyn():t==="ja"?Iyn():t==="pl"?Pyn():Tyn()}),Byn=()=>"No experiments from the current task yet",Fyn=()=>"当前任务尚无实验",Hyn=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",qyn=()=>"لا توجد تجارب من المهمة الحالية بعد",Uyn=()=>"Aún no hay experimentos de la tarea actual",Gyn=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",Wyn=()=>"현재 작업에서 생성한 실험이 아직 없습니다",Kyn=()=>"現在のタスクの実験はまだありません",Vyn=()=>"Brak eksperymentów w bieżącym zadaniu",Qyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fyn():t==="fa"?Hyn():t==="ar"?qyn():t==="es"?Uyn():t==="hi"?Gyn():t==="ko"?Wyn():t==="ja"?Kyn():t==="pl"?Vyn():Byn()}),Xyn=()=>"No experiments yet",Yyn=()=>"尚无实验",Zyn=()=>"هنوز آزمایشی وجود ندارد",Jyn=()=>"لا توجد تجارب بعد",exn=()=>"Aún no hay experimentos",txn=()=>"अभी तक कोई प्रयोग नहीं",rxn=()=>"아직 실험이 없습니다",nxn=()=>"実験はまだありません",sxn=()=>"Brak eksperymentów",oxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yyn():t==="fa"?Zyn():t==="ar"?Jyn():t==="es"?exn():t==="hi"?txn():t==="ko"?rxn():t==="ja"?nxn():t==="pl"?sxn():Xyn()}),axn=()=>"no runs",ixn=()=>"无运行",cxn=()=>"بدون اجرا",lxn=()=>"لا عمليات تشغيل",uxn=()=>"sin ejecuciones",_xn=()=>"कोई रन नहीं",fxn=()=>"실행 없음",dxn=()=>"実行なし",hxn=()=>"brak uruchomień",pxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ixn():t==="fa"?cxn():t==="ar"?lxn():t==="es"?uxn():t==="hi"?_xn():t==="ko"?fxn():t==="ja"?dxn():t==="pl"?hxn():axn()}),mxn=()=>"Open logs",gxn=()=>"打开日志",vxn=()=>"باز کردن گزارش‌ها",bxn=()=>"فتح السجلات",yxn=()=>"Abrir logs",xxn=()=>"लॉग खोलें",wxn=()=>"로그 열기",kxn=()=>"ログを開く",jxn=()=>"Otwórz logi",Sxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gxn():t==="fa"?vxn():t==="ar"?bxn():t==="es"?yxn():t==="hi"?xxn():t==="ko"?wxn():t==="ja"?kxn():t==="pl"?jxn():mxn()}),Cxn=()=>"Runs",zxn=()=>"运行",Exn=()=>"اجراها",Nxn=()=>"عمليات التشغيل",Axn=()=>"Ejecuciones",Txn=()=>"रन",Rxn=()=>"실행",Mxn=()=>"実行",Oxn=()=>"Uruchomienia",$xn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zxn():t==="fa"?Exn():t==="ar"?Nxn():t==="es"?Axn():t==="hi"?Txn():t==="ko"?Rxn():t==="ja"?Mxn():t==="pl"?Oxn():Cxn()}),Dxn=()=>"Switch to Entire project to see all experiments",Lxn=()=>"切换到“整个项目”以查看所有实验",Ixn=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",Pxn=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",Bxn=()=>"Cambia a Todo el proyecto para ver todos los experimentos",Fxn=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",Hxn=()=>"전체 프로젝트로 전환하여 모든 실험 보기",qxn=()=>"プロジェクト全体に切り替えてすべての実験を表示",Uxn=()=>"Przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty",Gxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lxn():t==="fa"?Ixn():t==="ar"?Pxn():t==="es"?Bxn():t==="hi"?Fxn():t==="ko"?Hxn():t==="ja"?qxn():t==="pl"?Uxn():Dxn()}),Wxn=e=>`OpenResearch ${e==null?void 0:e.version} is ready. Restart to switch to it.`,Kxn=e=>`OpenResearch ${e==null?void 0:e.version} 已就绪。重新启动即可切换。`,Vxn=e=>`OpenResearch ${e==null?void 0:e.version} آماده است. برای رفتن به آن دوباره راه‌اندازی کنید.`,Qxn=e=>`OpenResearch ${e==null?void 0:e.version} جاهز. أعد التشغيل للانتقال إليه.`,Xxn=e=>`OpenResearch ${e==null?void 0:e.version} está listo. Reinicia para cambiar a esta versión.`,Yxn=e=>`OpenResearch ${e==null?void 0:e.version} तैयार है। इस पर जाने के लिए फिर से शुरू करें।`,Zxn=e=>`OpenResearch ${e==null?void 0:e.version}이(가) 준비되었습니다. 전환하려면 다시 시작하세요.`,Jxn=e=>`OpenResearch ${e==null?void 0:e.version} の準備ができました。切り替えるには再起動してください。`,ewn=e=>`OpenResearch ${e==null?void 0:e.version} jest gotowy. Uruchom aplikację ponownie, aby przejść na nową wersję.`,twn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Kxn(e):t==="fa"?Vxn(e):t==="ar"?Qxn(e):t==="es"?Xxn(e):t==="hi"?Yxn(e):t==="ko"?Zxn(e):t==="ja"?Jxn(e):t==="pl"?ewn(e):Wxn(e)}),rwn=()=>"Dismiss",nwn=()=>"关闭",swn=()=>"بستن",own=()=>"تجاهل",awn=()=>"Descartar",iwn=()=>"खारिज करें",cwn=()=>"닫기",lwn=()=>"閉じる",uwn=()=>"Zamknij",_wn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?nwn():t==="fa"?swn():t==="ar"?own():t==="es"?awn():t==="hi"?iwn():t==="ko"?cwn():t==="ja"?lwn():t==="pl"?uwn():rwn()}),fwn=()=>"Restart now",dwn=()=>"立即重新启动",hwn=()=>"هم‌اکنون دوباره راه‌اندازی کن",pwn=()=>"أعد التشغيل الآن",mwn=()=>"Reiniciar ahora",gwn=()=>"अभी फिर से शुरू करें",vwn=()=>"지금 다시 시작",bwn=()=>"今すぐ再起動",ywn=()=>"Uruchom ponownie teraz",OL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?dwn():t==="fa"?hwn():t==="ar"?pwn():t==="es"?mwn():t==="hi"?gwn():t==="ko"?vwn():t==="ja"?bwn():t==="pl"?ywn():fwn()}),xwn=e=>`Could not restart: ${e==null?void 0:e.error}`,wwn=e=>`无法重新启动:${e==null?void 0:e.error}`,kwn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,jwn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,Swn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,Cwn=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,zwn=e=>`다시 시작할 수 없습니다: ${e==null?void 0:e.error}`,Ewn=e=>`再起動できませんでした: ${e==null?void 0:e.error}`,Nwn=e=>`Nie udało się uruchomić ponownie: ${e==null?void 0:e.error}`,$L=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?wwn(e):t==="fa"?kwn(e):t==="ar"?jwn(e):t==="es"?Swn(e):t==="hi"?Cwn(e):t==="ko"?zwn(e):t==="ja"?Ewn(e):t==="pl"?Nwn(e):xwn(e)}),Awn=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",Twn=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",Rwn=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",Mwn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",Own=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",$wn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",Dwn=()=>"업데이트된 OpenResearch가 제한 시간 내에 시작되지 않았습니다. 직접 다시 시작하세요.",Lwn=()=>"更新された OpenResearch が時間内に起動しませんでした。手動で再起動してください。",Iwn=()=>"Zaktualizowany OpenResearch nie uruchomił się na czas. Uruchom go ręcznie.",Pwn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Twn():t==="fa"?Rwn():t==="ar"?Mwn():t==="es"?Own():t==="hi"?$wn():t==="ko"?Dwn():t==="ja"?Lwn():t==="pl"?Iwn():Awn()}),Bwn=()=>"Restarting…",Fwn=()=>"正在重新启动…",Hwn=()=>"در حال راه‌اندازی مجدد…",qwn=()=>"جارٍ إعادة التشغيل…",Uwn=()=>"Reiniciando…",Gwn=()=>"फिर से शुरू हो रहा है…",Wwn=()=>"다시 시작 중…",Kwn=()=>"再起動中…",Vwn=()=>"Ponowne uruchamianie…",DL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fwn():t==="fa"?Hwn():t==="ar"?qwn():t==="es"?Uwn():t==="hi"?Gwn():t==="ko"?Wwn():t==="ja"?Kwn():t==="pl"?Vwn():Bwn()}),Qwn=()=>"macOS app",Xwn=()=>"macOS 应用",Ywn=()=>"برنامهٔ macOS",Zwn=()=>"تطبيق macOS",Jwn=()=>"App de macOS",e2n=()=>"macOS ऐप",t2n=()=>"macOS 앱",r2n=()=>"macOS アプリ",n2n=()=>"Aplikacja macOS",s2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xwn():t==="fa"?Ywn():t==="ar"?Zwn():t==="es"?Jwn():t==="hi"?e2n():t==="ko"?t2n():t==="ja"?r2n():t==="pl"?n2n():Qwn()}),o2n=()=>"Linux app (AppImage)",a2n=()=>"Linux 应用(AppImage)",i2n=()=>"برنامه لینوکس (AppImage)",c2n=()=>"تطبيق Linux ‏(AppImage)",l2n=()=>"Aplicación para Linux (AppImage)",u2n=()=>"Linux ऐप (AppImage)",_2n=()=>"Linux 앱 (AppImage)",f2n=()=>"Linux アプリ(AppImage)",d2n=()=>"Aplikacja Linux (AppImage)",h2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?a2n():t==="fa"?i2n():t==="ar"?c2n():t==="es"?l2n():t==="hi"?u2n():t==="ko"?_2n():t==="ja"?f2n():t==="pl"?d2n():o2n()}),p2n=()=>"Installed with cargo",m2n=()=>"通过 cargo 安装",g2n=()=>"نصب‌شده با cargo",v2n=()=>"مثبّت عبر cargo",b2n=()=>"Instalado con cargo",y2n=()=>"cargo से इंस्टॉल किया गया",x2n=()=>"cargo로 설치됨",w2n=()=>"cargo でインストール",k2n=()=>"Zainstalowano przez cargo",j2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?m2n():t==="fa"?g2n():t==="ar"?v2n():t==="es"?b2n():t==="hi"?y2n():t==="ko"?x2n():t==="ja"?w2n():t==="pl"?k2n():p2n()}),S2n=()=>"Installed with Homebrew",C2n=()=>"通过 Homebrew 安装",z2n=()=>"نصب‌شده با Homebrew",E2n=()=>"مثبّت عبر Homebrew",N2n=()=>"Instalado con Homebrew",A2n=()=>"Homebrew से इंस्टॉल किया गया",T2n=()=>"Homebrew로 설치됨",R2n=()=>"Homebrew でインストール",M2n=()=>"Zainstalowano przez Homebrew",O2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?C2n():t==="fa"?z2n():t==="ar"?E2n():t==="es"?N2n():t==="hi"?A2n():t==="ko"?T2n():t==="ja"?R2n():t==="pl"?M2n():S2n()}),$2n=()=>"Installed with the orx installer",D2n=()=>"通过 orx 安装程序安装",L2n=()=>"نصب‌شده با نصب‌کنندهٔ orx",I2n=()=>"مثبّت عبر مُثبّت orx",P2n=()=>"Instalado con el instalador de orx",B2n=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",F2n=()=>"orx 설치 프로그램으로 설치됨",H2n=()=>"orx インストーラーでインストール",q2n=()=>"Zainstalowano instalatorem orx",U2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?D2n():t==="fa"?L2n():t==="ar"?I2n():t==="es"?P2n():t==="hi"?B2n():t==="ko"?F2n():t==="ja"?H2n():t==="pl"?q2n():$2n()}),G2n=()=>"Managed by Nix",W2n=()=>"由 Nix 管理",K2n=()=>"مدیریت‌شده با Nix",V2n=()=>"مُدار بواسطة Nix",Q2n=()=>"Gestionado por Nix",X2n=()=>"Nix द्वारा प्रबंधित",Y2n=()=>"Nix로 관리됨",Z2n=()=>"Nix で管理",J2n=()=>"Zarządzane przez Nix",ekn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W2n():t==="fa"?K2n():t==="ar"?V2n():t==="es"?Q2n():t==="hi"?X2n():t==="ko"?Y2n():t==="ja"?Z2n():t==="pl"?J2n():G2n()}),tkn=()=>"Portable orx.exe",rkn=()=>"便携版 orx.exe",nkn=()=>"orx.exe قابل‌حمل",skn=()=>"‏orx.exe المحمول",okn=()=>"orx.exe portable",akn=()=>"पोर्टेबल orx.exe",ikn=()=>"포터블 orx.exe",ckn=()=>"ポータブル版 orx.exe",lkn=()=>"Przenośny orx.exe",ukn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rkn():t==="fa"?nkn():t==="ar"?skn():t==="es"?okn():t==="hi"?akn():t==="ko"?ikn():t==="ja"?ckn():t==="pl"?lkn():tkn()}),_kn=()=>"Unknown install",fkn=()=>"未知安装方式",dkn=()=>"روش نصب نامشخص",hkn=()=>"تثبيت غير معروف",pkn=()=>"Instalación desconocida",mkn=()=>"अज्ञात इंस्टॉल",gkn=()=>"알 수 없는 설치",vkn=()=>"不明なインストール",bkn=()=>"Nieznany sposób instalacji",ykn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fkn():t==="fa"?dkn():t==="ar"?hkn():t==="es"?pkn():t==="hi"?mkn():t==="ko"?gkn():t==="ja"?vkn():t==="pl"?bkn():_kn()}),xkn=()=>"Re-run your cargo install to update.",wkn=()=>"重新运行 cargo 安装命令以更新。",kkn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",jkn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",Skn=()=>"Vuelve a ejecutar cargo install para actualizar.",Ckn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",zkn=()=>"업데이트하려면 cargo install을 다시 실행하세요.",Ekn=()=>"更新するには cargo install を再実行してください。",Nkn=()=>"Uruchom ponownie cargo install, aby zaktualizować.",Akn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wkn():t==="fa"?kkn():t==="ar"?jkn():t==="es"?Skn():t==="hi"?Ckn():t==="ko"?zkn():t==="ja"?Ekn():t==="pl"?Nkn():xkn()}),Tkn=()=>"Run brew upgrade to update.",Rkn=()=>"运行 brew upgrade 以更新。",Mkn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",Okn=()=>"نفّذ brew upgrade للتحديث.",$kn=()=>"Ejecuta brew upgrade para actualizar.",Dkn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",Lkn=()=>"업데이트하려면 brew upgrade를 실행하세요.",Ikn=()=>"更新するには brew upgrade を実行してください。",Pkn=()=>"Uruchom brew upgrade, aby zaktualizować.",Bkn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rkn():t==="fa"?Mkn():t==="ar"?Okn():t==="es"?$kn():t==="hi"?Dkn():t==="ko"?Lkn():t==="ja"?Ikn():t==="pl"?Pkn():Tkn()}),Fkn=()=>"Update it through your Nix configuration.",Hkn=()=>"通过 Nix 配置进行更新。",qkn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Ukn=()=>"حدّثه عبر إعداد Nix الخاص بك.",Gkn=()=>"Actualízalo desde tu configuración de Nix.",Wkn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",Kkn=()=>"Nix 설정을 통해 업데이트하세요.",Vkn=()=>"Nix の設定を通じて更新してください。",Qkn=()=>"Zaktualizuj przez konfigurację Nix.",Xkn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hkn():t==="fa"?qkn():t==="ar"?Ukn():t==="es"?Gkn():t==="hi"?Wkn():t==="ko"?Kkn():t==="ja"?Vkn():t==="pl"?Qkn():Fkn()}),Ykn=()=>"Close",Zkn=()=>"关闭",Jkn=()=>"بستن",e4n=()=>"إغلاق",t4n=()=>"Cerrar",r4n=()=>"बंद करें",n4n=()=>"닫기",s4n=()=>"閉じる",o4n=()=>"Zamknij",a4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zkn():t==="fa"?Jkn():t==="ar"?e4n():t==="es"?t4n():t==="hi"?r4n():t==="ko"?n4n():t==="ja"?s4n():t==="pl"?o4n():Ykn()}),i4n=()=>"Maximize",c4n=()=>"最大化",l4n=()=>"بزرگ کردن",u4n=()=>"تكبير",_4n=()=>"Maximizar",f4n=()=>"बड़ा करें",d4n=()=>"최대화",h4n=()=>"最大化",p4n=()=>"Maksymalizuj",m4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?c4n():t==="fa"?l4n():t==="ar"?u4n():t==="es"?_4n():t==="hi"?f4n():t==="ko"?d4n():t==="ja"?h4n():t==="pl"?p4n():i4n()}),g4n=()=>"Minimize",v4n=()=>"最小化",b4n=()=>"کوچک کردن",y4n=()=>"تصغير",x4n=()=>"Minimizar",w4n=()=>"छोटा करें",k4n=()=>"최소화",j4n=()=>"最小化",S4n=()=>"Minimalizuj",C4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?v4n():t==="fa"?b4n():t==="ar"?y4n():t==="es"?x4n():t==="hi"?w4n():t==="ko"?k4n():t==="ja"?j4n():t==="pl"?S4n():g4n()}),z4n=()=>"Restore",E4n=()=>"还原",N4n=()=>"بازیابی",A4n=()=>"استعادة",T4n=()=>"Restaurar",R4n=()=>"पुनर्स्थापित करें",M4n=()=>"복원",O4n=()=>"元に戻す",$4n=()=>"Przywróć",D4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?E4n():t==="fa"?N4n():t==="ar"?A4n():t==="es"?T4n():t==="hi"?R4n():t==="ko"?M4n():t==="ja"?O4n():t==="pl"?$4n():z4n()}),L4n=()=>"Active Experiments",I4n=()=>"活跃实验",P4n=()=>"آزمایش‌های فعال",B4n=()=>"التجارب النشطة",F4n=()=>"Experimentos activos",H4n=()=>"सक्रिय प्रयोग",q4n=()=>"활성 실험",U4n=()=>"進行中の実験",G4n=()=>"Aktywne eksperymenty",W4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?I4n():t==="fa"?P4n():t==="ar"?B4n():t==="es"?F4n():t==="hi"?H4n():t==="ko"?q4n():t==="ja"?U4n():t==="pl"?G4n():L4n()}),K4n=()=>"Default compute",V4n=()=>"默认计算目标",Q4n=()=>"محاسبات پیش‌فرض",X4n=()=>"الحوسبة الافتراضية",Y4n=()=>"Cómputo predeterminado",Z4n=()=>"डिफ़ॉल्ट कंप्यूट",J4n=()=>"기본 컴퓨팅",e3n=()=>"既定のコンピューティング",t3n=()=>"Domyślne zasoby obliczeniowe",r3n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?V4n():t==="fa"?Q4n():t==="ar"?X4n():t==="es"?Y4n():t==="hi"?Z4n():t==="ko"?J4n():t==="ja"?e3n():t==="pl"?t3n():K4n()}),n3n=()=>"More tools",s3n=()=>"更多工具",o3n=()=>"ابزارهای بیشتر",a3n=()=>"مزيد من الأدوات",i3n=()=>"Más herramientas",c3n=()=>"और टूल",l3n=()=>"추가 도구",u3n=()=>"その他のツール",_3n=()=>"Więcej narzędzi",xN=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?s3n():t==="fa"?o3n():t==="ar"?a3n():t==="es"?i3n():t==="hi"?c3n():t==="ko"?l3n():t==="ja"?u3n():t==="pl"?_3n():n3n()}),f3n=()=>"Terminal",d3n=()=>"终端",h3n=()=>"ترمینال",p3n=()=>"الطرفية",m3n=()=>"Terminal",g3n=()=>"टर्मिनल",v3n=()=>"터미널",b3n=()=>"ターミナル",y3n=()=>"Terminal",bb=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?d3n():t==="fa"?h3n():t==="ar"?p3n():t==="es"?m3n():t==="hi"?g3n():t==="ko"?v3n():t==="ja"?b3n():t==="pl"?y3n():f3n()}),x3n=()=>"The terminal disconnected.",w3n=()=>"终端连接已断开。",k3n=()=>"ارتباط ترمینال قطع شد.",j3n=()=>"انقطعت الطرفية.",S3n=()=>"La terminal se desconectó.",C3n=()=>"टर्मिनल डिस्कनेक्ट हो गया।",z3n=()=>"터미널 연결이 끊어졌습니다.",E3n=()=>"ターミナルの接続が切れました。",N3n=()=>"Utracono połączenie z terminalem.",wN=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w3n():t==="fa"?k3n():t==="ar"?j3n():t==="es"?S3n():t==="hi"?C3n():t==="ko"?z3n():t==="ja"?E3n():t==="pl"?N3n():x3n()}),A3n=e=>`Shell exited with code ${e==null?void 0:e.code}.`,T3n=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,R3n=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,M3n=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,O3n=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,$3n=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,D3n=e=>`셸이 코드 ${e==null?void 0:e.code}로 종료되었습니다.`,L3n=e=>`シェルがコード ${e==null?void 0:e.code} で終了しました。`,I3n=e=>`Powłoka zakończyła działanie z kodem ${e==null?void 0:e.code}.`,P3n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T3n(e):t==="fa"?R3n(e):t==="ar"?M3n(e):t==="es"?O3n(e):t==="hi"?$3n(e):t==="ko"?D3n(e):t==="ja"?L3n(e):t==="pl"?I3n(e):A3n(e)}),B3n=()=>"Restart shell",F3n=()=>"重新启动 Shell",H3n=()=>"راه‌اندازی دوباره پوسته",q3n=()=>"إعادة تشغيل Shell",U3n=()=>"Reiniciar shell",G3n=()=>"शेल फिर से शुरू करें",W3n=()=>"셸 다시 시작",K3n=()=>"シェルを再起動",V3n=()=>"Uruchom ponownie powłokę",Q3n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F3n():t==="fa"?H3n():t==="ar"?q3n():t==="es"?U3n():t==="hi"?G3n():t==="ko"?W3n():t==="ja"?K3n():t==="pl"?V3n():B3n()}),X3n=()=>"This worktree",Y3n=()=>"当前工作树",Z3n=()=>"این درخت کاری",J3n=()=>"شجرة العمل هذه",e5n=()=>"Este árbol de trabajo",t5n=()=>"यह वर्कट्री",r5n=()=>"이 워크트리",n5n=()=>"このワークツリー",s5n=()=>"To drzewo robocze",o5n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y3n():t==="fa"?Z3n():t==="ar"?J3n():t==="es"?e5n():t==="hi"?t5n():t==="ko"?r5n():t==="ja"?n5n():t==="pl"?s5n():X3n()}),a5n=()=>"Workspace",i5n=()=>"工作区",c5n=()=>"فضای کاری",l5n=()=>"مساحة العمل",u5n=()=>"Espacio de trabajo",_5n=()=>"वर्कस्पेस",f5n=()=>"작업 공간",d5n=()=>"ワークスペース",h5n=()=>"Obszar roboczy",D2=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i5n():t==="fa"?c5n():t==="ar"?l5n():t==="es"?u5n():t==="hi"?_5n():t==="ko"?f5n():t==="ja"?d5n():t==="pl"?h5n():a5n()}),p5n=e=>`Current worktree · ${e==null?void 0:e.branch}`,m5n=e=>`当前工作树 · ${e==null?void 0:e.branch}`,g5n=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,v5n=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,b5n=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,y5n=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,x5n=e=>`현재 워크트리 · ${e==null?void 0:e.branch}`,w5n=e=>`現在のワークツリー · ${e==null?void 0:e.branch}`,k5n=e=>`Bieżące drzewo robocze · ${e==null?void 0:e.branch}`,j5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?m5n(e):t==="fa"?g5n(e):t==="ar"?v5n(e):t==="es"?b5n(e):t==="hi"?y5n(e):t==="ko"?x5n(e):t==="ja"?w5n(e):t==="pl"?k5n(e):p5n(e)}),S5n=e=>`Default branch · ${e==null?void 0:e.branch}`,C5n=e=>`默认分支 · ${e==null?void 0:e.branch}`,z5n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,E5n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,N5n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,A5n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,T5n=e=>`기본 브랜치 · ${e==null?void 0:e.branch}`,R5n=e=>`既定のブランチ · ${e==null?void 0:e.branch}`,M5n=e=>`Gałąź domyślna · ${e==null?void 0:e.branch}`,O5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?C5n(e):t==="fa"?z5n(e):t==="ar"?E5n(e):t==="es"?N5n(e):t==="hi"?A5n(e):t==="ko"?T5n(e):t==="ja"?R5n(e):t==="pl"?M5n(e):S5n(e)}),$5n=e=>`detached at ${e==null?void 0:e.branch}`,D5n=e=>`分离于 ${e==null?void 0:e.branch}`,L5n=e=>`جدا در ${e==null?void 0:e.branch}`,I5n=e=>`منفصل عند ${e==null?void 0:e.branch}`,P5n=e=>`desacoplado en ${e==null?void 0:e.branch}`,B5n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,F5n=e=>`${e==null?void 0:e.branch}에서 분리됨`,H5n=e=>`${e==null?void 0:e.branch} で分離された HEAD`,q5n=e=>`odłączony HEAD na ${e==null?void 0:e.branch}`,U5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?D5n(e):t==="fa"?L5n(e):t==="ar"?I5n(e):t==="es"?P5n(e):t==="hi"?B5n(e):t==="ko"?F5n(e):t==="ja"?H5n(e):t==="pl"?q5n(e):$5n(e)}),G5n=()=>"Listing truncated.",W5n=()=>"列表已截断。",K5n=()=>"فهرست کوتاه شده است.",V5n=()=>"القائمة مقتطعة.",Q5n=()=>"Listado truncado.",X5n=()=>"सूची छोटी की गई।",Y5n=()=>"목록이 잘렸습니다.",Z5n=()=>"一覧が省略されています。",J5n=()=>"Lista została ucięta.",ejn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W5n():t==="fa"?K5n():t==="ar"?V5n():t==="es"?Q5n():t==="hi"?X5n():t==="ko"?Y5n():t==="ja"?Z5n():t==="pl"?J5n():G5n()}),tjn=()=>"Loading…",rjn=()=>"正在加载…",njn=()=>"در حال بارگیری…",sjn=()=>"جارٍ التحميل…",ojn=()=>"Cargando…",ajn=()=>"लोड हो रहा है…",ijn=()=>"불러오는 중…",cjn=()=>"読み込み中…",ljn=()=>"Wczytywanie…",ujn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rjn():t==="fa"?njn():t==="ar"?sjn():t==="es"?ojn():t==="hi"?ajn():t==="ko"?ijn():t==="ja"?cjn():t==="pl"?ljn():tjn()}),_jn=()=>"No changes yet.",fjn=()=>"尚无更改。",djn=()=>"هنوز تغییری وجود ندارد.",hjn=()=>"لا توجد تغييرات بعد.",pjn=()=>"Aún no hay cambios.",mjn=()=>"अभी तक कोई बदलाव नहीं।",gjn=()=>"아직 변경 사항이 없습니다.",vjn=()=>"変更はまだありません。",bjn=()=>"Na razie brak zmian.",yjn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fjn():t==="fa"?djn():t==="ar"?hjn():t==="es"?pjn():t==="hi"?mjn():t==="ko"?gjn():t==="ja"?vjn():t==="pl"?bjn():_jn()}),xjn=()=>"No files.",wjn=()=>"没有文件。",kjn=()=>"فایلی وجود ندارد.",jjn=()=>"لا توجد ملفات.",Sjn=()=>"No hay archivos.",Cjn=()=>"कोई फ़ाइल नहीं।",zjn=()=>"파일이 없습니다.",Ejn=()=>"ファイルがありません。",Njn=()=>"Brak plików.",Ajn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wjn():t==="fa"?kjn():t==="ar"?jjn():t==="es"?Sjn():t==="hi"?Cjn():t==="ko"?zjn():t==="ja"?Ejn():t==="pl"?Njn():xjn()}),Tjn=()=>"Refresh failed:",Rjn=()=>"刷新失败:",Mjn=()=>"تازه‌سازی ناموفق بود:",Ojn=()=>"فشل التحديث:",$jn=()=>"Error al actualizar:",Djn=()=>"रीफ़्रेश विफल:",Ljn=()=>"새로 고침 실패:",Ijn=()=>"更新に失敗:",Pjn=()=>"Nie udało się odświeżyć:",Bjn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rjn():t==="fa"?Mjn():t==="ar"?Ojn():t==="es"?$jn():t==="hi"?Djn():t==="ko"?Ljn():t==="ja"?Ijn():t==="pl"?Pjn():Tjn()}),Ee=e=>`⁦${e}⁩`,Vl=e=>`⁨${e}⁩`,fr=e=>new Intl.NumberFormat(C()).format(e),ym="demo_nanochat_v1",Ju=e=>e.startsWith("demo_"),zh="chat_demo_nanochat_v1",Jj="chat_demo_nanochat_figures_v1",eS="chat_demo_nanochat_literature_v1",Fjn={[zh]:"cpu_end_to_end",[Jj]:"figures",[eS]:"literature"},L2="cpu-apple-silicon-pipeline-results.md",Hjn={[zh]:"msg_demo_nanochat_assistant_v1",[Jj]:"msg_demo_nanochat_figures_assistant_v1",[eS]:"msg_demo_nanochat_literature_assistant_v1"},kN="Run the proposed learning-rate probe experiment. Summarize its results using the recorded validation metric and comparison described by the experiment. If it produces an interactive HTML loss chart, show it inline using image syntax.";class c3 extends Error{constructor(t,n,s){super(t);bo(this,"currentVersion");bo(this,"exists");this.name="FileChangedError",this.currentVersion=n,this.exists=s}}function Ba(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}function qjn(e){var t;if(e.status!=="running"&&e.status!=="starting")return null;const r=(t=e.backend)==null?void 0:t.monitoringError;return typeof r=="string"&&r?r:null}function LL(e){return[...e].sort((t,n)=>n.createdAt-t.createdAt).map(qjn).find(t=>t!==null)??null}const IL=new WeakMap;async function Eo(e){if(!e.ok){const n=await e.text().catch(()=>"");let s=n;try{const o=JSON.parse(n);if(typeof o=="object"&&o!==null&&("error"in o&&typeof o.error=="string"&&(s=o.error),e.status===409&&"code"in o&&o.code==="fileChanged"&&"exists"in o&&typeof o.exists=="boolean")){const a="currentVersion"in o&&typeof o.currentVersion=="string"?o.currentVersion:null;throw new c3(s,a,o.exists)}}catch(o){if(o instanceof c3)throw o}throw new Error(s||`HTTP ${e.status}`)}const r=await e.json(),t=IL.get(e);if(t&&!Wr(t))throw new DOMException("Workspace changed","AbortError");return r}const $t=(e,r)=>fetch(e,{signal:r}).then(t=>Eo(t));async function va(e,r){const t=Si(),n=await fetch(e,r);if(!Wr(t))throw new DOMException("Workspace changed","AbortError");return IL.set(n,t),n.ok&&wX(e,t),n}const jt=(e,r,t=!1)=>va(e,{method:"POST",keepalive:t,headers:r===void 0?{}:{"content-type":"application/json"},body:r===void 0?void 0:JSON.stringify(r)}).then(n=>Eo(n)),Yc=(e,r)=>va(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(r)}).then(t=>Eo(t)),PL=(e,r)=>va(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(r)}).then(t=>Eo(t)),Ujn=e=>$t("/api/projects",e).then(r=>r.projects),Gjn=e=>$t("/api/projects/activity",e).then(r=>r.activity),l3="agentic",Wjn=e=>$t("/api/settings/ui-state",e),Kjn=(e,r)=>$t(`/api/projects/${encodeURIComponent(e)}/ui-state`,r),Vjn=(e,r,t=!1)=>jt(`/api/projects/${encodeURIComponent(e)}/ui-state`,r,t),Qjn=(e,r=!1)=>jt("/api/settings/ui-state",{workspace:e},r),Xjn=e=>jt("/api/settings/ui-state",e),Yjn=(e,r)=>jt("/api/onboarding/complete",{...e,...r}),Zjn=(e="",r)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return $t(`/api/project-path/status${t}`,r)},Jjn=()=>jt("/api/git/install"),eSn=()=>jt("/api/project-path/pick").then(e=>e.path),tSn=e=>jt("/api/projects",e),rSn=(e,r)=>$t(`/api/papers/search?q=${encodeURIComponent(e)}`,r).then(t=>t.papers),nSn=e=>$t("/api/github/account",e),sSn=(e,r)=>$t(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,r),oSn=(e,r,t)=>$t(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(r)}`,t),aSn=(e,r)=>$t(`/api/papers/resolve?id=${encodeURIComponent(e)}`,r).then(t=>t.paper),iSn=(e,r)=>Yc(`/api/projects/${e}`,r).then(t=>t.project),cSn=e=>jt("/api/projects/starter-prompts/prewarm",e),lSn=(e,r,t,n,s)=>$t(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:r,...t?{model:t}:{},locale:n})}`,s),BL=e=>va(`/api/projects/${e}`,{method:"DELETE"}).then(async r=>{if(!r.ok){const t=await r.json().catch(()=>null);throw new Error((t==null?void 0:t.error)??`delete failed (${r.status})`)}yX(e)}),uSn=(e,r)=>$t(`/api/projects/${e}/experiments`,r).then(t=>t.experiments),_Sn=(e,r,t)=>Yc(`/api/experiments/${e}/archive`,{direction:r,archived:t}),fSn=(e,r)=>$t(`/api/projects/${e}/runs`,r).then(t=>t.runs),FL=e=>jt(`/api/runs/${e}/cancel`).then(()=>{}),dSn=(e,r)=>$t(`/api/runs/${e}/log?offset=${r}`),hSn=(e,r)=>$t(`/api/runs/${e}/diff`,r),pSn=(e,r)=>$t(`/api/experiments/${e}/diff`,r),N_=(e,r=new URLSearchParams)=>(e.sessionId&&r.set("sessionId",e.sessionId),e.ref&&r.set("ref",e.ref),r),mSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file?${N_(t,new URLSearchParams({path:r}))}`,n),u3=(e,r,t={})=>`/api/projects/${e}/file/raw?${N_(t,new URLSearchParams({path:r}))}`,gSn=(e,r)=>$t(`/api/files/abs?path=${encodeURIComponent(e)}`,r),HL=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,vSn=(e,r,t,n)=>PL(`/api/projects/${e}/file`,{path:r,content:t,sessionId:n.sessionId,expectedVersion:n.expectedVersion}),bSn=(e,r,t,n={})=>Yc(`/api/projects/${e}/file`,{path:r,...t,sessionId:n.sessionId}),ySn=(e,r,t={})=>jt(`/api/projects/${e}/file/open`,{path:r,sessionId:t.sessionId}),qL=(e,r,t={})=>jt(`/api/projects/${e}/file/reveal`,{path:r,sessionId:t.sessionId}),xSn=e=>$t("/api/latex/engine",e),wSn=(e,r,t={})=>jt(`/api/projects/${e}/file/latex`,{path:r,sessionId:t.sessionId}),kSn=e=>$t("/api/overleaf/settings",e),UL=e=>jt("/api/overleaf/token",{token:e}),jSn=()=>va("/api/overleaf/token",{method:"DELETE"}).then(e=>Eo(e)),GL=(e,r={})=>jt("/api/overleaf/session",{session:e,host:r.host}),SSn=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>Eo(e)),CSn=(e={})=>jt("/api/overleaf/session/import",{host:e.host}),zSn=(e,r,t={})=>jt(`/api/projects/${e}/file/overleaf/live`,{path:r,sessionId:t.sessionId,retry:t.retry}),ESn=(e,r,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${N_(t,new URLSearchParams({path:r}))}`,{method:"DELETE"}).then(n=>Eo(n)),NSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file/overleaf?${N_(t,new URLSearchParams({path:r}))}`,n),ASn=(e,r,t)=>jt(`/api/projects/${e}/file/overleaf`,{path:r,project:t.project,sessionId:t.sessionId}),TSn=(e,r,t={})=>va(`/api/projects/${e}/file/overleaf?${N_(t,new URLSearchParams({path:r}))}`,{method:"DELETE"}).then(n=>Eo(n)),RSn=(e,r,t={})=>jt(`/api/projects/${e}/file/overleaf/sync`,{path:r,sessionId:t.sessionId,resolve:t.resolve}),MSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file/overleaf/status?${N_(t,new URLSearchParams({path:r}))}`,n),OSn=(e,r,t={})=>`/api/projects/${e}/file/overleaf/upload?${N_(t,new URLSearchParams({path:r}))}`,$Sn=(e,r={},t)=>{const n=N_(r).toString();return $t(`/api/projects/${e}/code-tree${n?`?${n}`:""}`,t)},DSn=(e,r)=>$t(`/api/chat/sessions/${e}/worktree`,r),xy=(e,r,t)=>`https://github.com/${e}/${r}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,LSn=e=>$t("/api/settings/hf",e),ISn=e=>jt("/api/settings/hf",{token:e}),PSn=e=>$t("/api/settings/tinker",e),BSn=e=>jt("/api/settings/tinker",{key:e}),FSn=e=>$t("/api/update",e),HSn=()=>jt("/api/update/apply"),qSn=()=>jt("/api/update/restart"),USn=e=>jt("/api/update/auto",{enabled:e}),GSn=(e=!1)=>jt("/api/update/install-cli",{force:e}),WSn=e=>$t("/api/settings/k8s",e),KSn=e=>jt("/api/settings/k8s",e),VSn=e=>$t("/api/settings/modal",e),QSn=(e,r)=>jt("/api/settings/modal",{tokenId:e,tokenSecret:r}),XSn=e=>$t("/api/settings/env",e).then(r=>r.vars),WL=(e,r)=>jt("/api/settings/env",{key:e,value:r}).then(t=>t.vars),YSn=e=>va(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)).then(r=>r.vars),ZSn=e=>$t("/api/settings/data-dir",e),JSn=e=>jt("/api/settings/data-dir/validate",{path:e}),e6n=e=>jt("/api/settings/data-dir/move",{path:e}),t6n=e=>$t("/api/settings/ssh",e),r6n=e=>jt("/api/settings/ssh",e),n6n=e=>jt("/api/settings/ssh/default",{host:e}),s6n=(e,r)=>jt("/api/settings/ssh/preflight",{host:e,container:r}),o6n=e=>$t("/api/settings/ssh/config",e),a6n=(e,r)=>PL("/api/settings/ssh/config",{content:e,previousContent:r}),i6n=(e,r)=>$t(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,r),c6n=e=>$t("/_orx/runtime",e),l6n=e=>$t("/api/remote/sessions",e).then(r=>r.sessions),u6n=(e,r)=>jt("/api/remote/sessions",{host:e,uiPreferences:r}),_6n=e=>jt("/_orx/install",e),f6n=()=>jt("/_orx/reconnect"),KL=()=>jt("/_orx/disconnect"),d6n=()=>jt("/_orx/start-host"),VL=()=>$t("/_orx/stop-host"),QL=e=>jt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),h6n=e=>$t("/api/settings/slurm",e),p6n=e=>jt("/api/settings/slurm",e),m6n=e=>$t("/api/settings/ray",e),g6n=e=>jt("/api/settings/ray",e),v6n=e=>jt("/api/settings/ray/preflight",{address:e??null}),b6n=(e,r)=>$t(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,r),y6n=e=>jt("/api/settings/compute/default",e),x6n=e=>$t("/api/settings/local",e),w6n=e=>$t("/api/settings/openresearch",e),k6n=(e,r)=>$t(`/api/projects/${e}/files`,r),j6n=(e,r)=>va(`/api/projects/${e}/files?path=${encodeURIComponent(r)}`,{method:"DELETE"}).then(t=>Eo(t)),S6n=(e,r,t)=>Yc(`/api/projects/${e}/files`,{path:r,...t}),Wf=(e,r)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(r)}`,XL=512e3,C6n=(e,r)=>{const t=new Uint8Array(e);if(t.includes(0))return{content:"",binary:!0,truncated:r};try{return{content:new TextDecoder("utf-8",{fatal:!0}).decode(t,{stream:r}),binary:!1,truncated:r}}catch{return{content:"",binary:!0,truncated:r}}},z6n=(e,r,t)=>fetch(Wf(e,r),{signal:t,headers:{Range:`bytes=0-${XL-1}`}}).then(n=>{var o;if(n.status===404)return null;if(n.status===416&&n.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!n.ok)throw new Error(`HTTP ${n.status}`);const s=Number((o=n.headers.get("content-range"))==null?void 0:o.split("/").pop());return n.arrayBuffer().then(a=>C6n(a,Number.isFinite(s)&&s>a.byteLength))}),E6n=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",N6n=(e,r,t)=>fetch(Wf(e,r),{signal:t,method:"HEAD"}).then(n=>{if(n.status===404)return null;if(!n.ok)throw new Error(`HTTP ${n.status}`);const s=n.headers.get("x-openresearch-presentation");return{size:Number(n.headers.get("content-length"))||0,presentation:E6n(s)?s:"download"}}),A6n=e=>$t("/api/settings/profile",e),T6n=e=>$t("/api/settings/lit-sources",e),R6n=e=>jt("/api/settings/lit-sources",e),M6n=e=>$t("/api/settings/projects",e),YL=(e,r)=>jt("/api/settings/projects",{githubForNewProjects:e,...r===void 0?{}:{githubDefaultPromptSeen:r}}),O6n=(e,r)=>$t(`/api/projects/${e}/git`,r),$6n=e=>jt(`/api/projects/${e}/git/init`),D6n=e=>jt(`/api/projects/${e}/github`),L6n=e=>jt(`/api/projects/${e}/github/disable`),I6n=e=>$t("/api/settings/telemetry",e),P6n=e=>jt("/api/settings/telemetry",{enabled:e}),e_=e=>{jt("/api/telemetry/event",e).catch(()=>{})},B6n=(e,r)=>va("/api/telemetry/locale",{method:"POST",signal:r,headers:{"content-type":"application/json"},body:JSON.stringify({locale:e})}).then(t=>Eo(t));function $1(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??f3(e.id);const r=(s=e.displayName)==null?void 0:s.split(" · ").slice(1).join(" · ").replace(/ \(local\)$/,""),t=r==="OpenAI-compatible server"||r==="Custom endpoint"||r==="Custom Endpoint"?qj():r,n=f3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${n} · ${t}`:n}const yb="default";function wy(e,r){var a,i,c;const t=e==null?void 0:e.models.find(u=>u.id===r),n=(t==null?void 0:t.reasoningLevels)??((a=e==null?void 0:e.options)==null?void 0:a.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,o=s&&n.some(u=>u.id===s)?s:n.some(u=>u.id===yb)?yb:((i=e==null?void 0:e.options)==null?void 0:i.defaultReasoningLevel)??((c=n[0])==null?void 0:c.id)??null;return{choices:n,defaultId:o}}const _3="default";function ZL(e,r){var n;if((e==null?void 0:e.id)!=="codex")return[];const t=(n=e.models.find(s=>s.id===r))==null?void 0:n.serviceTiers;return t!=null&&t.length?[{id:_3,label:v0r(),description:c0r()},...t]:[]}function xb(e,r,t){var o;if(!e)return t??null;if(e.id!=="codex"||((o=e.models.find(a=>a.id===r))==null?void 0:o.serviceTiers)===void 0)return null;const s=ZL(e,r);return s.length===0?_3:t!=null&&s.some(a=>a.id===t)?t:_3}function JL(e,r,t){if(!e)return t;const{choices:n,defaultId:s}=wy(e,r);return n.length===0?yb:t&&n.some(o=>o.id===t)?t:s}const F6n=e=>$t("/api/harnesses/setup/commands",e),eI=(e=!1,r=!1,t,n)=>{const s=new URLSearchParams;e&&s.set("refresh","1"),r&&s.set("retry","1"),n&&s.set("harness",n);const o=s.size>0?`?${s.toString()}`:"";return $t(`/api/harnesses${o}`,t).then(a=>a.harnesses)},H6n=(e,r,t)=>{const n=new URLSearchParams({...r?{harness:r}:{},...t?{project:t}:{}});return $t(`/api/skills${n.size?`?${n}`:""}`,e)},q6n=(e,r,t,n)=>$t(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...r?{project:r}:{},...n?{harness:n}:{}})}`}`,t).then(s=>s.content),U6n=e=>$t("/api/latex-templates",e).then(r=>r.templates),G6n=e=>jt("/api/latex-templates",e).then(r=>r.template),W6n=e=>va(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)),K6n=e=>$t("/api/user-skills",e),V6n=e=>jt("/api/user-skills",e).then(r=>r.skill),Q6n=e=>va(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r));function f3(e){const r=(e.split("/").pop()??e).replace(/^~/,"").replace(/^claude-/,""),t=[],n=[];for(const s of r.split("-"))/^\d+(\.\d+)?$/.test(s)?n.push(s):(n.length&&t.push(n.splice(0).join(".")),t.push(s==="gpt"?"GPT":s.charAt(0).toUpperCase()+s.slice(1)));return n.length&&t.push(n.join(".")),t.join(" ")}const X6n=(e,r)=>$t(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,r).then(t=>t.sessions),Y6n=e=>$t("/api/chat/native-sessions",e).then(r=>r.chats),Z6n=(e,r)=>jt("/api/chat/native-sessions/import",{projectId:e,harness:r.harness,nativeId:r.nativeId,title:r.title}).then(t=>t.session),J6n=e=>$t("/api/chat/sessions?scope=all",e).then(r=>r.sessions),eCn=(e,r,t)=>{const n=new URLSearchParams({scope:"sidebar"});return e!=="all"&&n.set("archived",String(e==="archived")),r&&(n.set("beforeUpdatedAt",String(r.updatedAt)),n.set("beforeId",r.id)),$t(`/api/chat/sessions?${n}`,t)},tCn=(e,r,t={})=>jt("/api/chat/sessions",{projectId:e,harness:r,...t}).then(n=>n.session),rCn=e=>$t(`/api/chat/sessions/${e}`).then(r=>r.session),d3=e=>va(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(r=>Eo(r).then(t=>(by(e),t))),nCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{archived:r}).then(t=>t.session),sCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{title:r}).then(t=>t.session),oCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{planMode:r}).then(t=>t.session),aCn=e=>jt(`/api/chat/sessions/${e}/side`,{}).then(r=>r.session),iCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{goal:r}).then(t=>t.session),cCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{autonomy:r}).then(t=>t.session),lCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{permissionMode:r}).then(t=>t.session),uCn=(e,r)=>$t(`/api/chat/sessions/${e}/messages`,r).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),_Cn=(e,r)=>va(`/api/chat/sessions/${e}/queue/${encodeURIComponent(r)}`,{method:"DELETE"}).then(t=>Eo(t)),fCn=(e,r)=>jt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(r)}`),dCn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,h3=(e,r,t={},n,s,o,a)=>jt(`/api/chat/sessions/${e}/message`,{text:r,clientTurnId:o,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:n,annotations:s,mode:a}),hCn=e=>jt(`/api/chat/sessions/${e}/compact`,{}),pCn=(e,r)=>jt(`/api/chat/sessions/${e}/shell`,{command:r}),mCn=(e,r,t,n={})=>jt(`/api/chat/sessions/${e}/turns/${r}/recover`,{action:t,...n}),gCn=(e,r,t)=>jt(`/api/chat/sessions/${e}/fork`,{messageId:r,text:t}),vCn=(e,r)=>jt(`/api/chat/sessions/${e}/branch`,{leafId:r}),bCn=e=>jt(`/api/chat/sessions/${e}/interrupt`),yCn=(e,r)=>jt(`/api/chat/sessions/${e}/respond`,r);function Uc(e){const r=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(C(),{numeric:"always",style:"narrow"});if(r<60)return t.format(-r,"second");const n=Math.floor(r/60);if(n<60)return t.format(-n,"minute");const s=Math.floor(n/60);return s<24?t.format(-s,"hour"):t.format(-Math.floor(s/24),"day")}function dg(e){const r=Math.max(0,Math.floor(e/1e3));if(r<60)return znt({value:fr(r)});const t=Math.floor(r/60);if(t<60)return gnt({value:fr(t)});const n=Math.floor(t/60);return n<24?int({hours:fr(n),minutes:fr(t%60)}):Yrt({days:fr(Math.floor(n/24)),hours:fr(n%24)})}function Xl(e){const r=["B","KB","MB","GB","TB"];let t=e,n=0;for(;t>=1024&&n$t("/api/local-models",e),kCn=e=>jt("/api/local-models/discover",e),jCn=e=>jt("/api/local-models",e),SCn=e=>jt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),CCn=e=>va(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)),jN=()=>({queryKey:Mt("getHfSettings"),queryFn:({signal:e})=>LSn(e),staleTime:3e5}),SN=()=>({queryKey:Mt("getTinkerSettings"),queryFn:({signal:e})=>PSn(e),staleTime:3e5}),CN=()=>({queryKey:Mt("getK8sSettings"),queryFn:({signal:e})=>WSn(e),staleTime:3e4}),zN=()=>({queryKey:Mt("getModalSettings"),queryFn:({signal:e})=>VSn(e),staleTime:3e5}),zCn=()=>({queryKey:Mt("getSlurmSettings"),queryFn:({signal:e})=>h6n(e),staleTime:3e5}),ECn=()=>({queryKey:Mt("getRaySettings"),queryFn:({signal:e})=>m6n(e),staleTime:3e5}),tI=e=>({queryKey:Mt("getComputeSettings",e??null),queryFn:({signal:r})=>b6n(e,r),staleTime:3e4}),NCn=()=>({queryKey:Mt("getLocalMachine"),queryFn:({signal:e})=>x6n(e),staleTime:3e5}),ACn=()=>({queryKey:Mt("getOpenResearchSettings"),queryFn:({signal:e})=>w6n(e),staleTime:3e4}),TCn=()=>({queryKey:Mt("getEnvVars"),queryFn:({signal:e})=>XSn(e),staleTime:3e5}),RCn=()=>({queryKey:Mt("getDataDir"),queryFn:({signal:e})=>ZSn(e),staleTime:3e5}),rI=()=>({queryKey:Mt("getSshSettings"),queryFn:({signal:e})=>t6n(e),staleTime:3e4}),MCn=()=>({queryKey:Mt("getSshConfig"),queryFn:({signal:e})=>o6n(e),staleTime:3e5}),EN=e=>({queryKey:Mt("getSshMasterStatus",e),queryFn:({signal:r})=>i6n(e,r),staleTime:5e3}),OCn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>c6n(e),staleTime:2e3}),$Cn=()=>({queryKey:Mt("listRemoteSessions"),queryFn:({signal:e})=>l6n(e),staleTime:3e4}),wb=()=>({queryKey:Mt("getUpdateStatus"),queryFn:({signal:e,client:r,queryKey:t})=>vp(r,t,()=>FSn(e)),staleTime:3e4}),DCn=()=>({queryKey:Mt("getProfile"),queryFn:({signal:e})=>A6n(e),staleTime:3e5}),LCn=()=>({queryKey:Mt("getLitSources"),queryFn:({signal:e})=>T6n(e),staleTime:3e5}),rS=()=>({queryKey:Mt("getProjectDefaults"),queryFn:({signal:e})=>M6n(e),staleTime:3e5}),ICn=e=>({queryKey:Mt("getProjectGitStatus",e),queryFn:({signal:r})=>O6n(e,r),staleTime:3e4}),PCn=()=>({queryKey:Mt("getTelemetry"),queryFn:({signal:e})=>I6n(e),staleTime:3e5}),nS=()=>({queryKey:Mt("getHarnessSetupCommands"),queryFn:({signal:e})=>F6n(e),staleTime:1/0}),su=()=>({queryKey:Mt("getHarnesses"),queryFn:({signal:e})=>eI(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var r;return(r=e.state.data)!=null&&r.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),BCn=(e,r)=>({queryKey:Mt("getSkills",e??null,r??null),queryFn:({signal:t})=>H6n(t,e,r),select:t=>t.skills,refetchInterval:t=>{var n;return(n=t.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5}),FCn=(e,r,t)=>({queryKey:Mt("getSkillContent",e,r??null,t??null),queryFn:({signal:n})=>q6n(e,r,n,t),staleTime:3e5}),HCn=()=>({queryKey:Mt("listLatexTemplates"),queryFn:({signal:e})=>U6n(e),refetchInterval:3e4,staleTime:3e5}),qCn=()=>({queryKey:Mt("listUserSkills"),queryFn:({signal:e})=>K6n(e),select:e=>e.skills,refetchInterval:e=>{var r;return(r=e.state.data)!=null&&r.importing?2e3:3e4},staleTime:3e5});async function Kf(e=!1,r=!1){return!e&&!r?Je.fetchQuery(su()):sS(e,r)}const UCn=e=>sS(!0,!1,e),nI=()=>sS(!1,!1);async function sS(e,r,t){const n=su();await Je.cancelQueries(n);const s=await eI(e,r,void 0,t);return Wr(n.queryKey)&&Je.setQueryData(n.queryKey,s),s}const GCn=()=>({queryKey:Mt("getLocalModels"),queryFn:({signal:e})=>wCn(e),staleTime:3e4}),WCn=e=>({queryKey:Mt("reportLocale",e),queryFn:({signal:r})=>B6n(e,r),staleTime:0,retry:3,retryDelay:1e3,refetchOnWindowFocus:!1}),D1=new Map;function KCn(e,r){let t=D1.get(e);return t||(t=new Set,D1.set(e,t)),t.add(r),()=>{t.delete(r),t.size===0&&D1.delete(e)}}function VCn(e){var r;(r=D1.get(e.runId))==null||r.forEach(t=>t(e))}const p3=new Set;function hg(e){return p3.add(e),()=>{p3.delete(e)}}function Ol(e){p3.forEach(r=>r(e))}const m3=new Set;function QCn(e){return m3.add(e),()=>{m3.delete(e)}}function $l(){m3.forEach(e=>e())}const g3=new Set;function XCn(e){return g3.add(e),()=>{g3.delete(e)}}const v3=new Set;function YCn(e){return v3.add(e),()=>{v3.delete(e)}}function ZCn(){v3.forEach(e=>e())}function NN(e){g3.forEach(r=>r(e))}const b3=new Set;function sI(e){return b3.add(e),()=>{b3.delete(e)}}function I2(e){b3.forEach(r=>r(e))}const y3=new Set;function JCn(e){return y3.add(e),()=>{y3.delete(e)}}function AN(e){y3.forEach(r=>r(e))}const x3=new Set;function e7n(e){return x3.add(e),()=>{x3.delete(e)}}function t7n(e){x3.forEach(r=>r(e))}let w3=!0;const k3=new Set;function r7n(e){return k3.add(e),()=>{k3.delete(e)}}function TN(){return w3}function RN(e){e!==w3&&(w3=e,k3.forEach(r=>r()))}const n7n=8e3,s7n=3e3;function o7n(e){const r=T.useRef(e);r.current=e,T.useEffect(()=>{let t=null,n=!1,s,o,a=!1;const i=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{n||(a=!0,s??(s=window.setTimeout(()=>RN(!1),n7n)),c.readyState===EventSource.CLOSED&&o===void 0&&(o=window.setTimeout(()=>{o=void 0,i()},s7n)))},c.onopen=()=>{var d,_;n||(window.clearTimeout(s),s=void 0,RN(!0),a&&(Ol({type:"reconnected"}),$l(),NN({harness:"*",authState:"unknown"}),(_=(d=r.current).onReconnect)==null||_.call(d)),a=!0)};const u=d=>{try{return JSON.parse(d.data)}catch{return null}};c.addEventListener("resync.required",()=>{var d,_;Ol({type:"reconnected"}),$l(),(_=(d=r.current).onReconnect)==null||_.call(d)}),c.addEventListener("run.updated",d=>{const _=u(d);_!=null&&_.run&&($l(),r.current.onRun(_.run))}),c.addEventListener("experiment.updated",d=>{var p,m;const _=u(d);_!=null&&_.experiment&&($l(),(m=(p=r.current).onExperiment)==null||m.call(p,_.experiment))}),c.addEventListener("project.updated",d=>{var p,m;const _=u(d);_!=null&&_.project&&($l(),(m=(p=r.current).onProject)==null||m.call(p,_.project))}),c.addEventListener("files.updated",d=>{var p,m;const _=u(d);_!=null&&_.projectId&&((m=(p=r.current).onArtifacts)==null||m.call(p,_.projectId))}),c.addEventListener("run.log",d=>{const _=u(d);_!=null&&_.runId&&(VCn(_),j3.onRunLog(_))}),c.addEventListener("chat.session",d=>{const _=u(d);_!=null&&_.session&&($l(),Ol({type:"session",session:_.session}))}),c.addEventListener("chat.session.deleted",d=>{const _=u(d);_!=null&&_.sessionId&&($l(),Ol({type:"sessionDeleted",sessionId:_.sessionId}))}),c.addEventListener("chat.message",d=>{const _=u(d);_!=null&&_.message&&($l(),Ol({type:"message",sessionId:_.sessionId,message:_.message}))}),c.addEventListener("chat.busy",d=>{const _=u(d);_!=null&&_.sessionId&&($l(),Ol({type:"busy",sessionId:_.sessionId,busy:_.busy}))}),c.addEventListener("chat.usage",d=>{const _=u(d);_!=null&&_.sessionId&&_.usage&&Ol({type:"usage",sessionId:_.sessionId,usage:_.usage})}),c.addEventListener("chat.queued",d=>{const _=u(d);_!=null&&_.sessionId&&Ol({type:"queued",sessionId:_.sessionId,items:_.items??[]})}),c.addEventListener("chat.branch",d=>{const _=u(d);_!=null&&_.sessionId&&Ol({type:"branch",sessionId:_.sessionId,activeLeafId:_.activeLeafId??null})}),c.addEventListener("harness.auth",d=>{const _=u(d);_!=null&&_.harness&&_.authState&&NN(_)}),c.addEventListener("harness.catalog",()=>ZCn()),c.addEventListener("datadir.move.progress",d=>{const _=u(d);_&&I2({type:"progress",..._})}),c.addEventListener("datadir.move.done",d=>{const _=u(d);_&&I2({type:"done",path:_.path,oldPathLeft:_.oldPathLeft})}),c.addEventListener("datadir.move.error",d=>{const _=u(d);_&&I2({type:"error",error:_.error})}),c.addEventListener("update.status",d=>{const _=u(d);_&&t7n(_)}),c.addEventListener("overleaf.live",d=>{const _=u(d);_!=null&&_.key&&_.status&&AN({type:"live",key:_.key,status:_.status})}),c.addEventListener("overleaf.pulled",d=>{const _=u(d);_!=null&&_.key&&Array.isArray(_.paths)&&AN({type:"pulled",key:_.key,paths:_.paths})})};return i(),()=>{n=!0,window.clearTimeout(s),window.clearTimeout(o),t==null||t.close()}},[])}const Km=new Set;function a7n(e){const r=T.useRef(e);r.current=e,T.useEffect(()=>{const t={onRun:n=>r.current.onRun(n),onRunLog:n=>{var s,o;return(o=(s=r.current).onRunLog)==null?void 0:o.call(s,n)},onReconnect:()=>{var n,s;return(s=(n=r.current).onReconnect)==null?void 0:s.call(n)}};return Km.add(t),()=>{Km.delete(t)}},[])}const j3={onRun:e=>Km.forEach(r=>r.onRun(e)),onRunLog:e=>Km.forEach(r=>{var t;return(t=r.onRunLog)==null?void 0:t.call(r,e)}),onReconnect:()=>Km.forEach(e=>{var r;return(r=e.onReconnect)==null?void 0:r.call(e)})},So=e=>({queryKey:Mt("listChatSessions",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,async()=>{const s=await X6n(e,r),o=t.getQueryData(n);return s.filter(a=>!Pc.has(a.id)).map(a=>{var i;return{...a,contextUsage:a.contextUsage??((i=o==null?void 0:o.find(c=>c.id===a.id))==null?void 0:i.contextUsage)}})},i0),staleTime:3e4}),oI=()=>({queryKey:Mt("listNativeChats"),queryFn:({signal:e})=>Y6n(e),staleTime:0}),i7n=()=>({queryKey:Mt("listAllChatSessions"),queryFn:async({signal:e})=>(await J6n(e)).filter(r=>!Pc.has(r.id)),staleTime:0}),Fc=e=>({queryKey:Mt("getChatMessages",e),queryFn:async({signal:r,client:t,queryKey:n})=>{var d;const s=t.getQueryData(n),o=await vp(t,n,()=>uCn(e,r),(_,p,m)=>{if(!p)return _;const k=new Set([...m].filter(x=>x.startsWith("message:")).map(x=>x.slice(8)));return{messages:i0(_.messages,p.messages,k,!1),queued:m.has("queued")?p.queued:_.queued,activeLeafId:m.has("branch")||k.size?p.activeLeafId:_.activeLeafId}});r.throwIfAborted();const a=t.getQueryData(n),c=s!==void 0&&o.messages.some(_=>_.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===_.id)))?[]:(a==null?void 0:a.messages.filter(_=>_.id.startsWith("local-")))??[],u=c.some(_=>_.id===(a==null?void 0:a.activeLeafId));return{...o,messages:[...o.messages,...c.filter(_=>!o.messages.some(p=>p.id===_.id))],activeLeafId:a&&(u||!((d=a.activeLeafId)!=null&&d.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:o.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"});async function c7n(e,r,t){const n=new Map,s=hg(o=>{(o.type==="busy"||o.type==="usage")&&n.set(o.sessionId,{...n.get(o.sessionId),...o.type==="busy"?{busy:o.busy}:{contextUsage:o.usage}})});try{const o=await eCn(e,r,t);return t.throwIfAborted(),{...o,sessions:o.sessions.map(a=>({...a,...n.get(a.id)}))}}finally{s()}}const Lf="local-",aI="bash";function MN(e,r){const t=e.findIndex(n=>n.id===r.id);if(t>=0){const n=e.slice();return n[t]=r,n}return r.role!=="user"?[...e,r]:[...e.filter(n=>!n.id.startsWith(Lf)),r]}function l7n(e,r){switch(r.type){case"upsertMessage":{const t=e.messagesBySession[r.sessionId]??[],n=t.some(i=>i.id===r.message.id),s=e.activeLeafBySession[r.sessionId]??null,o=r.message.role==="user"&&s!==null&&s.startsWith(Lf),a=r.message.parentId!=null&&r.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:MN(t,r.message)},activeLeafBySession:n&&!o&&!a?e.activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:r.message.id}}}case"localError":{const t=e.messagesBySession[r.sessionId]??[],n={id:`${Lf}senderr-${Date.now()}`,role:"assistant",parts:[{id:"p0",type:"tool",tool:"error",state:{status:"error",error:r.text}}],createdAt:Date.now(),parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:[...t,n]},activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:n.id}}}case"localShell":{const t=e.messagesBySession[r.sessionId]??[],n=t.find(o=>o.id===r.id),s={id:r.id,role:"user",parts:[{id:"p0",type:"tool",tool:aI,state:{status:r.error===void 0?"running":"error",input:{command:r.command},error:r.error}}],createdAt:(n==null?void 0:n.createdAt)??Date.now(),parentId:n?n.parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:n?MN(t,s):[...t,s]},activeLeafBySession:n?e.activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:s.id}}}case"activeLeaf":return{...e,activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:r.leafId}};case"optimisticUser":{const t=e.messagesBySession[r.sessionId]??[],n=r.text?[{id:"p0",type:"text",text:r.text}]:[];r.attachments.forEach((o,a)=>n.push({id:`img${a}`,type:"image",text:o.url,name:o.name})),r.annotations.forEach((o,a)=>n.push({id:`annotation${a}`,type:"annotation",text:o.text}));const s={id:`${Lf}${Date.now()}`,role:"user",parts:n,createdAt:Date.now(),parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:[...t,s]},activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:s.id}}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[r.sessionId]:r.items}}}}let iI=0;function cI(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}Je.getQueryCache().subscribe(e=>{cI(e)&&iI++});const u7n=e=>Je.getQueryCache().subscribe(r=>{cI(r)&&e()}),_7n=()=>iI;function f7n(e,r){const t=Je.getQueryData(So(e).queryKey)??[],n=new Set(t.filter(a=>a.busy).map(a=>a.id)),s={messagesBySession:{},queuedBySession:{},activeLeafBySession:{},busySessions:n},o=new Set(n);r&&o.add(r);for(const a of o){const i=Je.getQueryData(Fc(a).queryKey);i&&(s.messagesBySession[a]=i.messages,s.queuedBySession[a]=i.queued,s.activeLeafBySession[a]=i.activeLeafId)}return s}function lI(e,r,t=!1){if(r.type==="busy"){yi(Je,So(e).queryKey,r.sessionId),Je.setQueryData(So(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===r.sessionId?{...u,busy:r.busy}:u));return}const n=Fc(r.sessionId);if(Pc.has(r.sessionId))return;yi(Je,n.queryKey,r.type==="upsertMessage"?`message:${r.message.id}`:r.type==="setQueued"?"queued":r.type==="activeLeaf"?"branch":"local");const s=Je.getQueryData(n.queryKey);if(t&&!s)return;const o={messagesBySession:s?{[r.sessionId]:s.messages}:{},queuedBySession:s?{[r.sessionId]:s.queued}:{},activeLeafBySession:s?{[r.sessionId]:s.activeLeafId}:{},busySessions:new Set},a=l7n(o,r),i={messages:a.messagesBySession[r.sessionId]??[],queued:a.queuedBySession[r.sessionId]??[],activeLeafId:a.activeLeafBySession[r.sessionId]??null};Je.setQueryData(n.queryKey,i)}function d7n(e,r){const t=!!r&&!Pc.has(r??""),n=dt({...Fc(r??""),enabled:t,subscribed:t}),s=T.useSyncExternalStore(u7n,_7n),o=T.useMemo(()=>f7n(e,r),[e,r,s,n.data]),a=Si()[1],i=T.useCallback(c=>{Wr(["workspace",a])&&lI(e,c)},[e,a]);return[o,i,n]}const Vf=()=>({queryKey:Mt("listProjects"),queryFn:({signal:e,client:r,queryKey:t})=>vp(r,t,()=>Ujn(e),i0),staleTime:3e4}),ON=()=>({queryKey:Mt("listProjectActivity"),queryFn:({signal:e})=>Gjn(e),staleTime:3e4}),f0=()=>({queryKey:Mt("getUiState"),queryFn:({signal:e})=>Wjn(e),staleTime:3e5}),oS=e=>({queryKey:Mt("getProjectUiState",e),queryFn:({signal:r})=>Kjn(e,r),staleTime:3e5}),Vm=(e="")=>({queryKey:Mt("getProjectPathStatus",e),queryFn:({signal:r})=>Zjn(e,r),staleTime:3e4}),uI=e=>({queryKey:Mt("searchPapers",e),queryFn:({signal:r})=>rSn(e,r),staleTime:3e5}),h7n=()=>({queryKey:Mt("githubAccount"),queryFn:({signal:e})=>nSn(e),staleTime:3e5}),p7n=e=>({queryKey:Mt("githubProjectRepoPreview",e),queryFn:({signal:r})=>sSn(e,r),staleTime:3e4}),$N=(e,r)=>({queryKey:Mt("repoAccess",e,r),queryFn:({signal:t})=>oSn(e,r,t),staleTime:3e4}),S3=e=>({queryKey:Mt("resolvePaper",e),queryFn:({signal:r})=>aSn(e,r),staleTime:36e5}),m7n=(e,r,t,n)=>({queryKey:Mt("getProjectStarterPrompts",e,r,t,n),queryFn:({signal:s})=>lSn(e,r,t,n,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),kb=e=>({queryKey:Mt("listExperiments",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,()=>uSn(e,r),i0),staleTime:3e4}),d_=e=>({queryKey:Mt("listRuns",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,()=>fSn(e,r),i0),staleTime:3e4});function Bv(e,r){if(!e)return;const t=e.find(n=>n.id===r.id);return t&&t.updatedAt>r.updatedAt?e:t?e.map(n=>n.id===r.id?r:n):[...e,r]}function DN(){const e=Si();return o7n({onRun(r){var n;if(!Wr(e))return;const t=(n=Je.getQueryData(d_(r.projectId).queryKey))==null?void 0:n.find(s=>s.id===r.id);yi(Je,d_(r.projectId).queryKey,r.id),Je.setQueryData(d_(r.projectId).queryKey,s=>Bv(s,r)),(t==null?void 0:t.commitSha)!==r.commitSha&&($a(["getRunDiff"],e,s=>s.queryKey[3]===r.id),$a(["getExperimentDiff"],e,s=>s.queryKey[3]===r.experimentId)),j3.onRun(r)},onExperiment(r){Wr(e)&&(yi(Je,kb(r.projectId).queryKey,r.id),Je.setQueryData(kb(r.projectId).queryKey,t=>Bv(t,r)),$a(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===r.projectId),$a(["getExperimentDiff"],e,t=>t.queryKey[3]===r.id),$a(["getRunDiff"],e,t=>{var n;return((n=Je.getQueryData(d_(r.projectId).queryKey))==null?void 0:n.some(s=>s.experimentId===r.id&&s.id===t.queryKey[3]))??!1}))},onProject(r){Wr(e)&&(yi(Je,Vf().queryKey,r.id),Je.setQueryData(Vf().queryKey,t=>Bv(t,r)))},onArtifacts(r){Wr(e)&&($a(Mj,e,t=>t.queryKey[3]===r),$a(["resolvedFile"],e,t=>t.queryKey[3]===r&&t.queryKey[5]==="artifacts"))},onReconnect(){Wr(e)&&($a(vX,e),j3.onReconnect())}}),T.useEffect(()=>{let r,t;const n=()=>{t??(t=setTimeout(()=>{t=void 0,$a(["listSidebarChatSessions"],e)},100))},o=QCn(()=>{r??(r=setTimeout(()=>{r=void 0,$a(["listProjectActivity"],e)},100))}),a=sI(_=>{_.type==="done"&&$a(["getDataDir"],e)}),i=hg(_=>{if(Wr(e)){if((_.type==="session"||_.type==="sessionDeleted")&&n(),_.type==="session"?yi(Je,So(_.session.projectId).queryKey,_.session.id):(_.type==="busy"||_.type==="usage")&&yi(Je,[...e,"listChatSessions"],_.sessionId),(_.type==="message"||_.type==="queued"||_.type==="branch")&&lI("",_.type==="message"?{type:"upsertMessage",sessionId:_.sessionId,message:_.message}:_.type==="queued"?{type:"setQueued",sessionId:_.sessionId,items:_.items}:{type:"activeLeaf",sessionId:_.sessionId,leafId:_.activeLeafId},!0),_.type==="session"&&!Pc.has(_.session.id))Je.setQueryData(So(_.session.projectId).queryKey,p=>{if(!p)return;const m=p.find(k=>k.id===_.session.id);return m?Bv(p,{..._.session,contextUsage:_.session.contextUsage??m.contextUsage}):[_.session,...p]});else if(_.type==="sessionDeleted")by(_.sessionId);else if(_.type==="busy"||_.type==="usage"){const p=m=>m.id!==_.sessionId?m:_.type==="busy"?{...m,busy:_.busy}:{...m,contextUsage:_.usage};Je.setQueriesData({queryKey:[...e,"listChatSessions"]},m=>m==null?void 0:m.map(p)),Je.setQueriesData({queryKey:[...e,"listSidebarChatSessions"]},m=>m&&{...m,pages:m.pages.map(k=>({...k,sessions:k.sessions.map(p)}))})}}}),c=XCn(({harness:_})=>{Wr(e)&&(_==="*"?Kf(!0):UCn(_)).catch(()=>{})}),u=YCn(()=>{Wr(e)&&Je.fetchQuery({...su(),staleTime:0}).catch(()=>{})}),d=e7n(_=>{Wr(e)&&(yi(Je,wb().queryKey),Je.setQueryData(wb().queryKey,_))});return()=>{clearTimeout(r),clearTimeout(t),o(),a(),i(),c(),u(),d()}},[e[1]]),null}const C3=new Set;function _I(e){if(e!==C()){cD(e,{reload:!1}),document.documentElement.lang=e;for(const r of C3)r()}}function g7n(e){return C3.add(e),()=>C3.delete(e)}function cu(){return T.useSyncExternalStore(g7n,C,C)}const ky="__ORX_MAC_TITLEBAR__"in window,fI="__ORX_WIN_TITLEBAR__"in window;let LN="system",IN="",P2=!1;const rh=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function PN(e){if(!rh)return null;rh.clearRect(0,0,1,1),rh.fillStyle="transparent",rh.fillStyle=e,rh.fillRect(0,0,1,1);const[r,t,n,s]=rh.getImageData(0,0,1,1).data;return s!==255?null:[r,t,n].map(o=>o.toString(16).padStart(2,"0")).join("")}function v7n(){const e=document.elementsFromPoint(window.innerWidth/2,0),r=e.findIndex(t=>t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY));for(const t of e.slice(Math.max(r,0))){const n=PN(getComputedStyle(t).backgroundColor);if(n)return n}return PN(getComputedStyle(document.documentElement).backgroundColor)}function z3(e){e&&(LN=e),!(!ky||P2)&&(P2=!0,setTimeout(()=>{var n;P2=!1;const r=v7n(),t=`titlebar:${LN}:${r}`;!r||t===IN||(IN=t,(n=window.ipc)==null||n.postMessage(t))},100))}ky&&(new MutationObserver(()=>z3()).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style","data-theme"]}),window.addEventListener("resize",()=>z3()));const b7n="a, button, input, select, textarea, label, summary, [role='button'], [role='tab'], [role='menuitem'], [role='option'], [role='switch'], [role='checkbox'], [contenteditable]:not([contenteditable='false']), [tabindex]:not([tabindex='-1'])",BN=ky?28:fI?32:0;if(BN){document.documentElement.classList.add(ky?"mac-titlebar":"win-titlebar");let e=!1;window.addEventListener("mousedown",r=>{var t;e=!1,!(r.button!==0||r.defaultPrevented||r.clientY>=BN)&&(r.target instanceof Element&&r.target.closest(b7n)||(r.detail===2?(t=window.ipc)==null||t.postMessage("titlebar:zoom"):e=!0))}),window.addEventListener("mousemove",r=>{var t;!e||r.buttons!==1||(e=!1,(t=window.ipc)==null||t.postMessage("titlebar:drag"))}),window.addEventListener("mouseup",()=>{e=!1})}const dI="orx:theme";function y7n(){try{const e=localStorage.getItem(dI);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Qf=y7n();const E3=new Set;function x7n(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function aS(){document.documentElement.dataset.theme=x7n(Qf),z3(Qf)}function hI(e){Qf=e;try{localStorage.setItem(dI,e)}catch{}aS();for(const r of E3)r()}function w7n(){return Qf}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Qf==="system"&&aS()});aS();function k7n(e){return E3.add(e),()=>E3.delete(e)}function pI(){return[T.useSyncExternalStore(k7n,()=>Qf,()=>Qf),hI]}const j7n=(e,r)=>{const t=new Array(e.length+r.length);for(let n=0;n({classGroupId:e,validator:r}),mI=(e=new Map,r=null,t)=>({nextPart:e,validators:r,classGroupId:t}),jb="-",FN=[],C7n="arbitrary..",z7n=e=>{const r=N7n(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return E7n(a);const i=a.split(jb),c=i[0]===""&&i.length>1?1:0;return gI(i,c,r)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=n[a],u=t[a];return c?u?j7n(u,c):c:u||FN}return t[a]||FN}}},gI=(e,r,t)=>{if(e.length-r===0)return t.classGroupId;const s=e[r],o=t.nextPart.get(s);if(o){const u=gI(e,r+1,o);if(u)return u}const a=t.validators;if(a===null)return;const i=r===0?e.join(jb):e.slice(r).join(jb),c=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),t=r.indexOf(":"),n=r.slice(0,t);return n?C7n+n:void 0})(),N7n=e=>{const{theme:r,classGroups:t}=e;return A7n(t,r)},A7n=(e,r)=>{const t=mI();for(const n in e){const s=e[n];iS(s,t,n,r)}return t},iS=(e,r,t,n)=>{const s=e.length;for(let o=0;o{if(typeof e=="string"){R7n(e,r,t);return}if(typeof e=="function"){M7n(e,r,t,n);return}O7n(e,r,t,n)},R7n=(e,r,t)=>{const n=e===""?r:vI(r,e);n.classGroupId=t},M7n=(e,r,t,n)=>{if($7n(e)){iS(e(n),r,t,n);return}r.validators===null&&(r.validators=[]),r.validators.push(S7n(t,e))},O7n=(e,r,t,n)=>{const s=Object.entries(e),o=s.length;for(let a=0;a{let t=e;const n=r.split(jb),s=n.length;for(let o=0;o"isThemeGetter"in e&&e.isThemeGetter===!0,D7n=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=Object.create(null),n=Object.create(null);const s=(o,a)=>{t[o]=a,r++,r>e&&(r=0,n=t,t=Object.create(null))};return{get(o){let a=t[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return s(o,a),a},set(o,a){o in t?t[o]=a:s(o,a)}}},N3="!",HN=":",L7n=[],qN=(e,r,t,n,s)=>({modifiers:e,hasImportantModifier:r,baseClassName:t,maybePostfixModifierPosition:n,isExternal:s}),I7n=e=>{const{prefix:r,experimentalParseClassName:t}=e;let n=s=>{const o=[];let a=0,i=0,c=0,u;const d=s.length;for(let x=0;xc?u-c:void 0;return qN(o,m,p,k)};if(r){const s=r+HN,o=n;n=a=>a.startsWith(s)?o(a.slice(s.length)):qN(L7n,!1,a,void 0,!0)}if(t){const s=n;n=o=>t({className:o,parseClassName:s})}return n},P7n=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((t,n)=>{r.set(t,1e6+n)}),t=>{const n=[];let s=[];for(let o=0;o0&&(s.sort(),n.push(...s),s=[]),n.push(a)):s.push(a)}return s.length>0&&(s.sort(),n.push(...s)),n}},B7n=e=>({cache:D7n(e.cacheSize),parseClassName:I7n(e),sortModifiers:P7n(e),postfixLookupClassGroupIds:F7n(e),...z7n(e)}),F7n=e=>{const r=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let n=0;n{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:o,postfixLookupClassGroupIds:a}=r,i=[],c=e.trim().split(H7n);let u="";for(let d=c.length-1;d>=0;d-=1){const _=c[d],{isExternal:p,modifiers:m,hasImportantModifier:k,baseClassName:x,maybePostfixModifierPosition:v}=t(_);if(p){u=_+(u.length>0?" "+u:u);continue}let b=!!v,w;if(b){const A=x.substring(0,v);w=n(A);const E=w&&a[w]?n(x):void 0;E&&E!==w&&(w=E,b=!1)}else w=n(x);if(!w){if(!b){u=_+(u.length>0?" "+u:u);continue}if(w=n(x),!w){u=_+(u.length>0?" "+u:u);continue}b=!1}const y=m.length===0?"":m.length===1?m[0]:o(m).join(":"),S=k?y+N3:y,z=S+w;if(i.indexOf(z)>-1)continue;i.push(z);const N=s(w,b);for(let A=0;A0?" "+u:u)}return u},U7n=(...e)=>{let r=0,t,n,s="";for(;r{if(typeof e=="string")return e;let r,t="";for(let n=0;n{let t,n,s,o;const a=c=>{const u=r.reduce((d,_)=>_(d),e());return t=B7n(u),n=t.cache.get,s=t.cache.set,o=i,i(c)},i=c=>{const u=n(c);if(u)return u;const d=q7n(c,t);return s(c,d),d};return o=a,(...c)=>o(U7n(...c))},G7n=[],Os=e=>{const r=t=>t[e]||G7n;return r.isThemeGetter=!0,r},yI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,W7n=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,K7n=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V7n=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Q7n=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,X7n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y7n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gu=e=>W7n.test(e),Sr=e=>!!e&&!Number.isNaN(Number(e)),kc=e=>!!e&&Number.isInteger(Number(e)),B2=e=>e.endsWith("%")&&Sr(e.slice(0,-1)),Dl=e=>K7n.test(e),wI=()=>!0,Z7n=e=>V7n.test(e)&&!Q7n.test(e),cS=()=>!1,J7n=e=>X7n.test(e),ezn=e=>Y7n.test(e),tzn=e=>!xt(e)&&!kt(e),rzn=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),nzn=e=>A_(e,SI,cS),xt=e=>yI.test(e),af=e=>A_(e,CI,Z7n),GN=e=>A_(e,_zn,Sr),szn=e=>A_(e,EI,wI),ozn=e=>A_(e,zI,cS),WN=e=>A_(e,kI,cS),azn=e=>A_(e,jI,ezn),Fv=e=>A_(e,NI,J7n),kt=e=>xI.test(e),xm=e=>dd(e,CI),izn=e=>dd(e,zI),KN=e=>dd(e,kI),czn=e=>dd(e,SI),lzn=e=>dd(e,jI),Hv=e=>dd(e,NI,!0),uzn=e=>dd(e,EI,!0),A_=(e,r,t)=>{const n=yI.exec(e);return n?n[1]?r(n[1]):t(n[2]):!1},dd=(e,r,t=!1)=>{const n=xI.exec(e);return n?n[1]?r(n[1]):t:!1},kI=e=>e==="position"||e==="percentage",jI=e=>e==="image"||e==="url",SI=e=>e==="length"||e==="size"||e==="bg-size",CI=e=>e==="length",_zn=e=>e==="number",zI=e=>e==="family-name",EI=e=>e==="number"||e==="weight",NI=e=>e==="shadow",VN=()=>{const e=Os("color"),r=Os("font"),t=Os("text"),n=Os("font-weight"),s=Os("tracking"),o=Os("leading"),a=Os("breakpoint"),i=Os("container"),c=Os("spacing"),u=Os("radius"),d=Os("shadow"),_=Os("inset-shadow"),p=Os("text-shadow"),m=Os("drop-shadow"),k=Os("blur"),x=Os("perspective"),v=Os("aspect"),b=Os("ease"),w=Os("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...S(),kt,xt],N=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],E=()=>[kt,xt,c],M=()=>[Gu,"full","auto",...E()],$=()=>[kc,"none","subgrid",kt,xt],D=()=>["auto",{span:["full",kc,kt,xt]},kc,kt,xt],I=()=>[kc,"auto",kt,xt],G=()=>["auto","min","max","fr",kt,xt],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...E()],J=()=>[Gu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],ee=()=>[Gu,"screen","full","dvw","lvw","svw","min","max","fit",...E()],P=()=>[Gu,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],L=()=>[e,kt,xt],F=()=>[...S(),KN,WN,{position:[kt,xt]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",czn,nzn,{size:[kt,xt]}],oe=()=>[B2,xm,af],ie=()=>["","none","full",u,kt,xt],ce=()=>["",Sr,xm,af],re=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Sr,B2,KN,WN],le=()=>["","none",k,kt,xt],me=()=>["none",Sr,kt,xt],be=()=>["none",Sr,kt,xt],Se=()=>[Sr,kt,xt],Be=()=>[Gu,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Dl],breakpoint:[Dl],color:[wI],container:[Dl],"drop-shadow":[Dl],ease:["in","out","in-out"],font:[tzn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Dl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Dl],shadow:[Dl],spacing:["px",Sr],text:[Dl],"text-shadow":[Dl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gu,xt,kt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",kt,xt]}],"container-named":[rzn],columns:[{columns:[Sr,xt,kt,i]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:z()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[kc,"auto",kt,xt]}],basis:[{basis:[Gu,"full","auto",i,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Sr,Gu,"auto","initial","none",xt]}],grow:[{grow:["",Sr,kt,xt]}],shrink:[{shrink:["",Sr,kt,xt]}],order:[{order:[kc,"first","last","none",kt,xt]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...ee()]}],"min-inline-size":[{"min-inline":["auto",...ee()]}],"max-inline-size":[{"max-inline":["none",...ee()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[i,"screen",...J()]}],"min-w":[{"min-w":[i,"screen","none",...J()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",t,xm,af]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,uzn,szn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",B2,xt]}],"font-family":[{font:[izn,ozn,r]}],"font-features":[{"font-features":[xt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,kt,xt]}],"line-clamp":[{"line-clamp":[Sr,"none",kt,GN]}],leading:[{leading:[o,...E()]}],"list-image":[{"list-image":["none",kt,xt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",kt,xt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Sr,"from-font","auto",kt,af]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Sr,"auto",kt,xt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"tab-size":[{tab:[kc,kt,xt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",kt,xt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",kt,xt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},kc,kt,xt],radial:["",kt,xt],conic:[kc,kt,xt]},lzn,azn]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Sr,kt,xt]}],"outline-w":[{outline:["",Sr,xm,af]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",d,Hv,Fv]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",_,Hv,Fv]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Sr,af]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,Hv,Fv]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Sr,kt,xt]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Sr]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[kt,xt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Sr]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",kt,xt]}],filter:[{filter:["","none",kt,xt]}],blur:[{blur:le()}],brightness:[{brightness:[Sr,kt,xt]}],contrast:[{contrast:[Sr,kt,xt]}],"drop-shadow":[{"drop-shadow":["","none",m,Hv,Fv]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Sr,kt,xt]}],"hue-rotate":[{"hue-rotate":[Sr,kt,xt]}],invert:[{invert:["",Sr,kt,xt]}],saturate:[{saturate:[Sr,kt,xt]}],sepia:[{sepia:["",Sr,kt,xt]}],"backdrop-filter":[{"backdrop-filter":["","none",kt,xt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Sr,kt,xt]}],"backdrop-contrast":[{"backdrop-contrast":[Sr,kt,xt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Sr,kt,xt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Sr,kt,xt]}],"backdrop-invert":[{"backdrop-invert":["",Sr,kt,xt]}],"backdrop-opacity":[{"backdrop-opacity":[Sr,kt,xt]}],"backdrop-saturate":[{"backdrop-saturate":[Sr,kt,xt]}],"backdrop-sepia":[{"backdrop-sepia":["",Sr,kt,xt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",kt,xt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Sr,"initial",kt,xt]}],ease:[{ease:["linear","initial",b,kt,xt]}],delay:[{delay:[Sr,kt,xt]}],animate:[{animate:["none",w,kt,xt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,kt,xt]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[kt,xt,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],zoom:[{zoom:[kc,kt,xt]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",kt,xt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",kt,xt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Sr,xm,af,GN]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fzn=(e,{cacheSize:r,prefix:t,experimentalParseClassName:n,extend:s={},override:o={}})=>(_h(e,"cacheSize",r),_h(e,"prefix",t),_h(e,"experimentalParseClassName",n),qv(e.theme,o.theme),qv(e.classGroups,o.classGroups),qv(e.conflictingClassGroups,o.conflictingClassGroups),qv(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),_h(e,"postfixLookupClassGroups",o.postfixLookupClassGroups),_h(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Uv(e.theme,s.theme),Uv(e.classGroups,s.classGroups),Uv(e.conflictingClassGroups,s.conflictingClassGroups),Uv(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),A3(e,s,"postfixLookupClassGroups"),A3(e,s,"orderSensitiveModifiers"),e),_h=(e,r,t)=>{t!==void 0&&(e[r]=t)},qv=(e,r)=>{if(r)for(const t in r)_h(e,t,r[t])},Uv=(e,r)=>{if(r)for(const t in r)A3(e,r,t)},A3=(e,r,t)=>{const n=r[t];n!==void 0&&(e[t]=e[t]?e[t].concat(n):n)},dzn=(e,...r)=>typeof e=="function"?UN(VN,e,...r):UN(()=>fzn(VN(),e),...r),hzn=dzn({extend:{theme:{text:["menu"]}}});function Ls(...e){return hzn(...e)}const pzn={default:"border-transparent bg-surface text-subtext",success:"border-accent-green bg-accent-green-subtle text-accent-green",error:"border-accent-red bg-accent-red-subtle text-accent-red",warning:"border-accent-amber bg-accent-amber-subtle text-accent-amber"};function Zt({variant:e="default",size:r="default",className:t,...n}){return f.jsx("span",{className:Ls("badge inline-flex items-center rounded-full border py-px font-sans",r==="small"?"px-1.5 text-xs font-normal":"px-2 text-sm font-medium",pzn[e],t),...n})}const mzn=["btn inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap border font-medium","transition-[background,border-color,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),gzn={default:"border-border bg-background text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight",primary:"border-primary bg-primary text-background [&:hover:not(:disabled)]:border-primary-hover [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:border-primary-active [&:active:not(:disabled)]:bg-primary-active",ghost:"border-transparent bg-transparent text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-muted",danger:"border-border bg-background text-accent-red [&:hover:not(:disabled)]:bg-danger-hover [&:active:not(:disabled)]:bg-danger-active",warning:"border-accent-amber bg-background text-accent-amber [&:hover:not(:disabled)]:bg-accent-amber-subtle [&:active:not(:disabled)]:bg-highlight"},vzn={default:"h-8 rounded-md px-3.5 text-sm",small:"h-7 rounded-sm px-2.5 text-sm",large:"h-14 rounded-lg px-7 text-xl"};function AI(e,r,t,n){return Ls(mzn,gzn[e],vzn[r],t&&"active",n)}function Oe({active:e=!1,variant:r="default",size:t="default",className:n,...s}){return f.jsx("button",{className:AI(r,t,e,n),...s})}function Xf({active:e=!1,variant:r="default",size:t="default",className:n,...s}){return f.jsx("a",{className:AI(r,t,e,n),...s})}const bzn=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),yzn={default:"text-subtext [&:hover:not(:disabled)]:bg-surface [&:hover:not(:disabled)]:text-text [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-primary",primary:"bg-primary text-background [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:bg-primary-active",stop:"bg-surface text-text [&:hover:not(:disabled)]:bg-stop-hover [&:active:not(:disabled)]:bg-highlight"},xzn={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function TI(e,r,t,n,s){return Ls(bzn,yzn[e],xzn[r],n==="circle"&&"rounded-full",t&&"active",s)}const Rt=T.forwardRef(function({active:r=!1,shape:t="rounded",size:n="default",variant:s="default",className:o,...a},i){return f.jsx("button",{ref:i,className:TI(s,n,r,t,o),...a})});function yp({active:e=!1,shape:r="rounded",size:t="default",variant:n="default",className:s,...o}){return f.jsx("a",{className:TI(n,t,e,r,s),...o})}const wzn={default:"h-8 rounded-md border border-border bg-background px-2.5 py-1.5 focus:border-text",inline:"h-8 rounded-none border-x-0 border-t-0 border-b border-transparent bg-transparent px-0 py-0 focus:border-text"};function Nn({variant:e="default",className:r,...t}){return f.jsx("input",{className:Ls("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",wzn[e],r),...t})}function _r({active:e=!1,danger:r=!1,size:t="default",className:n,...s}){return f.jsx("button",{className:Ls("model-item flex w-full items-center justify-between gap-2 rounded-sm px-2 text-start transition-[background,color] duration-120 ease-standard hover:bg-surface focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-45 [&_.model-id]:block [&_.model-id]:text-xs [&_.model-id]:text-muted",t==="compact"?"min-h-6 py-0.5 text-menu":"min-h-8 py-1.5 text-sm",e&&"bg-surface",r&&"text-accent-red hover:text-accent-red",n),...s})}function Nt({className:e,...r}){return f.jsx("span",{className:Ls("spinner h-[13px] w-[13px] shrink-0 animate-[spin_0.8s_linear_infinite] rounded-full border-2 border-border border-t-primary",e),...r})}function Gn({className:e,...r}){return f.jsx("div",{className:Ls("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...r})}const kzn={success:"text-accent-green",danger:"text-accent-red",info:"text-accent-teal",warning:"text-accent-amber",caution:"text-accent-orange",accent:"text-accent-purple",neutral:"text-muted"};function Eh({tone:e="neutral",live:r=!1,className:t,children:n,...s}){return f.jsxs("span",{className:Ls("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:Ls("h-[7px] w-[7px] shrink-0 rounded-full bg-current",kzn[e],r&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),n]})}const jzn=["relative h-5.5 w-9.5 flex-none rounded-full border border-border bg-panel","transition-[background,border-color] duration-120 ease-standard","[&_span]:absolute [&_span]:start-[3px] [&_span]:top-[3px] [&_span]:h-3.5 [&_span]:w-3.5","[&_span]:rounded-full [&_span]:bg-muted [&_span]:transition-[translate,background] [&_span]:duration-120 [&_span]:ease-standard","hover:border-border-strong","disabled:cursor-default disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2"].join(" ");function RI(e,r){return Ls(jzn,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",r)}function lS({checked:e=!1,className:r,children:t,...n}){return f.jsx("button",{role:"switch","aria-checked":e,className:RI(e,r),...n,children:t??f.jsx("span",{})})}function Szn({checked:e=!1,className:r,...t}){return f.jsx("span",{className:RI(e,r),...t,children:f.jsx("span",{})})}var Vs=S$();const Czn=n0(Vs);function zzn(e){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",r.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const Ezn=e=>{switch(e){case"success":return Tzn;case"info":return Mzn;case"warning":return Rzn;case"error":return Ozn;default:return null}},Nzn=Array(12).fill(0),Azn=({visible:e,className:r})=>st.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":e},st.createElement("div",{className:"sonner-spinner"},Nzn.map((t,n)=>st.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),Tzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Rzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Mzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Ozn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),$zn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},st.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),st.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Dzn=()=>{const[e,r]=st.useState(document.hidden);return st.useEffect(()=>{const t=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let Lzn=1;const Izn=100,QN=e=>{var r;return typeof(e==null?void 0:e.id)=="number"||(e==null||(r=e.id)==null?void 0:r.length)>0?e.id:Lzn++};class Pzn{constructor(){this.subscribe=r=>(this.subscribers.push(r),this.getActiveToasts().forEach(t=>r(t)),()=>{const t=this.subscribers.indexOf(r);this.subscribers.splice(t,1)}),this.publish=r=>{this.subscribers.forEach(t=>t(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r],this.trimHistory()},this.trimHistory=()=>{let r=this.toasts.length-Izn;r<=0||(this.toasts=this.toasts.filter(t=>r>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),r--,!1):!0))},this.create=r=>{const{message:t,...n}=r,s=QN(r),o=this.pendingDismissals.get(s);o!==void 0&&(cancelAnimationFrame(o),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const a=this.dismissedToasts.has(s),i=r.dismissible===void 0?!0:r.dismissible;return a&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(u=>u.id!==s)),(a?void 0:this.toasts.find(u=>u.id===s))?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...r,id:s,title:t}),{...u,...r,id:s,dismissible:i,title:t}):u):this.addToast({title:t,...n,dismissible:i,id:s}),s},this.dismiss=r=>{if(r==null)return this.getActiveToasts().forEach(n=>{this.dismissedToasts.add(n.id),this.subscribers.forEach(s=>s({id:n.id,dismiss:!0}))}),r;this.dismissedToasts.add(r);const t=this.pendingDismissals.get(r);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(r,requestAnimationFrame(()=>{this.pendingDismissals.delete(r),this.subscribers.forEach(n=>n({id:r,dismiss:!0}))})),r},this.message=(r,t)=>this.create({...t,message:r,type:void 0}),this.error=(r,t)=>this.create({...t,message:r,type:"error"}),this.success=(r,t)=>this.create({...t,type:"success",message:r}),this.info=(r,t)=>this.create({...t,type:"info",message:r}),this.warning=(r,t)=>this.create({...t,type:"warning",message:r}),this.loading=(r,t)=>this.create({...t,type:"loading",message:r}),this.promise=(r,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:r,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(r instanceof Function?r():r);let o=n!==void 0,a;const i=s.then(async u=>{if(a=["resolve",u],st.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(Fzn(u)&&!u.ok){o=!1;const _=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"error",description:p,...k})}else if(u instanceof Error){o=!1;const _=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"error",description:p,...k})}else if(t.success!==void 0){o=!1;const _=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"success",description:p,...k})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){o=!1;const d=typeof t.error=="function"?await t.error(u):t.error,_=typeof t.description=="function"?await t.description(u):t.description,m=typeof d=="object"&&!st.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:_,...m})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((u,d)=>i.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(r,t)=>{const n=QN(t);return this.create({...t,jsx:r(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const ha=new Pzn,Bzn=(e,r)=>ha.message(e,r),Fzn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Hzn=Bzn,qzn=()=>ha.toasts,Uzn=()=>ha.getActiveToasts(),Gzn=Object.assign(Hzn,{success:ha.success,info:ha.info,warning:ha.warning,error:ha.error,custom:ha.custom,message:ha.message,promise:ha.promise,dismiss:ha.dismiss,loading:ha.loading},{getHistory:qzn,getToasts:Uzn});zzn("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Gv(e){return e.label!==void 0}const Wzn=3,Kzn="24px",Vzn="16px",XN=4e3,Qzn=356,Xzn=14,Yzn=45,Zzn=200;function jc(...e){return e.filter(Boolean).join(" ")}function Jzn(e){const[r,t]=e.split("-"),n=[];return r&&n.push(r),t&&n.push(t),n}const e8n=e=>{var r,t,n,s,o,a,i,c,u;const{invert:d,toast:_,unstyled:p,interacting:m,setHeights:k,visibleToasts:x,heights:v,index:b,toasts:w,expanded:y,removeToast:S,defaultRichColors:z,closeButton:N,style:A,cancelButtonStyle:E,actionButtonStyle:M,className:$="",descriptionClassName:D="",duration:I,position:G,gap:H,expandByDefault:Q,classNames:K,icons:J,closeButtonAriaLabel:ee="Close toast"}=e,[P,L]=st.useState(null),[F,q]=st.useState(null),[U,oe]=st.useState(!1),[ie,ce]=st.useState(!1),[re,W]=st.useState(!1),[ae,le]=st.useState(!1),[me,be]=st.useState(!1),[Se,Be]=st.useState(0),[Xe,Me]=st.useState(0),Fe=st.useRef(_.duration||I||XN),pt=st.useRef(null),Ct=st.useRef(null),Vt=b===0,Ut=b+1<=x,Gt=_.type,De=Gt??"default",ct=_.dismissible!==!1,lt=_.className||"",xe=_.descriptionClassName||"",Ie=st.useMemo(()=>v.findIndex(ut=>ut.toastId===_.id)||0,[v,_.id]),Ye=st.useMemo(()=>{var ut;return(ut=_.closeButton)!=null?ut:N},[_.closeButton,N]),Ae=st.useMemo(()=>_.duration||I||XN,[_.duration,I]),Ve=st.useRef(0),Ze=st.useRef(0),at=st.useRef(0),At=st.useRef(null),[Pe,Jt]=G.split("-"),Tt=st.useMemo(()=>v.reduce((ut,dr,Cr)=>Cr>=Ie?ut:ut+dr.height,0),[v,Ie]),Zr=Dzn(),cr=st.useMemo(()=>{var ut;return(ut=e.swipeDirections)!=null?ut:Jzn(G)},[e.swipeDirections,G]),nr=_.invert||d,Wt=Gt==="loading";Ze.current=st.useMemo(()=>Ie*H+Tt,[Ie,Tt]),st.useEffect(()=>{Fe.current=Ae},[Ae]),st.useEffect(()=>{oe(!0)},[]),st.useEffect(()=>{const ut=Ct.current;if(ut){const dr=ut.getBoundingClientRect().height;return Me(dr),k(Cr=>[{toastId:_.id,height:dr,position:_.position},...Cr]),()=>k(Cr=>Cr.filter($r=>$r.toastId!==_.id))}},[k,_.id]),st.useLayoutEffect(()=>{if(!U)return;const ut=Ct.current,dr=ut.style.height;ut.style.height="auto";const Cr=ut.getBoundingClientRect().height;ut.style.height=dr,Me(Cr),k($r=>$r.find(Br=>Br.toastId===_.id)?$r.map(Br=>Br.toastId===_.id?{...Br,height:Cr}:Br):[{toastId:_.id,height:Cr,position:_.position},...$r])},[U,_.title,_.description,k,_.id,_.jsx,_.action,_.cancel]);const wt=st.useCallback(()=>{ce(!0),Be(Ze.current),k(ut=>ut.filter(dr=>dr.toastId!==_.id)),setTimeout(()=>{S(_)},Zzn)},[_,S,k,Ze]);st.useEffect(()=>{if(_.promise&&Gt==="loading"||_.duration===1/0||_.type==="loading")return;let ut;return y||m||Zr?(()=>{if(at.current{Fe.current!==1/0&&(Ve.current=new Date().getTime(),ut=setTimeout(()=>{_.onAutoClose==null||_.onAutoClose.call(_,_),wt()},Fe.current))})(),()=>clearTimeout(ut)},[y,m,_,Gt,Zr,wt]),st.useEffect(()=>{_.delete&&(wt(),_.onDismiss==null||_.onDismiss.call(_,_))},[wt,_.delete]);function ns(){var ut;if(J!=null&&J.loading){var dr;return st.createElement("div",{className:jc(K==null?void 0:K.loader,_==null||(dr=_.classNames)==null?void 0:dr.loader,"sonner-loader"),"data-visible":Gt==="loading"},J.loading)}return st.createElement(Azn,{className:jc(K==null?void 0:K.loader,_==null||(ut=_.classNames)==null?void 0:ut.loader),visible:Gt==="loading"})}const Hr=_.icon||(J==null?void 0:J[Gt])||Ezn(Gt);var en,gr;return st.createElement("li",{tabIndex:0,ref:Ct,className:jc($,lt,K==null?void 0:K.toast,_==null||(r=_.classNames)==null?void 0:r.toast,K==null?void 0:K[De],_==null||(t=_.classNames)==null?void 0:t[De]),"data-sonner-toast":"","data-rich-colors":(en=_.richColors)!=null?en:z,"data-styled":!(_.jsx||_.unstyled||p),"data-mounted":U,"data-promise":!!_.promise,"data-swiped":me,"data-removed":ie,"data-visible":Ut,"data-y-position":Pe,"data-x-position":Jt,"data-index":b,"data-front":Vt,"data-swiping":re,"data-dismissible":ct,"data-type":Gt,"data-invert":nr,"data-swipe-out":ae,"data-swipe-direction":F,"data-expanded":!!(y||Q&&U),"data-testid":_.testId,style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${ie?Se:Ze.current}px`,"--initial-height":Q?"auto":`${Xe}px`,...A,..._.style},onDragEnd:()=>{W(!1),L(null),At.current=null},onPointerDown:ut=>{ut.button!==2&&(Wt||!ct||(pt.current=new Date,Be(Ze.current),ut.target.setPointerCapture(ut.pointerId),ut.target.tagName!=="BUTTON"&&(W(!0),At.current={x:ut.clientX,y:ut.clientY})))},onPointerUp:()=>{var ut,dr,Cr;if(ae||!ct)return;At.current=null;const $r=Number(((ut=Ct.current)==null?void 0:ut.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wn=Number(((dr=Ct.current)==null?void 0:dr.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Br=new Date().getTime()-((Cr=pt.current)==null?void 0:Cr.getTime()),yr=P==="x"?$r:wn,Dr=Math.abs(yr)/Br;if((P==="x"?cr.includes($r>0?"right":"left"):cr.includes(wn>0?"bottom":"top"))&&(Math.abs(yr)>=Yzn||Dr>.11)){Be(Ze.current),_.onDismiss==null||_.onDismiss.call(_,_),q(P==="x"?$r>0?"right":"left":wn>0?"down":"up"),wt(),le(!0);return}else{var Ht,tn;(Ht=Ct.current)==null||Ht.style.setProperty("--swipe-amount-x","0px"),(tn=Ct.current)==null||tn.style.setProperty("--swipe-amount-y","0px")}be(!1),W(!1),L(null)},onPointerMove:ut=>{var dr,Cr,$r;if(!At.current||!ct||((dr=window.getSelection())==null?void 0:dr.toString().length)>0)return;const Br=ut.clientY-At.current.y,yr=ut.clientX-At.current.x;!P&&(Math.abs(yr)>1||Math.abs(Br)>1)&&L(Math.abs(yr)>Math.abs(Br)?"x":"y");let Dr={x:0,y:0};const zt=Ht=>1/(1.5+Math.abs(Ht)/20);if(P==="y"){if(cr.includes("top")||cr.includes("bottom"))if(cr.includes("top")&&Br<0||cr.includes("bottom")&&Br>0)Dr.y=Br;else{const Ht=Br*zt(Br);Dr.y=Math.abs(Ht)0)Dr.x=yr;else{const Ht=yr*zt(yr);Dr.x=Math.abs(Ht)0||Math.abs(Dr.y)>0)&&be(!0),(Cr=Ct.current)==null||Cr.style.setProperty("--swipe-amount-x",`${Dr.x}px`),($r=Ct.current)==null||$r.style.setProperty("--swipe-amount-y",`${Dr.y}px`)}},Ye&&!_.jsx&&Gt!=="loading"?st.createElement("button",{"aria-label":ee,"data-disabled":Wt,"data-close-button":!0,onClick:Wt||!ct?()=>{}:()=>{wt(),_.onDismiss==null||_.onDismiss.call(_,_)},className:jc(K==null?void 0:K.closeButton,_==null||(n=_.classNames)==null?void 0:n.closeButton)},(gr=J==null?void 0:J.close)!=null?gr:$zn):null,(Gt||_.icon||_.promise)&&_.icon!==null&&((J==null?void 0:J[Gt])!==null||_.icon)?st.createElement("div",{"data-icon":"",className:jc(K==null?void 0:K.icon,_==null||(s=_.classNames)==null?void 0:s.icon)},Gt==="loading"?_.icon||ns():_.promise?ns():null,Gt!=="loading"?Hr:null):null,st.createElement("div",{"data-content":"",className:jc(K==null?void 0:K.content,_==null||(o=_.classNames)==null?void 0:o.content)},st.createElement("div",{"data-title":"",className:jc(K==null?void 0:K.title,_==null||(a=_.classNames)==null?void 0:a.title)},_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title),_.description?st.createElement("div",{"data-description":"",className:jc(D,xe,K==null?void 0:K.description,_==null||(i=_.classNames)==null?void 0:i.description)},typeof _.description=="function"?_.description():_.description):null),st.isValidElement(_.cancel)?_.cancel:_.cancel&&Gv(_.cancel)?st.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||E,onClick:ut=>{Gv(_.cancel)&&ct&&(_.cancel.onClick==null||_.cancel.onClick.call(_.cancel,ut),wt())},className:jc(K==null?void 0:K.cancelButton,_==null||(c=_.classNames)==null?void 0:c.cancelButton)},_.cancel.label):null,st.isValidElement(_.action)?_.action:_.action&&Gv(_.action)?st.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||M,onClick:ut=>{Gv(_.action)&&(_.action.onClick==null||_.action.onClick.call(_.action,ut),!ut.defaultPrevented&&wt())},className:jc(K==null?void 0:K.actionButton,_==null||(u=_.classNames)==null?void 0:u.actionButton)},_.action.label):null)};function YN(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function t8n(e,r){const t={};return[e,r].forEach((n,s)=>{const o=s===1,a=o?"--mobile-offset":"--offset",i=o?Vzn:Kzn;function c(u){["top","right","bottom","left"].forEach(d=>{t[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?t[`${a}-${u}`]=i:t[`${a}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):c(i)}),t}const r8n=st.forwardRef(function(r,t){const{id:n,invert:s,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:c,className:u,offset:d,mobileOffset:_,theme:p="light",richColors:m,duration:k,style:x,visibleToasts:v=Wzn,toastOptions:b,dir:w=YN(),gap:y=Xzn,icons:S,customAriaLabel:z,containerAriaLabel:N="Notifications"}=r,[A,E]=st.useState([]),M=st.useMemo(()=>n?A.filter(oe=>oe.toasterId===n):A.filter(oe=>!oe.toasterId),[A,n]),$=st.useMemo(()=>Array.from(new Set([o].concat(M.filter(oe=>oe.position).map(oe=>oe.position)))),[M,o]),[D,I]=st.useState([]),[G,H]=st.useState(!1),[Q,K]=st.useState(!1),[J,ee]=st.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),P=st.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=st.useRef(null),q=st.useRef(!1),U=st.useCallback(oe=>{E(ie=>{var ce;return(ce=ie.find(re=>re.id===oe.id))!=null&&ce.delete||ha.dismiss(oe.id),ie.filter(({id:re})=>re!==oe.id)})},[]);return st.useEffect(()=>ha.subscribe(oe=>{if(oe.dismiss){requestAnimationFrame(()=>{E(ie=>ie.map(ce=>ce.id===oe.id?{...ce,delete:!0}:ce))});return}setTimeout(()=>{Czn.flushSync(()=>{E(ie=>{const ce=ie.findIndex(re=>re.id===oe.id);return ce!==-1?[...ie.slice(0,ce),{...ie[ce],...oe},...ie.slice(ce+1)]:[oe,...ie]})})})}),[]),st.useEffect(()=>{if(p!=="system"){ee(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ee("dark"):ee("light")),typeof window>"u")return;const oe=window.matchMedia("(prefers-color-scheme: dark)");try{oe.addEventListener("change",({matches:ie})=>{ee(ie?"dark":"light")})}catch{oe.addListener(({matches:ce})=>{try{ee(ce?"dark":"light")}catch(re){console.error(re)}})}},[p]),st.useEffect(()=>{A.length<=1&&H(!1)},[A]),st.useEffect(()=>{const oe=ie=>{var ce;if(a.length>0&&a.every(ae=>ie[ae]||ie.code===ae)){var W;H(!0),(W=P.current)==null||W.focus()}ie.code==="Escape"&&(document.activeElement===P.current||(ce=P.current)!=null&&ce.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",oe),()=>document.removeEventListener("keydown",oe)},[a]),st.useEffect(()=>{if(P.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,q.current=!1)}},[P.current]),st.createElement("section",{ref:t,"aria-label":z??`${N} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},$.map((oe,ie)=>{var ce;const[re,W]=oe.split("-");return M.length?st.createElement("ol",{key:oe,dir:w==="auto"?YN():w,tabIndex:-1,ref:P,className:u,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":re,"data-x-position":W,style:{"--front-toast-height":`${((ce=D[0])==null?void 0:ce.height)||0}px`,"--width":`${Qzn}px`,"--gap":`${y}px`,...x,...t8n(d,_)},onBlur:ae=>{q.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(q.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||q.current||(q.current=!0,F.current=ae.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Q||H(!1)},onDragEnd:()=>H(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},M.filter(ae=>!ae.position&&ie===0||ae.position===oe).map((ae,le)=>{var me,be;return st.createElement(e8n,{key:ae.id,icons:S,index:le,toast:ae,defaultRichColors:m,duration:(me=b==null?void 0:b.duration)!=null?me:k,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(be=b==null?void 0:b.closeButton)!=null?be:c,interacting:Q,position:oe,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:U,toasts:M.filter(Se=>Se.position==ae.position),heights:D.filter(Se=>Se.position==ae.position),setHeights:I,expandByDefault:i,gap:y,expanded:G,swipeDirections:r.swipeDirections})})):null}))});function n8n(e){const[r]=pI();return f.jsx(r8n,{theme:r,...e})}function tr(e,r,t){Gzn[r](e,{duration:r==="warning"||r==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function d0({content:e,children:r,className:t,interactive:n=!1}){const s=T.useRef(null),o=T.useRef(null);function a(){const c=s.current,u=o.current;if(!c||!u)return;u.matches(":popover-open")||u.showPopover();const d=c.getBoundingClientRect(),_=u.getBoundingClientRect(),p=Math.max(8,Math.min(d.left+d.width/2-_.width/2,window.innerWidth-_.width-8));u.style.left=`${p}px`,u.style.top=`${Math.max(8,d.top-_.height-6)}px`}function i(){var u;const c=s.current;!(c!=null&&c.matches(":hover, :focus-visible"))&&!(c!=null&&c.querySelector(":focus-visible"))&&((u=o.current)==null||u.hidePopover())}return T.useEffect(()=>{const c=()=>{var u;return(u=o.current)==null?void 0:u.hidePopover()};return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[]),f.jsxs("span",{ref:s,className:Ls("group relative inline-flex cursor-help rounded-full outline-none focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2",t),tabIndex:n?void 0:0,role:n?void 0:"img","aria-label":n?void 0:e,onMouseEnter:a,onMouseLeave:i,onFocus:c=>{c.target.matches(":focus-visible")&&a()},onBlur:i,onKeyDown:c=>{var u;c.key==="Escape"&&((u=o.current)!=null&&u.matches(":popover-open"))&&(c.preventDefault(),c.stopPropagation(),o.current.hidePopover())},children:[r,f.jsx("span",{ref:o,popover:"manual",role:"tooltip",className:"pointer-events-none fixed inset-auto m-0 w-max max-w-64 whitespace-normal rounded-sm border-0 bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background shadow-control-subtle",children:e})]})}const s8n=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function xp(e,r,t="[data-initial-focus]"){const n=T.useRef(r);n.current=r,T.useEffect(()=>{const s=e.current;if(!s)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll(s8n)];(s.querySelector(t)??a()[0]??s).focus();const i=c=>{if(c.key==="Escape"){if(s.querySelector(":popover-open"))return;c.preventDefault(),c.stopPropagation(),n.current();return}if(c.key!=="Tab")return;const u=a(),d=u[0],_=u.at(-1);!d||!_?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===d?(c.preventDefault(),_.focus()):!c.shiftKey&&document.activeElement===_&&(c.preventDefault(),d.focus())};return document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("keydown",i,!0),o==null||o.focus()}},[e,t])}function MI({host:e,preview:r,currentClientAttached:t,stopping:n,onClose:s,onConfirm:o}){const a=T.useRef(null),i=Math.max(0,r.attachmentCount-(t?1:0)),c=[];return r.activeTurnCount>0&&c.push(r.activeTurnCount===1?ddr():qdr({count:fr(r.activeTurnCount)})),r.pendingPermissionCount>0&&c.push(r.pendingPermissionCount===1?zfr():w_r({count:fr(r.pendingPermissionCount)})),i>0&&c.push(i===1?Kfr():kdr({count:fr(i)})),r.queuedMessageCount>0&&c.push(r.queuedMessageCount===1?ndr():Mdr({count:fr(r.queuedMessageCount)})),r.activeRunCount>0&&c.push(r.activeRunCount===1?Lfr():Z_r({count:fr(r.activeRunCount)})),xp(a,s),Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:u=>{!n&&u.target===u.currentTarget&&s()},children:f.jsxs("div",{ref:a,className:"w-120 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-stop-dialog-title","aria-describedby":c.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[f.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:H_r({host:Ee(e)})}),c.length>0&&f.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[f.jsx("p",{className:"m-0 font-medium",children:gfr()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:c.map(u=>f.jsx("li",{children:u},u))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx(Oe,{disabled:n,onClick:s,children:Gf()}),f.jsx(Oe,{variant:"danger",disabled:n,onClick:o,children:n?Jdr():R_r()})]})]})}),document.body)}/** +Magazyn danych zostanie skopiowany do nowej lokalizacji i tam aktywowany. Trwające uruchomienia lub czaty uniemożliwią przeniesienie.`,vhn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?uhn(e):t==="fa"?_hn(e):t==="ar"?fhn(e):t==="es"?dhn(e):t==="hi"?hhn(e):t==="ko"?phn(e):t==="ja"?mhn(e):t==="pl"?ghn(e):lhn(e)}),bhn=()=>"Move data here",yhn=()=>"将数据移动到此处",xhn=()=>"انتقال داده به اینجا",whn=()=>"نقل البيانات إلى هنا",khn=()=>"Mover los datos aquí",jhn=()=>"डेटा यहाँ ले जाएं",Shn=()=>"여기로 데이터 이동",Chn=()=>"ここにデータを移動",zhn=()=>"Przenieś dane tutaj",Ehn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?yhn():t==="fa"?xhn():t==="ar"?whn():t==="es"?khn():t==="hi"?jhn():t==="ko"?Shn():t==="ja"?Chn():t==="pl"?zhn():bhn()}),Nhn=()=>"Moving…",Ahn=()=>"正在移动…",Thn=()=>"در حال جابه‌جایی…",Rhn=()=>"جارٍ النقل…",Mhn=()=>"Moviendo…",Ohn=()=>"स्थानांतरित हो रहा है…",$hn=()=>"이동 중…",Dhn=()=>"移動中…",Lhn=()=>"Przenoszenie…",Ihn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ahn():t==="fa"?Thn():t==="ar"?Rhn():t==="es"?Mhn():t==="hi"?Ohn():t==="ko"?$hn():t==="ja"?Dhn():t==="pl"?Lhn():Nhn()}),Phn=()=>"Preparing…",Bhn=()=>"正在准备…",Fhn=()=>"در حال آماده‌سازی…",Hhn=()=>"جارٍ التحضير…",qhn=()=>"Preparando…",Uhn=()=>"तैयार हो रहा है…",Ghn=()=>"준비 중…",Whn=()=>"準備中…",Khn=()=>"Przygotowywanie…",Vhn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Bhn():t==="fa"?Fhn():t==="ar"?Hhn():t==="es"?qhn():t==="hi"?Uhn():t==="ko"?Ghn():t==="ja"?Whn():t==="pl"?Khn():Phn()}),Qhn=()=>" (same disk, instant)",Xhn=()=>"(同一磁盘,可立即完成)",Yhn=()=>" (روی همان دیسک، فوری)",Zhn=()=>" (القرص نفسه، فوري)",Jhn=()=>" (mismo disco, instantáneo)",epn=()=>" (उसी डिस्क पर, तुरंत)",tpn=()=>" (같은 디스크, 즉시 이동)",rpn=()=>"(同じディスク、即時)",npn=()=>" (ten sam dysk, natychmiastowo)",spn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xhn():t==="fa"?Yhn():t==="ar"?Zhn():t==="es"?Jhn():t==="hi"?epn():t==="ko"?tpn():t==="ja"?rpn():t==="pl"?npn():Qhn()}),opn=()=>"default location",apn=()=>"默认位置",ipn=()=>"محل پیش‌فرض",cpn=()=>"الموقع الافتراضي",lpn=()=>"ubicación predeterminada",upn=()=>"डिफ़ॉल्ट स्थान",_pn=()=>"기본 위치",fpn=()=>"既定の場所",dpn=()=>"domyślna lokalizacja",hpn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?apn():t==="fa"?ipn():t==="ar"?cpn():t==="es"?lpn():t==="hi"?upn():t==="ko"?_pn():t==="ja"?fpn():t==="pl"?dpn():opn()}),ppn=()=>"ORX_DATA_DIR environment variable",mpn=()=>"ORX_DATA_DIR 环境变量",gpn=()=>"متغیر محیطی ORX_DATA_DIR",vpn=()=>"متغيّر البيئة ORX_DATA_DIR",bpn=()=>"variable de entorno ORX_DATA_DIR",ypn=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",xpn=()=>"ORX_DATA_DIR 환경 변수",wpn=()=>"ORX_DATA_DIR 環境変数",kpn=()=>"Zmienna środowiskowa ORX_DATA_DIR",jpn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mpn():t==="fa"?gpn():t==="ar"?vpn():t==="es"?bpn():t==="hi"?ypn():t==="ko"?xpn():t==="ja"?wpn():t==="pl"?kpn():ppn()}),Spn=()=>"your saved setting",Cpn=()=>"已保存的设置",zpn=()=>"تنظیم ذخیره‌شدهٔ شما",Epn=()=>"إعدادك المحفوظ",Npn=()=>"tu ajuste guardado",Apn=()=>"आपकी सेव की गई सेटिंग",Tpn=()=>"저장한 설정",Rpn=()=>"保存済みの設定",Mpn=()=>"zapisane ustawienie",Opn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cpn():t==="fa"?zpn():t==="ar"?Epn():t==="es"?Npn():t==="hi"?Apn():t==="ko"?Tpn():t==="ja"?Rpn():t==="pl"?Mpn():Spn()}),$pn=()=>"XDG_DATA_HOME",Dpn=()=>"XDG_DATA_HOME",Lpn=()=>"XDG_DATA_HOME",Ipn=()=>"XDG_DATA_HOME",Ppn=()=>"XDG_DATA_HOME",Bpn=()=>"XDG_DATA_HOME",Fpn=()=>"XDG_DATA_HOME",Hpn=()=>"XDG_DATA_HOME",qpn=()=>"XDG_DATA_HOME",Upn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dpn():t==="fa"?Lpn():t==="ar"?Ipn():t==="es"?Ppn():t==="hi"?Bpn():t==="ko"?Fpn():t==="ja"?Hpn():t==="pl"?qpn():$pn()}),Gpn=()=>"Verifying…",Wpn=()=>"正在验证…",Kpn=()=>"در حال بررسی…",Vpn=()=>"جارٍ التحقق…",Qpn=()=>"Verificando…",Xpn=()=>"सत्यापित हो रहा है…",Ypn=()=>"검증 중…",Zpn=()=>"検証中…",Jpn=()=>"Weryfikowanie…",emn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wpn():t==="fa"?Kpn():t==="ar"?Vpn():t==="es"?Qpn():t==="hi"?Xpn():t==="ko"?Ypn():t==="ja"?Zpn():t==="pl"?Jpn():Gpn()}),tmn=()=>"Loading…",rmn=()=>"正在加载…",nmn=()=>"در حال بارگیری…",smn=()=>"جارٍ التحميل…",omn=()=>"Cargando…",amn=()=>"लोड हो रहा है…",imn=()=>"불러오는 중…",cmn=()=>"読み込み中…",lmn=()=>"Wczytywanie…",AL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rmn():t==="fa"?nmn():t==="ar"?smn():t==="es"?omn():t==="hi"?amn():t==="ko"?imn():t==="ja"?cmn():t==="pl"?lmn():tmn()}),umn=()=>"This sub-agent is no longer available.",_mn=()=>"此子智能体已不可用。",fmn=()=>"این عامل فرعی دیگر در دسترس نیست.",dmn=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",hmn=()=>"Este subagente ya no está disponible.",pmn=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",mmn=()=>"이 하위 에이전트는 더 이상 사용할 수 없습니다.",gmn=()=>"このサブエージェントはもう利用できません。",vmn=()=>"Ten podagent nie jest już dostępny.",bmn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?_mn():t==="fa"?fmn():t==="ar"?dmn():t==="es"?hmn():t==="hi"?pmn():t==="ko"?mmn():t==="ja"?gmn():t==="pl"?vmn():umn()}),ymn=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,xmn=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,wmn=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,kmn=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,jmn=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,Smn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,Cmn=e=>`${e==null?void 0:e.label} (미리보기; 더블 클릭 또는 Command/Control K 다음 Enter로 열린 상태 유지)`,zmn=e=>`${e==null?void 0:e.label}(プレビュー。ダブルクリック、または Command/Control K の後に Enter で開いたままにする)`,Emn=e=>`${e==null?void 0:e.label} (podgląd; kliknij dwukrotnie lub naciśnij Command/Control K, a następnie Enter, aby pozostawić otwarte)`,Nmn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?xmn(e):t==="fa"?wmn(e):t==="ar"?kmn(e):t==="es"?jmn(e):t==="hi"?Smn(e):t==="ko"?Cmn(e):t==="ja"?zmn(e):t==="pl"?Emn(e):ymn(e)}),Amn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,Tmn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,Rmn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,Mmn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,Omn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,$mn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,Dmn=e=>`${e==null?void 0:e.label} (더블 클릭 또는 ⌘/Ctrl+K Enter로 열린 상태 유지)`,Lmn=e=>`${e==null?void 0:e.label}(ダブルクリックまたは ⌘/Ctrl+K Enter で開いたままにする)`,Imn=e=>`${e==null?void 0:e.label} (kliknij dwukrotnie lub naciśnij ⌘/Ctrl+K, Enter, aby pozostawić otwarte)`,Pmn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Tmn(e):t==="fa"?Rmn(e):t==="ar"?Mmn(e):t==="es"?Omn(e):t==="hi"?$mn(e):t==="ko"?Dmn(e):t==="ja"?Lmn(e):t==="pl"?Imn(e):Amn(e)}),Bmn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",Fmn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",Hmn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",qmn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",Umn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",Gmn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",Wmn=()=>"또는 에이전트에게 LaTeX 템플릿 추가를 요청하세요.",Kmn=()=>"エージェントに LaTeX テンプレートの追加を依頼することもできます。",Vmn=()=>"Możesz też poprosić agenta o dodanie szablonu LaTeX.",Qmn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fmn():t==="fa"?Hmn():t==="ar"?qmn():t==="es"?Umn():t==="hi"?Gmn():t==="ko"?Wmn():t==="ja"?Kmn():t==="pl"?Vmn():Bmn()}),Xmn=()=>", a repo for training a mini-GPT from scratch.",Ymn=()=>",一个从零训练迷你 GPT 的仓库。",Zmn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",Jmn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",egn=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",tgn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",rgn=()=>", 작은 GPT를 처음부터 학습하는 저장소입니다.",ngn=()=>"という、小さな GPT をゼロから学習するリポジトリです。",sgn=()=>", repozytorium do trenowania mini-GPT od podstaw.",ogn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ymn():t==="fa"?Zmn():t==="ar"?Jmn():t==="es"?egn():t==="hi"?tgn():t==="ko"?rgn():t==="ja"?ngn():t==="pl"?sgn():Xmn()}),agn=()=>"Close",ign=()=>"关闭",cgn=()=>"بستن",lgn=()=>"إغلاق",ugn=()=>"Cerrar",_gn=()=>"बंद करें",fgn=()=>"닫기",dgn=()=>"閉じる",hgn=()=>"Zamknij",vb=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ign():t==="fa"?cgn():t==="ar"?lgn():t==="es"?ugn():t==="hi"?_gn():t==="ko"?fgn():t==="ja"?dgn():t==="pl"?hgn():agn()}),pgn=()=>"Create a new project",mgn=()=>"新建项目",ggn=()=>"ایجاد پروژهٔ جدید",vgn=()=>"إنشاء مشروع جديد",bgn=()=>"Crear un proyecto nuevo",ygn=()=>"नया प्रोजेक्ट बनाएं",xgn=()=>"새 프로젝트 만들기",wgn=()=>"新しいプロジェクトを作成",kgn=()=>"Utwórz nowy projekt",jgn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?mgn():t==="fa"?ggn():t==="ar"?vgn():t==="es"?bgn():t==="hi"?ygn():t==="ko"?xgn():t==="ja"?wgn():t==="pl"?kgn():pgn()}),Sgn=()=>"Demo project",Cgn=()=>"演示项目",zgn=()=>"پروژهٔ نمایشی",Egn=()=>"مشروع توضيحي",Ngn=()=>"Proyecto de demostración",Agn=()=>"डेमो प्रोजेक्ट",Tgn=()=>"데모 프로젝트",Rgn=()=>"デモプロジェクト",Mgn=()=>"Projekt demonstracyjny",Ogn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Cgn():t==="fa"?zgn():t==="ar"?Egn():t==="es"?Ngn():t==="hi"?Agn():t==="ko"?Tgn():t==="ja"?Rgn():t==="pl"?Mgn():Sgn()}),$gn=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",Dgn=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Lgn=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Ign=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",Pgn=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Bgn=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",Fgn=()=>"에이전트 대화, 실험, 실행, 결과물을 살펴보고 OpenResearch에서 프로젝트가 구성되는 방식을 확인하세요.",Hgn=()=>"エージェントの会話、実験、実行、成果物を見て、OpenResearch でプロジェクトがどのように進むか確認してください。",qgn=()=>"Przejrzyj rozmowy z agentem, eksperymenty, uruchomienia i artefakty, aby zobaczyć, jak powstaje projekt w OpenResearch.",Ugn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Dgn():t==="fa"?Lgn():t==="ar"?Ign():t==="es"?Pgn():t==="hi"?Bgn():t==="ko"?Fgn():t==="ja"?Hgn():t==="pl"?qgn():$gn()}),Ggn=()=>"nanochat",Wgn=()=>"nanochat",Kgn=()=>"nanochat",Vgn=()=>"nanochat",Qgn=()=>"nanochat",Xgn=()=>"nanochat",Ygn=()=>"nanochat",Zgn=()=>"nanochat",Jgn=()=>"nanochat",e0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wgn():t==="fa"?Kgn():t==="ar"?Vgn():t==="es"?Qgn():t==="hi"?Xgn():t==="ko"?Ygn():t==="ja"?Zgn():t==="pl"?Jgn():Ggn()}),t0n=()=>"Try the demo experiment",r0n=()=>"试试演示实验",n0n=()=>"آزمایش نمایشی را امتحان کنید",s0n=()=>"جرّب التجربة التوضيحية",o0n=()=>"Probar el experimento de demostración",a0n=()=>"डेमो प्रयोग आज़माएं",i0n=()=>"데모 실험 체험",c0n=()=>"デモ実験を試す",l0n=()=>"Wypróbuj eksperyment demonstracyjny",u0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?r0n():t==="fa"?n0n():t==="ar"?s0n():t==="es"?o0n():t==="hi"?a0n():t==="ko"?i0n():t==="ja"?c0n():t==="pl"?l0n():t0n()}),_0n=()=>"Couldn’t save your progress. Try again.",f0n=()=>"无法保存进度。请重试。",d0n=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",h0n=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",p0n=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",m0n=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",g0n=()=>"진행 상황을 저장할 수 없습니다. 다시 시도하세요.",v0n=()=>"進捗を保存できませんでした。再試行してください。",b0n=()=>"Nie udało się zapisać postępu. Spróbuj ponownie.",y0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?f0n():t==="fa"?d0n():t==="ar"?h0n():t==="es"?p0n():t==="hi"?m0n():t==="ko"?g0n():t==="ja"?v0n():t==="pl"?b0n():_0n()}),x0n=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",w0n=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",k0n=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",j0n=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",S0n=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",C0n=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",z0n=()=>"OpenResearch의 작동 방식을 보여주는 데모 프로젝트입니다. 이 데모는 Andrej Karpathy의 다음 저장소를 사용합니다:",E0n=()=>"OpenResearch の動作を示すデモプロジェクトです。このデモでは Andrej Karpathy の次のリポジトリを使用しています:",N0n=()=>"To projekt demonstracyjny pokazujący działanie OpenResearch. Wykorzystuje projekt Andreja Karpathy’ego",A0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w0n():t==="fa"?k0n():t==="ar"?j0n():t==="es"?S0n():t==="hi"?C0n():t==="ko"?z0n():t==="ja"?E0n():t==="pl"?N0n():x0n()}),T0n=()=>"Welcome to OpenResearch",R0n=()=>"欢迎使用 OpenResearch",M0n=()=>"به OpenResearch خوش آمدید",O0n=()=>"مرحبًا بك في OpenResearch",$0n=()=>"Te damos la bienvenida a OpenResearch",D0n=()=>"OpenResearch में आपका स्वागत है",L0n=()=>"OpenResearch에 오신 것을 환영합니다",I0n=()=>"OpenResearch へようこそ",P0n=()=>"Witaj w OpenResearch",B0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?R0n():t==="fa"?M0n():t==="ar"?O0n():t==="es"?$0n():t==="hi"?D0n():t==="ko"?L0n():t==="ja"?I0n():t==="pl"?P0n():T0n()}),F0n=()=>"All experiments are archived. Turn on Show archived to view them.",H0n=()=>"所有实验均已归档。开启“显示已归档”即可查看。",q0n=()=>"همه آزمایش‌ها بایگانی شده‌اند. برای دیدنشان نمایش بایگانی‌شده‌ها را فعال کنید.",U0n=()=>"جميع التجارب مؤرشفة. فعّل إظهار المؤرشف لعرضها.",G0n=()=>"Todos los experimentos están archivados. Activa Mostrar archivados para verlos.",W0n=()=>"सभी प्रयोग संग्रहीत हैं। उन्हें देखने के लिए संग्रहीत दिखाएँ चालू करें।",K0n=()=>"모든 실험이 보관되었습니다. 보려면 보관된 실험 표시를 켜세요.",V0n=()=>"すべての実験がアーカイブされています。「アーカイブ済みを表示」を有効にして確認してください。",Q0n=()=>"Wszystkie eksperymenty są zarchiwizowane. Włącz „Pokaż zarchiwizowane”, aby je wyświetlić.",X0n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?H0n():t==="fa"?q0n():t==="ar"?U0n():t==="es"?G0n():t==="hi"?W0n():t==="ko"?K0n():t==="ja"?V0n():t==="pl"?Q0n():F0n()}),Y0n=()=>"Archive ancestors",Z0n=()=>"归档祖先节点",J0n=()=>"بایگانی نیاکان",evn=()=>"أرشفة الأسلاف",tvn=()=>"Archivar antepasados",rvn=()=>"पूर्वजों को संग्रहीत करें",nvn=()=>"상위 실험 보관",svn=()=>"祖先の実験をアーカイブ",ovn=()=>"Archiwizuj nadrzędne eksperymenty",avn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Z0n():t==="fa"?J0n():t==="ar"?evn():t==="es"?tvn():t==="hi"?rvn():t==="ko"?nvn():t==="ja"?svn():t==="pl"?ovn():Y0n()}),ivn=()=>"Archive descendants",cvn=()=>"归档后代节点",lvn=()=>"بایگانی نوادگان",uvn=()=>"أرشفة الفروع التابعة",_vn=()=>"Archivar descendientes",fvn=()=>"वंशजों को संग्रहीत करें",dvn=()=>"하위 실험 보관",hvn=()=>"子孫の実験をアーカイブ",pvn=()=>"Archiwizuj podrzędne eksperymenty",mvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?cvn():t==="fa"?lvn():t==="ar"?uvn():t==="es"?_vn():t==="hi"?fvn():t==="ko"?dvn():t==="ja"?hvn():t==="pl"?pvn():ivn()}),gvn=()=>"Manage",vvn=()=>"管理",bvn=()=>"مدیریت",yvn=()=>"إدارة",xvn=()=>"Gestionar",wvn=()=>"प्रबंधित करें",kvn=()=>"관리",jvn=()=>"管理",Svn=()=>"Zarządzaj",Cvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?vvn():t==="fa"?bvn():t==="ar"?yvn():t==="es"?xvn():t==="hi"?wvn():t==="ko"?kvn():t==="ja"?jvn():t==="pl"?Svn():gvn()}),zvn=e=>`Manage ${e==null?void 0:e.name}`,Evn=e=>`管理 ${e==null?void 0:e.name}`,Nvn=e=>`مدیریت ${e==null?void 0:e.name}`,Avn=e=>`إدارة ${e==null?void 0:e.name}`,Tvn=e=>`Gestionar ${e==null?void 0:e.name}`,Rvn=e=>`${e==null?void 0:e.name} प्रबंधित करें`,Mvn=e=>`${e==null?void 0:e.name} 관리`,Ovn=e=>`${e==null?void 0:e.name} を管理`,$vn=e=>`Zarządzaj eksperymentem ${e==null?void 0:e.name}`,yN=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Evn(e):t==="fa"?Nvn(e):t==="ar"?Avn(e):t==="es"?Tvn(e):t==="hi"?Rvn(e):t==="ko"?Mvn(e):t==="ja"?Ovn(e):t==="pl"?$vn(e):zvn(e)}),Dvn=()=>"Archive this experiment",Lvn=()=>"归档此实验",Ivn=()=>"بایگانی این آزمایش",Pvn=()=>"أرشفة هذه التجربة",Bvn=()=>"Archivar este experimento",Fvn=()=>"इस प्रयोग को संग्रहीत करें",Hvn=()=>"이 실험 보관",qvn=()=>"この実験をアーカイブ",Uvn=()=>"Archiwizuj ten eksperyment",Gvn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lvn():t==="fa"?Ivn():t==="ar"?Pvn():t==="es"?Bvn():t==="hi"?Fvn():t==="ko"?Hvn():t==="ja"?qvn():t==="pl"?Uvn():Dvn()}),Wvn=()=>"Archived",Kvn=()=>"已归档",Vvn=()=>"بایگانی‌شده",Qvn=()=>"مؤرشف",Xvn=()=>"Archivado",Yvn=()=>"संग्रहीत",Zvn=()=>"보관됨",Jvn=()=>"アーカイブ済み",e1n=()=>"Zarchiwizowane",TL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Kvn():t==="fa"?Vvn():t==="ar"?Qvn():t==="es"?Xvn():t==="hi"?Yvn():t==="ko"?Zvn():t==="ja"?Jvn():t==="pl"?e1n():Wvn()}),t1n=e=>`${e==null?void 0:e.count} archived`,r1n=e=>`${e==null?void 0:e.count} 个已归档`,n1n=e=>`${e==null?void 0:e.count} بایگانی‌شده`,s1n=e=>`${e==null?void 0:e.count} مؤرشفة`,o1n=e=>`${e==null?void 0:e.count} archivados`,a1n=e=>`${e==null?void 0:e.count} संग्रहीत`,i1n=e=>`${e==null?void 0:e.count}개 보관됨`,c1n=e=>`${e==null?void 0:e.count} 件アーカイブ済み`,l1n=e=>`Zarchiwizowane: ${e==null?void 0:e.count}`,u1n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?r1n(e):t==="fa"?n1n(e):t==="ar"?s1n(e):t==="es"?o1n(e):t==="hi"?a1n(e):t==="ko"?i1n(e):t==="ja"?c1n(e):t==="pl"?l1n(e):t1n(e)}),_1n=()=>"Baseline",f1n=()=>"基线",d1n=()=>"مبنا",h1n=()=>"الأساس",p1n=()=>"Base",m1n=()=>"बेसलाइन",g1n=()=>"베이스라인",v1n=()=>"ベースライン",b1n=()=>"Wariant bazowy",y1n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?f1n():t==="fa"?d1n():t==="ar"?h1n():t==="es"?p1n():t==="hi"?m1n():t==="ko"?g1n():t==="ja"?v1n():t==="pl"?b1n():_1n()}),x1n=()=>"Experiment",w1n=()=>"实验",k1n=()=>"آزمایش",j1n=()=>"تجربة",S1n=()=>"Experimento",C1n=()=>"प्रयोग",z1n=()=>"실험",E1n=()=>"実験",N1n=()=>"Eksperyment",Fl=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w1n():t==="fa"?k1n():t==="ar"?j1n():t==="es"?S1n():t==="hi"?C1n():t==="ko"?z1n():t==="ja"?E1n():t==="pl"?N1n():x1n()}),A1n=e=>`${e==null?void 0:e.count} experiments`,T1n=e=>`${e==null?void 0:e.count} 个实验`,R1n=e=>`${e==null?void 0:e.count} آزمایش`,M1n=e=>`التجارب: ${e==null?void 0:e.count}`,O1n=e=>`${e==null?void 0:e.count} experimentos`,$1n=e=>`${e==null?void 0:e.count} प्रयोग`,D1n=e=>`실험 ${e==null?void 0:e.count}개`,L1n=e=>`${e==null?void 0:e.count} 件の実験`,I1n=e=>`Eksperymenty: ${e==null?void 0:e.count}`,P1n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T1n(e):t==="fa"?R1n(e):t==="ar"?M1n(e):t==="es"?O1n(e):t==="hi"?$1n(e):t==="ko"?D1n(e):t==="ja"?L1n(e):t==="pl"?I1n(e):A1n(e)}),B1n=()=>"hidden",F1n=()=>"已隐藏",H1n=()=>"پنهان",q1n=()=>"مخفية",U1n=()=>"ocultos",G1n=()=>"छिपे हुए",W1n=()=>"숨김",K1n=()=>"非表示",V1n=()=>"ukryte",Q1n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F1n():t==="fa"?H1n():t==="ar"?q1n():t==="es"?U1n():t==="hi"?G1n():t==="ko"?W1n():t==="ja"?K1n():t==="pl"?V1n():B1n()}),X1n=()=>"1 experiment",Y1n=()=>"1 个实验",Z1n=()=>"۱ آزمایش",J1n=()=>"تجربة واحدة",ebn=()=>"1 experimento",tbn=()=>"1 प्रयोग",rbn=()=>"실험 1개",nbn=()=>"1 件の実験",sbn=()=>"1 eksperyment",obn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y1n():t==="fa"?Z1n():t==="ar"?J1n():t==="es"?ebn():t==="hi"?tbn():t==="ko"?rbn():t==="ja"?nbn():t==="pl"?sbn():X1n()}),abn=()=>"Restore archived ancestors",ibn=()=>"恢复已归档的祖先节点",cbn=()=>"بازیابی نیاکان بایگانی‌شده",lbn=()=>"استعادة الأسلاف المؤرشفين",ubn=()=>"Restaurar antepasados archivados",_bn=()=>"संग्रहीत पूर्वजों को पुनर्स्थापित करें",fbn=()=>"보관된 상위 실험 복원",dbn=()=>"アーカイブ済みの祖先の実験を復元",hbn=()=>"Przywróć zarchiwizowane eksperymenty nadrzędne",pbn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ibn():t==="fa"?cbn():t==="ar"?lbn():t==="es"?ubn():t==="hi"?_bn():t==="ko"?fbn():t==="ja"?dbn():t==="pl"?hbn():abn()}),mbn=e=>`Restore ${e==null?void 0:e.count} archived experiments`,gbn=e=>`恢复 ${e==null?void 0:e.count} 个已归档实验`,vbn=e=>`بازیابی ${e==null?void 0:e.count} آزمایش بایگانی‌شده`,bbn=e=>`استعادة ${e==null?void 0:e.count} تجارب مؤرشفة`,ybn=e=>`Restaurar ${e==null?void 0:e.count} experimentos archivados`,xbn=e=>`${e==null?void 0:e.count} संग्रहीत प्रयोग पुनर्स्थापित करें`,wbn=e=>`보관된 실험 ${e==null?void 0:e.count}개 복원`,kbn=e=>`アーカイブ済みの実験を ${e==null?void 0:e.count} 件復元`,jbn=e=>`Przywróć zarchiwizowane eksperymenty (${e==null?void 0:e.count})`,Sbn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?gbn(e):t==="fa"?vbn(e):t==="ar"?bbn(e):t==="es"?ybn(e):t==="hi"?xbn(e):t==="ko"?wbn(e):t==="ja"?kbn(e):t==="pl"?jbn(e):mbn(e)}),Cbn=()=>"Restore descendants",zbn=()=>"恢复后代节点",Ebn=()=>"بازیابی نوادگان",Nbn=()=>"استعادة الفروع التابعة",Abn=()=>"Restaurar descendientes",Tbn=()=>"वंशजों को पुनर्स्थापित करें",Rbn=()=>"하위 실험 복원",Mbn=()=>"子孫の実験を復元",Obn=()=>"Przywróć eksperymenty podrzędne",$bn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zbn():t==="fa"?Ebn():t==="ar"?Nbn():t==="es"?Abn():t==="hi"?Tbn():t==="ko"?Rbn():t==="ja"?Mbn():t==="pl"?Obn():Cbn()}),Dbn=()=>"Restore this experiment",Lbn=()=>"恢复此实验",Ibn=()=>"بازیابی این آزمایش",Pbn=()=>"استعادة هذه التجربة",Bbn=()=>"Restaurar este experimento",Fbn=()=>"इस प्रयोग को पुनर्स्थापित करें",Hbn=()=>"이 실험 복원",qbn=()=>"この実験を復元",Ubn=()=>"Przywróć ten eksperyment",RL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lbn():t==="fa"?Ibn():t==="ar"?Pbn():t==="es"?Bbn():t==="hi"?Fbn():t==="ko"?Hbn():t==="ja"?qbn():t==="pl"?Ubn():Dbn()}),Gbn=()=>"Running",Wbn=()=>"运行中",Kbn=()=>"در حال اجرا",Vbn=()=>"قيد التشغيل",Qbn=()=>"En ejecución",Xbn=()=>"चल रहा है",Ybn=()=>"실행 중",Zbn=()=>"実行中",Jbn=()=>"W toku",eyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Wbn():t==="fa"?Kbn():t==="ar"?Vbn():t==="es"?Qbn():t==="hi"?Xbn():t==="ko"?Ybn():t==="ja"?Zbn():t==="pl"?Jbn():Gbn()}),tyn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",ryn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",nyn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",syn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",oyn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",ayn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",iyn=()=>"이 작업에서 실험 생성을 요청하거나 전체 프로젝트로 전환하여 모든 실험을 확인하세요.",cyn=()=>"このタスクで実験の作成を依頼するか、プロジェクト全体に切り替えてすべての実験を確認してください。",lyn=()=>"Poproś o utworzenie eksperymentu w tym zadaniu albo przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty.",uyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ryn():t==="fa"?nyn():t==="ar"?syn():t==="es"?oyn():t==="hi"?ayn():t==="ko"?iyn():t==="ja"?cyn():t==="pl"?lyn():tyn()}),_yn=()=>"Ask the agent in chat to create and run your first experiment.",fyn=()=>"在聊天中让智能体创建并运行你的第一个实验。",dyn=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",hyn=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",pyn=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",myn=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",gyn=()=>"채팅에서 에이전트에게 첫 실험의 생성과 실행을 요청하세요.",vyn=()=>"チャットでエージェントに最初の実験の作成と実行を依頼してください。",byn=()=>"Poproś agenta na czacie o utworzenie i uruchomienie pierwszego eksperymentu.",yyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fyn():t==="fa"?dyn():t==="ar"?hyn():t==="es"?pyn():t==="hi"?myn():t==="ko"?gyn():t==="ja"?vyn():t==="pl"?byn():_yn()}),xyn=()=>"Code",wyn=()=>"代码",kyn=()=>"کد",jyn=()=>"الشيفرة",Syn=()=>"Código",Cyn=()=>"कोड",zyn=()=>"코드",Eyn=()=>"コード",Nyn=()=>"Kod",Ayn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wyn():t==="fa"?kyn():t==="ar"?jyn():t==="es"?Syn():t==="hi"?Cyn():t==="ko"?zyn():t==="ja"?Eyn():t==="pl"?Nyn():xyn()}),Tyn=()=>"Logs",Ryn=()=>"日志",Myn=()=>"گزارش‌ها",Oyn=()=>"السجلات",$yn=()=>"Logs",Dyn=()=>"लॉग",Lyn=()=>"로그",Iyn=()=>"ログ",Pyn=()=>"Logi",ML=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Ryn():t==="fa"?Myn():t==="ar"?Oyn():t==="es"?$yn():t==="hi"?Dyn():t==="ko"?Lyn():t==="ja"?Iyn():t==="pl"?Pyn():Tyn()}),Byn=()=>"No experiments from the current task yet",Fyn=()=>"当前任务尚无实验",Hyn=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",qyn=()=>"لا توجد تجارب من المهمة الحالية بعد",Uyn=()=>"Aún no hay experimentos de la tarea actual",Gyn=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",Wyn=()=>"현재 작업에서 생성한 실험이 아직 없습니다",Kyn=()=>"現在のタスクの実験はまだありません",Vyn=()=>"Brak eksperymentów w bieżącym zadaniu",Qyn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fyn():t==="fa"?Hyn():t==="ar"?qyn():t==="es"?Uyn():t==="hi"?Gyn():t==="ko"?Wyn():t==="ja"?Kyn():t==="pl"?Vyn():Byn()}),Xyn=()=>"No experiments yet",Yyn=()=>"尚无实验",Zyn=()=>"هنوز آزمایشی وجود ندارد",Jyn=()=>"لا توجد تجارب بعد",exn=()=>"Aún no hay experimentos",txn=()=>"अभी तक कोई प्रयोग नहीं",rxn=()=>"아직 실험이 없습니다",nxn=()=>"実験はまだありません",sxn=()=>"Brak eksperymentów",oxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Yyn():t==="fa"?Zyn():t==="ar"?Jyn():t==="es"?exn():t==="hi"?txn():t==="ko"?rxn():t==="ja"?nxn():t==="pl"?sxn():Xyn()}),axn=()=>"no runs",ixn=()=>"无运行",cxn=()=>"بدون اجرا",lxn=()=>"لا عمليات تشغيل",uxn=()=>"sin ejecuciones",_xn=()=>"कोई रन नहीं",fxn=()=>"실행 없음",dxn=()=>"実行なし",hxn=()=>"brak uruchomień",pxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?ixn():t==="fa"?cxn():t==="ar"?lxn():t==="es"?uxn():t==="hi"?_xn():t==="ko"?fxn():t==="ja"?dxn():t==="pl"?hxn():axn()}),mxn=()=>"Open logs",gxn=()=>"打开日志",vxn=()=>"باز کردن گزارش‌ها",bxn=()=>"فتح السجلات",yxn=()=>"Abrir logs",xxn=()=>"लॉग खोलें",wxn=()=>"로그 열기",kxn=()=>"ログを開く",jxn=()=>"Otwórz logi",Sxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?gxn():t==="fa"?vxn():t==="ar"?bxn():t==="es"?yxn():t==="hi"?xxn():t==="ko"?wxn():t==="ja"?kxn():t==="pl"?jxn():mxn()}),Cxn=()=>"Runs",zxn=()=>"运行",Exn=()=>"اجراها",Nxn=()=>"عمليات التشغيل",Axn=()=>"Ejecuciones",Txn=()=>"रन",Rxn=()=>"실행",Mxn=()=>"実行",Oxn=()=>"Uruchomienia",$xn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?zxn():t==="fa"?Exn():t==="ar"?Nxn():t==="es"?Axn():t==="hi"?Txn():t==="ko"?Rxn():t==="ja"?Mxn():t==="pl"?Oxn():Cxn()}),Dxn=()=>"Switch to Entire project to see all experiments",Lxn=()=>"切换到“整个项目”以查看所有实验",Ixn=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",Pxn=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",Bxn=()=>"Cambia a Todo el proyecto para ver todos los experimentos",Fxn=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",Hxn=()=>"전체 프로젝트로 전환하여 모든 실험 보기",qxn=()=>"プロジェクト全体に切り替えてすべての実験を表示",Uxn=()=>"Przełącz na „Cały projekt”, aby zobaczyć wszystkie eksperymenty",Gxn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Lxn():t==="fa"?Ixn():t==="ar"?Pxn():t==="es"?Bxn():t==="hi"?Fxn():t==="ko"?Hxn():t==="ja"?qxn():t==="pl"?Uxn():Dxn()}),Wxn=e=>`OpenResearch ${e==null?void 0:e.version} is ready. Restart to switch to it.`,Kxn=e=>`OpenResearch ${e==null?void 0:e.version} 已就绪。重新启动即可切换。`,Vxn=e=>`OpenResearch ${e==null?void 0:e.version} آماده است. برای رفتن به آن دوباره راه‌اندازی کنید.`,Qxn=e=>`OpenResearch ${e==null?void 0:e.version} جاهز. أعد التشغيل للانتقال إليه.`,Xxn=e=>`OpenResearch ${e==null?void 0:e.version} está listo. Reinicia para cambiar a esta versión.`,Yxn=e=>`OpenResearch ${e==null?void 0:e.version} तैयार है। इस पर जाने के लिए फिर से शुरू करें।`,Zxn=e=>`OpenResearch ${e==null?void 0:e.version}이(가) 준비되었습니다. 전환하려면 다시 시작하세요.`,Jxn=e=>`OpenResearch ${e==null?void 0:e.version} の準備ができました。切り替えるには再起動してください。`,ewn=e=>`OpenResearch ${e==null?void 0:e.version} jest gotowy. Uruchom aplikację ponownie, aby przejść na nową wersję.`,twn=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?Kxn(e):t==="fa"?Vxn(e):t==="ar"?Qxn(e):t==="es"?Xxn(e):t==="hi"?Yxn(e):t==="ko"?Zxn(e):t==="ja"?Jxn(e):t==="pl"?ewn(e):Wxn(e)}),rwn=()=>"Dismiss",nwn=()=>"关闭",swn=()=>"بستن",own=()=>"تجاهل",awn=()=>"Descartar",iwn=()=>"खारिज करें",cwn=()=>"닫기",lwn=()=>"閉じる",uwn=()=>"Zamknij",_wn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?nwn():t==="fa"?swn():t==="ar"?own():t==="es"?awn():t==="hi"?iwn():t==="ko"?cwn():t==="ja"?lwn():t==="pl"?uwn():rwn()}),fwn=()=>"Restart now",dwn=()=>"立即重新启动",hwn=()=>"هم‌اکنون دوباره راه‌اندازی کن",pwn=()=>"أعد التشغيل الآن",mwn=()=>"Reiniciar ahora",gwn=()=>"अभी फिर से शुरू करें",vwn=()=>"지금 다시 시작",bwn=()=>"今すぐ再起動",ywn=()=>"Uruchom ponownie teraz",OL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?dwn():t==="fa"?hwn():t==="ar"?pwn():t==="es"?mwn():t==="hi"?gwn():t==="ko"?vwn():t==="ja"?bwn():t==="pl"?ywn():fwn()}),xwn=e=>`Could not restart: ${e==null?void 0:e.error}`,wwn=e=>`无法重新启动:${e==null?void 0:e.error}`,kwn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,jwn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,Swn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,Cwn=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,zwn=e=>`다시 시작할 수 없습니다: ${e==null?void 0:e.error}`,Ewn=e=>`再起動できませんでした: ${e==null?void 0:e.error}`,Nwn=e=>`Nie udało się uruchomić ponownie: ${e==null?void 0:e.error}`,$L=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?wwn(e):t==="fa"?kwn(e):t==="ar"?jwn(e):t==="es"?Swn(e):t==="hi"?Cwn(e):t==="ko"?zwn(e):t==="ja"?Ewn(e):t==="pl"?Nwn(e):xwn(e)}),Awn=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",Twn=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",Rwn=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",Mwn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",Own=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",$wn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",Dwn=()=>"업데이트된 OpenResearch가 제한 시간 내에 시작되지 않았습니다. 직접 다시 시작하세요.",Lwn=()=>"更新された OpenResearch が時間内に起動しませんでした。手動で再起動してください。",Iwn=()=>"Zaktualizowany OpenResearch nie uruchomił się na czas. Uruchom go ręcznie.",Pwn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Twn():t==="fa"?Rwn():t==="ar"?Mwn():t==="es"?Own():t==="hi"?$wn():t==="ko"?Dwn():t==="ja"?Lwn():t==="pl"?Iwn():Awn()}),Bwn=()=>"Restarting…",Fwn=()=>"正在重新启动…",Hwn=()=>"در حال راه‌اندازی مجدد…",qwn=()=>"جارٍ إعادة التشغيل…",Uwn=()=>"Reiniciando…",Gwn=()=>"फिर से शुरू हो रहा है…",Wwn=()=>"다시 시작 중…",Kwn=()=>"再起動中…",Vwn=()=>"Ponowne uruchamianie…",DL=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Fwn():t==="fa"?Hwn():t==="ar"?qwn():t==="es"?Uwn():t==="hi"?Gwn():t==="ko"?Wwn():t==="ja"?Kwn():t==="pl"?Vwn():Bwn()}),Qwn=()=>"macOS app",Xwn=()=>"macOS 应用",Ywn=()=>"برنامهٔ macOS",Zwn=()=>"تطبيق macOS",Jwn=()=>"App de macOS",e2n=()=>"macOS ऐप",t2n=()=>"macOS 앱",r2n=()=>"macOS アプリ",n2n=()=>"Aplikacja macOS",s2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Xwn():t==="fa"?Ywn():t==="ar"?Zwn():t==="es"?Jwn():t==="hi"?e2n():t==="ko"?t2n():t==="ja"?r2n():t==="pl"?n2n():Qwn()}),o2n=()=>"Linux app (AppImage)",a2n=()=>"Linux 应用(AppImage)",i2n=()=>"برنامه لینوکس (AppImage)",c2n=()=>"تطبيق Linux ‏(AppImage)",l2n=()=>"Aplicación para Linux (AppImage)",u2n=()=>"Linux ऐप (AppImage)",_2n=()=>"Linux 앱 (AppImage)",f2n=()=>"Linux アプリ(AppImage)",d2n=()=>"Aplikacja Linux (AppImage)",h2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?a2n():t==="fa"?i2n():t==="ar"?c2n():t==="es"?l2n():t==="hi"?u2n():t==="ko"?_2n():t==="ja"?f2n():t==="pl"?d2n():o2n()}),p2n=()=>"Installed with cargo",m2n=()=>"通过 cargo 安装",g2n=()=>"نصب‌شده با cargo",v2n=()=>"مثبّت عبر cargo",b2n=()=>"Instalado con cargo",y2n=()=>"cargo से इंस्टॉल किया गया",x2n=()=>"cargo로 설치됨",w2n=()=>"cargo でインストール",k2n=()=>"Zainstalowano przez cargo",j2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?m2n():t==="fa"?g2n():t==="ar"?v2n():t==="es"?b2n():t==="hi"?y2n():t==="ko"?x2n():t==="ja"?w2n():t==="pl"?k2n():p2n()}),S2n=()=>"Installed with Homebrew",C2n=()=>"通过 Homebrew 安装",z2n=()=>"نصب‌شده با Homebrew",E2n=()=>"مثبّت عبر Homebrew",N2n=()=>"Instalado con Homebrew",A2n=()=>"Homebrew से इंस्टॉल किया गया",T2n=()=>"Homebrew로 설치됨",R2n=()=>"Homebrew でインストール",M2n=()=>"Zainstalowano przez Homebrew",O2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?C2n():t==="fa"?z2n():t==="ar"?E2n():t==="es"?N2n():t==="hi"?A2n():t==="ko"?T2n():t==="ja"?R2n():t==="pl"?M2n():S2n()}),$2n=()=>"Installed with the orx installer",D2n=()=>"通过 orx 安装程序安装",L2n=()=>"نصب‌شده با نصب‌کنندهٔ orx",I2n=()=>"مثبّت عبر مُثبّت orx",P2n=()=>"Instalado con el instalador de orx",B2n=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",F2n=()=>"orx 설치 프로그램으로 설치됨",H2n=()=>"orx インストーラーでインストール",q2n=()=>"Zainstalowano instalatorem orx",U2n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?D2n():t==="fa"?L2n():t==="ar"?I2n():t==="es"?P2n():t==="hi"?B2n():t==="ko"?F2n():t==="ja"?H2n():t==="pl"?q2n():$2n()}),G2n=()=>"Managed by Nix",W2n=()=>"由 Nix 管理",K2n=()=>"مدیریت‌شده با Nix",V2n=()=>"مُدار بواسطة Nix",Q2n=()=>"Gestionado por Nix",X2n=()=>"Nix द्वारा प्रबंधित",Y2n=()=>"Nix로 관리됨",Z2n=()=>"Nix で管理",J2n=()=>"Zarządzane przez Nix",ekn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W2n():t==="fa"?K2n():t==="ar"?V2n():t==="es"?Q2n():t==="hi"?X2n():t==="ko"?Y2n():t==="ja"?Z2n():t==="pl"?J2n():G2n()}),tkn=()=>"Portable orx.exe",rkn=()=>"便携版 orx.exe",nkn=()=>"orx.exe قابل‌حمل",skn=()=>"‏orx.exe المحمول",okn=()=>"orx.exe portable",akn=()=>"पोर्टेबल orx.exe",ikn=()=>"포터블 orx.exe",ckn=()=>"ポータブル版 orx.exe",lkn=()=>"Przenośny orx.exe",ukn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rkn():t==="fa"?nkn():t==="ar"?skn():t==="es"?okn():t==="hi"?akn():t==="ko"?ikn():t==="ja"?ckn():t==="pl"?lkn():tkn()}),_kn=()=>"Unknown install",fkn=()=>"未知安装方式",dkn=()=>"روش نصب نامشخص",hkn=()=>"تثبيت غير معروف",pkn=()=>"Instalación desconocida",mkn=()=>"अज्ञात इंस्टॉल",gkn=()=>"알 수 없는 설치",vkn=()=>"不明なインストール",bkn=()=>"Nieznany sposób instalacji",ykn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fkn():t==="fa"?dkn():t==="ar"?hkn():t==="es"?pkn():t==="hi"?mkn():t==="ko"?gkn():t==="ja"?vkn():t==="pl"?bkn():_kn()}),xkn=()=>"Re-run your cargo install to update.",wkn=()=>"重新运行 cargo 安装命令以更新。",kkn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",jkn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",Skn=()=>"Vuelve a ejecutar cargo install para actualizar.",Ckn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",zkn=()=>"업데이트하려면 cargo install을 다시 실행하세요.",Ekn=()=>"更新するには cargo install を再実行してください。",Nkn=()=>"Uruchom ponownie cargo install, aby zaktualizować.",Akn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wkn():t==="fa"?kkn():t==="ar"?jkn():t==="es"?Skn():t==="hi"?Ckn():t==="ko"?zkn():t==="ja"?Ekn():t==="pl"?Nkn():xkn()}),Tkn=()=>"Run brew upgrade to update.",Rkn=()=>"运行 brew upgrade 以更新。",Mkn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",Okn=()=>"نفّذ brew upgrade للتحديث.",$kn=()=>"Ejecuta brew upgrade para actualizar.",Dkn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",Lkn=()=>"업데이트하려면 brew upgrade를 실행하세요.",Ikn=()=>"更新するには brew upgrade を実行してください。",Pkn=()=>"Uruchom brew upgrade, aby zaktualizować.",Bkn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rkn():t==="fa"?Mkn():t==="ar"?Okn():t==="es"?$kn():t==="hi"?Dkn():t==="ko"?Lkn():t==="ja"?Ikn():t==="pl"?Pkn():Tkn()}),Fkn=()=>"Update it through your Nix configuration.",Hkn=()=>"通过 Nix 配置进行更新。",qkn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Ukn=()=>"حدّثه عبر إعداد Nix الخاص بك.",Gkn=()=>"Actualízalo desde tu configuración de Nix.",Wkn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",Kkn=()=>"Nix 설정을 통해 업데이트하세요.",Vkn=()=>"Nix の設定を通じて更新してください。",Qkn=()=>"Zaktualizuj przez konfigurację Nix.",Xkn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Hkn():t==="fa"?qkn():t==="ar"?Ukn():t==="es"?Gkn():t==="hi"?Wkn():t==="ko"?Kkn():t==="ja"?Vkn():t==="pl"?Qkn():Fkn()}),Ykn=()=>"Close",Zkn=()=>"关闭",Jkn=()=>"بستن",e4n=()=>"إغلاق",t4n=()=>"Cerrar",r4n=()=>"बंद करें",n4n=()=>"닫기",s4n=()=>"閉じる",o4n=()=>"Zamknij",a4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Zkn():t==="fa"?Jkn():t==="ar"?e4n():t==="es"?t4n():t==="hi"?r4n():t==="ko"?n4n():t==="ja"?s4n():t==="pl"?o4n():Ykn()}),i4n=()=>"Maximize",c4n=()=>"最大化",l4n=()=>"بزرگ کردن",u4n=()=>"تكبير",_4n=()=>"Maximizar",f4n=()=>"बड़ा करें",d4n=()=>"최대화",h4n=()=>"最大化",p4n=()=>"Maksymalizuj",m4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?c4n():t==="fa"?l4n():t==="ar"?u4n():t==="es"?_4n():t==="hi"?f4n():t==="ko"?d4n():t==="ja"?h4n():t==="pl"?p4n():i4n()}),g4n=()=>"Minimize",v4n=()=>"最小化",b4n=()=>"کوچک کردن",y4n=()=>"تصغير",x4n=()=>"Minimizar",w4n=()=>"छोटा करें",k4n=()=>"최소화",j4n=()=>"最小化",S4n=()=>"Minimalizuj",C4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?v4n():t==="fa"?b4n():t==="ar"?y4n():t==="es"?x4n():t==="hi"?w4n():t==="ko"?k4n():t==="ja"?j4n():t==="pl"?S4n():g4n()}),z4n=()=>"Restore",E4n=()=>"还原",N4n=()=>"بازیابی",A4n=()=>"استعادة",T4n=()=>"Restaurar",R4n=()=>"पुनर्स्थापित करें",M4n=()=>"복원",O4n=()=>"元に戻す",$4n=()=>"Przywróć",D4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?E4n():t==="fa"?N4n():t==="ar"?A4n():t==="es"?T4n():t==="hi"?R4n():t==="ko"?M4n():t==="ja"?O4n():t==="pl"?$4n():z4n()}),L4n=()=>"Active Experiments",I4n=()=>"活跃实验",P4n=()=>"آزمایش‌های فعال",B4n=()=>"التجارب النشطة",F4n=()=>"Experimentos activos",H4n=()=>"सक्रिय प्रयोग",q4n=()=>"활성 실험",U4n=()=>"進行中の実験",G4n=()=>"Aktywne eksperymenty",W4n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?I4n():t==="fa"?P4n():t==="ar"?B4n():t==="es"?F4n():t==="hi"?H4n():t==="ko"?q4n():t==="ja"?U4n():t==="pl"?G4n():L4n()}),K4n=()=>"Default compute",V4n=()=>"默认计算目标",Q4n=()=>"محاسبات پیش‌فرض",X4n=()=>"الحوسبة الافتراضية",Y4n=()=>"Cómputo predeterminado",Z4n=()=>"डिफ़ॉल्ट कंप्यूट",J4n=()=>"기본 컴퓨팅",e3n=()=>"既定のコンピューティング",t3n=()=>"Domyślne zasoby obliczeniowe",r3n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?V4n():t==="fa"?Q4n():t==="ar"?X4n():t==="es"?Y4n():t==="hi"?Z4n():t==="ko"?J4n():t==="ja"?e3n():t==="pl"?t3n():K4n()}),n3n=()=>"More tools",s3n=()=>"更多工具",o3n=()=>"ابزارهای بیشتر",a3n=()=>"مزيد من الأدوات",i3n=()=>"Más herramientas",c3n=()=>"और टूल",l3n=()=>"추가 도구",u3n=()=>"その他のツール",_3n=()=>"Więcej narzędzi",xN=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?s3n():t==="fa"?o3n():t==="ar"?a3n():t==="es"?i3n():t==="hi"?c3n():t==="ko"?l3n():t==="ja"?u3n():t==="pl"?_3n():n3n()}),f3n=()=>"Terminal",d3n=()=>"终端",h3n=()=>"ترمینال",p3n=()=>"الطرفية",m3n=()=>"Terminal",g3n=()=>"टर्मिनल",v3n=()=>"터미널",b3n=()=>"ターミナル",y3n=()=>"Terminal",bb=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?d3n():t==="fa"?h3n():t==="ar"?p3n():t==="es"?m3n():t==="hi"?g3n():t==="ko"?v3n():t==="ja"?b3n():t==="pl"?y3n():f3n()}),x3n=()=>"The terminal disconnected.",w3n=()=>"终端连接已断开。",k3n=()=>"ارتباط ترمینال قطع شد.",j3n=()=>"انقطعت الطرفية.",S3n=()=>"La terminal se desconectó.",C3n=()=>"टर्मिनल डिस्कनेक्ट हो गया।",z3n=()=>"터미널 연결이 끊어졌습니다.",E3n=()=>"ターミナルの接続が切れました。",N3n=()=>"Utracono połączenie z terminalem.",wN=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?w3n():t==="fa"?k3n():t==="ar"?j3n():t==="es"?S3n():t==="hi"?C3n():t==="ko"?z3n():t==="ja"?E3n():t==="pl"?N3n():x3n()}),A3n=e=>`Shell exited with code ${e==null?void 0:e.code}.`,T3n=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,R3n=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,M3n=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,O3n=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,$3n=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,D3n=e=>`셸이 코드 ${e==null?void 0:e.code}로 종료되었습니다.`,L3n=e=>`シェルがコード ${e==null?void 0:e.code} で終了しました。`,I3n=e=>`Powłoka zakończyła działanie z kodem ${e==null?void 0:e.code}.`,P3n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?T3n(e):t==="fa"?R3n(e):t==="ar"?M3n(e):t==="es"?O3n(e):t==="hi"?$3n(e):t==="ko"?D3n(e):t==="ja"?L3n(e):t==="pl"?I3n(e):A3n(e)}),B3n=()=>"Restart shell",F3n=()=>"重新启动 Shell",H3n=()=>"راه‌اندازی دوباره پوسته",q3n=()=>"إعادة تشغيل Shell",U3n=()=>"Reiniciar shell",G3n=()=>"शेल फिर से शुरू करें",W3n=()=>"셸 다시 시작",K3n=()=>"シェルを再起動",V3n=()=>"Uruchom ponownie powłokę",Q3n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?F3n():t==="fa"?H3n():t==="ar"?q3n():t==="es"?U3n():t==="hi"?G3n():t==="ko"?W3n():t==="ja"?K3n():t==="pl"?V3n():B3n()}),X3n=()=>"This worktree",Y3n=()=>"当前工作树",Z3n=()=>"این درخت کاری",J3n=()=>"شجرة العمل هذه",e5n=()=>"Este árbol de trabajo",t5n=()=>"यह वर्कट्री",r5n=()=>"이 워크트리",n5n=()=>"このワークツリー",s5n=()=>"To drzewo robocze",o5n=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Y3n():t==="fa"?Z3n():t==="ar"?J3n():t==="es"?e5n():t==="hi"?t5n():t==="ko"?r5n():t==="ja"?n5n():t==="pl"?s5n():X3n()}),a5n=()=>"Workspace",i5n=()=>"工作区",c5n=()=>"فضای کاری",l5n=()=>"مساحة العمل",u5n=()=>"Espacio de trabajo",_5n=()=>"वर्कस्पेस",f5n=()=>"작업 공간",d5n=()=>"ワークスペース",h5n=()=>"Obszar roboczy",D2=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?i5n():t==="fa"?c5n():t==="ar"?l5n():t==="es"?u5n():t==="hi"?_5n():t==="ko"?f5n():t==="ja"?d5n():t==="pl"?h5n():a5n()}),p5n=e=>`Current worktree · ${e==null?void 0:e.branch}`,m5n=e=>`当前工作树 · ${e==null?void 0:e.branch}`,g5n=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,v5n=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,b5n=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,y5n=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,x5n=e=>`현재 워크트리 · ${e==null?void 0:e.branch}`,w5n=e=>`現在のワークツリー · ${e==null?void 0:e.branch}`,k5n=e=>`Bieżące drzewo robocze · ${e==null?void 0:e.branch}`,j5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?m5n(e):t==="fa"?g5n(e):t==="ar"?v5n(e):t==="es"?b5n(e):t==="hi"?y5n(e):t==="ko"?x5n(e):t==="ja"?w5n(e):t==="pl"?k5n(e):p5n(e)}),S5n=e=>`Default branch · ${e==null?void 0:e.branch}`,C5n=e=>`默认分支 · ${e==null?void 0:e.branch}`,z5n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,E5n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,N5n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,A5n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,T5n=e=>`기본 브랜치 · ${e==null?void 0:e.branch}`,R5n=e=>`既定のブランチ · ${e==null?void 0:e.branch}`,M5n=e=>`Gałąź domyślna · ${e==null?void 0:e.branch}`,O5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?C5n(e):t==="fa"?z5n(e):t==="ar"?E5n(e):t==="es"?N5n(e):t==="hi"?A5n(e):t==="ko"?T5n(e):t==="ja"?R5n(e):t==="pl"?M5n(e):S5n(e)}),$5n=e=>`detached at ${e==null?void 0:e.branch}`,D5n=e=>`分离于 ${e==null?void 0:e.branch}`,L5n=e=>`جدا در ${e==null?void 0:e.branch}`,I5n=e=>`منفصل عند ${e==null?void 0:e.branch}`,P5n=e=>`desacoplado en ${e==null?void 0:e.branch}`,B5n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,F5n=e=>`${e==null?void 0:e.branch}에서 분리됨`,H5n=e=>`${e==null?void 0:e.branch} で分離された HEAD`,q5n=e=>`odłączony HEAD na ${e==null?void 0:e.branch}`,U5n=((e,r={})=>{const t=r.locale??C();return t==="zh-CN"?D5n(e):t==="fa"?L5n(e):t==="ar"?I5n(e):t==="es"?P5n(e):t==="hi"?B5n(e):t==="ko"?F5n(e):t==="ja"?H5n(e):t==="pl"?q5n(e):$5n(e)}),G5n=()=>"Listing truncated.",W5n=()=>"列表已截断。",K5n=()=>"فهرست کوتاه شده است.",V5n=()=>"القائمة مقتطعة.",Q5n=()=>"Listado truncado.",X5n=()=>"सूची छोटी की गई।",Y5n=()=>"목록이 잘렸습니다.",Z5n=()=>"一覧が省略されています。",J5n=()=>"Lista została ucięta.",ejn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?W5n():t==="fa"?K5n():t==="ar"?V5n():t==="es"?Q5n():t==="hi"?X5n():t==="ko"?Y5n():t==="ja"?Z5n():t==="pl"?J5n():G5n()}),tjn=()=>"Loading…",rjn=()=>"正在加载…",njn=()=>"در حال بارگیری…",sjn=()=>"جارٍ التحميل…",ojn=()=>"Cargando…",ajn=()=>"लोड हो रहा है…",ijn=()=>"불러오는 중…",cjn=()=>"読み込み中…",ljn=()=>"Wczytywanie…",ujn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?rjn():t==="fa"?njn():t==="ar"?sjn():t==="es"?ojn():t==="hi"?ajn():t==="ko"?ijn():t==="ja"?cjn():t==="pl"?ljn():tjn()}),_jn=()=>"No changes yet.",fjn=()=>"尚无更改。",djn=()=>"هنوز تغییری وجود ندارد.",hjn=()=>"لا توجد تغييرات بعد.",pjn=()=>"Aún no hay cambios.",mjn=()=>"अभी तक कोई बदलाव नहीं।",gjn=()=>"아직 변경 사항이 없습니다.",vjn=()=>"変更はまだありません。",bjn=()=>"Na razie brak zmian.",yjn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?fjn():t==="fa"?djn():t==="ar"?hjn():t==="es"?pjn():t==="hi"?mjn():t==="ko"?gjn():t==="ja"?vjn():t==="pl"?bjn():_jn()}),xjn=()=>"No files.",wjn=()=>"没有文件。",kjn=()=>"فایلی وجود ندارد.",jjn=()=>"لا توجد ملفات.",Sjn=()=>"No hay archivos.",Cjn=()=>"कोई फ़ाइल नहीं।",zjn=()=>"파일이 없습니다.",Ejn=()=>"ファイルがありません。",Njn=()=>"Brak plików.",Ajn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?wjn():t==="fa"?kjn():t==="ar"?jjn():t==="es"?Sjn():t==="hi"?Cjn():t==="ko"?zjn():t==="ja"?Ejn():t==="pl"?Njn():xjn()}),Tjn=()=>"Refresh failed:",Rjn=()=>"刷新失败:",Mjn=()=>"تازه‌سازی ناموفق بود:",Ojn=()=>"فشل التحديث:",$jn=()=>"Error al actualizar:",Djn=()=>"रीफ़्रेश विफल:",Ljn=()=>"새로 고침 실패:",Ijn=()=>"更新に失敗:",Pjn=()=>"Nie udało się odświeżyć:",Bjn=((e={},r={})=>{const t=r.locale??C();return t==="zh-CN"?Rjn():t==="fa"?Mjn():t==="ar"?Ojn():t==="es"?$jn():t==="hi"?Djn():t==="ko"?Ljn():t==="ja"?Ijn():t==="pl"?Pjn():Tjn()}),Ee=e=>`⁦${e}⁩`,Vl=e=>`⁨${e}⁩`,fr=e=>new Intl.NumberFormat(C()).format(e),ym="demo_nanochat_v1",Ju=e=>e.startsWith("demo_"),zh="chat_demo_nanochat_v1",Jj="chat_demo_nanochat_figures_v1",eS="chat_demo_nanochat_literature_v1",Fjn={[zh]:"cpu_end_to_end",[Jj]:"figures",[eS]:"literature"},L2="cpu-apple-silicon-pipeline-results.md",Hjn={[zh]:"msg_demo_nanochat_assistant_v1",[Jj]:"msg_demo_nanochat_figures_assistant_v1",[eS]:"msg_demo_nanochat_literature_assistant_v1"},kN="Run the proposed learning-rate probe experiment. Summarize its results using the recorded validation metric and comparison described by the experiment. If it produces an interactive HTML loss chart, show it inline using image syntax.";class c3 extends Error{constructor(t,n,s){super(t);bo(this,"currentVersion");bo(this,"exists");this.name="FileChangedError",this.currentVersion=n,this.exists=s}}function Ba(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}function qjn(e){var t;if(e.status!=="running"&&e.status!=="starting")return null;const r=(t=e.backend)==null?void 0:t.monitoringError;return typeof r=="string"&&r?r:null}function LL(e){return[...e].sort((t,n)=>n.createdAt-t.createdAt).map(qjn).find(t=>t!==null)??null}const IL=new WeakMap;async function Eo(e){if(!e.ok){const n=await e.text().catch(()=>"");let s=n;try{const o=JSON.parse(n);if(typeof o=="object"&&o!==null&&("error"in o&&typeof o.error=="string"&&(s=o.error),e.status===409&&"code"in o&&o.code==="fileChanged"&&"exists"in o&&typeof o.exists=="boolean")){const a="currentVersion"in o&&typeof o.currentVersion=="string"?o.currentVersion:null;throw new c3(s,a,o.exists)}}catch(o){if(o instanceof c3)throw o}throw new Error(s||`HTTP ${e.status}`)}const r=await e.json(),t=IL.get(e);if(t&&!Wr(t))throw new DOMException("Workspace changed","AbortError");return r}const $t=(e,r)=>fetch(e,{signal:r}).then(t=>Eo(t));async function va(e,r){const t=Si(),n=await fetch(e,r);if(!Wr(t))throw new DOMException("Workspace changed","AbortError");return IL.set(n,t),n.ok&&wX(e,t),n}const jt=(e,r,t=!1)=>va(e,{method:"POST",keepalive:t,headers:r===void 0?{}:{"content-type":"application/json"},body:r===void 0?void 0:JSON.stringify(r)}).then(n=>Eo(n)),Yc=(e,r)=>va(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(r)}).then(t=>Eo(t)),PL=(e,r)=>va(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(r)}).then(t=>Eo(t)),Ujn=e=>$t("/api/projects",e).then(r=>r.projects),Gjn=e=>$t("/api/projects/activity",e).then(r=>r.activity),l3="agentic",Wjn=e=>$t("/api/settings/ui-state",e),Kjn=(e,r)=>$t(`/api/projects/${encodeURIComponent(e)}/ui-state`,r),Vjn=(e,r,t=!1)=>jt(`/api/projects/${encodeURIComponent(e)}/ui-state`,r,t),Qjn=(e,r=!1)=>jt("/api/settings/ui-state",{workspace:e},r),Xjn=e=>jt("/api/settings/ui-state",e),Yjn=(e,r)=>jt("/api/onboarding/complete",{...e,...r}),Zjn=(e="",r)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return $t(`/api/project-path/status${t}`,r)},Jjn=()=>jt("/api/git/install"),eSn=()=>jt("/api/project-path/pick").then(e=>e.path),tSn=e=>jt("/api/projects",e),rSn=(e,r)=>$t(`/api/papers/search?q=${encodeURIComponent(e)}`,r).then(t=>t.papers),nSn=e=>$t("/api/github/account",e),sSn=(e,r)=>$t(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,r),oSn=(e,r,t)=>$t(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(r)}`,t),aSn=(e,r)=>$t(`/api/papers/resolve?id=${encodeURIComponent(e)}`,r).then(t=>t.paper),iSn=(e,r)=>Yc(`/api/projects/${e}`,r).then(t=>t.project),cSn=e=>jt("/api/projects/starter-prompts/prewarm",e),lSn=(e,r,t,n,s)=>$t(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:r,...t?{model:t}:{},locale:n})}`,s),BL=e=>va(`/api/projects/${e}`,{method:"DELETE"}).then(async r=>{if(!r.ok){const t=await r.json().catch(()=>null);throw new Error((t==null?void 0:t.error)??`delete failed (${r.status})`)}yX(e)}),uSn=(e,r)=>$t(`/api/projects/${e}/experiments`,r).then(t=>t.experiments),_Sn=(e,r,t)=>Yc(`/api/experiments/${e}/archive`,{direction:r,archived:t}),fSn=(e,r)=>$t(`/api/projects/${e}/runs`,r).then(t=>t.runs),FL=e=>jt(`/api/runs/${e}/cancel`).then(()=>{}),dSn=(e,r)=>$t(`/api/runs/${e}/log?offset=${r}`),hSn=(e,r)=>$t(`/api/runs/${e}/diff`,r),pSn=(e,r)=>$t(`/api/experiments/${e}/diff`,r),N_=(e,r=new URLSearchParams)=>(e.sessionId&&r.set("sessionId",e.sessionId),e.ref&&r.set("ref",e.ref),r),mSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file?${N_(t,new URLSearchParams({path:r}))}`,n),u3=(e,r,t={})=>`/api/projects/${e}/file/raw?${N_(t,new URLSearchParams({path:r}))}`,gSn=(e,r)=>$t(`/api/files/abs?path=${encodeURIComponent(e)}`,r),HL=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,vSn=(e,r,t,n)=>PL(`/api/projects/${e}/file`,{path:r,content:t,sessionId:n.sessionId,expectedVersion:n.expectedVersion}),bSn=(e,r,t,n={})=>Yc(`/api/projects/${e}/file`,{path:r,...t,sessionId:n.sessionId}),ySn=(e,r,t={})=>jt(`/api/projects/${e}/file/open`,{path:r,sessionId:t.sessionId}),qL=(e,r,t={})=>jt(`/api/projects/${e}/file/reveal`,{path:r,sessionId:t.sessionId}),xSn=e=>$t("/api/latex/engine",e),wSn=(e,r,t={})=>jt(`/api/projects/${e}/file/latex`,{path:r,sessionId:t.sessionId}),kSn=e=>$t("/api/overleaf/settings",e),UL=e=>jt("/api/overleaf/token",{token:e}),jSn=()=>va("/api/overleaf/token",{method:"DELETE"}).then(e=>Eo(e)),GL=(e,r={})=>jt("/api/overleaf/session",{session:e,host:r.host}),SSn=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>Eo(e)),CSn=(e={})=>jt("/api/overleaf/session/import",{host:e.host}),zSn=(e,r,t={})=>jt(`/api/projects/${e}/file/overleaf/live`,{path:r,sessionId:t.sessionId,retry:t.retry}),ESn=(e,r,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${N_(t,new URLSearchParams({path:r}))}`,{method:"DELETE"}).then(n=>Eo(n)),NSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file/overleaf?${N_(t,new URLSearchParams({path:r}))}`,n),ASn=(e,r,t)=>jt(`/api/projects/${e}/file/overleaf`,{path:r,project:t.project,sessionId:t.sessionId}),TSn=(e,r,t={})=>va(`/api/projects/${e}/file/overleaf?${N_(t,new URLSearchParams({path:r}))}`,{method:"DELETE"}).then(n=>Eo(n)),RSn=(e,r,t={})=>jt(`/api/projects/${e}/file/overleaf/sync`,{path:r,sessionId:t.sessionId,resolve:t.resolve}),MSn=(e,r,t={},n)=>$t(`/api/projects/${e}/file/overleaf/status?${N_(t,new URLSearchParams({path:r}))}`,n),OSn=(e,r,t={})=>`/api/projects/${e}/file/overleaf/upload?${N_(t,new URLSearchParams({path:r}))}`,$Sn=(e,r={},t)=>{const n=N_(r).toString();return $t(`/api/projects/${e}/code-tree${n?`?${n}`:""}`,t)},DSn=(e,r)=>$t(`/api/chat/sessions/${e}/worktree`,r),xy=(e,r,t)=>`https://github.com/${e}/${r}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,LSn=e=>$t("/api/settings/hf",e),ISn=e=>jt("/api/settings/hf",{token:e}),PSn=e=>$t("/api/settings/tinker",e),BSn=e=>jt("/api/settings/tinker",{key:e}),FSn=e=>$t("/api/update",e),HSn=()=>jt("/api/update/apply"),qSn=()=>jt("/api/update/restart"),USn=e=>jt("/api/update/auto",{enabled:e}),GSn=(e=!1)=>jt("/api/update/install-cli",{force:e}),WSn=e=>$t("/api/settings/k8s",e),KSn=e=>jt("/api/settings/k8s",e),VSn=e=>$t("/api/settings/modal",e),QSn=(e,r)=>jt("/api/settings/modal",{tokenId:e,tokenSecret:r}),XSn=e=>$t("/api/settings/env",e).then(r=>r.vars),WL=(e,r)=>jt("/api/settings/env",{key:e,value:r}).then(t=>t.vars),YSn=e=>va(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)).then(r=>r.vars),ZSn=e=>$t("/api/settings/data-dir",e),JSn=e=>jt("/api/settings/data-dir/validate",{path:e}),e6n=e=>jt("/api/settings/data-dir/move",{path:e}),t6n=e=>$t("/api/settings/ssh",e),r6n=e=>jt("/api/settings/ssh",e),n6n=e=>jt("/api/settings/ssh/default",{host:e}),s6n=(e,r)=>jt("/api/settings/ssh/preflight",{host:e,container:r}),o6n=e=>$t("/api/settings/ssh/config",e),a6n=(e,r)=>PL("/api/settings/ssh/config",{content:e,previousContent:r}),i6n=(e,r)=>$t(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,r),c6n=e=>$t("/_orx/runtime",e),l6n=e=>$t("/api/remote/sessions",e).then(r=>r.sessions),u6n=(e,r)=>jt("/api/remote/sessions",{host:e,uiPreferences:r}),_6n=e=>jt("/_orx/install",e),f6n=()=>jt("/_orx/reconnect"),KL=()=>jt("/_orx/disconnect"),d6n=()=>jt("/_orx/start-host"),VL=()=>$t("/_orx/stop-host"),QL=e=>jt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),h6n=e=>$t("/api/settings/slurm",e),p6n=e=>jt("/api/settings/slurm",e),m6n=e=>$t("/api/settings/ray",e),g6n=e=>jt("/api/settings/ray",e),v6n=e=>jt("/api/settings/ray/preflight",{address:e??null}),b6n=(e,r)=>$t(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,r),y6n=e=>jt("/api/settings/compute/default",e),x6n=e=>$t("/api/settings/local",e),w6n=e=>$t("/api/settings/openresearch",e),k6n=(e,r)=>$t(`/api/projects/${e}/files`,r),j6n=(e,r)=>va(`/api/projects/${e}/files?path=${encodeURIComponent(r)}`,{method:"DELETE"}).then(t=>Eo(t)),S6n=(e,r,t)=>Yc(`/api/projects/${e}/files`,{path:r,...t}),Wf=(e,r)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(r)}`,XL=512e3,C6n=(e,r)=>{const t=new Uint8Array(e);if(t.includes(0))return{content:"",binary:!0,truncated:r};try{return{content:new TextDecoder("utf-8",{fatal:!0}).decode(t,{stream:r}),binary:!1,truncated:r}}catch{return{content:"",binary:!0,truncated:r}}},z6n=(e,r,t)=>fetch(Wf(e,r),{signal:t,headers:{Range:`bytes=0-${XL-1}`}}).then(n=>{var o;if(n.status===404)return null;if(n.status===416&&n.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!n.ok)throw new Error(`HTTP ${n.status}`);const s=Number((o=n.headers.get("content-range"))==null?void 0:o.split("/").pop());return n.arrayBuffer().then(a=>C6n(a,Number.isFinite(s)&&s>a.byteLength))}),E6n=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",N6n=(e,r,t)=>fetch(Wf(e,r),{signal:t,method:"HEAD"}).then(n=>{if(n.status===404)return null;if(!n.ok)throw new Error(`HTTP ${n.status}`);const s=n.headers.get("x-openresearch-presentation");return{size:Number(n.headers.get("content-length"))||0,presentation:E6n(s)?s:"download"}}),A6n=e=>$t("/api/settings/profile",e),T6n=e=>$t("/api/settings/lit-sources",e),R6n=e=>jt("/api/settings/lit-sources",e),M6n=e=>$t("/api/settings/projects",e),YL=(e,r)=>jt("/api/settings/projects",{githubForNewProjects:e,...r===void 0?{}:{githubDefaultPromptSeen:r}}),O6n=(e,r)=>$t(`/api/projects/${e}/git`,r),$6n=e=>jt(`/api/projects/${e}/git/init`),D6n=e=>jt(`/api/projects/${e}/github`),L6n=e=>jt(`/api/projects/${e}/github/disable`),I6n=e=>$t("/api/settings/telemetry",e),P6n=e=>jt("/api/settings/telemetry",{enabled:e}),e_=e=>{jt("/api/telemetry/event",e).catch(()=>{})},B6n=(e,r)=>va("/api/telemetry/locale",{method:"POST",signal:r,headers:{"content-type":"application/json"},body:JSON.stringify({locale:e})}).then(t=>Eo(t));function $1(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??f3(e.id);const r=(s=e.displayName)==null?void 0:s.split(" · ").slice(1).join(" · ").replace(/ \(local\)$/,""),t=r==="OpenAI-compatible server"||r==="Custom endpoint"||r==="Custom Endpoint"?qj():r,n=f3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${n} · ${t}`:n}const yb="default";function wy(e,r){var a,i,c;const t=e==null?void 0:e.models.find(u=>u.id===r),n=(t==null?void 0:t.reasoningLevels)??((a=e==null?void 0:e.options)==null?void 0:a.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,o=s&&n.some(u=>u.id===s)?s:n.some(u=>u.id===yb)?yb:((i=e==null?void 0:e.options)==null?void 0:i.defaultReasoningLevel)??((c=n[0])==null?void 0:c.id)??null;return{choices:n,defaultId:o}}const _3="default";function ZL(e,r){var n;if((e==null?void 0:e.id)!=="codex")return[];const t=(n=e.models.find(s=>s.id===r))==null?void 0:n.serviceTiers;return t!=null&&t.length?[{id:_3,label:v0r(),description:c0r()},...t]:[]}function xb(e,r,t){var o;if(!e)return t??null;if(e.id!=="codex"||((o=e.models.find(a=>a.id===r))==null?void 0:o.serviceTiers)===void 0)return null;const s=ZL(e,r);return s.length===0?_3:t!=null&&s.some(a=>a.id===t)?t:_3}function JL(e,r,t){if(!e)return t;const{choices:n,defaultId:s}=wy(e,r);return n.length===0?yb:t&&n.some(o=>o.id===t)?t:s}const F6n=e=>$t("/api/harnesses/setup/commands",e),eI=(e=!1,r=!1,t,n)=>{const s=new URLSearchParams;e&&s.set("refresh","1"),r&&s.set("retry","1"),n&&s.set("harness",n);const o=s.size>0?`?${s.toString()}`:"";return $t(`/api/harnesses${o}`,t).then(a=>a.harnesses)},H6n=(e,r,t)=>{const n=new URLSearchParams({...r?{harness:r}:{},...t?{project:t}:{}});return $t(`/api/skills${n.size?`?${n}`:""}`,e)},q6n=(e,r,t,n)=>$t(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...r?{project:r}:{},...n?{harness:n}:{}})}`}`,t).then(s=>s.content),U6n=e=>$t("/api/latex-templates",e).then(r=>r.templates),G6n=e=>jt("/api/latex-templates",e).then(r=>r.template),W6n=e=>va(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)),K6n=e=>$t("/api/user-skills",e),V6n=e=>jt("/api/user-skills",e).then(r=>r.skill),Q6n=e=>va(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r));function f3(e){const r=(e.split("/").pop()??e).replace(/^~/,"").replace(/^claude-/,""),t=[],n=[];for(const s of r.split("-"))/^\d+(\.\d+)?$/.test(s)?n.push(s):(n.length&&t.push(n.splice(0).join(".")),t.push(s==="gpt"?"GPT":s.charAt(0).toUpperCase()+s.slice(1)));return n.length&&t.push(n.join(".")),t.join(" ")}const X6n=(e,r)=>$t(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,r).then(t=>t.sessions),Y6n=e=>$t("/api/chat/native-sessions",e).then(r=>r.chats),Z6n=(e,r)=>jt("/api/chat/native-sessions/import",{projectId:e,harness:r.harness,nativeId:r.nativeId,title:r.title}).then(t=>t.session),J6n=e=>$t("/api/chat/sessions?scope=all",e).then(r=>r.sessions),eCn=(e,r,t)=>{const n=new URLSearchParams({scope:"sidebar"});return e!=="all"&&n.set("archived",String(e==="archived")),r&&(n.set("beforeUpdatedAt",String(r.updatedAt)),n.set("beforeId",r.id)),$t(`/api/chat/sessions?${n}`,t)},tCn=(e,r,t={})=>jt("/api/chat/sessions",{projectId:e,harness:r,...t}).then(n=>n.session),rCn=e=>$t(`/api/chat/sessions/${e}`).then(r=>r.session),d3=e=>va(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(r=>Eo(r).then(t=>(by(e),t))),nCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{archived:r}).then(t=>t.session),sCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{title:r}).then(t=>t.session),oCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{planMode:r}).then(t=>t.session),aCn=e=>jt(`/api/chat/sessions/${e}/side`,{}).then(r=>r.session),iCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{goal:r}).then(t=>t.session),cCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{autonomy:r}).then(t=>t.session),lCn=(e,r)=>Yc(`/api/chat/sessions/${e}`,{permissionMode:r}).then(t=>t.session),uCn=(e,r)=>$t(`/api/chat/sessions/${e}/messages`,r).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),_Cn=(e,r)=>va(`/api/chat/sessions/${e}/queue/${encodeURIComponent(r)}`,{method:"DELETE"}).then(t=>Eo(t)),fCn=(e,r)=>jt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(r)}`),dCn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,h3=(e,r,t={},n,s,o,a)=>jt(`/api/chat/sessions/${e}/message`,{text:r,clientTurnId:o,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:n,annotations:s,mode:a}),hCn=e=>jt(`/api/chat/sessions/${e}/compact`,{}),pCn=(e,r)=>jt(`/api/chat/sessions/${e}/shell`,{command:r}),mCn=(e,r,t,n={})=>jt(`/api/chat/sessions/${e}/turns/${r}/recover`,{action:t,...n}),gCn=(e,r,t)=>jt(`/api/chat/sessions/${e}/fork`,{messageId:r,text:t}),vCn=(e,r)=>jt(`/api/chat/sessions/${e}/branch`,{leafId:r}),bCn=e=>jt(`/api/chat/sessions/${e}/interrupt`),yCn=(e,r)=>jt(`/api/chat/sessions/${e}/respond`,r);function Uc(e){const r=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(C(),{numeric:"always",style:"narrow"});if(r<60)return t.format(-r,"second");const n=Math.floor(r/60);if(n<60)return t.format(-n,"minute");const s=Math.floor(n/60);return s<24?t.format(-s,"hour"):t.format(-Math.floor(s/24),"day")}function dg(e){const r=Math.max(0,Math.floor(e/1e3));if(r<60)return znt({value:fr(r)});const t=Math.floor(r/60);if(t<60)return gnt({value:fr(t)});const n=Math.floor(t/60);return n<24?int({hours:fr(n),minutes:fr(t%60)}):Yrt({days:fr(Math.floor(n/24)),hours:fr(n%24)})}function Xl(e){const r=["B","KB","MB","GB","TB"];let t=e,n=0;for(;t>=1024&&n$t("/api/local-models",e),kCn=e=>jt("/api/local-models/discover",e),jCn=e=>jt("/api/local-models",e),SCn=e=>jt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),CCn=e=>va(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(r=>Eo(r)),jN=()=>({queryKey:Mt("getHfSettings"),queryFn:({signal:e})=>LSn(e),staleTime:3e5}),SN=()=>({queryKey:Mt("getTinkerSettings"),queryFn:({signal:e})=>PSn(e),staleTime:3e5}),CN=()=>({queryKey:Mt("getK8sSettings"),queryFn:({signal:e})=>WSn(e),staleTime:3e4}),zN=()=>({queryKey:Mt("getModalSettings"),queryFn:({signal:e})=>VSn(e),staleTime:3e5}),zCn=()=>({queryKey:Mt("getSlurmSettings"),queryFn:({signal:e})=>h6n(e),staleTime:3e5}),ECn=()=>({queryKey:Mt("getRaySettings"),queryFn:({signal:e})=>m6n(e),staleTime:3e5}),tI=e=>({queryKey:Mt("getComputeSettings",e??null),queryFn:({signal:r})=>b6n(e,r),staleTime:3e4}),NCn=()=>({queryKey:Mt("getLocalMachine"),queryFn:({signal:e})=>x6n(e),staleTime:3e5}),ACn=()=>({queryKey:Mt("getOpenResearchSettings"),queryFn:({signal:e})=>w6n(e),staleTime:3e4}),TCn=()=>({queryKey:Mt("getEnvVars"),queryFn:({signal:e})=>XSn(e),staleTime:3e5}),RCn=()=>({queryKey:Mt("getDataDir"),queryFn:({signal:e})=>ZSn(e),staleTime:3e5}),rI=()=>({queryKey:Mt("getSshSettings"),queryFn:({signal:e})=>t6n(e),staleTime:3e4}),MCn=()=>({queryKey:Mt("getSshConfig"),queryFn:({signal:e})=>o6n(e),staleTime:3e5}),EN=e=>({queryKey:Mt("getSshMasterStatus",e),queryFn:({signal:r})=>i6n(e,r),staleTime:5e3}),OCn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>c6n(e),staleTime:2e3}),$Cn=()=>({queryKey:Mt("listRemoteSessions"),queryFn:({signal:e})=>l6n(e),staleTime:3e4}),wb=()=>({queryKey:Mt("getUpdateStatus"),queryFn:({signal:e,client:r,queryKey:t})=>vp(r,t,()=>FSn(e)),staleTime:3e4}),DCn=()=>({queryKey:Mt("getProfile"),queryFn:({signal:e})=>A6n(e),staleTime:3e5}),LCn=()=>({queryKey:Mt("getLitSources"),queryFn:({signal:e})=>T6n(e),staleTime:3e5}),rS=()=>({queryKey:Mt("getProjectDefaults"),queryFn:({signal:e})=>M6n(e),staleTime:3e5}),ICn=e=>({queryKey:Mt("getProjectGitStatus",e),queryFn:({signal:r})=>O6n(e,r),staleTime:3e4}),PCn=()=>({queryKey:Mt("getTelemetry"),queryFn:({signal:e})=>I6n(e),staleTime:3e5}),nS=()=>({queryKey:Mt("getHarnessSetupCommands"),queryFn:({signal:e})=>F6n(e),staleTime:1/0}),su=()=>({queryKey:Mt("getHarnesses"),queryFn:({signal:e})=>eI(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var r;return(r=e.state.data)!=null&&r.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),BCn=(e,r)=>({queryKey:Mt("getSkills",e??null,r??null),queryFn:({signal:t})=>H6n(t,e,r),select:t=>t.skills,refetchInterval:t=>{var n;return(n=t.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5}),FCn=(e,r,t)=>({queryKey:Mt("getSkillContent",e,r??null,t??null),queryFn:({signal:n})=>q6n(e,r,n,t),staleTime:3e5}),HCn=()=>({queryKey:Mt("listLatexTemplates"),queryFn:({signal:e})=>U6n(e),refetchInterval:3e4,staleTime:3e5}),qCn=()=>({queryKey:Mt("listUserSkills"),queryFn:({signal:e})=>K6n(e),select:e=>e.skills,refetchInterval:e=>{var r;return(r=e.state.data)!=null&&r.importing?2e3:3e4},staleTime:3e5});async function Kf(e=!1,r=!1){return!e&&!r?Je.fetchQuery(su()):sS(e,r)}const UCn=e=>sS(!0,!1,e),nI=()=>sS(!1,!1);async function sS(e,r,t){const n=su();await Je.cancelQueries(n);const s=await eI(e,r,void 0,t);return Wr(n.queryKey)&&Je.setQueryData(n.queryKey,s),s}const GCn=()=>({queryKey:Mt("getLocalModels"),queryFn:({signal:e})=>wCn(e),staleTime:3e4}),WCn=e=>({queryKey:Mt("reportLocale",e),queryFn:({signal:r})=>B6n(e,r),staleTime:0,retry:3,retryDelay:1e3,refetchOnWindowFocus:!1}),D1=new Map;function KCn(e,r){let t=D1.get(e);return t||(t=new Set,D1.set(e,t)),t.add(r),()=>{t.delete(r),t.size===0&&D1.delete(e)}}function VCn(e){var r;(r=D1.get(e.runId))==null||r.forEach(t=>t(e))}const p3=new Set;function hg(e){return p3.add(e),()=>{p3.delete(e)}}function Ol(e){p3.forEach(r=>r(e))}const m3=new Set;function QCn(e){return m3.add(e),()=>{m3.delete(e)}}function $l(){m3.forEach(e=>e())}const g3=new Set;function XCn(e){return g3.add(e),()=>{g3.delete(e)}}const v3=new Set;function YCn(e){return v3.add(e),()=>{v3.delete(e)}}function ZCn(){v3.forEach(e=>e())}function NN(e){g3.forEach(r=>r(e))}const b3=new Set;function sI(e){return b3.add(e),()=>{b3.delete(e)}}function I2(e){b3.forEach(r=>r(e))}const y3=new Set;function JCn(e){return y3.add(e),()=>{y3.delete(e)}}function AN(e){y3.forEach(r=>r(e))}const x3=new Set;function e7n(e){return x3.add(e),()=>{x3.delete(e)}}function t7n(e){x3.forEach(r=>r(e))}let w3=!0;const k3=new Set;function r7n(e){return k3.add(e),()=>{k3.delete(e)}}function TN(){return w3}function RN(e){e!==w3&&(w3=e,k3.forEach(r=>r()))}const n7n=8e3,s7n=3e3;function o7n(e){const r=T.useRef(e);r.current=e,T.useEffect(()=>{let t=null,n=!1,s,o,a=!1;const i=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{n||(a=!0,s??(s=window.setTimeout(()=>RN(!1),n7n)),c.readyState===EventSource.CLOSED&&o===void 0&&(o=window.setTimeout(()=>{o=void 0,i()},s7n)))},c.onopen=()=>{var d,_;n||(window.clearTimeout(s),s=void 0,RN(!0),a&&(Ol({type:"reconnected"}),$l(),NN({harness:"*",authState:"unknown"}),(_=(d=r.current).onReconnect)==null||_.call(d)),a=!0)};const u=d=>{try{return JSON.parse(d.data)}catch{return null}};c.addEventListener("resync.required",()=>{var d,_;Ol({type:"reconnected"}),$l(),(_=(d=r.current).onReconnect)==null||_.call(d)}),c.addEventListener("run.updated",d=>{const _=u(d);_!=null&&_.run&&($l(),r.current.onRun(_.run))}),c.addEventListener("experiment.updated",d=>{var p,m;const _=u(d);_!=null&&_.experiment&&($l(),(m=(p=r.current).onExperiment)==null||m.call(p,_.experiment))}),c.addEventListener("project.updated",d=>{var p,m;const _=u(d);_!=null&&_.project&&($l(),(m=(p=r.current).onProject)==null||m.call(p,_.project))}),c.addEventListener("files.updated",d=>{var p,m;const _=u(d);_!=null&&_.projectId&&((m=(p=r.current).onArtifacts)==null||m.call(p,_.projectId))}),c.addEventListener("run.log",d=>{const _=u(d);_!=null&&_.runId&&(VCn(_),j3.onRunLog(_))}),c.addEventListener("chat.session",d=>{const _=u(d);_!=null&&_.session&&($l(),Ol({type:"session",session:_.session}))}),c.addEventListener("chat.session.deleted",d=>{const _=u(d);_!=null&&_.sessionId&&($l(),Ol({type:"sessionDeleted",sessionId:_.sessionId}))}),c.addEventListener("chat.message",d=>{const _=u(d);_!=null&&_.message&&($l(),Ol({type:"message",sessionId:_.sessionId,message:_.message}))}),c.addEventListener("chat.busy",d=>{const _=u(d);_!=null&&_.sessionId&&($l(),Ol({type:"busy",sessionId:_.sessionId,busy:_.busy}))}),c.addEventListener("chat.usage",d=>{const _=u(d);_!=null&&_.sessionId&&_.usage&&Ol({type:"usage",sessionId:_.sessionId,usage:_.usage})}),c.addEventListener("chat.queued",d=>{const _=u(d);_!=null&&_.sessionId&&Ol({type:"queued",sessionId:_.sessionId,items:_.items??[]})}),c.addEventListener("chat.branch",d=>{const _=u(d);_!=null&&_.sessionId&&Ol({type:"branch",sessionId:_.sessionId,activeLeafId:_.activeLeafId??null})}),c.addEventListener("harness.auth",d=>{const _=u(d);_!=null&&_.harness&&_.authState&&NN(_)}),c.addEventListener("harness.catalog",()=>ZCn()),c.addEventListener("datadir.move.progress",d=>{const _=u(d);_&&I2({type:"progress",..._})}),c.addEventListener("datadir.move.done",d=>{const _=u(d);_&&I2({type:"done",path:_.path,oldPathLeft:_.oldPathLeft})}),c.addEventListener("datadir.move.error",d=>{const _=u(d);_&&I2({type:"error",error:_.error})}),c.addEventListener("update.status",d=>{const _=u(d);_&&t7n(_)}),c.addEventListener("overleaf.live",d=>{const _=u(d);_!=null&&_.key&&_.status&&AN({type:"live",key:_.key,status:_.status})}),c.addEventListener("overleaf.pulled",d=>{const _=u(d);_!=null&&_.key&&Array.isArray(_.paths)&&AN({type:"pulled",key:_.key,paths:_.paths})})};return i(),()=>{n=!0,window.clearTimeout(s),window.clearTimeout(o),t==null||t.close()}},[])}const Km=new Set;function a7n(e){const r=T.useRef(e);r.current=e,T.useEffect(()=>{const t={onRun:n=>r.current.onRun(n),onRunLog:n=>{var s,o;return(o=(s=r.current).onRunLog)==null?void 0:o.call(s,n)},onReconnect:()=>{var n,s;return(s=(n=r.current).onReconnect)==null?void 0:s.call(n)}};return Km.add(t),()=>{Km.delete(t)}},[])}const j3={onRun:e=>Km.forEach(r=>r.onRun(e)),onRunLog:e=>Km.forEach(r=>{var t;return(t=r.onRunLog)==null?void 0:t.call(r,e)}),onReconnect:()=>Km.forEach(e=>{var r;return(r=e.onReconnect)==null?void 0:r.call(e)})},So=e=>({queryKey:Mt("listChatSessions",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,async()=>{const s=await X6n(e,r),o=t.getQueryData(n);return s.filter(a=>!Pc.has(a.id)).map(a=>{var i;return{...a,contextUsage:a.contextUsage??((i=o==null?void 0:o.find(c=>c.id===a.id))==null?void 0:i.contextUsage)}})},i0),staleTime:3e4}),oI=()=>({queryKey:Mt("listNativeChats"),queryFn:({signal:e})=>Y6n(e),staleTime:0}),i7n=()=>({queryKey:Mt("listAllChatSessions"),queryFn:async({signal:e})=>(await J6n(e)).filter(r=>!Pc.has(r.id)),staleTime:0}),Fc=e=>({queryKey:Mt("getChatMessages",e),queryFn:async({signal:r,client:t,queryKey:n})=>{var d;const s=t.getQueryData(n),o=await vp(t,n,()=>uCn(e,r),(_,p,m)=>{if(!p)return _;const k=new Set([...m].filter(w=>w.startsWith("message:")).map(w=>w.slice(8)));return{messages:i0(_.messages,p.messages,k,!1),queued:m.has("queued")?p.queued:_.queued,activeLeafId:m.has("branch")||k.size?p.activeLeafId:_.activeLeafId}});r.throwIfAborted();const a=t.getQueryData(n),c=s!==void 0&&o.messages.some(_=>_.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===_.id)))?[]:(a==null?void 0:a.messages.filter(_=>_.id.startsWith("local-")))??[],u=c.some(_=>_.id===(a==null?void 0:a.activeLeafId));return{...o,messages:[...o.messages,...c.filter(_=>!o.messages.some(p=>p.id===_.id))],activeLeafId:a&&(u||!((d=a.activeLeafId)!=null&&d.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:o.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"});async function c7n(e,r,t){const n=new Map,s=hg(o=>{(o.type==="busy"||o.type==="usage")&&n.set(o.sessionId,{...n.get(o.sessionId),...o.type==="busy"?{busy:o.busy}:{contextUsage:o.usage}})});try{const o=await eCn(e,r,t);return t.throwIfAborted(),{...o,sessions:o.sessions.map(a=>({...a,...n.get(a.id)}))}}finally{s()}}const Lf="local-",aI="bash";function MN(e,r){const t=e.findIndex(n=>n.id===r.id);if(t>=0){const n=e.slice();return n[t]=r,n}return r.role!=="user"?[...e,r]:[...e.filter(n=>!n.id.startsWith(Lf)),r]}function l7n(e,r){switch(r.type){case"upsertMessage":{const t=e.messagesBySession[r.sessionId]??[],n=t.some(i=>i.id===r.message.id),s=e.activeLeafBySession[r.sessionId]??null,o=r.message.role==="user"&&s!==null&&s.startsWith(Lf),a=r.message.parentId!=null&&r.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:MN(t,r.message)},activeLeafBySession:n&&!o&&!a?e.activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:r.message.id}}}case"localError":{const t=e.messagesBySession[r.sessionId]??[],n={id:`${Lf}senderr-${Date.now()}`,role:"assistant",parts:[{id:"p0",type:"tool",tool:"error",state:{status:"error",error:r.text}}],createdAt:Date.now(),parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:[...t,n]},activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:n.id}}}case"localShell":{const t=e.messagesBySession[r.sessionId]??[],n=t.find(o=>o.id===r.id),s={id:r.id,role:"user",parts:[{id:"p0",type:"tool",tool:aI,state:{status:r.error===void 0?"running":"error",input:{command:r.command},error:r.error}}],createdAt:(n==null?void 0:n.createdAt)??Date.now(),parentId:n?n.parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:n?MN(t,s):[...t,s]},activeLeafBySession:n?e.activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:s.id}}}case"activeLeaf":return{...e,activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:r.leafId}};case"optimisticUser":{const t=e.messagesBySession[r.sessionId]??[],n=r.text?[{id:"p0",type:"text",text:r.text}]:[];r.attachments.forEach((o,a)=>n.push({id:`img${a}`,type:"image",text:o.url,name:o.name})),r.annotations.forEach((o,a)=>n.push({id:`annotation${a}`,type:"annotation",text:o.text}));const s={id:`${Lf}${Date.now()}`,role:"user",parts:n,createdAt:Date.now(),parentId:e.activeLeafBySession[r.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[r.sessionId]:[...t,s]},activeLeafBySession:{...e.activeLeafBySession,[r.sessionId]:s.id}}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[r.sessionId]:r.items}}}}let iI=0;function cI(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}Je.getQueryCache().subscribe(e=>{cI(e)&&iI++});const u7n=e=>Je.getQueryCache().subscribe(r=>{cI(r)&&e()}),_7n=()=>iI;function f7n(e,r){const t=Je.getQueryData(So(e).queryKey)??[],n=new Set(t.filter(a=>a.busy).map(a=>a.id)),s={messagesBySession:{},queuedBySession:{},activeLeafBySession:{},busySessions:n},o=new Set(n);r&&o.add(r);for(const a of o){const i=Je.getQueryData(Fc(a).queryKey);i&&(s.messagesBySession[a]=i.messages,s.queuedBySession[a]=i.queued,s.activeLeafBySession[a]=i.activeLeafId)}return s}function lI(e,r,t=!1){if(r.type==="busy"){yi(Je,So(e).queryKey,r.sessionId),Je.setQueryData(So(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===r.sessionId?{...u,busy:r.busy}:u));return}const n=Fc(r.sessionId);if(Pc.has(r.sessionId))return;yi(Je,n.queryKey,r.type==="upsertMessage"?`message:${r.message.id}`:r.type==="setQueued"?"queued":r.type==="activeLeaf"?"branch":"local");const s=Je.getQueryData(n.queryKey);if(t&&!s)return;const o={messagesBySession:s?{[r.sessionId]:s.messages}:{},queuedBySession:s?{[r.sessionId]:s.queued}:{},activeLeafBySession:s?{[r.sessionId]:s.activeLeafId}:{},busySessions:new Set},a=l7n(o,r),i={messages:a.messagesBySession[r.sessionId]??[],queued:a.queuedBySession[r.sessionId]??[],activeLeafId:a.activeLeafBySession[r.sessionId]??null};Je.setQueryData(n.queryKey,i)}function d7n(e,r){const t=!!r&&!Pc.has(r??""),n=dt({...Fc(r??""),enabled:t,subscribed:t}),s=T.useSyncExternalStore(u7n,_7n),o=T.useMemo(()=>f7n(e,r),[e,r,s,n.data]),a=Si()[1],i=T.useCallback(c=>{Wr(["workspace",a])&&lI(e,c)},[e,a]);return[o,i,n]}const Vf=()=>({queryKey:Mt("listProjects"),queryFn:({signal:e,client:r,queryKey:t})=>vp(r,t,()=>Ujn(e),i0),staleTime:3e4}),ON=()=>({queryKey:Mt("listProjectActivity"),queryFn:({signal:e})=>Gjn(e),staleTime:3e4}),f0=()=>({queryKey:Mt("getUiState"),queryFn:({signal:e})=>Wjn(e),staleTime:3e5}),oS=e=>({queryKey:Mt("getProjectUiState",e),queryFn:({signal:r})=>Kjn(e,r),staleTime:3e5}),Vm=(e="")=>({queryKey:Mt("getProjectPathStatus",e),queryFn:({signal:r})=>Zjn(e,r),staleTime:3e4}),uI=e=>({queryKey:Mt("searchPapers",e),queryFn:({signal:r})=>rSn(e,r),staleTime:3e5}),h7n=()=>({queryKey:Mt("githubAccount"),queryFn:({signal:e})=>nSn(e),staleTime:3e5}),p7n=e=>({queryKey:Mt("githubProjectRepoPreview",e),queryFn:({signal:r})=>sSn(e,r),staleTime:3e4}),$N=(e,r)=>({queryKey:Mt("repoAccess",e,r),queryFn:({signal:t})=>oSn(e,r,t),staleTime:3e4}),S3=e=>({queryKey:Mt("resolvePaper",e),queryFn:({signal:r})=>aSn(e,r),staleTime:36e5}),m7n=(e,r,t,n)=>({queryKey:Mt("getProjectStarterPrompts",e,r,t,n),queryFn:({signal:s})=>lSn(e,r,t,n,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),kb=e=>({queryKey:Mt("listExperiments",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,()=>uSn(e,r),i0),staleTime:3e4}),d_=e=>({queryKey:Mt("listRuns",e),queryFn:({signal:r,client:t,queryKey:n})=>vp(t,n,()=>fSn(e,r),i0),staleTime:3e4});function Bv(e,r){if(!e)return;const t=e.find(n=>n.id===r.id);return t&&t.updatedAt>r.updatedAt?e:t?e.map(n=>n.id===r.id?r:n):[...e,r]}function DN(){const e=Si();return o7n({onRun(r){var n;if(!Wr(e))return;const t=(n=Je.getQueryData(d_(r.projectId).queryKey))==null?void 0:n.find(s=>s.id===r.id);yi(Je,d_(r.projectId).queryKey,r.id),Je.setQueryData(d_(r.projectId).queryKey,s=>Bv(s,r)),(t==null?void 0:t.commitSha)!==r.commitSha&&($a(["getRunDiff"],e,s=>s.queryKey[3]===r.id),$a(["getExperimentDiff"],e,s=>s.queryKey[3]===r.experimentId)),j3.onRun(r)},onExperiment(r){Wr(e)&&(yi(Je,kb(r.projectId).queryKey,r.id),Je.setQueryData(kb(r.projectId).queryKey,t=>Bv(t,r)),$a(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===r.projectId),$a(["getExperimentDiff"],e,t=>t.queryKey[3]===r.id),$a(["getRunDiff"],e,t=>{var n;return((n=Je.getQueryData(d_(r.projectId).queryKey))==null?void 0:n.some(s=>s.experimentId===r.id&&s.id===t.queryKey[3]))??!1}))},onProject(r){Wr(e)&&(yi(Je,Vf().queryKey,r.id),Je.setQueryData(Vf().queryKey,t=>Bv(t,r)))},onArtifacts(r){Wr(e)&&($a(Mj,e,t=>t.queryKey[3]===r),$a(["resolvedFile"],e,t=>t.queryKey[3]===r&&t.queryKey[5]==="artifacts"))},onReconnect(){Wr(e)&&($a(vX,e),j3.onReconnect())}}),T.useEffect(()=>{let r,t;const n=()=>{t??(t=setTimeout(()=>{t=void 0,$a(["listSidebarChatSessions"],e)},100))},o=QCn(()=>{r??(r=setTimeout(()=>{r=void 0,$a(["listProjectActivity"],e)},100))}),a=sI(_=>{_.type==="done"&&$a(["getDataDir"],e)}),i=hg(_=>{if(Wr(e)){if((_.type==="session"||_.type==="sessionDeleted")&&n(),_.type==="session"?yi(Je,So(_.session.projectId).queryKey,_.session.id):(_.type==="busy"||_.type==="usage")&&yi(Je,[...e,"listChatSessions"],_.sessionId),(_.type==="message"||_.type==="queued"||_.type==="branch")&&lI("",_.type==="message"?{type:"upsertMessage",sessionId:_.sessionId,message:_.message}:_.type==="queued"?{type:"setQueued",sessionId:_.sessionId,items:_.items}:{type:"activeLeaf",sessionId:_.sessionId,leafId:_.activeLeafId},!0),_.type==="session"&&!Pc.has(_.session.id))Je.setQueryData(So(_.session.projectId).queryKey,p=>{if(!p)return;const m=p.find(k=>k.id===_.session.id);return m?Bv(p,{..._.session,contextUsage:_.session.contextUsage??m.contextUsage}):[_.session,...p]});else if(_.type==="sessionDeleted")by(_.sessionId);else if(_.type==="busy"||_.type==="usage"){const p=m=>m.id!==_.sessionId?m:_.type==="busy"?{...m,busy:_.busy}:{...m,contextUsage:_.usage};Je.setQueriesData({queryKey:[...e,"listChatSessions"]},m=>m==null?void 0:m.map(p)),Je.setQueriesData({queryKey:[...e,"listSidebarChatSessions"]},m=>m&&{...m,pages:m.pages.map(k=>({...k,sessions:k.sessions.map(p)}))})}}}),c=XCn(({harness:_})=>{Wr(e)&&(_==="*"?Kf(!0):UCn(_)).catch(()=>{})}),u=YCn(()=>{Wr(e)&&Je.fetchQuery({...su(),staleTime:0}).catch(()=>{})}),d=e7n(_=>{Wr(e)&&(yi(Je,wb().queryKey),Je.setQueryData(wb().queryKey,_))});return()=>{clearTimeout(r),clearTimeout(t),o(),a(),i(),c(),u(),d()}},[e[1]]),null}const C3=new Set;function _I(e){if(e!==C()){cD(e,{reload:!1}),document.documentElement.lang=e;for(const r of C3)r()}}function g7n(e){return C3.add(e),()=>C3.delete(e)}function cu(){return T.useSyncExternalStore(g7n,C,C)}const ky="__ORX_MAC_TITLEBAR__"in window,fI="__ORX_WIN_TITLEBAR__"in window;let LN="system",IN="",P2=!1;const rh=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function PN(e){if(!rh)return null;rh.clearRect(0,0,1,1),rh.fillStyle="transparent",rh.fillStyle=e,rh.fillRect(0,0,1,1);const[r,t,n,s]=rh.getImageData(0,0,1,1).data;return s!==255?null:[r,t,n].map(o=>o.toString(16).padStart(2,"0")).join("")}function v7n(){const e=document.elementsFromPoint(window.innerWidth/2,0),r=e.findIndex(t=>t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY));for(const t of e.slice(Math.max(r,0))){const n=PN(getComputedStyle(t).backgroundColor);if(n)return n}return PN(getComputedStyle(document.documentElement).backgroundColor)}function z3(e){e&&(LN=e),!(!ky||P2)&&(P2=!0,setTimeout(()=>{var n;P2=!1;const r=v7n(),t=`titlebar:${LN}:${r}`;!r||t===IN||(IN=t,(n=window.ipc)==null||n.postMessage(t))},100))}ky&&(new MutationObserver(()=>z3()).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style","data-theme"]}),window.addEventListener("resize",()=>z3()));const b7n="a, button, input, select, textarea, label, summary, [role='button'], [role='tab'], [role='menuitem'], [role='option'], [role='switch'], [role='checkbox'], [contenteditable]:not([contenteditable='false']), [tabindex]:not([tabindex='-1'])",BN=ky?28:fI?32:0;if(BN){document.documentElement.classList.add(ky?"mac-titlebar":"win-titlebar");let e=!1;window.addEventListener("mousedown",r=>{var t;e=!1,!(r.button!==0||r.defaultPrevented||r.clientY>=BN)&&(r.target instanceof Element&&r.target.closest(b7n)||(r.detail===2?(t=window.ipc)==null||t.postMessage("titlebar:zoom"):e=!0))}),window.addEventListener("mousemove",r=>{var t;!e||r.buttons!==1||(e=!1,(t=window.ipc)==null||t.postMessage("titlebar:drag"))}),window.addEventListener("mouseup",()=>{e=!1})}const dI="orx:theme";function y7n(){try{const e=localStorage.getItem(dI);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Qf=y7n();const E3=new Set;function x7n(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function aS(){document.documentElement.dataset.theme=x7n(Qf),z3(Qf)}function hI(e){Qf=e;try{localStorage.setItem(dI,e)}catch{}aS();for(const r of E3)r()}function w7n(){return Qf}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Qf==="system"&&aS()});aS();function k7n(e){return E3.add(e),()=>E3.delete(e)}function pI(){return[T.useSyncExternalStore(k7n,()=>Qf,()=>Qf),hI]}const j7n=(e,r)=>{const t=new Array(e.length+r.length);for(let n=0;n({classGroupId:e,validator:r}),mI=(e=new Map,r=null,t)=>({nextPart:e,validators:r,classGroupId:t}),jb="-",FN=[],C7n="arbitrary..",z7n=e=>{const r=N7n(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return E7n(a);const i=a.split(jb),c=i[0]===""&&i.length>1?1:0;return gI(i,c,r)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=n[a],u=t[a];return c?u?j7n(u,c):c:u||FN}return t[a]||FN}}},gI=(e,r,t)=>{if(e.length-r===0)return t.classGroupId;const s=e[r],o=t.nextPart.get(s);if(o){const u=gI(e,r+1,o);if(u)return u}const a=t.validators;if(a===null)return;const i=r===0?e.join(jb):e.slice(r).join(jb),c=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),t=r.indexOf(":"),n=r.slice(0,t);return n?C7n+n:void 0})(),N7n=e=>{const{theme:r,classGroups:t}=e;return A7n(t,r)},A7n=(e,r)=>{const t=mI();for(const n in e){const s=e[n];iS(s,t,n,r)}return t},iS=(e,r,t,n)=>{const s=e.length;for(let o=0;o{if(typeof e=="string"){R7n(e,r,t);return}if(typeof e=="function"){M7n(e,r,t,n);return}O7n(e,r,t,n)},R7n=(e,r,t)=>{const n=e===""?r:vI(r,e);n.classGroupId=t},M7n=(e,r,t,n)=>{if($7n(e)){iS(e(n),r,t,n);return}r.validators===null&&(r.validators=[]),r.validators.push(S7n(t,e))},O7n=(e,r,t,n)=>{const s=Object.entries(e),o=s.length;for(let a=0;a{let t=e;const n=r.split(jb),s=n.length;for(let o=0;o"isThemeGetter"in e&&e.isThemeGetter===!0,D7n=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=Object.create(null),n=Object.create(null);const s=(o,a)=>{t[o]=a,r++,r>e&&(r=0,n=t,t=Object.create(null))};return{get(o){let a=t[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return s(o,a),a},set(o,a){o in t?t[o]=a:s(o,a)}}},N3="!",HN=":",L7n=[],qN=(e,r,t,n,s)=>({modifiers:e,hasImportantModifier:r,baseClassName:t,maybePostfixModifierPosition:n,isExternal:s}),I7n=e=>{const{prefix:r,experimentalParseClassName:t}=e;let n=s=>{const o=[];let a=0,i=0,c=0,u;const d=s.length;for(let w=0;wc?u-c:void 0;return qN(o,m,p,k)};if(r){const s=r+HN,o=n;n=a=>a.startsWith(s)?o(a.slice(s.length)):qN(L7n,!1,a,void 0,!0)}if(t){const s=n;n=o=>t({className:o,parseClassName:s})}return n},P7n=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((t,n)=>{r.set(t,1e6+n)}),t=>{const n=[];let s=[];for(let o=0;o0&&(s.sort(),n.push(...s),s=[]),n.push(a)):s.push(a)}return s.length>0&&(s.sort(),n.push(...s)),n}},B7n=e=>({cache:D7n(e.cacheSize),parseClassName:I7n(e),sortModifiers:P7n(e),postfixLookupClassGroupIds:F7n(e),...z7n(e)}),F7n=e=>{const r=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let n=0;n{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:o,postfixLookupClassGroupIds:a}=r,i=[],c=e.trim().split(H7n);let u="";for(let d=c.length-1;d>=0;d-=1){const _=c[d],{isExternal:p,modifiers:m,hasImportantModifier:k,baseClassName:w,maybePostfixModifierPosition:v}=t(_);if(p){u=_+(u.length>0?" "+u:u);continue}let b=!!v,x;if(b){const A=w.substring(0,v);x=n(A);const z=x&&a[x]?n(w):void 0;z&&z!==x&&(x=z,b=!1)}else x=n(w);if(!x){if(!b){u=_+(u.length>0?" "+u:u);continue}if(x=n(w),!x){u=_+(u.length>0?" "+u:u);continue}b=!1}const y=m.length===0?"":m.length===1?m[0]:o(m).join(":"),S=k?y+N3:y,E=S+x;if(i.indexOf(E)>-1)continue;i.push(E);const N=s(x,b);for(let A=0;A0?" "+u:u)}return u},U7n=(...e)=>{let r=0,t,n,s="";for(;r{if(typeof e=="string")return e;let r,t="";for(let n=0;n{let t,n,s,o;const a=c=>{const u=r.reduce((d,_)=>_(d),e());return t=B7n(u),n=t.cache.get,s=t.cache.set,o=i,i(c)},i=c=>{const u=n(c);if(u)return u;const d=q7n(c,t);return s(c,d),d};return o=a,(...c)=>o(U7n(...c))},G7n=[],Os=e=>{const r=t=>t[e]||G7n;return r.isThemeGetter=!0,r},yI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,W7n=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,K7n=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V7n=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Q7n=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,X7n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y7n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gu=e=>W7n.test(e),Sr=e=>!!e&&!Number.isNaN(Number(e)),kc=e=>!!e&&Number.isInteger(Number(e)),B2=e=>e.endsWith("%")&&Sr(e.slice(0,-1)),Dl=e=>K7n.test(e),wI=()=>!0,Z7n=e=>V7n.test(e)&&!Q7n.test(e),cS=()=>!1,J7n=e=>X7n.test(e),ezn=e=>Y7n.test(e),tzn=e=>!xt(e)&&!kt(e),rzn=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),nzn=e=>A_(e,SI,cS),xt=e=>yI.test(e),af=e=>A_(e,CI,Z7n),GN=e=>A_(e,_zn,Sr),szn=e=>A_(e,EI,wI),ozn=e=>A_(e,zI,cS),WN=e=>A_(e,kI,cS),azn=e=>A_(e,jI,ezn),Fv=e=>A_(e,NI,J7n),kt=e=>xI.test(e),xm=e=>dd(e,CI),izn=e=>dd(e,zI),KN=e=>dd(e,kI),czn=e=>dd(e,SI),lzn=e=>dd(e,jI),Hv=e=>dd(e,NI,!0),uzn=e=>dd(e,EI,!0),A_=(e,r,t)=>{const n=yI.exec(e);return n?n[1]?r(n[1]):t(n[2]):!1},dd=(e,r,t=!1)=>{const n=xI.exec(e);return n?n[1]?r(n[1]):t:!1},kI=e=>e==="position"||e==="percentage",jI=e=>e==="image"||e==="url",SI=e=>e==="length"||e==="size"||e==="bg-size",CI=e=>e==="length",_zn=e=>e==="number",zI=e=>e==="family-name",EI=e=>e==="number"||e==="weight",NI=e=>e==="shadow",VN=()=>{const e=Os("color"),r=Os("font"),t=Os("text"),n=Os("font-weight"),s=Os("tracking"),o=Os("leading"),a=Os("breakpoint"),i=Os("container"),c=Os("spacing"),u=Os("radius"),d=Os("shadow"),_=Os("inset-shadow"),p=Os("text-shadow"),m=Os("drop-shadow"),k=Os("blur"),w=Os("perspective"),v=Os("aspect"),b=Os("ease"),x=Os("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),kt,xt],N=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],z=()=>[kt,xt,c],M=()=>[Gu,"full","auto",...z()],$=()=>[kc,"none","subgrid",kt,xt],D=()=>["auto",{span:["full",kc,kt,xt]},kc,kt,xt],I=()=>[kc,"auto",kt,xt],G=()=>["auto","min","max","fr",kt,xt],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...z()],J=()=>[Gu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],ee=()=>[Gu,"screen","full","dvw","lvw","svw","min","max","fit",...z()],P=()=>[Gu,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],L=()=>[e,kt,xt],H=()=>[...S(),KN,WN,{position:[kt,xt]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",czn,nzn,{size:[kt,xt]}],oe=()=>[B2,xm,af],ie=()=>["","none","full",u,kt,xt],ce=()=>["",Sr,xm,af],re=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Sr,B2,KN,WN],le=()=>["","none",k,kt,xt],me=()=>["none",Sr,kt,xt],be=()=>["none",Sr,kt,xt],Se=()=>[Sr,kt,xt],Be=()=>[Gu,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Dl],breakpoint:[Dl],color:[wI],container:[Dl],"drop-shadow":[Dl],ease:["in","out","in-out"],font:[tzn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Dl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Dl],shadow:[Dl],spacing:["px",Sr],text:[Dl],"text-shadow":[Dl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gu,xt,kt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",kt,xt]}],"container-named":[rzn],columns:[{columns:[Sr,xt,kt,i]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[kc,"auto",kt,xt]}],basis:[{basis:[Gu,"full","auto",i,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Sr,Gu,"auto","initial","none",xt]}],grow:[{grow:["",Sr,kt,xt]}],shrink:[{shrink:["",Sr,kt,xt]}],order:[{order:[kc,"first","last","none",kt,xt]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...ee()]}],"min-inline-size":[{"min-inline":["auto",...ee()]}],"max-inline-size":[{"max-inline":["none",...ee()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[i,"screen",...J()]}],"min-w":[{"min-w":[i,"screen","none",...J()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",t,xm,af]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,uzn,szn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",B2,xt]}],"font-family":[{font:[izn,ozn,r]}],"font-features":[{"font-features":[xt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,kt,xt]}],"line-clamp":[{"line-clamp":[Sr,"none",kt,GN]}],leading:[{leading:[o,...z()]}],"list-image":[{"list-image":["none",kt,xt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",kt,xt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Sr,"from-font","auto",kt,af]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Sr,"auto",kt,xt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"tab-size":[{tab:[kc,kt,xt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",kt,xt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",kt,xt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},kc,kt,xt],radial:["",kt,xt],conic:[kc,kt,xt]},lzn,azn]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Sr,kt,xt]}],"outline-w":[{outline:["",Sr,xm,af]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",d,Hv,Fv]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",_,Hv,Fv]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Sr,af]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,Hv,Fv]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Sr,kt,xt]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Sr]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[kt,xt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Sr]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",kt,xt]}],filter:[{filter:["","none",kt,xt]}],blur:[{blur:le()}],brightness:[{brightness:[Sr,kt,xt]}],contrast:[{contrast:[Sr,kt,xt]}],"drop-shadow":[{"drop-shadow":["","none",m,Hv,Fv]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Sr,kt,xt]}],"hue-rotate":[{"hue-rotate":[Sr,kt,xt]}],invert:[{invert:["",Sr,kt,xt]}],saturate:[{saturate:[Sr,kt,xt]}],sepia:[{sepia:["",Sr,kt,xt]}],"backdrop-filter":[{"backdrop-filter":["","none",kt,xt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Sr,kt,xt]}],"backdrop-contrast":[{"backdrop-contrast":[Sr,kt,xt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Sr,kt,xt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Sr,kt,xt]}],"backdrop-invert":[{"backdrop-invert":["",Sr,kt,xt]}],"backdrop-opacity":[{"backdrop-opacity":[Sr,kt,xt]}],"backdrop-saturate":[{"backdrop-saturate":[Sr,kt,xt]}],"backdrop-sepia":[{"backdrop-sepia":["",Sr,kt,xt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",kt,xt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Sr,"initial",kt,xt]}],ease:[{ease:["linear","initial",b,kt,xt]}],delay:[{delay:[Sr,kt,xt]}],animate:[{animate:["none",x,kt,xt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,kt,xt]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[kt,xt,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],zoom:[{zoom:[kc,kt,xt]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",kt,xt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",kt,xt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Sr,xm,af,GN]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fzn=(e,{cacheSize:r,prefix:t,experimentalParseClassName:n,extend:s={},override:o={}})=>(_h(e,"cacheSize",r),_h(e,"prefix",t),_h(e,"experimentalParseClassName",n),qv(e.theme,o.theme),qv(e.classGroups,o.classGroups),qv(e.conflictingClassGroups,o.conflictingClassGroups),qv(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),_h(e,"postfixLookupClassGroups",o.postfixLookupClassGroups),_h(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Uv(e.theme,s.theme),Uv(e.classGroups,s.classGroups),Uv(e.conflictingClassGroups,s.conflictingClassGroups),Uv(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),A3(e,s,"postfixLookupClassGroups"),A3(e,s,"orderSensitiveModifiers"),e),_h=(e,r,t)=>{t!==void 0&&(e[r]=t)},qv=(e,r)=>{if(r)for(const t in r)_h(e,t,r[t])},Uv=(e,r)=>{if(r)for(const t in r)A3(e,r,t)},A3=(e,r,t)=>{const n=r[t];n!==void 0&&(e[t]=e[t]?e[t].concat(n):n)},dzn=(e,...r)=>typeof e=="function"?UN(VN,e,...r):UN(()=>fzn(VN(),e),...r),hzn=dzn({extend:{theme:{text:["menu"]}}});function Ls(...e){return hzn(...e)}const pzn={default:"border-transparent bg-surface text-subtext",success:"border-accent-green bg-accent-green-subtle text-accent-green",error:"border-accent-red bg-accent-red-subtle text-accent-red",warning:"border-accent-amber bg-accent-amber-subtle text-accent-amber"};function Zt({variant:e="default",size:r="default",className:t,...n}){return f.jsx("span",{className:Ls("badge inline-flex items-center rounded-full border py-px font-sans",r==="small"?"px-1.5 text-xs font-normal":"px-2 text-sm font-medium",pzn[e],t),...n})}const mzn=["btn inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap border font-medium","transition-[background,border-color,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),gzn={default:"border-border bg-background text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight",primary:"border-primary bg-primary text-background [&:hover:not(:disabled)]:border-primary-hover [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:border-primary-active [&:active:not(:disabled)]:bg-primary-active",ghost:"border-transparent bg-transparent text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-muted",danger:"border-border bg-background text-accent-red [&:hover:not(:disabled)]:bg-danger-hover [&:active:not(:disabled)]:bg-danger-active",warning:"border-accent-amber bg-background text-accent-amber [&:hover:not(:disabled)]:bg-accent-amber-subtle [&:active:not(:disabled)]:bg-highlight"},vzn={default:"h-8 rounded-md px-3.5 text-sm",small:"h-7 rounded-sm px-2.5 text-sm",large:"h-14 rounded-lg px-7 text-xl"};function AI(e,r,t,n){return Ls(mzn,gzn[e],vzn[r],t&&"active",n)}function Oe({active:e=!1,variant:r="default",size:t="default",className:n,...s}){return f.jsx("button",{className:AI(r,t,e,n),...s})}function Xf({active:e=!1,variant:r="default",size:t="default",className:n,...s}){return f.jsx("a",{className:AI(r,t,e,n),...s})}const bzn=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),yzn={default:"text-subtext [&:hover:not(:disabled)]:bg-surface [&:hover:not(:disabled)]:text-text [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-primary",primary:"bg-primary text-background [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:bg-primary-active",stop:"bg-surface text-text [&:hover:not(:disabled)]:bg-stop-hover [&:active:not(:disabled)]:bg-highlight"},xzn={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function TI(e,r,t,n,s){return Ls(bzn,yzn[e],xzn[r],n==="circle"&&"rounded-full",t&&"active",s)}const Rt=T.forwardRef(function({active:r=!1,shape:t="rounded",size:n="default",variant:s="default",className:o,...a},i){return f.jsx("button",{ref:i,className:TI(s,n,r,t,o),...a})});function yp({active:e=!1,shape:r="rounded",size:t="default",variant:n="default",className:s,...o}){return f.jsx("a",{className:TI(n,t,e,r,s),...o})}const wzn={default:"h-8 rounded-md border border-border bg-background px-2.5 py-1.5 focus:border-text",inline:"h-8 rounded-none border-x-0 border-t-0 border-b border-transparent bg-transparent px-0 py-0 focus:border-text"};function Nn({variant:e="default",className:r,...t}){return f.jsx("input",{className:Ls("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",wzn[e],r),...t})}function _r({active:e=!1,danger:r=!1,size:t="default",className:n,...s}){return f.jsx("button",{className:Ls("model-item flex w-full items-center justify-between gap-2 rounded-sm px-2 text-start transition-[background,color] duration-120 ease-standard hover:bg-surface focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-45 [&_.model-id]:block [&_.model-id]:text-xs [&_.model-id]:text-muted",t==="compact"?"min-h-6 py-0.5 text-menu":"min-h-8 py-1.5 text-sm",e&&"bg-surface",r&&"text-accent-red hover:text-accent-red",n),...s})}function Nt({className:e,...r}){return f.jsx("span",{className:Ls("spinner h-[13px] w-[13px] shrink-0 animate-[spin_0.8s_linear_infinite] rounded-full border-2 border-border border-t-primary",e),...r})}function Gn({className:e,...r}){return f.jsx("div",{className:Ls("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...r})}const kzn={success:"text-accent-green",danger:"text-accent-red",info:"text-accent-teal",warning:"text-accent-amber",caution:"text-accent-orange",accent:"text-accent-purple",neutral:"text-muted"};function Eh({tone:e="neutral",live:r=!1,className:t,children:n,...s}){return f.jsxs("span",{className:Ls("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:Ls("h-[7px] w-[7px] shrink-0 rounded-full bg-current",kzn[e],r&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),n]})}const jzn=["relative h-5.5 w-9.5 flex-none rounded-full border border-border bg-panel","transition-[background,border-color] duration-120 ease-standard","[&_span]:absolute [&_span]:start-[3px] [&_span]:top-[3px] [&_span]:h-3.5 [&_span]:w-3.5","[&_span]:rounded-full [&_span]:bg-muted [&_span]:transition-[translate,background] [&_span]:duration-120 [&_span]:ease-standard","hover:border-border-strong","disabled:cursor-default disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2"].join(" ");function RI(e,r){return Ls(jzn,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",r)}function lS({checked:e=!1,className:r,children:t,...n}){return f.jsx("button",{role:"switch","aria-checked":e,className:RI(e,r),...n,children:t??f.jsx("span",{})})}function Szn({checked:e=!1,className:r,...t}){return f.jsx("span",{className:RI(e,r),...t,children:f.jsx("span",{})})}var Vs=S$();const Czn=n0(Vs);function zzn(e){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",r.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const Ezn=e=>{switch(e){case"success":return Tzn;case"info":return Mzn;case"warning":return Rzn;case"error":return Ozn;default:return null}},Nzn=Array(12).fill(0),Azn=({visible:e,className:r})=>st.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":e},st.createElement("div",{className:"sonner-spinner"},Nzn.map((t,n)=>st.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),Tzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Rzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Mzn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Ozn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),$zn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},st.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),st.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Dzn=()=>{const[e,r]=st.useState(document.hidden);return st.useEffect(()=>{const t=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let Lzn=1;const Izn=100,QN=e=>{var r;return typeof(e==null?void 0:e.id)=="number"||(e==null||(r=e.id)==null?void 0:r.length)>0?e.id:Lzn++};class Pzn{constructor(){this.subscribe=r=>(this.subscribers.push(r),this.getActiveToasts().forEach(t=>r(t)),()=>{const t=this.subscribers.indexOf(r);this.subscribers.splice(t,1)}),this.publish=r=>{this.subscribers.forEach(t=>t(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r],this.trimHistory()},this.trimHistory=()=>{let r=this.toasts.length-Izn;r<=0||(this.toasts=this.toasts.filter(t=>r>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),r--,!1):!0))},this.create=r=>{const{message:t,...n}=r,s=QN(r),o=this.pendingDismissals.get(s);o!==void 0&&(cancelAnimationFrame(o),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const a=this.dismissedToasts.has(s),i=r.dismissible===void 0?!0:r.dismissible;return a&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(u=>u.id!==s)),(a?void 0:this.toasts.find(u=>u.id===s))?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...r,id:s,title:t}),{...u,...r,id:s,dismissible:i,title:t}):u):this.addToast({title:t,...n,dismissible:i,id:s}),s},this.dismiss=r=>{if(r==null)return this.getActiveToasts().forEach(n=>{this.dismissedToasts.add(n.id),this.subscribers.forEach(s=>s({id:n.id,dismiss:!0}))}),r;this.dismissedToasts.add(r);const t=this.pendingDismissals.get(r);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(r,requestAnimationFrame(()=>{this.pendingDismissals.delete(r),this.subscribers.forEach(n=>n({id:r,dismiss:!0}))})),r},this.message=(r,t)=>this.create({...t,message:r,type:void 0}),this.error=(r,t)=>this.create({...t,message:r,type:"error"}),this.success=(r,t)=>this.create({...t,type:"success",message:r}),this.info=(r,t)=>this.create({...t,type:"info",message:r}),this.warning=(r,t)=>this.create({...t,type:"warning",message:r}),this.loading=(r,t)=>this.create({...t,type:"loading",message:r}),this.promise=(r,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:r,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(r instanceof Function?r():r);let o=n!==void 0,a;const i=s.then(async u=>{if(a=["resolve",u],st.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(Fzn(u)&&!u.ok){o=!1;const _=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"error",description:p,...k})}else if(u instanceof Error){o=!1;const _=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"error",description:p,...k})}else if(t.success!==void 0){o=!1;const _=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,k=typeof _=="object"&&!st.isValidElement(_)?_:{message:_};this.create({id:n,type:"success",description:p,...k})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){o=!1;const d=typeof t.error=="function"?await t.error(u):t.error,_=typeof t.description=="function"?await t.description(u):t.description,m=typeof d=="object"&&!st.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:_,...m})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((u,d)=>i.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(r,t)=>{const n=QN(t);return this.create({...t,jsx:r(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const ha=new Pzn,Bzn=(e,r)=>ha.message(e,r),Fzn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Hzn=Bzn,qzn=()=>ha.toasts,Uzn=()=>ha.getActiveToasts(),Gzn=Object.assign(Hzn,{success:ha.success,info:ha.info,warning:ha.warning,error:ha.error,custom:ha.custom,message:ha.message,promise:ha.promise,dismiss:ha.dismiss,loading:ha.loading},{getHistory:qzn,getToasts:Uzn});zzn("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Gv(e){return e.label!==void 0}const Wzn=3,Kzn="24px",Vzn="16px",XN=4e3,Qzn=356,Xzn=14,Yzn=45,Zzn=200;function jc(...e){return e.filter(Boolean).join(" ")}function Jzn(e){const[r,t]=e.split("-"),n=[];return r&&n.push(r),t&&n.push(t),n}const e8n=e=>{var r,t,n,s,o,a,i,c,u;const{invert:d,toast:_,unstyled:p,interacting:m,setHeights:k,visibleToasts:w,heights:v,index:b,toasts:x,expanded:y,removeToast:S,defaultRichColors:E,closeButton:N,style:A,cancelButtonStyle:z,actionButtonStyle:M,className:$="",descriptionClassName:D="",duration:I,position:G,gap:F,expandByDefault:Q,classNames:K,icons:J,closeButtonAriaLabel:ee="Close toast"}=e,[P,L]=st.useState(null),[H,q]=st.useState(null),[U,oe]=st.useState(!1),[ie,ce]=st.useState(!1),[re,W]=st.useState(!1),[ae,le]=st.useState(!1),[me,be]=st.useState(!1),[Se,Be]=st.useState(0),[Xe,Me]=st.useState(0),Fe=st.useRef(_.duration||I||XN),pt=st.useRef(null),Ct=st.useRef(null),Vt=b===0,Ut=b+1<=w,Gt=_.type,De=Gt??"default",ct=_.dismissible!==!1,lt=_.className||"",xe=_.descriptionClassName||"",Ie=st.useMemo(()=>v.findIndex(ut=>ut.toastId===_.id)||0,[v,_.id]),Ye=st.useMemo(()=>{var ut;return(ut=_.closeButton)!=null?ut:N},[_.closeButton,N]),Ae=st.useMemo(()=>_.duration||I||XN,[_.duration,I]),Ve=st.useRef(0),Ze=st.useRef(0),at=st.useRef(0),At=st.useRef(null),[Pe,Jt]=G.split("-"),Tt=st.useMemo(()=>v.reduce((ut,dr,Cr)=>Cr>=Ie?ut:ut+dr.height,0),[v,Ie]),Zr=Dzn(),cr=st.useMemo(()=>{var ut;return(ut=e.swipeDirections)!=null?ut:Jzn(G)},[e.swipeDirections,G]),nr=_.invert||d,Wt=Gt==="loading";Ze.current=st.useMemo(()=>Ie*F+Tt,[Ie,Tt]),st.useEffect(()=>{Fe.current=Ae},[Ae]),st.useEffect(()=>{oe(!0)},[]),st.useEffect(()=>{const ut=Ct.current;if(ut){const dr=ut.getBoundingClientRect().height;return Me(dr),k(Cr=>[{toastId:_.id,height:dr,position:_.position},...Cr]),()=>k(Cr=>Cr.filter($r=>$r.toastId!==_.id))}},[k,_.id]),st.useLayoutEffect(()=>{if(!U)return;const ut=Ct.current,dr=ut.style.height;ut.style.height="auto";const Cr=ut.getBoundingClientRect().height;ut.style.height=dr,Me(Cr),k($r=>$r.find(Br=>Br.toastId===_.id)?$r.map(Br=>Br.toastId===_.id?{...Br,height:Cr}:Br):[{toastId:_.id,height:Cr,position:_.position},...$r])},[U,_.title,_.description,k,_.id,_.jsx,_.action,_.cancel]);const wt=st.useCallback(()=>{ce(!0),Be(Ze.current),k(ut=>ut.filter(dr=>dr.toastId!==_.id)),setTimeout(()=>{S(_)},Zzn)},[_,S,k,Ze]);st.useEffect(()=>{if(_.promise&&Gt==="loading"||_.duration===1/0||_.type==="loading")return;let ut;return y||m||Zr?(()=>{if(at.current{Fe.current!==1/0&&(Ve.current=new Date().getTime(),ut=setTimeout(()=>{_.onAutoClose==null||_.onAutoClose.call(_,_),wt()},Fe.current))})(),()=>clearTimeout(ut)},[y,m,_,Gt,Zr,wt]),st.useEffect(()=>{_.delete&&(wt(),_.onDismiss==null||_.onDismiss.call(_,_))},[wt,_.delete]);function ns(){var ut;if(J!=null&&J.loading){var dr;return st.createElement("div",{className:jc(K==null?void 0:K.loader,_==null||(dr=_.classNames)==null?void 0:dr.loader,"sonner-loader"),"data-visible":Gt==="loading"},J.loading)}return st.createElement(Azn,{className:jc(K==null?void 0:K.loader,_==null||(ut=_.classNames)==null?void 0:ut.loader),visible:Gt==="loading"})}const Hr=_.icon||(J==null?void 0:J[Gt])||Ezn(Gt);var en,gr;return st.createElement("li",{tabIndex:0,ref:Ct,className:jc($,lt,K==null?void 0:K.toast,_==null||(r=_.classNames)==null?void 0:r.toast,K==null?void 0:K[De],_==null||(t=_.classNames)==null?void 0:t[De]),"data-sonner-toast":"","data-rich-colors":(en=_.richColors)!=null?en:E,"data-styled":!(_.jsx||_.unstyled||p),"data-mounted":U,"data-promise":!!_.promise,"data-swiped":me,"data-removed":ie,"data-visible":Ut,"data-y-position":Pe,"data-x-position":Jt,"data-index":b,"data-front":Vt,"data-swiping":re,"data-dismissible":ct,"data-type":Gt,"data-invert":nr,"data-swipe-out":ae,"data-swipe-direction":H,"data-expanded":!!(y||Q&&U),"data-testid":_.testId,style:{"--index":b,"--toasts-before":b,"--z-index":x.length-b,"--offset":`${ie?Se:Ze.current}px`,"--initial-height":Q?"auto":`${Xe}px`,...A,..._.style},onDragEnd:()=>{W(!1),L(null),At.current=null},onPointerDown:ut=>{ut.button!==2&&(Wt||!ct||(pt.current=new Date,Be(Ze.current),ut.target.setPointerCapture(ut.pointerId),ut.target.tagName!=="BUTTON"&&(W(!0),At.current={x:ut.clientX,y:ut.clientY})))},onPointerUp:()=>{var ut,dr,Cr;if(ae||!ct)return;At.current=null;const $r=Number(((ut=Ct.current)==null?void 0:ut.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wn=Number(((dr=Ct.current)==null?void 0:dr.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Br=new Date().getTime()-((Cr=pt.current)==null?void 0:Cr.getTime()),yr=P==="x"?$r:wn,Dr=Math.abs(yr)/Br;if((P==="x"?cr.includes($r>0?"right":"left"):cr.includes(wn>0?"bottom":"top"))&&(Math.abs(yr)>=Yzn||Dr>.11)){Be(Ze.current),_.onDismiss==null||_.onDismiss.call(_,_),q(P==="x"?$r>0?"right":"left":wn>0?"down":"up"),wt(),le(!0);return}else{var Ht,tn;(Ht=Ct.current)==null||Ht.style.setProperty("--swipe-amount-x","0px"),(tn=Ct.current)==null||tn.style.setProperty("--swipe-amount-y","0px")}be(!1),W(!1),L(null)},onPointerMove:ut=>{var dr,Cr,$r;if(!At.current||!ct||((dr=window.getSelection())==null?void 0:dr.toString().length)>0)return;const Br=ut.clientY-At.current.y,yr=ut.clientX-At.current.x;!P&&(Math.abs(yr)>1||Math.abs(Br)>1)&&L(Math.abs(yr)>Math.abs(Br)?"x":"y");let Dr={x:0,y:0};const zt=Ht=>1/(1.5+Math.abs(Ht)/20);if(P==="y"){if(cr.includes("top")||cr.includes("bottom"))if(cr.includes("top")&&Br<0||cr.includes("bottom")&&Br>0)Dr.y=Br;else{const Ht=Br*zt(Br);Dr.y=Math.abs(Ht)0)Dr.x=yr;else{const Ht=yr*zt(yr);Dr.x=Math.abs(Ht)0||Math.abs(Dr.y)>0)&&be(!0),(Cr=Ct.current)==null||Cr.style.setProperty("--swipe-amount-x",`${Dr.x}px`),($r=Ct.current)==null||$r.style.setProperty("--swipe-amount-y",`${Dr.y}px`)}},Ye&&!_.jsx&&Gt!=="loading"?st.createElement("button",{"aria-label":ee,"data-disabled":Wt,"data-close-button":!0,onClick:Wt||!ct?()=>{}:()=>{wt(),_.onDismiss==null||_.onDismiss.call(_,_)},className:jc(K==null?void 0:K.closeButton,_==null||(n=_.classNames)==null?void 0:n.closeButton)},(gr=J==null?void 0:J.close)!=null?gr:$zn):null,(Gt||_.icon||_.promise)&&_.icon!==null&&((J==null?void 0:J[Gt])!==null||_.icon)?st.createElement("div",{"data-icon":"",className:jc(K==null?void 0:K.icon,_==null||(s=_.classNames)==null?void 0:s.icon)},Gt==="loading"?_.icon||ns():_.promise?ns():null,Gt!=="loading"?Hr:null):null,st.createElement("div",{"data-content":"",className:jc(K==null?void 0:K.content,_==null||(o=_.classNames)==null?void 0:o.content)},st.createElement("div",{"data-title":"",className:jc(K==null?void 0:K.title,_==null||(a=_.classNames)==null?void 0:a.title)},_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title),_.description?st.createElement("div",{"data-description":"",className:jc(D,xe,K==null?void 0:K.description,_==null||(i=_.classNames)==null?void 0:i.description)},typeof _.description=="function"?_.description():_.description):null),st.isValidElement(_.cancel)?_.cancel:_.cancel&&Gv(_.cancel)?st.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||z,onClick:ut=>{Gv(_.cancel)&&ct&&(_.cancel.onClick==null||_.cancel.onClick.call(_.cancel,ut),wt())},className:jc(K==null?void 0:K.cancelButton,_==null||(c=_.classNames)==null?void 0:c.cancelButton)},_.cancel.label):null,st.isValidElement(_.action)?_.action:_.action&&Gv(_.action)?st.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||M,onClick:ut=>{Gv(_.action)&&(_.action.onClick==null||_.action.onClick.call(_.action,ut),!ut.defaultPrevented&&wt())},className:jc(K==null?void 0:K.actionButton,_==null||(u=_.classNames)==null?void 0:u.actionButton)},_.action.label):null)};function YN(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function t8n(e,r){const t={};return[e,r].forEach((n,s)=>{const o=s===1,a=o?"--mobile-offset":"--offset",i=o?Vzn:Kzn;function c(u){["top","right","bottom","left"].forEach(d=>{t[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?t[`${a}-${u}`]=i:t[`${a}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):c(i)}),t}const r8n=st.forwardRef(function(r,t){const{id:n,invert:s,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:c,className:u,offset:d,mobileOffset:_,theme:p="light",richColors:m,duration:k,style:w,visibleToasts:v=Wzn,toastOptions:b,dir:x=YN(),gap:y=Xzn,icons:S,customAriaLabel:E,containerAriaLabel:N="Notifications"}=r,[A,z]=st.useState([]),M=st.useMemo(()=>n?A.filter(oe=>oe.toasterId===n):A.filter(oe=>!oe.toasterId),[A,n]),$=st.useMemo(()=>Array.from(new Set([o].concat(M.filter(oe=>oe.position).map(oe=>oe.position)))),[M,o]),[D,I]=st.useState([]),[G,F]=st.useState(!1),[Q,K]=st.useState(!1),[J,ee]=st.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),P=st.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=st.useRef(null),q=st.useRef(!1),U=st.useCallback(oe=>{z(ie=>{var ce;return(ce=ie.find(re=>re.id===oe.id))!=null&&ce.delete||ha.dismiss(oe.id),ie.filter(({id:re})=>re!==oe.id)})},[]);return st.useEffect(()=>ha.subscribe(oe=>{if(oe.dismiss){requestAnimationFrame(()=>{z(ie=>ie.map(ce=>ce.id===oe.id?{...ce,delete:!0}:ce))});return}setTimeout(()=>{Czn.flushSync(()=>{z(ie=>{const ce=ie.findIndex(re=>re.id===oe.id);return ce!==-1?[...ie.slice(0,ce),{...ie[ce],...oe},...ie.slice(ce+1)]:[oe,...ie]})})})}),[]),st.useEffect(()=>{if(p!=="system"){ee(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ee("dark"):ee("light")),typeof window>"u")return;const oe=window.matchMedia("(prefers-color-scheme: dark)");try{oe.addEventListener("change",({matches:ie})=>{ee(ie?"dark":"light")})}catch{oe.addListener(({matches:ce})=>{try{ee(ce?"dark":"light")}catch(re){console.error(re)}})}},[p]),st.useEffect(()=>{A.length<=1&&F(!1)},[A]),st.useEffect(()=>{const oe=ie=>{var ce;if(a.length>0&&a.every(ae=>ie[ae]||ie.code===ae)){var W;F(!0),(W=P.current)==null||W.focus()}ie.code==="Escape"&&(document.activeElement===P.current||(ce=P.current)!=null&&ce.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",oe),()=>document.removeEventListener("keydown",oe)},[a]),st.useEffect(()=>{if(P.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,q.current=!1)}},[P.current]),st.createElement("section",{ref:t,"aria-label":E??`${N} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},$.map((oe,ie)=>{var ce;const[re,W]=oe.split("-");return M.length?st.createElement("ol",{key:oe,dir:x==="auto"?YN():x,tabIndex:-1,ref:P,className:u,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":re,"data-x-position":W,style:{"--front-toast-height":`${((ce=D[0])==null?void 0:ce.height)||0}px`,"--width":`${Qzn}px`,"--gap":`${y}px`,...w,...t8n(d,_)},onBlur:ae=>{q.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(q.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||q.current||(q.current=!0,H.current=ae.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{Q||F(!1)},onDragEnd:()=>F(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},M.filter(ae=>!ae.position&&ie===0||ae.position===oe).map((ae,le)=>{var me,be;return st.createElement(e8n,{key:ae.id,icons:S,index:le,toast:ae,defaultRichColors:m,duration:(me=b==null?void 0:b.duration)!=null?me:k,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(be=b==null?void 0:b.closeButton)!=null?be:c,interacting:Q,position:oe,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:U,toasts:M.filter(Se=>Se.position==ae.position),heights:D.filter(Se=>Se.position==ae.position),setHeights:I,expandByDefault:i,gap:y,expanded:G,swipeDirections:r.swipeDirections})})):null}))});function n8n(e){const[r]=pI();return f.jsx(r8n,{theme:r,...e})}function tr(e,r,t){Gzn[r](e,{duration:r==="warning"||r==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function d0({content:e,children:r,className:t,interactive:n=!1}){const s=T.useRef(null),o=T.useRef(null);function a(){const c=s.current,u=o.current;if(!c||!u)return;u.matches(":popover-open")||u.showPopover();const d=c.getBoundingClientRect(),_=u.getBoundingClientRect(),p=Math.max(8,Math.min(d.left+d.width/2-_.width/2,window.innerWidth-_.width-8));u.style.left=`${p}px`,u.style.top=`${Math.max(8,d.top-_.height-6)}px`}function i(){var u;const c=s.current;!(c!=null&&c.matches(":hover, :focus-visible"))&&!(c!=null&&c.querySelector(":focus-visible"))&&((u=o.current)==null||u.hidePopover())}return T.useEffect(()=>{const c=()=>{var u;return(u=o.current)==null?void 0:u.hidePopover()};return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[]),f.jsxs("span",{ref:s,className:Ls("group relative inline-flex cursor-help rounded-full outline-none focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2",t),tabIndex:n?void 0:0,role:n?void 0:"img","aria-label":n?void 0:e,onMouseEnter:a,onMouseLeave:i,onFocus:c=>{c.target.matches(":focus-visible")&&a()},onBlur:i,onKeyDown:c=>{var u;c.key==="Escape"&&((u=o.current)!=null&&u.matches(":popover-open"))&&(c.preventDefault(),c.stopPropagation(),o.current.hidePopover())},children:[r,f.jsx("span",{ref:o,popover:"manual",role:"tooltip",className:"pointer-events-none fixed inset-auto m-0 w-max max-w-64 whitespace-normal rounded-sm border-0 bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background shadow-control-subtle",children:e})]})}const s8n=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function xp(e,r,t="[data-initial-focus]"){const n=T.useRef(r);n.current=r,T.useEffect(()=>{const s=e.current;if(!s)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll(s8n)];(s.querySelector(t)??a()[0]??s).focus();const i=c=>{if(c.key==="Escape"){if(s.querySelector(":popover-open"))return;c.preventDefault(),c.stopPropagation(),n.current();return}if(c.key!=="Tab")return;const u=a(),d=u[0],_=u.at(-1);!d||!_?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===d?(c.preventDefault(),_.focus()):!c.shiftKey&&document.activeElement===_&&(c.preventDefault(),d.focus())};return document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("keydown",i,!0),o==null||o.focus()}},[e,t])}function MI({host:e,preview:r,currentClientAttached:t,stopping:n,onClose:s,onConfirm:o}){const a=T.useRef(null),i=Math.max(0,r.attachmentCount-(t?1:0)),c=[];return r.activeTurnCount>0&&c.push(r.activeTurnCount===1?ddr():qdr({count:fr(r.activeTurnCount)})),r.pendingPermissionCount>0&&c.push(r.pendingPermissionCount===1?zfr():w_r({count:fr(r.pendingPermissionCount)})),i>0&&c.push(i===1?Kfr():kdr({count:fr(i)})),r.queuedMessageCount>0&&c.push(r.queuedMessageCount===1?ndr():Mdr({count:fr(r.queuedMessageCount)})),r.activeRunCount>0&&c.push(r.activeRunCount===1?Lfr():Z_r({count:fr(r.activeRunCount)})),xp(a,s),Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:u=>{!n&&u.target===u.currentTarget&&s()},children:f.jsxs("div",{ref:a,className:"w-120 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-stop-dialog-title","aria-describedby":c.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[f.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:H_r({host:Ee(e)})}),c.length>0&&f.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[f.jsx("p",{className:"m-0 font-medium",children:gfr()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:c.map(u=>f.jsx("li",{children:u},u))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx(Oe,{disabled:n,onClick:s,children:Gf()}),f.jsx(Oe,{variant:"danger",disabled:n,onClick:o,children:n?Jdr():R_r()})]})]})}),document.body)}/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. @@ -138,7 +138,7 @@ Magazyn danych zostanie skopiowany do nowej lokalizacji i tam aktywowany. Trwaj * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const i8n=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},c8n=T.createContext({}),l8n=()=>T.useContext(c8n),u8n=T.forwardRef(({color:e,size:r,strokeWidth:t,absoluteStrokeWidth:n,className:s="",children:o,iconNode:a,...i},c)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:_=!1,color:p="currentColor",className:m=""}=l8n()??{},k=n??_?Number(t??d)*24/Number(r??u):t??d;return T.createElement("svg",{ref:c,...F2,width:r??u??F2.width,height:r??u??F2.height,stroke:e??p,strokeWidth:k,className:OI("lucide",m,s),...!o&&!i8n(i)&&{"aria-hidden":"true"},...i},[...a.map(([x,v])=>T.createElement(x,v)),...Array.isArray(o)?o:[o]])});/** + */const i8n=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},c8n=T.createContext({}),l8n=()=>T.useContext(c8n),u8n=T.forwardRef(({color:e,size:r,strokeWidth:t,absoluteStrokeWidth:n,className:s="",children:o,iconNode:a,...i},c)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:_=!1,color:p="currentColor",className:m=""}=l8n()??{},k=n??_?Number(t??d)*24/Number(r??u):t??d;return T.createElement("svg",{ref:c,...F2,width:r??u??F2.width,height:r??u??F2.height,stroke:e??p,strokeWidth:k,className:OI("lucide",m,s),...!o&&!i8n(i)&&{"aria-hidden":"true"},...i},[...a.map(([w,v])=>T.createElement(w,v)),...Array.isArray(o)?o:[o]])});/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. @@ -568,23 +568,23 @@ Magazyn danych zostanie skopiowany do nowej lokalizacji i tam aktywowany. Trwaj * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kEn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],jEn=it("zap",kEn);function v_(e,r){return e&&Object.hasOwn(e.tasks,r)?e.tasks[r]:void 0}const SEn=["settings","harnesses","projects","compute","instances","environment","git","storage"],CEn=e=>SEn.some(r=>r===e),vd=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ua=e=>typeof e=="string"&&e.length>0,Wv=e=>e==null||ua(e);function gS(e){if(!vd(e))return;const r=(...t)=>Object.keys(e).every(n=>t.includes(n));switch(e.kind){case"home":if(r("kind","view")&&(e.view==="experiments"||e.view==="files"||e.view==="artifacts"||e.view==="terminal"))return{kind:"home",view:e.view};break;case"experiment":if(r("kind","experimentId","view","runId")&&ua(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&Wv(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...ua(e.runId)?{runId:e.runId}:{}};break;case"file":if(r("kind","path","source","sessionId","ref","line","branchLabel")&&ua(e.path)&&Wv(e.sessionId)&&Wv(e.ref)&&Wv(e.branchLabel)&&(e.source==null||e.source==="repo"||e.source==="artifacts"||e.source==="abs")&&(e.line==null||typeof e.line=="number"&&Number.isSafeInteger(e.line)&&e.line>0))return{kind:"file",path:e.path,...e.source?{source:e.source}:{},...ua(e.sessionId)?{sessionId:e.sessionId}:{},...ua(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...ua(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(r("kind","experimentId","branch","view")&&ua(e.experimentId)&&ua(e.branch)&&(e.view==="files"||e.view==="changes"))return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};break;case"plan":if(r("kind","sessionId","promptId")&&ua(e.sessionId)&&ua(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(r("kind","sessionId","spawnPartId")&&ua(e.sessionId)&&ua(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};break;case"side":if(r("kind","sessionId")&&ua(e.sessionId))return{kind:"side",sessionId:e.sessionId}}}function Zf(e){if(e==="/projects")return{kind:"home"};const r=e.split("/");if(r[0]!==""||r[1]!=="projects"||!r[2])return null;let t,n;try{t=decodeURIComponent(r[2]),n=decodeURIComponent(r[4]??"")}catch{return null}const s=o=>o.length>0&&o!=="."&&o!==".."&&!/[\\/?#\u0000-\u001f\u007f-\u009f]/.test(o);return s(t)?r.length===3||r.length===4&&r[3]===""?{kind:"resume",projectId:t}:r.length===4&&r[3]==="skills"?{kind:"skills",projectId:t}:r.length===5&&r[3]==="tasks"&&s(n)?{kind:"task",projectId:t,...n==="new"?{}:{sessionId:n}}:r.length===5&&r[3]==="settings"&&CEn(n)?{kind:"settings",projectId:t,section:n}:null:null}function Ny(e){if(typeof e!="string"||!e.startsWith("/")||e.startsWith("//")||/[\\#\u0000-\u001f\u007f-\u009f]/.test(e))return null;const r=e.indexOf("?"),t=r===-1?e:e.slice(0,r),n=r===-1?"":e.slice(r+1),s=Zf(t);if(!s||s.kind==="resume")return null;const o=new URLSearchParams(n);if([...o.keys()].some(a=>a!=="pane")||o.getAll("pane").length>1)return null;if(o.has("pane"))try{if(!gS(JSON.parse(o.get("pane")??"")))return null}catch{return null}return e}function I1(e,r,t){const n=`/projects/${encodeURIComponent(e)}/tasks/${r?encodeURIComponent(r):"new"}`;return t?`${n}?${new URLSearchParams({pane:JSON.stringify(t)})}`:n}const tA=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function XI(e,r){let t,n,s=!1,o=!1,a;async function i(c=!1){if(clearTimeout(a),o||(o=c),s||t===void 0)return;s=!0;const u=t;t=void 0;const d=o;o=!1;try{await e(u,d),n=void 0}catch(_){n=u,r(_)}finally{s=!1,t!==void 0&&i()}}return{queue(c,u=0){t=c,clearTimeout(a),a=setTimeout(()=>void i(),u)},flush:i,retry(){return!s&&t===void 0&&(t=n),i()}}}var H2={exports:{}},rA;function zEn(){return rA||(rA=1,(function(e,r){(function(t,n){e.exports=n()})(self,(()=>(()=>{var t={};return(()=>{var n=t;Object.defineProperty(n,"__esModule",{value:!0}),n.FitAddon=void 0,n.FitAddon=class{activate(s){this._terminal=s}dispose(){}fit(){const s=this.proposeDimensions();if(!s||!this._terminal||isNaN(s.cols)||isNaN(s.rows))return;const o=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(o._renderService.clear(),this._terminal.resize(s.cols,s.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const s=this._terminal._core,o=s._renderService.dimensions;if(o.css.cell.width===0||o.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,i=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(i.getPropertyValue("height")),u=Math.max(0,parseInt(i.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),_=c-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),p=u-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/o.css.cell.width)),rows:Math.max(1,Math.floor(_/o.css.cell.height))}}}})(),t})()))})(H2)),H2.exports}var EEn=zEn(),q2={exports:{}},nA;function NEn(){return nA||(nA=1,(function(e,r){(function(t,n){e.exports=n()})(self,(()=>(()=>{var t={6:(a,i)=>{function c(d){try{const _=new URL(d),p=_.password&&_.username?`${_.protocol}//${_.username}:${_.password}@${_.host}`:_.username?`${_.protocol}//${_.username}@${_.host}`:`${_.protocol}//${_.host}`;return d.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(i,"__esModule",{value:!0}),i.LinkComputer=i.WebLinkProvider=void 0,i.WebLinkProvider=class{constructor(d,_,p,m={}){this._terminal=d,this._regex=_,this._handler=p,this._options=m}provideLinks(d,_){const p=u.computeLink(d,this._regex,this._terminal,this._handler);_(this._addCallbacks(p))}_addCallbacks(d){return d.map((_=>(_.leave=this._options.leave,_.hover=(p,m)=>{if(this._options.hover){const{range:k}=_;this._options.hover(p,m,k)}},_)))}};class u{static computeLink(_,p,m,k){const x=new RegExp(p.source,(p.flags||"")+"g"),[v,b]=u._getWindowedLineStrings(_-1,m),w=v.join("");let y;const S=[];for(;y=x.exec(w);){const z=y[0];if(!c(z))continue;const[N,A]=u._mapStrIdx(m,b,0,y.index),[E,M]=u._mapStrIdx(m,N,A,z.length);if(N===-1||A===-1||E===-1||M===-1)continue;const $={start:{x:A+1,y:N+1},end:{x:M,y:E+1}};S.push({range:$,text:z,activate:k})}return S}static _getWindowedLineStrings(_,p){let m,k=_,x=_,v=0,b="";const w=[];if(m=p.buffer.active.getLine(_)){const y=m.translateToString(!0);if(m.isWrapped&&y[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--k))&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),m.isWrapped&&b.indexOf(" ")===-1););w.reverse()}for(w.push(y),v=0;(m=p.buffer.active.getLine(++x))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),b.indexOf(" ")===-1););}return[w,k]}static _mapStrIdx(_,p,m,k){const x=_.buffer.active,v=x.getNullCell();let b=m;for(;k;){const w=x.getLine(p);if(!w)return[-1,-1];for(let y=b;y{var a=o;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const i=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(d,_){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(d=u,_={}){this._handler=d,this._options=_}activate(d){this._terminal=d;const _=this._options,p=_.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new i.WebLinkProvider(this._terminal,p,this._handler,_))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),o})()))})(q2)),q2.exports}var AEn=NEn(),U2={exports:{}},sA;function TEn(){return sA||(sA=1,(function(e,r){(function(t,n){e.exports=n()})(globalThis,(()=>(()=>{var t={4567:function(a,i,c){var u=this&&this.__decorate||function(w,y,S,z){var N,A=arguments.length,E=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(w,y,S,z);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(E=(A<3?N(E):A>3?N(y,S,E):N(y,S))||E);return A>3&&E&&Object.defineProperty(y,S,E),E},d=this&&this.__param||function(w,y){return function(S,z){y(S,z,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.AccessibilityManager=void 0;const _=c(9042),p=c(9924),m=c(844),k=c(4725),x=c(2585),v=c(3656);let b=i.AccessibilityManager=class extends m.Disposable{constructor(w,y,S,z){super(),this._terminal=w,this._coreBrowserService=S,this._renderService=z,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let N=0;Nthis._handleBoundaryFocus(N,0),this._bottomBoundaryFocusListener=N=>this._handleBoundaryFocus(N,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((N=>this._handleResize(N.rows)))),this.register(this._terminal.onRender((N=>this._refreshRows(N.start,N.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((N=>this._handleChar(N)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` -`)))),this.register(this._terminal.onA11yTab((N=>this._handleTab(N)))),this.register(this._terminal.onKey((N=>this._handleKey(N.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,m.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(w){for(let y=0;y0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=_.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(w){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(w)||this._charsToConsume.push(w)}_refreshRows(w,y){this._liveRegionDebouncer.refresh(w,y,this._terminal.rows)}_renderRows(w,y){const S=this._terminal.buffer,z=S.lines.length.toString();for(let N=w;N<=y;N++){const A=S.lines.get(S.ydisp+N),E=[],M=(A==null?void 0:A.translateToString(!0,void 0,void 0,E))||"",$=(S.ydisp+N+1).toString(),D=this._rowElements[N];D&&(M.length===0?(D.innerText=" ",this._rowColumns.set(D,[0,1])):(D.textContent=M,this._rowColumns.set(D,E)),D.setAttribute("aria-posinset",$),D.setAttribute("aria-setsize",z))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,y){const S=w.target,z=this._rowElements[y===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==z)return;let N,A;if(y===0?(N=S,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(N=this._rowElements.shift(),A=S,this._rowContainer.removeChild(N)),N.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else{const E=this._createAccessibilityTreeNode();this._rowElements.push(E),this._rowContainer.appendChild(E)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const w=document.getSelection();if(!w)return;if(w.isCollapsed)return void(this._rowContainer.contains(w.anchorNode)&&this._terminal.clearSelection());if(!w.anchorNode||!w.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:w.anchorNode,offset:w.anchorOffset},S={node:w.focusNode,offset:w.focusOffset};if((y.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===S.node&&y.offset>S.offset)&&([y,S]=[S,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const z=this._rowElements.slice(-1)[0];if(S.node.compareDocumentPosition(z)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:z,offset:((M=z.textContent)==null?void 0:M.length)??0}),!this._rowContainer.contains(S.node))return;const N=({node:$,offset:D})=>{const I=$ instanceof Text?$.parentNode:$;let G=parseInt(I==null?void 0:I.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;const H=this._rowColumns.get(I);if(!H)return console.warn("columns is null. Race condition?"),null;let Q=D=this._terminal.cols&&(++G,Q=0),{row:G,column:Q}},A=N(y),E=N(S);if(A&&E){if(A.row>E.row||A.row===E.row&&A.column>=E.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(E.row-A.row)*this._terminal.cols-A.column+E.column)}}_handleResize(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yw;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const w=this._coreBrowserService.mainDocument.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let w=0;w{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function d(p,m,k,x){p=u(p=c(p),k.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(p,!0),m.value=""}function _(p,m,k){const x=k.getBoundingClientRect(),v=p.clientX-x.left-10,b=p.clientY-x.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}px`,m.style.zIndex="1000",m.focus()}Object.defineProperty(i,"__esModule",{value:!0}),i.rightClickHandler=i.moveTextAreaUnderMouseCursor=i.paste=i.handlePasteEvent=i.copyHandler=i.bracketTextForPaste=i.prepareTextForTerminal=void 0,i.prepareTextForTerminal=c,i.bracketTextForPaste=u,i.copyHandler=function(p,m){p.clipboardData&&p.clipboardData.setData("text/plain",m.selectionText),p.preventDefault()},i.handlePasteEvent=function(p,m,k,x){p.stopPropagation(),p.clipboardData&&d(p.clipboardData.getData("text/plain"),m,k,x)},i.paste=d,i.moveTextAreaUnderMouseCursor=_,i.rightClickHandler=function(p,m,k,x,v){_(p,m,k),v&&x.rightClickSelect(p),m.value=x.selectionText,m.select()}},7239:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const u=c(1505);i.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(d,_,p){this._css.set(d,_,p)}getCss(d,_){return this._css.get(d,_)}setColor(d,_,p){this._color.set(d,_,p)}getColor(d,_){return this._color.get(d,_)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(c,u,d,_){c.addEventListener(u,d,_);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,d,_))}}}},3551:function(a,i,c){var u=this&&this.__decorate||function(b,w,y,S){var z,N=arguments.length,A=N<3?w:S===null?S=Object.getOwnPropertyDescriptor(w,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,w,y,S);else for(var E=b.length-1;E>=0;E--)(z=b[E])&&(A=(N<3?z(A):N>3?z(w,y,A):z(w,y))||A);return N>3&&A&&Object.defineProperty(w,y,A),A},d=this&&this.__param||function(b,w){return function(y,S){w(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Linkifier=void 0;const _=c(3656),p=c(8460),m=c(844),k=c(2585),x=c(4725);let v=i.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(b,w,y,S,z){super(),this._element=b,this._mouseService=w,this._renderService=y,this._bufferService=S,this._linkProviderService=z,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,m.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,m.toDisposable)((()=>{var N;this._lastMouseEvent=void 0,(N=this._activeProviderReplies)==null||N.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,_.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,_.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!w)return;this._isMouseOut=!1;const y=b.composedPath();for(let S=0;S{N==null||N.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let y=!1;for(const[N,A]of this._linkProviderService.linkProviders.entries())w?(z=this._activeProviderReplies)!=null&&z.get(N)&&(y=this._checkLinkProviderResult(N,b,y)):A.provideLinks(b.y,(E=>{var $,D;if(this._isMouseOut)return;const M=E==null?void 0:E.map((I=>({link:I})));($=this._activeProviderReplies)==null||$.set(N,M),y=this._checkLinkProviderResult(N,b,y),((D=this._activeProviderReplies)==null?void 0:D.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,w){const y=new Set;for(let S=0;Sb?this._bufferService.cols:A.link.range.end.x;for(let $=E;$<=M;$++){if(y.has($)){z.splice(N--,1);break}y.add($)}}}}_checkLinkProviderResult(b,w,y){var N;if(!this._activeProviderReplies)return y;const S=this._activeProviderReplies.get(b);let z=!1;for(let A=0;Athis._linkAtPosition(E.link,w)));A&&(y=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let A=0;Athis._linkAtPosition(M.link,w)));if(E){y=!0,this._handleNewLink(E);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);w&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,w){this._currentLink&&this._lastMouseEvent&&(!b||!w||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._linkAtPosition(b.link,w)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var y,S;return(S=(y=this._currentLink)==null?void 0:y.state)==null?void 0:S.decorations.pointerCursor},set:y=>{var S;(S=this._currentLink)!=null&&S.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,S;return(S=(y=this._currentLink)==null?void 0:y.state)==null?void 0:S.decorations.underline},set:y=>{var S,z,N;(S=this._currentLink)!=null&&S.state&&((N=(z=this._currentLink)==null?void 0:z.state)==null?void 0:N.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const S=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,z=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=z&&(this._clearCurrentLink(S,z),this._lastMouseEvent)){const N=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);N&&this._askForLink(N,!1)}}))))}_linkHover(b,w,y){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(y,w.text)}_fireUnderlineEvent(b,w){const y=b.range,S=this._bufferService.buffer.ydisp,z=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-S-1,y.end.x,y.end.y-S-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(z)}_linkLeave(b,w,y){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(y,w.text)}_linkAtPosition(b,w){const y=b.range.start.y*this._bufferService.cols+b.range.start.x,S=b.range.end.y*this._bufferService.cols+b.range.end.x,z=w.y*this._bufferService.cols+w.x;return y<=z&&z<=S}_positionFromMouseEvent(b,w,y){const S=y.getCoords(b,w,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,w,y,S,z){return{x1:b,y1:w,x2:y,y2:S,cols:this._bufferService.cols,fg:z}}};i.Linkifier=v=u([d(1,x.IMouseService),d(2,x.IRenderService),d(3,k.IBufferService),d(4,x.ILinkProviderService)],v)},9042:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.tooMuchOutput=i.promptLabel=void 0,i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,i,c){var u=this&&this.__decorate||function(x,v,b,w){var y,S=arguments.length,z=S<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,v,b,w);else for(var N=x.length-1;N>=0;N--)(y=x[N])&&(z=(S<3?y(z):S>3?y(v,b,z):y(v,b))||z);return S>3&&z&&Object.defineProperty(v,b,z),z},d=this&&this.__param||function(x,v){return function(b,w){v(b,w,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkProvider=void 0;const _=c(511),p=c(2585);let m=i.OscLinkProvider=class{constructor(x,v,b){this._bufferService=x,this._optionsService=v,this._oscLinkService=b}provideLinks(x,v){var M;const b=this._bufferService.buffer.lines.get(x-1);if(!b)return void v(void 0);const w=[],y=this._optionsService.rawOptions.linkHandler,S=new _.CellData,z=b.getTrimmedLength();let N=-1,A=-1,E=!1;for(let $=0;$y?y.activate(H,Q,I):k(0,Q),hover:(H,Q)=>{var K;return(K=y==null?void 0:y.hover)==null?void 0:K.call(y,H,Q,I)},leave:(H,Q)=>{var K;return(K=y==null?void 0:y.leave)==null?void 0:K.call(y,H,Q,I)}})}E=!1,S.hasExtendedAttrs()&&S.extended.urlId?(A=$,N=S.extended.urlId):(A=-1,N=-1)}}v(w)}};function k(x,v){if(confirm(`Do you want to navigate to ${v}? + */const kEn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],jEn=it("zap",kEn);function v_(e,r){return e&&Object.hasOwn(e.tasks,r)?e.tasks[r]:void 0}const SEn=["settings","harnesses","projects","compute","instances","environment","git","storage"],CEn=e=>SEn.some(r=>r===e),vd=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ua=e=>typeof e=="string"&&e.length>0,Wv=e=>e==null||ua(e);function gS(e){if(!vd(e))return;const r=(...t)=>Object.keys(e).every(n=>t.includes(n));switch(e.kind){case"home":if(r("kind","view")&&(e.view==="experiments"||e.view==="files"||e.view==="artifacts"||e.view==="terminal"))return{kind:"home",view:e.view};break;case"experiment":if(r("kind","experimentId","view","runId")&&ua(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&Wv(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...ua(e.runId)?{runId:e.runId}:{}};break;case"file":if(r("kind","path","source","sessionId","ref","line","branchLabel")&&ua(e.path)&&Wv(e.sessionId)&&Wv(e.ref)&&Wv(e.branchLabel)&&(e.source==null||e.source==="repo"||e.source==="artifacts"||e.source==="abs")&&(e.line==null||typeof e.line=="number"&&Number.isSafeInteger(e.line)&&e.line>0))return{kind:"file",path:e.path,...e.source?{source:e.source}:{},...ua(e.sessionId)?{sessionId:e.sessionId}:{},...ua(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...ua(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(r("kind","experimentId","branch","view")&&ua(e.experimentId)&&ua(e.branch)&&(e.view==="files"||e.view==="changes"))return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};break;case"plan":if(r("kind","sessionId","promptId")&&ua(e.sessionId)&&ua(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(r("kind","sessionId","spawnPartId")&&ua(e.sessionId)&&ua(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};break;case"side":if(r("kind","sessionId")&&ua(e.sessionId))return{kind:"side",sessionId:e.sessionId}}}function Zf(e){if(e==="/projects")return{kind:"home"};const r=e.split("/");if(r[0]!==""||r[1]!=="projects"||!r[2])return null;let t,n;try{t=decodeURIComponent(r[2]),n=decodeURIComponent(r[4]??"")}catch{return null}const s=o=>o.length>0&&o!=="."&&o!==".."&&!/[\\/?#\u0000-\u001f\u007f-\u009f]/.test(o);return s(t)?r.length===3||r.length===4&&r[3]===""?{kind:"resume",projectId:t}:r.length===4&&r[3]==="skills"?{kind:"skills",projectId:t}:r.length===5&&r[3]==="tasks"&&s(n)?{kind:"task",projectId:t,...n==="new"?{}:{sessionId:n}}:r.length===5&&r[3]==="settings"&&CEn(n)?{kind:"settings",projectId:t,section:n}:null:null}function Ny(e){if(typeof e!="string"||!e.startsWith("/")||e.startsWith("//")||/[\\#\u0000-\u001f\u007f-\u009f]/.test(e))return null;const r=e.indexOf("?"),t=r===-1?e:e.slice(0,r),n=r===-1?"":e.slice(r+1),s=Zf(t);if(!s||s.kind==="resume")return null;const o=new URLSearchParams(n);if([...o.keys()].some(a=>a!=="pane")||o.getAll("pane").length>1)return null;if(o.has("pane"))try{if(!gS(JSON.parse(o.get("pane")??"")))return null}catch{return null}return e}function I1(e,r,t){const n=`/projects/${encodeURIComponent(e)}/tasks/${r?encodeURIComponent(r):"new"}`;return t?`${n}?${new URLSearchParams({pane:JSON.stringify(t)})}`:n}const tA=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function XI(e,r){let t,n,s=!1,o=!1,a;async function i(c=!1){if(clearTimeout(a),o||(o=c),s||t===void 0)return;s=!0;const u=t;t=void 0;const d=o;o=!1;try{await e(u,d),n=void 0}catch(_){n=u,r(_)}finally{s=!1,t!==void 0&&i()}}return{queue(c,u=0){t=c,clearTimeout(a),a=setTimeout(()=>void i(),u)},flush:i,retry(){return!s&&t===void 0&&(t=n),i()}}}var H2={exports:{}},rA;function zEn(){return rA||(rA=1,(function(e,r){(function(t,n){e.exports=n()})(self,(()=>(()=>{var t={};return(()=>{var n=t;Object.defineProperty(n,"__esModule",{value:!0}),n.FitAddon=void 0,n.FitAddon=class{activate(s){this._terminal=s}dispose(){}fit(){const s=this.proposeDimensions();if(!s||!this._terminal||isNaN(s.cols)||isNaN(s.rows))return;const o=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(o._renderService.clear(),this._terminal.resize(s.cols,s.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const s=this._terminal._core,o=s._renderService.dimensions;if(o.css.cell.width===0||o.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,i=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(i.getPropertyValue("height")),u=Math.max(0,parseInt(i.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),_=c-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),p=u-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/o.css.cell.width)),rows:Math.max(1,Math.floor(_/o.css.cell.height))}}}})(),t})()))})(H2)),H2.exports}var EEn=zEn(),q2={exports:{}},nA;function NEn(){return nA||(nA=1,(function(e,r){(function(t,n){e.exports=n()})(self,(()=>(()=>{var t={6:(a,i)=>{function c(d){try{const _=new URL(d),p=_.password&&_.username?`${_.protocol}//${_.username}:${_.password}@${_.host}`:_.username?`${_.protocol}//${_.username}@${_.host}`:`${_.protocol}//${_.host}`;return d.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(i,"__esModule",{value:!0}),i.LinkComputer=i.WebLinkProvider=void 0,i.WebLinkProvider=class{constructor(d,_,p,m={}){this._terminal=d,this._regex=_,this._handler=p,this._options=m}provideLinks(d,_){const p=u.computeLink(d,this._regex,this._terminal,this._handler);_(this._addCallbacks(p))}_addCallbacks(d){return d.map((_=>(_.leave=this._options.leave,_.hover=(p,m)=>{if(this._options.hover){const{range:k}=_;this._options.hover(p,m,k)}},_)))}};class u{static computeLink(_,p,m,k){const w=new RegExp(p.source,(p.flags||"")+"g"),[v,b]=u._getWindowedLineStrings(_-1,m),x=v.join("");let y;const S=[];for(;y=w.exec(x);){const E=y[0];if(!c(E))continue;const[N,A]=u._mapStrIdx(m,b,0,y.index),[z,M]=u._mapStrIdx(m,N,A,E.length);if(N===-1||A===-1||z===-1||M===-1)continue;const $={start:{x:A+1,y:N+1},end:{x:M,y:z+1}};S.push({range:$,text:E,activate:k})}return S}static _getWindowedLineStrings(_,p){let m,k=_,w=_,v=0,b="";const x=[];if(m=p.buffer.active.getLine(_)){const y=m.translateToString(!0);if(m.isWrapped&&y[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--k))&&v<2048&&(b=m.translateToString(!0),v+=b.length,x.push(b),m.isWrapped&&b.indexOf(" ")===-1););x.reverse()}for(x.push(y),v=0;(m=p.buffer.active.getLine(++w))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,x.push(b),b.indexOf(" ")===-1););}return[x,k]}static _mapStrIdx(_,p,m,k){const w=_.buffer.active,v=w.getNullCell();let b=m;for(;k;){const x=w.getLine(p);if(!x)return[-1,-1];for(let y=b;y{var a=o;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const i=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(d,_){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(d=u,_={}){this._handler=d,this._options=_}activate(d){this._terminal=d;const _=this._options,p=_.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new i.WebLinkProvider(this._terminal,p,this._handler,_))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),o})()))})(q2)),q2.exports}var AEn=NEn(),U2={exports:{}},sA;function TEn(){return sA||(sA=1,(function(e,r){(function(t,n){e.exports=n()})(globalThis,(()=>(()=>{var t={4567:function(a,i,c){var u=this&&this.__decorate||function(x,y,S,E){var N,A=arguments.length,z=A<3?y:E===null?E=Object.getOwnPropertyDescriptor(y,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,y,S,E);else for(var M=x.length-1;M>=0;M--)(N=x[M])&&(z=(A<3?N(z):A>3?N(y,S,z):N(y,S))||z);return A>3&&z&&Object.defineProperty(y,S,z),z},d=this&&this.__param||function(x,y){return function(S,E){y(S,E,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.AccessibilityManager=void 0;const _=c(9042),p=c(9924),m=c(844),k=c(4725),w=c(2585),v=c(3656);let b=i.AccessibilityManager=class extends m.Disposable{constructor(x,y,S,E){super(),this._terminal=x,this._coreBrowserService=S,this._renderService=E,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let N=0;Nthis._handleBoundaryFocus(N,0),this._bottomBoundaryFocusListener=N=>this._handleBoundaryFocus(N,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((N=>this._handleResize(N.rows)))),this.register(this._terminal.onRender((N=>this._refreshRows(N.start,N.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((N=>this._handleChar(N)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` +`)))),this.register(this._terminal.onA11yTab((N=>this._handleTab(N)))),this.register(this._terminal.onKey((N=>this._handleKey(N.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,m.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(x){for(let y=0;y0?this._charsToConsume.shift()!==x&&(this._charsToAnnounce+=x):this._charsToAnnounce+=x,x===` +`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=_.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(x){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(x)||this._charsToConsume.push(x)}_refreshRows(x,y){this._liveRegionDebouncer.refresh(x,y,this._terminal.rows)}_renderRows(x,y){const S=this._terminal.buffer,E=S.lines.length.toString();for(let N=x;N<=y;N++){const A=S.lines.get(S.ydisp+N),z=[],M=(A==null?void 0:A.translateToString(!0,void 0,void 0,z))||"",$=(S.ydisp+N+1).toString(),D=this._rowElements[N];D&&(M.length===0?(D.innerText=" ",this._rowColumns.set(D,[0,1])):(D.textContent=M,this._rowColumns.set(D,z)),D.setAttribute("aria-posinset",$),D.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(x,y){const S=x.target,E=this._rowElements[y===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||x.relatedTarget!==E)return;let N,A;if(y===0?(N=S,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(N=this._rowElements.shift(),A=S,this._rowContainer.removeChild(N)),N.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const z=this._createAccessibilityTreeNode();this._rowElements.unshift(z),this._rowContainer.insertAdjacentElement("afterbegin",z)}else{const z=this._createAccessibilityTreeNode();this._rowElements.push(z),this._rowContainer.appendChild(z)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),x.preventDefault(),x.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const x=document.getSelection();if(!x)return;if(x.isCollapsed)return void(this._rowContainer.contains(x.anchorNode)&&this._terminal.clearSelection());if(!x.anchorNode||!x.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:x.anchorNode,offset:x.anchorOffset},S={node:x.focusNode,offset:x.focusOffset};if((y.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===S.node&&y.offset>S.offset)&&([y,S]=[S,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const E=this._rowElements.slice(-1)[0];if(S.node.compareDocumentPosition(E)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:E,offset:((M=E.textContent)==null?void 0:M.length)??0}),!this._rowContainer.contains(S.node))return;const N=({node:$,offset:D})=>{const I=$ instanceof Text?$.parentNode:$;let G=parseInt(I==null?void 0:I.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;const F=this._rowColumns.get(I);if(!F)return console.warn("columns is null. Race condition?"),null;let Q=D=this._terminal.cols&&(++G,Q=0),{row:G,column:Q}},A=N(y),z=N(S);if(A&&z){if(A.row>z.row||A.row===z.row&&A.column>=z.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(z.row-A.row)*this._terminal.cols-A.column+z.column)}}_handleResize(x){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yx;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const x=this._coreBrowserService.mainDocument.createElement("div");return x.setAttribute("role","listitem"),x.tabIndex=-1,this._refreshRowDimensions(x),x}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let x=0;x{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function d(p,m,k,w){p=u(p=c(p),k.decPrivateModes.bracketedPasteMode&&w.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(p,!0),m.value=""}function _(p,m,k){const w=k.getBoundingClientRect(),v=p.clientX-w.left-10,b=p.clientY-w.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}px`,m.style.zIndex="1000",m.focus()}Object.defineProperty(i,"__esModule",{value:!0}),i.rightClickHandler=i.moveTextAreaUnderMouseCursor=i.paste=i.handlePasteEvent=i.copyHandler=i.bracketTextForPaste=i.prepareTextForTerminal=void 0,i.prepareTextForTerminal=c,i.bracketTextForPaste=u,i.copyHandler=function(p,m){p.clipboardData&&p.clipboardData.setData("text/plain",m.selectionText),p.preventDefault()},i.handlePasteEvent=function(p,m,k,w){p.stopPropagation(),p.clipboardData&&d(p.clipboardData.getData("text/plain"),m,k,w)},i.paste=d,i.moveTextAreaUnderMouseCursor=_,i.rightClickHandler=function(p,m,k,w,v){_(p,m,k),v&&w.rightClickSelect(p),m.value=w.selectionText,m.select()}},7239:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const u=c(1505);i.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(d,_,p){this._css.set(d,_,p)}getCss(d,_){return this._css.get(d,_)}setColor(d,_,p){this._color.set(d,_,p)}getColor(d,_){return this._color.get(d,_)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(c,u,d,_){c.addEventListener(u,d,_);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,d,_))}}}},3551:function(a,i,c){var u=this&&this.__decorate||function(b,x,y,S){var E,N=arguments.length,A=N<3?x:S===null?S=Object.getOwnPropertyDescriptor(x,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,x,y,S);else for(var z=b.length-1;z>=0;z--)(E=b[z])&&(A=(N<3?E(A):N>3?E(x,y,A):E(x,y))||A);return N>3&&A&&Object.defineProperty(x,y,A),A},d=this&&this.__param||function(b,x){return function(y,S){x(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Linkifier=void 0;const _=c(3656),p=c(8460),m=c(844),k=c(2585),w=c(4725);let v=i.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(b,x,y,S,E){super(),this._element=b,this._mouseService=x,this._renderService=y,this._bufferService=S,this._linkProviderService=E,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,m.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,m.toDisposable)((()=>{var N;this._lastMouseEvent=void 0,(N=this._activeProviderReplies)==null||N.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,_.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,_.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const x=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!x)return;this._isMouseOut=!1;const y=b.composedPath();for(let S=0;S{N==null||N.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let y=!1;for(const[N,A]of this._linkProviderService.linkProviders.entries())x?(E=this._activeProviderReplies)!=null&&E.get(N)&&(y=this._checkLinkProviderResult(N,b,y)):A.provideLinks(b.y,(z=>{var $,D;if(this._isMouseOut)return;const M=z==null?void 0:z.map((I=>({link:I})));($=this._activeProviderReplies)==null||$.set(N,M),y=this._checkLinkProviderResult(N,b,y),((D=this._activeProviderReplies)==null?void 0:D.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,x){const y=new Set;for(let S=0;Sb?this._bufferService.cols:A.link.range.end.x;for(let $=z;$<=M;$++){if(y.has($)){E.splice(N--,1);break}y.add($)}}}}_checkLinkProviderResult(b,x,y){var N;if(!this._activeProviderReplies)return y;const S=this._activeProviderReplies.get(b);let E=!1;for(let A=0;Athis._linkAtPosition(z.link,x)));A&&(y=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let A=0;Athis._linkAtPosition(M.link,x)));if(z){y=!0,this._handleNewLink(z);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const x=this._positionFromMouseEvent(b,this._element,this._mouseService);x&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,x)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,x){this._currentLink&&this._lastMouseEvent&&(!b||!x||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=x)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(b.link,x)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var y,S;return(S=(y=this._currentLink)==null?void 0:y.state)==null?void 0:S.decorations.pointerCursor},set:y=>{var S;(S=this._currentLink)!=null&&S.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,S;return(S=(y=this._currentLink)==null?void 0:y.state)==null?void 0:S.decorations.underline},set:y=>{var S,E,N;(S=this._currentLink)!=null&&S.state&&((N=(E=this._currentLink)==null?void 0:E.state)==null?void 0:N.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const S=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,E=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(S,E),this._lastMouseEvent)){const N=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);N&&this._askForLink(N,!1)}}))))}_linkHover(b,x,y){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),x.hover&&x.hover(y,x.text)}_fireUnderlineEvent(b,x){const y=b.range,S=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-S-1,y.end.x,y.end.y-S-1,void 0);(x?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(b,x,y){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),x.leave&&x.leave(y,x.text)}_linkAtPosition(b,x){const y=b.range.start.y*this._bufferService.cols+b.range.start.x,S=b.range.end.y*this._bufferService.cols+b.range.end.x,E=x.y*this._bufferService.cols+x.x;return y<=E&&E<=S}_positionFromMouseEvent(b,x,y){const S=y.getCoords(b,x,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,x,y,S,E){return{x1:b,y1:x,x2:y,y2:S,cols:this._bufferService.cols,fg:E}}};i.Linkifier=v=u([d(1,w.IMouseService),d(2,w.IRenderService),d(3,k.IBufferService),d(4,w.ILinkProviderService)],v)},9042:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.tooMuchOutput=i.promptLabel=void 0,i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,i,c){var u=this&&this.__decorate||function(w,v,b,x){var y,S=arguments.length,E=S<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(w,v,b,x);else for(var N=w.length-1;N>=0;N--)(y=w[N])&&(E=(S<3?y(E):S>3?y(v,b,E):y(v,b))||E);return S>3&&E&&Object.defineProperty(v,b,E),E},d=this&&this.__param||function(w,v){return function(b,x){v(b,x,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkProvider=void 0;const _=c(511),p=c(2585);let m=i.OscLinkProvider=class{constructor(w,v,b){this._bufferService=w,this._optionsService=v,this._oscLinkService=b}provideLinks(w,v){var M;const b=this._bufferService.buffer.lines.get(w-1);if(!b)return void v(void 0);const x=[],y=this._optionsService.rawOptions.linkHandler,S=new _.CellData,E=b.getTrimmedLength();let N=-1,A=-1,z=!1;for(let $=0;$y?y.activate(F,Q,I):k(0,Q),hover:(F,Q)=>{var K;return(K=y==null?void 0:y.hover)==null?void 0:K.call(y,F,Q,I)},leave:(F,Q)=>{var K;return(K=y==null?void 0:y.leave)==null?void 0:K.call(y,F,Q,I)}})}z=!1,S.hasExtendedAttrs()&&S.extended.urlId?(A=$,N=S.extended.urlId):(A=-1,N=-1)}}v(x)}};function k(w,v){if(confirm(`Do you want to navigate to ${v}? -WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}i.OscLinkProvider=m=u([d(0,p.IBufferService),d(1,p.IOptionsService),d(2,p.IOscLinkService)],m)},6193:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.RenderDebouncer=void 0,i.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Terminal=void 0;const u=c(3614),d=c(3656),_=c(3551),p=c(9042),m=c(3730),k=c(1680),x=c(3107),v=c(5744),b=c(2950),w=c(1296),y=c(428),S=c(4269),z=c(5114),N=c(8934),A=c(3230),E=c(9312),M=c(4725),$=c(6731),D=c(8055),I=c(8969),G=c(8460),H=c(844),Q=c(6114),K=c(8437),J=c(2584),ee=c(7399),P=c(5941),L=c(9074),F=c(2585),q=c(5435),U=c(4567),oe=c(779);class ie extends I.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(re={}){super(re),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new H.MutableDisposable),this._onCursorMove=this.register(new G.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new G.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new G.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new G.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new G.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new G.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new G.EventEmitter),this._onBlur=this.register(new G.EventEmitter),this._onA11yCharEmitter=this.register(new G.EventEmitter),this._onA11yTabEmitter=this.register(new G.EventEmitter),this._onWillOpen=this.register(new G.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(oe.LinkProviderService),this._instantiationService.setService(M.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(m.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((W,ae)=>this.refresh(W,ae)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((W=>this._reportWindowsOptions(W)))),this.register(this._inputHandler.onColor((W=>this._handleColorEvent(W)))),this.register((0,G.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,G.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((W=>this._afterResize(W.cols,W.rows)))),this.register((0,H.toDisposable)((()=>{var W,ae;this._customKeyEventHandler=void 0,(ae=(W=this.element)==null?void 0:W.parentNode)==null||ae.removeChild(this.element)})))}_handleColorEvent(re){if(this._themeService)for(const W of re){let ae,le="";switch(W.index){case 256:ae="foreground",le="10";break;case 257:ae="background",le="11";break;case 258:ae="cursor",le="12";break;default:ae="ansi",le="4;"+W.index}switch(W.type){case 0:const me=D.color.toColorRGB(ae==="ansi"?this._themeService.colors.ansi[W.index]:this._themeService.colors[ae]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${le};${(0,P.toRgbString)(me)}${J.C1_ESCAPED.ST}`);break;case 1:if(ae==="ansi")this._themeService.modifyColors((be=>be.ansi[W.index]=D.channels.toColor(...W.color)));else{const be=ae;this._themeService.modifyColors((Se=>Se[be]=D.channels.toColor(...W.color)))}break;case 2:this._themeService.restoreColor(W.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(re){re?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(U.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(re){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var re;return(re=this.textarea)==null?void 0:re.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const re=this.buffer.ybase+this.buffer.y,W=this.buffer.lines.get(re);if(!W)return;const ae=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,me=W.getWidth(ae),be=this._renderService.dimensions.css.cell.width*me,Se=this.buffer.y*this._renderService.dimensions.css.cell.height,Be=ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Be+"px",this.textarea.style.top=Se+"px",this.textarea.style.width=be+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(W=>{this.hasSelection()&&(0,u.copyHandler)(W,this._selectionService)})));const re=W=>(0,u.handlePasteEvent)(W,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",re)),this.register((0,d.addDisposableDomListener)(this.element,"paste",re)),Q.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(W=>{W.button===2&&(0,u.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(W=>{(0,u.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(W=>{W.button===1&&(0,u.moveTextAreaUnderMouseCursor)(W,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(re=>this._keyUp(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(re=>this._keyDown(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(re=>this._keyPress(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(re=>this._compositionHelper.compositionupdate(re)))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(re=>this._inputEvent(re)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(re){var ae;if(!re)throw new Error("Terminal requires a parent element.");if(re.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ae=this.element)==null?void 0:ae.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=re.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),re.appendChild(this.element);const W=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),W.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,d.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),W.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Q.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(z.CoreBrowserService,this.textarea,re.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance($.ThemeService),this._instantiationService.setService(M.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(M.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(N.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(_.Linkifier,this.screenElement)),this.element.appendChild(W);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(k.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(E.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(U.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(w.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const re=this,W=this.element;function ae(be){const Se=re._mouseService.getMouseReportCoords(be,re.screenElement);if(!Se)return!1;let Be,Xe;switch(be.overrideType||be.type){case"mousemove":Xe=32,be.buttons===void 0?(Be=3,be.button!==void 0&&(Be=be.button<3?be.button:3)):Be=1&be.buttons?0:4&be.buttons?1:2&be.buttons?2:3;break;case"mouseup":Xe=0,Be=be.button<3?be.button:3;break;case"mousedown":Xe=1,Be=be.button<3?be.button:3;break;case"wheel":if(re._customWheelEventHandler&&re._customWheelEventHandler(be)===!1||re.viewport.getLinesScrolled(be)===0)return!1;Xe=be.deltaY<0?0:1,Be=4;break;default:return!1}return!(Xe===void 0||Be===void 0||Be>4)&&re.coreMouseService.triggerMouseEvent({col:Se.col,row:Se.row,x:Se.x,y:Se.y,button:Be,action:Xe,ctrl:be.ctrlKey,alt:be.altKey,shift:be.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},me={mouseup:be=>(ae(be),be.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(be)),wheel:be=>(ae(be),this.cancel(be,!0)),mousedrag:be=>{be.buttons&&ae(be)},mousemove:be=>{be.buttons||ae(be)}};this.register(this.coreMouseService.onProtocolChange((be=>{be?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(be)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&be?le.mousemove||(W.addEventListener("mousemove",me.mousemove),le.mousemove=me.mousemove):(W.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&be?le.wheel||(W.addEventListener("wheel",me.wheel,{passive:!1}),le.wheel=me.wheel):(W.removeEventListener("wheel",le.wheel),le.wheel=null),2&be?le.mouseup||(le.mouseup=me.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&be?le.mousedrag||(le.mousedrag=me.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(W,"mousedown",(be=>{if(be.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(be))return ae(be),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(be)}))),this.register((0,d.addDisposableDomListener)(W,"wheel",(be=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(be)===!1)return!1;if(!this.buffer.hasScrollback){const Se=this.viewport.getLinesScrolled(be);if(Se===0)return;const Be=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(be.deltaY<0?"A":"B");let Xe="";for(let Me=0;Me{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(be),this.cancel(be)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(W,"touchmove",(be=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(be)?void 0:this.cancel(be)}),{passive:!1}))}refresh(re,W){var ae;(ae=this._renderService)==null||ae.refreshRows(re,W)}updateCursorStyle(re){var W;(W=this._selectionService)!=null&&W.shouldColumnSelect(re)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(re,W,ae=0){var le;ae===1?(super.scrollLines(re,W,ae),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(re)}paste(re){(0,u.paste)(re,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(re){this._customKeyEventHandler=re}attachCustomWheelEventHandler(re){this._customWheelEventHandler=re}registerLinkProvider(re){return this._linkProviderService.registerLinkProvider(re)}registerCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const W=this._characterJoinerService.register(re);return this.refresh(0,this.rows-1),W}deregisterCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(re)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(re){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+re)}registerDecoration(re){return this._decorationService.registerDecoration(re)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(re,W,ae){this._selectionService.setSelection(re,W,ae)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var re;(re=this._selectionService)==null||re.clearSelection()}selectAll(){var re;(re=this._selectionService)==null||re.selectAll()}selectLines(re,W){var ae;(ae=this._selectionService)==null||ae.selectLines(re,W)}_keyDown(re){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;const W=this.browser.isMac&&this.options.macOptionIsMeta&&re.altKey;if(!W&&!this._compositionHelper.keydown(re))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;W||re.key!=="Dead"&&re.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ae=(0,ee.evaluateKeyboardEvent)(re,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(re),ae.type===3||ae.type===2){const le=this.rows-1;return this.scrollLines(ae.type===2?-le:le),this.cancel(re,!0)}return ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,re)||(ae.cancel&&this.cancel(re,!0),!ae.key||!!(re.key&&!re.ctrlKey&&!re.altKey&&!re.metaKey&&re.key.length===1&&re.key.charCodeAt(0)>=65&&re.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ae.key!==J.C0.ETX&&ae.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ae.key,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||re.altKey||re.ctrlKey?this.cancel(re,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(re,W){const ae=re.isMac&&!this.options.macOptionIsMeta&&W.altKey&&!W.ctrlKey&&!W.metaKey||re.isWindows&&W.altKey&&W.ctrlKey&&!W.metaKey||re.isWindows&&W.getModifierState("AltGraph");return W.type==="keypress"?ae:ae&&(!W.keyCode||W.keyCode>47)}_keyUp(re){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1||((function(W){return W.keyCode===16||W.keyCode===17||W.keyCode===18})(re)||this.focus(),this.updateCursorStyle(re),this._keyPressHandled=!1)}_keyPress(re){let W;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;if(this.cancel(re),re.charCode)W=re.charCode;else if(re.which===null||re.which===void 0)W=re.keyCode;else{if(re.which===0||re.charCode===0)return!1;W=re.which}return!(!W||(re.altKey||re.ctrlKey||re.metaKey)&&!this._isThirdLevelShift(this.browser,re)||(W=String.fromCharCode(W),this._onKey.fire({key:W,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(W,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(re){if(re.data&&re.inputType==="insertText"&&(!re.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const W=re.data;return this.coreService.triggerDataEvent(W,!0),this.cancel(re),!0}return!1}resize(re,W){re!==this.cols||W!==this.rows?super.resize(re,W):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(re,W){var ae,le;(ae=this._charSizeService)==null||ae.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var re;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let W=1;W{Object.defineProperty(i,"__esModule",{value:!0}),i.TimeBasedDebouncer=void 0,i.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const _=Date.now();if(_-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=_,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=_-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),m)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(a,i,c){var u=this&&this.__decorate||function(b,w,y,S){var z,N=arguments.length,A=N<3?w:S===null?S=Object.getOwnPropertyDescriptor(w,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,w,y,S);else for(var E=b.length-1;E>=0;E--)(z=b[E])&&(A=(N<3?z(A):N>3?z(w,y,A):z(w,y))||A);return N>3&&A&&Object.defineProperty(w,y,A),A},d=this&&this.__param||function(b,w){return function(y,S){w(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Viewport=void 0;const _=c(3656),p=c(4725),m=c(8460),k=c(844),x=c(2585);let v=i.Viewport=class extends k.Disposable{constructor(b,w,y,S,z,N,A,E){super(),this._viewportElement=b,this._scrollArea=w,this._bufferService=y,this._optionsService=S,this._charSizeService=z,this._renderService=N,this._coreBrowserService=A,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((M=>this._activeBuffer=M.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((M=>this._renderDimensions=M))),this._handleThemeChange(E.colors),this.register(E.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(b){if(b)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:w,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(b,w){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&y0&&(y=I),S=""}}return{bufferElements:z,cursorElement:y}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w}_applyScrollModifier(b,w){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&w.altKey||y==="ctrl"&&w.ctrlKey||y==="shift"&&w.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const w=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))}};i.Viewport=v=u([d(2,x.IBufferService),d(3,x.IOptionsService),d(4,p.ICharSizeService),d(5,p.IRenderService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],v)},3107:function(a,i,c){var u=this&&this.__decorate||function(x,v,b,w){var y,S=arguments.length,z=S<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,v,b,w);else for(var N=x.length-1;N>=0;N--)(y=x[N])&&(z=(S<3?y(z):S>3?y(v,b,z):y(v,b))||z);return S>3&&z&&Object.defineProperty(v,b,z),z},d=this&&this.__param||function(x,v){return function(b,w){v(b,w,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferDecorationRenderer=void 0;const _=c(4725),p=c(844),m=c(2585);let k=i.BufferDecorationRenderer=class extends p.Disposable{constructor(x,v,b,w,y){super(),this._screenElement=x,this._bufferService=v,this._coreBrowserService=b,this._decorationService=w,this._renderService=y,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((S=>this._removeDecoration(S)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){var w;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((w=x==null?void 0:x.options)==null?void 0:w.layer)==="top"),v.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=x.options.x??0;return b&&b>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(x,v),v}_refreshStyle(x){const v=x.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let b=this._decorationElements.get(x);b||(b=this._createElement(x),x.element=b,this._decorationElements.set(x,b),this._container.appendChild(b),x.onDispose((()=>{this._decorationElements.delete(x),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(b)}}_refreshXPosition(x,v=x.element){if(!v)return;const b=x.options.x??0;(x.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var v;(v=this._decorationElements.get(x))==null||v.remove(),this._decorationElements.delete(x),x.dispose()}};i.BufferDecorationRenderer=k=u([d(1,m.IBufferService),d(2,_.ICoreBrowserService),d(3,m.IDecorationService),d(4,_.IRenderService)],k)},5871:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorZoneStore=void 0,i.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,d){return u>=c.startBufferLine-this._linePadding[d||"full"]&&u<=c.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(a,i,c){var u=this&&this.__decorate||function(y,S,z,N){var A,E=arguments.length,M=E<3?S:N===null?N=Object.getOwnPropertyDescriptor(S,z):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,S,z,N);else for(var $=y.length-1;$>=0;$--)(A=y[$])&&(M=(E<3?A(M):E>3?A(S,z,M):A(S,z))||M);return E>3&&M&&Object.defineProperty(S,z,M),M},d=this&&this.__param||function(y,S){return function(z,N){S(z,N,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OverviewRulerRenderer=void 0;const _=c(5871),p=c(4725),m=c(844),k=c(2585),x={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let w=i.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,S,z,N,A,E,M){var D;super(),this._viewportElement=y,this._screenElement=S,this._bufferService=z,this._decorationService=N,this._renderService=A,this._optionsService=E,this._coreBrowserService=M,this._colorZoneStore=new _.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(D=this._viewportElement.parentElement)==null||D.insertBefore(this._canvas,this._viewportElement);const $=this._canvas.getContext("2d");if(!$)throw new Error("Ctx cannot be null");this._ctx=$,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var I;(I=this._canvas)==null||I.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const y=Math.floor(this._canvas.width/3),S=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=y,v.center=S,v.right=y,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);x.left=S,x.center=S,x.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const y=this._colorZoneStore.zones;for(const S of y)S.position!=="full"&&this._renderColorZone(S);for(const S of y)S.position==="full"&&this._renderColorZone(S);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(b[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-x[y.position||"full"]/2),v[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[y.position||"full"]))}_queueRefresh(y,S){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};i.OverviewRulerRenderer=w=u([d(2,k.IBufferService),d(3,k.IDecorationService),d(4,p.IRenderService),d(5,k.IOptionsService),d(6,p.ICoreBrowserService)],w)},2950:function(a,i,c){var u=this&&this.__decorate||function(x,v,b,w){var y,S=arguments.length,z=S<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,v,b,w);else for(var N=x.length-1;N>=0;N--)(y=x[N])&&(z=(S<3?y(z):S>3?y(v,b,z):y(v,b))||z);return S>3&&z&&Object.defineProperty(v,b,z),z},d=this&&this.__param||function(x,v){return function(b,w){v(b,w,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CompositionHelper=void 0;const _=c(4725),p=c(2585),m=c(2584);let k=i.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,v,b,w,y,S){this._textarea=x,this._compositionView=v,this._bufferService=b,this._optionsService=w,this._coreService=y,this._renderService=S,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,b=v.replace(x,"");this._dataAlreadySent=b,v.length>x.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};i.CompositionHelper=k=u([d(2,p.IBufferService),d(3,p.IOptionsService),d(4,p.ICoreService),d(5,_.IRenderService)],k)},9806:(a,i)=>{function c(u,d,_){const p=_.getBoundingClientRect(),m=u.getComputedStyle(_),k=parseInt(m.getPropertyValue("padding-left")),x=parseInt(m.getPropertyValue("padding-top"));return[d.clientX-p.left-k,d.clientY-p.top-x]}Object.defineProperty(i,"__esModule",{value:!0}),i.getCoords=i.getCoordsRelativeToElement=void 0,i.getCoordsRelativeToElement=c,i.getCoords=function(u,d,_,p,m,k,x,v,b){if(!k)return;const w=c(u,d,_);return w?(w[0]=Math.ceil((w[0]+(b?x/2:0))/x),w[1]=Math.ceil(w[1]/v),w[0]=Math.min(Math.max(w[0],1),p+(b?1:0)),w[1]=Math.min(Math.max(w[1],1),m),w):void 0}},9504:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.moveToCellSequence=void 0;const u=c(2584);function d(v,b,w,y){const S=v-_(v,w),z=b-_(b,w),N=Math.abs(S-z)-(function(A,E,M){let $=0;const D=A-_(A,M),I=E-_(E,M);for(let G=0;G=0&&vb?"A":"B"}function m(v,b,w,y,S,z){let N=v,A=b,E="";for(;N!==w||A!==y;)N+=S?1:-1,S&&N>z.cols-1?(E+=z.buffer.translateBufferLineToString(A,!1,v,N),N=0,v=0,A++):!S&&N<0&&(E+=z.buffer.translateBufferLineToString(A,!1,0,v+1),N=z.cols-1,v=N,A--);return E+z.buffer.translateBufferLineToString(A,!1,v,N)}function k(v,b){const w=b?"O":"[";return u.C0.ESC+w+v}function x(v,b){v=Math.floor(v);let w="";for(let y=0;y0?D-_(D,I):M;const Q=D,K=(function(J,ee,P,L,F,q){let U;return U=d(P,L,F,q).length>0?L-_(L,F):ee,J=P&&Uv?"D":"C",x(Math.abs(S-v),k(N,y));N=z>b?"D":"C";const A=Math.abs(z-b);return x((function(E,M){return M.cols-E})(z>b?v:S,w)+(A-1)*w.cols+1+((z>b?S:v)-1),k(N,y))}},1296:function(a,i,c){var u=this&&this.__decorate||function(G,H,Q,K){var J,ee=arguments.length,P=ee<3?H:K===null?K=Object.getOwnPropertyDescriptor(H,Q):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(G,H,Q,K);else for(var L=G.length-1;L>=0;L--)(J=G[L])&&(P=(ee<3?J(P):ee>3?J(H,Q,P):J(H,Q))||P);return ee>3&&P&&Object.defineProperty(H,Q,P),P},d=this&&this.__param||function(G,H){return function(Q,K){H(Q,K,G)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRenderer=void 0;const _=c(3787),p=c(2550),m=c(2223),k=c(6171),x=c(6052),v=c(4725),b=c(8055),w=c(8460),y=c(844),S=c(2585),z="xterm-dom-renderer-owner-",N="xterm-rows",A="xterm-fg-",E="xterm-bg-",M="xterm-focus",$="xterm-selection";let D=1,I=i.DomRenderer=class extends y.Disposable{constructor(G,H,Q,K,J,ee,P,L,F,q,U,oe,ie){super(),this._terminal=G,this._document=H,this._element=Q,this._screenElement=K,this._viewportElement=J,this._helperContainer=ee,this._linkifier2=P,this._charSizeService=F,this._optionsService=q,this._bufferService=U,this._coreBrowserService=oe,this._themeService=ie,this._terminalClass=D++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new w.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(N),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add($),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,k.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ce=>this._injectCss(ce)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(_.DomRendererRowFactory,document),this._element.classList.add(z+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ce=>this._handleLinkHover(ce)))),this.register(this._linkifier2.onHideLinkUnderline((ce=>this._handleLinkLeave(ce)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(z+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const G=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*G,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*G),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/G),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/G),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const Q of this._rowElements)Q.style.width=`${this.dimensions.css.canvas.width}px`,Q.style.height=`${this.dimensions.css.cell.height}px`,Q.style.lineHeight=`${this.dimensions.css.cell.height}px`,Q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const H=`${this._terminalSelector} .${N} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=H,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(G){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let H=`${this._terminalSelector} .${N} { color: ${G.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;H+=`${this._terminalSelector} .${N} .xterm-dim { color: ${b.color.multiplyOpacity(G.foreground,.5).css};}`,H+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const Q=`blink_underline_${this._terminalClass}`,K=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;H+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,H+=`@keyframes ${K} { 50% { box-shadow: none; }}`,H+=`@keyframes ${J} { 0% { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css}; } 50% { background-color: inherit; color: ${G.cursor.css}; }}`,H+=`${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css};}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${G.cursor.css} !important; color: ${G.cursorAccent.css} !important;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${G.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${G.cursor.css} inset;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${G.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,H+=`${this._terminalSelector} .${$} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${$} div { position: absolute; background-color: ${G.selectionBackgroundOpaque.css};}${this._terminalSelector} .${$} div { position: absolute; background-color: ${G.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,P]of G.ansi.entries())H+=`${this._terminalSelector} .${A}${ee} { color: ${P.css}; }${this._terminalSelector} .${A}${ee}.xterm-dim { color: ${b.color.multiplyOpacity(P,.5).css}; }${this._terminalSelector} .${E}${ee} { background-color: ${P.css}; }`;H+=`${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(G.background).css}; }${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(G.background),.5).css}; }${this._terminalSelector} .${E}${m.INVERTED_DEFAULT_COLOR} { background-color: ${G.foreground.css}; }`,this._themeStyleElement.textContent=H}_setDefaultSpacing(){const G=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${G}px`,this._rowFactory.defaultSpacing=G}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(G,H){for(let Q=this._rowElements.length;Q<=H;Q++){const K=this._document.createElement("div");this._rowContainer.appendChild(K),this._rowElements.push(K)}for(;this._rowElements.length>H;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(G,H){this._refreshRowElements(G,H),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(M),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(M),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(G,H,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(G,H,Q),this.renderRows(0,this._bufferService.rows-1),!G||!H)return;this._selectionRenderModel.update(this._terminal,G,H,Q);const K=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,P=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||P<0)return;const L=this._document.createDocumentFragment();if(Q){const F=G[0]>H[0];L.appendChild(this._createSelectionElement(ee,F?H[0]:G[0],F?G[0]:H[0],P-ee+1))}else{const F=K===ee?G[0]:0,q=ee===J?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(ee,F,q));const U=P-ee-1;if(L.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,U)),ee!==P){const oe=J===P?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(P,0,oe))}}this._selectionContainer.appendChild(L)}_createSelectionElement(G,H,Q,K=1){const J=this._document.createElement("div"),ee=H*this.dimensions.css.cell.width;let P=this.dimensions.css.cell.width*(Q-H);return ee+P>this.dimensions.css.canvas.width&&(P=this.dimensions.css.canvas.width-ee),J.style.height=K*this.dimensions.css.cell.height+"px",J.style.top=G*this.dimensions.css.cell.height+"px",J.style.left=`${ee}px`,J.style.width=`${P}px`,J}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const G of this._rowElements)G.replaceChildren()}renderRows(G,H){const Q=this._bufferService.buffer,K=Q.ybase+Q.y,J=Math.min(Q.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,P=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=G;F<=H;F++){const q=F+Q.ydisp,U=this._rowElements[F],oe=Q.lines.get(q);if(!U||!oe)break;U.replaceChildren(...this._rowFactory.createRow(oe,q,q===K,P,L,J,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${z}${this._terminalClass}`}_handleLinkHover(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!0)}_handleLinkLeave(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!1)}_setCellUnderline(G,H,Q,K,J,ee){Q<0&&(G=0),K<0&&(H=0);const P=this._bufferService.rows-1;Q=Math.max(Math.min(Q,P),0),K=Math.max(Math.min(K,P),0),J=Math.min(J,this._bufferService.cols);const L=this._bufferService.buffer,F=L.ybase+L.y,q=Math.min(L.x,J-1),U=this._optionsService.rawOptions.cursorBlink,oe=this._optionsService.rawOptions.cursorStyle,ie=this._optionsService.rawOptions.cursorInactiveStyle;for(let ce=Q;ce<=K;++ce){const re=ce+L.ydisp,W=this._rowElements[ce],ae=L.lines.get(re);if(!W||!ae)break;W.replaceChildren(...this._rowFactory.createRow(ae,re,re===F,oe,ie,q,U,this.dimensions.css.cell.width,this._widthCache,ee?ce===Q?G:0:-1,ee?(ce===K?H:J)-1:-1))}}};i.DomRenderer=I=u([d(7,S.IInstantiationService),d(8,v.ICharSizeService),d(9,S.IOptionsService),d(10,S.IBufferService),d(11,v.ICoreBrowserService),d(12,v.IThemeService)],I)},3787:function(a,i,c){var u=this&&this.__decorate||function(N,A,E,M){var $,D=arguments.length,I=D<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,E):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(N,A,E,M);else for(var G=N.length-1;G>=0;G--)($=N[G])&&(I=(D<3?$(I):D>3?$(A,E,I):$(A,E))||I);return D>3&&I&&Object.defineProperty(A,E,I),I},d=this&&this.__param||function(N,A){return function(E,M){A(E,M,N)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRendererRowFactory=void 0;const _=c(2223),p=c(643),m=c(511),k=c(2585),x=c(8055),v=c(4725),b=c(4269),w=c(6171),y=c(3734);let S=i.DomRendererRowFactory=class{constructor(N,A,E,M,$,D,I){this._document=N,this._characterJoinerService=A,this._optionsService=E,this._coreBrowserService=M,this._coreService=$,this._decorationService=D,this._themeService=I,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(N,A,E){this._selectionStart=N,this._selectionEnd=A,this._columnSelectMode=E}createRow(N,A,E,M,$,D,I,G,H,Q,K){const J=[],ee=this._characterJoinerService.getJoinedCharacters(A),P=this._themeService.colors;let L,F=N.getNoBgTrimmedLength();E&&F0&&Se===ee[0][0]){Xe=!0;const at=ee.shift();Fe=new b.JoinedCellData(this._workCell,N.translateToString(!0,at[0],at[1]),at[1]-at[0]),Me=at[1]-1,Be=Fe.getWidth()}const pt=this._isCellInSelection(Se,A),Ct=E&&Se===D,Vt=be&&Se>=Q&&Se<=K;let Ut=!1;this._decorationService.forEachDecorationAtCell(Se,A,void 0,(at=>{Ut=!0}));let Gt=Fe.getChars()||p.WHITESPACE_CELL_CHAR;if(Gt===" "&&(Fe.isUnderline()||Fe.isOverline())&&(Gt=" "),le=Be*G-H.get(Gt,Fe.isBold(),Fe.isItalic()),L){if(q&&(pt&&ae||!pt&&!ae&&Fe.bg===oe)&&(pt&&ae&&P.selectionForeground||Fe.fg===ie)&&Fe.extended.ext===ce&&Vt===re&&le===W&&!Ct&&!Xe&&!Ut){Fe.isInvisible()?U+=p.WHITESPACE_CELL_CHAR:U+=Gt,q++;continue}q&&(L.textContent=U),L=this._document.createElement("span"),q=0,U=""}else L=this._document.createElement("span");if(oe=Fe.bg,ie=Fe.fg,ce=Fe.extended.ext,re=Vt,W=le,ae=pt,Xe&&D>=Se&&D<=Me&&(D=Se),!this._coreService.isCursorHidden&&Ct&&this._coreService.isCursorInitialized){if(me.push("xterm-cursor"),this._coreBrowserService.isFocused)I&&me.push("xterm-cursor-blink"),me.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if($)switch($){case"outline":me.push("xterm-cursor-outline");break;case"block":me.push("xterm-cursor-block");break;case"bar":me.push("xterm-cursor-bar");break;case"underline":me.push("xterm-cursor-underline")}}if(Fe.isBold()&&me.push("xterm-bold"),Fe.isItalic()&&me.push("xterm-italic"),Fe.isDim()&&me.push("xterm-dim"),U=Fe.isInvisible()?p.WHITESPACE_CELL_CHAR:Fe.getChars()||p.WHITESPACE_CELL_CHAR,Fe.isUnderline()&&(me.push(`xterm-underline-${Fe.extended.underlineStyle}`),U===" "&&(U=" "),!Fe.isUnderlineColorDefault()))if(Fe.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Fe.getUnderlineColor()).join(",")})`;else{let at=Fe.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Fe.isBold()&&at<8&&(at+=8),L.style.textDecorationColor=P.ansi[at].css}Fe.isOverline()&&(me.push("xterm-overline"),U===" "&&(U=" ")),Fe.isStrikethrough()&&me.push("xterm-strikethrough"),Vt&&(L.style.textDecoration="underline");let De=Fe.getFgColor(),ct=Fe.getFgColorMode(),lt=Fe.getBgColor(),xe=Fe.getBgColorMode();const Ie=!!Fe.isInverse();if(Ie){const at=De;De=lt,lt=at;const At=ct;ct=xe,xe=At}let Ye,Ae,Ve,Ze=!1;switch(this._decorationService.forEachDecorationAtCell(Se,A,void 0,(at=>{at.options.layer!=="top"&&Ze||(at.backgroundColorRGB&&(xe=50331648,lt=at.backgroundColorRGB.rgba>>8&16777215,Ye=at.backgroundColorRGB),at.foregroundColorRGB&&(ct=50331648,De=at.foregroundColorRGB.rgba>>8&16777215,Ae=at.foregroundColorRGB),Ze=at.options.layer==="top")})),!Ze&&pt&&(Ye=this._coreBrowserService.isFocused?P.selectionBackgroundOpaque:P.selectionInactiveBackgroundOpaque,lt=Ye.rgba>>8&16777215,xe=50331648,Ze=!0,P.selectionForeground&&(ct=50331648,De=P.selectionForeground.rgba>>8&16777215,Ae=P.selectionForeground)),Ze&&me.push("xterm-decoration-top"),xe){case 16777216:case 33554432:Ve=P.ansi[lt],me.push(`xterm-bg-${lt}`);break;case 50331648:Ve=x.channels.toColor(lt>>16,lt>>8&255,255<),this._addStyle(L,`background-color:#${z((lt>>>0).toString(16),"0",6)}`);break;default:Ie?(Ve=P.foreground,me.push(`xterm-bg-${_.INVERTED_DEFAULT_COLOR}`)):Ve=P.background}switch(Ye||Fe.isDim()&&(Ye=x.color.multiplyOpacity(Ve,.5)),ct){case 16777216:case 33554432:Fe.isBold()&&De<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(De+=8),this._applyMinimumContrast(L,Ve,P.ansi[De],Fe,Ye,void 0)||me.push(`xterm-fg-${De}`);break;case 50331648:const at=x.channels.toColor(De>>16&255,De>>8&255,255&De);this._applyMinimumContrast(L,Ve,at,Fe,Ye,Ae)||this._addStyle(L,`color:#${z(De.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,Ve,P.foreground,Fe,Ye,Ae)||Ie&&me.push(`xterm-fg-${_.INVERTED_DEFAULT_COLOR}`)}me.length&&(L.className=me.join(" "),me.length=0),Ct||Xe||Ut?L.textContent=U:q++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),J.push(L),Se=Me}return L&&q&&(L.textContent=U),J}_applyMinimumContrast(N,A,E,M,$,D){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const I=this._getContrastCache(M);let G;if($||D||(G=I.getColor(A.rgba,E.rgba)),G===void 0){const H=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);G=x.color.ensureContrastRatio($||A,D||E,H),I.setColor(($||A).rgba,(D||E).rgba,G??null)}return!!G&&(this._addStyle(N,`color:${G.css}`),!0)}_getContrastCache(N){return N.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(N,A){N.setAttribute("style",`${N.getAttribute("style")||""}${A};`)}_isCellInSelection(N,A){const E=this._selectionStart,M=this._selectionEnd;return!(!E||!M)&&(this._columnSelectMode?E[0]<=M[0]?N>=E[0]&&A>=E[1]&&N=E[1]&&N>=M[0]&&A<=M[1]:A>E[1]&&A=E[0]&&N=E[0])}};function z(N,A,E){for(;N.length{Object.defineProperty(i,"__esModule",{value:!0}),i.WidthCache=void 0,i.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const d=c.createElement("span");d.classList.add("xterm-char-measure-element");const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[d,_,p,m],this._container.appendChild(d),this._container.appendChild(_),this._container.appendChild(p),this._container.appendChild(m),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,u,d,_){c===this._font&&u===this._fontSize&&d===this._weight&&_===this._weightBold||(this._font=c,this._fontSize=u,this._weight=d,this._weightBold=_,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${_}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${_}`,this.clear())}get(c,u,d){let _=0;if(!u&&!d&&c.length===1&&(_=c.charCodeAt(0))<256){if(this._flat[_]!==-9999)return this._flat[_];const k=this._measure(c,0);return k>0&&(this._flat[_]=k),k}let p=c;u&&(p+="B"),d&&(p+="I");let m=this._holey.get(p);if(m===void 0){let k=0;u&&(k|=1),d&&(k|=2),m=this._measure(c,k),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const d=this._measureElements[u];return d.textContent=c.repeat(32),d.offsetWidth/32}}},2223:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TEXT_BASELINE=i.DIM_OPACITY=i.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);i.INVERTED_DEFAULT_COLOR=257,i.DIM_OPACITY=.5,i.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,i)=>{function c(d){return 57508<=d&&d<=57558}function u(d){return d>=128512&&d<=128591||d>=127744&&d<=128511||d>=128640&&d<=128767||d>=9728&&d<=9983||d>=9984&&d<=10175||d>=65024&&d<=65039||d>=129280&&d<=129535||d>=127462&&d<=127487}Object.defineProperty(i,"__esModule",{value:!0}),i.computeNextVariantOffset=i.createRenderDimensions=i.treatGlyphAsBackgroundColor=i.allowRescaling=i.isEmoji=i.isRestrictedPowerlineGlyph=i.isPowerlineGlyph=i.throwIfFalsy=void 0,i.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},i.isPowerlineGlyph=c,i.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},i.isEmoji=u,i.allowRescaling=function(d,_,p,m){return _===1&&p>Math.ceil(1.5*m)&&d!==void 0&&d>255&&!u(d)&&!c(d)&&!(function(k){return 57344<=k&&k<=63743})(d)},i.treatGlyphAsBackgroundColor=function(d){return c(d)||(function(_){return 9472<=_&&_<=9631})(d)},i.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},i.computeNextVariantOffset=function(d,_,p=0){return(d-(2*Math.round(_)-p))%(2*Math.round(_))}},6052:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createSelectionRenderModel=void 0;class c{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(d,_,p,m=!1){if(this.selectionStart=_,this.selectionEnd=p,!_||!p||_[0]===p[0]&&_[1]===p[1])return void this.clear();const k=d.buffers.active.ydisp,x=_[1]-k,v=p[1]-k,b=Math.max(x,0),w=Math.min(v,d.rows-1);b>=d.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=x,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=w,this.startCol=_[0],this.endCol=p[0])}isCellSelected(d,_,p){return!!this.hasSelection&&(p-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?_>=this.startCol&&p>=this.viewportCappedStartRow&&_=this.viewportCappedStartRow&&_>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&_=this.startCol)}}i.createSelectionRenderModel=function(){return new c}},456:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionModel=void 0,i.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,i,c){var u=this&&this.__decorate||function(w,y,S,z){var N,A=arguments.length,E=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(w,y,S,z);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(E=(A<3?N(E):A>3?N(y,S,E):N(y,S))||E);return A>3&&E&&Object.defineProperty(y,S,E),E},d=this&&this.__param||function(w,y){return function(S,z){y(S,z,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharSizeService=void 0;const _=c(2585),p=c(8460),m=c(844);let k=i.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,y,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new v(w,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const w=this._measureStrategy.measure();w.width===this.width&&w.height===this.height||(this.width=w.width,this.height=w.height,this._onCharSizeChange.fire())}};i.CharSizeService=k=u([d(2,_.IOptionsService)],k);class x extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,S){y!==void 0&&y>0&&S!==void 0&&S>0&&(this._result.width=y,this._result.height=S)}}class v extends x{constructor(y,S,z){super(),this._document=y,this._parentElement=S,this._optionsService=z,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class b extends x{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(a,i,c){var u=this&&this.__decorate||function(b,w,y,S){var z,N=arguments.length,A=N<3?w:S===null?S=Object.getOwnPropertyDescriptor(w,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,w,y,S);else for(var E=b.length-1;E>=0;E--)(z=b[E])&&(A=(N<3?z(A):N>3?z(w,y,A):z(w,y))||A);return N>3&&A&&Object.defineProperty(w,y,A),A},d=this&&this.__param||function(b,w){return function(y,S){w(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharacterJoinerService=i.JoinedCellData=void 0;const _=c(3734),p=c(643),m=c(511),k=c(2585);class x extends _.AttributeData{constructor(w,y,S){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=y,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(w){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.JoinedCellData=x;let v=i.CharacterJoinerService=class YI{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(w){const y={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(y),y.id}deregister(w){for(let y=0;y1){const I=this._getJoinedRanges(z,E,A,y,N);for(let G=0;G1){const D=this._getJoinedRanges(z,E,A,y,N);for(let I=0;I{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreBrowserService=void 0;const u=c(844),d=c(8460),_=c(3656);class p extends u.Disposable{constructor(x,v,b){super(),this._textarea=x,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new d.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((w=>this._screenDprMonitor.setWindow(w)))),this.register((0,d.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(x){this._window!==x&&(this._window=x,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}i.CoreBrowserService=p;class m extends u.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,_.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var x;this._outerListener&&((x=this._resolutionMediaMatchList)==null||x.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LinkProviderService=void 0;const u=c(844);class d extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const m=this.linkProviders.indexOf(p);m!==-1&&this.linkProviders.splice(m,1)}}}}i.LinkProviderService=d},8934:function(a,i,c){var u=this&&this.__decorate||function(k,x,v,b){var w,y=arguments.length,S=y<3?x:b===null?b=Object.getOwnPropertyDescriptor(x,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(k,x,v,b);else for(var z=k.length-1;z>=0;z--)(w=k[z])&&(S=(y<3?w(S):y>3?w(x,v,S):w(x,v))||S);return y>3&&S&&Object.defineProperty(x,v,S),S},d=this&&this.__param||function(k,x){return function(v,b){x(v,b,k)}};Object.defineProperty(i,"__esModule",{value:!0}),i.MouseService=void 0;const _=c(4725),p=c(9806);let m=i.MouseService=class{constructor(k,x){this._renderService=k,this._charSizeService=x}getCoords(k,x,v,b,w){return(0,p.getCoords)(window,k,x,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(k,x){const v=(0,p.getCoordsRelativeToElement)(window,k,x);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};i.MouseService=m=u([d(0,_.IRenderService),d(1,_.ICharSizeService)],m)},3230:function(a,i,c){var u=this&&this.__decorate||function(w,y,S,z){var N,A=arguments.length,E=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(w,y,S,z);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(E=(A<3?N(E):A>3?N(y,S,E):N(y,S))||E);return A>3&&E&&Object.defineProperty(y,S,E),E},d=this&&this.__param||function(w,y){return function(S,z){y(S,z,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.RenderService=void 0;const _=c(6193),p=c(4725),m=c(8460),k=c(844),x=c(7226),v=c(2585);let b=i.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,y,S,z,N,A,E,M){super(),this._rowCount=w,this._charSizeService=z,this._renderer=this.register(new k.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new k.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new m.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new m.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new m.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new m.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new _.RenderDebouncer((($,D)=>this._renderRows($,D)),E),this.register(this._renderDebouncer),this.register(E.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(A.onResize((()=>this._fullRefresh()))),this.register(A.buffers.onBufferActivate((()=>{var $;return($=this._renderer.value)==null?void 0:$.clear()}))),this.register(S.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(N.onDecorationRegistered((()=>this._fullRefresh()))),this.register(N.onDecorationRemoved((()=>this._fullRefresh()))),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()}))),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(A.buffer.y,A.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(E.window,y),this.register(E.onWindowChange(($=>this._registerIntersectionObserver($,y))))}_registerIntersectionObserver(w,y){if("IntersectionObserver"in w){const S=new w.IntersectionObserver((z=>this._handleIntersectionChange(z[z.length-1])),{threshold:0});S.observe(y),this._observerDisposable.value=(0,k.toDisposable)((()=>S.disconnect()))}}_handleIntersectionChange(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(w,y,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,y,this._rowCount))}_renderRows(w,y){this._renderer.value&&(w=Math.min(w,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(w,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:w,end:y}),this._onRender.fire({start:w,end:y}),this._isNextRenderRedrawOnly=!0)}resize(w,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(w){this._renderer.value=w,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(w){return this._renderDebouncer.addRefreshCallback(w)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var w,y;this._renderer.value&&((y=(w=this._renderer.value).clearTextureAtlas)==null||y.call(w),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var S;return(S=this._renderer.value)==null?void 0:S.handleResize(w,y)})):this._renderer.value.handleResize(w,y),this._fullRefresh())}handleCharSizeChanged(){var w;(w=this._renderer.value)==null||w.handleCharSizeChanged()}handleBlur(){var w;(w=this._renderer.value)==null||w.handleBlur()}handleFocus(){var w;(w=this._renderer.value)==null||w.handleFocus()}handleSelectionChanged(w,y,S){var z;this._selectionState.start=w,this._selectionState.end=y,this._selectionState.columnSelectMode=S,(z=this._renderer.value)==null||z.handleSelectionChanged(w,y,S)}handleCursorMove(){var w;(w=this._renderer.value)==null||w.handleCursorMove()}clear(){var w;(w=this._renderer.value)==null||w.clear()}};i.RenderService=b=u([d(2,v.IOptionsService),d(3,p.ICharSizeService),d(4,v.IDecorationService),d(5,v.IBufferService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],b)},9312:function(a,i,c){var u=this&&this.__decorate||function(E,M,$,D){var I,G=arguments.length,H=G<3?M:D===null?D=Object.getOwnPropertyDescriptor(M,$):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(E,M,$,D);else for(var Q=E.length-1;Q>=0;Q--)(I=E[Q])&&(H=(G<3?I(H):G>3?I(M,$,H):I(M,$))||H);return G>3&&H&&Object.defineProperty(M,$,H),H},d=this&&this.__param||function(E,M){return function($,D){M($,D,E)}};Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionService=void 0;const _=c(9806),p=c(9504),m=c(456),k=c(4725),x=c(8460),v=c(844),b=c(6114),w=c(4841),y=c(511),S=c(2585),z=" ",N=new RegExp(z,"g");let A=i.SelectionService=class extends v.Disposable{constructor(E,M,$,D,I,G,H,Q,K){super(),this._element=E,this._screenElement=M,this._linkifier=$,this._bufferService=D,this._coreService=I,this._mouseService=G,this._optionsService=H,this._renderService=Q,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const E=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!E||!M||E[0]===M[0]&&E[1]===M[1])}get selectionText(){const E=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!E||!M)return"";const $=this._bufferService.buffer,D=[];if(this._activeSelectionMode===3){if(E[0]===M[0])return"";const I=E[0]I.replace(N," "))).join(b.isWindows?`\r +WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}i.OscLinkProvider=m=u([d(0,p.IBufferService),d(1,p.IOptionsService),d(2,p.IOscLinkService)],m)},6193:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.RenderDebouncer=void 0,i.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Terminal=void 0;const u=c(3614),d=c(3656),_=c(3551),p=c(9042),m=c(3730),k=c(1680),w=c(3107),v=c(5744),b=c(2950),x=c(1296),y=c(428),S=c(4269),E=c(5114),N=c(8934),A=c(3230),z=c(9312),M=c(4725),$=c(6731),D=c(8055),I=c(8969),G=c(8460),F=c(844),Q=c(6114),K=c(8437),J=c(2584),ee=c(7399),P=c(5941),L=c(9074),H=c(2585),q=c(5435),U=c(4567),oe=c(779);class ie extends I.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(re={}){super(re),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new F.MutableDisposable),this._onCursorMove=this.register(new G.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new G.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new G.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new G.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new G.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new G.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new G.EventEmitter),this._onBlur=this.register(new G.EventEmitter),this._onA11yCharEmitter=this.register(new G.EventEmitter),this._onA11yTabEmitter=this.register(new G.EventEmitter),this._onWillOpen=this.register(new G.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(H.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(oe.LinkProviderService),this._instantiationService.setService(M.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(m.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((W,ae)=>this.refresh(W,ae)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((W=>this._reportWindowsOptions(W)))),this.register(this._inputHandler.onColor((W=>this._handleColorEvent(W)))),this.register((0,G.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,G.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((W=>this._afterResize(W.cols,W.rows)))),this.register((0,F.toDisposable)((()=>{var W,ae;this._customKeyEventHandler=void 0,(ae=(W=this.element)==null?void 0:W.parentNode)==null||ae.removeChild(this.element)})))}_handleColorEvent(re){if(this._themeService)for(const W of re){let ae,le="";switch(W.index){case 256:ae="foreground",le="10";break;case 257:ae="background",le="11";break;case 258:ae="cursor",le="12";break;default:ae="ansi",le="4;"+W.index}switch(W.type){case 0:const me=D.color.toColorRGB(ae==="ansi"?this._themeService.colors.ansi[W.index]:this._themeService.colors[ae]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${le};${(0,P.toRgbString)(me)}${J.C1_ESCAPED.ST}`);break;case 1:if(ae==="ansi")this._themeService.modifyColors((be=>be.ansi[W.index]=D.channels.toColor(...W.color)));else{const be=ae;this._themeService.modifyColors((Se=>Se[be]=D.channels.toColor(...W.color)))}break;case 2:this._themeService.restoreColor(W.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(re){re?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(U.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(re){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var re;return(re=this.textarea)==null?void 0:re.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const re=this.buffer.ybase+this.buffer.y,W=this.buffer.lines.get(re);if(!W)return;const ae=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,me=W.getWidth(ae),be=this._renderService.dimensions.css.cell.width*me,Se=this.buffer.y*this._renderService.dimensions.css.cell.height,Be=ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Be+"px",this.textarea.style.top=Se+"px",this.textarea.style.width=be+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(W=>{this.hasSelection()&&(0,u.copyHandler)(W,this._selectionService)})));const re=W=>(0,u.handlePasteEvent)(W,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",re)),this.register((0,d.addDisposableDomListener)(this.element,"paste",re)),Q.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(W=>{W.button===2&&(0,u.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(W=>{(0,u.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(W=>{W.button===1&&(0,u.moveTextAreaUnderMouseCursor)(W,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(re=>this._keyUp(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(re=>this._keyDown(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(re=>this._keyPress(re)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(re=>this._compositionHelper.compositionupdate(re)))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(re=>this._inputEvent(re)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(re){var ae;if(!re)throw new Error("Terminal requires a parent element.");if(re.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ae=this.element)==null?void 0:ae.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=re.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),re.appendChild(this.element);const W=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),W.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,d.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),W.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Q.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(E.CoreBrowserService,this.textarea,re.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance($.ThemeService),this._instantiationService.setService(M.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(M.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(N.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(_.Linkifier,this.screenElement)),this.element.appendChild(W);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(k.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(z.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(w.BufferDecorationRenderer,this.screenElement)),this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(U.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(x.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const re=this,W=this.element;function ae(be){const Se=re._mouseService.getMouseReportCoords(be,re.screenElement);if(!Se)return!1;let Be,Xe;switch(be.overrideType||be.type){case"mousemove":Xe=32,be.buttons===void 0?(Be=3,be.button!==void 0&&(Be=be.button<3?be.button:3)):Be=1&be.buttons?0:4&be.buttons?1:2&be.buttons?2:3;break;case"mouseup":Xe=0,Be=be.button<3?be.button:3;break;case"mousedown":Xe=1,Be=be.button<3?be.button:3;break;case"wheel":if(re._customWheelEventHandler&&re._customWheelEventHandler(be)===!1||re.viewport.getLinesScrolled(be)===0)return!1;Xe=be.deltaY<0?0:1,Be=4;break;default:return!1}return!(Xe===void 0||Be===void 0||Be>4)&&re.coreMouseService.triggerMouseEvent({col:Se.col,row:Se.row,x:Se.x,y:Se.y,button:Be,action:Xe,ctrl:be.ctrlKey,alt:be.altKey,shift:be.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},me={mouseup:be=>(ae(be),be.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(be)),wheel:be=>(ae(be),this.cancel(be,!0)),mousedrag:be=>{be.buttons&&ae(be)},mousemove:be=>{be.buttons||ae(be)}};this.register(this.coreMouseService.onProtocolChange((be=>{be?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(be)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&be?le.mousemove||(W.addEventListener("mousemove",me.mousemove),le.mousemove=me.mousemove):(W.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&be?le.wheel||(W.addEventListener("wheel",me.wheel,{passive:!1}),le.wheel=me.wheel):(W.removeEventListener("wheel",le.wheel),le.wheel=null),2&be?le.mouseup||(le.mouseup=me.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&be?le.mousedrag||(le.mousedrag=me.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(W,"mousedown",(be=>{if(be.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(be))return ae(be),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(be)}))),this.register((0,d.addDisposableDomListener)(W,"wheel",(be=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(be)===!1)return!1;if(!this.buffer.hasScrollback){const Se=this.viewport.getLinesScrolled(be);if(Se===0)return;const Be=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(be.deltaY<0?"A":"B");let Xe="";for(let Me=0;Me{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(be),this.cancel(be)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(W,"touchmove",(be=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(be)?void 0:this.cancel(be)}),{passive:!1}))}refresh(re,W){var ae;(ae=this._renderService)==null||ae.refreshRows(re,W)}updateCursorStyle(re){var W;(W=this._selectionService)!=null&&W.shouldColumnSelect(re)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(re,W,ae=0){var le;ae===1?(super.scrollLines(re,W,ae),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(re)}paste(re){(0,u.paste)(re,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(re){this._customKeyEventHandler=re}attachCustomWheelEventHandler(re){this._customWheelEventHandler=re}registerLinkProvider(re){return this._linkProviderService.registerLinkProvider(re)}registerCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const W=this._characterJoinerService.register(re);return this.refresh(0,this.rows-1),W}deregisterCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(re)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(re){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+re)}registerDecoration(re){return this._decorationService.registerDecoration(re)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(re,W,ae){this._selectionService.setSelection(re,W,ae)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var re;(re=this._selectionService)==null||re.clearSelection()}selectAll(){var re;(re=this._selectionService)==null||re.selectAll()}selectLines(re,W){var ae;(ae=this._selectionService)==null||ae.selectLines(re,W)}_keyDown(re){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;const W=this.browser.isMac&&this.options.macOptionIsMeta&&re.altKey;if(!W&&!this._compositionHelper.keydown(re))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;W||re.key!=="Dead"&&re.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ae=(0,ee.evaluateKeyboardEvent)(re,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(re),ae.type===3||ae.type===2){const le=this.rows-1;return this.scrollLines(ae.type===2?-le:le),this.cancel(re,!0)}return ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,re)||(ae.cancel&&this.cancel(re,!0),!ae.key||!!(re.key&&!re.ctrlKey&&!re.altKey&&!re.metaKey&&re.key.length===1&&re.key.charCodeAt(0)>=65&&re.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ae.key!==J.C0.ETX&&ae.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ae.key,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||re.altKey||re.ctrlKey?this.cancel(re,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(re,W){const ae=re.isMac&&!this.options.macOptionIsMeta&&W.altKey&&!W.ctrlKey&&!W.metaKey||re.isWindows&&W.altKey&&W.ctrlKey&&!W.metaKey||re.isWindows&&W.getModifierState("AltGraph");return W.type==="keypress"?ae:ae&&(!W.keyCode||W.keyCode>47)}_keyUp(re){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1||((function(W){return W.keyCode===16||W.keyCode===17||W.keyCode===18})(re)||this.focus(),this.updateCursorStyle(re),this._keyPressHandled=!1)}_keyPress(re){let W;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;if(this.cancel(re),re.charCode)W=re.charCode;else if(re.which===null||re.which===void 0)W=re.keyCode;else{if(re.which===0||re.charCode===0)return!1;W=re.which}return!(!W||(re.altKey||re.ctrlKey||re.metaKey)&&!this._isThirdLevelShift(this.browser,re)||(W=String.fromCharCode(W),this._onKey.fire({key:W,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(W,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(re){if(re.data&&re.inputType==="insertText"&&(!re.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const W=re.data;return this.coreService.triggerDataEvent(W,!0),this.cancel(re),!0}return!1}resize(re,W){re!==this.cols||W!==this.rows?super.resize(re,W):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(re,W){var ae,le;(ae=this._charSizeService)==null||ae.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var re;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let W=1;W{Object.defineProperty(i,"__esModule",{value:!0}),i.TimeBasedDebouncer=void 0,i.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const _=Date.now();if(_-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=_,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=_-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),m)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(a,i,c){var u=this&&this.__decorate||function(b,x,y,S){var E,N=arguments.length,A=N<3?x:S===null?S=Object.getOwnPropertyDescriptor(x,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,x,y,S);else for(var z=b.length-1;z>=0;z--)(E=b[z])&&(A=(N<3?E(A):N>3?E(x,y,A):E(x,y))||A);return N>3&&A&&Object.defineProperty(x,y,A),A},d=this&&this.__param||function(b,x){return function(y,S){x(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Viewport=void 0;const _=c(3656),p=c(4725),m=c(8460),k=c(844),w=c(2585);let v=i.Viewport=class extends k.Disposable{constructor(b,x,y,S,E,N,A,z){super(),this._viewportElement=b,this._scrollArea=x,this._bufferService=y,this._optionsService=S,this._charSizeService=E,this._renderService=N,this._coreBrowserService=A,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((M=>this._activeBuffer=M.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((M=>this._renderDimensions=M))),this._handleThemeChange(z.colors),this.register(z.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(b){if(b)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const x=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:x,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(b,x){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(x<0&&this._viewportElement.scrollTop!==0||x>0&&y0&&(y=I),S=""}}return{bufferElements:E,cursorElement:y}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let x=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(x/=this._currentRowHeight+0,this._wheelPartialScroll+=x,x=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(x*=this._bufferService.rows),x}_applyScrollModifier(b,x){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&x.altKey||y==="ctrl"&&x.ctrlKey||y==="shift"&&x.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const x=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,x!==0&&(this._viewportElement.scrollTop+=x,this._bubbleScroll(b,x))}};i.Viewport=v=u([d(2,w.IBufferService),d(3,w.IOptionsService),d(4,p.ICharSizeService),d(5,p.IRenderService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],v)},3107:function(a,i,c){var u=this&&this.__decorate||function(w,v,b,x){var y,S=arguments.length,E=S<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(w,v,b,x);else for(var N=w.length-1;N>=0;N--)(y=w[N])&&(E=(S<3?y(E):S>3?y(v,b,E):y(v,b))||E);return S>3&&E&&Object.defineProperty(v,b,E),E},d=this&&this.__param||function(w,v){return function(b,x){v(b,x,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferDecorationRenderer=void 0;const _=c(4725),p=c(844),m=c(2585);let k=i.BufferDecorationRenderer=class extends p.Disposable{constructor(w,v,b,x,y){super(),this._screenElement=w,this._bufferService=v,this._coreBrowserService=b,this._decorationService=x,this._renderService=y,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((S=>this._removeDecoration(S)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const w of this._decorationService.decorations)this._renderDecoration(w);this._dimensionsChanged=!1}_renderDecoration(w){this._refreshStyle(w),this._dimensionsChanged&&this._refreshXPosition(w)}_createElement(w){var x;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((x=w==null?void 0:w.options)==null?void 0:x.layer)==="top"),v.style.width=`${Math.round((w.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(w.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(w.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=w.options.x??0;return b&&b>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(w,v),v}_refreshStyle(w){const v=w.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)w.element&&(w.element.style.display="none",w.onRenderEmitter.fire(w.element));else{let b=this._decorationElements.get(w);b||(b=this._createElement(w),w.element=b,this._decorationElements.set(w,b),this._container.appendChild(b),w.onDispose((()=>{this._decorationElements.delete(w),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",w.onRenderEmitter.fire(b)}}_refreshXPosition(w,v=w.element){if(!v)return;const b=w.options.x??0;(w.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(w){var v;(v=this._decorationElements.get(w))==null||v.remove(),this._decorationElements.delete(w),w.dispose()}};i.BufferDecorationRenderer=k=u([d(1,m.IBufferService),d(2,_.ICoreBrowserService),d(3,m.IDecorationService),d(4,_.IRenderService)],k)},5871:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorZoneStore=void 0,i.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,d){return u>=c.startBufferLine-this._linePadding[d||"full"]&&u<=c.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(a,i,c){var u=this&&this.__decorate||function(y,S,E,N){var A,z=arguments.length,M=z<3?S:N===null?N=Object.getOwnPropertyDescriptor(S,E):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,S,E,N);else for(var $=y.length-1;$>=0;$--)(A=y[$])&&(M=(z<3?A(M):z>3?A(S,E,M):A(S,E))||M);return z>3&&M&&Object.defineProperty(S,E,M),M},d=this&&this.__param||function(y,S){return function(E,N){S(E,N,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OverviewRulerRenderer=void 0;const _=c(5871),p=c(4725),m=c(844),k=c(2585),w={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let x=i.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,S,E,N,A,z,M){var D;super(),this._viewportElement=y,this._screenElement=S,this._bufferService=E,this._decorationService=N,this._renderService=A,this._optionsService=z,this._coreBrowserService=M,this._colorZoneStore=new _.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(D=this._viewportElement.parentElement)==null||D.insertBefore(this._canvas,this._viewportElement);const $=this._canvas.getContext("2d");if(!$)throw new Error("Ctx cannot be null");this._ctx=$,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var I;(I=this._canvas)==null||I.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const y=Math.floor(this._canvas.width/3),S=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=y,v.center=S,v.right=y,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){w.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);w.left=S,w.center=S,w.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const y=this._colorZoneStore.zones;for(const S of y)S.position!=="full"&&this._renderColorZone(S);for(const S of y)S.position==="full"&&this._renderColorZone(S);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(b[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-w[y.position||"full"]/2),v[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+w[y.position||"full"]))}_queueRefresh(y,S){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};i.OverviewRulerRenderer=x=u([d(2,k.IBufferService),d(3,k.IDecorationService),d(4,p.IRenderService),d(5,k.IOptionsService),d(6,p.ICoreBrowserService)],x)},2950:function(a,i,c){var u=this&&this.__decorate||function(w,v,b,x){var y,S=arguments.length,E=S<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(w,v,b,x);else for(var N=w.length-1;N>=0;N--)(y=w[N])&&(E=(S<3?y(E):S>3?y(v,b,E):y(v,b))||E);return S>3&&E&&Object.defineProperty(v,b,E),E},d=this&&this.__param||function(w,v){return function(b,x){v(b,x,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CompositionHelper=void 0;const _=c(4725),p=c(2585),m=c(2584);let k=i.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(w,v,b,x,y,S){this._textarea=w,this._compositionView=v,this._bufferService=b,this._optionsService=x,this._coreService=y,this._renderService=S,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(w){this._compositionView.textContent=w.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(w){if(this._isComposing||this._isSendingComposition){if(w.keyCode===229||w.keyCode===16||w.keyCode===17||w.keyCode===18)return!1;this._finalizeComposition(!1)}return w.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(w){if(this._compositionView.classList.remove("active"),this._isComposing=!1,w){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const w=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,b=v.replace(w,"");this._dataAlreadySent=b,v.length>w.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};i.CompositionHelper=k=u([d(2,p.IBufferService),d(3,p.IOptionsService),d(4,p.ICoreService),d(5,_.IRenderService)],k)},9806:(a,i)=>{function c(u,d,_){const p=_.getBoundingClientRect(),m=u.getComputedStyle(_),k=parseInt(m.getPropertyValue("padding-left")),w=parseInt(m.getPropertyValue("padding-top"));return[d.clientX-p.left-k,d.clientY-p.top-w]}Object.defineProperty(i,"__esModule",{value:!0}),i.getCoords=i.getCoordsRelativeToElement=void 0,i.getCoordsRelativeToElement=c,i.getCoords=function(u,d,_,p,m,k,w,v,b){if(!k)return;const x=c(u,d,_);return x?(x[0]=Math.ceil((x[0]+(b?w/2:0))/w),x[1]=Math.ceil(x[1]/v),x[0]=Math.min(Math.max(x[0],1),p+(b?1:0)),x[1]=Math.min(Math.max(x[1],1),m),x):void 0}},9504:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.moveToCellSequence=void 0;const u=c(2584);function d(v,b,x,y){const S=v-_(v,x),E=b-_(b,x),N=Math.abs(S-E)-(function(A,z,M){let $=0;const D=A-_(A,M),I=z-_(z,M);for(let G=0;G=0&&vb?"A":"B"}function m(v,b,x,y,S,E){let N=v,A=b,z="";for(;N!==x||A!==y;)N+=S?1:-1,S&&N>E.cols-1?(z+=E.buffer.translateBufferLineToString(A,!1,v,N),N=0,v=0,A++):!S&&N<0&&(z+=E.buffer.translateBufferLineToString(A,!1,0,v+1),N=E.cols-1,v=N,A--);return z+E.buffer.translateBufferLineToString(A,!1,v,N)}function k(v,b){const x=b?"O":"[";return u.C0.ESC+x+v}function w(v,b){v=Math.floor(v);let x="";for(let y=0;y0?D-_(D,I):M;const Q=D,K=(function(J,ee,P,L,H,q){let U;return U=d(P,L,H,q).length>0?L-_(L,H):ee,J=P&&Uv?"D":"C",w(Math.abs(S-v),k(N,y));N=E>b?"D":"C";const A=Math.abs(E-b);return w((function(z,M){return M.cols-z})(E>b?v:S,x)+(A-1)*x.cols+1+((E>b?S:v)-1),k(N,y))}},1296:function(a,i,c){var u=this&&this.__decorate||function(G,F,Q,K){var J,ee=arguments.length,P=ee<3?F:K===null?K=Object.getOwnPropertyDescriptor(F,Q):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(G,F,Q,K);else for(var L=G.length-1;L>=0;L--)(J=G[L])&&(P=(ee<3?J(P):ee>3?J(F,Q,P):J(F,Q))||P);return ee>3&&P&&Object.defineProperty(F,Q,P),P},d=this&&this.__param||function(G,F){return function(Q,K){F(Q,K,G)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRenderer=void 0;const _=c(3787),p=c(2550),m=c(2223),k=c(6171),w=c(6052),v=c(4725),b=c(8055),x=c(8460),y=c(844),S=c(2585),E="xterm-dom-renderer-owner-",N="xterm-rows",A="xterm-fg-",z="xterm-bg-",M="xterm-focus",$="xterm-selection";let D=1,I=i.DomRenderer=class extends y.Disposable{constructor(G,F,Q,K,J,ee,P,L,H,q,U,oe,ie){super(),this._terminal=G,this._document=F,this._element=Q,this._screenElement=K,this._viewportElement=J,this._helperContainer=ee,this._linkifier2=P,this._charSizeService=H,this._optionsService=q,this._bufferService=U,this._coreBrowserService=oe,this._themeService=ie,this._terminalClass=D++,this._rowElements=[],this._selectionRenderModel=(0,w.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new x.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(N),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add($),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,k.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ce=>this._injectCss(ce)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(_.DomRendererRowFactory,document),this._element.classList.add(E+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ce=>this._handleLinkHover(ce)))),this.register(this._linkifier2.onHideLinkUnderline((ce=>this._handleLinkLeave(ce)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(E+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const G=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*G,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*G),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/G),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/G),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const Q of this._rowElements)Q.style.width=`${this.dimensions.css.canvas.width}px`,Q.style.height=`${this.dimensions.css.cell.height}px`,Q.style.lineHeight=`${this.dimensions.css.cell.height}px`,Q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const F=`${this._terminalSelector} .${N} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=F,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(G){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let F=`${this._terminalSelector} .${N} { color: ${G.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;F+=`${this._terminalSelector} .${N} .xterm-dim { color: ${b.color.multiplyOpacity(G.foreground,.5).css};}`,F+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const Q=`blink_underline_${this._terminalClass}`,K=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;F+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,F+=`@keyframes ${K} { 50% { box-shadow: none; }}`,F+=`@keyframes ${J} { 0% { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css}; } 50% { background-color: inherit; color: ${G.cursor.css}; }}`,F+=`${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css};}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${G.cursor.css} !important; color: ${G.cursorAccent.css} !important;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${G.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${G.cursor.css} inset;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${G.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,F+=`${this._terminalSelector} .${$} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${$} div { position: absolute; background-color: ${G.selectionBackgroundOpaque.css};}${this._terminalSelector} .${$} div { position: absolute; background-color: ${G.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,P]of G.ansi.entries())F+=`${this._terminalSelector} .${A}${ee} { color: ${P.css}; }${this._terminalSelector} .${A}${ee}.xterm-dim { color: ${b.color.multiplyOpacity(P,.5).css}; }${this._terminalSelector} .${z}${ee} { background-color: ${P.css}; }`;F+=`${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(G.background).css}; }${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(G.background),.5).css}; }${this._terminalSelector} .${z}${m.INVERTED_DEFAULT_COLOR} { background-color: ${G.foreground.css}; }`,this._themeStyleElement.textContent=F}_setDefaultSpacing(){const G=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${G}px`,this._rowFactory.defaultSpacing=G}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(G,F){for(let Q=this._rowElements.length;Q<=F;Q++){const K=this._document.createElement("div");this._rowContainer.appendChild(K),this._rowElements.push(K)}for(;this._rowElements.length>F;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(G,F){this._refreshRowElements(G,F),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(M),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(M),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(G,F,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(G,F,Q),this.renderRows(0,this._bufferService.rows-1),!G||!F)return;this._selectionRenderModel.update(this._terminal,G,F,Q);const K=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,P=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||P<0)return;const L=this._document.createDocumentFragment();if(Q){const H=G[0]>F[0];L.appendChild(this._createSelectionElement(ee,H?F[0]:G[0],H?G[0]:F[0],P-ee+1))}else{const H=K===ee?G[0]:0,q=ee===J?F[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(ee,H,q));const U=P-ee-1;if(L.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,U)),ee!==P){const oe=J===P?F[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(P,0,oe))}}this._selectionContainer.appendChild(L)}_createSelectionElement(G,F,Q,K=1){const J=this._document.createElement("div"),ee=F*this.dimensions.css.cell.width;let P=this.dimensions.css.cell.width*(Q-F);return ee+P>this.dimensions.css.canvas.width&&(P=this.dimensions.css.canvas.width-ee),J.style.height=K*this.dimensions.css.cell.height+"px",J.style.top=G*this.dimensions.css.cell.height+"px",J.style.left=`${ee}px`,J.style.width=`${P}px`,J}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const G of this._rowElements)G.replaceChildren()}renderRows(G,F){const Q=this._bufferService.buffer,K=Q.ybase+Q.y,J=Math.min(Q.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,P=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let H=G;H<=F;H++){const q=H+Q.ydisp,U=this._rowElements[H],oe=Q.lines.get(q);if(!U||!oe)break;U.replaceChildren(...this._rowFactory.createRow(oe,q,q===K,P,L,J,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E}${this._terminalClass}`}_handleLinkHover(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!0)}_handleLinkLeave(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!1)}_setCellUnderline(G,F,Q,K,J,ee){Q<0&&(G=0),K<0&&(F=0);const P=this._bufferService.rows-1;Q=Math.max(Math.min(Q,P),0),K=Math.max(Math.min(K,P),0),J=Math.min(J,this._bufferService.cols);const L=this._bufferService.buffer,H=L.ybase+L.y,q=Math.min(L.x,J-1),U=this._optionsService.rawOptions.cursorBlink,oe=this._optionsService.rawOptions.cursorStyle,ie=this._optionsService.rawOptions.cursorInactiveStyle;for(let ce=Q;ce<=K;++ce){const re=ce+L.ydisp,W=this._rowElements[ce],ae=L.lines.get(re);if(!W||!ae)break;W.replaceChildren(...this._rowFactory.createRow(ae,re,re===H,oe,ie,q,U,this.dimensions.css.cell.width,this._widthCache,ee?ce===Q?G:0:-1,ee?(ce===K?F:J)-1:-1))}}};i.DomRenderer=I=u([d(7,S.IInstantiationService),d(8,v.ICharSizeService),d(9,S.IOptionsService),d(10,S.IBufferService),d(11,v.ICoreBrowserService),d(12,v.IThemeService)],I)},3787:function(a,i,c){var u=this&&this.__decorate||function(N,A,z,M){var $,D=arguments.length,I=D<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,z):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(N,A,z,M);else for(var G=N.length-1;G>=0;G--)($=N[G])&&(I=(D<3?$(I):D>3?$(A,z,I):$(A,z))||I);return D>3&&I&&Object.defineProperty(A,z,I),I},d=this&&this.__param||function(N,A){return function(z,M){A(z,M,N)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRendererRowFactory=void 0;const _=c(2223),p=c(643),m=c(511),k=c(2585),w=c(8055),v=c(4725),b=c(4269),x=c(6171),y=c(3734);let S=i.DomRendererRowFactory=class{constructor(N,A,z,M,$,D,I){this._document=N,this._characterJoinerService=A,this._optionsService=z,this._coreBrowserService=M,this._coreService=$,this._decorationService=D,this._themeService=I,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(N,A,z){this._selectionStart=N,this._selectionEnd=A,this._columnSelectMode=z}createRow(N,A,z,M,$,D,I,G,F,Q,K){const J=[],ee=this._characterJoinerService.getJoinedCharacters(A),P=this._themeService.colors;let L,H=N.getNoBgTrimmedLength();z&&H0&&Se===ee[0][0]){Xe=!0;const at=ee.shift();Fe=new b.JoinedCellData(this._workCell,N.translateToString(!0,at[0],at[1]),at[1]-at[0]),Me=at[1]-1,Be=Fe.getWidth()}const pt=this._isCellInSelection(Se,A),Ct=z&&Se===D,Vt=be&&Se>=Q&&Se<=K;let Ut=!1;this._decorationService.forEachDecorationAtCell(Se,A,void 0,(at=>{Ut=!0}));let Gt=Fe.getChars()||p.WHITESPACE_CELL_CHAR;if(Gt===" "&&(Fe.isUnderline()||Fe.isOverline())&&(Gt=" "),le=Be*G-F.get(Gt,Fe.isBold(),Fe.isItalic()),L){if(q&&(pt&&ae||!pt&&!ae&&Fe.bg===oe)&&(pt&&ae&&P.selectionForeground||Fe.fg===ie)&&Fe.extended.ext===ce&&Vt===re&&le===W&&!Ct&&!Xe&&!Ut){Fe.isInvisible()?U+=p.WHITESPACE_CELL_CHAR:U+=Gt,q++;continue}q&&(L.textContent=U),L=this._document.createElement("span"),q=0,U=""}else L=this._document.createElement("span");if(oe=Fe.bg,ie=Fe.fg,ce=Fe.extended.ext,re=Vt,W=le,ae=pt,Xe&&D>=Se&&D<=Me&&(D=Se),!this._coreService.isCursorHidden&&Ct&&this._coreService.isCursorInitialized){if(me.push("xterm-cursor"),this._coreBrowserService.isFocused)I&&me.push("xterm-cursor-blink"),me.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if($)switch($){case"outline":me.push("xterm-cursor-outline");break;case"block":me.push("xterm-cursor-block");break;case"bar":me.push("xterm-cursor-bar");break;case"underline":me.push("xterm-cursor-underline")}}if(Fe.isBold()&&me.push("xterm-bold"),Fe.isItalic()&&me.push("xterm-italic"),Fe.isDim()&&me.push("xterm-dim"),U=Fe.isInvisible()?p.WHITESPACE_CELL_CHAR:Fe.getChars()||p.WHITESPACE_CELL_CHAR,Fe.isUnderline()&&(me.push(`xterm-underline-${Fe.extended.underlineStyle}`),U===" "&&(U=" "),!Fe.isUnderlineColorDefault()))if(Fe.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Fe.getUnderlineColor()).join(",")})`;else{let at=Fe.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Fe.isBold()&&at<8&&(at+=8),L.style.textDecorationColor=P.ansi[at].css}Fe.isOverline()&&(me.push("xterm-overline"),U===" "&&(U=" ")),Fe.isStrikethrough()&&me.push("xterm-strikethrough"),Vt&&(L.style.textDecoration="underline");let De=Fe.getFgColor(),ct=Fe.getFgColorMode(),lt=Fe.getBgColor(),xe=Fe.getBgColorMode();const Ie=!!Fe.isInverse();if(Ie){const at=De;De=lt,lt=at;const At=ct;ct=xe,xe=At}let Ye,Ae,Ve,Ze=!1;switch(this._decorationService.forEachDecorationAtCell(Se,A,void 0,(at=>{at.options.layer!=="top"&&Ze||(at.backgroundColorRGB&&(xe=50331648,lt=at.backgroundColorRGB.rgba>>8&16777215,Ye=at.backgroundColorRGB),at.foregroundColorRGB&&(ct=50331648,De=at.foregroundColorRGB.rgba>>8&16777215,Ae=at.foregroundColorRGB),Ze=at.options.layer==="top")})),!Ze&&pt&&(Ye=this._coreBrowserService.isFocused?P.selectionBackgroundOpaque:P.selectionInactiveBackgroundOpaque,lt=Ye.rgba>>8&16777215,xe=50331648,Ze=!0,P.selectionForeground&&(ct=50331648,De=P.selectionForeground.rgba>>8&16777215,Ae=P.selectionForeground)),Ze&&me.push("xterm-decoration-top"),xe){case 16777216:case 33554432:Ve=P.ansi[lt],me.push(`xterm-bg-${lt}`);break;case 50331648:Ve=w.channels.toColor(lt>>16,lt>>8&255,255<),this._addStyle(L,`background-color:#${E((lt>>>0).toString(16),"0",6)}`);break;default:Ie?(Ve=P.foreground,me.push(`xterm-bg-${_.INVERTED_DEFAULT_COLOR}`)):Ve=P.background}switch(Ye||Fe.isDim()&&(Ye=w.color.multiplyOpacity(Ve,.5)),ct){case 16777216:case 33554432:Fe.isBold()&&De<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(De+=8),this._applyMinimumContrast(L,Ve,P.ansi[De],Fe,Ye,void 0)||me.push(`xterm-fg-${De}`);break;case 50331648:const at=w.channels.toColor(De>>16&255,De>>8&255,255&De);this._applyMinimumContrast(L,Ve,at,Fe,Ye,Ae)||this._addStyle(L,`color:#${E(De.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,Ve,P.foreground,Fe,Ye,Ae)||Ie&&me.push(`xterm-fg-${_.INVERTED_DEFAULT_COLOR}`)}me.length&&(L.className=me.join(" "),me.length=0),Ct||Xe||Ut?L.textContent=U:q++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),J.push(L),Se=Me}return L&&q&&(L.textContent=U),J}_applyMinimumContrast(N,A,z,M,$,D){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,x.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const I=this._getContrastCache(M);let G;if($||D||(G=I.getColor(A.rgba,z.rgba)),G===void 0){const F=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);G=w.color.ensureContrastRatio($||A,D||z,F),I.setColor(($||A).rgba,(D||z).rgba,G??null)}return!!G&&(this._addStyle(N,`color:${G.css}`),!0)}_getContrastCache(N){return N.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(N,A){N.setAttribute("style",`${N.getAttribute("style")||""}${A};`)}_isCellInSelection(N,A){const z=this._selectionStart,M=this._selectionEnd;return!(!z||!M)&&(this._columnSelectMode?z[0]<=M[0]?N>=z[0]&&A>=z[1]&&N=z[1]&&N>=M[0]&&A<=M[1]:A>z[1]&&A=z[0]&&N=z[0])}};function E(N,A,z){for(;N.length{Object.defineProperty(i,"__esModule",{value:!0}),i.WidthCache=void 0,i.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const d=c.createElement("span");d.classList.add("xterm-char-measure-element");const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[d,_,p,m],this._container.appendChild(d),this._container.appendChild(_),this._container.appendChild(p),this._container.appendChild(m),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,u,d,_){c===this._font&&u===this._fontSize&&d===this._weight&&_===this._weightBold||(this._font=c,this._fontSize=u,this._weight=d,this._weightBold=_,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${_}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${_}`,this.clear())}get(c,u,d){let _=0;if(!u&&!d&&c.length===1&&(_=c.charCodeAt(0))<256){if(this._flat[_]!==-9999)return this._flat[_];const k=this._measure(c,0);return k>0&&(this._flat[_]=k),k}let p=c;u&&(p+="B"),d&&(p+="I");let m=this._holey.get(p);if(m===void 0){let k=0;u&&(k|=1),d&&(k|=2),m=this._measure(c,k),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const d=this._measureElements[u];return d.textContent=c.repeat(32),d.offsetWidth/32}}},2223:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TEXT_BASELINE=i.DIM_OPACITY=i.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);i.INVERTED_DEFAULT_COLOR=257,i.DIM_OPACITY=.5,i.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,i)=>{function c(d){return 57508<=d&&d<=57558}function u(d){return d>=128512&&d<=128591||d>=127744&&d<=128511||d>=128640&&d<=128767||d>=9728&&d<=9983||d>=9984&&d<=10175||d>=65024&&d<=65039||d>=129280&&d<=129535||d>=127462&&d<=127487}Object.defineProperty(i,"__esModule",{value:!0}),i.computeNextVariantOffset=i.createRenderDimensions=i.treatGlyphAsBackgroundColor=i.allowRescaling=i.isEmoji=i.isRestrictedPowerlineGlyph=i.isPowerlineGlyph=i.throwIfFalsy=void 0,i.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},i.isPowerlineGlyph=c,i.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},i.isEmoji=u,i.allowRescaling=function(d,_,p,m){return _===1&&p>Math.ceil(1.5*m)&&d!==void 0&&d>255&&!u(d)&&!c(d)&&!(function(k){return 57344<=k&&k<=63743})(d)},i.treatGlyphAsBackgroundColor=function(d){return c(d)||(function(_){return 9472<=_&&_<=9631})(d)},i.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},i.computeNextVariantOffset=function(d,_,p=0){return(d-(2*Math.round(_)-p))%(2*Math.round(_))}},6052:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createSelectionRenderModel=void 0;class c{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(d,_,p,m=!1){if(this.selectionStart=_,this.selectionEnd=p,!_||!p||_[0]===p[0]&&_[1]===p[1])return void this.clear();const k=d.buffers.active.ydisp,w=_[1]-k,v=p[1]-k,b=Math.max(w,0),x=Math.min(v,d.rows-1);b>=d.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=w,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=x,this.startCol=_[0],this.endCol=p[0])}isCellSelected(d,_,p){return!!this.hasSelection&&(p-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?_>=this.startCol&&p>=this.viewportCappedStartRow&&_=this.viewportCappedStartRow&&_>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&_=this.startCol)}}i.createSelectionRenderModel=function(){return new c}},456:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionModel=void 0,i.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,i,c){var u=this&&this.__decorate||function(x,y,S,E){var N,A=arguments.length,z=A<3?y:E===null?E=Object.getOwnPropertyDescriptor(y,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,y,S,E);else for(var M=x.length-1;M>=0;M--)(N=x[M])&&(z=(A<3?N(z):A>3?N(y,S,z):N(y,S))||z);return A>3&&z&&Object.defineProperty(y,S,z),z},d=this&&this.__param||function(x,y){return function(S,E){y(S,E,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharSizeService=void 0;const _=c(2585),p=c(8460),m=c(844);let k=i.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(x,y,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new v(x,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const x=this._measureStrategy.measure();x.width===this.width&&x.height===this.height||(this.width=x.width,this.height=x.height,this._onCharSizeChange.fire())}};i.CharSizeService=k=u([d(2,_.IOptionsService)],k);class w extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,S){y!==void 0&&y>0&&S!==void 0&&S>0&&(this._result.width=y,this._result.height=S)}}class v extends w{constructor(y,S,E){super(),this._document=y,this._parentElement=S,this._optionsService=E,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class b extends w{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(a,i,c){var u=this&&this.__decorate||function(b,x,y,S){var E,N=arguments.length,A=N<3?x:S===null?S=Object.getOwnPropertyDescriptor(x,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,x,y,S);else for(var z=b.length-1;z>=0;z--)(E=b[z])&&(A=(N<3?E(A):N>3?E(x,y,A):E(x,y))||A);return N>3&&A&&Object.defineProperty(x,y,A),A},d=this&&this.__param||function(b,x){return function(y,S){x(y,S,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharacterJoinerService=i.JoinedCellData=void 0;const _=c(3734),p=c(643),m=c(511),k=c(2585);class w extends _.AttributeData{constructor(x,y,S){super(),this.content=0,this.combinedData="",this.fg=x.fg,this.bg=x.bg,this.combinedData=y,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(x){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.JoinedCellData=w;let v=i.CharacterJoinerService=class YI{constructor(x){this._bufferService=x,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(x){const y={id:this._nextCharacterJoinerId++,handler:x};return this._characterJoiners.push(y),y.id}deregister(x){for(let y=0;y1){const I=this._getJoinedRanges(E,z,A,y,N);for(let G=0;G1){const D=this._getJoinedRanges(E,z,A,y,N);for(let I=0;I{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreBrowserService=void 0;const u=c(844),d=c(8460),_=c(3656);class p extends u.Disposable{constructor(w,v,b){super(),this._textarea=w,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new d.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((x=>this._screenDprMonitor.setWindow(x)))),this.register((0,d.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(w){this._window!==w&&(this._window=w,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}i.CoreBrowserService=p;class m extends u.Disposable{constructor(w){super(),this._parentWindow=w,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(w){this._parentWindow=w,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,_.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var w;this._outerListener&&((w=this._resolutionMediaMatchList)==null||w.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LinkProviderService=void 0;const u=c(844);class d extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const m=this.linkProviders.indexOf(p);m!==-1&&this.linkProviders.splice(m,1)}}}}i.LinkProviderService=d},8934:function(a,i,c){var u=this&&this.__decorate||function(k,w,v,b){var x,y=arguments.length,S=y<3?w:b===null?b=Object.getOwnPropertyDescriptor(w,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(k,w,v,b);else for(var E=k.length-1;E>=0;E--)(x=k[E])&&(S=(y<3?x(S):y>3?x(w,v,S):x(w,v))||S);return y>3&&S&&Object.defineProperty(w,v,S),S},d=this&&this.__param||function(k,w){return function(v,b){w(v,b,k)}};Object.defineProperty(i,"__esModule",{value:!0}),i.MouseService=void 0;const _=c(4725),p=c(9806);let m=i.MouseService=class{constructor(k,w){this._renderService=k,this._charSizeService=w}getCoords(k,w,v,b,x){return(0,p.getCoords)(window,k,w,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,x)}getMouseReportCoords(k,w){const v=(0,p.getCoordsRelativeToElement)(window,k,w);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};i.MouseService=m=u([d(0,_.IRenderService),d(1,_.ICharSizeService)],m)},3230:function(a,i,c){var u=this&&this.__decorate||function(x,y,S,E){var N,A=arguments.length,z=A<3?y:E===null?E=Object.getOwnPropertyDescriptor(y,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,y,S,E);else for(var M=x.length-1;M>=0;M--)(N=x[M])&&(z=(A<3?N(z):A>3?N(y,S,z):N(y,S))||z);return A>3&&z&&Object.defineProperty(y,S,z),z},d=this&&this.__param||function(x,y){return function(S,E){y(S,E,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.RenderService=void 0;const _=c(6193),p=c(4725),m=c(8460),k=c(844),w=c(7226),v=c(2585);let b=i.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(x,y,S,E,N,A,z,M){super(),this._rowCount=x,this._charSizeService=E,this._renderer=this.register(new k.MutableDisposable),this._pausedResizeTask=new w.DebouncedIdleTask,this._observerDisposable=this.register(new k.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new m.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new m.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new m.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new m.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new _.RenderDebouncer((($,D)=>this._renderRows($,D)),z),this.register(this._renderDebouncer),this.register(z.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(A.onResize((()=>this._fullRefresh()))),this.register(A.buffers.onBufferActivate((()=>{var $;return($=this._renderer.value)==null?void 0:$.clear()}))),this.register(S.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(N.onDecorationRegistered((()=>this._fullRefresh()))),this.register(N.onDecorationRemoved((()=>this._fullRefresh()))),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()}))),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(A.buffer.y,A.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(z.window,y),this.register(z.onWindowChange(($=>this._registerIntersectionObserver($,y))))}_registerIntersectionObserver(x,y){if("IntersectionObserver"in x){const S=new x.IntersectionObserver((E=>this._handleIntersectionChange(E[E.length-1])),{threshold:0});S.observe(y),this._observerDisposable.value=(0,k.toDisposable)((()=>S.disconnect()))}}_handleIntersectionChange(x){this._isPaused=x.isIntersecting===void 0?x.intersectionRatio===0:!x.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(x,y,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(x,y,this._rowCount))}_renderRows(x,y){this._renderer.value&&(x=Math.min(x,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(x,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:x,end:y}),this._onRender.fire({start:x,end:y}),this._isNextRenderRedrawOnly=!0)}resize(x,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(x){this._renderer.value=x,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(x){return this._renderDebouncer.addRefreshCallback(x)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var x,y;this._renderer.value&&((y=(x=this._renderer.value).clearTextureAtlas)==null||y.call(x),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(x,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var S;return(S=this._renderer.value)==null?void 0:S.handleResize(x,y)})):this._renderer.value.handleResize(x,y),this._fullRefresh())}handleCharSizeChanged(){var x;(x=this._renderer.value)==null||x.handleCharSizeChanged()}handleBlur(){var x;(x=this._renderer.value)==null||x.handleBlur()}handleFocus(){var x;(x=this._renderer.value)==null||x.handleFocus()}handleSelectionChanged(x,y,S){var E;this._selectionState.start=x,this._selectionState.end=y,this._selectionState.columnSelectMode=S,(E=this._renderer.value)==null||E.handleSelectionChanged(x,y,S)}handleCursorMove(){var x;(x=this._renderer.value)==null||x.handleCursorMove()}clear(){var x;(x=this._renderer.value)==null||x.clear()}};i.RenderService=b=u([d(2,v.IOptionsService),d(3,p.ICharSizeService),d(4,v.IDecorationService),d(5,v.IBufferService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],b)},9312:function(a,i,c){var u=this&&this.__decorate||function(z,M,$,D){var I,G=arguments.length,F=G<3?M:D===null?D=Object.getOwnPropertyDescriptor(M,$):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(z,M,$,D);else for(var Q=z.length-1;Q>=0;Q--)(I=z[Q])&&(F=(G<3?I(F):G>3?I(M,$,F):I(M,$))||F);return G>3&&F&&Object.defineProperty(M,$,F),F},d=this&&this.__param||function(z,M){return function($,D){M($,D,z)}};Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionService=void 0;const _=c(9806),p=c(9504),m=c(456),k=c(4725),w=c(8460),v=c(844),b=c(6114),x=c(4841),y=c(511),S=c(2585),E=" ",N=new RegExp(E,"g");let A=i.SelectionService=class extends v.Disposable{constructor(z,M,$,D,I,G,F,Q,K){super(),this._element=z,this._screenElement=M,this._linkifier=$,this._bufferService=D,this._coreService=I,this._mouseService=G,this._optionsService=F,this._renderService=Q,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new w.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new w.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new w.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!z||!M||z[0]===M[0]&&z[1]===M[1])}get selectionText(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!z||!M)return"";const $=this._bufferService.buffer,D=[];if(this._activeSelectionMode===3){if(z[0]===M[0])return"";const I=z[0]I.replace(N," "))).join(b.isWindows?`\r `:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(E){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&E&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(E){const M=this._getMouseBufferCoords(E),$=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!!($&&D&&M)&&this._areCoordsInSelection(M,$,D)}isCellInSelection(E,M){const $=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!$||!D)&&this._areCoordsInSelection([E,M],$,D)}_areCoordsInSelection(E,M,$){return E[1]>M[1]&&E[1]<$[1]||M[1]===$[1]&&E[1]===M[1]&&E[0]>=M[0]&&E[0]<$[0]||M[1]<$[1]&&E[1]===$[1]&&E[0]<$[0]||M[1]<$[1]&&E[1]===M[1]&&E[0]>=M[0]}_selectWordAtCursor(E,M){var I,G;const $=(G=(I=this._linkifier.currentLink)==null?void 0:I.link)==null?void 0:G.range;if($)return this._model.selectionStart=[$.start.x-1,$.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)($,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const D=this._getMouseBufferCoords(E);return!!D&&(this._selectWordAt(D,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(E,M){this._model.clearSelection(),E=Math.max(E,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,E],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(E){this._model.handleTrim(E)&&this.refresh()}_getMouseBufferCoords(E){const M=this._mouseService.getCoords(E,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(E){let M=(0,_.getCoordsRelativeToElement)(this._coreBrowserService.window,E,this._screenElement)[1];const $=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=$?0:(M>$&&(M-=$),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(E){return b.isMac?E.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:E.shiftKey}handleMouseDown(E){if(this._mouseDownTimeStamp=E.timeStamp,(E.button!==2||!this.hasSelection)&&E.button===0){if(!this._enabled){if(!this.shouldForceSelection(E))return;E.stopPropagation()}E.preventDefault(),this._dragScrollAmount=0,this._enabled&&E.shiftKey?this._handleIncrementalClick(E):E.detail===1?this._handleSingleClick(E):E.detail===2?this._handleDoubleClick(E):E.detail===3&&this._handleTripleClick(E),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(E){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(E))}_handleSingleClick(E){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(E)?3:0,this._model.selectionStart=this._getMouseBufferCoords(E),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const M=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);M&&M.length!==this._model.selectionStart[0]&&M.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(E){this._selectWordAtCursor(E,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(E){const M=this._getMouseBufferCoords(E);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(E){return E.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(E){if(E.stopImmediatePropagation(),!this._model.selectionStart)return;const M=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(E),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const $=this._bufferService.buffer;if(this._model.selectionEnd[1]<$.lines.length){const D=$.lines.get(this._model.selectionEnd[1]);D&&D.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(E.ydisp+this._bufferService.rows,E.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=E.ydisp),this.refresh()}}_handleMouseUp(E){const M=E.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&E.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const $=this._mouseService.getCoords(E,this._element,this._bufferService.cols,this._bufferService.rows,!1);if($&&$[0]!==void 0&&$[1]!==void 0){const D=(0,p.moveToCellSequence)($[0]-1,$[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(D,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const E=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,$=!(!E||!M||E[0]===M[0]&&E[1]===M[1]);$?E&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&E[0]===this._oldSelectionStart[0]&&E[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(E,M,$)):this._oldHasSelection&&this._fireOnSelectionChange(E,M,$)}_fireOnSelectionChange(E,M,$){this._oldSelectionStart=E,this._oldSelectionEnd=M,this._oldHasSelection=$,this._onSelectionChange.fire()}_handleBufferActivate(E){this.clearSelection(),this._trimListener.dispose(),this._trimListener=E.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(E,M){let $=M;for(let D=0;M>=D;D++){const I=E.loadCell(D,this._workCell).getChars().length;this._workCell.getWidth()===0?$--:I>1&&M!==D&&($+=I-1)}return $}setSelection(E,M,$){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[E,M],this._model.selectionStartLength=$,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(E){this._isClickInSelection(E)||(this._selectWordAtCursor(E,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(E,M,$=!0,D=!0){if(E[0]>=this._bufferService.cols)return;const I=this._bufferService.buffer,G=I.lines.get(E[1]);if(!G)return;const H=I.translateBufferLineToString(E[1],!1);let Q=this._convertViewportColToCharacterIndex(G,E[0]),K=Q;const J=E[0]-Q;let ee=0,P=0,L=0,F=0;if(H.charAt(Q)===" "){for(;Q>0&&H.charAt(Q-1)===" ";)Q--;for(;K1&&(F+=ce-1,K+=ce-1);oe>0&&Q>0&&!this._isCharWordSeparator(G.loadCell(oe-1,this._workCell));){G.loadCell(oe-1,this._workCell);const re=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,oe--):re>1&&(L+=re-1,Q-=re-1),Q--,oe--}for(;ie1&&(F+=re-1,K+=re-1),K++,ie++}}K++;let q=Q+J-ee+L,U=Math.min(this._bufferService.cols,K-Q+ee+P-L-F);if(M||H.slice(Q,K).trim()!==""){if($&&q===0&&G.getCodePoint(0)!==32){const oe=I.lines.get(E[1]-1);if(oe&&G.isWrapped&&oe.getCodePoint(this._bufferService.cols-1)!==32){const ie=this._getWordAt([this._bufferService.cols-1,E[1]-1],!1,!0,!1);if(ie){const ce=this._bufferService.cols-ie.start;q-=ce,U+=ce}}}if(D&&q+U===this._bufferService.cols&&G.getCodePoint(this._bufferService.cols-1)!==32){const oe=I.lines.get(E[1]+1);if(oe!=null&&oe.isWrapped&&oe.getCodePoint(0)!==32){const ie=this._getWordAt([0,E[1]+1],!1,!1,!0);ie&&(U+=ie.length)}}return{start:q,length:U}}}_selectWordAt(E,M){const $=this._getWordAt(E,M);if($){for(;$.start<0;)$.start+=this._bufferService.cols,E[1]--;this._model.selectionStart=[$.start,E[1]],this._model.selectionStartLength=$.length}}_selectToWordAt(E){const M=this._getWordAt(E,!0);if(M){let $=E[1];for(;M.start<0;)M.start+=this._bufferService.cols,$--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,$++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,$]}}_isCharWordSeparator(E){return E.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(E.getChars())>=0}_selectLineAt(E){const M=this._bufferService.buffer.getWrappedRangeForLine(E),$={start:{x:0,y:M.first},end:{x:this._bufferService.cols-1,y:M.last}};this._model.selectionStart=[0,M.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,w.getRangeLength)($,this._bufferService.cols)}};i.SelectionService=A=u([d(3,S.IBufferService),d(4,S.ICoreService),d(5,k.IMouseService),d(6,S.IOptionsService),d(7,k.IRenderService),d(8,k.ICoreBrowserService)],A)},4725:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ILinkProviderService=i.IThemeService=i.ICharacterJoinerService=i.ISelectionService=i.IRenderService=i.IMouseService=i.ICoreBrowserService=i.ICharSizeService=void 0;const u=c(8343);i.ICharSizeService=(0,u.createDecorator)("CharSizeService"),i.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),i.IMouseService=(0,u.createDecorator)("MouseService"),i.IRenderService=(0,u.createDecorator)("RenderService"),i.ISelectionService=(0,u.createDecorator)("SelectionService"),i.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),i.IThemeService=(0,u.createDecorator)("ThemeService"),i.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(a,i,c){var u=this&&this.__decorate||function(A,E,M,$){var D,I=arguments.length,G=I<3?E:$===null?$=Object.getOwnPropertyDescriptor(E,M):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(A,E,M,$);else for(var H=A.length-1;H>=0;H--)(D=A[H])&&(G=(I<3?D(G):I>3?D(E,M,G):D(E,M))||G);return I>3&&G&&Object.defineProperty(E,M,G),G},d=this&&this.__param||function(A,E){return function(M,$){E(M,$,A)}};Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeService=i.DEFAULT_ANSI_COLORS=void 0;const _=c(7239),p=c(8055),m=c(8460),k=c(844),x=c(2585),v=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),w=p.css.toColor("#ffffff"),y=p.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};i.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],E=[0,95,135,175,215,255];for(let M=0;M<216;M++){const $=E[M/36%6|0],D=E[M/6%6|0],I=E[M%6];A.push({css:p.channels.toCss($,D,I),rgba:p.channels.toRgba($,D,I)})}for(let M=0;M<24;M++){const $=8+10*M;A.push({css:p.channels.toCss($,$,$),rgba:p.channels.toRgba($,$,$)})}return A})());let z=i.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new _.ColorContrastCache,this._halfContrastCache=new _.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:b,cursor:w,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:p.color.blend(b,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:p.color.blend(b,S),ansi:i.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(A={}){const E=this._colors;if(E.foreground=N(A.foreground,v),E.background=N(A.background,b),E.cursor=N(A.cursor,w),E.cursorAccent=N(A.cursorAccent,y),E.selectionBackgroundTransparent=N(A.selectionBackground,S),E.selectionBackgroundOpaque=p.color.blend(E.background,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundTransparent=N(A.selectionInactiveBackground,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundOpaque=p.color.blend(E.background,E.selectionInactiveBackgroundTransparent),E.selectionForeground=A.selectionForeground?N(A.selectionForeground,p.NULL_COLOR):void 0,E.selectionForeground===p.NULL_COLOR&&(E.selectionForeground=void 0),p.color.isOpaque(E.selectionBackgroundTransparent)&&(E.selectionBackgroundTransparent=p.color.opacity(E.selectionBackgroundTransparent,.3)),p.color.isOpaque(E.selectionInactiveBackgroundTransparent)&&(E.selectionInactiveBackgroundTransparent=p.color.opacity(E.selectionInactiveBackgroundTransparent,.3)),E.ansi=i.DEFAULT_ANSI_COLORS.slice(),E.ansi[0]=N(A.black,i.DEFAULT_ANSI_COLORS[0]),E.ansi[1]=N(A.red,i.DEFAULT_ANSI_COLORS[1]),E.ansi[2]=N(A.green,i.DEFAULT_ANSI_COLORS[2]),E.ansi[3]=N(A.yellow,i.DEFAULT_ANSI_COLORS[3]),E.ansi[4]=N(A.blue,i.DEFAULT_ANSI_COLORS[4]),E.ansi[5]=N(A.magenta,i.DEFAULT_ANSI_COLORS[5]),E.ansi[6]=N(A.cyan,i.DEFAULT_ANSI_COLORS[6]),E.ansi[7]=N(A.white,i.DEFAULT_ANSI_COLORS[7]),E.ansi[8]=N(A.brightBlack,i.DEFAULT_ANSI_COLORS[8]),E.ansi[9]=N(A.brightRed,i.DEFAULT_ANSI_COLORS[9]),E.ansi[10]=N(A.brightGreen,i.DEFAULT_ANSI_COLORS[10]),E.ansi[11]=N(A.brightYellow,i.DEFAULT_ANSI_COLORS[11]),E.ansi[12]=N(A.brightBlue,i.DEFAULT_ANSI_COLORS[12]),E.ansi[13]=N(A.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),E.ansi[14]=N(A.brightCyan,i.DEFAULT_ANSI_COLORS[14]),E.ansi[15]=N(A.brightWhite,i.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const M=Math.min(E.ansi.length-16,A.extendedAnsi.length);for(let $=0;${Object.defineProperty(i,"__esModule",{value:!0}),i.CircularList=void 0;const u=c(8460),d=c(844);class _ extends d.Disposable{constructor(m){super(),this._maxLength=m,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(m){if(this._maxLength===m)return;const k=new Array(m);for(let x=0;xthis._length)for(let k=this._length;k=m;v--)this._array[this._getCyclicIndex(v+x.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;vthis._maxLength){const v=this._length+x.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=x.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,k,x){if(!(k<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let b=k-1;b>=0;b--)this.set(m+b+x,this.get(m+b));const v=m+k+x-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v{Object.defineProperty(i,"__esModule",{value:!0}),i.clone=void 0,i.clone=function c(u,d=5){if(typeof u!="object")return u;const _=Array.isArray(u)?[]:{};for(const p in u)_[p]=d<=1?u[p]:u[p]&&c(u[p],d-1);return _}},8055:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.contrastRatio=i.toPaddedHex=i.rgba=i.rgb=i.css=i.color=i.channels=i.NULL_COLOR=void 0;let c=0,u=0,d=0,_=0;var p,m,k,x,v;function b(y){const S=y.toString(16);return S.length<2?"0"+S:S}function w(y,S){return y>>0},y.toColor=function(S,z,N,A){return{css:y.toCss(S,z,N,A),rgba:y.toRgba(S,z,N,A)}}})(p||(i.channels=p={})),(function(y){function S(z,N){return _=Math.round(255*N),[c,u,d]=v.toChannels(z.rgba),{css:p.toCss(c,u,d,_),rgba:p.toRgba(c,u,d,_)}}y.blend=function(z,N){if(_=(255&N.rgba)/255,_===1)return{css:N.css,rgba:N.rgba};const A=N.rgba>>24&255,E=N.rgba>>16&255,M=N.rgba>>8&255,$=z.rgba>>24&255,D=z.rgba>>16&255,I=z.rgba>>8&255;return c=$+Math.round((A-$)*_),u=D+Math.round((E-D)*_),d=I+Math.round((M-I)*_),{css:p.toCss(c,u,d),rgba:p.toRgba(c,u,d)}},y.isOpaque=function(z){return(255&z.rgba)==255},y.ensureContrastRatio=function(z,N,A){const E=v.ensureContrastRatio(z.rgba,N.rgba,A);if(E)return p.toColor(E>>24&255,E>>16&255,E>>8&255)},y.opaque=function(z){const N=(255|z.rgba)>>>0;return[c,u,d]=v.toChannels(N),{css:p.toCss(c,u,d),rgba:N}},y.opacity=S,y.multiplyOpacity=function(z,N){return _=255&z.rgba,S(z,_*N/255)},y.toColorRGB=function(z){return[z.rgba>>24&255,z.rgba>>16&255,z.rgba>>8&255]}})(m||(i.color=m={})),(function(y){let S,z;try{const N=document.createElement("canvas");N.width=1,N.height=1;const A=N.getContext("2d",{willReadFrequently:!0});A&&(S=A,S.globalCompositeOperation="copy",z=S.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(N){if(N.match(/#[\da-f]{3,8}/i))switch(N.length){case 4:return c=parseInt(N.slice(1,2).repeat(2),16),u=parseInt(N.slice(2,3).repeat(2),16),d=parseInt(N.slice(3,4).repeat(2),16),p.toColor(c,u,d);case 5:return c=parseInt(N.slice(1,2).repeat(2),16),u=parseInt(N.slice(2,3).repeat(2),16),d=parseInt(N.slice(3,4).repeat(2),16),_=parseInt(N.slice(4,5).repeat(2),16),p.toColor(c,u,d,_);case 7:return{css:N,rgba:(parseInt(N.slice(1),16)<<8|255)>>>0};case 9:return{css:N,rgba:parseInt(N.slice(1),16)>>>0}}const A=N.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return c=parseInt(A[1]),u=parseInt(A[2]),d=parseInt(A[3]),_=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(c,u,d,_);if(!S||!z)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=z,S.fillStyle=N,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[c,u,d,_]=S.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,d,_),css:N}}})(k||(i.css=k={})),(function(y){function S(z,N,A){const E=z/255,M=N/255,$=A/255;return .2126*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*($<=.03928?$/12.92:Math.pow(($+.055)/1.055,2.4))}y.relativeLuminance=function(z){return S(z>>16&255,z>>8&255,255&z)},y.relativeLuminance2=S})(x||(i.rgb=x={})),(function(y){function S(N,A,E){const M=N>>24&255,$=N>>16&255,D=N>>8&255;let I=A>>24&255,G=A>>16&255,H=A>>8&255,Q=w(x.relativeLuminance2(I,G,H),x.relativeLuminance2(M,$,D));for(;Q0||G>0||H>0);)I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),H-=Math.max(0,Math.ceil(.1*H)),Q=w(x.relativeLuminance2(I,G,H),x.relativeLuminance2(M,$,D));return(I<<24|G<<16|H<<8|255)>>>0}function z(N,A,E){const M=N>>24&255,$=N>>16&255,D=N>>8&255;let I=A>>24&255,G=A>>16&255,H=A>>8&255,Q=w(x.relativeLuminance2(I,G,H),x.relativeLuminance2(M,$,D));for(;Q>>0}y.blend=function(N,A){if(_=(255&A)/255,_===1)return A;const E=A>>24&255,M=A>>16&255,$=A>>8&255,D=N>>24&255,I=N>>16&255,G=N>>8&255;return c=D+Math.round((E-D)*_),u=I+Math.round((M-I)*_),d=G+Math.round(($-G)*_),p.toRgba(c,u,d)},y.ensureContrastRatio=function(N,A,E){const M=x.relativeLuminance(N>>8),$=x.relativeLuminance(A>>8);if(w(M,$)>8));if(Hw(M,x.relativeLuminance(Q>>8))?G:Q}return G}const D=z(N,A,E),I=w(M,x.relativeLuminance(D>>8));if(Iw(M,x.relativeLuminance(G>>8))?D:G}return D}},y.reduceLuminance=S,y.increaseLuminance=z,y.toChannels=function(N){return[N>>24&255,N>>16&255,N>>8&255,255&N]}})(v||(i.rgba=v={})),i.toPaddedHex=b,i.contrastRatio=w},8969:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreTerminal=void 0;const u=c(844),d=c(2585),_=c(4348),p=c(7866),m=c(744),k=c(7302),x=c(6975),v=c(8460),b=c(1753),w=c(1480),y=c(7994),S=c(9282),z=c(5435),N=c(5981),A=c(2660);let E=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((D=>{var I;(I=this._onScrollApi)==null||I.fire(D.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(D){for(const I in D)this.optionsService.options[I]=D[I]}constructor(D){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new _.InstantiationService,this.optionsService=this.register(new k.OptionsService(D)),this._instantiationService.setService(d.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(d.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(d.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(d.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(d.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(d.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(d.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(d.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new z.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new N.WriteBuffer(((I,G)=>this._inputHandler.parse(I,G)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(D,I){this._writeBuffer.write(D,I)}writeSync(D,I){this._logService.logLevel<=d.LogLevelEnum.WARN&&!E&&(this._logService.warn("writeSync is unreliable and will be removed soon."),E=!0),this._writeBuffer.writeSync(D,I)}input(D,I=!0){this.coreService.triggerDataEvent(D,I)}resize(D,I){isNaN(D)||isNaN(I)||(D=Math.max(D,m.MINIMUM_COLS),I=Math.max(I,m.MINIMUM_ROWS),this._bufferService.resize(D,I))}scroll(D,I=!1){this._bufferService.scroll(D,I)}scrollLines(D,I,G){this._bufferService.scrollLines(D,I,G)}scrollPages(D){this.scrollLines(D*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(D){const I=D-this._bufferService.buffer.ydisp;I!==0&&this.scrollLines(I)}registerEscHandler(D,I){return this._inputHandler.registerEscHandler(D,I)}registerDcsHandler(D,I){return this._inputHandler.registerDcsHandler(D,I)}registerCsiHandler(D,I){return this._inputHandler.registerCsiHandler(D,I)}registerOscHandler(D,I){return this._inputHandler.registerOscHandler(D,I)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let D=!1;const I=this.optionsService.rawOptions.windowsPty;I&&I.buildNumber!==void 0&&I.buildNumber!==void 0?D=I.backend==="conpty"&&I.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(D=!0),D?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const D=[];D.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),D.push(this.registerCsiHandler({final:"H"},(()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const I of D)I.dispose()}))}}}i.CoreTerminal=M},8460:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(d)))},i.runAndSubscribe=function(c,u){return u(void 0),c((d=>u(d)))}},5435:function(a,i,c){var u=this&&this.__decorate||function(ee,P,L,F){var q,U=arguments.length,oe=U<3?P:F===null?F=Object.getOwnPropertyDescriptor(P,L):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ee,P,L,F);else for(var ie=ee.length-1;ie>=0;ie--)(q=ee[ie])&&(oe=(U<3?q(oe):U>3?q(P,L,oe):q(P,L))||oe);return U>3&&oe&&Object.defineProperty(P,L,oe),oe},d=this&&this.__param||function(ee,P){return function(L,F){P(L,F,ee)}};Object.defineProperty(i,"__esModule",{value:!0}),i.InputHandler=i.WindowsOptionsReportType=void 0;const _=c(2584),p=c(7116),m=c(2015),k=c(844),x=c(482),v=c(8437),b=c(8460),w=c(643),y=c(511),S=c(3734),z=c(2585),N=c(1480),A=c(6242),E=c(6351),M=c(5941),$={"(":0,")":1,"*":2,"+":3,"-":1,".":2},D=131072;function I(ee,P){if(ee>24)return P.setWinLines||!1;switch(ee){case 1:return!!P.restoreWin;case 2:return!!P.minimizeWin;case 3:return!!P.setWinPosition;case 4:return!!P.setWinSizePixels;case 5:return!!P.raiseWin;case 6:return!!P.lowerWin;case 7:return!!P.refreshWin;case 8:return!!P.setWinSizeChars;case 9:return!!P.maximizeWin;case 10:return!!P.fullscreenWin;case 11:return!!P.getWinState;case 13:return!!P.getWinPosition;case 14:return!!P.getWinSizePixels;case 15:return!!P.getScreenSizePixels;case 16:return!!P.getCellSizePixels;case 18:return!!P.getWinSizeChars;case 19:return!!P.getScreenSizeChars;case 20:return!!P.getIconTitle;case 21:return!!P.getWinTitle;case 22:return!!P.pushTitle;case 23:return!!P.popTitle;case 24:return!!P.setWinLines}return!1}var G;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(G||(i.WindowsOptionsReportType=G={}));let H=0;class Q extends k.Disposable{getAttrData(){return this._curAttrData}constructor(P,L,F,q,U,oe,ie,ce,re=new m.EscapeSequenceParser){super(),this._bufferService=P,this._charsetService=L,this._coreService=F,this._logService=q,this._optionsService=U,this._oscLinkService=oe,this._coreMouseService=ie,this._unicodeService=ce,this._parser=re,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new K(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((W=>this._activeBuffer=W.activeBuffer))),this._parser.setCsiHandlerFallback(((W,ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(W),params:ae.toArray()})})),this._parser.setEscHandlerFallback((W=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(W)})})),this._parser.setExecuteHandlerFallback((W=>{this._logService.debug("Unknown EXECUTE code: ",{code:W})})),this._parser.setOscHandlerFallback(((W,ae,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:W,action:ae,data:le})})),this._parser.setDcsHandlerFallback(((W,ae,le)=>{ae==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(W),action:ae,payload:le})})),this._parser.setPrintHandler(((W,ae,le)=>this.print(W,ae,le))),this._parser.registerCsiHandler({final:"@"},(W=>this.insertChars(W))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(W=>this.scrollLeft(W))),this._parser.registerCsiHandler({final:"A"},(W=>this.cursorUp(W))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(W=>this.scrollRight(W))),this._parser.registerCsiHandler({final:"B"},(W=>this.cursorDown(W))),this._parser.registerCsiHandler({final:"C"},(W=>this.cursorForward(W))),this._parser.registerCsiHandler({final:"D"},(W=>this.cursorBackward(W))),this._parser.registerCsiHandler({final:"E"},(W=>this.cursorNextLine(W))),this._parser.registerCsiHandler({final:"F"},(W=>this.cursorPrecedingLine(W))),this._parser.registerCsiHandler({final:"G"},(W=>this.cursorCharAbsolute(W))),this._parser.registerCsiHandler({final:"H"},(W=>this.cursorPosition(W))),this._parser.registerCsiHandler({final:"I"},(W=>this.cursorForwardTab(W))),this._parser.registerCsiHandler({final:"J"},(W=>this.eraseInDisplay(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(W=>this.eraseInDisplay(W,!0))),this._parser.registerCsiHandler({final:"K"},(W=>this.eraseInLine(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(W=>this.eraseInLine(W,!0))),this._parser.registerCsiHandler({final:"L"},(W=>this.insertLines(W))),this._parser.registerCsiHandler({final:"M"},(W=>this.deleteLines(W))),this._parser.registerCsiHandler({final:"P"},(W=>this.deleteChars(W))),this._parser.registerCsiHandler({final:"S"},(W=>this.scrollUp(W))),this._parser.registerCsiHandler({final:"T"},(W=>this.scrollDown(W))),this._parser.registerCsiHandler({final:"X"},(W=>this.eraseChars(W))),this._parser.registerCsiHandler({final:"Z"},(W=>this.cursorBackwardTab(W))),this._parser.registerCsiHandler({final:"`"},(W=>this.charPosAbsolute(W))),this._parser.registerCsiHandler({final:"a"},(W=>this.hPositionRelative(W))),this._parser.registerCsiHandler({final:"b"},(W=>this.repeatPrecedingCharacter(W))),this._parser.registerCsiHandler({final:"c"},(W=>this.sendDeviceAttributesPrimary(W))),this._parser.registerCsiHandler({prefix:">",final:"c"},(W=>this.sendDeviceAttributesSecondary(W))),this._parser.registerCsiHandler({final:"d"},(W=>this.linePosAbsolute(W))),this._parser.registerCsiHandler({final:"e"},(W=>this.vPositionRelative(W))),this._parser.registerCsiHandler({final:"f"},(W=>this.hVPosition(W))),this._parser.registerCsiHandler({final:"g"},(W=>this.tabClear(W))),this._parser.registerCsiHandler({final:"h"},(W=>this.setMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(W=>this.setModePrivate(W))),this._parser.registerCsiHandler({final:"l"},(W=>this.resetMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(W=>this.resetModePrivate(W))),this._parser.registerCsiHandler({final:"m"},(W=>this.charAttributes(W))),this._parser.registerCsiHandler({final:"n"},(W=>this.deviceStatus(W))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(W=>this.deviceStatusPrivate(W))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(W=>this.softReset(W))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(W=>this.setCursorStyle(W))),this._parser.registerCsiHandler({final:"r"},(W=>this.setScrollRegion(W))),this._parser.registerCsiHandler({final:"s"},(W=>this.saveCursor(W))),this._parser.registerCsiHandler({final:"t"},(W=>this.windowOptions(W))),this._parser.registerCsiHandler({final:"u"},(W=>this.restoreCursor(W))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(W=>this.insertColumns(W))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(W=>this.deleteColumns(W))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(W=>this.selectProtected(W))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(W=>this.requestMode(W,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(W=>this.requestMode(W,!1))),this._parser.setExecuteHandler(_.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(_.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(_.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(_.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(_.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(_.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(_.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(_.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(_.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new A.OscHandler((W=>(this.setTitle(W),this.setIconName(W),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((W=>this.setIconName(W)))),this._parser.registerOscHandler(2,new A.OscHandler((W=>this.setTitle(W)))),this._parser.registerOscHandler(4,new A.OscHandler((W=>this.setOrReportIndexedColor(W)))),this._parser.registerOscHandler(8,new A.OscHandler((W=>this.setHyperlink(W)))),this._parser.registerOscHandler(10,new A.OscHandler((W=>this.setOrReportFgColor(W)))),this._parser.registerOscHandler(11,new A.OscHandler((W=>this.setOrReportBgColor(W)))),this._parser.registerOscHandler(12,new A.OscHandler((W=>this.setOrReportCursorColor(W)))),this._parser.registerOscHandler(104,new A.OscHandler((W=>this.restoreIndexedColor(W)))),this._parser.registerOscHandler(110,new A.OscHandler((W=>this.restoreFgColor(W)))),this._parser.registerOscHandler(111,new A.OscHandler((W=>this.restoreBgColor(W)))),this._parser.registerOscHandler(112,new A.OscHandler((W=>this.restoreCursorColor(W)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const W in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:W},(()=>this.selectCharset("("+W))),this._parser.registerEscHandler({intermediates:")",final:W},(()=>this.selectCharset(")"+W))),this._parser.registerEscHandler({intermediates:"*",final:W},(()=>this.selectCharset("*"+W))),this._parser.registerEscHandler({intermediates:"+",final:W},(()=>this.selectCharset("+"+W))),this._parser.registerEscHandler({intermediates:"-",final:W},(()=>this.selectCharset("-"+W))),this._parser.registerEscHandler({intermediates:".",final:W},(()=>this.selectCharset("."+W))),this._parser.registerEscHandler({intermediates:"/",final:W},(()=>this.selectCharset("/"+W)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((W=>(this._logService.error("Parsing error: ",W),W))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new E.DcsHandler(((W,ae)=>this.requestStatusString(W,ae))))}_preserveStack(P,L,F,q){this._parseStack.paused=!0,this._parseStack.cursorStartX=P,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=F,this._parseStack.position=q}_logSlowResolvingAsync(P){this._logService.logLevel<=z.LogLevelEnum.WARN&&Promise.race([P,new Promise(((L,F)=>setTimeout((()=>F("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(P,L){let F,q=this._activeBuffer.x,U=this._activeBuffer.y,oe=0;const ie=this._parseStack.paused;if(ie){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(F),F;q=this._parseStack.cursorStartX,U=this._parseStack.cursorStartY,this._parseStack.paused=!1,P.length>D&&(oe=this._parseStack.position+D)}if(this._logService.logLevel<=z.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof P=="string"?` "${P}"`:` "${Array.prototype.map.call(P,(W=>String.fromCharCode(W))).join("")}"`),typeof P=="string"?P.split("").map((W=>W.charCodeAt(0))):P),this._parseBuffer.lengthD)for(let W=oe;W0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ae);let me=this._parser.precedingJoinState;for(let be=L;bece){if(re){const Me=le;let Fe=this._activeBuffer.x-Xe;for(this._activeBuffer.x=Xe,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Xe>0&&le instanceof v.BufferLine&&le.copyCellsFrom(Me,Fe,0,Xe,!1);Fe=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}else if(W&&(le.insertCells(this._activeBuffer.x,U-Xe,this._activeBuffer.getNullCell(ae)),le.getWidth(ce-1)===2&&le.setCellFromCodepoint(ce-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,ae)),le.setCellFromCodepoint(this._activeBuffer.x++,q,U,ae),U>0)for(;--U;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}this._parser.precedingJoinState=me,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(P,L){return P.final!=="t"||P.prefix||P.intermediates?this._parser.registerCsiHandler(P,L):this._parser.registerCsiHandler(P,(F=>!I(F.params[0],this._optionsService.rawOptions.windowOptions)||L(F)))}registerDcsHandler(P,L){return this._parser.registerDcsHandler(P,new E.DcsHandler(L))}registerEscHandler(P,L){return this._parser.registerEscHandler(P,L)}registerOscHandler(P,L){return this._parser.registerOscHandler(P,new A.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var P;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&P.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const P=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-P),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(P=this._bufferService.cols-1){this._activeBuffer.x=Math.min(P,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(P,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=P,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=P,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(P,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+P,this._activeBuffer.y+L)}cursorUp(P){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,P.params[0]||1)):this._moveCursor(0,-(P.params[0]||1)),!0}cursorDown(P){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,P.params[0]||1)):this._moveCursor(0,P.params[0]||1),!0}cursorForward(P){return this._moveCursor(P.params[0]||1,0),!0}cursorBackward(P){return this._moveCursor(-(P.params[0]||1),0),!0}cursorNextLine(P){return this.cursorDown(P),this._activeBuffer.x=0,!0}cursorPrecedingLine(P){return this.cursorUp(P),this._activeBuffer.x=0,!0}cursorCharAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(P){return this._setCursor(P.length>=2?(P.params[1]||1)-1:0,(P.params[0]||1)-1),!0}charPosAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(P){return this._moveCursor(P.params[0]||1,0),!0}linePosAbsolute(P){return this._setCursor(this._activeBuffer.x,(P.params[0]||1)-1),!0}vPositionRelative(P){return this._moveCursor(0,P.params[0]||1),!0}hVPosition(P){return this.cursorPosition(P),!0}tabClear(P){const L=P.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(P){const L=P.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(P,L,F,q=!1,U=!1){const oe=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);oe.replaceCells(L,F,this._activeBuffer.getNullCell(this._eraseAttrData()),U),q&&(oe.isWrapped=!1)}_resetBufferLine(P,L=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+P),F.isWrapped=!1)}eraseInDisplay(P,L=!1){let F;switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 3:const q=this._activeBuffer.lines.length-this._bufferService.rows;q>0&&(this._activeBuffer.lines.trimStart(q),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-q,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-q,0),this._onScroll.fire(0))}return!0}eraseInLine(P,L=!1){switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(P){this._restrictCursor();let L=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let re=ce;for(let W=1;W0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(P){return P.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(P.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.C0.ESC+"[>83;40003;0c")),!0}_is(P){return(this._optionsService.rawOptions.termName+"").indexOf(P)===0}setMode(P){for(let L=0;LBe?1:2,me=P.params[0];return be=me,Se=L?me===2?4:me===4?le(oe.modes.insertMode):me===12?3:me===20?le(ae.convertEol):0:me===1?le(F.applicationCursorKeys):me===3?ae.windowOptions.setWinLines?ce===80?2:ce===132?1:0:0:me===6?le(F.origin):me===7?le(F.wraparound):me===8?3:me===9?le(q==="X10"):me===12?le(ae.cursorBlink):me===25?le(!oe.isCursorHidden):me===45?le(F.reverseWraparound):me===66?le(F.applicationKeypad):me===67?4:me===1e3?le(q==="VT200"):me===1002?le(q==="DRAG"):me===1003?le(q==="ANY"):me===1004?le(F.sendFocus):me===1005?4:me===1006?le(U==="SGR"):me===1015?4:me===1016?le(U==="SGR_PIXELS"):me===1048?1:me===47||me===1047||me===1049?le(re===W):me===2004?le(F.bracketedPasteMode):0,oe.triggerDataEvent(`${_.C0.ESC}[${L?"":"?"}${be};${Se}$y`),!0;var be,Se}_updateAttrColor(P,L,F,q,U){return L===2?(P|=50331648,P&=-16777216,P|=S.AttributeData.fromColorRGB([F,q,U])):L===5&&(P&=-50331904,P|=33554432|255&F),P}_extractColor(P,L,F){const q=[0,0,-1,0,0,0];let U=0,oe=0;do{if(q[oe+U]=P.params[L+oe],P.hasSubParams(L+oe)){const ie=P.getSubParams(L+oe);let ce=0;do q[1]===5&&(U=1),q[oe+ce+1+U]=ie[ce];while(++ce=2||q[1]===2&&oe+U>=5)break;q[1]&&(U=1)}while(++oe+L5)&&(P=1),L.extended.underlineStyle=P,L.fg|=268435456,P===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(P){P.fg=v.DEFAULT_ATTR_DATA.fg,P.bg=v.DEFAULT_ATTR_DATA.bg,P.extended=P.extended.clone(),P.extended.underlineStyle=0,P.extended.underlineColor&=-67108864,P.updateExtended()}charAttributes(P){if(P.length===1&&P.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=P.length;let F;const q=this._curAttrData;for(let U=0;U=30&&F<=37?(q.fg&=-50331904,q.fg|=16777216|F-30):F>=40&&F<=47?(q.bg&=-50331904,q.bg|=16777216|F-40):F>=90&&F<=97?(q.fg&=-50331904,q.fg|=16777224|F-90):F>=100&&F<=107?(q.bg&=-50331904,q.bg|=16777224|F-100):F===0?this._processSGR0(q):F===1?q.fg|=134217728:F===3?q.bg|=67108864:F===4?(q.fg|=268435456,this._processUnderline(P.hasSubParams(U)?P.getSubParams(U)[0]:1,q)):F===5?q.fg|=536870912:F===7?q.fg|=67108864:F===8?q.fg|=1073741824:F===9?q.fg|=2147483648:F===2?q.bg|=134217728:F===21?this._processUnderline(2,q):F===22?(q.fg&=-134217729,q.bg&=-134217729):F===23?q.bg&=-67108865:F===24?(q.fg&=-268435457,this._processUnderline(0,q)):F===25?q.fg&=-536870913:F===27?q.fg&=-67108865:F===28?q.fg&=-1073741825:F===29?q.fg&=2147483647:F===39?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?U+=this._extractColor(P,U,q):F===53?q.bg|=1073741824:F===55?q.bg&=-1073741825:F===59?(q.extended=q.extended.clone(),q.extended.underlineColor=-1,q.updateExtended()):F===100?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",F);return!0}deviceStatus(P){switch(P.params[0]){case 5:this._coreService.triggerDataEvent(`${_.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[${L};${F}R`)}return!0}deviceStatusPrivate(P){if(P.params[0]===6){const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[?${L};${F}R`)}return!0}softReset(P){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(P){const L=P.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const F=L%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion(P){const L=P.params[0]||1;let F;return(P.length<2||(F=P.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions(P){if(!I(P.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=P.length>1?P.params[1]:0;switch(P.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(G.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(G.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${_.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(P){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(P){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(P){return this._windowTitle=P,this._onTitleChange.fire(P),!0}setIconName(P){return this._iconName=P,!0}setOrReportIndexedColor(P){const L=[],F=P.split(";");for(;F.length>1;){const q=F.shift(),U=F.shift();if(/^\d+$/.exec(q)){const oe=parseInt(q);if(J(oe))if(U==="?")L.push({type:0,index:oe});else{const ie=(0,M.parseColor)(U);ie&&L.push({type:1,index:oe,color:ie})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(P){const L=P.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(P,L){this._getCurrentLinkId()&&this._finishHyperlink();const F=P.split(":");let q;const U=F.findIndex((oe=>oe.startsWith("id=")));return U!==-1&&(q=F[U].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:q,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(P,L){const F=P.split(";");for(let q=0;q=this._specialColors.length);++q,++L)if(F[q]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const U=(0,M.parseColor)(F[q]);U&&this._onColor.fire([{type:1,index:this._specialColors[L],color:U}])}return!0}setOrReportFgColor(P){return this._setOrReportSpecialColor(P,0)}setOrReportBgColor(P){return this._setOrReportSpecialColor(P,1)}setOrReportCursorColor(P){return this._setOrReportSpecialColor(P,2)}restoreIndexedColor(P){if(!P)return this._onColor.fire([{type:2}]),!0;const L=[],F=P.split(";");for(let q=0;q=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const P=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,P,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(P){return this._charsetService.setgLevel(P),!0}screenAlignmentPattern(){const P=new y.CellData;P.content=4194373,P.fg=this._curAttrData.fg,P.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${_.C0.ESC}${U}${_.C0.ESC}\\`),!0))(P==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:P==='"p'?'P1$r61;1"p':P==="r"?`P1$r${F.scrollTop+1};${F.scrollBottom+1}r`:P==="m"?"P1$r0m":P===" q"?`P1$r${{block:2,underline:4,bar:6}[q.cursorStyle]-(q.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(P,L){this._dirtyRowTracker.markRangeDirty(P,L)}}i.InputHandler=Q;let K=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){eethis.end&&(this.end=ee)}markRangeDirty(ee,P){ee>P&&(H=ee,ee=P,P=H),eethis.end&&(this.end=P)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(ee){return 0<=ee&&ee<256}K=u([d(0,z.IBufferService)],K)},844:(a,i)=>{function c(u){for(const d of u)d.dispose();u.length=0}Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.toDisposable=i.MutableDisposable=i.Disposable=void 0,i.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const d=this._disposables.indexOf(u);d!==-1&&this._disposables.splice(d,1)}},i.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var d;this._isDisposed||u===this._value||((d=this._value)==null||d.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},i.toDisposable=function(u){return{dispose:u}},i.disposeArray=c,i.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(d,_,p){this._data[d]||(this._data[d]={}),this._data[d][_]=p}get(d,_){return this._data[d]?this._data[d][_]:void 0}clear(){this._data={}}}i.TwoKeyMap=c,i.FourKeyMap=class{constructor(){this._data=new c}set(u,d,_,p,m){this._data.get(u,d)||this._data.set(u,d,new c),this._data.get(u,d).set(_,p,m)}get(u,d,_,p){var m;return(m=this._data.get(u,d))==null?void 0:m.get(_,p)}clear(){this._data.clear()}}},6114:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.isChromeOS=i.isLinux=i.isWindows=i.isIphone=i.isIpad=i.isMac=i.getSafariVersion=i.isSafari=i.isLegacyEdge=i.isFirefox=i.isNode=void 0,i.isNode=typeof process<"u"&&"title"in process;const c=i.isNode?"node":navigator.userAgent,u=i.isNode?"node":navigator.platform;i.isFirefox=c.includes("Firefox"),i.isLegacyEdge=c.includes("Edge"),i.isSafari=/^((?!chrome|android).)*safari/i.test(c),i.getSafariVersion=function(){if(!i.isSafari)return 0;const d=c.match(/Version\/(\d+)/);return d===null||d.length<2?0:parseInt(d[1])},i.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),i.isIpad=u==="iPad",i.isIphone=u==="iPhone",i.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),i.isLinux=u.indexOf("Linux")>=0,i.isChromeOS=/\bCrOS\b/.test(c)},6106:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SortedList=void 0;let c=0;i.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const d=this._getKey(u);if(d===void 0||(c=this._search(d),c===-1)||this._getKey(this._array[c])!==d)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===u))do d(this._array[c]);while(++c=d;){let p=d+_>>1;const m=this._getKey(this._array[p]);if(m>u)_=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}d=p+1}}return d}}},7226:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DebouncedIdleTask=i.IdleTaskQueue=i.PriorityTaskQueue=void 0;const u=c(6114);class d{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-k))}ms`),void this._start();v=b}this.clear()}}class _ extends d{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const k=Date.now()+m;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}i.PriorityTaskQueue=_,i.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends d{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:_,i.DebouncedIdleTask=class{constructor(){this._queue=new i.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.updateWindowsModeWrappedState=void 0;const u=c(643);i.updateWindowsModeWrappedState=function(d){const _=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),p=_==null?void 0:_.get(d.cols-1),m=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);m&&p&&(m.isWrapped=p[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&p[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ExtendedAttrs=i.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(_){return[_>>>16&255,_>>>8&255,255&_]}static fromColorRGB(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]}clone(){const _=new c;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}i.AttributeData=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(_){this._ext=_}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(_){this._ext&=-469762049,this._ext|=_<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(_){this._ext&=-67108864,this._ext|=67108863&_}get urlId(){return this._urlId}set urlId(_){this._urlId=_}get underlineVariantOffset(){const _=(3758096384&this._ext)>>29;return _<0?4294967288^_:_}set underlineVariantOffset(_){this._ext&=536870911,this._ext|=_<<29&3758096384}constructor(_=0,p=0){this._ext=0,this._urlId=0,this._ext=_,this._urlId=p}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}i.ExtendedAttrs=u},9092:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Buffer=i.MAX_BUFFER_SIZE=void 0;const u=c(6349),d=c(7226),_=c(3734),p=c(8437),m=c(4634),k=c(511),x=c(643),v=c(4863),b=c(7116);i.MAX_BUFFER_SIZE=4294967295,i.Buffer=class{constructor(w,y,S){this._hasScrollback=w,this._optionsService=y,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=k.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=k.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new d.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(w){return w?(this._nullCell.fg=w.fg,this._nullCell.bg=w.bg,this._nullCell.extended=w.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new _.ExtendedAttrs),this._nullCell}getWhitespaceCell(w){return w?(this._whitespaceCell.fg=w.fg,this._whitespaceCell.bg=w.bg,this._whitespaceCell.extended=w.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new _.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,y){return new p.BufferLine(this._bufferService.cols,this.getNullCell(w),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const w=this.ybase+this.y-this.ydisp;return w>=0&&wi.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:y}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=p.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(w))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(w,y){const S=this.getNullCell(p.DEFAULT_ATTR_DATA);let z=0;const N=this._getCorrectBufferLength(y);if(N>this.lines.maxLength&&(this.lines.maxLength=N),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(w,S)));else for(let E=this._rows;E>y;E--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(N0&&(this.lines.trimStart(E),this.ybase=Math.max(this.ybase-E,0),this.ydisp=Math.max(this.ydisp-E,0),this.savedY=Math.max(this.savedY-E,0)),this.lines.maxLength=N}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,y-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(w,y),this._cols>w))for(let A=0;A.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let w=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,w=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return w}get _isReflowEnabled(){const w=this._optionsService.rawOptions.windowsPty;return w&&w.buildNumber?this._hasScrollback&&w.backend==="conpty"&&w.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(w,y){this._cols!==w&&(w>this._cols?this._reflowLarger(w,y):this._reflowSmaller(w,y))}_reflowLarger(w,y){const S=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(S.length>0){const z=(0,m.reflowLargerCreateNewLayout)(this.lines,S);(0,m.reflowLargerApplyNewLayout)(this.lines,z.layout),this._reflowLargerAdjustViewport(w,y,z.countRemoved)}}_reflowLargerAdjustViewport(w,y,S){const z=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=S;for(;N-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;A--){let E=this.lines.get(A);if(!E||!E.isWrapped&&E.getTrimmedLength()<=w)continue;const M=[E];for(;E.isWrapped&&A>0;)E=this.lines.get(--A),M.unshift(E);const $=this.ybase+this.y;if($>=A&&$0&&(z.push({start:A+M.length+N,newLines:Q}),N+=Q.length),M.push(...Q);let K=I.length-1,J=I[K];J===0&&(K--,J=I[K]);let ee=M.length-G-1,P=D;for(;ee>=0;){const F=Math.min(P,J);if(M[K]===void 0)break;if(M[K].copyCellsFrom(M[ee],P-F,J-F,F,!0),J-=F,J===0&&(K--,J=I[K]),P-=F,P===0){ee--;const q=Math.max(ee,0);P=(0,m.getWrappedLineTrimmedLength)(M,q,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const A=[],E=[];for(let K=0;K=0;K--)if(I&&I.start>$+G){for(let J=I.newLines.length-1;J>=0;J--)this.lines.set(K--,I.newLines[J]);K++,A.push({index:$+1,amount:I.newLines.length}),G+=I.newLines.length,I=z[++D]}else this.lines.set(K,E[$--]);let H=0;for(let K=A.length-1;K>=0;K--)A[K].index+=H,this.lines.onInsertEmitter.fire(A[K]),H+=A[K].amount;const Q=Math.max(0,M+N-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(w,y,S=0,z){const N=this.lines.get(w);return N?N.translateToString(y,S,z):""}getWrappedRangeForLine(w){let y=w,S=w;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;S+10;);return w>=this._cols?this._cols-1:w<0?0:w}nextStop(w){for(w==null&&(w=this.x);!this.tabs[++w]&&w=this._cols?this._cols-1:w<0?0:w}clearMarkers(w){this._isClearing=!0;for(let y=0;y{y.line-=S,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((S=>{y.line>=S.index&&(y.line+=S.amount)}))),y.register(this.lines.onDelete((S=>{y.line>=S.index&&y.lineS.index&&(y.line-=S.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLine=i.DEFAULT_ATTR_DATA=void 0;const u=c(3734),d=c(511),_=c(643),p=c(482);i.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class k{constructor(v,b,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const y=b||d.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]);for(let S=0;S>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):w]}set(v,b){this._data[3*v+1]=b[_.CHAR_DATA_ATTR_INDEX],b[_.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[_.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,w,y){268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=b|w<<22,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}addCodepointToCell(v,b,w){let y=this._data[3*v+0];2097152&y?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&y?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&y)+(0,p.stringFromCodePoint)(b),y&=-2097152,y|=2097152):y=b|4194304,w&&(y&=-12582913,y|=w<<22),this._data[3*v+0]=y}insertCells(v,b,w){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,w),b=0;--S)this.setCell(v+b+S,this.loadCell(v+S,y));for(let S=0;Sthis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{const y=new Uint32Array(w);y.set(this._data),this._data=y}for(let y=this.length;y=v&&delete this._combined[N]}const S=Object.keys(this._extendedAttrs);for(let z=0;z=v&&delete this._extendedAttrs[N]}}return this.length=v,4*w*2=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,b,w,y,S){const z=v._data;if(S)for(let A=y-1;A>=0;A--){for(let E=0;E<3;E++)this._data[3*(w+A)+E]=z[3*(b+A)+E];268435456&z[3*(b+A)+2]&&(this._extendedAttrs[w+A]=v._extendedAttrs[b+A])}else for(let A=0;A=b&&(this._combined[E-b+w]=v._combined[E])}}translateToString(v,b,w,y){b=b??0,w=w??this.length,v&&(w=Math.min(w,this.getTrimmedLength())),y&&(y.length=0);let S="";for(;b>22||1}return y&&y.push(b),S}}i.BufferLine=k},4841:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.getRangeLength=void 0,i.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(a,i)=>{function c(u,d,_){if(d===u.length-1)return u[d].getTrimmedLength();const p=!u[d].hasContent(_-1)&&u[d].getWidth(_-1)===1,m=u[d+1].getWidth(0)===2;return p&&m?_-1:_}Object.defineProperty(i,"__esModule",{value:!0}),i.getWrappedLineTrimmedLength=i.reflowSmallerGetNewLineLengths=i.reflowLargerApplyNewLayout=i.reflowLargerCreateNewLayout=i.reflowLargerGetLinesToRemove=void 0,i.reflowLargerGetLinesToRemove=function(u,d,_,p,m){const k=[];for(let x=0;x=x&&p0&&(E>y||w[E].getTrimmedLength()===0);E--)A++;A>0&&(k.push(x+w.length-A),k.push(A)),x+=w.length-1}return k},i.reflowLargerCreateNewLayout=function(u,d){const _=[];let p=0,m=d[p],k=0;for(let x=0;xc(u,w,d))).reduce(((b,w)=>b+w));let k=0,x=0,v=0;for(;vb&&(k-=b,x++);const w=u[x].getWidth(k-1)===2;w&&k--;const y=w?_-1:_;p.push(y),v+=y}return p},i.getWrappedLineTrimmedLength=c},5295:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferSet=void 0;const u=c(8460),d=c(844),_=c(9092);class p extends d.Disposable{constructor(k,x){super(),this._optionsService=k,this._bufferService=x,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(k){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(k),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(k,x){this._normal.resize(k,x),this._alt.resize(k,x),this.setupTabStops(k)}setupTabStops(k){this._normal.setupTabStops(k),this._alt.setupTabStops(k)}}i.BufferSet=p},511:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CellData=void 0;const u=c(482),d=c(643),_=c(3734);class p extends _.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new _.ExtendedAttrs,this.combinedData=""}static fromCharData(k){const x=new p;return x.setFromCharData(k),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(k){this.fg=k[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(k[d.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(k[d.CHAR_DATA_CHAR_INDEX].length===2){const v=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|k[d.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[d.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=k[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.CellData=p},643:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WHITESPACE_CELL_CODE=i.WHITESPACE_CELL_WIDTH=i.WHITESPACE_CELL_CHAR=i.NULL_CELL_CODE=i.NULL_CELL_WIDTH=i.NULL_CELL_CHAR=i.CHAR_DATA_CODE_INDEX=i.CHAR_DATA_WIDTH_INDEX=i.CHAR_DATA_CHAR_INDEX=i.CHAR_DATA_ATTR_INDEX=i.DEFAULT_EXT=i.DEFAULT_ATTR=i.DEFAULT_COLOR=void 0,i.DEFAULT_COLOR=0,i.DEFAULT_ATTR=256|i.DEFAULT_COLOR<<9,i.DEFAULT_EXT=0,i.CHAR_DATA_ATTR_INDEX=0,i.CHAR_DATA_CHAR_INDEX=1,i.CHAR_DATA_WIDTH_INDEX=2,i.CHAR_DATA_CODE_INDEX=3,i.NULL_CELL_CHAR="",i.NULL_CELL_WIDTH=1,i.NULL_CELL_CODE=0,i.WHITESPACE_CELL_CHAR=" ",i.WHITESPACE_CELL_WIDTH=1,i.WHITESPACE_CELL_CODE=32},4863:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Marker=void 0;const u=c(8460),d=c(844);class _{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=_._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,d.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}i.Marker=_,_._nextId=1},7116:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CHARSET=i.CHARSETS=void 0,i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=void 0,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,i)=>{var c,u,d;Object.defineProperty(i,"__esModule",{value:!0}),i.C1_ESCAPED=i.C1=i.C0=void 0,(function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=` -`,_.VT="\v",_.FF="\f",_.CR="\r",_.SO="",_.SI="",_.DLE="",_.DC1="",_.DC2="",_.DC3="",_.DC4="",_.NAK="",_.SYN="",_.ETB="",_.CAN="",_.EM="",_.SUB="",_.ESC="\x1B",_.FS="",_.GS="",_.RS="",_.US="",_.SP=" ",_.DEL=""})(c||(i.C0=c={})),(function(_){_.PAD="€",_.HOP="",_.BPH="‚",_.NBH="ƒ",_.IND="„",_.NEL="…",_.SSA="†",_.ESA="‡",_.HTS="ˆ",_.HTJ="‰",_.VTS="Š",_.PLD="‹",_.PLU="Œ",_.RI="",_.SS2="Ž",_.SS3="",_.DCS="",_.PU1="‘",_.PU2="’",_.STS="“",_.CCH="”",_.MW="•",_.SPA="–",_.EPA="—",_.SOS="˜",_.SGCI="™",_.SCI="š",_.CSI="›",_.ST="œ",_.OSC="",_.PM="ž",_.APC="Ÿ"})(u||(i.C1=u={})),(function(_){_.ST=`${c.ESC}\\`})(d||(i.C1_ESCAPED=d={}))},7399:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.evaluateKeyboardEvent=void 0;const u=c(2584),d={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};i.evaluateKeyboardEvent=function(_,p,m,k){const x={type:0,cancel:!1,key:void 0},v=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?x.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?x.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?x.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(x.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:x.key=_.ctrlKey?"\b":u.C0.DEL,_.altKey&&(x.key=u.C0.ESC+x.key);break;case 9:if(_.shiftKey){x.key=u.C0.ESC+"[Z";break}x.key=u.C0.HT,x.cancel=!0;break;case 13:x.key=_.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,x.cancel=!0;break;case 27:x.key=u.C0.ESC,_.altKey&&(x.key=u.C0.ESC+u.C0.ESC),x.cancel=!0;break;case 37:if(_.metaKey)break;v?(x.key=u.C0.ESC+"[1;"+(v+1)+"D",x.key===u.C0.ESC+"[1;3D"&&(x.key=u.C0.ESC+(m?"b":"[1;5D"))):x.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(_.metaKey)break;v?(x.key=u.C0.ESC+"[1;"+(v+1)+"C",x.key===u.C0.ESC+"[1;3C"&&(x.key=u.C0.ESC+(m?"f":"[1;5C"))):x.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(_.metaKey)break;v?(x.key=u.C0.ESC+"[1;"+(v+1)+"A",m||x.key!==u.C0.ESC+"[1;3A"||(x.key=u.C0.ESC+"[1;5A")):x.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(_.metaKey)break;v?(x.key=u.C0.ESC+"[1;"+(v+1)+"B",m||x.key!==u.C0.ESC+"[1;3B"||(x.key=u.C0.ESC+"[1;5B")):x.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(x.key=u.C0.ESC+"[2~");break;case 46:x.key=v?u.C0.ESC+"[3;"+(v+1)+"~":u.C0.ESC+"[3~";break;case 36:x.key=v?u.C0.ESC+"[1;"+(v+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:x.key=v?u.C0.ESC+"[1;"+(v+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:_.shiftKey?x.type=2:_.ctrlKey?x.key=u.C0.ESC+"[5;"+(v+1)+"~":x.key=u.C0.ESC+"[5~";break;case 34:_.shiftKey?x.type=3:_.ctrlKey?x.key=u.C0.ESC+"[6;"+(v+1)+"~":x.key=u.C0.ESC+"[6~";break;case 112:x.key=v?u.C0.ESC+"[1;"+(v+1)+"P":u.C0.ESC+"OP";break;case 113:x.key=v?u.C0.ESC+"[1;"+(v+1)+"Q":u.C0.ESC+"OQ";break;case 114:x.key=v?u.C0.ESC+"[1;"+(v+1)+"R":u.C0.ESC+"OR";break;case 115:x.key=v?u.C0.ESC+"[1;"+(v+1)+"S":u.C0.ESC+"OS";break;case 116:x.key=v?u.C0.ESC+"[15;"+(v+1)+"~":u.C0.ESC+"[15~";break;case 117:x.key=v?u.C0.ESC+"[17;"+(v+1)+"~":u.C0.ESC+"[17~";break;case 118:x.key=v?u.C0.ESC+"[18;"+(v+1)+"~":u.C0.ESC+"[18~";break;case 119:x.key=v?u.C0.ESC+"[19;"+(v+1)+"~":u.C0.ESC+"[19~";break;case 120:x.key=v?u.C0.ESC+"[20;"+(v+1)+"~":u.C0.ESC+"[20~";break;case 121:x.key=v?u.C0.ESC+"[21;"+(v+1)+"~":u.C0.ESC+"[21~";break;case 122:x.key=v?u.C0.ESC+"[23;"+(v+1)+"~":u.C0.ESC+"[23~";break;case 123:x.key=v?u.C0.ESC+"[24;"+(v+1)+"~":u.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(m&&!k||!_.altKey||_.metaKey)!m||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?x.key=_.key:_.key&&_.ctrlKey&&(_.key==="_"&&(x.key=u.C0.US),_.key==="@"&&(x.key=u.C0.NUL)):_.keyCode===65&&(x.type=1);else{const b=d[_.keyCode],w=b==null?void 0:b[_.shiftKey?1:0];if(w)x.key=u.C0.ESC+w;else if(_.keyCode>=65&&_.keyCode<=90){const y=_.ctrlKey?_.keyCode-64:_.keyCode+32;let S=String.fromCharCode(y);_.shiftKey&&(S=S.toUpperCase()),x.key=u.C0.ESC+S}else if(_.keyCode===32)x.key=u.C0.ESC+(_.ctrlKey?u.C0.NUL:" ");else if(_.key==="Dead"&&_.code.startsWith("Key")){let y=_.code.slice(3,4);_.shiftKey||(y=y.toLowerCase()),x.key=u.C0.ESC+y,x.cancel=!0}}else _.keyCode>=65&&_.keyCode<=90?x.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?x.key=u.C0.NUL:_.keyCode>=51&&_.keyCode<=55?x.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?x.key=u.C0.DEL:_.keyCode===219?x.key=u.C0.ESC:_.keyCode===220?x.key=u.C0.FS:_.keyCode===221&&(x.key=u.C0.GS)}return x}},482:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Utf8ToUtf32=i.StringToUtf32=i.utf32ToString=i.stringFromCodePoint=void 0,i.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},i.utf32ToString=function(c,u=0,d=c.length){let _="";for(let p=u;p65535?(m-=65536,_+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):_+=String.fromCharCode(m)}return _},i.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const d=c.length;if(!d)return 0;let _=0,p=0;if(this._interim){const m=c.charCodeAt(p++);56320<=m&&m<=57343?u[_++]=1024*(this._interim-55296)+m-56320+65536:(u[_++]=this._interim,u[_++]=m),this._interim=0}for(let m=p;m=d)return this._interim=k,_;const x=c.charCodeAt(m);56320<=x&&x<=57343?u[_++]=1024*(k-55296)+x-56320+65536:(u[_++]=k,u[_++]=x)}else k!==65279&&(u[_++]=k)}return _}},i.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const d=c.length;if(!d)return 0;let _,p,m,k,x=0,v=0,b=0;if(this.interim[0]){let S=!1,z=this.interim[0];z&=(224&z)==192?31:(240&z)==224?15:7;let N,A=0;for(;(N=63&this.interim[++A])&&A<4;)z<<=6,z|=N;const E=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=E-A;for(;b=d)return 0;if(N=c[b++],(192&N)!=128){b--,S=!0;break}this.interim[A++]=N,z<<=6,z|=63&N}S||(E===2?z<128?b--:u[x++]=z:E===3?z<2048||z>=55296&&z<=57343||z===65279||(u[x++]=z):z<65536||z>1114111||(u[x++]=z)),this.interim.fill(0)}const w=d-4;let y=b;for(;y=d)return this.interim[0]=_,x;if(p=c[y++],(192&p)!=128){y--;continue}if(v=(31&_)<<6|63&p,v<128){y--;continue}u[x++]=v}else if((240&_)==224){if(y>=d)return this.interim[0]=_,x;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,x;if(m=c[y++],(192&m)!=128){y--;continue}if(v=(15&_)<<12|(63&p)<<6|63&m,v<2048||v>=55296&&v<=57343||v===65279)continue;u[x++]=v}else if((248&_)==240){if(y>=d)return this.interim[0]=_,x;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,x;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,this.interim[2]=m,x;if(k=c[y++],(192&k)!=128){y--;continue}if(v=(7&_)<<18|(63&p)<<12|(63&m)<<6|63&k,v<65536||v>1114111)continue;u[x++]=v}}return x}}},225:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;const u=c(1480),d=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],_=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;i.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let m=0;mx[w][1])return!1;for(;w>=b;)if(v=b+w>>1,k>x[v][1])b=v+1;else{if(!(k=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,k){let x=this.wcwidth(m),v=x===0&&k!==0;if(v){const b=u.UnicodeService.extractWidth(k);b===0?v=!1:b>x&&(x=b)}return u.UnicodeService.createPropertyValue(0,x,v)}}},5981:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WriteBuffer=void 0;const u=c(8460),d=c(844);class _ extends d.Disposable{constructor(m){super(),this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(m,k){if(k!==void 0&&this._syncCalls>k)return void(this._syncCalls=0);if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(m,k){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(k),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(k)}_innerWrite(m=0,k=!0){const x=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],b=this._action(v,k);if(b){const y=S=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,S))):this._innerWrite(x,S);return void b.catch((S=>(queueMicrotask((()=>{throw S})),Promise.resolve(!1)))).then(y)}const w=this._callbacks[this._bufferOffset];if(w&&w(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-x>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}i.WriteBuffer=_},5941:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.toRgbString=i.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function d(_,p){const m=_.toString(16),k=m.length<2?"0"+m:m;switch(p){case 4:return m[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}i.parseColor=function(_){if(!_)return;let p=_.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=c.exec(p);if(m){const k=m[1]?15:m[4]?255:m[7]?4095:65535;return[Math.round(parseInt(m[1]||m[4]||m[7]||m[10],16)/k*255),Math.round(parseInt(m[2]||m[5]||m[8]||m[11],16)/k*255),Math.round(parseInt(m[3]||m[6]||m[9]||m[12],16)/k*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),u.exec(p)&&[3,6,9,12].includes(p.length))){const m=p.length/3,k=[0,0,0];for(let x=0;x<3;++x){const v=parseInt(p.slice(m*x,m*x+m),16);k[x]=m===1?v<<4:m===2?v:m===3?v>>4:v>>8}return k}},i.toRgbString=function(_,p=16){const[m,k,x]=_;return`rgb:${d(m,p)}/${d(k,p)}/${d(x,p)}`}},5770:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.PAYLOAD_LIMIT=void 0,i.PAYLOAD_LIMIT=1e7},6351:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DcsHandler=i.DcsParser=void 0;const u=c(482),d=c(8742),_=c(5770),p=[];i.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(k,x){this._handlers[k]===void 0&&(this._handlers[k]=[]);const v=this._handlers[k];return v.push(x),{dispose:()=>{const b=v.indexOf(x);b!==-1&&v.splice(b,1)}}}clearHandler(k){this._handlers[k]&&delete this._handlers[k]}setHandlerFallback(k){this._handlerFb=k}reset(){if(this._active.length)for(let k=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;k>=0;--k)this._active[k].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(k,x){if(this.reset(),this._ident=k,this._active=this._handlers[k]||p,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(k,x,v){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(k,x,v);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(k,x,v))}unhook(k,x=!0){if(this._active.length){let v=!1,b=this._active.length-1,w=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=x,w=this._stack.fallThrough,this._stack.paused=!1),!w&&v===!1){for(;b>=0&&(v=this._active[b].unhook(k),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",k);this._active=p,this._ident=0}};const m=new d.Params;m.addParam(0),i.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=m,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():m,this._data="",this._hitLimit=!1}put(k,x,v){this._hitLimit||(this._data+=(0,u.utf32ToString)(k,x,v),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(k){let x=!1;if(this._hitLimit)x=!1;else if(k&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then((v=>(this._params=m,this._data="",this._hitLimit=!1,v)));return this._params=m,this._data="",this._hitLimit=!1,x}}},2015:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.EscapeSequenceParser=i.VT500_TRANSITION_TABLE=i.TransitionTable=void 0;const u=c(844),d=c(8742),_=c(6242),p=c(6351);class m{constructor(b){this.table=new Uint8Array(b)}setDefault(b,w){this.table.fill(b<<4|w)}add(b,w,y,S){this.table[w<<8|b]=y<<4|S}addMany(b,w,y,S){for(let z=0;zE)),w=(A,E)=>b.slice(A,E),y=w(32,127),S=w(0,24);S.push(25),S.push.apply(S,w(28,32));const z=w(0,14);let N;for(N in v.setDefault(1,0),v.addMany(y,0,2,0),z)v.addMany([24,26,153,154],N,3,0),v.addMany(w(128,144),N,3,0),v.addMany(w(144,152),N,3,0),v.add(156,N,0,0),v.add(27,N,11,1),v.add(157,N,4,8),v.addMany([152,158,159],N,0,7),v.add(155,N,11,3),v.add(144,N,11,9);return v.addMany(S,0,3,0),v.addMany(S,1,3,1),v.add(127,1,0,1),v.addMany(S,8,0,8),v.addMany(S,3,3,3),v.add(127,3,0,3),v.addMany(S,4,3,4),v.add(127,4,0,4),v.addMany(S,6,3,6),v.addMany(S,5,3,5),v.add(127,5,0,5),v.addMany(S,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(y,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(w(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(y,7,0,7),v.addMany(S,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(w(64,127),3,7,0),v.addMany(w(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(w(48,60),4,8,4),v.addMany(w(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(w(32,64),6,0,6),v.add(127,6,0,6),v.addMany(w(64,127),6,0,0),v.addMany(w(32,48),3,9,5),v.addMany(w(32,48),5,9,5),v.addMany(w(48,64),5,0,6),v.addMany(w(64,127),5,7,0),v.addMany(w(32,48),4,9,5),v.addMany(w(32,48),1,9,2),v.addMany(w(32,48),2,9,2),v.addMany(w(48,127),2,10,0),v.addMany(w(48,80),1,10,0),v.addMany(w(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(w(96,127),1,10,0),v.add(80,1,11,9),v.addMany(S,9,0,9),v.add(127,9,0,9),v.addMany(w(28,32),9,0,9),v.addMany(w(32,48),9,9,12),v.addMany(w(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(S,11,0,11),v.addMany(w(32,128),11,0,11),v.addMany(w(28,32),11,0,11),v.addMany(S,10,0,10),v.add(127,10,0,10),v.addMany(w(28,32),10,0,10),v.addMany(w(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(w(32,48),10,9,12),v.addMany(S,12,0,12),v.add(127,12,0,12),v.addMany(w(28,32),12,0,12),v.addMany(w(32,48),12,9,12),v.addMany(w(48,64),12,0,11),v.addMany(w(64,127),12,12,13),v.addMany(w(64,127),10,12,13),v.addMany(w(64,127),9,12,13),v.addMany(S,13,13,13),v.addMany(y,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(k,0,2,0),v.add(k,8,5,8),v.add(k,6,0,6),v.add(k,11,0,11),v.add(k,13,13,13),v})();class x extends u.Disposable{constructor(b=i.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new d.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(w,y,S)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,y)=>{},this._escHandlerFb=w=>{},this._errorHandlerFb=w=>w,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new _.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,w=[64,126]){let y=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=b.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let z=0;zN||N>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=N}}if(b.final.length!==1)throw new Error("final must be a single byte");const S=b.final.charCodeAt(0);if(w[0]>S||S>w[1])throw new Error(`final must be in range ${w[0]} .. ${w[1]}`);return y<<=8,y|=S,y}identToString(b){const w=[];for(;b;)w.push(String.fromCharCode(255&b)),b>>=8;return w.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,w){const y=this._identifier(b,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const S=this._escHandlers[y];return S.push(w),{dispose:()=>{const z=S.indexOf(w);z!==-1&&S.splice(z,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,w){this._executeHandlers[b.charCodeAt(0)]=w}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,w){const y=this._identifier(b);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const S=this._csiHandlers[y];return S.push(w),{dispose:()=>{const z=S.indexOf(w);z!==-1&&S.splice(z,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,w){return this._dcsParser.registerHandler(this._identifier(b),w)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,w){return this._oscParser.registerHandler(b,w)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(b,w,y,S,z){this._parseStack.state=b,this._parseStack.handlers=w,this._parseStack.handlerPos=y,this._parseStack.transition=S,this._parseStack.chunkPos=z}parse(b,w,y){let S,z=0,N=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const E=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&M>-1){for(;M>=0&&(S=E[M](this._params),S!==!0);M--)if(S instanceof Promise)return this._parseStack.handlerPos=M,S}this._parseStack.handlers=[];break;case 4:if(y===!1&&M>-1){for(;M>=0&&(S=E[M](),S!==!0);M--)if(S instanceof Promise)return this._parseStack.handlerPos=M,S}this._parseStack.handlers=[];break;case 6:if(z=b[this._parseStack.chunkPos],S=this._dcsParser.unhook(z!==24&&z!==26,y),S)return S;z===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(z=b[this._parseStack.chunkPos],S=this._oscParser.end(z!==24&&z!==26,y),S)return S;z===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let E=A;E>4){case 2:for(let G=E+1;;++G){if(G>=w||(z=b[G])<32||z>126&&z=w||(z=b[G])<32||z>126&&z=w||(z=b[G])<32||z>126&&z=w||(z=b[G])<32||z>126&&z=0&&(S=M[$](this._params),S!==!0);$--)if(S instanceof Promise)return this._preserveStack(3,M,$,N,E),S;$<0&&this._csiHandlerFb(this._collect<<8|z,this._params),this.precedingJoinState=0;break;case 8:do switch(z){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(z-48)}while(++E47&&z<60);E--;break;case 9:this._collect<<=8,this._collect|=z;break;case 10:const D=this._escHandlers[this._collect<<8|z];let I=D?D.length-1:-1;for(;I>=0&&(S=D[I](),S!==!0);I--)if(S instanceof Promise)return this._preserveStack(4,D,I,N,E),S;I<0&&this._escHandlerFb(this._collect<<8|z),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|z,this._params);break;case 13:for(let G=E+1;;++G)if(G>=w||(z=b[G])===24||z===26||z===27||z>127&&z=w||(z=b[G])<32||z>127&&z{Object.defineProperty(i,"__esModule",{value:!0}),i.OscHandler=i.OscParser=void 0;const u=c(5770),d=c(482),_=[];i.OscParser=class{constructor(){this._state=0,this._active=_,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,m){this._handlers[p]===void 0&&(this._handlers[p]=[]);const k=this._handlers[p];return k.push(m),{dispose:()=>{const x=k.indexOf(m);x!==-1&&k.splice(x,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=_,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||_,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,m,k){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(p,m,k);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(p,m,k))}start(){this.reset(),this._state=1}put(p,m,k){if(this._state!==3){if(this._state===1)for(;m0&&this._put(p,m,k)}}end(p,m=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let k=!1,x=this._active.length-1,v=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,k=m,v=this._stack.fallThrough,this._stack.paused=!1),!v&&k===!1){for(;x>=0&&(k=this._active[x].end(p),k!==!0);x--)if(k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,k;x--}for(;x>=0;x--)if(k=this._active[x].end(!1),k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,k}else this._handlerFb(this._id,"END",p);this._active=_,this._id=-1,this._state=0}}},i.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,m,k){this._hitLimit||(this._data+=(0,d.utf32ToString)(p,m,k),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let m=!1;if(this._hitLimit)m=!1;else if(p&&(m=this._handler(this._data),m instanceof Promise))return m.then((k=>(this._data="",this._hitLimit=!1,k)));return this._data="",this._hitLimit=!1,m}}},8742:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Params=void 0;const c=2147483647;class u{static fromArray(_){const p=new u;if(!_.length)return p;for(let m=Array.isArray(_[0])?1:0;m<_.length;++m){const k=_[m];if(Array.isArray(k))for(let x=0;x256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const _=new u(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_}toArray(){const _=[];for(let p=0;p>8,k=255&this._subParamsIdx[p];k-m>0&&_.push(Array.prototype.slice.call(this._subParams,m,k))}return _}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>c?c:_}}addSubParam(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>c?c:_,this._subParamsIdx[this.length-1]++}}hasSubParams(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0}getSubParams(_){const p=this._subParamsIdx[_]>>8,m=255&this._subParamsIdx[_];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const _={};for(let p=0;p>8,k=255&this._subParamsIdx[p];k-m>0&&(_[p]=this._subParams.slice(m,k))}return _}addDigit(_){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const m=this._digitIsSub?this._subParams:this.params,k=m[p-1];m[p-1]=~k?Math.min(10*k+_,c):_}}i.Params=u},5741:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AddonManager=void 0,i.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const d={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(d),u.dispose=()=>this._wrappedAddonDispose(d),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let d=0;d{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferApiView=void 0;const u=c(3785),d=c(511);i.BufferApiView=class{constructor(_,p){this._buffer=_,this.type=p}init(_){return this._buffer=_,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(_){const p=this._buffer.lines.get(_);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new d.CellData}}},3785:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLineApiView=void 0;const u=c(511);i.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,_){if(!(d<0||d>=this._line.length))return _?(this._line.loadCell(d,_),_):this._line.loadCell(d,new u.CellData)}translateToString(d,_,p){return this._line.translateToString(d,_,p)}}},8285:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferNamespaceApi=void 0;const u=c(8771),d=c(8460),_=c(844);class p extends _.Disposable{constructor(k){super(),this._core=k,this._onBufferChange=this.register(new d.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}i.BufferNamespaceApi=p},7975:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ParserApi=void 0,i.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,(d=>u(d.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((d,_)=>u(d,_.toArray())))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeApi=void 0,i.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(a,i,c){var u=this&&this.__decorate||function(v,b,w,y){var S,z=arguments.length,N=z<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(v,b,w,y);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(N=(z<3?S(N):z>3?S(b,w,N):S(b,w))||N);return z>3&&N&&Object.defineProperty(b,w,N),N},d=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferService=i.MINIMUM_ROWS=i.MINIMUM_COLS=void 0;const _=c(8460),p=c(844),m=c(5295),k=c(2585);i.MINIMUM_COLS=2,i.MINIMUM_ROWS=1;let x=i.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,i.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,i.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(v,this))}resize(v,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const w=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===v.fg&&y.getBg(0)===v.bg||(y=w.getBlankLine(v,b),this._cachedBlankLine=y),y.isWrapped=b;const S=w.ybase+w.scrollTop,z=w.ybase+w.scrollBottom;if(w.scrollTop===0){const N=w.lines.isFull;z===w.lines.length-1?N?w.lines.recycle().copyFrom(y):w.lines.push(y.clone()):w.lines.splice(z+1,0,y.clone()),N?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{const N=z-S+1;w.lines.shiftElements(S+1,N-1,-1),w.lines.set(z,y.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(v,b,w){const y=this.buffer;if(v<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else v+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const S=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+v,y.ybase),0),S!==y.ydisp&&(b||this._onScroll.fire(y.ydisp))}};i.BufferService=x=u([d(0,k.IOptionsService)],x)},7994:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CharsetService=void 0,i.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(a,i,c){var u=this&&this.__decorate||function(y,S,z,N){var A,E=arguments.length,M=E<3?S:N===null?N=Object.getOwnPropertyDescriptor(S,z):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,S,z,N);else for(var $=y.length-1;$>=0;$--)(A=y[$])&&(M=(E<3?A(M):E>3?A(S,z,M):A(S,z))||M);return E>3&&M&&Object.defineProperty(S,z,M),M},d=this&&this.__param||function(y,S){return function(z,N){S(z,N,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreMouseService=void 0;const _=c(2585),p=c(8460),m=c(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function x(y,S){let z=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(z|=64,z|=y.action):(z|=3&y.button,4&y.button&&(z|=64),8&y.button&&(z|=128),y.action===32?z|=32:y.action!==0||S||(z|=3)),z}const v=String.fromCharCode,b={DEFAULT:y=>{const S=[x(y,!1)+32,y.col+32,y.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${v(S[0])}${v(S[1])}${v(S[2])}`},SGR:y=>{const S=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.col};${y.row}${S}`},SGR_PIXELS:y=>{const S=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.x};${y.y}${S}`}};let w=i.CoreMouseService=class extends m.Disposable{constructor(y,S){super(),this._bufferService=y,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const z of Object.keys(k))this.addProtocol(z,k[z]);for(const z of Object.keys(b))this.addEncoding(z,b[z]);this.reset()}addProtocol(y,S){this._protocols[y]=S}addEncoding(y,S){this._encodings[y]=S}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const S=this._encodings[this._activeEncoding](y);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,S,z){if(z){if(y.x!==S.x||y.y!==S.y)return!1}else if(y.col!==S.col||y.row!==S.row)return!1;return y.button===S.button&&y.action===S.action&&y.ctrl===S.ctrl&&y.alt===S.alt&&y.shift===S.shift}};i.CoreMouseService=w=u([d(0,_.IBufferService),d(1,_.ICoreService)],w)},6975:function(a,i,c){var u=this&&this.__decorate||function(w,y,S,z){var N,A=arguments.length,E=A<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,S):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(w,y,S,z);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(E=(A<3?N(E):A>3?N(y,S,E):N(y,S))||E);return A>3&&E&&Object.defineProperty(y,S,E),E},d=this&&this.__param||function(w,y){return function(S,z){y(S,z,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreService=void 0;const _=c(1439),p=c(8460),m=c(844),k=c(2585),x=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=i.CoreService=class extends m.Disposable{constructor(w,y,S){super(),this._bufferService=w,this._logService=y,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,_.clone)(x),this.decPrivateModes=(0,_.clone)(v)}reset(){this.modes=(0,_.clone)(x),this.decPrivateModes=(0,_.clone)(v)}triggerDataEvent(w,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,(()=>w.split("").map((z=>z.charCodeAt(0))))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,(()=>w.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(w))}};i.CoreService=b=u([d(0,k.IBufferService),d(1,k.ILogService),d(2,k.IOptionsService)],b)},9074:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DecorationService=void 0;const u=c(8055),d=c(8460),_=c(844),p=c(6106);let m=0,k=0;class x extends _.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((w=>w==null?void 0:w.marker.line)),this._onDecorationRegistered=this.register(new d.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new d.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,_.toDisposable)((()=>this.reset())))}registerDecoration(w){if(w.marker.isDisposed)return;const y=new v(w);if(y){const S=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),S.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,y,S){let z=0,N=0;for(const A of this._decorations.getKeyIterator(y))z=A.options.x??0,N=z+(A.options.width??1),w>=z&&w{m=N.options.x??0,k=m+(N.options.width??1),w>=m&&w{Object.defineProperty(i,"__esModule",{value:!0}),i.InstantiationService=i.ServiceCollection=void 0;const u=c(2585),d=c(8343);class _{constructor(...m){this._entries=new Map;for(const[k,x]of m)this.set(k,x)}set(m,k){const x=this._entries.get(m);return this._entries.set(m,k),x}forEach(m){for(const[k,x]of this._entries.entries())m(k,x)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}i.ServiceCollection=_,i.InstantiationService=class{constructor(){this._services=new _,this._services.set(u.IInstantiationService,this)}setService(p,m){this._services.set(p,m)}getService(p){return this._services.get(p)}createInstance(p,...m){const k=(0,d.getServiceDependencies)(p).sort(((b,w)=>b.index-w.index)),x=[];for(const b of k){const w=this._services.get(b.id);if(!w)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${b.id}.`);x.push(w)}const v=k.length>0?k[0].index:m.length;if(m.length!==v)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${v+1} conflicts with ${m.length} static arguments`);return new p(...m,...x)}}},7866:function(a,i,c){var u=this&&this.__decorate||function(v,b,w,y){var S,z=arguments.length,N=z<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(v,b,w,y);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(N=(z<3?S(N):z>3?S(b,w,N):S(b,w))||N);return z>3&&N&&Object.defineProperty(b,w,N),N},d=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.traceCall=i.setTraceLogger=i.LogService=void 0;const _=c(844),p=c(2585),m={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let k,x=i.LogService=class extends _.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),k=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let b=0;bJSON.stringify(N))).join(", ")})`);const z=y.apply(this,S);return k.trace(`GlyphRenderer#${y.name} return`,z),z}}},7302:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OptionsService=i.DEFAULT_OPTIONS=void 0;const u=c(8460),d=c(844),_=c(6114);i.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:_.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class m extends d.Disposable{constructor(x){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...i.DEFAULT_OPTIONS};for(const b in x)if(b in v)try{const w=x[b];v[b]=this._sanitizeAndValidateOption(b,w)}catch(w){console.error(w)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,d.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,v){return this.onOptionChange((b=>{b===x&&v(this.rawOptions[x])}))}onMultipleOptionChange(x,v){return this.onOptionChange((b=>{x.indexOf(b)!==-1&&v()}))}_setupOptions(){const x=b=>{if(!(b in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(b,w)=>{if(!(b in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);w=this._sanitizeAndValidateOption(b,w),this.rawOptions[b]!==w&&(this.rawOptions[b]=w,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const w={get:x.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,w)}}_sanitizeAndValidateOption(x,v){switch(x){case"cursorStyle":if(v||(v=i.DEFAULT_OPTIONS[x]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${x}`);break;case"wordSeparator":v||(v=i.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=p.includes(v)?v:i.DEFAULT_OPTIONS[x];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${x} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${x} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}i.OptionsService=m},2660:function(a,i,c){var u=this&&this.__decorate||function(m,k,x,v){var b,w=arguments.length,y=w<3?k:v===null?v=Object.getOwnPropertyDescriptor(k,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(m,k,x,v);else for(var S=m.length-1;S>=0;S--)(b=m[S])&&(y=(w<3?b(y):w>3?b(k,x,y):b(k,x))||y);return w>3&&y&&Object.defineProperty(k,x,y),y},d=this&&this.__param||function(m,k){return function(x,v){k(x,v,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkService=void 0;const _=c(2585);let p=i.OscLinkService=class{constructor(m){this._bufferService=m,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(m){const k=this._bufferService.buffer;if(m.id===void 0){const S=k.addMarker(k.ybase+k.y),z={data:m,id:this._nextId++,lines:[S]};return S.onDispose((()=>this._removeMarkerFromLink(z,S))),this._dataByLinkId.set(z.id,z),z.id}const x=m,v=this._getEntryIdKey(x),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,k.ybase+k.y),b.id;const w=k.addMarker(k.ybase+k.y),y={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[w]};return w.onDispose((()=>this._removeMarkerFromLink(y,w))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(m,k){const x=this._dataByLinkId.get(m);if(x&&x.lines.every((v=>v.line!==k))){const v=this._bufferService.buffer.addMarker(k);x.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(x,v)))}}getLinkData(m){var k;return(k=this._dataByLinkId.get(m))==null?void 0:k.data}_getEntryIdKey(m){return`${m.id};;${m.uri}`}_removeMarkerFromLink(m,k){const x=m.lines.indexOf(k);x!==-1&&(m.lines.splice(x,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};i.OscLinkService=p=u([d(0,_.IBufferService)],p)},8343:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createDecorator=i.getServiceDependencies=i.serviceRegistry=void 0;const c="di$target",u="di$dependencies";i.serviceRegistry=new Map,i.getServiceDependencies=function(d){return d[u]||[]},i.createDecorator=function(d){if(i.serviceRegistry.has(d))return i.serviceRegistry.get(d);const _=function(p,m,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,v,b){v[c]===v?v[u].push({id:x,index:b}):(v[u]=[{id:x,index:b}],v[c]=v)})(_,p,k)};return _.toString=()=>d,i.serviceRegistry.set(d,_),_}},2585:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.IDecorationService=i.IUnicodeService=i.IOscLinkService=i.IOptionsService=i.ILogService=i.LogLevelEnum=i.IInstantiationService=i.ICharsetService=i.ICoreService=i.ICoreMouseService=i.IBufferService=void 0;const u=c(8343);var d;i.IBufferService=(0,u.createDecorator)("BufferService"),i.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),i.ICoreService=(0,u.createDecorator)("CoreService"),i.ICharsetService=(0,u.createDecorator)("CharsetService"),i.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(_){_[_.TRACE=0]="TRACE",_[_.DEBUG=1]="DEBUG",_[_.INFO=2]="INFO",_[_.WARN=3]="WARN",_[_.ERROR=4]="ERROR",_[_.OFF=5]="OFF"})(d||(i.LogLevelEnum=d={})),i.ILogService=(0,u.createDecorator)("LogService"),i.IOptionsService=(0,u.createDecorator)("OptionsService"),i.IOscLinkService=(0,u.createDecorator)("OscLinkService"),i.IUnicodeService=(0,u.createDecorator)("UnicodeService"),i.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeService=void 0;const u=c(8460),d=c(225);class _{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,k,x=!1){return(16777215&m)<<3|(3&k)<<1|(x?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new d.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(m){if(!this._providers[m])throw new Error(`unknown Unicode version "${m}"`);this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)}register(m){this._providers[m.version]=m}wcwidth(m){return this._activeProvider.wcwidth(m)}getStringCellWidth(m){let k=0,x=0;const v=m.length;for(let b=0;b=v)return k+this.wcwidth(w);const z=m.charCodeAt(b);56320<=z&&z<=57343?w=1024*(w-55296)+z-56320+65536:k+=this.wcwidth(z)}const y=this.charProperties(w,x);let S=_.extractWidth(y);_.extractShouldJoin(y)&&(S-=_.extractWidth(x)),k+=S,x=y}return k}charProperties(m,k){return this._activeProvider.charProperties(m,k)}}i.UnicodeService=_}},n={};function s(a){var i=n[a];if(i!==void 0)return i.exports;var c=n[a]={exports:{}};return t[a].call(c.exports,c,c.exports,s),c.exports}var o={};return(()=>{var a=o;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const i=s(9042),c=s(3236),u=s(844),d=s(5741),_=s(8285),p=s(7975),m=s(7090),k=["cols","rows"];class x extends u.Disposable{constructor(b){super(),this._core=this.register(new c.Terminal(b)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const w=S=>this._core.options[S],y=(S,z)=>{this._checkReadonlyOptions(S),this._core.options[S]=z};for(const S in this._core.options){const z={get:w.bind(this,S),set:y.bind(this,S)};Object.defineProperty(this._publicOptions,S,z)}}_checkReadonlyOptions(b){if(k.includes(b))throw new Error(`Option "${b}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new m.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new _.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let w="none";switch(this._core.coreMouseService.activeProtocol){case"X10":w="x10";break;case"VT200":w="vt200";break;case"DRAG":w="drag";break;case"ANY":w="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:w,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const w in b)this._publicOptions[w]=b[w]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,w=!0){this._core.input(b,w)}resize(b,w){this._verifyIntegers(b,w),this._core.resize(b,w)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,w,y){this._verifyIntegers(b,w,y),this._core.select(b,w,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,w){this._verifyIntegers(b,w),this._core.selectLines(b,w)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,w){this._core.write(b,w)}writeln(b,w){this._core.write(b),this._core.write(`\r -`,w)}paste(b){this._core.paste(b)}refresh(b,w){this._verifyIntegers(b,w),this._core.refresh(b,w)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return i}_verifyIntegers(...b){for(const w of b)if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const w of b)if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}}a.Terminal=x})(),o})()))})(U2)),U2.exports}var ZI=TEn();const REn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function oA(e,r){const t=document.documentElement,n=getComputedStyle(t),s=a=>n.getPropertyValue(r==="app"?`--term-app-${a}`:`--term-${a}`).trim(),o={};if(r==="app"&&t.dataset.theme!=="dark")for(const a of REn){const i=n.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`).trim();i&&(o[a]=i)}return{...o,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function Ay(e,r,t=!1,n="dark"){const s=getComputedStyle(document.documentElement),o=new ZI.Terminal({convertEol:!0,disableStdin:r,cursorBlink:!r,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:oA(r,n)}),a=n==="app"?new MutationObserver(()=>{o.options.theme=oA(o.options.disableStdin??r,n)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const i=new EEn.FitAddon;o.loadAddon(i),t&&o.loadAddon(new AEn.WebLinksAddon((w,y)=>{let S;try{S=new URL(y)}catch{return}(S.protocol==="http:"||S.protocol==="https:")&&window.open(S,"_blank","noopener,noreferrer")}));const c=e.style.overflowY;e.style.overflowY="auto",o.open(e);let u=!0,d=null;const _=()=>{if(d===e.scrollTop){d=null;return}d=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",_);const p=()=>{var E;const w=o.element,y=w==null?void 0:w.querySelector(".xterm-screen"),S=w==null?void 0:w.querySelector(".xterm-viewport");if(!w||!(y instanceof HTMLElement)||!(S instanceof HTMLElement))return;const z=o.buffer.active;let N=Math.max(0,z.baseY+z.cursorY-z.viewportY+1);for(let M=o.rows-1;M>=N;M--)if((E=z.getLine(z.viewportY+M))!=null&&E.translateToString(!0).trim()){N=M+1;break}const A=y.getBoundingClientRect().height;w.style.height=`${Math.max(e.clientHeight,Math.min(N,o.rows)*A/o.rows)}px`,w.style.overflow="hidden",S.style.height=`${A}px`},m=()=>{try{const w=i.proposeDimensions();w&&(o.resize(w.cols,Math.max(w.rows,r?1:40)),p())}catch{}};m();const k=new ResizeObserver(m);k.observe(e);const x=o.onWriteParsed(()=>{var y;const w=u&&o.buffer.active.viewportY===o.buffer.active.baseY;if(p(),w){const S=(y=o.element)==null?void 0:y.querySelector(".xterm-screen");if(S instanceof HTMLElement){const z=(o.buffer.active.cursorY+1)*S.getBoundingClientRect().height/o.rows;e.scrollTop=Math.max(0,z-e.clientHeight),d=e.scrollTop}}}),v=o.onScroll(p),b=w=>{(w.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof r=="string")}function MEn(e){return vd(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||eP(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function OEn(e){return vd(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&eP(e.partitions)&&(e.error===null||typeof e.error=="string")}function $En(e){return!vd(e)||e.type!=="complete"?null:e.backend==="ssh"&&MEn(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&OEn(e.result)?{backend:"slurm",result:e.result}:null}function tP(e){return vd(e)&&e.type==="complete"}function DEn(e){return vd(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function vS({host:e,backend:r,path:t="/api/settings/ssh/connect",active:n=!0,onComplete:s,onError:o}){const a=new URLSearchParams({host:e,backend:r});return f.jsx(Ty,{path:`${t}?${a}`,label:SL({host:Ee(e)}),active:n,onError:o,onComplete:i=>{const c=$En(i);return c?(s(c),!0):!1}})}function LEn({login:e,onComplete:r,onError:t}){return f.jsx(Ty,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:n=>tP(n)?(r(),!0):!1})}function rP({path:e,label:r,className:t="mt-4 overflow-hidden rounded-lg border border-border",heightClass:n="h-80",onComplete:s,onError:o,onClose:a}){const[i,c]=T.useState("running");return f.jsxs("div",{className:t,children:[f.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[f.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:r}),f.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:i==="running"?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{className:"border-t-accent-amber"})," ",Obr()]}):i==="done"?f.jsxs(f.Fragment,{children:[f.jsx(_o,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",hbr()]}):i==="failed"?f.jsxs(f.Fragment,{children:[f.jsx(pn,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",jbr()]}):sbr()}),f.jsx("button",{type:"button",onClick:a,"aria-label":iN(),title:iN(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:f.jsx(pn,{size:14})})]}),f.jsx(Ty,{path:e,label:r,heightClass:n,frame:"bare",palette:"app",shellAfter:!0,onError:(u,d)=>{c("failed"),d&&o(u)},onComplete:u=>tP(u)?(c("done"),s(),!0):!1,onClosed:()=>c(u=>u==="running"?"closed":u)})]})}function Ty({path:e,label:r,command:t,heightClass:n="h-40",frame:s="card",palette:o="dark",shellAfter:a=!1,active:i=!0,awaitingApproval:c=!1,onComplete:u,onError:d,onClosed:_}){const p=T.useRef(null),m=T.useRef(null),k=T.useRef(u),x=T.useRef(d),v=T.useRef(_),[b,w]=T.useState(null);return k.current=u,x.current=d,v.current=_,T.useEffect(()=>{const y=p.current;if(!y)return;const{terminal:S,dispose:z}=Ay(y,c,!0,o);if(m.current=S,c)return t&&S.writeln(`$ ${t}`),()=>{m.current=null,z()};S.focus();const N=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${N}//${location.host}`),E=new WebSocket(A);E.binaryType="arraybuffer";let M=!1,$=!1,D=!1;const I=(Q,K)=>{var J;if($){K||S.writeln(Q);return}$=!0,(!D||a)&&S.writeln(Q),(J=x.current)==null||J.call(x,Q,K),!(a&&!K)&&(S.options.disableStdin=!0,S.blur(),w(Q))},G=S.onData(Q=>{E.readyState===WebSocket.OPEN&&E.send(new TextEncoder().encode(Q))}),H=S.onResize(({cols:Q,rows:K})=>{E.readyState===WebSocket.OPEN&&E.send(JSON.stringify({type:"resize",cols:Q,rows:K}))});return E.onopen=()=>{t&&S.writeln(`$ ${t}`),E.send(JSON.stringify({type:"resize",cols:S.cols,rows:S.rows}))},E.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){D=!0,S.write(new Uint8Array(Q.data));return}if(typeof Q.data!="string")return;let K;try{K=JSON.parse(Q.data)}catch{return}if(k.current(K)){M=!0,a||E.close();return}const J=DEn(K);J&&(M?S.writeln(J):I(J,!a))},E.onerror=()=>I(gb(),!0),E.onclose=()=>{var Q;if(!M&&!$){I(gb(),!0);return}a&&(S.options.disableStdin=!0,S.blur(),(Q=v.current)==null||Q.call(v))},()=>{E.onopen=null,E.onmessage=null,E.onerror=null,E.onclose=null,G.dispose(),H.dispose(),E.close(),m.current=null,z()}},[e,t,c,o,a]),T.useEffect(()=>{const y=m.current;y&&(y.options.disableStdin=c||!i||b!==null,!c&&i&&b===null?y.focus():y.blur())},[i,b,c]),f.jsxs("div",{className:s==="card"?"mt-3":"contents",children:[f.jsx("div",{className:`${n} ${s==="card"?JI:`overflow-hidden p-3 ${o==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":r,children:f.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),b?f.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function IEn({host:e,transcript:r}){const t=T.useRef(null);return T.useEffect(()=>{const n=t.current;if(!n)return;const{terminal:s,dispose:o}=Ay(n,!0,!0);return s.write(r),o},[r]),f.jsx("div",{className:`mt-3 h-40 ${JI}`,role:"group","aria-label":SL({host:Ee(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Cb=null,Lm=0;const nP=()=>Cb;function sP(){const e=Lm;return XI(async(r,t)=>{if(e!==Lm)return;const n=await Qjn(r,t);e===Lm&&Je.setQueryData(f0().queryKey,s=>s?{...s,workspace:n.workspace}:n)},r=>{e===Lm&&tr(r instanceof Error?r.message:String(r),"error",{id:"workspace-save",action:{label:Ks(),onClick:()=>void bS.retry()}})})}let P1=sP();function PEn(){Lm++,Cb=null,P1=sP()}const bS={flush:(e=!1)=>P1.flush(e),retry:()=>P1.retry(),queue(e,r=0){const t=Cb;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Cb=e,P1.queue(e,r))}};window.addEventListener("pagehide",()=>void bS.flush(!0));function Yl(e,r){if(typeof e=="string")return{kind:"home",view:e};if("code"in e)return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};if("kind"in e)return e.kind==="plan"?{kind:"plan",sessionId:e.sessionId,promptId:e.promptId}:e.kind==="side"?{kind:"side",sessionId:e.sessionId}:{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};if("path"in e)return{kind:"file",path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};const t=r===void 0?e.runId:r;return{kind:"experiment",experimentId:e.id,view:e.view,...t?{runId:t}:{}}}function Ki(e){switch(e.kind){case"home":return e.view;case"experiment":return{id:e.experimentId,view:e.view,...e.runId?{runId:e.runId}:{}};case"file":return{path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};case"code":return{code:!0,experimentId:e.experimentId,branch:e.branch,view:e.view,toggled:new Set};case"plan":return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId,plan:""};case"subagent":return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};case"side":return{kind:"side",sessionId:e.sessionId}}}function oP(e,r,t){const n=[];e.filesTabOpen&&n.push("files"),e.terminalTabOpen&&n.push("terminal"),e.artifactsTabOpen&&n.push("artifacts"),e.experimentsTabOpen&&n.push("experiments");const s=[...e.expTabs,...e.fileTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs,...e.codeTabs],o=new Map(s.map(u=>[Bt(u),u])),a=e.contentTabOrder.flatMap(u=>{const d=o.get(u);return d?[d]:[]}),i=Bt(e.rightTab);return{tabs:[...n,...a].map(u=>Yl(u,Bt(u)===i?e.selectedRunId:void 0)),active:e.panelOpen?Yl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Bt(e.previewTab):null,history:e.tabHistory.map(Bt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Bt(u),[...u.toggled]])]),scroll:r,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function BEn(e,r){const t=xS();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const n=[...(e==null?void 0:e.tabs)??[]];if(r){const o=n.findIndex(a=>Bt(Ki(a))===Bt(Ki(r)));o===-1?n.push(r):n[o]=r}for(const o of n){const a=Ki(o);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[Bt(a)])??[]),t.codeTabs.push(a)):"path"in a?t.fileTabs.push(a):"kind"in a?a.kind==="plan"?t.planTabs.push(a):a.kind==="side"?t.sideTabs.push(a):t.subagentTabs.push(a):t.expTabs.push(a),t.contentTabOrder.push(Bt(a))}const s=new Map(n.map(o=>{const a=Ki(o);return[Bt(a),a]}));return t.tabHistory=((e==null?void 0:e.history)??[]).flatMap(o=>{const a=s.get(o);return a?[a]:[]}),t.previewTab=e!=null&&e.previewKey?s.get(e.previewKey)??null:null,t.rightTab=r?Ki(r):e!=null&&e.active?Ki(e.active):"experiments",t.panelOpen=r!==void 0,t.selectedRunId=(r==null?void 0:r.kind)==="experiment"?r.runId??null:null,iP(t,r)}const G2=(e,r)=>e.id===r.id&&e.view===r.view,cf=(e,r)=>e.path===r.path&&(e.source??"repo")===(r.source??"repo")&&e.sessionId===r.sessionId&&e.ref===r.ref,yS=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,uo=(e,r,t)=>`${e}:${r??""}:${yS(t)}`,aP=e=>({...e,lineScrollRequest:void 0});function Kv(e){return typeof e=="object"&&"path"in e?aP(e):e}const nh=(e,r)=>e.branch===r.branch;function Bt(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:e.kind==="side"?`side:${e.sessionId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${yS(e)}`:`experiment:${e.id}:${e.view}`}function wm(e,r){const t=e.filter(n=>Bt(n)!==r);return t.length===e.length?e:t}function FEn(e){return e!==void 0}function xS(e,r=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],sideTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===zh&&r){const n="experiments";return{...t,rightTab:n,tabHistory:[n],experimentsTabOpen:!0,panelOpen:!0}}return t}function wS(e,r){const t=xS(e,r);return t.panelOpen?oP(t,{},{}):void 0}function iP(e,r){if(!r)return e;const t=Ki(r),n=Bt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs].find(c=>Bt(c)===n),o=(c,u)=>{const d=c.findIndex(_=>Bt(_)===n);return d<0?[...c,u]:JSON.stringify(Yl(c[d]))===JSON.stringify(Yl(u))?c:c.map((_,p)=>p===d?{..._,...u}:_)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!0:a.experimentsTabOpen=!0:("path"in t?a.fileTabs=o(e.fileTabs,t):"id"in t?a.expTabs=o(e.expTabs,{...t,runId:r.kind==="experiment"?r.runId:void 0}):"code"in t?a.codeTabs=o(e.codeTabs,{...t,toggled:s&&"code"in s?s.toggled:t.toggled}):t.kind==="plan"?a.planTabs=o(e.planTabs,t):t.kind==="side"?a.sideTabs=o(e.sideTabs,t):a.subagentTabs=o(e.subagentTabs,t),e.contentTabOrder.includes(n)||(a.contentTabOrder=[...e.contentTabOrder,n]));const i=e.tabHistory.at(-1);return i&&Bt(i)===n&&JSON.stringify(Yl(i))===JSON.stringify(Yl(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Bt(c)!==n),t]),a}let Vi=0;const mg=new Map,zb=new Map,R3=new Set,M3=()=>{for(const e of R3)e()},HEn=e=>(R3.add(e),()=>{R3.delete(e)}),gg=new Map,Qi=new Map,cP=e=>Qi.get(e);function qEn(){Vi++,Qi.clear(),gg.clear(),mg.clear(),zb.clear(),M3()}function UEn(e,r){const t=Qi.get(e);if(!(t!=null&&t.tasks.new)||v_(t,r))return;const n=t.tasks.new,s=a=>Object.fromEntries(n.tabs.flatMap(i=>{if(i.kind!=="file")return[];const c=Ki(i);if(typeof c=="string"||!("path"in c))return[];const u=uo(e,null,c);return u in a?[[uo(e,r,c),a[u]]]:[]})),o={...t.tasks,[r]:{...n,scroll:s(n.scroll),sourceModes:s(n.sourceModes)}};delete o.new,gg.set(e,r),Qi.set(e,{...t,tasks:o})}function GEn(e){let r=mg.get(e);if(!r){const t=Vi;r=XI(async(n,s)=>{if(t!==Vi)return;const o=await Vjn(e,n,s);t===Vi&&Je.setQueryData(oS(e).queryKey,o),t===Vi&&zb.delete(e)&&M3()},n=>{t===Vi&&(zb.set(e,n instanceof Error?n.message:String(n)),M3())}),mg.set(e,r)}return r}function W2(e,r,t,n){const s=Qi.get(e);if(!s||t==="new"&&gg.has(e))return;const o=Ny(r)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,i=t?v_(s,t):void 0;if(o===s.lastLocation&&a===s.lastTaskId&&(!n||JSON.stringify(n)===JSON.stringify(i)))return;const c={...s,lastLocation:o,lastTaskId:a,tasks:t&&n?{...s.tasks,[t]:n}:s.tasks},u=i&&n&&o===s.lastLocation&&JSON.stringify({...i,scroll:{},sourceModes:{}})===JSON.stringify({...n,scroll:{},sourceModes:{}});Qi.set(e,c),GEn(e).queue(c,u?250:0)}function aA(e,r,t,n){const s=new Set(e.state.fileTabs.map(d=>uo(t,n==="new"?null:n,d))),o=Object.fromEntries(Object.entries(e.getScroll()).filter(([d])=>s.has(d))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([d])=>s.has(d))),i=oP(e.state,o,a),c=e.pane??(r==null?void 0:r.active),u=c?Bt(Ki(c)):null;return i.active=i.tabs.find(d=>Bt(Ki(d))===u)??null,i}function WEn(e){const{projectId:r,taskKey:t,location:n,pane:s,isTask:o,firstDemoOpen:a,state:i,apply:c,getScroll:u,sourceModes:d,revision:_}=e,p=T.useRef(tA()),m=T.useSyncExternalStore(HEn,()=>r?zb.get(r)??null:null),[k,x]=T.useState(null),[v,b]=T.useState(0),[w,y]=T.useState(null),[S,z]=T.useState(null),N=T.useRef(null),A=T.useRef(null),E=T.useRef(null),M=T.useRef(e);M.current=e;const $=JSON.stringify([r,t,o]),D=JSON.stringify(s??null),I=T.useCallback(()=>{const H=E.current;if(!H)return;const Q=aA({...M.current,state:H.state,pane:H.pane},v_(Qi.get(H.projectId),H.taskKey),H.projectId,H.taskKey);W2(H.projectId,H.location,H.taskKey,Q)},[]);T.useEffect(()=>{let H=!0;const Q=Vi;if(x(null),y(null),!!r)return Qi.has(r)?y(r):Je.fetchQuery(oS(r)).then(K=>{!H||Q!==Vi||(Qi.set(r,K??tA()),y(r))}).catch(K=>{H&&Q===Vi&&x(K instanceof Error?K.message:String(K))}),()=>{H=!1}},[r,v]),T.useLayoutEffect(()=>{if(E.current&&E.current.scope!==$){const K=E.current.projectId;I(),gg.get(K)===t&&gg.delete(K),E.current=null}if(!r||w!==r)return;const H=Qi.get(r);if(!H)return;if(p.current=H,N.current!==$){if(N.current=$,A.current=D,o){const K=v_(H,t)??(Ju(r)?wS(t,a):void 0);c(BEn(K,s),K,!0)}z($);return}if(S!==$)return;let Q=i;A.current!==D&&(A.current=D,o&&s&&(Q=iP(i,s),c(Q,void 0,!1))),o?(W2(r,n,t,aA({state:Q,pane:s,getScroll:u,sourceModes:d},v_(H,t),r,t)),E.current={projectId:r,taskKey:t,scope:$,location:n,pane:s,state:Q}):W2(r,n),p.current=Qi.get(r)??H},[r,t,n,s,D,o,a,i,c,u,d,_,w,$,S,I]),T.useEffect(()=>{const H=Vi,Q=J=>{if(H===Vi){I();for(const ee of mg.values())ee.flush(J)}},K=()=>Q(!0);return window.addEventListener("pagehide",K),()=>{window.removeEventListener("pagehide",K),Q(!1)}},[I]);const G=T.useCallback(()=>{var H;r&&(k?b(Q=>Q+1):(H=mg.get(r))==null||H.retry())},[r,k]);return{ready:r===null||w===r&&S===$,loaded:r===null||w===r,error:k??m,retry:G,capture:I,workspace:p}}const KEn="data:image/svg+xml,"+encodeURIComponent(''),O3=T.createContext(null);function VEn(e){var r;return e.kind==="local"?"local":`${e.session.id}:${((r=e.session.installPaths)==null?void 0:r.database)??""}`}function lP(){const e=T.useContext(O3);if(!e)throw new Error("Runtime is not connected");return e}function QEn(e){const r=document.querySelector('link[rel="icon"]');r&&(r.href=e?KEn:"/favicon.svg")}function iA(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function XEn(e){if(e.kind!=="ssh")return;const{theme:r,locale:t}=e.session.uiPreferences;!iA("orx:theme")&&(r==="light"||r==="dark"||r==="system")&&hI(r),!iA("orx:locale")&&t&&lD(t)&&_I(t)}function YEn(e){return e.includes("ssh ")&&e.includes("failed")}function cA({host:e,overlay:r=!1}){return f.jsx("div",{className:r?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:ZD({host:Ee(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:J4()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:Fir()})]})})}function lA({runtime:e,overlay:r=!1,retriedInteractiveError:t,setRetriedInteractiveError:n}){var M,$,D;const{session:s}=e,[o,a]=T.useState(s.installPaths),[i,c]=T.useState(!1),[u,d]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,($=s.installPaths)==null?void 0:$.database,(D=s.installPaths)==null?void 0:D.cache]);async function _(){if(o){c(!0);try{await _6n(o)}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}}async function p(I=!1){n(I?s.error:null),c(!0);try{await f6n()}catch(G){tr(G instanceof Error?G.message:String(G),"error")}finally{c(!1)}}async function m(){c(!0);try{await KL()}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}async function k(){c(!0);try{d(await VL())}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}async function x(){if(u){c(!0);try{await QL(u),d(null)}catch(I){d(null),tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}}async function v(){c(!0);try{await d6n()}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}const b=s.status==="applying"||i,w=s.status==="needsInstall",y=s.status==="needsUpdate",S=o&&w,z=["connecting","applying","reconnecting"].includes(s.status),N=s.status==="disconnected"&&s.error!==null&&YEn(s.error)&&t!==s.error&&!s.canStartNewHost,A=w?Kcr():y?Ehr():s.status==="applying"?wor({host:Ee(s.host)}):s.status==="reconnecting"?Iur({host:Ee(s.host)}):s.status==="disconnected"?s.error?Tir({host:Ee(s.host)}):s.canStartNewHost?icr({host:Ee(s.host)}):ZD({host:Ee(s.host)}):gar({host:Ee(s.host)}),E=s.error??(s.canStartNewHost?Yir():w?klr({user:Ee(s.user??""),host:Ee(s.host)}):y?vhr({host:Ee(s.host)}):s.status==="applying"?_or():s.status==="reconnecting"?Eur():s.status==="disconnected"?fir():iar());return f.jsxs(f.Fragment,{children:[f.jsx("main",{className:r?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[z&&f.jsx(Nt,{className:"mt-2"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:A}),!N&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:E})]})]}),N&&f.jsx(vS,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),S&&f.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[f.jsx("p",{className:"m-0 text-sm text-subtext",children:Lcr()}),[["binary",gcr()],["database",zcr()]].map(([I,G])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[G,f.jsx(Nn,{value:o[I],onChange:H=>a({...o,[I]:H.target.value}),disabled:b,dir:"ltr"})]},I)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx(Oe,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",nlr()]}):y?nN():_L()})})]}),y&&o&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx(Oe,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",Ihr()]}):nN()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void v(),children:[i?f.jsx(Nt,{}):null,s.error?tN():f_r()]}):f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void p(),children:[i?f.jsx(Nt,{}):null,tN()]})}),(s.status==="connecting"||s.status==="reconnecting")&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:f.jsx(Oe,{disabled:i,onClick:()=>void m(),children:s3()})}),y&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx(Oe,{disabled:i,onClick:()=>void m(),children:s3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[i?f.jsx(Nt,{}):null,eN()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid k(),children:[i?f.jsx(Nt,{}):null,JD()]})]}),w&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void p(),children:[i?f.jsx(Nt,{}):null,eN()]})})]})}),u&&f.jsx(MI,{host:s.host,preview:u,currentClientAttached:!1,stopping:i,onClose:()=>{i||d(null)},onConfirm:()=>void x()})]})}function ZEn({children:e}){const r=T.useRef(null);return T.useEffect(()=>{var t;return(t=r.current)==null?void 0:t.focus()},[]),f.jsx("div",{ref:r,role:"alertdialog","aria-modal":"true","aria-labelledby":"remote-setup-title",tabIndex:-1,className:"absolute inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-6",children:e})}function JEn(){const e=cu();T.useSyncExternalStore(P8,fV),T.useEffect(()=>P8(()=>{PEn(),qEn()}),[]);const r=gX({select:x=>x.pathname==="/remote-launch"}),[t,n]=T.useState(null),[s,o]=T.useState(null),a=T.useRef(!1),i=T.useRef(!1),c=T.useRef(!1),u=T.useRef(null),[d,_]=T.useState(null),p=dt({...OCn(),enabled:!r,refetchInterval:x=>{var v;return x.state.status==="error"||((v=x.state.data)==null?void 0:v.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(dt({...WCn(e),enabled:!r&&((t==null?void 0:t.kind)==="local"||(t==null?void 0:t.kind)==="ssh"&&t.session.status==="connected")}),T.useEffect(()=>{var b,w;if(r)return;const x=p.data;if(!x){o(((b=p.error)==null?void 0:b.message)??null);return}const v=VEn(x);dV(v),u.current!==null&&u.current!==v&&(a.current=!1,i.current=!1,c.current=!1),u.current=v,x.kind==="ssh"&&(c.current||(c.current=!0,XEn(x)),x.session.status==="connected"?(a.current=!0,i.current=!0,_(null)):x.session.status==="disconnected"&&x.session.error===null&&(i.current=!1)),n(x),o(((w=p.error)==null?void 0:w.message)??null)},[r,p.data,p.error]),T.useEffect(()=>{const x=(t==null?void 0:t.kind)==="ssh";QEn(x),x&&(!a.current||t.session.status==="disconnected"&&!t.session.error)&&(document.title="OpenResearch")},[t]),r)return f.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[f.jsx(Nt,{})," ",lur()]});if(!t)return f.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:s?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:s}),f.jsx(Oe,{onClick:()=>location.reload(),children:Ks()})]}):f.jsx(Nt,{})});if(t.kind==="local")return f.jsxs(O3,{value:t,children:[f.jsx(DN,{}),f.jsx(lg,{})]},Si()[1]);if(!(i.current&&(t.session.status!=="disconnected"||t.session.error!==null))&&t.session.status!=="connected")return s?f.jsx(cA,{host:t.session.host}):f.jsx(lA,{runtime:t,retriedInteractiveError:d,setRetriedInteractiveError:_});const k=t.session.status!=="connected"||s!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:k,children:f.jsxs(O3,{value:t,children:[f.jsx(DN,{}),f.jsx(lg,{})]},Si()[1])}),k&&f.jsx(ZEn,{children:s?f.jsx(cA,{host:t.session.host,overlay:!0}):f.jsx(lA,{runtime:t,overlay:!0,retriedInteractiveError:d,setRetriedInteractiveError:_})})]})}const Ry=eX()({component:JEn}),kS="orx:demo-read-sessions";function uP(){try{const e=JSON.parse(sessionStorage.getItem(kS)??"[]");return new Set(Array.isArray(e)?e.filter(r=>typeof r=="string"):[])}catch{return new Set}}function eNn(e){try{const r=uP();r.add(e),sessionStorage.setItem(kS,JSON.stringify([...r]))}catch{}}function tNn(){try{sessionStorage.removeItem(kS)}catch{}}function _P(e,r){const t=Zf(e.split("?")[0]);return!!(t&&(!t.sessionId||r.some(n=>n.id===t.sessionId&&n.projectId===t.projectId)))}async function rNn(e=Je){var a;const[r,t]=await Promise.all([e.fetchQuery(f0()),e.fetchQuery(Vf())]),n=Ny((a=nP()??r.workspace)==null?void 0:a.lastLocation),s=()=>t[0]?fP(t[0].id,e):Promise.resolve("/projects");if(!n)return s();const o=Zf(n.split("?")[0]);return!(o!=null&&o.projectId)||!t.some(i=>i.id===o.projectId)||o.sessionId&&!_P(n,await e.fetchQuery(So(o.projectId)))?s():n}async function fP(e,r=Je){var d;const[t,n]=await Promise.all([r.fetchQuery(oS(e)),r.fetchQuery(So(e))]),s=cP(e)??t,o=Ny(s==null?void 0:s.lastLocation);if(o&&((d=Zf(o.split("?")[0]))==null?void 0:d.projectId)===e&&_P(o,n))return o;const a=n.find(_=>!_.archived&&!_.sideParentSessionId),i=Ju(e)?wS(a==null?void 0:a.id,!(await r.fetchQuery(f0())).tourCompleted):void 0,c=v_(s,(a==null?void 0:a.id)??"new"),u=c?c.active:i==null?void 0:i.active;return I1(e,(a==null?void 0:a.id)??null,u)}function My(){return f.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function K2(){return f.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[f.jsx(My,{}),"OpenResearch"]})}const uA="inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text";function nNn({cmd:e,onRun:r}){const[t,n]=T.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),r&&f.jsx("button",{type:"button",className:`cmd-inline-run ${uA}`,onClick:r,"aria-label":z9({value:Ee(e)}),title:z9({value:Ee(e)}),children:f.jsx(Y9n,{size:11})}),f.jsx("button",{type:"button",className:`cmd-inline-copy ${uA}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),1500)}).catch(()=>{})},"aria-label":t?qf():hZ({value:Ee(e)}),title:t?qf():Uj(),children:t?f.jsx(_o,{size:11,strokeWidth:3}):f.jsx(hd,{size:11})})]})}function x_(e,r){return e?e.split(/`([^`]+)`/).map((t,n)=>n%2===1?f.jsx(nNn,{cmd:t,onRun:r!=null&&r.canRun(t)?()=>r.onRun(t):void 0},n):t):null}function m0(e){if(e.id!=="claude-code")return null;switch(e.authProvider){case"bedrock":return"Amazon Bedrock";case"vertex":return"Google Vertex AI";case"foundry":return"Microsoft Foundry";case"firstParty":return null;default:return e.authProvider??null}}function sp({harness:e,size:r=16}){const t="block shrink-0";return e==="claude-code"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:f.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):e==="opencode"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?f.jsxs("svg",{className:t,width:r,height:r,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[f.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),f.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),f.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),f.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),f.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:f.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):f.jsx("svg",{className:t,width:r,height:r,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z"})})}function $3(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function sNn(e,r){return e.needsConfigRepair?"error":r==="login"?"running":"preview"}function _A(e,r){return r||e==="preview"}function oNn(e,r){if(!e||e.needsConfigRepair)return null;const t=$3(e);return t===r?null:t}function dP({harness:e,commands:r,onReady:t,onClose:n}){const s=T.useRef(null),o=T.useRef(!1),[a,i]=T.useState(()=>$3(e)),[c,u]=T.useState(0),[d,_]=T.useState(()=>sNn(e,$3(e))),[p,m]=T.useState(d==="running"),[k,x]=T.useState(e.needsConfigRepair),[v,b]=T.useState(e.needsConfigRepair?e.agentNote??null:null),w=d==="running"||d==="checking",y=r[a].includes(` -`)?void 0:r[a];T.useEffect(()=>{o.current=!1;const z=s.current;return z==null||z.showModal(),()=>{o.current=!0,z==null||z.close()}},[]);const S=async(z=!0)=>{_("checking"),b(null);try{const N=z?await Kf(!0,!0):await nI();if(o.current)return;const A=N.find(E=>E.id===e.id);if(x((A==null?void 0:A.needsConfigRepair)??!1),A!=null&&A.agentReady&&(a!=="login"||A.authenticated))t==null||t(A),_("success"),e.id==="antigravity"&&a==="login"&&n();else if(a!=="login"&&(A!=null&&A.installed)&&!A.installBroken&&!A.needsConfigRepair&&A.authState==="needsLogin")i("login"),m(!0),_("running");else if(z){const E=oNn(A,a);E&&(i(E),m(!1)),b((A==null?void 0:A.agentNote)??LD()),_("error")}else return S(!0)}catch(N){if(o.current)return;b(N instanceof Error?N.message:String(N)),_("error")}};return f.jsxs("dialog",{ref:s,className:"m-auto w-180 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"harness-setup-title",onKeyDown:z=>{z.key==="Escape"&&w&&z.preventDefault()},onCancel:z=>{z.preventDefault(),w||n()},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(sp,{harness:e.id,size:26}),f.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:NE({agent:e.name})})]}),d==="preview"?f.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?Lxt({agent:e.name}):m2t({agent:e.name})}):y&&_A(d,p)?f.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:x_(Fwt({command:y}))}):null,d!=="running"&&d!=="preview"&&f.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[d==="checking"&&f.jsx(Nt,{}),d==="success"?cxt({agent:e.name}):d==="error"?$D():Zyt()]}),a==="install"&&r.requiresNpm&&f.jsx("p",{className:"text-sm text-subtext",children:Twt()}),_A(d,p)&&f.jsx(Ty,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:NE({agent:e.name}),command:y,heightClass:"h-96",active:d==="running",awaitingApproval:d==="preview",onComplete:z=>typeof z!="object"||z===null||!("type"in z)||z.type!=="complete"?!1:(S(!1),!0),onError:z=>{b(z),_("error")}},`${a}-${c}`),v&&f.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:x_(v)}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[d==="error"&&f.jsx(Oe,{variant:"ghost",onClick:()=>{b(null),S()},children:hb()}),d==="error"&&!k&&f.jsx(Oe,{onClick:()=>{b(null),m(!0),_("running"),u(z=>z+1)},children:Ks()}),f.jsx(Oe,{variant:d==="success"?"primary":"default",onClick:n,children:d==="success"?NL():w?Hyt():fg()}),d==="preview"&&f.jsx(Oe,{variant:"primary",onClick:()=>{m(!0),_("running")},children:Ryt()})]})]})}const aNn=600,fA=700,D3=1300,hP=900,V2=2.6,Vv=.06;function iNn(e){if(e{const t=r.current,n=t==null?void 0:t.getContext("2d");if(!t||!n||matchMedia("(prefers-reduced-motion: reduce)").matches)return;const s=Array.from({length:aNn},()=>dA());let o=0,a=0;const i=()=>{const p=window.devicePixelRatio||1;o=t.clientWidth,a=t.clientHeight,t.width=o*p,t.height=a*p,n.setTransform(p,0,0,p,0,0)};i(),window.addEventListener("resize",i);const c=performance.now();let u=c,d=0;const _=p=>{if(p-c>D3+hP&&p-u<33){d=requestAnimationFrame(_);return}const m=Math.min(p-u,50)/1e3;u=p;const k=iNn(p-c),x=getComputedStyle(document.documentElement),v=x.getPropertyValue("--text"),b=x.getPropertyValue("--primary"),w=o/2,y=a/2,S=Math.max(o,a)*.5,z=Math.min(.6,k*.12);n.clearRect(0,0,o,a),n.lineCap="round";for(const N of s){N.z-=k*m,N.z<=.02&&Object.assign(N,dA(1));const A=w+N.x/N.z*S,E=y+N.y/N.z*S,M=N.z+z,$=w+N.x/M*S,D=y+N.y/M*S,I=1-N.z;n.globalAlpha=Math.min(1,I*1.4)*(N.tinted?1:.8),n.strokeStyle=N.tinted?b:v,n.lineWidth=.6+I*2.2,n.beginPath(),n.moveTo($,D),n.lineTo(A+.01,E),n.stroke()}d=requestAnimationFrame(_)};return d=requestAnimationFrame(_),()=>{cancelAnimationFrame(d),window.removeEventListener("resize",i)}},[]),f.jsx("canvas",{ref:r,"aria-hidden":"true",className:e})}const lNn={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function vg({variant:e="list",className:r,...t}){return f.jsx("span",{className:Ls("title",lNn[e],r),...t})}const hA=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),h_=["onb-card-meta text-sm text-subtext [&_code]:font-mono","[&_code]:text-xs [&_code]:bg-surface","[&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs","[&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap"].join(" "),Im=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),pP=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),uNn=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),_Nn=[{id:"AI/ML",label:XDt},{id:"Biology",label:aLt},{id:"Physics",label:CLt},{id:"Other",label:mLt}],fNn=["welcome","environment","profile"];function dNn({onDone:e,preferredAgent:r,remote:t}){var Ie,Ye;const n=mr({mutationFn:Ae=>Yjn(...Ae)}),[s,o]=T.useState(0);T.useEffect(()=>{const Ae=fNn[s];Ae&&e_({name:"onboarding_step_viewed",step:Ae})},[s]);const a=dt(su()),i=dt(Vm()),c=dt(nS()),[u,d]=T.useState(null),[_,p]=T.useState(!1),m=T.useRef(null),k=T.useRef(""),x=T.useRef(null),v=T.useRef(!1);T.useEffect(()=>()=>{var Ae;return(Ae=m.current)==null?void 0:Ae.close()},[]);const b=a.data??null,w=(Ie=i.data)==null?void 0:Ie.gitVersion,y=!t&&((Ye=i.data)==null?void 0:Ye.gitInstallable)===!0,[S,z]=T.useState(!1),[N,A]=T.useState(null),[E,M]=T.useState(""),[$,D]=T.useState(null),[I,G]=T.useState(!1),[H,Q]=T.useState([]),[K,J]=T.useState(""),[ee,P]=T.useState(""),[L,F]=T.useState([]),[q,U]=T.useState(""),[oe,ie]=T.useState([]),[ce,re]=T.useState(!1),W=T.useRef(0),[ae,le]=T.useState(!1),[me,be]=T.useState(!1),Se=(b==null?void 0:b.some(Ae=>Ae.agentReady&&!Ae.catalogPending))??!1,Be=(b==null?void 0:b.some(Ae=>Ae.catalogPending))??!1,Xe=w!=null,Me=T.useRef(0),Fe=(Ae,Ve=!1)=>{const Ze=++Me.current;G(!0),le(!1),be(!1);const at=()=>Ze===Me.current;Promise.allSettled([Kf(Ae,Ve),Je.fetchQuery({...Vm(),staleTime:Ae?0:3e4})]).then(([At,Pe])=>{at()&&(At.status==="rejected"&&le(!0),Pe.status==="rejected"&&be(!0))}).finally(()=>at()&&G(!1))};T.useEffect(()=>Fe(!1),[]);const pt=mr({mutationFn:Jjn,onSuccess:()=>Fe(!0)}),Ct=f.jsx(vNn,{pending:pt.isPending,error:pt.error,disabled:I,onInstall:()=>pt.mutate()});T.useEffect(()=>{if(b===null)return;const Ae=b.filter(Ve=>Ve.agentReady&&!Ve.catalogPending);D(Ve=>{var at;if(Ve&&Ae.some(At=>At.id===Ve))return Ve;const Ze=r&&Ae.find(At=>At.id===r.harness);return(Ze==null?void 0:Ze.id)??((at=Ae[0])==null?void 0:at.id)??null})},[b,r]),T.useEffect(()=>le(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>be(i.isError),[i.isError,i.dataUpdatedAt]),T.useEffect(()=>{Je.fetchQuery(DCn()).then(Ae=>{Q(Ae.researchAreas),J(Ae.otherArea??""),P(Ae.background??""),F(Ae.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const Ae=q.trim();if(Ae.length<3){ie([]),re(!1);return}const Ve=++W.current;re(!0);const Ze=setTimeout(()=>{Je.fetchQuery(uI(Ae)).then(at=>Ve===W.current&&ie(at)).catch(()=>Ve===W.current&&ie([])).finally(()=>Ve===W.current&&re(!1))},350);return()=>clearTimeout(Ze)},[q]);const Vt=Ae=>{const Ve=L.some(Ze=>Ze.paperId===Ae.paperId);F(Ze=>Ze.some(at=>at.paperId===Ae.paperId)?Ze:[...Ze,{paperId:Ae.paperId,title:pA(Ae.title)}]),U(""),ie([]),Ve||Je.fetchQuery(S3(Ae.paperId)).then(Ze=>{var At;const at=(At=Ze.title)==null?void 0:At.trim();at&&F(Pe=>Pe.map(Jt=>Jt.paperId===Ae.paperId?{...Jt,title:at}:Jt))}).catch(()=>{})},Ut=Ae=>F(Ve=>Ve.filter(Ze=>Ze.paperId!==Ae)),Gt=Ae=>{Q(Ve=>Ve.includes(Ae)?Ve.filter(Ze=>Ze!==Ae):[...Ve,Ae])},De=H.length>0&&(!H.includes("Other")||K.trim().length>0),ct=()=>{if(x.current)return x.current;k.current="",v.current=!0,p(!0);const Ae=(async()=>{await new Promise((at,At)=>{const Pe=location.protocol==="https:"?"wss:":"ws:",Jt=new WebSocket(`${Pe}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);Jt.binaryType="arraybuffer";const Tt=new TextDecoder,Zr=new ZI.Terminal;Zr.onData(nr=>{Jt.readyState===WebSocket.OPEN&&Jt.send(new TextEncoder().encode(nr))}),m.current=Jt;let cr=!1;Jt.onmessage=nr=>{if(nr.data instanceof ArrayBuffer){Zr.write(new Uint8Array(nr.data)),k.current=(k.current+Tt.decode(nr.data,{stream:!0})).slice(-65536);return}if(typeof nr.data!="string")return;let Wt;try{Wt=JSON.parse(nr.data)}catch{return}typeof Wt!="object"||Wt===null||!("type"in Wt)||(Wt.type==="complete"?(cr=!0,Jt.close(),at()):Wt.type==="error"&&(Jt.close(),At(new Error("error"in Wt&&typeof Wt.error=="string"?Wt.error:$D()))))},Jt.onerror=()=>{Jt.close(),At(new Error(gb()))},Jt.onclose=()=>{Zr.dispose(),m.current=null,cr||At(new Error(gb()))}});const Ze=(await Kf(!0,!0)).find(at=>at.id==="opencode"&&at.agentReady);if(!Ze)throw new Error(PHt());return D("opencode"),Ze})();return x.current=Ae,Ae.catch(()=>{}),Ae};T.useEffect(()=>{t||v.current||!(b!=null&&b.length)||b.some(Ae=>Ae.catalogPending)||!b.every(Ae=>!Ae.installed&&!Ae.installBroken)||ct()},[b,t]),T.useEffect(()=>{s===1&&_&&o(2)},[s,_]);const lt=()=>{o(_?2:1)},xe=async(Ae="complete")=>{var Ve;if(!(S||Ae==="complete"&&(!De||!Xe))){z(!0),A(null),M("");try{const Ze=_?await ct():b==null?void 0:b.find(Pe=>Pe.id===$&&Pe.agentReady&&!Pe.catalogPending);if(!Ze)throw new Error(LD());if(Ae==="setup")return;const at=pNn(Ze,((Ve=Ze.models[0])==null?void 0:Ve.id)??null),At=await n.mutateAsync([at,{researchAreas:H,otherArea:H.includes("Other")?K:null,background:ee||null,papers:L}]);e(At.project,At.selection)}catch(Ze){_&&(x.current=null);const at=Ze instanceof Error?Ze.message:String(Ze);A(at),M([k.current,at].filter(Boolean).join(` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(z){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&z&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(z){const M=this._getMouseBufferCoords(z),$=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!!($&&D&&M)&&this._areCoordsInSelection(M,$,D)}isCellInSelection(z,M){const $=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!$||!D)&&this._areCoordsInSelection([z,M],$,D)}_areCoordsInSelection(z,M,$){return z[1]>M[1]&&z[1]<$[1]||M[1]===$[1]&&z[1]===M[1]&&z[0]>=M[0]&&z[0]<$[0]||M[1]<$[1]&&z[1]===$[1]&&z[0]<$[0]||M[1]<$[1]&&z[1]===M[1]&&z[0]>=M[0]}_selectWordAtCursor(z,M){var I,G;const $=(G=(I=this._linkifier.currentLink)==null?void 0:I.link)==null?void 0:G.range;if($)return this._model.selectionStart=[$.start.x-1,$.start.y-1],this._model.selectionStartLength=(0,x.getRangeLength)($,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const D=this._getMouseBufferCoords(z);return!!D&&(this._selectWordAt(D,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(z,M){this._model.clearSelection(),z=Math.max(z,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,z],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(z){this._model.handleTrim(z)&&this.refresh()}_getMouseBufferCoords(z){const M=this._mouseService.getCoords(z,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(z){let M=(0,_.getCoordsRelativeToElement)(this._coreBrowserService.window,z,this._screenElement)[1];const $=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=$?0:(M>$&&(M-=$),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(z){return b.isMac?z.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:z.shiftKey}handleMouseDown(z){if(this._mouseDownTimeStamp=z.timeStamp,(z.button!==2||!this.hasSelection)&&z.button===0){if(!this._enabled){if(!this.shouldForceSelection(z))return;z.stopPropagation()}z.preventDefault(),this._dragScrollAmount=0,this._enabled&&z.shiftKey?this._handleIncrementalClick(z):z.detail===1?this._handleSingleClick(z):z.detail===2?this._handleDoubleClick(z):z.detail===3&&this._handleTripleClick(z),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(z){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(z))}_handleSingleClick(z){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(z)?3:0,this._model.selectionStart=this._getMouseBufferCoords(z),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const M=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);M&&M.length!==this._model.selectionStart[0]&&M.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(z){this._selectWordAtCursor(z,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(z){const M=this._getMouseBufferCoords(z);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(z){return z.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(z){if(z.stopImmediatePropagation(),!this._model.selectionStart)return;const M=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(z),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const $=this._bufferService.buffer;if(this._model.selectionEnd[1]<$.lines.length){const D=$.lines.get(this._model.selectionEnd[1]);D&&D.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(z.ydisp+this._bufferService.rows,z.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=z.ydisp),this.refresh()}}_handleMouseUp(z){const M=z.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&z.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const $=this._mouseService.getCoords(z,this._element,this._bufferService.cols,this._bufferService.rows,!1);if($&&$[0]!==void 0&&$[1]!==void 0){const D=(0,p.moveToCellSequence)($[0]-1,$[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(D,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,$=!(!z||!M||z[0]===M[0]&&z[1]===M[1]);$?z&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&z[0]===this._oldSelectionStart[0]&&z[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(z,M,$)):this._oldHasSelection&&this._fireOnSelectionChange(z,M,$)}_fireOnSelectionChange(z,M,$){this._oldSelectionStart=z,this._oldSelectionEnd=M,this._oldHasSelection=$,this._onSelectionChange.fire()}_handleBufferActivate(z){this.clearSelection(),this._trimListener.dispose(),this._trimListener=z.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(z,M){let $=M;for(let D=0;M>=D;D++){const I=z.loadCell(D,this._workCell).getChars().length;this._workCell.getWidth()===0?$--:I>1&&M!==D&&($+=I-1)}return $}setSelection(z,M,$){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[z,M],this._model.selectionStartLength=$,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(z){this._isClickInSelection(z)||(this._selectWordAtCursor(z,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(z,M,$=!0,D=!0){if(z[0]>=this._bufferService.cols)return;const I=this._bufferService.buffer,G=I.lines.get(z[1]);if(!G)return;const F=I.translateBufferLineToString(z[1],!1);let Q=this._convertViewportColToCharacterIndex(G,z[0]),K=Q;const J=z[0]-Q;let ee=0,P=0,L=0,H=0;if(F.charAt(Q)===" "){for(;Q>0&&F.charAt(Q-1)===" ";)Q--;for(;K1&&(H+=ce-1,K+=ce-1);oe>0&&Q>0&&!this._isCharWordSeparator(G.loadCell(oe-1,this._workCell));){G.loadCell(oe-1,this._workCell);const re=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,oe--):re>1&&(L+=re-1,Q-=re-1),Q--,oe--}for(;ie1&&(H+=re-1,K+=re-1),K++,ie++}}K++;let q=Q+J-ee+L,U=Math.min(this._bufferService.cols,K-Q+ee+P-L-H);if(M||F.slice(Q,K).trim()!==""){if($&&q===0&&G.getCodePoint(0)!==32){const oe=I.lines.get(z[1]-1);if(oe&&G.isWrapped&&oe.getCodePoint(this._bufferService.cols-1)!==32){const ie=this._getWordAt([this._bufferService.cols-1,z[1]-1],!1,!0,!1);if(ie){const ce=this._bufferService.cols-ie.start;q-=ce,U+=ce}}}if(D&&q+U===this._bufferService.cols&&G.getCodePoint(this._bufferService.cols-1)!==32){const oe=I.lines.get(z[1]+1);if(oe!=null&&oe.isWrapped&&oe.getCodePoint(0)!==32){const ie=this._getWordAt([0,z[1]+1],!1,!1,!0);ie&&(U+=ie.length)}}return{start:q,length:U}}}_selectWordAt(z,M){const $=this._getWordAt(z,M);if($){for(;$.start<0;)$.start+=this._bufferService.cols,z[1]--;this._model.selectionStart=[$.start,z[1]],this._model.selectionStartLength=$.length}}_selectToWordAt(z){const M=this._getWordAt(z,!0);if(M){let $=z[1];for(;M.start<0;)M.start+=this._bufferService.cols,$--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,$++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,$]}}_isCharWordSeparator(z){return z.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(z.getChars())>=0}_selectLineAt(z){const M=this._bufferService.buffer.getWrappedRangeForLine(z),$={start:{x:0,y:M.first},end:{x:this._bufferService.cols-1,y:M.last}};this._model.selectionStart=[0,M.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,x.getRangeLength)($,this._bufferService.cols)}};i.SelectionService=A=u([d(3,S.IBufferService),d(4,S.ICoreService),d(5,k.IMouseService),d(6,S.IOptionsService),d(7,k.IRenderService),d(8,k.ICoreBrowserService)],A)},4725:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ILinkProviderService=i.IThemeService=i.ICharacterJoinerService=i.ISelectionService=i.IRenderService=i.IMouseService=i.ICoreBrowserService=i.ICharSizeService=void 0;const u=c(8343);i.ICharSizeService=(0,u.createDecorator)("CharSizeService"),i.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),i.IMouseService=(0,u.createDecorator)("MouseService"),i.IRenderService=(0,u.createDecorator)("RenderService"),i.ISelectionService=(0,u.createDecorator)("SelectionService"),i.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),i.IThemeService=(0,u.createDecorator)("ThemeService"),i.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(a,i,c){var u=this&&this.__decorate||function(A,z,M,$){var D,I=arguments.length,G=I<3?z:$===null?$=Object.getOwnPropertyDescriptor(z,M):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(A,z,M,$);else for(var F=A.length-1;F>=0;F--)(D=A[F])&&(G=(I<3?D(G):I>3?D(z,M,G):D(z,M))||G);return I>3&&G&&Object.defineProperty(z,M,G),G},d=this&&this.__param||function(A,z){return function(M,$){z(M,$,A)}};Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeService=i.DEFAULT_ANSI_COLORS=void 0;const _=c(7239),p=c(8055),m=c(8460),k=c(844),w=c(2585),v=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),x=p.css.toColor("#ffffff"),y=p.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};i.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],z=[0,95,135,175,215,255];for(let M=0;M<216;M++){const $=z[M/36%6|0],D=z[M/6%6|0],I=z[M%6];A.push({css:p.channels.toCss($,D,I),rgba:p.channels.toRgba($,D,I)})}for(let M=0;M<24;M++){const $=8+10*M;A.push({css:p.channels.toCss($,$,$),rgba:p.channels.toRgba($,$,$)})}return A})());let E=i.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new _.ColorContrastCache,this._halfContrastCache=new _.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:b,cursor:x,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:p.color.blend(b,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:p.color.blend(b,S),ansi:i.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(A={}){const z=this._colors;if(z.foreground=N(A.foreground,v),z.background=N(A.background,b),z.cursor=N(A.cursor,x),z.cursorAccent=N(A.cursorAccent,y),z.selectionBackgroundTransparent=N(A.selectionBackground,S),z.selectionBackgroundOpaque=p.color.blend(z.background,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundTransparent=N(A.selectionInactiveBackground,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundOpaque=p.color.blend(z.background,z.selectionInactiveBackgroundTransparent),z.selectionForeground=A.selectionForeground?N(A.selectionForeground,p.NULL_COLOR):void 0,z.selectionForeground===p.NULL_COLOR&&(z.selectionForeground=void 0),p.color.isOpaque(z.selectionBackgroundTransparent)&&(z.selectionBackgroundTransparent=p.color.opacity(z.selectionBackgroundTransparent,.3)),p.color.isOpaque(z.selectionInactiveBackgroundTransparent)&&(z.selectionInactiveBackgroundTransparent=p.color.opacity(z.selectionInactiveBackgroundTransparent,.3)),z.ansi=i.DEFAULT_ANSI_COLORS.slice(),z.ansi[0]=N(A.black,i.DEFAULT_ANSI_COLORS[0]),z.ansi[1]=N(A.red,i.DEFAULT_ANSI_COLORS[1]),z.ansi[2]=N(A.green,i.DEFAULT_ANSI_COLORS[2]),z.ansi[3]=N(A.yellow,i.DEFAULT_ANSI_COLORS[3]),z.ansi[4]=N(A.blue,i.DEFAULT_ANSI_COLORS[4]),z.ansi[5]=N(A.magenta,i.DEFAULT_ANSI_COLORS[5]),z.ansi[6]=N(A.cyan,i.DEFAULT_ANSI_COLORS[6]),z.ansi[7]=N(A.white,i.DEFAULT_ANSI_COLORS[7]),z.ansi[8]=N(A.brightBlack,i.DEFAULT_ANSI_COLORS[8]),z.ansi[9]=N(A.brightRed,i.DEFAULT_ANSI_COLORS[9]),z.ansi[10]=N(A.brightGreen,i.DEFAULT_ANSI_COLORS[10]),z.ansi[11]=N(A.brightYellow,i.DEFAULT_ANSI_COLORS[11]),z.ansi[12]=N(A.brightBlue,i.DEFAULT_ANSI_COLORS[12]),z.ansi[13]=N(A.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),z.ansi[14]=N(A.brightCyan,i.DEFAULT_ANSI_COLORS[14]),z.ansi[15]=N(A.brightWhite,i.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const M=Math.min(z.ansi.length-16,A.extendedAnsi.length);for(let $=0;${Object.defineProperty(i,"__esModule",{value:!0}),i.CircularList=void 0;const u=c(8460),d=c(844);class _ extends d.Disposable{constructor(m){super(),this._maxLength=m,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(m){if(this._maxLength===m)return;const k=new Array(m);for(let w=0;wthis._length)for(let k=this._length;k=m;v--)this._array[this._getCyclicIndex(v+w.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;vthis._maxLength){const v=this._length+w.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=w.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,k,w){if(!(k<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+w<0)throw new Error("Cannot shift elements in list beyond index 0");if(w>0){for(let b=k-1;b>=0;b--)this.set(m+b+w,this.get(m+b));const v=m+k+w-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v{Object.defineProperty(i,"__esModule",{value:!0}),i.clone=void 0,i.clone=function c(u,d=5){if(typeof u!="object")return u;const _=Array.isArray(u)?[]:{};for(const p in u)_[p]=d<=1?u[p]:u[p]&&c(u[p],d-1);return _}},8055:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.contrastRatio=i.toPaddedHex=i.rgba=i.rgb=i.css=i.color=i.channels=i.NULL_COLOR=void 0;let c=0,u=0,d=0,_=0;var p,m,k,w,v;function b(y){const S=y.toString(16);return S.length<2?"0"+S:S}function x(y,S){return y>>0},y.toColor=function(S,E,N,A){return{css:y.toCss(S,E,N,A),rgba:y.toRgba(S,E,N,A)}}})(p||(i.channels=p={})),(function(y){function S(E,N){return _=Math.round(255*N),[c,u,d]=v.toChannels(E.rgba),{css:p.toCss(c,u,d,_),rgba:p.toRgba(c,u,d,_)}}y.blend=function(E,N){if(_=(255&N.rgba)/255,_===1)return{css:N.css,rgba:N.rgba};const A=N.rgba>>24&255,z=N.rgba>>16&255,M=N.rgba>>8&255,$=E.rgba>>24&255,D=E.rgba>>16&255,I=E.rgba>>8&255;return c=$+Math.round((A-$)*_),u=D+Math.round((z-D)*_),d=I+Math.round((M-I)*_),{css:p.toCss(c,u,d),rgba:p.toRgba(c,u,d)}},y.isOpaque=function(E){return(255&E.rgba)==255},y.ensureContrastRatio=function(E,N,A){const z=v.ensureContrastRatio(E.rgba,N.rgba,A);if(z)return p.toColor(z>>24&255,z>>16&255,z>>8&255)},y.opaque=function(E){const N=(255|E.rgba)>>>0;return[c,u,d]=v.toChannels(N),{css:p.toCss(c,u,d),rgba:N}},y.opacity=S,y.multiplyOpacity=function(E,N){return _=255&E.rgba,S(E,_*N/255)},y.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}})(m||(i.color=m={})),(function(y){let S,E;try{const N=document.createElement("canvas");N.width=1,N.height=1;const A=N.getContext("2d",{willReadFrequently:!0});A&&(S=A,S.globalCompositeOperation="copy",E=S.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(N){if(N.match(/#[\da-f]{3,8}/i))switch(N.length){case 4:return c=parseInt(N.slice(1,2).repeat(2),16),u=parseInt(N.slice(2,3).repeat(2),16),d=parseInt(N.slice(3,4).repeat(2),16),p.toColor(c,u,d);case 5:return c=parseInt(N.slice(1,2).repeat(2),16),u=parseInt(N.slice(2,3).repeat(2),16),d=parseInt(N.slice(3,4).repeat(2),16),_=parseInt(N.slice(4,5).repeat(2),16),p.toColor(c,u,d,_);case 7:return{css:N,rgba:(parseInt(N.slice(1),16)<<8|255)>>>0};case 9:return{css:N,rgba:parseInt(N.slice(1),16)>>>0}}const A=N.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return c=parseInt(A[1]),u=parseInt(A[2]),d=parseInt(A[3]),_=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(c,u,d,_);if(!S||!E)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=E,S.fillStyle=N,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[c,u,d,_]=S.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,d,_),css:N}}})(k||(i.css=k={})),(function(y){function S(E,N,A){const z=E/255,M=N/255,$=A/255;return .2126*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*($<=.03928?$/12.92:Math.pow(($+.055)/1.055,2.4))}y.relativeLuminance=function(E){return S(E>>16&255,E>>8&255,255&E)},y.relativeLuminance2=S})(w||(i.rgb=w={})),(function(y){function S(N,A,z){const M=N>>24&255,$=N>>16&255,D=N>>8&255;let I=A>>24&255,G=A>>16&255,F=A>>8&255,Q=x(w.relativeLuminance2(I,G,F),w.relativeLuminance2(M,$,D));for(;Q0||G>0||F>0);)I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),F-=Math.max(0,Math.ceil(.1*F)),Q=x(w.relativeLuminance2(I,G,F),w.relativeLuminance2(M,$,D));return(I<<24|G<<16|F<<8|255)>>>0}function E(N,A,z){const M=N>>24&255,$=N>>16&255,D=N>>8&255;let I=A>>24&255,G=A>>16&255,F=A>>8&255,Q=x(w.relativeLuminance2(I,G,F),w.relativeLuminance2(M,$,D));for(;Q>>0}y.blend=function(N,A){if(_=(255&A)/255,_===1)return A;const z=A>>24&255,M=A>>16&255,$=A>>8&255,D=N>>24&255,I=N>>16&255,G=N>>8&255;return c=D+Math.round((z-D)*_),u=I+Math.round((M-I)*_),d=G+Math.round(($-G)*_),p.toRgba(c,u,d)},y.ensureContrastRatio=function(N,A,z){const M=w.relativeLuminance(N>>8),$=w.relativeLuminance(A>>8);if(x(M,$)>8));if(Fx(M,w.relativeLuminance(Q>>8))?G:Q}return G}const D=E(N,A,z),I=x(M,w.relativeLuminance(D>>8));if(Ix(M,w.relativeLuminance(G>>8))?D:G}return D}},y.reduceLuminance=S,y.increaseLuminance=E,y.toChannels=function(N){return[N>>24&255,N>>16&255,N>>8&255,255&N]}})(v||(i.rgba=v={})),i.toPaddedHex=b,i.contrastRatio=x},8969:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreTerminal=void 0;const u=c(844),d=c(2585),_=c(4348),p=c(7866),m=c(744),k=c(7302),w=c(6975),v=c(8460),b=c(1753),x=c(1480),y=c(7994),S=c(9282),E=c(5435),N=c(5981),A=c(2660);let z=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((D=>{var I;(I=this._onScrollApi)==null||I.fire(D.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(D){for(const I in D)this.optionsService.options[I]=D[I]}constructor(D){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new _.InstantiationService,this.optionsService=this.register(new k.OptionsService(D)),this._instantiationService.setService(d.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(d.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(d.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(w.CoreService)),this._instantiationService.setService(d.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(d.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(x.UnicodeService)),this._instantiationService.setService(d.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(d.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(d.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new E.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new N.WriteBuffer(((I,G)=>this._inputHandler.parse(I,G)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(D,I){this._writeBuffer.write(D,I)}writeSync(D,I){this._logService.logLevel<=d.LogLevelEnum.WARN&&!z&&(this._logService.warn("writeSync is unreliable and will be removed soon."),z=!0),this._writeBuffer.writeSync(D,I)}input(D,I=!0){this.coreService.triggerDataEvent(D,I)}resize(D,I){isNaN(D)||isNaN(I)||(D=Math.max(D,m.MINIMUM_COLS),I=Math.max(I,m.MINIMUM_ROWS),this._bufferService.resize(D,I))}scroll(D,I=!1){this._bufferService.scroll(D,I)}scrollLines(D,I,G){this._bufferService.scrollLines(D,I,G)}scrollPages(D){this.scrollLines(D*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(D){const I=D-this._bufferService.buffer.ydisp;I!==0&&this.scrollLines(I)}registerEscHandler(D,I){return this._inputHandler.registerEscHandler(D,I)}registerDcsHandler(D,I){return this._inputHandler.registerDcsHandler(D,I)}registerCsiHandler(D,I){return this._inputHandler.registerCsiHandler(D,I)}registerOscHandler(D,I){return this._inputHandler.registerOscHandler(D,I)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let D=!1;const I=this.optionsService.rawOptions.windowsPty;I&&I.buildNumber!==void 0&&I.buildNumber!==void 0?D=I.backend==="conpty"&&I.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(D=!0),D?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const D=[];D.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),D.push(this.registerCsiHandler({final:"H"},(()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const I of D)I.dispose()}))}}}i.CoreTerminal=M},8460:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(d)))},i.runAndSubscribe=function(c,u){return u(void 0),c((d=>u(d)))}},5435:function(a,i,c){var u=this&&this.__decorate||function(ee,P,L,H){var q,U=arguments.length,oe=U<3?P:H===null?H=Object.getOwnPropertyDescriptor(P,L):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ee,P,L,H);else for(var ie=ee.length-1;ie>=0;ie--)(q=ee[ie])&&(oe=(U<3?q(oe):U>3?q(P,L,oe):q(P,L))||oe);return U>3&&oe&&Object.defineProperty(P,L,oe),oe},d=this&&this.__param||function(ee,P){return function(L,H){P(L,H,ee)}};Object.defineProperty(i,"__esModule",{value:!0}),i.InputHandler=i.WindowsOptionsReportType=void 0;const _=c(2584),p=c(7116),m=c(2015),k=c(844),w=c(482),v=c(8437),b=c(8460),x=c(643),y=c(511),S=c(3734),E=c(2585),N=c(1480),A=c(6242),z=c(6351),M=c(5941),$={"(":0,")":1,"*":2,"+":3,"-":1,".":2},D=131072;function I(ee,P){if(ee>24)return P.setWinLines||!1;switch(ee){case 1:return!!P.restoreWin;case 2:return!!P.minimizeWin;case 3:return!!P.setWinPosition;case 4:return!!P.setWinSizePixels;case 5:return!!P.raiseWin;case 6:return!!P.lowerWin;case 7:return!!P.refreshWin;case 8:return!!P.setWinSizeChars;case 9:return!!P.maximizeWin;case 10:return!!P.fullscreenWin;case 11:return!!P.getWinState;case 13:return!!P.getWinPosition;case 14:return!!P.getWinSizePixels;case 15:return!!P.getScreenSizePixels;case 16:return!!P.getCellSizePixels;case 18:return!!P.getWinSizeChars;case 19:return!!P.getScreenSizeChars;case 20:return!!P.getIconTitle;case 21:return!!P.getWinTitle;case 22:return!!P.pushTitle;case 23:return!!P.popTitle;case 24:return!!P.setWinLines}return!1}var G;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(G||(i.WindowsOptionsReportType=G={}));let F=0;class Q extends k.Disposable{getAttrData(){return this._curAttrData}constructor(P,L,H,q,U,oe,ie,ce,re=new m.EscapeSequenceParser){super(),this._bufferService=P,this._charsetService=L,this._coreService=H,this._logService=q,this._optionsService=U,this._oscLinkService=oe,this._coreMouseService=ie,this._unicodeService=ce,this._parser=re,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new w.StringToUtf32,this._utf8Decoder=new w.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new K(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((W=>this._activeBuffer=W.activeBuffer))),this._parser.setCsiHandlerFallback(((W,ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(W),params:ae.toArray()})})),this._parser.setEscHandlerFallback((W=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(W)})})),this._parser.setExecuteHandlerFallback((W=>{this._logService.debug("Unknown EXECUTE code: ",{code:W})})),this._parser.setOscHandlerFallback(((W,ae,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:W,action:ae,data:le})})),this._parser.setDcsHandlerFallback(((W,ae,le)=>{ae==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(W),action:ae,payload:le})})),this._parser.setPrintHandler(((W,ae,le)=>this.print(W,ae,le))),this._parser.registerCsiHandler({final:"@"},(W=>this.insertChars(W))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(W=>this.scrollLeft(W))),this._parser.registerCsiHandler({final:"A"},(W=>this.cursorUp(W))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(W=>this.scrollRight(W))),this._parser.registerCsiHandler({final:"B"},(W=>this.cursorDown(W))),this._parser.registerCsiHandler({final:"C"},(W=>this.cursorForward(W))),this._parser.registerCsiHandler({final:"D"},(W=>this.cursorBackward(W))),this._parser.registerCsiHandler({final:"E"},(W=>this.cursorNextLine(W))),this._parser.registerCsiHandler({final:"F"},(W=>this.cursorPrecedingLine(W))),this._parser.registerCsiHandler({final:"G"},(W=>this.cursorCharAbsolute(W))),this._parser.registerCsiHandler({final:"H"},(W=>this.cursorPosition(W))),this._parser.registerCsiHandler({final:"I"},(W=>this.cursorForwardTab(W))),this._parser.registerCsiHandler({final:"J"},(W=>this.eraseInDisplay(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(W=>this.eraseInDisplay(W,!0))),this._parser.registerCsiHandler({final:"K"},(W=>this.eraseInLine(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(W=>this.eraseInLine(W,!0))),this._parser.registerCsiHandler({final:"L"},(W=>this.insertLines(W))),this._parser.registerCsiHandler({final:"M"},(W=>this.deleteLines(W))),this._parser.registerCsiHandler({final:"P"},(W=>this.deleteChars(W))),this._parser.registerCsiHandler({final:"S"},(W=>this.scrollUp(W))),this._parser.registerCsiHandler({final:"T"},(W=>this.scrollDown(W))),this._parser.registerCsiHandler({final:"X"},(W=>this.eraseChars(W))),this._parser.registerCsiHandler({final:"Z"},(W=>this.cursorBackwardTab(W))),this._parser.registerCsiHandler({final:"`"},(W=>this.charPosAbsolute(W))),this._parser.registerCsiHandler({final:"a"},(W=>this.hPositionRelative(W))),this._parser.registerCsiHandler({final:"b"},(W=>this.repeatPrecedingCharacter(W))),this._parser.registerCsiHandler({final:"c"},(W=>this.sendDeviceAttributesPrimary(W))),this._parser.registerCsiHandler({prefix:">",final:"c"},(W=>this.sendDeviceAttributesSecondary(W))),this._parser.registerCsiHandler({final:"d"},(W=>this.linePosAbsolute(W))),this._parser.registerCsiHandler({final:"e"},(W=>this.vPositionRelative(W))),this._parser.registerCsiHandler({final:"f"},(W=>this.hVPosition(W))),this._parser.registerCsiHandler({final:"g"},(W=>this.tabClear(W))),this._parser.registerCsiHandler({final:"h"},(W=>this.setMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(W=>this.setModePrivate(W))),this._parser.registerCsiHandler({final:"l"},(W=>this.resetMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(W=>this.resetModePrivate(W))),this._parser.registerCsiHandler({final:"m"},(W=>this.charAttributes(W))),this._parser.registerCsiHandler({final:"n"},(W=>this.deviceStatus(W))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(W=>this.deviceStatusPrivate(W))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(W=>this.softReset(W))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(W=>this.setCursorStyle(W))),this._parser.registerCsiHandler({final:"r"},(W=>this.setScrollRegion(W))),this._parser.registerCsiHandler({final:"s"},(W=>this.saveCursor(W))),this._parser.registerCsiHandler({final:"t"},(W=>this.windowOptions(W))),this._parser.registerCsiHandler({final:"u"},(W=>this.restoreCursor(W))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(W=>this.insertColumns(W))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(W=>this.deleteColumns(W))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(W=>this.selectProtected(W))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(W=>this.requestMode(W,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(W=>this.requestMode(W,!1))),this._parser.setExecuteHandler(_.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(_.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(_.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(_.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(_.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(_.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(_.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(_.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(_.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new A.OscHandler((W=>(this.setTitle(W),this.setIconName(W),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((W=>this.setIconName(W)))),this._parser.registerOscHandler(2,new A.OscHandler((W=>this.setTitle(W)))),this._parser.registerOscHandler(4,new A.OscHandler((W=>this.setOrReportIndexedColor(W)))),this._parser.registerOscHandler(8,new A.OscHandler((W=>this.setHyperlink(W)))),this._parser.registerOscHandler(10,new A.OscHandler((W=>this.setOrReportFgColor(W)))),this._parser.registerOscHandler(11,new A.OscHandler((W=>this.setOrReportBgColor(W)))),this._parser.registerOscHandler(12,new A.OscHandler((W=>this.setOrReportCursorColor(W)))),this._parser.registerOscHandler(104,new A.OscHandler((W=>this.restoreIndexedColor(W)))),this._parser.registerOscHandler(110,new A.OscHandler((W=>this.restoreFgColor(W)))),this._parser.registerOscHandler(111,new A.OscHandler((W=>this.restoreBgColor(W)))),this._parser.registerOscHandler(112,new A.OscHandler((W=>this.restoreCursorColor(W)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const W in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:W},(()=>this.selectCharset("("+W))),this._parser.registerEscHandler({intermediates:")",final:W},(()=>this.selectCharset(")"+W))),this._parser.registerEscHandler({intermediates:"*",final:W},(()=>this.selectCharset("*"+W))),this._parser.registerEscHandler({intermediates:"+",final:W},(()=>this.selectCharset("+"+W))),this._parser.registerEscHandler({intermediates:"-",final:W},(()=>this.selectCharset("-"+W))),this._parser.registerEscHandler({intermediates:".",final:W},(()=>this.selectCharset("."+W))),this._parser.registerEscHandler({intermediates:"/",final:W},(()=>this.selectCharset("/"+W)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((W=>(this._logService.error("Parsing error: ",W),W))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new z.DcsHandler(((W,ae)=>this.requestStatusString(W,ae))))}_preserveStack(P,L,H,q){this._parseStack.paused=!0,this._parseStack.cursorStartX=P,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=H,this._parseStack.position=q}_logSlowResolvingAsync(P){this._logService.logLevel<=E.LogLevelEnum.WARN&&Promise.race([P,new Promise(((L,H)=>setTimeout((()=>H("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(P,L){let H,q=this._activeBuffer.x,U=this._activeBuffer.y,oe=0;const ie=this._parseStack.paused;if(ie){if(H=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(H),H;q=this._parseStack.cursorStartX,U=this._parseStack.cursorStartY,this._parseStack.paused=!1,P.length>D&&(oe=this._parseStack.position+D)}if(this._logService.logLevel<=E.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof P=="string"?` "${P}"`:` "${Array.prototype.map.call(P,(W=>String.fromCharCode(W))).join("")}"`),typeof P=="string"?P.split("").map((W=>W.charCodeAt(0))):P),this._parseBuffer.lengthD)for(let W=oe;W0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ae);let me=this._parser.precedingJoinState;for(let be=L;bece){if(re){const Me=le;let Fe=this._activeBuffer.x-Xe;for(this._activeBuffer.x=Xe,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Xe>0&&le instanceof v.BufferLine&&le.copyCellsFrom(Me,Fe,0,Xe,!1);Fe=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}else if(W&&(le.insertCells(this._activeBuffer.x,U-Xe,this._activeBuffer.getNullCell(ae)),le.getWidth(ce-1)===2&&le.setCellFromCodepoint(ce-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,ae)),le.setCellFromCodepoint(this._activeBuffer.x++,q,U,ae),U>0)for(;--U;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}this._parser.precedingJoinState=me,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(P,L){return P.final!=="t"||P.prefix||P.intermediates?this._parser.registerCsiHandler(P,L):this._parser.registerCsiHandler(P,(H=>!I(H.params[0],this._optionsService.rawOptions.windowOptions)||L(H)))}registerDcsHandler(P,L){return this._parser.registerDcsHandler(P,new z.DcsHandler(L))}registerEscHandler(P,L){return this._parser.registerEscHandler(P,L)}registerOscHandler(P,L){return this._parser.registerOscHandler(P,new A.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var P;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&P.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const P=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-P),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(P=this._bufferService.cols-1){this._activeBuffer.x=Math.min(P,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(P,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=P,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=P,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(P,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+P,this._activeBuffer.y+L)}cursorUp(P){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,P.params[0]||1)):this._moveCursor(0,-(P.params[0]||1)),!0}cursorDown(P){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,P.params[0]||1)):this._moveCursor(0,P.params[0]||1),!0}cursorForward(P){return this._moveCursor(P.params[0]||1,0),!0}cursorBackward(P){return this._moveCursor(-(P.params[0]||1),0),!0}cursorNextLine(P){return this.cursorDown(P),this._activeBuffer.x=0,!0}cursorPrecedingLine(P){return this.cursorUp(P),this._activeBuffer.x=0,!0}cursorCharAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(P){return this._setCursor(P.length>=2?(P.params[1]||1)-1:0,(P.params[0]||1)-1),!0}charPosAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(P){return this._moveCursor(P.params[0]||1,0),!0}linePosAbsolute(P){return this._setCursor(this._activeBuffer.x,(P.params[0]||1)-1),!0}vPositionRelative(P){return this._moveCursor(0,P.params[0]||1),!0}hVPosition(P){return this.cursorPosition(P),!0}tabClear(P){const L=P.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(P){const L=P.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(P,L,H,q=!1,U=!1){const oe=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);oe.replaceCells(L,H,this._activeBuffer.getNullCell(this._eraseAttrData()),U),q&&(oe.isWrapped=!1)}_resetBufferLine(P,L=!1){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);H&&(H.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+P),H.isWrapped=!1)}eraseInDisplay(P,L=!1){let H;switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:for(H=this._activeBuffer.y,this._dirtyRowTracker.markDirty(H),this._eraseInBufferLine(H++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);H=this._bufferService.cols&&(this._activeBuffer.lines.get(H+1).isWrapped=!1);H--;)this._resetBufferLine(H,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(H=this._bufferService.rows,this._dirtyRowTracker.markDirty(H-1);H--;)this._resetBufferLine(H,L);this._dirtyRowTracker.markDirty(0);break;case 3:const q=this._activeBuffer.lines.length-this._bufferService.rows;q>0&&(this._activeBuffer.lines.trimStart(q),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-q,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-q,0),this._onScroll.fire(0))}return!0}eraseInLine(P,L=!1){switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(P){this._restrictCursor();let L=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let re=ce;for(let W=1;W0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(P){return P.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(P.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.C0.ESC+"[>83;40003;0c")),!0}_is(P){return(this._optionsService.rawOptions.termName+"").indexOf(P)===0}setMode(P){for(let L=0;LBe?1:2,me=P.params[0];return be=me,Se=L?me===2?4:me===4?le(oe.modes.insertMode):me===12?3:me===20?le(ae.convertEol):0:me===1?le(H.applicationCursorKeys):me===3?ae.windowOptions.setWinLines?ce===80?2:ce===132?1:0:0:me===6?le(H.origin):me===7?le(H.wraparound):me===8?3:me===9?le(q==="X10"):me===12?le(ae.cursorBlink):me===25?le(!oe.isCursorHidden):me===45?le(H.reverseWraparound):me===66?le(H.applicationKeypad):me===67?4:me===1e3?le(q==="VT200"):me===1002?le(q==="DRAG"):me===1003?le(q==="ANY"):me===1004?le(H.sendFocus):me===1005?4:me===1006?le(U==="SGR"):me===1015?4:me===1016?le(U==="SGR_PIXELS"):me===1048?1:me===47||me===1047||me===1049?le(re===W):me===2004?le(H.bracketedPasteMode):0,oe.triggerDataEvent(`${_.C0.ESC}[${L?"":"?"}${be};${Se}$y`),!0;var be,Se}_updateAttrColor(P,L,H,q,U){return L===2?(P|=50331648,P&=-16777216,P|=S.AttributeData.fromColorRGB([H,q,U])):L===5&&(P&=-50331904,P|=33554432|255&H),P}_extractColor(P,L,H){const q=[0,0,-1,0,0,0];let U=0,oe=0;do{if(q[oe+U]=P.params[L+oe],P.hasSubParams(L+oe)){const ie=P.getSubParams(L+oe);let ce=0;do q[1]===5&&(U=1),q[oe+ce+1+U]=ie[ce];while(++ce=2||q[1]===2&&oe+U>=5)break;q[1]&&(U=1)}while(++oe+L5)&&(P=1),L.extended.underlineStyle=P,L.fg|=268435456,P===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(P){P.fg=v.DEFAULT_ATTR_DATA.fg,P.bg=v.DEFAULT_ATTR_DATA.bg,P.extended=P.extended.clone(),P.extended.underlineStyle=0,P.extended.underlineColor&=-67108864,P.updateExtended()}charAttributes(P){if(P.length===1&&P.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=P.length;let H;const q=this._curAttrData;for(let U=0;U=30&&H<=37?(q.fg&=-50331904,q.fg|=16777216|H-30):H>=40&&H<=47?(q.bg&=-50331904,q.bg|=16777216|H-40):H>=90&&H<=97?(q.fg&=-50331904,q.fg|=16777224|H-90):H>=100&&H<=107?(q.bg&=-50331904,q.bg|=16777224|H-100):H===0?this._processSGR0(q):H===1?q.fg|=134217728:H===3?q.bg|=67108864:H===4?(q.fg|=268435456,this._processUnderline(P.hasSubParams(U)?P.getSubParams(U)[0]:1,q)):H===5?q.fg|=536870912:H===7?q.fg|=67108864:H===8?q.fg|=1073741824:H===9?q.fg|=2147483648:H===2?q.bg|=134217728:H===21?this._processUnderline(2,q):H===22?(q.fg&=-134217729,q.bg&=-134217729):H===23?q.bg&=-67108865:H===24?(q.fg&=-268435457,this._processUnderline(0,q)):H===25?q.fg&=-536870913:H===27?q.fg&=-67108865:H===28?q.fg&=-1073741825:H===29?q.fg&=2147483647:H===39?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):H===49?(q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):H===38||H===48||H===58?U+=this._extractColor(P,U,q):H===53?q.bg|=1073741824:H===55?q.bg&=-1073741825:H===59?(q.extended=q.extended.clone(),q.extended.underlineColor=-1,q.updateExtended()):H===100?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",H);return!0}deviceStatus(P){switch(P.params[0]){case 5:this._coreService.triggerDataEvent(`${_.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,H=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[${L};${H}R`)}return!0}deviceStatusPrivate(P){if(P.params[0]===6){const L=this._activeBuffer.y+1,H=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[?${L};${H}R`)}return!0}softReset(P){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(P){const L=P.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const H=L%2==1;return this._optionsService.options.cursorBlink=H,!0}setScrollRegion(P){const L=P.params[0]||1;let H;return(P.length<2||(H=P.params[1])>this._bufferService.rows||H===0)&&(H=this._bufferService.rows),H>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=H-1,this._setCursor(0,0)),!0}windowOptions(P){if(!I(P.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=P.length>1?P.params[1]:0;switch(P.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(G.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(G.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${_.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(P){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(P){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(P){return this._windowTitle=P,this._onTitleChange.fire(P),!0}setIconName(P){return this._iconName=P,!0}setOrReportIndexedColor(P){const L=[],H=P.split(";");for(;H.length>1;){const q=H.shift(),U=H.shift();if(/^\d+$/.exec(q)){const oe=parseInt(q);if(J(oe))if(U==="?")L.push({type:0,index:oe});else{const ie=(0,M.parseColor)(U);ie&&L.push({type:1,index:oe,color:ie})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(P){const L=P.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(P,L){this._getCurrentLinkId()&&this._finishHyperlink();const H=P.split(":");let q;const U=H.findIndex((oe=>oe.startsWith("id=")));return U!==-1&&(q=H[U].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:q,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(P,L){const H=P.split(";");for(let q=0;q=this._specialColors.length);++q,++L)if(H[q]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const U=(0,M.parseColor)(H[q]);U&&this._onColor.fire([{type:1,index:this._specialColors[L],color:U}])}return!0}setOrReportFgColor(P){return this._setOrReportSpecialColor(P,0)}setOrReportBgColor(P){return this._setOrReportSpecialColor(P,1)}setOrReportCursorColor(P){return this._setOrReportSpecialColor(P,2)}restoreIndexedColor(P){if(!P)return this._onColor.fire([{type:2}]),!0;const L=[],H=P.split(";");for(let q=0;q=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const P=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,P,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(P){return this._charsetService.setgLevel(P),!0}screenAlignmentPattern(){const P=new y.CellData;P.content=4194373,P.fg=this._curAttrData.fg,P.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${_.C0.ESC}${U}${_.C0.ESC}\\`),!0))(P==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:P==='"p'?'P1$r61;1"p':P==="r"?`P1$r${H.scrollTop+1};${H.scrollBottom+1}r`:P==="m"?"P1$r0m":P===" q"?`P1$r${{block:2,underline:4,bar:6}[q.cursorStyle]-(q.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(P,L){this._dirtyRowTracker.markRangeDirty(P,L)}}i.InputHandler=Q;let K=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){eethis.end&&(this.end=ee)}markRangeDirty(ee,P){ee>P&&(F=ee,ee=P,P=F),eethis.end&&(this.end=P)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(ee){return 0<=ee&&ee<256}K=u([d(0,E.IBufferService)],K)},844:(a,i)=>{function c(u){for(const d of u)d.dispose();u.length=0}Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.toDisposable=i.MutableDisposable=i.Disposable=void 0,i.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const d=this._disposables.indexOf(u);d!==-1&&this._disposables.splice(d,1)}},i.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var d;this._isDisposed||u===this._value||((d=this._value)==null||d.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},i.toDisposable=function(u){return{dispose:u}},i.disposeArray=c,i.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(d,_,p){this._data[d]||(this._data[d]={}),this._data[d][_]=p}get(d,_){return this._data[d]?this._data[d][_]:void 0}clear(){this._data={}}}i.TwoKeyMap=c,i.FourKeyMap=class{constructor(){this._data=new c}set(u,d,_,p,m){this._data.get(u,d)||this._data.set(u,d,new c),this._data.get(u,d).set(_,p,m)}get(u,d,_,p){var m;return(m=this._data.get(u,d))==null?void 0:m.get(_,p)}clear(){this._data.clear()}}},6114:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.isChromeOS=i.isLinux=i.isWindows=i.isIphone=i.isIpad=i.isMac=i.getSafariVersion=i.isSafari=i.isLegacyEdge=i.isFirefox=i.isNode=void 0,i.isNode=typeof process<"u"&&"title"in process;const c=i.isNode?"node":navigator.userAgent,u=i.isNode?"node":navigator.platform;i.isFirefox=c.includes("Firefox"),i.isLegacyEdge=c.includes("Edge"),i.isSafari=/^((?!chrome|android).)*safari/i.test(c),i.getSafariVersion=function(){if(!i.isSafari)return 0;const d=c.match(/Version\/(\d+)/);return d===null||d.length<2?0:parseInt(d[1])},i.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),i.isIpad=u==="iPad",i.isIphone=u==="iPhone",i.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),i.isLinux=u.indexOf("Linux")>=0,i.isChromeOS=/\bCrOS\b/.test(c)},6106:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SortedList=void 0;let c=0;i.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const d=this._getKey(u);if(d===void 0||(c=this._search(d),c===-1)||this._getKey(this._array[c])!==d)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===u))do d(this._array[c]);while(++c=d;){let p=d+_>>1;const m=this._getKey(this._array[p]);if(m>u)_=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}d=p+1}}return d}}},7226:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DebouncedIdleTask=i.IdleTaskQueue=i.PriorityTaskQueue=void 0;const u=c(6114);class d{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-k))}ms`),void this._start();v=b}this.clear()}}class _ extends d{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const k=Date.now()+m;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}i.PriorityTaskQueue=_,i.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends d{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:_,i.DebouncedIdleTask=class{constructor(){this._queue=new i.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.updateWindowsModeWrappedState=void 0;const u=c(643);i.updateWindowsModeWrappedState=function(d){const _=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),p=_==null?void 0:_.get(d.cols-1),m=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);m&&p&&(m.isWrapped=p[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&p[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ExtendedAttrs=i.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(_){return[_>>>16&255,_>>>8&255,255&_]}static fromColorRGB(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]}clone(){const _=new c;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}i.AttributeData=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(_){this._ext=_}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(_){this._ext&=-469762049,this._ext|=_<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(_){this._ext&=-67108864,this._ext|=67108863&_}get urlId(){return this._urlId}set urlId(_){this._urlId=_}get underlineVariantOffset(){const _=(3758096384&this._ext)>>29;return _<0?4294967288^_:_}set underlineVariantOffset(_){this._ext&=536870911,this._ext|=_<<29&3758096384}constructor(_=0,p=0){this._ext=0,this._urlId=0,this._ext=_,this._urlId=p}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}i.ExtendedAttrs=u},9092:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Buffer=i.MAX_BUFFER_SIZE=void 0;const u=c(6349),d=c(7226),_=c(3734),p=c(8437),m=c(4634),k=c(511),w=c(643),v=c(4863),b=c(7116);i.MAX_BUFFER_SIZE=4294967295,i.Buffer=class{constructor(x,y,S){this._hasScrollback=x,this._optionsService=y,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=k.CellData.fromCharData([0,w.NULL_CELL_CHAR,w.NULL_CELL_WIDTH,w.NULL_CELL_CODE]),this._whitespaceCell=k.CellData.fromCharData([0,w.WHITESPACE_CELL_CHAR,w.WHITESPACE_CELL_WIDTH,w.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new d.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new _.ExtendedAttrs),this._nullCell}getWhitespaceCell(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new _.ExtendedAttrs),this._whitespaceCell}getBlankLine(x,y){return new p.BufferLine(this._bufferService.cols,this.getNullCell(x),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const x=this.ybase+this.y-this.ydisp;return x>=0&&xi.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:y}fillViewportRows(x){if(this.lines.length===0){x===void 0&&(x=p.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(x))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(x,y){const S=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=0;const N=this._getCorrectBufferLength(y);if(N>this.lines.maxLength&&(this.lines.maxLength=N),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(x,S)));else for(let z=this._rows;z>y;z--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(N0&&(this.lines.trimStart(z),this.ybase=Math.max(this.ybase-z,0),this.ydisp=Math.max(this.ydisp-z,0),this.savedY=Math.max(this.savedY-z,0)),this.lines.maxLength=N}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,y-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(x,y),this._cols>x))for(let A=0;A.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let x=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,x=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return x}get _isReflowEnabled(){const x=this._optionsService.rawOptions.windowsPty;return x&&x.buildNumber?this._hasScrollback&&x.backend==="conpty"&&x.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(x,y){this._cols!==x&&(x>this._cols?this._reflowLarger(x,y):this._reflowSmaller(x,y))}_reflowLarger(x,y){const S=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(S.length>0){const E=(0,m.reflowLargerCreateNewLayout)(this.lines,S);(0,m.reflowLargerApplyNewLayout)(this.lines,E.layout),this._reflowLargerAdjustViewport(x,y,E.countRemoved)}}_reflowLargerAdjustViewport(x,y,S){const E=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=S;for(;N-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;A--){let z=this.lines.get(A);if(!z||!z.isWrapped&&z.getTrimmedLength()<=x)continue;const M=[z];for(;z.isWrapped&&A>0;)z=this.lines.get(--A),M.unshift(z);const $=this.ybase+this.y;if($>=A&&$0&&(E.push({start:A+M.length+N,newLines:Q}),N+=Q.length),M.push(...Q);let K=I.length-1,J=I[K];J===0&&(K--,J=I[K]);let ee=M.length-G-1,P=D;for(;ee>=0;){const H=Math.min(P,J);if(M[K]===void 0)break;if(M[K].copyCellsFrom(M[ee],P-H,J-H,H,!0),J-=H,J===0&&(K--,J=I[K]),P-=H,P===0){ee--;const q=Math.max(ee,0);P=(0,m.getWrappedLineTrimmedLength)(M,q,this._cols)}}for(let H=0;H0;)this.ybase===0?this.y0){const A=[],z=[];for(let K=0;K=0;K--)if(I&&I.start>$+G){for(let J=I.newLines.length-1;J>=0;J--)this.lines.set(K--,I.newLines[J]);K++,A.push({index:$+1,amount:I.newLines.length}),G+=I.newLines.length,I=E[++D]}else this.lines.set(K,z[$--]);let F=0;for(let K=A.length-1;K>=0;K--)A[K].index+=F,this.lines.onInsertEmitter.fire(A[K]),F+=A[K].amount;const Q=Math.max(0,M+N-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(x,y,S=0,E){const N=this.lines.get(x);return N?N.translateToString(y,S,E):""}getWrappedRangeForLine(x){let y=x,S=x;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;S+10;);return x>=this._cols?this._cols-1:x<0?0:x}nextStop(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x=this._cols?this._cols-1:x<0?0:x}clearMarkers(x){this._isClearing=!0;for(let y=0;y{y.line-=S,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((S=>{y.line>=S.index&&(y.line+=S.amount)}))),y.register(this.lines.onDelete((S=>{y.line>=S.index&&y.lineS.index&&(y.line-=S.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(x){this._isClearing||this.markers.splice(this.markers.indexOf(x),1)}}},8437:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLine=i.DEFAULT_ATTR_DATA=void 0;const u=c(3734),d=c(511),_=c(643),p=c(482);i.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class k{constructor(v,b,x=!1){this.isWrapped=x,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const y=b||d.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]);for(let S=0;S>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):x]}set(v,b){this._data[3*v+1]=b[_.CHAR_DATA_ATTR_INDEX],b[_.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[_.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,x,y){268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=b|x<<22,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}addCodepointToCell(v,b,x){let y=this._data[3*v+0];2097152&y?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&y?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&y)+(0,p.stringFromCodePoint)(b),y&=-2097152,y|=2097152):y=b|4194304,x&&(y&=-12582913,y|=x<<22),this._data[3*v+0]=y}insertCells(v,b,x){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,x),b=0;--S)this.setCell(v+b+S,this.loadCell(v+S,y));for(let S=0;Sthis.length){if(this._data.buffer.byteLength>=4*x)this._data=new Uint32Array(this._data.buffer,0,x);else{const y=new Uint32Array(x);y.set(this._data),this._data=y}for(let y=this.length;y=v&&delete this._combined[N]}const S=Object.keys(this._extendedAttrs);for(let E=0;E=v&&delete this._extendedAttrs[N]}}return this.length=v,4*x*2=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,b,x,y,S){const E=v._data;if(S)for(let A=y-1;A>=0;A--){for(let z=0;z<3;z++)this._data[3*(x+A)+z]=E[3*(b+A)+z];268435456&E[3*(b+A)+2]&&(this._extendedAttrs[x+A]=v._extendedAttrs[b+A])}else for(let A=0;A=b&&(this._combined[z-b+x]=v._combined[z])}}translateToString(v,b,x,y){b=b??0,x=x??this.length,v&&(x=Math.min(x,this.getTrimmedLength())),y&&(y.length=0);let S="";for(;b>22||1}return y&&y.push(b),S}}i.BufferLine=k},4841:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.getRangeLength=void 0,i.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(a,i)=>{function c(u,d,_){if(d===u.length-1)return u[d].getTrimmedLength();const p=!u[d].hasContent(_-1)&&u[d].getWidth(_-1)===1,m=u[d+1].getWidth(0)===2;return p&&m?_-1:_}Object.defineProperty(i,"__esModule",{value:!0}),i.getWrappedLineTrimmedLength=i.reflowSmallerGetNewLineLengths=i.reflowLargerApplyNewLayout=i.reflowLargerCreateNewLayout=i.reflowLargerGetLinesToRemove=void 0,i.reflowLargerGetLinesToRemove=function(u,d,_,p,m){const k=[];for(let w=0;w=w&&p0&&(z>y||x[z].getTrimmedLength()===0);z--)A++;A>0&&(k.push(w+x.length-A),k.push(A)),w+=x.length-1}return k},i.reflowLargerCreateNewLayout=function(u,d){const _=[];let p=0,m=d[p],k=0;for(let w=0;wc(u,x,d))).reduce(((b,x)=>b+x));let k=0,w=0,v=0;for(;vb&&(k-=b,w++);const x=u[w].getWidth(k-1)===2;x&&k--;const y=x?_-1:_;p.push(y),v+=y}return p},i.getWrappedLineTrimmedLength=c},5295:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferSet=void 0;const u=c(8460),d=c(844),_=c(9092);class p extends d.Disposable{constructor(k,w){super(),this._optionsService=k,this._bufferService=w,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(k){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(k),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(k,w){this._normal.resize(k,w),this._alt.resize(k,w),this.setupTabStops(k)}setupTabStops(k){this._normal.setupTabStops(k),this._alt.setupTabStops(k)}}i.BufferSet=p},511:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CellData=void 0;const u=c(482),d=c(643),_=c(3734);class p extends _.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new _.ExtendedAttrs,this.combinedData=""}static fromCharData(k){const w=new p;return w.setFromCharData(k),w}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(k){this.fg=k[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let w=!1;if(k[d.CHAR_DATA_CHAR_INDEX].length>2)w=!0;else if(k[d.CHAR_DATA_CHAR_INDEX].length===2){const v=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|k[d.CHAR_DATA_WIDTH_INDEX]<<22:w=!0}else w=!0}else this.content=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[d.CHAR_DATA_WIDTH_INDEX]<<22;w&&(this.combinedData=k[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.CellData=p},643:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WHITESPACE_CELL_CODE=i.WHITESPACE_CELL_WIDTH=i.WHITESPACE_CELL_CHAR=i.NULL_CELL_CODE=i.NULL_CELL_WIDTH=i.NULL_CELL_CHAR=i.CHAR_DATA_CODE_INDEX=i.CHAR_DATA_WIDTH_INDEX=i.CHAR_DATA_CHAR_INDEX=i.CHAR_DATA_ATTR_INDEX=i.DEFAULT_EXT=i.DEFAULT_ATTR=i.DEFAULT_COLOR=void 0,i.DEFAULT_COLOR=0,i.DEFAULT_ATTR=256|i.DEFAULT_COLOR<<9,i.DEFAULT_EXT=0,i.CHAR_DATA_ATTR_INDEX=0,i.CHAR_DATA_CHAR_INDEX=1,i.CHAR_DATA_WIDTH_INDEX=2,i.CHAR_DATA_CODE_INDEX=3,i.NULL_CELL_CHAR="",i.NULL_CELL_WIDTH=1,i.NULL_CELL_CODE=0,i.WHITESPACE_CELL_CHAR=" ",i.WHITESPACE_CELL_WIDTH=1,i.WHITESPACE_CELL_CODE=32},4863:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Marker=void 0;const u=c(8460),d=c(844);class _{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=_._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,d.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}i.Marker=_,_._nextId=1},7116:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CHARSET=i.CHARSETS=void 0,i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=void 0,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,i)=>{var c,u,d;Object.defineProperty(i,"__esModule",{value:!0}),i.C1_ESCAPED=i.C1=i.C0=void 0,(function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=` +`,_.VT="\v",_.FF="\f",_.CR="\r",_.SO="",_.SI="",_.DLE="",_.DC1="",_.DC2="",_.DC3="",_.DC4="",_.NAK="",_.SYN="",_.ETB="",_.CAN="",_.EM="",_.SUB="",_.ESC="\x1B",_.FS="",_.GS="",_.RS="",_.US="",_.SP=" ",_.DEL=""})(c||(i.C0=c={})),(function(_){_.PAD="€",_.HOP="",_.BPH="‚",_.NBH="ƒ",_.IND="„",_.NEL="…",_.SSA="†",_.ESA="‡",_.HTS="ˆ",_.HTJ="‰",_.VTS="Š",_.PLD="‹",_.PLU="Œ",_.RI="",_.SS2="Ž",_.SS3="",_.DCS="",_.PU1="‘",_.PU2="’",_.STS="“",_.CCH="”",_.MW="•",_.SPA="–",_.EPA="—",_.SOS="˜",_.SGCI="™",_.SCI="š",_.CSI="›",_.ST="œ",_.OSC="",_.PM="ž",_.APC="Ÿ"})(u||(i.C1=u={})),(function(_){_.ST=`${c.ESC}\\`})(d||(i.C1_ESCAPED=d={}))},7399:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.evaluateKeyboardEvent=void 0;const u=c(2584),d={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};i.evaluateKeyboardEvent=function(_,p,m,k){const w={type:0,cancel:!1,key:void 0},v=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?w.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?w.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?w.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(w.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:w.key=_.ctrlKey?"\b":u.C0.DEL,_.altKey&&(w.key=u.C0.ESC+w.key);break;case 9:if(_.shiftKey){w.key=u.C0.ESC+"[Z";break}w.key=u.C0.HT,w.cancel=!0;break;case 13:w.key=_.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,w.cancel=!0;break;case 27:w.key=u.C0.ESC,_.altKey&&(w.key=u.C0.ESC+u.C0.ESC),w.cancel=!0;break;case 37:if(_.metaKey)break;v?(w.key=u.C0.ESC+"[1;"+(v+1)+"D",w.key===u.C0.ESC+"[1;3D"&&(w.key=u.C0.ESC+(m?"b":"[1;5D"))):w.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(_.metaKey)break;v?(w.key=u.C0.ESC+"[1;"+(v+1)+"C",w.key===u.C0.ESC+"[1;3C"&&(w.key=u.C0.ESC+(m?"f":"[1;5C"))):w.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(_.metaKey)break;v?(w.key=u.C0.ESC+"[1;"+(v+1)+"A",m||w.key!==u.C0.ESC+"[1;3A"||(w.key=u.C0.ESC+"[1;5A")):w.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(_.metaKey)break;v?(w.key=u.C0.ESC+"[1;"+(v+1)+"B",m||w.key!==u.C0.ESC+"[1;3B"||(w.key=u.C0.ESC+"[1;5B")):w.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(w.key=u.C0.ESC+"[2~");break;case 46:w.key=v?u.C0.ESC+"[3;"+(v+1)+"~":u.C0.ESC+"[3~";break;case 36:w.key=v?u.C0.ESC+"[1;"+(v+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:w.key=v?u.C0.ESC+"[1;"+(v+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:_.shiftKey?w.type=2:_.ctrlKey?w.key=u.C0.ESC+"[5;"+(v+1)+"~":w.key=u.C0.ESC+"[5~";break;case 34:_.shiftKey?w.type=3:_.ctrlKey?w.key=u.C0.ESC+"[6;"+(v+1)+"~":w.key=u.C0.ESC+"[6~";break;case 112:w.key=v?u.C0.ESC+"[1;"+(v+1)+"P":u.C0.ESC+"OP";break;case 113:w.key=v?u.C0.ESC+"[1;"+(v+1)+"Q":u.C0.ESC+"OQ";break;case 114:w.key=v?u.C0.ESC+"[1;"+(v+1)+"R":u.C0.ESC+"OR";break;case 115:w.key=v?u.C0.ESC+"[1;"+(v+1)+"S":u.C0.ESC+"OS";break;case 116:w.key=v?u.C0.ESC+"[15;"+(v+1)+"~":u.C0.ESC+"[15~";break;case 117:w.key=v?u.C0.ESC+"[17;"+(v+1)+"~":u.C0.ESC+"[17~";break;case 118:w.key=v?u.C0.ESC+"[18;"+(v+1)+"~":u.C0.ESC+"[18~";break;case 119:w.key=v?u.C0.ESC+"[19;"+(v+1)+"~":u.C0.ESC+"[19~";break;case 120:w.key=v?u.C0.ESC+"[20;"+(v+1)+"~":u.C0.ESC+"[20~";break;case 121:w.key=v?u.C0.ESC+"[21;"+(v+1)+"~":u.C0.ESC+"[21~";break;case 122:w.key=v?u.C0.ESC+"[23;"+(v+1)+"~":u.C0.ESC+"[23~";break;case 123:w.key=v?u.C0.ESC+"[24;"+(v+1)+"~":u.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(m&&!k||!_.altKey||_.metaKey)!m||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?w.key=_.key:_.key&&_.ctrlKey&&(_.key==="_"&&(w.key=u.C0.US),_.key==="@"&&(w.key=u.C0.NUL)):_.keyCode===65&&(w.type=1);else{const b=d[_.keyCode],x=b==null?void 0:b[_.shiftKey?1:0];if(x)w.key=u.C0.ESC+x;else if(_.keyCode>=65&&_.keyCode<=90){const y=_.ctrlKey?_.keyCode-64:_.keyCode+32;let S=String.fromCharCode(y);_.shiftKey&&(S=S.toUpperCase()),w.key=u.C0.ESC+S}else if(_.keyCode===32)w.key=u.C0.ESC+(_.ctrlKey?u.C0.NUL:" ");else if(_.key==="Dead"&&_.code.startsWith("Key")){let y=_.code.slice(3,4);_.shiftKey||(y=y.toLowerCase()),w.key=u.C0.ESC+y,w.cancel=!0}}else _.keyCode>=65&&_.keyCode<=90?w.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?w.key=u.C0.NUL:_.keyCode>=51&&_.keyCode<=55?w.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?w.key=u.C0.DEL:_.keyCode===219?w.key=u.C0.ESC:_.keyCode===220?w.key=u.C0.FS:_.keyCode===221&&(w.key=u.C0.GS)}return w}},482:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Utf8ToUtf32=i.StringToUtf32=i.utf32ToString=i.stringFromCodePoint=void 0,i.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},i.utf32ToString=function(c,u=0,d=c.length){let _="";for(let p=u;p65535?(m-=65536,_+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):_+=String.fromCharCode(m)}return _},i.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const d=c.length;if(!d)return 0;let _=0,p=0;if(this._interim){const m=c.charCodeAt(p++);56320<=m&&m<=57343?u[_++]=1024*(this._interim-55296)+m-56320+65536:(u[_++]=this._interim,u[_++]=m),this._interim=0}for(let m=p;m=d)return this._interim=k,_;const w=c.charCodeAt(m);56320<=w&&w<=57343?u[_++]=1024*(k-55296)+w-56320+65536:(u[_++]=k,u[_++]=w)}else k!==65279&&(u[_++]=k)}return _}},i.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const d=c.length;if(!d)return 0;let _,p,m,k,w=0,v=0,b=0;if(this.interim[0]){let S=!1,E=this.interim[0];E&=(224&E)==192?31:(240&E)==224?15:7;let N,A=0;for(;(N=63&this.interim[++A])&&A<4;)E<<=6,E|=N;const z=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=z-A;for(;b=d)return 0;if(N=c[b++],(192&N)!=128){b--,S=!0;break}this.interim[A++]=N,E<<=6,E|=63&N}S||(z===2?E<128?b--:u[w++]=E:z===3?E<2048||E>=55296&&E<=57343||E===65279||(u[w++]=E):E<65536||E>1114111||(u[w++]=E)),this.interim.fill(0)}const x=d-4;let y=b;for(;y=d)return this.interim[0]=_,w;if(p=c[y++],(192&p)!=128){y--;continue}if(v=(31&_)<<6|63&p,v<128){y--;continue}u[w++]=v}else if((240&_)==224){if(y>=d)return this.interim[0]=_,w;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,w;if(m=c[y++],(192&m)!=128){y--;continue}if(v=(15&_)<<12|(63&p)<<6|63&m,v<2048||v>=55296&&v<=57343||v===65279)continue;u[w++]=v}else if((248&_)==240){if(y>=d)return this.interim[0]=_,w;if(p=c[y++],(192&p)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,w;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=d)return this.interim[0]=_,this.interim[1]=p,this.interim[2]=m,w;if(k=c[y++],(192&k)!=128){y--;continue}if(v=(7&_)<<18|(63&p)<<12|(63&m)<<6|63&k,v<65536||v>1114111)continue;u[w++]=v}}return w}}},225:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;const u=c(1480),d=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],_=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;i.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let m=0;mw[x][1])return!1;for(;x>=b;)if(v=b+x>>1,k>w[v][1])b=v+1;else{if(!(k=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,k){let w=this.wcwidth(m),v=w===0&&k!==0;if(v){const b=u.UnicodeService.extractWidth(k);b===0?v=!1:b>w&&(w=b)}return u.UnicodeService.createPropertyValue(0,w,v)}}},5981:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WriteBuffer=void 0;const u=c(8460),d=c(844);class _ extends d.Disposable{constructor(m){super(),this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(m,k){if(k!==void 0&&this._syncCalls>k)return void(this._syncCalls=0);if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let w;for(this._isSyncWriting=!0;w=this._writeBuffer.shift();){this._action(w);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(m,k){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(k),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(k)}_innerWrite(m=0,k=!0){const w=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],b=this._action(v,k);if(b){const y=S=>Date.now()-w>=12?setTimeout((()=>this._innerWrite(0,S))):this._innerWrite(w,S);return void b.catch((S=>(queueMicrotask((()=>{throw S})),Promise.resolve(!1)))).then(y)}const x=this._callbacks[this._bufferOffset];if(x&&x(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-w>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}i.WriteBuffer=_},5941:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.toRgbString=i.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function d(_,p){const m=_.toString(16),k=m.length<2?"0"+m:m;switch(p){case 4:return m[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}i.parseColor=function(_){if(!_)return;let p=_.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=c.exec(p);if(m){const k=m[1]?15:m[4]?255:m[7]?4095:65535;return[Math.round(parseInt(m[1]||m[4]||m[7]||m[10],16)/k*255),Math.round(parseInt(m[2]||m[5]||m[8]||m[11],16)/k*255),Math.round(parseInt(m[3]||m[6]||m[9]||m[12],16)/k*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),u.exec(p)&&[3,6,9,12].includes(p.length))){const m=p.length/3,k=[0,0,0];for(let w=0;w<3;++w){const v=parseInt(p.slice(m*w,m*w+m),16);k[w]=m===1?v<<4:m===2?v:m===3?v>>4:v>>8}return k}},i.toRgbString=function(_,p=16){const[m,k,w]=_;return`rgb:${d(m,p)}/${d(k,p)}/${d(w,p)}`}},5770:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.PAYLOAD_LIMIT=void 0,i.PAYLOAD_LIMIT=1e7},6351:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DcsHandler=i.DcsParser=void 0;const u=c(482),d=c(8742),_=c(5770),p=[];i.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(k,w){this._handlers[k]===void 0&&(this._handlers[k]=[]);const v=this._handlers[k];return v.push(w),{dispose:()=>{const b=v.indexOf(w);b!==-1&&v.splice(b,1)}}}clearHandler(k){this._handlers[k]&&delete this._handlers[k]}setHandlerFallback(k){this._handlerFb=k}reset(){if(this._active.length)for(let k=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;k>=0;--k)this._active[k].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(k,w){if(this.reset(),this._ident=k,this._active=this._handlers[k]||p,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(w);else this._handlerFb(this._ident,"HOOK",w)}put(k,w,v){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(k,w,v);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(k,w,v))}unhook(k,w=!0){if(this._active.length){let v=!1,b=this._active.length-1,x=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=w,x=this._stack.fallThrough,this._stack.paused=!1),!x&&v===!1){for(;b>=0&&(v=this._active[b].unhook(k),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",k);this._active=p,this._ident=0}};const m=new d.Params;m.addParam(0),i.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=m,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():m,this._data="",this._hitLimit=!1}put(k,w,v){this._hitLimit||(this._data+=(0,u.utf32ToString)(k,w,v),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(k){let w=!1;if(this._hitLimit)w=!1;else if(k&&(w=this._handler(this._data,this._params),w instanceof Promise))return w.then((v=>(this._params=m,this._data="",this._hitLimit=!1,v)));return this._params=m,this._data="",this._hitLimit=!1,w}}},2015:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.EscapeSequenceParser=i.VT500_TRANSITION_TABLE=i.TransitionTable=void 0;const u=c(844),d=c(8742),_=c(6242),p=c(6351);class m{constructor(b){this.table=new Uint8Array(b)}setDefault(b,x){this.table.fill(b<<4|x)}add(b,x,y,S){this.table[x<<8|b]=y<<4|S}addMany(b,x,y,S){for(let E=0;Ez)),x=(A,z)=>b.slice(A,z),y=x(32,127),S=x(0,24);S.push(25),S.push.apply(S,x(28,32));const E=x(0,14);let N;for(N in v.setDefault(1,0),v.addMany(y,0,2,0),E)v.addMany([24,26,153,154],N,3,0),v.addMany(x(128,144),N,3,0),v.addMany(x(144,152),N,3,0),v.add(156,N,0,0),v.add(27,N,11,1),v.add(157,N,4,8),v.addMany([152,158,159],N,0,7),v.add(155,N,11,3),v.add(144,N,11,9);return v.addMany(S,0,3,0),v.addMany(S,1,3,1),v.add(127,1,0,1),v.addMany(S,8,0,8),v.addMany(S,3,3,3),v.add(127,3,0,3),v.addMany(S,4,3,4),v.add(127,4,0,4),v.addMany(S,6,3,6),v.addMany(S,5,3,5),v.add(127,5,0,5),v.addMany(S,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(y,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(x(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(y,7,0,7),v.addMany(S,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(x(64,127),3,7,0),v.addMany(x(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(x(48,60),4,8,4),v.addMany(x(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(x(32,64),6,0,6),v.add(127,6,0,6),v.addMany(x(64,127),6,0,0),v.addMany(x(32,48),3,9,5),v.addMany(x(32,48),5,9,5),v.addMany(x(48,64),5,0,6),v.addMany(x(64,127),5,7,0),v.addMany(x(32,48),4,9,5),v.addMany(x(32,48),1,9,2),v.addMany(x(32,48),2,9,2),v.addMany(x(48,127),2,10,0),v.addMany(x(48,80),1,10,0),v.addMany(x(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(x(96,127),1,10,0),v.add(80,1,11,9),v.addMany(S,9,0,9),v.add(127,9,0,9),v.addMany(x(28,32),9,0,9),v.addMany(x(32,48),9,9,12),v.addMany(x(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(S,11,0,11),v.addMany(x(32,128),11,0,11),v.addMany(x(28,32),11,0,11),v.addMany(S,10,0,10),v.add(127,10,0,10),v.addMany(x(28,32),10,0,10),v.addMany(x(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(x(32,48),10,9,12),v.addMany(S,12,0,12),v.add(127,12,0,12),v.addMany(x(28,32),12,0,12),v.addMany(x(32,48),12,9,12),v.addMany(x(48,64),12,0,11),v.addMany(x(64,127),12,12,13),v.addMany(x(64,127),10,12,13),v.addMany(x(64,127),9,12,13),v.addMany(S,13,13,13),v.addMany(y,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(k,0,2,0),v.add(k,8,5,8),v.add(k,6,0,6),v.add(k,11,0,11),v.add(k,13,13,13),v})();class w extends u.Disposable{constructor(b=i.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new d.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(x,y,S)=>{},this._executeHandlerFb=x=>{},this._csiHandlerFb=(x,y)=>{},this._escHandlerFb=x=>{},this._errorHandlerFb=x=>x,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new _.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,x=[64,126]){let y=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=b.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let E=0;EN||N>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=N}}if(b.final.length!==1)throw new Error("final must be a single byte");const S=b.final.charCodeAt(0);if(x[0]>S||S>x[1])throw new Error(`final must be in range ${x[0]} .. ${x[1]}`);return y<<=8,y|=S,y}identToString(b){const x=[];for(;b;)x.push(String.fromCharCode(255&b)),b>>=8;return x.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,x){const y=this._identifier(b,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const S=this._escHandlers[y];return S.push(x),{dispose:()=>{const E=S.indexOf(x);E!==-1&&S.splice(E,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,x){this._executeHandlers[b.charCodeAt(0)]=x}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,x){const y=this._identifier(b);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const S=this._csiHandlers[y];return S.push(x),{dispose:()=>{const E=S.indexOf(x);E!==-1&&S.splice(E,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,x){return this._dcsParser.registerHandler(this._identifier(b),x)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,x){return this._oscParser.registerHandler(b,x)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(b,x,y,S,E){this._parseStack.state=b,this._parseStack.handlers=x,this._parseStack.handlerPos=y,this._parseStack.transition=S,this._parseStack.chunkPos=E}parse(b,x,y){let S,E=0,N=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const z=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&M>-1){for(;M>=0&&(S=z[M](this._params),S!==!0);M--)if(S instanceof Promise)return this._parseStack.handlerPos=M,S}this._parseStack.handlers=[];break;case 4:if(y===!1&&M>-1){for(;M>=0&&(S=z[M](),S!==!0);M--)if(S instanceof Promise)return this._parseStack.handlerPos=M,S}this._parseStack.handlers=[];break;case 6:if(E=b[this._parseStack.chunkPos],S=this._dcsParser.unhook(E!==24&&E!==26,y),S)return S;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(E=b[this._parseStack.chunkPos],S=this._oscParser.end(E!==24&&E!==26,y),S)return S;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let z=A;z>4){case 2:for(let G=z+1;;++G){if(G>=x||(E=b[G])<32||E>126&&E=x||(E=b[G])<32||E>126&&E=x||(E=b[G])<32||E>126&&E=x||(E=b[G])<32||E>126&&E=0&&(S=M[$](this._params),S!==!0);$--)if(S instanceof Promise)return this._preserveStack(3,M,$,N,z),S;$<0&&this._csiHandlerFb(this._collect<<8|E,this._params),this.precedingJoinState=0;break;case 8:do switch(E){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(E-48)}while(++z47&&E<60);z--;break;case 9:this._collect<<=8,this._collect|=E;break;case 10:const D=this._escHandlers[this._collect<<8|E];let I=D?D.length-1:-1;for(;I>=0&&(S=D[I](),S!==!0);I--)if(S instanceof Promise)return this._preserveStack(4,D,I,N,z),S;I<0&&this._escHandlerFb(this._collect<<8|E),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|E,this._params);break;case 13:for(let G=z+1;;++G)if(G>=x||(E=b[G])===24||E===26||E===27||E>127&&E=x||(E=b[G])<32||E>127&&E{Object.defineProperty(i,"__esModule",{value:!0}),i.OscHandler=i.OscParser=void 0;const u=c(5770),d=c(482),_=[];i.OscParser=class{constructor(){this._state=0,this._active=_,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,m){this._handlers[p]===void 0&&(this._handlers[p]=[]);const k=this._handlers[p];return k.push(m),{dispose:()=>{const w=k.indexOf(m);w!==-1&&k.splice(w,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=_,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||_,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,m,k){if(this._active.length)for(let w=this._active.length-1;w>=0;w--)this._active[w].put(p,m,k);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(p,m,k))}start(){this.reset(),this._state=1}put(p,m,k){if(this._state!==3){if(this._state===1)for(;m0&&this._put(p,m,k)}}end(p,m=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let k=!1,w=this._active.length-1,v=!1;if(this._stack.paused&&(w=this._stack.loopPosition-1,k=m,v=this._stack.fallThrough,this._stack.paused=!1),!v&&k===!1){for(;w>=0&&(k=this._active[w].end(p),k!==!0);w--)if(k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!1,k;w--}for(;w>=0;w--)if(k=this._active[w].end(!1),k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!0,k}else this._handlerFb(this._id,"END",p);this._active=_,this._id=-1,this._state=0}}},i.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,m,k){this._hitLimit||(this._data+=(0,d.utf32ToString)(p,m,k),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let m=!1;if(this._hitLimit)m=!1;else if(p&&(m=this._handler(this._data),m instanceof Promise))return m.then((k=>(this._data="",this._hitLimit=!1,k)));return this._data="",this._hitLimit=!1,m}}},8742:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Params=void 0;const c=2147483647;class u{static fromArray(_){const p=new u;if(!_.length)return p;for(let m=Array.isArray(_[0])?1:0;m<_.length;++m){const k=_[m];if(Array.isArray(k))for(let w=0;w256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const _=new u(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_}toArray(){const _=[];for(let p=0;p>8,k=255&this._subParamsIdx[p];k-m>0&&_.push(Array.prototype.slice.call(this._subParams,m,k))}return _}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>c?c:_}}addSubParam(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>c?c:_,this._subParamsIdx[this.length-1]++}}hasSubParams(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0}getSubParams(_){const p=this._subParamsIdx[_]>>8,m=255&this._subParamsIdx[_];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const _={};for(let p=0;p>8,k=255&this._subParamsIdx[p];k-m>0&&(_[p]=this._subParams.slice(m,k))}return _}addDigit(_){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const m=this._digitIsSub?this._subParams:this.params,k=m[p-1];m[p-1]=~k?Math.min(10*k+_,c):_}}i.Params=u},5741:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AddonManager=void 0,i.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const d={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(d),u.dispose=()=>this._wrappedAddonDispose(d),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let d=0;d{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferApiView=void 0;const u=c(3785),d=c(511);i.BufferApiView=class{constructor(_,p){this._buffer=_,this.type=p}init(_){return this._buffer=_,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(_){const p=this._buffer.lines.get(_);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new d.CellData}}},3785:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLineApiView=void 0;const u=c(511);i.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,_){if(!(d<0||d>=this._line.length))return _?(this._line.loadCell(d,_),_):this._line.loadCell(d,new u.CellData)}translateToString(d,_,p){return this._line.translateToString(d,_,p)}}},8285:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferNamespaceApi=void 0;const u=c(8771),d=c(8460),_=c(844);class p extends _.Disposable{constructor(k){super(),this._core=k,this._onBufferChange=this.register(new d.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}i.BufferNamespaceApi=p},7975:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ParserApi=void 0,i.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,(d=>u(d.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((d,_)=>u(d,_.toArray())))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeApi=void 0,i.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(a,i,c){var u=this&&this.__decorate||function(v,b,x,y){var S,E=arguments.length,N=E<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(v,b,x,y);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(N=(E<3?S(N):E>3?S(b,x,N):S(b,x))||N);return E>3&&N&&Object.defineProperty(b,x,N),N},d=this&&this.__param||function(v,b){return function(x,y){b(x,y,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferService=i.MINIMUM_ROWS=i.MINIMUM_COLS=void 0;const _=c(8460),p=c(844),m=c(5295),k=c(2585);i.MINIMUM_COLS=2,i.MINIMUM_ROWS=1;let w=i.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,i.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,i.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(v,this))}resize(v,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const x=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===v.fg&&y.getBg(0)===v.bg||(y=x.getBlankLine(v,b),this._cachedBlankLine=y),y.isWrapped=b;const S=x.ybase+x.scrollTop,E=x.ybase+x.scrollBottom;if(x.scrollTop===0){const N=x.lines.isFull;E===x.lines.length-1?N?x.lines.recycle().copyFrom(y):x.lines.push(y.clone()):x.lines.splice(E+1,0,y.clone()),N?this.isUserScrolling&&(x.ydisp=Math.max(x.ydisp-1,0)):(x.ybase++,this.isUserScrolling||x.ydisp++)}else{const N=E-S+1;x.lines.shiftElements(S+1,N-1,-1),x.lines.set(E,y.clone())}this.isUserScrolling||(x.ydisp=x.ybase),this._onScroll.fire(x.ydisp)}scrollLines(v,b,x){const y=this.buffer;if(v<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else v+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const S=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+v,y.ybase),0),S!==y.ydisp&&(b||this._onScroll.fire(y.ydisp))}};i.BufferService=w=u([d(0,k.IOptionsService)],w)},7994:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CharsetService=void 0,i.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(a,i,c){var u=this&&this.__decorate||function(y,S,E,N){var A,z=arguments.length,M=z<3?S:N===null?N=Object.getOwnPropertyDescriptor(S,E):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,S,E,N);else for(var $=y.length-1;$>=0;$--)(A=y[$])&&(M=(z<3?A(M):z>3?A(S,E,M):A(S,E))||M);return z>3&&M&&Object.defineProperty(S,E,M),M},d=this&&this.__param||function(y,S){return function(E,N){S(E,N,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreMouseService=void 0;const _=c(2585),p=c(8460),m=c(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function w(y,S){let E=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(E|=64,E|=y.action):(E|=3&y.button,4&y.button&&(E|=64),8&y.button&&(E|=128),y.action===32?E|=32:y.action!==0||S||(E|=3)),E}const v=String.fromCharCode,b={DEFAULT:y=>{const S=[w(y,!1)+32,y.col+32,y.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${v(S[0])}${v(S[1])}${v(S[2])}`},SGR:y=>{const S=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${w(y,!0)};${y.col};${y.row}${S}`},SGR_PIXELS:y=>{const S=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${w(y,!0)};${y.x};${y.y}${S}`}};let x=i.CoreMouseService=class extends m.Disposable{constructor(y,S){super(),this._bufferService=y,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const E of Object.keys(k))this.addProtocol(E,k[E]);for(const E of Object.keys(b))this.addEncoding(E,b[E]);this.reset()}addProtocol(y,S){this._protocols[y]=S}addEncoding(y,S){this._encodings[y]=S}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const S=this._encodings[this._activeEncoding](y);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,S,E){if(E){if(y.x!==S.x||y.y!==S.y)return!1}else if(y.col!==S.col||y.row!==S.row)return!1;return y.button===S.button&&y.action===S.action&&y.ctrl===S.ctrl&&y.alt===S.alt&&y.shift===S.shift}};i.CoreMouseService=x=u([d(0,_.IBufferService),d(1,_.ICoreService)],x)},6975:function(a,i,c){var u=this&&this.__decorate||function(x,y,S,E){var N,A=arguments.length,z=A<3?y:E===null?E=Object.getOwnPropertyDescriptor(y,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,y,S,E);else for(var M=x.length-1;M>=0;M--)(N=x[M])&&(z=(A<3?N(z):A>3?N(y,S,z):N(y,S))||z);return A>3&&z&&Object.defineProperty(y,S,z),z},d=this&&this.__param||function(x,y){return function(S,E){y(S,E,x)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreService=void 0;const _=c(1439),p=c(8460),m=c(844),k=c(2585),w=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=i.CoreService=class extends m.Disposable{constructor(x,y,S){super(),this._bufferService=x,this._logService=y,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,_.clone)(w),this.decPrivateModes=(0,_.clone)(v)}reset(){this.modes=(0,_.clone)(w),this.decPrivateModes=(0,_.clone)(v)}triggerDataEvent(x,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${x}"`,(()=>x.split("").map((E=>E.charCodeAt(0))))),this._onData.fire(x)}triggerBinaryEvent(x){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${x}"`,(()=>x.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(x))}};i.CoreService=b=u([d(0,k.IBufferService),d(1,k.ILogService),d(2,k.IOptionsService)],b)},9074:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DecorationService=void 0;const u=c(8055),d=c(8460),_=c(844),p=c(6106);let m=0,k=0;class w extends _.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((x=>x==null?void 0:x.marker.line)),this._onDecorationRegistered=this.register(new d.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new d.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,_.toDisposable)((()=>this.reset())))}registerDecoration(x){if(x.marker.isDisposed)return;const y=new v(x);if(y){const S=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),S.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const x of this._decorations.values())x.dispose();this._decorations.clear()}*getDecorationsAtCell(x,y,S){let E=0,N=0;for(const A of this._decorations.getKeyIterator(y))E=A.options.x??0,N=E+(A.options.width??1),x>=E&&x{m=N.options.x??0,k=m+(N.options.width??1),x>=m&&x{Object.defineProperty(i,"__esModule",{value:!0}),i.InstantiationService=i.ServiceCollection=void 0;const u=c(2585),d=c(8343);class _{constructor(...m){this._entries=new Map;for(const[k,w]of m)this.set(k,w)}set(m,k){const w=this._entries.get(m);return this._entries.set(m,k),w}forEach(m){for(const[k,w]of this._entries.entries())m(k,w)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}i.ServiceCollection=_,i.InstantiationService=class{constructor(){this._services=new _,this._services.set(u.IInstantiationService,this)}setService(p,m){this._services.set(p,m)}getService(p){return this._services.get(p)}createInstance(p,...m){const k=(0,d.getServiceDependencies)(p).sort(((b,x)=>b.index-x.index)),w=[];for(const b of k){const x=this._services.get(b.id);if(!x)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${b.id}.`);w.push(x)}const v=k.length>0?k[0].index:m.length;if(m.length!==v)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${v+1} conflicts with ${m.length} static arguments`);return new p(...m,...w)}}},7866:function(a,i,c){var u=this&&this.__decorate||function(v,b,x,y){var S,E=arguments.length,N=E<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(v,b,x,y);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(N=(E<3?S(N):E>3?S(b,x,N):S(b,x))||N);return E>3&&N&&Object.defineProperty(b,x,N),N},d=this&&this.__param||function(v,b){return function(x,y){b(x,y,v)}};Object.defineProperty(i,"__esModule",{value:!0}),i.traceCall=i.setTraceLogger=i.LogService=void 0;const _=c(844),p=c(2585),m={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let k,w=i.LogService=class extends _.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),k=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let b=0;bJSON.stringify(N))).join(", ")})`);const E=y.apply(this,S);return k.trace(`GlyphRenderer#${y.name} return`,E),E}}},7302:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OptionsService=i.DEFAULT_OPTIONS=void 0;const u=c(8460),d=c(844),_=c(6114);i.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:_.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class m extends d.Disposable{constructor(w){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...i.DEFAULT_OPTIONS};for(const b in w)if(b in v)try{const x=w[b];v[b]=this._sanitizeAndValidateOption(b,x)}catch(x){console.error(x)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,d.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(w,v){return this.onOptionChange((b=>{b===w&&v(this.rawOptions[w])}))}onMultipleOptionChange(w,v){return this.onOptionChange((b=>{w.indexOf(b)!==-1&&v()}))}_setupOptions(){const w=b=>{if(!(b in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(b,x)=>{if(!(b in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);x=this._sanitizeAndValidateOption(b,x),this.rawOptions[b]!==x&&(this.rawOptions[b]=x,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const x={get:w.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,x)}}_sanitizeAndValidateOption(w,v){switch(w){case"cursorStyle":if(v||(v=i.DEFAULT_OPTIONS[w]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${w}`);break;case"wordSeparator":v||(v=i.DEFAULT_OPTIONS[w]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=p.includes(v)?v:i.DEFAULT_OPTIONS[w];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${w} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${w} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${w} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${w} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}i.OptionsService=m},2660:function(a,i,c){var u=this&&this.__decorate||function(m,k,w,v){var b,x=arguments.length,y=x<3?k:v===null?v=Object.getOwnPropertyDescriptor(k,w):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(m,k,w,v);else for(var S=m.length-1;S>=0;S--)(b=m[S])&&(y=(x<3?b(y):x>3?b(k,w,y):b(k,w))||y);return x>3&&y&&Object.defineProperty(k,w,y),y},d=this&&this.__param||function(m,k){return function(w,v){k(w,v,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkService=void 0;const _=c(2585);let p=i.OscLinkService=class{constructor(m){this._bufferService=m,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(m){const k=this._bufferService.buffer;if(m.id===void 0){const S=k.addMarker(k.ybase+k.y),E={data:m,id:this._nextId++,lines:[S]};return S.onDispose((()=>this._removeMarkerFromLink(E,S))),this._dataByLinkId.set(E.id,E),E.id}const w=m,v=this._getEntryIdKey(w),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,k.ybase+k.y),b.id;const x=k.addMarker(k.ybase+k.y),y={id:this._nextId++,key:this._getEntryIdKey(w),data:w,lines:[x]};return x.onDispose((()=>this._removeMarkerFromLink(y,x))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(m,k){const w=this._dataByLinkId.get(m);if(w&&w.lines.every((v=>v.line!==k))){const v=this._bufferService.buffer.addMarker(k);w.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(w,v)))}}getLinkData(m){var k;return(k=this._dataByLinkId.get(m))==null?void 0:k.data}_getEntryIdKey(m){return`${m.id};;${m.uri}`}_removeMarkerFromLink(m,k){const w=m.lines.indexOf(k);w!==-1&&(m.lines.splice(w,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};i.OscLinkService=p=u([d(0,_.IBufferService)],p)},8343:(a,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createDecorator=i.getServiceDependencies=i.serviceRegistry=void 0;const c="di$target",u="di$dependencies";i.serviceRegistry=new Map,i.getServiceDependencies=function(d){return d[u]||[]},i.createDecorator=function(d){if(i.serviceRegistry.has(d))return i.serviceRegistry.get(d);const _=function(p,m,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(w,v,b){v[c]===v?v[u].push({id:w,index:b}):(v[u]=[{id:w,index:b}],v[c]=v)})(_,p,k)};return _.toString=()=>d,i.serviceRegistry.set(d,_),_}},2585:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.IDecorationService=i.IUnicodeService=i.IOscLinkService=i.IOptionsService=i.ILogService=i.LogLevelEnum=i.IInstantiationService=i.ICharsetService=i.ICoreService=i.ICoreMouseService=i.IBufferService=void 0;const u=c(8343);var d;i.IBufferService=(0,u.createDecorator)("BufferService"),i.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),i.ICoreService=(0,u.createDecorator)("CoreService"),i.ICharsetService=(0,u.createDecorator)("CharsetService"),i.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(_){_[_.TRACE=0]="TRACE",_[_.DEBUG=1]="DEBUG",_[_.INFO=2]="INFO",_[_.WARN=3]="WARN",_[_.ERROR=4]="ERROR",_[_.OFF=5]="OFF"})(d||(i.LogLevelEnum=d={})),i.ILogService=(0,u.createDecorator)("LogService"),i.IOptionsService=(0,u.createDecorator)("OptionsService"),i.IOscLinkService=(0,u.createDecorator)("OscLinkService"),i.IUnicodeService=(0,u.createDecorator)("UnicodeService"),i.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(a,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeService=void 0;const u=c(8460),d=c(225);class _{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,k,w=!1){return(16777215&m)<<3|(3&k)<<1|(w?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new d.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(m){if(!this._providers[m])throw new Error(`unknown Unicode version "${m}"`);this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)}register(m){this._providers[m.version]=m}wcwidth(m){return this._activeProvider.wcwidth(m)}getStringCellWidth(m){let k=0,w=0;const v=m.length;for(let b=0;b=v)return k+this.wcwidth(x);const E=m.charCodeAt(b);56320<=E&&E<=57343?x=1024*(x-55296)+E-56320+65536:k+=this.wcwidth(E)}const y=this.charProperties(x,w);let S=_.extractWidth(y);_.extractShouldJoin(y)&&(S-=_.extractWidth(w)),k+=S,w=y}return k}charProperties(m,k){return this._activeProvider.charProperties(m,k)}}i.UnicodeService=_}},n={};function s(a){var i=n[a];if(i!==void 0)return i.exports;var c=n[a]={exports:{}};return t[a].call(c.exports,c,c.exports,s),c.exports}var o={};return(()=>{var a=o;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const i=s(9042),c=s(3236),u=s(844),d=s(5741),_=s(8285),p=s(7975),m=s(7090),k=["cols","rows"];class w extends u.Disposable{constructor(b){super(),this._core=this.register(new c.Terminal(b)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const x=S=>this._core.options[S],y=(S,E)=>{this._checkReadonlyOptions(S),this._core.options[S]=E};for(const S in this._core.options){const E={get:x.bind(this,S),set:y.bind(this,S)};Object.defineProperty(this._publicOptions,S,E)}}_checkReadonlyOptions(b){if(k.includes(b))throw new Error(`Option "${b}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new m.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new _.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let x="none";switch(this._core.coreMouseService.activeProtocol){case"X10":x="x10";break;case"VT200":x="vt200";break;case"DRAG":x="drag";break;case"ANY":x="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:x,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const x in b)this._publicOptions[x]=b[x]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,x=!0){this._core.input(b,x)}resize(b,x){this._verifyIntegers(b,x),this._core.resize(b,x)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,x,y){this._verifyIntegers(b,x,y),this._core.select(b,x,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,x){this._verifyIntegers(b,x),this._core.selectLines(b,x)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,x){this._core.write(b,x)}writeln(b,x){this._core.write(b),this._core.write(`\r +`,x)}paste(b){this._core.paste(b)}refresh(b,x){this._verifyIntegers(b,x),this._core.refresh(b,x)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return i}_verifyIntegers(...b){for(const x of b)if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const x of b)if(x&&(x===1/0||isNaN(x)||x%1!=0||x<0))throw new Error("This API only accepts positive integers")}}a.Terminal=w})(),o})()))})(U2)),U2.exports}var ZI=TEn();const REn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function oA(e,r){const t=document.documentElement,n=getComputedStyle(t),s=a=>n.getPropertyValue(r==="app"?`--term-app-${a}`:`--term-${a}`).trim(),o={};if(r==="app"&&t.dataset.theme!=="dark")for(const a of REn){const i=n.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`).trim();i&&(o[a]=i)}return{...o,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function Ay(e,r,t=!1,n="dark"){const s=getComputedStyle(document.documentElement),o=new ZI.Terminal({convertEol:!0,disableStdin:r,cursorBlink:!r,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:oA(r,n)}),a=n==="app"?new MutationObserver(()=>{o.options.theme=oA(o.options.disableStdin??r,n)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const i=new EEn.FitAddon;o.loadAddon(i),t&&o.loadAddon(new AEn.WebLinksAddon((x,y)=>{let S;try{S=new URL(y)}catch{return}(S.protocol==="http:"||S.protocol==="https:")&&window.open(S,"_blank","noopener,noreferrer")}));const c=e.style.overflowY;e.style.overflowY="auto",o.open(e);let u=!0,d=null;const _=()=>{if(d===e.scrollTop){d=null;return}d=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",_);const p=()=>{var z;const x=o.element,y=x==null?void 0:x.querySelector(".xterm-screen"),S=x==null?void 0:x.querySelector(".xterm-viewport");if(!x||!(y instanceof HTMLElement)||!(S instanceof HTMLElement))return;const E=o.buffer.active;let N=Math.max(0,E.baseY+E.cursorY-E.viewportY+1);for(let M=o.rows-1;M>=N;M--)if((z=E.getLine(E.viewportY+M))!=null&&z.translateToString(!0).trim()){N=M+1;break}const A=y.getBoundingClientRect().height;x.style.height=`${Math.max(e.clientHeight,Math.min(N,o.rows)*A/o.rows)}px`,x.style.overflow="hidden",S.style.height=`${A}px`},m=()=>{try{const x=i.proposeDimensions();x&&(o.resize(x.cols,Math.max(x.rows,r?1:40)),p())}catch{}};m();const k=new ResizeObserver(m);k.observe(e);const w=o.onWriteParsed(()=>{var y;const x=u&&o.buffer.active.viewportY===o.buffer.active.baseY;if(p(),x){const S=(y=o.element)==null?void 0:y.querySelector(".xterm-screen");if(S instanceof HTMLElement){const E=(o.buffer.active.cursorY+1)*S.getBoundingClientRect().height/o.rows;e.scrollTop=Math.max(0,E-e.clientHeight),d=e.scrollTop}}}),v=o.onScroll(p),b=x=>{(x.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof r=="string")}function MEn(e){return vd(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||eP(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function OEn(e){return vd(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&eP(e.partitions)&&(e.error===null||typeof e.error=="string")}function $En(e){return!vd(e)||e.type!=="complete"?null:e.backend==="ssh"&&MEn(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&OEn(e.result)?{backend:"slurm",result:e.result}:null}function tP(e){return vd(e)&&e.type==="complete"}function DEn(e){return vd(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function vS({host:e,backend:r,path:t="/api/settings/ssh/connect",active:n=!0,onComplete:s,onError:o}){const a=new URLSearchParams({host:e,backend:r});return f.jsx(Ty,{path:`${t}?${a}`,label:SL({host:Ee(e)}),active:n,onError:o,onComplete:i=>{const c=$En(i);return c?(s(c),!0):!1}})}function LEn({login:e,onComplete:r,onError:t}){return f.jsx(Ty,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:n=>tP(n)?(r(),!0):!1})}function rP({path:e,label:r,className:t="mt-4 overflow-hidden rounded-lg border border-border",heightClass:n="h-80",onComplete:s,onError:o,onClose:a}){const[i,c]=T.useState("running");return f.jsxs("div",{className:t,children:[f.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[f.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:r}),f.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:i==="running"?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{className:"border-t-accent-amber"})," ",Obr()]}):i==="done"?f.jsxs(f.Fragment,{children:[f.jsx(_o,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",hbr()]}):i==="failed"?f.jsxs(f.Fragment,{children:[f.jsx(pn,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",jbr()]}):sbr()}),f.jsx("button",{type:"button",onClick:a,"aria-label":iN(),title:iN(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:f.jsx(pn,{size:14})})]}),f.jsx(Ty,{path:e,label:r,heightClass:n,frame:"bare",palette:"app",shellAfter:!0,onError:(u,d)=>{c("failed"),d&&o(u)},onComplete:u=>tP(u)?(c("done"),s(),!0):!1,onClosed:()=>c(u=>u==="running"?"closed":u)})]})}function Ty({path:e,label:r,command:t,heightClass:n="h-40",frame:s="card",palette:o="dark",shellAfter:a=!1,active:i=!0,awaitingApproval:c=!1,onComplete:u,onError:d,onClosed:_}){const p=T.useRef(null),m=T.useRef(null),k=T.useRef(u),w=T.useRef(d),v=T.useRef(_),[b,x]=T.useState(null);return k.current=u,w.current=d,v.current=_,T.useEffect(()=>{const y=p.current;if(!y)return;const{terminal:S,dispose:E}=Ay(y,c,!0,o);if(m.current=S,c)return t&&S.writeln(`$ ${t}`),()=>{m.current=null,E()};S.focus();const N=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${N}//${location.host}`),z=new WebSocket(A);z.binaryType="arraybuffer";let M=!1,$=!1,D=!1;const I=(Q,K)=>{var J;if($){K||S.writeln(Q);return}$=!0,(!D||a)&&S.writeln(Q),(J=w.current)==null||J.call(w,Q,K),!(a&&!K)&&(S.options.disableStdin=!0,S.blur(),x(Q))},G=S.onData(Q=>{z.readyState===WebSocket.OPEN&&z.send(new TextEncoder().encode(Q))}),F=S.onResize(({cols:Q,rows:K})=>{z.readyState===WebSocket.OPEN&&z.send(JSON.stringify({type:"resize",cols:Q,rows:K}))});return z.onopen=()=>{t&&S.writeln(`$ ${t}`),z.send(JSON.stringify({type:"resize",cols:S.cols,rows:S.rows}))},z.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){D=!0,S.write(new Uint8Array(Q.data));return}if(typeof Q.data!="string")return;let K;try{K=JSON.parse(Q.data)}catch{return}if(k.current(K)){M=!0,a||z.close();return}const J=DEn(K);J&&(M?S.writeln(J):I(J,!a))},z.onerror=()=>I(gb(),!0),z.onclose=()=>{var Q;if(!M&&!$){I(gb(),!0);return}a&&(S.options.disableStdin=!0,S.blur(),(Q=v.current)==null||Q.call(v))},()=>{z.onopen=null,z.onmessage=null,z.onerror=null,z.onclose=null,G.dispose(),F.dispose(),z.close(),m.current=null,E()}},[e,t,c,o,a]),T.useEffect(()=>{const y=m.current;y&&(y.options.disableStdin=c||!i||b!==null,!c&&i&&b===null?y.focus():y.blur())},[i,b,c]),f.jsxs("div",{className:s==="card"?"mt-3":"contents",children:[f.jsx("div",{className:`${n} ${s==="card"?JI:`overflow-hidden p-3 ${o==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":r,children:f.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),b?f.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function IEn({host:e,transcript:r}){const t=T.useRef(null);return T.useEffect(()=>{const n=t.current;if(!n)return;const{terminal:s,dispose:o}=Ay(n,!0,!0);return s.write(r),o},[r]),f.jsx("div",{className:`mt-3 h-40 ${JI}`,role:"group","aria-label":SL({host:Ee(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Cb=null,Lm=0;const nP=()=>Cb;function sP(){const e=Lm;return XI(async(r,t)=>{if(e!==Lm)return;const n=await Qjn(r,t);e===Lm&&Je.setQueryData(f0().queryKey,s=>s?{...s,workspace:n.workspace}:n)},r=>{e===Lm&&tr(r instanceof Error?r.message:String(r),"error",{id:"workspace-save",action:{label:Ks(),onClick:()=>void bS.retry()}})})}let P1=sP();function PEn(){Lm++,Cb=null,P1=sP()}const bS={flush:(e=!1)=>P1.flush(e),retry:()=>P1.retry(),queue(e,r=0){const t=Cb;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Cb=e,P1.queue(e,r))}};window.addEventListener("pagehide",()=>void bS.flush(!0));function Yl(e,r){if(typeof e=="string")return{kind:"home",view:e};if("code"in e)return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};if("kind"in e)return e.kind==="plan"?{kind:"plan",sessionId:e.sessionId,promptId:e.promptId}:e.kind==="side"?{kind:"side",sessionId:e.sessionId}:{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};if("path"in e)return{kind:"file",path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};const t=r===void 0?e.runId:r;return{kind:"experiment",experimentId:e.id,view:e.view,...t?{runId:t}:{}}}function Ki(e){switch(e.kind){case"home":return e.view;case"experiment":return{id:e.experimentId,view:e.view,...e.runId?{runId:e.runId}:{}};case"file":return{path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};case"code":return{code:!0,experimentId:e.experimentId,branch:e.branch,view:e.view,toggled:new Set};case"plan":return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId,plan:""};case"subagent":return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};case"side":return{kind:"side",sessionId:e.sessionId}}}function oP(e,r,t){const n=[];e.filesTabOpen&&n.push("files"),e.terminalTabOpen&&n.push("terminal"),e.artifactsTabOpen&&n.push("artifacts"),e.experimentsTabOpen&&n.push("experiments");const s=[...e.expTabs,...e.fileTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs,...e.codeTabs],o=new Map(s.map(u=>[Bt(u),u])),a=e.contentTabOrder.flatMap(u=>{const d=o.get(u);return d?[d]:[]}),i=Bt(e.rightTab);return{tabs:[...n,...a].map(u=>Yl(u,Bt(u)===i?e.selectedRunId:void 0)),active:e.panelOpen?Yl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Bt(e.previewTab):null,history:e.tabHistory.map(Bt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Bt(u),[...u.toggled]])]),scroll:r,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function BEn(e,r){const t=xS();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const n=[...(e==null?void 0:e.tabs)??[]];if(r){const o=n.findIndex(a=>Bt(Ki(a))===Bt(Ki(r)));o===-1?n.push(r):n[o]=r}for(const o of n){const a=Ki(o);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[Bt(a)])??[]),t.codeTabs.push(a)):"path"in a?t.fileTabs.push(a):"kind"in a?a.kind==="plan"?t.planTabs.push(a):a.kind==="side"?t.sideTabs.push(a):t.subagentTabs.push(a):t.expTabs.push(a),t.contentTabOrder.push(Bt(a))}const s=new Map(n.map(o=>{const a=Ki(o);return[Bt(a),a]}));return t.tabHistory=((e==null?void 0:e.history)??[]).flatMap(o=>{const a=s.get(o);return a?[a]:[]}),t.previewTab=e!=null&&e.previewKey?s.get(e.previewKey)??null:null,t.rightTab=r?Ki(r):e!=null&&e.active?Ki(e.active):"experiments",t.panelOpen=r!==void 0,t.selectedRunId=(r==null?void 0:r.kind)==="experiment"?r.runId??null:null,iP(t,r)}const G2=(e,r)=>e.id===r.id&&e.view===r.view,cf=(e,r)=>e.path===r.path&&(e.source??"repo")===(r.source??"repo")&&e.sessionId===r.sessionId&&e.ref===r.ref,yS=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,uo=(e,r,t)=>`${e}:${r??""}:${yS(t)}`,aP=e=>({...e,lineScrollRequest:void 0});function Kv(e){return typeof e=="object"&&"path"in e?aP(e):e}const nh=(e,r)=>e.branch===r.branch;function Bt(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:e.kind==="side"?`side:${e.sessionId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${yS(e)}`:`experiment:${e.id}:${e.view}`}function wm(e,r){const t=e.filter(n=>Bt(n)!==r);return t.length===e.length?e:t}function FEn(e){return e!==void 0}function xS(e,r=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],sideTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===zh&&r){const n="experiments";return{...t,rightTab:n,tabHistory:[n],experimentsTabOpen:!0,panelOpen:!0}}return t}function wS(e,r){const t=xS(e,r);return t.panelOpen?oP(t,{},{}):void 0}function iP(e,r){if(!r)return e;const t=Ki(r),n=Bt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs].find(c=>Bt(c)===n),o=(c,u)=>{const d=c.findIndex(_=>Bt(_)===n);return d<0?[...c,u]:JSON.stringify(Yl(c[d]))===JSON.stringify(Yl(u))?c:c.map((_,p)=>p===d?{..._,...u}:_)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!0:a.experimentsTabOpen=!0:("path"in t?a.fileTabs=o(e.fileTabs,t):"id"in t?a.expTabs=o(e.expTabs,{...t,runId:r.kind==="experiment"?r.runId:void 0}):"code"in t?a.codeTabs=o(e.codeTabs,{...t,toggled:s&&"code"in s?s.toggled:t.toggled}):t.kind==="plan"?a.planTabs=o(e.planTabs,t):t.kind==="side"?a.sideTabs=o(e.sideTabs,t):a.subagentTabs=o(e.subagentTabs,t),e.contentTabOrder.includes(n)||(a.contentTabOrder=[...e.contentTabOrder,n]));const i=e.tabHistory.at(-1);return i&&Bt(i)===n&&JSON.stringify(Yl(i))===JSON.stringify(Yl(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Bt(c)!==n),t]),a}let Vi=0;const mg=new Map,zb=new Map,R3=new Set,M3=()=>{for(const e of R3)e()},HEn=e=>(R3.add(e),()=>{R3.delete(e)}),gg=new Map,Qi=new Map,cP=e=>Qi.get(e);function qEn(){Vi++,Qi.clear(),gg.clear(),mg.clear(),zb.clear(),M3()}function UEn(e,r){const t=Qi.get(e);if(!(t!=null&&t.tasks.new)||v_(t,r))return;const n=t.tasks.new,s=a=>Object.fromEntries(n.tabs.flatMap(i=>{if(i.kind!=="file")return[];const c=Ki(i);if(typeof c=="string"||!("path"in c))return[];const u=uo(e,null,c);return u in a?[[uo(e,r,c),a[u]]]:[]})),o={...t.tasks,[r]:{...n,scroll:s(n.scroll),sourceModes:s(n.sourceModes)}};delete o.new,gg.set(e,r),Qi.set(e,{...t,tasks:o})}function GEn(e){let r=mg.get(e);if(!r){const t=Vi;r=XI(async(n,s)=>{if(t!==Vi)return;const o=await Vjn(e,n,s);t===Vi&&Je.setQueryData(oS(e).queryKey,o),t===Vi&&zb.delete(e)&&M3()},n=>{t===Vi&&(zb.set(e,n instanceof Error?n.message:String(n)),M3())}),mg.set(e,r)}return r}function W2(e,r,t,n){const s=Qi.get(e);if(!s||t==="new"&&gg.has(e))return;const o=Ny(r)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,i=t?v_(s,t):void 0;if(o===s.lastLocation&&a===s.lastTaskId&&(!n||JSON.stringify(n)===JSON.stringify(i)))return;const c={...s,lastLocation:o,lastTaskId:a,tasks:t&&n?{...s.tasks,[t]:n}:s.tasks},u=i&&n&&o===s.lastLocation&&JSON.stringify({...i,scroll:{},sourceModes:{}})===JSON.stringify({...n,scroll:{},sourceModes:{}});Qi.set(e,c),GEn(e).queue(c,u?250:0)}function aA(e,r,t,n){const s=new Set(e.state.fileTabs.map(d=>uo(t,n==="new"?null:n,d))),o=Object.fromEntries(Object.entries(e.getScroll()).filter(([d])=>s.has(d))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([d])=>s.has(d))),i=oP(e.state,o,a),c=e.pane??(r==null?void 0:r.active),u=c?Bt(Ki(c)):null;return i.active=i.tabs.find(d=>Bt(Ki(d))===u)??null,i}function WEn(e){const{projectId:r,taskKey:t,location:n,pane:s,isTask:o,firstDemoOpen:a,state:i,apply:c,getScroll:u,sourceModes:d,revision:_}=e,p=T.useRef(tA()),m=T.useSyncExternalStore(HEn,()=>r?zb.get(r)??null:null),[k,w]=T.useState(null),[v,b]=T.useState(0),[x,y]=T.useState(null),[S,E]=T.useState(null),N=T.useRef(null),A=T.useRef(null),z=T.useRef(null),M=T.useRef(e);M.current=e;const $=JSON.stringify([r,t,o]),D=JSON.stringify(s??null),I=T.useCallback(()=>{const F=z.current;if(!F)return;const Q=aA({...M.current,state:F.state,pane:F.pane},v_(Qi.get(F.projectId),F.taskKey),F.projectId,F.taskKey);W2(F.projectId,F.location,F.taskKey,Q)},[]);T.useEffect(()=>{let F=!0;const Q=Vi;if(w(null),y(null),!!r)return Qi.has(r)?y(r):Je.fetchQuery(oS(r)).then(K=>{!F||Q!==Vi||(Qi.set(r,K??tA()),y(r))}).catch(K=>{F&&Q===Vi&&w(K instanceof Error?K.message:String(K))}),()=>{F=!1}},[r,v]),T.useLayoutEffect(()=>{if(z.current&&z.current.scope!==$){const K=z.current.projectId;I(),gg.get(K)===t&&gg.delete(K),z.current=null}if(!r||x!==r)return;const F=Qi.get(r);if(!F)return;if(p.current=F,N.current!==$){if(N.current=$,A.current=D,o){const K=v_(F,t)??(Ju(r)?wS(t,a):void 0);c(BEn(K,s),K,!0)}E($);return}if(S!==$)return;let Q=i;A.current!==D&&(A.current=D,o&&s&&(Q=iP(i,s),c(Q,void 0,!1))),o?(W2(r,n,t,aA({state:Q,pane:s,getScroll:u,sourceModes:d},v_(F,t),r,t)),z.current={projectId:r,taskKey:t,scope:$,location:n,pane:s,state:Q}):W2(r,n),p.current=Qi.get(r)??F},[r,t,n,s,D,o,a,i,c,u,d,_,x,$,S,I]),T.useEffect(()=>{const F=Vi,Q=J=>{if(F===Vi){I();for(const ee of mg.values())ee.flush(J)}},K=()=>Q(!0);return window.addEventListener("pagehide",K),()=>{window.removeEventListener("pagehide",K),Q(!1)}},[I]);const G=T.useCallback(()=>{var F;r&&(k?b(Q=>Q+1):(F=mg.get(r))==null||F.retry())},[r,k]);return{ready:r===null||x===r&&S===$,loaded:r===null||x===r,error:k??m,retry:G,capture:I,workspace:p}}const KEn="data:image/svg+xml,"+encodeURIComponent(''),O3=T.createContext(null);function VEn(e){var r;return e.kind==="local"?"local":`${e.session.id}:${((r=e.session.installPaths)==null?void 0:r.database)??""}`}function lP(){const e=T.useContext(O3);if(!e)throw new Error("Runtime is not connected");return e}function QEn(e){const r=document.querySelector('link[rel="icon"]');r&&(r.href=e?KEn:"/favicon.svg")}function iA(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function XEn(e){if(e.kind!=="ssh")return;const{theme:r,locale:t}=e.session.uiPreferences;!iA("orx:theme")&&(r==="light"||r==="dark"||r==="system")&&hI(r),!iA("orx:locale")&&t&&lD(t)&&_I(t)}function YEn(e){return e.includes("ssh ")&&e.includes("failed")}function cA({host:e,overlay:r=!1}){return f.jsx("div",{className:r?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:ZD({host:Ee(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:J4()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:Fir()})]})})}function lA({runtime:e,overlay:r=!1,retriedInteractiveError:t,setRetriedInteractiveError:n}){var M,$,D;const{session:s}=e,[o,a]=T.useState(s.installPaths),[i,c]=T.useState(!1),[u,d]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,($=s.installPaths)==null?void 0:$.database,(D=s.installPaths)==null?void 0:D.cache]);async function _(){if(o){c(!0);try{await _6n(o)}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}}async function p(I=!1){n(I?s.error:null),c(!0);try{await f6n()}catch(G){tr(G instanceof Error?G.message:String(G),"error")}finally{c(!1)}}async function m(){c(!0);try{await KL()}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}async function k(){c(!0);try{d(await VL())}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}async function w(){if(u){c(!0);try{await QL(u),d(null)}catch(I){d(null),tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}}async function v(){c(!0);try{await d6n()}catch(I){tr(I instanceof Error?I.message:String(I),"error")}finally{c(!1)}}const b=s.status==="applying"||i,x=s.status==="needsInstall",y=s.status==="needsUpdate",S=o&&x,E=["connecting","applying","reconnecting"].includes(s.status),N=s.status==="disconnected"&&s.error!==null&&YEn(s.error)&&t!==s.error&&!s.canStartNewHost,A=x?Kcr():y?Ehr():s.status==="applying"?wor({host:Ee(s.host)}):s.status==="reconnecting"?Iur({host:Ee(s.host)}):s.status==="disconnected"?s.error?Tir({host:Ee(s.host)}):s.canStartNewHost?icr({host:Ee(s.host)}):ZD({host:Ee(s.host)}):gar({host:Ee(s.host)}),z=s.error??(s.canStartNewHost?Yir():x?klr({user:Ee(s.user??""),host:Ee(s.host)}):y?vhr({host:Ee(s.host)}):s.status==="applying"?_or():s.status==="reconnecting"?Eur():s.status==="disconnected"?fir():iar());return f.jsxs(f.Fragment,{children:[f.jsx("main",{className:r?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[E&&f.jsx(Nt,{className:"mt-2"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:A}),!N&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:z})]})]}),N&&f.jsx(vS,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),S&&f.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[f.jsx("p",{className:"m-0 text-sm text-subtext",children:Lcr()}),[["binary",gcr()],["database",zcr()]].map(([I,G])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[G,f.jsx(Nn,{value:o[I],onChange:F=>a({...o,[I]:F.target.value}),disabled:b,dir:"ltr"})]},I)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx(Oe,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",nlr()]}):y?nN():_L()})})]}),y&&o&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx(Oe,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",Ihr()]}):nN()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void v(),children:[i?f.jsx(Nt,{}):null,s.error?tN():f_r()]}):f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void p(),children:[i?f.jsx(Nt,{}):null,tN()]})}),(s.status==="connecting"||s.status==="reconnecting")&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:f.jsx(Oe,{disabled:i,onClick:()=>void m(),children:s3()})}),y&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx(Oe,{disabled:i,onClick:()=>void m(),children:s3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[i?f.jsx(Nt,{}):null,eN()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid k(),children:[i?f.jsx(Nt,{}):null,JD()]})]}),x&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs(Oe,{variant:"primary",disabled:i,onClick:()=>void p(),children:[i?f.jsx(Nt,{}):null,eN()]})})]})}),u&&f.jsx(MI,{host:s.host,preview:u,currentClientAttached:!1,stopping:i,onClose:()=>{i||d(null)},onConfirm:()=>void w()})]})}function ZEn({children:e}){const r=T.useRef(null);return T.useEffect(()=>{var t;return(t=r.current)==null?void 0:t.focus()},[]),f.jsx("div",{ref:r,role:"alertdialog","aria-modal":"true","aria-labelledby":"remote-setup-title",tabIndex:-1,className:"absolute inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-6",children:e})}function JEn(){const e=cu();T.useSyncExternalStore(P8,fV),T.useEffect(()=>P8(()=>{PEn(),qEn()}),[]);const r=gX({select:w=>w.pathname==="/remote-launch"}),[t,n]=T.useState(null),[s,o]=T.useState(null),a=T.useRef(!1),i=T.useRef(!1),c=T.useRef(!1),u=T.useRef(null),[d,_]=T.useState(null),p=dt({...OCn(),enabled:!r,refetchInterval:w=>{var v;return w.state.status==="error"||((v=w.state.data)==null?void 0:v.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(dt({...WCn(e),enabled:!r&&((t==null?void 0:t.kind)==="local"||(t==null?void 0:t.kind)==="ssh"&&t.session.status==="connected")}),T.useEffect(()=>{var b,x;if(r)return;const w=p.data;if(!w){o(((b=p.error)==null?void 0:b.message)??null);return}const v=VEn(w);dV(v),u.current!==null&&u.current!==v&&(a.current=!1,i.current=!1,c.current=!1),u.current=v,w.kind==="ssh"&&(c.current||(c.current=!0,XEn(w)),w.session.status==="connected"?(a.current=!0,i.current=!0,_(null)):w.session.status==="disconnected"&&w.session.error===null&&(i.current=!1)),n(w),o(((x=p.error)==null?void 0:x.message)??null)},[r,p.data,p.error]),T.useEffect(()=>{const w=(t==null?void 0:t.kind)==="ssh";QEn(w),w&&(!a.current||t.session.status==="disconnected"&&!t.session.error)&&(document.title="OpenResearch")},[t]),r)return f.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[f.jsx(Nt,{})," ",lur()]});if(!t)return f.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:s?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:s}),f.jsx(Oe,{onClick:()=>location.reload(),children:Ks()})]}):f.jsx(Nt,{})});if(t.kind==="local")return f.jsxs(O3,{value:t,children:[f.jsx(DN,{}),f.jsx(lg,{})]},Si()[1]);if(!(i.current&&(t.session.status!=="disconnected"||t.session.error!==null))&&t.session.status!=="connected")return s?f.jsx(cA,{host:t.session.host}):f.jsx(lA,{runtime:t,retriedInteractiveError:d,setRetriedInteractiveError:_});const k=t.session.status!=="connected"||s!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:k,children:f.jsxs(O3,{value:t,children:[f.jsx(DN,{}),f.jsx(lg,{})]},Si()[1])}),k&&f.jsx(ZEn,{children:s?f.jsx(cA,{host:t.session.host,overlay:!0}):f.jsx(lA,{runtime:t,overlay:!0,retriedInteractiveError:d,setRetriedInteractiveError:_})})]})}const Ry=eX()({component:JEn}),kS="orx:demo-read-sessions";function uP(){try{const e=JSON.parse(sessionStorage.getItem(kS)??"[]");return new Set(Array.isArray(e)?e.filter(r=>typeof r=="string"):[])}catch{return new Set}}function eNn(e){try{const r=uP();r.add(e),sessionStorage.setItem(kS,JSON.stringify([...r]))}catch{}}function tNn(){try{sessionStorage.removeItem(kS)}catch{}}function _P(e,r){const t=Zf(e.split("?")[0]);return!!(t&&(!t.sessionId||r.some(n=>n.id===t.sessionId&&n.projectId===t.projectId)))}async function rNn(e=Je){var a;const[r,t]=await Promise.all([e.fetchQuery(f0()),e.fetchQuery(Vf())]),n=Ny((a=nP()??r.workspace)==null?void 0:a.lastLocation),s=()=>t[0]?fP(t[0].id,e):Promise.resolve("/projects");if(!n)return s();const o=Zf(n.split("?")[0]);return!(o!=null&&o.projectId)||!t.some(i=>i.id===o.projectId)||o.sessionId&&!_P(n,await e.fetchQuery(So(o.projectId)))?s():n}async function fP(e,r=Je){var d;const[t,n]=await Promise.all([r.fetchQuery(oS(e)),r.fetchQuery(So(e))]),s=cP(e)??t,o=Ny(s==null?void 0:s.lastLocation);if(o&&((d=Zf(o.split("?")[0]))==null?void 0:d.projectId)===e&&_P(o,n))return o;const a=n.find(_=>!_.archived&&!_.sideParentSessionId),i=Ju(e)?wS(a==null?void 0:a.id,!(await r.fetchQuery(f0())).tourCompleted):void 0,c=v_(s,(a==null?void 0:a.id)??"new"),u=c?c.active:i==null?void 0:i.active;return I1(e,(a==null?void 0:a.id)??null,u)}function My(){return f.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function K2(){return f.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[f.jsx(My,{}),"OpenResearch"]})}const uA="inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text";function nNn({cmd:e,onRun:r}){const[t,n]=T.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),r&&f.jsx("button",{type:"button",className:`cmd-inline-run ${uA}`,onClick:r,"aria-label":z9({value:Ee(e)}),title:z9({value:Ee(e)}),children:f.jsx(Y9n,{size:11})}),f.jsx("button",{type:"button",className:`cmd-inline-copy ${uA}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),1500)}).catch(()=>{})},"aria-label":t?qf():hZ({value:Ee(e)}),title:t?qf():Uj(),children:t?f.jsx(_o,{size:11,strokeWidth:3}):f.jsx(hd,{size:11})})]})}function x_(e,r){return e?e.split(/`([^`]+)`/).map((t,n)=>n%2===1?f.jsx(nNn,{cmd:t,onRun:r!=null&&r.canRun(t)?()=>r.onRun(t):void 0},n):t):null}function m0(e){if(e.id!=="claude-code")return null;switch(e.authProvider){case"bedrock":return"Amazon Bedrock";case"vertex":return"Google Vertex AI";case"foundry":return"Microsoft Foundry";case"firstParty":return null;default:return e.authProvider??null}}function sp({harness:e,size:r=16}){const t="block shrink-0";return e==="claude-code"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:f.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):e==="opencode"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?f.jsxs("svg",{className:t,width:r,height:r,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[f.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),f.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),f.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),f.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),f.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?f.jsx("svg",{className:t,width:r,height:r,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:f.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):f.jsx("svg",{className:t,width:r,height:r,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z"})})}function $3(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function sNn(e,r){return e.needsConfigRepair?"error":r==="login"?"running":"preview"}function _A(e,r){return r||e==="preview"}function oNn(e,r){if(!e||e.needsConfigRepair)return null;const t=$3(e);return t===r?null:t}function dP({harness:e,commands:r,onReady:t,onClose:n}){const s=T.useRef(null),o=T.useRef(!1),[a,i]=T.useState(()=>$3(e)),[c,u]=T.useState(0),[d,_]=T.useState(()=>sNn(e,$3(e))),[p,m]=T.useState(d==="running"),[k,w]=T.useState(e.needsConfigRepair),[v,b]=T.useState(e.needsConfigRepair?e.agentNote??null:null),x=d==="running"||d==="checking",y=r[a].includes(` +`)?void 0:r[a];T.useEffect(()=>{o.current=!1;const E=s.current;return E==null||E.showModal(),()=>{o.current=!0,E==null||E.close()}},[]);const S=async(E=!0)=>{_("checking"),b(null);try{const N=E?await Kf(!0,!0):await nI();if(o.current)return;const A=N.find(z=>z.id===e.id);if(w((A==null?void 0:A.needsConfigRepair)??!1),A!=null&&A.agentReady&&(a!=="login"||A.authenticated))t==null||t(A),_("success"),e.id==="antigravity"&&a==="login"&&n();else if(a!=="login"&&(A!=null&&A.installed)&&!A.installBroken&&!A.needsConfigRepair&&A.authState==="needsLogin")i("login"),m(!0),_("running");else if(E){const z=oNn(A,a);z&&(i(z),m(!1)),b((A==null?void 0:A.agentNote)??LD()),_("error")}else return S(!0)}catch(N){if(o.current)return;b(N instanceof Error?N.message:String(N)),_("error")}};return f.jsxs("dialog",{ref:s,className:"m-auto w-180 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"harness-setup-title",onKeyDown:E=>{E.key==="Escape"&&x&&E.preventDefault()},onCancel:E=>{E.preventDefault(),x||n()},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(sp,{harness:e.id,size:26}),f.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:NE({agent:e.name})})]}),d==="preview"?f.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?Lxt({agent:e.name}):m2t({agent:e.name})}):y&&_A(d,p)?f.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:x_(Fwt({command:y}))}):null,d!=="running"&&d!=="preview"&&f.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[d==="checking"&&f.jsx(Nt,{}),d==="success"?cxt({agent:e.name}):d==="error"?$D():Zyt()]}),a==="install"&&r.requiresNpm&&f.jsx("p",{className:"text-sm text-subtext",children:Twt()}),_A(d,p)&&f.jsx(Ty,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:NE({agent:e.name}),command:y,heightClass:"h-96",active:d==="running",awaitingApproval:d==="preview",onComplete:E=>typeof E!="object"||E===null||!("type"in E)||E.type!=="complete"?!1:(S(!1),!0),onError:E=>{b(E),_("error")}},`${a}-${c}`),v&&f.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:x_(v)}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[d==="error"&&f.jsx(Oe,{variant:"ghost",onClick:()=>{b(null),S()},children:hb()}),d==="error"&&!k&&f.jsx(Oe,{onClick:()=>{b(null),m(!0),_("running"),u(E=>E+1)},children:Ks()}),f.jsx(Oe,{variant:d==="success"?"primary":"default",onClick:n,children:d==="success"?NL():x?Hyt():fg()}),d==="preview"&&f.jsx(Oe,{variant:"primary",onClick:()=>{m(!0),_("running")},children:Ryt()})]})]})}const aNn=600,fA=700,D3=1300,hP=900,V2=2.6,Vv=.06;function iNn(e){if(e{const t=r.current,n=t==null?void 0:t.getContext("2d");if(!t||!n||matchMedia("(prefers-reduced-motion: reduce)").matches)return;const s=Array.from({length:aNn},()=>dA());let o=0,a=0;const i=()=>{const p=window.devicePixelRatio||1;o=t.clientWidth,a=t.clientHeight,t.width=o*p,t.height=a*p,n.setTransform(p,0,0,p,0,0)};i(),window.addEventListener("resize",i);const c=performance.now();let u=c,d=0;const _=p=>{if(p-c>D3+hP&&p-u<33){d=requestAnimationFrame(_);return}const m=Math.min(p-u,50)/1e3;u=p;const k=iNn(p-c),w=getComputedStyle(document.documentElement),v=w.getPropertyValue("--text"),b=w.getPropertyValue("--primary"),x=o/2,y=a/2,S=Math.max(o,a)*.5,E=Math.min(.6,k*.12);n.clearRect(0,0,o,a),n.lineCap="round";for(const N of s){N.z-=k*m,N.z<=.02&&Object.assign(N,dA(1));const A=x+N.x/N.z*S,z=y+N.y/N.z*S,M=N.z+E,$=x+N.x/M*S,D=y+N.y/M*S,I=1-N.z;n.globalAlpha=Math.min(1,I*1.4)*(N.tinted?1:.8),n.strokeStyle=N.tinted?b:v,n.lineWidth=.6+I*2.2,n.beginPath(),n.moveTo($,D),n.lineTo(A+.01,z),n.stroke()}d=requestAnimationFrame(_)};return d=requestAnimationFrame(_),()=>{cancelAnimationFrame(d),window.removeEventListener("resize",i)}},[]),f.jsx("canvas",{ref:r,"aria-hidden":"true",className:e})}const lNn={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function vg({variant:e="list",className:r,...t}){return f.jsx("span",{className:Ls("title",lNn[e],r),...t})}const hA=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),h_=["onb-card-meta text-sm text-subtext [&_code]:font-mono","[&_code]:text-xs [&_code]:bg-surface","[&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs","[&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap"].join(" "),Im=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),pP=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),uNn=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),_Nn=[{id:"AI/ML",label:XDt},{id:"Biology",label:aLt},{id:"Physics",label:CLt},{id:"Other",label:mLt}],fNn=["welcome","environment","profile"];function dNn({onDone:e,preferredAgent:r,remote:t}){var Ie,Ye;const n=mr({mutationFn:Ae=>Yjn(...Ae)}),[s,o]=T.useState(0);T.useEffect(()=>{const Ae=fNn[s];Ae&&e_({name:"onboarding_step_viewed",step:Ae})},[s]);const a=dt(su()),i=dt(Vm()),c=dt(nS()),[u,d]=T.useState(null),[_,p]=T.useState(!1),m=T.useRef(null),k=T.useRef(""),w=T.useRef(null),v=T.useRef(!1);T.useEffect(()=>()=>{var Ae;return(Ae=m.current)==null?void 0:Ae.close()},[]);const b=a.data??null,x=(Ie=i.data)==null?void 0:Ie.gitVersion,y=!t&&((Ye=i.data)==null?void 0:Ye.gitInstallable)===!0,[S,E]=T.useState(!1),[N,A]=T.useState(null),[z,M]=T.useState(""),[$,D]=T.useState(null),[I,G]=T.useState(!1),[F,Q]=T.useState([]),[K,J]=T.useState(""),[ee,P]=T.useState(""),[L,H]=T.useState([]),[q,U]=T.useState(""),[oe,ie]=T.useState([]),[ce,re]=T.useState(!1),W=T.useRef(0),[ae,le]=T.useState(!1),[me,be]=T.useState(!1),Se=(b==null?void 0:b.some(Ae=>Ae.agentReady&&!Ae.catalogPending))??!1,Be=(b==null?void 0:b.some(Ae=>Ae.catalogPending))??!1,Xe=x!=null,Me=T.useRef(0),Fe=(Ae,Ve=!1)=>{const Ze=++Me.current;G(!0),le(!1),be(!1);const at=()=>Ze===Me.current;Promise.allSettled([Kf(Ae,Ve),Je.fetchQuery({...Vm(),staleTime:Ae?0:3e4})]).then(([At,Pe])=>{at()&&(At.status==="rejected"&&le(!0),Pe.status==="rejected"&&be(!0))}).finally(()=>at()&&G(!1))};T.useEffect(()=>Fe(!1),[]);const pt=mr({mutationFn:Jjn,onSuccess:()=>Fe(!0)}),Ct=f.jsx(vNn,{pending:pt.isPending,error:pt.error,disabled:I,onInstall:()=>pt.mutate()});T.useEffect(()=>{if(b===null)return;const Ae=b.filter(Ve=>Ve.agentReady&&!Ve.catalogPending);D(Ve=>{var at;if(Ve&&Ae.some(At=>At.id===Ve))return Ve;const Ze=r&&Ae.find(At=>At.id===r.harness);return(Ze==null?void 0:Ze.id)??((at=Ae[0])==null?void 0:at.id)??null})},[b,r]),T.useEffect(()=>le(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>be(i.isError),[i.isError,i.dataUpdatedAt]),T.useEffect(()=>{Je.fetchQuery(DCn()).then(Ae=>{Q(Ae.researchAreas),J(Ae.otherArea??""),P(Ae.background??""),H(Ae.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const Ae=q.trim();if(Ae.length<3){ie([]),re(!1);return}const Ve=++W.current;re(!0);const Ze=setTimeout(()=>{Je.fetchQuery(uI(Ae)).then(at=>Ve===W.current&&ie(at)).catch(()=>Ve===W.current&&ie([])).finally(()=>Ve===W.current&&re(!1))},350);return()=>clearTimeout(Ze)},[q]);const Vt=Ae=>{const Ve=L.some(Ze=>Ze.paperId===Ae.paperId);H(Ze=>Ze.some(at=>at.paperId===Ae.paperId)?Ze:[...Ze,{paperId:Ae.paperId,title:pA(Ae.title)}]),U(""),ie([]),Ve||Je.fetchQuery(S3(Ae.paperId)).then(Ze=>{var At;const at=(At=Ze.title)==null?void 0:At.trim();at&&H(Pe=>Pe.map(Jt=>Jt.paperId===Ae.paperId?{...Jt,title:at}:Jt))}).catch(()=>{})},Ut=Ae=>H(Ve=>Ve.filter(Ze=>Ze.paperId!==Ae)),Gt=Ae=>{Q(Ve=>Ve.includes(Ae)?Ve.filter(Ze=>Ze!==Ae):[...Ve,Ae])},De=F.length>0&&(!F.includes("Other")||K.trim().length>0),ct=()=>{if(w.current)return w.current;k.current="",v.current=!0,p(!0);const Ae=(async()=>{await new Promise((at,At)=>{const Pe=location.protocol==="https:"?"wss:":"ws:",Jt=new WebSocket(`${Pe}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);Jt.binaryType="arraybuffer";const Tt=new TextDecoder,Zr=new ZI.Terminal;Zr.onData(nr=>{Jt.readyState===WebSocket.OPEN&&Jt.send(new TextEncoder().encode(nr))}),m.current=Jt;let cr=!1;Jt.onmessage=nr=>{if(nr.data instanceof ArrayBuffer){Zr.write(new Uint8Array(nr.data)),k.current=(k.current+Tt.decode(nr.data,{stream:!0})).slice(-65536);return}if(typeof nr.data!="string")return;let Wt;try{Wt=JSON.parse(nr.data)}catch{return}typeof Wt!="object"||Wt===null||!("type"in Wt)||(Wt.type==="complete"?(cr=!0,Jt.close(),at()):Wt.type==="error"&&(Jt.close(),At(new Error("error"in Wt&&typeof Wt.error=="string"?Wt.error:$D()))))},Jt.onerror=()=>{Jt.close(),At(new Error(gb()))},Jt.onclose=()=>{Zr.dispose(),m.current=null,cr||At(new Error(gb()))}});const Ze=(await Kf(!0,!0)).find(at=>at.id==="opencode"&&at.agentReady);if(!Ze)throw new Error(PHt());return D("opencode"),Ze})();return w.current=Ae,Ae.catch(()=>{}),Ae};T.useEffect(()=>{t||v.current||!(b!=null&&b.length)||b.some(Ae=>Ae.catalogPending)||!b.every(Ae=>!Ae.installed&&!Ae.installBroken)||ct()},[b,t]),T.useEffect(()=>{s===1&&_&&o(2)},[s,_]);const lt=()=>{o(_?2:1)},xe=async(Ae="complete")=>{var Ve;if(!(S||Ae==="complete"&&(!De||!Xe))){E(!0),A(null),M("");try{const Ze=_?await ct():b==null?void 0:b.find(Pe=>Pe.id===$&&Pe.agentReady&&!Pe.catalogPending);if(!Ze)throw new Error(LD());if(Ae==="setup")return;const at=pNn(Ze,((Ve=Ze.models[0])==null?void 0:Ve.id)??null),At=await n.mutateAsync([at,{researchAreas:F,otherArea:F.includes("Other")?K:null,background:ee||null,papers:L}]);e(At.project,At.selection)}catch(Ze){_&&(w.current=null);const at=Ze instanceof Error?Ze.message:String(Ze);A(at),M([k.current,at].filter(Boolean).join(` -`))}finally{z(!1)}}};return f.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-background onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&c.data&&f.jsx(dP,{harness:u,commands:c.data[u.id],onReady:Ae=>{D(Ae.id)},onClose:()=>{d(null)}}),f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?f.jsxs("div",{className:"onb-intro flex min-h-dvh flex-col items-center justify-center gap-6 text-center",children:[f.jsx(cNn,{className:"pointer-events-none fixed inset-0 size-full"}),f.jsx("div",{className:"onb-intro-brand relative text-6xl font-semibold leading-none tracking-[-0.035em] animate-[onb-warp-in_700ms_cubic-bezier(0.16,1,0.3,1)_1250ms_both] motion-reduce:animate-none",children:f.jsx(K2,{})}),f.jsx("h2",{className:"onb-title relative m-0 text-2xl font-medium text-muted tracking-[-0.02em] animate-[onb-welcome-in_700ms_ease-out_1700ms_both] motion-reduce:animate-none",children:bWt()}),f.jsx("div",{className:"relative mt-6 animate-[onb-welcome-in_600ms_ease-out_2300ms_both] motion-reduce:animate-none",children:f.jsxs(Oe,{variant:"primary",size:"large",onClick:lt,disabled:I&&b===null,children:[I&&b===null?f.jsx(Nt,{}):null,VE()," ",f.jsx(L1,{size:20})]})})]}):s===1?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(K2,{}),f.jsx("span",{children:MGt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:yIt()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:NHt()}),b!==null&&!Se&&!Be&&f.jsx("p",{className:hA,children:dGt()}),b!==null&&Se&&$===null&&f.jsx("p",{className:hA,children:AIt()}),(w===null||me)&&f.jsxs("div",{className:"onb-git-check mt-7 mb-5.5",role:"status","aria-live":"polite",children:[f.jsx(mA,{gitVersion:w,error:me}),me?f.jsx("p",{className:Im,children:M2()}):y?Ct:f.jsx("p",{className:Im,children:QE()})]}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(Ae=>{var Ve;return f.jsx(gNn,{h:Ae,remote:t,selected:$===Ae.id,onSelect:()=>D(Ae.id),commands:(Ve=c.data)==null?void 0:Ve[Ae.id],onSetup:()=>d(Ae)},Ae.id)}):ae?f.jsx("div",{className:h_,children:M2()}):f.jsxs(Gn,{className:"py-2",children:[f.jsx(Nt,{})," ",GPt()]})}),c.isError&&f.jsxs("p",{className:h_,children:[Kxt()," ",f.jsx(Oe,{variant:"ghost",onClick:()=>void c.refetch(),children:Ks()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Oe,{variant:"ghost",onClick:()=>o(0),children:[f.jsx(Sb,{size:12})," ",KE()]}),f.jsxs(Oe,{variant:"ghost",onClick:()=>Fe(!0,!0),disabled:I,children:[f.jsx(Ei,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",hb()]}),f.jsx("div",{className:"flex-1"}),f.jsxs(Oe,{variant:"primary",onClick:()=>o(2),disabled:I||!Se||$===null||!Xe,title:I||!Se&&Be?sKt():Se?$===null?mPt():me?kqt():w===void 0?VWt():w===null?mFt():void 0:nGt(),children:[VE()," ",f.jsx(L1,{size:13})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(K2,{}),!_&&f.jsx("span",{children:qGt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:JGt()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:pP,children:[f.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[f.jsx("legend",{children:hKt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:aPt()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:_Nn.map(Ae=>f.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[f.jsx("input",{type:"checkbox",checked:H.includes(Ae.id),onChange:()=>Gt(Ae.id),disabled:S}),f.jsx("span",{children:Ae.label()})]},Ae.id))}),H.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:K,onChange:Ae=>J(Ae.target.value),disabled:S,placeholder:lWt(),"aria-label":QHt()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:qqt()}),f.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:ee,onChange:Ae=>P(Ae.target.value),disabled:S,rows:4,placeholder:tBt()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:Mqt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:TDt()}),f.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[f.jsx("input",{id:"onb-paper-search",value:q,onChange:Ae=>U(Ae.target.value),disabled:S,placeholder:cUt()}),ce?f.jsx("div",{className:h_,children:vUt()}):oe.length>0?f.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:oe.map(Ae=>f.jsxs("button",{type:"button",onClick:()=>Vt(Ae),disabled:S,children:[f.jsx(vg,{children:pA(Ae.title)}),f.jsx("span",{className:"id",children:Ae.paperId})]},Ae.paperId))}):null]}),L.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:L.map(Ae=>f.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[f.jsx(vg,{children:Ae.title||Ae.paperId}),f.jsx("span",{className:"id",children:Ae.paperId}),f.jsx("button",{type:"button","aria-label":vte({name:Ee(Ae.paperId)}),onClick:()=>Ut(Ae.paperId),disabled:S,children:f.jsx(pn,{size:12})})]},Ae.paperId))})]})}),!De&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:H.length===0?XIt():$Pt()}),_&&!Xe&&f.jsxs("div",{className:"mt-5",role:"status",children:[f.jsx(mA,{gitVersion:w,error:me}),me?f.jsx("p",{className:Im,children:M2()}):y?Ct:f.jsx("p",{className:Im,children:QE()}),f.jsx(Oe,{className:"mt-2.5",onClick:()=>Fe(!0,!0),disabled:I,children:hb()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Oe,{variant:"ghost",onClick:()=>o(_?0:1),disabled:S,children:[f.jsx(Sb,{size:12})," ",KE()]}),f.jsx("div",{className:"flex-1"}),f.jsx(Oe,{variant:"primary",onClick:()=>void xe(),disabled:S||!Xe||!_&&$===null||!De,children:S?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",KUt()]}):f.jsxs(f.Fragment,{children:[xBt()," ",f.jsx(L1,{size:13})]})})]}),$===null&&!_&&f.jsx("p",{className:uNn,children:jKt()}),N&&f.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[f.jsx(_S,{size:16,className:"shrink-0 text-accent-red"}),f.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:N}),_&&f.jsx(Oe,{size:"small",onClick:()=>void xe(De&&Xe?"complete":"setup"),disabled:S,children:Ks()}),_&&f.jsx(Oe,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:S,onClick:()=>{p(!1),A(null),o(1)},children:BIt()}),f.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:_Bt()}),f.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:E||N})]})]})]})})]})}function pA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function hNn(e){return e.catalogPending?{tone:"warning",label:Uf()}:e.authCheckFailed?{tone:"warning",label:O2()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||m0(e)?u0():e.authMethod==="local"||!e.authenticated?Wj():kGt()}:e.installed?e.installBroken?{tone:"warning",label:BBt()}:e.authMethod==="local"?{tone:"warning",label:UD()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:O2()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:O2()}:e.authState==="unsupported"?{tone:"warning",label:IWt()}:e.installed?{tone:"warning",label:qD()}:{tone:"neutral",label:XE()}:{tone:"neutral",label:XE()}}function pNn(e,r){var t;return{harness:e.id,model:r,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:wy(e,r).defaultId}}function mNn({harness:e}){return f.jsx(sp,{harness:e,size:26})}function gNn({h:e,remote:r,selected:t,onSelect:n,commands:s,onSetup:o}){var x;const a=e.id==="claude-code"?!!e.loginEligible:e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown"),i=!r&&!e.needsConfigRepair&&!e.catalogPending&&(!e.installed||e.installBroken||e.authState==="unsupported"||a),c=!e.agentReady&&i,u=i&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),d=hNn(e),_=t&&!e.authCheckFailed?{tone:"success",label:EUt()}:d,p=(x=e.version)==null?void 0:x.replace(/\s*\(.*\)$/,""),m=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),k=f.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[f.jsx(mNn,{harness:e.id}),f.jsxs("span",{className:"flex flex-col gap-1",children:[f.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,u&&f.jsx(Eh,{tone:d.tone,className:"font-normal",children:d.label})]}),c&&!u&&f.jsx(Eh,{tone:_.tone,children:_.label})]})]}),c?f.jsxs(Oe,{size:"small",onClick:o,disabled:!s,"aria-haspopup":"dialog",title:xwt(),children:[f.jsx(Gc,{size:14}),!e.installed||e.installBroken?zxt():e.authState==="unsupported"?a2t():DD()]}):f.jsx(Eh,{tone:_.tone,children:_.label})]});return e.agentReady?f.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${t?" selected":""}`,"aria-pressed":t,onClick:n,children:[k,e.id!=="opencode"&&f.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",DFt()]}):f.jsxs(f.Fragment,{children:[m0(e)??e.account??(e.authMethod==="apiKey"?Gj():null),e.plan?` · ${e.plan}`:""]})}),m&&f.jsx("div",{className:h_,children:m}),e.authCheckFailed&&e.agentNote&&f.jsx("div",{className:h_,children:x_(e.agentNote)})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[k,e.authState==="unsupported"&&p&&f.jsx("div",{className:h_,children:p}),!c&&e.agentNote&&f.jsx("div",{className:`${h_} [&_code]:whitespace-pre-wrap break-words`,children:x_(e.agentNote)})]})}function vNn({pending:e,error:r,disabled:t,onInstall:n}){return f.jsxs("div",{className:"flex flex-col items-start gap-2.5",children:[f.jsx("p",{className:Im,children:aFt()}),f.jsxs(Oe,{variant:"primary",onClick:n,disabled:e||t,children:[e&&f.jsx(Nt,{}),e?CFt():XBt()]}),r&&f.jsx("p",{className:"text-accent-red text-sm m-0",children:r.message})]})}function mA({gitVersion:e,error:r}){return f.jsxs("div",{className:pP,children:[f.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[f.jsx("span",{className:"onb-card-name font-semibold text-base",children:WFt()}),f.jsx(Eh,{tone:e?"success":r||e===null?"danger":"warning",children:e?Wj():r?GLt():e===null?HD():Uf()})]}),(e||!r&&e===void 0)&&f.jsx("div",{className:h_,children:e??uIt()})]})}function mP(){const e=T.useSyncExternalStore(r7n,TN,TN);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":J4()}),!e&&f.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[f.jsx(_S,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:J4()})]})]})}function bNn({onClose:e,onConfigureSsh:r}){var v,b,w;const t=mr({mutationFn:y=>u6n(...y)}),n=dt(rI()),s=dt($Cn()),o=((v=n.data)==null?void 0:v.hosts)??null,a=s.data??[],[i,c]=T.useState(""),u=o?null:((b=n.error)==null?void 0:b.message)??((w=s.error)==null?void 0:w.message)??null,[d,_]=T.useState(null),p=T.useRef(null);xp(p,e);async function m(y){const S="__ORX_DESKTOP__"in window,z=S?null:window.open("/remote-launch","_blank");if(!S&&!z){tr(Jlr(),"error");return}_(y);try{const N=await t.mutateAsync([y,{theme:w7n(),locale:C()}]);z?z.location.replace(N.gatewayUrl):window.open(N.gatewayUrl,"_blank"),e()}catch(N){z==null||z.close(),tr(N instanceof Error?N.message:String(N),"error")}finally{_(null)}}const k=o==null?void 0:o.filter(y=>y.host.toLocaleLowerCase().includes(i.trim().toLocaleLowerCase())),x=new Map(a.map(y=>[y.host,y]));return Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&e()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":Ear(),onClick:e,children:f.jsx(pn,{size:16})}),f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:n3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:Iar()}),f.jsx(Nn,{"data-initial-focus":!0,className:"mt-4",value:i,onChange:y=>c(y.target.value),placeholder:rN(),"aria-label":rN()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):o===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(Nt,{})," ",mL()]}):(k==null?void 0:k.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:dlr()}):k==null?void 0:k.map(y=>{const S=x.get(y.host);return f.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:d===y.host,onClick:()=>void m(y.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:y.host}),d===y.host?f.jsx(Nt,{}):S?f.jsx("span",{className:"text-sm text-subtext",children:Mlr()}):null]},y.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:r,children:[f.jsx(VI,{size:15}),EL()]})})]})}),document.body)}function Eb({size:e=16,className:r}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:r,"aria-hidden":"true",children:[f.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),f.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}const yNn="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",xNn="/assets/ollama-logo-Bt9O-2K_.png",wNn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",gP={id:"lmstudio",label:"LM Studio",icon:yNn,url:"http://127.0.0.1:1234/v1"},B1=[gP,{id:"omlx",label:"oMLX",icon:wNn,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:xNn,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function vP({installed:e,onConnected:r,dialogOnly:t=!1,onClose:n}){var K,J;const s=dt({...GCn(),enabled:!t}),o=dt(su()),a=(K=o.data)==null?void 0:K.find(ee=>ee.id==="opencode"),[i,c]=T.useState(t),u=()=>{c(!1),n==null||n()},[d,_]=T.useState("lmstudio"),p=B1.find(ee=>ee.id===d)??gP,[m,k]=T.useState({}),x=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:b,model:w,contextWindow:y,error:S}=x,z=p.id==="ollama"?"":x.apiKey,N=ee=>{k(P=>({...P,[p.id]:{...P[p.id]??x,...ee}}))},A=mr({mutationFn:kCn}),E=mr({mutationFn:async ee=>{var F;const P=await jCn(ee);if(!((F=(await Kf(!0)).find(q=>q.id==="opencode"))!=null&&F.models.some(q=>q.id===P.model)))throw new Error(ujt());return P}}),M=mr({mutationFn:CCn}),$=Number(y),D=A.isPending||E.isPending,I=(ee={})=>N({models:[],model:null,error:null,...ee}),G=async()=>{I();try{const ee=await A.mutateAsync({baseUrl:v.trim(),apiKey:z});N({models:ee.models,model:ee.models[0]??null})}catch(ee){N({error:ee instanceof Error?ee.message:String(ee)})}},H=async()=>{if(w){N({error:null});try{const ee=await E.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:z,model:w,contextWindow:$});u(),r==null||r(ee.model)}catch(ee){N({error:ee instanceof Error?ee.message:String(ee)})}}},Q=async ee=>{try{await M.mutateAsync(ee)}catch(P){tr(P instanceof Error?P.message:String(P),"error")}};return f.jsxs(f.Fragment,{children:[!t&&f.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":$E(),children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("h3",{className:"text-base font-medium",children:$E()}),f.jsxs(Oe,{disabled:D,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[f.jsx(pd,{size:14}),ID()]})]}),s.error&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:s.error.message}),f.jsx("div",{className:"space-y-3",children:(J=s.data)==null?void 0:J.map(ee=>f.jsx(kNn,{connection:ee,harnessReady:(a==null?void 0:a.agentReady)??!1,availableModels:(a==null?void 0:a.models.map(P=>P.id))??[],checking:o.isFetching||((a==null?void 0:a.catalogPending)??!1),unknown:o.isError||!o.data,disabled:D||M.isPending,onRemove:()=>void Q(ee.id)},ee.id))})]}),i&&f.jsx(jNn,{busy:D,onClose:u,footer:f.jsxs(Oe,{variant:"primary",disabled:D||!e||b.length>0&&(!w||!Number.isSafeInteger($)||$<4096),onClick:()=>void(b.length>0?H():G()),children:[D&&f.jsx(Nt,{}),b.length>0?GSt():G5t()]}),children:f.jsxs("div",{className:"space-y-4",children:[!e&&f.jsxs("div",{className:"text-sm text-text",children:[f.jsx("p",{children:SSt()}),f.jsx(Xf,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:pSt()})]}),f.jsx(tc,{choices:B1,value:d,title:OE(),header:OE(),variant:"field",floating:!0,dropDown:!0,disabled:D,renderLabel:ee=>f.jsxs(f.Fragment,{children:[ee.id==="openai-compatible"?qj():ee.label,ee.id==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:PD()})]}),renderIcon:ee=>{var L;const P=(L=B1.find(F=>F.id===ee.id))==null?void 0:L.icon;return P?f.jsx("img",{src:P,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${ee.id==="ollama"?" dark:invert":""}`}):f.jsx(qI,{size:14,className:"shrink-0"})},onSelect:_}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:$5t()}),f.jsx(Nn,{value:v,disabled:D,onChange:ee=>{I({baseUrl:ee.target.value})}})]}),p.id!=="ollama"&&f.jsxs("details",{className:"text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:aL()}),f.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[f.jsx("span",{children:p.id==="lmstudio"?b6t():$St()}),f.jsx(Nn,{type:"password",autoComplete:"off",value:z,disabled:D,onChange:ee=>I({apiKey:ee.target.value})})]})]},p.id),b.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(tc,{choices:b.map(ee=>({id:ee,label:ee})),value:w,searchPlaceholder:W8t(),title:Wm(),header:Wm(),variant:"field",floating:!0,dropDown:!0,disabled:D,onSelect:ee=>{N({model:ee})}}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:Ajt()}),f.jsx(Nn,{type:"number",min:4096,step:1024,value:y,disabled:D,onChange:ee=>{N({contextWindow:ee.target.value})}})]}),f.jsx("p",{className:"text-sm text-subtext",children:Bjt()})]}),S&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:S})]})})]})}function kNn({connection:e,harnessReady:r,availableModels:t,checking:n,unknown:s,disabled:o,onRemove:a}){const i=mr({mutationFn:async()=>{try{await SCn(e.id)}finally{await Kf(!0)}}}),c=B1.find(k=>k.label===e.name||k.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),d=u.length>0&&r&&u.every(k=>t.includes(`${e.id}/${k}`)),_=i.isPending||n,p=s,m=d;return f.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[f.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[c!=null&&c.icon?f.jsx("img",{src:c.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${c.id==="ollama"?" dark:invert":""}`}):f.jsx(qI,{size:20,className:"mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 space-y-1",children:[f.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),f.jsxs("div",{className:"text-sm text-subtext break-all",children:[(c==null?void 0:c.id)==="openai-compatible"?qj():(c==null?void 0:c.label)??e.name,(c==null?void 0:c.id)==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:PD()})," · ",e.baseUrl]})]})]}),f.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[f.jsx("span",{role:"status",children:f.jsx(Zt,{variant:_||p?"default":m?"success":"warning",children:_?Ga():p?vL():m?yjt():wi()})}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(Oe,{variant:"ghost",disabled:o||i.isPending,onClick:()=>i.mutate(),children:[f.jsx(Ei,{size:14}),hb()]}),f.jsx(Rt,{"aria-label":oSt({name:e.name}),disabled:o||i.isPending,onClick:a,children:f.jsx(gd,{size:14})})]})]})]}),i.error&&!m&&f.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:i.error.message})]})}function jNn({busy:e,onClose:r,footer:t,children:n}){const s=T.useRef(null),o=()=>{e||r()};return xp(s,o,"input"),Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&o()},children:f.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[f.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:f.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:ID()})}),f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":Gf(),onClick:o,disabled:e,children:f.jsx(pn,{size:16})}),f.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:n}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[f.jsx(Oe,{onClick:o,disabled:e,children:Gf()}),t]})]})}),document.body)}const bP=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),Q2=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-surface [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),t_={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function SNn(e){var n,s;const r=e.find(o=>o.agentReady);if(!r)return null;const t=((n=r.models[0])==null?void 0:n.id)??null;return{harness:r.id,model:t,serviceTier:xb(r,t,null),permissionMode:((s=r.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:wy(r,t).defaultId}}function ba(e){const[r,t]=T.useState(!1),n=T.useRef(null);return T.useEffect(()=>{if(!r)return;const s=a=>{var i,c;a.target instanceof Node&&!((i=n.current)!=null&&i.contains(a.target))&&!((c=e==null?void 0:e.current)!=null&&c.contains(a.target))&&t(!1)},o=a=>{var i;a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),t(!1),(i=e==null?void 0:e.current)==null||i.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",o,!0)}},[r,e]),{open:r,setOpen:t,ref:n}}function CNn({value:e,onSelect:r,onOpenSettings:t,permissionChoices:n=[],defaultPermissionId:s,onSelectPermission:o,reasoningChoices:a=[],defaultReasoningId:i,onSelectReasoning:c,autonomy:u,onSelectAutonomy:d,lockHarness:_=!1,openRequest:p=0,className:m}){var Xe,Me,Fe,pt,Ct,Vt,Ut,Gt;const{data:k=zNn}=dt(su()),x=o0(),[v,b]=T.useState(!1),w=T.useRef(null),y=T.useRef(null),{open:S,setOpen:z,ref:N}=ba(w),[A,E]=T.useState(""),[M,$]=T.useState("root"),D=()=>{z(!1),$("root"),E("")},I=T.useRef(p);T.useEffect(()=>{p!==I.current&&(I.current=p,$("models"),E(""),z(!0))},[p,z]),T.useEffect(()=>{var De;S&&(M==="reasoning"||M==="speed"||M==="permissions")&&((De=y.current)==null||De.focus())},[S,M]);const G=T.useMemo(()=>{const De=A.trim().toLowerCase();return(_&&e?k.filter(lt=>lt.id===e.harness):k).map(lt=>{let xe=lt.models;return De?xe=xe.filter(Ie=>`${Ie.id} ${$1(Ie)}`.toLowerCase().includes(De)):(lt.id==="opencode"||lt.id==="cursor"||lt.id==="antigravity")&&(xe=xe.slice(0,5)),{harness:lt,models:xe,hidden:De?0:lt.models.length-xe.length}})},[k,A,_,e]),H=(De,ct)=>{var xe;const lt=(e==null?void 0:e.harness)===De.id;r({harness:De.id,model:ct,serviceTier:xb(De,ct,lt?e==null?void 0:e.serviceTier:null),permissionMode:lt?e.permissionMode:((xe=De.options)==null?void 0:xe.defaultPermissionMode)??null,reasoningLevel:JL(De,ct,lt&&De.models.some(Ie=>Ie.id===ct)?e.reasoningLevel:null)}),D()},Q=(e==null?void 0:e.model)!=null?(Xe=k.find(De=>De.id===e.harness))==null?void 0:Xe.models.find(De=>De.id===e.model):void 0,K=e?e.model?Q?$1(Q):`${f3(e.model)} · ${PE()}`:Y4():Wm(),J=(e==null?void 0:e.reasoningLevel)??i??((Me=a[0])==null?void 0:Me.id),ee=(Fe=a.find(De=>De.id===J))==null?void 0:Fe.label,P=(e==null?void 0:e.permissionMode)??s??((pt=n[0])==null?void 0:pt.id),L=(Ct=n.find(De=>De.id===P))==null?void 0:Ct.label,F=(e==null?void 0:e.harness)==="opencode"?oEt():Hzt(),q=k.find(De=>De.id===(e==null?void 0:e.harness)),U=ZL(q,e==null?void 0:e.model),oe=xb(q,e==null?void 0:e.model,e==null?void 0:e.serviceTier),ie=(Vt=U.find(De=>De.id===oe))==null?void 0:Vt.label,ce=De=>{c==null||c(De),D()},re=De=>{o==null||o(De),D()},W=[{id:"agentic",label:v7t(),description:E7t()},{id:"copilot",label:I7t(),description:V7t()}],ae=(Ut=W.find(De=>De.id===u))==null?void 0:Ut.label,le=De=>{const ct=W.find(lt=>lt.id===De);ct&&(d==null||d(ct.id)),D()},me=De=>{e&&r({...e,serviceTier:De}),D()},be=(De,ct,lt)=>f.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>$(lt),children:[f.jsx("span",{className:"flex-1",children:De}),ct&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:ct}),f.jsx(Xa,{size:14,className:"shrink-0 text-muted"})]}),Se=De=>f.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[f.jsx(Rt,{ref:y,type:"button",size:"small",className:"model-submenu-header","aria-label":XD(),onClick:()=>{$("root"),E("")},children:f.jsx(uS,{size:15})}),f.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:De}),M==="models"&&f.jsx(Rt,{type:"button",size:"small","aria-label":a3(),onClick:()=>{D(),t()},children:f.jsx(Ey,{size:15,"aria-hidden":"true"})})]}),Be=(De,ct,lt,xe)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:De.map(Ie=>f.jsxs(_r,{onClick:()=>xe(Ie.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[Ie.label,Ie.id===lt&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",BD()]})]}),Ie.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Ie.description})]}),Ie.id===ct&&f.jsx(_o,{size:13})]},Ie.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:N,children:[f.jsxs("button",{ref:w,type:"button",className:Ls("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",m),title:EY({label:`${K}${ee?` · ${ee}`:""}${ie?` · ${ie}`:""}`}),"aria-haspopup":"menu","aria-expanded":S,onClick:()=>{S?D():($("root"),z(!0))},children:[oe==="priority"?f.jsx(jEn,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(sp,{harness:e.harness,size:14}):null,oe==="priority"&&f.jsxs("span",{className:"sr-only",children:[Zzt()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[K,ee&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:ee})]}),f.jsx(Zc,{size:14,className:"shrink-0 text-muted"})]}),S&&f.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[M==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[be(Wm(),K,"models"),a.length>0&&be(F,ee,"reasoning"),U.length>0&&be(IE(),ie,"speed"),n.length>0&&be(LE(),L,"permissions"),d&&be(DE(),ae,"autonomy")]}),M==="models"&&f.jsxs(f.Fragment,{children:[Se(Wm()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:r9t(),value:A,onChange:De=>E(De.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[G.map(({harness:De,models:ct,hidden:lt})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:bP,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(sp,{harness:De.id,size:14}),De.name]}),!De.agentReady&&f.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:De.catalogPending?Uf():f.jsxs(f.Fragment,{children:[f.jsx(JN,{size:10})," ",wi()]})})]}),De.agentReady?f.jsxs(f.Fragment,{children:[!A.trim()&&f.jsxs(_r,{onClick:()=>H(De,null),children:[f.jsx("span",{children:Y4()}),(e==null?void 0:e.harness)===De.id&&(e==null?void 0:e.model)===null&&f.jsx(_o,{size:13})]}),De.models.length===0&&De.agentNote&&f.jsx("div",{className:Q2,children:x_(De.agentNote)}),ct.map(xe=>f.jsxs(_r,{title:xe.id,onClick:()=>H(De,xe.id),children:[f.jsx("span",{children:$1(xe)}),(e==null?void 0:e.harness)===De.id&&(e==null?void 0:e.model)===xe.id&&f.jsx(_o,{size:13})]},xe.id)),A.trim().length>0&&!De.models.some(xe=>xe.id===A.trim())&&f.jsx(_r,{onClick:()=>H(De,A.trim()),children:f.jsxs("span",{children:[Q9t({id:Ee(A.trim())})," · ",PE()]})})]}):f.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-surface [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:De.catalogPending?Uf():De.agentNote?x_(De.agentNote):D8t()}),De.id==="opencode"&&f.jsx(_r,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var xe;D(),(xe=w.current)==null||xe.focus(),b(!0)},children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[JCt(),f.jsx(pd,{size:14,"aria-hidden":"true"})]})}),De.agentReady&<>0&&f.jsx("div",{className:Q2,children:C8t({count:fr(lt)})})]},De.id)),k.length===0&&f.jsx("div",{className:Q2,children:Rzt()})]}),_&&e&&k.length>1&&f.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[f.jsx(JN,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),f9t()]})]}),M==="reasoning"&&f.jsxs(f.Fragment,{children:[Se(F),Be(a,J,i,ce)]}),M==="permissions"&&f.jsxs(f.Fragment,{children:[Se(LE()),Be(n,P,s,re)]}),M==="autonomy"&&f.jsxs(f.Fragment,{children:[Se(DE()),Be(W,u,l3,le)]}),M==="speed"&&f.jsxs(f.Fragment,{children:[Se(IE()),Be(U,oe??void 0,"default",me)]})]}),v&&f.jsx(vP,{dialogOnly:!0,installed:((Gt=k.find(De=>De.id==="opencode"))==null?void 0:Gt.installed)??!1,onClose:()=>b(!1),onConnected:De=>{var lt;const ct=(lt=x.getQueryData(su().queryKey))==null?void 0:lt.find(xe=>xe.id==="opencode");ct&&(!_||(e==null?void 0:e.harness)==="opencode")&&H(ct,De)}})]})}function tc({choices:e,value:r,defaultId:t,header:n,align:s="left",dropDown:o=!1,disabled:a=!1,variant:i="pill",title:c,numbered:u=!1,searchPlaceholder:d,renderIcon:_,renderLabel:p,floating:m=!1,onSelect:k,className:x}){var Q,K;const v=T.useRef(null),{open:b,setOpen:w,ref:y}=ba(v),S=T.useRef(null),[z,N]=T.useState("");if(T.useLayoutEffect(()=>{var L;const J=S.current,ee=y.current;if(!b||!m||!J||!ee)return;J.matches(":popover-open")||(J.showPopover(),(L=J.querySelector("input"))==null||L.focus());const P=()=>{const F=ee.getBoundingClientRect(),q=window.innerHeight-F.bottom-12,U=F.top-12,oe=Math.min(380,J.scrollHeight),ie=o?q>=oe||q>=U:UU;J.style.width=`${F.width}px`,J.style.minWidth="0",J.style.maxHeight=`${Math.max(0,Math.min(380,ie?q:U))}px`,J.style.left=`${F.left}px`,J.style.top=`${ie?F.bottom+4:F.top-J.getBoundingClientRect().height-4}px`};return P(),window.addEventListener("resize",P),window.addEventListener("scroll",P,!0),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,!0)}},[b,m,o,z,e.length,y]),e.length===0)return null;const A=r??t??((Q=e[0])==null?void 0:Q.id)??null,E=e.find(J=>J.id===A),M=e.find(J=>J.id===t),$=i==="bare"&&(M==null?void 0:M.id)===yb?M:void 0,I=($?e.filter(J=>J.id!==$.id):e).filter(J=>`${J.label} ${J.id}`.toLowerCase().includes(z.toLowerCase())),G=(E==null?void 0:E.label)??((K=e[0])==null?void 0:K.label)??"",H=J=>{var ee;k(J),w(!1),(ee=v.current)==null||ee.focus()};return f.jsxs("div",{className:`option-picker relative inline-flex${i==="field"?" w-full":""}`,ref:y,children:[f.jsxs("button",{ref:v,type:"button",className:Ls(i==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${i==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,x),title:c,"aria-haspopup":"menu","aria-expanded":b,disabled:a,onClick:()=>{N(""),w(J=>!J)},children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[E&&(_==null?void 0:_(E)),f.jsx("span",{className:"truncate",children:E?(p==null?void 0:p(E))??G:G})]}),f.jsx(Zc,{size:12})]}),b&&f.jsxs("div",{ref:S,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(J=>J.description)?"min-w-80":""} ${i==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${o?"drop-down":""}`,children:[n&&f.jsx("div",{className:bP,children:n}),d&&f.jsx("input",{autoFocus:!0,"aria-label":d,placeholder:d,value:z,onChange:J=>N(J.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),f.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[$&&f.jsxs(f.Fragment,{children:[f.jsxs(_r,{type:"button",onClick:()=>H($.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_($),f.jsxs("span",{children:[(p==null?void 0:p($))??$.label,f.jsx("span",{className:"option-default text-muted font-normal",children:szt()})]})]}),A===$.id&&f.jsx(_o,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),I.map((J,ee)=>f.jsxs(_r,{type:"button",onClick:()=>H(J.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(J),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[(p==null?void 0:p(J))??J.label,!$&&J.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",BD()]})]}),J.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:J.description})]})]}),A===J.id?f.jsx(_o,{size:13}):u&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:ee+1})]},J.id))]})]})]})}const zNn=[];function L3({runtime:e,corner:r=!1}){const[t,n]=T.useState(!1),[s,o]=T.useState(!1),[a,i]=T.useState(!1),[c,u]=T.useState(null),d=ba();async function _(){if(c){i(!0);try{await QL(c),u(null)}catch(p){u(null),tr(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:r?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:d.ref,children:[d.open&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[f.jsx("div",{className:"text-sm font-medium text-text",children:Yor({host:Ee(e.session.host),user:Ee(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ee(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(_r,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{n(!0);try{await KL(),d.setOpen(!1)}catch(p){tr(p instanceof Error?p.message:String(p),"error")}finally{n(!1)}},children:t?For():s3()}),f.jsx(d0,{content:qlr(),className:"me-2 shrink-0 text-subtext",children:f.jsx(dS,{size:15})})]}),f.jsx(_r,{danger:!0,disabled:s,onClick:async()=>{o(!0);try{u(await VL()),d.setOpen(!1)}catch(p){tr(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}},children:JD()})]}),r?f.jsxs(Oe,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:[f.jsx(Eb,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:$2({host:Ee(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Rt,{size:"small","aria-label":$2({host:Ee(e.session.host)}),"aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:f.jsx(Eb,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:$2({host:Ee(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ee(e.session.version??"…")]})]})]})]}),c&&f.jsx(MI,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void _()})]})}const Nb="code-source-text",yP="code-source-wrap",xP="file-view-gutter text-right text-muted select-none";function wP(e){const r=String(e).length+2;return{ruleCh:r,codeCh:r+2}}const ENn={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},NNn={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function I3(e){const r=e.trim().toLowerCase();return ENn[r]??r}function jS(e){var s;if(!e)return null;const r=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=NNn[r];if(t)return I3(t);const n=r.lastIndexOf(".");return n===-1||n===r.length-1?null:I3(r.slice(n+1))}Jc.displayName="clike";Jc.aliases=[];function Jc(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}g0.displayName="c";g0.aliases=[];function g0(e){e.register(Jc),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}Oy.displayName="cpp";Oy.aliases=[];function Oy(e){e.register(g0),(function(r){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});r.languages.cpp=r.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),r.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),r.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:r.languages.cpp}}}}),r.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),r.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:r.languages.extend("cpp",{})}}),r.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},r.languages.cpp["base-clause"])})(e)}SS.displayName="arduino";SS.aliases=["ino"];function SS(e){e.register(Oy),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}CS.displayName="bash";CS.aliases=["sh","shell"];function CS(e){(function(r){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};r.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=r.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=s.variable[1].inside,i=0;i>/g,function(q,U){return"(?:"+F[+U]+")"})}function n(L,F,q){return RegExp(t(L,F),"")}function s(L,F){for(var q=0;q>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var o={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function a(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var i=a(o.typeDeclaration),c=RegExp(a(o.type+" "+o.typeDeclaration+" "+o.contextual+" "+o.other)),u=a(o.typeDeclaration+" "+o.contextual+" "+o.other),d=a(o.type+" "+o.typeDeclaration+" "+o.other),_=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,k=t(/<<0>>(?:\s*<<1>>)?/.source,[m,_]),x=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,k]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[x,v]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[_,p,v]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),S=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,x,v]),z={keyword:c,punctuation:/[<>()?,.:[\]]/},N=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,E=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;r.languages.csharp=r.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[x]),lookbehind:!0,inside:z},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,S]),lookbehind:!0,inside:z},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[i,k]),lookbehind:!0,inside:z},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[x]),lookbehind:!0,inside:z},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:z},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[S,d,m]),inside:z}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),r.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),r.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),r.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:z},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[S,x]),inside:z,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[S]),lookbehind:!0,inside:z,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,_]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(_),alias:"class-name",inside:z}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[i,k,m,S,c.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[k,p]),lookbehind:!0,greedy:!0,inside:r.languages.csharp},keyword:c,"class-name":{pattern:RegExp(S),greedy:!0,inside:z},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=A+"|"+N,$=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),D=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[$]),2),I=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,G=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[x,D]);r.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[I,G]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[I]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[D]),inside:r.languages.csharp},"class-name":{pattern:RegExp(x),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var H=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[$]),2),K=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,H]),J=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),ee=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[J,H]);function P(L,F){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,H]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:r.languages.csharp}}},string:/[\s\S]+/}}r.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[K]),lookbehind:!0,greedy:!0,inside:P(K,Q)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[ee]),lookbehind:!0,greedy:!0,inside:P(ee,J)}],char:{pattern:RegExp(N),greedy:!0}}),r.languages.dotnet=r.languages.cs=r.languages.csharp})(e)}v0.displayName="markup";v0.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function v0(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var s={};s["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},s.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:s}};o["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(r,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}kp.displayName="css";kp.aliases=[];function kp(e){(function(r){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var n=r.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(e)}ES.displayName="diff";ES.aliases=[];function ES(e){(function(r){r.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var s=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),n==="diff"&&o.push("bold"),r.languages.diff[n]={pattern:RegExp("^(?:["+s+`].*(?:\r +`))}finally{E(!1)}}};return f.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-background onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&c.data&&f.jsx(dP,{harness:u,commands:c.data[u.id],onReady:Ae=>{D(Ae.id)},onClose:()=>{d(null)}}),f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?f.jsxs("div",{className:"onb-intro flex min-h-dvh flex-col items-center justify-center gap-6 text-center",children:[f.jsx(cNn,{className:"pointer-events-none fixed inset-0 size-full"}),f.jsx("div",{className:"onb-intro-brand relative text-6xl font-semibold leading-none tracking-[-0.035em] animate-[onb-warp-in_700ms_cubic-bezier(0.16,1,0.3,1)_1250ms_both] motion-reduce:animate-none",children:f.jsx(K2,{})}),f.jsx("h2",{className:"onb-title relative m-0 text-2xl font-medium text-muted tracking-[-0.02em] animate-[onb-welcome-in_700ms_ease-out_1700ms_both] motion-reduce:animate-none",children:bWt()}),f.jsx("div",{className:"relative mt-6 animate-[onb-welcome-in_600ms_ease-out_2300ms_both] motion-reduce:animate-none",children:f.jsxs(Oe,{variant:"primary",size:"large",onClick:lt,disabled:I&&b===null,children:[I&&b===null?f.jsx(Nt,{}):null,VE()," ",f.jsx(L1,{size:20})]})})]}):s===1?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(K2,{}),f.jsx("span",{children:MGt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:yIt()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:NHt()}),b!==null&&!Se&&!Be&&f.jsx("p",{className:hA,children:dGt()}),b!==null&&Se&&$===null&&f.jsx("p",{className:hA,children:AIt()}),(x===null||me)&&f.jsxs("div",{className:"onb-git-check mt-7 mb-5.5",role:"status","aria-live":"polite",children:[f.jsx(mA,{gitVersion:x,error:me}),me?f.jsx("p",{className:Im,children:M2()}):y?Ct:f.jsx("p",{className:Im,children:QE()})]}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(Ae=>{var Ve;return f.jsx(gNn,{h:Ae,remote:t,selected:$===Ae.id,onSelect:()=>D(Ae.id),commands:(Ve=c.data)==null?void 0:Ve[Ae.id],onSetup:()=>d(Ae)},Ae.id)}):ae?f.jsx("div",{className:h_,children:M2()}):f.jsxs(Gn,{className:"py-2",children:[f.jsx(Nt,{})," ",GPt()]})}),c.isError&&f.jsxs("p",{className:h_,children:[Kxt()," ",f.jsx(Oe,{variant:"ghost",onClick:()=>void c.refetch(),children:Ks()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Oe,{variant:"ghost",onClick:()=>o(0),children:[f.jsx(Sb,{size:12})," ",KE()]}),f.jsxs(Oe,{variant:"ghost",onClick:()=>Fe(!0,!0),disabled:I,children:[f.jsx(Ei,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",hb()]}),f.jsx("div",{className:"flex-1"}),f.jsxs(Oe,{variant:"primary",onClick:()=>o(2),disabled:I||!Se||$===null||!Xe,title:I||!Se&&Be?sKt():Se?$===null?mPt():me?kqt():x===void 0?VWt():x===null?mFt():void 0:nGt(),children:[VE()," ",f.jsx(L1,{size:13})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(K2,{}),!_&&f.jsx("span",{children:qGt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:JGt()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:pP,children:[f.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[f.jsx("legend",{children:hKt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:aPt()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:_Nn.map(Ae=>f.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[f.jsx("input",{type:"checkbox",checked:F.includes(Ae.id),onChange:()=>Gt(Ae.id),disabled:S}),f.jsx("span",{children:Ae.label()})]},Ae.id))}),F.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:K,onChange:Ae=>J(Ae.target.value),disabled:S,placeholder:lWt(),"aria-label":QHt()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:qqt()}),f.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:ee,onChange:Ae=>P(Ae.target.value),disabled:S,rows:4,placeholder:tBt()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:Mqt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:TDt()}),f.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[f.jsx("input",{id:"onb-paper-search",value:q,onChange:Ae=>U(Ae.target.value),disabled:S,placeholder:cUt()}),ce?f.jsx("div",{className:h_,children:vUt()}):oe.length>0?f.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:oe.map(Ae=>f.jsxs("button",{type:"button",onClick:()=>Vt(Ae),disabled:S,children:[f.jsx(vg,{children:pA(Ae.title)}),f.jsx("span",{className:"id",children:Ae.paperId})]},Ae.paperId))}):null]}),L.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:L.map(Ae=>f.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[f.jsx(vg,{children:Ae.title||Ae.paperId}),f.jsx("span",{className:"id",children:Ae.paperId}),f.jsx("button",{type:"button","aria-label":vte({name:Ee(Ae.paperId)}),onClick:()=>Ut(Ae.paperId),disabled:S,children:f.jsx(pn,{size:12})})]},Ae.paperId))})]})}),!De&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:F.length===0?XIt():$Pt()}),_&&!Xe&&f.jsxs("div",{className:"mt-5",role:"status",children:[f.jsx(mA,{gitVersion:x,error:me}),me?f.jsx("p",{className:Im,children:M2()}):y?Ct:f.jsx("p",{className:Im,children:QE()}),f.jsx(Oe,{className:"mt-2.5",onClick:()=>Fe(!0,!0),disabled:I,children:hb()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Oe,{variant:"ghost",onClick:()=>o(_?0:1),disabled:S,children:[f.jsx(Sb,{size:12})," ",KE()]}),f.jsx("div",{className:"flex-1"}),f.jsx(Oe,{variant:"primary",onClick:()=>void xe(),disabled:S||!Xe||!_&&$===null||!De,children:S?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",KUt()]}):f.jsxs(f.Fragment,{children:[xBt()," ",f.jsx(L1,{size:13})]})})]}),$===null&&!_&&f.jsx("p",{className:uNn,children:jKt()}),N&&f.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[f.jsx(_S,{size:16,className:"shrink-0 text-accent-red"}),f.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:N}),_&&f.jsx(Oe,{size:"small",onClick:()=>void xe(De&&Xe?"complete":"setup"),disabled:S,children:Ks()}),_&&f.jsx(Oe,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:S,onClick:()=>{p(!1),A(null),o(1)},children:BIt()}),f.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:_Bt()}),f.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:z||N})]})]})]})})]})}function pA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function hNn(e){return e.catalogPending?{tone:"warning",label:Uf()}:e.authCheckFailed?{tone:"warning",label:O2()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||m0(e)?u0():e.authMethod==="local"||!e.authenticated?Wj():kGt()}:e.installed?e.installBroken?{tone:"warning",label:BBt()}:e.authMethod==="local"?{tone:"warning",label:UD()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:O2()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:O2()}:e.authState==="unsupported"?{tone:"warning",label:IWt()}:e.installed?{tone:"warning",label:qD()}:{tone:"neutral",label:XE()}:{tone:"neutral",label:XE()}}function pNn(e,r){var t;return{harness:e.id,model:r,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:wy(e,r).defaultId}}function mNn({harness:e}){return f.jsx(sp,{harness:e,size:26})}function gNn({h:e,remote:r,selected:t,onSelect:n,commands:s,onSetup:o}){var w;const a=e.id==="claude-code"?!!e.loginEligible:e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown"),i=!r&&!e.needsConfigRepair&&!e.catalogPending&&(!e.installed||e.installBroken||e.authState==="unsupported"||a),c=!e.agentReady&&i,u=i&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),d=hNn(e),_=t&&!e.authCheckFailed?{tone:"success",label:EUt()}:d,p=(w=e.version)==null?void 0:w.replace(/\s*\(.*\)$/,""),m=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),k=f.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[f.jsx(mNn,{harness:e.id}),f.jsxs("span",{className:"flex flex-col gap-1",children:[f.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,u&&f.jsx(Eh,{tone:d.tone,className:"font-normal",children:d.label})]}),c&&!u&&f.jsx(Eh,{tone:_.tone,children:_.label})]})]}),c?f.jsxs(Oe,{size:"small",onClick:o,disabled:!s,"aria-haspopup":"dialog",title:xwt(),children:[f.jsx(Gc,{size:14}),!e.installed||e.installBroken?zxt():e.authState==="unsupported"?a2t():DD()]}):f.jsx(Eh,{tone:_.tone,children:_.label})]});return e.agentReady?f.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${t?" selected":""}`,"aria-pressed":t,onClick:n,children:[k,e.id!=="opencode"&&f.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{})," ",DFt()]}):f.jsxs(f.Fragment,{children:[m0(e)??e.account??(e.authMethod==="apiKey"?Gj():null),e.plan?` · ${e.plan}`:""]})}),m&&f.jsx("div",{className:h_,children:m}),e.authCheckFailed&&e.agentNote&&f.jsx("div",{className:h_,children:x_(e.agentNote)})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[k,e.authState==="unsupported"&&p&&f.jsx("div",{className:h_,children:p}),!c&&e.agentNote&&f.jsx("div",{className:`${h_} [&_code]:whitespace-pre-wrap break-words`,children:x_(e.agentNote)})]})}function vNn({pending:e,error:r,disabled:t,onInstall:n}){return f.jsxs("div",{className:"flex flex-col items-start gap-2.5",children:[f.jsx("p",{className:Im,children:aFt()}),f.jsxs(Oe,{variant:"primary",onClick:n,disabled:e||t,children:[e&&f.jsx(Nt,{}),e?CFt():XBt()]}),r&&f.jsx("p",{className:"text-accent-red text-sm m-0",children:r.message})]})}function mA({gitVersion:e,error:r}){return f.jsxs("div",{className:pP,children:[f.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[f.jsx("span",{className:"onb-card-name font-semibold text-base",children:WFt()}),f.jsx(Eh,{tone:e?"success":r||e===null?"danger":"warning",children:e?Wj():r?GLt():e===null?HD():Uf()})]}),(e||!r&&e===void 0)&&f.jsx("div",{className:h_,children:e??uIt()})]})}function mP(){const e=T.useSyncExternalStore(r7n,TN,TN);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":J4()}),!e&&f.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[f.jsx(_S,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:J4()})]})]})}function bNn({onClose:e,onConfigureSsh:r}){var v,b,x;const t=mr({mutationFn:y=>u6n(...y)}),n=dt(rI()),s=dt($Cn()),o=((v=n.data)==null?void 0:v.hosts)??null,a=s.data??[],[i,c]=T.useState(""),u=o?null:((b=n.error)==null?void 0:b.message)??((x=s.error)==null?void 0:x.message)??null,[d,_]=T.useState(null),p=T.useRef(null);xp(p,e);async function m(y){const S="__ORX_DESKTOP__"in window,E=S?null:window.open("/remote-launch","_blank");if(!S&&!E){tr(Jlr(),"error");return}_(y);try{const N=await t.mutateAsync([y,{theme:w7n(),locale:C()}]);E?E.location.replace(N.gatewayUrl):window.open(N.gatewayUrl,"_blank"),e()}catch(N){E==null||E.close(),tr(N instanceof Error?N.message:String(N),"error")}finally{_(null)}}const k=o==null?void 0:o.filter(y=>y.host.toLocaleLowerCase().includes(i.trim().toLocaleLowerCase())),w=new Map(a.map(y=>[y.host,y]));return Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&e()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":Ear(),onClick:e,children:f.jsx(pn,{size:16})}),f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:n3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:Iar()}),f.jsx(Nn,{"data-initial-focus":!0,className:"mt-4",value:i,onChange:y=>c(y.target.value),placeholder:rN(),"aria-label":rN()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):o===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(Nt,{})," ",mL()]}):(k==null?void 0:k.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:dlr()}):k==null?void 0:k.map(y=>{const S=w.get(y.host);return f.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:d===y.host,onClick:()=>void m(y.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:y.host}),d===y.host?f.jsx(Nt,{}):S?f.jsx("span",{className:"text-sm text-subtext",children:Mlr()}):null]},y.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:r,children:[f.jsx(VI,{size:15}),EL()]})})]})}),document.body)}function Eb({size:e=16,className:r}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:r,"aria-hidden":"true",children:[f.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),f.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}const yNn="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",xNn="/assets/ollama-logo-Bt9O-2K_.png",wNn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",gP={id:"lmstudio",label:"LM Studio",icon:yNn,url:"http://127.0.0.1:1234/v1"},B1=[gP,{id:"omlx",label:"oMLX",icon:wNn,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:xNn,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function vP({installed:e,onConnected:r,dialogOnly:t=!1,onClose:n}){var K,J;const s=dt({...GCn(),enabled:!t}),o=dt(su()),a=(K=o.data)==null?void 0:K.find(ee=>ee.id==="opencode"),[i,c]=T.useState(t),u=()=>{c(!1),n==null||n()},[d,_]=T.useState("lmstudio"),p=B1.find(ee=>ee.id===d)??gP,[m,k]=T.useState({}),w=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:b,model:x,contextWindow:y,error:S}=w,E=p.id==="ollama"?"":w.apiKey,N=ee=>{k(P=>({...P,[p.id]:{...P[p.id]??w,...ee}}))},A=mr({mutationFn:kCn}),z=mr({mutationFn:async ee=>{var H;const P=await jCn(ee);if(!((H=(await Kf(!0)).find(q=>q.id==="opencode"))!=null&&H.models.some(q=>q.id===P.model)))throw new Error(ujt());return P}}),M=mr({mutationFn:CCn}),$=Number(y),D=A.isPending||z.isPending,I=(ee={})=>N({models:[],model:null,error:null,...ee}),G=async()=>{I();try{const ee=await A.mutateAsync({baseUrl:v.trim(),apiKey:E});N({models:ee.models,model:ee.models[0]??null})}catch(ee){N({error:ee instanceof Error?ee.message:String(ee)})}},F=async()=>{if(x){N({error:null});try{const ee=await z.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:E,model:x,contextWindow:$});u(),r==null||r(ee.model)}catch(ee){N({error:ee instanceof Error?ee.message:String(ee)})}}},Q=async ee=>{try{await M.mutateAsync(ee)}catch(P){tr(P instanceof Error?P.message:String(P),"error")}};return f.jsxs(f.Fragment,{children:[!t&&f.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":$E(),children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("h3",{className:"text-base font-medium",children:$E()}),f.jsxs(Oe,{disabled:D,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[f.jsx(pd,{size:14}),ID()]})]}),s.error&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:s.error.message}),f.jsx("div",{className:"space-y-3",children:(J=s.data)==null?void 0:J.map(ee=>f.jsx(kNn,{connection:ee,harnessReady:(a==null?void 0:a.agentReady)??!1,availableModels:(a==null?void 0:a.models.map(P=>P.id))??[],checking:o.isFetching||((a==null?void 0:a.catalogPending)??!1),unknown:o.isError||!o.data,disabled:D||M.isPending,onRemove:()=>void Q(ee.id)},ee.id))})]}),i&&f.jsx(jNn,{busy:D,onClose:u,footer:f.jsxs(Oe,{variant:"primary",disabled:D||!e||b.length>0&&(!x||!Number.isSafeInteger($)||$<4096),onClick:()=>void(b.length>0?F():G()),children:[D&&f.jsx(Nt,{}),b.length>0?GSt():G5t()]}),children:f.jsxs("div",{className:"space-y-4",children:[!e&&f.jsxs("div",{className:"text-sm text-text",children:[f.jsx("p",{children:SSt()}),f.jsx(Xf,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:pSt()})]}),f.jsx(tc,{choices:B1,value:d,title:OE(),header:OE(),variant:"field",floating:!0,dropDown:!0,disabled:D,renderLabel:ee=>f.jsxs(f.Fragment,{children:[ee.id==="openai-compatible"?qj():ee.label,ee.id==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:PD()})]}),renderIcon:ee=>{var L;const P=(L=B1.find(H=>H.id===ee.id))==null?void 0:L.icon;return P?f.jsx("img",{src:P,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${ee.id==="ollama"?" dark:invert":""}`}):f.jsx(qI,{size:14,className:"shrink-0"})},onSelect:_}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:$5t()}),f.jsx(Nn,{value:v,disabled:D,onChange:ee=>{I({baseUrl:ee.target.value})}})]}),p.id!=="ollama"&&f.jsxs("details",{className:"text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:aL()}),f.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[f.jsx("span",{children:p.id==="lmstudio"?b6t():$St()}),f.jsx(Nn,{type:"password",autoComplete:"off",value:E,disabled:D,onChange:ee=>I({apiKey:ee.target.value})})]})]},p.id),b.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(tc,{choices:b.map(ee=>({id:ee,label:ee})),value:x,searchPlaceholder:W8t(),title:Wm(),header:Wm(),variant:"field",floating:!0,dropDown:!0,disabled:D,onSelect:ee=>{N({model:ee})}}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:Ajt()}),f.jsx(Nn,{type:"number",min:4096,step:1024,value:y,disabled:D,onChange:ee=>{N({contextWindow:ee.target.value})}})]}),f.jsx("p",{className:"text-sm text-subtext",children:Bjt()})]}),S&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:S})]})})]})}function kNn({connection:e,harnessReady:r,availableModels:t,checking:n,unknown:s,disabled:o,onRemove:a}){const i=mr({mutationFn:async()=>{try{await SCn(e.id)}finally{await Kf(!0)}}}),c=B1.find(k=>k.label===e.name||k.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),d=u.length>0&&r&&u.every(k=>t.includes(`${e.id}/${k}`)),_=i.isPending||n,p=s,m=d;return f.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[f.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[c!=null&&c.icon?f.jsx("img",{src:c.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${c.id==="ollama"?" dark:invert":""}`}):f.jsx(qI,{size:20,className:"mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 space-y-1",children:[f.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),f.jsxs("div",{className:"text-sm text-subtext break-all",children:[(c==null?void 0:c.id)==="openai-compatible"?qj():(c==null?void 0:c.label)??e.name,(c==null?void 0:c.id)==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:PD()})," · ",e.baseUrl]})]})]}),f.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[f.jsx("span",{role:"status",children:f.jsx(Zt,{variant:_||p?"default":m?"success":"warning",children:_?Ga():p?vL():m?yjt():wi()})}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(Oe,{variant:"ghost",disabled:o||i.isPending,onClick:()=>i.mutate(),children:[f.jsx(Ei,{size:14}),hb()]}),f.jsx(Rt,{"aria-label":oSt({name:e.name}),disabled:o||i.isPending,onClick:a,children:f.jsx(gd,{size:14})})]})]})]}),i.error&&!m&&f.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:i.error.message})]})}function jNn({busy:e,onClose:r,footer:t,children:n}){const s=T.useRef(null),o=()=>{e||r()};return xp(s,o,"input"),Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&o()},children:f.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[f.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:f.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:ID()})}),f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":Gf(),onClick:o,disabled:e,children:f.jsx(pn,{size:16})}),f.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:n}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[f.jsx(Oe,{onClick:o,disabled:e,children:Gf()}),t]})]})}),document.body)}const bP=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),Q2=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-surface [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),t_={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function SNn(e){var n,s;const r=e.find(o=>o.agentReady);if(!r)return null;const t=((n=r.models[0])==null?void 0:n.id)??null;return{harness:r.id,model:t,serviceTier:xb(r,t,null),permissionMode:((s=r.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:wy(r,t).defaultId}}function ba(e,r){const[t,n]=T.useState(!1),s=T.useRef(null);return T.useEffect(()=>{if(!t)return;const o=i=>{var c,u,d;i.target instanceof Node&&!((c=s.current)!=null&&c.contains(i.target))&&!((u=e==null?void 0:e.current)!=null&&u.contains(i.target))&&!((d=r==null?void 0:r.current)!=null&&d.contains(i.target))&&n(!1)},a=i=>{var c;i.key==="Escape"&&(i.preventDefault(),i.stopPropagation(),n(!1),(c=e==null?void 0:e.current)==null||c.focus())};return document.addEventListener("mousedown",o,!0),document.addEventListener("keydown",a,!0),()=>{document.removeEventListener("mousedown",o,!0),document.removeEventListener("keydown",a,!0)}},[t,e,r]),{open:t,setOpen:n,ref:s}}function CNn({value:e,onSelect:r,onOpenSettings:t,permissionChoices:n=[],defaultPermissionId:s,onSelectPermission:o,reasoningChoices:a=[],defaultReasoningId:i,onSelectReasoning:c,autonomy:u,onSelectAutonomy:d,lockHarness:_=!1,openRequest:p=0,className:m}){var Xe,Me,Fe,pt,Ct,Vt,Ut,Gt;const{data:k=zNn}=dt(su()),w=o0(),[v,b]=T.useState(!1),x=T.useRef(null),y=T.useRef(null),{open:S,setOpen:E,ref:N}=ba(x),[A,z]=T.useState(""),[M,$]=T.useState("root"),D=()=>{E(!1),$("root"),z("")},I=T.useRef(p);T.useEffect(()=>{p!==I.current&&(I.current=p,$("models"),z(""),E(!0))},[p,E]),T.useEffect(()=>{var De;S&&(M==="reasoning"||M==="speed"||M==="permissions")&&((De=y.current)==null||De.focus())},[S,M]);const G=T.useMemo(()=>{const De=A.trim().toLowerCase();return(_&&e?k.filter(lt=>lt.id===e.harness):k).map(lt=>{let xe=lt.models;return De?xe=xe.filter(Ie=>`${Ie.id} ${$1(Ie)}`.toLowerCase().includes(De)):(lt.id==="opencode"||lt.id==="cursor"||lt.id==="antigravity")&&(xe=xe.slice(0,5)),{harness:lt,models:xe,hidden:De?0:lt.models.length-xe.length}})},[k,A,_,e]),F=(De,ct)=>{var xe;const lt=(e==null?void 0:e.harness)===De.id;r({harness:De.id,model:ct,serviceTier:xb(De,ct,lt?e==null?void 0:e.serviceTier:null),permissionMode:lt?e.permissionMode:((xe=De.options)==null?void 0:xe.defaultPermissionMode)??null,reasoningLevel:JL(De,ct,lt&&De.models.some(Ie=>Ie.id===ct)?e.reasoningLevel:null)}),D()},Q=(e==null?void 0:e.model)!=null?(Xe=k.find(De=>De.id===e.harness))==null?void 0:Xe.models.find(De=>De.id===e.model):void 0,K=e?e.model?Q?$1(Q):`${f3(e.model)} · ${PE()}`:Y4():Wm(),J=(e==null?void 0:e.reasoningLevel)??i??((Me=a[0])==null?void 0:Me.id),ee=(Fe=a.find(De=>De.id===J))==null?void 0:Fe.label,P=(e==null?void 0:e.permissionMode)??s??((pt=n[0])==null?void 0:pt.id),L=(Ct=n.find(De=>De.id===P))==null?void 0:Ct.label,H=(e==null?void 0:e.harness)==="opencode"?oEt():Hzt(),q=k.find(De=>De.id===(e==null?void 0:e.harness)),U=ZL(q,e==null?void 0:e.model),oe=xb(q,e==null?void 0:e.model,e==null?void 0:e.serviceTier),ie=(Vt=U.find(De=>De.id===oe))==null?void 0:Vt.label,ce=De=>{c==null||c(De),D()},re=De=>{o==null||o(De),D()},W=[{id:"agentic",label:v7t(),description:E7t()},{id:"copilot",label:I7t(),description:V7t()}],ae=(Ut=W.find(De=>De.id===u))==null?void 0:Ut.label,le=De=>{const ct=W.find(lt=>lt.id===De);ct&&(d==null||d(ct.id)),D()},me=De=>{e&&r({...e,serviceTier:De}),D()},be=(De,ct,lt)=>f.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>$(lt),children:[f.jsx("span",{className:"flex-1",children:De}),ct&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:ct}),f.jsx(Xa,{size:14,className:"shrink-0 text-muted"})]}),Se=De=>f.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[f.jsx(Rt,{ref:y,type:"button",size:"small",className:"model-submenu-header","aria-label":XD(),onClick:()=>{$("root"),z("")},children:f.jsx(uS,{size:15})}),f.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:De}),M==="models"&&f.jsx(Rt,{type:"button",size:"small","aria-label":a3(),onClick:()=>{D(),t()},children:f.jsx(Ey,{size:15,"aria-hidden":"true"})})]}),Be=(De,ct,lt,xe)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:De.map(Ie=>f.jsxs(_r,{onClick:()=>xe(Ie.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[Ie.label,Ie.id===lt&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",BD()]})]}),Ie.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Ie.description})]}),Ie.id===ct&&f.jsx(_o,{size:13})]},Ie.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:N,children:[f.jsxs("button",{ref:x,type:"button",className:Ls("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",m),title:EY({label:`${K}${ee?` · ${ee}`:""}${ie?` · ${ie}`:""}`}),"aria-haspopup":"menu","aria-expanded":S,onClick:()=>{S?D():($("root"),E(!0))},children:[oe==="priority"?f.jsx(jEn,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(sp,{harness:e.harness,size:14}):null,oe==="priority"&&f.jsxs("span",{className:"sr-only",children:[Zzt()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[K,ee&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:ee})]}),f.jsx(Zc,{size:14,className:"shrink-0 text-muted"})]}),S&&f.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[M==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[be(Wm(),K,"models"),a.length>0&&be(H,ee,"reasoning"),U.length>0&&be(IE(),ie,"speed"),n.length>0&&be(LE(),L,"permissions"),d&&be(DE(),ae,"autonomy")]}),M==="models"&&f.jsxs(f.Fragment,{children:[Se(Wm()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:r9t(),value:A,onChange:De=>z(De.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[G.map(({harness:De,models:ct,hidden:lt})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:bP,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(sp,{harness:De.id,size:14}),De.name]}),!De.agentReady&&f.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:De.catalogPending?Uf():f.jsxs(f.Fragment,{children:[f.jsx(JN,{size:10})," ",wi()]})})]}),De.agentReady?f.jsxs(f.Fragment,{children:[!A.trim()&&f.jsxs(_r,{onClick:()=>F(De,null),children:[f.jsx("span",{children:Y4()}),(e==null?void 0:e.harness)===De.id&&(e==null?void 0:e.model)===null&&f.jsx(_o,{size:13})]}),De.models.length===0&&De.agentNote&&f.jsx("div",{className:Q2,children:x_(De.agentNote)}),ct.map(xe=>f.jsxs(_r,{title:xe.id,onClick:()=>F(De,xe.id),children:[f.jsx("span",{children:$1(xe)}),(e==null?void 0:e.harness)===De.id&&(e==null?void 0:e.model)===xe.id&&f.jsx(_o,{size:13})]},xe.id)),A.trim().length>0&&!De.models.some(xe=>xe.id===A.trim())&&f.jsx(_r,{onClick:()=>F(De,A.trim()),children:f.jsxs("span",{children:[Q9t({id:Ee(A.trim())})," · ",PE()]})})]}):f.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-surface [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:De.catalogPending?Uf():De.agentNote?x_(De.agentNote):D8t()}),De.id==="opencode"&&f.jsx(_r,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var xe;D(),(xe=x.current)==null||xe.focus(),b(!0)},children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[JCt(),f.jsx(pd,{size:14,"aria-hidden":"true"})]})}),De.agentReady&<>0&&f.jsx("div",{className:Q2,children:C8t({count:fr(lt)})})]},De.id)),k.length===0&&f.jsx("div",{className:Q2,children:Rzt()})]}),_&&e&&k.length>1&&f.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[f.jsx(JN,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),f9t()]})]}),M==="reasoning"&&f.jsxs(f.Fragment,{children:[Se(H),Be(a,J,i,ce)]}),M==="permissions"&&f.jsxs(f.Fragment,{children:[Se(LE()),Be(n,P,s,re)]}),M==="autonomy"&&f.jsxs(f.Fragment,{children:[Se(DE()),Be(W,u,l3,le)]}),M==="speed"&&f.jsxs(f.Fragment,{children:[Se(IE()),Be(U,oe??void 0,"default",me)]})]}),v&&f.jsx(vP,{dialogOnly:!0,installed:((Gt=k.find(De=>De.id==="opencode"))==null?void 0:Gt.installed)??!1,onClose:()=>b(!1),onConnected:De=>{var lt;const ct=(lt=w.getQueryData(su().queryKey))==null?void 0:lt.find(xe=>xe.id==="opencode");ct&&(!_||(e==null?void 0:e.harness)==="opencode")&&F(ct,De)}})]})}function tc({choices:e,value:r,defaultId:t,header:n,align:s="left",dropDown:o=!1,disabled:a=!1,variant:i="pill",title:c,numbered:u=!1,searchPlaceholder:d,renderIcon:_,renderLabel:p,floating:m=!1,onSelect:k,className:w}){var Q,K;const v=T.useRef(null),{open:b,setOpen:x,ref:y}=ba(v),S=T.useRef(null),[E,N]=T.useState("");if(T.useLayoutEffect(()=>{var L;const J=S.current,ee=y.current;if(!b||!m||!J||!ee)return;J.matches(":popover-open")||(J.showPopover(),(L=J.querySelector("input"))==null||L.focus());const P=()=>{const H=ee.getBoundingClientRect(),q=window.innerHeight-H.bottom-12,U=H.top-12,oe=Math.min(380,J.scrollHeight),ie=o?q>=oe||q>=U:UU;J.style.width=`${H.width}px`,J.style.minWidth="0",J.style.maxHeight=`${Math.max(0,Math.min(380,ie?q:U))}px`,J.style.left=`${H.left}px`,J.style.top=`${ie?H.bottom+4:H.top-J.getBoundingClientRect().height-4}px`};return P(),window.addEventListener("resize",P),window.addEventListener("scroll",P,!0),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,!0)}},[b,m,o,E,e.length,y]),e.length===0)return null;const A=r??t??((Q=e[0])==null?void 0:Q.id)??null,z=e.find(J=>J.id===A),M=e.find(J=>J.id===t),$=i==="bare"&&(M==null?void 0:M.id)===yb?M:void 0,I=($?e.filter(J=>J.id!==$.id):e).filter(J=>`${J.label} ${J.id}`.toLowerCase().includes(E.toLowerCase())),G=(z==null?void 0:z.label)??((K=e[0])==null?void 0:K.label)??"",F=J=>{var ee;k(J),x(!1),(ee=v.current)==null||ee.focus()};return f.jsxs("div",{className:`option-picker relative inline-flex${i==="field"?" w-full":""}`,ref:y,children:[f.jsxs("button",{ref:v,type:"button",className:Ls(i==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${i==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,w),title:c,"aria-haspopup":"menu","aria-expanded":b,disabled:a,onClick:()=>{N(""),x(J=>!J)},children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[z&&(_==null?void 0:_(z)),f.jsx("span",{className:"truncate",children:z?(p==null?void 0:p(z))??G:G})]}),f.jsx(Zc,{size:12})]}),b&&f.jsxs("div",{ref:S,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(J=>J.description)?"min-w-80":""} ${i==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${o?"drop-down":""}`,children:[n&&f.jsx("div",{className:bP,children:n}),d&&f.jsx("input",{autoFocus:!0,"aria-label":d,placeholder:d,value:E,onChange:J=>N(J.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),f.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[$&&f.jsxs(f.Fragment,{children:[f.jsxs(_r,{type:"button",onClick:()=>F($.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_($),f.jsxs("span",{children:[(p==null?void 0:p($))??$.label,f.jsx("span",{className:"option-default text-muted font-normal",children:szt()})]})]}),A===$.id&&f.jsx(_o,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),I.map((J,ee)=>f.jsxs(_r,{type:"button",onClick:()=>F(J.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(J),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[(p==null?void 0:p(J))??J.label,!$&&J.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",BD()]})]}),J.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:J.description})]})]}),A===J.id?f.jsx(_o,{size:13}):u&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:ee+1})]},J.id))]})]})]})}const zNn=[];function L3({runtime:e,corner:r=!1}){const[t,n]=T.useState(!1),[s,o]=T.useState(!1),[a,i]=T.useState(!1),[c,u]=T.useState(null),d=ba();async function _(){if(c){i(!0);try{await QL(c),u(null)}catch(p){u(null),tr(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:r?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:d.ref,children:[d.open&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[f.jsx("div",{className:"text-sm font-medium text-text",children:Yor({host:Ee(e.session.host),user:Ee(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ee(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(_r,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{n(!0);try{await KL(),d.setOpen(!1)}catch(p){tr(p instanceof Error?p.message:String(p),"error")}finally{n(!1)}},children:t?For():s3()}),f.jsx(d0,{content:qlr(),className:"me-2 shrink-0 text-subtext",children:f.jsx(dS,{size:15})})]}),f.jsx(_r,{danger:!0,disabled:s,onClick:async()=>{o(!0);try{u(await VL()),d.setOpen(!1)}catch(p){tr(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}},children:JD()})]}),r?f.jsxs(Oe,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:[f.jsx(Eb,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:$2({host:Ee(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Rt,{size:"small","aria-label":$2({host:Ee(e.session.host)}),"aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:f.jsx(Eb,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:$2({host:Ee(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ee(e.session.version??"…")]})]})]})]}),c&&f.jsx(MI,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void _()})]})}const Nb="code-source-text",yP="code-source-wrap",xP="file-view-gutter text-right text-muted select-none";function wP(e){const r=String(e).length+2;return{ruleCh:r,codeCh:r+2}}const ENn={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},NNn={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function I3(e){const r=e.trim().toLowerCase();return ENn[r]??r}function jS(e){var s;if(!e)return null;const r=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=NNn[r];if(t)return I3(t);const n=r.lastIndexOf(".");return n===-1||n===r.length-1?null:I3(r.slice(n+1))}Jc.displayName="clike";Jc.aliases=[];function Jc(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}g0.displayName="c";g0.aliases=[];function g0(e){e.register(Jc),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}Oy.displayName="cpp";Oy.aliases=[];function Oy(e){e.register(g0),(function(r){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});r.languages.cpp=r.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),r.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),r.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:r.languages.cpp}}}}),r.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),r.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:r.languages.extend("cpp",{})}}),r.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},r.languages.cpp["base-clause"])})(e)}SS.displayName="arduino";SS.aliases=["ino"];function SS(e){e.register(Oy),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}CS.displayName="bash";CS.aliases=["sh","shell"];function CS(e){(function(r){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};r.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=r.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=s.variable[1].inside,i=0;i>/g,function(q,U){return"(?:"+H[+U]+")"})}function n(L,H,q){return RegExp(t(L,H),"")}function s(L,H){for(var q=0;q>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var o={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function a(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var i=a(o.typeDeclaration),c=RegExp(a(o.type+" "+o.typeDeclaration+" "+o.contextual+" "+o.other)),u=a(o.typeDeclaration+" "+o.contextual+" "+o.other),d=a(o.type+" "+o.typeDeclaration+" "+o.other),_=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,k=t(/<<0>>(?:\s*<<1>>)?/.source,[m,_]),w=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,k]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[w,v]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[_,p,v]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),S=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,w,v]),E={keyword:c,punctuation:/[<>()?,.:[\]]/},N=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,z=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;r.languages.csharp=r.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[z]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[w]),lookbehind:!0,inside:E},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,S]),lookbehind:!0,inside:E},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[i,k]),lookbehind:!0,inside:E},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[w]),lookbehind:!0,inside:E},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:E},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[S,d,m]),inside:E}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),r.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),r.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),r.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:E},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[S,w]),inside:E,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[S]),lookbehind:!0,inside:E,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,_]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(_),alias:"class-name",inside:E}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[i,k,m,S,c.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[k,p]),lookbehind:!0,greedy:!0,inside:r.languages.csharp},keyword:c,"class-name":{pattern:RegExp(S),greedy:!0,inside:E},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=A+"|"+N,$=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),D=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[$]),2),I=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,G=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[w,D]);r.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[I,G]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[I]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[D]),inside:r.languages.csharp},"class-name":{pattern:RegExp(w),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var F=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[$]),2),K=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,F]),J=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),ee=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[J,F]);function P(L,H){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[H,F]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:r.languages.csharp}}},string:/[\s\S]+/}}r.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[K]),lookbehind:!0,greedy:!0,inside:P(K,Q)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[ee]),lookbehind:!0,greedy:!0,inside:P(ee,J)}],char:{pattern:RegExp(N),greedy:!0}}),r.languages.dotnet=r.languages.cs=r.languages.csharp})(e)}v0.displayName="markup";v0.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function v0(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var s={};s["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},s.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:s}};o["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(r,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}kp.displayName="css";kp.aliases=[];function kp(e){(function(r){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var n=r.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(e)}ES.displayName="diff";ES.aliases=[];function ES(e){(function(r){r.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var s=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),n==="diff"&&o.push("bold"),r.languages.diff[n]={pattern:RegExp("^(?:["+s+`].*(?:\r ?| -|(?![\\s\\S])))+`,"m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(r.languages.diff,"PREFIXES",{value:t})})(e)}NS.displayName="go";NS.aliases=[];function NS(e){e.register(Jc),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}AS.displayName="ini";AS.aliases=[];function AS(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}TS.displayName="java";TS.aliases=[];function TS(e){e.register(Jc),(function(r){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};r.languages.java=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[r.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),r.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),r.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}RS.displayName="regex";RS.aliases=[];function RS(e){(function(r){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},a="(?:[^\\\\-]|"+n.source+")",i=RegExp(a+"-"+a),c={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};r.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":o,escape:n}},"special-escape":t,"char-set":s,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":c}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}MS.displayName="json";MS.aliases=["webmanifest"];function MS(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}OS.displayName="kotlin";OS.aliases=["kt","kts"];function OS(e){e.register(Jc),(function(r){r.languages.kotlin=r.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete r.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:r.languages.kotlin}};r.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete r.languages.kotlin.string,r.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),r.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),r.languages.kt=r.languages.kotlin,r.languages.kts=r.languages.kotlin})(e)}$S.displayName="less";$S.aliases=[];function $S(e){e.register(kp),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}DS.displayName="lua";DS.aliases=[];function DS(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}LS.displayName="makefile";LS.aliases=[];function LS(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}IS.displayName="yaml";IS.aliases=["yml"];function IS(e){(function(r){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(c,u){u=(u||"").replace(/m/g,"")+"m";var d=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(d,u)}r.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return"(?:"+o+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},r.languages.yml=r.languages.yaml})(e)}PS.displayName="markdown";PS.aliases=["md"];function PS(e){e.register(v0),(function(r){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(i){return i=i.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+i+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;r.languages.markdown=r.languages.extend("markup",{}),r.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:r.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:r.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:r.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(i){["url","bold","italic","strike","code-snippet"].forEach(function(c){i!==c&&(r.languages.markdown[i].inside.content.inside[c]=r.languages.markdown[c])})}),r.hooks.add("after-tokenize",function(i){if(i.language!=="markdown"&&i.language!=="md")return;function c(u){if(!(!u||typeof u=="string"))for(var d=0,_=u.length;d<_;d++){var p=u[d];if(p.type!=="code"){c(p.content);continue}var m=p.content[1],k=p.content[3];if(m&&k&&m.type==="code-language"&&k.type==="code-block"&&typeof m.content=="string"){var x=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");x=(/[a-z][\w-]*/i.exec(x)||[""])[0].toLowerCase();var v="language-"+x;k.alias?typeof k.alias=="string"?k.alias=[k.alias,v]:k.alias.push(v):k.alias=[v]}}}c(i.tokens)}),r.hooks.add("wrap",function(i){if(i.type==="code-block"){for(var c="",u=0,d=i.classes.length;u]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}FS.displayName="perl";FS.aliases=[];function FS(e){(function(r){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;r.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}Dy.displayName="markup-templating";Dy.aliases=[];function Dy(e){e.register(v0),(function(r){function t(n,s){return"___"+n.toUpperCase()+s+"___"}Object.defineProperties(r.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,s,o,a){if(n.language===s){var i=n.tokenStack=[];n.code=n.code.replace(o,function(c){if(typeof a=="function"&&!a(c))return c;for(var u=i.length,d;n.code.indexOf(d=t(s,u))!==-1;)++u;return i[u]=c,d}),n.grammar=r.languages.markup}}},tokenizePlaceholders:{value:function(n,s){if(n.language!==s||!n.tokenStack)return;n.grammar=r.languages[s];var o=0,a=Object.keys(n.tokenStack);function i(c){for(var u=0;u=a.length);u++){var d=c[u];if(typeof d=="string"||d.content&&typeof d.content=="string"){var _=a[o],p=n.tokenStack[_],m=typeof d=="string"?d:d.content,k=t(s,_),x=m.indexOf(k);if(x>-1){++o;var v=m.substring(0,x),b=new r.Token(s,r.tokenize(p,n.grammar),"language-"+s,p),w=m.substring(x+k.length),y=[];v&&y.push.apply(y,i([v])),y.push(b),w&&y.push.apply(y,i([w])),typeof d=="string"?c.splice.apply(c,[u,1].concat(y)):d.content=y}}else d.content&&i(d.content)}return c}i(n.tokens)}}})})(e)}HS.displayName="php";HS.aliases=[];function HS(e){e.register(Dy),(function(r){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],s=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;r.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:s,operator:o,punctuation:a};var i={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:r.languages.php},c=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:i}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:i}}];r.languages.insertBefore("php","variable",{string:c,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:c,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:s,operator:o,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),r.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var d=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;r.languages["markup-templating"].buildPlaceholders(u,"php",d)}}),r.hooks.add("after-tokenize",function(u){r.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}qS.displayName="python";qS.aliases=["py"];function qS(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}US.displayName="r";US.aliases=[];function US(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}GS.displayName="ruby";GS.aliases=["rb"];function GS(e){e.register(Jc),(function(r){r.languages.ruby=r.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),r.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:r.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete r.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",s=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;r.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+s),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+s+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),r.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete r.languages.ruby.string,r.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),r.languages.rb=r.languages.ruby})(e)}WS.displayName="rust";WS.aliases=[];function WS(e){(function(r){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),r.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},r.languages.rust["closure-params"].inside.rest=r.languages.rust,r.languages.rust.attribute.inside.string=r.languages.rust.string})(e)}KS.displayName="sass";KS.aliases=[];function KS(e){e.register(kp),(function(r){r.languages.sass=r.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),r.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete r.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];r.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:r.languages.sass.important}}}),delete r.languages.sass.property,delete r.languages.sass.important,r.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}VS.displayName="scss";VS.aliases=[];function VS(e){e.register(kp),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}QS.displayName="sql";QS.aliases=[];function QS(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}XS.displayName="swift";XS.aliases=[];function XS(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(r){r.inside.interpolation.inside=e.languages.swift})}YS.displayName="typescript";YS.aliases=["ts"];function YS(e){e.register($y),(function(r){r.languages.typescript=r.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),r.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete r.languages.typescript.parameter,delete r.languages.typescript["literal-property"];var t=r.languages.extend("typescript",{});delete t["class-name"],r.languages.typescript["class-name"].inside=t,r.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),r.languages.ts=r.languages.typescript})(e)}Ly.displayName="basic";Ly.aliases=[];function Ly(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}ZS.displayName="vbnet";ZS.aliases=[];function ZS(e){e.register(Ly),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}class b0{constructor(r,t,n){this.normal=t,this.property=r,n&&(this.space=n)}}b0.prototype.normal={};b0.prototype.property={};b0.prototype.space=void 0;function kP(e,r){const t={},n={};for(const s of e)Object.assign(t,s.property),Object.assign(n,s.normal);return new b0(t,n,r)}function bg(e){return e.toLowerCase()}class ya{constructor(r,t){this.attribute=t,this.property=r}}ya.prototype.attribute="";ya.prototype.booleanish=!1;ya.prototype.boolean=!1;ya.prototype.commaOrSpaceSeparated=!1;ya.prototype.commaSeparated=!1;ya.prototype.defined=!1;ya.prototype.mustUseProperty=!1;ya.prototype.number=!1;ya.prototype.overloadedBoolean=!1;ya.prototype.property="";ya.prototype.spaceSeparated=!1;ya.prototype.space=void 0;let ANn=0;const ar=bd(),js=bd(),P3=bd(),et=bd(),gn=bd(),If=bd(),Oa=bd();function bd(){return 2**++ANn}const B3=Object.freeze(Object.defineProperty({__proto__:null,boolean:ar,booleanish:js,commaOrSpaceSeparated:Oa,commaSeparated:If,number:et,overloadedBoolean:P3,spaceSeparated:gn},Symbol.toStringTag,{value:"Module"})),X2=Object.keys(B3);class JS extends ya{constructor(r,t,n,s){let o=-1;if(super(r,t),gA(this,"space",s),typeof n=="number")for(;++o4&&t.slice(0,4)==="data"&&$Nn.test(r)){if(r.charAt(4)==="-"){const o=r.slice(5).replace(vA,LNn);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=r.slice(4);if(!vA.test(o)){let a=o.replace(ONn,DNn);a.charAt(0)!=="-"&&(a="-"+a),r="data"+a}}s=JS}return new s(n,r)}function DNn(e){return"-"+e.toLowerCase()}function LNn(e){return e.charAt(1).toUpperCase()}const TP=kP([jP,TNn,zP,EP,NP],"html"),Iy=kP([jP,RNn,zP,EP,NP],"svg");function bA(e){const r=[],t=String(e||"");let n=t.indexOf(","),s=0,o=!1;for(;!o;){n===-1&&(n=t.length,o=!0);const a=t.slice(s,n).trim();(a||!o)&&r.push(a),s=n+1,n=t.indexOf(",",s)}return r}function INn(e,r){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const yA=/[#.]/g;function PNn(e,r){const t=e||"",n={};let s=0,o,a;for(;s=48&&r<=57}function VNn(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}function QNn(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}function jA(e){return QNn(e)||OP(e)}const SA=document.createElement("i");function yg(e){const r="&"+e+";";SA.innerHTML=r;const t=SA.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===r?!1:t}const XNn=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function YNn(e,r){const t={},n=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let o=0,a=-1,i="",c,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,c=t.position.start):c=t.position);let d=(c?c.line:0)||1,_=(c?c.column:0)||1,p=k(),m;for(o--;++o<=e.length;)if(m===10&&(_=(u?u[a]:0)||1),m=e.charCodeAt(o),m===38){const b=e.charCodeAt(o+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||n&&b===n){i+=String.fromCharCode(m),_++;continue}const w=o+1;let y=w,S=w,z;if(b===35){S=++y;const G=e.charCodeAt(S);G===88||G===120?(z="hexadecimal",S=++y):z="decimal"}else z="named";let N="",A="",E="";const M=z==="named"?jA:z==="decimal"?OP:VNn;for(S--;++S<=e.length;){const G=e.charCodeAt(S);if(!M(G))break;E+=String.fromCharCode(G),z==="named"&&KNn.includes(E)&&(N=E,A=yg(E))}let $=e.charCodeAt(S)===59;if($){S++;const G=z==="named"?yg(E):!1;G&&(N=E,A=G)}let D=1+S-w,I="";if(!(!$&&t.nonTerminated===!1))if(!E)z!=="named"&&x(4,D);else if(z==="named"){if($&&!A)x(5,1);else if(N!==E&&(S=y+N.length,D=1+S-y,$=!1),!$){const G=N?1:3;if(t.attribute){const H=e.charCodeAt(S);H===61?(x(G,D),A=""):jA(H)?A="":x(G,D)}else x(G,D)}I=A}else{$||x(2,D);let G=Number.parseInt(E,z==="hexadecimal"?16:10);if(ZNn(G))x(7,D),I="�";else if(G in kA)x(6,D),I=kA[G];else{let H="";JNn(G)&&x(6,D),G>65535&&(G-=65536,H+=String.fromCharCode(G>>>10|55296),G=56320|G&1023),I=H+String.fromCharCode(G)}}if(I){v(),p=k(),o=S-1,_+=S-w+1,s.push(I);const G=k();G.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,I,{start:p,end:G},e.slice(w-1,S)),p=G}else E=e.slice(w-1,S),i+=E,_+=E.length,o=S-1}else m===10&&(d++,a++,_=0),Number.isNaN(m)?v():(i+=String.fromCharCode(m),_++);return s.join("");function k(){return{line:d,column:_,offset:o+((c?c.offset:0)||0)}}function x(b,w){let y;t.warning&&(y=k(),y.column+=w,y.offset+=w,t.warning.call(t.warningContext||void 0,XNn[b],y,b))}function v(){i&&(s.push(i),t.text&&t.text.call(t.textContext||void 0,i,{start:p,end:k()}),i="")}}function ZNn(e){return e>=55296&&e<=57343||e>1114111}function JNn(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var eAn=0,Qv={},Ws={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++eAn}),e.__id},clone:function e(r,t){t=t||{};var n,s;switch(Ws.util.type(r)){case"Object":if(s=Ws.util.objId(r),t[s])return t[s];n={},t[s]=n;for(var o in r)r.hasOwnProperty(o)&&(n[o]=e(r[o],t));return n;case"Array":return s=Ws.util.objId(r),t[s]?t[s]:(n=[],t[s]=n,r.forEach(function(a,i){n[i]=e(a,t)}),n);default:return r}}},languages:{plain:Qv,plaintext:Qv,text:Qv,txt:Qv,extend:function(e,r){var t=Ws.util.clone(Ws.languages[e]);for(var n in r)t[n]=r[n];return t},insertBefore:function(e,r,t,n){n=n||Ws.languages;var s=n[e],o={};for(var a in s)if(s.hasOwnProperty(a)){if(a==r)for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);t.hasOwnProperty(a)||(o[a]=s[a])}var c=n[e];return n[e]=o,Ws.languages.DFS(Ws.languages,function(u,d){d===c&&u!=e&&(this[u]=o)}),o},DFS:function e(r,t,n,s){s=s||{};var o=Ws.util.objId;for(var a in r)if(r.hasOwnProperty(a)){t.call(r,a,r[a],n||a);var i=r[a],c=Ws.util.type(i);c==="Object"&&!s[o(i)]?(s[o(i)]=!0,e(i,t,null,s)):c==="Array"&&!s[o(i)]&&(s[o(i)]=!0,e(i,t,a,s))}}},plugins:{},highlight:function(e,r,t){var n={code:e,grammar:r,language:t};if(Ws.hooks.run("before-tokenize",n),!n.grammar)throw new Error('The language "'+n.language+'" has no grammar.');return n.tokens=Ws.tokenize(n.code,n.grammar),Ws.hooks.run("after-tokenize",n),Qm.stringify(Ws.util.encode(n.tokens),n.language)},tokenize:function(e,r){var t=r.rest;if(t){for(var n in t)r[n]=t[n];delete r.rest}var s=new tAn;return F1(s,s.head,e),$P(e,s,r,s.head,0),nAn(s)},hooks:{all:{},add:function(e,r){var t=Ws.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){var t=Ws.hooks.all[e];if(!(!t||!t.length))for(var n=0,s;s=t[n++];)s(r)}},Token:Qm};function Qm(e,r,t,n){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0}function CA(e,r,t,n){e.lastIndex=r;var s=e.exec(t);if(s&&n&&s[1]){var o=s[1].length;s.index+=o,s[0]=s[0].slice(o)}return s}function $P(e,r,t,n,s,o){for(var a in t)if(!(!t.hasOwnProperty(a)||!t[a])){var i=t[a];i=Array.isArray(i)?i:[i];for(var c=0;c=o.reach);b+=v.value.length,v=v.next){var w=v.value;if(r.length>e.length)return;if(!(w instanceof Qm)){var y=1,S;if(p){if(S=CA(x,b,e,_),!S||S.index>=e.length)break;var E=S.index,z=S.index+S[0].length,N=b;for(N+=v.value.length;E>=N;)v=v.next,N+=v.value.length;if(N-=v.value.length,b=N,v.value instanceof Qm)continue;for(var A=v;A!==r.tail&&(No.reach&&(o.reach=I);var G=v.prev;$&&(G=F1(r,G,$),b+=$.length),rAn(r,G,y);var H=new Qm(a,d?Ws.tokenize(M,d):M,m,M);if(v=F1(r,G,H),D&&F1(r,v,D),y>1){var Q={cause:a+","+c,reach:I};$P(e,r,t,v.prev,b,Q),o&&Q.reach>o.reach&&(o.reach=Q.reach)}}}}}}function tAn(){var e={value:null,prev:null,next:null},r={value:null,prev:e,next:null};e.next=r,this.head=e,this.tail=r,this.length=0}function F1(e,r,t){var n=r.next,s={value:t,prev:r,next:n};return r.next=s,n.prev=s,e.length++,s}function rAn(e,r,t){for(var n=r.next,s=0;st)return null;try{return Ft.highlight(e,r).children}catch{return null}}function PP(e,r){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:f.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(PP)},r)}function _An(e,r,t=3e5){var n;return((n=IP(e,r,t))==null?void 0:n.map(PP))??e}function BP(e,r,t=3e5){const n=IP(e,r,t);if(!n)return e.split(` +|(?![\\s\\S])))+`,"m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(r.languages.diff,"PREFIXES",{value:t})})(e)}NS.displayName="go";NS.aliases=[];function NS(e){e.register(Jc),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}AS.displayName="ini";AS.aliases=[];function AS(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}TS.displayName="java";TS.aliases=[];function TS(e){e.register(Jc),(function(r){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};r.languages.java=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[r.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),r.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),r.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}RS.displayName="regex";RS.aliases=[];function RS(e){(function(r){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},a="(?:[^\\\\-]|"+n.source+")",i=RegExp(a+"-"+a),c={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};r.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":o,escape:n}},"special-escape":t,"char-set":s,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":c}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}MS.displayName="json";MS.aliases=["webmanifest"];function MS(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}OS.displayName="kotlin";OS.aliases=["kt","kts"];function OS(e){e.register(Jc),(function(r){r.languages.kotlin=r.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete r.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:r.languages.kotlin}};r.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete r.languages.kotlin.string,r.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),r.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),r.languages.kt=r.languages.kotlin,r.languages.kts=r.languages.kotlin})(e)}$S.displayName="less";$S.aliases=[];function $S(e){e.register(kp),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}DS.displayName="lua";DS.aliases=[];function DS(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}LS.displayName="makefile";LS.aliases=[];function LS(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}IS.displayName="yaml";IS.aliases=["yml"];function IS(e){(function(r){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(c,u){u=(u||"").replace(/m/g,"")+"m";var d=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(d,u)}r.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return"(?:"+o+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},r.languages.yml=r.languages.yaml})(e)}PS.displayName="markdown";PS.aliases=["md"];function PS(e){e.register(v0),(function(r){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(i){return i=i.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+i+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;r.languages.markdown=r.languages.extend("markup",{}),r.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:r.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:r.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:r.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(i){["url","bold","italic","strike","code-snippet"].forEach(function(c){i!==c&&(r.languages.markdown[i].inside.content.inside[c]=r.languages.markdown[c])})}),r.hooks.add("after-tokenize",function(i){if(i.language!=="markdown"&&i.language!=="md")return;function c(u){if(!(!u||typeof u=="string"))for(var d=0,_=u.length;d<_;d++){var p=u[d];if(p.type!=="code"){c(p.content);continue}var m=p.content[1],k=p.content[3];if(m&&k&&m.type==="code-language"&&k.type==="code-block"&&typeof m.content=="string"){var w=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");w=(/[a-z][\w-]*/i.exec(w)||[""])[0].toLowerCase();var v="language-"+w;k.alias?typeof k.alias=="string"?k.alias=[k.alias,v]:k.alias.push(v):k.alias=[v]}}}c(i.tokens)}),r.hooks.add("wrap",function(i){if(i.type==="code-block"){for(var c="",u=0,d=i.classes.length;u]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}FS.displayName="perl";FS.aliases=[];function FS(e){(function(r){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;r.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}Dy.displayName="markup-templating";Dy.aliases=[];function Dy(e){e.register(v0),(function(r){function t(n,s){return"___"+n.toUpperCase()+s+"___"}Object.defineProperties(r.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,s,o,a){if(n.language===s){var i=n.tokenStack=[];n.code=n.code.replace(o,function(c){if(typeof a=="function"&&!a(c))return c;for(var u=i.length,d;n.code.indexOf(d=t(s,u))!==-1;)++u;return i[u]=c,d}),n.grammar=r.languages.markup}}},tokenizePlaceholders:{value:function(n,s){if(n.language!==s||!n.tokenStack)return;n.grammar=r.languages[s];var o=0,a=Object.keys(n.tokenStack);function i(c){for(var u=0;u=a.length);u++){var d=c[u];if(typeof d=="string"||d.content&&typeof d.content=="string"){var _=a[o],p=n.tokenStack[_],m=typeof d=="string"?d:d.content,k=t(s,_),w=m.indexOf(k);if(w>-1){++o;var v=m.substring(0,w),b=new r.Token(s,r.tokenize(p,n.grammar),"language-"+s,p),x=m.substring(w+k.length),y=[];v&&y.push.apply(y,i([v])),y.push(b),x&&y.push.apply(y,i([x])),typeof d=="string"?c.splice.apply(c,[u,1].concat(y)):d.content=y}}else d.content&&i(d.content)}return c}i(n.tokens)}}})})(e)}HS.displayName="php";HS.aliases=[];function HS(e){e.register(Dy),(function(r){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],s=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;r.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:s,operator:o,punctuation:a};var i={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:r.languages.php},c=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:i}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:i}}];r.languages.insertBefore("php","variable",{string:c,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:c,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:s,operator:o,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),r.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var d=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;r.languages["markup-templating"].buildPlaceholders(u,"php",d)}}),r.hooks.add("after-tokenize",function(u){r.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}qS.displayName="python";qS.aliases=["py"];function qS(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}US.displayName="r";US.aliases=[];function US(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}GS.displayName="ruby";GS.aliases=["rb"];function GS(e){e.register(Jc),(function(r){r.languages.ruby=r.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),r.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:r.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete r.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",s=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;r.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+s),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+s+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),r.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete r.languages.ruby.string,r.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),r.languages.rb=r.languages.ruby})(e)}WS.displayName="rust";WS.aliases=[];function WS(e){(function(r){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),r.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},r.languages.rust["closure-params"].inside.rest=r.languages.rust,r.languages.rust.attribute.inside.string=r.languages.rust.string})(e)}KS.displayName="sass";KS.aliases=[];function KS(e){e.register(kp),(function(r){r.languages.sass=r.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),r.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete r.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];r.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:r.languages.sass.important}}}),delete r.languages.sass.property,delete r.languages.sass.important,r.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}VS.displayName="scss";VS.aliases=[];function VS(e){e.register(kp),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}QS.displayName="sql";QS.aliases=[];function QS(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}XS.displayName="swift";XS.aliases=[];function XS(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(r){r.inside.interpolation.inside=e.languages.swift})}YS.displayName="typescript";YS.aliases=["ts"];function YS(e){e.register($y),(function(r){r.languages.typescript=r.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),r.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete r.languages.typescript.parameter,delete r.languages.typescript["literal-property"];var t=r.languages.extend("typescript",{});delete t["class-name"],r.languages.typescript["class-name"].inside=t,r.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),r.languages.ts=r.languages.typescript})(e)}Ly.displayName="basic";Ly.aliases=[];function Ly(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}ZS.displayName="vbnet";ZS.aliases=[];function ZS(e){e.register(Ly),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}class b0{constructor(r,t,n){this.normal=t,this.property=r,n&&(this.space=n)}}b0.prototype.normal={};b0.prototype.property={};b0.prototype.space=void 0;function kP(e,r){const t={},n={};for(const s of e)Object.assign(t,s.property),Object.assign(n,s.normal);return new b0(t,n,r)}function bg(e){return e.toLowerCase()}class ya{constructor(r,t){this.attribute=t,this.property=r}}ya.prototype.attribute="";ya.prototype.booleanish=!1;ya.prototype.boolean=!1;ya.prototype.commaOrSpaceSeparated=!1;ya.prototype.commaSeparated=!1;ya.prototype.defined=!1;ya.prototype.mustUseProperty=!1;ya.prototype.number=!1;ya.prototype.overloadedBoolean=!1;ya.prototype.property="";ya.prototype.spaceSeparated=!1;ya.prototype.space=void 0;let ANn=0;const ar=bd(),js=bd(),P3=bd(),et=bd(),gn=bd(),If=bd(),Oa=bd();function bd(){return 2**++ANn}const B3=Object.freeze(Object.defineProperty({__proto__:null,boolean:ar,booleanish:js,commaOrSpaceSeparated:Oa,commaSeparated:If,number:et,overloadedBoolean:P3,spaceSeparated:gn},Symbol.toStringTag,{value:"Module"})),X2=Object.keys(B3);class JS extends ya{constructor(r,t,n,s){let o=-1;if(super(r,t),gA(this,"space",s),typeof n=="number")for(;++o4&&t.slice(0,4)==="data"&&$Nn.test(r)){if(r.charAt(4)==="-"){const o=r.slice(5).replace(vA,LNn);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=r.slice(4);if(!vA.test(o)){let a=o.replace(ONn,DNn);a.charAt(0)!=="-"&&(a="-"+a),r="data"+a}}s=JS}return new s(n,r)}function DNn(e){return"-"+e.toLowerCase()}function LNn(e){return e.charAt(1).toUpperCase()}const TP=kP([jP,TNn,zP,EP,NP],"html"),Iy=kP([jP,RNn,zP,EP,NP],"svg");function bA(e){const r=[],t=String(e||"");let n=t.indexOf(","),s=0,o=!1;for(;!o;){n===-1&&(n=t.length,o=!0);const a=t.slice(s,n).trim();(a||!o)&&r.push(a),s=n+1,n=t.indexOf(",",s)}return r}function INn(e,r){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const yA=/[#.]/g;function PNn(e,r){const t=e||"",n={};let s=0,o,a;for(;s=48&&r<=57}function VNn(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}function QNn(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}function jA(e){return QNn(e)||OP(e)}const SA=document.createElement("i");function yg(e){const r="&"+e+";";SA.innerHTML=r;const t=SA.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===r?!1:t}const XNn=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function YNn(e,r){const t={},n=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let o=0,a=-1,i="",c,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,c=t.position.start):c=t.position);let d=(c?c.line:0)||1,_=(c?c.column:0)||1,p=k(),m;for(o--;++o<=e.length;)if(m===10&&(_=(u?u[a]:0)||1),m=e.charCodeAt(o),m===38){const b=e.charCodeAt(o+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||n&&b===n){i+=String.fromCharCode(m),_++;continue}const x=o+1;let y=x,S=x,E;if(b===35){S=++y;const G=e.charCodeAt(S);G===88||G===120?(E="hexadecimal",S=++y):E="decimal"}else E="named";let N="",A="",z="";const M=E==="named"?jA:E==="decimal"?OP:VNn;for(S--;++S<=e.length;){const G=e.charCodeAt(S);if(!M(G))break;z+=String.fromCharCode(G),E==="named"&&KNn.includes(z)&&(N=z,A=yg(z))}let $=e.charCodeAt(S)===59;if($){S++;const G=E==="named"?yg(z):!1;G&&(N=z,A=G)}let D=1+S-x,I="";if(!(!$&&t.nonTerminated===!1))if(!z)E!=="named"&&w(4,D);else if(E==="named"){if($&&!A)w(5,1);else if(N!==z&&(S=y+N.length,D=1+S-y,$=!1),!$){const G=N?1:3;if(t.attribute){const F=e.charCodeAt(S);F===61?(w(G,D),A=""):jA(F)?A="":w(G,D)}else w(G,D)}I=A}else{$||w(2,D);let G=Number.parseInt(z,E==="hexadecimal"?16:10);if(ZNn(G))w(7,D),I="�";else if(G in kA)w(6,D),I=kA[G];else{let F="";JNn(G)&&w(6,D),G>65535&&(G-=65536,F+=String.fromCharCode(G>>>10|55296),G=56320|G&1023),I=F+String.fromCharCode(G)}}if(I){v(),p=k(),o=S-1,_+=S-x+1,s.push(I);const G=k();G.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,I,{start:p,end:G},e.slice(x-1,S)),p=G}else z=e.slice(x-1,S),i+=z,_+=z.length,o=S-1}else m===10&&(d++,a++,_=0),Number.isNaN(m)?v():(i+=String.fromCharCode(m),_++);return s.join("");function k(){return{line:d,column:_,offset:o+((c?c.offset:0)||0)}}function w(b,x){let y;t.warning&&(y=k(),y.column+=x,y.offset+=x,t.warning.call(t.warningContext||void 0,XNn[b],y,b))}function v(){i&&(s.push(i),t.text&&t.text.call(t.textContext||void 0,i,{start:p,end:k()}),i="")}}function ZNn(e){return e>=55296&&e<=57343||e>1114111}function JNn(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var eAn=0,Qv={},Ws={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++eAn}),e.__id},clone:function e(r,t){t=t||{};var n,s;switch(Ws.util.type(r)){case"Object":if(s=Ws.util.objId(r),t[s])return t[s];n={},t[s]=n;for(var o in r)r.hasOwnProperty(o)&&(n[o]=e(r[o],t));return n;case"Array":return s=Ws.util.objId(r),t[s]?t[s]:(n=[],t[s]=n,r.forEach(function(a,i){n[i]=e(a,t)}),n);default:return r}}},languages:{plain:Qv,plaintext:Qv,text:Qv,txt:Qv,extend:function(e,r){var t=Ws.util.clone(Ws.languages[e]);for(var n in r)t[n]=r[n];return t},insertBefore:function(e,r,t,n){n=n||Ws.languages;var s=n[e],o={};for(var a in s)if(s.hasOwnProperty(a)){if(a==r)for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);t.hasOwnProperty(a)||(o[a]=s[a])}var c=n[e];return n[e]=o,Ws.languages.DFS(Ws.languages,function(u,d){d===c&&u!=e&&(this[u]=o)}),o},DFS:function e(r,t,n,s){s=s||{};var o=Ws.util.objId;for(var a in r)if(r.hasOwnProperty(a)){t.call(r,a,r[a],n||a);var i=r[a],c=Ws.util.type(i);c==="Object"&&!s[o(i)]?(s[o(i)]=!0,e(i,t,null,s)):c==="Array"&&!s[o(i)]&&(s[o(i)]=!0,e(i,t,a,s))}}},plugins:{},highlight:function(e,r,t){var n={code:e,grammar:r,language:t};if(Ws.hooks.run("before-tokenize",n),!n.grammar)throw new Error('The language "'+n.language+'" has no grammar.');return n.tokens=Ws.tokenize(n.code,n.grammar),Ws.hooks.run("after-tokenize",n),Qm.stringify(Ws.util.encode(n.tokens),n.language)},tokenize:function(e,r){var t=r.rest;if(t){for(var n in t)r[n]=t[n];delete r.rest}var s=new tAn;return F1(s,s.head,e),$P(e,s,r,s.head,0),nAn(s)},hooks:{all:{},add:function(e,r){var t=Ws.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){var t=Ws.hooks.all[e];if(!(!t||!t.length))for(var n=0,s;s=t[n++];)s(r)}},Token:Qm};function Qm(e,r,t,n){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0}function CA(e,r,t,n){e.lastIndex=r;var s=e.exec(t);if(s&&n&&s[1]){var o=s[1].length;s.index+=o,s[0]=s[0].slice(o)}return s}function $P(e,r,t,n,s,o){for(var a in t)if(!(!t.hasOwnProperty(a)||!t[a])){var i=t[a];i=Array.isArray(i)?i:[i];for(var c=0;c=o.reach);b+=v.value.length,v=v.next){var x=v.value;if(r.length>e.length)return;if(!(x instanceof Qm)){var y=1,S;if(p){if(S=CA(w,b,e,_),!S||S.index>=e.length)break;var z=S.index,E=S.index+S[0].length,N=b;for(N+=v.value.length;z>=N;)v=v.next,N+=v.value.length;if(N-=v.value.length,b=N,v.value instanceof Qm)continue;for(var A=v;A!==r.tail&&(No.reach&&(o.reach=I);var G=v.prev;$&&(G=F1(r,G,$),b+=$.length),rAn(r,G,y);var F=new Qm(a,d?Ws.tokenize(M,d):M,m,M);if(v=F1(r,G,F),D&&F1(r,v,D),y>1){var Q={cause:a+","+c,reach:I};$P(e,r,t,v.prev,b,Q),o&&Q.reach>o.reach&&(o.reach=Q.reach)}}}}}}function tAn(){var e={value:null,prev:null,next:null},r={value:null,prev:e,next:null};e.next=r,this.head=e,this.tail=r,this.length=0}function F1(e,r,t){var n=r.next,s={value:t,prev:r,next:n};return r.next=s,n.prev=s,e.length++,s}function rAn(e,r,t){for(var n=r.next,s=0;st)return null;try{return Ft.highlight(e,r).children}catch{return null}}function PP(e,r){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:f.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(PP)},r)}function _An(e,r,t=3e5){var n;return((n=IP(e,r,t))==null?void 0:n.map(PP))??e}function BP(e,r,t=3e5){const n=IP(e,r,t);if(!n)return e.split(` `);const s=[];let o=[];const a=[];let i=0;const c=d=>{let _=d;for(let p=a.length-1;p>=0;p--)_=f.jsx("span",{className:a[p],children:_},i++);o.push(_)},u=d=>{var _;if(d.type==="text"){(d.value??"").split(` -`).forEach((p,m)=>{m>0&&(s.push(o),o=[]),p&&c(p)});return}d.type==="element"&&(a.push((((_=d.properties)==null?void 0:_.className)??[]).join(" ")),(d.children??[]).forEach(u),a.pop())};return n.forEach(u),s.push(o),s}function FP(e){return Array.isArray(e)?e.length===0:e===""}function HP({value:e,onChange:r,onSave:t,onBlur:n,readOnly:s=!1,path:o,highlightLine:a,scrollRequest:i,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:d}){const _=T.useMemo(()=>BP(e,jS(o)),[e,o]),{ruleCh:p,codeCh:m}=wP(_.length),k=T.useRef(null),x=T.useRef(null),v=()=>{const S=k.current;S&&x.current&&(x.current.scrollTop=S.scrollTop)},b=T.useRef(u);T.useLayoutEffect(()=>{const S=k.current;!S||!b.current||(S.scrollTop=b.current.top,S.scrollLeft=b.current.left,v())},[o]),T.useLayoutEffect(v,[e]),T.useLayoutEffect(()=>{var M;const S=k.current;if(!S||!a||i===void 0)return;const z=e.split(` -`),N=Math.min(Math.max(Math.trunc(a),1),z.length);let A=0;for(let $=0;${if(!s){if((S.metaKey||S.ctrlKey)&&S.key.toLowerCase()==="s"){S.preventDefault(),t();return}if(S.key==="Tab"){S.preventDefault();const z=S.currentTarget,{selectionStart:N,selectionEnd:A}=z,E=e.slice(0,N)+" "+e.slice(A);r(E),requestAnimationFrame(()=>{z.selectionStart=z.selectionEnd=N+1})}}},y=`absolute inset-0 m-0 py-3.5 pe-4 ${Nb} ${yP} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Nb}`,children:[f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${p}ch`},"aria-hidden":"true"}),f.jsx("div",{ref:x,className:`file-view-code ${y} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:_.map((S,z)=>f.jsxs("div",{"data-line":z+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[f.jsx("span",{className:`${xP} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:z+1}),FP(S)?f.jsx("br",{}):S]},z))}),f.jsx("textarea",{ref:k,className:`file-view-editarea ${y} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${m}ch`},value:e,onChange:S=>{s||r(S.target.value)},onScroll:S=>{v(),d==null||d({top:Math.max(0,S.currentTarget.scrollTop),left:Math.max(0,S.currentTarget.scrollLeft)})},onKeyDown:w,onBlur:s?void 0:n,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function qP({onClose:e,onSaved:r}){const t=MCn(),n=dt(t),[s,o]=T.useState(()=>n.data??null),[a,i]=T.useState(()=>{var y;return((y=n.data)==null?void 0:y.content)??""}),c=!s&&n.error?n.error.message:null,u=mr({mutationFn:({content:y,previous:S})=>a6n(y,S)}),[d,_]=T.useState(!1),p=T.useRef(null),m=T.useRef(e),k=s!==null&&a!==s.content,x=T.useRef(k),v=T.useRef(d);x.current=k,v.current=d,m.current=e,T.useEffect(()=>{!n.data||x.current||v.current||(o(n.data),i(n.data.content))},[n.data]);const b=()=>{v.current||x.current&&!window.confirm(Cun())||m.current()};xp(p,b,"textarea");async function w(){if(!(!s||!k||d)){_(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!Wr(t.queryKey))return;ts(t.queryKey,{...s,content:a}),o({...s,content:a}),r==null||r(),tr(Wun(),"success")}catch(y){tr(y instanceof Error?y.message:String(y),"error")}finally{_(!1)}}}return Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&b()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(48rem,calc(100vh-2.5rem))] w-200 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"ssh-config-dialog-title",tabIndex:-1,children:[f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:r_n()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":mun(),onClick:b,disabled:d,children:f.jsx(pn,{size:16})}),f.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:c?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:c}):s===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(Nt,{})," ",Dun()]}):f.jsx(HP,{value:a,onChange:i,onSave:()=>void w(),path:s.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx(Oe,{onClick:b,disabled:d,children:Gf()}),f.jsx(Oe,{variant:"primary",onClick:()=>void w(),disabled:!k||d,children:d?Qa():nc()})]})]})}),document.body)}function UP({runtime:e,corner:r=!1}){const[t,n]=T.useState(null);return e.kind==="ssh"?f.jsx(L3,{runtime:e,corner:r}):f.jsxs(f.Fragment,{children:[r?f.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:f.jsxs(Oe,{className:"h-auto max-w-48 justify-start rounded-none border-b-0 border-s-0 px-2.5 py-1.5 font-normal",title:n3(),"aria-haspopup":"dialog",onClick:()=>n("hosts"),children:[f.jsx(Eb,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:r3()})]})}):f.jsx("div",{className:"relative shrink-0 border-t border-border",children:f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Rt,{size:"small","aria-label":n3(),"aria-haspopup":"dialog",onClick:()=>n("hosts"),children:f.jsx(Eb,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"truncate text-sm leading-tight",children:r3()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ee(e.version)]})]})]})}),t==="hosts"&&f.jsx(bNn,{onClose:()=>n(null),onConfigureSsh:()=>n("config")}),t==="config"&&f.jsx(qP,{onClose:()=>n("hosts")})]})}function t6(e=!0){var n;const r=wb(),t=dt({...r,enabled:e});return{status:t.data??null,error:((n=t.error)==null?void 0:n.message)??null,apply:s=>ts(r.queryKey,s)}}const fAn=36e4,dAn=500,GP=e=>`https://github.com/alphaXiv/OpenResearch/releases/tag/${e.split("/").map(encodeURIComponent).join("/")}`;function WP(e){const[r,t]=T.useState(!1),[n,s]=T.useState(null),o=T.useRef(!1);T.useEffect(()=>(o.current=!1,()=>{o.current=!0}),[]);const a=e!=null&&e.restartRequired?e.instance:null;return{restarting:r,error:n,restart:()=>{if(!a||r)return;const c=wb(),u=()=>o.current||!Wr(c.queryKey);t(!0),s(null),(async()=>{try{if(await qSn(),u())return;const d=Date.now()+fAn;for(;Date.now()setTimeout(p,dAn)),u())return;const _=await Je.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(_&&_.instance!==a){window.location.reload();return}}throw new Error(Pwn())}catch(d){if(u())return;s(d instanceof Error?d.message:String(d)),t(!1)}})()}}}function KP({status:e}){const[r,t]=T.useState(null),n=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:o,restart:a}=WP(e);return!n||r===n?null:f.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-blue-subtle border-b border-b-accent-blue-border",role:"status",children:[f.jsx(Ei,{size:13,className:`shrink-0 text-accent-blue-strong${s?" animate-spin":""}`}),f.jsx("span",{className:"min-w-0",children:o?$L({error:o}):twn({version:Ee(n)})}),(e==null?void 0:e.installedTag)&&f.jsx("a",{href:GP(e.installedTag),target:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:kL()}),(e==null?void 0:e.canRestart)&&f.jsx(Oe,{type:"button",size:"small",disabled:s,onClick:a,children:s?DL():OL()}),f.jsx(Rt,{type:"button",size:"small",className:"ms-auto","aria-label":_wn(),disabled:s,onClick:()=>t(n),children:f.jsx(pn,{size:13})})]})}const VP="desktop-app-banner-dismissed-on",zA="https://github.com/alphaXiv/OpenResearch/releases/latest";function hAn(){const e=navigator.platform;return/Mac/.test(e)?"OpenResearch.dmg":/Win/.test(e)?"OpenResearch-Setup.exe":/Linux x86_64/.test(e)?"OpenResearch-x86_64.AppImage":/Linux aarch64/.test(e)?"OpenResearch-aarch64.AppImage":null}function QP(){return new Date().toDateString()}function EA(){try{return localStorage.getItem(VP)===QP()}catch{return!1}}function XP(){const[e,r]=T.useState(EA);if(T.useEffect(()=>{const s=()=>r(EA());return window.addEventListener("focus",s),()=>window.removeEventListener("focus",s)},[]),"__ORX_DESKTOP__"in window||e)return null;const t=()=>{try{localStorage.setItem(VP,QP())}catch{}r(!0)},n=hAn();return f.jsxs("div",{className:"desktop-app-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-blue-subtle border-b border-b-accent-blue-border",children:[f.jsx(GI,{size:13,className:"shrink-0 text-accent-blue-strong"}),f.jsx("span",{className:"min-w-0",children:frt()}),f.jsx(Xf,{size:"small",href:n?`${zA}/download/${n}`:zA,target:n?void 0:"_blank",rel:"noreferrer",children:rrt()}),f.jsx(Rt,{type:"button",size:"small",className:"ms-auto","aria-label":Wtt(),onClick:t,children:f.jsx(pn,{size:13})})]})}function r6(){return f.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:f.jsx(Nt,{})})}function pAn(){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{children:wi()}),f.jsx(gy,{to:"/projects",children:Gm()})]})}function n6({error:e,reset:r}){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{role:"alert",children:e.message}),f.jsx(Oe,{onClick:r,children:Ks()}),f.jsx(gy,{to:"/projects",children:Gm()})]})}function YP({projectId:e}){const{queryClient:r}=Rj({from:"__root__"}),t=a0(),[n,s]=T.useState(null),[o,a]=T.useState(0);return T.useEffect(()=>{let i=!0;return s(null),(e?fP(e,r):rNn(r)).then(c=>{i&&t({href:c,replace:!0})}).catch(c=>{i&&(WK(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{i=!1}},[e,o,t,r]),n?f.jsx(n6,{error:n,reset:()=>a(i=>i+1)}):f.jsx(r6,{})}function ZP(){return f.jsx(YP,{})}function mAn({projectId:e}){return f.jsx(YP,{projectId:e})}function gAn(){const e=lP(),r=a0(),t=Vf(),n=dt(t),s=dt(f0()),o=n.data,a=s.data,i=(o==null?void 0:o.length)===0,c=n.error??s.error,u=()=>{n.refetch(),s.refetch()},{status:d}=t6(e.kind==="local");T.useEffect(()=>{document.title="OpenResearch"},[]);const _=p=>void r({to:"/projects/$projectId",params:{projectId:p}});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsxs(f.Fragment,{children:[f.jsx(mP,{}),f.jsx(KP,{status:d})]}),f.jsx(XP,{}),c&&(!o||!a)?f.jsx(n6,{error:c,reset:u}):!o||!a?f.jsx(r6,{}):i?f.jsx(dNn,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{tNn(),_(p.id)}}):f.jsx(ZP,{}),(e.kind==="ssh"||o&&a&&!i)&&f.jsx(UP,{runtime:e,corner:!0})]})}const vAn=Xc()({component:ZP}),bAn=Xc()({component:lg}),yAn=Xc()({}),xAn=Xc()({component:gAn}),wAn=e=>({queryKey:Mt("getRunDiff",e),queryFn:({signal:r})=>hSn(e,r),staleTime:3e4}),JP=e=>({queryKey:Mt("getExperimentDiff",e),queryFn:({signal:r})=>pSn(e,r),staleTime:3e4}),Ab=(e,r,t={})=>({queryKey:Mt("getProjectFile",e,r,{...t}),queryFn:({signal:n})=>mSn(e,r,t,n),staleTime:t.ref?np(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),eB=e=>({queryKey:Mt("getAbsoluteFile",e),queryFn:({signal:r})=>gSn(e,r),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),s6=(e,r={})=>({queryKey:Mt("getCodeTree",e,{...r}),queryFn:({signal:t})=>$Sn(e,r,t),staleTime:r.ref&&np(r.ref)?1/0:3e4}),Tb=e=>({queryKey:Mt("getSessionWorktree",e),queryFn:({signal:r})=>DSn(e,r),staleTime:3e4}),kAn=e=>({queryKey:Mt("getArtifacts",e),queryFn:({signal:r})=>k6n(e,r),staleTime:3e4}),o6=(e,r)=>({queryKey:Mt("getArtifactFileText",e,r),queryFn:({signal:t})=>z6n(e,r,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),tB=(e,r)=>({queryKey:Mt("getArtifactFileMetadata",e,r),queryFn:({signal:t})=>N6n(e,r,t),staleTime:2e3}),jAn=()=>({queryKey:Mt("getLatexEngine"),queryFn:({signal:e})=>xSn(e),staleTime:3e5}),SAn=()=>({queryKey:Mt("getOverleafSettings"),queryFn:({signal:e})=>kSn(e),staleTime:3e5}),CAn=(e,r,t={})=>({queryKey:Mt("getOverleafState",e,r,{...t}),queryFn:({signal:n})=>NSn(e,r,t,n),staleTime:3e5}),zAn=(e,r,t={})=>({queryKey:Mt("getOverleafStatus",e,r,{...t}),queryFn:({signal:n})=>MSn(e,r,t,n),staleTime:3e4}),rB=(e,r,t,n,s)=>({queryKey:Mt("resolvedFile",e,r,t,n??null,s??null),staleTime:s&&!np(s)?3e4:1/0,refetchOnMount:s?!0:"always",refetchOnWindowFocus:s?!0:"always",queryFn:async({signal:o,client:a})=>{const i=async m=>{o.throwIfAborted();const k=await a.fetchQuery({...m,staleTime:s?m.staleTime:0});return o.throwIfAborted(),k},c=t==="abs",u=t==="artifacts",d=async()=>{const m=await i(tB(e,r)),k=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",x=m&&k?await i(o6(e,r)):null,v=m===null||k&&x===null;return{path:r,content:(x==null?void 0:x.content)??"",truncated:(x==null?void 0:x.truncated)??!1,binary:(x==null?void 0:x.binary)??(m==null?void 0:m.presentation)==="download",notFound:v,presentation:x?x.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},_=async()=>{for(const m of[`artifacts/${r}`,r]){const k=await i(Ab(e,m,{sessionId:n})).catch(()=>(o.throwIfAborted(),null));if(k&&!k.notFound)return k}return null},p=await(c?i(eB(r)).then(m=>({source:"absolute",file:m})):u?d().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const k=await _();return k?{source:"checkout",file:k}:{source:"artifact",file:m}}):i(Ab(e,r,{sessionId:n,ref:s})).then(m=>m.notFound&&!s?d().then(k=>k.notFound?{source:"checkout",file:m}:{source:"artifact",file:k,checkoutRoot:m.root}):{source:"checkout",file:m}));return o.throwIfAborted(),p}});async function EAn(e,r,t,n,s){if(np(s))return;const o=rB(e,r,t,n,s),a=[o.queryKey,...t==="abs"?[eB(r).queryKey]:[Ab(e,r,{sessionId:n,ref:s}).queryKey,Ab(e,`artifacts/${r}`,{sessionId:n}).queryKey,o6(e,r).queryKey,tB(e,r).queryKey]];await Promise.all(a.map(i=>Je.cancelQueries({queryKey:i,exact:!0}))),await Promise.all(a.map(i=>Je.invalidateQueries({queryKey:i,exact:!0,refetchType:"none"}))),await Je.invalidateQueries({queryKey:o.queryKey,exact:!0})}const Rb=360,NAn=272,AAn=380,TAn=NAn+56;function vh(){return Math.max(Rb,window.innerWidth-TAn-AAn)}const RAn=500,MAn=.33;function NA(){return Math.min(vh(),Math.max(RAn,Math.round(window.innerWidth*MAn)))}function OAn(){const e=vh();return Math.max(Rb,Math.min(480,e,Math.round(window.innerWidth*.25)))}function $An(e,r,t){return t?r.flatMap(n=>{if(n.status!=="starting"&&n.status!=="running")return[];const s=e.find(o=>o.id===n.experimentId&&o.chatSessionId===t);return s?[{experiment:s,run:n}]:[]}):[]}const AA={done:{tone:"success",live:!1},failed:{tone:"danger",live:!1},running:{tone:"info",live:!0},starting:{tone:"warning",live:!0},cancelling:{tone:"caution",live:!0},cancelled:{tone:"caution",live:!1},editing:{tone:"accent",live:!0},idle:{tone:"neutral",live:!1}};function DAn(e){return AA[e]??AA.idle}const LAn={done:NL,failed:rdn,running:wdn,starting:Rdn,cancelling:zfn,cancelled:gfn,editing:Wfn,idle:fdn};function a6(e){const r=LAn[e];return r?r():e.charAt(0).toUpperCase()+e.slice(1)}function tu({status:e,label:r,className:t}){const n=DAn(e);return f.jsx(Eh,{tone:n.tone,live:n.live,className:t,children:r??a6(e)})}const Jf={local:ND,tinker:ZJe,hf:zZe,modal:rJe,k8s:LZe,ssh:HJe,slurm:RJe,ray:wJe,openresearch:fJe};function TA(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,n)}return t}function Vr(e){for(var r=1;r=0||(d[c]=a[c]);return d})(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function Pr(e,r){return sB(e)||(function(t,n){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var o,a,i,c,u=[],d=!0,_=!1;try{if(i=(s=s.call(t)).next,n===0){if(Object(s)!==s)return;d=!1}else for(;!(d=(o=i.call(s)).done)&&(u.push(o.value),u.length!==n);d=!0);}catch(p){_=!0,a=p}finally{try{if(!d&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(_)throw a}}return u}})(e,r)||Py(e,r)||aB()}function nB(e){return sB(e)||oB(e)||Py(e)||aB()}function Fa(e){return(function(r){if(Array.isArray(r))return U3(r)})(e)||oB(e)||Py(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +`).forEach((p,m)=>{m>0&&(s.push(o),o=[]),p&&c(p)});return}d.type==="element"&&(a.push((((_=d.properties)==null?void 0:_.className)??[]).join(" ")),(d.children??[]).forEach(u),a.pop())};return n.forEach(u),s.push(o),s}function FP(e){return Array.isArray(e)?e.length===0:e===""}function HP({value:e,onChange:r,onSave:t,onBlur:n,readOnly:s=!1,path:o,highlightLine:a,scrollRequest:i,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:d}){const _=T.useMemo(()=>BP(e,jS(o)),[e,o]),{ruleCh:p,codeCh:m}=wP(_.length),k=T.useRef(null),w=T.useRef(null),v=()=>{const S=k.current;S&&w.current&&(w.current.scrollTop=S.scrollTop)},b=T.useRef(u);T.useLayoutEffect(()=>{const S=k.current;!S||!b.current||(S.scrollTop=b.current.top,S.scrollLeft=b.current.left,v())},[o]),T.useLayoutEffect(v,[e]),T.useLayoutEffect(()=>{var M;const S=k.current;if(!S||!a||i===void 0)return;const E=e.split(` +`),N=Math.min(Math.max(Math.trunc(a),1),E.length);let A=0;for(let $=0;${if(!s){if((S.metaKey||S.ctrlKey)&&S.key.toLowerCase()==="s"){S.preventDefault(),t();return}if(S.key==="Tab"){S.preventDefault();const E=S.currentTarget,{selectionStart:N,selectionEnd:A}=E,z=e.slice(0,N)+" "+e.slice(A);r(z),requestAnimationFrame(()=>{E.selectionStart=E.selectionEnd=N+1})}}},y=`absolute inset-0 m-0 py-3.5 pe-4 ${Nb} ${yP} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Nb}`,children:[f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${p}ch`},"aria-hidden":"true"}),f.jsx("div",{ref:w,className:`file-view-code ${y} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:_.map((S,E)=>f.jsxs("div",{"data-line":E+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[f.jsx("span",{className:`${xP} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:E+1}),FP(S)?f.jsx("br",{}):S]},E))}),f.jsx("textarea",{ref:k,className:`file-view-editarea ${y} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${m}ch`},value:e,onChange:S=>{s||r(S.target.value)},onScroll:S=>{v(),d==null||d({top:Math.max(0,S.currentTarget.scrollTop),left:Math.max(0,S.currentTarget.scrollLeft)})},onKeyDown:x,onBlur:s?void 0:n,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function qP({onClose:e,onSaved:r}){const t=MCn(),n=dt(t),[s,o]=T.useState(()=>n.data??null),[a,i]=T.useState(()=>{var y;return((y=n.data)==null?void 0:y.content)??""}),c=!s&&n.error?n.error.message:null,u=mr({mutationFn:({content:y,previous:S})=>a6n(y,S)}),[d,_]=T.useState(!1),p=T.useRef(null),m=T.useRef(e),k=s!==null&&a!==s.content,w=T.useRef(k),v=T.useRef(d);w.current=k,v.current=d,m.current=e,T.useEffect(()=>{!n.data||w.current||v.current||(o(n.data),i(n.data.content))},[n.data]);const b=()=>{v.current||w.current&&!window.confirm(Cun())||m.current()};xp(p,b,"textarea");async function x(){if(!(!s||!k||d)){_(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!Wr(t.queryKey))return;ts(t.queryKey,{...s,content:a}),o({...s,content:a}),r==null||r(),tr(Wun(),"success")}catch(y){tr(y instanceof Error?y.message:String(y),"error")}finally{_(!1)}}}return Vs.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&b()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(48rem,calc(100vh-2.5rem))] w-200 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"ssh-config-dialog-title",tabIndex:-1,children:[f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:r_n()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":mun(),onClick:b,disabled:d,children:f.jsx(pn,{size:16})}),f.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:c?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:c}):s===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(Nt,{})," ",Dun()]}):f.jsx(HP,{value:a,onChange:i,onSave:()=>void x(),path:s.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx(Oe,{onClick:b,disabled:d,children:Gf()}),f.jsx(Oe,{variant:"primary",onClick:()=>void x(),disabled:!k||d,children:d?Qa():nc()})]})]})}),document.body)}function UP({runtime:e,corner:r=!1}){const[t,n]=T.useState(null);return e.kind==="ssh"?f.jsx(L3,{runtime:e,corner:r}):f.jsxs(f.Fragment,{children:[r?f.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:f.jsxs(Oe,{className:"h-auto max-w-48 justify-start rounded-none border-b-0 border-s-0 px-2.5 py-1.5 font-normal",title:n3(),"aria-haspopup":"dialog",onClick:()=>n("hosts"),children:[f.jsx(Eb,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:r3()})]})}):f.jsx("div",{className:"relative shrink-0 border-t border-border",children:f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Rt,{size:"small","aria-label":n3(),"aria-haspopup":"dialog",onClick:()=>n("hosts"),children:f.jsx(Eb,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"truncate text-sm leading-tight",children:r3()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ee(e.version)]})]})]})}),t==="hosts"&&f.jsx(bNn,{onClose:()=>n(null),onConfigureSsh:()=>n("config")}),t==="config"&&f.jsx(qP,{onClose:()=>n("hosts")})]})}function t6(e=!0){var n;const r=wb(),t=dt({...r,enabled:e});return{status:t.data??null,error:((n=t.error)==null?void 0:n.message)??null,apply:s=>ts(r.queryKey,s)}}const fAn=36e4,dAn=500,GP=e=>`https://github.com/alphaXiv/OpenResearch/releases/tag/${e.split("/").map(encodeURIComponent).join("/")}`;function WP(e){const[r,t]=T.useState(!1),[n,s]=T.useState(null),o=T.useRef(!1);T.useEffect(()=>(o.current=!1,()=>{o.current=!0}),[]);const a=e!=null&&e.restartRequired?e.instance:null;return{restarting:r,error:n,restart:()=>{if(!a||r)return;const c=wb(),u=()=>o.current||!Wr(c.queryKey);t(!0),s(null),(async()=>{try{if(await qSn(),u())return;const d=Date.now()+fAn;for(;Date.now()setTimeout(p,dAn)),u())return;const _=await Je.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(_&&_.instance!==a){window.location.reload();return}}throw new Error(Pwn())}catch(d){if(u())return;s(d instanceof Error?d.message:String(d)),t(!1)}})()}}}function KP({status:e}){const[r,t]=T.useState(null),n=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:o,restart:a}=WP(e);return!n||r===n?null:f.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-blue-subtle border-b border-b-accent-blue-border",role:"status",children:[f.jsx(Ei,{size:13,className:`shrink-0 text-accent-blue-strong${s?" animate-spin":""}`}),f.jsx("span",{className:"min-w-0",children:o?$L({error:o}):twn({version:Ee(n)})}),(e==null?void 0:e.installedTag)&&f.jsx("a",{href:GP(e.installedTag),target:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:kL()}),(e==null?void 0:e.canRestart)&&f.jsx(Oe,{type:"button",size:"small",disabled:s,onClick:a,children:s?DL():OL()}),f.jsx(Rt,{type:"button",size:"small",className:"ms-auto","aria-label":_wn(),disabled:s,onClick:()=>t(n),children:f.jsx(pn,{size:13})})]})}const VP="desktop-app-banner-dismissed-on",zA="https://github.com/alphaXiv/OpenResearch/releases/latest";function hAn(){const e=navigator.platform;return/Mac/.test(e)?"OpenResearch.dmg":/Win/.test(e)?"OpenResearch-Setup.exe":/Linux x86_64/.test(e)?"OpenResearch-x86_64.AppImage":/Linux aarch64/.test(e)?"OpenResearch-aarch64.AppImage":null}function QP(){return new Date().toDateString()}function EA(){try{return localStorage.getItem(VP)===QP()}catch{return!1}}function XP(){const[e,r]=T.useState(EA);if(T.useEffect(()=>{const s=()=>r(EA());return window.addEventListener("focus",s),()=>window.removeEventListener("focus",s)},[]),"__ORX_DESKTOP__"in window||e)return null;const t=()=>{try{localStorage.setItem(VP,QP())}catch{}r(!0)},n=hAn();return f.jsxs("div",{className:"desktop-app-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-blue-subtle border-b border-b-accent-blue-border",children:[f.jsx(GI,{size:13,className:"shrink-0 text-accent-blue-strong"}),f.jsx("span",{className:"min-w-0",children:frt()}),f.jsx(Xf,{size:"small",href:n?`${zA}/download/${n}`:zA,target:n?void 0:"_blank",rel:"noreferrer",children:rrt()}),f.jsx(Rt,{type:"button",size:"small",className:"ms-auto","aria-label":Wtt(),onClick:t,children:f.jsx(pn,{size:13})})]})}function r6(){return f.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:f.jsx(Nt,{})})}function pAn(){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{children:wi()}),f.jsx(gy,{to:"/projects",children:Gm()})]})}function n6({error:e,reset:r}){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{role:"alert",children:e.message}),f.jsx(Oe,{onClick:r,children:Ks()}),f.jsx(gy,{to:"/projects",children:Gm()})]})}function YP({projectId:e}){const{queryClient:r}=Rj({from:"__root__"}),t=a0(),[n,s]=T.useState(null),[o,a]=T.useState(0);return T.useEffect(()=>{let i=!0;return s(null),(e?fP(e,r):rNn(r)).then(c=>{i&&t({href:c,replace:!0})}).catch(c=>{i&&(WK(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{i=!1}},[e,o,t,r]),n?f.jsx(n6,{error:n,reset:()=>a(i=>i+1)}):f.jsx(r6,{})}function ZP(){return f.jsx(YP,{})}function mAn({projectId:e}){return f.jsx(YP,{projectId:e})}function gAn(){const e=lP(),r=a0(),t=Vf(),n=dt(t),s=dt(f0()),o=n.data,a=s.data,i=(o==null?void 0:o.length)===0,c=n.error??s.error,u=()=>{n.refetch(),s.refetch()},{status:d}=t6(e.kind==="local");T.useEffect(()=>{document.title="OpenResearch"},[]);const _=p=>void r({to:"/projects/$projectId",params:{projectId:p}});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsxs(f.Fragment,{children:[f.jsx(mP,{}),f.jsx(KP,{status:d})]}),f.jsx(XP,{}),c&&(!o||!a)?f.jsx(n6,{error:c,reset:u}):!o||!a?f.jsx(r6,{}):i?f.jsx(dNn,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{tNn(),_(p.id)}}):f.jsx(ZP,{}),(e.kind==="ssh"||o&&a&&!i)&&f.jsx(UP,{runtime:e,corner:!0})]})}const vAn=Xc()({component:ZP}),bAn=Xc()({component:lg}),yAn=Xc()({}),xAn=Xc()({component:gAn}),wAn=e=>({queryKey:Mt("getRunDiff",e),queryFn:({signal:r})=>hSn(e,r),staleTime:3e4}),JP=e=>({queryKey:Mt("getExperimentDiff",e),queryFn:({signal:r})=>pSn(e,r),staleTime:3e4}),Ab=(e,r,t={})=>({queryKey:Mt("getProjectFile",e,r,{...t}),queryFn:({signal:n})=>mSn(e,r,t,n),staleTime:t.ref?np(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),eB=e=>({queryKey:Mt("getAbsoluteFile",e),queryFn:({signal:r})=>gSn(e,r),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),s6=(e,r={})=>({queryKey:Mt("getCodeTree",e,{...r}),queryFn:({signal:t})=>$Sn(e,r,t),staleTime:r.ref&&np(r.ref)?1/0:3e4}),Tb=e=>({queryKey:Mt("getSessionWorktree",e),queryFn:({signal:r})=>DSn(e,r),staleTime:3e4}),kAn=e=>({queryKey:Mt("getArtifacts",e),queryFn:({signal:r})=>k6n(e,r),staleTime:3e4}),o6=(e,r)=>({queryKey:Mt("getArtifactFileText",e,r),queryFn:({signal:t})=>z6n(e,r,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),tB=(e,r)=>({queryKey:Mt("getArtifactFileMetadata",e,r),queryFn:({signal:t})=>N6n(e,r,t),staleTime:2e3}),jAn=()=>({queryKey:Mt("getLatexEngine"),queryFn:({signal:e})=>xSn(e),staleTime:3e5}),SAn=()=>({queryKey:Mt("getOverleafSettings"),queryFn:({signal:e})=>kSn(e),staleTime:3e5}),CAn=(e,r,t={})=>({queryKey:Mt("getOverleafState",e,r,{...t}),queryFn:({signal:n})=>NSn(e,r,t,n),staleTime:3e5}),zAn=(e,r,t={})=>({queryKey:Mt("getOverleafStatus",e,r,{...t}),queryFn:({signal:n})=>MSn(e,r,t,n),staleTime:3e4}),rB=(e,r,t,n,s)=>({queryKey:Mt("resolvedFile",e,r,t,n??null,s??null),staleTime:s&&!np(s)?3e4:1/0,refetchOnMount:s?!0:"always",refetchOnWindowFocus:s?!0:"always",queryFn:async({signal:o,client:a})=>{const i=async m=>{o.throwIfAborted();const k=await a.fetchQuery({...m,staleTime:s?m.staleTime:0});return o.throwIfAborted(),k},c=t==="abs",u=t==="artifacts",d=async()=>{const m=await i(tB(e,r)),k=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",w=m&&k?await i(o6(e,r)):null,v=m===null||k&&w===null;return{path:r,content:(w==null?void 0:w.content)??"",truncated:(w==null?void 0:w.truncated)??!1,binary:(w==null?void 0:w.binary)??(m==null?void 0:m.presentation)==="download",notFound:v,presentation:w?w.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},_=async()=>{for(const m of[`artifacts/${r}`,r]){const k=await i(Ab(e,m,{sessionId:n})).catch(()=>(o.throwIfAborted(),null));if(k&&!k.notFound)return k}return null},p=await(c?i(eB(r)).then(m=>({source:"absolute",file:m})):u?d().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const k=await _();return k?{source:"checkout",file:k}:{source:"artifact",file:m}}):i(Ab(e,r,{sessionId:n,ref:s})).then(m=>m.notFound&&!s?d().then(k=>k.notFound?{source:"checkout",file:m}:{source:"artifact",file:k,checkoutRoot:m.root}):{source:"checkout",file:m}));return o.throwIfAborted(),p}});async function EAn(e,r,t,n,s){if(np(s))return;const o=rB(e,r,t,n,s),a=[o.queryKey,...t==="abs"?[eB(r).queryKey]:[Ab(e,r,{sessionId:n,ref:s}).queryKey,Ab(e,`artifacts/${r}`,{sessionId:n}).queryKey,o6(e,r).queryKey,tB(e,r).queryKey]];await Promise.all(a.map(i=>Je.cancelQueries({queryKey:i,exact:!0}))),await Promise.all(a.map(i=>Je.invalidateQueries({queryKey:i,exact:!0,refetchType:"none"}))),await Je.invalidateQueries({queryKey:o.queryKey,exact:!0})}const Rb=360,NAn=272,AAn=380,TAn=NAn+56;function vh(){return Math.max(Rb,window.innerWidth-TAn-AAn)}const RAn=500,MAn=.33;function NA(){return Math.min(vh(),Math.max(RAn,Math.round(window.innerWidth*MAn)))}function OAn(){const e=vh();return Math.max(Rb,Math.min(480,e,Math.round(window.innerWidth*.25)))}function $An(e,r,t){return t?r.flatMap(n=>{if(n.status!=="starting"&&n.status!=="running")return[];const s=e.find(o=>o.id===n.experimentId&&o.chatSessionId===t);return s?[{experiment:s,run:n}]:[]}):[]}const AA={done:{tone:"success",live:!1},failed:{tone:"danger",live:!1},running:{tone:"info",live:!0},starting:{tone:"warning",live:!0},cancelling:{tone:"caution",live:!0},cancelled:{tone:"caution",live:!1},editing:{tone:"accent",live:!0},idle:{tone:"neutral",live:!1}};function DAn(e){return AA[e]??AA.idle}const LAn={done:NL,failed:rdn,running:wdn,starting:Rdn,cancelling:zfn,cancelled:gfn,editing:Wfn,idle:fdn};function a6(e){const r=LAn[e];return r?r():e.charAt(0).toUpperCase()+e.slice(1)}function tu({status:e,label:r,className:t}){const n=DAn(e);return f.jsx(Eh,{tone:n.tone,live:n.live,className:t,children:r??a6(e)})}const Jf={local:ND,tinker:ZJe,hf:zZe,modal:rJe,k8s:LZe,ssh:HJe,slurm:RJe,ray:wJe,openresearch:fJe};function TA(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,n)}return t}function Vr(e){for(var r=1;r=0||(d[c]=a[c]);return d})(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function Pr(e,r){return sB(e)||(function(t,n){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var o,a,i,c,u=[],d=!0,_=!1;try{if(i=(s=s.call(t)).next,n===0){if(Object(s)!==s)return;d=!1}else for(;!(d=(o=i.call(s)).done)&&(u.push(o.value),u.length!==n);d=!0);}catch(p){_=!0,a=p}finally{try{if(!d&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(_)throw a}}return u}})(e,r)||Py(e,r)||aB()}function nB(e){return sB(e)||oB(e)||Py(e)||aB()}function Fa(e){return(function(r){if(Array.isArray(r))return U3(r)})(e)||oB(e)||Py(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function sB(e){if(Array.isArray(e))return e}function oB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Py(e,r){if(e){if(typeof e=="string")return U3(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?U3(e,r):void 0}}function U3(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,i=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return a=c.done,c},e:function(c){i=!0,o=c},f:function(){try{a||t.return==null||t.return()}finally{if(i)throw o}}}}var Xv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function y0(e,r){return e(r={exports:{}},r.exports),r.exports}var Pa=y0((function(e){/*! @@ -592,39 +592,39 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(){var r={}.hasOwnProperty;function t(){for(var n=[],s=0;s-1?b.slice(0,y):S;switch(S){case"diff":x--;break e;case"deleted":case"new":var z=b.slice(y+1);z.indexOf("file mode")===0&&(a[S==="new"?"newMode":"oldMode"]=z.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var N=b.slice(y+1).split(" "),A=N[0].split("..");a.oldRevision=A[0],a.newRevision=A[1],N[1]&&(a.oldMode=a.newMode=N[1]);break;case"copy":case"rename":var E=b.slice(y+1);E.indexOf("from")===0?a.oldPath=E.slice(5):a.newPath=E.slice(3),w=S;break;case"---":var M=b.slice(y+1),$=m[++x].slice(4);M==="/dev/null"?($=$.slice(2),w="add"):$==="/dev/null"?(M=M.slice(2),w="delete"):(w="modify",M=M.slice(2),$=$.slice(2)),M&&(a.oldPath=M),$&&(a.newPath=$),p=5;break e}}a.type=w||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(v.indexOf("@@")===0){var D=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);i={content:v,oldStart:D[1]-0,newStart:D[4]-0,oldLines:D[3]-0||1,newLines:D[6]-0||1,changes:[]},a.hunks.push(i),c=i.oldStart,u=i.newStart}else{var I=v.slice(0,1),G={content:v.slice(1)};switch(I){case"+":G.type="insert",G.isInsert=!0,G.lineNumber=u,u++;break;case"-":G.type="delete",G.isDelete=!0,G.lineNumber=c,c++;break;case" ":G.type="normal",G.isNormal=!0,G.oldLineNumber=c,G.newLineNumber=u,c++,u++;break;case"\\":var H=i.changes[i.changes.length-1];H.isDelete||(a.newEndingNewLine=!1),H.isInsert||(a.oldEndingNewLine=!1)}G.type&&i.changes.push(G)}x++}return _}};e.exports=s})()}));function T_(e){return e.type==="insert"}function Ha(e){return e.type==="delete"}function ou(e){return e.type==="normal"}function FAn(e,r){var t=r.nearbySequences==="zip"?(function(n){var s=n.reduce((function(o,a,i){var c=Pr(o,3),u=c[0],d=c[1],_=c[2];return d?T_(a)&&_>=0?(u.splice(_+1,0,a),[u,a,_+2]):(u.push(a),[u,a,Ha(a)&&Ha(d)?_:i]):(u.push(a),[u,a,Ha(a)?i:-1])}),[[],null,-1]);return Pr(s,1)[0]})(e.changes):e.changes;return Vr(Vr({},e),{},{isPlain:!1,changes:t})}function G3(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=(function(n){if(n.startsWith("diff --git"))return n;var s=n.indexOf(` +`),k=m.length,w=0;w-1?b.slice(0,y):S;switch(S){case"diff":w--;break e;case"deleted":case"new":var E=b.slice(y+1);E.indexOf("file mode")===0&&(a[S==="new"?"newMode":"oldMode"]=E.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var N=b.slice(y+1).split(" "),A=N[0].split("..");a.oldRevision=A[0],a.newRevision=A[1],N[1]&&(a.oldMode=a.newMode=N[1]);break;case"copy":case"rename":var z=b.slice(y+1);z.indexOf("from")===0?a.oldPath=z.slice(5):a.newPath=z.slice(3),x=S;break;case"---":var M=b.slice(y+1),$=m[++w].slice(4);M==="/dev/null"?($=$.slice(2),x="add"):$==="/dev/null"?(M=M.slice(2),x="delete"):(x="modify",M=M.slice(2),$=$.slice(2)),M&&(a.oldPath=M),$&&(a.newPath=$),p=5;break e}}a.type=x||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(v.indexOf("@@")===0){var D=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);i={content:v,oldStart:D[1]-0,newStart:D[4]-0,oldLines:D[3]-0||1,newLines:D[6]-0||1,changes:[]},a.hunks.push(i),c=i.oldStart,u=i.newStart}else{var I=v.slice(0,1),G={content:v.slice(1)};switch(I){case"+":G.type="insert",G.isInsert=!0,G.lineNumber=u,u++;break;case"-":G.type="delete",G.isDelete=!0,G.lineNumber=c,c++;break;case" ":G.type="normal",G.isNormal=!0,G.oldLineNumber=c,G.newLineNumber=u,c++,u++;break;case"\\":var F=i.changes[i.changes.length-1];F.isDelete||(a.newEndingNewLine=!1),F.isInsert||(a.oldEndingNewLine=!1)}G.type&&i.changes.push(G)}w++}return _}};e.exports=s})()}));function T_(e){return e.type==="insert"}function Ha(e){return e.type==="delete"}function ou(e){return e.type==="normal"}function FAn(e,r){var t=r.nearbySequences==="zip"?(function(n){var s=n.reduce((function(o,a,i){var c=Pr(o,3),u=c[0],d=c[1],_=c[2];return d?T_(a)&&_>=0?(u.splice(_+1,0,a),[u,a,_+2]):(u.push(a),[u,a,Ha(a)&&Ha(d)?_:i]):(u.push(a),[u,a,Ha(a)?i:-1])}),[[],null,-1]);return Pr(s,1)[0]})(e.changes):e.changes;return Vr(Vr({},e),{},{isPlain:!1,changes:t})}function G3(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=(function(n){if(n.startsWith("diff --git"))return n;var s=n.indexOf(` `),o=n.indexOf(` `,s+1),a=n.slice(0,s),i=n.slice(s+1,o),c=a.split(" ").slice(1,-3).join(" "),u=i.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(c," b/").concat(u),"index 1111111..2222222 100644","--- a/".concat(c),"+++ b/".concat(u),n.slice(o+1)].join(` -`)})(e.trimStart());return BAn.parse(t).map((function(n){return(function(s,o){var a=s.hunks.map((function(i){return FAn(i,o)}));return Vr(Vr({},s),{},{hunks:a})})(n,r)}))}function HAn(e){return e[0]}function qAn(e){return e[e.length-1]}function W3(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function xg(e){return e==="old"?function(r){return T_(r)?-1:ou(r)?r.oldLineNumber:r.lineNumber}:function(r){return Ha(r)?-1:ou(r)?r.newLineNumber:r.lineNumber}}function cB(e,r){return function(t,n){var s=t[e],o=s+t[r];return n>=s&&n=o&&s-1},YAn=function(e,r){var t=this.__data__,n=By(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this};function fh(e){var r=-1,t=e==null?0:e.length;for(this.clear();++ri))return!1;var u=o.get(e),d=o.get(r);if(u&&d)return u==r&&d==e;var _=-1,p=!0,m=2&t?new OTn:void 0;for(o.set(e,r),o.set(r,e);++_-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},En={};En["[object Float32Array]"]=En["[object Float64Array]"]=En["[object Int8Array]"]=En["[object Int16Array]"]=En["[object Int32Array]"]=En["[object Uint8Array]"]=En["[object Uint8ClampedArray]"]=En["[object Uint16Array]"]=En["[object Uint32Array]"]=!0,En["[object Arguments]"]=En["[object Array]"]=En["[object ArrayBuffer]"]=En["[object Boolean]"]=En["[object DataView]"]=En["[object Date]"]=En["[object Error]"]=En["[object Function]"]=En["[object Map]"]=En["[object Number]"]=En["[object Object]"]=En["[object RegExp]"]=En["[object Set]"]=En["[object String]"]=En["[object WeakMap]"]=!1;var XTn=function(e){return op(e)&&l6(e.length)&&!!En[Sp(e)]},YTn=function(e){return function(r){return e(r)}},PA=y0((function(e,r){var t=r&&!r.nodeType&&r,n=t&&e&&!e.nodeType&&e,s=n&&n.exports===t&&_B.process,o=(function(){try{var a=n&&n.require&&n.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}})();e.exports=o})),BA=PA&&PA.isTypedArray,u6=BA?YTn(BA):XTn,ZTn=Object.prototype.hasOwnProperty,JTn=function(e,r){var t=Wa(e),n=!t&&Uy(e),s=!t&&!n&&Mb(e),o=!t&&!n&&!s&&u6(e),a=t||n||s||o,i=a?GTn(e.length,String):[],c=i.length;for(var u in e)!ZTn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||gB(u,c))||i.push(u);return i},eRn=Object.prototype,vB=function(e){var r=e&&e.constructor;return e===(typeof r=="function"&&r.prototype||eRn)},tRn=(function(e,r){return function(t){return e(r(t))}})(Object.keys,Object),rRn=Object.prototype.hasOwnProperty,bB=function(e){if(!vB(e))return tRn(e);var r=[];for(var t in Object(e))rRn.call(e,t)&&t!="constructor"&&r.push(t);return r},Gy=function(e){return e!=null&&l6(e.length)&&!dB(e)},_6=function(e){return Gy(e)?JTn(e):bB(e)},FA=function(e){return BTn(e,_6,UTn)},nRn=Object.prototype.hasOwnProperty,sRn=function(e,r,t,n,s,o){var a=1&t,i=FA(e),c=i.length;if(c!=FA(r).length&&!a)return!1;for(var u=c;u--;){var d=i[u];if(!(a?d in r:nRn.call(r,d)))return!1}var _=o.get(e),p=o.get(r);if(_&&p)return _==r&&p==e;var m=!0;o.set(e,r),o.set(r,e);for(var k=a;++u1)return!1;if(e.length===1){var r=Pr(e,1)[0];return r.type==="text"&&!r.value}return!0}function WRn(e){var r=e.changeKey,t=e.text,n=e.tokens,s=e.renderToken,o=w_(e,URn),a=s?function(i,c){return s(i,WA,c)}:WA;return f.jsx("td",Vr(Vr({},o),{},{"data-change-key":r,children:n?GRn(n)?" ":n.map(a):t||" "}))}var zB=T.memo(WRn);function EB(e,r){return function(){var t=r==="old"?Xy(e):Yy(e);return t===-1?void 0:t}}function NB(e,r){return function(t){return e&&t?f.jsx("a",{href:r?"#"+r:void 0,children:t}):t}}function Ob(e,r){return r?function(t){e(),r(t)}:e}function KA(e,r,t,n){return T.useMemo((function(){var s=CB(e,(function(o){return function(a){return o&&o(r,a)}}));return s.onMouseEnter=Ob(t,s.onMouseEnter),s.onMouseLeave=Ob(n,s.onMouseLeave),s}),[e,t,n,r])}function VA(e,r,t,n,s,o,a,i,c){var u={change:r,side:n,inHoverState:i,renderDefault:EB(r,n),wrapInAnchor:NB(s,o)};return f.jsx("td",Vr(Vr({className:e},a),{},{"data-change-key":t,children:c(u)}))}function KRn(e){var r,t,n,s=e.change,o=e.selected,a=e.tokens,i=e.className,c=e.generateLineClassName,u=e.gutterClassName,d=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,k=e.gutterAnchor,x=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,w=s.type,y=s.content,S=b_(s),z=(r=Pr(T.useState(!1),2),t=r[0],n=r[1],[t,T.useCallback((function(){return n(!0)}),[]),T.useCallback((function(){return n(!1)}),[])]),N=Pr(z,3),A=N[0],E=N[1],M=N[2],$=T.useMemo((function(){return{change:s}}),[s]),D=KA(_,$,E,M),I=KA(p,$,E,M),G=x(s),H=c({changes:[s],defaultGenerate:function(){return i}}),Q=Pa("diff-gutter","diff-gutter-".concat(w),u,{"diff-gutter-selected":o}),K=Pa("diff-code","diff-code-".concat(w),d,{"diff-code-selected":o});return f.jsxs("tr",{id:G,className:Pa("diff-line",H),children:[!m&&VA(Q,s,S,"old",k,G,D,A,b),!m&&VA(Q,s,S,"new",k,G,D,A,b),f.jsx(zB,Vr({className:K,changeKey:S,text:y,tokens:a,renderToken:v},I))]})}var VRn=T.memo(KRn);function QRn(e){var r=e.hideGutter,t=e.element;return f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?1:3,className:"diff-widget-content",children:t})})}var XRn=["hideGutter","selectedChanges","tokens","lineClassName"],YRn=["hunk","widgets","className"];function ZRn(e){var r=e.hunk,t=e.widgets,n=e.className,s=w_(e,YRn),o=(function(a,i){return a.reduce((function(c,u){var d=b_(u);c.push(["change",d,u]);var _=i[d];return _&&c.push(["widget",d,_]),c}),[])})(r.changes,t);return f.jsx("tbody",{className:Pa("diff-hunk",n),children:o.map((function(a){return(function(i,c){var u=Pr(i,3),d=u[0],_=u[1],p=u[2],m=c.hideGutter,k=c.selectedChanges,x=c.tokens,v=c.lineClassName,b=w_(c,XRn);if(d==="change"){var w=Ha(p)?"old":"new",y=Ha(p)?Xy(p):Yy(p),S=x?x[w][y-1]:null;return f.jsx(VRn,Vr({className:v,change:p,hideGutter:m,selected:k.includes(_),tokens:S},b),"change".concat(_))}return d==="widget"?f.jsx(QRn,{hideGutter:m,element:p},"widget".concat(_)):null})(a,s)}))})}var AB=0;function Zv(e,r,t,n){var s=T.useCallback((function(){return r(e)}),[e,r]),o=T.useCallback((function(){return r("")}),[r]);return T.useMemo((function(){var a=CB(n,(function(i){return function(c){return i&&i({side:e,change:t},c)}}));return a.onMouseEnter=Ob(s,a.onMouseEnter),a.onMouseLeave=Ob(o,a.onMouseLeave),a}),[t,n,s,e,o])}function J2(e){var r=e.change,t=e.side,n=e.selected,s=e.tokens,o=e.gutterClassName,a=e.codeClassName,i=e.gutterEvents,c=e.codeEvents,u=e.anchorID,d=e.gutterAnchor,_=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,k=e.renderToken,x=e.renderGutter;if(!r){var v=Pa("diff-gutter","diff-gutter-omit",o),b=Pa("diff-code","diff-code-omit",a);return[!p&&f.jsx("td",{className:v},"gutter"),f.jsx("td",{className:b},"code")]}var w=r.type,y=r.content,S=b_(r),z=t===AB?"old":"new",N=Vr({id:u||void 0,className:Pa("diff-gutter","diff-gutter-".concat(w),q3({"diff-gutter-selected":n},"diff-line-hover-"+z,m),o),children:x({change:r,side:z,inHoverState:m,renderDefault:EB(r,z),wrapInAnchor:NB(d,_)})},i),A=Pa("diff-code","diff-code-".concat(w),q3({"diff-code-selected":n},"diff-line-hover-"+z,m),a);return[!p&&f.jsx("td",Vr(Vr({},N),{},{"data-change-key":S}),"gutter"),f.jsx(zB,Vr({className:A,changeKey:S,text:y,tokens:s,renderToken:k},c),"code")]}function JRn(e){var r=e.className,t=e.oldChange,n=e.newChange,s=e.oldSelected,o=e.newSelected,a=e.oldTokens,i=e.newTokens,c=e.monotonous,u=e.gutterClassName,d=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,k=e.generateAnchorID,x=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,w=e.renderGutter,y=Pr(T.useState(""),2),S=y[0],z=y[1],N=Zv("old",z,t,_),A=Zv("new",z,n,_),E=Zv("old",z,t,p),M=Zv("new",z,n,p),$=t&&k(t),D=n&&k(n),I=x({changes:[t,n],defaultGenerate:function(){return r}}),G={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:d,gutterEvents:_,codeEvents:p,renderToken:b,renderGutter:w},H=Vr(Vr({},G),{},{change:t,side:AB,selected:s,tokens:a,gutterEvents:N,codeEvents:E,anchorID:$,gutterAnchor:v,gutterAnchorTarget:$,hover:S==="old"}),Q=Vr(Vr({},G),{},{change:n,side:1,selected:o,tokens:i,gutterEvents:A,codeEvents:M,anchorID:t===n?null:D,gutterAnchor:v,gutterAnchorTarget:t===n?$:D,hover:S==="new"});if(c)return f.jsx("tr",{className:Pa("diff-line",I),children:J2(t?H:Q)});var K=(function(J,ee){return J&&!ee?"diff-line-old-only":!J&&ee?"diff-line-new-only":J===ee?"diff-line-normal":"diff-line-compare"})(t,n);return f.jsxs("tr",{className:Pa("diff-line",K,I),children:[J2(H),J2(Q)]})}var eMn=T.memo(JRn);function tMn(e){var r=e.hideGutter,t=e.oldElement,n=e.newElement;return e.monotonous?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:t||n})}):t===n?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?2:4,className:"diff-widget-content",children:t})}):f.jsxs("tr",{className:"diff-widget",children:[f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:t}),f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:n})]})}var rMn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],nMn=["hunk","widgets","className"];function Jv(e,r){return(e?b_(e):"00")+(r?b_(r):"00")}function sMn(e){var r=e.hunk,t=e.widgets,n=e.className,s=w_(e,nMn),o=(function(a,i){for(var c=function(b){if(!b)return null;var w=b_(b);return i[w]||null},u=[],d=0;d=s&&n=o&&s-1},YAn=function(e,r){var t=this.__data__,n=By(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this};function fh(e){var r=-1,t=e==null?0:e.length;for(this.clear();++ri))return!1;var u=o.get(e),d=o.get(r);if(u&&d)return u==r&&d==e;var _=-1,p=!0,m=2&t?new OTn:void 0;for(o.set(e,r),o.set(r,e);++_-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},En={};En["[object Float32Array]"]=En["[object Float64Array]"]=En["[object Int8Array]"]=En["[object Int16Array]"]=En["[object Int32Array]"]=En["[object Uint8Array]"]=En["[object Uint8ClampedArray]"]=En["[object Uint16Array]"]=En["[object Uint32Array]"]=!0,En["[object Arguments]"]=En["[object Array]"]=En["[object ArrayBuffer]"]=En["[object Boolean]"]=En["[object DataView]"]=En["[object Date]"]=En["[object Error]"]=En["[object Function]"]=En["[object Map]"]=En["[object Number]"]=En["[object Object]"]=En["[object RegExp]"]=En["[object Set]"]=En["[object String]"]=En["[object WeakMap]"]=!1;var XTn=function(e){return op(e)&&l6(e.length)&&!!En[Sp(e)]},YTn=function(e){return function(r){return e(r)}},PA=y0((function(e,r){var t=r&&!r.nodeType&&r,n=t&&e&&!e.nodeType&&e,s=n&&n.exports===t&&_B.process,o=(function(){try{var a=n&&n.require&&n.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}})();e.exports=o})),BA=PA&&PA.isTypedArray,u6=BA?YTn(BA):XTn,ZTn=Object.prototype.hasOwnProperty,JTn=function(e,r){var t=Wa(e),n=!t&&Uy(e),s=!t&&!n&&Mb(e),o=!t&&!n&&!s&&u6(e),a=t||n||s||o,i=a?GTn(e.length,String):[],c=i.length;for(var u in e)!ZTn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||gB(u,c))||i.push(u);return i},eRn=Object.prototype,vB=function(e){var r=e&&e.constructor;return e===(typeof r=="function"&&r.prototype||eRn)},tRn=(function(e,r){return function(t){return e(r(t))}})(Object.keys,Object),rRn=Object.prototype.hasOwnProperty,bB=function(e){if(!vB(e))return tRn(e);var r=[];for(var t in Object(e))rRn.call(e,t)&&t!="constructor"&&r.push(t);return r},Gy=function(e){return e!=null&&l6(e.length)&&!dB(e)},_6=function(e){return Gy(e)?JTn(e):bB(e)},FA=function(e){return BTn(e,_6,UTn)},nRn=Object.prototype.hasOwnProperty,sRn=function(e,r,t,n,s,o){var a=1&t,i=FA(e),c=i.length;if(c!=FA(r).length&&!a)return!1;for(var u=c;u--;){var d=i[u];if(!(a?d in r:nRn.call(r,d)))return!1}var _=o.get(e),p=o.get(r);if(_&&p)return _==r&&p==e;var m=!0;o.set(e,r),o.set(r,e);for(var k=a;++u1)return!1;if(e.length===1){var r=Pr(e,1)[0];return r.type==="text"&&!r.value}return!0}function WRn(e){var r=e.changeKey,t=e.text,n=e.tokens,s=e.renderToken,o=w_(e,URn),a=s?function(i,c){return s(i,WA,c)}:WA;return f.jsx("td",Vr(Vr({},o),{},{"data-change-key":r,children:n?GRn(n)?" ":n.map(a):t||" "}))}var zB=T.memo(WRn);function EB(e,r){return function(){var t=r==="old"?Xy(e):Yy(e);return t===-1?void 0:t}}function NB(e,r){return function(t){return e&&t?f.jsx("a",{href:r?"#"+r:void 0,children:t}):t}}function Ob(e,r){return r?function(t){e(),r(t)}:e}function KA(e,r,t,n){return T.useMemo((function(){var s=CB(e,(function(o){return function(a){return o&&o(r,a)}}));return s.onMouseEnter=Ob(t,s.onMouseEnter),s.onMouseLeave=Ob(n,s.onMouseLeave),s}),[e,t,n,r])}function VA(e,r,t,n,s,o,a,i,c){var u={change:r,side:n,inHoverState:i,renderDefault:EB(r,n),wrapInAnchor:NB(s,o)};return f.jsx("td",Vr(Vr({className:e},a),{},{"data-change-key":t,children:c(u)}))}function KRn(e){var r,t,n,s=e.change,o=e.selected,a=e.tokens,i=e.className,c=e.generateLineClassName,u=e.gutterClassName,d=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,k=e.gutterAnchor,w=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,x=s.type,y=s.content,S=b_(s),E=(r=Pr(T.useState(!1),2),t=r[0],n=r[1],[t,T.useCallback((function(){return n(!0)}),[]),T.useCallback((function(){return n(!1)}),[])]),N=Pr(E,3),A=N[0],z=N[1],M=N[2],$=T.useMemo((function(){return{change:s}}),[s]),D=KA(_,$,z,M),I=KA(p,$,z,M),G=w(s),F=c({changes:[s],defaultGenerate:function(){return i}}),Q=Pa("diff-gutter","diff-gutter-".concat(x),u,{"diff-gutter-selected":o}),K=Pa("diff-code","diff-code-".concat(x),d,{"diff-code-selected":o});return f.jsxs("tr",{id:G,className:Pa("diff-line",F),children:[!m&&VA(Q,s,S,"old",k,G,D,A,b),!m&&VA(Q,s,S,"new",k,G,D,A,b),f.jsx(zB,Vr({className:K,changeKey:S,text:y,tokens:a,renderToken:v},I))]})}var VRn=T.memo(KRn);function QRn(e){var r=e.hideGutter,t=e.element;return f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?1:3,className:"diff-widget-content",children:t})})}var XRn=["hideGutter","selectedChanges","tokens","lineClassName"],YRn=["hunk","widgets","className"];function ZRn(e){var r=e.hunk,t=e.widgets,n=e.className,s=w_(e,YRn),o=(function(a,i){return a.reduce((function(c,u){var d=b_(u);c.push(["change",d,u]);var _=i[d];return _&&c.push(["widget",d,_]),c}),[])})(r.changes,t);return f.jsx("tbody",{className:Pa("diff-hunk",n),children:o.map((function(a){return(function(i,c){var u=Pr(i,3),d=u[0],_=u[1],p=u[2],m=c.hideGutter,k=c.selectedChanges,w=c.tokens,v=c.lineClassName,b=w_(c,XRn);if(d==="change"){var x=Ha(p)?"old":"new",y=Ha(p)?Xy(p):Yy(p),S=w?w[x][y-1]:null;return f.jsx(VRn,Vr({className:v,change:p,hideGutter:m,selected:k.includes(_),tokens:S},b),"change".concat(_))}return d==="widget"?f.jsx(QRn,{hideGutter:m,element:p},"widget".concat(_)):null})(a,s)}))})}var AB=0;function Zv(e,r,t,n){var s=T.useCallback((function(){return r(e)}),[e,r]),o=T.useCallback((function(){return r("")}),[r]);return T.useMemo((function(){var a=CB(n,(function(i){return function(c){return i&&i({side:e,change:t},c)}}));return a.onMouseEnter=Ob(s,a.onMouseEnter),a.onMouseLeave=Ob(o,a.onMouseLeave),a}),[t,n,s,e,o])}function J2(e){var r=e.change,t=e.side,n=e.selected,s=e.tokens,o=e.gutterClassName,a=e.codeClassName,i=e.gutterEvents,c=e.codeEvents,u=e.anchorID,d=e.gutterAnchor,_=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,k=e.renderToken,w=e.renderGutter;if(!r){var v=Pa("diff-gutter","diff-gutter-omit",o),b=Pa("diff-code","diff-code-omit",a);return[!p&&f.jsx("td",{className:v},"gutter"),f.jsx("td",{className:b},"code")]}var x=r.type,y=r.content,S=b_(r),E=t===AB?"old":"new",N=Vr({id:u||void 0,className:Pa("diff-gutter","diff-gutter-".concat(x),q3({"diff-gutter-selected":n},"diff-line-hover-"+E,m),o),children:w({change:r,side:E,inHoverState:m,renderDefault:EB(r,E),wrapInAnchor:NB(d,_)})},i),A=Pa("diff-code","diff-code-".concat(x),q3({"diff-code-selected":n},"diff-line-hover-"+E,m),a);return[!p&&f.jsx("td",Vr(Vr({},N),{},{"data-change-key":S}),"gutter"),f.jsx(zB,Vr({className:A,changeKey:S,text:y,tokens:s,renderToken:k},c),"code")]}function JRn(e){var r=e.className,t=e.oldChange,n=e.newChange,s=e.oldSelected,o=e.newSelected,a=e.oldTokens,i=e.newTokens,c=e.monotonous,u=e.gutterClassName,d=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,k=e.generateAnchorID,w=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,x=e.renderGutter,y=Pr(T.useState(""),2),S=y[0],E=y[1],N=Zv("old",E,t,_),A=Zv("new",E,n,_),z=Zv("old",E,t,p),M=Zv("new",E,n,p),$=t&&k(t),D=n&&k(n),I=w({changes:[t,n],defaultGenerate:function(){return r}}),G={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:d,gutterEvents:_,codeEvents:p,renderToken:b,renderGutter:x},F=Vr(Vr({},G),{},{change:t,side:AB,selected:s,tokens:a,gutterEvents:N,codeEvents:z,anchorID:$,gutterAnchor:v,gutterAnchorTarget:$,hover:S==="old"}),Q=Vr(Vr({},G),{},{change:n,side:1,selected:o,tokens:i,gutterEvents:A,codeEvents:M,anchorID:t===n?null:D,gutterAnchor:v,gutterAnchorTarget:t===n?$:D,hover:S==="new"});if(c)return f.jsx("tr",{className:Pa("diff-line",I),children:J2(t?F:Q)});var K=(function(J,ee){return J&&!ee?"diff-line-old-only":!J&&ee?"diff-line-new-only":J===ee?"diff-line-normal":"diff-line-compare"})(t,n);return f.jsxs("tr",{className:Pa("diff-line",K,I),children:[J2(F),J2(Q)]})}var eMn=T.memo(JRn);function tMn(e){var r=e.hideGutter,t=e.oldElement,n=e.newElement;return e.monotonous?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:t||n})}):t===n?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:r?2:4,className:"diff-widget-content",children:t})}):f.jsxs("tr",{className:"diff-widget",children:[f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:t}),f.jsx("td",{colSpan:r?1:2,className:"diff-widget-content",children:n})]})}var rMn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],nMn=["hunk","widgets","className"];function Jv(e,r){return(e?b_(e):"00")+(r?b_(r):"00")}function sMn(e){var r=e.hunk,t=e.widgets,n=e.className,s=w_(e,nMn),o=(function(a,i){for(var c=function(b){if(!b)return null;var x=b_(b);return i[x]||null},u=[],d=0;d=(o==null?void 0:o.value.length))return[e];var i=function(_,p){var m=o.value.slice(_,p);return[].concat(Fa(s),[Vr(Vr({},o),{},{value:m})])};if(r>0){var c=i(0,r);a.push(bh(c))}var u=i(Math.max(r,0),t);if(a.push(n?(function(_,p){return[p].concat(Fa(bh(_)))})(u,n):bh(u)),t1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.children){var n=e.children,s=w_(e,jMn);t.push(s);var o,a=i6(n);try{for(a.s();!(o=a.n()).done;)OB(o.value,r,t)}catch(i){a.e(i)}finally{a.f()}t.pop()}else r.push(bh([].concat(Fa(t.slice(1)),[e])));return r}function SMn(e){return e.reduce((function(r,t){var n=r[r.length-1],s=(function(c){var u=m6(c);return u.value.includes(` `)?u.value.split(` -`).map((function(d){return xMn(c,Vr(Vr({},u),{},{value:d}))})):[c]})(t),o=nB(s),a=o[0],i=o.slice(1);return[].concat(Fa(r.slice(0,-1)),[[].concat(Fa(n),[a])],Fa(i.map((function(c){return[c]}))))}),[[]])}function ZA(e){return SMn(OB(e))}var CMn=function(e,r,t){var n=(t=typeof t=="function"?t:void 0)?t(e,r):void 0;return n===void 0?Wy(e,r,void 0,t):!!n},zMn=function(e,r){return Wy(e,r)},EMn=function(e){var r=e==null?0:e.length;return r?e[r-1]:void 0};function NMn(e,r){if(!e.children)throw new Error("parent node missing children property");var t,n,s=EMn(e.children);return s&&(n=r,(t=s).type===n.type&&(t.type==="text"||t.children&&n.children&&CMn(t,n,(function(o,a,i){return i==="chlidren"||zMn(o,a)}))))?e.children[e.children.length-1]=(function(o,a){return"value"in o&&"value"in a?Vr(Vr({},o),{},{value:"".concat(o.value).concat(a.value)}):o})(s,r):e.children.push(r),e.children[e.children.length-1]}function JA(e){var r,t={type:"root",children:[]},n=i6(e);try{var s=function(){var o=r.value;o.reduce((function(a,i,c){return NMn(a,c===o.length-1?Vr({},i):Vr(Vr({},i),{},{children:[]}))}),t)};for(n.s();!(r=n.n()).done;)s()}catch(o){n.e(o)}finally{n.f()}return t}var AMn=Object.prototype.hasOwnProperty,TMn=RB((function(e,r,t){AMn.call(e,t)?e[t].push(r):h6(e,t,[r])})),RMn=Object.prototype.hasOwnProperty,MMn=function(e){if(e==null)return!0;if(Gy(e)&&(Wa(e)||typeof e=="string"||typeof e.splice=="function"||Mb(e)||u6(e)||Uy(e)))return!e.length;var r=Y3(e);if(r=="[object Map]"||r=="[object Set]")return!e.size;if(vB(e))return!bB(e).length;for(var t in e)if(RMn.call(e,t))return!1;return!0},OMn=function(e,r){var t=r.start,n=r.length,s=t+n,o=e.reduce((function(a,i){var c=Pr(a,2),u=c[0],d=c[1],_=d+m6(i).value.length;if(d>s||_n.length?t:n,c=t.length>n.length?n:t,u=i.indexOf(c);if(u!=-1)return a=[new r.Diff(1,i.substring(0,u)),new r.Diff(0,c),new r.Diff(1,i.substring(u+c.length))],t.length>n.length&&(a[0][0]=a[2][0]=-1),a;if(c.length==1)return[new r.Diff(-1,t),new r.Diff(1,n)];var d=this.diff_halfMatch_(t,n);if(d){var _=d[0],p=d[1],m=d[2],k=d[3],x=d[4],v=this.diff_main(_,m,s,o),b=this.diff_main(p,k,s,o);return v.concat([new r.Diff(0,x)],b)}return s&&t.length>100&&n.length>100?this.diff_lineMode_(t,n,o):this.diff_bisect_(t,n,o)},r.prototype.diff_lineMode_=function(t,n,s){var o=this.diff_linesToChars_(t,n);t=o.chars1,n=o.chars2;var a=o.lineArray,i=this.diff_main(t,n,!1,s);this.diff_charsToLines_(i,a),this.diff_cleanupSemantic(i),i.push(new r.Diff(0,""));for(var c=0,u=0,d=0,_="",p="";c=1&&d>=1){i.splice(c-u-d,u+d),c=c-u-d;for(var m=this.diff_main(_,p,!1,s),k=m.length-1;k>=0;k--)i.splice(c,0,m[k]);c+=m.length}d=0,u=0,_="",p=""}c++}return i.pop(),i},r.prototype.diff_bisect_=function(t,n,s){for(var o=t.length,a=n.length,i=Math.ceil((o+a)/2),c=i,u=2*i,d=new Array(u),_=new Array(u),p=0;ps);y++){for(var S=-y+x;S<=y-v;S+=2){for(var z=c+S,N=(D=S==-y||S!=y&&d[z-1]o)v+=2;else if(N>a)x+=2;else if(k&&(M=c+m-S)>=0&&M=(E=o-_[M]))return this.diff_bisectSplit_(t,n,D,N,s)}for(var A=-y+b;A<=y-w;A+=2){for(var E,M=c+A,$=(E=A==-y||A!=y&&_[M-1]<_[M+1]?_[M+1]:_[M-1]+1)-A;Eo)w+=2;else if($>a)b+=2;else if(!k&&(z=c+m-A)>=0&&z=(E=o-E))return this.diff_bisectSplit_(t,n,D,N,s)}}}return[new r.Diff(-1,t),new r.Diff(1,n)]},r.prototype.diff_bisectSplit_=function(t,n,s,o,a){var i=t.substring(0,s),c=n.substring(0,o),u=t.substring(s),d=n.substring(o),_=this.diff_main(i,c,!1,a),p=this.diff_main(u,d,!1,a);return _.concat(p)},r.prototype.diff_linesToChars_=function(t,n){var s=[],o={};function a(u){for(var d="",_=0,p=-1,m=s.length;po?t=t.substring(s-o):sn.length?t:n,o=t.length>n.length?n:t;if(s.length<4||2*o.length=x.length?[w,y,S,z,E]:null}var c,u,d,_,p,m=i(s,o,Math.ceil(s.length/4)),k=i(s,o,Math.ceil(s.length/2));return m||k?(c=k?m&&m[4].length>k[4].length?m:k:m,t.length>n.length?(u=c[0],d=c[1],_=c[2],p=c[3]):(_=c[0],p=c[1],u=c[2],d=c[3]),[u,d,_,p,c[4]]):null},r.prototype.diff_cleanupSemantic=function(t){for(var n=!1,s=[],o=0,a=null,i=0,c=0,u=0,d=0,_=0;i0?s[o-1]:-1,c=0,u=0,d=0,_=0,a=null,n=!0)),i++;for(n&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),i=1;i=x?(k>=p.length/2||k>=m.length/2)&&(t.splice(i,0,new r.Diff(0,m.substring(0,k))),t[i-1][1]=p.substring(0,p.length-k),t[i+1][1]=m.substring(k),i++):(x>=p.length/2||x>=m.length/2)&&(t.splice(i,0,new r.Diff(0,p.substring(0,x))),t[i-1][0]=1,t[i-1][1]=m.substring(0,m.length-x),t[i+1][0]=-1,t[i+1][1]=p.substring(x),i++),i++}i++}},r.prototype.diff_cleanupSemanticLossless=function(t){function n(x,v){if(!x||!v)return 6;var b=x.charAt(x.length-1),w=v.charAt(0),y=b.match(r.nonAlphaNumericRegex_),S=w.match(r.nonAlphaNumericRegex_),z=y&&b.match(r.whitespaceRegex_),N=S&&w.match(r.whitespaceRegex_),A=z&&b.match(r.linebreakRegex_),E=N&&w.match(r.linebreakRegex_),M=A&&x.match(r.blanklineEndRegex_),$=E&&v.match(r.blanklineStartRegex_);return M||$?5:A||E?4:y&&!z&&N?3:z||N?2:y||S?1:0}for(var s=1;s=m&&(m=k,d=o,_=a,p=i)}t[s-1][1]!=d&&(d?t[s-1][1]=d:(t.splice(s-1,1),s--),t[s][1]=_,p?t[s+1][1]=p:(t.splice(s+1,1),s--))}s++}},r.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,r.whitespaceRegex_=/\s/,r.linebreakRegex_=/[\r\n]/,r.blanklineEndRegex_=/\n\r?\n$/,r.blanklineStartRegex_=/^\r?\n\r?\n/,r.prototype.diff_cleanupEfficiency=function(t){for(var n=!1,s=[],o=0,a=null,i=0,c=!1,u=!1,d=!1,_=!1;i0?s[o-1]:-1,d=_=!1),n=!0)),i++;n&&this.diff_cleanupMerge(t)},r.prototype.diff_cleanupMerge=function(t){t.push(new r.Diff(0,""));for(var n,s=0,o=0,a=0,i="",c="";s1?(o!==0&&a!==0&&((n=this.diff_commonPrefix(c,i))!==0&&(s-o-a>0&&t[s-o-a-1][0]==0?t[s-o-a-1][1]+=c.substring(0,n):(t.splice(0,0,new r.Diff(0,c.substring(0,n))),s++),c=c.substring(n),i=i.substring(n)),(n=this.diff_commonSuffix(c,i))!==0&&(t[s][1]=c.substring(c.length-n)+t[s][1],c=c.substring(0,c.length-n),i=i.substring(0,i.length-n))),s-=o+a,t.splice(s,o+a),i.length&&(t.splice(s,0,new r.Diff(-1,i)),s++),c.length&&(t.splice(s,0,new r.Diff(1,c)),s++),s++):s!==0&&t[s-1][0]==0?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,a=0,o=0,i="",c=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sn));s++)i=o,c=a;return t.length!=s&&t[s][0]===-1?c:c+(n-i)},r.prototype.diff_prettyHtml=function(t){for(var n=[],s=/&/g,o=//g,i=/\n/g,c=0;c");switch(u){case 1:n[c]=''+d+"";break;case-1:n[c]=''+d+"";break;case 0:n[c]=""+d+""}}return n.join("")},r.prototype.diff_text1=function(t){for(var n=[],s=0;sthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var o=this.match_alphabet_(n),a=this;function i(N,A){var E=N/n.length,M=Math.abs(s-A);return a.Match_Distance?E+M/a.Match_Distance:M?1:E}var c=this.Match_Threshold,u=t.indexOf(n,s);u!=-1&&(c=Math.min(i(0,u),c),(u=t.lastIndexOf(n,s+n.length))!=-1&&(c=Math.min(i(0,u),c)));var d,_,p=1<=v;y--){var S=o[t.charAt(y-1)];if(w[y]=x===0?(w[y+1]<<1|1)&S:(w[y+1]<<1|1)&S|(m[y+1]|m[y])<<1|1|m[y+1],w[y]&p){var z=i(x,y-1);if(z<=c){if(c=z,!((u=y-1)>s))break;v=Math.max(1,2*s-u)}}}if(i(x+1,s)>c)break;m=w}return u},r.prototype.match_alphabet_=function(t){for(var n={},s=0;s2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(t&&typeof t=="object"&&n===void 0&&s===void 0)a=t,o=this.diff_text1(a);else if(typeof t=="string"&&n&&typeof n=="object"&&s===void 0)o=t,a=n;else{if(typeof t!="string"||typeof n!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");o=t,a=s}if(a.length===0)return[];for(var i=[],c=new r.patch_obj,u=0,d=0,_=0,p=o,m=o,k=0;k=2*this.Patch_Margin&&u&&(this.patch_addContext_(c,p),i.push(c),c=new r.patch_obj,u=0,p=m,d=_)}x!==1&&(d+=v.length),x!==-1&&(_+=v.length)}return u&&(this.patch_addContext_(c,p),i.push(c)),i},r.prototype.patch_deepCopy=function(t){for(var n=[],s=0;sthis.Match_MaxBits?(c=this.match_main(n,_.substring(0,this.Match_MaxBits),d))!=-1&&((p=this.match_main(n,_.substring(_.length-this.Match_MaxBits),d+_.length-this.Match_MaxBits))==-1||c>=p)&&(c=-1):c=this.match_main(n,_,d),c==-1)a[i]=!1,o-=t[i].length2-t[i].length1;else if(a[i]=!0,o=c-d,_==(u=p==-1?n.substring(c,c+_.length):n.substring(c,p+this.Match_MaxBits)))n=n.substring(0,c)+this.diff_text2(t[i].diffs)+n.substring(c+_.length);else{var m=this.diff_main(_,u,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(m)/_.length>this.Patch_DeleteThreshold)a[i]=!1;else{this.diff_cleanupSemanticLossless(m);for(var k,x=0,v=0;vi[0][1].length){var c=n-i[0][1].length;i[0][1]=s.substring(i[0][1].length)+i[0][1],a.start1-=c,a.start2-=c,a.length1+=c,a.length2+=c}return(i=(a=t[t.length-1]).diffs).length==0||i[i.length-1][0]!=0?(i.push(new r.Diff(0,s)),a.length1+=n,a.length2+=n):n>i[i.length-1][1].length&&(c=n-i[i.length-1][1].length,i[i.length-1][1]+=s.substring(0,c),a.length1+=c,a.length2+=c),s},r.prototype.patch_splitMax=function(t){for(var n=this.Match_MaxBits,s=0;s2*n?(u.length1+=p.length,a+=p.length,d=!1,u.diffs.push(new r.Diff(_,p)),o.diffs.shift()):(p=p.substring(0,n-u.length1-this.Patch_Margin),u.length1+=p.length,a+=p.length,_===0?(u.length2+=p.length,i+=p.length):d=!1,u.diffs.push(new r.Diff(_,p)),p==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(p.length))}c=(c=this.diff_text2(u.diffs)).substring(c.length-this.Patch_Margin);var m=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);m!==""&&(u.length1+=m.length,u.length2+=m.length,u.diffs.length!==0&&u.diffs[u.diffs.length-1][0]===0?u.diffs[u.diffs.length-1][1]+=m:u.diffs.push(new r.Diff(0,m))),d||t.splice(++s,0,u)}}},r.prototype.patch_toText=function(t){for(var n=[],s=0;ss||_n.length?t:n,c=t.length>n.length?n:t,u=i.indexOf(c);if(u!=-1)return a=[new r.Diff(1,i.substring(0,u)),new r.Diff(0,c),new r.Diff(1,i.substring(u+c.length))],t.length>n.length&&(a[0][0]=a[2][0]=-1),a;if(c.length==1)return[new r.Diff(-1,t),new r.Diff(1,n)];var d=this.diff_halfMatch_(t,n);if(d){var _=d[0],p=d[1],m=d[2],k=d[3],w=d[4],v=this.diff_main(_,m,s,o),b=this.diff_main(p,k,s,o);return v.concat([new r.Diff(0,w)],b)}return s&&t.length>100&&n.length>100?this.diff_lineMode_(t,n,o):this.diff_bisect_(t,n,o)},r.prototype.diff_lineMode_=function(t,n,s){var o=this.diff_linesToChars_(t,n);t=o.chars1,n=o.chars2;var a=o.lineArray,i=this.diff_main(t,n,!1,s);this.diff_charsToLines_(i,a),this.diff_cleanupSemantic(i),i.push(new r.Diff(0,""));for(var c=0,u=0,d=0,_="",p="";c=1&&d>=1){i.splice(c-u-d,u+d),c=c-u-d;for(var m=this.diff_main(_,p,!1,s),k=m.length-1;k>=0;k--)i.splice(c,0,m[k]);c+=m.length}d=0,u=0,_="",p=""}c++}return i.pop(),i},r.prototype.diff_bisect_=function(t,n,s){for(var o=t.length,a=n.length,i=Math.ceil((o+a)/2),c=i,u=2*i,d=new Array(u),_=new Array(u),p=0;ps);y++){for(var S=-y+w;S<=y-v;S+=2){for(var E=c+S,N=(D=S==-y||S!=y&&d[E-1]o)v+=2;else if(N>a)w+=2;else if(k&&(M=c+m-S)>=0&&M=(z=o-_[M]))return this.diff_bisectSplit_(t,n,D,N,s)}for(var A=-y+b;A<=y-x;A+=2){for(var z,M=c+A,$=(z=A==-y||A!=y&&_[M-1]<_[M+1]?_[M+1]:_[M-1]+1)-A;zo)x+=2;else if($>a)b+=2;else if(!k&&(E=c+m-A)>=0&&E=(z=o-z))return this.diff_bisectSplit_(t,n,D,N,s)}}}return[new r.Diff(-1,t),new r.Diff(1,n)]},r.prototype.diff_bisectSplit_=function(t,n,s,o,a){var i=t.substring(0,s),c=n.substring(0,o),u=t.substring(s),d=n.substring(o),_=this.diff_main(i,c,!1,a),p=this.diff_main(u,d,!1,a);return _.concat(p)},r.prototype.diff_linesToChars_=function(t,n){var s=[],o={};function a(u){for(var d="",_=0,p=-1,m=s.length;po?t=t.substring(s-o):sn.length?t:n,o=t.length>n.length?n:t;if(s.length<4||2*o.length=w.length?[x,y,S,E,z]:null}var c,u,d,_,p,m=i(s,o,Math.ceil(s.length/4)),k=i(s,o,Math.ceil(s.length/2));return m||k?(c=k?m&&m[4].length>k[4].length?m:k:m,t.length>n.length?(u=c[0],d=c[1],_=c[2],p=c[3]):(_=c[0],p=c[1],u=c[2],d=c[3]),[u,d,_,p,c[4]]):null},r.prototype.diff_cleanupSemantic=function(t){for(var n=!1,s=[],o=0,a=null,i=0,c=0,u=0,d=0,_=0;i0?s[o-1]:-1,c=0,u=0,d=0,_=0,a=null,n=!0)),i++;for(n&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),i=1;i=w?(k>=p.length/2||k>=m.length/2)&&(t.splice(i,0,new r.Diff(0,m.substring(0,k))),t[i-1][1]=p.substring(0,p.length-k),t[i+1][1]=m.substring(k),i++):(w>=p.length/2||w>=m.length/2)&&(t.splice(i,0,new r.Diff(0,p.substring(0,w))),t[i-1][0]=1,t[i-1][1]=m.substring(0,m.length-w),t[i+1][0]=-1,t[i+1][1]=p.substring(w),i++),i++}i++}},r.prototype.diff_cleanupSemanticLossless=function(t){function n(w,v){if(!w||!v)return 6;var b=w.charAt(w.length-1),x=v.charAt(0),y=b.match(r.nonAlphaNumericRegex_),S=x.match(r.nonAlphaNumericRegex_),E=y&&b.match(r.whitespaceRegex_),N=S&&x.match(r.whitespaceRegex_),A=E&&b.match(r.linebreakRegex_),z=N&&x.match(r.linebreakRegex_),M=A&&w.match(r.blanklineEndRegex_),$=z&&v.match(r.blanklineStartRegex_);return M||$?5:A||z?4:y&&!E&&N?3:E||N?2:y||S?1:0}for(var s=1;s=m&&(m=k,d=o,_=a,p=i)}t[s-1][1]!=d&&(d?t[s-1][1]=d:(t.splice(s-1,1),s--),t[s][1]=_,p?t[s+1][1]=p:(t.splice(s+1,1),s--))}s++}},r.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,r.whitespaceRegex_=/\s/,r.linebreakRegex_=/[\r\n]/,r.blanklineEndRegex_=/\n\r?\n$/,r.blanklineStartRegex_=/^\r?\n\r?\n/,r.prototype.diff_cleanupEfficiency=function(t){for(var n=!1,s=[],o=0,a=null,i=0,c=!1,u=!1,d=!1,_=!1;i0?s[o-1]:-1,d=_=!1),n=!0)),i++;n&&this.diff_cleanupMerge(t)},r.prototype.diff_cleanupMerge=function(t){t.push(new r.Diff(0,""));for(var n,s=0,o=0,a=0,i="",c="";s1?(o!==0&&a!==0&&((n=this.diff_commonPrefix(c,i))!==0&&(s-o-a>0&&t[s-o-a-1][0]==0?t[s-o-a-1][1]+=c.substring(0,n):(t.splice(0,0,new r.Diff(0,c.substring(0,n))),s++),c=c.substring(n),i=i.substring(n)),(n=this.diff_commonSuffix(c,i))!==0&&(t[s][1]=c.substring(c.length-n)+t[s][1],c=c.substring(0,c.length-n),i=i.substring(0,i.length-n))),s-=o+a,t.splice(s,o+a),i.length&&(t.splice(s,0,new r.Diff(-1,i)),s++),c.length&&(t.splice(s,0,new r.Diff(1,c)),s++),s++):s!==0&&t[s-1][0]==0?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,a=0,o=0,i="",c=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sn));s++)i=o,c=a;return t.length!=s&&t[s][0]===-1?c:c+(n-i)},r.prototype.diff_prettyHtml=function(t){for(var n=[],s=/&/g,o=//g,i=/\n/g,c=0;c");switch(u){case 1:n[c]=''+d+"";break;case-1:n[c]=''+d+"";break;case 0:n[c]=""+d+""}}return n.join("")},r.prototype.diff_text1=function(t){for(var n=[],s=0;sthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var o=this.match_alphabet_(n),a=this;function i(N,A){var z=N/n.length,M=Math.abs(s-A);return a.Match_Distance?z+M/a.Match_Distance:M?1:z}var c=this.Match_Threshold,u=t.indexOf(n,s);u!=-1&&(c=Math.min(i(0,u),c),(u=t.lastIndexOf(n,s+n.length))!=-1&&(c=Math.min(i(0,u),c)));var d,_,p=1<=v;y--){var S=o[t.charAt(y-1)];if(x[y]=w===0?(x[y+1]<<1|1)&S:(x[y+1]<<1|1)&S|(m[y+1]|m[y])<<1|1|m[y+1],x[y]&p){var E=i(w,y-1);if(E<=c){if(c=E,!((u=y-1)>s))break;v=Math.max(1,2*s-u)}}}if(i(w+1,s)>c)break;m=x}return u},r.prototype.match_alphabet_=function(t){for(var n={},s=0;s2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(t&&typeof t=="object"&&n===void 0&&s===void 0)a=t,o=this.diff_text1(a);else if(typeof t=="string"&&n&&typeof n=="object"&&s===void 0)o=t,a=n;else{if(typeof t!="string"||typeof n!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");o=t,a=s}if(a.length===0)return[];for(var i=[],c=new r.patch_obj,u=0,d=0,_=0,p=o,m=o,k=0;k=2*this.Patch_Margin&&u&&(this.patch_addContext_(c,p),i.push(c),c=new r.patch_obj,u=0,p=m,d=_)}w!==1&&(d+=v.length),w!==-1&&(_+=v.length)}return u&&(this.patch_addContext_(c,p),i.push(c)),i},r.prototype.patch_deepCopy=function(t){for(var n=[],s=0;sthis.Match_MaxBits?(c=this.match_main(n,_.substring(0,this.Match_MaxBits),d))!=-1&&((p=this.match_main(n,_.substring(_.length-this.Match_MaxBits),d+_.length-this.Match_MaxBits))==-1||c>=p)&&(c=-1):c=this.match_main(n,_,d),c==-1)a[i]=!1,o-=t[i].length2-t[i].length1;else if(a[i]=!0,o=c-d,_==(u=p==-1?n.substring(c,c+_.length):n.substring(c,p+this.Match_MaxBits)))n=n.substring(0,c)+this.diff_text2(t[i].diffs)+n.substring(c+_.length);else{var m=this.diff_main(_,u,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(m)/_.length>this.Patch_DeleteThreshold)a[i]=!1;else{this.diff_cleanupSemanticLossless(m);for(var k,w=0,v=0;vi[0][1].length){var c=n-i[0][1].length;i[0][1]=s.substring(i[0][1].length)+i[0][1],a.start1-=c,a.start2-=c,a.length1+=c,a.length2+=c}return(i=(a=t[t.length-1]).diffs).length==0||i[i.length-1][0]!=0?(i.push(new r.Diff(0,s)),a.length1+=n,a.length2+=n):n>i[i.length-1][1].length&&(c=n-i[i.length-1][1].length,i[i.length-1][1]+=s.substring(0,c),a.length1+=c,a.length2+=c),s},r.prototype.patch_splitMax=function(t){for(var n=this.Match_MaxBits,s=0;s2*n?(u.length1+=p.length,a+=p.length,d=!1,u.diffs.push(new r.Diff(_,p)),o.diffs.shift()):(p=p.substring(0,n-u.length1-this.Patch_Margin),u.length1+=p.length,a+=p.length,_===0?(u.length2+=p.length,i+=p.length):d=!1,u.diffs.push(new r.Diff(_,p)),p==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(p.length))}c=(c=this.diff_text2(u.diffs)).substring(c.length-this.Patch_Margin);var m=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);m!==""&&(u.length1+=m.length,u.length2+=m.length,u.diffs.length!==0&&u.diffs[u.diffs.length-1][0]===0?u.diffs[u.diffs.length-1][1]+=m:u.diffs.push(new r.Diff(0,m))),d||t.splice(++s,0,u)}}},r.prototype.patch_toText=function(t){for(var n=[],s=0;s1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(r===void 0?"block":r)==="block"?BMn:FMn,n=p6(e.map((function(i){return i.changes})),$B).map(t).reduce((function(i,c){var u=Pr(i,2),d=u[0],_=u[1],p=Pr(c,2),m=p[0],k=p[1];return[d.concat(m),_.concat(k)]}),[[],[]]),s=Pr(n,2),o=s[0],a=s[1];return $Mn(tT(o),tT(a))}var qMn=["enhancers"],oT=function(e){var r,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.enhancers,s=n===void 0?[]:n,o=Pr(yMn(e,w_(t,qMn)),2),a=o[0],i=o[1],c=[ZA(a),ZA(i)],u=(r=[c[0],c[1]],s.reduce((function(x,v){return v(x)}),r)),d=Pr(u,2),_=d[0],p=d[1],m=[_.map(JA),p.map(JA)],k=m[1];return{old:m[0].map((function(x){var v;return(v=x.children)!==null&&v!==void 0?v:[]})),new:k.map((function(x){var v;return(v=x.children)!==null&&v!==void 0?v:[]}))}};const J3=["openresearch-diff flex flex-col gap-4","[&_.openresearch-diff-file]:[--diff-background-color:var(--base)]","[&_.openresearch-diff-file]:[--diff-text-color:var(--text)]","[&_.openresearch-diff-file]:[--diff-font-family:var(--mono)]","[&_.openresearch-diff-file]:[--diff-selection-text-color:var(--selection-text)]","[&_.openresearch-diff-file]:[--diff-selection-background-color:var(--color-diff-selection)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)]","[&_.openresearch-diff-file]:[--diff-code-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-code-selected-background-color:var(--diff-selection-background-color)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-text-color:var(--accent-green)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-text-color:var(--accent-red)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)]","[&_.openresearch-diff-file]:[--diff-code-insert-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-background-color:var(--color-diff-insert-code)]","[&_.openresearch-diff-file]:[--diff-code-delete-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-background-color:var(--color-diff-delete-code)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)]","[&_.openresearch-diff-file]:[--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)]","[&_.openresearch-diff-file]:w-full","[&_.openresearch-diff-file.diff-unified]:table-fixed","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:collapse","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:w-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:p-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:ps-[2ch] [&_.openresearch-diff-file_.diff-code]:pe-4","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),UMn=2e3,GMn={highlight(e,r){return Ft.highlight(e,r).children}};function WMn(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function Jy(e){let r=0,t=0;for(const n of e.hunks)for(const s of n.changes)s.type==="insert"?r++:s.type==="delete"&&t++;return{additions:r,deletions:t}}function KMn(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function e5(e){switch(e.type){case"delete":return e.oldPath;case"add":case"modify":return e.newPath;case"rename":case"copy":return`${e.oldPath} → ${e.newPath}`}}function VMn(e){const r=[HMn(e.hunks,{type:"line"})],t=jS(KMn(e));return t&&Ft.registered(t)?oT(e.hunks,{enhancers:r,highlight:!0,language:t,refractor:GMn}):oT(e.hunks,{enhancers:r,highlight:!1})}function LB(e,r){if(!e.trim())return{files:[],failed:!1};try{return{files:G3(e,{nearbySequences:"zip"}),failed:!1}}catch{if(r){const t=Array.from(e.matchAll(/^diff --git /gm),s=>s.index),n=t[t.length-1];if(t.length>1&&n!==void 0)try{return{files:G3(e.slice(0,n),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const QMn=({change:e,side:r})=>r==="old"?null:WMn(e);function IB({bytesRead:e,byteLimit:r}){return f.jsxs("div",{className:"truncated-notice border border-accent-amber rounded-md bg-accent-amber-subtle py-3 px-3.5 text-sm [&_h4]:mt-0 [&_h4]:mx-0 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:text-accent-amber [&_p]:m-0 [&_p]:text-subtext",children:[f.jsx("h4",{children:x1t()}),f.jsx("p",{children:Wbt({limit:Ee(Xl(r)),read:Ee(Xl(e))})})]})}function PB({file:e,defaultExpanded:r}){const[t,n]=T.useState(r),{additions:s,deletions:o}=T.useMemo(()=>Jy(e),[e]),a=t&&s+o<=UMn,i=T.useMemo(()=>{if(a)try{return VMn(e)}catch{return}},[e,a]);return f.jsxs("section",{className:`diff-file-card overflow-hidden border border-border rounded-md bg-background [&.expanded_.diff-file-header]:border-b [&.expanded_.diff-file-header]:border-b-border ${t?"expanded":""}`,children:[f.jsxs("button",{className:"diff-file-header sticky top-0 z-10 flex items-center justify-between gap-3 w-full text-start py-2 px-3 bg-surface cursor-pointer [&_.chev]:text-muted [&_.chev]:text-xs [&_.chev]:shrink-0 [&_.chev]:w-3 [&_.path]:flex [&_.path]:items-center [&_.path]:gap-2 [&_.path]:min-w-0 [&_.path]:flex-1 [&_.path_code]:min-w-0 [&_.path_code]:flex-1 [&_.path_code]:overflow-hidden [&_.path_code]:text-ellipsis [&_.path_code]:whitespace-nowrap [&_.path_code]:font-mono [&_.path_code]:text-xs [&_.path_code]:font-medium [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>n(c=>!c),children:[f.jsx("span",{className:"chev",children:t?f.jsx(Zc,{size:14}):f.jsx(Xa,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:e5(e)})}),f.jsxs("span",{className:"stats",children:[f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",o]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:ibt()}):f.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:f.jsx(uMn,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:QMn,tokens:i,viewType:"unified"})}))]})}function XMn({files:e,className:r}){return f.jsx("div",{className:r?`${J3} ${r}`:J3,children:e.map((t,n)=>f.jsx(PB,{file:t,defaultExpanded:n===0},`${t.oldPath}→${t.newPath}#${n}`))})}function YMn(e){switch(e.type){case"add":return"A";case"delete":return"D";case"rename":return"R";case"copy":return"C";case"modify":return"M"}}function BB({diff:e,partial:r=!1}){var p;const t=T.useMemo(()=>LB(e,r),[e,r]),n=t.files,s=T.useMemo(()=>n.map((m,k)=>({file:m,key:`${m.oldPath}→${m.newPath}#${k}`,changes:Jy(m)})),[n]),[o,a]=T.useState(null),[i,c]=T.useState(!1),u=i&&!r,d=s.some(m=>m.key===o)?o:((p=s[0])==null?void 0:p.key)??null,_=s.find(m=>m.key===d)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:r?Y1t():Dbt()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:F1t()}):f.jsxs("div",{className:"diff-explorer @container",children:[f.jsxs("div",{className:"diff-explorer-toolbar flex items-center justify-between gap-3 mb-2.5 text-sm [&_button]:py-0.5 [&_button]:px-0 [&_button]:text-muted [&_button]:text-sm [&_button]:font-medium [&_button:hover]:text-text [&_button:hover]:underline [&_button:hover]:underline-offset-2",children:[f.jsx("strong",{className:"font-medium",children:r?s.length===1?Cbt():T1t({count:fr(s.length)}):s.length===1?OD():MD({count:fr(s.length)})}),!r&&f.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?Wvt():ryt()})]}),u?f.jsx(XMn,{files:n}):f.jsxs("div",{className:"diff-explorer-layout grid grid-cols-[minmax(180px,_260px)_minmax(0,_1fr)] items-start gap-3.5 [@container((max-width:_960px))]:grid-cols-1",children:[f.jsx("div",{className:"diff-explorer-files sticky top-0 max-h-[min(70vh,_720px)] overflow-auto border border-border rounded-md bg-background [&_button]:grid [&_button]:grid-cols-[18px_minmax(0,_1fr)_auto_auto] [&_button]:items-center [&_button]:gap-[7px] [&_button]:w-full [&_button]:py-2 [&_button]:px-[9px] [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_button.active]:bg-panel [&_button.active]:shadow-diff-active [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap [&_code]:text-xs [@container((max-width:_960px))]:static [@container((max-width:_960px))]:max-h-55","aria-label":_1t(),children:s.map(m=>f.jsxs("button",{type:"button",className:m.key===d?"active":"","aria-pressed":m.key===d,onClick:()=>a(m.key),children:[f.jsx("span",{className:`diff-file-status font-mono text-xs font-medium text-muted [&.status-add]:text-accent-green [&.status-delete]:text-accent-red [&.status-rename]:text-accent-blue [&.status-copy]:text-accent-blue status-${m.file.type}`,children:YMn(m.file)}),f.jsx("code",{title:e5(m.file),children:e5(m.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),f.jsx("div",{className:`${J3} diff-explorer-preview min-w-0`,children:_&&f.jsx(PB,{file:_.file,defaultExpanded:!0},_.key)})]})]})}const ZMn="/assets/slurm-logo-aGSXVZcE.svg",JMn="/assets/thinking-machines-BOdslTfm.png";function eOn(e){switch(e){case"modal_job":return"Modal";case"hf_job":return"Hugging Face";case"k8s_job":return"Kubernetes";case"ssh_job":return"SSH";case"slurm_job":return"Slurm";case"ray_job":return"Ray";case"openresearch_job":return"OpenResearch";case"local_job":return ND();case"tinker_job":return"Tinker";default:return e||"—"}}function tOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[f.jsx("path",{d:"M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z",fill:"#FF9D0B"}),f.jsx("path",{d:"M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z",fill:"#FFD21E"}),f.jsx("path",{d:"M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-0.576-.393-.394-1.023-.089-0.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-0.586 0 1.107.79 3.263 3.25 3.263h-.003z",fill:"#FF323D"}),f.jsx("path",{d:"M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003z",fill:"#3A3B45"}),f.jsx("path",{d:"M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8z",fill:"#3A3B45"}),f.jsx("path",{d:"M4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-0.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-0.553.718-.694.244-.162.523-.265.814-.3l.176-.012z",fill:"#FF9D0B"}),f.jsx("path",{d:"M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-0.573.534-.375-.677-1.405-2.416-1.94-2.751-0.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-0.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-0.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-0.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-0.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-0.522z",fill:"#FFD21E"})]})}function rOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[f.jsx("path",{d:"M121.683 75.25L149.997 124L91.4816 224.75C90.3128 226.757 88.155 228 85.8174 228H32.9664C31.7976 228 30.6778 227.691 29.697 227.131C28.7161 226.57 27.8906 225.758 27.3021 224.75L0.876625 179.25C-0.292208 177.243 -0.292208 174.765 0.876625 172.75L57.512 75.25C58.0923 74.2425 58.9259 73.43 59.9068 72.8694C60.8876 72.3088 62.0074 72 63.1762 72H116.027C118.365 72 120.523 73.2431 121.692 75.25H121.683ZM299.125 172.75L242.49 75.25C241.91 74.2425 241.076 73.43 240.095 72.8694C239.114 72.3088 237.995 72 236.826 72H183.975C181.637 72 179.479 73.2431 178.311 75.25L149.997 124L208.512 224.75C209.681 226.757 211.839 228 214.177 228H267.027C268.196 228 269.316 227.691 270.297 227.131C271.278 226.57 272.103 225.758 272.692 224.75L299.117 179.25C300.286 177.243 300.286 174.765 299.117 172.75H299.125Z",fill:"#62DE61"}),f.jsx("path",{d:"M89.6018 124H150.005L121.692 75.25C120.523 73.2431 118.365 72 116.027 72H63.1763C62.0074 72 60.8876 72.3088 59.9068 72.8694L89.6018 124Z",fill:"url(#orxModalA)"}),f.jsx("path",{d:"M89.6018 124L59.9068 72.8694C58.9259 73.43 58.1005 74.2425 57.512 75.25L0.876625 172.75C-0.292208 174.765 -0.292208 177.235 0.876625 179.25L27.3021 224.75C27.8825 225.758 28.7161 226.57 29.697 227.131L89.5936 124H89.6018Z",fill:"url(#orxModalB)"}),f.jsx("path",{d:"M149.997 124H89.5936L29.697 227.131C30.6778 227.691 31.7976 228 32.9664 228H85.8174C88.155 228 90.3128 226.757 91.4816 224.75L149.997 124Z",fill:"#09AF58"}),f.jsx("path",{d:"M299.125 179.25C299.706 178.243 300 177.121 300 176H240.61L210.915 227.131C211.896 227.691 213.016 228 214.185 228H267.036C269.373 228 271.531 226.757 272.7 224.75L299.125 179.25Z",fill:"#09AF58"}),f.jsx("path",{d:"M183.975 72C182.806 72 181.686 72.3088 180.705 72.8694L240.602 176H299.992C299.992 174.879 299.698 173.758 299.117 172.75L242.49 75.25C241.321 73.2431 239.163 72 236.826 72H183.967H183.975Z",fill:"url(#orxModalC)"}),f.jsx("path",{d:"M210.907 227.131L240.602 176L180.705 72.8694C179.725 73.43 178.899 74.2425 178.311 75.25L149.997 124L208.512 224.75C209.093 225.758 209.926 226.57 210.907 227.131Z",fill:"url(#orxModalD)"}),f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),f.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function nOn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:f.jsx("path",{d:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-0.5-.623h-.804l-0.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-0.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-0.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-0.52.123-.736-.172-.216-0.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-0.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-0.555-0.5-0.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-0.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-0.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-0.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z"})})}function sOn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:f.jsx("path",{d:"M16.153 12.826c-.63-.183-1.03.15-1.378.846-0.58 1.13-1.643 1.644-2.888 1.594-1.245-.05-2.257-.63-2.788-1.776-.233-.498-.498-.664-1.046-.68-.93-.017-1.643.016-2.174 1.062-.631 1.261-2.258 1.693-3.619 1.261a3.234 3.234 0 0 1-2.257-3.22 3.198 3.198 0 0 1 2.29-3.02 3.276 3.276 0 0 1 3.702 1.327c.216.315.216.863.597.93.648.1 1.328.033 1.992.033.299 0 .316-.266.399-.465.58-1.295 1.61-1.959 2.987-1.975 1.361-.017 2.39.647 2.955 1.892.215.465.48.598.946.548.166-.017.332.016.498 0 .464-.083 1.062.282 1.344-.448.282-.73-.382-.913-.68-1.245-.847-.946-1.81-1.793-2.673-2.706-.415-.465-.763-.614-1.41-.415-1.876.614-3.619-.431-4.15-2.357-.448-1.676.714-3.535 2.44-3.917a3.293 3.293 0 0 1 3.95 2.457c.017.05.017.083.033.133.117.564.117 1.145-.132 1.626-.283.531-.133.83.249 1.195a152.61 152.61 0 0 1 3.286 3.27c.299.299.498.349.913.2 1.51-0.565 2.97-.1 3.884 1.161a3.266 3.266 0 0 1-.067 3.801c-.896 1.195-2.357 1.643-3.834 1.079-.381-.15-0.58-.1-.846.182a163.619 163.619 0 0 1-3.403 3.386c-.299.3-.415.532-.232.98a3.198 3.198 0 0 1-1.278 3.917A3.298 3.298 0 0 1 9.646 23c-1.062-1.062-1.228-2.688-.415-4.033a3.196 3.196 0 0 1 3.835-1.294c.498.182.78.083 1.145-.283 1.012-1.045 2.058-2.058 3.087-3.103.266-.266.68-.449.432-1.03-.233-0.547-.631-.414-1.03-.431zM11.97 4.942c.913.016 1.643-.714 1.66-1.627v-.05a1.646 1.646 0 0 0-1.76-1.56 1.63 1.63 0 0 0-1.543 1.527 1.638 1.638 0 0 0 1.577 1.71zm.033 5.41a1.658 1.658 0 0 0-1.676 1.61v.084a1.73 1.73 0 0 0 1.643 1.66c.847.016 1.643-.78 1.677-1.627a1.648 1.648 0 0 0-1.577-1.71c-.017-.016-.05-.016-.067-.016zm7.088 1.694c.016.896.747 1.61 1.626 1.643a1.723 1.723 0 0 0 1.66-1.726 1.666 1.666 0 0 0-1.66-1.61 1.623 1.623 0 0 0-1.643 1.577c.017.05.017.083.017.116zM3.24 10.353a1.692 1.692 0 0 0-1.66 1.626c-.017.847.863 1.727 1.693 1.71a1.687 1.687 0 0 0 1.626-1.743 1.615 1.615 0 0 0-1.643-1.593Zm8.68 12c.98.033 1.71-.647 1.727-1.593a1.646 1.646 0 0 0-1.51-1.793 1.646 1.646 0 0 0-1.793 1.51v.233a1.609 1.609 0 0 0 1.543 1.66c0-.017.017-.017.033-.017z"})})}function oOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function aOn({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:JMn,width:e,height:e,style:{transform:e>=48?`translateX(${Math.round(e*.18)}px) scale(1.65)`:"scale(1.22)"},alt:"","aria-hidden":"true"})}function iOn({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:ZMn,width:e,height:e,alt:"","aria-hidden":"true"})}function g6({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-0.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-0.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})})}function Cp({kind:e,size:r=16}){switch(e){case"modal_job":return f.jsx(rOn,{size:r});case"hf_job":return f.jsx(tOn,{size:r});case"k8s_job":return f.jsx(nOn,{size:r});case"ssh_job":return f.jsx(eA,{size:r,strokeWidth:1.5});case"slurm_job":return f.jsx(iOn,{size:r});case"ray_job":return f.jsx(sOn,{size:r});case"openresearch_job":return f.jsx(oOn,{size:r});case"tinker_job":return f.jsx(aOn,{size:r});case"local_job":return f.jsx(x9n,{size:r,strokeWidth:1.5});default:return f.jsx(eA,{size:r})}}function v6({backend:e}){const r=tS(e),t=xCn(e);return r?f.jsxs("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted",children:[f.jsx(Cp,{kind:r}),f.jsx("span",{className:"backend-name",children:eOn(r)}),t&&f.jsx("span",{className:"backend-detail text-sm",children:t})]}):f.jsx("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted muted text-muted",children:"—"})}function cOn({expanded:e,experiments:r,runs:t,onOpenExperiment:n,rightOffset:s,activeView:o,projectId:a,onCompute:i,sessionId:c,busy:u,onChanges:d,onFiles:_,onTerminal:p,onArtifacts:m,onExperiments:k,onSideChat:x}){var A,E;const v=$An(r,t,c),b=T.useRef(null),w=ba(b),y=dt({...tI(a),enabled:e}),S=((A=y.data)==null?void 0:A.configuredDefaultBackend)??((E=y.data)==null?void 0:E.defaultBackend),z=S?Jf[S]():y.isPending?"…":y.isError?wi():o3(),N=[{id:"files",label:G4(),Icon:Ci,onClick:_},{id:"artifacts",label:mD(),Icon:hS,onClick:m},{id:"experiments",label:gD(),Icon:h0,onClick:k}];return f.jsx("div",{className:`workspace-tools absolute end-3.5 top-7 z-30 ${s===void 0?"win-titlebar:top-10":""}`,style:{insetInlineEnd:s},children:e?f.jsxs("nav",{"aria-label":D2(),className:"workspace-tools-card flex w-60 flex-col gap-0.5 rounded-xl border border-border bg-background px-1.5 py-2 shadow-elevated",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:D2()}),N.filter(M=>M.id!=="files").map(({id:M,label:$,Icon:D,onClick:I})=>f.jsx(_r,{className:"min-h-7 py-1","data-onboarding":M==="artifacts"?"nav-artifacts":void 0,onClick:I,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(D,{size:15}),$]})},M)),f.jsx(_r,{className:"py-1",onClick:i,children:f.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[f.jsx(fS,{size:15,className:"shrink-0"}),r3n()]}),f.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[S&&f.jsx(Cp,{kind:`${S}_job`,size:12}),f.jsx("span",{className:"wrap-anywhere",children:z})]})]})}),f.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:o5n()}),f.jsx(_r,{className:"min-h-7 py-1",onClick:_,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Ci,{size:15}),G4()]})}),f.jsx(_r,{className:"min-h-7 py-1",onClick:p,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Gc,{size:15}),bb()]})}),x&&f.jsx(_r,{className:"min-h-7 py-1",onClick:x,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(pg,{size:15}),i3()]})}),c&&f.jsx(lOn,{sessionId:c,busy:u,onChanges:d},c),v.length>0&&f.jsxs("div",{children:[f.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[f.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:f.jsx(Eh,{tone:"success",live:!0})}),f.jsx("span",{children:W4n()})]}),v.map(M=>f.jsx(_r,{className:"min-h-7 py-1",onClick:()=>n(M.experiment.id,M.run.id),children:f.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${M.experiment.title||M.experiment.slug} · ${a6(Ba(M.run))}`,children:M.experiment.title||M.experiment.slug})},M.run.id))]})]})]}):f.jsxs("nav",{"aria-label":D2(),className:"flex items-center justify-end gap-3",children:[N.map(({id:M,label:$,Icon:D,onClick:I})=>f.jsx(Rt,{active:o===M,className:"text-text [&.active]:text-text","data-tip":$,"data-tip-align":M==="experiments"?"end":void 0,"aria-label":$,"aria-pressed":o===M,onClick:I,children:f.jsx(D,{size:15})},M)),f.jsxs("div",{className:"relative",children:[f.jsx(Rt,{ref:b,active:o==="terminal"||w.open,className:"text-text [&.active]:text-text","data-tip":w.open?void 0:xN(),"data-tip-align":"end","aria-label":xN(),"aria-expanded":w.open,"aria-haspopup":"menu",onClick:()=>w.setOpen(M=>!M),children:f.jsx(wp,{size:15})}),w.open&&f.jsxs("div",{ref:w.ref,role:"menu",className:"absolute end-0 top-[calc(100%_+_4px)] z-50 flex min-w-40 flex-col rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsx(_r,{role:"menuitem",onClick:()=>{w.setOpen(!1),p()},children:f.jsxs("span",{className:"flex items-center gap-2.5",children:[f.jsx(Gc,{size:15}),bb()]})}),x&&f.jsx(_r,{role:"menuitem",onClick:()=>{w.setOpen(!1),x()},children:f.jsxs("span",{className:"flex items-center gap-2.5",children:[f.jsx(pg,{size:15}),i3()]})})]})]})]})})}function lOn({sessionId:e,busy:r,onChanges:t}){var c,u;const n=dt({...Tb(e),refetchInterval:r?5e3:!1}),s=T.useRef(r),{refetch:o}=n;T.useEffect(()=>{s.current&&!r&&o(),s.current=r},[r,o]);const a=n.data,i=T.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const d=LB(a.diff.diff,!1);return d.failed?null:d.files.map(Jy).reduce((_,p)=>({additions:_.additions+p.additions,deletions:_.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?f.jsxs(_r,{className:"min-h-7 py-1",onClick:t,title:a.branch??Qj(),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[f.jsx(p0,{size:15,className:"shrink-0"}),f.jsx("span",{children:zD()})]}),i?f.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[f.jsxs("span",{className:"text-accent-green",children:["+",fr(i.additions)]}),f.jsxs("span",{className:"text-accent-red",children:["−",fr(i.deletions)]})]}):f.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?OD():MD({count:fr(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function uOn({projectId:e,sessionId:r,active:t}){const n=T.useRef(null),s=T.useRef(null),[o,a]=T.useState(null),[i,c]=T.useState(0);return T.useEffect(()=>{const u=n.current;if(!u)return;const d=Ay(u,!1,!0,"app"),{terminal:_,dispose:p}=d;s.current=d,a(null);const m=location.protocol==="https:"?"wss:":"ws:",k=new URL(`/api/projects/${encodeURIComponent(e)}/terminal`,`${m}//${location.host}`);r&&k.searchParams.set("sessionId",r);const x=new WebSocket(k);x.binaryType="arraybuffer";let v=!1;const b=S=>{v||(v=!0,_.options.disableStdin=!0,_.blur(),_.writeln(`\r -${S}`),a(S))},w=_.onData(S=>{x.readyState===WebSocket.OPEN&&x.send(new TextEncoder().encode(S))}),y=_.onResize(({cols:S,rows:z})=>{x.readyState===WebSocket.OPEN&&x.send(JSON.stringify({type:"resize",cols:S,rows:z}))});return x.onopen=()=>{x.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))},x.onmessage=S=>{if(S.data instanceof ArrayBuffer){_.write(new Uint8Array(S.data));return}if(typeof S.data!="string")return;let z;try{z=JSON.parse(S.data)}catch{return}vd(z)&&(z.type==="exit"?b(P3n({code:String(z.code)})):z.type==="error"&&typeof z.error=="string"&&b(z.error))},x.onclose=()=>b(wN()),x.onerror=()=>b(wN()),()=>{x.onopen=null,x.onmessage=null,x.onerror=null,x.onclose=null,w.dispose(),y.dispose(),x.close(),s.current=null,p()}},[e,r,i]),T.useEffect(()=>{if(!t||o!==null)return;const u=requestAnimationFrame(()=>{var d,_;(d=s.current)==null||d.fit(),(_=s.current)==null||_.terminal.focus()});return()=>cancelAnimationFrame(u)},[t,o,i]),f.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-terminal-app p-2",role:"group","aria-label":bb(),children:[f.jsx("div",{ref:n,className:"min-h-0 flex-1 overflow-hidden"}),f.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:o??""}),o!==null&&f.jsx("div",{className:"flex shrink-0 justify-end pt-2",children:f.jsx(Oe,{autoFocus:!0,onClick:()=>c(u=>u+1),children:Q3n()})})]})}const _On=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fOn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dOn={};function aT(e,r){return(dOn.jsx?fOn:_On).test(e)}const hOn=/[ \t\n\f\r]/g;function pOn(e){return typeof e=="object"?e.type==="text"?iT(e.value):!1:iT(e)}function iT(e){return e.replace(hOn,"")===""}var sh={},ek,cT;function mOn(){if(cT)return ek;cT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,t=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,i=/^\s+|\s+$/g,c=` -`,u="/",d="*",_="",p="comment",m="declaration";function k(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var w=1,y=1;function S(H){var Q=H.match(r);Q&&(w+=Q.length);var K=H.lastIndexOf(c);y=~K?H.length-K:y+H.length}function z(){var H={line:w,column:y};return function(Q){return Q.position=new N(H),M(),Q}}function N(H){this.start=H,this.end={line:w,column:y},this.source=b.source}N.prototype.content=v;function A(H){var Q=new Error(b.source+":"+w+":"+y+": "+H);if(Q.reason=H,Q.filename=b.source,Q.line=w,Q.column=y,Q.source=v,!b.silent)throw Q}function E(H){var Q=H.exec(v);if(Q){var K=Q[0];return S(K),v=v.slice(K.length),Q}}function M(){E(t)}function $(H){var Q;for(H=H||[];Q=D();)Q!==!1&&H.push(Q);return H}function D(){var H=z();if(!(u!=v.charAt(0)||d!=v.charAt(1))){for(var Q=2;_!=v.charAt(Q)&&(d!=v.charAt(Q)||u!=v.charAt(Q+1));)++Q;if(Q+=2,_===v.charAt(Q-1))return A("End of comment missing");var K=v.slice(2,Q-2);return y+=2,S(K),v=v.slice(Q),y+=2,H({type:p,comment:K})}}function I(){var H=z(),Q=E(n);if(Q){if(D(),!E(s))return A("property missing ':'");var K=E(o),J=H({type:m,property:x(Q[0].replace(e,_)),value:K?x(K[0].replace(e,_)):_});return E(a),J}}function G(){var H=[];$(H);for(var Q;Q=I();)Q!==!1&&(H.push(Q),$(H));return H}return M(),G()}function x(v){return v?v.replace(i,_):_}return ek=k,ek}var lT;function gOn(){if(lT)return sh;lT=1;var e=sh&&sh.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sh,"__esModule",{value:!0}),sh.default=t;const r=e(mOn());function t(n,s){let o=null;if(!n||typeof n!="string")return o;const a=(0,r.default)(n),i=typeof s=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:d}=c;i?s(u,d,c):d&&(o=o||{},o[u]=d)}),o}return sh}var jm={},uT;function vOn(){if(uT)return jm;uT=1,Object.defineProperty(jm,"__esModule",{value:!0}),jm.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,t=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(u){return!u||t.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},i=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}),o(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(s,i):u=u.replace(n,i),u.replace(r,a))};return jm.camelCase=c,jm}var Sm,_T;function bOn(){if(_T)return Sm;_T=1;var e=Sm&&Sm.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=e(gOn()),t=vOn();function n(s,o){var a={};return!s||typeof s!="string"||(0,r.default)(s,function(i,c){i&&c&&(a[(0,t.camelCase)(i,o)]=c)}),a}return n.default=n,Sm=n,Sm}var yOn=bOn();const xOn=n0(yOn),FB=HB("end"),b6=HB("start");function HB(e){return r;function r(t){const n=t&&t.position&&t.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function wOn(e){const r=b6(e),t=FB(e);if(r&&t)return{start:r,end:t}}function Xm(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fT(e.position):"start"in e||"end"in e?fT(e):"line"in e||"column"in e?t5(e):""}function t5(e){return dT(e&&e.line)+":"+dT(e&&e.column)}function fT(e){return t5(e&&e.start)+"-"+t5(e&&e.end)}function dT(e){return e&&typeof e=="number"?e:1}class No extends Error{constructor(r,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let s="",o={},a=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof r=="string"?s=r:!o.cause&&r&&(a=!0,s=r.message,o.cause=r),!o.ruleId&&!o.source&&typeof n=="string"){const c=n.indexOf(":");c===-1?o.ruleId=n:(o.source=n.slice(0,c),o.ruleId=n.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const i=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=i?i.line:void 0,this.name=Xm(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}No.prototype.file="";No.prototype.name="";No.prototype.reason="";No.prototype.message="";No.prototype.stack="";No.prototype.column=void 0;No.prototype.line=void 0;No.prototype.ancestors=void 0;No.prototype.cause=void 0;No.prototype.fatal=void 0;No.prototype.place=void 0;No.prototype.ruleId=void 0;No.prototype.source=void 0;const y6={}.hasOwnProperty,kOn=new Map,jOn=/[A-Z]/g,SOn=new Set(["table","tbody","thead","tfoot","tr"]),COn=new Set(["td","th"]),qB="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function UB(e,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=r.filePath||void 0;let n;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=OOn(t,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=MOn(t,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:n,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Iy:TP,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},o=GB(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function GB(e,r,t){if(r.type==="element")return zOn(e,r,t);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return EOn(e,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return AOn(e,r,t);if(r.type==="mdxjsEsm")return NOn(e,r);if(r.type==="root")return TOn(e,r,t);if(r.type==="text")return ROn(e,r)}function zOn(e,r,t){const n=e.schema;let s=n;r.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=Iy,e.schema=s),e.ancestors.push(r);const o=KB(e,r.tagName,!1),a=$On(e,r);let i=w6(e,r);return SOn.has(r.tagName)&&(i=i.filter(function(c){return typeof c=="string"?!pOn(c):!0})),WB(e,a,o,r),x6(a,i),e.ancestors.pop(),e.schema=n,e.create(r,o,a,t)}function EOn(e,r){if(r.data&&r.data.estree&&e.evaluater){const n=r.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Sg(e,r.position)}function NOn(e,r){if(r.data&&r.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(r.data.estree);Sg(e,r.position)}function AOn(e,r,t){const n=e.schema;let s=n;r.name==="svg"&&n.space==="html"&&(s=Iy,e.schema=s),e.ancestors.push(r);const o=r.name===null?e.Fragment:KB(e,r.name,!0),a=DOn(e,r),i=w6(e,r);return WB(e,a,o,r),x6(a,i),e.ancestors.pop(),e.schema=n,e.create(r,o,a,t)}function TOn(e,r,t){const n={};return x6(n,w6(e,r)),e.create(r,e.Fragment,n,t)}function ROn(e,r){return r.value}function WB(e,r,t,n){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(r.node=n)}function x6(e,r){if(r.length>0){const t=r.length>1?r:r[0];t&&(e.children=t)}}function MOn(e,r,t){return n;function n(s,o,a,i){const u=Array.isArray(a.children)?t:r;return i?u(o,a,i):u(o,a)}}function OOn(e,r){return t;function t(n,s,o,a){const i=Array.isArray(o.children),c=b6(n);return r(s,o,a,i,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function $On(e,r){const t={};let n,s;for(s in r.properties)if(s!=="children"&&y6.call(r.properties,s)){const o=LOn(e,s,r.properties[s]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&a==="align"&&typeof i=="string"&&COn.has(r.tagName)?n=i:t[a]=i}}if(n){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return t}function DOn(e,r){const t={};for(const n of r.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const o=n.data.estree.body[0];o.type;const a=o.expression;a.type;const i=a.properties[0];i.type,Object.assign(t,e.evaluater.evaluateExpression(i.argument))}else Sg(e,r.position);else{const s=n.name;let o;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const i=n.value.data.estree.body[0];i.type,o=e.evaluater.evaluateExpression(i.expression)}else Sg(e,r.position);else o=n.value===null?!0:n.value;t[s]=o}return t}function w6(e,r){const t=[];let n=-1;const s=e.passKeys?new Map:kOn;for(;++ns?0:s+r:r=r>s?s:r,t=t>0?t:0,n.length<1e4)a=Array.from(n),a.unshift(r,t),e.splice(...a);else for(t&&e.splice(r,t);o0?(qa(e,e.length,0,r),e):r}const pT={}.hasOwnProperty;function QB(e){const r={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Ji(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wo=R_(/[A-Za-z]/),Co=R_(/[\dA-Za-z]/),WOn=R_(/[#-'*+\--9=?A-Z^-~]/);function $b(e){return e!==null&&(e<32||e===127)}const r5=R_(/\d/),KOn=R_(/[\dA-Fa-f]/),VOn=R_(/[!-/:-@[-`{-~]/);function Pt(e){return e!==null&&e<-2}function vn(e){return e!==null&&(e<0||e===32)}function Rr(e){return e===-2||e===-1||e===32}const ex=R_(new RegExp("\\p{P}|\\p{S}","u")),ed=R_(/\s/);function R_(e){return r;function r(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function zp(e){const r=[];let t=-1,n=0,s=0;for(;++t55295&&o<57344){const i=e.charCodeAt(t+1);o<56320&&i>56319&&i<57344?(a=String.fromCharCode(o,i),s=1):a="�"}else a=String.fromCharCode(o);a&&(r.push(e.slice(n,t),encodeURIComponent(a)),n=t+s+1,a=""),s&&(t+=s,s=0)}return r.join("")+e.slice(n)}function Nr(e,r,t,n){const s=n?n-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(c){return Rr(c)?(e.enter(t),i(c)):r(c)}function i(c){return Rr(c)&&o++a))return;const A=r.events.length;let E=A,M,$;for(;E--;)if(r.events[E][0]==="exit"&&r.events[E][1].type==="chunkFlow"){if(M){$=r.events[E][1].end;break}M=!0}for(b(n),N=A;Ny;){const z=t[S];r.containerState=z[1],z[0].exit.call(r,e)}t.length=y}function w(){s.write([null]),o=void 0,s=void 0,r.containerState._closeFlow=void 0}}function JOn(e,r,t){return Nr(e,e.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ap(e){if(e===null||vn(e)||ed(e))return 1;if(ex(e))return 2}function tx(e,r,t){const n=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const _={...e[n][1].end},p={...e[t][1].start};gT(_,-c),gT(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:_,end:{...e[n][1].end}},i={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},o={type:c>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...a.start},end:{...i.end}},e[n][1].end={...a.start},e[t][1].start={...i.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=xi(u,[["enter",e[n][1],r],["exit",e[n][1],r]])),u=xi(u,[["enter",s,r],["enter",a,r],["exit",a,r],["enter",o,r]]),u=xi(u,tx(r.parser.constructs.insideSpan.null,e.slice(n+1,t),r)),u=xi(u,[["exit",o,r],["enter",i,r],["exit",i,r],["exit",s,r]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,u=xi(u,[["enter",e[t][1],r],["exit",e[t][1],r]])):d=0,qa(e,n-1,t-n+3,u),t=n+u.length-d-2;break}}for(t=-1;++t0&&Rr(N)?Nr(e,w,"linePrefix",o+1)(N):w(N)}function w(N){return N===null||Pt(N)?e.check(vT,x,S)(N):(e.enter("codeFlowValue"),y(N))}function y(N){return N===null||Pt(N)?(e.exit("codeFlowValue"),w(N)):(e.consume(N),y)}function S(N){return e.exit("codeFenced"),r(N)}function z(N,A,E){let M=0;return $;function $(Q){return N.enter("lineEnding"),N.consume(Q),N.exit("lineEnding"),D}function D(Q){return N.enter("codeFencedFence"),Rr(Q)?Nr(N,I,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):I(Q)}function I(Q){return Q===i?(N.enter("codeFencedFenceSequence"),G(Q)):E(Q)}function G(Q){return Q===i?(M++,N.consume(Q),G):M>=a?(N.exit("codeFencedFenceSequence"),Rr(Q)?Nr(N,H,"whitespace")(Q):H(Q)):E(Q)}function H(Q){return Q===null||Pt(Q)?(N.exit("codeFencedFence"),A(Q)):E(Q)}}}function _$n(e,r,t){const n=this;return s;function s(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return n.parser.lazy[n.now().line]?t(a):r(a)}}const rk={name:"codeIndented",tokenize:d$n},f$n={partial:!0,tokenize:h$n};function d$n(e,r,t){const n=this;return s;function s(u){return e.enter("codeIndented"),Nr(e,o,"linePrefix",5)(u)}function o(u){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Pt(u)?e.attempt(f$n,a,c)(u):(e.enter("codeFlowValue"),i(u))}function i(u){return u===null||Pt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),i)}function c(u){return e.exit("codeIndented"),r(u)}}function h$n(e,r,t){const n=this;return s;function s(a){return n.parser.lazy[n.now().line]?t(a):Pt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Nr(e,o,"linePrefix",5)(a)}function o(a){const i=n.events[n.events.length-1];return i&&i[1].type==="linePrefix"&&i[2].sliceSerialize(i[1],!0).length>=4?r(a):Pt(a)?s(a):t(a)}}const p$n={name:"codeText",previous:g$n,resolve:m$n,tokenize:v$n};function m$n(e){let r=e.length-4,t=3,n,s;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(n=t;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return rthis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(r,t,n){const s=t||0;this.setCursor(Math.trunc(r));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return n&&Cm(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Cm(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Cm(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r=4?r(a):e.interrupt(n.parser.constructs.flow,t,r)(a)}}function tF(e,r,t,n,s,o,a,i,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return _;function _(b){return b===60?(e.enter(n),e.enter(s),e.enter(o),e.consume(b),e.exit(o),p):b===null||b===32||b===41||$b(b)?t(b):(e.enter(n),e.enter(a),e.enter(i),e.enter("chunkString",{contentType:"string"}),x(b))}function p(b){return b===62?(e.enter(o),e.consume(b),e.exit(o),e.exit(s),e.exit(n),r):(e.enter(i),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(i),p(b)):b===null||b===60||Pt(b)?t(b):(e.consume(b),b===92?k:m)}function k(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function x(b){return!d&&(b===null||b===41||vn(b))?(e.exit("chunkString"),e.exit(i),e.exit(a),e.exit(n),r(b)):d999||m===null||m===91||m===93&&!c||m===94&&!i&&"_hiddenFootnoteSupport"in a.parser.constructs?t(m):m===93?(e.exit(o),e.enter(s),e.consume(m),e.exit(s),e.exit(n),r):Pt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===null||m===91||m===93||Pt(m)||i++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!Rr(m)),m===92?p:_)}function p(m){return m===91||m===92||m===93?(e.consume(m),i++,_):_(m)}}function nF(e,r,t,n,s,o){let a;return i;function i(p){return p===34||p===39||p===40?(e.enter(n),e.enter(s),e.consume(p),e.exit(s),a=p===40?41:p,c):t(p)}function c(p){return p===a?(e.enter(s),e.consume(p),e.exit(s),e.exit(n),r):(e.enter(o),u(p))}function u(p){return p===a?(e.exit(o),c(a)):p===null?t(p):Pt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Nr(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===a||p===null||Pt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?_:d)}function _(p){return p===a||p===92?(e.consume(p),d):d(p)}}function Ym(e,r){let t;return n;function n(s){return Pt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,n):Rr(s)?Nr(e,n,t?"linePrefix":"lineSuffix")(s):r(s)}}const C$n={name:"definition",tokenize:E$n},z$n={partial:!0,tokenize:N$n};function E$n(e,r,t){const n=this;let s;return o;function o(m){return e.enter("definition"),a(m)}function a(m){return rF.call(n,e,i,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function i(m){return s=Ji(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):t(m)}function c(m){return vn(m)?Ym(e,u)(m):u(m)}function u(m){return tF(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(z$n,_,_)(m)}function _(m){return Rr(m)?Nr(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Pt(m)?(e.exit("definition"),n.parser.defined.push(s),r(m)):t(m)}}function N$n(e,r,t){return n;function n(i){return vn(i)?Ym(e,s)(i):t(i)}function s(i){return nF(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(i)}function o(i){return Rr(i)?Nr(e,a,"whitespace")(i):a(i)}function a(i){return i===null||Pt(i)?r(i):t(i)}}const A$n={name:"hardBreakEscape",tokenize:T$n};function T$n(e,r,t){return n;function n(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Pt(o)?(e.exit("hardBreakEscape"),r(o)):t(o)}}const R$n={name:"headingAtx",resolve:M$n,tokenize:O$n};function M$n(e,r){let t=e.length-2,n=3,s,o;return e[n][1].type==="whitespace"&&(n+=2),t-2>n&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&e[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(s={type:"atxHeadingText",start:e[n][1].start,end:e[t][1].end},o={type:"chunkText",start:e[n][1].start,end:e[t][1].end,contentType:"text"},qa(e,n,t-n+1,[["enter",s,r],["enter",o,r],["exit",o,r],["exit",s,r]])),e}function O$n(e,r,t){let n=0;return s;function s(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&n++<6?(e.consume(d),a):d===null||vn(d)?(e.exit("atxHeadingSequence"),i(d)):t(d)}function i(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||Pt(d)?(e.exit("atxHeading"),r(d)):Rr(d)?Nr(e,i,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),i(d))}function u(d){return d===null||d===35||vn(d)?(e.exit("atxHeadingText"),i(d)):(e.consume(d),u)}}const $$n=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],yT=["pre","script","style","textarea"],D$n={concrete:!0,name:"htmlFlow",resolveTo:P$n,tokenize:B$n},L$n={partial:!0,tokenize:H$n},I$n={partial:!0,tokenize:F$n};function P$n(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function B$n(e,r,t){const n=this;let s,o,a,i,c;return u;function u(U){return d(U)}function d(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),_}function _(U){return U===33?(e.consume(U),p):U===47?(e.consume(U),o=!0,x):U===63?(e.consume(U),s=3,n.interrupt?r:L):Wo(U)?(e.consume(U),a=String.fromCharCode(U),v):t(U)}function p(U){return U===45?(e.consume(U),s=2,m):U===91?(e.consume(U),s=5,i=0,k):Wo(U)?(e.consume(U),s=4,n.interrupt?r:L):t(U)}function m(U){return U===45?(e.consume(U),n.interrupt?r:L):t(U)}function k(U){const oe="CDATA[";return U===oe.charCodeAt(i++)?(e.consume(U),i===oe.length?n.interrupt?r:I:k):t(U)}function x(U){return Wo(U)?(e.consume(U),a=String.fromCharCode(U),v):t(U)}function v(U){if(U===null||U===47||U===62||vn(U)){const oe=U===47,ie=a.toLowerCase();return!oe&&!o&&yT.includes(ie)?(s=1,n.interrupt?r(U):I(U)):$$n.includes(a.toLowerCase())?(s=6,oe?(e.consume(U),b):n.interrupt?r(U):I(U)):(s=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(U):o?w(U):y(U))}return U===45||Co(U)?(e.consume(U),a+=String.fromCharCode(U),v):t(U)}function b(U){return U===62?(e.consume(U),n.interrupt?r:I):t(U)}function w(U){return Rr(U)?(e.consume(U),w):$(U)}function y(U){return U===47?(e.consume(U),$):U===58||U===95||Wo(U)?(e.consume(U),S):Rr(U)?(e.consume(U),y):$(U)}function S(U){return U===45||U===46||U===58||U===95||Co(U)?(e.consume(U),S):z(U)}function z(U){return U===61?(e.consume(U),N):Rr(U)?(e.consume(U),z):y(U)}function N(U){return U===null||U===60||U===61||U===62||U===96?t(U):U===34||U===39?(e.consume(U),c=U,A):Rr(U)?(e.consume(U),N):E(U)}function A(U){return U===c?(e.consume(U),c=null,M):U===null||Pt(U)?t(U):(e.consume(U),A)}function E(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||vn(U)?z(U):(e.consume(U),E)}function M(U){return U===47||U===62||Rr(U)?y(U):t(U)}function $(U){return U===62?(e.consume(U),D):t(U)}function D(U){return U===null||Pt(U)?I(U):Rr(U)?(e.consume(U),D):t(U)}function I(U){return U===45&&s===2?(e.consume(U),K):U===60&&s===1?(e.consume(U),J):U===62&&s===4?(e.consume(U),F):U===63&&s===3?(e.consume(U),L):U===93&&s===5?(e.consume(U),P):Pt(U)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(L$n,q,G)(U)):U===null||Pt(U)?(e.exit("htmlFlowData"),G(U)):(e.consume(U),I)}function G(U){return e.check(I$n,H,q)(U)}function H(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),Q}function Q(U){return U===null||Pt(U)?G(U):(e.enter("htmlFlowData"),I(U))}function K(U){return U===45?(e.consume(U),L):I(U)}function J(U){return U===47?(e.consume(U),a="",ee):I(U)}function ee(U){if(U===62){const oe=a.toLowerCase();return yT.includes(oe)?(e.consume(U),F):I(U)}return Wo(U)&&a.length<8?(e.consume(U),a+=String.fromCharCode(U),ee):I(U)}function P(U){return U===93?(e.consume(U),L):I(U)}function L(U){return U===62?(e.consume(U),F):U===45&&s===2?(e.consume(U),L):I(U)}function F(U){return U===null||Pt(U)?(e.exit("htmlFlowData"),q(U)):(e.consume(U),F)}function q(U){return e.exit("htmlFlow"),r(U)}}function F$n(e,r,t){const n=this;return s;function s(a){return Pt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):t(a)}function o(a){return n.parser.lazy[n.now().line]?t(a):r(a)}}function H$n(e,r,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(x0,r,t)}}const q$n={name:"htmlText",tokenize:U$n};function U$n(e,r,t){const n=this;let s,o,a;return i;function i(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),z):L===63?(e.consume(L),y):Wo(L)?(e.consume(L),E):t(L)}function u(L){return L===45?(e.consume(L),d):L===91?(e.consume(L),o=0,k):Wo(L)?(e.consume(L),w):t(L)}function d(L){return L===45?(e.consume(L),m):t(L)}function _(L){return L===null?t(L):L===45?(e.consume(L),p):Pt(L)?(a=_,J(L)):(e.consume(L),_)}function p(L){return L===45?(e.consume(L),m):_(L)}function m(L){return L===62?K(L):L===45?p(L):_(L)}function k(L){const F="CDATA[";return L===F.charCodeAt(o++)?(e.consume(L),o===F.length?x:k):t(L)}function x(L){return L===null?t(L):L===93?(e.consume(L),v):Pt(L)?(a=x,J(L)):(e.consume(L),x)}function v(L){return L===93?(e.consume(L),b):x(L)}function b(L){return L===62?K(L):L===93?(e.consume(L),b):x(L)}function w(L){return L===null||L===62?K(L):Pt(L)?(a=w,J(L)):(e.consume(L),w)}function y(L){return L===null?t(L):L===63?(e.consume(L),S):Pt(L)?(a=y,J(L)):(e.consume(L),y)}function S(L){return L===62?K(L):y(L)}function z(L){return Wo(L)?(e.consume(L),N):t(L)}function N(L){return L===45||Co(L)?(e.consume(L),N):A(L)}function A(L){return Pt(L)?(a=A,J(L)):Rr(L)?(e.consume(L),A):K(L)}function E(L){return L===45||Co(L)?(e.consume(L),E):L===47||L===62||vn(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),K):L===58||L===95||Wo(L)?(e.consume(L),$):Pt(L)?(a=M,J(L)):Rr(L)?(e.consume(L),M):K(L)}function $(L){return L===45||L===46||L===58||L===95||Co(L)?(e.consume(L),$):D(L)}function D(L){return L===61?(e.consume(L),I):Pt(L)?(a=D,J(L)):Rr(L)?(e.consume(L),D):M(L)}function I(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,G):Pt(L)?(a=I,J(L)):Rr(L)?(e.consume(L),I):(e.consume(L),H)}function G(L){return L===s?(e.consume(L),s=void 0,Q):L===null?t(L):Pt(L)?(a=G,J(L)):(e.consume(L),G)}function H(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||vn(L)?M(L):(e.consume(L),H)}function Q(L){return L===47||L===62||vn(L)?M(L):t(L)}function K(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),r):t(L)}function J(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),ee}function ee(L){return Rr(L)?Nr(e,P,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):P(L)}function P(L){return e.enter("htmlTextData"),a(L)}}const j6={name:"labelEnd",resolveAll:V$n,resolveTo:Q$n,tokenize:X$n},G$n={tokenize:Y$n},W$n={tokenize:Z$n},K$n={tokenize:J$n};function V$n(e){let r=-1;const t=[];for(;++r=3&&(u===null||Pt(u))?(e.exit("thematicBreak"),r(u)):t(u)}function c(u){return u===s?(e.consume(u),n++,c):(e.exit("thematicBreakSequence"),Rr(u)?Nr(e,i,"whitespace")(u):i(u))}}const fa={continuation:{tokenize:lDn},exit:_Dn,name:"list",tokenize:cDn},aDn={partial:!0,tokenize:fDn},iDn={partial:!0,tokenize:uDn};function cDn(e,r,t){const n=this,s=n.events[n.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return i;function i(m){const k=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:r5(m)){if(n.containerState.type||(n.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(U1,t,u)(m):u(m);if(!n.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return t(m)}function c(m){return r5(m)&&++a<10?(e.consume(m),c):(!n.interrupt||a<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):t(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,e.check(x0,n.interrupt?t:d,e.attempt(aDn,p,_))}function d(m){return n.containerState.initialBlankLine=!0,o++,p(m)}function _(m){return Rr(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):t(m)}function p(m){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(m)}}function lDn(e,r,t){const n=this;return n.containerState._closeFlow=void 0,e.check(x0,s,o);function s(i){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Nr(e,r,"listItemIndent",n.containerState.size+1)(i)}function o(i){return n.containerState.furtherBlankLines||!Rr(i)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(i)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(iDn,r,a)(i))}function a(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,Nr(e,e.attempt(fa,r,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}function uDn(e,r,t){const n=this;return Nr(e,s,"listItemIndent",n.containerState.size+1);function s(o){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?r(o):t(o)}}function _Dn(e){e.exit(this.containerState.type)}function fDn(e,r,t){const n=this;return Nr(e,s,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const a=n.events[n.events.length-1];return!Rr(o)&&a&&a[1].type==="listItemPrefixWhitespace"?r(o):t(o)}}const xT={name:"setextUnderline",resolveTo:dDn,tokenize:hDn};function dDn(e,r){let t=e.length,n,s,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){n=t;break}e[t][1].type==="paragraph"&&(s=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",a,r]),e.splice(o+1,0,["exit",e[n][1],r]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,r]),e}function hDn(e,r,t){const n=this;let s;return o;function o(u){let d=n.events.length,_;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){_=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||_)?(e.enter("setextHeadingLine"),s=u,a(u)):t(u)}function a(u){return e.enter("setextHeadingLineSequence"),i(u)}function i(u){return u===s?(e.consume(u),i):(e.exit("setextHeadingLineSequence"),Rr(u)?Nr(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Pt(u)?(e.exit("setextHeadingLine"),r(u)):t(u)}}const pDn={tokenize:mDn};function mDn(e){const r=this,t=e.attempt(x0,n,e.attempt(this.parser.constructs.flowInitial,s,Nr(e,e.attempt(this.parser.constructs.flow,s,e.attempt(x$n,s)),"linePrefix")));return t;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r.currentConstruct=void 0,t}}const gDn={resolveAll:oF()},vDn=sF("string"),bDn=sF("text");function sF(e){return{resolveAll:oF(e==="text"?yDn:void 0),tokenize:r};function r(t){const n=this,s=this.parser.constructs[e],o=t.attempt(s,a,i);return a;function a(d){return u(d)?o(d):i(d)}function i(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),c}function c(d){return u(d)?(t.exit("data"),o(d)):(t.consume(d),c)}function u(d){if(d===null)return!0;const _=s[d];let p=-1;if(_)for(;++p<_.length;){const m=_[p];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}function oF(e){return r;function r(t,n){let s=-1,o;for(;++s<=t.length;)o===void 0?t[s]&&t[s][1].type==="data"&&(o=s,s++):(!t[s]||t[s][1].type!=="data")&&(s!==o+2&&(t[o][1].end=t[s-1][1].end,t.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(t,n):t}}function yDn(e,r){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const n=e[t-1][1],s=r.sliceStream(n);let o=s.length,a=-1,i=0,c;for(;o--;){const u=s[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)i++,a--;if(a)break;a=-1}else if(u===-2)c=!0,i++;else if(u!==-1){o++;break}}if(r._contentTypeTextTrailing&&t===e.length&&(i=0),i){const u={type:t===e.length||c||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:n.start._bufferIndex+a,_index:n.start._index+o,line:n.end.line,column:n.end.column-i,offset:n.end.offset-i},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(t,0,["enter",u,r],["exit",u,r]),t+=2)}t++}return e}const xDn={42:fa,43:fa,45:fa,48:fa,49:fa,50:fa,51:fa,52:fa,53:fa,54:fa,55:fa,56:fa,57:fa,62:YB},wDn={91:C$n},kDn={[-2]:rk,[-1]:rk,32:rk},jDn={35:R$n,42:U1,45:[xT,U1],60:D$n,61:xT,95:U1,96:bT,126:bT},SDn={38:JB,92:ZB},CDn={[-5]:nk,[-4]:nk,[-3]:nk,33:eDn,38:JB,42:n5,60:[r$n,q$n],91:rDn,92:[A$n,ZB],93:j6,95:n5,96:p$n},zDn={null:[n5,gDn]},EDn={null:[42,95]},NDn={null:[]},ADn=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:EDn,contentInitial:wDn,disable:NDn,document:xDn,flow:jDn,flowInitial:kDn,insideSpan:zDn,string:SDn,text:CDn},Symbol.toStringTag,{value:"Module"}));function TDn(e,r,t){let n={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const s={},o=[];let a=[],i=[];const c={attempt:A(z),check:A(N),consume:w,enter:y,exit:S,interrupt:A(N,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:k,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:_};let d=r.tokenize.call(u,c);return r.resolveAll&&o.push(r),u;function _(D){return a=xi(a,D),v(),a[a.length-1]!==null?[]:(E(r,0),u.events=tx(o,u.events,u),u.events)}function p(D,I){return MDn(m(D),I)}function m(D){return RDn(a,D)}function k(){const{_bufferIndex:D,_index:I,line:G,column:H,offset:Q}=n;return{_bufferIndex:D,_index:I,line:G,column:H,offset:Q}}function x(D){s[D.line]=D.column,$()}function v(){let D;for(;n._index-1){const i=a[0];typeof i=="string"?a[0]=i.slice(n):a.shift()}o>0&&a.push(e[s].slice(0,o))}return a}function MDn(e,r){let t=-1;const n=[];let s;for(;++t1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(r===void 0?"block":r)==="block"?BMn:FMn,n=p6(e.map((function(i){return i.changes})),$B).map(t).reduce((function(i,c){var u=Pr(i,2),d=u[0],_=u[1],p=Pr(c,2),m=p[0],k=p[1];return[d.concat(m),_.concat(k)]}),[[],[]]),s=Pr(n,2),o=s[0],a=s[1];return $Mn(tT(o),tT(a))}var qMn=["enhancers"],oT=function(e){var r,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.enhancers,s=n===void 0?[]:n,o=Pr(yMn(e,w_(t,qMn)),2),a=o[0],i=o[1],c=[ZA(a),ZA(i)],u=(r=[c[0],c[1]],s.reduce((function(w,v){return v(w)}),r)),d=Pr(u,2),_=d[0],p=d[1],m=[_.map(JA),p.map(JA)],k=m[1];return{old:m[0].map((function(w){var v;return(v=w.children)!==null&&v!==void 0?v:[]})),new:k.map((function(w){var v;return(v=w.children)!==null&&v!==void 0?v:[]}))}};const J3=["openresearch-diff flex flex-col gap-4","[&_.openresearch-diff-file]:[--diff-background-color:var(--base)]","[&_.openresearch-diff-file]:[--diff-text-color:var(--text)]","[&_.openresearch-diff-file]:[--diff-font-family:var(--mono)]","[&_.openresearch-diff-file]:[--diff-selection-text-color:var(--selection-text)]","[&_.openresearch-diff-file]:[--diff-selection-background-color:var(--color-diff-selection)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)]","[&_.openresearch-diff-file]:[--diff-code-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-code-selected-background-color:var(--diff-selection-background-color)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-text-color:var(--accent-green)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-text-color:var(--accent-red)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)]","[&_.openresearch-diff-file]:[--diff-code-insert-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-background-color:var(--color-diff-insert-code)]","[&_.openresearch-diff-file]:[--diff-code-delete-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-background-color:var(--color-diff-delete-code)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)]","[&_.openresearch-diff-file]:[--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)]","[&_.openresearch-diff-file]:w-full","[&_.openresearch-diff-file.diff-unified]:table-fixed","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:collapse","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:w-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:p-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:ps-[2ch] [&_.openresearch-diff-file_.diff-code]:pe-4","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),UMn=2e3,GMn={highlight(e,r){return Ft.highlight(e,r).children}};function WMn(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function Jy(e){let r=0,t=0;for(const n of e.hunks)for(const s of n.changes)s.type==="insert"?r++:s.type==="delete"&&t++;return{additions:r,deletions:t}}function KMn(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function e5(e){switch(e.type){case"delete":return e.oldPath;case"add":case"modify":return e.newPath;case"rename":case"copy":return`${e.oldPath} → ${e.newPath}`}}function VMn(e){const r=[HMn(e.hunks,{type:"line"})],t=jS(KMn(e));return t&&Ft.registered(t)?oT(e.hunks,{enhancers:r,highlight:!0,language:t,refractor:GMn}):oT(e.hunks,{enhancers:r,highlight:!1})}function LB(e,r){if(!e.trim())return{files:[],failed:!1};try{return{files:G3(e,{nearbySequences:"zip"}),failed:!1}}catch{if(r){const t=Array.from(e.matchAll(/^diff --git /gm),s=>s.index),n=t[t.length-1];if(t.length>1&&n!==void 0)try{return{files:G3(e.slice(0,n),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const QMn=({change:e,side:r})=>r==="old"?null:WMn(e);function IB({bytesRead:e,byteLimit:r}){return f.jsxs("div",{className:"truncated-notice border border-accent-amber rounded-md bg-accent-amber-subtle py-3 px-3.5 text-sm [&_h4]:mt-0 [&_h4]:mx-0 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:text-accent-amber [&_p]:m-0 [&_p]:text-subtext",children:[f.jsx("h4",{children:x1t()}),f.jsx("p",{children:Wbt({limit:Ee(Xl(r)),read:Ee(Xl(e))})})]})}function PB({file:e,defaultExpanded:r}){const[t,n]=T.useState(r),{additions:s,deletions:o}=T.useMemo(()=>Jy(e),[e]),a=t&&s+o<=UMn,i=T.useMemo(()=>{if(a)try{return VMn(e)}catch{return}},[e,a]);return f.jsxs("section",{className:`diff-file-card overflow-hidden border border-border rounded-md bg-background [&.expanded_.diff-file-header]:border-b [&.expanded_.diff-file-header]:border-b-border ${t?"expanded":""}`,children:[f.jsxs("button",{className:"diff-file-header sticky top-0 z-10 flex items-center justify-between gap-3 w-full text-start py-2 px-3 bg-surface cursor-pointer [&_.chev]:text-muted [&_.chev]:text-xs [&_.chev]:shrink-0 [&_.chev]:w-3 [&_.path]:flex [&_.path]:items-center [&_.path]:gap-2 [&_.path]:min-w-0 [&_.path]:flex-1 [&_.path_code]:min-w-0 [&_.path_code]:flex-1 [&_.path_code]:overflow-hidden [&_.path_code]:text-ellipsis [&_.path_code]:whitespace-nowrap [&_.path_code]:font-mono [&_.path_code]:text-xs [&_.path_code]:font-medium [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>n(c=>!c),children:[f.jsx("span",{className:"chev",children:t?f.jsx(Zc,{size:14}):f.jsx(Xa,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:e5(e)})}),f.jsxs("span",{className:"stats",children:[f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",o]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:ibt()}):f.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:f.jsx(uMn,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:QMn,tokens:i,viewType:"unified"})}))]})}function XMn({files:e,className:r}){return f.jsx("div",{className:r?`${J3} ${r}`:J3,children:e.map((t,n)=>f.jsx(PB,{file:t,defaultExpanded:n===0},`${t.oldPath}→${t.newPath}#${n}`))})}function YMn(e){switch(e.type){case"add":return"A";case"delete":return"D";case"rename":return"R";case"copy":return"C";case"modify":return"M"}}function BB({diff:e,partial:r=!1}){var p;const t=T.useMemo(()=>LB(e,r),[e,r]),n=t.files,s=T.useMemo(()=>n.map((m,k)=>({file:m,key:`${m.oldPath}→${m.newPath}#${k}`,changes:Jy(m)})),[n]),[o,a]=T.useState(null),[i,c]=T.useState(!1),u=i&&!r,d=s.some(m=>m.key===o)?o:((p=s[0])==null?void 0:p.key)??null,_=s.find(m=>m.key===d)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:r?Y1t():Dbt()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:F1t()}):f.jsxs("div",{className:"diff-explorer @container",children:[f.jsxs("div",{className:"diff-explorer-toolbar flex items-center justify-between gap-3 mb-2.5 text-sm [&_button]:py-0.5 [&_button]:px-0 [&_button]:text-muted [&_button]:text-sm [&_button]:font-medium [&_button:hover]:text-text [&_button:hover]:underline [&_button:hover]:underline-offset-2",children:[f.jsx("strong",{className:"font-medium",children:r?s.length===1?Cbt():T1t({count:fr(s.length)}):s.length===1?OD():MD({count:fr(s.length)})}),!r&&f.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?Wvt():ryt()})]}),u?f.jsx(XMn,{files:n}):f.jsxs("div",{className:"diff-explorer-layout grid grid-cols-[minmax(180px,_260px)_minmax(0,_1fr)] items-start gap-3.5 [@container((max-width:_960px))]:grid-cols-1",children:[f.jsx("div",{className:"diff-explorer-files sticky top-0 max-h-[min(70vh,_720px)] overflow-auto border border-border rounded-md bg-background [&_button]:grid [&_button]:grid-cols-[18px_minmax(0,_1fr)_auto_auto] [&_button]:items-center [&_button]:gap-[7px] [&_button]:w-full [&_button]:py-2 [&_button]:px-[9px] [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_button.active]:bg-panel [&_button.active]:shadow-diff-active [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap [&_code]:text-xs [@container((max-width:_960px))]:static [@container((max-width:_960px))]:max-h-55","aria-label":_1t(),children:s.map(m=>f.jsxs("button",{type:"button",className:m.key===d?"active":"","aria-pressed":m.key===d,onClick:()=>a(m.key),children:[f.jsx("span",{className:`diff-file-status font-mono text-xs font-medium text-muted [&.status-add]:text-accent-green [&.status-delete]:text-accent-red [&.status-rename]:text-accent-blue [&.status-copy]:text-accent-blue status-${m.file.type}`,children:YMn(m.file)}),f.jsx("code",{title:e5(m.file),children:e5(m.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),f.jsx("div",{className:`${J3} diff-explorer-preview min-w-0`,children:_&&f.jsx(PB,{file:_.file,defaultExpanded:!0},_.key)})]})]})}const ZMn="/assets/slurm-logo-aGSXVZcE.svg",JMn="/assets/thinking-machines-BOdslTfm.png";function eOn(e){switch(e){case"modal_job":return"Modal";case"hf_job":return"Hugging Face";case"k8s_job":return"Kubernetes";case"ssh_job":return"SSH";case"slurm_job":return"Slurm";case"ray_job":return"Ray";case"openresearch_job":return"OpenResearch";case"local_job":return ND();case"tinker_job":return"Tinker";default:return e||"—"}}function tOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[f.jsx("path",{d:"M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z",fill:"#FF9D0B"}),f.jsx("path",{d:"M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z",fill:"#FFD21E"}),f.jsx("path",{d:"M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-0.576-.393-.394-1.023-.089-0.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-0.586 0 1.107.79 3.263 3.25 3.263h-.003z",fill:"#FF323D"}),f.jsx("path",{d:"M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003z",fill:"#3A3B45"}),f.jsx("path",{d:"M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8z",fill:"#3A3B45"}),f.jsx("path",{d:"M4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-0.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-0.553.718-.694.244-.162.523-.265.814-.3l.176-.012z",fill:"#FF9D0B"}),f.jsx("path",{d:"M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-0.573.534-.375-.677-1.405-2.416-1.94-2.751-0.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-0.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-0.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-0.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-0.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-0.522z",fill:"#FFD21E"})]})}function rOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[f.jsx("path",{d:"M121.683 75.25L149.997 124L91.4816 224.75C90.3128 226.757 88.155 228 85.8174 228H32.9664C31.7976 228 30.6778 227.691 29.697 227.131C28.7161 226.57 27.8906 225.758 27.3021 224.75L0.876625 179.25C-0.292208 177.243 -0.292208 174.765 0.876625 172.75L57.512 75.25C58.0923 74.2425 58.9259 73.43 59.9068 72.8694C60.8876 72.3088 62.0074 72 63.1762 72H116.027C118.365 72 120.523 73.2431 121.692 75.25H121.683ZM299.125 172.75L242.49 75.25C241.91 74.2425 241.076 73.43 240.095 72.8694C239.114 72.3088 237.995 72 236.826 72H183.975C181.637 72 179.479 73.2431 178.311 75.25L149.997 124L208.512 224.75C209.681 226.757 211.839 228 214.177 228H267.027C268.196 228 269.316 227.691 270.297 227.131C271.278 226.57 272.103 225.758 272.692 224.75L299.117 179.25C300.286 177.243 300.286 174.765 299.117 172.75H299.125Z",fill:"#62DE61"}),f.jsx("path",{d:"M89.6018 124H150.005L121.692 75.25C120.523 73.2431 118.365 72 116.027 72H63.1763C62.0074 72 60.8876 72.3088 59.9068 72.8694L89.6018 124Z",fill:"url(#orxModalA)"}),f.jsx("path",{d:"M89.6018 124L59.9068 72.8694C58.9259 73.43 58.1005 74.2425 57.512 75.25L0.876625 172.75C-0.292208 174.765 -0.292208 177.235 0.876625 179.25L27.3021 224.75C27.8825 225.758 28.7161 226.57 29.697 227.131L89.5936 124H89.6018Z",fill:"url(#orxModalB)"}),f.jsx("path",{d:"M149.997 124H89.5936L29.697 227.131C30.6778 227.691 31.7976 228 32.9664 228H85.8174C88.155 228 90.3128 226.757 91.4816 224.75L149.997 124Z",fill:"#09AF58"}),f.jsx("path",{d:"M299.125 179.25C299.706 178.243 300 177.121 300 176H240.61L210.915 227.131C211.896 227.691 213.016 228 214.185 228H267.036C269.373 228 271.531 226.757 272.7 224.75L299.125 179.25Z",fill:"#09AF58"}),f.jsx("path",{d:"M183.975 72C182.806 72 181.686 72.3088 180.705 72.8694L240.602 176H299.992C299.992 174.879 299.698 173.758 299.117 172.75L242.49 75.25C241.321 73.2431 239.163 72 236.826 72H183.967H183.975Z",fill:"url(#orxModalC)"}),f.jsx("path",{d:"M210.907 227.131L240.602 176L180.705 72.8694C179.725 73.43 178.899 74.2425 178.311 75.25L149.997 124L208.512 224.75C209.093 225.758 209.926 226.57 210.907 227.131Z",fill:"url(#orxModalD)"}),f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),f.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function nOn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:f.jsx("path",{d:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-0.5-.623h-.804l-0.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-0.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-0.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-0.52.123-.736-.172-.216-0.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-0.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-0.555-0.5-0.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-0.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-0.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-0.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z"})})}function sOn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:f.jsx("path",{d:"M16.153 12.826c-.63-.183-1.03.15-1.378.846-0.58 1.13-1.643 1.644-2.888 1.594-1.245-.05-2.257-.63-2.788-1.776-.233-.498-.498-.664-1.046-.68-.93-.017-1.643.016-2.174 1.062-.631 1.261-2.258 1.693-3.619 1.261a3.234 3.234 0 0 1-2.257-3.22 3.198 3.198 0 0 1 2.29-3.02 3.276 3.276 0 0 1 3.702 1.327c.216.315.216.863.597.93.648.1 1.328.033 1.992.033.299 0 .316-.266.399-.465.58-1.295 1.61-1.959 2.987-1.975 1.361-.017 2.39.647 2.955 1.892.215.465.48.598.946.548.166-.017.332.016.498 0 .464-.083 1.062.282 1.344-.448.282-.73-.382-.913-.68-1.245-.847-.946-1.81-1.793-2.673-2.706-.415-.465-.763-.614-1.41-.415-1.876.614-3.619-.431-4.15-2.357-.448-1.676.714-3.535 2.44-3.917a3.293 3.293 0 0 1 3.95 2.457c.017.05.017.083.033.133.117.564.117 1.145-.132 1.626-.283.531-.133.83.249 1.195a152.61 152.61 0 0 1 3.286 3.27c.299.299.498.349.913.2 1.51-0.565 2.97-.1 3.884 1.161a3.266 3.266 0 0 1-.067 3.801c-.896 1.195-2.357 1.643-3.834 1.079-.381-.15-0.58-.1-.846.182a163.619 163.619 0 0 1-3.403 3.386c-.299.3-.415.532-.232.98a3.198 3.198 0 0 1-1.278 3.917A3.298 3.298 0 0 1 9.646 23c-1.062-1.062-1.228-2.688-.415-4.033a3.196 3.196 0 0 1 3.835-1.294c.498.182.78.083 1.145-.283 1.012-1.045 2.058-2.058 3.087-3.103.266-.266.68-.449.432-1.03-.233-0.547-.631-.414-1.03-.431zM11.97 4.942c.913.016 1.643-.714 1.66-1.627v-.05a1.646 1.646 0 0 0-1.76-1.56 1.63 1.63 0 0 0-1.543 1.527 1.638 1.638 0 0 0 1.577 1.71zm.033 5.41a1.658 1.658 0 0 0-1.676 1.61v.084a1.73 1.73 0 0 0 1.643 1.66c.847.016 1.643-.78 1.677-1.627a1.648 1.648 0 0 0-1.577-1.71c-.017-.016-.05-.016-.067-.016zm7.088 1.694c.016.896.747 1.61 1.626 1.643a1.723 1.723 0 0 0 1.66-1.726 1.666 1.666 0 0 0-1.66-1.61 1.623 1.623 0 0 0-1.643 1.577c.017.05.017.083.017.116zM3.24 10.353a1.692 1.692 0 0 0-1.66 1.626c-.017.847.863 1.727 1.693 1.71a1.687 1.687 0 0 0 1.626-1.743 1.615 1.615 0 0 0-1.643-1.593Zm8.68 12c.98.033 1.71-.647 1.727-1.593a1.646 1.646 0 0 0-1.51-1.793 1.646 1.646 0 0 0-1.793 1.51v.233a1.609 1.609 0 0 0 1.543 1.66c0-.017.017-.017.033-.017z"})})}function oOn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function aOn({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:JMn,width:e,height:e,style:{transform:e>=48?`translateX(${Math.round(e*.18)}px) scale(1.65)`:"scale(1.22)"},alt:"","aria-hidden":"true"})}function iOn({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:ZMn,width:e,height:e,alt:"","aria-hidden":"true"})}function g6({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-0.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-0.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})})}function Cp({kind:e,size:r=16}){switch(e){case"modal_job":return f.jsx(rOn,{size:r});case"hf_job":return f.jsx(tOn,{size:r});case"k8s_job":return f.jsx(nOn,{size:r});case"ssh_job":return f.jsx(eA,{size:r,strokeWidth:1.5});case"slurm_job":return f.jsx(iOn,{size:r});case"ray_job":return f.jsx(sOn,{size:r});case"openresearch_job":return f.jsx(oOn,{size:r});case"tinker_job":return f.jsx(aOn,{size:r});case"local_job":return f.jsx(x9n,{size:r,strokeWidth:1.5});default:return f.jsx(eA,{size:r})}}function v6({backend:e}){const r=tS(e),t=xCn(e);return r?f.jsxs("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted",children:[f.jsx(Cp,{kind:r}),f.jsx("span",{className:"backend-name",children:eOn(r)}),t&&f.jsx("span",{className:"backend-detail text-sm",children:t})]}):f.jsx("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted muted text-muted",children:"—"})}function cOn({expanded:e,experiments:r,runs:t,onOpenExperiment:n,rightOffset:s,activeView:o,projectId:a,onCompute:i,sessionId:c,busy:u,onChanges:d,onFiles:_,onTerminal:p,onArtifacts:m,onExperiments:k,onSideChat:w}){var A,z;const v=$An(r,t,c),b=T.useRef(null),x=ba(b),y=dt({...tI(a),enabled:e}),S=((A=y.data)==null?void 0:A.configuredDefaultBackend)??((z=y.data)==null?void 0:z.defaultBackend),E=S?Jf[S]():y.isPending?"…":y.isError?wi():o3(),N=[{id:"files",label:G4(),Icon:Ci,onClick:_},{id:"artifacts",label:mD(),Icon:hS,onClick:m},{id:"experiments",label:gD(),Icon:h0,onClick:k}];return f.jsx("div",{className:`workspace-tools absolute end-3.5 top-7 z-30 ${s===void 0?"win-titlebar:top-10":""}`,style:{insetInlineEnd:s},children:e?f.jsxs("nav",{"aria-label":D2(),className:"workspace-tools-card flex w-60 flex-col gap-0.5 rounded-xl border border-border bg-background px-1.5 py-2 shadow-elevated",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:D2()}),N.filter(M=>M.id!=="files").map(({id:M,label:$,Icon:D,onClick:I})=>f.jsx(_r,{className:"min-h-7 py-1","data-onboarding":M==="artifacts"?"nav-artifacts":void 0,onClick:I,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(D,{size:15}),$]})},M)),f.jsx(_r,{className:"py-1",onClick:i,children:f.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[f.jsx(fS,{size:15,className:"shrink-0"}),r3n()]}),f.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[S&&f.jsx(Cp,{kind:`${S}_job`,size:12}),f.jsx("span",{className:"wrap-anywhere",children:E})]})]})}),f.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:o5n()}),f.jsx(_r,{className:"min-h-7 py-1",onClick:_,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Ci,{size:15}),G4()]})}),f.jsx(_r,{className:"min-h-7 py-1",onClick:p,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Gc,{size:15}),bb()]})}),w&&f.jsx(_r,{className:"min-h-7 py-1",onClick:w,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(pg,{size:15}),i3()]})}),c&&f.jsx(lOn,{sessionId:c,busy:u,onChanges:d},c),v.length>0&&f.jsxs("div",{children:[f.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[f.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:f.jsx(Eh,{tone:"success",live:!0})}),f.jsx("span",{children:W4n()})]}),v.map(M=>f.jsx(_r,{className:"min-h-7 py-1",onClick:()=>n(M.experiment.id,M.run.id),children:f.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${M.experiment.title||M.experiment.slug} · ${a6(Ba(M.run))}`,children:M.experiment.title||M.experiment.slug})},M.run.id))]})]})]}):f.jsxs("nav",{"aria-label":D2(),className:"flex items-center justify-end gap-3",children:[N.map(({id:M,label:$,Icon:D,onClick:I})=>f.jsx(Rt,{active:o===M,className:"text-text [&.active]:text-text","data-tip":$,"data-tip-align":M==="experiments"?"end":void 0,"aria-label":$,"aria-pressed":o===M,onClick:I,children:f.jsx(D,{size:15})},M)),f.jsxs("div",{className:"relative",children:[f.jsx(Rt,{ref:b,active:o==="terminal"||x.open,className:"text-text [&.active]:text-text","data-tip":x.open?void 0:xN(),"data-tip-align":"end","aria-label":xN(),"aria-expanded":x.open,"aria-haspopup":"menu",onClick:()=>x.setOpen(M=>!M),children:f.jsx(wp,{size:15})}),x.open&&f.jsxs("div",{ref:x.ref,role:"menu",className:"absolute end-0 top-[calc(100%_+_4px)] z-50 flex min-w-40 flex-col rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsx(_r,{role:"menuitem",onClick:()=>{x.setOpen(!1),p()},children:f.jsxs("span",{className:"flex items-center gap-2.5",children:[f.jsx(Gc,{size:15}),bb()]})}),w&&f.jsx(_r,{role:"menuitem",onClick:()=>{x.setOpen(!1),w()},children:f.jsxs("span",{className:"flex items-center gap-2.5",children:[f.jsx(pg,{size:15}),i3()]})})]})]})]})})}function lOn({sessionId:e,busy:r,onChanges:t}){var c,u;const n=dt({...Tb(e),refetchInterval:r?5e3:!1}),s=T.useRef(r),{refetch:o}=n;T.useEffect(()=>{s.current&&!r&&o(),s.current=r},[r,o]);const a=n.data,i=T.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const d=LB(a.diff.diff,!1);return d.failed?null:d.files.map(Jy).reduce((_,p)=>({additions:_.additions+p.additions,deletions:_.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?f.jsxs(_r,{className:"min-h-7 py-1",onClick:t,title:a.branch??Qj(),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[f.jsx(p0,{size:15,className:"shrink-0"}),f.jsx("span",{children:zD()})]}),i?f.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[f.jsxs("span",{className:"text-accent-green",children:["+",fr(i.additions)]}),f.jsxs("span",{className:"text-accent-red",children:["−",fr(i.deletions)]})]}):f.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?OD():MD({count:fr(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function uOn({projectId:e,sessionId:r,active:t}){const n=T.useRef(null),s=T.useRef(null),[o,a]=T.useState(null),[i,c]=T.useState(0);return T.useEffect(()=>{const u=n.current;if(!u)return;const d=Ay(u,!1,!0,"app"),{terminal:_,dispose:p}=d;s.current=d,a(null);const m=location.protocol==="https:"?"wss:":"ws:",k=new URL(`/api/projects/${encodeURIComponent(e)}/terminal`,`${m}//${location.host}`);r&&k.searchParams.set("sessionId",r);const w=new WebSocket(k);w.binaryType="arraybuffer";let v=!1;const b=S=>{v||(v=!0,_.options.disableStdin=!0,_.blur(),_.writeln(`\r +${S}`),a(S))},x=_.onData(S=>{w.readyState===WebSocket.OPEN&&w.send(new TextEncoder().encode(S))}),y=_.onResize(({cols:S,rows:E})=>{w.readyState===WebSocket.OPEN&&w.send(JSON.stringify({type:"resize",cols:S,rows:E}))});return w.onopen=()=>{w.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))},w.onmessage=S=>{if(S.data instanceof ArrayBuffer){_.write(new Uint8Array(S.data));return}if(typeof S.data!="string")return;let E;try{E=JSON.parse(S.data)}catch{return}vd(E)&&(E.type==="exit"?b(P3n({code:String(E.code)})):E.type==="error"&&typeof E.error=="string"&&b(E.error))},w.onclose=()=>b(wN()),w.onerror=()=>b(wN()),()=>{w.onopen=null,w.onmessage=null,w.onerror=null,w.onclose=null,x.dispose(),y.dispose(),w.close(),s.current=null,p()}},[e,r,i]),T.useEffect(()=>{if(!t||o!==null)return;const u=requestAnimationFrame(()=>{var d,_;(d=s.current)==null||d.fit(),(_=s.current)==null||_.terminal.focus()});return()=>cancelAnimationFrame(u)},[t,o,i]),f.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-terminal-app p-2",role:"group","aria-label":bb(),children:[f.jsx("div",{ref:n,className:"min-h-0 flex-1 overflow-hidden"}),f.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:o??""}),o!==null&&f.jsx("div",{className:"flex shrink-0 justify-end pt-2",children:f.jsx(Oe,{autoFocus:!0,onClick:()=>c(u=>u+1),children:Q3n()})})]})}const _On=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fOn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dOn={};function aT(e,r){return(dOn.jsx?fOn:_On).test(e)}const hOn=/[ \t\n\f\r]/g;function pOn(e){return typeof e=="object"?e.type==="text"?iT(e.value):!1:iT(e)}function iT(e){return e.replace(hOn,"")===""}var sh={},ek,cT;function mOn(){if(cT)return ek;cT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,t=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,i=/^\s+|\s+$/g,c=` +`,u="/",d="*",_="",p="comment",m="declaration";function k(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var x=1,y=1;function S(F){var Q=F.match(r);Q&&(x+=Q.length);var K=F.lastIndexOf(c);y=~K?F.length-K:y+F.length}function E(){var F={line:x,column:y};return function(Q){return Q.position=new N(F),M(),Q}}function N(F){this.start=F,this.end={line:x,column:y},this.source=b.source}N.prototype.content=v;function A(F){var Q=new Error(b.source+":"+x+":"+y+": "+F);if(Q.reason=F,Q.filename=b.source,Q.line=x,Q.column=y,Q.source=v,!b.silent)throw Q}function z(F){var Q=F.exec(v);if(Q){var K=Q[0];return S(K),v=v.slice(K.length),Q}}function M(){z(t)}function $(F){var Q;for(F=F||[];Q=D();)Q!==!1&&F.push(Q);return F}function D(){var F=E();if(!(u!=v.charAt(0)||d!=v.charAt(1))){for(var Q=2;_!=v.charAt(Q)&&(d!=v.charAt(Q)||u!=v.charAt(Q+1));)++Q;if(Q+=2,_===v.charAt(Q-1))return A("End of comment missing");var K=v.slice(2,Q-2);return y+=2,S(K),v=v.slice(Q),y+=2,F({type:p,comment:K})}}function I(){var F=E(),Q=z(n);if(Q){if(D(),!z(s))return A("property missing ':'");var K=z(o),J=F({type:m,property:w(Q[0].replace(e,_)),value:K?w(K[0].replace(e,_)):_});return z(a),J}}function G(){var F=[];$(F);for(var Q;Q=I();)Q!==!1&&(F.push(Q),$(F));return F}return M(),G()}function w(v){return v?v.replace(i,_):_}return ek=k,ek}var lT;function gOn(){if(lT)return sh;lT=1;var e=sh&&sh.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sh,"__esModule",{value:!0}),sh.default=t;const r=e(mOn());function t(n,s){let o=null;if(!n||typeof n!="string")return o;const a=(0,r.default)(n),i=typeof s=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:d}=c;i?s(u,d,c):d&&(o=o||{},o[u]=d)}),o}return sh}var jm={},uT;function vOn(){if(uT)return jm;uT=1,Object.defineProperty(jm,"__esModule",{value:!0}),jm.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,t=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(u){return!u||t.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},i=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}),o(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(s,i):u=u.replace(n,i),u.replace(r,a))};return jm.camelCase=c,jm}var Sm,_T;function bOn(){if(_T)return Sm;_T=1;var e=Sm&&Sm.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=e(gOn()),t=vOn();function n(s,o){var a={};return!s||typeof s!="string"||(0,r.default)(s,function(i,c){i&&c&&(a[(0,t.camelCase)(i,o)]=c)}),a}return n.default=n,Sm=n,Sm}var yOn=bOn();const xOn=n0(yOn),FB=HB("end"),b6=HB("start");function HB(e){return r;function r(t){const n=t&&t.position&&t.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function wOn(e){const r=b6(e),t=FB(e);if(r&&t)return{start:r,end:t}}function Xm(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fT(e.position):"start"in e||"end"in e?fT(e):"line"in e||"column"in e?t5(e):""}function t5(e){return dT(e&&e.line)+":"+dT(e&&e.column)}function fT(e){return t5(e&&e.start)+"-"+t5(e&&e.end)}function dT(e){return e&&typeof e=="number"?e:1}class No extends Error{constructor(r,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let s="",o={},a=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof r=="string"?s=r:!o.cause&&r&&(a=!0,s=r.message,o.cause=r),!o.ruleId&&!o.source&&typeof n=="string"){const c=n.indexOf(":");c===-1?o.ruleId=n:(o.source=n.slice(0,c),o.ruleId=n.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const i=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=i?i.line:void 0,this.name=Xm(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}No.prototype.file="";No.prototype.name="";No.prototype.reason="";No.prototype.message="";No.prototype.stack="";No.prototype.column=void 0;No.prototype.line=void 0;No.prototype.ancestors=void 0;No.prototype.cause=void 0;No.prototype.fatal=void 0;No.prototype.place=void 0;No.prototype.ruleId=void 0;No.prototype.source=void 0;const y6={}.hasOwnProperty,kOn=new Map,jOn=/[A-Z]/g,SOn=new Set(["table","tbody","thead","tfoot","tr"]),COn=new Set(["td","th"]),qB="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function UB(e,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=r.filePath||void 0;let n;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=OOn(t,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=MOn(t,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:n,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Iy:TP,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},o=GB(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function GB(e,r,t){if(r.type==="element")return zOn(e,r,t);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return EOn(e,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return AOn(e,r,t);if(r.type==="mdxjsEsm")return NOn(e,r);if(r.type==="root")return TOn(e,r,t);if(r.type==="text")return ROn(e,r)}function zOn(e,r,t){const n=e.schema;let s=n;r.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=Iy,e.schema=s),e.ancestors.push(r);const o=KB(e,r.tagName,!1),a=$On(e,r);let i=w6(e,r);return SOn.has(r.tagName)&&(i=i.filter(function(c){return typeof c=="string"?!pOn(c):!0})),WB(e,a,o,r),x6(a,i),e.ancestors.pop(),e.schema=n,e.create(r,o,a,t)}function EOn(e,r){if(r.data&&r.data.estree&&e.evaluater){const n=r.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Sg(e,r.position)}function NOn(e,r){if(r.data&&r.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(r.data.estree);Sg(e,r.position)}function AOn(e,r,t){const n=e.schema;let s=n;r.name==="svg"&&n.space==="html"&&(s=Iy,e.schema=s),e.ancestors.push(r);const o=r.name===null?e.Fragment:KB(e,r.name,!0),a=DOn(e,r),i=w6(e,r);return WB(e,a,o,r),x6(a,i),e.ancestors.pop(),e.schema=n,e.create(r,o,a,t)}function TOn(e,r,t){const n={};return x6(n,w6(e,r)),e.create(r,e.Fragment,n,t)}function ROn(e,r){return r.value}function WB(e,r,t,n){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(r.node=n)}function x6(e,r){if(r.length>0){const t=r.length>1?r:r[0];t&&(e.children=t)}}function MOn(e,r,t){return n;function n(s,o,a,i){const u=Array.isArray(a.children)?t:r;return i?u(o,a,i):u(o,a)}}function OOn(e,r){return t;function t(n,s,o,a){const i=Array.isArray(o.children),c=b6(n);return r(s,o,a,i,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function $On(e,r){const t={};let n,s;for(s in r.properties)if(s!=="children"&&y6.call(r.properties,s)){const o=LOn(e,s,r.properties[s]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&a==="align"&&typeof i=="string"&&COn.has(r.tagName)?n=i:t[a]=i}}if(n){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return t}function DOn(e,r){const t={};for(const n of r.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const o=n.data.estree.body[0];o.type;const a=o.expression;a.type;const i=a.properties[0];i.type,Object.assign(t,e.evaluater.evaluateExpression(i.argument))}else Sg(e,r.position);else{const s=n.name;let o;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const i=n.value.data.estree.body[0];i.type,o=e.evaluater.evaluateExpression(i.expression)}else Sg(e,r.position);else o=n.value===null?!0:n.value;t[s]=o}return t}function w6(e,r){const t=[];let n=-1;const s=e.passKeys?new Map:kOn;for(;++ns?0:s+r:r=r>s?s:r,t=t>0?t:0,n.length<1e4)a=Array.from(n),a.unshift(r,t),e.splice(...a);else for(t&&e.splice(r,t);o0?(qa(e,e.length,0,r),e):r}const pT={}.hasOwnProperty;function QB(e){const r={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Ji(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wo=R_(/[A-Za-z]/),Co=R_(/[\dA-Za-z]/),WOn=R_(/[#-'*+\--9=?A-Z^-~]/);function $b(e){return e!==null&&(e<32||e===127)}const r5=R_(/\d/),KOn=R_(/[\dA-Fa-f]/),VOn=R_(/[!-/:-@[-`{-~]/);function Pt(e){return e!==null&&e<-2}function vn(e){return e!==null&&(e<0||e===32)}function Rr(e){return e===-2||e===-1||e===32}const ex=R_(new RegExp("\\p{P}|\\p{S}","u")),ed=R_(/\s/);function R_(e){return r;function r(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function zp(e){const r=[];let t=-1,n=0,s=0;for(;++t55295&&o<57344){const i=e.charCodeAt(t+1);o<56320&&i>56319&&i<57344?(a=String.fromCharCode(o,i),s=1):a="�"}else a=String.fromCharCode(o);a&&(r.push(e.slice(n,t),encodeURIComponent(a)),n=t+s+1,a=""),s&&(t+=s,s=0)}return r.join("")+e.slice(n)}function Nr(e,r,t,n){const s=n?n-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(c){return Rr(c)?(e.enter(t),i(c)):r(c)}function i(c){return Rr(c)&&o++a))return;const A=r.events.length;let z=A,M,$;for(;z--;)if(r.events[z][0]==="exit"&&r.events[z][1].type==="chunkFlow"){if(M){$=r.events[z][1].end;break}M=!0}for(b(n),N=A;Ny;){const E=t[S];r.containerState=E[1],E[0].exit.call(r,e)}t.length=y}function x(){s.write([null]),o=void 0,s=void 0,r.containerState._closeFlow=void 0}}function JOn(e,r,t){return Nr(e,e.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ap(e){if(e===null||vn(e)||ed(e))return 1;if(ex(e))return 2}function tx(e,r,t){const n=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const _={...e[n][1].end},p={...e[t][1].start};gT(_,-c),gT(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:_,end:{...e[n][1].end}},i={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},o={type:c>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...a.start},end:{...i.end}},e[n][1].end={...a.start},e[t][1].start={...i.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=xi(u,[["enter",e[n][1],r],["exit",e[n][1],r]])),u=xi(u,[["enter",s,r],["enter",a,r],["exit",a,r],["enter",o,r]]),u=xi(u,tx(r.parser.constructs.insideSpan.null,e.slice(n+1,t),r)),u=xi(u,[["exit",o,r],["enter",i,r],["exit",i,r],["exit",s,r]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,u=xi(u,[["enter",e[t][1],r],["exit",e[t][1],r]])):d=0,qa(e,n-1,t-n+3,u),t=n+u.length-d-2;break}}for(t=-1;++t0&&Rr(N)?Nr(e,x,"linePrefix",o+1)(N):x(N)}function x(N){return N===null||Pt(N)?e.check(vT,w,S)(N):(e.enter("codeFlowValue"),y(N))}function y(N){return N===null||Pt(N)?(e.exit("codeFlowValue"),x(N)):(e.consume(N),y)}function S(N){return e.exit("codeFenced"),r(N)}function E(N,A,z){let M=0;return $;function $(Q){return N.enter("lineEnding"),N.consume(Q),N.exit("lineEnding"),D}function D(Q){return N.enter("codeFencedFence"),Rr(Q)?Nr(N,I,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):I(Q)}function I(Q){return Q===i?(N.enter("codeFencedFenceSequence"),G(Q)):z(Q)}function G(Q){return Q===i?(M++,N.consume(Q),G):M>=a?(N.exit("codeFencedFenceSequence"),Rr(Q)?Nr(N,F,"whitespace")(Q):F(Q)):z(Q)}function F(Q){return Q===null||Pt(Q)?(N.exit("codeFencedFence"),A(Q)):z(Q)}}}function _$n(e,r,t){const n=this;return s;function s(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return n.parser.lazy[n.now().line]?t(a):r(a)}}const rk={name:"codeIndented",tokenize:d$n},f$n={partial:!0,tokenize:h$n};function d$n(e,r,t){const n=this;return s;function s(u){return e.enter("codeIndented"),Nr(e,o,"linePrefix",5)(u)}function o(u){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Pt(u)?e.attempt(f$n,a,c)(u):(e.enter("codeFlowValue"),i(u))}function i(u){return u===null||Pt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),i)}function c(u){return e.exit("codeIndented"),r(u)}}function h$n(e,r,t){const n=this;return s;function s(a){return n.parser.lazy[n.now().line]?t(a):Pt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Nr(e,o,"linePrefix",5)(a)}function o(a){const i=n.events[n.events.length-1];return i&&i[1].type==="linePrefix"&&i[2].sliceSerialize(i[1],!0).length>=4?r(a):Pt(a)?s(a):t(a)}}const p$n={name:"codeText",previous:g$n,resolve:m$n,tokenize:v$n};function m$n(e){let r=e.length-4,t=3,n,s;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(n=t;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return rthis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(r,t,n){const s=t||0;this.setCursor(Math.trunc(r));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return n&&Cm(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Cm(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Cm(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r=4?r(a):e.interrupt(n.parser.constructs.flow,t,r)(a)}}function tF(e,r,t,n,s,o,a,i,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return _;function _(b){return b===60?(e.enter(n),e.enter(s),e.enter(o),e.consume(b),e.exit(o),p):b===null||b===32||b===41||$b(b)?t(b):(e.enter(n),e.enter(a),e.enter(i),e.enter("chunkString",{contentType:"string"}),w(b))}function p(b){return b===62?(e.enter(o),e.consume(b),e.exit(o),e.exit(s),e.exit(n),r):(e.enter(i),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(i),p(b)):b===null||b===60||Pt(b)?t(b):(e.consume(b),b===92?k:m)}function k(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function w(b){return!d&&(b===null||b===41||vn(b))?(e.exit("chunkString"),e.exit(i),e.exit(a),e.exit(n),r(b)):d999||m===null||m===91||m===93&&!c||m===94&&!i&&"_hiddenFootnoteSupport"in a.parser.constructs?t(m):m===93?(e.exit(o),e.enter(s),e.consume(m),e.exit(s),e.exit(n),r):Pt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===null||m===91||m===93||Pt(m)||i++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!Rr(m)),m===92?p:_)}function p(m){return m===91||m===92||m===93?(e.consume(m),i++,_):_(m)}}function nF(e,r,t,n,s,o){let a;return i;function i(p){return p===34||p===39||p===40?(e.enter(n),e.enter(s),e.consume(p),e.exit(s),a=p===40?41:p,c):t(p)}function c(p){return p===a?(e.enter(s),e.consume(p),e.exit(s),e.exit(n),r):(e.enter(o),u(p))}function u(p){return p===a?(e.exit(o),c(a)):p===null?t(p):Pt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Nr(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===a||p===null||Pt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?_:d)}function _(p){return p===a||p===92?(e.consume(p),d):d(p)}}function Ym(e,r){let t;return n;function n(s){return Pt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,n):Rr(s)?Nr(e,n,t?"linePrefix":"lineSuffix")(s):r(s)}}const C$n={name:"definition",tokenize:E$n},z$n={partial:!0,tokenize:N$n};function E$n(e,r,t){const n=this;let s;return o;function o(m){return e.enter("definition"),a(m)}function a(m){return rF.call(n,e,i,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function i(m){return s=Ji(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):t(m)}function c(m){return vn(m)?Ym(e,u)(m):u(m)}function u(m){return tF(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(z$n,_,_)(m)}function _(m){return Rr(m)?Nr(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Pt(m)?(e.exit("definition"),n.parser.defined.push(s),r(m)):t(m)}}function N$n(e,r,t){return n;function n(i){return vn(i)?Ym(e,s)(i):t(i)}function s(i){return nF(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(i)}function o(i){return Rr(i)?Nr(e,a,"whitespace")(i):a(i)}function a(i){return i===null||Pt(i)?r(i):t(i)}}const A$n={name:"hardBreakEscape",tokenize:T$n};function T$n(e,r,t){return n;function n(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Pt(o)?(e.exit("hardBreakEscape"),r(o)):t(o)}}const R$n={name:"headingAtx",resolve:M$n,tokenize:O$n};function M$n(e,r){let t=e.length-2,n=3,s,o;return e[n][1].type==="whitespace"&&(n+=2),t-2>n&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&e[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(s={type:"atxHeadingText",start:e[n][1].start,end:e[t][1].end},o={type:"chunkText",start:e[n][1].start,end:e[t][1].end,contentType:"text"},qa(e,n,t-n+1,[["enter",s,r],["enter",o,r],["exit",o,r],["exit",s,r]])),e}function O$n(e,r,t){let n=0;return s;function s(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&n++<6?(e.consume(d),a):d===null||vn(d)?(e.exit("atxHeadingSequence"),i(d)):t(d)}function i(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||Pt(d)?(e.exit("atxHeading"),r(d)):Rr(d)?Nr(e,i,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),i(d))}function u(d){return d===null||d===35||vn(d)?(e.exit("atxHeadingText"),i(d)):(e.consume(d),u)}}const $$n=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],yT=["pre","script","style","textarea"],D$n={concrete:!0,name:"htmlFlow",resolveTo:P$n,tokenize:B$n},L$n={partial:!0,tokenize:H$n},I$n={partial:!0,tokenize:F$n};function P$n(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function B$n(e,r,t){const n=this;let s,o,a,i,c;return u;function u(U){return d(U)}function d(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),_}function _(U){return U===33?(e.consume(U),p):U===47?(e.consume(U),o=!0,w):U===63?(e.consume(U),s=3,n.interrupt?r:L):Wo(U)?(e.consume(U),a=String.fromCharCode(U),v):t(U)}function p(U){return U===45?(e.consume(U),s=2,m):U===91?(e.consume(U),s=5,i=0,k):Wo(U)?(e.consume(U),s=4,n.interrupt?r:L):t(U)}function m(U){return U===45?(e.consume(U),n.interrupt?r:L):t(U)}function k(U){const oe="CDATA[";return U===oe.charCodeAt(i++)?(e.consume(U),i===oe.length?n.interrupt?r:I:k):t(U)}function w(U){return Wo(U)?(e.consume(U),a=String.fromCharCode(U),v):t(U)}function v(U){if(U===null||U===47||U===62||vn(U)){const oe=U===47,ie=a.toLowerCase();return!oe&&!o&&yT.includes(ie)?(s=1,n.interrupt?r(U):I(U)):$$n.includes(a.toLowerCase())?(s=6,oe?(e.consume(U),b):n.interrupt?r(U):I(U)):(s=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(U):o?x(U):y(U))}return U===45||Co(U)?(e.consume(U),a+=String.fromCharCode(U),v):t(U)}function b(U){return U===62?(e.consume(U),n.interrupt?r:I):t(U)}function x(U){return Rr(U)?(e.consume(U),x):$(U)}function y(U){return U===47?(e.consume(U),$):U===58||U===95||Wo(U)?(e.consume(U),S):Rr(U)?(e.consume(U),y):$(U)}function S(U){return U===45||U===46||U===58||U===95||Co(U)?(e.consume(U),S):E(U)}function E(U){return U===61?(e.consume(U),N):Rr(U)?(e.consume(U),E):y(U)}function N(U){return U===null||U===60||U===61||U===62||U===96?t(U):U===34||U===39?(e.consume(U),c=U,A):Rr(U)?(e.consume(U),N):z(U)}function A(U){return U===c?(e.consume(U),c=null,M):U===null||Pt(U)?t(U):(e.consume(U),A)}function z(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||vn(U)?E(U):(e.consume(U),z)}function M(U){return U===47||U===62||Rr(U)?y(U):t(U)}function $(U){return U===62?(e.consume(U),D):t(U)}function D(U){return U===null||Pt(U)?I(U):Rr(U)?(e.consume(U),D):t(U)}function I(U){return U===45&&s===2?(e.consume(U),K):U===60&&s===1?(e.consume(U),J):U===62&&s===4?(e.consume(U),H):U===63&&s===3?(e.consume(U),L):U===93&&s===5?(e.consume(U),P):Pt(U)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(L$n,q,G)(U)):U===null||Pt(U)?(e.exit("htmlFlowData"),G(U)):(e.consume(U),I)}function G(U){return e.check(I$n,F,q)(U)}function F(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),Q}function Q(U){return U===null||Pt(U)?G(U):(e.enter("htmlFlowData"),I(U))}function K(U){return U===45?(e.consume(U),L):I(U)}function J(U){return U===47?(e.consume(U),a="",ee):I(U)}function ee(U){if(U===62){const oe=a.toLowerCase();return yT.includes(oe)?(e.consume(U),H):I(U)}return Wo(U)&&a.length<8?(e.consume(U),a+=String.fromCharCode(U),ee):I(U)}function P(U){return U===93?(e.consume(U),L):I(U)}function L(U){return U===62?(e.consume(U),H):U===45&&s===2?(e.consume(U),L):I(U)}function H(U){return U===null||Pt(U)?(e.exit("htmlFlowData"),q(U)):(e.consume(U),H)}function q(U){return e.exit("htmlFlow"),r(U)}}function F$n(e,r,t){const n=this;return s;function s(a){return Pt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):t(a)}function o(a){return n.parser.lazy[n.now().line]?t(a):r(a)}}function H$n(e,r,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(x0,r,t)}}const q$n={name:"htmlText",tokenize:U$n};function U$n(e,r,t){const n=this;let s,o,a;return i;function i(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),E):L===63?(e.consume(L),y):Wo(L)?(e.consume(L),z):t(L)}function u(L){return L===45?(e.consume(L),d):L===91?(e.consume(L),o=0,k):Wo(L)?(e.consume(L),x):t(L)}function d(L){return L===45?(e.consume(L),m):t(L)}function _(L){return L===null?t(L):L===45?(e.consume(L),p):Pt(L)?(a=_,J(L)):(e.consume(L),_)}function p(L){return L===45?(e.consume(L),m):_(L)}function m(L){return L===62?K(L):L===45?p(L):_(L)}function k(L){const H="CDATA[";return L===H.charCodeAt(o++)?(e.consume(L),o===H.length?w:k):t(L)}function w(L){return L===null?t(L):L===93?(e.consume(L),v):Pt(L)?(a=w,J(L)):(e.consume(L),w)}function v(L){return L===93?(e.consume(L),b):w(L)}function b(L){return L===62?K(L):L===93?(e.consume(L),b):w(L)}function x(L){return L===null||L===62?K(L):Pt(L)?(a=x,J(L)):(e.consume(L),x)}function y(L){return L===null?t(L):L===63?(e.consume(L),S):Pt(L)?(a=y,J(L)):(e.consume(L),y)}function S(L){return L===62?K(L):y(L)}function E(L){return Wo(L)?(e.consume(L),N):t(L)}function N(L){return L===45||Co(L)?(e.consume(L),N):A(L)}function A(L){return Pt(L)?(a=A,J(L)):Rr(L)?(e.consume(L),A):K(L)}function z(L){return L===45||Co(L)?(e.consume(L),z):L===47||L===62||vn(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),K):L===58||L===95||Wo(L)?(e.consume(L),$):Pt(L)?(a=M,J(L)):Rr(L)?(e.consume(L),M):K(L)}function $(L){return L===45||L===46||L===58||L===95||Co(L)?(e.consume(L),$):D(L)}function D(L){return L===61?(e.consume(L),I):Pt(L)?(a=D,J(L)):Rr(L)?(e.consume(L),D):M(L)}function I(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,G):Pt(L)?(a=I,J(L)):Rr(L)?(e.consume(L),I):(e.consume(L),F)}function G(L){return L===s?(e.consume(L),s=void 0,Q):L===null?t(L):Pt(L)?(a=G,J(L)):(e.consume(L),G)}function F(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||vn(L)?M(L):(e.consume(L),F)}function Q(L){return L===47||L===62||vn(L)?M(L):t(L)}function K(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),r):t(L)}function J(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),ee}function ee(L){return Rr(L)?Nr(e,P,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):P(L)}function P(L){return e.enter("htmlTextData"),a(L)}}const j6={name:"labelEnd",resolveAll:V$n,resolveTo:Q$n,tokenize:X$n},G$n={tokenize:Y$n},W$n={tokenize:Z$n},K$n={tokenize:J$n};function V$n(e){let r=-1;const t=[];for(;++r=3&&(u===null||Pt(u))?(e.exit("thematicBreak"),r(u)):t(u)}function c(u){return u===s?(e.consume(u),n++,c):(e.exit("thematicBreakSequence"),Rr(u)?Nr(e,i,"whitespace")(u):i(u))}}const fa={continuation:{tokenize:lDn},exit:_Dn,name:"list",tokenize:cDn},aDn={partial:!0,tokenize:fDn},iDn={partial:!0,tokenize:uDn};function cDn(e,r,t){const n=this,s=n.events[n.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return i;function i(m){const k=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:r5(m)){if(n.containerState.type||(n.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(U1,t,u)(m):u(m);if(!n.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return t(m)}function c(m){return r5(m)&&++a<10?(e.consume(m),c):(!n.interrupt||a<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):t(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,e.check(x0,n.interrupt?t:d,e.attempt(aDn,p,_))}function d(m){return n.containerState.initialBlankLine=!0,o++,p(m)}function _(m){return Rr(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):t(m)}function p(m){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(m)}}function lDn(e,r,t){const n=this;return n.containerState._closeFlow=void 0,e.check(x0,s,o);function s(i){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Nr(e,r,"listItemIndent",n.containerState.size+1)(i)}function o(i){return n.containerState.furtherBlankLines||!Rr(i)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(i)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(iDn,r,a)(i))}function a(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,Nr(e,e.attempt(fa,r,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}function uDn(e,r,t){const n=this;return Nr(e,s,"listItemIndent",n.containerState.size+1);function s(o){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?r(o):t(o)}}function _Dn(e){e.exit(this.containerState.type)}function fDn(e,r,t){const n=this;return Nr(e,s,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const a=n.events[n.events.length-1];return!Rr(o)&&a&&a[1].type==="listItemPrefixWhitespace"?r(o):t(o)}}const xT={name:"setextUnderline",resolveTo:dDn,tokenize:hDn};function dDn(e,r){let t=e.length,n,s,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){n=t;break}e[t][1].type==="paragraph"&&(s=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",a,r]),e.splice(o+1,0,["exit",e[n][1],r]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,r]),e}function hDn(e,r,t){const n=this;let s;return o;function o(u){let d=n.events.length,_;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){_=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||_)?(e.enter("setextHeadingLine"),s=u,a(u)):t(u)}function a(u){return e.enter("setextHeadingLineSequence"),i(u)}function i(u){return u===s?(e.consume(u),i):(e.exit("setextHeadingLineSequence"),Rr(u)?Nr(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Pt(u)?(e.exit("setextHeadingLine"),r(u)):t(u)}}const pDn={tokenize:mDn};function mDn(e){const r=this,t=e.attempt(x0,n,e.attempt(this.parser.constructs.flowInitial,s,Nr(e,e.attempt(this.parser.constructs.flow,s,e.attempt(x$n,s)),"linePrefix")));return t;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r.currentConstruct=void 0,t}}const gDn={resolveAll:oF()},vDn=sF("string"),bDn=sF("text");function sF(e){return{resolveAll:oF(e==="text"?yDn:void 0),tokenize:r};function r(t){const n=this,s=this.parser.constructs[e],o=t.attempt(s,a,i);return a;function a(d){return u(d)?o(d):i(d)}function i(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),c}function c(d){return u(d)?(t.exit("data"),o(d)):(t.consume(d),c)}function u(d){if(d===null)return!0;const _=s[d];let p=-1;if(_)for(;++p<_.length;){const m=_[p];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}function oF(e){return r;function r(t,n){let s=-1,o;for(;++s<=t.length;)o===void 0?t[s]&&t[s][1].type==="data"&&(o=s,s++):(!t[s]||t[s][1].type!=="data")&&(s!==o+2&&(t[o][1].end=t[s-1][1].end,t.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(t,n):t}}function yDn(e,r){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const n=e[t-1][1],s=r.sliceStream(n);let o=s.length,a=-1,i=0,c;for(;o--;){const u=s[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)i++,a--;if(a)break;a=-1}else if(u===-2)c=!0,i++;else if(u!==-1){o++;break}}if(r._contentTypeTextTrailing&&t===e.length&&(i=0),i){const u={type:t===e.length||c||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:n.start._bufferIndex+a,_index:n.start._index+o,line:n.end.line,column:n.end.column-i,offset:n.end.offset-i},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(t,0,["enter",u,r],["exit",u,r]),t+=2)}t++}return e}const xDn={42:fa,43:fa,45:fa,48:fa,49:fa,50:fa,51:fa,52:fa,53:fa,54:fa,55:fa,56:fa,57:fa,62:YB},wDn={91:C$n},kDn={[-2]:rk,[-1]:rk,32:rk},jDn={35:R$n,42:U1,45:[xT,U1],60:D$n,61:xT,95:U1,96:bT,126:bT},SDn={38:JB,92:ZB},CDn={[-5]:nk,[-4]:nk,[-3]:nk,33:eDn,38:JB,42:n5,60:[r$n,q$n],91:rDn,92:[A$n,ZB],93:j6,95:n5,96:p$n},zDn={null:[n5,gDn]},EDn={null:[42,95]},NDn={null:[]},ADn=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:EDn,contentInitial:wDn,disable:NDn,document:xDn,flow:jDn,flowInitial:kDn,insideSpan:zDn,string:SDn,text:CDn},Symbol.toStringTag,{value:"Module"}));function TDn(e,r,t){let n={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const s={},o=[];let a=[],i=[];const c={attempt:A(E),check:A(N),consume:x,enter:y,exit:S,interrupt:A(N,{interrupt:!0})},u={code:null,containerState:{},defineSkip:w,events:[],now:k,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:_};let d=r.tokenize.call(u,c);return r.resolveAll&&o.push(r),u;function _(D){return a=xi(a,D),v(),a[a.length-1]!==null?[]:(z(r,0),u.events=tx(o,u.events,u),u.events)}function p(D,I){return MDn(m(D),I)}function m(D){return RDn(a,D)}function k(){const{_bufferIndex:D,_index:I,line:G,column:F,offset:Q}=n;return{_bufferIndex:D,_index:I,line:G,column:F,offset:Q}}function w(D){s[D.line]=D.column,$()}function v(){let D;for(;n._index-1){const i=a[0];typeof i=="string"?a[0]=i.slice(n):a.shift()}o>0&&a.push(e[s].slice(0,o))}return a}function MDn(e,r){let t=-1;const n=[];let s;for(;++t0){const Ze=Ye.tokenStack[Ye.tokenStack.length-1];(Ze[1]||kT).call(Ye,void 0,Ze[0])}for(Ie.position={start:Wu(xe.length>0?xe[0][1].start:{line:1,column:1,offset:0}),end:Wu(xe.length>0?xe[xe.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve0){const Ze=Ye.tokenStack[Ye.tokenStack.length-1];(Ze[1]||kT).call(Ye,void 0,Ze[0])}for(Ie.position={start:Wu(xe.length>0?xe[0][1].start:{line:1,column:1,offset:0}),end:Wu(xe.length>0?xe[xe.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve0&&(n.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:n,children:[{type:"text",value:t}]};return r.meta&&(o.data={meta:r.meta}),e.patch(r,o),o=e.applyData(r,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(r,o),o}function WDn(e,r){const t={type:"element",tagName:"del",properties:{},children:e.all(r)};return e.patch(r,t),e.applyData(r,t)}function KDn(e,r){const t={type:"element",tagName:"em",properties:{},children:e.all(r)};return e.patch(r,t),e.applyData(r,t)}function VDn(e,r){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(r.identifier).toUpperCase(),s=zp(n.toLowerCase()),o=e.footnoteOrder.indexOf(n);let a,i=e.footnoteCounts.get(n);i===void 0?(i=0,e.footnoteOrder.push(n),a=e.footnoteOrder.length):a=o+1,i+=1,e.footnoteCounts.set(n,i);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(r,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(r,u),e.applyData(r,u)}function QDn(e,r){const t={type:"element",tagName:"h"+r.depth,properties:{},children:e.all(r)};return e.patch(r,t),e.applyData(r,t)}function XDn(e,r){if(e.options.allowDangerousHtml){const t={type:"raw",value:r.value};return e.patch(r,t),e.applyData(r,t)}}function cF(e,r){const t=r.referenceType;let n="]";if(t==="collapsed"?n+="[]":t==="full"&&(n+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+n}];const s=e.all(r),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=n:s.push({type:"text",value:n}),s}function YDn(e,r){const t=String(r.identifier).toUpperCase(),n=e.definitionById.get(t);if(!n)return cF(e,r);const s={src:zp(n.url||""),alt:r.alt};n.title!==null&&n.title!==void 0&&(s.title=n.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(r,o),e.applyData(r,o)}function ZDn(e,r){const t={src:zp(r.url)};r.alt!==null&&r.alt!==void 0&&(t.alt=r.alt),r.title!==null&&r.title!==void 0&&(t.title=r.title);const n={type:"element",tagName:"img",properties:t,children:[]};return e.patch(r,n),e.applyData(r,n)}function JDn(e,r){const t={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,t);const n={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(r,n),e.applyData(r,n)}function eLn(e,r){const t=String(r.identifier).toUpperCase(),n=e.definitionById.get(t);if(!n)return cF(e,r);const s={href:zp(n.url||"")};n.title!==null&&n.title!==void 0&&(s.title=n.title);const o={type:"element",tagName:"a",properties:s,children:e.all(r)};return e.patch(r,o),e.applyData(r,o)}function tLn(e,r){const t={href:zp(r.url)};r.title!==null&&r.title!==void 0&&(t.title=r.title);const n={type:"element",tagName:"a",properties:t,children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function rLn(e,r,t){const n=e.all(r),s=t?nLn(t):lF(r),o={},a=[];if(typeof r.checked=="boolean"){const d=n[0];let _;d&&d.type==="element"&&d.tagName==="p"?_=d:(_={type:"element",tagName:"p",properties:{},children:[]},n.unshift(_)),_.children.length>0&&_.children.unshift({type:"text",value:" "}),_.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let i=-1;for(;++i1}function sLn(e,r){const t={},n=e.all(r);let s=-1;for(typeof r.start=="number"&&r.start!==1&&(t.start=r.start);++s0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},i=b6(r.children[1]),c=FB(r.children[r.children.length-1]);i&&c&&(a.position={start:i,end:c}),s.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(r,o),e.applyData(r,o)}function lLn(e,r,t){const n=t?t.children:void 0,o=(n?n.indexOf(r):1)===0?"th":"td",a=t&&t.type==="table"?t.align:void 0,i=a?a.length:r.children.length;let c=-1;const u=[];for(;++c0,!0),n[0]),s=n.index+n[0].length,n=t.exec(r);return o.push(CT(r.slice(s),s>0,!1)),o.join("")}function CT(e,r,t){let n=0,s=e.length;if(r){let o=e.codePointAt(n);for(;o===jT||o===ST;)n++,o=e.codePointAt(n)}if(t){let o=e.codePointAt(s-1);for(;o===jT||o===ST;)s--,o=e.codePointAt(s-1)}return s>n?e.slice(n,s):""}function fLn(e,r){const t={type:"text",value:_Ln(String(r.value))};return e.patch(r,t),e.applyData(r,t)}function dLn(e,r){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,t),e.applyData(r,t)}const hLn={blockquote:qDn,break:UDn,code:GDn,delete:WDn,emphasis:KDn,footnoteReference:VDn,heading:QDn,html:XDn,imageReference:YDn,image:ZDn,inlineCode:JDn,linkReference:eLn,link:tLn,listItem:rLn,list:sLn,paragraph:oLn,root:aLn,strong:iLn,table:cLn,tableCell:uLn,tableRow:lLn,text:fLn,thematicBreak:dLn,toml:t1,yaml:t1,definition:t1,footnoteDefinition:t1};function t1(){}const uF=-1,nx=0,Zm=1,Db=2,S6=3,C6=4,z6=5,E6=6,_F=7,fF=8,pLn=typeof self=="object"?self:globalThis,zT=(e,r)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new pLn[e](r)},mLn=(e,r)=>{const t=(s,o)=>(e.set(o,s),s),n=s=>{if(e.has(s))return e.get(s);const[o,a]=r[s];switch(o){case nx:case uF:return t(a,s);case Zm:{const i=t([],s);for(const c of a)i.push(n(c));return i}case Db:{const i=t({},s);for(const[c,u]of a)i[n(c)]=n(u);return i}case S6:return t(new Date(a),s);case C6:{const{source:i,flags:c}=a;return t(new RegExp(i,c),s)}case z6:{const i=t(new Map,s);for(const[c,u]of a)i.set(n(c),n(u));return i}case E6:{const i=t(new Set,s);for(const c of a)i.add(n(c));return i}case _F:{const{name:i,message:c}=a;return t(zT(i,c),s)}case fF:return t(BigInt(a),s);case"BigInt":return t(Object(BigInt(a)),s);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:i}=new Uint8Array(a);return t(new DataView(i),a)}}return t(zT(o,a),s)};return n},ET=e=>mLn(new Map,e)(0),hf="",{toString:gLn}={},{keys:vLn}=Object,zm=e=>{const r=typeof e;if(r!=="object"||!e)return[nx,r];const t=gLn.call(e).slice(8,-1);switch(t){case"Array":return[Zm,hf];case"Object":return[Db,hf];case"Date":return[S6,hf];case"RegExp":return[C6,hf];case"Map":return[z6,hf];case"Set":return[E6,hf];case"DataView":return[Zm,t]}return t.includes("Array")?[Zm,t]:t.includes("Error")?[_F,t]:[Db,t]},r1=([e,r])=>e===nx&&(r==="function"||r==="symbol"),bLn=(e,r,t,n)=>{const s=(a,i)=>{const c=n.push(a)-1;return t.set(i,c),c},o=a=>{if(t.has(a))return t.get(a);let[i,c]=zm(a);switch(i){case nx:{let d=a;switch(c){case"bigint":i=fF,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return s([uF],a)}return s([i,d],a)}case Zm:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const d=[],_=s([i,d],a);for(const p of a)d.push(o(p));return _}case Db:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(r&&"toJSON"in a)return o(a.toJSON());const d=[],_=s([i,d],a);for(const p of vLn(a))(e||!r1(zm(a[p])))&&d.push([o(p),o(a[p])]);return _}case S6:return s([i,isNaN(a.getTime())?hf:a.toISOString()],a);case C6:{const{source:d,flags:_}=a;return s([i,{source:d,flags:_}],a)}case z6:{const d=[],_=s([i,d],a);for(const[p,m]of a)(e||!(r1(zm(p))||r1(zm(m))))&&d.push([o(p),o(m)]);return _}case E6:{const d=[],_=s([i,d],a);for(const p of a)(e||!r1(zm(p)))&&d.push(o(p));return _}}const{message:u}=a;return s([i,{name:c,message:u}],a)};return o},NT=(e,{json:r,lossy:t}={})=>{const n=[];return bLn(!(r||t),!!r,new Map,n)(e),n},Lb=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?ET(NT(e,r)):structuredClone(e):(e,r)=>ET(NT(e,r));function yLn(e,r){const t=[{type:"text",value:"↩"}];return r>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),t}function xLn(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function wLn(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||yLn,n=e.options.footnoteBackLabel||xLn,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},i=[];let c=-1;for(;++c0&&k.push({type:"text",value:" "});let w=typeof t=="string"?t:t(c,m);typeof w=="string"&&(w={type:"text",value:w}),k.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(c,m),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const w=v.children[v.children.length-1];w&&w.type==="text"?w.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...k)}else d.push(...k);const b={type:"element",tagName:"li",properties:{id:r+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,b),i.push(b)}if(i.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Lb(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(r,u),e.applyData(r,u)}function nLn(e){let r=!1;if(e.type==="list"){r=e.spread||!1;const t=e.children;let n=-1;for(;!r&&++n1}function sLn(e,r){const t={},n=e.all(r);let s=-1;for(typeof r.start=="number"&&r.start!==1&&(t.start=r.start);++s0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},i=b6(r.children[1]),c=FB(r.children[r.children.length-1]);i&&c&&(a.position={start:i,end:c}),s.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(r,o),e.applyData(r,o)}function lLn(e,r,t){const n=t?t.children:void 0,o=(n?n.indexOf(r):1)===0?"th":"td",a=t&&t.type==="table"?t.align:void 0,i=a?a.length:r.children.length;let c=-1;const u=[];for(;++c0,!0),n[0]),s=n.index+n[0].length,n=t.exec(r);return o.push(CT(r.slice(s),s>0,!1)),o.join("")}function CT(e,r,t){let n=0,s=e.length;if(r){let o=e.codePointAt(n);for(;o===jT||o===ST;)n++,o=e.codePointAt(n)}if(t){let o=e.codePointAt(s-1);for(;o===jT||o===ST;)s--,o=e.codePointAt(s-1)}return s>n?e.slice(n,s):""}function fLn(e,r){const t={type:"text",value:_Ln(String(r.value))};return e.patch(r,t),e.applyData(r,t)}function dLn(e,r){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,t),e.applyData(r,t)}const hLn={blockquote:qDn,break:UDn,code:GDn,delete:WDn,emphasis:KDn,footnoteReference:VDn,heading:QDn,html:XDn,imageReference:YDn,image:ZDn,inlineCode:JDn,linkReference:eLn,link:tLn,listItem:rLn,list:sLn,paragraph:oLn,root:aLn,strong:iLn,table:cLn,tableCell:uLn,tableRow:lLn,text:fLn,thematicBreak:dLn,toml:t1,yaml:t1,definition:t1,footnoteDefinition:t1};function t1(){}const uF=-1,nx=0,Zm=1,Db=2,S6=3,C6=4,z6=5,E6=6,_F=7,fF=8,pLn=typeof self=="object"?self:globalThis,zT=(e,r)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new pLn[e](r)},mLn=(e,r)=>{const t=(s,o)=>(e.set(o,s),s),n=s=>{if(e.has(s))return e.get(s);const[o,a]=r[s];switch(o){case nx:case uF:return t(a,s);case Zm:{const i=t([],s);for(const c of a)i.push(n(c));return i}case Db:{const i=t({},s);for(const[c,u]of a)i[n(c)]=n(u);return i}case S6:return t(new Date(a),s);case C6:{const{source:i,flags:c}=a;return t(new RegExp(i,c),s)}case z6:{const i=t(new Map,s);for(const[c,u]of a)i.set(n(c),n(u));return i}case E6:{const i=t(new Set,s);for(const c of a)i.add(n(c));return i}case _F:{const{name:i,message:c}=a;return t(zT(i,c),s)}case fF:return t(BigInt(a),s);case"BigInt":return t(Object(BigInt(a)),s);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:i}=new Uint8Array(a);return t(new DataView(i),a)}}return t(zT(o,a),s)};return n},ET=e=>mLn(new Map,e)(0),hf="",{toString:gLn}={},{keys:vLn}=Object,zm=e=>{const r=typeof e;if(r!=="object"||!e)return[nx,r];const t=gLn.call(e).slice(8,-1);switch(t){case"Array":return[Zm,hf];case"Object":return[Db,hf];case"Date":return[S6,hf];case"RegExp":return[C6,hf];case"Map":return[z6,hf];case"Set":return[E6,hf];case"DataView":return[Zm,t]}return t.includes("Array")?[Zm,t]:t.includes("Error")?[_F,t]:[Db,t]},r1=([e,r])=>e===nx&&(r==="function"||r==="symbol"),bLn=(e,r,t,n)=>{const s=(a,i)=>{const c=n.push(a)-1;return t.set(i,c),c},o=a=>{if(t.has(a))return t.get(a);let[i,c]=zm(a);switch(i){case nx:{let d=a;switch(c){case"bigint":i=fF,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return s([uF],a)}return s([i,d],a)}case Zm:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const d=[],_=s([i,d],a);for(const p of a)d.push(o(p));return _}case Db:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(r&&"toJSON"in a)return o(a.toJSON());const d=[],_=s([i,d],a);for(const p of vLn(a))(e||!r1(zm(a[p])))&&d.push([o(p),o(a[p])]);return _}case S6:return s([i,isNaN(a.getTime())?hf:a.toISOString()],a);case C6:{const{source:d,flags:_}=a;return s([i,{source:d,flags:_}],a)}case z6:{const d=[],_=s([i,d],a);for(const[p,m]of a)(e||!(r1(zm(p))||r1(zm(m))))&&d.push([o(p),o(m)]);return _}case E6:{const d=[],_=s([i,d],a);for(const p of a)(e||!r1(zm(p)))&&d.push(o(p));return _}}const{message:u}=a;return s([i,{name:c,message:u}],a)};return o},NT=(e,{json:r,lossy:t}={})=>{const n=[];return bLn(!(r||t),!!r,new Map,n)(e),n},Lb=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?ET(NT(e,r)):structuredClone(e):(e,r)=>ET(NT(e,r));function yLn(e,r){const t=[{type:"text",value:"↩"}];return r>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),t}function xLn(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function wLn(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||yLn,n=e.options.footnoteBackLabel||xLn,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},i=[];let c=-1;for(;++c0&&k.push({type:"text",value:" "});let x=typeof t=="string"?t:t(c,m);typeof x=="string"&&(x={type:"text",value:x}),k.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(c,m),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const x=v.children[v.children.length-1];x&&x.type==="text"?x.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...k)}else d.push(...k);const b={type:"element",tagName:"li",properties:{id:r+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,b),i.push(b)}if(i.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Lb(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(i,!0)},{type:"text",value:` -`}]}}const w0=(function(e){if(e==null)return CLn;if(typeof e=="function")return sx(e);if(typeof e=="object")return Array.isArray(e)?kLn(e):jLn(e);if(typeof e=="string")return SLn(e);throw new Error("Expected function, string, or object as test")});function kLn(e){const r=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let m=dF,k,x,v;if((!r||o(c,u,d[d.length-1]||void 0))&&(m=NLn(t(c,d)),m[0]===s5))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==hF)for(x=(n?b.children.length:-1)+a,v=d.concat(b);x>-1&&x":""))+")"})}return p;function p(){let m=dF,k,w,v;if((!r||o(c,u,d[d.length-1]||void 0))&&(m=NLn(t(c,d)),m[0]===s5))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==hF)for(w=(n?b.children.length:-1)+a,v=d.concat(b);w>-1&&w0&&t.push({type:"text",value:` `}),t}function AT(e){let r=0,t=e.charCodeAt(r);for(;t===9||t===32;)r++,t=e.charCodeAt(r);return e.slice(r)}function TT(e,r){const t=TLn(e,r),n=t.one(e,void 0),s=wLn(t),o=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return s&&o.children.push({type:"text",value:` -`},s),o}function Ib(e,r){return e&&"run"in e?async function(t,n){const s=TT(t,{file:n,...r});await e.run(s,n)}:function(t,n){return TT(t,{file:n,...e||r})}}function RT(e){if(e)throw e}var sk,MT;function DLn(){if(MT)return sk;MT=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):r.call(u)==="[object Array]"},o=function(u){if(!u||r.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),_=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!_)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,d){t&&d.name==="__proto__"?t(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},i=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(n)return n(u,d).value}else return;return u[d]};return sk=function c(){var u,d,_,p,m,k,x=arguments[0],v=1,b=arguments.length,w=!1;for(typeof x=="boolean"&&(w=x,x=arguments[1]||{},v=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});va.length;let c;i&&a.push(s);try{c=e.apply(this,a)}catch(u){const d=u;if(i&&t)throw d;return s(d)}i||(c&&c.then&&typeof c.then=="function"?c.then(o,s):c instanceof Error?s(c):o(c))}function s(a,...i){t||(t=!0,r(a,...i))}function o(a){s(null,a)}}const Ec={basename:BLn,dirname:FLn,extname:HLn,join:qLn,sep:"/"};function BLn(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');k0(e);let t=0,n=-1,s=e.length,o;if(r===void 0||r.length===0||r.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){t=s+1;break}}else n<0&&(o=!0,n=s+1);return n<0?"":e.slice(t,n)}if(r===e)return"";let a=-1,i=r.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){t=s+1;break}}else a<0&&(o=!0,a=s+1),i>-1&&(e.codePointAt(s)===r.codePointAt(i--)?i<0&&(n=s):(i=-1,n=a));return t===n?n=a:n<0&&(n=e.length),e.slice(t,n)}function FLn(e){if(k0(e),e.length===0)return".";let r=-1,t=e.length,n;for(;--t;)if(e.codePointAt(t)===47){if(n){r=t;break}}else n||(n=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function HLn(e){k0(e);let r=e.length,t=-1,n=0,s=-1,o=0,a;for(;r--;){const i=e.codePointAt(r);if(i===47){if(a){n=r+1;break}continue}t<0&&(a=!0,t=r+1),i===46?s<0?s=r:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||t<0||o===0||o===1&&s===t-1&&s===n+1?"":e.slice(s,t)}function qLn(...e){let r=-1,t;for(;++r0&&e.codePointAt(e.length-1)===47&&(t+="/"),r?"/"+t:t}function GLn(e,r){let t="",n=0,s=-1,o=0,a=-1,i,c;for(;++a<=e.length;){if(a2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",n=0):(t=t.slice(0,c),n=t.length-1-t.lastIndexOf("/")),s=a,o=0;continue}}else if(t.length>0){t="",n=0,s=a,o=0;continue}}r&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+e.slice(s+1,a):t=e.slice(s+1,a),n=a-s-1;s=a,o=0}else i===46&&o>-1?o++:o=-1}return t}function k0(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const WLn={cwd:KLn};function KLn(){return"/"}function i5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function VLn(e){if(typeof e=="string")e=new URL(e);else if(!i5(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return QLn(e)}function QLn(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const r=e.pathname;let t=-1;for(;++t0){let[m,...k]=d;const x=n[p][1];a5(x)&&a5(m)&&(m=ok(!0,x,m)),n[p]=[u,m,...k]}}}}const ox=new T6().freeze();function lk(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uk(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _k(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $T(e){if(!a5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function DT(e,r,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function n1(e){return JLn(e)?e:new pF(e)}function JLn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eIn(e){return typeof e=="string"||tIn(e)}function tIn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rIn="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",LT=[],IT={allowDangerousHtml:!0},nIn=/^(https?|ircs?|mailto|xmpp)$/i,sIn=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function oIn(e){const r=aIn(e),t=iIn(e);return cIn(r.runSync(r.parse(t),t),e)}function aIn(e){const r=e.rehypePlugins||LT,t=e.remarkPlugins||LT,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...IT}:IT;return ox().use(rx).use(t).use(Ib,n).use(r)}function iIn(e){const r=e.children||"",t=new pF;return typeof r=="string"&&(t.value=r),t}function cIn(e,r){const t=r.allowedElements,n=r.allowElement,s=r.components,o=r.disallowedElements,a=r.skipHtml,i=r.unwrapDisallowed,c=r.urlTransform||mF;for(const d of sIn)Object.hasOwn(r,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+rIn+d.id,void 0);return A6(e,u),UB(e,{Fragment:f.Fragment,components:s,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(d,_,p){if(d.type==="raw"&&p&&typeof _=="number")return a?p.children.splice(_,1):p.children[_]={type:"text",value:d.value},_;if(d.type==="element"){let m;for(m in tk)if(Object.hasOwn(tk,m)&&Object.hasOwn(d.properties,m)){const k=d.properties[m],x=tk[m];(x===null||x.includes(d.tagName))&&(d.properties[m]=c(String(k||""),m,d))}}if(d.type==="element"){let m=t?!t.includes(d.tagName):o?o.includes(d.tagName):!1;if(!m&&n&&typeof _=="number"&&(m=!n(d,_,p)),m&&p&&typeof _=="number")return i&&d.children?p.children.splice(_,1,...d.children):p.children.splice(_,1),_}}}function mF(e){const r=e.indexOf(":"),t=e.indexOf("?"),n=e.indexOf("#"),s=e.indexOf("/");return r===-1||s!==-1&&r>s||t!==-1&&r>t||n!==-1&&r>n||nIn.test(e.slice(0,r))?e:""}function ax(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function Pb(e,r,t=!1){const n=r.indexOf("#"),s=n===-1?r:r.slice(0,n),o=n===-1?"":r.slice(n),a=s.indexOf("?"),i=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1);let u;try{u=decodeURIComponent(i)}catch{return null}if(!u||u.includes("\0"))return null;const d=u.startsWith("/"),_=d?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(_.length===0)return null;_.pop();continue}_.push(p)}return _.length===0?null:{path:`${t&&(d||e.startsWith("/"))?"/":""}${_.join("/")}`,query:c,hash:o}}function gF(e){return e.replace(/[%#?:]/g,encodeURIComponent)}function lIn(e,r){let t;try{t=decodeURIComponent(e.replaceAll("\\","/").split("/").slice(0,-1).join("/"))}catch{return null}const n=Pb(t,r,!0);return n?gF(n.path)+n.hash:null}function uIn(e,r){if(r)return r(e);try{return decodeURI(e)}catch{return null}}function _In(e,r){return`${e}${r.query?`&${r.query}`:""}${r.hash}`}function c5(e){const r=/^(.+?)(?::(\d+)(?:[:-]\d+)?|#L(\d+)(?:C\d+)?(?:-L?\d+(?:C\d+)?)?)$/.exec(e);if(!r)return{path:e};const t=Number(r[2]??r[3]);return t>0?{path:r[1],line:t}:{path:r[1]}}function fIn(e){const r=Number.parseInt(e.replace(/^L/i,""),10);return r>0?r:void 0}function Bb(e){return/^[a-z]:[\\/]/i.test(e)}function l5(e){const r=Bb(e);if(!r&&ax(e))return null;const t=Pb("",r?e.replaceAll("\\","/"):e,!0);if(!t)return null;const n={path:t.path,hash:t.hash};return Bb(n.path)?{...n,path:n.path.replaceAll("\\","/"),source:"absolute"}:n.path.startsWith("/")||n.path.startsWith("~/")||r?{...n,source:"absolute"}:n.path.startsWith("artifacts/")?{...n,path:n.path.slice(10),source:"artifact"}:{...n,source:"checkout"}}function dIn(){return e=>{const r=t=>{var n;for(const s of["href","src"])if(t.properties&&Object.hasOwn(t.properties,s)){const o=String(t.properties[s]||"");s==="href"&&c5(o).line!=null&&(t.properties["data-cited-href"]=o),t.properties[s]=s==="src"&&t.tagName==="img"&&Bb(o)?o:mF(o)}(n=t.children)==null||n.forEach(r)};r(e)}}function hIn({projects:e,activity:r,projectId:t,projectName:n,onSelect:s,onNewProject:o}){const{open:a,setOpen:i,ref:c}=ba(),u=new Map(r.map(_=>[_.projectId,_.lastActivityAt])),d=[...e].sort((_,p)=>+(p.id===t)-+(_.id===t)||Math.max(u.get(p.id)??0,p.updatedAt)-Math.max(u.get(_.id)??0,_.updatedAt));return f.jsxs("div",{ref:c,className:"relative mb-2 w-fit max-w-full",children:[f.jsxs(Oe,{className:"max-w-full gap-2 rounded-lg px-3 text-sm font-normal text-text","aria-haspopup":"menu","aria-expanded":a,onClick:()=>i(_=>!_),children:[f.jsx(Ci,{size:15,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:n}),f.jsx(Zc,{size:12,className:"shrink-0 text-subtext"})]}),a&&f.jsxs("div",{role:"menu","aria-label":Kj(),className:"absolute bottom-full start-0 z-50 mb-2 w-64 max-w-[calc(100vw-2rem)] rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsx("div",{className:"px-2 py-1 text-sm text-subtext",children:CD()}),f.jsx("div",{className:"max-h-64 overflow-y-auto pb-1.5",children:d.map(_=>f.jsxs(_r,{role:"menuitemradio","aria-checked":_.id===t,size:"compact",className:"text-sm",onClick:()=>{i(!1),s(_.id)},children:[f.jsx("span",{className:"truncate",children:_.name}),_.id===t&&f.jsx(_o,{size:13,className:"shrink-0"})]},_.id))}),f.jsx("div",{className:"mb-1 border-t border-border"}),f.jsx(_r,{role:"menuitem",size:"compact",className:"text-sm",onClick:()=>{i(!1),o()},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(pd,{size:14}),pb()]})})]})]})}function vF(e){const r=e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo);return`${qnr({name:e.name})} +`},s),o}function Ib(e,r){return e&&"run"in e?async function(t,n){const s=TT(t,{file:n,...r});await e.run(s,n)}:function(t,n){return TT(t,{file:n,...e||r})}}function RT(e){if(e)throw e}var sk,MT;function DLn(){if(MT)return sk;MT=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):r.call(u)==="[object Array]"},o=function(u){if(!u||r.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),_=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!_)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,d){t&&d.name==="__proto__"?t(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},i=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(n)return n(u,d).value}else return;return u[d]};return sk=function c(){var u,d,_,p,m,k,w=arguments[0],v=1,b=arguments.length,x=!1;for(typeof w=="boolean"&&(x=w,w=arguments[1]||{},v=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});va.length;let c;i&&a.push(s);try{c=e.apply(this,a)}catch(u){const d=u;if(i&&t)throw d;return s(d)}i||(c&&c.then&&typeof c.then=="function"?c.then(o,s):c instanceof Error?s(c):o(c))}function s(a,...i){t||(t=!0,r(a,...i))}function o(a){s(null,a)}}const Ec={basename:BLn,dirname:FLn,extname:HLn,join:qLn,sep:"/"};function BLn(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');k0(e);let t=0,n=-1,s=e.length,o;if(r===void 0||r.length===0||r.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){t=s+1;break}}else n<0&&(o=!0,n=s+1);return n<0?"":e.slice(t,n)}if(r===e)return"";let a=-1,i=r.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){t=s+1;break}}else a<0&&(o=!0,a=s+1),i>-1&&(e.codePointAt(s)===r.codePointAt(i--)?i<0&&(n=s):(i=-1,n=a));return t===n?n=a:n<0&&(n=e.length),e.slice(t,n)}function FLn(e){if(k0(e),e.length===0)return".";let r=-1,t=e.length,n;for(;--t;)if(e.codePointAt(t)===47){if(n){r=t;break}}else n||(n=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function HLn(e){k0(e);let r=e.length,t=-1,n=0,s=-1,o=0,a;for(;r--;){const i=e.codePointAt(r);if(i===47){if(a){n=r+1;break}continue}t<0&&(a=!0,t=r+1),i===46?s<0?s=r:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||t<0||o===0||o===1&&s===t-1&&s===n+1?"":e.slice(s,t)}function qLn(...e){let r=-1,t;for(;++r0&&e.codePointAt(e.length-1)===47&&(t+="/"),r?"/"+t:t}function GLn(e,r){let t="",n=0,s=-1,o=0,a=-1,i,c;for(;++a<=e.length;){if(a2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",n=0):(t=t.slice(0,c),n=t.length-1-t.lastIndexOf("/")),s=a,o=0;continue}}else if(t.length>0){t="",n=0,s=a,o=0;continue}}r&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+e.slice(s+1,a):t=e.slice(s+1,a),n=a-s-1;s=a,o=0}else i===46&&o>-1?o++:o=-1}return t}function k0(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const WLn={cwd:KLn};function KLn(){return"/"}function i5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function VLn(e){if(typeof e=="string")e=new URL(e);else if(!i5(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return QLn(e)}function QLn(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const r=e.pathname;let t=-1;for(;++t0){let[m,...k]=d;const w=n[p][1];a5(w)&&a5(m)&&(m=ok(!0,w,m)),n[p]=[u,m,...k]}}}}const ox=new T6().freeze();function lk(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uk(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _k(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $T(e){if(!a5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function DT(e,r,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function n1(e){return JLn(e)?e:new pF(e)}function JLn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eIn(e){return typeof e=="string"||tIn(e)}function tIn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rIn="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",LT=[],IT={allowDangerousHtml:!0},nIn=/^(https?|ircs?|mailto|xmpp)$/i,sIn=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function oIn(e){const r=aIn(e),t=iIn(e);return cIn(r.runSync(r.parse(t),t),e)}function aIn(e){const r=e.rehypePlugins||LT,t=e.remarkPlugins||LT,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...IT}:IT;return ox().use(rx).use(t).use(Ib,n).use(r)}function iIn(e){const r=e.children||"",t=new pF;return typeof r=="string"&&(t.value=r),t}function cIn(e,r){const t=r.allowedElements,n=r.allowElement,s=r.components,o=r.disallowedElements,a=r.skipHtml,i=r.unwrapDisallowed,c=r.urlTransform||mF;for(const d of sIn)Object.hasOwn(r,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+rIn+d.id,void 0);return A6(e,u),UB(e,{Fragment:f.Fragment,components:s,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(d,_,p){if(d.type==="raw"&&p&&typeof _=="number")return a?p.children.splice(_,1):p.children[_]={type:"text",value:d.value},_;if(d.type==="element"){let m;for(m in tk)if(Object.hasOwn(tk,m)&&Object.hasOwn(d.properties,m)){const k=d.properties[m],w=tk[m];(w===null||w.includes(d.tagName))&&(d.properties[m]=c(String(k||""),m,d))}}if(d.type==="element"){let m=t?!t.includes(d.tagName):o?o.includes(d.tagName):!1;if(!m&&n&&typeof _=="number"&&(m=!n(d,_,p)),m&&p&&typeof _=="number")return i&&d.children?p.children.splice(_,1,...d.children):p.children.splice(_,1),_}}}function mF(e){const r=e.indexOf(":"),t=e.indexOf("?"),n=e.indexOf("#"),s=e.indexOf("/");return r===-1||s!==-1&&r>s||t!==-1&&r>t||n!==-1&&r>n||nIn.test(e.slice(0,r))?e:""}function ax(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function Pb(e,r,t=!1){const n=r.indexOf("#"),s=n===-1?r:r.slice(0,n),o=n===-1?"":r.slice(n),a=s.indexOf("?"),i=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1);let u;try{u=decodeURIComponent(i)}catch{return null}if(!u||u.includes("\0"))return null;const d=u.startsWith("/"),_=d?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(_.length===0)return null;_.pop();continue}_.push(p)}return _.length===0?null:{path:`${t&&(d||e.startsWith("/"))?"/":""}${_.join("/")}`,query:c,hash:o}}function gF(e){return e.replace(/[%#?:]/g,encodeURIComponent)}function lIn(e,r){let t;try{t=decodeURIComponent(e.replaceAll("\\","/").split("/").slice(0,-1).join("/"))}catch{return null}const n=Pb(t,r,!0);return n?gF(n.path)+n.hash:null}function uIn(e,r){if(r)return r(e);try{return decodeURI(e)}catch{return null}}function _In(e,r){return`${e}${r.query?`&${r.query}`:""}${r.hash}`}function c5(e){const r=/^(.+?)(?::(\d+)(?:[:-]\d+)?|#L(\d+)(?:C\d+)?(?:-L?\d+(?:C\d+)?)?)$/.exec(e);if(!r)return{path:e};const t=Number(r[2]??r[3]);return t>0?{path:r[1],line:t}:{path:r[1]}}function fIn(e){const r=Number.parseInt(e.replace(/^L/i,""),10);return r>0?r:void 0}function Bb(e){return/^[a-z]:[\\/]/i.test(e)}function l5(e){const r=Bb(e);if(!r&&ax(e))return null;const t=Pb("",r?e.replaceAll("\\","/"):e,!0);if(!t)return null;const n={path:t.path,hash:t.hash};return Bb(n.path)?{...n,path:n.path.replaceAll("\\","/"),source:"absolute"}:n.path.startsWith("/")||n.path.startsWith("~/")||r?{...n,source:"absolute"}:n.path.startsWith("artifacts/")?{...n,path:n.path.slice(10),source:"artifact"}:{...n,source:"checkout"}}function dIn(){return e=>{const r=t=>{var n;for(const s of["href","src"])if(t.properties&&Object.hasOwn(t.properties,s)){const o=String(t.properties[s]||"");s==="href"&&c5(o).line!=null&&(t.properties["data-cited-href"]=o),t.properties[s]=s==="src"&&t.tagName==="img"&&Bb(o)?o:mF(o)}(n=t.children)==null||n.forEach(r)};r(e)}}function hIn({projects:e,activity:r,projectId:t,projectName:n,onSelect:s,onNewProject:o}){const{open:a,setOpen:i,ref:c}=ba(),u=new Map(r.map(_=>[_.projectId,_.lastActivityAt])),d=[...e].sort((_,p)=>+(p.id===t)-+(_.id===t)||Math.max(u.get(p.id)??0,p.updatedAt)-Math.max(u.get(_.id)??0,_.updatedAt));return f.jsxs("div",{ref:c,className:"relative mb-2 w-fit max-w-full",children:[f.jsxs(Oe,{className:"max-w-full gap-2 rounded-lg px-3 text-sm font-normal text-text","aria-haspopup":"menu","aria-expanded":a,onClick:()=>i(_=>!_),children:[f.jsx(Ci,{size:15,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:n}),f.jsx(Zc,{size:12,className:"shrink-0 text-subtext"})]}),a&&f.jsxs("div",{role:"menu","aria-label":Kj(),className:"absolute bottom-full start-0 z-50 mb-2 w-64 max-w-[calc(100vw-2rem)] rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsx("div",{className:"px-2 py-1 text-sm text-subtext",children:CD()}),f.jsx("div",{className:"max-h-64 overflow-y-auto pb-1.5",children:d.map(_=>f.jsxs(_r,{role:"menuitemradio","aria-checked":_.id===t,size:"compact",className:"text-sm",onClick:()=>{i(!1),s(_.id)},children:[f.jsx("span",{className:"truncate",children:_.name}),_.id===t&&f.jsx(_o,{size:13,className:"shrink-0"})]},_.id))}),f.jsx("div",{className:"mb-1 border-t border-border"}),f.jsx(_r,{role:"menuitem",size:"compact",className:"text-sm",onClick:()=>{i(!1),o()},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(pd,{size:14}),pb()]})})]})]})}function vF(e){const r=e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo);return`${qnr({name:e.name})} -${r?vsr():Esr()}`}function pIn({project:e,chatCount:r,collapsed:t,busy:n,onToggleCollapsed:s,onRemoved:o,onNewChat:a,pinned:i,onPin:c}){const u=T.useRef(null),d=T.useRef(null),_=T.useId(),[p,m]=T.useState(!1),[k,x]=T.useState(!1),[v,b]=T.useState(!1);T.useEffect(()=>{const z=N=>{var A,E;N.target instanceof Node&&((A=d.current)!=null&&A.contains(N.target))||(E=d.current)==null||E.hidePopover()};return window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[]);function w(z,N){if(!z||!N)return;z.showPopover();const A=N.getBoundingClientRect(),E=z.getBoundingClientRect(),M=A.right+12+E.width<=window.innerWidth-8?A.right+12:Math.max(8,A.left-E.width-12);z.style.left=`${M}px`,z.style.top=`${Math.max(8,Math.min(A.top,window.innerHeight-E.height-8))}px`}function y(){var z;(z=d.current)==null||z.hidePopover(),x(!0)}async function S(){var z;if((z=d.current)==null||z.hidePopover(),!(v||!window.confirm(vF(e)))){b(!0);try{await BL(e.id),o()}catch(N){tr(N instanceof Error?N.message:String(N),"error")}finally{b(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button","aria-expanded":!t,onClick:s,className:"flex h-7 min-w-0 flex-1 cursor-pointer items-center gap-[7px] rounded-sm py-1 text-start text-sm font-normal text-text focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2",children:[t?f.jsx(FI,{size:15,className:"shrink-0"}):f.jsx(Ci,{size:15,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:e.name}),n&&f.jsx("span",{"aria-hidden":!0,className:"size-[7px] shrink-0 rounded-full bg-primary animate-[or-pulse_1.2s_infinite]"})]}),f.jsx(Rt,{ref:u,size:"small",className:`text-text group-hover:opacity-100 group-focus-within:opacity-100 ${p?"bg-surface opacity-100":"opacity-0"}`,"aria-label":Snn({name:e.name}),"aria-controls":_,"aria-haspopup":"menu","aria-expanded":p,onClick:()=>{var z,N,A;(z=d.current)!=null&&z.matches(":popover-open")?d.current.hidePopover():(w(d.current,u.current),(A=(N=d.current)==null?void 0:N.querySelector("button"))==null||A.focus())},children:f.jsx(wp,{size:15})}),f.jsx(d0,{interactive:!0,content:W4(),className:"rounded-sm",children:f.jsx(Rt,{size:"small",className:"text-text opacity-0 group-hover:opacity-100 group-focus-within:opacity-100","aria-label":`${W4()} · ${e.name}`,onClick:a,children:f.jsx(pd,{size:15})})}),f.jsxs("div",{ref:d,id:_,popover:"auto",role:"menu","aria-label":e.name,onToggle:z=>m(z.newState==="open"),onKeyDown:z=>{var E;if(z.key!=="ArrowDown"&&z.key!=="ArrowUp")return;z.preventDefault();const N=[...z.currentTarget.querySelectorAll("button:not(:disabled)")],A=N.findIndex(M=>M===document.activeElement);(E=N[(A+(z.key==="ArrowDown"?1:N.length-1))%N.length])==null||E.focus()},className:"fixed inset-auto m-0 w-72 max-w-[calc(100vw-1rem)] rounded-xl border border-border bg-background p-2 text-text shadow-modal",children:[f.jsxs("div",{role:"presentation",className:"mb-1 border-b border-border px-2 pb-2 pt-1 text-sm",children:[f.jsx("div",{className:"truncate font-medium",children:e.name}),f.jsxs("div",{className:"mt-1 flex items-center gap-1.5 text-subtext",children:[f.jsx(T9n,{size:13}),r===void 0?"…":pnn({count:r})]}),f.jsx("div",{className:"mt-2 break-all text-xs text-subtext",children:e.repoPath})]}),f.jsx(_r,{role:"menuitem",onClick:()=>{var z;c(),(z=d.current)==null||z.hidePopover()},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Q9n,{size:16}),i?tsn():onn()]})}),f.jsx(_r,{role:"menuitem",onClick:y,children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Ey,{size:16}),hD()]})}),f.jsx(_r,{role:"menuitem",onClick:()=>{var z;(z=d.current)==null||z.hidePopover(),qL(e.id,".").catch(N=>tr(N instanceof Error?N.message:String(N),"error"))},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Ci,{size:16}),$nn()]})}),f.jsx("div",{className:"my-1 border-t border-border"}),f.jsx(_r,{role:"menuitem",danger:!0,disabled:v,onClick:()=>void S(),children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(gd,{size:16}),YD()]})})]}),k&&Vs.createPortal(f.jsx(mIn,{project:e,onClose:()=>x(!1),onRemoved:o}),document.body)]})}function mIn({project:e,onClose:r,onRemoved:t}){const n=T.useRef(null),s=T.useId(),o=T.useId(),[a,i]=T.useState(e.name),[c,u]=T.useState(!1),[d,_]=T.useState(""),p=()=>{c||r()};xp(n,p);async function m(){if(!(c||!a.trim())){u(!0),_("");try{await iSn(e.id,{name:a.trim()}),r()}catch(x){_(x instanceof Error?x.message:String(x))}finally{u(!1)}}}async function k(){if(!(c||!window.confirm(vF(e)))){u(!0),_("");try{await BL(e.id),r(),t()}catch(x){_(x instanceof Error?x.message:String(x))}finally{u(!1)}}}return f.jsx("div",{className:"modal-backdrop fixed inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-5",onClick:x=>{x.target===x.currentTarget&&p()},children:f.jsxs("div",{ref:n,role:"dialog","aria-modal":"true","aria-labelledby":s,tabIndex:-1,className:"modal w-120 max-w-full max-h-[calc(100vh-2.5rem)] overflow-y-auto rounded-xl border border-border bg-background p-6 text-text shadow-modal",children:[f.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[f.jsx("h2",{id:s,className:"m-0 text-xl font-medium",children:brn()}),f.jsx(Rt,{"aria-label":vb(),onClick:p,disabled:c,children:f.jsx(pn,{size:16})})]}),f.jsxs("form",{onSubmit:x=>{x.preventDefault(),m()},children:[f.jsx("label",{htmlFor:o,className:"sr-only",children:Z4()}),f.jsxs("div",{className:"relative",children:[f.jsx(Ci,{size:16,className:"pointer-events-none absolute start-3 top-3 text-subtext"}),f.jsx(Nn,{id:o,"data-initial-focus":!0,value:a,onChange:x=>i(x.target.value),disabled:c,required:!0,className:"h-10 ps-10"})]}),f.jsx("div",{className:"mt-5 mb-2 text-sm font-medium",children:Gnn()}),f.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border p-3 text-sm",children:[f.jsx(Ci,{size:16,className:"mt-0.5 shrink-0 text-subtext"}),f.jsx("span",{className:"min-w-0 break-all",children:e.repoPath})]}),d&&f.jsx("p",{role:"alert",className:"mt-3 text-sm text-accent-red",children:d}),f.jsxs("div",{className:"mt-6 flex items-center gap-2",children:[f.jsx(Oe,{type:"button",variant:"danger",disabled:c,onClick:()=>void k(),children:YD()}),f.jsx("div",{className:"flex-1"}),f.jsx(Oe,{type:"button",variant:"ghost",disabled:c,onClick:p,children:Jnr()}),f.jsx(Oe,{type:"submit",variant:"primary",disabled:c||!a.trim(),children:nc()})]})]})]})})}const Jm=e=>e.kind==="project"?36:34;function PT(e,r,t){const n=e.find(i=>i.kind==="chat"&&i.session.id===t),s=n&&e.find(i=>i.kind==="project"&&i.project.id===n.project.id),o=(i,c)=>{const u=[];let d=0;for(const p of i){if(d+Jm(p)>c)break;u.push(p),d+=Jm(p)}const _=u.at(-1);return(_==null?void 0:_.kind)==="project"&&!_.collapsed&&u.pop(),u},a=o(e,r);return!n||a.includes(n)?a:s?r<70?a:[...o(e.filter(i=>i.project.id!==n.project.id),r-70),s,n]:r<34?a:[...o(e.filter(i=>i!==n),r-34),n]}function gIn(e,r,t){const n=new Array(e);return new Proxy(n,{get(s,o,a){if(typeof o=="string"){const i=o.charCodeAt(0);if(i>=48&&i<=57){const c=+o;if(Number.isInteger(c)&&c>=0&&cn[d]!==u))&&(n=i,s=r(...i),t!=null&&t.onChange&&!(o&&t.skipInitialOnChange)&&t.onChange(s),o=!1),s}return a.updateDeps=i=>{n=i},a}function BT(e,r){if(e===void 0)throw new Error("Unexpected undefined");return e}const vIn=(e,r)=>Math.abs(e-r)<1.01,bIn=(e,r,t)=>{let n;return Object.assign(function(...s){e.clearTimeout(n),n=e.setTimeout(()=>r.apply(this,s),t)},{cancel:()=>{e.clearTimeout(n)}})};let Em;const fk=()=>{if(Em!==void 0)return Em;if(typeof navigator>"u")return Em=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Em=!0;const e=navigator.maxTouchPoints;return Em=navigator.platform==="MacIntel"&&e!==void 0&&e>0},FT=e=>{const{offsetWidth:r,offsetHeight:t}=e;return{width:r,height:t}},yIn=e=>e,R6=e=>{const r=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-r+1,s=new Array(n);for(let o=0;o{const t=e.scrollElement;if(!t)return;const n=e.targetWindow;if(!n)return;const s=a=>{const{width:i,height:c}=a;r({width:Math.round(i),height:Math.round(c)})};if(s(FT(t)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const i=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(FT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return o.observe(t,{box:"border-box"}),()=>{o.unobserve(t)}},Fb={passive:!0},wIn=typeof window>"u"?!0:"onscrollend"in window,kIn=(e,r,t)=>{const n=e.scrollElement;if(!n)return;const s=e.targetWindow;if(!s)return;const o=e.options.useScrollendEvent&&wIn;let a=0;const i=o?null:bIn(s,()=>r(a,!1),e.options.isScrollingResetDelay),c=_=>()=>{a=t(n),i==null||i(),r(a,_)},u=c(!0),d=c(!1);return n.addEventListener("scroll",u,Fb),o&&n.addEventListener("scrollend",d,Fb),()=>{n.removeEventListener("scroll",u),o&&n.removeEventListener("scrollend",d),i==null||i.cancel()}},jIn=(e,r)=>kIn(e,r,t=>{const{horizontal:n,isRtl:s}=e.options;return n?t.scrollLeft*(s&&-1||1):t.scrollTop}),SIn=(e,r,t)=>{if(t.options.useCachedMeasurements){const n=t.indexFromElement(e),s=t.options.getItemKey(n);return t.itemSizeCache.get(s)??t.options.estimateSize(n)}if(r!=null&&r.borderBoxSize){const n=r.borderBoxSize[0];if(n)return Math.round(n[t.options.horizontal?"inlineSize":"blockSize"])}if(!r){const n=t.indexFromElement(e),s=t.options.getItemKey(n),o=t.itemSizeCache.get(s);if(o!==void 0)return o}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},CIn=(e,{adjustments:r=0,behavior:t},n)=>{var s,o;(o=(s=n.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[n.options.horizontal?"left":"top"]:e+r,behavior:t})},zIn=CIn;class EIn{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,n,s;return((s=(n=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:n.now)==null?void 0:s.call(n))??Date.now()},this.observer=(()=>{let t=null;const n=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const a=()=>{const i=o.target,c=this.indexFromElement(i);if(!i.isConnected){this.observer.unobserve(i);for(const[u,d]of this.elementsCache)if(d===i){this.elementsCache.delete(u);break}return}this.isIndexInRange(c)&&this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(i,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var s;(s=n())==null||s.disconnect(),t=null},observe:s=>{var o;return(o=n())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=n())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var n,s;const o={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:yIn,rangeExtractor:R6,onChange:()=>{},measureElement:SIn,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const p in t){const m=t[p];m!==void 0&&(o[p]=m)}const a=this.options;let i=null,c=null,u=!1;if(a!==void 0&&a.enabled&&o.enabled&&o.anchorTo==="end"&&this.scrollElement!==null){const p=a.count,m=o.count,k=this.getMeasurements(),x=p>0?((n=k[0])==null?void 0:n.key)??a.getItemKey(0):null,v=p>0?((s=k[p-1])==null?void 0:s.key)??a.getItemKey(p-1):null;if(m!==p||p>0&&m>0&&(o.getItemKey(0)!==x||o.getItemKey(m-1)!==v)){u=!0;const y=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??k[0]:null;y&&(i=[y.key,this.getScrollOffset()-y.start]);const S=o.followOnAppend===!0?"auto":o.followOnAppend||null;S&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||o.getItemKey(m-1)!==v)&&(c=S)}}this.options=o,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let d=!1,_=0;if(i&&this.scrollOffset!==null){const[p,m]=i,k=this.getMeasurements(),{count:x,getItemKey:v}=this.options;let b=0;for(;b{var n,s;(s=(n=this.options).onChange)==null||s.call(n,this,t)},this.maybeNotify=oh(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}if(this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{if(a&&this._intendedScrollOffset===null&&o===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(o-this._intendedScrollOffset)<1.5&&(o=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(o-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const i=this.getScrollOffset();this.scrollDirection=a?i===o?this.scrollDirection:i{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},i=()=>{this._iosTouching=!1,!(!fk()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};o.addEventListener("touchstart",a,Fb),o.addEventListener("touchend",i,Fb),this.unsubs.push(()=>{o.removeEventListener("touchstart",a),o.removeEventListener("touchend",i),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[o,a,i,c]=s;o!==null&&!i&&(fk()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),i&&this.scrollToEnd({behavior:i})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:n}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>n+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),n=this.getMaxScrollOffset();if(t<0||t>n)return;if(this._iosDeferredAdjustment<0&&t>=n-1){this._iosDeferredAdjustment=0;return}const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=oh(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,n,s,o,a,i,c,u)=>(this.prevLanes!==void 0&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:t,paddingStart:n,scrollMargin:s,getItemKey:o,enabled:a,lanes:i,laneAssignmentMode:c,gap:u}),{key:!1}),this.isIndexInRange=t=>t>=0&&t[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:n,scrollMargin:s,getItemKey:o,enabled:a,lanes:i,laneAssignmentMode:c,gap:u},d)=>{const _=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const p=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),i===1){const b=t*2;let w=this._flatMeasurements;if(!w||w.length0&&z.set(w.subarray(0,p*2)),w=z,this._flatMeasurements=w}let y;if(p===0)y=n+s;else{const z=p-1;y=w[z*2]+w[z*2+1]+u}for(let z=p;z1){S=y;const $=k[S],D=$!==void 0?m[$]:void 0;z=D?D.end+u:n+s}else if(v===i){let $=0,D=x[0],I=k[0];for(let G=1;Gthis.options.debug}),this.calculateRange=oh(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,n,s,o)=>t.length===0||n===0?(this.range=null,null):(this.range=AIn(t,n,s,o,o===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=oh(()=>{let t=null,n=null;const s=this.calculateRange();return s&&(t=s.startIndex,n=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,n]},(t,n,s,o,a)=>o===null||a===null?[]:t({startIndex:o,endIndex:a,overscan:n,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const n=this.options.indexAttribute,s=t.getAttribute(n);return s?parseInt(s,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(s!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,s-o),i=Math.min(this.options.count-1,s+o);return t>=a&&t<=i}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((a,i)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(i))});return}const n=this.indexFromElement(t);if(!this.isIndexInRange(n))return;const s=this.options.getItemKey(n),o=this.elementsCache.get(s);o!==t&&(o&&this.observer.unobserve(o),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,n)=>{var s,o;if(!this.isIndexInRange(t))return;let a,i,c;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)c=this.options.getItemKey(t),i=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;c=p.key,i=p.start,a=p.size}const d=this.itemSizeCache.get(c)??a,_=n-d;if(_!==0){const p=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=p?this.getTotalSize():0,k=this.getScrollOffset()+this.scrollAdjustments,v=!this.itemSizeCache.has(c)?i[this.getVirtualIndexes(),this.getMeasurements()],(t,n)=>{const s=[];for(let o=0,a=t.length;othis.options.debug}),this.getVirtualItemForOffset=t=>{const n=this.getMeasurements();if(n.length===0)return;const s=this._flatMeasurements,o=this.options.lanes===1&&s!=null,a=bF(0,n.length-1,o?i=>s[i*2]:i=>BT(n[i]).start,t);return BT(n[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,n,s=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=t>=a+o?"end":"start"),n==="center"?t+=(s-o)/2:n==="end"&&(t-=o);const i=this.getMaxScrollOffset();return Math.max(Math.min(i,t),0)},this.getOffsetForIndex=(t,n="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[t];if(!a)return;if(n==="auto")if(a.end>=o+s-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),n];const i=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,n,a.size),n]},this.scrollToOffset=(t,{align:n="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;const o=this.getOffsetForAlignment(t,n),a=this.now();this.scrollState={index:null,align:n,behavior:s,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:n="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getOffsetForIndex(t,n);if(!o)return;const[a,i]=o,c=this.now();this.scrollState={index:t,align:i,behavior:s,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:n="auto"}={})=>{const s=this.getScrollOffset()+t,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const n=this.getMeasurements();let s;if(n.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const o=n.length-1,a=this._flatMeasurements;a!=null?s=a[o*2]+a[o*2+1]:s=((t=n[o])==null?void 0:t.end)??0}else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(i=>i===null);){const i=n[a];o[i.lane]===null&&(o[i.lane]=i.end),a--}s=Math.max(...o.filter(i=>i!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const n=this.getMeasurements();for(const s of n)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:n,behavior:s})=>{this._intendedScrollOffset=t+(n??0),this.options.scrollToFn(t,{behavior:s,adjustments:n},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(r)}applyScrollAdjustment(r,t){if(r===0)return!1;if(fk()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=r,!1;{const n=this.getScrollOffset()+this.scrollAdjustments+r,s=this.scrollElement,o=s!==null&&("scrollHeight"in s||"document"in s)?this.getMaxScrollOffset():null;return this._clampedAdjustment=o!==null&&n>o+.5?{target:n,maxAtWrite:o}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=n?n[0]:this.scrollState.lastTargetOffset,o=1,a=s!==this.scrollState.lastTargetOffset;if(!a&&vIn(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const i=this.getSize()||600,c=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&c>i;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const bF=(e,r,t,n)=>{for(;e<=r;){const s=(e+r)/2|0,o=t(s);if(on)r=s-1;else return s}return e>0?e-1:0};function NIn(e,r,t){let n=0;for(;n<=r;){const s=(n+r)/2|0,o=e[s*2];if(ot)r=s-1;else return s}return n>0?n-1:0}function AIn(e,r,t,n,s){const o=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:o};if(n===1&&s!==null){const u=NIn(s,o,t);let d=u;const _=t+r;for(;de[u].start,t),c=i;if(n===1)for(;c1){const u=Array(n).fill(0);for(;c_=0&&d.some(_=>_>=t);){const _=e[i];d[_.lane]=_.start,i--}i=Math.max(0,i-i%n),c=Math.min(o,c+(n-1-c%n))}return{startIndex:i,endIndex:c}}const dk=typeof document<"u"?T.useLayoutEffect:T.useEffect;function TIn({useFlushSync:e=!0,directDomUpdates:r=!1,directDomUpdatesMode:t="transform",...n}){const s=T.useReducer(d=>d+1,0)[1],o=T.useRef({enabled:r,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=r,o.current.mode=t;const a=d=>{const _=o.current;if(!_.enabled||!_.container)return;const p=d.getTotalSize();if(p!==_.lastSize){_.lastSize=p;const m=d.options.horizontal?"width":"height";_.container.style[m]=`${p}px`}},i=d=>{const _=o.current;if(!_.enabled||!_.container)return;a(d);const p=!!d.options.horizontal,m=_.mode==="transform",k=p?"left":"top",x=d.options.scrollMargin,v=d.getVirtualItems();for(const b of v){const w=b.start-x,y=d.elementsCache.get(b.key);y&&_.lastPositions.get(y)!==w&&(_.lastPositions.set(y,w),m?y.style.transform=p?`translate3d(${w}px, 0, 0)`:`translate3d(0, ${w}px, 0)`:y.style[k]=`${w}px`)}},c={...n,onChange:(d,_)=>{var p;const m=o.current;let k=!0;if(m.enabled){i(d);const x=d.range,v=m.prevRange;k=!v||v.isScrolling!==d.isScrolling||v.startIndex!==(x==null?void 0:x.startIndex)||v.endIndex!==(x==null?void 0:x.endIndex),k&&(m.prevRange=x?{startIndex:x.startIndex,endIndex:x.endIndex,isScrolling:d.isScrolling}:null)}k&&(e&&_?Vs.flushSync(s):s()),(p=n.onChange)==null||p.call(n,d,_)}},[u]=T.useState(()=>{const d=new EIn(c);return Object.assign(d,{containerRef:_=>{const p=o.current;if(p.container=_,p.lastSize=null,_&&p.enabled){const m=d.getTotalSize();p.lastSize=m;const k=d.options.horizontal?"width":"height";_.style[k]=`${m}px`}}})});return u.setOptions(c),dk(()=>u._didMount(),[]),dk(()=>(a(u),u._willUpdate())),dk(()=>{i(u)}),u}function yF(e){return TIn({observeElementRect:xIn,observeElementOffset:jIn,scrollToFn:zIn,...e})}const RIn=50;function MIn(e,r){if(r<0||r>e.length)return null;let t=r;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="@")return null;let n=r;for(;nHT(t,!0)),...e.map(t=>HT(t,!1))]}function DIn(e,r){const t=r.toLowerCase(),n=t===""||t.endsWith("/"),s=[];for(const o of e){const{lower:a,lowerName:i}=o;if(n){if(!a.startsWith(t)||a===t)continue;const u=a.slice(t.length),d=u.indexOf("/");if(d!==-1&&d!==u.length-1)continue;s.push({match:o,rank:o.directory?0:1});continue}const c=i.startsWith(t)?0:i.includes(t)?1:a.includes(t)?2:-1;c!==-1&&s.push({match:o,rank:c})}return s.sort((o,a)=>o.rank-a.rank||(n?0:o.match.depth-a.match.depth||o.match.path.length-a.match.path.length)||(o.match.lowera.match.lower?1:0)||(o.match.patha.match.path?1:0)),s.slice(0,RIn).map(({match:o})=>({path:o.path,directory:o.directory}))}function LIn(e,r,t){const n=/\s/.test(t.path),s=n||!t.directory,o=`${e.slice(0,r.start)}@${n?`"${t.path}"`:t.path}`;let a=e.slice(r.end);return s&&!/^\s/.test(a)&&(a=` ${a}`),{text:o+a,cursor:o.length+(s&&a.startsWith(" ")?1:0)}}function IIn(e,r){if(!r)return e;const t=new Map(e.map(o=>[o.id,o]));let n=t.get(r);if(!n)return e;const s=[];for(;n;)s.push(n),n=n.parentId?t.get(n.parentId):void 0;return s.reverse()}function PIn(e,r,t){var a;let n=e;for(;n&&n.role!=="user";)n=n.parentId?r.get(n.parentId):void 0;const s=e.role==="user"?e.parentId??null:(n==null?void 0:n.id)??null,o=(a=t.get(s))==null?void 0:a.filter(i=>i.role===e.role);return o!=null&&o.length?o:[e]}function BIn(e,r,t,n){const s=e.filter(u=>!n(u.id)),o=new Map(s.map(u=>[u.id,u])),a=new Map;for(const u of s){const d=u.parentId??null,_=a.get(d);_?_.push(u):a.set(d,[u])}const i=new Set(r.map(u=>u.id)),c=new Map;for(const u of t){const d=PIn(u,o,a),_=d.findIndex(p=>i.has(p.id));c.set(u.id,{count:d.length,index:_,prevId:_>0?d[_-1].id:void 0,nextId:_=0;o--)for(const a of e[o].parts)if(!(a.type!=="prompt"||(n=a.prompt)!=null&&n.resolved||((s=a.prompt)==null?void 0:s.kind)!=="question"))return a.prompt.nativeId&&!t?null:a.id;return null}function ip(e,r){var t;if(e.type==="tool"&&((t=e.tool)==null?void 0:t.toLowerCase())==="interrupted")return!1;if(e.type==="prompt"){if(!e.prompt)return!1;if(e.prompt.kind==="permission"){if(e.prompt.resolved)return!1;if(r!==void 0)return e.id===r}return!0}return e.type==="reasoning"?!1:e.type==="text"?!!e.text:!0}function j0(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function HIn(e,r){var n,s;const t=e.at(-1);return(r==null?void 0:r.id)==="turn-recovery"&&(t==null?void 0:t.type)==="tool"&&t.tool==="error"&&((n=t.state)!=null&&n.error)&&t.state.error===((s=r.state)==null?void 0:s.error)?e.slice(0,-1):e}function xF(e){var r;for(let t=e.length-1;t>=0;t--){const n=e[t];if(!(n.type==="steer"||j0(n)||!ip(n)))return n.type!=="tool"||((r=n.state)==null?void 0:r.status)==="error"?null:n.id}return null}function wF(e){const r=e.at(-1);if((r==null?void 0:r.role)!=="assistant")return null;const t=xF(r.parts);return t?{messageId:r.id,toolId:t}:null}function qIn(e){const r=e.at(-1);if((r==null?void 0:r.role)!=="assistant")return!1;for(let t=r.parts.length-1;t>=0;t--){const n=r.parts[t];if(!(n.type==="steer"||j0(n)))return n.type==="text"&&!!n.text}return!1}function UIn(e,r,t,n,s){const o=[...r].filter(i=>!t.has(i)&&n.some(c=>c.id===i)&&i!==s);if(o.length===0&&!(s&&e.has(s)))return e;const a=new Set(e);for(const i of o)a.add(i);return s&&a.delete(s),a}function kF(e,r){if(e.some(n=>{var s;return n.type==="prompt"&&!((s=n.prompt)!=null&&s.resolved)}))return{work:[],answer:e};let t=e.findIndex(n=>n.type==="text"&&n.phase==="final_answer");if(t<0&&!r&&!e.some(n=>n.phase))for(let n=e.length-1;n>=0;n--){const s=e[n];if(s.type!=="reasoning"){if(s.type!=="text")break;s.text&&(t=n)}}return t<0||!r&&!e.slice(t).some(n=>ip(n))||!e.slice(0,t).some(n=>ip(n))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function jF(e){return e.flatMap(r=>{var n;const t=r.type==="text"?(n=r.text)==null?void 0:n.trim():void 0;return t?[t]:[]}).join(` +${r?vsr():Esr()}`}function pIn({project:e,chatCount:r,collapsed:t,busy:n,onToggleCollapsed:s,onRemoved:o,onNewChat:a,pinned:i,onPin:c}){const u=T.useRef(null),d=T.useRef(null),_=T.useId(),[p,m]=T.useState(!1),[k,w]=T.useState(!1),[v,b]=T.useState(!1);T.useEffect(()=>{const E=N=>{var A,z;N.target instanceof Node&&((A=d.current)!=null&&A.contains(N.target))||(z=d.current)==null||z.hidePopover()};return window.addEventListener("scroll",E,!0),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E)}},[]);function x(E,N){if(!E||!N)return;E.showPopover();const A=N.getBoundingClientRect(),z=E.getBoundingClientRect(),M=A.right+12+z.width<=window.innerWidth-8?A.right+12:Math.max(8,A.left-z.width-12);E.style.left=`${M}px`,E.style.top=`${Math.max(8,Math.min(A.top,window.innerHeight-z.height-8))}px`}function y(){var E;(E=d.current)==null||E.hidePopover(),w(!0)}async function S(){var E;if((E=d.current)==null||E.hidePopover(),!(v||!window.confirm(vF(e)))){b(!0);try{await BL(e.id),o()}catch(N){tr(N instanceof Error?N.message:String(N),"error")}finally{b(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button","aria-expanded":!t,onClick:s,className:"flex h-7 min-w-0 flex-1 cursor-pointer items-center gap-[7px] rounded-sm py-1 text-start text-sm font-normal text-text focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2",children:[t?f.jsx(FI,{size:15,className:"shrink-0"}):f.jsx(Ci,{size:15,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:e.name}),n&&f.jsx("span",{"aria-hidden":!0,className:"size-[7px] shrink-0 rounded-full bg-primary animate-[or-pulse_1.2s_infinite]"})]}),f.jsx(Rt,{ref:u,size:"small",className:`text-text group-hover:opacity-100 group-focus-within:opacity-100 ${p?"bg-surface opacity-100":"opacity-0"}`,"aria-label":Snn({name:e.name}),"aria-controls":_,"aria-haspopup":"menu","aria-expanded":p,onClick:()=>{var E,N,A;(E=d.current)!=null&&E.matches(":popover-open")?d.current.hidePopover():(x(d.current,u.current),(A=(N=d.current)==null?void 0:N.querySelector("button"))==null||A.focus())},children:f.jsx(wp,{size:15})}),f.jsx(d0,{interactive:!0,content:W4(),className:"rounded-sm",children:f.jsx(Rt,{size:"small",className:"text-text opacity-0 group-hover:opacity-100 group-focus-within:opacity-100","aria-label":`${W4()} · ${e.name}`,onClick:a,children:f.jsx(pd,{size:15})})}),f.jsxs("div",{ref:d,id:_,popover:"auto",role:"menu","aria-label":e.name,onToggle:E=>m(E.newState==="open"),onKeyDown:E=>{var z;if(E.key!=="ArrowDown"&&E.key!=="ArrowUp")return;E.preventDefault();const N=[...E.currentTarget.querySelectorAll("button:not(:disabled)")],A=N.findIndex(M=>M===document.activeElement);(z=N[(A+(E.key==="ArrowDown"?1:N.length-1))%N.length])==null||z.focus()},className:"fixed inset-auto m-0 w-72 max-w-[calc(100vw-1rem)] rounded-xl border border-border bg-background p-2 text-text shadow-modal",children:[f.jsxs("div",{role:"presentation",className:"mb-1 border-b border-border px-2 pb-2 pt-1 text-sm",children:[f.jsx("div",{className:"truncate font-medium",children:e.name}),f.jsxs("div",{className:"mt-1 flex items-center gap-1.5 text-subtext",children:[f.jsx(T9n,{size:13}),r===void 0?"…":pnn({count:r})]}),f.jsx("div",{className:"mt-2 break-all text-xs text-subtext",children:e.repoPath})]}),f.jsx(_r,{role:"menuitem",onClick:()=>{var E;c(),(E=d.current)==null||E.hidePopover()},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Q9n,{size:16}),i?tsn():onn()]})}),f.jsx(_r,{role:"menuitem",onClick:y,children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Ey,{size:16}),hD()]})}),f.jsx(_r,{role:"menuitem",onClick:()=>{var E;(E=d.current)==null||E.hidePopover(),qL(e.id,".").catch(N=>tr(N instanceof Error?N.message:String(N),"error"))},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Ci,{size:16}),$nn()]})}),f.jsx("div",{className:"my-1 border-t border-border"}),f.jsx(_r,{role:"menuitem",danger:!0,disabled:v,onClick:()=>void S(),children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(gd,{size:16}),YD()]})})]}),k&&Vs.createPortal(f.jsx(mIn,{project:e,onClose:()=>w(!1),onRemoved:o}),document.body)]})}function mIn({project:e,onClose:r,onRemoved:t}){const n=T.useRef(null),s=T.useId(),o=T.useId(),[a,i]=T.useState(e.name),[c,u]=T.useState(!1),[d,_]=T.useState(""),p=()=>{c||r()};xp(n,p);async function m(){if(!(c||!a.trim())){u(!0),_("");try{await iSn(e.id,{name:a.trim()}),r()}catch(w){_(w instanceof Error?w.message:String(w))}finally{u(!1)}}}async function k(){if(!(c||!window.confirm(vF(e)))){u(!0),_("");try{await BL(e.id),r(),t()}catch(w){_(w instanceof Error?w.message:String(w))}finally{u(!1)}}}return f.jsx("div",{className:"modal-backdrop fixed inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-5",onClick:w=>{w.target===w.currentTarget&&p()},children:f.jsxs("div",{ref:n,role:"dialog","aria-modal":"true","aria-labelledby":s,tabIndex:-1,className:"modal w-120 max-w-full max-h-[calc(100vh-2.5rem)] overflow-y-auto rounded-xl border border-border bg-background p-6 text-text shadow-modal",children:[f.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[f.jsx("h2",{id:s,className:"m-0 text-xl font-medium",children:brn()}),f.jsx(Rt,{"aria-label":vb(),onClick:p,disabled:c,children:f.jsx(pn,{size:16})})]}),f.jsxs("form",{onSubmit:w=>{w.preventDefault(),m()},children:[f.jsx("label",{htmlFor:o,className:"sr-only",children:Z4()}),f.jsxs("div",{className:"relative",children:[f.jsx(Ci,{size:16,className:"pointer-events-none absolute start-3 top-3 text-subtext"}),f.jsx(Nn,{id:o,"data-initial-focus":!0,value:a,onChange:w=>i(w.target.value),disabled:c,required:!0,className:"h-10 ps-10"})]}),f.jsx("div",{className:"mt-5 mb-2 text-sm font-medium",children:Gnn()}),f.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border p-3 text-sm",children:[f.jsx(Ci,{size:16,className:"mt-0.5 shrink-0 text-subtext"}),f.jsx("span",{className:"min-w-0 break-all",children:e.repoPath})]}),d&&f.jsx("p",{role:"alert",className:"mt-3 text-sm text-accent-red",children:d}),f.jsxs("div",{className:"mt-6 flex items-center gap-2",children:[f.jsx(Oe,{type:"button",variant:"danger",disabled:c,onClick:()=>void k(),children:YD()}),f.jsx("div",{className:"flex-1"}),f.jsx(Oe,{type:"button",variant:"ghost",disabled:c,onClick:p,children:Jnr()}),f.jsx(Oe,{type:"submit",variant:"primary",disabled:c||!a.trim(),children:nc()})]})]})]})})}const Jm=e=>e.kind==="project"?36:34;function PT(e,r,t){const n=e.find(i=>i.kind==="chat"&&i.session.id===t),s=n&&e.find(i=>i.kind==="project"&&i.project.id===n.project.id),o=(i,c)=>{const u=[];let d=0;for(const p of i){if(d+Jm(p)>c)break;u.push(p),d+=Jm(p)}const _=u.at(-1);return(_==null?void 0:_.kind)==="project"&&!_.collapsed&&u.pop(),u},a=o(e,r);return!n||a.includes(n)?a:s?r<70?a:[...o(e.filter(i=>i.project.id!==n.project.id),r-70),s,n]:r<34?a:[...o(e.filter(i=>i!==n),r-34),n]}function gIn(e,r,t){const n=new Array(e);return new Proxy(n,{get(s,o,a){if(typeof o=="string"){const i=o.charCodeAt(0);if(i>=48&&i<=57){const c=+o;if(Number.isInteger(c)&&c>=0&&cn[d]!==u))&&(n=i,s=r(...i),t!=null&&t.onChange&&!(o&&t.skipInitialOnChange)&&t.onChange(s),o=!1),s}return a.updateDeps=i=>{n=i},a}function BT(e,r){if(e===void 0)throw new Error("Unexpected undefined");return e}const vIn=(e,r)=>Math.abs(e-r)<1.01,bIn=(e,r,t)=>{let n;return Object.assign(function(...s){e.clearTimeout(n),n=e.setTimeout(()=>r.apply(this,s),t)},{cancel:()=>{e.clearTimeout(n)}})};let Em;const fk=()=>{if(Em!==void 0)return Em;if(typeof navigator>"u")return Em=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Em=!0;const e=navigator.maxTouchPoints;return Em=navigator.platform==="MacIntel"&&e!==void 0&&e>0},FT=e=>{const{offsetWidth:r,offsetHeight:t}=e;return{width:r,height:t}},yIn=e=>e,R6=e=>{const r=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-r+1,s=new Array(n);for(let o=0;o{const t=e.scrollElement;if(!t)return;const n=e.targetWindow;if(!n)return;const s=a=>{const{width:i,height:c}=a;r({width:Math.round(i),height:Math.round(c)})};if(s(FT(t)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const i=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(FT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return o.observe(t,{box:"border-box"}),()=>{o.unobserve(t)}},Fb={passive:!0},wIn=typeof window>"u"?!0:"onscrollend"in window,kIn=(e,r,t)=>{const n=e.scrollElement;if(!n)return;const s=e.targetWindow;if(!s)return;const o=e.options.useScrollendEvent&&wIn;let a=0;const i=o?null:bIn(s,()=>r(a,!1),e.options.isScrollingResetDelay),c=_=>()=>{a=t(n),i==null||i(),r(a,_)},u=c(!0),d=c(!1);return n.addEventListener("scroll",u,Fb),o&&n.addEventListener("scrollend",d,Fb),()=>{n.removeEventListener("scroll",u),o&&n.removeEventListener("scrollend",d),i==null||i.cancel()}},jIn=(e,r)=>kIn(e,r,t=>{const{horizontal:n,isRtl:s}=e.options;return n?t.scrollLeft*(s&&-1||1):t.scrollTop}),SIn=(e,r,t)=>{if(t.options.useCachedMeasurements){const n=t.indexFromElement(e),s=t.options.getItemKey(n);return t.itemSizeCache.get(s)??t.options.estimateSize(n)}if(r!=null&&r.borderBoxSize){const n=r.borderBoxSize[0];if(n)return Math.round(n[t.options.horizontal?"inlineSize":"blockSize"])}if(!r){const n=t.indexFromElement(e),s=t.options.getItemKey(n),o=t.itemSizeCache.get(s);if(o!==void 0)return o}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},CIn=(e,{adjustments:r=0,behavior:t},n)=>{var s,o;(o=(s=n.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[n.options.horizontal?"left":"top"]:e+r,behavior:t})},zIn=CIn;class EIn{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,n,s;return((s=(n=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:n.now)==null?void 0:s.call(n))??Date.now()},this.observer=(()=>{let t=null;const n=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const a=()=>{const i=o.target,c=this.indexFromElement(i);if(!i.isConnected){this.observer.unobserve(i);for(const[u,d]of this.elementsCache)if(d===i){this.elementsCache.delete(u);break}return}this.isIndexInRange(c)&&this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(i,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var s;(s=n())==null||s.disconnect(),t=null},observe:s=>{var o;return(o=n())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=n())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var n,s;const o={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:yIn,rangeExtractor:R6,onChange:()=>{},measureElement:SIn,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const p in t){const m=t[p];m!==void 0&&(o[p]=m)}const a=this.options;let i=null,c=null,u=!1;if(a!==void 0&&a.enabled&&o.enabled&&o.anchorTo==="end"&&this.scrollElement!==null){const p=a.count,m=o.count,k=this.getMeasurements(),w=p>0?((n=k[0])==null?void 0:n.key)??a.getItemKey(0):null,v=p>0?((s=k[p-1])==null?void 0:s.key)??a.getItemKey(p-1):null;if(m!==p||p>0&&m>0&&(o.getItemKey(0)!==w||o.getItemKey(m-1)!==v)){u=!0;const y=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??k[0]:null;y&&(i=[y.key,this.getScrollOffset()-y.start]);const S=o.followOnAppend===!0?"auto":o.followOnAppend||null;S&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||o.getItemKey(m-1)!==v)&&(c=S)}}this.options=o,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let d=!1,_=0;if(i&&this.scrollOffset!==null){const[p,m]=i,k=this.getMeasurements(),{count:w,getItemKey:v}=this.options;let b=0;for(;b{var n,s;(s=(n=this.options).onChange)==null||s.call(n,this,t)},this.maybeNotify=oh(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}if(this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{if(a&&this._intendedScrollOffset===null&&o===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(o-this._intendedScrollOffset)<1.5&&(o=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(o-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const i=this.getScrollOffset();this.scrollDirection=a?i===o?this.scrollDirection:i{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},i=()=>{this._iosTouching=!1,!(!fk()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};o.addEventListener("touchstart",a,Fb),o.addEventListener("touchend",i,Fb),this.unsubs.push(()=>{o.removeEventListener("touchstart",a),o.removeEventListener("touchend",i),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[o,a,i,c]=s;o!==null&&!i&&(fk()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),i&&this.scrollToEnd({behavior:i})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:n}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>n+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),n=this.getMaxScrollOffset();if(t<0||t>n)return;if(this._iosDeferredAdjustment<0&&t>=n-1){this._iosDeferredAdjustment=0;return}const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=oh(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,n,s,o,a,i,c,u)=>(this.prevLanes!==void 0&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:t,paddingStart:n,scrollMargin:s,getItemKey:o,enabled:a,lanes:i,laneAssignmentMode:c,gap:u}),{key:!1}),this.isIndexInRange=t=>t>=0&&t[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:n,scrollMargin:s,getItemKey:o,enabled:a,lanes:i,laneAssignmentMode:c,gap:u},d)=>{const _=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const p=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),i===1){const b=t*2;let x=this._flatMeasurements;if(!x||x.length0&&E.set(x.subarray(0,p*2)),x=E,this._flatMeasurements=x}let y;if(p===0)y=n+s;else{const E=p-1;y=x[E*2]+x[E*2+1]+u}for(let E=p;E1){S=y;const $=k[S],D=$!==void 0?m[$]:void 0;E=D?D.end+u:n+s}else if(v===i){let $=0,D=w[0],I=k[0];for(let G=1;Gthis.options.debug}),this.calculateRange=oh(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,n,s,o)=>t.length===0||n===0?(this.range=null,null):(this.range=AIn(t,n,s,o,o===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=oh(()=>{let t=null,n=null;const s=this.calculateRange();return s&&(t=s.startIndex,n=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,n]},(t,n,s,o,a)=>o===null||a===null?[]:t({startIndex:o,endIndex:a,overscan:n,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const n=this.options.indexAttribute,s=t.getAttribute(n);return s?parseInt(s,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(s!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,s-o),i=Math.min(this.options.count-1,s+o);return t>=a&&t<=i}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((a,i)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(i))});return}const n=this.indexFromElement(t);if(!this.isIndexInRange(n))return;const s=this.options.getItemKey(n),o=this.elementsCache.get(s);o!==t&&(o&&this.observer.unobserve(o),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,n)=>{var s,o;if(!this.isIndexInRange(t))return;let a,i,c;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)c=this.options.getItemKey(t),i=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;c=p.key,i=p.start,a=p.size}const d=this.itemSizeCache.get(c)??a,_=n-d;if(_!==0){const p=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=p?this.getTotalSize():0,k=this.getScrollOffset()+this.scrollAdjustments,v=!this.itemSizeCache.has(c)?i[this.getVirtualIndexes(),this.getMeasurements()],(t,n)=>{const s=[];for(let o=0,a=t.length;othis.options.debug}),this.getVirtualItemForOffset=t=>{const n=this.getMeasurements();if(n.length===0)return;const s=this._flatMeasurements,o=this.options.lanes===1&&s!=null,a=bF(0,n.length-1,o?i=>s[i*2]:i=>BT(n[i]).start,t);return BT(n[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,n,s=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=t>=a+o?"end":"start"),n==="center"?t+=(s-o)/2:n==="end"&&(t-=o);const i=this.getMaxScrollOffset();return Math.max(Math.min(i,t),0)},this.getOffsetForIndex=(t,n="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[t];if(!a)return;if(n==="auto")if(a.end>=o+s-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),n];const i=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,n,a.size),n]},this.scrollToOffset=(t,{align:n="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;const o=this.getOffsetForAlignment(t,n),a=this.now();this.scrollState={index:null,align:n,behavior:s,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:n="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getOffsetForIndex(t,n);if(!o)return;const[a,i]=o,c=this.now();this.scrollState={index:t,align:i,behavior:s,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:n="auto"}={})=>{const s=this.getScrollOffset()+t,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const n=this.getMeasurements();let s;if(n.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const o=n.length-1,a=this._flatMeasurements;a!=null?s=a[o*2]+a[o*2+1]:s=((t=n[o])==null?void 0:t.end)??0}else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(i=>i===null);){const i=n[a];o[i.lane]===null&&(o[i.lane]=i.end),a--}s=Math.max(...o.filter(i=>i!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const n=this.getMeasurements();for(const s of n)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:n,behavior:s})=>{this._intendedScrollOffset=t+(n??0),this.options.scrollToFn(t,{behavior:s,adjustments:n},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(r)}applyScrollAdjustment(r,t){if(r===0)return!1;if(fk()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=r,!1;{const n=this.getScrollOffset()+this.scrollAdjustments+r,s=this.scrollElement,o=s!==null&&("scrollHeight"in s||"document"in s)?this.getMaxScrollOffset():null;return this._clampedAdjustment=o!==null&&n>o+.5?{target:n,maxAtWrite:o}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=n?n[0]:this.scrollState.lastTargetOffset,o=1,a=s!==this.scrollState.lastTargetOffset;if(!a&&vIn(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const i=this.getSize()||600,c=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&c>i;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const bF=(e,r,t,n)=>{for(;e<=r;){const s=(e+r)/2|0,o=t(s);if(on)r=s-1;else return s}return e>0?e-1:0};function NIn(e,r,t){let n=0;for(;n<=r;){const s=(n+r)/2|0,o=e[s*2];if(ot)r=s-1;else return s}return n>0?n-1:0}function AIn(e,r,t,n,s){const o=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:o};if(n===1&&s!==null){const u=NIn(s,o,t);let d=u;const _=t+r;for(;de[u].start,t),c=i;if(n===1)for(;c1){const u=Array(n).fill(0);for(;c_=0&&d.some(_=>_>=t);){const _=e[i];d[_.lane]=_.start,i--}i=Math.max(0,i-i%n),c=Math.min(o,c+(n-1-c%n))}return{startIndex:i,endIndex:c}}const dk=typeof document<"u"?T.useLayoutEffect:T.useEffect;function TIn({useFlushSync:e=!0,directDomUpdates:r=!1,directDomUpdatesMode:t="transform",...n}){const s=T.useReducer(d=>d+1,0)[1],o=T.useRef({enabled:r,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=r,o.current.mode=t;const a=d=>{const _=o.current;if(!_.enabled||!_.container)return;const p=d.getTotalSize();if(p!==_.lastSize){_.lastSize=p;const m=d.options.horizontal?"width":"height";_.container.style[m]=`${p}px`}},i=d=>{const _=o.current;if(!_.enabled||!_.container)return;a(d);const p=!!d.options.horizontal,m=_.mode==="transform",k=p?"left":"top",w=d.options.scrollMargin,v=d.getVirtualItems();for(const b of v){const x=b.start-w,y=d.elementsCache.get(b.key);y&&_.lastPositions.get(y)!==x&&(_.lastPositions.set(y,x),m?y.style.transform=p?`translate3d(${x}px, 0, 0)`:`translate3d(0, ${x}px, 0)`:y.style[k]=`${x}px`)}},c={...n,onChange:(d,_)=>{var p;const m=o.current;let k=!0;if(m.enabled){i(d);const w=d.range,v=m.prevRange;k=!v||v.isScrolling!==d.isScrolling||v.startIndex!==(w==null?void 0:w.startIndex)||v.endIndex!==(w==null?void 0:w.endIndex),k&&(m.prevRange=w?{startIndex:w.startIndex,endIndex:w.endIndex,isScrolling:d.isScrolling}:null)}k&&(e&&_?Vs.flushSync(s):s()),(p=n.onChange)==null||p.call(n,d,_)}},[u]=T.useState(()=>{const d=new EIn(c);return Object.assign(d,{containerRef:_=>{const p=o.current;if(p.container=_,p.lastSize=null,_&&p.enabled){const m=d.getTotalSize();p.lastSize=m;const k=d.options.horizontal?"width":"height";_.style[k]=`${m}px`}}})});return u.setOptions(c),dk(()=>u._didMount(),[]),dk(()=>(a(u),u._willUpdate())),dk(()=>{i(u)}),u}function yF(e){return TIn({observeElementRect:xIn,observeElementOffset:jIn,scrollToFn:zIn,...e})}const RIn=50;function MIn(e,r){if(r<0||r>e.length)return null;let t=r;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="@")return null;let n=r;for(;nHT(t,!0)),...e.map(t=>HT(t,!1))]}function DIn(e,r){const t=r.toLowerCase(),n=t===""||t.endsWith("/"),s=[];for(const o of e){const{lower:a,lowerName:i}=o;if(n){if(!a.startsWith(t)||a===t)continue;const u=a.slice(t.length),d=u.indexOf("/");if(d!==-1&&d!==u.length-1)continue;s.push({match:o,rank:o.directory?0:1});continue}const c=i.startsWith(t)?0:i.includes(t)?1:a.includes(t)?2:-1;c!==-1&&s.push({match:o,rank:c})}return s.sort((o,a)=>o.rank-a.rank||(n?0:o.match.depth-a.match.depth||o.match.path.length-a.match.path.length)||(o.match.lowera.match.lower?1:0)||(o.match.patha.match.path?1:0)),s.slice(0,RIn).map(({match:o})=>({path:o.path,directory:o.directory}))}function LIn(e,r,t){const n=/\s/.test(t.path),s=n||!t.directory,o=`${e.slice(0,r.start)}@${n?`"${t.path}"`:t.path}`;let a=e.slice(r.end);return s&&!/^\s/.test(a)&&(a=` ${a}`),{text:o+a,cursor:o.length+(s&&a.startsWith(" ")?1:0)}}function IIn(e,r){if(!r)return e;const t=new Map(e.map(o=>[o.id,o]));let n=t.get(r);if(!n)return e;const s=[];for(;n;)s.push(n),n=n.parentId?t.get(n.parentId):void 0;return s.reverse()}function PIn(e,r,t){var a;let n=e;for(;n&&n.role!=="user";)n=n.parentId?r.get(n.parentId):void 0;const s=e.role==="user"?e.parentId??null:(n==null?void 0:n.id)??null,o=(a=t.get(s))==null?void 0:a.filter(i=>i.role===e.role);return o!=null&&o.length?o:[e]}function BIn(e,r,t,n){const s=e.filter(u=>!n(u.id)),o=new Map(s.map(u=>[u.id,u])),a=new Map;for(const u of s){const d=u.parentId??null,_=a.get(d);_?_.push(u):a.set(d,[u])}const i=new Set(r.map(u=>u.id)),c=new Map;for(const u of t){const d=PIn(u,o,a),_=d.findIndex(p=>i.has(p.id));c.set(u.id,{count:d.length,index:_,prevId:_>0?d[_-1].id:void 0,nextId:_=0;o--)for(const a of e[o].parts)if(!(a.type!=="prompt"||(n=a.prompt)!=null&&n.resolved||((s=a.prompt)==null?void 0:s.kind)!=="question"))return a.prompt.nativeId&&!t?null:a.id;return null}function ip(e,r){var t;if(e.type==="tool"&&((t=e.tool)==null?void 0:t.toLowerCase())==="interrupted")return!1;if(e.type==="prompt"){if(!e.prompt)return!1;if(e.prompt.kind==="permission"){if(e.prompt.resolved)return!1;if(r!==void 0)return e.id===r}return!0}return e.type==="reasoning"?!1:e.type==="text"?!!e.text:!0}function j0(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function HIn(e,r){var n,s;const t=e.at(-1);return(r==null?void 0:r.id)==="turn-recovery"&&(t==null?void 0:t.type)==="tool"&&t.tool==="error"&&((n=t.state)!=null&&n.error)&&t.state.error===((s=r.state)==null?void 0:s.error)?e.slice(0,-1):e}function xF(e){var r;for(let t=e.length-1;t>=0;t--){const n=e[t];if(!(n.type==="steer"||j0(n)||!ip(n)))return n.type!=="tool"||((r=n.state)==null?void 0:r.status)==="error"?null:n.id}return null}function wF(e){const r=e.at(-1);if((r==null?void 0:r.role)!=="assistant")return null;const t=xF(r.parts);return t?{messageId:r.id,toolId:t}:null}function qIn(e){const r=e.at(-1);if((r==null?void 0:r.role)!=="assistant")return!1;for(let t=r.parts.length-1;t>=0;t--){const n=r.parts[t];if(!(n.type==="steer"||j0(n)))return n.type==="text"&&!!n.text}return!1}function UIn(e,r,t,n,s){const o=[...r].filter(i=>!t.has(i)&&n.some(c=>c.id===i)&&i!==s);if(o.length===0&&!(s&&e.has(s)))return e;const a=new Set(e);for(const i of o)a.add(i);return s&&a.delete(s),a}function kF(e,r){if(e.some(n=>{var s;return n.type==="prompt"&&!((s=n.prompt)!=null&&s.resolved)}))return{work:[],answer:e};let t=e.findIndex(n=>n.type==="text"&&n.phase==="final_answer");if(t<0&&!r&&!e.some(n=>n.phase))for(let n=e.length-1;n>=0;n--){const s=e[n];if(s.type!=="reasoning"){if(s.type!=="text")break;s.text&&(t=n)}}return t<0||!r&&!e.slice(t).some(n=>ip(n))||!e.slice(0,t).some(n=>ip(n))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function jF(e){return e.flatMap(r=>{var n;const t=r.type==="text"?(n=r.text)==null?void 0:n.trim():void 0;return t?[t]:[]}).join(` `)}function SF(e){return jF(kF(e.parts,!1).answer)}function GIn(e){for(let r=e.length-1;r>=0;r--){if(e[r].role!=="assistant")continue;const t=SF(e[r]);if(t)return t}return""}function WIn(e,r,t){const n=r.flatMap(s=>{const o=jF(s.parts);return o?[`## ${s.role==="user"?t.user:t.assistant} @@ -781,7 +781,7 @@ ${o}`]:[]});return n.length===0?null:[`# ${e}`,...n].join(` /> `,iPn=`Pm -`,NF={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv",pubmed:"PubMed"},cPn={alphaxiv:sPn,openalex:aPn,biorxiv:oPn,pubmed:iPn};function AF({source:e,size:r=16,decorative:t=!1,className:n=""}){return f.jsx("span",{className:`lit-logo flex-none inline-flex items-center justify-center p-[1.5px] box-border bg-white rounded-[3px] shadow-logo [&_svg]:w-full [&_svg]:h-full [&_svg]:block ${n}`,style:{width:r,height:r},...t?{"aria-hidden":!0}:{role:"img","aria-label":NF[e]},dangerouslySetInnerHTML:{__html:cPn[e]}})}function lPn(e){const t=e.trim().replace(/^https?:\/\/doi\.org\//i,"").replace(/^doi:/i,"").match(/10\.\d+\/[^\s?#]+/);return t?t[0].replace(/[.,)]+$/,"").replace(/v\d+(\.[a-z][a-z-]*)*$/i,""):null}function uPn(e,r){const t=r.trim();if(e==="alphaxiv"){const o=(t.split(/[?#]/)[0].split("/").pop()||t).replace(/\.(pdf|md)$/i,"");return`https://www.alphaxiv.org/abs/${encodeURIComponent(o)}`}if(e==="pubmed"){const s=t.split(/[?#]/)[0],o=/^pmid:/i.test(s)?s.slice(5).trim():s.replace(/\/+$/,"").split("/").pop();if(o&&/^\d{1,9}$/.test(o))return`https://pubmed.ncbi.nlm.nih.gov/${o}/`}const n=lPn(t);if(n)return`https://doi.org/${n}`;if(e==="openalex"){const s=t.split("/").pop()||t;return`https://openalex.org/${encodeURIComponent(s)}`}return`https://doi.org/${t}`}const _Pn=["alphaxiv","openalex","biorxiv","pubmed"];function fPn(){const e=LCn(),{data:r}=dt(e),t=mr({mutationFn:R6n,onSuccess:o=>ts(e.queryKey,o)}),n=t.isPending,s=o=>{r&&!n&&t.mutate({...r,[o]:!r[o]})};return r?f.jsx("div",{className:"flex flex-col",children:_Pn.map(o=>{const a=r[o];return f.jsxs(_r,{type:"button",role:"switch","aria-checked":a,disabled:n,onClick:()=>s(o),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(AF,{source:o,size:16,decorative:!0}),NF[o]]}),f.jsx(Szn,{checked:a,"aria-hidden":"true"})]},o)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:m5t()})}function pk(e,r){if(!e)throw new Error("Assertion Error")}function lf(e,r){if(e==null)throw new Error(`Unexpected ${e}`);return e}var GT=Object.prototype.hasOwnProperty;function WT(e,r,t){for(t of e.keys())if(eg(t,r))return t}function eg(e,r){var t,n,s;if(e===r)return!0;if(e&&r&&(t=e.constructor)===r.constructor){if(t===Date)return e.getTime()===r.getTime();if(t===RegExp)return e.toString()===r.toString();if(t===Array){if((n=e.length)===r.length)for(;n--&&eg(e[n],r[n]););return n===-1}if(t===Set){if(e.size!==r.size)return!1;for(n of e)if(s=n,s&&typeof s=="object"&&(s=WT(r,s),!s)||!r.has(s))return!1;return!0}if(t===Map){if(e.size!==r.size)return!1;for(n of e)if(s=n[0],s&&typeof s=="object"&&(s=WT(r,s),!s)||!eg(n[1],r.get(s)))return!1;return!0}if(t===ArrayBuffer)e=new Uint8Array(e),r=new Uint8Array(r);else if(t===DataView){if((n=e.byteLength)===r.byteLength)for(;n--&&e.getInt8(n)===r.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===r.byteLength)for(;n--&&e[n]===r[n];);return n===-1}if(!t||typeof e=="object"){n=0;for(t in e)if(GT.call(e,t)&&++n&&!GT.call(r,t)||!(t in r)||!eg(e[t],r[t]))return!1;return Object.keys(r).length===n}}return e!==e&&r!==r}const dPn=new Set(["table","tbody","thead","tfoot","tr"]),hPn=/^[\t\n\f\r ]*$/;function pPn(e,r,t={}){const n=TF(e,r??null,{Fragment:f.Fragment,components:t,jsx:f.jsx,jsxs:f.jsxs},void 0);return{react:n.react,state:n}}function TF(e,r,t,n){var x,v,b,w;if(r&&r.key===n&&e===r.node)return r;if(!("children"in e)||!Array.isArray(e.children))return r&&r.key===n&&Nh(e,r.node)?r:{children:[],key:n,node:e,react:e.type==="text"&&"value"in e&&typeof e.value=="string"?e.value:void 0,shell:null};const s=(r==null?void 0:r.children)??[],o=[],a=[],i=new Map,c=new Set(s.map(y=>y.key).filter(y=>y!==void 0));let u=0;for(;u=e.children.length-d&&(N=s.length-(e.children.length-y)),N>=0&&(z=((b=s[N])==null?void 0:b.key)??z);z&&c.has(z)&&((w=s[N])==null?void 0:w.key)!==z;)z=`${z}+`;z&&c.add(z);const A=TF(S,s[N]??null,t,z);o.push(A),A.react!==void 0&&a.push(A.react)}const _=r!==null&&mPn(e,r.node);if(r&&r.key===n&&_&&s.length===o.length&&o.every((y,S)=>y===s[S]))return r;const p=e.type==="element"&&dPn.has(e.tagName)?a.filter(y=>typeof y!="string"||!hPn.test(y)):a,m=p.length>0?p.length===1?p[0]:p:null;let k=_?r==null?void 0:r.shell:null;if(!k){const y=UB({...e,children:[]},t);k={props:y.props,type:y.type}}return{children:o,key:n,node:e,react:f.jsx(k.type,{...k.props,children:m},n),shell:k}}function mPn(e,r){if(e===r)return!0;const{children:t,position:n,...s}=e,{children:o,position:a,...i}=r;return eg(s,i)}function Nh(e,r){if(e===r)return!0;if(Array.isArray(e)||Array.isArray(r)){if(!Array.isArray(e)||!Array.isArray(r)||e.length!==r.length)return!1;for(let a=0;a0&&(Ge(this,__,ue(this,__)+t.slice(0,n.commitIndex)),t=t.slice(n.commitIndex),n=KT(t)),ue(this,__)+NPn(t,n)}}__=new WeakMap;const vPn=new Set(["*","**","_","__"]);function KT(e){const r={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;tts(e.queryKey,o)}),n=t.isPending,s=o=>{r&&!n&&t.mutate({...r,[o]:!r[o]})};return r?f.jsx("div",{className:"flex flex-col",children:_Pn.map(o=>{const a=r[o];return f.jsxs(_r,{type:"button",role:"switch","aria-checked":a,disabled:n,onClick:()=>s(o),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(AF,{source:o,size:16,decorative:!0}),NF[o]]}),f.jsx(Szn,{checked:a,"aria-hidden":"true"})]},o)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:m5t()})}function pk(e,r){if(!e)throw new Error("Assertion Error")}function lf(e,r){if(e==null)throw new Error(`Unexpected ${e}`);return e}var GT=Object.prototype.hasOwnProperty;function WT(e,r,t){for(t of e.keys())if(eg(t,r))return t}function eg(e,r){var t,n,s;if(e===r)return!0;if(e&&r&&(t=e.constructor)===r.constructor){if(t===Date)return e.getTime()===r.getTime();if(t===RegExp)return e.toString()===r.toString();if(t===Array){if((n=e.length)===r.length)for(;n--&&eg(e[n],r[n]););return n===-1}if(t===Set){if(e.size!==r.size)return!1;for(n of e)if(s=n,s&&typeof s=="object"&&(s=WT(r,s),!s)||!r.has(s))return!1;return!0}if(t===Map){if(e.size!==r.size)return!1;for(n of e)if(s=n[0],s&&typeof s=="object"&&(s=WT(r,s),!s)||!eg(n[1],r.get(s)))return!1;return!0}if(t===ArrayBuffer)e=new Uint8Array(e),r=new Uint8Array(r);else if(t===DataView){if((n=e.byteLength)===r.byteLength)for(;n--&&e.getInt8(n)===r.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===r.byteLength)for(;n--&&e[n]===r[n];);return n===-1}if(!t||typeof e=="object"){n=0;for(t in e)if(GT.call(e,t)&&++n&&!GT.call(r,t)||!(t in r)||!eg(e[t],r[t]))return!1;return Object.keys(r).length===n}}return e!==e&&r!==r}const dPn=new Set(["table","tbody","thead","tfoot","tr"]),hPn=/^[\t\n\f\r ]*$/;function pPn(e,r,t={}){const n=TF(e,r??null,{Fragment:f.Fragment,components:t,jsx:f.jsx,jsxs:f.jsxs},void 0);return{react:n.react,state:n}}function TF(e,r,t,n){var w,v,b,x;if(r&&r.key===n&&e===r.node)return r;if(!("children"in e)||!Array.isArray(e.children))return r&&r.key===n&&Nh(e,r.node)?r:{children:[],key:n,node:e,react:e.type==="text"&&"value"in e&&typeof e.value=="string"?e.value:void 0,shell:null};const s=(r==null?void 0:r.children)??[],o=[],a=[],i=new Map,c=new Set(s.map(y=>y.key).filter(y=>y!==void 0));let u=0;for(;u=e.children.length-d&&(N=s.length-(e.children.length-y)),N>=0&&(E=((b=s[N])==null?void 0:b.key)??E);E&&c.has(E)&&((x=s[N])==null?void 0:x.key)!==E;)E=`${E}+`;E&&c.add(E);const A=TF(S,s[N]??null,t,E);o.push(A),A.react!==void 0&&a.push(A.react)}const _=r!==null&&mPn(e,r.node);if(r&&r.key===n&&_&&s.length===o.length&&o.every((y,S)=>y===s[S]))return r;const p=e.type==="element"&&dPn.has(e.tagName)?a.filter(y=>typeof y!="string"||!hPn.test(y)):a,m=p.length>0?p.length===1?p[0]:p:null;let k=_?r==null?void 0:r.shell:null;if(!k){const y=UB({...e,children:[]},t);k={props:y.props,type:y.type}}return{children:o,key:n,node:e,react:f.jsx(k.type,{...k.props,children:m},n),shell:k}}function mPn(e,r){if(e===r)return!0;const{children:t,position:n,...s}=e,{children:o,position:a,...i}=r;return eg(s,i)}function Nh(e,r){if(e===r)return!0;if(Array.isArray(e)||Array.isArray(r)){if(!Array.isArray(e)||!Array.isArray(r)||e.length!==r.length)return!1;for(let a=0;a0&&(Ge(this,__,ue(this,__)+t.slice(0,n.commitIndex)),t=t.slice(n.commitIndex),n=KT(t)),ue(this,__)+NPn(t,n)}}__=new WeakMap;const vPn=new Set(["*","**","_","__"]);function KT(e){const r={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;tt){t=s-1;continue}if(r.exclusive)continue;if(EPn(r)){VT(r,t,n);continue}const o=kPn(r,e,t);if(o>t){t=o-1;continue}const a=jPn(r,e,t);if(a>t){t=a-1;continue}ec(e,t)||VT(r,t,n)}return r}function bPn(e,r,t){const n=r[t];return n==="`"?yPn(e,r,t):n==="$"?xPn(e,r,t):n==="~"?wPn(e,r,t):t}function yPn(e,r,t){const n=M6(r,t),s="`".repeat(n),o=e.exclusive;return(o==null?void 0:o.kind)==="fence"?(o.token[0]==="`"&&Hb(r,t)&&!ec(r,t)&&n>=o.token.length&&(e.exclusive=null),t+n):(o==null?void 0:o.kind)==="code"?(!ec(r,t)&&n>=o.token.length&&(e.exclusive=null),t+n):o||ec(r,t)?t+n:n>=3&&Hb(r,t)?(e.exclusive={kind:"fence",start:t,token:s},t+n):(e.exclusive={kind:"code",start:t,token:s},t+n)}function xPn(e,r,t){const n=M6(r,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!ec(r,t)&&n>=s.token.length&&(e.exclusive=null),t+n):(s||ec(r,t)||(e.exclusive={kind:"math",start:t,token:n>=2?"$$":"$"}),t+n)}function wPn(e,r,t){const n=M6(r,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(Hb(r,t)&&!ec(r,t)&&n>=s.token.length&&(e.exclusive=null),t+n):s||n<3||!Hb(r,t)||ec(r,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(n)},t+n)}function kPn(e,r,t){if(r[t]!=="<"||ec(r,t))return t;const n=r[t+1];if(n!==void 0&&!OF(n))return t;e.pendingHtml=t;for(let s=t+1;s"||r[s]===` `)return e.pendingHtml=null,s+1;return r.length}function jPn(e,r,t){const n=SPn(r,t);if(!n)return t;if(ec(r,t))return t+n.length;const s=e.delims.findLastIndex(o=>o.token===n);return s!==-1?(e.delims.splice(s,1),t+n.length):t+n.length===r.length?(e.pendingDelim={start:t,token:n},t+n.length):(CPn(r,t,n)&&e.delims.push({start:t,token:n}),t+n.length)}function SPn(e,r){const t=e[r];if(t==="*")return e.startsWith("***",r)?"***":e.startsWith("**",r)?"**":"*";if(t==="_")return e.startsWith("__",r)?"__":"_";if(t==="~"&&e.startsWith("~~",r))return"~~"}function CPn(e,r,t){const n=e[r+t.length];if(!n||/\s/.test(n))return!1;const s=e[r-1];return!YT(s)||!YT(n)}function VT(e,r,t){const n=e.links.at(-1);if(t==="["){e.links.push({phase:"text",start:r});return}if(t==="]"&&(n==null?void 0:n.phase)==="text"){e.links[e.links.length-1]={phase:"url_wait",start:n.start,textEnd:r};return}if(t==="("&&(n==null?void 0:n.phase)==="url_wait"){e.links[e.links.length-1]={phase:"url",start:n.start,textEnd:n.textEnd,parenDepth:0};return}if(t==="("&&(n==null?void 0:n.phase)==="url"){n.parenDepth+=1;return}if(t===")"&&(n==null?void 0:n.phase)==="url"){if(n.parenDepth>0){n.parenDepth-=1;return}e.links.pop()}}function zPn(e){var r,t;e.delims.length=0,e.links.length=0,((r=e.exclusive)==null?void 0:r.kind)!=="fence"&&(((t=e.exclusive)==null?void 0:t.kind)==="math"&&e.exclusive.token==="$$"||(e.exclusive=null))}function EPn(e){var t;const r=(t=e.links.at(-1))==null?void 0:t.phase;return r==="url_wait"||r==="url"}function NPn(e,r){r.pendingHtml!==null&&(e=e.slice(0,RPn(e,r.pendingHtml)));const t=r.links.at(-1);if(t)return Sc(APn(e,t));const n=TPn(r);if(n)return Sc(yh(e,n));const s=$Pn(r);return s?s.kind==="delim"?Sc(_5(e,s.start,s.token.length)?RF(e,s.token):e.slice(0,s.start)):_5(e,s.start,s.token.length)?s.kind==="fence"?Sc(e):s.kind==="code"?Sc(yh(e,s.token)):s.token==="$$"?Sc(yh(e,(e.endsWith(` @@ -792,11 +792,11 @@ ${o}`]:[]});return n.length===0?null:[`# ${e}`,...n].join(` `),t=r===-1?0:r+2,n=e.slice(0,t),s=e.slice(t),o=s.indexOf(` `),a=o===-1?s:s.slice(0,o),i=(v=a.match(/^( *)\|/))==null?void 0:v[1];if(i===void 0)return e;if(QT(a)<2&&!DPn(a,i))return n;const c=a.trimEnd().endsWith("|")?a:RF(a," |"),u=QT(c),d=u<2?0:c.trimEnd().endsWith("|")?u-1:u;if(d===0)return e;const _=o===-1?"":s.slice(o+1),p=XT(i,Array.from({length:d},()=>"-"));if(_.length===0)return n+c+` `+p;const m=_.indexOf(` -`),k=m===-1?_:_.slice(0,m),x=m===-1?"":_.slice(m);if(LPn(k,i,d))return e;if(k.startsWith(i+"|")&&/^[ |:\-\t]*$/.test(k.slice(i.length))){const b=MF(k,i).map(w=>{const y=w.trim();if(y.length===0)return"-";let S=0;for(let z=0;z1&&y.endsWith(":")?":":"")});for(;b.length{const y=x.trim();if(y.length===0)return"-";let S=0;for(let E=0;E1&&y.endsWith(":")?":":"")});for(;b.length0;t-=1)if(e.endsWith(r.slice(0,t)))return t;return 0}function $Pn(e){const r=e.delims.at(-1);return e.exclusive&&(!r||e.exclusive.start>r.start)?e.exclusive:r?{kind:"delim",start:r.start,token:r.token}:e.exclusive}function QT(e){let r=0;for(let t=0;t0}function XT(e,r){return e+"|"+r.map(t=>` ${t} |`).join("")}function MF(e,r){const t=e.slice(r.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function LPn(e,r,t){if(!e.startsWith(r))return!1;const n=e.slice(r.length).trim();if(!n.startsWith("|")||!n.endsWith("|"))return!1;const s=MF(n,"").map(o=>o.trim());return s.length===t&&s.every(o=>/^:?-+:?$/.test(o))}function M6(e,r){let t=r+1;for(;tr+t}function Hb(e,r){return r===0||e[r-1]===` -`}function ec(e,r){let t=0;for(let n=r-1;n>=0&&e[n]==="\\";n--)t+=1;return t%2===1}function YT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function OF(e){return!!e&&/[A-Za-z]/.test(e)}const $F=ox().use(rx);var Zg,Yh,Zh,Mf,Jh,Jg,e0,t0,Of,r0,$f;class IPn{constructor(){ft(this,Zg,$F);ft(this,Yh,null);ft(this,Zh,{});ft(this,Mf,null);ft(this,Jh,"");ft(this,Jg,[]);ft(this,e0,[]);ft(this,t0,[]);ft(this,Of,0);ft(this,r0,[]);ft(this,$f,[])}reconfigure(r,t,n){ue(this,Yh)!==null&&ue(this,Zg)===r&&DF(ue(this,Zh),n)&&!!ue(this,Mf)===t||(Ge(this,Zg,r),r.attachers.some(s=>s[0]===Ib)||(r=r(),r.use(Ib),r.freeze()),Ge(this,Yh,r),Ge(this,Zh,n),Ge(this,Jh,""),Ge(this,Jg,[]),Ge(this,e0,[]),Ge(this,t0,[]),Ge(this,Of,0),Ge(this,r0,[]),Ge(this,Mf,t?new gPn:null))}update(r){ue(this,Mf)&&(r=ue(this,Mf).update(r));let t=ue(this,Jh);if(r===t)return ue(this,$f);const n=ue(this,Jg),s=PPn(r,t);let o=n.length-1;for(;o>=0&&!(s>=n[o]);o-=1);let a=n[o]??0;o===-1&&(o=0);const i=lf(ue(this,Yh)),c=ue(this,e0),u=c.slice(o).some(N=>N.some(f5));let d=i.parse(r.slice(a)),_=d.children.map(N=>lf(lf(N.position).start.offset)+a);Ge(this,Jh,r),pk(n.length===c.length),n.splice(o,n.length-o,..._);{const N=mk(d,_,a);pk(N.length===_.length),c.splice(o,c.length-o,...N)}if(u||f5(d)){o=0,a=0,d=i.parse(r),_=d.children.map(A=>lf(lf(A.position).start.offset)+a),n.splice(0,n.length,..._);const N=mk(d,_,a);pk(N.length===_.length),c.splice(0,c.length,...N)}const p=mk(i.runSync(d),_,a),m=ue(this,t0),k=ue(this,r0),x=ue(this,$f),v=k.length;let b=null,w=0;for(;wv&&(m.length=k.length=n.length);for(let N=n.length=S?M=v-(n.length-A):A=v){m[A]=String(ue(this,Of)),Ge(this,Of,ue(this,Of)+1),k[A]=null,b&&(b[A]=void 0);continue}m[A]=m[M]??String(hm(this,Of)._++),k[A]=k[M]??null,b&&(b[A]=x[M])}n.length[]);let s=0;for(const a of e.children){const i=(o=a.position)==null?void 0:o.start.offset;if(i!==void 0){for(;s+1u&&(u=d):d&&(u!==void 0&&u>-1&&c.push(` +`}function ec(e,r){let t=0;for(let n=r-1;n>=0&&e[n]==="\\";n--)t+=1;return t%2===1}function YT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function OF(e){return!!e&&/[A-Za-z]/.test(e)}const $F=ox().use(rx);var Zg,Yh,Zh,Mf,Jh,Jg,e0,t0,Of,r0,$f;class IPn{constructor(){ft(this,Zg,$F);ft(this,Yh,null);ft(this,Zh,{});ft(this,Mf,null);ft(this,Jh,"");ft(this,Jg,[]);ft(this,e0,[]);ft(this,t0,[]);ft(this,Of,0);ft(this,r0,[]);ft(this,$f,[])}reconfigure(r,t,n){ue(this,Yh)!==null&&ue(this,Zg)===r&&DF(ue(this,Zh),n)&&!!ue(this,Mf)===t||(Ge(this,Zg,r),r.attachers.some(s=>s[0]===Ib)||(r=r(),r.use(Ib),r.freeze()),Ge(this,Yh,r),Ge(this,Zh,n),Ge(this,Jh,""),Ge(this,Jg,[]),Ge(this,e0,[]),Ge(this,t0,[]),Ge(this,Of,0),Ge(this,r0,[]),Ge(this,Mf,t?new gPn:null))}update(r){ue(this,Mf)&&(r=ue(this,Mf).update(r));let t=ue(this,Jh);if(r===t)return ue(this,$f);const n=ue(this,Jg),s=PPn(r,t);let o=n.length-1;for(;o>=0&&!(s>=n[o]);o-=1);let a=n[o]??0;o===-1&&(o=0);const i=lf(ue(this,Yh)),c=ue(this,e0),u=c.slice(o).some(N=>N.some(f5));let d=i.parse(r.slice(a)),_=d.children.map(N=>lf(lf(N.position).start.offset)+a);Ge(this,Jh,r),pk(n.length===c.length),n.splice(o,n.length-o,..._);{const N=mk(d,_,a);pk(N.length===_.length),c.splice(o,c.length-o,...N)}if(u||f5(d)){o=0,a=0,d=i.parse(r),_=d.children.map(A=>lf(lf(A.position).start.offset)+a),n.splice(0,n.length,..._);const N=mk(d,_,a);pk(N.length===_.length),c.splice(0,c.length,...N)}const p=mk(i.runSync(d),_,a),m=ue(this,t0),k=ue(this,r0),w=ue(this,$f),v=k.length;let b=null,x=0;for(;xv&&(m.length=k.length=n.length);for(let N=n.length=S?M=v-(n.length-A):A=v){m[A]=String(ue(this,Of)),Ge(this,Of,ue(this,Of)+1),k[A]=null,b&&(b[A]=void 0);continue}m[A]=m[M]??String(hm(this,Of)._++),k[A]=k[M]??null,b&&(b[A]=w[M])}n.length[]);let s=0;for(const a of e.children){const i=(o=a.position)==null?void 0:o.start.offset;if(i!==void 0){for(;s+1u&&(u=d):d&&(u!==void 0&&u>-1&&c.push(` `.repeat(u)||" "),u=-1,c.push(d))}return c.join("")}function BF(e,r,t){return e.type==="element"?aBn(e,r,t):e.type==="text"?t.whitespace==="normal"?FF(e,t):iBn(e):[]}function aBn(e,r,t){const n=HF(e,t),s=e.children||[];let o=-1,a=[];if(sBn(e))return a;let i,c;for(d5(e)||sR(e)&&eR(r,e,sR)?c=` `:nBn(e)?(i=2,c=2):PF(e)&&(i=1,c=1);++o15?u="…"+i.slice(s-15,s):u=i.slice(0,s);var d;o+15e.replace(fBn,"-$1").toLowerCase(),hBn={"&":"&",">":">","<":"<",'"':""","'":"'"},pBn=/[&><"']/g,zo=e=>String(e).replace(pBn,r=>hBn[r]),G1=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?G1(e.body[0]):e:e.type==="font"?G1(e.body):e,mBn=new Set(["mathord","textord","atom"]),uu=e=>mBn.has(G1(e).type),gBn=e=>{var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},h5={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,r)=>(r.push(e),r)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function vBn(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function bBn(e){if(e.default!==void 0)return e.default;var r=Array.isArray(e.type)?e.type[0]:e.type;return vBn(r)}function yBn(e,r,t,n){var s=t[r];e[r]=s!==void 0?n.processor?n.processor(s):s:bBn(n)}class $6{constructor(r){r===void 0&&(r={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,r=r||{};for(var t of Object.keys(h5)){var n=h5[t];n&&yBn(this,t,r,n)}}reportNonstrict(r,t,n){var s=this.strict;if(typeof s=="function"&&(s=s(r,t,n)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new tt("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+r+"]"),n);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+r+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+r+"]"))}}useStrictBehavior(r,t,n){var s=this.strict;if(typeof s=="function")try{s=s(r,t,n)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+r+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+r+"]")),!1)}isTrusted(r){if("url"in r&&r.url&&!r.protocol){var t=gBn(r.url);if(t==null)return!1;r.protocol=t}var n=typeof this.trust=="function"?this.trust(r):this.trust;return!!n}}class Ku{constructor(r,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=r,this.size=t,this.cramped=n}sup(){return Oc[xBn[this.id]]}sub(){return Oc[wBn[this.id]]}fracNum(){return Oc[kBn[this.id]]}fracDen(){return Oc[jBn[this.id]]}cramp(){return Oc[SBn[this.id]]}text(){return Oc[CBn[this.id]]}isTight(){return this.size>=2}}var D6=0,qb=1,Ah=2,ru=3,zg=4,ki=5,cp=6,Ko=7,Oc=[new Ku(D6,0,!1),new Ku(qb,0,!0),new Ku(Ah,1,!1),new Ku(ru,1,!0),new Ku(zg,2,!1),new Ku(ki,2,!0),new Ku(cp,3,!1),new Ku(Ko,3,!0)],xBn=[zg,ki,zg,ki,cp,Ko,cp,Ko],wBn=[ki,ki,ki,ki,Ko,Ko,Ko,Ko],kBn=[Ah,ru,zg,ki,cp,Ko,cp,Ko],jBn=[ru,ru,ki,ki,Ko,Ko,Ko,Ko],SBn=[qb,qb,ru,ru,ki,ki,Ko,Ko],CBn=[D6,qb,Ah,ru,Ah,ru,Ah,ru],ir={DISPLAY:Oc[D6],TEXT:Oc[Ah],SCRIPT:Oc[zg],SCRIPTSCRIPT:Oc[cp]},p5=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function zBn(e){for(var r=0;r=s[0]&&e<=s[1])return t.name}return null}var W1=[];p5.forEach(e=>e.blocks.forEach(r=>W1.push(...r)));function qF(e){for(var r=0;r=W1[r]&&e<=W1[r+1])return!0;return!1}var Ds=e=>e+" "+e,ah=80,EBn=function(r,t){return"M95,"+(622+r+t)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 @@ -1048,14 +1048,14 @@ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function IBn(e){return"toText"in e}class Ep{constructor(r){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=r,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(r){return this.classes.includes(r)}toNode(){for(var r=document.createDocumentFragment(),t=0;t{if(IBn(r))return r.toText();throw new Error("Expected MathDomNode with toText, got "+r.constructor.name)}).join("")}}var m5={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},PBn={ex:!0,em:!0,mu:!0},UF=function(r){return typeof r!="string"&&(r=r.unit),r in m5||r in PBn||r==="ex"},Un=function(r,t){var n;if(r.unit in m5)n=m5[r.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(r.unit==="mu")n=t.fontMetrics().cssEmPerMu;else{var s;if(t.style.isTight()?s=t.havingStyle(t.style.text()):s=t,r.unit==="ex")n=s.fontMetrics().xHeight;else if(r.unit==="em")n=s.fontMetrics().quad;else throw new tt("Invalid unit: '"+r.unit+"'");s!==t&&(n*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(r.number*n,t.maxSize)},ot=function(r){return+r.toFixed(4)+"em"},k_=function(r){return r.filter(t=>t).join(" ")},L6=function(r){var t="";for(var n of Object.keys(r)){var s=r[n];s!==void 0&&(t+=dBn(n)+":"+s+";")}return t},GF=function(r,t,n){if(this.classes=r||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var s=t.getColor();s&&(this.style.color=s)}},WF=function(r){var t=document.createElement(r);t.className=k_(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var s=0;s/=\x00-\x1f]/,KF=function(r){var t="<"+r;this.classes.length&&(t+=' class="'+zo(k_(this.classes))+'"');var n=L6(this.style);n&&(t+=' style="'+zo(n)+'"');for(var s of Object.keys(this.attributes)){if(BBn.test(s))throw new tt("Invalid attribute name '"+s+"'");t+=" "+s+'="'+zo(this.attributes[s])+'"'}t+=">";for(var o=0;o",t};class Np{constructor(r,t,n,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,GF.call(this,r,n,s),this.children=t||[]}setAttribute(r,t){this.attributes[r]=t}hasClass(r){return this.classes.includes(r)}toNode(){return WF.call(this,"span")}toMarkup(){return KF.call(this,"span")}}class ix{constructor(r,t,n,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,GF.call(this,t,s),this.children=n||[],this.setAttribute("href",r)}setAttribute(r,t){this.attributes[r]=t}hasClass(r){return this.classes.includes(r)}toNode(){return WF.call(this,"a")}toMarkup(){return KF.call(this,"a")}}class FBn{constructor(r,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=r,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(r){return this.classes.includes(r)}toNode(){var r=document.createElement("img");return r.src=this.src,r.alt=this.alt,r.className="mord",Object.assign(r.style,this.style),r}toMarkup(){var r=''+zo(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=ot(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=k_(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(r),t):r}toMarkup(){var r=!1,t="0&&(n+="margin-right:"+ot(this.italic)+";"),n+=L6(this.style),n&&(r=!0,t+=' style="'+zo(n)+'"');var s=zo(this.text);return r?(t+=">",t+=s,t+="",t):s}}class au{constructor(r,t){this.children=void 0,this.attributes=void 0,this.children=r||[],this.attributes=t||{}}toNode(){var r="http://www.w3.org/2000/svg",t=document.createElementNS(r,"svg");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var s=0;s':''}}class g5{constructor(r){this.attributes=void 0,this.attributes=r||{}}toNode(){var r="http://www.w3.org/2000/svg",t=document.createElementNS(r,"line");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var r=" but got "+String(e)+".")}var GBn=e=>e instanceof Np||e instanceof ix||e instanceof Ep,Dc={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},s1={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},aR={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function WBn(e,r){Dc[e]=r}function I6(e,r,t){if(!Dc[r])throw new Error("Font metrics not found for font: "+r+".");var n=e.charCodeAt(0),s=Dc[r][n];if(!s&&e[0]in aR&&(n=aR[e[0]].charCodeAt(0),s=Dc[r][n]),!s&&t==="text"&&qF(n)&&(s=Dc[r][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var vk={};function KBn(e){var r;if(e>=5?r=0:e>=3?r=1:r=2,!vk[r]){var t=vk[r]={cssEmPerMu:s1.quad[r]/18};for(var n in s1)s1.hasOwnProperty(n)&&(t[n]=s1[n][r])}return vk[r]}var $n={math:{},text:{}};function B(e,r,t,n,s,o){$n[e][s]={font:r,group:t,replace:n},o&&n&&($n[e][n]=$n[e][s])}var V="math",We="text",te="main",de="ams",Ln="accent-token",yt="bin",Qo="close",Ap="inner",Qt="mathord",zs="op-token",Ya="open",C0="punct",he="rel",_u="spacing",ve="textord";B(V,te,he,"≡","\\equiv",!0);B(V,te,he,"≺","\\prec",!0);B(V,te,he,"≻","\\succ",!0);B(V,te,he,"∼","\\sim",!0);B(V,te,he,"⊥","\\perp");B(V,te,he,"⪯","\\preceq",!0);B(V,te,he,"⪰","\\succeq",!0);B(V,te,he,"≃","\\simeq",!0);B(V,te,he,"∣","\\mid",!0);B(V,te,he,"≪","\\ll",!0);B(V,te,he,"≫","\\gg",!0);B(V,te,he,"≍","\\asymp",!0);B(V,te,he,"∥","\\parallel");B(V,te,he,"⋈","\\bowtie",!0);B(V,te,he,"⌣","\\smile",!0);B(V,te,he,"⊑","\\sqsubseteq",!0);B(V,te,he,"⊒","\\sqsupseteq",!0);B(V,te,he,"≐","\\doteq",!0);B(V,te,he,"⌢","\\frown",!0);B(V,te,he,"∋","\\ni",!0);B(V,te,he,"∝","\\propto",!0);B(V,te,he,"⊢","\\vdash",!0);B(V,te,he,"⊣","\\dashv",!0);B(V,te,he,"∋","\\owns");B(V,te,C0,".","\\ldotp");B(V,te,C0,"⋅","\\cdotp");B(V,te,C0,"⋅","·");B(We,te,ve,"⋅","·");B(V,te,ve,"#","\\#");B(We,te,ve,"#","\\#");B(V,te,ve,"&","\\&");B(We,te,ve,"&","\\&");B(V,te,ve,"ℵ","\\aleph",!0);B(V,te,ve,"∀","\\forall",!0);B(V,te,ve,"ℏ","\\hbar",!0);B(V,te,ve,"∃","\\exists",!0);B(V,te,ve,"∇","\\nabla",!0);B(V,te,ve,"♭","\\flat",!0);B(V,te,ve,"ℓ","\\ell",!0);B(V,te,ve,"♮","\\natural",!0);B(V,te,ve,"♣","\\clubsuit",!0);B(V,te,ve,"℘","\\wp",!0);B(V,te,ve,"♯","\\sharp",!0);B(V,te,ve,"♢","\\diamondsuit",!0);B(V,te,ve,"ℜ","\\Re",!0);B(V,te,ve,"♡","\\heartsuit",!0);B(V,te,ve,"ℑ","\\Im",!0);B(V,te,ve,"♠","\\spadesuit",!0);B(V,te,ve,"§","\\S",!0);B(We,te,ve,"§","\\S");B(V,te,ve,"¶","\\P",!0);B(We,te,ve,"¶","\\P");B(V,te,ve,"†","\\dag");B(We,te,ve,"†","\\dag");B(We,te,ve,"†","\\textdagger");B(V,te,ve,"‡","\\ddag");B(We,te,ve,"‡","\\ddag");B(We,te,ve,"‡","\\textdaggerdbl");B(V,te,Qo,"⎱","\\rmoustache",!0);B(V,te,Ya,"⎰","\\lmoustache",!0);B(V,te,Qo,"⟯","\\rgroup",!0);B(V,te,Ya,"⟮","\\lgroup",!0);B(V,te,yt,"∓","\\mp",!0);B(V,te,yt,"⊖","\\ominus",!0);B(V,te,yt,"⊎","\\uplus",!0);B(V,te,yt,"⊓","\\sqcap",!0);B(V,te,yt,"∗","\\ast");B(V,te,yt,"⊔","\\sqcup",!0);B(V,te,yt,"◯","\\bigcirc",!0);B(V,te,yt,"∙","\\bullet",!0);B(V,te,yt,"‡","\\ddagger");B(V,te,yt,"≀","\\wr",!0);B(V,te,yt,"⨿","\\amalg");B(V,te,yt,"&","\\And");B(V,te,he,"⟵","\\longleftarrow",!0);B(V,te,he,"⇐","\\Leftarrow",!0);B(V,te,he,"⟸","\\Longleftarrow",!0);B(V,te,he,"⟶","\\longrightarrow",!0);B(V,te,he,"⇒","\\Rightarrow",!0);B(V,te,he,"⟹","\\Longrightarrow",!0);B(V,te,he,"↔","\\leftrightarrow",!0);B(V,te,he,"⟷","\\longleftrightarrow",!0);B(V,te,he,"⇔","\\Leftrightarrow",!0);B(V,te,he,"⟺","\\Longleftrightarrow",!0);B(V,te,he,"↦","\\mapsto",!0);B(V,te,he,"⟼","\\longmapsto",!0);B(V,te,he,"↗","\\nearrow",!0);B(V,te,he,"↩","\\hookleftarrow",!0);B(V,te,he,"↪","\\hookrightarrow",!0);B(V,te,he,"↘","\\searrow",!0);B(V,te,he,"↼","\\leftharpoonup",!0);B(V,te,he,"⇀","\\rightharpoonup",!0);B(V,te,he,"↙","\\swarrow",!0);B(V,te,he,"↽","\\leftharpoondown",!0);B(V,te,he,"⇁","\\rightharpoondown",!0);B(V,te,he,"↖","\\nwarrow",!0);B(V,te,he,"⇌","\\rightleftharpoons",!0);B(V,de,he,"≮","\\nless",!0);B(V,de,he,"","\\@nleqslant");B(V,de,he,"","\\@nleqq");B(V,de,he,"⪇","\\lneq",!0);B(V,de,he,"≨","\\lneqq",!0);B(V,de,he,"","\\@lvertneqq");B(V,de,he,"⋦","\\lnsim",!0);B(V,de,he,"⪉","\\lnapprox",!0);B(V,de,he,"⊀","\\nprec",!0);B(V,de,he,"⋠","\\npreceq",!0);B(V,de,he,"⋨","\\precnsim",!0);B(V,de,he,"⪹","\\precnapprox",!0);B(V,de,he,"≁","\\nsim",!0);B(V,de,he,"","\\@nshortmid");B(V,de,he,"∤","\\nmid",!0);B(V,de,he,"⊬","\\nvdash",!0);B(V,de,he,"⊭","\\nvDash",!0);B(V,de,he,"⋪","\\ntriangleleft");B(V,de,he,"⋬","\\ntrianglelefteq",!0);B(V,de,he,"⊊","\\subsetneq",!0);B(V,de,he,"","\\@varsubsetneq");B(V,de,he,"⫋","\\subsetneqq",!0);B(V,de,he,"","\\@varsubsetneqq");B(V,de,he,"≯","\\ngtr",!0);B(V,de,he,"","\\@ngeqslant");B(V,de,he,"","\\@ngeqq");B(V,de,he,"⪈","\\gneq",!0);B(V,de,he,"≩","\\gneqq",!0);B(V,de,he,"","\\@gvertneqq");B(V,de,he,"⋧","\\gnsim",!0);B(V,de,he,"⪊","\\gnapprox",!0);B(V,de,he,"⊁","\\nsucc",!0);B(V,de,he,"⋡","\\nsucceq",!0);B(V,de,he,"⋩","\\succnsim",!0);B(V,de,he,"⪺","\\succnapprox",!0);B(V,de,he,"≆","\\ncong",!0);B(V,de,he,"","\\@nshortparallel");B(V,de,he,"∦","\\nparallel",!0);B(V,de,he,"⊯","\\nVDash",!0);B(V,de,he,"⋫","\\ntriangleright");B(V,de,he,"⋭","\\ntrianglerighteq",!0);B(V,de,he,"","\\@nsupseteqq");B(V,de,he,"⊋","\\supsetneq",!0);B(V,de,he,"","\\@varsupsetneq");B(V,de,he,"⫌","\\supsetneqq",!0);B(V,de,he,"","\\@varsupsetneqq");B(V,de,he,"⊮","\\nVdash",!0);B(V,de,he,"⪵","\\precneqq",!0);B(V,de,he,"⪶","\\succneqq",!0);B(V,de,he,"","\\@nsubseteqq");B(V,de,yt,"⊴","\\unlhd");B(V,de,yt,"⊵","\\unrhd");B(V,de,he,"↚","\\nleftarrow",!0);B(V,de,he,"↛","\\nrightarrow",!0);B(V,de,he,"⇍","\\nLeftarrow",!0);B(V,de,he,"⇏","\\nRightarrow",!0);B(V,de,he,"↮","\\nleftrightarrow",!0);B(V,de,he,"⇎","\\nLeftrightarrow",!0);B(V,de,he,"△","\\vartriangle");B(V,de,ve,"ℏ","\\hslash");B(V,de,ve,"▽","\\triangledown");B(V,de,ve,"◊","\\lozenge");B(V,de,ve,"Ⓢ","\\circledS");B(V,de,ve,"®","\\circledR");B(We,de,ve,"®","\\circledR");B(V,de,ve,"∡","\\measuredangle",!0);B(V,de,ve,"∄","\\nexists");B(V,de,ve,"℧","\\mho");B(V,de,ve,"Ⅎ","\\Finv",!0);B(V,de,ve,"⅁","\\Game",!0);B(V,de,ve,"‵","\\backprime");B(V,de,ve,"▲","\\blacktriangle");B(V,de,ve,"▼","\\blacktriangledown");B(V,de,ve,"■","\\blacksquare");B(V,de,ve,"⧫","\\blacklozenge");B(V,de,ve,"★","\\bigstar");B(V,de,ve,"∢","\\sphericalangle",!0);B(V,de,ve,"∁","\\complement",!0);B(V,de,ve,"ð","\\eth",!0);B(We,te,ve,"ð","ð");B(V,de,ve,"╱","\\diagup");B(V,de,ve,"╲","\\diagdown");B(V,de,ve,"□","\\square");B(V,de,ve,"□","\\Box");B(V,de,ve,"◊","\\Diamond");B(V,de,ve,"¥","\\yen",!0);B(We,de,ve,"¥","\\yen",!0);B(V,de,ve,"✓","\\checkmark",!0);B(We,de,ve,"✓","\\checkmark");B(V,de,ve,"ℶ","\\beth",!0);B(V,de,ve,"ℸ","\\daleth",!0);B(V,de,ve,"ℷ","\\gimel",!0);B(V,de,ve,"ϝ","\\digamma",!0);B(V,de,ve,"ϰ","\\varkappa");B(V,de,Ya,"┌","\\@ulcorner",!0);B(V,de,Qo,"┐","\\@urcorner",!0);B(V,de,Ya,"└","\\@llcorner",!0);B(V,de,Qo,"┘","\\@lrcorner",!0);B(V,de,he,"≦","\\leqq",!0);B(V,de,he,"⩽","\\leqslant",!0);B(V,de,he,"⪕","\\eqslantless",!0);B(V,de,he,"≲","\\lesssim",!0);B(V,de,he,"⪅","\\lessapprox",!0);B(V,de,he,"≊","\\approxeq",!0);B(V,de,yt,"⋖","\\lessdot");B(V,de,he,"⋘","\\lll",!0);B(V,de,he,"≶","\\lessgtr",!0);B(V,de,he,"⋚","\\lesseqgtr",!0);B(V,de,he,"⪋","\\lesseqqgtr",!0);B(V,de,he,"≑","\\doteqdot");B(V,de,he,"≓","\\risingdotseq",!0);B(V,de,he,"≒","\\fallingdotseq",!0);B(V,de,he,"∽","\\backsim",!0);B(V,de,he,"⋍","\\backsimeq",!0);B(V,de,he,"⫅","\\subseteqq",!0);B(V,de,he,"⋐","\\Subset",!0);B(V,de,he,"⊏","\\sqsubset",!0);B(V,de,he,"≼","\\preccurlyeq",!0);B(V,de,he,"⋞","\\curlyeqprec",!0);B(V,de,he,"≾","\\precsim",!0);B(V,de,he,"⪷","\\precapprox",!0);B(V,de,he,"⊲","\\vartriangleleft");B(V,de,he,"⊴","\\trianglelefteq");B(V,de,he,"⊨","\\vDash",!0);B(V,de,he,"⊪","\\Vvdash",!0);B(V,de,he,"⌣","\\smallsmile");B(V,de,he,"⌢","\\smallfrown");B(V,de,he,"≏","\\bumpeq",!0);B(V,de,he,"≎","\\Bumpeq",!0);B(V,de,he,"≧","\\geqq",!0);B(V,de,he,"⩾","\\geqslant",!0);B(V,de,he,"⪖","\\eqslantgtr",!0);B(V,de,he,"≳","\\gtrsim",!0);B(V,de,he,"⪆","\\gtrapprox",!0);B(V,de,yt,"⋗","\\gtrdot");B(V,de,he,"⋙","\\ggg",!0);B(V,de,he,"≷","\\gtrless",!0);B(V,de,he,"⋛","\\gtreqless",!0);B(V,de,he,"⪌","\\gtreqqless",!0);B(V,de,he,"≖","\\eqcirc",!0);B(V,de,he,"≗","\\circeq",!0);B(V,de,he,"≜","\\triangleq",!0);B(V,de,he,"∼","\\thicksim");B(V,de,he,"≈","\\thickapprox");B(V,de,he,"⫆","\\supseteqq",!0);B(V,de,he,"⋑","\\Supset",!0);B(V,de,he,"⊐","\\sqsupset",!0);B(V,de,he,"≽","\\succcurlyeq",!0);B(V,de,he,"⋟","\\curlyeqsucc",!0);B(V,de,he,"≿","\\succsim",!0);B(V,de,he,"⪸","\\succapprox",!0);B(V,de,he,"⊳","\\vartriangleright");B(V,de,he,"⊵","\\trianglerighteq");B(V,de,he,"⊩","\\Vdash",!0);B(V,de,he,"∣","\\shortmid");B(V,de,he,"∥","\\shortparallel");B(V,de,he,"≬","\\between",!0);B(V,de,he,"⋔","\\pitchfork",!0);B(V,de,he,"∝","\\varpropto");B(V,de,he,"◀","\\blacktriangleleft");B(V,de,he,"∴","\\therefore",!0);B(V,de,he,"∍","\\backepsilon");B(V,de,he,"▶","\\blacktriangleright");B(V,de,he,"∵","\\because",!0);B(V,de,he,"⋘","\\llless");B(V,de,he,"⋙","\\gggtr");B(V,de,yt,"⊲","\\lhd");B(V,de,yt,"⊳","\\rhd");B(V,de,he,"≂","\\eqsim",!0);B(V,te,he,"⋈","\\Join");B(V,de,he,"≑","\\Doteq",!0);B(V,de,yt,"∔","\\dotplus",!0);B(V,de,yt,"∖","\\smallsetminus");B(V,de,yt,"⋒","\\Cap",!0);B(V,de,yt,"⋓","\\Cup",!0);B(V,de,yt,"⩞","\\doublebarwedge",!0);B(V,de,yt,"⊟","\\boxminus",!0);B(V,de,yt,"⊞","\\boxplus",!0);B(V,de,yt,"⋇","\\divideontimes",!0);B(V,de,yt,"⋉","\\ltimes",!0);B(V,de,yt,"⋊","\\rtimes",!0);B(V,de,yt,"⋋","\\leftthreetimes",!0);B(V,de,yt,"⋌","\\rightthreetimes",!0);B(V,de,yt,"⋏","\\curlywedge",!0);B(V,de,yt,"⋎","\\curlyvee",!0);B(V,de,yt,"⊝","\\circleddash",!0);B(V,de,yt,"⊛","\\circledast",!0);B(V,de,yt,"⋅","\\centerdot");B(V,de,yt,"⊺","\\intercal",!0);B(V,de,yt,"⋒","\\doublecap");B(V,de,yt,"⋓","\\doublecup");B(V,de,yt,"⊠","\\boxtimes",!0);B(V,de,he,"⇢","\\dashrightarrow",!0);B(V,de,he,"⇠","\\dashleftarrow",!0);B(V,de,he,"⇇","\\leftleftarrows",!0);B(V,de,he,"⇆","\\leftrightarrows",!0);B(V,de,he,"⇚","\\Lleftarrow",!0);B(V,de,he,"↞","\\twoheadleftarrow",!0);B(V,de,he,"↢","\\leftarrowtail",!0);B(V,de,he,"↫","\\looparrowleft",!0);B(V,de,he,"⇋","\\leftrightharpoons",!0);B(V,de,he,"↶","\\curvearrowleft",!0);B(V,de,he,"↺","\\circlearrowleft",!0);B(V,de,he,"↰","\\Lsh",!0);B(V,de,he,"⇈","\\upuparrows",!0);B(V,de,he,"↿","\\upharpoonleft",!0);B(V,de,he,"⇃","\\downharpoonleft",!0);B(V,te,he,"⊶","\\origof",!0);B(V,te,he,"⊷","\\imageof",!0);B(V,de,he,"⊸","\\multimap",!0);B(V,de,he,"↭","\\leftrightsquigarrow",!0);B(V,de,he,"⇉","\\rightrightarrows",!0);B(V,de,he,"⇄","\\rightleftarrows",!0);B(V,de,he,"↠","\\twoheadrightarrow",!0);B(V,de,he,"↣","\\rightarrowtail",!0);B(V,de,he,"↬","\\looparrowright",!0);B(V,de,he,"↷","\\curvearrowright",!0);B(V,de,he,"↻","\\circlearrowright",!0);B(V,de,he,"↱","\\Rsh",!0);B(V,de,he,"⇊","\\downdownarrows",!0);B(V,de,he,"↾","\\upharpoonright",!0);B(V,de,he,"⇂","\\downharpoonright",!0);B(V,de,he,"⇝","\\rightsquigarrow",!0);B(V,de,he,"⇝","\\leadsto");B(V,de,he,"⇛","\\Rrightarrow",!0);B(V,de,he,"↾","\\restriction");B(V,te,ve,"‘","`");B(V,te,ve,"$","\\$");B(We,te,ve,"$","\\$");B(We,te,ve,"$","\\textdollar");B(V,te,ve,"%","\\%");B(We,te,ve,"%","\\%");B(V,te,ve,"_","\\_");B(We,te,ve,"_","\\_");B(We,te,ve,"_","\\textunderscore");B(V,te,ve,"∠","\\angle",!0);B(V,te,ve,"∞","\\infty",!0);B(V,te,ve,"′","\\prime");B(V,te,ve,"△","\\triangle");B(V,te,ve,"Γ","\\Gamma",!0);B(V,te,ve,"Δ","\\Delta",!0);B(V,te,ve,"Θ","\\Theta",!0);B(V,te,ve,"Λ","\\Lambda",!0);B(V,te,ve,"Ξ","\\Xi",!0);B(V,te,ve,"Π","\\Pi",!0);B(V,te,ve,"Σ","\\Sigma",!0);B(V,te,ve,"Υ","\\Upsilon",!0);B(V,te,ve,"Φ","\\Phi",!0);B(V,te,ve,"Ψ","\\Psi",!0);B(V,te,ve,"Ω","\\Omega",!0);B(V,te,ve,"A","Α");B(V,te,ve,"B","Β");B(V,te,ve,"E","Ε");B(V,te,ve,"Z","Ζ");B(V,te,ve,"H","Η");B(V,te,ve,"I","Ι");B(V,te,ve,"K","Κ");B(V,te,ve,"M","Μ");B(V,te,ve,"N","Ν");B(V,te,ve,"O","Ο");B(V,te,ve,"P","Ρ");B(V,te,ve,"T","Τ");B(V,te,ve,"X","Χ");B(V,te,ve,"¬","\\neg",!0);B(V,te,ve,"¬","\\lnot");B(V,te,ve,"⊤","\\top");B(V,te,ve,"⊥","\\bot");B(V,te,ve,"∅","\\emptyset");B(V,de,ve,"∅","\\varnothing");B(V,te,Qt,"α","\\alpha",!0);B(V,te,Qt,"β","\\beta",!0);B(V,te,Qt,"γ","\\gamma",!0);B(V,te,Qt,"δ","\\delta",!0);B(V,te,Qt,"ϵ","\\epsilon",!0);B(V,te,Qt,"ζ","\\zeta",!0);B(V,te,Qt,"η","\\eta",!0);B(V,te,Qt,"θ","\\theta",!0);B(V,te,Qt,"ι","\\iota",!0);B(V,te,Qt,"κ","\\kappa",!0);B(V,te,Qt,"λ","\\lambda",!0);B(V,te,Qt,"μ","\\mu",!0);B(V,te,Qt,"ν","\\nu",!0);B(V,te,Qt,"ξ","\\xi",!0);B(V,te,Qt,"ο","\\omicron",!0);B(V,te,Qt,"π","\\pi",!0);B(V,te,Qt,"ρ","\\rho",!0);B(V,te,Qt,"σ","\\sigma",!0);B(V,te,Qt,"τ","\\tau",!0);B(V,te,Qt,"υ","\\upsilon",!0);B(V,te,Qt,"ϕ","\\phi",!0);B(V,te,Qt,"χ","\\chi",!0);B(V,te,Qt,"ψ","\\psi",!0);B(V,te,Qt,"ω","\\omega",!0);B(V,te,Qt,"ε","\\varepsilon",!0);B(V,te,Qt,"ϑ","\\vartheta",!0);B(V,te,Qt,"ϖ","\\varpi",!0);B(V,te,Qt,"ϱ","\\varrho",!0);B(V,te,Qt,"ς","\\varsigma",!0);B(V,te,Qt,"φ","\\varphi",!0);B(V,te,yt,"∗","*",!0);B(V,te,yt,"+","+");B(V,te,yt,"−","-",!0);B(V,te,yt,"⋅","\\cdot",!0);B(V,te,yt,"∘","\\circ",!0);B(V,te,yt,"÷","\\div",!0);B(V,te,yt,"±","\\pm",!0);B(V,te,yt,"×","\\times",!0);B(V,te,yt,"∩","\\cap",!0);B(V,te,yt,"∪","\\cup",!0);B(V,te,yt,"∖","\\setminus",!0);B(V,te,yt,"∧","\\land");B(V,te,yt,"∨","\\lor");B(V,te,yt,"∧","\\wedge",!0);B(V,te,yt,"∨","\\vee",!0);B(V,te,ve,"√","\\surd");B(V,te,Ya,"⟨","\\langle",!0);B(V,te,Ya,"∣","\\lvert");B(V,te,Ya,"∥","\\lVert");B(V,te,Qo,"?","?");B(V,te,Qo,"!","!");B(V,te,Qo,"⟩","\\rangle",!0);B(V,te,Qo,"∣","\\rvert");B(V,te,Qo,"∥","\\rVert");B(V,te,he,"=","=");B(V,te,he,":",":");B(V,te,he,"≈","\\approx",!0);B(V,te,he,"≅","\\cong",!0);B(V,te,he,"≥","\\ge");B(V,te,he,"≥","\\geq",!0);B(V,te,he,"←","\\gets");B(V,te,he,">","\\gt",!0);B(V,te,he,"∈","\\in",!0);B(V,te,he,"","\\@not");B(V,te,he,"⊂","\\subset",!0);B(V,te,he,"⊃","\\supset",!0);B(V,te,he,"⊆","\\subseteq",!0);B(V,te,he,"⊇","\\supseteq",!0);B(V,de,he,"⊈","\\nsubseteq",!0);B(V,de,he,"⊉","\\nsupseteq",!0);B(V,te,he,"⊨","\\models");B(V,te,he,"←","\\leftarrow",!0);B(V,te,he,"≤","\\le");B(V,te,he,"≤","\\leq",!0);B(V,te,he,"<","\\lt",!0);B(V,te,he,"→","\\rightarrow",!0);B(V,te,he,"→","\\to");B(V,de,he,"≱","\\ngeq",!0);B(V,de,he,"≰","\\nleq",!0);B(V,te,_u," ","\\ ");B(V,te,_u," ","\\space");B(V,te,_u," ","\\nobreakspace");B(We,te,_u," ","\\ ");B(We,te,_u," "," ");B(We,te,_u," ","\\space");B(We,te,_u," ","\\nobreakspace");B(V,te,_u,"","\\nobreak");B(V,te,_u,"","\\allowbreak");B(V,te,C0,",",",");B(V,te,C0,";",";");B(V,de,yt,"⊼","\\barwedge",!0);B(V,de,yt,"⊻","\\veebar",!0);B(V,te,yt,"⊙","\\odot",!0);B(V,te,yt,"⊕","\\oplus",!0);B(V,te,yt,"⊗","\\otimes",!0);B(V,te,ve,"∂","\\partial",!0);B(V,te,yt,"⊘","\\oslash",!0);B(V,de,yt,"⊚","\\circledcirc",!0);B(V,de,yt,"⊡","\\boxdot",!0);B(V,te,yt,"△","\\bigtriangleup");B(V,te,yt,"▽","\\bigtriangledown");B(V,te,yt,"†","\\dagger");B(V,te,yt,"⋄","\\diamond");B(V,te,yt,"⋆","\\star");B(V,te,yt,"◃","\\triangleleft");B(V,te,yt,"▹","\\triangleright");B(V,te,Ya,"{","\\{");B(We,te,ve,"{","\\{");B(We,te,ve,"{","\\textbraceleft");B(V,te,Qo,"}","\\}");B(We,te,ve,"}","\\}");B(We,te,ve,"}","\\textbraceright");B(V,te,Ya,"{","\\lbrace");B(V,te,Qo,"}","\\rbrace");B(V,te,Ya,"[","\\lbrack",!0);B(We,te,ve,"[","\\lbrack",!0);B(V,te,Qo,"]","\\rbrack",!0);B(We,te,ve,"]","\\rbrack",!0);B(V,te,Ya,"(","\\lparen",!0);B(V,te,Qo,")","\\rparen",!0);B(We,te,ve,"<","\\textless",!0);B(We,te,ve,">","\\textgreater",!0);B(V,te,Ya,"⌊","\\lfloor",!0);B(V,te,Qo,"⌋","\\rfloor",!0);B(V,te,Ya,"⌈","\\lceil",!0);B(V,te,Qo,"⌉","\\rceil",!0);B(V,te,ve,"\\","\\backslash");B(V,te,ve,"∣","|");B(V,te,ve,"∣","\\vert");B(We,te,ve,"|","\\textbar",!0);B(V,te,ve,"∥","\\|");B(V,te,ve,"∥","\\Vert");B(We,te,ve,"∥","\\textbardbl");B(We,te,ve,"~","\\textasciitilde");B(We,te,ve,"\\","\\textbackslash");B(We,te,ve,"^","\\textasciicircum");B(V,te,he,"↑","\\uparrow",!0);B(V,te,he,"⇑","\\Uparrow",!0);B(V,te,he,"↓","\\downarrow",!0);B(V,te,he,"⇓","\\Downarrow",!0);B(V,te,he,"↕","\\updownarrow",!0);B(V,te,he,"⇕","\\Updownarrow",!0);B(V,te,zs,"∐","\\coprod");B(V,te,zs,"⋁","\\bigvee");B(V,te,zs,"⋀","\\bigwedge");B(V,te,zs,"⨄","\\biguplus");B(V,te,zs,"⋂","\\bigcap");B(V,te,zs,"⋃","\\bigcup");B(V,te,zs,"∫","\\int");B(V,te,zs,"∫","\\intop");B(V,te,zs,"∬","\\iint");B(V,te,zs,"∭","\\iiint");B(V,te,zs,"∏","\\prod");B(V,te,zs,"∑","\\sum");B(V,te,zs,"⨂","\\bigotimes");B(V,te,zs,"⨁","\\bigoplus");B(V,te,zs,"⨀","\\bigodot");B(V,te,zs,"∮","\\oint");B(V,te,zs,"∯","\\oiint");B(V,te,zs,"∰","\\oiiint");B(V,te,zs,"⨆","\\bigsqcup");B(V,te,zs,"∫","\\smallint");B(We,te,Ap,"…","\\textellipsis");B(V,te,Ap,"…","\\mathellipsis");B(We,te,Ap,"…","\\ldots",!0);B(V,te,Ap,"…","\\ldots",!0);B(V,te,Ap,"⋯","\\@cdots",!0);B(V,te,Ap,"⋱","\\ddots",!0);B(V,te,ve,"⋮","\\varvdots");B(We,te,ve,"⋮","\\varvdots");B(V,te,Ln,"ˊ","\\acute");B(V,te,Ln,"ˋ","\\grave");B(V,te,Ln,"¨","\\ddot");B(V,te,Ln,"~","\\tilde");B(V,te,Ln,"ˉ","\\bar");B(V,te,Ln,"˘","\\breve");B(V,te,Ln,"ˇ","\\check");B(V,te,Ln,"^","\\hat");B(V,te,Ln,"⃗","\\vec");B(V,te,Ln,"˙","\\dot");B(V,te,Ln,"˚","\\mathring");B(V,te,Qt,"","\\@imath");B(V,te,Qt,"","\\@jmath");B(V,te,ve,"ı","ı");B(V,te,ve,"ȷ","ȷ");B(We,te,ve,"ı","\\i",!0);B(We,te,ve,"ȷ","\\j",!0);B(We,te,ve,"ß","\\ss",!0);B(We,te,ve,"æ","\\ae",!0);B(We,te,ve,"œ","\\oe",!0);B(We,te,ve,"ø","\\o",!0);B(We,te,ve,"Æ","\\AE",!0);B(We,te,ve,"Œ","\\OE",!0);B(We,te,ve,"Ø","\\O",!0);B(We,te,Ln,"ˊ","\\'");B(We,te,Ln,"ˋ","\\`");B(We,te,Ln,"ˆ","\\^");B(We,te,Ln,"˜","\\~");B(We,te,Ln,"ˉ","\\=");B(We,te,Ln,"˘","\\u");B(We,te,Ln,"˙","\\.");B(We,te,Ln,"¸","\\c");B(We,te,Ln,"˚","\\r");B(We,te,Ln,"ˇ","\\v");B(We,te,Ln,"¨",'\\"');B(We,te,Ln,"˝","\\H");B(We,te,Ln,"◯","\\textcircled");var VF={"--":!0,"---":!0,"``":!0,"''":!0};B(We,te,ve,"–","--",!0);B(We,te,ve,"–","\\textendash");B(We,te,ve,"—","---",!0);B(We,te,ve,"—","\\textemdash");B(We,te,ve,"‘","`",!0);B(We,te,ve,"‘","\\textquoteleft");B(We,te,ve,"’","'",!0);B(We,te,ve,"’","\\textquoteright");B(We,te,ve,"“","``",!0);B(We,te,ve,"“","\\textquotedblleft");B(We,te,ve,"”","''",!0);B(We,te,ve,"”","\\textquotedblright");B(V,te,ve,"°","\\degree",!0);B(We,te,ve,"°","\\degree");B(We,te,ve,"°","\\textdegree",!0);B(V,te,ve,"£","\\pounds");B(V,te,ve,"£","\\mathsterling",!0);B(We,te,ve,"£","\\pounds");B(We,te,ve,"£","\\textsterling",!0);B(V,de,ve,"✠","\\maltese");B(We,de,ve,"✠","\\maltese");var iR='0123456789/@."';for(var bk=0;bk{var r=e.charCodeAt(0),t=e.charCodeAt(1),n=(r-55296)*1024+(t-56320)+65536;if(119808<=n&&n<120484){var s=Math.floor((n-119808)/26);return gR[s]}else if(120782<=n&&n<=120831){var o=Math.floor((n-120782)/10);return QBn[o]}else{if(n===120485||n===120486)return gR[0];if(120486{if(k_(e.classes)!==k_(r.classes)||e.skew!==r.skew||e.maxFontSize!==r.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var t=e.classes[0];if(t==="mbin"||t==="mord")return!1}for(var n of Object.keys(e.style))if(e.style[n]!==r.style[n])return!1;for(var s of Object.keys(r.style))if(e.style[s]!==r.style[s])return!1;return!0},QF=e=>{for(var r=0;rt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>s&&(s=a.maxFontSize)}r.height=t,r.depth=n,r.maxFontSize=s},Qe=function(r,t,n,s){var o=new Np(r,t,n,s);return B6(o),o},S_=(e,r,t,n)=>new Np(e,r,t,n),lp=function(r,t,n){var s=Qe([r],[],t);return s.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=ot(s.height),s.maxFontSize=1,s},JBn=function(r,t,n,s){var o=new ix(r,t,n,s);return B6(o),o},fu=function(r){var t=new Ep(r);return B6(t),t},up=function(r,t){return r instanceof Ep?Qe([],[r],t):r},eFn=function(r){if(r.positionType==="individualShift"){for(var t=r.children,n=[t[0]],s=-t[0].shift-t[0].elem.depth,o=s,a=1;a{var t=Qe(["mspace"],[],r),n=Un(e,r);return t.style.marginRight=ot(n),t},i1=(e,r,t)=>{var n,s;switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return r==="textbf"&&t==="textit"?s="BoldItalic":r==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",n+"-"+s},k5={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},YF={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ZF=function(r,t){var[n,s,o]=YF[r],a=new j_(n),i=new au([a],{width:ot(s),height:ot(o),style:"width:"+ot(s),viewBox:"0 0 "+1e3*s+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),c=S_(["overlay"],[i],t);return c.height=o,c.style.height=ot(o),c.style.width=ot(s),c},Hn={number:3,unit:"mu"},_f={number:4,unit:"mu"},Ll={number:5,unit:"mu"},tFn={mord:{mop:Hn,mbin:_f,mrel:Ll,minner:Hn},mop:{mord:Hn,mop:Hn,mrel:Ll,minner:Hn},mbin:{mord:_f,mop:_f,mopen:_f,minner:_f},mrel:{mord:Ll,mop:Ll,mopen:Ll,minner:Ll},mopen:{},mclose:{mop:Hn,mbin:_f,mrel:Ll,minner:Hn},mpunct:{mord:Hn,mop:Hn,mrel:Ll,mopen:Hn,mclose:Hn,mpunct:Hn,minner:Hn},minner:{mord:Hn,mop:Hn,mbin:_f,mrel:Ll,mopen:Hn,mpunct:Hn,minner:Hn}},rFn={mord:{mop:Hn},mop:{mord:Hn,mop:Hn},mbin:{},mrel:{},mopen:{},mclose:{mop:Hn},mpunct:{},minner:{mop:Hn}},JF={},Gb={},Wb={};function gt(e){for(var{type:r,names:t,props:n,handler:s,htmlBuilder:o,mathmlBuilder:a}=e,i={type:r,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:s},c=0;c{var v=x.classes[0],b=k.classes[0];v==="mbin"&&sFn.has(b)?x.classes[0]="mord":b==="mbin"&&nFn.has(v)&&(k.classes[0]="mord")},{node:_},p,m),j5(o,(k,x)=>{var v,b,w=C5(x),y=C5(k),S=w&&y?k.hasClass("mtight")?(v=rFn[w])==null?void 0:v[y]:(b=tFn[w])==null?void 0:b[y]:null;if(S)return XF(S,u)},{node:_},p,m),o},j5=function(r,t,n,s,o){s&&r.push(s);for(var a=0;ap=>{r.splice(_+1,0,p),a++})(a)}s&&r.pop()},eH=function(r){return r instanceof Ep||r instanceof ix||r instanceof Np&&r.hasClass("enclosing")?r:null},S5=function(r,t){var n=eH(r);if(n){var s=n.children;if(s.length){if(t==="right")return S5(s[s.length-1],"right");if(t==="left")return S5(s[0],"left")}}return r},C5=function(r,t){if(!r)return null;t&&(r=S5(r,t));var n=r.classes[0];return aFn[n]||null},Eg=function(r,t){var n=["nulldelimiter"].concat(r.baseSizingClasses());return Qe(t.concat(n))},Yr=function(r,t,n){if(!r)return Qe();if(Gb[r.type]){var s=Gb[r.type](r,t);if(n&&t.size!==n.size){s=Qe(t.sizingClasses(n),[s],t);var o=t.sizeMultiplier/n.sizeMultiplier;s.height*=o,s.depth*=o}return s}else throw new tt("Got group of unknown type: '"+r.type+"'")};function c1(e,r){var t=Qe(["base"],e,r),n=Qe(["strut"]);return n.style.height=ot(t.height+t.depth),t.depth&&(n.style.verticalAlign=ot(-t.depth)),t.children.unshift(n),t}function z5(e,r){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var n=Is(e,r,"root"),s;n.length===2&&n[1].hasClass("tag")&&(s=n.pop());for(var o=[],a=[],i=0;i0&&(o.push(c1(a,r)),a=[]),o.push(n[i]));a.length>0&&o.push(c1(a,r));var u;t?(u=c1(Is(t,r,!0),r),u.classes=["tag"],o.push(u)):s&&o.push(s);var d=Qe(["katex-html"],o);if(d.setAttribute("aria-hidden","true"),u){var _=u.children[0];_.style.height=ot(d.height+d.depth),d.depth&&(_.style.verticalAlign=ot(-d.depth))}return d}function tH(e){return new Ep(e)}class rt{constructor(r,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=r,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(r,t){this.attributes[r]=t}getAttribute(r){return this.attributes[r]}toNode(){var r=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&r.setAttribute(t,this.attributes[t]);this.classes.length>0&&(r.className=k_(this.classes));for(var n=0;n0&&(r+=' class ="'+zo(k_(this.classes))+'"'),r+=">";for(var n=0;n",r}toText(){return this.children.map(r=>r.toText()).join("")}}class Cs{constructor(r){this.text=void 0,this.text=r}toNode(){return document.createTextNode(this.text)}toMarkup(){return zo(this.toText())}toText(){return this.text}}class rH{constructor(r){this.width=void 0,this.character=void 0,this.width=r,r>=.05555&&r<=.05556?this.character=" ":r>=.1666&&r<=.1667?this.character=" ":r>=.2222&&r<=.2223?this.character=" ":r>=.2777&&r<=.2778?this.character="  ":r>=-.05556&&r<=-.05555?this.character=" ⁣":r>=-.1667&&r<=-.1666?this.character=" ⁣":r>=-.2223&&r<=-.2222?this.character=" ⁣":r>=-.2778&&r<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var r=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return r.setAttribute("width",ot(this.width)),r}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var iFn=new Set(["\\imath","\\jmath"]),cFn=new Set(["mrow","mtable"]),zi=function(r,t,n){return $n[t][r]&&$n[t][r].replace&&r.charCodeAt(0)!==55349&&!(VF.hasOwnProperty(r)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(r=$n[t][r].replace),new Cs(r)},F6=function(r){return r.length===1?r[0]:new rt("mrow",r)},lFn={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},H6=(e,r)=>{if(e.mode==="text"){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold"}var t=r.font;if(!t||t==="mathnormal")return null;var n=e.mode,s=lFn[t];if(s)return typeof s=="function"?s(e):s;var o=e.text;if(iFn.has(o))return null;if($n[n][o]){var a=$n[n][o].replace;a&&(o=a)}var i=k5[t].fontName;return I6(o,i,n)?k5[t].variant:null};function kk(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var r=e.children[0];return r instanceof Cs&&r.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var t=e.children[0];return t instanceof Cs&&t.text===","}else return!1}var Za=function(r,t,n){if(r.length===1){var s=bn(r[0],t);return n&&s instanceof rt&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var o=[],a,i=0;i=1&&(a.type==="mn"||kk(a))){var u=c.children[0];u instanceof rt&&u.type==="mn"&&(u.children=[...a.children,...u.children],o.pop())}else if(a.type==="mi"&&a.children.length===1){var d=a.children[0];if(d instanceof Cs&&d.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var _=c.children[0];_ instanceof Cs&&_.text.length>0&&(_.text=_.text.slice(0,1)+"̸"+_.text.slice(1),o.pop())}}}o.push(c),a=c}return o},C_=function(r,t,n){return F6(Za(r,t,n))},bn=function(r,t){if(!r)return new rt("mrow");if(Wb[r.type])return Wb[r.type](r,t);throw new tt("Got group of unknown type: '"+r.type+"'")};function vR(e,r,t,n,s){var o=Za(e,t),a;o.length===1&&o[0]instanceof rt&&cFn.has(o[0].type)?a=o[0]:a=new rt("mrow",o);var i=new rt("annotation",[new Cs(r)]);i.setAttribute("encoding","application/x-tex");var c=new rt("semantics",[a,i]),u=new rt("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var d=s?"katex":"katex-mathml";return Qe([d],[u])}var uFn=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],bR=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],yR=function(r,t){return t.size<2?r:uFn[r-1][t.size-1]};class Hl{constructor(r){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=r.style,this.color=r.color,this.size=r.size||Hl.BASESIZE,this.textSize=r.textSize||this.size,this.phantom=!!r.phantom,this.font=r.font||"",this.fontFamily=r.fontFamily||"",this.fontWeight=r.fontWeight||"",this.fontShape=r.fontShape||"",this.sizeMultiplier=bR[this.size-1],this.maxSize=r.maxSize,this.minRuleThickness=r.minRuleThickness,this._fontMetrics=void 0}extend(r){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,r),new Hl(t)}havingStyle(r){return this.style===r?this:this.extend({style:r,size:yR(this.textSize,r)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(r){return this.size===r&&this.textSize===r?this:this.extend({style:this.style.text(),size:r,textSize:r,sizeMultiplier:bR[r-1]})}havingBaseStyle(r){r=r||this.style.text();var t=yR(Hl.BASESIZE,r);return this.size===t&&this.textSize===Hl.BASESIZE&&this.style===r?this:this.extend({style:r,size:t})}havingBaseSizing(){var r;switch(this.style.id){case 4:case 5:r=3;break;case 6:case 7:r=1;break;default:r=6}return this.extend({style:this.style.text(),size:r})}withColor(r){return this.extend({color:r})}withPhantom(){return this.extend({phantom:!0})}withFont(r){return this.extend({font:r})}withTextFontFamily(r){return this.extend({fontFamily:r,font:""})}withTextFontWeight(r){return this.extend({fontWeight:r,font:""})}withTextFontShape(r){return this.extend({fontShape:r,font:""})}sizingClasses(r){return r.size!==this.size?["sizing","reset-size"+r.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Hl.BASESIZE?["sizing","reset-size"+this.size,"size"+Hl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=KBn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Hl.BASESIZE=6;var nH=function(r){return new Hl({style:r.displayMode?ir.DISPLAY:ir.TEXT,maxSize:r.maxSize,minRuleThickness:r.minRuleThickness})},sH=function(r,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),r=Qe(n,[r])}return r},_Fn=function(r,t,n){var s=nH(n),o;if(n.output==="mathml")return vR(r,t,s,n.displayMode,!0);if(n.output==="html"){var a=z5(r,s);o=Qe(["katex"],[a])}else{var i=vR(r,t,s,n.displayMode,!1),c=z5(r,s);o=Qe(["katex"],[i,c])}return sH(o,n)},fFn=function(r,t,n){var s=nH(n),o=z5(r,s),a=Qe(["katex"],[o]);return sH(a,n)},dFn={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},ux=function(r){var t=new rt("mo",[new Cs(dFn[r.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},hFn={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},pFn=new Set(["widehat","widecheck","widetilde","utilde"]),_x=function(r,t){function n(){var i=4e5,c=r.label.slice(1);if(pFn.has(c)&&"base"in r){var u=r.base.type==="ordgroup"?r.base.body.length:1,d,_,p;if(u>5)c==="widehat"||c==="widecheck"?(d=420,i=2364,p=.42,_=c+"4"):(d=312,i=2340,p=.34,_="tilde4");else{var m=[1,1,2,2,3,3][u];c==="widehat"||c==="widecheck"?(i=[0,1062,2364,2364,2364][m],d=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],_=c+m):(i=[0,600,1033,2339,2340][m],d=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],_="tilde"+m)}var k=new j_(_),x=new au([k],{width:"100%",height:ot(p),viewBox:"0 0 "+i+" "+d,preserveAspectRatio:"none"});return{span:S_([],[x],t),minWidth:0,height:p}}else{var v=[],b=hFn[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[w,y,S]=b,z=S/1e3,N=w.length,A,E;if(N===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');A=["hide-tail"],E=[b[3]]}else if(N===2)A=["halfarrow-left","halfarrow-right"],E=["xMinYMin","xMaxYMin"];else if(N===3)A=["brace-left","brace-center","brace-right"],E=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+N+" children.");for(var M=0;M0&&(s.style.minWidth=ot(o)),s},mFn=function(r,t,n,s,o){var a,i=r.height+r.depth+n+s;if(/fbox|color|angl/.test(t)){if(a=Qe(["stretchy",t],[],o),t==="fbox"){var c=o.color&&o.getColor();c&&(a.style.borderColor=c)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new g5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new g5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new au(u,{width:"100%",height:ot(i)});a=S_([],[d],o)}return a.height=i,a.style.height=ot(i),a},gFn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},vFn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function bFn(e){return e in gFn}function br(e,r){if(!e||e.type!==r)throw new Error("Expected node of type "+r+", but got "+(e?"node of type "+e.type:String(e)));return e}function fx(e){var r=dx(e);if(!r)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return r}function dx(e){return e&&(e.type==="atom"||vFn.hasOwnProperty(e.type))?e:null}var oH=e=>{if(e instanceof Ka)return e;if(GBn(e)&&e.children.length===1)return oH(e.children[0])},q6=(e,r)=>{var t,n,s;e&&e.type==="supsub"?(n=br(e.base,"accent"),t=n.base,e.base=t,s=UBn(Yr(e,r)),e.base=n):(n=br(e,"accent"),t=n.base);var o=Yr(t,r.havingCrampedStyle()),a=n.isShifty&&uu(t),i=0;if(a){var c,u;i=(c=(u=oH(o))==null?void 0:u.skew)!=null?c:0}var d=n.label==="\\c",_=d?o.height+o.depth:Math.min(o.height,r.fontMetrics().xHeight),p;if(n.isStretchy)p=_x(n,r),p=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+ot(2*i)+")",marginLeft:ot(2*i)}:void 0}]});else{var m,k;n.label==="\\vec"?(m=ZF("vec",r),k=YF.vec[1]):(m=lx({mode:n.mode,text:n.label},r,"textord"),m=qBn(m),m.italic=0,k=m.width,d&&(_+=m.depth)),p=Qe(["accent-body"],[m]);var x=n.label==="\\textcircled";x&&(p.classes.push("accent-full"),_=o.height);var v=i;x||(v-=k/2),p.style.left=ot(v),n.label==="\\textcircled"&&(p.style.top=".2em"),p=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-_},{type:"elem",elem:p}]})}var b=Qe(["mord","accent"],[p],r);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},aH=(e,r)=>{var t=e.isStretchy?ux(e.label):new rt("mo",[zi(e.label,e.mode)]),n=new rt("mover",[bn(e.base,r),t]);return n.setAttribute("accent","true"),n},yFn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));gt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,r)=>{var t=Kb(r[0]),n=!yFn.test(e.funcName),s=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:s,base:t}},htmlBuilder:q6,mathmlBuilder:aH});gt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,r)=>{var t=r[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:q6,mathmlBuilder:aH});gt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"accentUnder",mode:t.mode,label:n,base:s}},htmlBuilder:(e,r)=>{var t=Yr(e.base,r),n=_x(e,r),s=e.label==="\\utilde"?.12:0,o=Qr({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Qe(["mord","accentunder"],[o],r)},mathmlBuilder:(e,r)=>{var t=ux(e.label),n=new rt("munder",[bn(e.base,r),t]);return n.setAttribute("accentunder","true"),n}});var l1=e=>{var r=new rt("mpadded",e?[e]:[]);return r.setAttribute("width","+0.6em"),r.setAttribute("lspace","0.3em"),r};gt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,r,t){var{parser:n,funcName:s}=e;return{type:"xArrow",mode:n.mode,label:s,body:r[0],below:t[0]}},htmlBuilder(e,r){var t=r.style,n=r.havingStyle(t.sup()),s=up(Yr(e.body,n,r),r),o=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(o+"-arrow-pad");var a;e.below&&(n=r.havingStyle(t.sub()),a=up(Yr(e.below,n,r),r),a.classes.push(o+"-arrow-pad"));var i=_x(e,r),c=-r.fontMetrics().axisHeight+.5*i.height,u=-r.fontMetrics().axisHeight-.5*i.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var d;if(a){var _=-r.fontMetrics().axisHeight+a.height+.5*i.height+.111;d=Qr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:i,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:_}]})}else d=Qr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:i,shift:c,wrapperClasses:["svg-align"]}]});return Qe(["mrel","x-arrow"],[d],r)},mathmlBuilder(e,r){var t=ux(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var s=l1(bn(e.body,r));if(e.below){var o=l1(bn(e.below,r));n=new rt("munderover",[t,o,s])}else n=new rt("mover",[t,s])}else if(e.below){var a=l1(bn(e.below,r));n=new rt("munder",[t,a])}else n=l1(),n=new rt("mover",[t,n]);return n}});function iH(e,r){var t=Is(e.body,r,!0);return Qe([e.mclass],t,r)}function cH(e,r){var t,n=Za(e.body,r);return e.mclass==="minner"?t=new rt("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(t=n[0],t.type="mi"):t=new rt("mi",n):(e.isCharacterBox?(t=n[0],t.type="mo"):t=new rt("mo",n),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}gt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"mclass",mode:t.mode,mclass:"m"+n.slice(5),body:Ss(s),isCharacterBox:uu(s)}},htmlBuilder:iH,mathmlBuilder:cH});var hx=e=>{var r=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return r.type==="atom"&&(r.family==="bin"||r.family==="rel")?"m"+r.family:"mord"};gt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,r){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:hx(r[0]),body:Ss(r[1]),isCharacterBox:uu(r[1])}}});gt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,r){var{parser:t,funcName:n}=e,s=r[1],o=r[0],a;n!=="\\stackrel"?a=hx(s):a="mrel";var i={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Ss(s)},c={type:"supsub",mode:o.mode,base:i,sup:n==="\\underset"?null:o,sub:n==="\\underset"?o:null};return{type:"mclass",mode:t.mode,mclass:a,body:[c],isCharacterBox:uu(c)}},htmlBuilder:iH,mathmlBuilder:cH});gt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:hx(r[0]),body:Ss(r[0])}},htmlBuilder(e,r){var t=Is(e.body,r,!0),n=Qe([e.mclass],t,r);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,r){var t=Za(e.body,r),n=new rt("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var xFn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},xR=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),wR=e=>e.type==="textord"&&e.text==="@",wFn=(e,r)=>(e.type==="mathord"||e.type==="atom")&&e.text===r;function kFn(e,r,t){var n=xFn[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(n,[r[0]],[r[1]]);case"\\uparrow":case"\\downarrow":{var s=t.callFunction("\\\\cdleft",[r[0]],[]),o={type:"atom",text:n,mode:"math",family:"rel"},a=t.callFunction("\\Big",[o],[]),i=t.callFunction("\\\\cdright",[r[1]],[]),c={type:"ordgroup",mode:"math",body:[s,a,i]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function jFn(e){var r=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){r.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var t=e.fetch().text;if(t==="&"||t==="\\\\")e.consume();else if(t==="\\end"){r[r.length-1].length===0&&r.pop();break}else throw new tt("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],s=[n],o=0;oAV".includes(u))for(var _=0;_<2;_++){for(var p=!0,m=c+1;mAV=|." after @',a[c]);var k=kFn(u,d,e),x={type:"styling",body:[k],mode:"math",style:"display",resetFont:!0};n.push(x),i=xR()}o%2===0?n.push(i):n.shift(),n=[],s.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var v=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}gt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e;return{type:"cdlabel",mode:t.mode,side:n.slice(4),label:r[0]}},htmlBuilder(e,r){var t=r.havingStyle(r.style.sup()),n=up(Yr(e.label,t,r),r);return n.classes.push("cd-label-"+e.side),n.style.bottom=ot(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,r){var t=new rt("mrow",[bn(e.label,r)]);return t=new rt("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new rt("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});gt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,r){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:r[0]}},htmlBuilder(e,r){var t=up(Yr(e.fragment,r),r);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,r){return new rt("mrow",[bn(e.fragment,r)])}});gt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,r){for(var{parser:t}=e,n=br(r[0],"ordgroup"),s=n.body,o="",a=0;a=1114111)throw new tt("\\@char with invalid code point "+o);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var lH=(e,r)=>{var t=Is(e.body,r.withColor(e.color),!1);return fu(t)},uH=(e,r)=>{var t=Za(e.body,r.withColor(e.color)),n=new rt("mstyle",t);return n.setAttribute("mathcolor",e.color),n};gt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,r){var{parser:t}=e,n=br(r[0],"color-token").color,s=r[1];return{type:"color",mode:t.mode,color:n,body:Ss(s)}},htmlBuilder:lH,mathmlBuilder:uH});gt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,r){var{parser:t,breakOnTokenText:n}=e,s=br(r[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var o=t.parseExpression(!0,n);return{type:"color",mode:t.mode,color:s,body:o}},htmlBuilder:lH,mathmlBuilder:uH});gt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,r,t){var{parser:n}=e,s=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,o=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:o,size:s&&br(s,"size").value}},htmlBuilder(e,r){var t=Qe(["mspace"],[],r);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=ot(Un(e.size,r)))),t},mathmlBuilder(e,r){var t=new rt("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",ot(Un(e.size,r)))),t}});var E5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},_H=e=>{var r=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new tt("Expected a control sequence",e);return r},SFn=e=>{var r=e.gullet.popToken();return r.text==="="&&(r=e.gullet.popToken(),r.text===" "&&(r=e.gullet.popToken())),r},fH=(e,r,t,n)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(r,s,n)};gt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:r,funcName:t}=e;r.consumeSpaces();var n=r.fetch();if(E5[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=E5[n.text]),br(r.parseFunction(),"internal");throw new tt("Invalid token after macro prefix",n)}});gt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=r.gullet.popToken(),s=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new tt("Expected a control sequence",n);for(var o=0,a,i=[[]];r.gullet.future().text!=="{";)if(n=r.gullet.popToken(),n.text==="#"){if(r.gullet.future().text==="{"){a=r.gullet.future(),i[o].push("{");break}if(n=r.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new tt('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==o+1)throw new tt('Argument number "'+n.text+'" out of order');o++,i.push([])}else{if(n.text==="EOF")throw new tt("Expected a macro definition");i[o].push(n.text)}var{tokens:c}=r.gullet.consumeArg();return a&&c.unshift(a),(t==="\\edef"||t==="\\xdef")&&(c=r.gullet.expandTokens(c),c.reverse()),r.gullet.macros.set(s,{tokens:c,numArgs:o,delimiters:i},t===E5[t]),{type:"internal",mode:r.mode}}});gt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=_H(r.gullet.popToken());r.gullet.consumeSpaces();var s=SFn(r);return fH(r,n,s,t==="\\\\globallet"),{type:"internal",mode:r.mode}}});gt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=_H(r.gullet.popToken()),s=r.gullet.popToken(),o=r.gullet.popToken();return fH(r,n,o,t==="\\\\globalfuture"),r.gullet.pushToken(o),r.gullet.pushToken(s),{type:"internal",mode:r.mode}}});var Pm=function(r,t,n){var s=$n.math[r]&&$n.math[r].replace,o=I6(s||r,t,n);if(!o)throw new Error("Unsupported symbol "+r+" and font size "+t+".");return o},U6=function(r,t,n,s){var o=n.havingBaseStyle(t),a=Qe(s.concat(o.sizingClasses(n)),[r],n),i=o.sizeMultiplier/n.sizeMultiplier;return a.height*=i,a.depth*=i,a.maxFontSize=o.sizeMultiplier,a},dH=function(r,t,n){var s=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;r.classes.push("delimcenter"),r.style.top=ot(o),r.height-=o,r.depth+=o},CFn=function(r,t,n,s,o,a){var i=Go(r,"Main-Regular",o,s),c=U6(i,t,s,a);return dH(c,s,t),c},zFn=function(r,t,n,s){return Go(r,"Size"+t+"-Regular",n,s)},hH=function(r,t,n,s,o,a){var i=zFn(r,t,o,s),c=U6(Qe(["delimsizing","size"+t],[i],s),ir.TEXT,s,a);return n&&dH(c,s,ir.TEXT),c},jk=function(r,t,n){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var o=Qe(["delimsizinginner",s],[Qe([],[Go(r,t,n)])]);return{type:"elem",elem:o}},Sk=function(r,t,n){var s=Dc["Size4-Regular"][r.charCodeAt(0)]?Dc["Size4-Regular"][r.charCodeAt(0)][4]:Dc["Size1-Regular"][r.charCodeAt(0)][4],o=new j_("inner",DBn(r,Math.round(1e3*t))),a=new au([o],{width:ot(s),height:ot(t),style:"width:"+ot(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=S_([],[a],n);return i.height=t,i.style.height=ot(t),i.style.width=ot(s),{type:"elem",elem:i}},N5=.008,u1={type:"kern",size:-1*N5},EFn=new Set(["|","\\lvert","\\rvert","\\vert"]),NFn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),pH=function(r,t,n,s,o,a){var i,c,u,d,_="",p=0;i=u=d=r,c=null;var m="Size1-Regular";r==="\\uparrow"?u=d="⏐":r==="\\Uparrow"?u=d="‖":r==="\\downarrow"?i=u="⏐":r==="\\Downarrow"?i=u="‖":r==="\\updownarrow"?(i="\\uparrow",u="⏐",d="\\downarrow"):r==="\\Updownarrow"?(i="\\Uparrow",u="‖",d="\\Downarrow"):EFn.has(r)?(u="∣",_="vert",p=333):NFn.has(r)?(u="∥",_="doublevert",p=556):r==="["||r==="\\lbrack"?(i="⎡",u="⎢",d="⎣",m="Size4-Regular",_="lbrack",p=667):r==="]"||r==="\\rbrack"?(i="⎤",u="⎥",d="⎦",m="Size4-Regular",_="rbrack",p=667):r==="\\lfloor"||r==="⌊"?(u=i="⎢",d="⎣",m="Size4-Regular",_="lfloor",p=667):r==="\\lceil"||r==="⌈"?(i="⎡",u=d="⎢",m="Size4-Regular",_="lceil",p=667):r==="\\rfloor"||r==="⌋"?(u=i="⎥",d="⎦",m="Size4-Regular",_="rfloor",p=667):r==="\\rceil"||r==="⌉"?(i="⎤",u=d="⎥",m="Size4-Regular",_="rceil",p=667):r==="("||r==="\\lparen"?(i="⎛",u="⎜",d="⎝",m="Size4-Regular",_="lparen",p=875):r===")"||r==="\\rparen"?(i="⎞",u="⎟",d="⎠",m="Size4-Regular",_="rparen",p=875):r==="\\{"||r==="\\lbrace"?(i="⎧",c="⎨",d="⎩",u="⎪",m="Size4-Regular"):r==="\\}"||r==="\\rbrace"?(i="⎫",c="⎬",d="⎭",u="⎪",m="Size4-Regular"):r==="\\lgroup"||r==="⟮"?(i="⎧",d="⎩",u="⎪",m="Size4-Regular"):r==="\\rgroup"||r==="⟯"?(i="⎫",d="⎭",u="⎪",m="Size4-Regular"):r==="\\lmoustache"||r==="⎰"?(i="⎧",d="⎭",u="⎪",m="Size4-Regular"):(r==="\\rmoustache"||r==="⎱")&&(i="⎫",d="⎩",u="⎪",m="Size4-Regular");var k=Pm(i,m,o),x=k.height+k.depth,v=Pm(u,m,o),b=v.height+v.depth,w=Pm(d,m,o),y=w.height+w.depth,S=0,z=1;if(c!==null){var N=Pm(c,m,o);S=N.height+N.depth,z=2}var A=x+y+S,E=Math.max(0,Math.ceil((t-A)/(z*b))),M=A+E*z*b,$=s.fontMetrics().axisHeight;n&&($*=s.sizeMultiplier);var D=M/2-$,I=[];if(_.length>0){var G=M-x-y,H=Math.round(M*1e3),Q=LBn(_,Math.round(G*1e3)),K=new j_(_,Q),J=ot(p/1e3),ee=ot(H/1e3),P=new au([K],{width:J,height:ee,viewBox:"0 0 "+p+" "+H}),L=S_([],[P],s);L.height=H/1e3,L.style.width=J,L.style.height=ee,I.push({type:"elem",elem:L})}else{if(I.push(jk(d,m,o)),I.push(u1),c===null){var F=M-x-y+2*N5;I.push(Sk(u,F,s))}else{var q=(M-x-y-S)/2+2*N5;I.push(Sk(u,q,s)),I.push(u1),I.push(jk(c,m,o)),I.push(u1),I.push(Sk(u,q,s))}I.push(u1),I.push(jk(i,m,o))}var U=s.havingBaseStyle(ir.TEXT),oe=Qr({positionType:"bottom",positionData:D,children:I});return U6(Qe(["delimsizing","mult"],[oe],U),ir.TEXT,s,a)},Ck=80,zk=.08,Ek=function(r,t,n,s,o){var a=$Bn(r,s,n),i=new j_(r,a),c=new au([i],{width:"400em",height:ot(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return S_(["hide-tail"],[c],o)},AFn=function(r,t){var n=t.havingBaseSizing(),s=yH("\\surd",r*n.sizeMultiplier,bH,n),o=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),i,c,u,d,_;return s.type==="small"?(d=1e3+1e3*a+Ck,r<1?o=1:r<1.4&&(o=.7),c=(1+a+zk)/o,u=(1+a)/o,i=Ek("sqrtMain",c,d,a,t),i.style.minWidth="0.853em",_=.833/o):s.type==="large"?(d=(1e3+Ck)*tg[s.size],u=(tg[s.size]+a)/o,c=(tg[s.size]+a+zk)/o,i=Ek("sqrtSize"+s.size,c,d,a,t),i.style.minWidth="1.02em",_=1/o):(c=r+a+zk,u=r+a,d=Math.floor(1e3*r+a)+Ck,i=Ek("sqrtTall",c,d,a,t),i.style.minWidth="0.742em",_=1.056),i.height=u,i.style.height=ot(c),{span:i,advanceWidth:_,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*o}},mH=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),TFn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),gH=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),tg=[0,1.2,1.8,2.4,3],vH=function(r,t,n,s,o){if(r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle"),mH.has(r)||gH.has(r))return hH(r,t,!1,n,s,o);if(TFn.has(r))return pH(r,tg[t],!1,n,s,o);throw new tt("Illegal delimiter: '"+r+"'")},RFn=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],MFn=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"stack"}],bH=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],OFn=function(r){if(r.type==="small")return"Main-Regular";if(r.type==="large")return"Size"+r.size+"-Regular";if(r.type==="stack")return"Size4-Regular";var t=r.type;throw new Error("Add support for delim type '"+t+"' here.")},yH=function(r,t,n,s){for(var o=Math.min(2,3-s.style.size),a=o;at)return i}return n[n.length-1]},A5=function(r,t,n,s,o,a){r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle");var i;gH.has(r)?i=RFn:mH.has(r)?i=bH:i=MFn;var c=yH(r,t,i,s);return c.type==="small"?CFn(r,c.style,n,s,o,a):c.type==="large"?hH(r,c.size,n,s,o,a):pH(r,t,n,s,o,a)},Nk=function(r,t,n,s,o,a){var i=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,d=Math.max(t-i,n+i),_=Math.max(d/500*c,2*d-u);return A5(r,_,!0,s,o,a)},kR={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},$Fn=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function jR(e){return"isMiddle"in e}function px(e,r){var t=dx(e);if(t&&$Fn.has(t.text))return t;throw t?new tt("Invalid delimiter '"+t.text+"' after '"+r.funcName+"'",e):new tt("Invalid delimiter type '"+e.type+"'",e)}gt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,r)=>{var t=px(r[0],e);return{type:"delimsizing",mode:e.parser.mode,size:kR[e.funcName].size,mclass:kR[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,r)=>e.delim==="."?Qe([e.mclass]):vH(e.delim,e.size,r,e.mode,[e.mclass]),mathmlBuilder:e=>{var r=[];e.delim!=="."&&r.push(zi(e.delim,e.mode));var t=new rt("mo",r);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=ot(tg[e.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function SR(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}gt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new tt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:px(r[0],e).text,color:t}}});gt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=px(r[0],e),n=e.parser;++n.leftrightDepth;var s=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=br(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:s,left:t.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,r)=>{SR(e);for(var t=Is(e.body,r,!0,["mopen","mclose"]),n=0,s=0,o=!1,a=0;a{SR(e);var t=Za(e.body,r);if(e.left!=="."){var n=new rt("mo",[zi(e.left,e.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(e.right!=="."){var s=new rt("mo",[zi(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return F6(t)}});gt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=px(r[0],e);if(!e.parser.leftrightDepth)throw new tt("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,r)=>{var t;return e.delim==="."?t=Eg(r,[]):(t=vH(e.delim,1,r,e.mode,[]),t.isMiddle={delim:e.delim,options:r}),t},mathmlBuilder:(e,r)=>{var t=e.delim==="\\vert"||e.delim==="|"?zi("|","text"):zi(e.delim,e.mode),n=new rt("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var mx=(e,r)=>{var t=up(Yr(e.body,r),r),n=e.label.slice(1),s=r.sizeMultiplier,o,a,i=uu(e.body);if(n==="sout")o=Qe(["stretchy","sout"]),o.height=r.fontMetrics().defaultRuleThickness/s,a=-.5*r.fontMetrics().xHeight;else if(n==="phase"){var c=Un({number:.6,unit:"pt"},r),u=Un({number:.35,unit:"ex"},r),d=r.havingBaseSizing();s=s/d.sizeMultiplier;var _=t.height+t.depth+c+u;t.style.paddingLeft=ot(_/2+c);var p=Math.floor(1e3*_*s),m=MBn(p),k=new au([new j_("phase",m)],{width:"400em",height:ot(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});o=S_(["hide-tail"],[k],r),o.style.height=ot(_),a=t.depth+c+u}else{/cancel/.test(n)?i||t.classes.push("cancel-pad"):n==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var x,v,b=0;/box/.test(n)?(b=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness),x=r.fontMetrics().fboxsep+(n==="colorbox"?0:b),v=x):n==="angl"?(b=Math.max(r.fontMetrics().defaultRuleThickness,r.minRuleThickness),x=4*b,v=Math.max(0,.25-t.depth)):(x=i?.2:0,v=x),o=mFn(t,n,x,v,r),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=ot(b)):n==="angl"&&b!==.049&&(o.style.borderTopWidth=ot(b),o.style.borderRightWidth=ot(b)),a=t.depth+v,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var w;if(e.backgroundColor)w=Qr({positionType:"individualShift",children:[{type:"elem",elem:o,shift:a},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(n)?["svg-align"]:[];w=Qr({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:o,shift:a,wrapperClasses:y}]})}return/cancel/.test(n)&&(w.height=t.height,w.depth=t.depth),/cancel/.test(n)&&!i?Qe(["mord","cancel-lap"],[w],r):Qe(["mord"],[w],r)},gx=(e,r)=>{var t,n=new rt(e.label.includes("colorbox")?"mpadded":"menclose",[bn(e.body,r)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=r.fontMetrics().fboxsep*r.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*t+"pt"),n.setAttribute("height","+"+2*t+"pt"),n.setAttribute("lspace",t+"pt"),n.setAttribute("voffset",t+"pt"),e.label==="\\fcolorbox"){var s=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness);n.setAttribute("style","border: "+ot(s)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};gt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,r,t){var{parser:n,funcName:s}=e,o=br(r[0],"color-token").color,a=r[1];return{type:"enclose",mode:n.mode,label:s,backgroundColor:o,body:a}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,r,t){var{parser:n,funcName:s}=e,o=br(r[0],"color-token").color,a=br(r[1],"color-token").color,i=r[2];return{type:"enclose",mode:n.mode,label:s,backgroundColor:a,borderColor:o,body:i}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:r[0]}}});gt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"enclose",mode:t.mode,label:n,body:s}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=r[0];return{type:"enclose",mode:t.mode,label:n,body:s}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,r){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:r[0]}}});var xH={};function el(e){for(var{type:r,names:t,props:n,handler:s,htmlBuilder:o,mathmlBuilder:a}=e,i={type:r,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},c=0;c{var r=e.parser.settings;if(!r.displayMode)throw new tt("{"+e.envName+"} can be used only in display mode.")},DFn=new Set(["gather","gather*"]);function G6(e){if(!e.includes("ed"))return!e.includes("*")}function M_(e,r,t){var{hskipBeforeAndAfter:n,addJot:s,cols:o,arraystretch:a,colSeparationType:i,autoTag:c,singleRow:u,emptySingleRow:d,maxNumCols:_,leqno:p}=r;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new tt("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var k=[],x=[k],v=[],b=[],w=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function S(){w&&(e.gullet.macros.get("\\df@tag")?(w.push(e.subparse([new Ua("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):w.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),b.push(CR(e));;){var z=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var N={type:"ordgroup",mode:e.mode,body:z};t&&(N={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[N]}),k.push(N);var A=e.fetch().text;if(A==="&"){if(_&&k.length===_){if(u||i)throw new tt("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(A==="\\end"){S(),k.length===1&&N.type==="styling"&&N.body.length===1&&N.body[0].type==="ordgroup"&&N.body[0].body.length===0&&(x.length>1||!d)&&x.pop(),b.length0&&(y+=.25),u.push({pos:y,isDashed:Ye[Ae]})}for(S(a[0]),n=0;n0&&(D+=w,AYe))for(n=0;n=i)){var ae=void 0;if(s>0||r.hskipBeforeAndAfter){var le,me;ae=(le=(me=U)==null?void 0:me.pregap)!=null?le:p,ae!==0&&(Q=Qe(["arraycolsep"],[]),Q.style.width=ot(ae),H.push(Q))}var be=[];for(n=0;n0){for(var Ut=lp("hline",t,d),Gt=lp("hdashline",t,d),De=[{type:"elem",elem:Vt,shift:0}];u.length>0;){var ct=u.pop(),lt=ct.pos-I;ct.isDashed?De.push({type:"elem",elem:Gt,shift:lt}):De.push({type:"elem",elem:Ut,shift:lt})}Vt=Qr({positionType:"individualShift",children:De})}if(J.length===0)return Qe(["mord"],[Vt],t);var xe=Qr({positionType:"individualShift",children:J}),Ie=Qe(["tag"],[xe],t);return fu([Vt,Ie])},LFn={c:"center ",l:"left ",r:"right "},rl=function(r,t){for(var n=[],s=new rt("mtd",[],["mtr-glue"]),o=new rt("mtd",[],["mml-eqn-num"]),a=0;a0){var k=r.cols,x="",v=!1,b=0,w=k.length;k[0].type==="separator"&&(p+="top ",b=1),k[k.length-1].type==="separator"&&(p+="bottom ",w-=1);for(var y=b;y0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var $=1;$0&&m&&(v=1),n[k]={type:"align",align:x,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};el({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,r){var t=dx(r[0]),n=t?[r[0]]:br(r[0],"ordgroup").body,s=n.map(function(a){var i=fx(a),c=i.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new tt("Unknown column alignment: "+c,a)}),o={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return M_(e.parser,o,W6(e.envName))},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var r={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],t="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),t=s.fetch().text,!"lcr".includes(t))throw new tt("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),n.cols=[{type:"align",align:t}]}}var o=M_(e.parser,n,W6(e.envName)),a=Math.max(0,...o.body.map(i=>i.length));return o.cols=new Array(a).fill({type:"align",align:t}),r?{type:"leftright",mode:e.mode,body:[o],left:r[0],right:r[1],rightColor:void 0}:o},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var r={arraystretch:.5},t=M_(e.parser,r,"script");return t.colSeparationType="small",t},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["subarray"],props:{numArgs:1},handler(e,r){var t=dx(r[0]),n=t?[r[0]]:br(r[0],"ordgroup").body,s=n.map(function(i){var c=fx(i),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new tt("Unknown column alignment: "+u,i)});if(s.length>1)throw new tt("{subarray} can contain only one column");var o={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=M_(e.parser,o,"script");if(a.body.length>0&&a.body[0].length>1)throw new tt("{subarray} can contain only one column");return a},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var r={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=M_(e.parser,r,W6(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:kH,htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){DFn.has(e.envName)&&vx(e);var r={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:G6(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return M_(e.parser,r,"display")},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:kH,htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){vx(e);var r={autoTag:G6(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return M_(e.parser,r,"display")},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["CD"],props:{numArgs:0},handler(e){return vx(e),jFn(e.parser)},htmlBuilder:tl,mathmlBuilder:rl});se("\\nonumber","\\gdef\\@eqnsw{0}");se("\\notag","\\nonumber");gt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,r){throw new tt(e.funcName+" valid only within array environment")}});var zR=xH;gt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];if(s.type!=="ordgroup")throw new tt("Invalid environment name",s);for(var o="",a=0;a{var t=e.font,n=r.withFont(t);return Yr(e.body,n)},SH=(e,r)=>{var t=e.font,n=r.withFont(t);return bn(e.body,n)},ER={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};gt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=Kb(r[0]),o=n;return o in ER&&(o=ER[o]),{type:"font",mode:t.mode,font:o.slice(1),body:s}},htmlBuilder:jH,mathmlBuilder:SH});gt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"mclass",mode:t.mode,mclass:hx(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:uu(n)}}});gt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,r)=>{var{parser:t,funcName:n,breakOnTokenText:s}=e,{mode:o}=t,a=t.parseExpression(!0,s);return{type:"font",mode:o,font:"math"+n.slice(1),body:{type:"ordgroup",mode:t.mode,body:a}}},htmlBuilder:jH,mathmlBuilder:SH});var IFn=(e,r)=>{var t=r.style,n=t.fracNum(),s=t.fracDen(),o;o=r.havingStyle(n);var a=Yr(e.numer,o,r);if(e.continued){var i=8.5/r.fontMetrics().ptPerEm,c=3.5/r.fontMetrics().ptPerEm;a.height=a.height0?k=3*p:k=7*p,x=r.fontMetrics().denom1):(_>0?(m=r.fontMetrics().num2,k=p):(m=r.fontMetrics().num3,k=3*p),x=r.fontMetrics().denom2);var v;if(d){var w=r.fontMetrics().axisHeight;m-a.depth-(w+.5*_){var t=new rt("mfrac",[bn(e.numer,r),bn(e.denom,r)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var n=Un(e.barSize,r);t.setAttribute("linethickness",ot(n))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var o=new rt("mo",[new Cs(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(t),e.rightDelim!=null){var a=new rt("mo",[new Cs(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return F6(s)}return t},CH=(e,r)=>{if(!r)return e;var t={type:"styling",mode:e.mode,style:r,body:[e]};return t};gt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0],o=r[1],a,i=null,c=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,i="(",c=")";break;case"\\\\bracefrac":a=!1,i="\\{",c="\\}";break;case"\\\\brackfrac":a=!1,i="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var u=n==="\\cfrac",d=null;return u||n.startsWith("\\d")?d="display":n.startsWith("\\t")&&(d="text"),CH({type:"genfrac",mode:t.mode,numer:s,denom:o,continued:u,hasBarLine:a,leftDelim:i,rightDelim:c,barSize:null},d)},htmlBuilder:IFn,mathmlBuilder:PFn});gt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:r,funcName:t,token:n}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:s,token:n}}});var NR=["display","text","script","scriptscript"],AR=function(r){var t=null;return r.length>0&&(t=r,t=t==="."?null:t),t};gt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,r){var{parser:t}=e,n=r[4],s=r[5],o=Kb(r[0]),a=o.type==="atom"&&o.family==="open"?AR(o.text):null,i=Kb(r[1]),c=i.type==="atom"&&i.family==="close"?AR(i.text):null,u=br(r[2],"size"),d,_=null;u.isBlank?d=!0:(_=u.value,d=_.number>0);var p=null,m=r[3];if(m.type==="ordgroup"){if(m.body.length>0){var k=br(m.body[0],"textord");p=NR[Number(k.text)]}}else m=br(m,"textord"),p=NR[Number(m.text)];return CH({type:"genfrac",mode:t.mode,numer:n,denom:s,continued:!1,hasBarLine:d,barSize:_,leftDelim:a,rightDelim:c},p)}});gt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,r){var{parser:t,funcName:n,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:br(r[0],"size").value,token:s}}});gt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0],o=br(r[1],"infix").size;if(!o)throw new Error("\\\\abovefrac expected size, but got "+String(o));var a=r[2],i=o.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:a,continued:!1,hasBarLine:i,barSize:o,leftDelim:null,rightDelim:null}}});var zH=(e,r)=>{var t=r.style,n,s;e.type==="supsub"?(n=e.sup?Yr(e.sup,r.havingStyle(t.sup()),r):Yr(e.sub,r.havingStyle(t.sub()),r),s=br(e.base,"horizBrace")):s=br(e,"horizBrace");var o=Yr(s.base,r.havingBaseStyle(ir.DISPLAY)),a=_x(s,r),i;if(s.isOver?i=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):i=Qr({positionType:"bottom",positionData:o.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:o}]}),n){var c=Qe(["minner",s.isOver?"mover":"munder"],[i],r);s.isOver?i=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:n}]}):i=Qr({positionType:"bottom",positionData:c.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Qe(["minner",s.isOver?"mover":"munder"],[i],r)},BFn=(e,r)=>{var t=ux(e.label);return new rt(e.isOver?"mover":"munder",[bn(e.base,r),t])};gt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e;return{type:"horizBrace",mode:t.mode,label:n,isOver:n.includes("\\over"),base:r[0]}},htmlBuilder:zH,mathmlBuilder:BFn});gt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[1],s=br(r[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:Ss(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,r)=>{var t=Is(e.body,r,!1);return JBn(e.href,[],t,r)},mathmlBuilder:(e,r)=>{var t=C_(e.body,r);return t instanceof rt||(t=new rt("mrow",[t])),t.setAttribute("href",e.href),t}});gt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=br(r[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:n}))return t.formatUnsupportedCmd("\\url");for(var s=[],o=0;o{var{parser:t,funcName:n,token:s}=e,o=br(r[0],"raw").string,a=r[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i,c={};switch(n){case"\\htmlClass":c.class=o,i={command:"\\htmlClass",class:o};break;case"\\htmlId":c.id=o,i={command:"\\htmlId",id:o};break;case"\\htmlStyle":c.style=o,i={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var u=o.split(","),d=0;d{var t=Is(e.body,r,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var s=Qe(n,t,r);for(var o in e.attributes)o!=="class"&&e.attributes.hasOwnProperty(o)&&s.setAttribute(o,e.attributes[o]);return s},mathmlBuilder:(e,r)=>C_(e.body,r)});gt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:Ss(r[0]),mathml:Ss(r[1])}},htmlBuilder:(e,r)=>{var t=Is(e.html,r,!1);return fu(t)},mathmlBuilder:(e,r)=>C_(e.mathml,r)});var Ak=function(r){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(r))return{number:+r,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r);if(!t)throw new tt("Invalid size: '"+r+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!UF(n))throw new tt("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};gt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,r,t)=>{var{parser:n}=e,s={number:0,unit:"em"},o={number:.9,unit:"em"},a={number:0,unit:"em"},i="";if(t[0])for(var c=br(t[0],"raw").string,u=c.split(","),d=0;d{var t=Un(e.height,r),n=0;e.totalheight.number>0&&(n=Un(e.totalheight,r)-t);var s=0;e.width.number>0&&(s=Un(e.width,r));var o={height:ot(t+n)};s>0&&(o.width=ot(s)),n>0&&(o.verticalAlign=ot(-n));var a=new FBn(e.src,e.alt,o);return a.height=t,a.depth=n,a},mathmlBuilder:(e,r)=>{var t=new rt("mglyph",[]);t.setAttribute("alt",e.alt);var n=Un(e.height,r),s=0;if(e.totalheight.number>0&&(s=Un(e.totalheight,r)-n,t.setAttribute("valign",ot(-s))),t.setAttribute("height",ot(n+s)),e.width.number>0){var o=Un(e.width,r);t.setAttribute("width",ot(o))}return t.setAttribute("src",e.src),t}});gt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e,s=br(r[0],"size");if(t.settings.strict){var o=n[1]==="m",a=s.value.unit==="mu";o?(a||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+s.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):a&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:s.value}},htmlBuilder(e,r){return XF(e.dimension,r)},mathmlBuilder(e,r){var t=Un(e.dimension,r);return new rH(t)}});gt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"lap",mode:t.mode,alignment:n.slice(5),body:s}},htmlBuilder:(e,r)=>{var t;e.alignment==="clap"?(t=Qe([],[Yr(e.body,r)]),t=Qe(["inner"],[t],r)):t=Qe(["inner"],[Yr(e.body,r)]);var n=Qe(["fix"],[]),s=Qe([e.alignment],[t,n],r),o=Qe(["strut"]);return o.style.height=ot(s.height+s.depth),s.depth&&(o.style.verticalAlign=ot(-s.depth)),s.children.unshift(o),s=Qe(["thinbox"],[s],r),Qe(["mord","vbox"],[s],r)},mathmlBuilder:(e,r)=>{var t=new rt("mpadded",[bn(e.body,r)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",n+"width")}return t.setAttribute("width","0px"),t}});gt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,r){var{funcName:t,parser:n}=e,s=n.mode;n.switchMode("math");var o=t==="\\("?"\\)":"$",a=n.parseExpression(!1,o);return n.expect(o),n.switchMode(s),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:a}}});gt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,r){throw new tt("Mismatched "+e.funcName)}});var TR=(e,r)=>{switch(r.style.size){case ir.DISPLAY.size:return e.display;case ir.TEXT.size:return e.text;case ir.SCRIPT.size:return e.script;case ir.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};gt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,r)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:Ss(r[0]),text:Ss(r[1]),script:Ss(r[2]),scriptscript:Ss(r[3])}},htmlBuilder:(e,r)=>{var t=TR(e,r),n=Is(t,r,!1);return fu(n)},mathmlBuilder:(e,r)=>{var t=TR(e,r);return C_(t,r)}});var EH=(e,r,t,n,s,o,a)=>{e=Qe([],[e]);var i=t&&uu(t),c,u;if(r){var d=Yr(r,n.havingStyle(s.sup()),n);u={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var _=Yr(t,n.havingStyle(s.sub()),n);c={elem:_,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-_.height)}}var p;if(u&&c){var m=n.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+a;p=Qr({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:ot(-o)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ot(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(c){var k=e.height-a;p=Qr({positionType:"top",positionData:k,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:ot(-o)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var x=e.depth+a;p=Qr({positionType:"bottom",positionData:x,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ot(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&o!==0&&!i){var b=Qe(["mspace"],[],n);b.style.marginRight=ot(o),v.unshift(b)}return Qe(["mop","op-limits"],v,n)},NH=new Set(["\\smallint"]),Tp=(e,r)=>{var t,n,s=!1,o;e.type==="supsub"?(t=e.sup,n=e.sub,o=br(e.base,"op"),s=!0):o=br(e,"op");var a=r.style,i=!1;a.size===ir.DISPLAY.size&&o.symbol&&!NH.has(o.name)&&(i=!0);var c,u;if(o.symbol){var d=i?"Size2-Regular":"Size1-Regular",_="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(_=o.name.slice(1),o.name=_==="oiint"?"\\iint":"\\iiint"),c=Go(o.name,d,"math",r,["mop","op-symbol",i?"large-op":"small-op"]),u=c.italic,_.length>0){var p=ZF(_+"Size"+(i?"2":"1"),r);c=Qr({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:p,shift:i?.08:0}]}),o.name="\\"+_,c.classes.unshift("mop"),c.italic=u}}else if(o.body){var m=Is(o.body,r,!0);m.length===1&&m[0]instanceof Ka?(c=m[0],c.classes[0]="mop"):c=Qe(["mop"],m,r)}else{for(var k=[],x=1;x{var t;if(e.symbol)t=new rt("mo",[zi(e.name,e.mode)]),NH.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new rt("mo",Za(e.body,r));else{t=new rt("mi",[new Cs(e.name.slice(1))]);var n=new rt("mo",[zi("⁡","text")]);e.parentIsSupSub?t=new rt("mrow",[t,n]):t=tH([t,n])}return t},FFn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};gt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=n;return s.length===1&&(s=FFn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ss(n)}},htmlBuilder:Tp,mathmlBuilder:z0});var HFn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};gt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:r,funcName:t}=e;return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:r,funcName:t}=e;return{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:r,funcName:t}=e,n=t;return n.length===1&&(n=HFn[n]),{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Tp,mathmlBuilder:z0});var AH=(e,r)=>{var t,n,s=!1,o;e.type==="supsub"?(t=e.sup,n=e.sub,o=br(e.base,"operatorname"),s=!0):o=br(e,"operatorname");var a;if(o.body.length>0){for(var i=o.body.map(_=>{var p="text"in _?_.text:void 0;return typeof p=="string"?{type:"textord",mode:_.mode,text:p}:_}),c=Is(i,r.withFont("mathrm"),!0),u=0;u{for(var t=Za(e.body,r.withFont("mathrm")),n=!0,s=0;sd.toText()).join("");t=[new Cs(i)]}var c=new rt("mi",t);c.setAttribute("mathvariant","normal");var u=new rt("mo",[zi("⁡","text")]);return e.parentIsSupSub?new rt("mrow",[c,u]):tH([c,u])};gt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"operatorname",mode:t.mode,body:Ss(s),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:AH,mathmlBuilder:qFn});se("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");kd({type:"ordgroup",htmlBuilder(e,r){return e.semisimple?fu(Is(e.body,r,!1)):Qe(["mord"],Is(e.body,r,!0),r)},mathmlBuilder(e,r){return C_(e.body,r,!0)}});gt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,r){var{parser:t}=e,n=r[0];return{type:"overline",mode:t.mode,body:n}},htmlBuilder(e,r){var t=Yr(e.body,r.havingCrampedStyle()),n=lp("overline-line",r),s=r.fontMetrics().defaultRuleThickness,o=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:n},{type:"kern",size:s}]});return Qe(["mord","overline"],[o],r)},mathmlBuilder(e,r){var t=new rt("mo",[new Cs("‾")]);t.setAttribute("stretchy","true");var n=new rt("mover",[bn(e.body,r),t]);return n.setAttribute("accent","true"),n}});gt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"phantom",mode:t.mode,body:Ss(n)}},htmlBuilder:(e,r)=>{var t=Is(e.body,r.withPhantom(),!1);return fu(t)},mathmlBuilder:(e,r)=>{var t=Za(e.body,r);return new rt("mphantom",t)}});se("\\hphantom","\\smash{\\phantom{#1}}");gt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"vphantom",mode:t.mode,body:n}},htmlBuilder:(e,r)=>{var t=Qe(["inner"],[Yr(e.body,r.withPhantom())]),n=Qe(["fix"],[]);return Qe(["mord","rlap"],[t,n],r)},mathmlBuilder:(e,r)=>{var t=Za(Ss(e.body),r),n=new rt("mphantom",t),s=new rt("mpadded",[n]);return s.setAttribute("width","0px"),s}});gt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,r){var{parser:t}=e,n=br(r[0],"size").value,s=r[1];return{type:"raisebox",mode:t.mode,dy:n,body:s}},htmlBuilder(e,r){var t=Yr(e.body,r),n=Un(e.dy,r);return Qr({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,r){var t=new rt("mpadded",[bn(e.body,r)]),n=e.dy.number+e.dy.unit;return t.setAttribute("voffset",n),t}});gt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:r}=e;return{type:"internal",mode:r.mode}}});gt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,r,t){var{parser:n}=e,s=t[0],o=br(r[0],"size"),a=br(r[1],"size");return{type:"rule",mode:n.mode,shift:s&&br(s,"size").value,width:o.value,height:a.value}},htmlBuilder(e,r){var t=Qe(["mord","rule"],[],r),n=Un(e.width,r),s=Un(e.height,r),o=e.shift?Un(e.shift,r):0;return t.style.borderRightWidth=ot(n),t.style.borderTopWidth=ot(s),t.style.bottom=ot(o),t.width=n,t.height=s+o,t.depth=-o,t.maxFontSize=s*1.125*r.sizeMultiplier,t},mathmlBuilder(e,r){var t=Un(e.width,r),n=Un(e.height,r),s=e.shift?Un(e.shift,r):0,o=r.color&&r.getColor()||"black",a=new rt("mspace");a.setAttribute("mathbackground",o),a.setAttribute("width",ot(t)),a.setAttribute("height",ot(n));var i=new rt("mpadded",[a]);return s>=0?i.setAttribute("height",ot(s)):(i.setAttribute("height",ot(s)),i.setAttribute("depth",ot(-s))),i.setAttribute("voffset",ot(s)),i}});function TH(e,r,t){for(var n=Is(e,r,!1),s=r.sizeMultiplier/t.sizeMultiplier,o=0;o{var t=r.havingSize(e.size);return TH(e.body,t,r)};gt({type:"sizing",names:RR,props:{numArgs:0,allowedInText:!0},handler:(e,r)=>{var{breakOnTokenText:t,funcName:n,parser:s}=e,o=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:RR.indexOf(n)+1,body:o}},htmlBuilder:UFn,mathmlBuilder:(e,r)=>{var t=r.havingSize(e.size),n=Za(e.body,t),s=new rt("mstyle",n);return s.setAttribute("mathsize",ot(t.sizeMultiplier)),s}});gt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,r,t)=>{var{parser:n}=e,s=!1,o=!1,a=t[0]&&br(t[0],"ordgroup");if(a)for(var i,c=0;c{var t=Qe([],[Yr(e.body,r)]);if(!e.smashHeight&&!e.smashDepth)return t;if(e.smashHeight&&(t.height=0),e.smashDepth&&(t.depth=0),e.smashHeight&&e.smashDepth)return Qe(["mord","smash"],[t],r);if(t.children)for(var n=0;n{var t=new rt("mpadded",[bn(e.body,r)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});gt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,r,t){var{parser:n}=e,s=t[0],o=r[0];return{type:"sqrt",mode:n.mode,body:o,index:s}},htmlBuilder(e,r){var t=Yr(e.body,r.havingCrampedStyle());t.height===0&&(t.height=r.fontMetrics().xHeight),t=up(t,r);var n=r.fontMetrics(),s=n.defaultRuleThickness,o=s;r.style.idt.height+t.depth+a&&(a=(a+_-t.height-t.depth)/2);var p=c.height-t.height-a-u;t.style.paddingLeft=ot(d);var m=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:c},{type:"kern",size:u}]});if(e.index){var k=r.havingStyle(ir.SCRIPTSCRIPT),x=Yr(e.index,k,r),v=.6*(m.height-m.depth),b=Qr({positionType:"shift",positionData:-v,children:[{type:"elem",elem:x}]}),w=Qe(["root"],[b]);return Qe(["mord","sqrt"],[w,m],r)}else return Qe(["mord","sqrt"],[m],r)},mathmlBuilder(e,r){var{body:t,index:n}=e;return n?new rt("mroot",[bn(t,r),bn(n,r)]):new rt("msqrt",[bn(t,r)])}});var T5={display:ir.DISPLAY,text:ir.TEXT,script:ir.SCRIPT,scriptscript:ir.SCRIPTSCRIPT};function GFn(e){return e in T5}gt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,r){var{breakOnTokenText:t,funcName:n,parser:s}=e,o=s.parseExpression(!0,t),a=n.slice(1,n.length-5);if(!GFn(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:o}},htmlBuilder(e,r){var t=T5[e.style],n=r.havingStyle(t);return e.resetFont&&(n=n.withFont("")),TH(e.body,n,r)},mathmlBuilder(e,r){var t=T5[e.style],n=r.havingStyle(t);e.resetFont&&(n=n.withFont(""));var s=Za(e.body,n),o=new rt("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},i=a[e.style];return o.setAttribute("scriptlevel",i[0]),o.setAttribute("displaystyle",i[1]),o}});var WFn=function(r,t){var n=r.base;if(n)if(n.type==="op"){var s=n.limits&&(t.style.size===ir.DISPLAY.size||n.alwaysHandleSupSub);return s?Tp:null}else if(n.type==="operatorname"){var o=n.alwaysHandleSupSub&&(t.style.size===ir.DISPLAY.size||n.limits);return o?AH:null}else{if(n.type==="accent")return uu(n.base)?q6:null;if(n.type==="horizBrace"){var a=!r.sub;return a===n.isOver?zH:null}else return null}else return null};kd({type:"supsub",htmlBuilder(e,r){var t=WFn(e,r);if(t)return t(e,r);var{base:n,sup:s,sub:o}=e,a=Yr(n,r),i,c,u=r.fontMetrics(),d=0,_=0,p=n&&uu(n);if(s){var m=r.havingStyle(r.style.sup());i=Yr(s,m,r),p||(d=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/r.sizeMultiplier)}if(o){var k=r.havingStyle(r.style.sub());c=Yr(o,k,r),p||(_=a.depth+k.fontMetrics().subDrop*k.sizeMultiplier/r.sizeMultiplier)}var x;r.style===ir.DISPLAY?x=u.sup1:r.style.cramped?x=u.sup3:x=u.sup2;var v=r.sizeMultiplier,b=ot(.5/u.ptPerEm/v),w=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof Ka||y){var S;w=ot(-((S=a.italic)!=null?S:0))}}var z;if(i&&c){d=Math.max(d,x,i.depth+.25*u.xHeight),_=Math.max(_,u.sub2);var N=u.defaultRuleThickness,A=4*N;if(d-i.depth-(c.height-_)0&&(d+=E,_-=E)}var M=[{type:"elem",elem:c,shift:_,marginRight:b,marginLeft:w},{type:"elem",elem:i,shift:-d,marginRight:b}];z=Qr({positionType:"individualShift",children:M})}else if(c){_=Math.max(_,u.sub1,c.height-.8*u.xHeight);var $=[{type:"elem",elem:c,marginLeft:w,marginRight:b}];z=Qr({positionType:"shift",positionData:_,children:$})}else if(i)d=Math.max(d,x,i.depth+.25*u.xHeight),z=Qr({positionType:"shift",positionData:-d,children:[{type:"elem",elem:i,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var D=C5(a,"right")||"mord";return Qe([D],[a,Qe(["msupsub"],[z])],r)},mathmlBuilder(e,r){var t=!1,n,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(t=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var o=[bn(e.base,r)];e.sub&&o.push(bn(e.sub,r)),e.sup&&o.push(bn(e.sup,r));var a;if(t)a=n?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&r.style===ir.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(r.style===ir.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(r.style===ir.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||r.style===ir.DISPLAY)?a="munder":a="msub"}else{var i=e.base;i&&i.type==="op"&&i.limits&&(r.style===ir.DISPLAY||i.alwaysHandleSupSub)||i&&i.type==="operatorname"&&i.alwaysHandleSupSub&&(i.limits||r.style===ir.DISPLAY)?a="mover":a="msup"}return new rt(a,o)}});kd({type:"atom",htmlBuilder(e,r){return P6(e.text,e.mode,r,["m"+e.family])},mathmlBuilder(e,r){var t=new rt("mo",[zi(e.text,e.mode)]);if(e.family==="bin"){var n=H6(e,r);n==="bold-italic"&&t.setAttribute("mathvariant",n)}else e.family==="punct"?t.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&t.setAttribute("stretchy","false");return t}});var RH={mi:"italic",mn:"normal",mtext:"normal"};kd({type:"mathord",htmlBuilder(e,r){return lx(e,r,"mathord")},mathmlBuilder(e,r){var t=new rt("mi",[zi(e.text,e.mode,r)]),n=H6(e,r)||"italic";return n!==RH[t.type]&&t.setAttribute("mathvariant",n),t}});kd({type:"textord",htmlBuilder(e,r){return lx(e,r,"textord")},mathmlBuilder(e,r){var t=zi(e.text,e.mode,r),n=H6(e,r)||"normal",s;return e.mode==="text"?s=new rt("mtext",[t]):/[0-9]/.test(e.text)?s=new rt("mn",[t]):e.text==="\\prime"?s=new rt("mo",[t]):s=new rt("mi",[t]),n!==RH[s.type]&&s.setAttribute("mathvariant",n),s}});var Tk={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Rk={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};kd({type:"spacing",htmlBuilder(e,r){if(Rk.hasOwnProperty(e.text)){var t=Rk[e.text].className||"";if(e.mode==="text"){var n=lx(e,r,"textord");return n.classes.push(t),n}else return Qe(["mspace",t],[P6(e.text,e.mode,r)],r)}else{if(Tk.hasOwnProperty(e.text))return Qe(["mspace",Tk[e.text]],[],r);throw new tt('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,r){var t;if(Rk.hasOwnProperty(e.text))t=new rt("mtext",[new Cs(" ")]);else{if(Tk.hasOwnProperty(e.text))return new rt("mspace");throw new tt('Unknown type of space "'+e.text+'"')}return t}});var MR=()=>{var e=new rt("mtd",[]);return e.setAttribute("width","50%"),e};kd({type:"tag",mathmlBuilder(e,r){var t=new rt("mtable",[new rt("mtr",[MR(),new rt("mtd",[C_(e.body,r)]),MR(),new rt("mtd",[C_(e.tag,r)])])]);return t.setAttribute("width","100%"),t}});var OR={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},$R={"\\textbf":"textbf","\\textmd":"textmd"},KFn={"\\textit":"textit","\\textup":"textup"},DR=(e,r)=>{var t=e.font;if(t){if(OR[t])return r.withTextFontFamily(OR[t]);if($R[t])return r.withTextFontWeight($R[t]);if(t==="\\emph")return r.fontShape==="textit"?r.withTextFontShape("textup"):r.withTextFontShape("textit")}else return r;return r.withTextFontShape(KFn[t])};gt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"text",mode:t.mode,body:Ss(s),font:n}},htmlBuilder(e,r){var t=DR(e,r),n=Is(e.body,t,!0);return Qe(["mord","text"],n,t)},mathmlBuilder(e,r){var t=DR(e,r);return C_(e.body,t)}});gt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"underline",mode:t.mode,body:r[0]}},htmlBuilder(e,r){var t=Yr(e.body,r),n=lp("underline-line",r),s=r.fontMetrics().defaultRuleThickness,o=Qr({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Qe(["mord","underline"],[o],r)},mathmlBuilder(e,r){var t=new rt("mo",[new Cs("‾")]);t.setAttribute("stretchy","true");var n=new rt("munder",[bn(e.body,r),t]);return n.setAttribute("accentunder","true"),n}});gt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,r){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:r[0]}},htmlBuilder(e,r){var t=Yr(e.body,r),n=r.fontMetrics().axisHeight,s=.5*(t.height-n-(t.depth+n));return Qr({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,r){var t=new rt("mpadded",[bn(e.body,r)],["vcenter"]);return new rt("mrow",[t])}});gt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,r,t){throw new tt("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,r){for(var t=LR(e),n=[],s=r.havingStyle(r.style.text()),o=0;oe.body.replace(/ /g,e.star?"␣":" "),p_=JF,MH=`[ \r +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function IBn(e){return"toText"in e}class Ep{constructor(r){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=r,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(r){return this.classes.includes(r)}toNode(){for(var r=document.createDocumentFragment(),t=0;t{if(IBn(r))return r.toText();throw new Error("Expected MathDomNode with toText, got "+r.constructor.name)}).join("")}}var m5={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},PBn={ex:!0,em:!0,mu:!0},UF=function(r){return typeof r!="string"&&(r=r.unit),r in m5||r in PBn||r==="ex"},Un=function(r,t){var n;if(r.unit in m5)n=m5[r.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(r.unit==="mu")n=t.fontMetrics().cssEmPerMu;else{var s;if(t.style.isTight()?s=t.havingStyle(t.style.text()):s=t,r.unit==="ex")n=s.fontMetrics().xHeight;else if(r.unit==="em")n=s.fontMetrics().quad;else throw new tt("Invalid unit: '"+r.unit+"'");s!==t&&(n*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(r.number*n,t.maxSize)},ot=function(r){return+r.toFixed(4)+"em"},k_=function(r){return r.filter(t=>t).join(" ")},L6=function(r){var t="";for(var n of Object.keys(r)){var s=r[n];s!==void 0&&(t+=dBn(n)+":"+s+";")}return t},GF=function(r,t,n){if(this.classes=r||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var s=t.getColor();s&&(this.style.color=s)}},WF=function(r){var t=document.createElement(r);t.className=k_(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var s=0;s/=\x00-\x1f]/,KF=function(r){var t="<"+r;this.classes.length&&(t+=' class="'+zo(k_(this.classes))+'"');var n=L6(this.style);n&&(t+=' style="'+zo(n)+'"');for(var s of Object.keys(this.attributes)){if(BBn.test(s))throw new tt("Invalid attribute name '"+s+"'");t+=" "+s+'="'+zo(this.attributes[s])+'"'}t+=">";for(var o=0;o",t};class Np{constructor(r,t,n,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,GF.call(this,r,n,s),this.children=t||[]}setAttribute(r,t){this.attributes[r]=t}hasClass(r){return this.classes.includes(r)}toNode(){return WF.call(this,"span")}toMarkup(){return KF.call(this,"span")}}class ix{constructor(r,t,n,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,GF.call(this,t,s),this.children=n||[],this.setAttribute("href",r)}setAttribute(r,t){this.attributes[r]=t}hasClass(r){return this.classes.includes(r)}toNode(){return WF.call(this,"a")}toMarkup(){return KF.call(this,"a")}}class FBn{constructor(r,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=r,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(r){return this.classes.includes(r)}toNode(){var r=document.createElement("img");return r.src=this.src,r.alt=this.alt,r.className="mord",Object.assign(r.style,this.style),r}toMarkup(){var r=''+zo(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=ot(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=k_(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(r),t):r}toMarkup(){var r=!1,t="0&&(n+="margin-right:"+ot(this.italic)+";"),n+=L6(this.style),n&&(r=!0,t+=' style="'+zo(n)+'"');var s=zo(this.text);return r?(t+=">",t+=s,t+="",t):s}}class au{constructor(r,t){this.children=void 0,this.attributes=void 0,this.children=r||[],this.attributes=t||{}}toNode(){var r="http://www.w3.org/2000/svg",t=document.createElementNS(r,"svg");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var s=0;s':''}}class g5{constructor(r){this.attributes=void 0,this.attributes=r||{}}toNode(){var r="http://www.w3.org/2000/svg",t=document.createElementNS(r,"line");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var r=" but got "+String(e)+".")}var GBn=e=>e instanceof Np||e instanceof ix||e instanceof Ep,Dc={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},s1={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},aR={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function WBn(e,r){Dc[e]=r}function I6(e,r,t){if(!Dc[r])throw new Error("Font metrics not found for font: "+r+".");var n=e.charCodeAt(0),s=Dc[r][n];if(!s&&e[0]in aR&&(n=aR[e[0]].charCodeAt(0),s=Dc[r][n]),!s&&t==="text"&&qF(n)&&(s=Dc[r][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var vk={};function KBn(e){var r;if(e>=5?r=0:e>=3?r=1:r=2,!vk[r]){var t=vk[r]={cssEmPerMu:s1.quad[r]/18};for(var n in s1)s1.hasOwnProperty(n)&&(t[n]=s1[n][r])}return vk[r]}var $n={math:{},text:{}};function B(e,r,t,n,s,o){$n[e][s]={font:r,group:t,replace:n},o&&n&&($n[e][n]=$n[e][s])}var V="math",We="text",te="main",de="ams",Ln="accent-token",yt="bin",Qo="close",Ap="inner",Qt="mathord",zs="op-token",Ya="open",C0="punct",he="rel",_u="spacing",ve="textord";B(V,te,he,"≡","\\equiv",!0);B(V,te,he,"≺","\\prec",!0);B(V,te,he,"≻","\\succ",!0);B(V,te,he,"∼","\\sim",!0);B(V,te,he,"⊥","\\perp");B(V,te,he,"⪯","\\preceq",!0);B(V,te,he,"⪰","\\succeq",!0);B(V,te,he,"≃","\\simeq",!0);B(V,te,he,"∣","\\mid",!0);B(V,te,he,"≪","\\ll",!0);B(V,te,he,"≫","\\gg",!0);B(V,te,he,"≍","\\asymp",!0);B(V,te,he,"∥","\\parallel");B(V,te,he,"⋈","\\bowtie",!0);B(V,te,he,"⌣","\\smile",!0);B(V,te,he,"⊑","\\sqsubseteq",!0);B(V,te,he,"⊒","\\sqsupseteq",!0);B(V,te,he,"≐","\\doteq",!0);B(V,te,he,"⌢","\\frown",!0);B(V,te,he,"∋","\\ni",!0);B(V,te,he,"∝","\\propto",!0);B(V,te,he,"⊢","\\vdash",!0);B(V,te,he,"⊣","\\dashv",!0);B(V,te,he,"∋","\\owns");B(V,te,C0,".","\\ldotp");B(V,te,C0,"⋅","\\cdotp");B(V,te,C0,"⋅","·");B(We,te,ve,"⋅","·");B(V,te,ve,"#","\\#");B(We,te,ve,"#","\\#");B(V,te,ve,"&","\\&");B(We,te,ve,"&","\\&");B(V,te,ve,"ℵ","\\aleph",!0);B(V,te,ve,"∀","\\forall",!0);B(V,te,ve,"ℏ","\\hbar",!0);B(V,te,ve,"∃","\\exists",!0);B(V,te,ve,"∇","\\nabla",!0);B(V,te,ve,"♭","\\flat",!0);B(V,te,ve,"ℓ","\\ell",!0);B(V,te,ve,"♮","\\natural",!0);B(V,te,ve,"♣","\\clubsuit",!0);B(V,te,ve,"℘","\\wp",!0);B(V,te,ve,"♯","\\sharp",!0);B(V,te,ve,"♢","\\diamondsuit",!0);B(V,te,ve,"ℜ","\\Re",!0);B(V,te,ve,"♡","\\heartsuit",!0);B(V,te,ve,"ℑ","\\Im",!0);B(V,te,ve,"♠","\\spadesuit",!0);B(V,te,ve,"§","\\S",!0);B(We,te,ve,"§","\\S");B(V,te,ve,"¶","\\P",!0);B(We,te,ve,"¶","\\P");B(V,te,ve,"†","\\dag");B(We,te,ve,"†","\\dag");B(We,te,ve,"†","\\textdagger");B(V,te,ve,"‡","\\ddag");B(We,te,ve,"‡","\\ddag");B(We,te,ve,"‡","\\textdaggerdbl");B(V,te,Qo,"⎱","\\rmoustache",!0);B(V,te,Ya,"⎰","\\lmoustache",!0);B(V,te,Qo,"⟯","\\rgroup",!0);B(V,te,Ya,"⟮","\\lgroup",!0);B(V,te,yt,"∓","\\mp",!0);B(V,te,yt,"⊖","\\ominus",!0);B(V,te,yt,"⊎","\\uplus",!0);B(V,te,yt,"⊓","\\sqcap",!0);B(V,te,yt,"∗","\\ast");B(V,te,yt,"⊔","\\sqcup",!0);B(V,te,yt,"◯","\\bigcirc",!0);B(V,te,yt,"∙","\\bullet",!0);B(V,te,yt,"‡","\\ddagger");B(V,te,yt,"≀","\\wr",!0);B(V,te,yt,"⨿","\\amalg");B(V,te,yt,"&","\\And");B(V,te,he,"⟵","\\longleftarrow",!0);B(V,te,he,"⇐","\\Leftarrow",!0);B(V,te,he,"⟸","\\Longleftarrow",!0);B(V,te,he,"⟶","\\longrightarrow",!0);B(V,te,he,"⇒","\\Rightarrow",!0);B(V,te,he,"⟹","\\Longrightarrow",!0);B(V,te,he,"↔","\\leftrightarrow",!0);B(V,te,he,"⟷","\\longleftrightarrow",!0);B(V,te,he,"⇔","\\Leftrightarrow",!0);B(V,te,he,"⟺","\\Longleftrightarrow",!0);B(V,te,he,"↦","\\mapsto",!0);B(V,te,he,"⟼","\\longmapsto",!0);B(V,te,he,"↗","\\nearrow",!0);B(V,te,he,"↩","\\hookleftarrow",!0);B(V,te,he,"↪","\\hookrightarrow",!0);B(V,te,he,"↘","\\searrow",!0);B(V,te,he,"↼","\\leftharpoonup",!0);B(V,te,he,"⇀","\\rightharpoonup",!0);B(V,te,he,"↙","\\swarrow",!0);B(V,te,he,"↽","\\leftharpoondown",!0);B(V,te,he,"⇁","\\rightharpoondown",!0);B(V,te,he,"↖","\\nwarrow",!0);B(V,te,he,"⇌","\\rightleftharpoons",!0);B(V,de,he,"≮","\\nless",!0);B(V,de,he,"","\\@nleqslant");B(V,de,he,"","\\@nleqq");B(V,de,he,"⪇","\\lneq",!0);B(V,de,he,"≨","\\lneqq",!0);B(V,de,he,"","\\@lvertneqq");B(V,de,he,"⋦","\\lnsim",!0);B(V,de,he,"⪉","\\lnapprox",!0);B(V,de,he,"⊀","\\nprec",!0);B(V,de,he,"⋠","\\npreceq",!0);B(V,de,he,"⋨","\\precnsim",!0);B(V,de,he,"⪹","\\precnapprox",!0);B(V,de,he,"≁","\\nsim",!0);B(V,de,he,"","\\@nshortmid");B(V,de,he,"∤","\\nmid",!0);B(V,de,he,"⊬","\\nvdash",!0);B(V,de,he,"⊭","\\nvDash",!0);B(V,de,he,"⋪","\\ntriangleleft");B(V,de,he,"⋬","\\ntrianglelefteq",!0);B(V,de,he,"⊊","\\subsetneq",!0);B(V,de,he,"","\\@varsubsetneq");B(V,de,he,"⫋","\\subsetneqq",!0);B(V,de,he,"","\\@varsubsetneqq");B(V,de,he,"≯","\\ngtr",!0);B(V,de,he,"","\\@ngeqslant");B(V,de,he,"","\\@ngeqq");B(V,de,he,"⪈","\\gneq",!0);B(V,de,he,"≩","\\gneqq",!0);B(V,de,he,"","\\@gvertneqq");B(V,de,he,"⋧","\\gnsim",!0);B(V,de,he,"⪊","\\gnapprox",!0);B(V,de,he,"⊁","\\nsucc",!0);B(V,de,he,"⋡","\\nsucceq",!0);B(V,de,he,"⋩","\\succnsim",!0);B(V,de,he,"⪺","\\succnapprox",!0);B(V,de,he,"≆","\\ncong",!0);B(V,de,he,"","\\@nshortparallel");B(V,de,he,"∦","\\nparallel",!0);B(V,de,he,"⊯","\\nVDash",!0);B(V,de,he,"⋫","\\ntriangleright");B(V,de,he,"⋭","\\ntrianglerighteq",!0);B(V,de,he,"","\\@nsupseteqq");B(V,de,he,"⊋","\\supsetneq",!0);B(V,de,he,"","\\@varsupsetneq");B(V,de,he,"⫌","\\supsetneqq",!0);B(V,de,he,"","\\@varsupsetneqq");B(V,de,he,"⊮","\\nVdash",!0);B(V,de,he,"⪵","\\precneqq",!0);B(V,de,he,"⪶","\\succneqq",!0);B(V,de,he,"","\\@nsubseteqq");B(V,de,yt,"⊴","\\unlhd");B(V,de,yt,"⊵","\\unrhd");B(V,de,he,"↚","\\nleftarrow",!0);B(V,de,he,"↛","\\nrightarrow",!0);B(V,de,he,"⇍","\\nLeftarrow",!0);B(V,de,he,"⇏","\\nRightarrow",!0);B(V,de,he,"↮","\\nleftrightarrow",!0);B(V,de,he,"⇎","\\nLeftrightarrow",!0);B(V,de,he,"△","\\vartriangle");B(V,de,ve,"ℏ","\\hslash");B(V,de,ve,"▽","\\triangledown");B(V,de,ve,"◊","\\lozenge");B(V,de,ve,"Ⓢ","\\circledS");B(V,de,ve,"®","\\circledR");B(We,de,ve,"®","\\circledR");B(V,de,ve,"∡","\\measuredangle",!0);B(V,de,ve,"∄","\\nexists");B(V,de,ve,"℧","\\mho");B(V,de,ve,"Ⅎ","\\Finv",!0);B(V,de,ve,"⅁","\\Game",!0);B(V,de,ve,"‵","\\backprime");B(V,de,ve,"▲","\\blacktriangle");B(V,de,ve,"▼","\\blacktriangledown");B(V,de,ve,"■","\\blacksquare");B(V,de,ve,"⧫","\\blacklozenge");B(V,de,ve,"★","\\bigstar");B(V,de,ve,"∢","\\sphericalangle",!0);B(V,de,ve,"∁","\\complement",!0);B(V,de,ve,"ð","\\eth",!0);B(We,te,ve,"ð","ð");B(V,de,ve,"╱","\\diagup");B(V,de,ve,"╲","\\diagdown");B(V,de,ve,"□","\\square");B(V,de,ve,"□","\\Box");B(V,de,ve,"◊","\\Diamond");B(V,de,ve,"¥","\\yen",!0);B(We,de,ve,"¥","\\yen",!0);B(V,de,ve,"✓","\\checkmark",!0);B(We,de,ve,"✓","\\checkmark");B(V,de,ve,"ℶ","\\beth",!0);B(V,de,ve,"ℸ","\\daleth",!0);B(V,de,ve,"ℷ","\\gimel",!0);B(V,de,ve,"ϝ","\\digamma",!0);B(V,de,ve,"ϰ","\\varkappa");B(V,de,Ya,"┌","\\@ulcorner",!0);B(V,de,Qo,"┐","\\@urcorner",!0);B(V,de,Ya,"└","\\@llcorner",!0);B(V,de,Qo,"┘","\\@lrcorner",!0);B(V,de,he,"≦","\\leqq",!0);B(V,de,he,"⩽","\\leqslant",!0);B(V,de,he,"⪕","\\eqslantless",!0);B(V,de,he,"≲","\\lesssim",!0);B(V,de,he,"⪅","\\lessapprox",!0);B(V,de,he,"≊","\\approxeq",!0);B(V,de,yt,"⋖","\\lessdot");B(V,de,he,"⋘","\\lll",!0);B(V,de,he,"≶","\\lessgtr",!0);B(V,de,he,"⋚","\\lesseqgtr",!0);B(V,de,he,"⪋","\\lesseqqgtr",!0);B(V,de,he,"≑","\\doteqdot");B(V,de,he,"≓","\\risingdotseq",!0);B(V,de,he,"≒","\\fallingdotseq",!0);B(V,de,he,"∽","\\backsim",!0);B(V,de,he,"⋍","\\backsimeq",!0);B(V,de,he,"⫅","\\subseteqq",!0);B(V,de,he,"⋐","\\Subset",!0);B(V,de,he,"⊏","\\sqsubset",!0);B(V,de,he,"≼","\\preccurlyeq",!0);B(V,de,he,"⋞","\\curlyeqprec",!0);B(V,de,he,"≾","\\precsim",!0);B(V,de,he,"⪷","\\precapprox",!0);B(V,de,he,"⊲","\\vartriangleleft");B(V,de,he,"⊴","\\trianglelefteq");B(V,de,he,"⊨","\\vDash",!0);B(V,de,he,"⊪","\\Vvdash",!0);B(V,de,he,"⌣","\\smallsmile");B(V,de,he,"⌢","\\smallfrown");B(V,de,he,"≏","\\bumpeq",!0);B(V,de,he,"≎","\\Bumpeq",!0);B(V,de,he,"≧","\\geqq",!0);B(V,de,he,"⩾","\\geqslant",!0);B(V,de,he,"⪖","\\eqslantgtr",!0);B(V,de,he,"≳","\\gtrsim",!0);B(V,de,he,"⪆","\\gtrapprox",!0);B(V,de,yt,"⋗","\\gtrdot");B(V,de,he,"⋙","\\ggg",!0);B(V,de,he,"≷","\\gtrless",!0);B(V,de,he,"⋛","\\gtreqless",!0);B(V,de,he,"⪌","\\gtreqqless",!0);B(V,de,he,"≖","\\eqcirc",!0);B(V,de,he,"≗","\\circeq",!0);B(V,de,he,"≜","\\triangleq",!0);B(V,de,he,"∼","\\thicksim");B(V,de,he,"≈","\\thickapprox");B(V,de,he,"⫆","\\supseteqq",!0);B(V,de,he,"⋑","\\Supset",!0);B(V,de,he,"⊐","\\sqsupset",!0);B(V,de,he,"≽","\\succcurlyeq",!0);B(V,de,he,"⋟","\\curlyeqsucc",!0);B(V,de,he,"≿","\\succsim",!0);B(V,de,he,"⪸","\\succapprox",!0);B(V,de,he,"⊳","\\vartriangleright");B(V,de,he,"⊵","\\trianglerighteq");B(V,de,he,"⊩","\\Vdash",!0);B(V,de,he,"∣","\\shortmid");B(V,de,he,"∥","\\shortparallel");B(V,de,he,"≬","\\between",!0);B(V,de,he,"⋔","\\pitchfork",!0);B(V,de,he,"∝","\\varpropto");B(V,de,he,"◀","\\blacktriangleleft");B(V,de,he,"∴","\\therefore",!0);B(V,de,he,"∍","\\backepsilon");B(V,de,he,"▶","\\blacktriangleright");B(V,de,he,"∵","\\because",!0);B(V,de,he,"⋘","\\llless");B(V,de,he,"⋙","\\gggtr");B(V,de,yt,"⊲","\\lhd");B(V,de,yt,"⊳","\\rhd");B(V,de,he,"≂","\\eqsim",!0);B(V,te,he,"⋈","\\Join");B(V,de,he,"≑","\\Doteq",!0);B(V,de,yt,"∔","\\dotplus",!0);B(V,de,yt,"∖","\\smallsetminus");B(V,de,yt,"⋒","\\Cap",!0);B(V,de,yt,"⋓","\\Cup",!0);B(V,de,yt,"⩞","\\doublebarwedge",!0);B(V,de,yt,"⊟","\\boxminus",!0);B(V,de,yt,"⊞","\\boxplus",!0);B(V,de,yt,"⋇","\\divideontimes",!0);B(V,de,yt,"⋉","\\ltimes",!0);B(V,de,yt,"⋊","\\rtimes",!0);B(V,de,yt,"⋋","\\leftthreetimes",!0);B(V,de,yt,"⋌","\\rightthreetimes",!0);B(V,de,yt,"⋏","\\curlywedge",!0);B(V,de,yt,"⋎","\\curlyvee",!0);B(V,de,yt,"⊝","\\circleddash",!0);B(V,de,yt,"⊛","\\circledast",!0);B(V,de,yt,"⋅","\\centerdot");B(V,de,yt,"⊺","\\intercal",!0);B(V,de,yt,"⋒","\\doublecap");B(V,de,yt,"⋓","\\doublecup");B(V,de,yt,"⊠","\\boxtimes",!0);B(V,de,he,"⇢","\\dashrightarrow",!0);B(V,de,he,"⇠","\\dashleftarrow",!0);B(V,de,he,"⇇","\\leftleftarrows",!0);B(V,de,he,"⇆","\\leftrightarrows",!0);B(V,de,he,"⇚","\\Lleftarrow",!0);B(V,de,he,"↞","\\twoheadleftarrow",!0);B(V,de,he,"↢","\\leftarrowtail",!0);B(V,de,he,"↫","\\looparrowleft",!0);B(V,de,he,"⇋","\\leftrightharpoons",!0);B(V,de,he,"↶","\\curvearrowleft",!0);B(V,de,he,"↺","\\circlearrowleft",!0);B(V,de,he,"↰","\\Lsh",!0);B(V,de,he,"⇈","\\upuparrows",!0);B(V,de,he,"↿","\\upharpoonleft",!0);B(V,de,he,"⇃","\\downharpoonleft",!0);B(V,te,he,"⊶","\\origof",!0);B(V,te,he,"⊷","\\imageof",!0);B(V,de,he,"⊸","\\multimap",!0);B(V,de,he,"↭","\\leftrightsquigarrow",!0);B(V,de,he,"⇉","\\rightrightarrows",!0);B(V,de,he,"⇄","\\rightleftarrows",!0);B(V,de,he,"↠","\\twoheadrightarrow",!0);B(V,de,he,"↣","\\rightarrowtail",!0);B(V,de,he,"↬","\\looparrowright",!0);B(V,de,he,"↷","\\curvearrowright",!0);B(V,de,he,"↻","\\circlearrowright",!0);B(V,de,he,"↱","\\Rsh",!0);B(V,de,he,"⇊","\\downdownarrows",!0);B(V,de,he,"↾","\\upharpoonright",!0);B(V,de,he,"⇂","\\downharpoonright",!0);B(V,de,he,"⇝","\\rightsquigarrow",!0);B(V,de,he,"⇝","\\leadsto");B(V,de,he,"⇛","\\Rrightarrow",!0);B(V,de,he,"↾","\\restriction");B(V,te,ve,"‘","`");B(V,te,ve,"$","\\$");B(We,te,ve,"$","\\$");B(We,te,ve,"$","\\textdollar");B(V,te,ve,"%","\\%");B(We,te,ve,"%","\\%");B(V,te,ve,"_","\\_");B(We,te,ve,"_","\\_");B(We,te,ve,"_","\\textunderscore");B(V,te,ve,"∠","\\angle",!0);B(V,te,ve,"∞","\\infty",!0);B(V,te,ve,"′","\\prime");B(V,te,ve,"△","\\triangle");B(V,te,ve,"Γ","\\Gamma",!0);B(V,te,ve,"Δ","\\Delta",!0);B(V,te,ve,"Θ","\\Theta",!0);B(V,te,ve,"Λ","\\Lambda",!0);B(V,te,ve,"Ξ","\\Xi",!0);B(V,te,ve,"Π","\\Pi",!0);B(V,te,ve,"Σ","\\Sigma",!0);B(V,te,ve,"Υ","\\Upsilon",!0);B(V,te,ve,"Φ","\\Phi",!0);B(V,te,ve,"Ψ","\\Psi",!0);B(V,te,ve,"Ω","\\Omega",!0);B(V,te,ve,"A","Α");B(V,te,ve,"B","Β");B(V,te,ve,"E","Ε");B(V,te,ve,"Z","Ζ");B(V,te,ve,"H","Η");B(V,te,ve,"I","Ι");B(V,te,ve,"K","Κ");B(V,te,ve,"M","Μ");B(V,te,ve,"N","Ν");B(V,te,ve,"O","Ο");B(V,te,ve,"P","Ρ");B(V,te,ve,"T","Τ");B(V,te,ve,"X","Χ");B(V,te,ve,"¬","\\neg",!0);B(V,te,ve,"¬","\\lnot");B(V,te,ve,"⊤","\\top");B(V,te,ve,"⊥","\\bot");B(V,te,ve,"∅","\\emptyset");B(V,de,ve,"∅","\\varnothing");B(V,te,Qt,"α","\\alpha",!0);B(V,te,Qt,"β","\\beta",!0);B(V,te,Qt,"γ","\\gamma",!0);B(V,te,Qt,"δ","\\delta",!0);B(V,te,Qt,"ϵ","\\epsilon",!0);B(V,te,Qt,"ζ","\\zeta",!0);B(V,te,Qt,"η","\\eta",!0);B(V,te,Qt,"θ","\\theta",!0);B(V,te,Qt,"ι","\\iota",!0);B(V,te,Qt,"κ","\\kappa",!0);B(V,te,Qt,"λ","\\lambda",!0);B(V,te,Qt,"μ","\\mu",!0);B(V,te,Qt,"ν","\\nu",!0);B(V,te,Qt,"ξ","\\xi",!0);B(V,te,Qt,"ο","\\omicron",!0);B(V,te,Qt,"π","\\pi",!0);B(V,te,Qt,"ρ","\\rho",!0);B(V,te,Qt,"σ","\\sigma",!0);B(V,te,Qt,"τ","\\tau",!0);B(V,te,Qt,"υ","\\upsilon",!0);B(V,te,Qt,"ϕ","\\phi",!0);B(V,te,Qt,"χ","\\chi",!0);B(V,te,Qt,"ψ","\\psi",!0);B(V,te,Qt,"ω","\\omega",!0);B(V,te,Qt,"ε","\\varepsilon",!0);B(V,te,Qt,"ϑ","\\vartheta",!0);B(V,te,Qt,"ϖ","\\varpi",!0);B(V,te,Qt,"ϱ","\\varrho",!0);B(V,te,Qt,"ς","\\varsigma",!0);B(V,te,Qt,"φ","\\varphi",!0);B(V,te,yt,"∗","*",!0);B(V,te,yt,"+","+");B(V,te,yt,"−","-",!0);B(V,te,yt,"⋅","\\cdot",!0);B(V,te,yt,"∘","\\circ",!0);B(V,te,yt,"÷","\\div",!0);B(V,te,yt,"±","\\pm",!0);B(V,te,yt,"×","\\times",!0);B(V,te,yt,"∩","\\cap",!0);B(V,te,yt,"∪","\\cup",!0);B(V,te,yt,"∖","\\setminus",!0);B(V,te,yt,"∧","\\land");B(V,te,yt,"∨","\\lor");B(V,te,yt,"∧","\\wedge",!0);B(V,te,yt,"∨","\\vee",!0);B(V,te,ve,"√","\\surd");B(V,te,Ya,"⟨","\\langle",!0);B(V,te,Ya,"∣","\\lvert");B(V,te,Ya,"∥","\\lVert");B(V,te,Qo,"?","?");B(V,te,Qo,"!","!");B(V,te,Qo,"⟩","\\rangle",!0);B(V,te,Qo,"∣","\\rvert");B(V,te,Qo,"∥","\\rVert");B(V,te,he,"=","=");B(V,te,he,":",":");B(V,te,he,"≈","\\approx",!0);B(V,te,he,"≅","\\cong",!0);B(V,te,he,"≥","\\ge");B(V,te,he,"≥","\\geq",!0);B(V,te,he,"←","\\gets");B(V,te,he,">","\\gt",!0);B(V,te,he,"∈","\\in",!0);B(V,te,he,"","\\@not");B(V,te,he,"⊂","\\subset",!0);B(V,te,he,"⊃","\\supset",!0);B(V,te,he,"⊆","\\subseteq",!0);B(V,te,he,"⊇","\\supseteq",!0);B(V,de,he,"⊈","\\nsubseteq",!0);B(V,de,he,"⊉","\\nsupseteq",!0);B(V,te,he,"⊨","\\models");B(V,te,he,"←","\\leftarrow",!0);B(V,te,he,"≤","\\le");B(V,te,he,"≤","\\leq",!0);B(V,te,he,"<","\\lt",!0);B(V,te,he,"→","\\rightarrow",!0);B(V,te,he,"→","\\to");B(V,de,he,"≱","\\ngeq",!0);B(V,de,he,"≰","\\nleq",!0);B(V,te,_u," ","\\ ");B(V,te,_u," ","\\space");B(V,te,_u," ","\\nobreakspace");B(We,te,_u," ","\\ ");B(We,te,_u," "," ");B(We,te,_u," ","\\space");B(We,te,_u," ","\\nobreakspace");B(V,te,_u,"","\\nobreak");B(V,te,_u,"","\\allowbreak");B(V,te,C0,",",",");B(V,te,C0,";",";");B(V,de,yt,"⊼","\\barwedge",!0);B(V,de,yt,"⊻","\\veebar",!0);B(V,te,yt,"⊙","\\odot",!0);B(V,te,yt,"⊕","\\oplus",!0);B(V,te,yt,"⊗","\\otimes",!0);B(V,te,ve,"∂","\\partial",!0);B(V,te,yt,"⊘","\\oslash",!0);B(V,de,yt,"⊚","\\circledcirc",!0);B(V,de,yt,"⊡","\\boxdot",!0);B(V,te,yt,"△","\\bigtriangleup");B(V,te,yt,"▽","\\bigtriangledown");B(V,te,yt,"†","\\dagger");B(V,te,yt,"⋄","\\diamond");B(V,te,yt,"⋆","\\star");B(V,te,yt,"◃","\\triangleleft");B(V,te,yt,"▹","\\triangleright");B(V,te,Ya,"{","\\{");B(We,te,ve,"{","\\{");B(We,te,ve,"{","\\textbraceleft");B(V,te,Qo,"}","\\}");B(We,te,ve,"}","\\}");B(We,te,ve,"}","\\textbraceright");B(V,te,Ya,"{","\\lbrace");B(V,te,Qo,"}","\\rbrace");B(V,te,Ya,"[","\\lbrack",!0);B(We,te,ve,"[","\\lbrack",!0);B(V,te,Qo,"]","\\rbrack",!0);B(We,te,ve,"]","\\rbrack",!0);B(V,te,Ya,"(","\\lparen",!0);B(V,te,Qo,")","\\rparen",!0);B(We,te,ve,"<","\\textless",!0);B(We,te,ve,">","\\textgreater",!0);B(V,te,Ya,"⌊","\\lfloor",!0);B(V,te,Qo,"⌋","\\rfloor",!0);B(V,te,Ya,"⌈","\\lceil",!0);B(V,te,Qo,"⌉","\\rceil",!0);B(V,te,ve,"\\","\\backslash");B(V,te,ve,"∣","|");B(V,te,ve,"∣","\\vert");B(We,te,ve,"|","\\textbar",!0);B(V,te,ve,"∥","\\|");B(V,te,ve,"∥","\\Vert");B(We,te,ve,"∥","\\textbardbl");B(We,te,ve,"~","\\textasciitilde");B(We,te,ve,"\\","\\textbackslash");B(We,te,ve,"^","\\textasciicircum");B(V,te,he,"↑","\\uparrow",!0);B(V,te,he,"⇑","\\Uparrow",!0);B(V,te,he,"↓","\\downarrow",!0);B(V,te,he,"⇓","\\Downarrow",!0);B(V,te,he,"↕","\\updownarrow",!0);B(V,te,he,"⇕","\\Updownarrow",!0);B(V,te,zs,"∐","\\coprod");B(V,te,zs,"⋁","\\bigvee");B(V,te,zs,"⋀","\\bigwedge");B(V,te,zs,"⨄","\\biguplus");B(V,te,zs,"⋂","\\bigcap");B(V,te,zs,"⋃","\\bigcup");B(V,te,zs,"∫","\\int");B(V,te,zs,"∫","\\intop");B(V,te,zs,"∬","\\iint");B(V,te,zs,"∭","\\iiint");B(V,te,zs,"∏","\\prod");B(V,te,zs,"∑","\\sum");B(V,te,zs,"⨂","\\bigotimes");B(V,te,zs,"⨁","\\bigoplus");B(V,te,zs,"⨀","\\bigodot");B(V,te,zs,"∮","\\oint");B(V,te,zs,"∯","\\oiint");B(V,te,zs,"∰","\\oiiint");B(V,te,zs,"⨆","\\bigsqcup");B(V,te,zs,"∫","\\smallint");B(We,te,Ap,"…","\\textellipsis");B(V,te,Ap,"…","\\mathellipsis");B(We,te,Ap,"…","\\ldots",!0);B(V,te,Ap,"…","\\ldots",!0);B(V,te,Ap,"⋯","\\@cdots",!0);B(V,te,Ap,"⋱","\\ddots",!0);B(V,te,ve,"⋮","\\varvdots");B(We,te,ve,"⋮","\\varvdots");B(V,te,Ln,"ˊ","\\acute");B(V,te,Ln,"ˋ","\\grave");B(V,te,Ln,"¨","\\ddot");B(V,te,Ln,"~","\\tilde");B(V,te,Ln,"ˉ","\\bar");B(V,te,Ln,"˘","\\breve");B(V,te,Ln,"ˇ","\\check");B(V,te,Ln,"^","\\hat");B(V,te,Ln,"⃗","\\vec");B(V,te,Ln,"˙","\\dot");B(V,te,Ln,"˚","\\mathring");B(V,te,Qt,"","\\@imath");B(V,te,Qt,"","\\@jmath");B(V,te,ve,"ı","ı");B(V,te,ve,"ȷ","ȷ");B(We,te,ve,"ı","\\i",!0);B(We,te,ve,"ȷ","\\j",!0);B(We,te,ve,"ß","\\ss",!0);B(We,te,ve,"æ","\\ae",!0);B(We,te,ve,"œ","\\oe",!0);B(We,te,ve,"ø","\\o",!0);B(We,te,ve,"Æ","\\AE",!0);B(We,te,ve,"Œ","\\OE",!0);B(We,te,ve,"Ø","\\O",!0);B(We,te,Ln,"ˊ","\\'");B(We,te,Ln,"ˋ","\\`");B(We,te,Ln,"ˆ","\\^");B(We,te,Ln,"˜","\\~");B(We,te,Ln,"ˉ","\\=");B(We,te,Ln,"˘","\\u");B(We,te,Ln,"˙","\\.");B(We,te,Ln,"¸","\\c");B(We,te,Ln,"˚","\\r");B(We,te,Ln,"ˇ","\\v");B(We,te,Ln,"¨",'\\"');B(We,te,Ln,"˝","\\H");B(We,te,Ln,"◯","\\textcircled");var VF={"--":!0,"---":!0,"``":!0,"''":!0};B(We,te,ve,"–","--",!0);B(We,te,ve,"–","\\textendash");B(We,te,ve,"—","---",!0);B(We,te,ve,"—","\\textemdash");B(We,te,ve,"‘","`",!0);B(We,te,ve,"‘","\\textquoteleft");B(We,te,ve,"’","'",!0);B(We,te,ve,"’","\\textquoteright");B(We,te,ve,"“","``",!0);B(We,te,ve,"“","\\textquotedblleft");B(We,te,ve,"”","''",!0);B(We,te,ve,"”","\\textquotedblright");B(V,te,ve,"°","\\degree",!0);B(We,te,ve,"°","\\degree");B(We,te,ve,"°","\\textdegree",!0);B(V,te,ve,"£","\\pounds");B(V,te,ve,"£","\\mathsterling",!0);B(We,te,ve,"£","\\pounds");B(We,te,ve,"£","\\textsterling",!0);B(V,de,ve,"✠","\\maltese");B(We,de,ve,"✠","\\maltese");var iR='0123456789/@."';for(var bk=0;bk{var r=e.charCodeAt(0),t=e.charCodeAt(1),n=(r-55296)*1024+(t-56320)+65536;if(119808<=n&&n<120484){var s=Math.floor((n-119808)/26);return gR[s]}else if(120782<=n&&n<=120831){var o=Math.floor((n-120782)/10);return QBn[o]}else{if(n===120485||n===120486)return gR[0];if(120486{if(k_(e.classes)!==k_(r.classes)||e.skew!==r.skew||e.maxFontSize!==r.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var t=e.classes[0];if(t==="mbin"||t==="mord")return!1}for(var n of Object.keys(e.style))if(e.style[n]!==r.style[n])return!1;for(var s of Object.keys(r.style))if(e.style[s]!==r.style[s])return!1;return!0},QF=e=>{for(var r=0;rt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>s&&(s=a.maxFontSize)}r.height=t,r.depth=n,r.maxFontSize=s},Qe=function(r,t,n,s){var o=new Np(r,t,n,s);return B6(o),o},S_=(e,r,t,n)=>new Np(e,r,t,n),lp=function(r,t,n){var s=Qe([r],[],t);return s.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=ot(s.height),s.maxFontSize=1,s},JBn=function(r,t,n,s){var o=new ix(r,t,n,s);return B6(o),o},fu=function(r){var t=new Ep(r);return B6(t),t},up=function(r,t){return r instanceof Ep?Qe([],[r],t):r},eFn=function(r){if(r.positionType==="individualShift"){for(var t=r.children,n=[t[0]],s=-t[0].shift-t[0].elem.depth,o=s,a=1;a{var t=Qe(["mspace"],[],r),n=Un(e,r);return t.style.marginRight=ot(n),t},i1=(e,r,t)=>{var n,s;switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return r==="textbf"&&t==="textit"?s="BoldItalic":r==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",n+"-"+s},k5={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},YF={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ZF=function(r,t){var[n,s,o]=YF[r],a=new j_(n),i=new au([a],{width:ot(s),height:ot(o),style:"width:"+ot(s),viewBox:"0 0 "+1e3*s+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),c=S_(["overlay"],[i],t);return c.height=o,c.style.height=ot(o),c.style.width=ot(s),c},Hn={number:3,unit:"mu"},_f={number:4,unit:"mu"},Ll={number:5,unit:"mu"},tFn={mord:{mop:Hn,mbin:_f,mrel:Ll,minner:Hn},mop:{mord:Hn,mop:Hn,mrel:Ll,minner:Hn},mbin:{mord:_f,mop:_f,mopen:_f,minner:_f},mrel:{mord:Ll,mop:Ll,mopen:Ll,minner:Ll},mopen:{},mclose:{mop:Hn,mbin:_f,mrel:Ll,minner:Hn},mpunct:{mord:Hn,mop:Hn,mrel:Ll,mopen:Hn,mclose:Hn,mpunct:Hn,minner:Hn},minner:{mord:Hn,mop:Hn,mbin:_f,mrel:Ll,mopen:Hn,mpunct:Hn,minner:Hn}},rFn={mord:{mop:Hn},mop:{mord:Hn,mop:Hn},mbin:{},mrel:{},mopen:{},mclose:{mop:Hn},mpunct:{},minner:{mop:Hn}},JF={},Gb={},Wb={};function gt(e){for(var{type:r,names:t,props:n,handler:s,htmlBuilder:o,mathmlBuilder:a}=e,i={type:r,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:s},c=0;c{var v=w.classes[0],b=k.classes[0];v==="mbin"&&sFn.has(b)?w.classes[0]="mord":b==="mbin"&&nFn.has(v)&&(k.classes[0]="mord")},{node:_},p,m),j5(o,(k,w)=>{var v,b,x=C5(w),y=C5(k),S=x&&y?k.hasClass("mtight")?(v=rFn[x])==null?void 0:v[y]:(b=tFn[x])==null?void 0:b[y]:null;if(S)return XF(S,u)},{node:_},p,m),o},j5=function(r,t,n,s,o){s&&r.push(s);for(var a=0;ap=>{r.splice(_+1,0,p),a++})(a)}s&&r.pop()},eH=function(r){return r instanceof Ep||r instanceof ix||r instanceof Np&&r.hasClass("enclosing")?r:null},S5=function(r,t){var n=eH(r);if(n){var s=n.children;if(s.length){if(t==="right")return S5(s[s.length-1],"right");if(t==="left")return S5(s[0],"left")}}return r},C5=function(r,t){if(!r)return null;t&&(r=S5(r,t));var n=r.classes[0];return aFn[n]||null},Eg=function(r,t){var n=["nulldelimiter"].concat(r.baseSizingClasses());return Qe(t.concat(n))},Yr=function(r,t,n){if(!r)return Qe();if(Gb[r.type]){var s=Gb[r.type](r,t);if(n&&t.size!==n.size){s=Qe(t.sizingClasses(n),[s],t);var o=t.sizeMultiplier/n.sizeMultiplier;s.height*=o,s.depth*=o}return s}else throw new tt("Got group of unknown type: '"+r.type+"'")};function c1(e,r){var t=Qe(["base"],e,r),n=Qe(["strut"]);return n.style.height=ot(t.height+t.depth),t.depth&&(n.style.verticalAlign=ot(-t.depth)),t.children.unshift(n),t}function z5(e,r){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var n=Is(e,r,"root"),s;n.length===2&&n[1].hasClass("tag")&&(s=n.pop());for(var o=[],a=[],i=0;i0&&(o.push(c1(a,r)),a=[]),o.push(n[i]));a.length>0&&o.push(c1(a,r));var u;t?(u=c1(Is(t,r,!0),r),u.classes=["tag"],o.push(u)):s&&o.push(s);var d=Qe(["katex-html"],o);if(d.setAttribute("aria-hidden","true"),u){var _=u.children[0];_.style.height=ot(d.height+d.depth),d.depth&&(_.style.verticalAlign=ot(-d.depth))}return d}function tH(e){return new Ep(e)}class rt{constructor(r,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=r,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(r,t){this.attributes[r]=t}getAttribute(r){return this.attributes[r]}toNode(){var r=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&r.setAttribute(t,this.attributes[t]);this.classes.length>0&&(r.className=k_(this.classes));for(var n=0;n0&&(r+=' class ="'+zo(k_(this.classes))+'"'),r+=">";for(var n=0;n",r}toText(){return this.children.map(r=>r.toText()).join("")}}class Cs{constructor(r){this.text=void 0,this.text=r}toNode(){return document.createTextNode(this.text)}toMarkup(){return zo(this.toText())}toText(){return this.text}}class rH{constructor(r){this.width=void 0,this.character=void 0,this.width=r,r>=.05555&&r<=.05556?this.character=" ":r>=.1666&&r<=.1667?this.character=" ":r>=.2222&&r<=.2223?this.character=" ":r>=.2777&&r<=.2778?this.character="  ":r>=-.05556&&r<=-.05555?this.character=" ⁣":r>=-.1667&&r<=-.1666?this.character=" ⁣":r>=-.2223&&r<=-.2222?this.character=" ⁣":r>=-.2778&&r<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var r=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return r.setAttribute("width",ot(this.width)),r}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var iFn=new Set(["\\imath","\\jmath"]),cFn=new Set(["mrow","mtable"]),zi=function(r,t,n){return $n[t][r]&&$n[t][r].replace&&r.charCodeAt(0)!==55349&&!(VF.hasOwnProperty(r)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(r=$n[t][r].replace),new Cs(r)},F6=function(r){return r.length===1?r[0]:new rt("mrow",r)},lFn={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},H6=(e,r)=>{if(e.mode==="text"){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold"}var t=r.font;if(!t||t==="mathnormal")return null;var n=e.mode,s=lFn[t];if(s)return typeof s=="function"?s(e):s;var o=e.text;if(iFn.has(o))return null;if($n[n][o]){var a=$n[n][o].replace;a&&(o=a)}var i=k5[t].fontName;return I6(o,i,n)?k5[t].variant:null};function kk(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var r=e.children[0];return r instanceof Cs&&r.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var t=e.children[0];return t instanceof Cs&&t.text===","}else return!1}var Za=function(r,t,n){if(r.length===1){var s=bn(r[0],t);return n&&s instanceof rt&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var o=[],a,i=0;i=1&&(a.type==="mn"||kk(a))){var u=c.children[0];u instanceof rt&&u.type==="mn"&&(u.children=[...a.children,...u.children],o.pop())}else if(a.type==="mi"&&a.children.length===1){var d=a.children[0];if(d instanceof Cs&&d.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var _=c.children[0];_ instanceof Cs&&_.text.length>0&&(_.text=_.text.slice(0,1)+"̸"+_.text.slice(1),o.pop())}}}o.push(c),a=c}return o},C_=function(r,t,n){return F6(Za(r,t,n))},bn=function(r,t){if(!r)return new rt("mrow");if(Wb[r.type])return Wb[r.type](r,t);throw new tt("Got group of unknown type: '"+r.type+"'")};function vR(e,r,t,n,s){var o=Za(e,t),a;o.length===1&&o[0]instanceof rt&&cFn.has(o[0].type)?a=o[0]:a=new rt("mrow",o);var i=new rt("annotation",[new Cs(r)]);i.setAttribute("encoding","application/x-tex");var c=new rt("semantics",[a,i]),u=new rt("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var d=s?"katex":"katex-mathml";return Qe([d],[u])}var uFn=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],bR=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],yR=function(r,t){return t.size<2?r:uFn[r-1][t.size-1]};class Hl{constructor(r){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=r.style,this.color=r.color,this.size=r.size||Hl.BASESIZE,this.textSize=r.textSize||this.size,this.phantom=!!r.phantom,this.font=r.font||"",this.fontFamily=r.fontFamily||"",this.fontWeight=r.fontWeight||"",this.fontShape=r.fontShape||"",this.sizeMultiplier=bR[this.size-1],this.maxSize=r.maxSize,this.minRuleThickness=r.minRuleThickness,this._fontMetrics=void 0}extend(r){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,r),new Hl(t)}havingStyle(r){return this.style===r?this:this.extend({style:r,size:yR(this.textSize,r)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(r){return this.size===r&&this.textSize===r?this:this.extend({style:this.style.text(),size:r,textSize:r,sizeMultiplier:bR[r-1]})}havingBaseStyle(r){r=r||this.style.text();var t=yR(Hl.BASESIZE,r);return this.size===t&&this.textSize===Hl.BASESIZE&&this.style===r?this:this.extend({style:r,size:t})}havingBaseSizing(){var r;switch(this.style.id){case 4:case 5:r=3;break;case 6:case 7:r=1;break;default:r=6}return this.extend({style:this.style.text(),size:r})}withColor(r){return this.extend({color:r})}withPhantom(){return this.extend({phantom:!0})}withFont(r){return this.extend({font:r})}withTextFontFamily(r){return this.extend({fontFamily:r,font:""})}withTextFontWeight(r){return this.extend({fontWeight:r,font:""})}withTextFontShape(r){return this.extend({fontShape:r,font:""})}sizingClasses(r){return r.size!==this.size?["sizing","reset-size"+r.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Hl.BASESIZE?["sizing","reset-size"+this.size,"size"+Hl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=KBn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Hl.BASESIZE=6;var nH=function(r){return new Hl({style:r.displayMode?ir.DISPLAY:ir.TEXT,maxSize:r.maxSize,minRuleThickness:r.minRuleThickness})},sH=function(r,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),r=Qe(n,[r])}return r},_Fn=function(r,t,n){var s=nH(n),o;if(n.output==="mathml")return vR(r,t,s,n.displayMode,!0);if(n.output==="html"){var a=z5(r,s);o=Qe(["katex"],[a])}else{var i=vR(r,t,s,n.displayMode,!1),c=z5(r,s);o=Qe(["katex"],[i,c])}return sH(o,n)},fFn=function(r,t,n){var s=nH(n),o=z5(r,s),a=Qe(["katex"],[o]);return sH(a,n)},dFn={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},ux=function(r){var t=new rt("mo",[new Cs(dFn[r.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},hFn={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},pFn=new Set(["widehat","widecheck","widetilde","utilde"]),_x=function(r,t){function n(){var i=4e5,c=r.label.slice(1);if(pFn.has(c)&&"base"in r){var u=r.base.type==="ordgroup"?r.base.body.length:1,d,_,p;if(u>5)c==="widehat"||c==="widecheck"?(d=420,i=2364,p=.42,_=c+"4"):(d=312,i=2340,p=.34,_="tilde4");else{var m=[1,1,2,2,3,3][u];c==="widehat"||c==="widecheck"?(i=[0,1062,2364,2364,2364][m],d=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],_=c+m):(i=[0,600,1033,2339,2340][m],d=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],_="tilde"+m)}var k=new j_(_),w=new au([k],{width:"100%",height:ot(p),viewBox:"0 0 "+i+" "+d,preserveAspectRatio:"none"});return{span:S_([],[w],t),minWidth:0,height:p}}else{var v=[],b=hFn[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[x,y,S]=b,E=S/1e3,N=x.length,A,z;if(N===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');A=["hide-tail"],z=[b[3]]}else if(N===2)A=["halfarrow-left","halfarrow-right"],z=["xMinYMin","xMaxYMin"];else if(N===3)A=["brace-left","brace-center","brace-right"],z=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+N+" children.");for(var M=0;M0&&(s.style.minWidth=ot(o)),s},mFn=function(r,t,n,s,o){var a,i=r.height+r.depth+n+s;if(/fbox|color|angl/.test(t)){if(a=Qe(["stretchy",t],[],o),t==="fbox"){var c=o.color&&o.getColor();c&&(a.style.borderColor=c)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new g5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new g5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new au(u,{width:"100%",height:ot(i)});a=S_([],[d],o)}return a.height=i,a.style.height=ot(i),a},gFn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},vFn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function bFn(e){return e in gFn}function br(e,r){if(!e||e.type!==r)throw new Error("Expected node of type "+r+", but got "+(e?"node of type "+e.type:String(e)));return e}function fx(e){var r=dx(e);if(!r)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return r}function dx(e){return e&&(e.type==="atom"||vFn.hasOwnProperty(e.type))?e:null}var oH=e=>{if(e instanceof Ka)return e;if(GBn(e)&&e.children.length===1)return oH(e.children[0])},q6=(e,r)=>{var t,n,s;e&&e.type==="supsub"?(n=br(e.base,"accent"),t=n.base,e.base=t,s=UBn(Yr(e,r)),e.base=n):(n=br(e,"accent"),t=n.base);var o=Yr(t,r.havingCrampedStyle()),a=n.isShifty&&uu(t),i=0;if(a){var c,u;i=(c=(u=oH(o))==null?void 0:u.skew)!=null?c:0}var d=n.label==="\\c",_=d?o.height+o.depth:Math.min(o.height,r.fontMetrics().xHeight),p;if(n.isStretchy)p=_x(n,r),p=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+ot(2*i)+")",marginLeft:ot(2*i)}:void 0}]});else{var m,k;n.label==="\\vec"?(m=ZF("vec",r),k=YF.vec[1]):(m=lx({mode:n.mode,text:n.label},r,"textord"),m=qBn(m),m.italic=0,k=m.width,d&&(_+=m.depth)),p=Qe(["accent-body"],[m]);var w=n.label==="\\textcircled";w&&(p.classes.push("accent-full"),_=o.height);var v=i;w||(v-=k/2),p.style.left=ot(v),n.label==="\\textcircled"&&(p.style.top=".2em"),p=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-_},{type:"elem",elem:p}]})}var b=Qe(["mord","accent"],[p],r);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},aH=(e,r)=>{var t=e.isStretchy?ux(e.label):new rt("mo",[zi(e.label,e.mode)]),n=new rt("mover",[bn(e.base,r),t]);return n.setAttribute("accent","true"),n},yFn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));gt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,r)=>{var t=Kb(r[0]),n=!yFn.test(e.funcName),s=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:s,base:t}},htmlBuilder:q6,mathmlBuilder:aH});gt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,r)=>{var t=r[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:q6,mathmlBuilder:aH});gt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"accentUnder",mode:t.mode,label:n,base:s}},htmlBuilder:(e,r)=>{var t=Yr(e.base,r),n=_x(e,r),s=e.label==="\\utilde"?.12:0,o=Qr({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Qe(["mord","accentunder"],[o],r)},mathmlBuilder:(e,r)=>{var t=ux(e.label),n=new rt("munder",[bn(e.base,r),t]);return n.setAttribute("accentunder","true"),n}});var l1=e=>{var r=new rt("mpadded",e?[e]:[]);return r.setAttribute("width","+0.6em"),r.setAttribute("lspace","0.3em"),r};gt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,r,t){var{parser:n,funcName:s}=e;return{type:"xArrow",mode:n.mode,label:s,body:r[0],below:t[0]}},htmlBuilder(e,r){var t=r.style,n=r.havingStyle(t.sup()),s=up(Yr(e.body,n,r),r),o=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(o+"-arrow-pad");var a;e.below&&(n=r.havingStyle(t.sub()),a=up(Yr(e.below,n,r),r),a.classes.push(o+"-arrow-pad"));var i=_x(e,r),c=-r.fontMetrics().axisHeight+.5*i.height,u=-r.fontMetrics().axisHeight-.5*i.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var d;if(a){var _=-r.fontMetrics().axisHeight+a.height+.5*i.height+.111;d=Qr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:i,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:_}]})}else d=Qr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:i,shift:c,wrapperClasses:["svg-align"]}]});return Qe(["mrel","x-arrow"],[d],r)},mathmlBuilder(e,r){var t=ux(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var s=l1(bn(e.body,r));if(e.below){var o=l1(bn(e.below,r));n=new rt("munderover",[t,o,s])}else n=new rt("mover",[t,s])}else if(e.below){var a=l1(bn(e.below,r));n=new rt("munder",[t,a])}else n=l1(),n=new rt("mover",[t,n]);return n}});function iH(e,r){var t=Is(e.body,r,!0);return Qe([e.mclass],t,r)}function cH(e,r){var t,n=Za(e.body,r);return e.mclass==="minner"?t=new rt("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(t=n[0],t.type="mi"):t=new rt("mi",n):(e.isCharacterBox?(t=n[0],t.type="mo"):t=new rt("mo",n),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}gt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"mclass",mode:t.mode,mclass:"m"+n.slice(5),body:Ss(s),isCharacterBox:uu(s)}},htmlBuilder:iH,mathmlBuilder:cH});var hx=e=>{var r=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return r.type==="atom"&&(r.family==="bin"||r.family==="rel")?"m"+r.family:"mord"};gt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,r){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:hx(r[0]),body:Ss(r[1]),isCharacterBox:uu(r[1])}}});gt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,r){var{parser:t,funcName:n}=e,s=r[1],o=r[0],a;n!=="\\stackrel"?a=hx(s):a="mrel";var i={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Ss(s)},c={type:"supsub",mode:o.mode,base:i,sup:n==="\\underset"?null:o,sub:n==="\\underset"?o:null};return{type:"mclass",mode:t.mode,mclass:a,body:[c],isCharacterBox:uu(c)}},htmlBuilder:iH,mathmlBuilder:cH});gt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:hx(r[0]),body:Ss(r[0])}},htmlBuilder(e,r){var t=Is(e.body,r,!0),n=Qe([e.mclass],t,r);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,r){var t=Za(e.body,r),n=new rt("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var xFn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},xR=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),wR=e=>e.type==="textord"&&e.text==="@",wFn=(e,r)=>(e.type==="mathord"||e.type==="atom")&&e.text===r;function kFn(e,r,t){var n=xFn[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(n,[r[0]],[r[1]]);case"\\uparrow":case"\\downarrow":{var s=t.callFunction("\\\\cdleft",[r[0]],[]),o={type:"atom",text:n,mode:"math",family:"rel"},a=t.callFunction("\\Big",[o],[]),i=t.callFunction("\\\\cdright",[r[1]],[]),c={type:"ordgroup",mode:"math",body:[s,a,i]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function jFn(e){var r=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){r.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var t=e.fetch().text;if(t==="&"||t==="\\\\")e.consume();else if(t==="\\end"){r[r.length-1].length===0&&r.pop();break}else throw new tt("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],s=[n],o=0;oAV".includes(u))for(var _=0;_<2;_++){for(var p=!0,m=c+1;mAV=|." after @',a[c]);var k=kFn(u,d,e),w={type:"styling",body:[k],mode:"math",style:"display",resetFont:!0};n.push(w),i=xR()}o%2===0?n.push(i):n.shift(),n=[],s.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var v=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}gt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e;return{type:"cdlabel",mode:t.mode,side:n.slice(4),label:r[0]}},htmlBuilder(e,r){var t=r.havingStyle(r.style.sup()),n=up(Yr(e.label,t,r),r);return n.classes.push("cd-label-"+e.side),n.style.bottom=ot(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,r){var t=new rt("mrow",[bn(e.label,r)]);return t=new rt("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new rt("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});gt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,r){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:r[0]}},htmlBuilder(e,r){var t=up(Yr(e.fragment,r),r);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,r){return new rt("mrow",[bn(e.fragment,r)])}});gt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,r){for(var{parser:t}=e,n=br(r[0],"ordgroup"),s=n.body,o="",a=0;a=1114111)throw new tt("\\@char with invalid code point "+o);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var lH=(e,r)=>{var t=Is(e.body,r.withColor(e.color),!1);return fu(t)},uH=(e,r)=>{var t=Za(e.body,r.withColor(e.color)),n=new rt("mstyle",t);return n.setAttribute("mathcolor",e.color),n};gt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,r){var{parser:t}=e,n=br(r[0],"color-token").color,s=r[1];return{type:"color",mode:t.mode,color:n,body:Ss(s)}},htmlBuilder:lH,mathmlBuilder:uH});gt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,r){var{parser:t,breakOnTokenText:n}=e,s=br(r[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var o=t.parseExpression(!0,n);return{type:"color",mode:t.mode,color:s,body:o}},htmlBuilder:lH,mathmlBuilder:uH});gt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,r,t){var{parser:n}=e,s=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,o=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:o,size:s&&br(s,"size").value}},htmlBuilder(e,r){var t=Qe(["mspace"],[],r);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=ot(Un(e.size,r)))),t},mathmlBuilder(e,r){var t=new rt("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",ot(Un(e.size,r)))),t}});var E5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},_H=e=>{var r=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new tt("Expected a control sequence",e);return r},SFn=e=>{var r=e.gullet.popToken();return r.text==="="&&(r=e.gullet.popToken(),r.text===" "&&(r=e.gullet.popToken())),r},fH=(e,r,t,n)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(r,s,n)};gt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:r,funcName:t}=e;r.consumeSpaces();var n=r.fetch();if(E5[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=E5[n.text]),br(r.parseFunction(),"internal");throw new tt("Invalid token after macro prefix",n)}});gt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=r.gullet.popToken(),s=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new tt("Expected a control sequence",n);for(var o=0,a,i=[[]];r.gullet.future().text!=="{";)if(n=r.gullet.popToken(),n.text==="#"){if(r.gullet.future().text==="{"){a=r.gullet.future(),i[o].push("{");break}if(n=r.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new tt('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==o+1)throw new tt('Argument number "'+n.text+'" out of order');o++,i.push([])}else{if(n.text==="EOF")throw new tt("Expected a macro definition");i[o].push(n.text)}var{tokens:c}=r.gullet.consumeArg();return a&&c.unshift(a),(t==="\\edef"||t==="\\xdef")&&(c=r.gullet.expandTokens(c),c.reverse()),r.gullet.macros.set(s,{tokens:c,numArgs:o,delimiters:i},t===E5[t]),{type:"internal",mode:r.mode}}});gt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=_H(r.gullet.popToken());r.gullet.consumeSpaces();var s=SFn(r);return fH(r,n,s,t==="\\\\globallet"),{type:"internal",mode:r.mode}}});gt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:r,funcName:t}=e,n=_H(r.gullet.popToken()),s=r.gullet.popToken(),o=r.gullet.popToken();return fH(r,n,o,t==="\\\\globalfuture"),r.gullet.pushToken(o),r.gullet.pushToken(s),{type:"internal",mode:r.mode}}});var Pm=function(r,t,n){var s=$n.math[r]&&$n.math[r].replace,o=I6(s||r,t,n);if(!o)throw new Error("Unsupported symbol "+r+" and font size "+t+".");return o},U6=function(r,t,n,s){var o=n.havingBaseStyle(t),a=Qe(s.concat(o.sizingClasses(n)),[r],n),i=o.sizeMultiplier/n.sizeMultiplier;return a.height*=i,a.depth*=i,a.maxFontSize=o.sizeMultiplier,a},dH=function(r,t,n){var s=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;r.classes.push("delimcenter"),r.style.top=ot(o),r.height-=o,r.depth+=o},CFn=function(r,t,n,s,o,a){var i=Go(r,"Main-Regular",o,s),c=U6(i,t,s,a);return dH(c,s,t),c},zFn=function(r,t,n,s){return Go(r,"Size"+t+"-Regular",n,s)},hH=function(r,t,n,s,o,a){var i=zFn(r,t,o,s),c=U6(Qe(["delimsizing","size"+t],[i],s),ir.TEXT,s,a);return n&&dH(c,s,ir.TEXT),c},jk=function(r,t,n){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var o=Qe(["delimsizinginner",s],[Qe([],[Go(r,t,n)])]);return{type:"elem",elem:o}},Sk=function(r,t,n){var s=Dc["Size4-Regular"][r.charCodeAt(0)]?Dc["Size4-Regular"][r.charCodeAt(0)][4]:Dc["Size1-Regular"][r.charCodeAt(0)][4],o=new j_("inner",DBn(r,Math.round(1e3*t))),a=new au([o],{width:ot(s),height:ot(t),style:"width:"+ot(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=S_([],[a],n);return i.height=t,i.style.height=ot(t),i.style.width=ot(s),{type:"elem",elem:i}},N5=.008,u1={type:"kern",size:-1*N5},EFn=new Set(["|","\\lvert","\\rvert","\\vert"]),NFn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),pH=function(r,t,n,s,o,a){var i,c,u,d,_="",p=0;i=u=d=r,c=null;var m="Size1-Regular";r==="\\uparrow"?u=d="⏐":r==="\\Uparrow"?u=d="‖":r==="\\downarrow"?i=u="⏐":r==="\\Downarrow"?i=u="‖":r==="\\updownarrow"?(i="\\uparrow",u="⏐",d="\\downarrow"):r==="\\Updownarrow"?(i="\\Uparrow",u="‖",d="\\Downarrow"):EFn.has(r)?(u="∣",_="vert",p=333):NFn.has(r)?(u="∥",_="doublevert",p=556):r==="["||r==="\\lbrack"?(i="⎡",u="⎢",d="⎣",m="Size4-Regular",_="lbrack",p=667):r==="]"||r==="\\rbrack"?(i="⎤",u="⎥",d="⎦",m="Size4-Regular",_="rbrack",p=667):r==="\\lfloor"||r==="⌊"?(u=i="⎢",d="⎣",m="Size4-Regular",_="lfloor",p=667):r==="\\lceil"||r==="⌈"?(i="⎡",u=d="⎢",m="Size4-Regular",_="lceil",p=667):r==="\\rfloor"||r==="⌋"?(u=i="⎥",d="⎦",m="Size4-Regular",_="rfloor",p=667):r==="\\rceil"||r==="⌉"?(i="⎤",u=d="⎥",m="Size4-Regular",_="rceil",p=667):r==="("||r==="\\lparen"?(i="⎛",u="⎜",d="⎝",m="Size4-Regular",_="lparen",p=875):r===")"||r==="\\rparen"?(i="⎞",u="⎟",d="⎠",m="Size4-Regular",_="rparen",p=875):r==="\\{"||r==="\\lbrace"?(i="⎧",c="⎨",d="⎩",u="⎪",m="Size4-Regular"):r==="\\}"||r==="\\rbrace"?(i="⎫",c="⎬",d="⎭",u="⎪",m="Size4-Regular"):r==="\\lgroup"||r==="⟮"?(i="⎧",d="⎩",u="⎪",m="Size4-Regular"):r==="\\rgroup"||r==="⟯"?(i="⎫",d="⎭",u="⎪",m="Size4-Regular"):r==="\\lmoustache"||r==="⎰"?(i="⎧",d="⎭",u="⎪",m="Size4-Regular"):(r==="\\rmoustache"||r==="⎱")&&(i="⎫",d="⎩",u="⎪",m="Size4-Regular");var k=Pm(i,m,o),w=k.height+k.depth,v=Pm(u,m,o),b=v.height+v.depth,x=Pm(d,m,o),y=x.height+x.depth,S=0,E=1;if(c!==null){var N=Pm(c,m,o);S=N.height+N.depth,E=2}var A=w+y+S,z=Math.max(0,Math.ceil((t-A)/(E*b))),M=A+z*E*b,$=s.fontMetrics().axisHeight;n&&($*=s.sizeMultiplier);var D=M/2-$,I=[];if(_.length>0){var G=M-w-y,F=Math.round(M*1e3),Q=LBn(_,Math.round(G*1e3)),K=new j_(_,Q),J=ot(p/1e3),ee=ot(F/1e3),P=new au([K],{width:J,height:ee,viewBox:"0 0 "+p+" "+F}),L=S_([],[P],s);L.height=F/1e3,L.style.width=J,L.style.height=ee,I.push({type:"elem",elem:L})}else{if(I.push(jk(d,m,o)),I.push(u1),c===null){var H=M-w-y+2*N5;I.push(Sk(u,H,s))}else{var q=(M-w-y-S)/2+2*N5;I.push(Sk(u,q,s)),I.push(u1),I.push(jk(c,m,o)),I.push(u1),I.push(Sk(u,q,s))}I.push(u1),I.push(jk(i,m,o))}var U=s.havingBaseStyle(ir.TEXT),oe=Qr({positionType:"bottom",positionData:D,children:I});return U6(Qe(["delimsizing","mult"],[oe],U),ir.TEXT,s,a)},Ck=80,zk=.08,Ek=function(r,t,n,s,o){var a=$Bn(r,s,n),i=new j_(r,a),c=new au([i],{width:"400em",height:ot(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return S_(["hide-tail"],[c],o)},AFn=function(r,t){var n=t.havingBaseSizing(),s=yH("\\surd",r*n.sizeMultiplier,bH,n),o=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),i,c,u,d,_;return s.type==="small"?(d=1e3+1e3*a+Ck,r<1?o=1:r<1.4&&(o=.7),c=(1+a+zk)/o,u=(1+a)/o,i=Ek("sqrtMain",c,d,a,t),i.style.minWidth="0.853em",_=.833/o):s.type==="large"?(d=(1e3+Ck)*tg[s.size],u=(tg[s.size]+a)/o,c=(tg[s.size]+a+zk)/o,i=Ek("sqrtSize"+s.size,c,d,a,t),i.style.minWidth="1.02em",_=1/o):(c=r+a+zk,u=r+a,d=Math.floor(1e3*r+a)+Ck,i=Ek("sqrtTall",c,d,a,t),i.style.minWidth="0.742em",_=1.056),i.height=u,i.style.height=ot(c),{span:i,advanceWidth:_,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*o}},mH=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),TFn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),gH=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),tg=[0,1.2,1.8,2.4,3],vH=function(r,t,n,s,o){if(r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle"),mH.has(r)||gH.has(r))return hH(r,t,!1,n,s,o);if(TFn.has(r))return pH(r,tg[t],!1,n,s,o);throw new tt("Illegal delimiter: '"+r+"'")},RFn=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],MFn=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"stack"}],bH=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],OFn=function(r){if(r.type==="small")return"Main-Regular";if(r.type==="large")return"Size"+r.size+"-Regular";if(r.type==="stack")return"Size4-Regular";var t=r.type;throw new Error("Add support for delim type '"+t+"' here.")},yH=function(r,t,n,s){for(var o=Math.min(2,3-s.style.size),a=o;at)return i}return n[n.length-1]},A5=function(r,t,n,s,o,a){r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle");var i;gH.has(r)?i=RFn:mH.has(r)?i=bH:i=MFn;var c=yH(r,t,i,s);return c.type==="small"?CFn(r,c.style,n,s,o,a):c.type==="large"?hH(r,c.size,n,s,o,a):pH(r,t,n,s,o,a)},Nk=function(r,t,n,s,o,a){var i=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,d=Math.max(t-i,n+i),_=Math.max(d/500*c,2*d-u);return A5(r,_,!0,s,o,a)},kR={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},$Fn=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function jR(e){return"isMiddle"in e}function px(e,r){var t=dx(e);if(t&&$Fn.has(t.text))return t;throw t?new tt("Invalid delimiter '"+t.text+"' after '"+r.funcName+"'",e):new tt("Invalid delimiter type '"+e.type+"'",e)}gt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,r)=>{var t=px(r[0],e);return{type:"delimsizing",mode:e.parser.mode,size:kR[e.funcName].size,mclass:kR[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,r)=>e.delim==="."?Qe([e.mclass]):vH(e.delim,e.size,r,e.mode,[e.mclass]),mathmlBuilder:e=>{var r=[];e.delim!=="."&&r.push(zi(e.delim,e.mode));var t=new rt("mo",r);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=ot(tg[e.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function SR(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}gt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new tt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:px(r[0],e).text,color:t}}});gt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=px(r[0],e),n=e.parser;++n.leftrightDepth;var s=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=br(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:s,left:t.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,r)=>{SR(e);for(var t=Is(e.body,r,!0,["mopen","mclose"]),n=0,s=0,o=!1,a=0;a{SR(e);var t=Za(e.body,r);if(e.left!=="."){var n=new rt("mo",[zi(e.left,e.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(e.right!=="."){var s=new rt("mo",[zi(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return F6(t)}});gt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var t=px(r[0],e);if(!e.parser.leftrightDepth)throw new tt("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,r)=>{var t;return e.delim==="."?t=Eg(r,[]):(t=vH(e.delim,1,r,e.mode,[]),t.isMiddle={delim:e.delim,options:r}),t},mathmlBuilder:(e,r)=>{var t=e.delim==="\\vert"||e.delim==="|"?zi("|","text"):zi(e.delim,e.mode),n=new rt("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var mx=(e,r)=>{var t=up(Yr(e.body,r),r),n=e.label.slice(1),s=r.sizeMultiplier,o,a,i=uu(e.body);if(n==="sout")o=Qe(["stretchy","sout"]),o.height=r.fontMetrics().defaultRuleThickness/s,a=-.5*r.fontMetrics().xHeight;else if(n==="phase"){var c=Un({number:.6,unit:"pt"},r),u=Un({number:.35,unit:"ex"},r),d=r.havingBaseSizing();s=s/d.sizeMultiplier;var _=t.height+t.depth+c+u;t.style.paddingLeft=ot(_/2+c);var p=Math.floor(1e3*_*s),m=MBn(p),k=new au([new j_("phase",m)],{width:"400em",height:ot(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});o=S_(["hide-tail"],[k],r),o.style.height=ot(_),a=t.depth+c+u}else{/cancel/.test(n)?i||t.classes.push("cancel-pad"):n==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var w,v,b=0;/box/.test(n)?(b=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness),w=r.fontMetrics().fboxsep+(n==="colorbox"?0:b),v=w):n==="angl"?(b=Math.max(r.fontMetrics().defaultRuleThickness,r.minRuleThickness),w=4*b,v=Math.max(0,.25-t.depth)):(w=i?.2:0,v=w),o=mFn(t,n,w,v,r),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=ot(b)):n==="angl"&&b!==.049&&(o.style.borderTopWidth=ot(b),o.style.borderRightWidth=ot(b)),a=t.depth+v,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var x;if(e.backgroundColor)x=Qr({positionType:"individualShift",children:[{type:"elem",elem:o,shift:a},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(n)?["svg-align"]:[];x=Qr({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:o,shift:a,wrapperClasses:y}]})}return/cancel/.test(n)&&(x.height=t.height,x.depth=t.depth),/cancel/.test(n)&&!i?Qe(["mord","cancel-lap"],[x],r):Qe(["mord"],[x],r)},gx=(e,r)=>{var t,n=new rt(e.label.includes("colorbox")?"mpadded":"menclose",[bn(e.body,r)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=r.fontMetrics().fboxsep*r.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*t+"pt"),n.setAttribute("height","+"+2*t+"pt"),n.setAttribute("lspace",t+"pt"),n.setAttribute("voffset",t+"pt"),e.label==="\\fcolorbox"){var s=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness);n.setAttribute("style","border: "+ot(s)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};gt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,r,t){var{parser:n,funcName:s}=e,o=br(r[0],"color-token").color,a=r[1];return{type:"enclose",mode:n.mode,label:s,backgroundColor:o,body:a}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,r,t){var{parser:n,funcName:s}=e,o=br(r[0],"color-token").color,a=br(r[1],"color-token").color,i=r[2];return{type:"enclose",mode:n.mode,label:s,backgroundColor:a,borderColor:o,body:i}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:r[0]}}});gt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"enclose",mode:t.mode,label:n,body:s}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=r[0];return{type:"enclose",mode:t.mode,label:n,body:s}},htmlBuilder:mx,mathmlBuilder:gx});gt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,r){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:r[0]}}});var xH={};function el(e){for(var{type:r,names:t,props:n,handler:s,htmlBuilder:o,mathmlBuilder:a}=e,i={type:r,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},c=0;c{var r=e.parser.settings;if(!r.displayMode)throw new tt("{"+e.envName+"} can be used only in display mode.")},DFn=new Set(["gather","gather*"]);function G6(e){if(!e.includes("ed"))return!e.includes("*")}function M_(e,r,t){var{hskipBeforeAndAfter:n,addJot:s,cols:o,arraystretch:a,colSeparationType:i,autoTag:c,singleRow:u,emptySingleRow:d,maxNumCols:_,leqno:p}=r;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new tt("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var k=[],w=[k],v=[],b=[],x=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function S(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new Ua("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),b.push(CR(e));;){var E=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var N={type:"ordgroup",mode:e.mode,body:E};t&&(N={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[N]}),k.push(N);var A=e.fetch().text;if(A==="&"){if(_&&k.length===_){if(u||i)throw new tt("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(A==="\\end"){S(),k.length===1&&N.type==="styling"&&N.body.length===1&&N.body[0].type==="ordgroup"&&N.body[0].body.length===0&&(w.length>1||!d)&&w.pop(),b.length0&&(y+=.25),u.push({pos:y,isDashed:Ye[Ae]})}for(S(a[0]),n=0;n0&&(D+=x,AYe))for(n=0;n=i)){var ae=void 0;if(s>0||r.hskipBeforeAndAfter){var le,me;ae=(le=(me=U)==null?void 0:me.pregap)!=null?le:p,ae!==0&&(Q=Qe(["arraycolsep"],[]),Q.style.width=ot(ae),F.push(Q))}var be=[];for(n=0;n0){for(var Ut=lp("hline",t,d),Gt=lp("hdashline",t,d),De=[{type:"elem",elem:Vt,shift:0}];u.length>0;){var ct=u.pop(),lt=ct.pos-I;ct.isDashed?De.push({type:"elem",elem:Gt,shift:lt}):De.push({type:"elem",elem:Ut,shift:lt})}Vt=Qr({positionType:"individualShift",children:De})}if(J.length===0)return Qe(["mord"],[Vt],t);var xe=Qr({positionType:"individualShift",children:J}),Ie=Qe(["tag"],[xe],t);return fu([Vt,Ie])},LFn={c:"center ",l:"left ",r:"right "},rl=function(r,t){for(var n=[],s=new rt("mtd",[],["mtr-glue"]),o=new rt("mtd",[],["mml-eqn-num"]),a=0;a0){var k=r.cols,w="",v=!1,b=0,x=k.length;k[0].type==="separator"&&(p+="top ",b=1),k[k.length-1].type==="separator"&&(p+="bottom ",x-=1);for(var y=b;y0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var $=1;$0&&m&&(v=1),n[k]={type:"align",align:w,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};el({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,r){var t=dx(r[0]),n=t?[r[0]]:br(r[0],"ordgroup").body,s=n.map(function(a){var i=fx(a),c=i.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new tt("Unknown column alignment: "+c,a)}),o={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return M_(e.parser,o,W6(e.envName))},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var r={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],t="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),t=s.fetch().text,!"lcr".includes(t))throw new tt("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),n.cols=[{type:"align",align:t}]}}var o=M_(e.parser,n,W6(e.envName)),a=Math.max(0,...o.body.map(i=>i.length));return o.cols=new Array(a).fill({type:"align",align:t}),r?{type:"leftright",mode:e.mode,body:[o],left:r[0],right:r[1],rightColor:void 0}:o},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var r={arraystretch:.5},t=M_(e.parser,r,"script");return t.colSeparationType="small",t},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["subarray"],props:{numArgs:1},handler(e,r){var t=dx(r[0]),n=t?[r[0]]:br(r[0],"ordgroup").body,s=n.map(function(i){var c=fx(i),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new tt("Unknown column alignment: "+u,i)});if(s.length>1)throw new tt("{subarray} can contain only one column");var o={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=M_(e.parser,o,"script");if(a.body.length>0&&a.body[0].length>1)throw new tt("{subarray} can contain only one column");return a},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var r={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=M_(e.parser,r,W6(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:kH,htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){DFn.has(e.envName)&&vx(e);var r={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:G6(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return M_(e.parser,r,"display")},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:kH,htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){vx(e);var r={autoTag:G6(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return M_(e.parser,r,"display")},htmlBuilder:tl,mathmlBuilder:rl});el({type:"array",names:["CD"],props:{numArgs:0},handler(e){return vx(e),jFn(e.parser)},htmlBuilder:tl,mathmlBuilder:rl});se("\\nonumber","\\gdef\\@eqnsw{0}");se("\\notag","\\nonumber");gt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,r){throw new tt(e.funcName+" valid only within array environment")}});var zR=xH;gt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];if(s.type!=="ordgroup")throw new tt("Invalid environment name",s);for(var o="",a=0;a{var t=e.font,n=r.withFont(t);return Yr(e.body,n)},SH=(e,r)=>{var t=e.font,n=r.withFont(t);return bn(e.body,n)},ER={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};gt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=Kb(r[0]),o=n;return o in ER&&(o=ER[o]),{type:"font",mode:t.mode,font:o.slice(1),body:s}},htmlBuilder:jH,mathmlBuilder:SH});gt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"mclass",mode:t.mode,mclass:hx(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:uu(n)}}});gt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,r)=>{var{parser:t,funcName:n,breakOnTokenText:s}=e,{mode:o}=t,a=t.parseExpression(!0,s);return{type:"font",mode:o,font:"math"+n.slice(1),body:{type:"ordgroup",mode:t.mode,body:a}}},htmlBuilder:jH,mathmlBuilder:SH});var IFn=(e,r)=>{var t=r.style,n=t.fracNum(),s=t.fracDen(),o;o=r.havingStyle(n);var a=Yr(e.numer,o,r);if(e.continued){var i=8.5/r.fontMetrics().ptPerEm,c=3.5/r.fontMetrics().ptPerEm;a.height=a.height0?k=3*p:k=7*p,w=r.fontMetrics().denom1):(_>0?(m=r.fontMetrics().num2,k=p):(m=r.fontMetrics().num3,k=3*p),w=r.fontMetrics().denom2);var v;if(d){var x=r.fontMetrics().axisHeight;m-a.depth-(x+.5*_){var t=new rt("mfrac",[bn(e.numer,r),bn(e.denom,r)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var n=Un(e.barSize,r);t.setAttribute("linethickness",ot(n))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var o=new rt("mo",[new Cs(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(t),e.rightDelim!=null){var a=new rt("mo",[new Cs(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return F6(s)}return t},CH=(e,r)=>{if(!r)return e;var t={type:"styling",mode:e.mode,style:r,body:[e]};return t};gt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0],o=r[1],a,i=null,c=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,i="(",c=")";break;case"\\\\bracefrac":a=!1,i="\\{",c="\\}";break;case"\\\\brackfrac":a=!1,i="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var u=n==="\\cfrac",d=null;return u||n.startsWith("\\d")?d="display":n.startsWith("\\t")&&(d="text"),CH({type:"genfrac",mode:t.mode,numer:s,denom:o,continued:u,hasBarLine:a,leftDelim:i,rightDelim:c,barSize:null},d)},htmlBuilder:IFn,mathmlBuilder:PFn});gt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:r,funcName:t,token:n}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:s,token:n}}});var NR=["display","text","script","scriptscript"],AR=function(r){var t=null;return r.length>0&&(t=r,t=t==="."?null:t),t};gt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,r){var{parser:t}=e,n=r[4],s=r[5],o=Kb(r[0]),a=o.type==="atom"&&o.family==="open"?AR(o.text):null,i=Kb(r[1]),c=i.type==="atom"&&i.family==="close"?AR(i.text):null,u=br(r[2],"size"),d,_=null;u.isBlank?d=!0:(_=u.value,d=_.number>0);var p=null,m=r[3];if(m.type==="ordgroup"){if(m.body.length>0){var k=br(m.body[0],"textord");p=NR[Number(k.text)]}}else m=br(m,"textord"),p=NR[Number(m.text)];return CH({type:"genfrac",mode:t.mode,numer:n,denom:s,continued:!1,hasBarLine:d,barSize:_,leftDelim:a,rightDelim:c},p)}});gt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,r){var{parser:t,funcName:n,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:br(r[0],"size").value,token:s}}});gt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0],o=br(r[1],"infix").size;if(!o)throw new Error("\\\\abovefrac expected size, but got "+String(o));var a=r[2],i=o.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:a,continued:!1,hasBarLine:i,barSize:o,leftDelim:null,rightDelim:null}}});var zH=(e,r)=>{var t=r.style,n,s;e.type==="supsub"?(n=e.sup?Yr(e.sup,r.havingStyle(t.sup()),r):Yr(e.sub,r.havingStyle(t.sub()),r),s=br(e.base,"horizBrace")):s=br(e,"horizBrace");var o=Yr(s.base,r.havingBaseStyle(ir.DISPLAY)),a=_x(s,r),i;if(s.isOver?i=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):i=Qr({positionType:"bottom",positionData:o.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:o}]}),n){var c=Qe(["minner",s.isOver?"mover":"munder"],[i],r);s.isOver?i=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:n}]}):i=Qr({positionType:"bottom",positionData:c.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Qe(["minner",s.isOver?"mover":"munder"],[i],r)},BFn=(e,r)=>{var t=ux(e.label);return new rt(e.isOver?"mover":"munder",[bn(e.base,r),t])};gt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,r){var{parser:t,funcName:n}=e;return{type:"horizBrace",mode:t.mode,label:n,isOver:n.includes("\\over"),base:r[0]}},htmlBuilder:zH,mathmlBuilder:BFn});gt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[1],s=br(r[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:Ss(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,r)=>{var t=Is(e.body,r,!1);return JBn(e.href,[],t,r)},mathmlBuilder:(e,r)=>{var t=C_(e.body,r);return t instanceof rt||(t=new rt("mrow",[t])),t.setAttribute("href",e.href),t}});gt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=br(r[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:n}))return t.formatUnsupportedCmd("\\url");for(var s=[],o=0;o{var{parser:t,funcName:n,token:s}=e,o=br(r[0],"raw").string,a=r[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i,c={};switch(n){case"\\htmlClass":c.class=o,i={command:"\\htmlClass",class:o};break;case"\\htmlId":c.id=o,i={command:"\\htmlId",id:o};break;case"\\htmlStyle":c.style=o,i={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var u=o.split(","),d=0;d{var t=Is(e.body,r,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var s=Qe(n,t,r);for(var o in e.attributes)o!=="class"&&e.attributes.hasOwnProperty(o)&&s.setAttribute(o,e.attributes[o]);return s},mathmlBuilder:(e,r)=>C_(e.body,r)});gt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:Ss(r[0]),mathml:Ss(r[1])}},htmlBuilder:(e,r)=>{var t=Is(e.html,r,!1);return fu(t)},mathmlBuilder:(e,r)=>C_(e.mathml,r)});var Ak=function(r){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(r))return{number:+r,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r);if(!t)throw new tt("Invalid size: '"+r+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!UF(n))throw new tt("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};gt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,r,t)=>{var{parser:n}=e,s={number:0,unit:"em"},o={number:.9,unit:"em"},a={number:0,unit:"em"},i="";if(t[0])for(var c=br(t[0],"raw").string,u=c.split(","),d=0;d{var t=Un(e.height,r),n=0;e.totalheight.number>0&&(n=Un(e.totalheight,r)-t);var s=0;e.width.number>0&&(s=Un(e.width,r));var o={height:ot(t+n)};s>0&&(o.width=ot(s)),n>0&&(o.verticalAlign=ot(-n));var a=new FBn(e.src,e.alt,o);return a.height=t,a.depth=n,a},mathmlBuilder:(e,r)=>{var t=new rt("mglyph",[]);t.setAttribute("alt",e.alt);var n=Un(e.height,r),s=0;if(e.totalheight.number>0&&(s=Un(e.totalheight,r)-n,t.setAttribute("valign",ot(-s))),t.setAttribute("height",ot(n+s)),e.width.number>0){var o=Un(e.width,r);t.setAttribute("width",ot(o))}return t.setAttribute("src",e.src),t}});gt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e,s=br(r[0],"size");if(t.settings.strict){var o=n[1]==="m",a=s.value.unit==="mu";o?(a||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+s.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):a&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:s.value}},htmlBuilder(e,r){return XF(e.dimension,r)},mathmlBuilder(e,r){var t=Un(e.dimension,r);return new rH(t)}});gt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"lap",mode:t.mode,alignment:n.slice(5),body:s}},htmlBuilder:(e,r)=>{var t;e.alignment==="clap"?(t=Qe([],[Yr(e.body,r)]),t=Qe(["inner"],[t],r)):t=Qe(["inner"],[Yr(e.body,r)]);var n=Qe(["fix"],[]),s=Qe([e.alignment],[t,n],r),o=Qe(["strut"]);return o.style.height=ot(s.height+s.depth),s.depth&&(o.style.verticalAlign=ot(-s.depth)),s.children.unshift(o),s=Qe(["thinbox"],[s],r),Qe(["mord","vbox"],[s],r)},mathmlBuilder:(e,r)=>{var t=new rt("mpadded",[bn(e.body,r)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",n+"width")}return t.setAttribute("width","0px"),t}});gt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,r){var{funcName:t,parser:n}=e,s=n.mode;n.switchMode("math");var o=t==="\\("?"\\)":"$",a=n.parseExpression(!1,o);return n.expect(o),n.switchMode(s),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:a}}});gt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,r){throw new tt("Mismatched "+e.funcName)}});var TR=(e,r)=>{switch(r.style.size){case ir.DISPLAY.size:return e.display;case ir.TEXT.size:return e.text;case ir.SCRIPT.size:return e.script;case ir.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};gt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,r)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:Ss(r[0]),text:Ss(r[1]),script:Ss(r[2]),scriptscript:Ss(r[3])}},htmlBuilder:(e,r)=>{var t=TR(e,r),n=Is(t,r,!1);return fu(n)},mathmlBuilder:(e,r)=>{var t=TR(e,r);return C_(t,r)}});var EH=(e,r,t,n,s,o,a)=>{e=Qe([],[e]);var i=t&&uu(t),c,u;if(r){var d=Yr(r,n.havingStyle(s.sup()),n);u={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var _=Yr(t,n.havingStyle(s.sub()),n);c={elem:_,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-_.height)}}var p;if(u&&c){var m=n.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+a;p=Qr({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:ot(-o)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ot(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(c){var k=e.height-a;p=Qr({positionType:"top",positionData:k,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:ot(-o)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var w=e.depth+a;p=Qr({positionType:"bottom",positionData:w,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ot(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&o!==0&&!i){var b=Qe(["mspace"],[],n);b.style.marginRight=ot(o),v.unshift(b)}return Qe(["mop","op-limits"],v,n)},NH=new Set(["\\smallint"]),Tp=(e,r)=>{var t,n,s=!1,o;e.type==="supsub"?(t=e.sup,n=e.sub,o=br(e.base,"op"),s=!0):o=br(e,"op");var a=r.style,i=!1;a.size===ir.DISPLAY.size&&o.symbol&&!NH.has(o.name)&&(i=!0);var c,u;if(o.symbol){var d=i?"Size2-Regular":"Size1-Regular",_="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(_=o.name.slice(1),o.name=_==="oiint"?"\\iint":"\\iiint"),c=Go(o.name,d,"math",r,["mop","op-symbol",i?"large-op":"small-op"]),u=c.italic,_.length>0){var p=ZF(_+"Size"+(i?"2":"1"),r);c=Qr({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:p,shift:i?.08:0}]}),o.name="\\"+_,c.classes.unshift("mop"),c.italic=u}}else if(o.body){var m=Is(o.body,r,!0);m.length===1&&m[0]instanceof Ka?(c=m[0],c.classes[0]="mop"):c=Qe(["mop"],m,r)}else{for(var k=[],w=1;w{var t;if(e.symbol)t=new rt("mo",[zi(e.name,e.mode)]),NH.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new rt("mo",Za(e.body,r));else{t=new rt("mi",[new Cs(e.name.slice(1))]);var n=new rt("mo",[zi("⁡","text")]);e.parentIsSupSub?t=new rt("mrow",[t,n]):t=tH([t,n])}return t},FFn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};gt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=n;return s.length===1&&(s=FFn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ss(n)}},htmlBuilder:Tp,mathmlBuilder:z0});var HFn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};gt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:r,funcName:t}=e;return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:r,funcName:t}=e;return{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Tp,mathmlBuilder:z0});gt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:r,funcName:t}=e,n=t;return n.length===1&&(n=HFn[n]),{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Tp,mathmlBuilder:z0});var AH=(e,r)=>{var t,n,s=!1,o;e.type==="supsub"?(t=e.sup,n=e.sub,o=br(e.base,"operatorname"),s=!0):o=br(e,"operatorname");var a;if(o.body.length>0){for(var i=o.body.map(_=>{var p="text"in _?_.text:void 0;return typeof p=="string"?{type:"textord",mode:_.mode,text:p}:_}),c=Is(i,r.withFont("mathrm"),!0),u=0;u{for(var t=Za(e.body,r.withFont("mathrm")),n=!0,s=0;sd.toText()).join("");t=[new Cs(i)]}var c=new rt("mi",t);c.setAttribute("mathvariant","normal");var u=new rt("mo",[zi("⁡","text")]);return e.parentIsSupSub?new rt("mrow",[c,u]):tH([c,u])};gt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,r)=>{var{parser:t,funcName:n}=e,s=r[0];return{type:"operatorname",mode:t.mode,body:Ss(s),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:AH,mathmlBuilder:qFn});se("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");kd({type:"ordgroup",htmlBuilder(e,r){return e.semisimple?fu(Is(e.body,r,!1)):Qe(["mord"],Is(e.body,r,!0),r)},mathmlBuilder(e,r){return C_(e.body,r,!0)}});gt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,r){var{parser:t}=e,n=r[0];return{type:"overline",mode:t.mode,body:n}},htmlBuilder(e,r){var t=Yr(e.body,r.havingCrampedStyle()),n=lp("overline-line",r),s=r.fontMetrics().defaultRuleThickness,o=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:n},{type:"kern",size:s}]});return Qe(["mord","overline"],[o],r)},mathmlBuilder(e,r){var t=new rt("mo",[new Cs("‾")]);t.setAttribute("stretchy","true");var n=new rt("mover",[bn(e.body,r),t]);return n.setAttribute("accent","true"),n}});gt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"phantom",mode:t.mode,body:Ss(n)}},htmlBuilder:(e,r)=>{var t=Is(e.body,r.withPhantom(),!1);return fu(t)},mathmlBuilder:(e,r)=>{var t=Za(e.body,r);return new rt("mphantom",t)}});se("\\hphantom","\\smash{\\phantom{#1}}");gt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,r)=>{var{parser:t}=e,n=r[0];return{type:"vphantom",mode:t.mode,body:n}},htmlBuilder:(e,r)=>{var t=Qe(["inner"],[Yr(e.body,r.withPhantom())]),n=Qe(["fix"],[]);return Qe(["mord","rlap"],[t,n],r)},mathmlBuilder:(e,r)=>{var t=Za(Ss(e.body),r),n=new rt("mphantom",t),s=new rt("mpadded",[n]);return s.setAttribute("width","0px"),s}});gt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,r){var{parser:t}=e,n=br(r[0],"size").value,s=r[1];return{type:"raisebox",mode:t.mode,dy:n,body:s}},htmlBuilder(e,r){var t=Yr(e.body,r),n=Un(e.dy,r);return Qr({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,r){var t=new rt("mpadded",[bn(e.body,r)]),n=e.dy.number+e.dy.unit;return t.setAttribute("voffset",n),t}});gt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:r}=e;return{type:"internal",mode:r.mode}}});gt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,r,t){var{parser:n}=e,s=t[0],o=br(r[0],"size"),a=br(r[1],"size");return{type:"rule",mode:n.mode,shift:s&&br(s,"size").value,width:o.value,height:a.value}},htmlBuilder(e,r){var t=Qe(["mord","rule"],[],r),n=Un(e.width,r),s=Un(e.height,r),o=e.shift?Un(e.shift,r):0;return t.style.borderRightWidth=ot(n),t.style.borderTopWidth=ot(s),t.style.bottom=ot(o),t.width=n,t.height=s+o,t.depth=-o,t.maxFontSize=s*1.125*r.sizeMultiplier,t},mathmlBuilder(e,r){var t=Un(e.width,r),n=Un(e.height,r),s=e.shift?Un(e.shift,r):0,o=r.color&&r.getColor()||"black",a=new rt("mspace");a.setAttribute("mathbackground",o),a.setAttribute("width",ot(t)),a.setAttribute("height",ot(n));var i=new rt("mpadded",[a]);return s>=0?i.setAttribute("height",ot(s)):(i.setAttribute("height",ot(s)),i.setAttribute("depth",ot(-s))),i.setAttribute("voffset",ot(s)),i}});function TH(e,r,t){for(var n=Is(e,r,!1),s=r.sizeMultiplier/t.sizeMultiplier,o=0;o{var t=r.havingSize(e.size);return TH(e.body,t,r)};gt({type:"sizing",names:RR,props:{numArgs:0,allowedInText:!0},handler:(e,r)=>{var{breakOnTokenText:t,funcName:n,parser:s}=e,o=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:RR.indexOf(n)+1,body:o}},htmlBuilder:UFn,mathmlBuilder:(e,r)=>{var t=r.havingSize(e.size),n=Za(e.body,t),s=new rt("mstyle",n);return s.setAttribute("mathsize",ot(t.sizeMultiplier)),s}});gt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,r,t)=>{var{parser:n}=e,s=!1,o=!1,a=t[0]&&br(t[0],"ordgroup");if(a)for(var i,c=0;c{var t=Qe([],[Yr(e.body,r)]);if(!e.smashHeight&&!e.smashDepth)return t;if(e.smashHeight&&(t.height=0),e.smashDepth&&(t.depth=0),e.smashHeight&&e.smashDepth)return Qe(["mord","smash"],[t],r);if(t.children)for(var n=0;n{var t=new rt("mpadded",[bn(e.body,r)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});gt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,r,t){var{parser:n}=e,s=t[0],o=r[0];return{type:"sqrt",mode:n.mode,body:o,index:s}},htmlBuilder(e,r){var t=Yr(e.body,r.havingCrampedStyle());t.height===0&&(t.height=r.fontMetrics().xHeight),t=up(t,r);var n=r.fontMetrics(),s=n.defaultRuleThickness,o=s;r.style.idt.height+t.depth+a&&(a=(a+_-t.height-t.depth)/2);var p=c.height-t.height-a-u;t.style.paddingLeft=ot(d);var m=Qr({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:c},{type:"kern",size:u}]});if(e.index){var k=r.havingStyle(ir.SCRIPTSCRIPT),w=Yr(e.index,k,r),v=.6*(m.height-m.depth),b=Qr({positionType:"shift",positionData:-v,children:[{type:"elem",elem:w}]}),x=Qe(["root"],[b]);return Qe(["mord","sqrt"],[x,m],r)}else return Qe(["mord","sqrt"],[m],r)},mathmlBuilder(e,r){var{body:t,index:n}=e;return n?new rt("mroot",[bn(t,r),bn(n,r)]):new rt("msqrt",[bn(t,r)])}});var T5={display:ir.DISPLAY,text:ir.TEXT,script:ir.SCRIPT,scriptscript:ir.SCRIPTSCRIPT};function GFn(e){return e in T5}gt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,r){var{breakOnTokenText:t,funcName:n,parser:s}=e,o=s.parseExpression(!0,t),a=n.slice(1,n.length-5);if(!GFn(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:o}},htmlBuilder(e,r){var t=T5[e.style],n=r.havingStyle(t);return e.resetFont&&(n=n.withFont("")),TH(e.body,n,r)},mathmlBuilder(e,r){var t=T5[e.style],n=r.havingStyle(t);e.resetFont&&(n=n.withFont(""));var s=Za(e.body,n),o=new rt("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},i=a[e.style];return o.setAttribute("scriptlevel",i[0]),o.setAttribute("displaystyle",i[1]),o}});var WFn=function(r,t){var n=r.base;if(n)if(n.type==="op"){var s=n.limits&&(t.style.size===ir.DISPLAY.size||n.alwaysHandleSupSub);return s?Tp:null}else if(n.type==="operatorname"){var o=n.alwaysHandleSupSub&&(t.style.size===ir.DISPLAY.size||n.limits);return o?AH:null}else{if(n.type==="accent")return uu(n.base)?q6:null;if(n.type==="horizBrace"){var a=!r.sub;return a===n.isOver?zH:null}else return null}else return null};kd({type:"supsub",htmlBuilder(e,r){var t=WFn(e,r);if(t)return t(e,r);var{base:n,sup:s,sub:o}=e,a=Yr(n,r),i,c,u=r.fontMetrics(),d=0,_=0,p=n&&uu(n);if(s){var m=r.havingStyle(r.style.sup());i=Yr(s,m,r),p||(d=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/r.sizeMultiplier)}if(o){var k=r.havingStyle(r.style.sub());c=Yr(o,k,r),p||(_=a.depth+k.fontMetrics().subDrop*k.sizeMultiplier/r.sizeMultiplier)}var w;r.style===ir.DISPLAY?w=u.sup1:r.style.cramped?w=u.sup3:w=u.sup2;var v=r.sizeMultiplier,b=ot(.5/u.ptPerEm/v),x=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof Ka||y){var S;x=ot(-((S=a.italic)!=null?S:0))}}var E;if(i&&c){d=Math.max(d,w,i.depth+.25*u.xHeight),_=Math.max(_,u.sub2);var N=u.defaultRuleThickness,A=4*N;if(d-i.depth-(c.height-_)0&&(d+=z,_-=z)}var M=[{type:"elem",elem:c,shift:_,marginRight:b,marginLeft:x},{type:"elem",elem:i,shift:-d,marginRight:b}];E=Qr({positionType:"individualShift",children:M})}else if(c){_=Math.max(_,u.sub1,c.height-.8*u.xHeight);var $=[{type:"elem",elem:c,marginLeft:x,marginRight:b}];E=Qr({positionType:"shift",positionData:_,children:$})}else if(i)d=Math.max(d,w,i.depth+.25*u.xHeight),E=Qr({positionType:"shift",positionData:-d,children:[{type:"elem",elem:i,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var D=C5(a,"right")||"mord";return Qe([D],[a,Qe(["msupsub"],[E])],r)},mathmlBuilder(e,r){var t=!1,n,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(t=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var o=[bn(e.base,r)];e.sub&&o.push(bn(e.sub,r)),e.sup&&o.push(bn(e.sup,r));var a;if(t)a=n?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&r.style===ir.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(r.style===ir.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(r.style===ir.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||r.style===ir.DISPLAY)?a="munder":a="msub"}else{var i=e.base;i&&i.type==="op"&&i.limits&&(r.style===ir.DISPLAY||i.alwaysHandleSupSub)||i&&i.type==="operatorname"&&i.alwaysHandleSupSub&&(i.limits||r.style===ir.DISPLAY)?a="mover":a="msup"}return new rt(a,o)}});kd({type:"atom",htmlBuilder(e,r){return P6(e.text,e.mode,r,["m"+e.family])},mathmlBuilder(e,r){var t=new rt("mo",[zi(e.text,e.mode)]);if(e.family==="bin"){var n=H6(e,r);n==="bold-italic"&&t.setAttribute("mathvariant",n)}else e.family==="punct"?t.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&t.setAttribute("stretchy","false");return t}});var RH={mi:"italic",mn:"normal",mtext:"normal"};kd({type:"mathord",htmlBuilder(e,r){return lx(e,r,"mathord")},mathmlBuilder(e,r){var t=new rt("mi",[zi(e.text,e.mode,r)]),n=H6(e,r)||"italic";return n!==RH[t.type]&&t.setAttribute("mathvariant",n),t}});kd({type:"textord",htmlBuilder(e,r){return lx(e,r,"textord")},mathmlBuilder(e,r){var t=zi(e.text,e.mode,r),n=H6(e,r)||"normal",s;return e.mode==="text"?s=new rt("mtext",[t]):/[0-9]/.test(e.text)?s=new rt("mn",[t]):e.text==="\\prime"?s=new rt("mo",[t]):s=new rt("mi",[t]),n!==RH[s.type]&&s.setAttribute("mathvariant",n),s}});var Tk={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Rk={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};kd({type:"spacing",htmlBuilder(e,r){if(Rk.hasOwnProperty(e.text)){var t=Rk[e.text].className||"";if(e.mode==="text"){var n=lx(e,r,"textord");return n.classes.push(t),n}else return Qe(["mspace",t],[P6(e.text,e.mode,r)],r)}else{if(Tk.hasOwnProperty(e.text))return Qe(["mspace",Tk[e.text]],[],r);throw new tt('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,r){var t;if(Rk.hasOwnProperty(e.text))t=new rt("mtext",[new Cs(" ")]);else{if(Tk.hasOwnProperty(e.text))return new rt("mspace");throw new tt('Unknown type of space "'+e.text+'"')}return t}});var MR=()=>{var e=new rt("mtd",[]);return e.setAttribute("width","50%"),e};kd({type:"tag",mathmlBuilder(e,r){var t=new rt("mtable",[new rt("mtr",[MR(),new rt("mtd",[C_(e.body,r)]),MR(),new rt("mtd",[C_(e.tag,r)])])]);return t.setAttribute("width","100%"),t}});var OR={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},$R={"\\textbf":"textbf","\\textmd":"textmd"},KFn={"\\textit":"textit","\\textup":"textup"},DR=(e,r)=>{var t=e.font;if(t){if(OR[t])return r.withTextFontFamily(OR[t]);if($R[t])return r.withTextFontWeight($R[t]);if(t==="\\emph")return r.fontShape==="textit"?r.withTextFontShape("textup"):r.withTextFontShape("textit")}else return r;return r.withTextFontShape(KFn[t])};gt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,r){var{parser:t,funcName:n}=e,s=r[0];return{type:"text",mode:t.mode,body:Ss(s),font:n}},htmlBuilder(e,r){var t=DR(e,r),n=Is(e.body,t,!0);return Qe(["mord","text"],n,t)},mathmlBuilder(e,r){var t=DR(e,r);return C_(e.body,t)}});gt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,r){var{parser:t}=e;return{type:"underline",mode:t.mode,body:r[0]}},htmlBuilder(e,r){var t=Yr(e.body,r),n=lp("underline-line",r),s=r.fontMetrics().defaultRuleThickness,o=Qr({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Qe(["mord","underline"],[o],r)},mathmlBuilder(e,r){var t=new rt("mo",[new Cs("‾")]);t.setAttribute("stretchy","true");var n=new rt("munder",[bn(e.body,r),t]);return n.setAttribute("accentunder","true"),n}});gt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,r){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:r[0]}},htmlBuilder(e,r){var t=Yr(e.body,r),n=r.fontMetrics().axisHeight,s=.5*(t.height-n-(t.depth+n));return Qr({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,r){var t=new rt("mpadded",[bn(e.body,r)],["vcenter"]);return new rt("mrow",[t])}});gt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,r,t){throw new tt("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,r){for(var t=LR(e),n=[],s=r.havingStyle(r.style.text()),o=0;oe.body.replace(/ /g,e.star?"␣":" "),p_=JF,MH=`[ \r ]`,VFn="\\\\[a-zA-Z@]+",QFn="\\\\[^\uD800-\uDFFF]",XFn="("+VFn+")"+MH+"*",YFn=`\\\\( |[ \r ]+ ?)[ \r ]*`,R5="[̀-ͯ]",ZFn=new RegExp(R5+"+$"),JFn="("+MH+"+)|"+(YFn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(R5+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(R5+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+XFn)+("|"+QFn+")");class IR{constructor(r,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=r,this.settings=t,this.tokenRegex=new RegExp(JFn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(r,t){this.catcodes[r]=t}lex(){var r=this.input,t=this.tokenRegex.lastIndex;if(t===r.length)return new Ua("EOF",new pa(this,t,t));var n=this.tokenRegex.exec(r);if(n===null||n.index!==t)throw new tt("Unexpected character: '"+r[t]+"'",new Ua(r[t],new pa(this,t,t+1)));var s=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[s]===14){var o=r.indexOf(` `,this.tokenRegex.lastIndex);return o===-1?(this.tokenRegex.lastIndex=r.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new Ua(s,new pa(this,t,this.tokenRegex.lastIndex))}}class eHn{constructor(r,t){r===void 0&&(r={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=r,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new tt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var r=this.undefStack.pop();for(var t in r)r.hasOwnProperty(t)&&(r[t]==null?delete this.current[t]:this.current[t]=r[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(r){return this.current.hasOwnProperty(r)||this.builtins.hasOwnProperty(r)}get(r){return this.current.hasOwnProperty(r)?this.current[r]:this.builtins[r]}set(r,t,n){if(n===void 0&&(n=!1),n){for(var s=0;s0&&(this.undefStack[this.undefStack.length-1][r]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(r)&&(o[r]=this.current[r])}t==null?delete this.current[r]:this.current[r]=t}}var tHn=wH;se("\\noexpand",function(e){var r=e.popToken();return e.isExpandable(r.text)&&(r.noexpand=!0,r.treatAsRelax=!0),{tokens:[r],numArgs:0}});se("\\expandafter",function(e){var r=e.popToken();return e.expandOnce(!0),{tokens:[r],numArgs:0}});se("\\@firstoftwo",function(e){var r=e.consumeArgs(2);return{tokens:r[0],numArgs:0}});se("\\@secondoftwo",function(e){var r=e.consumeArgs(2);return{tokens:r[1],numArgs:0}});se("\\@ifnextchar",function(e){var r=e.consumeArgs(3);e.consumeSpaces();var t=e.future();return r[0].length===1&&r[0][0].text===t.text?{tokens:r[1],numArgs:0}:{tokens:r[2],numArgs:0}});se("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");se("\\TextOrMath",function(e){var r=e.consumeArgs(2);return e.mode==="text"?{tokens:r[0],numArgs:0}:{tokens:r[1],numArgs:0}});var PR={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};se("\\char",function(e){var r=e.popToken(),t,n=0;if(r.text==="'")t=8,r=e.popToken();else if(r.text==='"')t=16,r=e.popToken();else if(r.text==="`")if(r=e.popToken(),r.text[0]==="\\")n=r.text.charCodeAt(1);else{if(r.text==="EOF")throw new tt("\\char` missing argument");n=r.text.charCodeAt(0)}else t=10;if(t){if(n=PR[r.text],n==null||n>=t)throw new tt("Invalid base-"+t+" digit "+r.text);for(var s;(s=PR[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new tt("\\newcommand's first argument must be a macro name");var o=s[0].text,a=e.isDefined(o);if(a&&!r)throw new tt("\\newcommand{"+o+"} attempting to redefine "+(o+"; use \\renewcommand"));if(!a&&!t)throw new tt("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var i=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var c="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)c+=u.text,u=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new tt("Invalid number of arguments: "+c);i=parseInt(c),s=e.consumeArg().tokens}return a&&n||e.macros.set(o,{tokens:s,numArgs:i}),""};se("\\newcommand",e=>K6(e,!1,!0,!1));se("\\renewcommand",e=>K6(e,!0,!1,!1));se("\\providecommand",e=>K6(e,!0,!0,!0));se("\\message",e=>{var r=e.consumeArgs(1)[0];return console.log(r.reverse().map(t=>t.text).join("")),""});se("\\errmessage",e=>{var r=e.consumeArgs(1)[0];return console.error(r.reverse().map(t=>t.text).join("")),""});se("\\show",e=>{var r=e.popToken(),t=r.text;return console.log(r,e.macros.get(t),p_[t],$n.math[t],$n.text[t]),""});se("\\bgroup","{");se("\\egroup","}");se("~","\\nobreakspace");se("\\lq","`");se("\\rq","'");se("\\aa","\\r a");se("\\AA","\\r A");se("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");se("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");se("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");se("ℬ","\\mathscr{B}");se("ℰ","\\mathscr{E}");se("ℱ","\\mathscr{F}");se("ℋ","\\mathscr{H}");se("ℐ","\\mathscr{I}");se("ℒ","\\mathscr{L}");se("ℳ","\\mathscr{M}");se("ℛ","\\mathscr{R}");se("ℭ","\\mathfrak{C}");se("ℌ","\\mathfrak{H}");se("ℨ","\\mathfrak{Z}");se("\\Bbbk","\\Bbb{k}");se("\\llap","\\mathllap{\\textrm{#1}}");se("\\rlap","\\mathrlap{\\textrm{#1}}");se("\\clap","\\mathclap{\\textrm{#1}}");se("\\mathstrut","\\vphantom{(}");se("\\underbar","\\underline{\\text{#1}}");se("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');se("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");se("\\ne","\\neq");se("≠","\\neq");se("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");se("∉","\\notin");se("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");se("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");se("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");se("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");se("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");se("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");se("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");se("⟂","\\perp");se("‼","\\mathclose{!\\mkern-0.8mu!}");se("∌","\\notni");se("⌜","\\ulcorner");se("⌝","\\urcorner");se("⌞","\\llcorner");se("⌟","\\lrcorner");se("©","\\copyright");se("®","\\textregistered");se("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');se("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');se("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');se("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');se("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");se("⋮","\\vdots");se("\\varGamma","\\mathit{\\Gamma}");se("\\varDelta","\\mathit{\\Delta}");se("\\varTheta","\\mathit{\\Theta}");se("\\varLambda","\\mathit{\\Lambda}");se("\\varXi","\\mathit{\\Xi}");se("\\varPi","\\mathit{\\Pi}");se("\\varSigma","\\mathit{\\Sigma}");se("\\varUpsilon","\\mathit{\\Upsilon}");se("\\varPhi","\\mathit{\\Phi}");se("\\varPsi","\\mathit{\\Psi}");se("\\varOmega","\\mathit{\\Omega}");se("\\substack","\\begin{subarray}{c}#1\\end{subarray}");se("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");se("\\boxed","\\fbox{$\\displaystyle{#1}$}");se("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");se("\\implies","\\DOTSB\\;\\Longrightarrow\\;");se("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");se("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");se("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var BR={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},rHn=new Set(["bin","rel"]);se("\\dots",function(e){var r="\\dotso",t=e.expandAfterFuture().text;return t in BR?r=BR[t]:(t.slice(0,4)==="\\not"||t in $n.math&&rHn.has($n.math[t].group))&&(r="\\dotsb"),r});var V6={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};se("\\dotso",function(e){var r=e.future().text;return r in V6?"\\ldots\\,":"\\ldots"});se("\\dotsc",function(e){var r=e.future().text;return r in V6&&r!==","?"\\ldots\\,":"\\ldots"});se("\\cdots",function(e){var r=e.future().text;return r in V6?"\\@cdots\\,":"\\@cdots"});se("\\dotsb","\\cdots");se("\\dotsm","\\cdots");se("\\dotsi","\\!\\cdots");se("\\dotsx","\\ldots\\,");se("\\DOTSI","\\relax");se("\\DOTSB","\\relax");se("\\DOTSX","\\relax");se("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");se("\\,","\\tmspace+{3mu}{.1667em}");se("\\thinspace","\\,");se("\\>","\\mskip{4mu}");se("\\:","\\tmspace+{4mu}{.2222em}");se("\\medspace","\\:");se("\\;","\\tmspace+{5mu}{.2777em}");se("\\thickspace","\\;");se("\\!","\\tmspace-{3mu}{.1667em}");se("\\negthinspace","\\!");se("\\negmedspace","\\tmspace-{4mu}{.2222em}");se("\\negthickspace","\\tmspace-{5mu}{.277em}");se("\\enspace","\\kern.5em ");se("\\enskip","\\hskip.5em\\relax");se("\\quad","\\hskip1em\\relax");se("\\qquad","\\hskip2em\\relax");se("\\tag","\\@ifstar\\tag@literal\\tag@paren");se("\\tag@paren","\\tag@literal{({#1})}");se("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new tt("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});se("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");se("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");se("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");se("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");se("\\newline","\\\\\\relax");se("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var OH=ot(Dc["Main-Regular"][84][1]-.7*Dc["Main-Regular"][65][1]);se("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+OH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");se("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+OH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");se("\\hspace","\\@ifstar\\@hspacer\\@hspace");se("\\@hspace","\\hskip #1\\relax");se("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");se("\\ordinarycolon",":");se("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");se("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');se("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');se("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');se("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');se("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');se("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');se("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');se("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');se("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');se("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');se("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');se("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');se("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');se("∷","\\dblcolon");se("∹","\\eqcolon");se("≔","\\coloneqq");se("≕","\\eqqcolon");se("⩴","\\Coloneqq");se("\\ratio","\\vcentcolon");se("\\coloncolon","\\dblcolon");se("\\colonequals","\\coloneqq");se("\\coloncolonequals","\\Coloneqq");se("\\equalscolon","\\eqqcolon");se("\\equalscoloncolon","\\Eqqcolon");se("\\colonminus","\\coloneq");se("\\coloncolonminus","\\Coloneq");se("\\minuscolon","\\eqcolon");se("\\minuscoloncolon","\\Eqcolon");se("\\coloncolonapprox","\\Colonapprox");se("\\coloncolonsim","\\Colonsim");se("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");se("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");se("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");se("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");se("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");se("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");se("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");se("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");se("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");se("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");se("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");se("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");se("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");se("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");se("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");se("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");se("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");se("\\nleqq","\\html@mathml{\\@nleqq}{≰}");se("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");se("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");se("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");se("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");se("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");se("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");se("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");se("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");se("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");se("\\imath","\\html@mathml{\\@imath}{ı}");se("\\jmath","\\html@mathml{\\@jmath}{ȷ}");se("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");se("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");se("⟦","\\llbracket");se("⟧","\\rrbracket");se("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");se("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");se("⦃","\\lBrace");se("⦄","\\rBrace");se("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");se("⦵","\\minuso");se("\\darr","\\downarrow");se("\\dArr","\\Downarrow");se("\\Darr","\\Downarrow");se("\\lang","\\langle");se("\\rang","\\rangle");se("\\uarr","\\uparrow");se("\\uArr","\\Uparrow");se("\\Uarr","\\Uparrow");se("\\N","\\mathbb{N}");se("\\R","\\mathbb{R}");se("\\Z","\\mathbb{Z}");se("\\alef","\\aleph");se("\\alefsym","\\aleph");se("\\Alpha","\\mathrm{A}");se("\\Beta","\\mathrm{B}");se("\\bull","\\bullet");se("\\Chi","\\mathrm{X}");se("\\clubs","\\clubsuit");se("\\cnums","\\mathbb{C}");se("\\Complex","\\mathbb{C}");se("\\Dagger","\\ddagger");se("\\diamonds","\\diamondsuit");se("\\empty","\\emptyset");se("\\Epsilon","\\mathrm{E}");se("\\Eta","\\mathrm{H}");se("\\exist","\\exists");se("\\harr","\\leftrightarrow");se("\\hArr","\\Leftrightarrow");se("\\Harr","\\Leftrightarrow");se("\\hearts","\\heartsuit");se("\\image","\\Im");se("\\infin","\\infty");se("\\Iota","\\mathrm{I}");se("\\isin","\\in");se("\\Kappa","\\mathrm{K}");se("\\larr","\\leftarrow");se("\\lArr","\\Leftarrow");se("\\Larr","\\Leftarrow");se("\\lrarr","\\leftrightarrow");se("\\lrArr","\\Leftrightarrow");se("\\Lrarr","\\Leftrightarrow");se("\\Mu","\\mathrm{M}");se("\\natnums","\\mathbb{N}");se("\\Nu","\\mathrm{N}");se("\\Omicron","\\mathrm{O}");se("\\plusmn","\\pm");se("\\rarr","\\rightarrow");se("\\rArr","\\Rightarrow");se("\\Rarr","\\Rightarrow");se("\\real","\\Re");se("\\reals","\\mathbb{R}");se("\\Reals","\\mathbb{R}");se("\\Rho","\\mathrm{P}");se("\\sdot","\\cdot");se("\\sect","\\S");se("\\spades","\\spadesuit");se("\\sub","\\subset");se("\\sube","\\subseteq");se("\\supe","\\supseteq");se("\\Tau","\\mathrm{T}");se("\\thetasym","\\vartheta");se("\\weierp","\\wp");se("\\Zeta","\\mathrm{Z}");se("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");se("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");se("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");se("\\bra","\\mathinner{\\langle{#1}|}");se("\\ket","\\mathinner{|{#1}\\rangle}");se("\\braket","\\mathinner{\\langle{#1}\\rangle}");se("\\Bra","\\left\\langle#1\\right|");se("\\Ket","\\left|#1\\right\\rangle");var $H=e=>r=>{var t=r.consumeArg().tokens,n=r.consumeArg().tokens,s=r.consumeArg().tokens,o=r.consumeArg().tokens,a=r.macros.get("|"),i=r.macros.get("\\|");r.macros.beginGroup();var c=_=>p=>{e&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",i));var m=_;if(!_&&s.length){var k=p.future();k.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?s:n,numArgs:0}};r.macros.set("|",c(!1)),s.length&&r.macros.set("\\|",c(!0));var u=r.consumeArg().tokens,d=r.expandTokens([...o,...u,...t]);return r.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};se("\\bra@ket",$H(!1));se("\\bra@set",$H(!0));se("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");se("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");se("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");se("\\angln","{\\angl n}");se("\\blue","\\textcolor{##6495ed}{#1}");se("\\orange","\\textcolor{##ffa500}{#1}");se("\\pink","\\textcolor{##ff00af}{#1}");se("\\red","\\textcolor{##df0030}{#1}");se("\\green","\\textcolor{##28ae7b}{#1}");se("\\gray","\\textcolor{gray}{#1}");se("\\purple","\\textcolor{##9d38bd}{#1}");se("\\blueA","\\textcolor{##ccfaff}{#1}");se("\\blueB","\\textcolor{##80f6ff}{#1}");se("\\blueC","\\textcolor{##63d9ea}{#1}");se("\\blueD","\\textcolor{##11accd}{#1}");se("\\blueE","\\textcolor{##0c7f99}{#1}");se("\\tealA","\\textcolor{##94fff5}{#1}");se("\\tealB","\\textcolor{##26edd5}{#1}");se("\\tealC","\\textcolor{##01d1c1}{#1}");se("\\tealD","\\textcolor{##01a995}{#1}");se("\\tealE","\\textcolor{##208170}{#1}");se("\\greenA","\\textcolor{##b6ffb0}{#1}");se("\\greenB","\\textcolor{##8af281}{#1}");se("\\greenC","\\textcolor{##74cf70}{#1}");se("\\greenD","\\textcolor{##1fab54}{#1}");se("\\greenE","\\textcolor{##0d923f}{#1}");se("\\goldA","\\textcolor{##ffd0a9}{#1}");se("\\goldB","\\textcolor{##ffbb71}{#1}");se("\\goldC","\\textcolor{##ff9c39}{#1}");se("\\goldD","\\textcolor{##e07d10}{#1}");se("\\goldE","\\textcolor{##a75a05}{#1}");se("\\redA","\\textcolor{##fca9a9}{#1}");se("\\redB","\\textcolor{##ff8482}{#1}");se("\\redC","\\textcolor{##f9685d}{#1}");se("\\redD","\\textcolor{##e84d39}{#1}");se("\\redE","\\textcolor{##bc2612}{#1}");se("\\maroonA","\\textcolor{##ffbde0}{#1}");se("\\maroonB","\\textcolor{##ff92c6}{#1}");se("\\maroonC","\\textcolor{##ed5fa6}{#1}");se("\\maroonD","\\textcolor{##ca337c}{#1}");se("\\maroonE","\\textcolor{##9e034e}{#1}");se("\\purpleA","\\textcolor{##ddd7ff}{#1}");se("\\purpleB","\\textcolor{##c6b9fc}{#1}");se("\\purpleC","\\textcolor{##aa87ff}{#1}");se("\\purpleD","\\textcolor{##7854ab}{#1}");se("\\purpleE","\\textcolor{##543b78}{#1}");se("\\mintA","\\textcolor{##f5f9e8}{#1}");se("\\mintB","\\textcolor{##edf2df}{#1}");se("\\mintC","\\textcolor{##e0e5cc}{#1}");se("\\grayA","\\textcolor{##f6f7f7}{#1}");se("\\grayB","\\textcolor{##f0f1f2}{#1}");se("\\grayC","\\textcolor{##e3e5e6}{#1}");se("\\grayD","\\textcolor{##d6d8da}{#1}");se("\\grayE","\\textcolor{##babec2}{#1}");se("\\grayF","\\textcolor{##888d93}{#1}");se("\\grayG","\\textcolor{##626569}{#1}");se("\\grayH","\\textcolor{##3b3e40}{#1}");se("\\grayI","\\textcolor{##21242c}{#1}");se("\\kaBlue","\\textcolor{##314453}{#1}");se("\\kaGreen","\\textcolor{##71B307}{#1}");var DH={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class nHn{constructor(r,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(r),this.macros=new eHn(tHn,t.macros),this.mode=n,this.stack=[]}feed(r){this.lexer=new IR(r,this.settings)}switchMode(r){this.mode=r}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(r){this.stack.push(r)}pushTokens(r){this.stack.push(...r)}scanArgument(r){var t,n,s;if(r){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:s,end:n}=this.consumeArg(["]"])}else({tokens:s,start:t,end:n}=this.consumeArg());return this.pushToken(new Ua("EOF",n.loc)),this.pushTokens(s),new Ua("",pa.range(t,n))}consumeSpaces(){for(;;){var r=this.future();if(r.text===" ")this.stack.pop();else break}}consumeArg(r){var t=[],n=r&&r.length>0;n||this.consumeSpaces();var s=this.future(),o,a=0,i=0;do{if(o=this.popToken(),t.push(o),o.text==="{")++a;else if(o.text==="}"){if(--a,a===-1)throw new tt("Extra }",o)}else if(o.text==="EOF")throw new tt("Unexpected end of input in a macro argument, expected '"+(r&&n?r[i]:"}")+"'",o);if(r&&n)if((a===0||a===1&&r[i]==="{")&&o.text===r[i]){if(++i,i===r.length){t.splice(-i,i);break}}else i=0}while(a!==0||n);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:o}}consumeArgs(r,t){if(t){if(t.length!==r+1)throw new tt("The length of delimiters doesn't match the number of args!");for(var n=t[0],s=0;sthis.settings.maxExpand)throw new tt("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(r){var t=this.popToken(),n=t.text,s=t.noexpand?null:this._getExpansion(n);if(s==null||r&&s.unexpandable){if(r&&s==null&&n[0]==="\\"&&!this.isDefined(n))throw new tt("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var o=s.tokens,a=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){o=o.slice();for(var i=o.length-1;i>=0;--i){var c=o[i];if(c.text==="#"){if(i===0)throw new tt("Incomplete placeholder at end of macro body",c);if(c=o[--i],c.text==="#")o.splice(i+1,1);else if(/^[1-9]$/.test(c.text))o.splice(i,2,...a[+c.text-1]);else throw new tt("Not a valid argument number",c)}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var r=this.stack.pop();return r.treatAsRelax&&(r.text="\\relax"),r}}expandMacro(r){return this.macros.has(r)?this.expandTokens([new Ua(r)]):void 0}expandTokens(r){var t=[],n=this.stack.length;for(this.pushTokens(r);this.stack.length>n;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),t.push(s)}return this.countExpansion(t.length),t}expandMacroAsText(r){var t=this.expandMacro(r);return t&&t.map(n=>n.text).join("")}_getExpansion(r){var t=this.macros.get(r);if(t==null)return t;if(r.length===1){var n=this.lexer.catcodes[r];if(n!=null&&n!==13)return}var s=typeof t=="function"?t(this):t;if(typeof s=="string"){var o=0;if(s.includes("#"))for(var a=s.replace(/##/g,"");a.includes("#"+(o+1));)++o;for(var i=new IR(s,this.settings),c=[],u=i.lex();u.text!=="EOF";)c.push(u),u=i.lex();c.reverse();var d={tokens:c,numArgs:o};return d}return s}isDefined(r){return this.macros.has(r)||p_.hasOwnProperty(r)||$n.math.hasOwnProperty(r)||$n.text.hasOwnProperty(r)||DH.hasOwnProperty(r)}isExpandable(r){var t=this.macros.get(r);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:p_.hasOwnProperty(r)&&!p_[r].primitive}}var FR=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,_1=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Mk={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},HR={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class bx{constructor(r,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new nHn(r,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(r,t){if(t===void 0&&(t=!0),this.fetch().text!==r)throw new tt("Expected '"+r+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(r){this.mode=r,this.gullet.switchMode(r)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var r=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),r}finally{this.gullet.endGroups()}}subparse(r){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Ua("}")),this.gullet.pushTokens(r);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(r,t){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(bx.endOfExpression.has(s.text)||t&&s.text===t||r&&p_[s.text]&&p_[s.text].infix)break;var o=this.parseAtom(t);if(o){if(o.type==="internal")continue}else break;n.push(o)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(r){for(var t=-1,n,s=0;s=128)this.settings.strict&&(qF(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',r):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),r)),a={type:"textord",mode:"text",loc:pa.range(r),text:t};else return null;if(this.consume(),o)for(var d=0;d0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=S+1:(k!==S&&w.push({type:"text",value:u.value.slice(k,S)}),Array.isArray(N)?w.push(...N):N&&w.push(N),k=S+y[0].length,b=!0),!p.global)break;y=p.exec(u.value)}return b?(k?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let t=r[0],n=t.indexOf(")");const s=UR(e,"(");let o=UR(e,")");for(;n!==-1&&s>o;)e+=t.slice(0,n+1),t=t.slice(n+1),n=t.indexOf(")"),o++;return[e,t]}function BH(e,r){const t=e.input.charCodeAt(e.index-1);return(e.index===0||ed(t)||ex(t))&&(!r||t!==47)}FH.peek=DHn;function EHn(){this.buffer()}function NHn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function AHn(){this.buffer()}function THn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function RHn(e){const r=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ji(this.sliceSerialize(e)).toLowerCase(),t.label=r}function MHn(e){this.exit(e)}function OHn(e){const r=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ji(this.sliceSerialize(e)).toLowerCase(),t.label=r}function $Hn(e){this.exit(e)}function DHn(){return"["}function FH(e,r,t,n){const s=t.createTracker(n);let o=s.move("[^");const a=t.enter("footnoteReference"),i=t.enter("reference");return o+=s.move(t.safe(t.associationId(e),{after:"]",before:o})),i(),a(),o+=s.move("]"),o}function LHn(){return{enter:{gfmFootnoteCallString:EHn,gfmFootnoteCall:NHn,gfmFootnoteDefinitionLabelString:AHn,gfmFootnoteDefinition:THn},exit:{gfmFootnoteCallString:RHn,gfmFootnoteCall:MHn,gfmFootnoteDefinitionLabelString:OHn,gfmFootnoteDefinition:$Hn}}}function IHn(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:t,footnoteReference:FH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(n,s,o,a){const i=o.createTracker(a);let c=i.move("[^");const u=o.enter("footnoteDefinition"),d=o.enter("label");return c+=i.move(o.safe(o.associationId(n),{before:c,after:"]"})),d(),c+=i.move("]:"),n.children&&n.children.length>0&&(i.shift(4),c+=i.move((r?` -`:" ")+o.indentLines(o.containerFlow(n,i.current()),r?HH:PHn))),u(),c}}function PHn(e,r,t){return r===0?e:HH(e,r,t)}function HH(e,r,t){return(t?"":" ")+e}const BHn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qH.peek=GHn;function FHn(){return{canContainEols:["delete"],enter:{strikethrough:qHn},exit:{strikethrough:UHn}}}function HHn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:BHn}],handlers:{delete:qH}}}function qHn(e){this.enter({type:"delete",children:[]},e)}function UHn(e){this.exit(e)}function qH(e,r,t,n){const s=t.createTracker(n),o=t.enter("strikethrough");let a=s.move("~~");return a+=t.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),o(),a}function GHn(){return"~"}function WHn(e){return e.length}function KHn(e,r){const t=r||{},n=(t.align||[]).concat(),s=t.stringLength||WHn,o=[],a=[],i=[],c=[];let u=0,d=-1;for(;++du&&(u=e[d].length);++bc[b])&&(c[b]=y)}x.push(w)}a[d]=x,i[d]=v}let _=-1;if(typeof n=="object"&&"length"in n)for(;++_c[_]&&(c[_]=w),m[_]=w),p[_]=y}a.splice(1,0,p),i.splice(1,0,m),d=-1;const k=[];for(;++d=128)this.settings.strict&&(qF(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',r):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),r)),a={type:"textord",mode:"text",loc:pa.range(r),text:t};else return null;if(this.consume(),o)for(var d=0;d0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=S+1:(k!==S&&x.push({type:"text",value:u.value.slice(k,S)}),Array.isArray(N)?x.push(...N):N&&x.push(N),k=S+y[0].length,b=!0),!p.global)break;y=p.exec(u.value)}return b?(k?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let t=r[0],n=t.indexOf(")");const s=UR(e,"(");let o=UR(e,")");for(;n!==-1&&s>o;)e+=t.slice(0,n+1),t=t.slice(n+1),n=t.indexOf(")"),o++;return[e,t]}function BH(e,r){const t=e.input.charCodeAt(e.index-1);return(e.index===0||ed(t)||ex(t))&&(!r||t!==47)}FH.peek=DHn;function EHn(){this.buffer()}function NHn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function AHn(){this.buffer()}function THn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function RHn(e){const r=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ji(this.sliceSerialize(e)).toLowerCase(),t.label=r}function MHn(e){this.exit(e)}function OHn(e){const r=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ji(this.sliceSerialize(e)).toLowerCase(),t.label=r}function $Hn(e){this.exit(e)}function DHn(){return"["}function FH(e,r,t,n){const s=t.createTracker(n);let o=s.move("[^");const a=t.enter("footnoteReference"),i=t.enter("reference");return o+=s.move(t.safe(t.associationId(e),{after:"]",before:o})),i(),a(),o+=s.move("]"),o}function LHn(){return{enter:{gfmFootnoteCallString:EHn,gfmFootnoteCall:NHn,gfmFootnoteDefinitionLabelString:AHn,gfmFootnoteDefinition:THn},exit:{gfmFootnoteCallString:RHn,gfmFootnoteCall:MHn,gfmFootnoteDefinitionLabelString:OHn,gfmFootnoteDefinition:$Hn}}}function IHn(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:t,footnoteReference:FH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(n,s,o,a){const i=o.createTracker(a);let c=i.move("[^");const u=o.enter("footnoteDefinition"),d=o.enter("label");return c+=i.move(o.safe(o.associationId(n),{before:c,after:"]"})),d(),c+=i.move("]:"),n.children&&n.children.length>0&&(i.shift(4),c+=i.move((r?` +`:" ")+o.indentLines(o.containerFlow(n,i.current()),r?HH:PHn))),u(),c}}function PHn(e,r,t){return r===0?e:HH(e,r,t)}function HH(e,r,t){return(t?"":" ")+e}const BHn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qH.peek=GHn;function FHn(){return{canContainEols:["delete"],enter:{strikethrough:qHn},exit:{strikethrough:UHn}}}function HHn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:BHn}],handlers:{delete:qH}}}function qHn(e){this.enter({type:"delete",children:[]},e)}function UHn(e){this.exit(e)}function qH(e,r,t,n){const s=t.createTracker(n),o=t.enter("strikethrough");let a=s.move("~~");return a+=t.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),o(),a}function GHn(){return"~"}function WHn(e){return e.length}function KHn(e,r){const t=r||{},n=(t.align||[]).concat(),s=t.stringLength||WHn,o=[],a=[],i=[],c=[];let u=0,d=-1;for(;++du&&(u=e[d].length);++bc[b])&&(c[b]=y)}w.push(x)}a[d]=w,i[d]=v}let _=-1;if(typeof n=="object"&&"length"in n)for(;++_c[_]&&(c[_]=x),m[_]=x),p[_]=y}a.splice(1,0,p),i.splice(1,0,m),d=-1;const k=[];for(;++d "),o.shift(2);const a=t.indentLines(t.containerFlow(e,o.current()),XHn);return s(),a}function XHn(e,r,t){return">"+(t?"":" ")+e}function YHn(e,r){return WR(e,r.inConstruct,!0)&&!WR(e,r.notInConstruct,!1)}function WR(e,r,t){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return t;let n=-1;for(;++na&&(a=o):o=1,s=n+r.length,n=t.indexOf(r,s);return a}function ZHn(e,r){return!!(r.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function JHn(e){const r=e.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function eqn(e,r,t,n){const s=JHn(t),o=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(ZHn(e,t)){const _=t.enter("codeIndented"),p=t.indentLines(o,tqn);return _(),p}const i=t.createTracker(n),c=s.repeat(Math.max(UH(o,s)+1,3)),u=t.enter("codeFenced");let d=i.move(c);if(e.lang){const _=t.enter(`codeFencedLang${a}`);d+=i.move(t.safe(e.lang,{before:d,after:" ",encode:["`"],...i.current()})),_()}if(e.lang&&e.meta){const _=t.enter(`codeFencedMeta${a}`);d+=i.move(" "),d+=i.move(t.safe(e.meta,{before:d,after:` @@ -1068,20 +1068,20 @@ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, `+(s===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` `))+1))}const a="#".repeat(s),i=t.enter("headingAtx"),c=t.enter("phrasing");o.move(a+" ");let u=t.containerPhrasing(e,{before:"# ",after:` `,...o.current()});return/^[\t ]/.test(u)&&(u=Ng(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),c(),i(),u}WH.peek=iqn;function WH(e){return e.value||""}function iqn(){return"<"}KH.peek=cqn;function KH(e,r,t,n){const s=Y6(t),o=s==='"'?"Quote":"Apostrophe",a=t.enter("image");let i=t.enter("label");const c=t.createTracker(n);let u=c.move("![");return u+=c.move(t.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),i(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(i=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(i=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),i(),e.title&&(i=t.enter(`title${o}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),i()),u+=c.move(")"),a(),u}function cqn(){return"!"}VH.peek=lqn;function VH(e,r,t,n){const s=e.referenceType,o=t.enter("imageReference");let a=t.enter("label");const i=t.createTracker(n);let c=i.move("![");const u=t.safe(e.alt,{before:c,after:"]",...i.current()});c+=i.move(u+"]["),a();const d=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...i.current()});return a(),t.stack=d,o(),s==="full"||!u||u!==_?c+=i.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=i.move("]"),c}function lqn(){return"!"}QH.peek=uqn;function QH(e,r,t){let n=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(n);)s+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o\u007F]/.test(e.url))}YH.peek=_qn;function YH(e,r,t,n){const s=Y6(t),o=s==='"'?"Quote":"Apostrophe",a=t.createTracker(n);let i,c;if(XH(e,t)){const d=t.stack;t.stack=[],i=t.enter("autolink");let _=a.move("<");return _+=a.move(t.containerPhrasing(e,{before:_,after:">",...a.current()})),_+=a.move(">"),i(),t.stack=d,_}i=t.enter("link"),c=t.enter("label");let u=a.move("[");return u+=a.move(t.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(t.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=t.enter("destinationRaw"),u+=a.move(t.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=t.enter(`title${o}`),u+=a.move(" "+s),u+=a.move(t.safe(e.title,{before:u,after:s,...a.current()})),u+=a.move(s),c()),u+=a.move(")"),i(),u}function _qn(e,r,t){return XH(e,t)?"<":"["}ZH.peek=fqn;function ZH(e,r,t,n){const s=e.referenceType,o=t.enter("linkReference");let a=t.enter("label");const i=t.createTracker(n);let c=i.move("[");const u=t.containerPhrasing(e,{before:c,after:"]",...i.current()});c+=i.move(u+"]["),a();const d=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...i.current()});return a(),t.stack=d,o(),s==="full"||!u||u!==_?c+=i.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=i.move("]"),c}function fqn(){return"["}function Z6(e){const r=e.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function dqn(e){const r=Z6(e),t=e.options.bulletOther;if(!t)return r==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+t+"`) to be different");return t}function hqn(e){const r=e.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function JH(e){const r=e.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function pqn(e,r,t,n){const s=t.enter("list"),o=t.bulletCurrent;let a=e.ordered?hqn(t):Z6(t);const i=e.ordered?a==="."?")":".":dqn(t);let c=r&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),JH(t)===a&&d){let _=-1;for(;++_-1?r.start:1)+(t.options.incrementListMarker===!1?0:r.children.indexOf(e))+o);let a=o.length+1;(s==="tab"||s==="mixed"&&(r&&r.type==="list"&&r.spread||e.spread))&&(a=Math.ceil(a/4)*4);const i=t.createTracker(n);i.move(o+" ".repeat(a-o.length)),i.shift(a);const c=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,i.current()),d);return c(),u;function d(_,p,m){return p?(m?"":" ".repeat(a))+_:(m?o:o+" ".repeat(a-o.length))+_}}function vqn(e,r,t,n){const s=t.enter("paragraph"),o=t.enter("phrasing"),a=t.containerPhrasing(e,n);return o(),s(),a}const bqn=w0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function yqn(e,r,t,n){return(e.children.some(function(a){return bqn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,n)}function xqn(e){const r=e.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}eq.peek=wqn;function eq(e,r,t,n){const s=xqn(t),o=t.enter("strong"),a=t.createTracker(n),i=a.move(s+s);let c=a.move(t.containerPhrasing(e,{after:s,before:i,...a.current()}));const u=c.charCodeAt(0),d=Vb(n.before.charCodeAt(n.before.length-1),u,s);d.inside&&(c=Ng(u)+c.slice(1));const _=c.charCodeAt(c.length-1),p=Vb(n.after.charCodeAt(0),_,s);p.inside&&(c=c.slice(0,-1)+Ng(_));const m=a.move(s+s);return o(),t.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},i+c+m}function wqn(e,r,t){return t.options.strong||"*"}function kqn(e,r,t,n){return t.safe(e.value,n)}function jqn(e){const r=e.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function Sqn(e,r,t){const n=(JH(t)+(t.options.ruleSpaces?" ":"")).repeat(jqn(t));return t.options.ruleSpaces?n.slice(0,-1):n}const tq={blockquote:QHn,break:KR,code:eqn,definition:rqn,emphasis:GH,hardBreak:KR,heading:aqn,html:WH,image:KH,imageReference:VH,inlineCode:QH,link:YH,linkReference:ZH,list:pqn,listItem:gqn,paragraph:vqn,root:yqn,strong:eq,text:kqn,thematicBreak:Sqn};function Cqn(){return{enter:{table:zqn,tableData:VR,tableHeader:VR,tableRow:Nqn},exit:{codeText:Aqn,table:Eqn,tableData:Lk,tableHeader:Lk,tableRow:Lk}}}function zqn(e){const r=e._align;this.enter({type:"table",align:r.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Eqn(e){this.exit(e),this.data.inTable=void 0}function Nqn(e){this.enter({type:"tableRow",children:[]},e)}function Lk(e){this.exit(e)}function VR(e){this.enter({type:"tableCell",children:[]},e)}function Aqn(e){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,Tqn));const t=this.stack[this.stack.length-1];t.type,t.value=r,this.exit(e)}function Tqn(e,r){return r==="|"?r:e}function Rqn(e){const r=e||{},t=r.tableCellPadding,n=r.tablePipeAlign,s=r.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:i}};function a(m,k,x,v){return u(d(m,x,v),m.align)}function i(m,k,x,v){const b=_(m,x,v),w=u([b]);return w.slice(0,w.indexOf(` -`))}function c(m,k,x,v){const b=x.enter("tableCell"),w=x.enter("phrasing"),y=x.containerPhrasing(m,{...v,before:o,after:o});return w(),b(),y}function u(m,k){return KHn(m,{align:k,alignDelimiters:n,padding:t,stringLength:s})}function d(m,k,x){const v=m.children;let b=-1;const w=[],y=k.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Xqn={tokenize:sUn,partial:!0};function Yqn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tUn,continuation:{tokenize:rUn},exit:nUn}},text:{91:{name:"gfmFootnoteCall",tokenize:eUn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Zqn,resolveTo:Jqn}}}}function Zqn(e,r,t){const n=this;let s=n.events.length;const o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;s--;){const c=n.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return i;function i(c){if(!a||!a._balanced)return t(c);const u=Ji(n.sliceSerialize({start:a.end,end:n.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),r(c))}}function Jqn(e,r){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},i=[e[t+1],e[t+2],["enter",n,r],e[t+3],e[t+4],["enter",s,r],["exit",s,r],["enter",o,r],["enter",a,r],["exit",a,r],["exit",o,r],e[e.length-2],e[e.length-1],["exit",n,r]];return e.splice(t,e.length-t+1,...i),e}function eUn(e,r,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o=0,a;return i;function i(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),c}function c(_){return _!==94?t(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(_){if(o>999||_===93&&!a||_===null||_===91||vn(_))return t(_);if(_===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(Ji(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):t(_)}return vn(_)||(a=!0),o++,e.consume(_),_===92?d:u}function d(_){return _===91||_===92||_===93?(e.consume(_),o++,u):u(_)}}function tUn(e,r,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a=0,i;return c;function c(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):t(k)}function d(k){if(a>999||k===93&&!i||k===null||k===91||vn(k))return t(k);if(k===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return o=Ji(n.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return vn(k)||(i=!0),a++,e.consume(k),k===92?_:d}function _(k){return k===91||k===92||k===93?(e.consume(k),a++,d):d(k)}function p(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(o)||s.push(o),Nr(e,m,"gfmFootnoteDefinitionWhitespace")):t(k)}function m(k){return r(k)}}function rUn(e,r,t){return e.check(x0,r,e.attempt(Xqn,r,t))}function nUn(e){e.exit("gfmFootnoteDefinition")}function sUn(e,r,t){const n=this;return Nr(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?r(o):t(o)}}function oUn(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:o,resolveAll:s};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function s(a,i){let c=-1;for(;++c1?c(k):(a.consume(k),_++,m);if(_<2&&!t)return c(k);const v=a.exit("strikethroughSequenceTemporary"),b=ap(k);return v._open=!b||b===2&&!!x,v._close=!x||x===2&&!!b,i(k)}}}class aUn{constructor(){this.map=[]}add(r,t,n){iUn(this,r,t,n)}consume(r){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(r.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),r.length=this.map[t][0];n.push(r.slice()),r.length=0;let s=n.pop();for(;s;){for(const o of s)r.push(o);s=n.pop()}this.map.length=0}}function iUn(e,r,t,n){let s=0;if(!(t===0&&n.length===0)){for(;s-1;){const H=n.events[D][1].type;if(H==="lineEnding"||H==="linePrefix")D--;else break}const I=D>-1?n.events[D][1].type:null,G=I==="tableHead"||I==="tableRow"?N:c;return G===N&&n.parser.lazy[n.now().line]?t($):G($)}function c($){return e.enter("tableHead"),e.enter("tableRow"),u($)}function u($){return $===124||(a=!0,o+=1),d($)}function d($){return $===null?t($):Pt($)?o>1?(o=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),m):t($):Rr($)?Nr(e,d,"whitespace")($):(o+=1,a&&(a=!1,s+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),_($)))}function _($){return $===null||$===124||vn($)?(e.exit("data"),d($)):(e.consume($),$===92?p:_)}function p($){return $===92||$===124?(e.consume($),_):_($)}function m($){return n.interrupt=!1,n.parser.lazy[n.now().line]?t($):(e.enter("tableDelimiterRow"),a=!1,Rr($)?Nr(e,k,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):k($))}function k($){return $===45||$===58?v($):$===124?(a=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),x):z($)}function x($){return Rr($)?Nr(e,v,"whitespace")($):v($)}function v($){return $===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),b):$===45?(o+=1,b($)):$===null||Pt($)?S($):z($)}function b($){return $===45?(e.enter("tableDelimiterFiller"),w($)):z($)}function w($){return $===45?(e.consume($),w):$===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y($))}function y($){return Rr($)?Nr(e,S,"whitespace")($):S($)}function S($){return $===124?k($):$===null||Pt($)?!a||s!==o?z($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r($)):z($)}function z($){return t($)}function N($){return e.enter("tableRow"),A($)}function A($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),A):$===null||Pt($)?(e.exit("tableRow"),r($)):Rr($)?Nr(e,A,"whitespace")($):(e.enter("data"),E($))}function E($){return $===null||$===124||vn($)?(e.exit("data"),A($)):(e.consume($),$===92?M:E)}function M($){return $===92||$===124?(e.consume($),E):E($)}}function _Un(e,r){let t=-1,n=!0,s=0,o=[0,0,0,0],a=[0,0,0,0],i=!1,c=0,u,d,_;const p=new aUn;for(;++tt[2]+1){const k=t[2]+1,x=t[3]-t[2]-1;e.add(k,x,[])}}e.add(t[3]+1,0,[["exit",_,r]])}return s!==void 0&&(o.end=Object.assign({},mh(r.events,s)),e.add(s,0,[["exit",o,r]]),o=void 0),o}function XR(e,r,t,n,s){const o=[],a=mh(r.events,t);s&&(s.end=Object.assign({},a),o.push(["exit",s,r])),n.end=Object.assign({},a),o.push(["exit",n,r]),e.add(t+1,0,o)}function mh(e,r){const t=e[r],n=t[0]==="enter"?"start":"end";return t[1][n]}const fUn={name:"tasklistCheck",tokenize:hUn};function dUn(){return{text:{91:fUn}}}function hUn(e,r,t){const n=this;return s;function s(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return vn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):t(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):t(c)}function i(c){return Pt(c)?r(c):Rr(c)?e.check({tokenize:pUn},r,t)(c):t(c)}}function pUn(e,r,t){return Nr(e,n,"whitespace");function n(s){return s===null?t(s):r(s)}}function mUn(e){return QB([Fqn(),Yqn(),oUn(e),lUn(),dUn()])}const gUn={};function uq(e){const r=this,t=e||gUn,n=r.data(),s=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);s.push(mUn(t)),o.push(Lqn()),a.push(Iqn(t))}function vUn(){return{enter:{mathFlow:e,mathFlowFenceMeta:r,mathText:o},exit:{mathFlow:s,mathFlowFence:n,mathFlowFenceMeta:t,mathFlowValue:i,mathText:a,mathTextData:i}};function e(c){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},c)}function r(){this.buffer()}function t(){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=c}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u;const _=d.data.hChildren[0];_.type,_.tagName,_.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function o(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function a(c){const u=this.resume(),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u,d.data.hChildren.push({type:"text",value:u})}function i(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function bUn(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),n.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:i}};function a(m,k,w,v){return u(d(m,w,v),m.align)}function i(m,k,w,v){const b=_(m,w,v),x=u([b]);return x.slice(0,x.indexOf(` +`))}function c(m,k,w,v){const b=w.enter("tableCell"),x=w.enter("phrasing"),y=w.containerPhrasing(m,{...v,before:o,after:o});return x(),b(),y}function u(m,k){return KHn(m,{align:k,alignDelimiters:n,padding:t,stringLength:s})}function d(m,k,w){const v=m.children;let b=-1;const x=[],y=k.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Xqn={tokenize:sUn,partial:!0};function Yqn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tUn,continuation:{tokenize:rUn},exit:nUn}},text:{91:{name:"gfmFootnoteCall",tokenize:eUn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Zqn,resolveTo:Jqn}}}}function Zqn(e,r,t){const n=this;let s=n.events.length;const o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;s--;){const c=n.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return i;function i(c){if(!a||!a._balanced)return t(c);const u=Ji(n.sliceSerialize({start:a.end,end:n.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),r(c))}}function Jqn(e,r){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},i=[e[t+1],e[t+2],["enter",n,r],e[t+3],e[t+4],["enter",s,r],["exit",s,r],["enter",o,r],["enter",a,r],["exit",a,r],["exit",o,r],e[e.length-2],e[e.length-1],["exit",n,r]];return e.splice(t,e.length-t+1,...i),e}function eUn(e,r,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o=0,a;return i;function i(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),c}function c(_){return _!==94?t(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(_){if(o>999||_===93&&!a||_===null||_===91||vn(_))return t(_);if(_===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(Ji(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):t(_)}return vn(_)||(a=!0),o++,e.consume(_),_===92?d:u}function d(_){return _===91||_===92||_===93?(e.consume(_),o++,u):u(_)}}function tUn(e,r,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a=0,i;return c;function c(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):t(k)}function d(k){if(a>999||k===93&&!i||k===null||k===91||vn(k))return t(k);if(k===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Ji(n.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return vn(k)||(i=!0),a++,e.consume(k),k===92?_:d}function _(k){return k===91||k===92||k===93?(e.consume(k),a++,d):d(k)}function p(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(o)||s.push(o),Nr(e,m,"gfmFootnoteDefinitionWhitespace")):t(k)}function m(k){return r(k)}}function rUn(e,r,t){return e.check(x0,r,e.attempt(Xqn,r,t))}function nUn(e){e.exit("gfmFootnoteDefinition")}function sUn(e,r,t){const n=this;return Nr(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?r(o):t(o)}}function oUn(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:o,resolveAll:s};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function s(a,i){let c=-1;for(;++c1?c(k):(a.consume(k),_++,m);if(_<2&&!t)return c(k);const v=a.exit("strikethroughSequenceTemporary"),b=ap(k);return v._open=!b||b===2&&!!w,v._close=!w||w===2&&!!b,i(k)}}}class aUn{constructor(){this.map=[]}add(r,t,n){iUn(this,r,t,n)}consume(r){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(r.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),r.length=this.map[t][0];n.push(r.slice()),r.length=0;let s=n.pop();for(;s;){for(const o of s)r.push(o);s=n.pop()}this.map.length=0}}function iUn(e,r,t,n){let s=0;if(!(t===0&&n.length===0)){for(;s-1;){const F=n.events[D][1].type;if(F==="lineEnding"||F==="linePrefix")D--;else break}const I=D>-1?n.events[D][1].type:null,G=I==="tableHead"||I==="tableRow"?N:c;return G===N&&n.parser.lazy[n.now().line]?t($):G($)}function c($){return e.enter("tableHead"),e.enter("tableRow"),u($)}function u($){return $===124||(a=!0,o+=1),d($)}function d($){return $===null?t($):Pt($)?o>1?(o=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),m):t($):Rr($)?Nr(e,d,"whitespace")($):(o+=1,a&&(a=!1,s+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),_($)))}function _($){return $===null||$===124||vn($)?(e.exit("data"),d($)):(e.consume($),$===92?p:_)}function p($){return $===92||$===124?(e.consume($),_):_($)}function m($){return n.interrupt=!1,n.parser.lazy[n.now().line]?t($):(e.enter("tableDelimiterRow"),a=!1,Rr($)?Nr(e,k,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):k($))}function k($){return $===45||$===58?v($):$===124?(a=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),w):E($)}function w($){return Rr($)?Nr(e,v,"whitespace")($):v($)}function v($){return $===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),b):$===45?(o+=1,b($)):$===null||Pt($)?S($):E($)}function b($){return $===45?(e.enter("tableDelimiterFiller"),x($)):E($)}function x($){return $===45?(e.consume($),x):$===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y($))}function y($){return Rr($)?Nr(e,S,"whitespace")($):S($)}function S($){return $===124?k($):$===null||Pt($)?!a||s!==o?E($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r($)):E($)}function E($){return t($)}function N($){return e.enter("tableRow"),A($)}function A($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),A):$===null||Pt($)?(e.exit("tableRow"),r($)):Rr($)?Nr(e,A,"whitespace")($):(e.enter("data"),z($))}function z($){return $===null||$===124||vn($)?(e.exit("data"),A($)):(e.consume($),$===92?M:z)}function M($){return $===92||$===124?(e.consume($),z):z($)}}function _Un(e,r){let t=-1,n=!0,s=0,o=[0,0,0,0],a=[0,0,0,0],i=!1,c=0,u,d,_;const p=new aUn;for(;++tt[2]+1){const k=t[2]+1,w=t[3]-t[2]-1;e.add(k,w,[])}}e.add(t[3]+1,0,[["exit",_,r]])}return s!==void 0&&(o.end=Object.assign({},mh(r.events,s)),e.add(s,0,[["exit",o,r]]),o=void 0),o}function XR(e,r,t,n,s){const o=[],a=mh(r.events,t);s&&(s.end=Object.assign({},a),o.push(["exit",s,r])),n.end=Object.assign({},a),o.push(["exit",n,r]),e.add(t+1,0,o)}function mh(e,r){const t=e[r],n=t[0]==="enter"?"start":"end";return t[1][n]}const fUn={name:"tasklistCheck",tokenize:hUn};function dUn(){return{text:{91:fUn}}}function hUn(e,r,t){const n=this;return s;function s(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return vn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):t(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):t(c)}function i(c){return Pt(c)?r(c):Rr(c)?e.check({tokenize:pUn},r,t)(c):t(c)}}function pUn(e,r,t){return Nr(e,n,"whitespace");function n(s){return s===null?t(s):r(s)}}function mUn(e){return QB([Fqn(),Yqn(),oUn(e),lUn(),dUn()])}const gUn={};function uq(e){const r=this,t=e||gUn,n=r.data(),s=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);s.push(mUn(t)),o.push(Lqn()),a.push(Iqn(t))}function vUn(){return{enter:{mathFlow:e,mathFlowFenceMeta:r,mathText:o},exit:{mathFlow:s,mathFlowFence:n,mathFlowFenceMeta:t,mathFlowValue:i,mathText:a,mathTextData:i}};function e(c){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},c)}function r(){this.buffer()}function t(){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=c}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u;const _=d.data.hChildren[0];_.type,_.tagName,_.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function o(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function a(c){const u=this.resume(),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u,d.data.hChildren.push({type:"text",value:u})}function i(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function bUn(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),n.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` `,inConstruct:"mathFlowMeta"},{character:"$",after:r?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:n}};function t(o,a,i,c){const u=o.value||"",d=i.createTracker(c),_="$".repeat(Math.max(UH(u,"$")+1,2)),p=i.enter("mathFlow");let m=d.move(_);if(o.meta){const k=i.enter("mathFlowMeta");m+=d.move(i.safe(o.meta,{after:` `,before:m,encode:["$"],...d.current()})),k()}return m+=d.move(` `),u&&(m+=d.move(u+` -`)),m+=d.move(_),p(),m}function n(o,a,i){let c=o.value||"",u=1;for(r||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(c);)u++;const d="$".repeat(u);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let _=-1;for(;++_{var x,v;const k=(x=m.children)==null?void 0:x[0];return(m.type==="paperFigure"||m.type==="paragraph"&&((v=m.children)==null?void 0:v.length)===1)&&(k==null?void 0:k.type)==="image"&&!/\.html?(?:[?#]|$)/i.test(k.url??"")};for(let m=0;m1&&a.splice(m,k-m,{type:"imageCarousel",data:{hName:"image-carousel"},children:a.slice(m,k)})}}s(r)}}const ZR=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function _p(e,r,t){let n=r;for(;e[n]===t;)n+=1;return n-r}function Ag(e,r){let t=0;for(let n=r-1;n>=0&&e[n]==="\\";n-=1)t+=1;return t%2===1}function O5(e){var a;let r=!1,t=0,n=0,s=0;for(;n[ \t]?/.exec(e.slice(n));if(i){n+=i[0].length,s+=1;continue}const c=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(n));if(!c)break;n+=c[0].length,t+=c[0].length,r=!0}const o=((a=/^[ \t]*/.exec(e.slice(n)))==null?void 0:a[0].length)??0;return{hasListMarker:r,indentation:o,listIndent:t,offset:n+o,quoteDepth:s}}function AUn(e,r){const t=e[r];if(t!=="`"&&t!=="~"||Ag(e,r)||_p(e,r,t)<3)return!1;const n=e.lastIndexOf(` +`)),m+=d.move(_),p(),m}function n(o,a,i){let c=o.value||"",u=1;for(r||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(c);)u++;const d="$".repeat(u);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let _=-1;for(;++_{var w,v;const k=(w=m.children)==null?void 0:w[0];return(m.type==="paperFigure"||m.type==="paragraph"&&((v=m.children)==null?void 0:v.length)===1)&&(k==null?void 0:k.type)==="image"&&!/\.html?(?:[?#]|$)/i.test(k.url??"")};for(let m=0;m1&&a.splice(m,k-m,{type:"imageCarousel",data:{hName:"image-carousel"},children:a.slice(m,k)})}}s(r)}}const ZR=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function _p(e,r,t){let n=r;for(;e[n]===t;)n+=1;return n-r}function Ag(e,r){let t=0;for(let n=r-1;n>=0&&e[n]==="\\";n-=1)t+=1;return t%2===1}function O5(e){var a;let r=!1,t=0,n=0,s=0;for(;n[ \t]?/.exec(e.slice(n));if(i){n+=i[0].length,s+=1;continue}const c=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(n));if(!c)break;n+=c[0].length,t+=c[0].length,r=!0}const o=((a=/^[ \t]*/.exec(e.slice(n)))==null?void 0:a[0].length)??0;return{hasListMarker:r,indentation:o,listIndent:t,offset:n+o,quoteDepth:s}}function AUn(e,r){const t=e[r];if(t!=="`"&&t!=="~"||Ag(e,r)||_p(e,r,t)<3)return!1;const n=e.lastIndexOf(` `,r-1)+1,s=e.indexOf(` `,r),o=e.slice(n,s===-1?e.length:s),a=O5(o);return a.indentation<=3&&n+a.offset===r}function TUn(e,r){const t=e[r],n=_p(e,r,t),s=e.lastIndexOf(` `,r-1)+1,o=e.indexOf(` `,r),a=O5(e.slice(s,o===-1?e.length:o));let i=e.indexOf(` `,r+n);if(i===-1)return e.length;for(i+=1;i=a.listIndent&&_.indentation<=a.listIndent+3&&m>=n&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return c===-1?e.length:c+1;if(c===-1)return e.length;i=c+1}return e.length}function RUn(e,r,t){const n=_p(e,r,"`");let s=r+n;for(;s")return s+1}return t?e.length:null}function OUn(e){const r=[];for(let t=0;t|()[\]-]+$/.test(t)?/^[eE][+-]?\d+$/.test(t)||/[+*/=^_{}\\<>|()]/.test(t)?!0:/^[A-Za-z][A-Za-z0-9]*$/.test(t):!1:!0}function DUn(e,{predictMath:r=!1}={}){const t=OUn(e),n=new Set,s=new Set;for(let u=0;u=a.listIndent&&_.indentation<=a.listIndent+3&&m>=n&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return c===-1?e.length:c+1;if(c===-1)return e.length;i=c+1}return e.length}function RUn(e,r,t){const n=_p(e,r,"`");let s=r+n;for(;s")return s+1}return t?e.length:null}function OUn(e){const r=[];for(let t=0;t|()[\]-]+$/.test(t)?/^[eE][+-]?\d+$/.test(t)||/[+*/=^_{}\\<>|()]/.test(t)?!0:/^[A-Za-z][A-Za-z0-9]*$/.test(t):!1:!0}function DUn(e,{predictMath:r=!1}={}){const t=OUn(e),n=new Set,s=new Set;for(let u=0;u`$$${s}$$`).replace(/\\\(([\s\S]+?)\\\)/g,(n,s)=>`$$${s}$$`);return r.predictMath&&(t=t.replace(/\\\[([\s\S]*)$/,(n,s)=>`$$${s}`).replace(/\\\(([\s\S]*)$/,(n,s)=>`$$${s}`)),DUn(t,r)}function dq(e,r={}){let t="",n=0,s=0;for(;ss!==r);return{order:e.order.filter(s=>s!==r),previewKey:e.previewKey===r?null:e.previewKey,fallbackKey:n[n.length-1]??null}}function PUn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function rs(e,r={}){const t=n=>{r.stopPropagation&&n.stopPropagation()};return{onClick:n=>{t(n),e("preview")},onDoubleClick:n=>{t(n),e("keepOpen")},onAuxClick:n=>{n.button===1&&(n.preventDefault(),t(n),e("keepOpen"))},onKeyDown:n=>{const s=PUn(n.key);s&&(n.preventDefault(),t(n),e(s))}}}function BUn(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.min(1200,Math.ceil(e)):null}const eM=[{selector:"img[src]",attribute:"src",typePrefixes:["image/"]},{selector:"source[src]",attribute:"src",typePrefixes:["image/","audio/","video/"]},{selector:"video[poster]",attribute:"poster",typePrefixes:["image/"]},{selector:"video[src]",attribute:"src",typePrefixes:["video/"]},{selector:"audio[src]",attribute:"src",typePrefixes:["audio/"]},{selector:'link[rel~="stylesheet"][href]',attribute:"href",typePrefixes:["text/css"]},{selector:"script[src]",attribute:"src",typePrefixes:["text/javascript"]}],FUn=4e6,HUn=200,tM=16e6,qUn=e=>new Promise(r=>{const t=new FileReader;t.onload=()=>r(typeof t.result=="string"?t.result:null),t.onerror=()=>r(null),t.readAsDataURL(e)}),rM=e=>e.startsWith("//")?`https:${e}`:e;async function UUn(e,r){var s;let t=FUn;const n=new Map;for(const{element:o,attribute:a,url:i,typePrefixes:c}of e){if(n.has(i)){const k=n.get(i);k&&o.setAttribute(a,k);continue}if(r.aborted)return;if(n.size>=HUn)continue;n.set(i,null);const u=await fetch(i,{signal:r}).catch(()=>null);if(!(u!=null&&u.ok))continue;const d=u.headers.get("content-type")??"",_=Number(u.headers.get("content-length"));if(!c.some(k=>d.startsWith(k))||!(Number.isFinite(_)&&_>0&&_<=t)){await((s=u.body)==null?void 0:s.cancel().catch(()=>{}));continue}const p=await u.blob().catch(()=>null),m=p&&await qUn(p);!p||!m||(t-=p.size,n.set(i,m),o.setAttribute(a,m))}}async function GUn(e,r,t){var a;const n=new DOMParser().parseFromString(e,"text/html"),s=[];for(const i of n.querySelectorAll(eM.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:u,typePrefixes:d}of eM){if(!i.matches(c))continue;const _=i.getAttribute(u);if(!_)continue;const p=r(_);p&&(p===_?i.setAttribute(u,rM(_)):s.push({element:i,attribute:u,url:p,typePrefixes:d}))}await UUn(s,t);for(const i of n.querySelectorAll("a[href]")){const c=i.getAttribute("href");!c||!ax(c)||(i.setAttribute("href",rM(c)),i.setAttribute("target","_blank"),i.setAttribute("rel","noopener noreferrer"))}const o=((a=n.querySelector("base[href]"))==null?void 0:a.getAttribute("href"))??"";if(!/^https?:\/\//i.test(o)){const i=n.createElement("base");i.setAttribute("href","about:srcdoc"),n.head.prepend(i)}return`${n.doctype?``:""}${n.documentElement.outerHTML}`}async function WUn(e,r,t,n){var i;if(!r)return{text:e,partial:!1};const s=await fetch(t,{signal:n,headers:{Range:`bytes=0-${tM-1}`}}).catch(()=>null),o=s!=null&&s.ok?await s.text().catch(()=>null):null;if(o===null)return{text:e,partial:!0};const a=Number((i=s==null?void 0:s.headers.get("content-range"))==null?void 0:i.split("/").pop());return{text:o,partial:Number.isFinite(a)&&a>tM}}function hq({html:e,truncated:r,url:t,name:n,resolveSrc:s,fitContent:o=!1}){const[a,i]=T.useState(null),c=T.useRef(null),[u,d]=T.useState(360),[_,p]=T.useState(null);return T.useEffect(()=>{if(!o)return;const m=k=>{var v;const x=k.data;if(!(k.source!==((v=c.current)==null?void 0:v.contentWindow)||typeof x!="object"||x===null)){if("type"in x&&x.type==="orx-html-size"&&"height"in x){const b=BUn(x.height);b!==null&&d(b)}if("type"in x&&x.type==="orx-chart-picker"&&"choices"in x&&Array.isArray(x.choices)&&"value"in x&&typeof x.value=="string"&&"left"in x&&typeof x.left=="number"&&Number.isFinite(x.left)&&"top"in x&&typeof x.top=="number"&&Number.isFinite(x.top)&&"width"in x&&typeof x.width=="number"&&Number.isFinite(x.width)&&x.width>0){const b=[];for(const w of x.choices){if(typeof w!="object"||w===null||!("id"in w)||typeof w.id!="string"||!("label"in w)||typeof w.label!="string")return;b.push({id:w.id,label:w.label})}p({choices:b,value:x.value,left:x.left,top:x.top,width:x.width})}}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[o]),T.useEffect(()=>{let m=!1;const k=new AbortController;return i(null),d(360),p(null),WUn(e,r,t,k.signal).then(async({text:x,partial:v})=>({source:await GUn(x,s,k.signal)+(o?` + diff --git a/ui/src/components/ChatPanel.tsx b/ui/src/components/ChatPanel.tsx index 0b9f47af4..1a0cdb8f3 100644 --- a/ui/src/components/ChatPanel.tsx +++ b/ui/src/components/ChatPanel.tsx @@ -4037,7 +4037,8 @@ function SessionRow({ onDelete: () => void; }) { const triggerRef = useRef(null); - const { open, setOpen, ref } = usePopover(triggerRef); + const rowRef = useRef(null); + const { open, setOpen, ref } = usePopover(triggerRef, rowRef); const title = session.title?.trim() || "Untitled"; const [editing, setEditing] = useState(false); // Seeded by startEditing() before the input mounts; "" is just a placeholder. @@ -4051,8 +4052,10 @@ function SessionRow({ const left = getComputedStyle(triggerRef.current).direction === "rtl" ? anchor.left : anchor.right - bounds.width; ref.current.style.left = `${Math.max(8, Math.min(left, window.innerWidth - bounds.width - 8))}px`; ref.current.style.top = `${Math.max(8, Math.min(anchor.bottom + 4, window.innerHeight - bounds.height - 8))}px`; + const menu = ref.current; + menu.querySelector("button")?.focus({ preventScroll: true }); const dismiss = (event: Event) => { - if (event.target instanceof Node && ref.current?.contains(event.target)) return; + if (event.type === "scroll" && !(event.target instanceof Node && event.target.contains(triggerRef.current))) return; setOpen(false); }; window.addEventListener("scroll", dismiss, true); @@ -4060,6 +4063,7 @@ function SessionRow({ return () => { window.removeEventListener("scroll", dismiss, true); window.removeEventListener("resize", dismiss); + if (menu.contains(document.activeElement)) triggerRef.current?.focus({ preventScroll: true }); }; }, [open, ref, setOpen]); @@ -4085,6 +4089,7 @@ function SessionRow({ // Not a - {open && createPortal( -
- { - e.stopPropagation(); - setOpen(false); - startEditing(); - }} + + + + + + {m.chat_panel_rename()} - - { - e.stopPropagation(); - setOpen(false); - onSetArchived(!session.archived); - }} - > + + onSetArchived(!session.archived)}> {session.archived ? m.chat_unarchive() : m.chat_archive()} - - { - e.stopPropagation(); - setOpen(false); - onDelete(); - }} - > + + {m.chat_panel_delete()} - -
, document.body, - )} + + + ); } diff --git a/ui/src/components/ModelPicker.tsx b/ui/src/components/ModelPicker.tsx index f5c9b57f4..1685e3aa8 100644 --- a/ui/src/components/ModelPicker.tsx +++ b/ui/src/components/ModelPicker.tsx @@ -70,13 +70,13 @@ export function defaultSelection(harnesses: Harness[]): ModelSelection | null { /** Close-on-outside-click + open state shared by the composer dropdowns (and * the session-rail menus). */ -export function usePopover(triggerRef?: RefObject, boundaryRef?: RefObject) { +export function usePopover(triggerRef?: RefObject) { const [open, setOpen] = useState(false); const ref = useRef(null); useEffect(() => { if (!open) return; const onDown = (e: MouseEvent) => { - if (e.target instanceof Node && !ref.current?.contains(e.target) && !triggerRef?.current?.contains(e.target) && !boundaryRef?.current?.contains(e.target)) setOpen(false); + if (e.target instanceof Node && !ref.current?.contains(e.target) && !triggerRef?.current?.contains(e.target)) setOpen(false); }; const onKey = (e: KeyboardEvent) => { // Escape closes the picker and must NOT bubble to other document-level @@ -98,7 +98,7 @@ export function usePopover(triggerRef?: RefObject, bou document.removeEventListener("mousedown", onDown, true); document.removeEventListener("keydown", onKey, true); }; - }, [open, triggerRef, boundaryRef]); + }, [open, triggerRef]); return { open, setOpen, ref }; } diff --git a/ui/src/components/ui/DropdownMenu.tsx b/ui/src/components/ui/DropdownMenu.tsx new file mode 100644 index 000000000..643d1ca32 --- /dev/null +++ b/ui/src/components/ui/DropdownMenu.tsx @@ -0,0 +1,66 @@ +import * as DropdownPrimitive from "@radix-ui/react-dropdown-menu"; +import type { ComponentProps, RefObject } from "react"; +import { getTextDirection } from "../../paraglide/runtime.js"; +import { MenuItem } from "./MenuItem"; +import { cn } from "./cn"; + +export function DropdownMenu(props: ComponentProps) { + return ; +} + +export const DropdownMenuTrigger = DropdownPrimitive.Trigger; + +export function DropdownMenuContent({ + ownerRef, + restoreFocus = true, + className, + onInteractOutside, + onCloseAutoFocus, + onEscapeKeyDown, + onClick, + ...props +}: ComponentProps & { + ownerRef?: RefObject; + restoreFocus?: boolean; +}) { + return ( + + { + onInteractOutside?.(event); + const target = event.detail.originalEvent.target; + if (target instanceof Node && ownerRef?.current?.contains(target)) event.preventDefault(); + }} + onCloseAutoFocus={(event) => { + onCloseAutoFocus?.(event); + if (!restoreFocus) event.preventDefault(); + }} + onEscapeKeyDown={(event) => { + onEscapeKeyDown?.(event); + event.stopPropagation(); + }} + onClick={(event) => { + onClick?.(event); + event.stopPropagation(); + }} + /> + + ); +} + +export function DropdownMenuItem({ danger, className, children, ...props }: ComponentProps & { danger?: boolean }) { + return ( + + + {children} + + + ); +} diff --git a/ui/src/components/ui/index.ts b/ui/src/components/ui/index.ts index 7fc153760..7a19ad007 100644 --- a/ui/src/components/ui/index.ts +++ b/ui/src/components/ui/index.ts @@ -5,6 +5,7 @@ export { IconButton, IconButtonLink } from "./IconButton"; export { Input } from "./Input"; export type { InputProps } from "./Input"; export { MenuItem } from "./MenuItem"; +export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from "./DropdownMenu"; export { LoadingRow, Spinner } from "./Spinner"; export { StatusIndicator } from "./StatusIndicator"; export type { StatusTone } from "./StatusIndicator"; diff --git a/ui/tests/components/session-menu.test.tsx b/ui/tests/components/session-menu.test.tsx new file mode 100644 index 000000000..21d405b30 --- /dev/null +++ b/ui/tests/components/session-menu.test.tsx @@ -0,0 +1,154 @@ +import { fireEvent, render, screen, waitFor, within } from "@testing-library/react"; +import userEvent from "@testing-library/user-event"; +import { afterEach, expect, test, vi } from "vitest"; +import type { ChatSession } from "../../src/api"; +import { SessionRow } from "../../src/components/ChatPanel"; +import { setLocale } from "../../src/paraglide/runtime.js"; + +function session(id: string, archived = false): ChatSession { + return { + id, title: id, projectId: "project", harness: "codex", model: null, serviceTier: null, + permissionMode: null, planMode: false, autonomy: "copilot", reasoningLevel: null, + archived, createdAt: 0, updatedAt: 0, busy: false, activeLeafId: null, + }; +} + +function sidebar(archived = false) { + const onOpen = vi.fn(), onRename = vi.fn(), onSetArchived = vi.fn(), onDelete = vi.fn(); + const view = render( + <> +
+ {["First chat", "Older chat", "Following chat"].map((id, index) => ( +
+ onOpen(id)} onRename={(title) => onRename(id, title)} + onSetArchived={(next) => onSetArchived(id, next)} onDelete={() => onDelete(id)} + /> +
+ ))} +
+
Live reply
+ + , + ); + const row = screen.getByText("Older chat").closest(".session-row")!; + return { user: userEvent.setup(), unmount: view.unmount, row, trigger: within(row).getByRole("button", { name: "Session options" }), onOpen, onRename, onSetArchived, onDelete }; +} + +afterEach(() => setLocale("en", { reload: false })); + +test("portals the expanded-sidebar menu outside transformed rows and renames only its owner", async () => { + const { user, row, trigger, onOpen, onRename } = sidebar(); + await user.click(trigger); + const menu = screen.getByRole("menu"); + expect(screen.getByTestId("sidebar").contains(menu)).toBe(false); + expect(trigger.getAttribute("aria-expanded")).toBe("true"); + await user.click(within(menu).getByRole("menuitem", { name: "Rename" })); + const input = within(row).getByRole("textbox", { name: "Session title" }); + await waitFor(() => expect(document.activeElement).toBe(input)); + expect(screen.getAllByRole("textbox")).toHaveLength(1); + await user.clear(input); + await user.type(input, "Renamed older chat{Enter}"); + expect(onRename.mock.calls).toEqual([["Older chat", "Renamed older chat"]]); + expect(onOpen).not.toHaveBeenCalled(); + expect(screen.queryByRole("menu")).toBeNull(); +}); + +test("an owner-row click only dismisses; a subsequent click can open the chat", async () => { + const { user, trigger, onOpen } = sidebar(); + await user.click(trigger); + await user.click(screen.getByText("Older chat")); + expect(screen.queryByRole("menu")).toBeNull(); + expect(onOpen).not.toHaveBeenCalled(); + await user.click(screen.getByText("Older chat")); + expect(onOpen.mock.calls).toEqual([["Older chat"]]); +}); + +test("keyboard Rename keeps focus in the inline editor and Escape cancels it", async () => { + const { user, trigger, row, onRename, onOpen } = sidebar(); + trigger.focus(); + await user.keyboard("{Enter}{Enter}"); + const input = within(row).getByRole("textbox", { name: "Session title" }); + await waitFor(() => expect(document.activeElement).toBe(input)); + await user.keyboard("Unsaved{Escape}"); + expect(screen.queryByRole("textbox")).toBeNull(); + expect(screen.getByText("Older chat")).not.toBeNull(); + expect(onRename).not.toHaveBeenCalled(); + expect(onOpen).not.toHaveBeenCalled(); +}); + +test("keyboard navigation, Escape dismissal and trigger focus are managed by the menu", async () => { + const { user, trigger, onDelete } = sidebar(); + trigger.focus(); + await user.keyboard("{ArrowDown}"); + await waitFor(() => expect(document.activeElement).toBe(screen.getByRole("menuitem", { name: "Rename" }))); + await user.keyboard("{ArrowDown}"); + expect(document.activeElement).toBe(screen.getByRole("menuitem", { name: "Archive" })); + await user.keyboard("{End}"); + expect(document.activeElement).toBe(screen.getByRole("menuitem", { name: "Delete" })); + await user.keyboard("{ArrowDown}"); + expect(document.activeElement).toBe(screen.getByRole("menuitem", { name: "Rename" })); + const pageEscape = vi.fn(); + document.addEventListener("keydown", pageEscape); + try { + await user.keyboard("{Escape}"); + expect(screen.queryByRole("menu")).toBeNull(); + await waitFor(() => expect(document.activeElement).toBe(trigger)); + expect(pageEscape).not.toHaveBeenCalled(); + expect(onDelete).not.toHaveBeenCalled(); + } finally { + document.removeEventListener("keydown", pageEscape); + } +}); + +test("outside interactions and the trigger toggle dismiss without selecting a chat", async () => { + const { user, trigger, onOpen } = sidebar(); + await user.click(trigger); + await user.click(screen.getByRole("button", { name: "Outside" })); + expect(screen.queryByRole("menu")).toBeNull(); + await user.click(trigger); + await user.click(trigger); + expect(screen.queryByRole("menu")).toBeNull(); + expect(onOpen).not.toHaveBeenCalled(); +}); + +test.each([false, true])("archive action uses the intended session and toggles archived=%s", async (archived) => { + const { user, trigger, onSetArchived, onOpen } = sidebar(archived); + await user.click(trigger); + await user.click(screen.getByRole("menuitem", { name: archived ? "Unarchive" : "Archive" })); + expect(onSetArchived.mock.calls).toEqual([["Older chat", !archived]]); + expect(onOpen).not.toHaveBeenCalled(); + expect(screen.queryByRole("menu")).toBeNull(); +}); + +test("keyboard activation deletes only the intended session", async () => { + const { user, trigger, onDelete, onOpen } = sidebar(); + trigger.focus(); + await user.keyboard("{Enter}{End}{Enter}"); + expect(onDelete.mock.calls).toEqual([["Older chat"]]); + expect(onOpen).not.toHaveBeenCalled(); + expect(screen.queryByRole("menu")).toBeNull(); +}); + +test("unrelated transcript scrolling does not dismiss the menu", async () => { + const { user, trigger } = sidebar(); + await user.click(trigger); + fireEvent.scroll(screen.getByTestId("transcript")); + expect(screen.queryByRole("menu")).not.toBeNull(); +}); + +test("unmounting a virtualized owner row removes its portal", async () => { + const { user, trigger, unmount } = sidebar(); + await user.click(trigger); + expect(screen.queryByRole("menu")).not.toBeNull(); + unmount(); + expect(screen.queryByRole("menu")).toBeNull(); +}); + +test("the shared menu passes RTL direction to its positioning and navigation primitive", async () => { + const { user, trigger } = sidebar(); + setLocale("ar", { reload: false }); + await user.click(trigger); + expect(screen.getByRole("menu").getAttribute("dir")).toBe("rtl"); +}); diff --git a/ui/tests/components/setup.ts b/ui/tests/components/setup.ts new file mode 100644 index 000000000..555946ce7 --- /dev/null +++ b/ui/tests/components/setup.ts @@ -0,0 +1,26 @@ +import { cleanup } from "@testing-library/react"; +import { afterEach, vi } from "vitest"; + +vi.stubGlobal("PointerEvent", MouseEvent); +vi.stubGlobal("ResizeObserver", class { + observe() {} + unobserve() {} + disconnect() {} +}); +HTMLElement.prototype.hasPointerCapture = () => false; +HTMLElement.prototype.setPointerCapture = () => {}; +HTMLElement.prototype.releasePointerCapture = () => {}; +HTMLElement.prototype.scrollIntoView = () => {}; +window.matchMedia = (media) => ({ + matches: false, media, onchange: null, + addListener() {}, removeListener() {}, addEventListener() {}, removeEventListener() {}, + dispatchEvent: () => false, +}); +vi.spyOn(HTMLCanvasElement.prototype, "getContext").mockReturnValue(null); + +// jsdom has no layout; give Radix a visible anchor and viewport. Browser verification covers geometry. +vi.spyOn(HTMLElement.prototype, "getBoundingClientRect").mockReturnValue(new DOMRect(100, 100, 140, 30)); +Object.defineProperty(document.documentElement, "clientWidth", { value: 1024 }); +Object.defineProperty(document.documentElement, "clientHeight", { value: 768 }); + +afterEach(cleanup); diff --git a/ui/tests/sidebar-layout.test.mjs b/ui/tests/sidebar-layout.test.mjs index 369524429..104e3bf23 100644 --- a/ui/tests/sidebar-layout.test.mjs +++ b/ui/tests/sidebar-layout.test.mjs @@ -1,95 +1,7 @@ import assert from "node:assert/strict"; -import { readFileSync } from "node:fs"; import { test } from "node:test"; -import ts from "typescript"; import { fitSidebarRows, sidebarRowHeight } from "../src/sidebarLayout.ts"; -const source = readFileSync(new URL("../src/components/ChatPanel.tsx", import.meta.url), "utf8"); -const file = ts.createSourceFile("ChatPanel.tsx", source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX); -const sessionRow = file.statements.find(node => ts.isFunctionDeclaration(node) && node.name?.text === "SessionRow"); - -test("session menus escape transformed sidebar rows and their scroll clipping", () => { - const row = sessionRow.getText(file); - assert.match(row, /createPortal\([\s\S]*document\.body/); - assert.match(row, /ref=\{ref\} className="[^"]*fixed z-70/); - assert.match(row, /usePopover\(triggerRef, rowRef\)/); - assert.match(row, /ref=\{rowRef\}/); -}); - -test("portaled menus keep their owner row inside the outside-click boundary", () => { - const picker = ts.createSourceFile("ModelPicker.tsx", readFileSync(new URL("../src/components/ModelPicker.tsx", import.meta.url), "utf8"), ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX); - const hook = picker.statements.find(node => ts.isFunctionDeclaration(node) && node.name?.text === "usePopover"); - const effect = hook.body.statements.find(node => ts.isExpressionStatement(node) - && ts.isCallExpression(node.expression) && node.expression.expression.getText(picker) === "useEffect").expression.arguments[0]; - const js = ts.transpileModule(`return ${effect.getText(picker)}`, { compilerOptions: { target: ts.ScriptTarget.ES2022 } }).outputText; - const listeners = new Map(); - const menu = new EventTarget(), trigger = new EventTarget(), title = new EventTarget(); - let closed = 0, focused = 0; - const cleanup = new Function("open", "ref", "triggerRef", "boundaryRef", "document", "Node", "setOpen", js)( - true, - { current: { contains: target => target === menu } }, - { current: { contains: target => target === trigger, focus: () => focused++ } }, - { current: { contains: target => target === title } }, - { addEventListener: (name, handler) => listeners.set(name, handler), removeEventListener: name => listeners.delete(name) }, - EventTarget, - value => { assert.equal(value, false); closed++; }, - )(); - for (const target of [menu, trigger, title]) listeners.get("mousedown")({ target }); - assert.equal(closed, 0); - listeners.get("mousedown")({ target: new EventTarget() }); - assert.equal(closed, 1); - listeners.get("keydown")({ key: "Escape", preventDefault() {}, stopPropagation() {} }); - assert.equal(closed, 2); - assert.equal(focused, 1); - cleanup(); - assert.equal(listeners.size, 0); -}); - -test("session menus stay in the viewport and dismiss when their anchor moves", () => { - const effect = sessionRow.body.statements.find(node => ts.isExpressionStatement(node) - && ts.isCallExpression(node.expression) && node.expression.expression.getText(file) === "useLayoutEffect").expression.arguments[0]; - const js = ts.transpileModule(`return ${effect.getText(file)}`, { compilerOptions: { target: ts.ScriptTarget.ES2022 } }).outputText; - for (const [direction, anchor, expected] of [ - ["ltr", { left: 250, right: 266, bottom: 80 }, { left: "126px", top: "84px" }], - ["ltr", { left: 10, right: 26, bottom: 390 }, { left: "8px", top: "272px" }], - ["rtl", { left: 470, right: 486, bottom: 80 }, { left: "352px", top: "84px" }], - ]) { - const listeners = new Map(); - const style = {}; - let dismissed = 0; - let focused = 0, restored = 0; - class Element extends EventTarget { contains() { return false; } } - const inside = new Element(); - const sidebar = new Element(); - const trigger = { getBoundingClientRect: () => anchor, focus: () => restored++ }; - sidebar.contains = target => target === trigger; - const cleanup = new Function("open", "ref", "triggerRef", "getComputedStyle", "window", "Node", "setOpen", "document", js)( - true, - { current: { getBoundingClientRect: () => ({ width: 140, height: 120 }), style, contains: target => target === inside, - querySelector: () => ({ focus: options => { assert.equal(options.preventScroll, true); focused++; } }) } }, - { current: trigger }, - () => ({ direction }), - { innerWidth: 500, innerHeight: 400, - addEventListener: (name, handler) => listeners.set(name, handler), - removeEventListener: (name, handler) => { assert.equal(listeners.get(name), handler); listeners.delete(name); } }, - Element, - value => { assert.equal(value, false); dismissed++; }, - { activeElement: inside }, - )(); - assert.deepEqual(style, expected); - assert.equal(focused, 1); - listeners.get("scroll")({ type: "scroll", target: inside }); - listeners.get("scroll")({ type: "scroll", target: new Element() }); - assert.equal(dismissed, 0); - listeners.get("scroll")({ type: "scroll", target: sidebar }); - listeners.get("resize")({ type: "resize" }); - assert.equal(dismissed, 2); - cleanup(); - assert.equal(listeners.size, 0); - assert.equal(restored, 1); - } -}); - test("sidebar fits complete rows and keeps an older selected chat visible", () => { const first = { id: "first" }; const second = { id: "second" }; diff --git a/ui/vitest.config.ts b/ui/vitest.config.ts new file mode 100644 index 000000000..bd5b0c249 --- /dev/null +++ b/ui/vitest.config.ts @@ -0,0 +1,11 @@ +import react from "@vitejs/plugin-react"; +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + plugins: [react()], + test: { + environment: "jsdom", + include: ["tests/components/**/*.test.tsx"], + setupFiles: ["tests/components/setup.ts"], + }, +}); From 450472e7c7d071410e621c40a01ee7b6ed39c12d Mon Sep 17 00:00:00 2001 From: Daniel Kim Date: Wed, 14 Oct 2026 23:09:43 +0000 Subject: [PATCH 4/4] fix: clip session menus to the sidebar boundary --- ...iew-CVq8sN63.js => PdfPreview-DZQw7Tpb.js} | 2 +- .../{index-BitFqV0I.js => index-CCX76aau.js} | 6 ++--- ui/dist/index.html | 2 +- ui/src/components/ChatPanel.tsx | 5 ++++- ui/tests/components/session-menu.test.tsx | 22 ++++++++++++++++++- ui/tests/components/setup.ts | 2 ++ 6 files changed, 32 insertions(+), 7 deletions(-) rename ui/dist/assets/{PdfPreview-CVq8sN63.js => PdfPreview-DZQw7Tpb.js} (99%) rename ui/dist/assets/{index-BitFqV0I.js => index-CCX76aau.js} (98%) diff --git a/ui/dist/assets/PdfPreview-CVq8sN63.js b/ui/dist/assets/PdfPreview-DZQw7Tpb.js similarity index 99% rename from ui/dist/assets/PdfPreview-CVq8sN63.js rename to ui/dist/assets/PdfPreview-DZQw7Tpb.js index 8302dc17f..c23ea9ad4 100644 --- a/ui/dist/assets/PdfPreview-CVq8sN63.js +++ b/ui/dist/assets/PdfPreview-DZQw7Tpb.js @@ -1,4 +1,4 @@ -var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-BitFqV0I.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جست‌وجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",A1=()=>"문서에서 찾기",x1=()=>"文書内を検索",S1=()=>"Znajdź w dokumencie",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():t==="ko"?A1():t==="ja"?x1():t==="pl"?S1():m1()}),T1=()=>"Fit to width",C1=()=>"适应宽度",P1=()=>"متناسب با عرض",I1=()=>"ملاءمة العرض",R1=()=>"Ajustar al ancho",O1=()=>"चौड़ाई में फ़िट करें",M1=()=>"너비에 맞추기",D1=()=>"幅に合わせる",L1=()=>"Dopasuj do szerokości",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?C1():t==="fa"?P1():t==="ar"?I1():t==="es"?R1():t==="hi"?O1():t==="ko"?M1():t==="ja"?D1():t==="pl"?L1():T1()}),N1=()=>"Next match",F1=()=>"下一个匹配项",k1=()=>"مورد بعدی",B1=()=>"التطابق التالي",j1=()=>"Coincidencia siguiente",U1=()=>"अगला मिलान",$1=()=>"다음 일치 항목",H1=()=>"次の一致",V1=()=>"Następne dopasowanie",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?F1():t==="fa"?k1():t==="ar"?B1():t==="es"?j1():t==="hi"?U1():t==="ko"?$1():t==="ja"?H1():t==="pl"?V1():N1()}),z1=()=>"Previous match",W1=()=>"上一个匹配项",G1=()=>"مورد قبلی",_1=()=>"التطابق السابق",X1=()=>"Coincidencia anterior",Y1=()=>"पिछला मिलान",K1=()=>"이전 일치 항목",J1=()=>"前の一致",Z1=()=>"Poprzednie dopasowanie",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?W1():t==="fa"?G1():t==="ar"?_1():t==="es"?X1():t==="hi"?Y1():t==="ko"?K1():t==="ja"?J1():t==="pl"?Z1():z1()});/** +var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-CCX76aau.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جست‌وجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",A1=()=>"문서에서 찾기",x1=()=>"文書内を検索",S1=()=>"Znajdź w dokumencie",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():t==="ko"?A1():t==="ja"?x1():t==="pl"?S1():m1()}),T1=()=>"Fit to width",C1=()=>"适应宽度",P1=()=>"متناسب با عرض",I1=()=>"ملاءمة العرض",R1=()=>"Ajustar al ancho",O1=()=>"चौड़ाई में फ़िट करें",M1=()=>"너비에 맞추기",D1=()=>"幅に合わせる",L1=()=>"Dopasuj do szerokości",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?C1():t==="fa"?P1():t==="ar"?I1():t==="es"?R1():t==="hi"?O1():t==="ko"?M1():t==="ja"?D1():t==="pl"?L1():T1()}),N1=()=>"Next match",F1=()=>"下一个匹配项",k1=()=>"مورد بعدی",B1=()=>"التطابق التالي",j1=()=>"Coincidencia siguiente",U1=()=>"अगला मिलान",$1=()=>"다음 일치 항목",H1=()=>"次の一致",V1=()=>"Następne dopasowanie",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?F1():t==="fa"?k1():t==="ar"?B1():t==="es"?j1():t==="hi"?U1():t==="ko"?$1():t==="ja"?H1():t==="pl"?V1():N1()}),z1=()=>"Previous match",W1=()=>"上一个匹配项",G1=()=>"مورد قبلی",_1=()=>"التطابق السابق",X1=()=>"Coincidencia anterior",Y1=()=>"पिछला मिलान",K1=()=>"이전 일치 항목",J1=()=>"前の一致",Z1=()=>"Poprzednie dopasowanie",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?W1():t==="fa"?G1():t==="ar"?_1():t==="es"?X1():t==="hi"?Y1():t==="ko"?K1():t==="ja"?J1():t==="pl"?Z1():z1()});/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. diff --git a/ui/dist/assets/index-BitFqV0I.js b/ui/dist/assets/index-CCX76aau.js similarity index 98% rename from ui/dist/assets/index-BitFqV0I.js rename to ui/dist/assets/index-CCX76aau.js index 590b1f1e6..4884b8c08 100644 --- a/ui/dist/assets/index-BitFqV0I.js +++ b/ui/dist/assets/index-CCX76aau.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-CVq8sN63.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-DZQw7Tpb.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); var hY=Object.defineProperty;var g9=e=>{throw TypeError(e)};var pY=(e,n,t)=>n in e?hY(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var yo=(e,n,t)=>pY(e,typeof n!="symbol"?n+"":n,t),jk=(e,n,t)=>n.has(e)||g9("Cannot "+t);var ue=(e,n,t)=>(jk(e,n,"read from private field"),t?t.call(e):n.get(e)),ft=(e,n,t)=>n.has(e)?g9("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ge=(e,n,t,r)=>(jk(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Kt=(e,n,t)=>(jk(e,n,"access private method"),t);var Wm=(e,n,t,r)=>({set _(s){Ge(e,n,s,t)},get _(){return ue(e,n,r)}});function mY(e,n){for(var t=0;tr[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=t(s);fetch(s.href,o)}})();function B0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ck={exports:{}},Km={};/** * @license React * react-jsx-runtime.production.js @@ -1200,11 +1200,11 @@ ${n.trim()} `)}function OK(e){const n=e==null?void 0:e.replace(/[)'\"]+$/,"");return!n||n==="-"||/^\d+$/.test(n)||/[$`]/.test(n)||aKr(n)?null:n}function DK(e){const n=OK(e);if(!n)return null;const t=Lf(n);return n.includes("/")||n.startsWith(".")||/\.[A-Za-z0-9][A-Za-z0-9_-]*$/.test(t)||/^(?:Dockerfile|Makefile|README|LICENSE|NOTICE|CHANGELOG)$/i.test(t)?n:null}function LK(e){var s,o;const n=dv(e);let t=0;for(;["do","then","else","if","while","until"].includes(n[t]);)t++;for(;/^[A-Za-z_][A-Za-z0-9_]*=/.test(n[t]??"");)t++;if(n[t]==="command")for(t++;(s=n[t])!=null&&s.startsWith("-");)t++;if(n[t]==="env")for(t++;(o=n[t])!=null&&o.startsWith("-")||/^[A-Za-z_][A-Za-z0-9_]*=/.test(n[t]??"");)t++;const r=n[t];return r?{name:r.split("/").pop()??r,args:n.slice(t+1)}:null}function xts(e){const{name:n,args:t}=e;if(n==="sed"){let s=0,o=!1;for(;s!o.startsWith("-")&&o.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&DK(s)?{ref:r,path:s}:null}function kts(e){const n=e.match(/\b(?:rg|grep)\b(?:\s+-[^\s]+)*\s+(?:"([^"]+)"|'([^']+)'|([^\s]+))/);return(n==null?void 0:n[1])??(n==null?void 0:n[2])??(n==null?void 0:n[3])??null}function PD(e,n){if(/[$`~]/.test(e)||/[$`~]/.test(n))return null;const t=n.startsWith("/")||!n.startsWith("/")&&e.startsWith("/"),r=n.startsWith("/")?[]:e.split("/").filter(Boolean);for(const o of n.split("/"))if(!(!o||o===".")){if(o===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(o);continue}r.push(o)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function Sts(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let o=0;o!l.startsWith("-"));if(!i)return null;const c=PD(s,i);if(!c)return null;s=c}return s?PD(s,e):e}const Dc="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",jts=new RegExp(`\\bchat_(${Dc})\\b`,"gi"),ad=`(?:${Dc}|[0-9a-f]{8})`;function cp(e){const n=[];let t="",r="",s=null,o=!1;const a=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},i=l=>{let d=1,_=null,p=!1;for(let m=l;m{let d=!1;for(let _=l;_lKr(t.raw,n))}function ki(e,n){return Bw(e,n).length>0}function Cts(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,TK).matchAll(jts))if(n.add(t[0].toLowerCase()),n.size>=W_)break;return[...n]}function kj(e,n){if(!e)return[];const t=new Set,r=e.slice(0,TK),s=n==="runs"?[new RegExp(`/runs/(${Dc})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${Dc})`,"gi"),new RegExp(`^\\s*RUN\\s+(${Dc})\\b`,"gim"),new RegExp(`={3,}\\s*(${Dc})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${Dc})`,"gi"),new RegExp(`^\\s*id:\\s*(${Dc})`,"gim"),new RegExp(`={3,}\\s*(${Dc})\\s*={3,}`,"gi")];for(const a of s)for(const i of r.matchAll(a))if(t.add(i[1]),t.size>=W_)return[...t];const o=new RegExp(`^\\s*(${Dc})(?:\\s|$)`,"gim");for(const a of r.matchAll(o))if(t.add(a[1]),t.size>=W_)break;return[...t]}function $K(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),o=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,o+r.raw.length),{invocation:r,offset:Math.max(0,o)}})}function IK(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let o="";for(const a of e.matchAll(s)){if((a.index??0)>=t)break;o=a[1]??a[2]??a[3]??""}return[...o.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function PK(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let o="";for(const a of e.matchAll(s)){const i=a.index??0;if(i>=t)break;const c=i+a[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(o=a[1])}return/\$\(|`/.test(o)?[]:[...o.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function zts(e,n,t=[],r=[]){const s=Bw(e,"logs"),o=new Set;if(s.length===0){if(!ki(e,"logs"))return[];const i=t.length>0?[]:kj(n,"runs");for(const c of t.length>0?t:i.length>0?i:r)if(o.add(c),o.size>=W_)break;return ip([...o])}let a=!1;for(const{invocation:i,offset:c}of $K(e,s)){const l=l0(i.raw);if((l==null?void 0:l[0])!=="logs")continue;const d=l.slice(1);let _=null;for(let g=0;g0?[]:kj(n,"runs"),c=t.length>0?t:i.length>0?i:r;for(const l of c)if(o.add(l),o.size>=W_)break}return ip([...o])}function Lh(e,n,t=[],r=[]){const s=Bw(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const o=new Set;let a=!1;for(const{invocation:i,offset:c}of $K(e,s)){const l=l0(i.raw),d=(l==null?void 0:l[0])==="exp"&&(l[1]==="status"||l[1]==="desc")?l[2]:null;let _=!1;d&&new RegExp(`^${ad}$`,"i").test(d)&&(o.add(d),_=!0);const p=d?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(d):null;if(p){const m=p[1],w=IK(e,m,c,ad);if(w.length>0){for(const g of w)o.add(g);_=!0}const y=PK(e,m,c,ad);for(const g of y)o.add(g);y.length>0&&(_=!0)}_||(a=!0)}if(o.size===0||a){const i=t.length>0?[]:kj(n,"experiments"),c=t.length>0?t:i.length>0?i:r;for(const l of c)if(o.add(l),o.size>=W_)break}return ip([...o])}const BD=new WeakMap;function Cd(e){const n=N(),t=BD.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=Ets(e);return BD.set(e,{locale:n,activity:r}),r}function Ets(e){var b,k,x,j,z,E;const n=e.tool??"tool",t=((b=e.state)==null?void 0:b.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},o={...t,...s},a=So(o,"command","cmd"),i=mts(o,"commandArgv"),c=((k=e.state)==null?void 0:k.output)||((x=e.state)==null?void 0:x.error),l=ip(k3(o,"targetIds")),d=ip(k3(o,"runTargetIds")),_=ip(k3(o,"experimentTargetIds")),p=So(o,"filePath","file_path","notebookPath","notebook_path","path"),m=So(o,"description"),w=n.toLowerCase().split(/(?::|\.|__)+/),y=w.at(-1)??n.toLowerCase();if(y==="run"&&w.includes("web")){const T=w3(o,"search_query","q"),A=w3(o,"image_query","q"),R=w3(o,"find","pattern");return T?{kind:"web",label:SN({query:T})}:A?{kind:"web",label:wpe({query:A})}:R?{kind:"web",label:Cme({pattern:R})}:Array.isArray(o.open)?{kind:"web",label:NDe()}:Array.isArray(o.weather)?{kind:"web",label:OAe()}:Array.isArray(o.finance)?{kind:"web",label:hAe()}:Array.isArray(o.sports)?{kind:"web",label:SAe()}:Array.isArray(o.time)?{kind:"web",label:sAe()}:{kind:"web",label:PN()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["compacted","contextcompaction"],["imported","importedchat"],["subagentactivity","subagent"]]).get(y)??y){case"bash":{if(!a&&!(i!=null&&i.length))return{kind:"command",label:ULe()};const T=vts(a??(i==null?void 0:i.join(" "))??""),A=cp(T);let R=A.map(W=>W.raw);if(i!=null&&i.length){const W=cO(i);R=W===null?[i]:cp(MK(W)).map(ae=>ae.raw)}let D=null;for(const W of R)if(D=uKr(W),D)break;const L=R.some(W=>{const ae=l0(W);return ae!==null&&ae[0]!=="discover"&&ae[0]!=="paper"});if(D&&!L){const W=D.kind==="discover"&&!D.query?_Kr(i?cO(i)??T:T,c??"",D.strategy):[],ae=D.kind==="discover"?{keyword:Ehe(),embedding:Ihe(),openalex:Ype(),biorxiv:Vhe(),pubmed:ime()}[D.strategy]:null,le=D.kind==="discover"?D.query?kN({activity:ae??k1(),query:D.query}):W.length===1?kN({activity:ae??k1(),query:W[0]}):W.length>1?Rle({activity:ae??k1(),count:fn(W.length)}):ae??k1():D.id?Ym({target:Ee(D.id)}):J_e();return{kind:D.kind==="paper"?"read":"search",label:le,litCall:D,queries:W}}if(ki(T,"agent\\s+spawn"))return{kind:"agent",label:$Te(),spawnedSessionIds:Cts(c),litCall:D??void 0};const P=A.map(W=>LK(W.raw)),q=ki(T,"exp\\s+status"),B=ki(T,"exp\\s+desc"),X=Bw(T,"exp\\s+desc").some(W=>(l0(W.raw)??[]).some(le=>le==="--set"||le.startsWith("--set=")||le==="--stdin")),K=X?Hge():q_e(),Z=X?wie():Mde();if(ki(T,"logs")){const W=zts(T,c,d,l);return{kind:"project",label:W.length===1?dde():kde(),runIds:W,litCall:D??void 0}}if(ki(T,"exp\\s+run"))return{kind:"project",label:yBe(),litCall:D??void 0};if(ki(T,"exp\\s+wait"))return{kind:"project",label:jqe(),litCall:D??void 0};if(ki(T,"exp\\s+cancel"))return{kind:"project",label:lNe(),litCall:D??void 0};const ee=ki(T,"project\\s+view");if(ee&&q&&B)return{kind:"project",label:Z,experimentIds:Lh(T,c,_,l),litCall:D??void 0};if(ee&&B)return{kind:"project",label:K,experimentIds:Lh(T,c,_,l),litCall:D??void 0};if(ee&&q)return{kind:"project",label:BN(),experimentIds:Lh(T,c,_,l),litCall:D??void 0};if(ee)return{kind:"project",label:A$e(),litCall:D??void 0};if(q&&B)return{kind:"project",label:Z,experimentIds:Lh(T,c,_,l),litCall:D??void 0};if(q)return{kind:"project",label:BN(),experimentIds:Lh(T,c,_,l),litCall:D??void 0};if(B)return{kind:"project",label:K,experimentIds:Lh(T,c,_,l),litCall:D??void 0};if(ki(T,"runs?"))return{kind:"project",label:COe(),litCall:D??void 0};if(ki(T,"projects"))return{kind:"project",label:LOe(),litCall:D??void 0};if(ki(T,"compute"))return{kind:"project",label:NNe(),litCall:D??void 0};const I=P.map(wts).find(W=>W!=null);if(I){const W=x3(I.path);return{kind:W?"skill":"read",label:W?Fk({name:Ee(W)}):Ym({target:Ee(Lf(I.path))}),filePath:I.path,fileRef:I.ref,labelTarget:W?`${W} skill`:Lf(I.path)}}const $=P.findIndex(W=>W!=null&&["sed","cat","head","tail"].includes(W.name)),F=$>=0?P[$]:null,U=F?xts(F):null,G=U?Sts(U,A,$,So(o,"cwd","workdir")):null;if(U&&G){const W=x3(G);return{kind:W?"skill":"read",label:W?Fk({name:Ee(W)}):Ym({target:Ee(Lf(U))}),filePath:G,labelTarget:W?`${W} skill`:Lf(U)}}if(P.some(W=>(W==null?void 0:W.name)==="find"||(W==null?void 0:W.name)==="ls"||(W==null?void 0:W.name)==="rg"&&W.args.includes("--files")))return{kind:"search",label:XN()};const oe=P.findIndex(W=>(W==null?void 0:W.name)==="rg"||(W==null?void 0:W.name)==="grep");if(oe>=0){const W=kts(A[oe].raw);return{kind:"search",label:W?qk({pattern:Ee(W)}):Hk(),searchPattern:W??void 0}}const ie=P.find(W=>(W==null?void 0:W.name)==="git"),ce=ie==null?void 0:ie.args[0];if(ce==="grep"){const W=ie==null?void 0:ie.args.slice(1).find(ae=>!ae.startsWith("-"));return{kind:"search",label:W?qk({pattern:Ee(W)}):Hk(),searchPattern:W}}if(ce==="status")return{kind:"command",label:VNe()};if(ce==="diff")return{kind:"command",label:ZIe()};if(ce==="log")return{kind:"command",label:y$e()};const ne=W=>P.some(ae=>!ae||!["cargo","pnpm","npm","yarn"].includes(ae.name)?!1:ae.args[0]===W||ae.args[0]==="run"&&ae.args[1]===W);return ne("test")?{kind:"command",label:e$e()}:P.some(W=>(W==null?void 0:W.name)==="tsc")||ne("typecheck")?{kind:"command",label:UAe()}:ne("lint")?{kind:"command",label:bNe()}:ne("build")?{kind:"command",label:q9e()}:{kind:"command",label:d_e({command:Ee(T)})}}case"skill":{const T=So(o,"skill","name"),A=T?pts(n,T):null;return{kind:"skill",label:T?$ue({name:Ee(T)}):zue(),filePath:A??void 0,labelTarget:A&&T?`${T} skill`:void 0}}case"read":{const T=p?Lf(p):null,A=p?x3(p):null;return A?{kind:"skill",label:Fk({name:Ee(A)}),filePath:p??void 0,labelTarget:`${A} skill`}:T?{kind:"read",label:Ym({target:Ee(T)}),filePath:p??void 0,labelTarget:T}:{kind:"read",label:u$e()}}case"edit":case"write":case"notebookedit":{const T=gts(o),A=p??(T==null?void 0:T.path)??null,R=A?Lf(A):null,D=R?(T==null?void 0:T.type)==="add"?gce({target:Ee(R)}):(T==null?void 0:T.type)==="delete"?Kce({target:Ee(R)}):fle({target:Ee(R)}):null;return R?{kind:"edit",label:D??GN(),filePath:A??void 0,labelTarget:R}:{kind:"edit",label:GN()}}case"grep":{const T=So(o,"pattern");return{kind:"search",label:T?qk({pattern:Ee(T)}):Hk(),searchPattern:T??void 0}}case"glob":{const T=So(o,"pattern");return{kind:"search",label:T?iue({pattern:Ee(T)}):XN()}}case"websearch":{const T=So(o,"query"),A=So(o,"url"),R=So(o,"pattern");return T?{kind:"web",label:SN({query:T})}:R&&A?{kind:"web",label:Fpe({pattern:R})}:A?{kind:"web",label:r_e({target:Ee(A)})}:{kind:"web",label:m??PN()}}case"webfetch":{const T=So(o,"url");return{kind:"web",label:T?Ym({target:Ee(T)}):m??zfe()}}case"task":return{kind:"agent",label:m??k_e()};case"subagent":return{kind:"agent",label:Nts(o)};case"error":return{kind:"command",label:QHe()};case"importedchat":return{kind:"project",label:Yle()};case"contextcompaction":return{kind:"command",label:((j=e.state)==null?void 0:j.status)==="error"?ice():((z=e.state)==null?void 0:z.status)==="running"?wN():Hie(),progressLabel:wN()};default:{const T=m??p??a??((E=e.state)==null?void 0:E.title)??"";return{kind:"command",label:T?`${n}: ${T}`:n}}}}function Nts(e){const n=typeof e.nickname=="string"&&e.nickname?e.nickname.replace(/[_-]+/g," "):"",t=n&&n.charAt(0).toUpperCase()+n.slice(1);if(t)return t;switch(typeof e.tool=="string"?e.tool:""){case"spawnAgent":return nge();case"sendInput":return Wme();case"resumeAgent":return Kfe();case"wait":return Zge();case"closeAgent":return Rie()}switch(typeof e.kind=="string"?e.kind:""){case"started":return Rge();case"interacted":return Wae();case"interrupted":return wge()}return fge()}function tx({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=f.jsx(Fd,{...t});if(e.litCall)r=f.jsx(yG,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=f.jsx(jH,{...t});break;case"read":case"project":r=f.jsx(CH,{...t});break;case"search":r=f.jsx($H,{...t});break;case"edit":r=f.jsx(Fx,{...t});break;case"web":r=f.jsx(SDr,{...t});break;case"agent":r=f.jsx(PH,{...t});break}return f.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function S3({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,o]=C.useState(!1),a=C.useRef(null),i=C.useRef(!1);return C.useEffect(()=>{var c,l;!s||!i.current||(i.current=!1,(l=(c=a.current)==null?void 0:c.querySelector("button"))==null||l.focus())},[s]),f.jsxs("span",{className:"tool-target-overflow inline",children:[s&&f.jsx("span",{className:"tool-target-reveal",ref:a,children:e.map((c,l)=>f.jsxs("span",{children:[l>0&&", ",n||t?f.jsx("button",{className:"tool-target",...n?rs(d=>n(c.id,d),{stopPropagation:!0}):{onClick:d=>{d.stopPropagation(),t==null||t(c.id)}},children:c.label}):f.jsx("span",{children:c.label})]},c.id))}),s&&", ",f.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?Gne({target:r}):mae({count:fn(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),i.current=!s&&c.detail===0,o(l=>!l)},children:s?y6():JZe({count:fn(e.length)})})]})}function Sj({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:o,experimentName:a}){var i,c,l,d;if(e.searchPattern)return e.label;if(((i=e.litCall)==null?void 0:i.kind)==="paper"&&e.litCall.id)return f.jsxs("a",{className:"tool-target",href:vKr(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,f.jsx(COr,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const _=e.filePath;return f.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...rs(p=>n(_,void 0,void 0,e.fileRef,p),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const _=e.spawnedSessionIds,p=_.slice(0,3),m=_.slice(p.length).map((w,y)=>({id:w,label:RN({number:fn(p.length+y+1)})}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((w,y)=>f.jsxs("span",{children:[y>0&&", ",f.jsx("button",{className:"tool-target",title:bDe(),onClick:g=>{g.preventDefault(),g.stopPropagation(),r(w)},children:RN({number:fn(y+1)})})]},w)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(S3,{items:m,onSelect:r,targetType:Z3e()})]})]})}if((l=e.runIds)!=null&&l.length){const _=s?e.runIds.filter(w=>!!s(w)):e.runIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(w=>({id:w,label:(s==null?void 0:s(w))||Yl()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((w,y)=>f.jsxs("span",{children:[y>0&&", ",t?f.jsx("button",{className:"tool-target",title:ase({run:Ee(w)}),...rs(g=>t(w,g),{stopPropagation:!0}),children:(s==null?void 0:s(w))||Yl()}):f.jsx("span",{children:(s==null?void 0:s(w))||Yl()})]},w)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(S3,{items:m,onOpen:t,targetType:NWe()})]})]})}if((d=e.experimentIds)!=null&&d.length){const _=a?e.experimentIds.filter(w=>!!a(w)):e.experimentIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(w=>({id:w,label:(a==null?void 0:a(w))||Yl()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((w,y)=>f.jsxs("span",{children:[y>0&&", ",o?f.jsx("button",{className:"tool-target",title:Bre({name:(a==null?void 0:a(w))||Ee(w)}),...rs(g=>o(w,g),{stopPropagation:!0}),children:(a==null?void 0:a(w))||Yl()}):f.jsx("span",{children:(a==null?void 0:a(w))||Yl()})]},w)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(S3,{items:m,onOpen:o,targetType:q6e()})]})]})}return e.label}function tz(e){const n=e.progressLabel??{skill:Kue(),read:$fe(),search:Lme(),edit:wle(),project:qde(),web:fie(),agent:$ce(),command:OI()}[e.kind];return{...e,label:n}}function BK(e,n){const t=Cd({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:gue(),read:M_e(),search:vhe(),edit:MI(),project:rde(),web:nie(),agent:zce(),command:Jde()}[t.kind]}function Ats(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const Tts=250;function Rts(e,n){const[t,r]=C.useState(e),s=C.useRef(Date.now()),o=C.useRef(e);return C.useEffect(()=>{if(o.current=e,(e==null?void 0:e.label)===(t==null?void 0:t.label)||n&&e!=null&&t!=null)return;if(e==null||t==null){s.current=Date.now(),r(e);return}const a=Tts-(Date.now()-s.current);if(a<=0){s.current=Date.now(),r(e);return}const i=window.setTimeout(()=>{s.current=Date.now(),r(o.current)},a);return()=>window.clearTimeout(i)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const Mts=160;function FK(e){const[n,t]=C.useState(!1);return C.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),Mts);return()=>window.clearTimeout(r)},[e]),e&&n}function Ots(e){const n=["skill","read","search","edit","project","web","command","agent"];for(const t of n){const r=e.find(s=>s.kind===t);if(r)return r}return e[0]??{kind:"command",label:HI()}}function Dts(e,n){var t,r;return((t=e.state)==null?void 0:t.status)!=="completed"?null:JSON.stringify([n.kind,n.label,n.filePath??null,n.fileRef??null,((r=n.litCall)==null?void 0:r.kind)==="paper"?n.litCall.id??null:null,n.runIds??null,n.experimentIds??null,n.spawnedSessionIds??null,n.queries??null])}function Lts(e){const n=[];let t=null;for(const r of e){const s=Cd(r),o=Dts(r,s),a=n[n.length-1];o&&a&&t===o?a.count++:n.push({part:r,activity:s,count:1}),t=o}return n}function HK({part:e,busy:n,recovering:t,onRecover:r,usageLimited:s=!1}){var w,y;const o=(w=e.state)==null?void 0:w.input,a=(o==null?void 0:o.nextRetryAt)??null,[i,c]=C.useState(Date.now());if(C.useEffect(()=>{if(typeof a!="number"||(c(Date.now()),a<=Date.now()))return;const g=window.setInterval(()=>{const b=Date.now();c(b),b>=a&&window.clearInterval(g)},1e3);return()=>window.clearInterval(g)},[a]),e.id==="turn-retry"){const g=nKr(o??{},i);return f.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[f.jsx(Nt,{}),f.jsx("span",{children:g})]})}const l=gG(o==null?void 0:o.recoveryAction),d=o==null?void 0:o.turnId,_=mG(e)?eze():s?rKe():uA(),p=s?vDr:uC,m=Pw(((y=e.state)==null?void 0:y.error)||uA());return f.jsxs("details",{className:"turn-usage-limit group/limit text-base text-subtext",children:[f.jsxs("summary",{className:"flex w-fit max-w-full items-center gap-2 cursor-pointer list-none rounded-sm focus-visible:outline-2 focus-visible:outline-text [&::-webkit-details-marker]:hidden",children:[f.jsx(p,{size:18,className:"shrink-0 text-accent-red","aria-hidden":"true"}),f.jsx("span",{children:_}),f.jsx(ei,{size:16,className:"shrink-0 text-text transition-transform duration-120 ease-standard group-open/limit:rotate-90 motion-reduce:transition-none","aria-hidden":"true"})]}),f.jsx("pre",{className:"mt-2 rounded-md bg-surface p-2 text-sm font-mono whitespace-pre-wrap wrap-anywhere",children:m}),!s&&r&&d&&(l==="retry"||l==="continue")&&f.jsx(Oe,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(d,l),children:t?MKe():l==="retry"?Xs():Ije()})]})}function FD({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:o,runExperimentName:a,onOpenExperiment:i,experimentName:c}){const l=e.state,d=(l==null?void 0:l.status)==="error",_=Pw((l==null?void 0:l.error)||(l==null?void 0:l.output)||""),p=d&&!!_,[m,w]=C.useState(!1),y=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return f.jsx(HK,{part:e,busy:!1,recovering:!1,usageLimited:qS(e)});const g=f.jsxs(f.Fragment,{children:[d&&f.jsxs("span",{className:"sr-only",children:[m6()," "]}),d?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(EH,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):f.jsx(tx,{activity:n,className:"text-muted"}),f.jsxs("span",{className:`${NK} ${d?"text-accent-red":"text-subtext"}`,children:[f.jsx(Sj,{activity:n,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:o,runExperimentName:a,onOpenExperiment:i,experimentName:c}),t>1&&f.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:_re({count:fn(t)}),children:["×",t]})]})]});return p?f.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[f.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[g,f.jsx("button",{type:"button",className:"tool-row-detail-toggle inline-flex h-6 shrink-0 items-center justify-center p-0.5 rounded-sm cursor-pointer hover:bg-surface","aria-expanded":m,"aria-controls":y,"aria-label":m?tre({activity:n.label}):aae({activity:n.label}),onClick:()=>w(b=>!b),children:f.jsx(ei,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${m?"rotate-90":""}`})})]}),m&&f.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:y,children:f.jsx("div",{className:J7,children:_.slice(0,2e4)})})]}):f.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:g})}function $ts({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:o,onOpenExperiment:a,experimentName:i}){var A,R,D,L;const[c,l]=C.useState(!1),[d,_]=C.useState(!1),p=()=>{_(!0),l(P=>!P)},m=Lts(e),w=m.map(({activity:P})=>P),y=n?m.at(-1):void 0,g=y==null?void 0:y.part,b=y==null?void 0:y.activity,k=((A=g==null?void 0:g.state)==null?void 0:A.status)!=="error"?(b&&tz(b))??null:null,x=!!g&&((R=g.state)==null?void 0:R.status)==="running"&&!(k!=null&&k.progressLabel)&&(Ats((D=g.state)==null?void 0:D.input)||(k==null?void 0:k.kind)==="command"&&!So(((L=g.state)==null?void 0:L.input)??{},"command","cmd")),j=Rts(k,x),z=FK(j!=null),E=j??Ots(w),T=j?j.label:HI();return e.length===1?j?f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[f.jsx(tx,{activity:j,className:z?"tool-running-shimmer-icon":"text-muted"}),f.jsx("span",{className:`${z?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:T,children:f.jsx(Sj,{activity:j,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:o,onOpenExperiment:a,experimentName:i})})]})}):f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsx(FD,{part:e[0],activity:m[0].activity,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:o,onOpenExperiment:a,experimentName:i})}):f.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[f.jsxs("div",{className:"tool-group-summary flex items-start gap-2 w-fit max-w-full py-[3px] px-1 text-base leading-6 text-subtext text-start",children:[f.jsx(tx,{activity:E,className:z?"tool-running-shimmer-icon":"text-muted"}),j?f.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${z?"tool-running-shimmer":""}`,title:T,children:f.jsx(Sj,{activity:j,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:o,onOpenExperiment:a,experimentName:i})}):f.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:p,"aria-expanded":c,children:T}),f.jsx("button",{type:"button",className:"tool-group-chevron-button inline-flex h-6 shrink-0 items-center justify-center p-px cursor-pointer rounded-sm",onClick:p,"aria-expanded":c,"aria-label":c?cje():M6e(),children:f.jsx(ei,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${c?"open":""}`})})]}),f.jsx("div",{className:`tool-group-disclosure ${c?"open":""}`,"aria-hidden":!c,inert:!c,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:d&&m.map(({part:P,count:q,activity:B})=>f.jsx(FD,{part:P,repeatCount:q,activity:B,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:o,onOpenExperiment:a,experimentName:i},P.id))})})})]})}function Its({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var d;const s=e.prompt,[o,a]=C.useState([]),i=!n,c=_=>n==null?void 0:n({promptId:e.id,..._});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const m=s.approved===!0?{label:XDe(),icon:fo,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:jLe(),icon:Fx,iconClass:"text-accent-amber"}:s.approved===!1?{label:oLe(),icon:mr,iconClass:"text-accent-red"}:{label:pLe(),icon:Px,iconClass:"text-muted"},w=m.icon;return f.jsxs("details",{className:dts,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?UI():iA()}),f.jsx(w,{size:17,strokeWidth:1.8,className:`shrink-0 ${m.iconClass}`}),f.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:m.label}),f.jsx(ei,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),f.jsxs("div",{className:`${LD} ms-6`,children:[f.jsx(rl,{text:s.plan??"",onOpenFile:t}),s.note&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const _=(s.answers??[]).join(", ")||s.note||"",p=(s.annotations??[]).map((m,w)=>({id:`${e.id}-annotation-${w}`,text:m.text}));return f.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[p.length>0&&f.jsx(ez,{annotations:p,variant:"sent"}),f.jsxs("details",{className:fts,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||VUe()}),f.jsx("span",{className:`prompt-outcome font-[375] text-subtext wrap-anywhere [&.approved]:text-accent-green [&.chosen]:text-accent-green [&.approved::before]:content-['✓_'] [&.chosen::before]:content-['✓_'] [&.revised]:text-accent-amber [&.rejected]:text-accent-amber ${_?"chosen":""}`,children:_||lWe()})]}),f.jsxs("div",{className:LD,children:[s.header&&s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&f.jsx("ul",{className:"prompt-collapsed-options mt-1.5 mx-0 mb-0 ps-4.5 [&_.sel]:text-text [&_.sel]:font-medium",children:(s.options??[]).map(m=>{var w;return f.jsx("li",{className:(w=s.answers)!=null&&w.includes(m.label)?"sel":"",children:m.label},m.label)})}),s.note&&s.note!==_&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const _=!!r;return f.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-accent-blue-subtle flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 plan ${i?"readonly":""}`,children:[f.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?NUe():iA()}),f.jsx("div",{className:`prompt-plan text-base leading-[1.6] text-text max-h-85 overflow-y-auto [&.clamped]:max-h-[9.5em] [&.clamped]:overflow-hidden [&.clamped]:relative [&.clamped::after]:content-[''] [&.clamped::after]:absolute [&.clamped::after]:inset-x-0 [&.clamped::after]:bottom-0 [&.clamped::after]:top-auto [&.clamped::after]:h-8.5 [&.clamped::after]:bg-[linear-gradient(to_bottom,_transparent,_var(--accent-blue-subtle))] [&.clamped::after]:pointer-events-none ${_?"clamped":""}`,children:f.jsx(rl,{text:s.plan??"",onOpenFile:t})}),_&&f.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...rs(p=>r(s.plan??"",e.id,p)),children:pqe()}),!i&&!_&&f.jsxs("div",{className:wj,children:[f.jsx(Oe,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:G8e()}),f.jsx(Oe,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:tEe()}),f.jsx(Oe,{size:"small",onClick:()=>c({approve:!1}),children:B$e()})]})]})}if(s.kind==="permission"){const _=s.toolInput??{},p=So(_,"command","cmd","filePath","file_path","path")||"",m=typeof((d=s.toolInput)==null?void 0:d.reason)=="string"&&s.toolInput.reason||"",w=So(_,"description")||"",y=m||w||BK(s.tool,_),g=`permission-heading-${e.id}`;return f.jsxs("div",{className:`prompt-card permission my-3 w-full max-w-2xl overflow-hidden rounded-md border border-border bg-background shadow-hairline [&.readonly]:opacity-60 ${i?"readonly":""}`,role:"group","aria-labelledby":g,children:[f.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[f.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:f.jsx(uC,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),f.jsx("span",{id:g,className:"text-base font-semibold text-text",children:FEe()})]}),f.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[f.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:y}),p&&f.jsx("code",{className:"prompt-command block max-h-36 overflow-auto whitespace-pre-wrap wrap-anywhere rounded-md border border-border-variant bg-surface px-3 py-2 font-mono text-sm leading-relaxed text-text",children:p}),!i&&f.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[f.jsx(Oe,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:fRe()}),f.jsx(Oe,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:TEe()})]})]})]})}const l=_=>a(p=>s.multiSelect?p.includes(_)?p.filter(m=>m!==_):[...p,_]:[_]);return f.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-accent-purple-subtle flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 question ${i?"readonly":""}`,children:[s.header&&f.jsx("div",{className:hts,children:s.header}),s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),f.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(_=>{const p=o.includes(_.label);return f.jsxs("button",{className:`prompt-option flex flex-col items-start gap-0.5 w-full py-2 px-[11px] text-start border border-border rounded-sm bg-background text-text cursor-pointer transition-[border-color,background] duration-80 ease-standard [&:hover:not(:disabled)]:border-border-strong [&:hover:not(:disabled)]:bg-surface [&.sel]:border-primary [&.sel]:bg-primary-subtle [&:disabled]:cursor-default ${p?"sel":""}`,disabled:i,onClick:()=>i?void 0:s.multiSelect?l(_.label):c({answers:[_.label]}),children:[f.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:_.label}),_.description&&f.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:_.description})]},_.label)})}),s.multiSelect&&!i&&f.jsx("div",{className:wj,children:f.jsx(Oe,{size:"small",variant:"primary",disabled:o.length===0,onClick:()=>c({answers:o}),children:BHe()})})]})}function Pts(e,n){return e.role==="user"?!0:e.parts.some(t=>$p(t,n))}function Bts(e){const n=e.text??"",t=n.startsWith("data:")?n:aEr(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",o=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:o,name:s}}async function nz(e){try{if(!navigator.clipboard)throw new Error(XI());await navigator.clipboard.writeText(e),tn(ud(),"success")}catch(n){tn(n instanceof Error?n.message:String(n),"error")}}function Fts(e,n){const t=URL.createObjectURL(new Blob([n],{type:"text/markdown;charset=utf-8"})),r=document.createElement("a");r.href=t,r.download=e,document.body.append(r),r.click(),r.remove(),window.setTimeout(()=>URL.revokeObjectURL(t),1e3)}function Hts({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:o,onSelect:a,pagerDisabled:i,onEdit:c,editDisabled:l}){const d=t>1,_=new Date(n),p=()=>nz(e);return f.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${d?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[d&&f.jsxs(f.Fragment,{children:[f.jsx(Rt,{size:"small",title:ZN(),"aria-label":ZN(),disabled:i||!s,onClick:()=>s&&a(s),children:f.jsx(sC,{size:14})}),f.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),f.jsx(Rt,{size:"small",title:YN(),"aria-label":YN(),disabled:i||!o,onClick:()=>o&&a(o),children:f.jsx(ei,{size:14})})]}),f.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100 transition-opacity duration-80 ease-standard",children:[f.jsx("time",{dateTime:_.toISOString(),className:"text-xs text-subtext tabular-nums me-2",children:_.toLocaleTimeString(N(),{hour:"numeric",minute:"2-digit"})}),f.jsx(Rt,{size:"small","aria-label":k6(),disabled:!e,onClick:p,children:f.jsx(Pd,{size:13})})]}),f.jsx(Rt,{size:"small",title:UN(),"aria-label":UN(),disabled:l,onClick:c,children:f.jsx(Fx,{size:13})})]})}const qts=C.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:o,onOpenSpawnedSession:a,runExperimentName:i,onOpenExperiment:c,experimentName:l,onRespond:d,onOpenPlan:_,onOpenSubagent:p,busy:m=!1,recoveringTurnId:w,onRecover:y,skills:g,predictTextTail:b=!1,forkCount:k,forkIndex:x=0,forkPrevId:j,forkNextId:z,forkDisabled:E,branchDisabled:T,onFork:A,onSelectFork:R}){var Z,ee;wu();const[D,L]=C.useState(null),P=Gts(n);if(P)return f.jsx(Wts,{part:P});if(n.role==="user"){const I=n.parts.filter(ie=>ie.type==="text").map(ie=>ie.text??"").join(` `),$=ie=>!!(g!=null&&g.some(ce=>ce.name===Y7(ie))),F=n.parts.filter(ie=>ie.type==="image"&&ie.text).map(Bts),U=F.filter(ie=>!ie.isPdf),G=F.filter(ie=>ie.isPdf),oe=n.parts.filter(ie=>ie.type==="annotation"&&ie.text).map(ie=>({id:ie.id,text:ie.text??""}));if(D!==null){const ie=()=>{const ce=D.trim();!ce||E||(L(null),A(n.id,ce))};return f.jsx("div",{className:"msg-user-group ms-auto self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:f.jsxs("div",{className:"msg-user-edit w-full bg-panel rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[f.jsx("textarea",{dir:"auto",className:"w-full bg-transparent text-base text-text resize-none outline-none field-sizing-content min-h-16","aria-label":BRe(),value:D,autoFocus:!0,onChange:ce=>L(ce.target.value),onKeyDown:ce=>{if(ce.nativeEvent.isComposing||ce.nativeEvent.keyCode===229){ce.stopPropagation();return}ce.key==="Escape"?(ce.preventDefault(),L(null)):ce.key==="Enter"&&!ce.shiftKey&&(ce.preventDefault(),ie())}}),f.jsxs("div",{className:`${wj} justify-end`,children:[f.jsx(Oe,{size:"small",onClick:()=>L(null),children:J9e()}),f.jsx(Oe,{size:"small",variant:"primary",onClick:ie,disabled:E||!D.trim(),children:b5()})]})]})})}return f.jsxs("div",{className:"msg-user-group group/turn ms-auto self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[oe.length>0&&f.jsx(ez,{annotations:oe,variant:"sent"}),f.jsxs("div",{dir:"auto",className:"msg-user max-w-full bg-panel rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere [&_.skill-chip]:align-baseline",children:[f.jsx(wes,{text:I,isCommand:$}),U.length>0&&f.jsx("div",{className:"msg-images flex flex-wrap gap-1.5 mt-2 [&_img]:max-w-55 [&_img]:max-h-40 [&_img]:border [&_img]:border-border-variant [&_img]:rounded-xs [&_img]:block",children:U.map((ie,ce)=>f.jsx("a",{href:ie.src,target:"_blank",rel:"noreferrer",children:f.jsx("img",{src:ie.src,alt:rSe()})},ce))}),G.length>0&&f.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:G.map((ie,ce)=>f.jsxs("a",{className:"msg-file inline-flex items-center gap-1.5 max-w-60 py-1.5 px-2.5 border border-border-variant rounded-sm text-text no-underline [&:hover]:border-text [&_span]:overflow-hidden [&_span]:text-ellipsis [&_span]:whitespace-nowrap",href:ie.src,target:"_blank",rel:"noreferrer",children:[f.jsx(Px,{size:15}),f.jsx("span",{children:ie.name})]},ce))})]}),k!==void 0&&f.jsx(Hts,{text:I,createdAt:n.createdAt,count:k,index:x,prevId:j,nextId:z,onSelect:R,pagerDisabled:T,onEdit:()=>L(I),editDisabled:E})]})}const q=n.parts.find(I=>I.type==="tool"&&qS(I)),B=n.parts.find(fv)??q,X=QWr(n.parts.filter(I=>I!==B&&!(q&&qS(I))),B),K=b&&!n.completedAt?"":pG(n);return f.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[f.jsx(Uts,{message:n,parts:X,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:o,onOpenSpawnedSession:a,runExperimentName:i,onOpenExperiment:c,experimentName:l,onRespond:d,onOpenPlan:_,onOpenSubagent:p,predictTextTail:b}}),B&&f.jsx(HK,{part:B,usageLimited:!!q,busy:m,recovering:w===((ee=(Z=B.state)==null?void 0:Z.input)==null?void 0:ee.turnId),onRecover:y}),K&&f.jsx("div",{className:"flex opacity-0 transition-opacity duration-80 ease-standard group-hover/turn:opacity-100 group-focus-within/turn:opacity-100",children:f.jsx(Rt,{size:"small",title:ON(),"aria-label":ON(),onClick:()=>void nz(K),children:f.jsx(Pd,{size:13})})})]})});function Uts({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:o}=dG(n,r),[a,i]=C.useState(!1),[,c]=C.useState(0);if(C.useEffect(()=>{if(!r||e.completedAt!=null||s.length===0)return;const p=window.setInterval(()=>c(m=>m+1),1e3);return()=>window.clearInterval(p)},[r,e.completedAt,s.length]),s.length===0)return f.jsx(f.Fragment,{children:Ub(o,t)});const l=e.completedAt??(r?Date.now():null),d=l===null?null:l-e.createdAt,_=d===null?null:d<6e4||d>=36e5?Wg(d):cQe({minutes:fn(Math.floor(d/6e4)),seconds:fn(Math.floor(d/1e3)%60)});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"turn-work mb-4",children:[f.jsxs("button",{type:"button",className:"flex w-full items-center gap-1.5 border-b border-border/50 pb-2 text-start text-base text-subtext cursor-pointer hover:text-text focus-visible:outline-2 focus-visible:outline-primary","aria-expanded":a,"data-work-toggle":!0,onClick:()=>i(p=>!p),children:[f.jsx("span",{children:_===null?ZXe():vQe({duration:_})}),f.jsx(ei,{size:16,className:`shrink-0 text-muted transition-transform duration-200 ease-standard motion-reduce:transition-none ${a?"rotate-90":""}`})]}),f.jsx("div",{className:`tool-group-disclosure ${a?"open":""}`,"aria-hidden":!a,inert:!a,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"turn-work-content pt-4",children:Ub(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),f.jsx("div",{className:"turn-answer",children:Ub(o,t)})]})}function Gts(e){const n=e.parts.length===1?e.parts[0]:void 0;return e.role==="user"&&(n==null?void 0:n.type)==="tool"&&n.tool===jB?n:null}function Wts({part:e}){var c;const n=e.state,t=So((n==null?void 0:n.input)??{},"command")??"",r=(n==null?void 0:n.status)==="running",s=(n==null?void 0:n.status)==="error",o=typeof((c=n==null?void 0:n.input)==null?void 0:c.exitCode)=="number"?n.input.exitCode:null,a=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` -`),i=r?OI():s&&o!==null?qSe({code:fn(o)}):null;return f.jsx("div",{className:"msg-shell ms-auto self-end flex w-full max-w-[88%] flex-col items-stretch gap-1.5",children:f.jsxs("div",{dir:"ltr",className:"max-w-full bg-panel rounded-[16px] py-2.5 px-[15px] text-base",children:[f.jsxs("div",{className:"flex items-start gap-2 font-mono text-sm text-text whitespace-pre-wrap wrap-anywhere",children:[f.jsxs("span",{className:"sr-only",children:[PI()," "]}),f.jsx(Fd,{size:16,strokeWidth:1.6,className:`mt-0.5 shrink-0 ${s?"text-accent-red":"text-muted"}`,"aria-hidden":"true"}),f.jsx("span",{children:t})]}),a&&f.jsx("div",{className:`${J7} mt-2`,children:a.slice(0,2e4)}),i&&f.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:i})]})})}function Ub(e,n){var k,x;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:o,onOpenSpawnedSession:a,runExperimentName:i,onOpenExperiment:c,experimentName:l,onRespond:d,onOpenPlan:_,onOpenSubagent:p,predictTextTail:m=!1}=n,w=e.filter(j=>j.type!=="steer"&&$p(j,t)).at(-1),y=[];let g=[];const b=()=>{g.length!==0&&(y.push(f.jsx($ts,{parts:g,pendingTail:g.some(j=>j.id===r),onOpenFile:s,onOpenRun:o,onOpenSpawnedSession:a,runExperimentName:i,onOpenExperiment:c,experimentName:l},`tg-${g[0].id}`)),g=[])};for(const j of e)if($p(j,t)){if(j.type==="tool"&&(Vts(j.tool)||(((k=j.children)==null?void 0:k.length)??0)>0)){b(),y.push(f.jsx(Qts,{part:j,pendingTail:m&&((x=j.state)==null?void 0:x.status)==="running"||j.id===r,onOpenSubagent:p},j.id));continue}if(j.type==="tool"){g.push(j);continue}b(),j.type==="text"?y.push(f.jsx(rl,{text:j.text,onOpenFile:s,onOpenRun:o,predict:m&&j.id===(w==null?void 0:w.id)},j.id)):j.type==="steer"?y.push(f.jsx("div",{dir:"auto",role:"note","aria-label":tUe(),className:"msg-steer my-2 ms-auto w-fit max-w-[88%] bg-panel rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere",children:j.text},j.id)):j.type==="prompt"&&j.prompt&&y.push(f.jsx(Its,{part:j,onRespond:d,onOpenFile:s,onOpenPlan:_},j.id))}return b(),y}function Kts(e){return Cd(e).label}function Vts(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function qK(e){var t,r;const n=((t=e.state)==null?void 0:t.status)==="completed"?((r=e.state)==null?void 0:r.output)??"":"";return n.startsWith("Async agent launched")?"":n}function nx(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&nx(t.children,n);if(r)return r}return null}function Xts({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:o,onOpenSubagent:a}){var w,y,g,b;const i=e.children??[],c=((w=e.state)==null?void 0:w.status)==="running",l=((y=e.state)==null?void 0:y.status)==="error",d=l?Pw(((g=e.state)==null?void 0:g.error)||((b=e.state)==null?void 0:b.output)||""):"",_=Ub(i,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:o,onOpenSubagent:a,predictTextTail:c,pendingTailToolId:c?_G(i):null}),m=i.some(k=>k.type==="text"&&!!k.text)?"":qK(e);return f.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[l&&f.jsxs("span",{className:"sr-only",children:[m6()," "]}),d&&f.jsx("div",{className:J7,children:d.slice(0,2e4)}),_.length===0&&!m&&!d?f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?g6():uze()}):f.jsxs(f.Fragment,{children:[_,m&&f.jsx(rl,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function Qts({part:e,pendingTail:n,onOpenSubagent:t}){var l,d,_,p;const r=((l=e.state)==null?void 0:l.status)==="error",s=Pw(((d=e.state)==null?void 0:d.error)||((_=e.state)==null?void 0:_.output)||""),o=n&&!r?tz(Cd(e)):Cd(e),a=FK(!!(n&&!r)),i=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!qK(e),c=f.jsxs(f.Fragment,{children:[r&&f.jsxs("span",{className:"sr-only",children:[m6()," "]}),r?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(EH,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):f.jsx(tx,{activity:o,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),f.jsx("span",{className:`${NK} ${a?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:o.label})]});return i?f.jsx("div",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 text-text text-base text-start rounded-sm",children:c}):f.jsxs("button",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 cursor-pointer text-text text-base text-start rounded-sm [&:hover:not(:disabled)]:bg-surface [&:disabled]:cursor-default",title:r&&s?s:C8e(),...rs(m=>t==null?void 0:t(e.id,o.label,m)),disabled:!t,children:[c,f.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:f.jsx(ei,{size:12})})]})}function Yts(e){const n=new Map;let t;for(let s=e.length-1;s>=0;s--)if(e[s].role==="assistant"){t=e[s];break}if(!t)return{messageId:"",states:n};const r=(s,o)=>{var a,i;for(const c of s){const l=`${o}/${c.id}`;c.type==="tool"&&((a=c.state)!=null&&a.status)&&n.set(l,{status:c.state.status,part:c}),(i=c.children)!=null&&i.length&&r(c.children,l)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function rz(e){const n=(t,r)=>{var s;for(const o of t){const a=o.prompt;if(o.type==="prompt"&&(a==null?void 0:a.kind)==="permission"&&!a.resolved){const i=a.toolInput??{},l=So(i,"reason","description")||BK(a.tool,i);return{id:o.id,path:`${r}/${o.id}`,label:l}}if((s=o.children)!=null&&s.length){const i=n(o.children,`${r}/${o.id}`);if(i)return i}}return null};for(const t of e){if(t.role!=="assistant")continue;const r=n(t.parts,t.id);if(r)return r}return null}function Zts(e){const[n,t]=C.useState({text:"",sequence:0}),r=C.useRef(null);return C.useEffect(()=>{var w,y,g,b,k;const s=((w=e[0])==null?void 0:w.id)??"",{messageId:o,states:a}=Yts(e),i=rz(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:o,states:a,permissionPath:(i==null?void 0:i.path)??null},t(x=>({text:i?jN({label:su(i.label)}):"",sequence:x.sequence+1}));return}const c=r.current.messageId===o?r.current.states:new Map,l=r.current.permissionPath,d=[...a].filter(([x,j])=>{var z;return((z=c.get(x))==null?void 0:z.status)!==j.status});if(r.current={transcript:s,messageId:o,states:a,permissionPath:(i==null?void 0:i.path)??null},i&&i.path!==l){t(x=>({text:jN({label:su(i.label)}),sequence:x.sequence+1}));return}const _=(y=d.find(([,x])=>fv(x.part)))==null?void 0:y[1].part;if((_==null?void 0:_.id)==="turn-recovery"){const x=gG((b=(g=_.state)==null?void 0:g.input)==null?void 0:b.recoveryAction);t(j=>({text:`${Mve()}${x?` ${x==="retry"?$0e():z0e()}`:""}`,sequence:j.sequence+1}));return}if((_==null?void 0:_.id)==="turn-retry"){t(x=>({text:g0e(),sequence:x.sequence+1}));return}const p=d.filter(([,x])=>x.status==="error");if(p.length>0){const x=p.slice(0,2).map(([,j])=>Cd(j.part).label).join(", ");t(j=>({text:p.length===1?dve({labels:x}):kve({count:fn(p.length),labels:x}),sequence:j.sequence+1}));return}const m=d.filter(([,x])=>x.status==="running");if(m.length>0){const x=(k=m.at(-1))==null?void 0:k[1].part;t(j=>({text:x?tz(Cd(x)).label:K0e(),sequence:j.sequence+1}));return}d.some(([,x])=>x.status==="completed")&&t(x=>({text:rve(),sequence:x.sequence+1}))},[e]),n}const Jts=C.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:o,allMessages:a,canFork:i,onFork:c,onSelectFork:l,busy:d,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:y,experimentName:g,onRespond:b,onOpenPlan:k,onOpenSubagent:x,recoveringTurnId:j,onRecover:z,skills:E}){var I,$,F;wu();const T=((I=rz(n))==null?void 0:I.id)??null,A=C.useMemo(()=>n.filter(U=>Pts(U,T)),[n,T]),R=C.useMemo(()=>{const U=A.filter(G=>G.role==="user"&&!G.id.startsWith(sd));return VWr(a,n,U,G=>G.startsWith(sd))},[n,A,a]),D=C.useRef(new Set),[L,P]=C.useState(!1),q=C.useCallback(U=>A[U].id,[A]),B=C.useCallback(U=>{if(L)return A.map((oe,ie)=>ie);const G=new Set(C7(U));return A.forEach((oe,ie)=>{D.current.has(oe.id)&&G.add(ie)}),[...G].sort((oe,ie)=>oe-ie)},[A,L]),X=uG({count:A.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:q,estimateSize:()=>400,overscan:1,initialRect:{width:(($=t.current)==null?void 0:$.clientWidth)??0,height:((F=t.current)==null?void 0:F.clientHeight)??0},initialOffset:()=>{var U;return Math.max(0,A.length*400-(((U=t.current)==null?void 0:U.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:B});C.useLayoutEffect(()=>{const U=()=>X.scrollToEnd();return r.current=U,o(),()=>{r.current=null}},[X,r,o]),C.useEffect(()=>{const U=()=>{var ie;const G=window.getSelection();if(!G||G.isCollapsed||!G.rangeCount)return;const oe=G.getRangeAt(0);for(const ce of((ie=t.current)==null?void 0:ie.querySelectorAll("[data-message-id]"))??[])oe.intersectsNode(ce)&&ce.dataset.messageId&&D.current.add(ce.dataset.messageId)};return document.addEventListener("selectionchange",U),()=>document.removeEventListener("selectionchange",U)},[t]);const K=A.at(-1),Z=Zts(n),ee=d?fG(n):null;return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f.jsx("span",{children:Z.text},Z.sequence)}),f.jsx("button",{type:"button",className:"sr-only focus:not-sr-only","aria-pressed":L,onClick:()=>P(U=>!U),children:kKe()}),f.jsx("div",{className:"relative",style:{height:X.getTotalSize()},children:X.getVirtualItems().map(U=>{var ne,W,ae,le,me,be;const G=A[U.index],oe=G.parts.find(fv),ie=(W=(ne=oe==null?void 0:oe.state)==null?void 0:ne.input)==null?void 0:W.turnId,ce=oe?d||j!==null:!1;return f.jsx("div",{"data-index":U.index,"data-message-id":G.id,ref:X.measureElement,className:"absolute left-0 w-full pb-4",style:{top:U.start},onClickCapture:je=>{!(je.target instanceof Element)||!je.target.closest("[data-work-toggle]")||(s.current=!1,X.setOptions({...X.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(G.id),onFocusCapture:()=>D.current.add(G.id),children:f.jsx(qts,{message:G,forkCount:(ae=R.get(G.id))==null?void 0:ae.count,forkIndex:(le=R.get(G.id))==null?void 0:le.index,forkPrevId:(me=R.get(G.id))==null?void 0:me.prevId,forkNextId:(be=R.get(G.id))==null?void 0:be.nextId,forkDisabled:!i,branchDisabled:d,onFork:c,onSelectFork:l,activePermissionId:T,pendingTailToolId:(ee==null?void 0:ee.messageId)===G.id?ee.toolId:null,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:y,experimentName:g,onRespond:b,onOpenPlan:k,onOpenSubagent:x,busy:ce,recoveringTurnId:ie===j?j:null,onRecover:z,skills:E,predictTextTail:d&&G===K&&G.role==="assistant"})},G.id)})})]})}),ens=(e,n)=>e==="all"?!0:e==="archived"?n:!n;function j3(e){return e instanceof Element&&e.closest("[data-side-chat]")!==null}const tns=[{id:"archived",label:$N,railLabel:$N},{id:"active",label:_Ee,railLabel:GI},{id:"all",label:xEe,railLabel:II}];function nns({value:e,onChange:n,grouping:t,onGroupingChange:r}){const{open:s,setOpen:o,ref:a}=ti();return f.jsxs("div",{className:"rail-filter relative inline-flex",ref:a,children:[f.jsx(Rt,{size:"small",className:"rail-filter-btn text-subtext",active:e!=="active",title:VN(),"aria-label":VN(),onClick:()=>o(i=>!i),children:f.jsx(IH,{size:15,className:"text-subtext"})}),s&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-40 p-1 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right",children:[f.jsx("div",{className:"px-2 py-0.5 text-sm text-subtext",children:Rar()}),["projects","list"].map(i=>f.jsxs(gn,{size:"compact",className:"text-sm",onClick:()=>{r(i),o(!1)},children:[f.jsx("span",{children:i==="projects"?C6():Har()}),t===i&&f.jsx(fo,{size:13})]},i)),f.jsx("div",{className:"my-1 border-t border-border"}),f.jsx("div",{className:"px-2 py-0.5 text-sm text-subtext",children:war()}),tns.map(i=>f.jsxs(gn,{size:"compact",className:"text-sm",onClick:()=>{n(i.id),o(!1)},children:[f.jsx("span",{children:i.label()}),e===i.id&&f.jsx(fo,{size:13})]},i.id))]})]})}const rns=14,sns=500,ons=1200;function UK({title:e,animate:n}){return n?f.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?f.jsx("span",{"aria-hidden":!0,children:t},r):f.jsx("span",{"aria-hidden":!0,className:"title-reveal-char inline-block animate-[title-char-in_240ms_ease-out_both] [@media((prefers-reduced-motion:_reduce))]:animate-none",style:{animationDelay:`${Math.min(r*rns,sns)}ms`},children:t},r))}):f.jsx(f.Fragment,{children:e})}function ans({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:o,onOpen:a,onRename:i,onSetArchived:c,onDelete:l}){var z;const d=C.useRef(null),[_,p]=C.useState(!1),m=((z=e.title)==null?void 0:z.trim())||"Untitled",[w,y]=C.useState(!1),[g,b]=C.useState(""),k=C.useRef(null);function x(){var E;b(((E=e.title)==null?void 0:E.trim())||""),y(!0)}function j(){var T;const E=g.trim();y(!1),E&&E!==(((T=e.title)==null?void 0:T.trim())||"")&&i(E)}return C.useEffect(()=>{var E,T;w&&((E=k.current)==null||E.focus(),(T=k.current)==null||T.select())},[w]),f.jsxs("div",{ref:d,role:"button",tabIndex:0,className:`session-row relative flex items-center gap-2 w-full text-start py-[7px] ps-2.5 pe-1.5 rounded-md text-sm text-text cursor-pointer select-none [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium [&_.session-dot:empty]:hidden [&_.session-dot]:w-4 [&_.session-dot]:inline-flex [&_.session-dot]:items-center [&_.session-dot]:justify-center [&_.session-dot]:shrink-0 [&_.session-title]:flex-1 [&_.session-title]:min-w-0 [&_.session-title]:overflow-hidden [&_.session-title]:[mask-image:linear-gradient(to_right,black_calc(100%_-_16px),transparent)] [&_.session-title]:whitespace-nowrap [&_.session-menu-btn]:hidden [&_.session-menu-btn]:items-center [&_.session-menu-btn]:justify-center [&_.session-menu-btn]:w-4 [&_.session-menu-btn]:h-4 [&_.session-menu-btn]:-my-0.5 [&_.session-menu-btn]:mx-0 [&_.session-menu-btn]:rounded-sm [&_.session-menu-btn]:text-muted [&_.session-menu-btn]:shrink-0 [&_.session-menu-btn:hover]:text-text [&_.session-menu-btn:hover]:bg-panel [&:hover_.session-menu-btn]:inline-flex [&:focus-visible_.session-menu-btn]:inline-flex [&_.session-menu-btn:focus-visible]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-dot]:hidden [&:focus-visible_.session-dot]:hidden [&:has(.session-menu-btn:focus-visible)_.session-dot]:hidden [&.menu-open_.session-dot]:hidden [&_.busy-dot]:w-[7px] [&_.busy-dot]:h-[7px] [&_.busy-dot]:rounded-full [&_.busy-dot]:bg-primary [&_.busy-dot]:animate-[or-pulse_1.2s_infinite] [&_.busy-dot]:shrink-0 [&_.unread-dot]:w-[7px] [&_.unread-dot]:h-[7px] [&_.unread-dot]:rounded-full [&_.unread-dot]:bg-primary [&_.unread-dot]:shrink-0 [&_.busy-dot.waiting]:animate-none [&_.session-title-input]:flex-1 [&_.session-title-input]:min-w-0 [&_.session-title-input]:py-px [&_.session-title-input]:px-[5px] [&_.session-title-input]:-my-0.5 [&_.session-title-input]:mx-0 [&_.session-title-input]:[font:inherit] [&_.session-title-input]:text-text [&_.session-title-input]:bg-background [&_.session-title-input]:border [&_.session-title-input]:border-primary [&_.session-title-input]:rounded-sm [&_.session-title-input]:outline-none [&.editing]:bg-surface [&.editing]:cursor-default [&.editing_.session-menu-btn]:hidden [&.editing_.session-dot]:hidden ${n?"active":""} ${t?"unread":""} ${_?"menu-open":""} ${w?"editing":""}`,title:`${g_[e.harness]}${e.model?` · ${e.model}`:""}`,onClick:()=>{w||(_?p(!1):a())},onKeyDown:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),_?p(!1):a())},children:[w?f.jsx("input",{ref:k,className:"session-title-input","aria-label":tBe(),value:g,onChange:E=>b(E.target.value),onClick:E=>E.stopPropagation(),onBlur:j,onKeyDown:E=>{E.stopPropagation(),E.key==="Enter"?(E.preventDefault(),j()):E.key==="Escape"&&(E.preventDefault(),y(!1))}}):f.jsx("span",{className:"session-title",children:f.jsx(UK,{title:m,animate:o!==void 0},o??"static")}),f.jsx("span",{className:"session-dot",children:r?f.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&f.jsx("span",{className:"unread-dot"})}),f.jsxs(NMr,{open:_,onOpenChange:p,children:[f.jsx(AMr,{asChild:!0,children:f.jsx("button",{className:"session-menu-btn",title:rA(),"aria-label":rA(),onClick:E=>E.stopPropagation(),children:f.jsx(em,{size:14})})}),f.jsxs(TMr,{className:"session-menu",ownerRef:d,restoreFocus:!w,children:[f.jsx(f4,{onSelect:x,children:f.jsx("span",{children:FI()})}),f.jsx(f4,{onSelect:()=>c(!e.archived),children:f.jsx("span",{children:e.archived?dXe():z5e()})}),f.jsx(f4,{danger:!0,onSelect:l,children:f.jsx("span",{children:BI()})})]})]})]})}const HD=[CH,$H,Fd,nv],ins=()=>[{title:BBe(),prompt:ABe()},{title:aFe(),prompt:QBe()},{title:CFe(),prompt:mFe()},{title:WFe(),prompt:LFe()}],C3=[{box:"border-accent-blue/45",icon:"text-accent-blue"},{box:"border-accent-green/45",icon:"text-accent-green"},{box:"border-accent-amber/45",icon:"text-accent-amber"},{box:"border-primary/45",icon:"text-primary"}],qD="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function cns(e,n){if(!e)return null;const t=e.model??null;return{...e,model:t,serviceTier:vy(n,t,e.serviceTier),reasoningLevel:vB(n,t,e.reasoningLevel)}}function UD({projectId:e,projectName:n,contentLoading:t=!1,contentError:r=null,onRetryContent:s,railHeader:o,railOpen:a,onShowRail:i,onNewProject:c,mainView:l,onSelectMainView:d,onOpenFile:_,onOpenRun:p,runExperimentName:m,onOpenExperiment:w,experimentName:y,onOpenPlan:g,onOpenSubagent:b,runtime:k,onOpenDemoWelcome:x,composerFocusNonce:j=0,activeSessionId:z,onActiveSessionChange:E,preferredAgent:T,onPreferredAgentChange:A,preferredAutonomy:R,onPreferredAutonomyChange:D,embedded:L=!1,onOpenSideChat:P,onRunSetup:q,children:B}){var pm,nh,rh,mm,bs,fr,Nn,Ui;const X=mn({mutationFn:Y=>nEr(...Y)}),K=mn({mutationFn:Y=>Z8r(...Y)}),Z=mn({mutationFn:Y=>tEr(...Y)}),ee=mn({mutationFn:Y=>eEr(...Y)}),I=mn({mutationFn:Y=>G8r(...Y)}),$=mn({mutationFn:Y=>V8r(...Y)}),F=mn({mutationFn:Y=>Q8r(...Y)}),U=mn({mutationFn:Y=>Y8r(...Y)}),G=mn({mutationFn:P5}),oe=q0(),{data:ie=[]}=dt({...pd(),enabled:!L}),{data:ce=[]}=dt({...ET(),enabled:!L}),[ne,W]=C.useState(()=>{try{return localStorage.getItem("sidebar-grouping")==="list"?"list":"projects"}catch{return"projects"}}),[ae,le]=C.useState(()=>{try{const Y=JSON.parse(localStorage.getItem("sidebar-pinned-projects")??"[]");return Array.isArray(Y)?Y.filter(_e=>typeof _e=="string"):[]}catch{return[]}}),[me,be]=C.useState(()=>{try{const Y=JSON.parse(localStorage.getItem("sidebar-collapsed-projects")??"[]");return Array.isArray(Y)?Y.filter(_e=>typeof _e=="string"):[]}catch{return[]}}),[je,Be]=C.useState("active"),[Ve,Re]=C.useState(!1),Fe=C.useRef(null),[ht,bt]=C.useState(0),[Vt,Ut]=C.useState(null),[Gt,Le]=C.useState({});C.useLayoutEffect(()=>{const Y=Fe.current;if(!Y||L)return;const _e=()=>bt(Y.clientHeight),ke=new ResizeObserver(_e);return ke.observe(Y),_e(),()=>ke.disconnect()},[a,L,l]);const ct=new Map(ce.map(Y=>[Y.projectId,Y.lastActivityAt])),lt=[...ie].sort((Y,_e)=>Number(ae.includes(_e.id))-Number(ae.includes(Y.id))||Math.max(ct.get(_e.id)??0,_e.updatedAt)-Math.max(ct.get(Y.id)??0,Y.updatedAt)),xe=ne==="list"||Ve?lt.length:Math.max(1,Math.ceil(ht/36));let Ie=lt.slice(0,xe);const Ze=ie.find(Y=>Y.id===e);Ze&&!Ie.some(Y=>Y.id===e)&&(Ie=[...Ie.slice(0,xe-1),Ze]);const Ae=H$({queries:(ne==="projects"?Ie:[]).map(Y=>({...Co(Y.id),enabled:!L}))}),Xe=JY({queryKey:Mt("listSidebarChatSessions",je),queryFn:({pageParam:Y,signal:_e})=>t9r(je,Y,_e),initialPageParam:null,getNextPageParam:Y=>Y.next??void 0,enabled:!L&&ne==="list"}),Je=C.useMemo(()=>Co(e),[e]),{data:at=ID}=dt(Je),At=C.useCallback(Y=>{ns(Je.queryKey,_e=>{if(!_e)return;const ke=typeof Y=="function"?Y(_e):Y,ye=new Map(_e.map($e=>[$e.id,$e]));for(const $e of ke)ye.get($e.id)!==$e&&ji(et,Je.queryKey,$e.id),ye.delete($e.id);for(const $e of ye.keys())ji(et,Je.queryKey,$e);return ke})},[Je]),Pe=z,Jt=C.useRef(E);Jt.current=E;const Tt=C.useRef({projectId:e});Tt.current.projectId!==e&&(Tt.current={projectId:e});const[er,ln]=C.useState(new Set),[rn,Wt]=C.useState(""),[kt,ss]=C.useState(!1),[Un,nr]=C.useState([]),vn=C.useRef(0),ut=C.useRef({projectId:e,activeId:Pe,mainView:l});(ut.current.projectId!==e||ut.current.activeId!==Pe||ut.current.mainView!==l)&&(ut.current={projectId:e,activeId:Pe,mainView:l});const[dn,zn]=C.useState([]),[Ln,kr]=C.useState(null),[Fn,xn]=C.useState(null),$n=Pe??`${e}:new`,zt=C.useRef(new Map),Ht=C.useRef(B4);Ht.current={draft:rn,attachments:dn,annotations:Un};const rr=e===Zm&&!L&&at.length>0&&at.every(Y=>Y.sideParentSessionId||D7r[Y.id]===Y.activeLeafId)?gT:null,sr=C.useRef(null);rr!==null&&sr.current===null&&Pe!==null&&(sr.current=$n);const Sr=$n===sr.current?rr:null;C.useLayoutEffect(()=>{const Y=zt.current.get($n)??B4;return Ht.current=Y,Wt(Y.draft),zn(Y.attachments),nr(Y.annotations),xn(null),()=>{const _e=oKr(Ht.current,Sr);_e?zt.current.set($n,_e):zt.current.delete($n)}},[$n,Sr]);const[lr,Lt]=C.useState(null),fs=C.useRef(Promise.resolve()),os=C.useRef(0),Ts=C.useRef(0),[Qs,Kr]=C.useState(null),tr=C.useRef(null),Ke=C.useRef(!1),vt=C.useRef(null),[kn,on,En]=a9r(e,l==="chat"?Pe:null),{data:wn=_ns}=dt(mu()),[as,Hs]=C.useState(T);C.useEffect(()=>Hs(T),[T]);const[or,Tr]=C.useState({}),[qs,ho]=C.useState(lg),[Jo,si]=C.useState(null),To=C.useRef(!1),Di=C.useRef(null),[ds,Rs]=C.useState(null),oi=C.useRef(!1),Ys=C.useRef(null),[ai,ea]=C.useState(new Map),Rr=C.useRef(new Map),po=C.useRef(null),Vr=C.useRef(null),Zs=C.useRef(null),Js=C.useRef(!0),[Ro,ta]=C.useState(!0),xr=C.useRef(null),[ef,mo]=C.useState(!1),Li=ti(),Xd=C.useCallback(Y=>{var _e;vn.current+=1,nr(ke=>[...ke,{id:`annotation-${vn.current}`,...Y}]),(_e=xr.current)==null||_e.focus()},[]),Mo=its(Vr,Xd);cts(Un,L?Zes:Yes),C.useEffect(()=>{mo(!1),Mo.dismiss()},[Pe,e,Mo.dismiss]);const[pl,ml]=C.useState(0),[Oo,na]=C.useState(0),[is,hs]=C.useState(!1),[Do,$i]=C.useState(0),[ur,jr]=C.useState(0),cs=C.useRef(!1);function ps(Y){if(!to)return;if(!oo&&Y.source==="command"&&Iw(Y.name)&&Y.name!=="goal"){cf(Y.name,rn,to);return}const _e=Y.name.replace(/@u$/,"^").replace(/@p$/,"~"),ke=Y.source==="command"?1:AD(_e,xr.current),ye=pes(rn,to,_e,ke);Wt(ye.text),window.requestAnimationFrame(()=>{var $e,yt;($e=xr.current)==null||$e.focus(),(yt=xr.current)==null||yt.setSelectionRange(ye.cursor,ye.cursor),jr(ye.cursor)})}function ja(Y){if(!dc)return;const _e=GWr(rn,dc,Y);Wt(_e.text),window.requestAnimationFrame(()=>{var ke,ye;(ke=xr.current)==null||ke.focus(),(ye=xr.current)==null||ye.setSelectionRange(_e.cursor,_e.cursor),jr(_e.cursor)})}function ra(Y){if(fc)return!1;const _e=Y.selectionStart;if(cs.current||_e!==Y.selectionEnd)return!1;const ke=rn.slice(0,_e).replace(/[ \t]+$/,"").length,ye=m3(rn,ke);if(!ye||ye.end!==ke||!eh(ye.query)||_e>ke&&_e-ke!==AD(ye.query,Y))return!1;const $e=ND(rn,{...ye,end:_e});return Wt($e.text),jr($e.cursor),window.requestAnimationFrame(()=>Y.setSelectionRange($e.cursor,$e.cursor)),!0}function gl(Y){kr(null),xn(null);let ye=dn.reduce(($e,yt)=>$e+yt.size,0);for(const $e of Y){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test($e.type))continue;if(Mu&&$e.type.startsWith("image/")){xn((no==null?void 0:no.id)??null);continue}if($e.size>31457280){kr(dSe({name:Ee($e.name)}));continue}if(ye+$e.size>41943040){kr(kSe());continue}ye+=$e.size;const yt=ut.current,pt=$n,Sn=new FileReader;Sn.onload=()=>{const hn={dataUrl:Sn.result,mediaType:$e.type,name:$e.name,size:$e.size};if(ut.current.projectId===yt.projectId&&ut.current.activeId===yt.activeId){zn(ys=>[...ys,hn]);return}const jn=zt.current.get(pt)??B4;zt.current.set(pt,{...jn,attachments:[...jn.attachments,hn]})},Sn.readAsDataURL($e)}}function Ii(Y){const _e=Array.from(Y.clipboardData.items).filter(ke=>ke.kind==="file"&&(ke.type.startsWith("image/")||ke.type==="application/pdf")).map(ke=>ke.getAsFile()).filter(ke=>ke!==null);_e.length>0&&(Y.preventDefault(),gl(_e))}const Et=at.find(Y=>Y.id===Pe),Au=as??M$r(wn),ms=Et?{harness:Et.harness,model:or.model!==void 0?or.model:Et.model,serviceTier:or.serviceTier!==void 0?or.serviceTier:Et.serviceTier,permissionMode:or.permissionMode??Et.permissionMode,reasoningLevel:or.reasoningLevel??Et.reasoningLevel}:Au?{...Au,...or}:null,{data:Tu=uns}=dt(MEr(ms==null?void 0:ms.harness,e)),st=ms?wn.find(Y=>Y.id===ms.harness):void 0,nn=st==null?void 0:st.options,{data:vl}=dt({...L6(),enabled:!!q}),Br=Y=>{if(!st)return;const _e=vl==null?void 0:vl[st.id];if(!(st.id==="claude-code"&&Y===(_e==null?void 0:_e.login)&&!st.loginEligible))return fK(st,_e,Y)},eo=C.useMemo(()=>mes(Tu,nn==null?void 0:nn.planActivation),[Tu,nn==null?void 0:nn.planActivation]),Pi=RD(rn),Ca=Pi!==null,to=m3(rn,ur),_c=(to==null?void 0:to.query)??null,bl=_c===null?[]:eo.filter(Y=>des(Y,_c)),fc=!Ca&&_c!==null&&(to==null?void 0:to.end)===ur&&bl.length>0,za=fc&&!is?bl:[],yl=za.length>0,xl=Math.min(pl,Math.max(0,za.length-1));C.useEffect(()=>ml(0),[_c]);const dc=Ca?null:FWr(rn,ur),un=(dc==null?void 0:dc.end)===ur?dc.query:null,hc=(pm=dt({...ZC(e,Pe?{sessionId:Pe}:{}),enabled:un!==null}).data)==null?void 0:pm.entries,Qd=C.useMemo(()=>qWr(hc??[]),[hc]),pc=C.useMemo(()=>un!==null&&!is?UWr(Qd,un):[],[Qd,un,is]),tf=pc.length>0,Ru=Math.min(Oo,Math.max(0,pc.length-1));C.useEffect(()=>na(0),[un]);const sn=cns(ms,st),nf=Cx(st,sn==null?void 0:sn.model),no=st==null?void 0:st.models.find(Y=>Y.id===(sn==null?void 0:sn.model)),Mu=(no==null?void 0:no.imageInput)===!1?U7e({model:Ee(Nb(no))}):null,rf=!!Mu&&dn.some(Y=>Y.mediaType.startsWith("image/")),ro=!!no&&Fn===no.id,wl=rf||ro?Mu:null;C.useEffect(()=>xn(null),[no==null?void 0:no.id]);const kl=Y=>{if(!sn)return;const _e={...sn,...Y},ke={};Y.model!==void 0&&Y.model!==sn.model&&(ke.model=Y.model),Y.serviceTier!==void 0&&Y.serviceTier!==sn.serviceTier&&(ke.serviceTier=Y.serviceTier),Y.permissionMode!==void 0&&Y.permissionMode!==sn.permissionMode&&(ke.permissionMode=Y.permissionMode),Y.reasoningLevel!==void 0&&Y.reasoningLevel!==sn.reasoningLevel&&(ke.reasoningLevel=Y.reasoningLevel),ho(ye=>({...ye,...ke})),Hs(_e),A(_e).catch(()=>{}),Et?Tr(ye=>({...ye,...Y})):Y.harness&&Y.harness!==sn.harness&&Tr({})},go=C.useCallback(Y=>{const _e=fs.current.catch(()=>{}).then(()=>{if(!Vn(Je.queryKey))throw new DOMException("Workspace changed","AbortError");return Y()});return fs.current=_e.then(()=>{},()=>{}),_e},[Je]),ci=Y=>{if(Y==="plan"&&(st==null?void 0:st.id)==="claude-code"?(ho(ye=>({...ye,permissionMode:Y})),Tr(ye=>({...ye,permissionMode:Y}))):(Tr(ye=>{const $e={...ye};return delete $e.permissionMode,$e}),kl({permissionMode:Y})),!Et)return;const _e=Et.id,ke=++os.current;Lt(null),go(()=>X.mutateAsync([_e,Y])).then(ye=>{At($e=>$e.map(yt=>yt.id===ye.id?ye:yt)),os.current===ke&&Tr($e=>{const yt={...$e};return delete yt.permissionMode,yt})}).catch(()=>{os.current===ke&&(Tr(ye=>{const $e={...ye};return delete $e.permissionMode,$e}),Lt(HXe()))})},_m=Y=>kl({reasoningLevel:Y}),Sl=Y=>{if(!Et){D(Y);return}const _e=Et.id,ke=Et.autonomy,ye=++os.current,$e=yt=>At(pt=>pt.map(Sn=>Sn.id===yt.id?yt:Sn));$e({...Et,autonomy:Y}),Lt(null),go(()=>Z.mutateAsync([_e,Y])).then(yt=>{$e(yt),D(yt.autonomy)}).catch(()=>{At(yt=>yt.map(pt=>pt.id===_e&&pt.autonomy===Y?{...pt,autonomy:ke}:pt)),os.current===ye&&Lt(RXe())})},Ou=((nh=Et==null?void 0:Et.goal)==null?void 0:nh.trim())||"",sf=(sn==null?void 0:sn.harness)==="claude-code"?sn.permissionMode==="plan":(nn==null?void 0:nn.planActivation)==="command"?Qs??(Et==null?void 0:Et.planMode)??!1:!1;C.useEffect(()=>{Qs===null||(Et==null?void 0:Et.planMode)!==Qs||(tr.current=null,Kr(null))},[Et==null?void 0:Et.planMode,Qs]);async function jl(Y){if(ho(ye=>({...ye,planMode:Y})),tr.current=Y,Kr(Y),!Et)return;const _e=Et.id,ke=++Ts.current;Lt(null);try{const ye=await go(()=>K.mutateAsync([_e,Y]));At($e=>$e.map(yt=>yt.id===ye.id?ye:yt)),Ts.current===ke&&(tr.current=null,Kr(null),Lt(null))}catch(ye){throw Ts.current===ke&&(tr.current=null,Kr(null)),ye}}async function fm(){if((sn==null?void 0:sn.harness)==="claude-code"){ci("auto");return}if(Et)try{await jl(!1)}catch{Lt(k6e())}}async function Cl(){const Y=!sf;try{if((sn==null?void 0:sn.harness)==="claude-code")ci(Y?"plan":"auto");else if((nn==null?void 0:nn.planActivation)==="command")await jl(Y);else throw new Error(S1())}catch{Lt(lA())}}function Yd(Y,_e=""){var ke;switch(Y){case"plan":return Cl(),!1;case"new":return L?Et!=null&&Et.sideParentSessionId&&(P==null||P(Et.sideParentSessionId,"")):Aa(),!1;case"resume":return mo(!0),!0;case"model":return $i(ye=>ye+1),!0;case"compact":return af(),!1;case"goal":return li(_e),!1;case"side":return of(_e),!1;case"copy":{const ye=wr.at(-1),$e=Cr&&(ye==null?void 0:ye.role)==="assistant"&&!ye.completedAt,yt=JWr($e?wr.slice(0,-1):wr);return yt?nz(yt):tn(Qze(),"info"),!1}case"export":{const ye=((ke=Et==null?void 0:Et.title)==null?void 0:ke.trim())||Eb(),$e=Et?eKr(ye,wr,{user:J6e(),assistant:g_[Et.harness]}):null;return $e?Fts(tKr(ye),$e):tn(a8e(),"info"),!1}}}function of(Y){L?tn(Cor(),"info"):!Et||!P?tn(mor(),"info"):P(Et.id,Y)}async function zl(Y){Lt(null);const _e=Tt.current;try{const ke=await I.mutateAsync([e,Y]);if(et.invalidateQueries({queryKey:SB().queryKey}),Tt.current!==_e)return;At(ye=>[ke,...ye.filter($e=>$e.id!==ke.id)]),Be("all"),E(ke.id,{projectId:ke.projectId})}catch(ke){if(Tt.current!==_e)return;Lt(h7e({error:Ee(ke instanceof Error?ke.message:String(ke))}))}}async function li(Y){var pt;const _e=Y.trim();if(!_e){const Sn=(pt=Et==null?void 0:Et.goal)==null?void 0:pt.trim();tn(Sn?bCe({goal:su(Sn)}):ICe(),"info");return}const ke=ut.current,ye=()=>ut.current.activeId===ke.activeId;Lt(null);let $e=Pe;if(!$e){if(!(st!=null&&st.agentReady)||!sn){Lt(S1());return}try{$e=(await yc(sn,v3(nn==null?void 0:nn.planActivation,void 0,tr.current))).id}catch(Sn){Lt(DN({error:Ee(Sn instanceof Error?Sn.message:String(Sn))}));return}}const yt=/^(clear|none|off)$/i.test(_e);try{const Sn=await go(()=>ee.mutateAsync([$e,yt?null:_e]));At(hn=>hn.map(jn=>jn.id===Sn.id?Sn:jn)),tn(yt?lCe():VCe(),"success")}catch(Sn){if(!ye())return;Lt(DN({error:Ee(Sn instanceof Error?Sn.message:String(Sn))}))}}async function af(){const Y=Pe;if(!Y){tn(Bze(),"info");return}if(Cr){Lt(vje());return}Lt(null),je==="archived"&&Be("active");const _e=ut.current;try{const{message:ke}=await iEr(Y);on({type:"upsertMessage",sessionId:Y,message:ke})}catch(ke){if(ut.current.activeId!==_e.activeId)return;Lt(Eje({error:Ee(ke instanceof Error?ke.message:String(ke))}))}}function cf(Y,_e,ke){const ye=ND(_e,ke);Wt(ye.text),hs(!0),!Yd(Y)&&window.requestAnimationFrame(()=>{var $e,yt;($e=xr.current)==null||$e.focus(),(yt=xr.current)==null||yt.setSelectionRange(ye.cursor,ye.cursor),jr(ye.cursor)})}const so=C.useCallback(async(Y=!1)=>{const _e=Tt.current;if(_e.projectId!==e||!Vn(Je.queryKey))return null;const ke=(et.getQueryData(Je.queryKey)??[]).map(ye=>ye.id);try{const ye=await et.fetchQuery({...Je,...Y?{staleTime:0}:{}});if(Tt.current!==_e||!Vn(Je.queryKey))return null;const $e=ye.filter(pt=>!Kc.has(pt.id)),yt=new Set($e.map(pt=>pt.id));for(const pt of ke)yt.has(pt)||Me(pt);return Rr.current=new Map($e.map(pt=>[pt.id,pt.title])),$e}catch{return null}},[e]),sa=C.useCallback(async Y=>{Tt.current.projectId!==e||!Vn(Je.queryKey)||await Promise.all([et.fetchQuery({...Xc(Y),staleTime:0}),so(!0)]).catch(()=>{})},[e,so]);C.useEffect(()=>{const Y=eq();ln(e===Zm?new Set([R6,M6].filter(ke=>!Y.has(ke))):new Set),ss(!1),ea(new Map),Rr.current=new Map,so();const _e=Tt.current;return()=>{Tt.current===_e&&(Tt.current={projectId:e})}},[e,so]),C.useEffect(()=>{ho(lg),Ys.current=null},[Pe]),C.useEffect(()=>Kg(Y=>{switch(Y.type){case"session":{if(Y.session.projectId!==e||Kc.has(Y.session.id))return;const _e=Rr.current.has(Y.session.id),ke=Rr.current.get(Y.session.id)!==Y.session.title;Rr.current.set(Y.session.id,Y.session.title),_e&&ke&&Y.session.titleSource==="generated"&&(ea(ye=>{const $e=new Map(ye);return $e.set(Y.session.id,(ye.get(Y.session.id)??0)+1),$e}),window.setTimeout(()=>{ea(ye=>{if(!ye.has(Y.session.id))return ye;const $e=new Map(ye);return $e.delete(Y.session.id),$e})},ons));break}case"sessionDeleted":Me(Y.sessionId);break}}),[e]),C.useEffect(()=>Kg(Y=>{Y.type==="reconnected"&&so(!0)}),[so]);const Bi=Pe?kn.messagesBySession[Pe]??$D:$D,Du=Pe?kn.activeLeafBySession[Pe]??null:null;Di.current=Du;const wr=C.useMemo(()=>WWr(Bi,Du),[Bi,Du]),Ms=C.useRef({projectId:e,ids:kn.busySessions});C.useEffect(()=>{const Y=Ms.current;Ms.current={projectId:e,ids:kn.busySessions},Y.projectId===e&&ln(_e=>ZWr(_e,Y.ids,kn.busySessions,at,l==="chat"?Pe:null))},[e,kn.busySessions,at,Pe,l]);const Cr=Pe?kn.busySessions.has(Pe):!1,dm=!Cr&&!!(st!=null&&st.agentReady),lf=Cr&&fG(wr)!=null,Zd=Cr&&YWr(wr),Us=Pe?kn.queuedBySession[Pe]??[]:[],mc=Us.some(Y=>Y.dispatchState==="retrying"),Jd=Us.findIndex(Y=>Y.dispatchState==="blocked"),Lo=Us.reduce((Y,_e)=>_e.dispatchState!=="retrying"||typeof _e.nextRetryAt!="number"?Y:Y===null?_e.nextRetryAt:Math.min(Y,_e.nextRetryAt),null),[Lu,uf]=C.useState(()=>Date.now());C.useEffect(()=>{if(!mc||Lo===null||(uf(Date.now()),Lo<=Date.now()))return;const Y=window.setInterval(()=>{const _e=Date.now();uf(_e),_e>=Lo&&window.clearInterval(Y)},1e3);return()=>window.clearInterval(Y)},[mc,Lo]),C.useEffect(()=>{const Y=Us.reduce((_e,ke)=>ke.planMode??_e,void 0);Y!==void 0?(Ke.current=!0,tr.current=Y,Kr(Y)):Ke.current&&(Ke.current=!1,tr.current=null,Kr(null))},[Us]);const gc=!!Pe&&En.isPending,vc=C.useMemo(()=>{const Y=new Set;for(const _e of kn.busySessions)(kn.messagesBySession[_e]??[]).some(ke=>ke.parts.some(ye=>ye.type==="prompt"&&ye.prompt&&!ye.prompt.resolved&&ye.prompt.nativeId))&&Y.add(_e);return Y},[kn.busySessions,kn.messagesBySession]),bc=Pe?vc.has(Pe):!1,ar=Et,_f=ar?ai.get(ar.id):void 0,Gs=C.useMemo(()=>{var Y;for(let _e=wr.length-1;_e>=0;_e--)for(const ke of wr[_e].parts)if(ke.type==="prompt"&&((Y=ke.prompt)==null?void 0:Y.kind)==="plan"&&!ke.prompt.resolved)return{promptId:ke.id,plan:ke.prompt.plan??"",synthesized:!!ke.prompt.synthesized};return null},[wr]),oo=C.useMemo(()=>Pe?XWr(wr,ar==null?void 0:ar.harness,kn.busySessions.has(Pe)):null,[wr,ar==null?void 0:ar.harness,Pe,kn.busySessions]),ui=Ca&&!oo,eh=Y=>{if(oo||Ca)return!1;const _e=bj(Y),ke=eo.find(ye=>ye.name===Y7(_e??Y));return!ke||ke.source!=="command"?!!ke:_e&&g3(_e)?_e==="plan"||rn.trim().toLowerCase().startsWith(`/${Y}`):rn.trim().toLowerCase()===`/${Y}`},vo=C.useMemo(()=>eo.filter(Y=>Y.source!=="command"),[eo]),[Yt,_i]=C.useState(null),ff=Yt&&Yt.sessionId===Pe?Yt:null;C.useEffect(()=>{if(!Yt)return;const Y=kn.busySessions.has(Yt.sessionId),_e=Yt.sessionId===Pe&&Gs&&Gs.promptId!==Yt.promptId;(!Y||_e)&&_i(null)},[Yt,Gs,kn.busySessions,Pe]);const El=C.useMemo(()=>rz(wr),[wr]),df=Cr&&!!(st!=null&&st.supportsSteering)&&!!(st!=null&&st.agentReady)&&!Gs&&!oo&&!El&&dn.length===0&&Un.length===0,Xr=C.useMemo(()=>g&&Pe?(Y,_e,ke)=>g(Y,Pe,_e,ke):void 0,[g,Pe]),fi=C.useMemo(()=>b&&Pe?(Y,_e,ke)=>b(Pe,Y,_e,ke):void 0,[b,Pe]),Nl=C.useMemo(()=>_&&((Y,_e,ke,ye,$e)=>_(Y,Pe??void 0,_e,ke,ye,$e)),[_,Pe]);C.useEffect(()=>{os.current+=1,Ts.current+=1;const Y=(Pe?kn.queuedBySession[Pe]??[]:[]).reduce((_e,ke)=>ke.planMode??_e,void 0);Ke.current=Y!==void 0,tr.current=Y??null,Kr(Y??null),Tr({}),Lt(null)},[Pe]);const $o=l==="chat"&&(wr.length>0||Cr),di=(sn==null?void 0:sn.harness)??null,hi=(sn==null?void 0:sn.model)??null,gs=En.data?null:En.error,vs=l==="chat"&&!L&&!$o&&!t&&!r&&!gc&&!gs,Ea=dt({...l9r(e,di??"claude-code",hi,N()),enabled:vs&&di!==null,subscribed:vs&&di!==null}),oa=(rh=Ea.data)!=null&&rh.blank?ins():((mm=Ea.data)==null?void 0:mm.prompts)??null,Os=di!==null&&Ea.isPending,$u=e===Zm?"demo":"project",Fi=Y=>{Wt(Y),hs(!1),window.requestAnimationFrame(()=>{const _e=xr.current;_e&&(_e.focus(),_e.setSelectionRange(Y.length,Y.length),jr(Y.length))})};C.useEffect(()=>{Sr&&(Wt(Y=>Y||Sr),hs(!1),jr(Sr.length))},[Sr]),C.useEffect(()=>{if(j===0)return;const Y=window.requestAnimationFrame(()=>{const _e=xr.current;_e&&(_e.focus(),_e.setSelectionRange(_e.value.length,_e.value.length),_e.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(Y)},[j]);const hf=C.useId(),Na=e===Zm&&rn===gT&&!kt,pf=C.useCallback(Y=>{const _e=Y.scrollHeight-Y.scrollTop-Y.clientHeight<60;Js.current=_e,ta(_e)},[]),ao=C.useCallback(()=>{var Y;Js.current=!0,ta(!0),(Y=Zs.current)==null||Y.call(Zs)},[]);C.useEffect(()=>{const Y=po.current,_e=Vr.current;if(!Y||!_e)return;const ke=new ResizeObserver(()=>{var ye;Js.current?(ye=Zs.current)==null||ye.call(Zs):ta(Y.scrollHeight-Y.scrollTop-Y.clientHeight<60)});return ke.observe(Y),ke.observe(_e),()=>ke.disconnect()},[$o]);const Iu=C.useCallback(Y=>{Y.currentTarget.blur(),ao()},[ao]);async function mf({queue:Y=!1,starter:_e}={}){var wv,Fr,oh,Bu,Fu,ah;const ke=(_e??rn).trim(),ye=!oo&&_e===void 0?ges(ke,nn==null?void 0:nn.planActivation):null;if(ye&&ye.name!=="plan"){Wt(g3(ye.name)?"":ye.prompt),hs(!1),Yd(ye.name,ye.prompt);return}if(rf||(_e===void 0&&m_({name:"first_action",surface:$u,action:"typed_prompt"}),oi.current))return;const $e=!!ye,yt=!sf,pt=v3(nn==null?void 0:nn.planActivation,$e?yt:void 0,tr.current),Sn=$e&&(st==null?void 0:st.id)==="claude-code"?yt?"plan":"auto":void 0,hn=ye?ye.prompt:ke,jn=dn,ys=Un,aa=ys.map(In=>({text:In.text})),Sc=e,Gi=l;let sh=Pe;const Ra=()=>{const In=ut.current;return Vn(Je.queryKey)&&In.projectId===Sc&&In.activeId===sh&&In.mainView===Gi},Wi=()=>{Ra()&&(Wt(In=>In||ke),zn(In=>In.length?In:jn),nr(In=>In.length?In:ys))};if($e&&!hn&&jn.length===0&&ys.length===0){Wt(""),hs(!1);try{if((st==null?void 0:st.id)==="claude-code")ci(yt?"plan":"auto");else if((nn==null?void 0:nn.planActivation)==="command")await jl(yt);else throw new Error(S1())}catch{Lt(lA()),Wi()}return}const Yr=sn?{...sn,...Sn?{permissionMode:Sn}:{}}:null;Sn&&ci(Sn);let Ki=null;const xs=tr.current;$e&&(nn==null?void 0:nn.planActivation)==="command"&&(Ki=++Ts.current,tr.current=yt,Kr(yt));const jc=()=>{!Ra()||Ki===null||Ts.current!==Ki||(tr.current=xs,Kr(xs))};if(!hn&&jn.length===0&&ys.length===0)return;if((hn||ys.length>0)&&oo&&jn.length===0){Wt(""),nr([]),Gn({promptId:oo,answers:[],note:hn||void 0,annotations:aa}).then(In=>{In||Wi()});return}const gm=JSON.stringify({text:hn,images:jn.map(In=>({mediaType:In.mediaType,name:In.name,dataUrl:In.dataUrl})),annotations:aa,settings:Yr?{model:Yr.model,serviceTier:Yr.serviceTier,permissionMode:Yr.permissionMode,planMode:pt,reasoningLevel:Yr.reasoningLevel}:null}),vf=((wv=Ys.current)==null?void 0:wv.signature)===gm?Ys.current.id:`ct_${crypto.randomUUID()}`;if(Ys.current={signature:gm,id:vf},Cr){if(!Pe||!(st!=null&&st.agentReady)){jc();return}const In=Pe;Wt(""),zn([]),nr([]),kr(null),xn(null);const ia=Yr?{model:Yr.model,serviceTier:Yr.serviceTier,permissionMode:Yr.permissionMode,planMode:(nn==null?void 0:nn.planActivation)==="command"?pt??(Et==null?void 0:Et.planMode):pt,reasoningLevel:Yr.reasoningLevel}:{};Ra()&&Tr({});const Rl=jn.map(ws=>({mediaType:ws.mediaType,dataBase64:ws.dataUrl.slice(ws.dataUrl.indexOf(",")+1),name:ws.name}));try{(Fr=(await go(()=>B5(In,hn,ia,Rl.length?Rl:void 0,aa,vf,df&&!Y&&!$e?"steer":void 0))).turn)!=null&&Fr.existing&&await sa(In),Ra()&&ho(lg),((oh=Ys.current)==null?void 0:oh.id)===vf&&(Ys.current=null)}catch{jc(),Wi()}return}if(!(st!=null&&st.agentReady)){jc();return}if(!Yr){jc();return}let bi=Pe;try{Wt(zr=>zr===rn?"":zr),zn(zr=>zr===jn?[]:zr),nr(zr=>zr===ys?[]:zr),kr(null),xn(null),oi.current=!0;try{if(!bi){const Cc=await yc(Yr,pt);bi=Cc.id,sh=Cc.id}if(!Vn(Je.queryKey))return;const zr=Xc(bi);await et.fetchQuery({...zr,...((Bu=et.getQueryState(zr.queryKey))==null?void 0:Bu.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{oi.current=!1}if(!Vn(Je.queryKey))return;on({type:"optimisticUser",sessionId:bi,text:hn||K5e(),attachments:jn.map(zr=>({url:zr.dataUrl,mediaType:zr.mediaType,name:zr.name})),annotations:ys}),on({type:"busy",sessionId:bi,busy:!0}),Ra()&&ao(),Ra()&&je==="archived"&&Be("active");const In=Yr?{model:Yr.model,serviceTier:Yr.serviceTier,permissionMode:Yr.permissionMode,planMode:pt,reasoningLevel:Yr.reasoningLevel}:{};Ra()&&Tr({});const ia=jn.map(zr=>({mediaType:zr.mediaType,dataBase64:zr.dataUrl.slice(zr.dataUrl.indexOf(",")+1),name:zr.name})),Rl=bi;if(!Rl)throw new Error(dKe());(Fu=(await go(()=>B5(Rl,hn,In,ia.length?ia:void 0,aa,vf))).turn)!=null&&Fu.existing&&await sa(Rl),Ra()&&ho(lg),((ah=Ys.current)==null?void 0:ah.id)===vf&&(Ys.current=null)}catch(In){if(!Vn(Je.queryKey)||(Wi(),jc(),!bi))return;const ia=In instanceof Error?In.message:String(In);if(!/session is busy/i.test(ia)&&await et.fetchQuery({...Co(e),staleTime:0}).then(ws=>{var ih;return!!((ih=ws.find(zr=>zr.id===bi))!=null&&ih.busy)}).catch(()=>!1)){Ra()&&(Wt(ws=>ws===hn?"":ws),zn(ws=>ws===jn?[]:ws),nr(ws=>ws===ys?[]:ws));return}on({type:"busy",sessionId:bi,busy:!1}),on({type:"localError",sessionId:bi,text:O7e({error:Ee(ia)})})}}async function yc(Y,_e){const ke=ut.current,ye=Tt.current,$e=await $.mutateAsync([e,Y.harness,{model:Y.model,serviceTier:Y.serviceTier,permissionMode:Y.permissionMode,planMode:_e,reasoningLevel:Y.reasoningLevel,autonomy:R}]);return Tt.current===ye&&(At(yt=>[$e,...yt.filter(pt=>pt.id!==$e.id)]),et.getQueryData(Je.queryKey)||so(!0)),Tt.current===ye&&ut.current===ke&&(Jt.current($e.id,{replace:!0}),ut.current={...ke,activeId:$e.id}),$e}function th(){const Y=Hes(rn);Wt(Y),window.requestAnimationFrame(()=>{var _e,ke;(_e=xr.current)==null||_e.focus(),(ke=xr.current)==null||ke.setSelectionRange(Y.length,Y.length),jr(Y.length)})}async function Pu(){const Y=Pi;if(!Y)return;if(Lt(null),Cr){Lt(MSe());return}const _e=rn,ke=ut.current;let ye=Pe;const $e=()=>{const hn=ut.current;return hn.projectId===ke.projectId&&hn.activeId===ye&&hn.mainView===ke.mainView},yt=()=>{$e()&&Wt(hn=>hn||_e)};Wt(""),hs(!1);let pt=Pe;if(!pt){if(!(st!=null&&st.agentReady)||!sn){yt(),Lt(S1());return}try{const hn=v3(nn==null?void 0:nn.planActivation,void 0,tr.current);pt=(await yc(sn,hn)).id,ye=pt,$e()&&Tr({})}catch(hn){yt();const jn=hn instanceof Error?hn.message:String(hn);$e()&&Lt(MN({error:Ee(jn)}));return}}$e()&&je==="archived"&&Be("active");const Sn=`${sd}shell-${Date.now()}`;on({type:"localShell",sessionId:pt,id:Sn,command:Y}),$e()&&ao();try{const{message:hn}=await cEr(pt,Y);on({type:"upsertMessage",sessionId:pt,message:hn})}catch(hn){const jn=hn instanceof Error?hn.message:String(hn);on({type:"localShell",sessionId:pt,id:Sn,command:Y,error:MN({error:Ee(jn)})})}}function bo(){Pe&&fEr(Pe).catch(()=>{Lt(JKe())})}const Al=C.useCallback(async(Y,_e)=>{if(!(!Pe||To.current)){To.current=!0,Lt(null),si(Y);try{const ke=sKr({model:qs.model,serviceTier:qs.serviceTier,permissionMode:qs.permissionMode,planMode:qs.planMode,reasoningLevel:qs.reasoningLevel}),ye=Pe;(await lEr(ye,Y,_e,ke)).turn.existing&&await sa(ye),ho(lg)}catch{Lt(MGe())}finally{To.current=!1,si(null)}}},[Pe,qs,sa]),io=C.useCallback((Y,_e)=>{if(!Pe||Cr||!(st!=null&&st.agentReady))return;const ke=Pe;on({type:"busy",sessionId:ke,busy:!0}),ao(),go(()=>uEr(ke,Y,_e)).catch(ye=>{on({type:"busy",sessionId:ke,busy:!1});const $e=ye instanceof Error?ye.message:String(ye);on({type:"localError",sessionId:ke,text:JGe({error:Ee($e)})})})},[Pe,Cr,st==null?void 0:st.agentReady,ao,go]),Hi=C.useCallback(Y=>{if(!Pe||Cr)return;const _e=Pe,ke=Di.current;on({type:"activeLeaf",sessionId:_e,leafId:Y}),go(()=>_Er(_e,Y)).catch(ye=>{on({type:"activeLeaf",sessionId:_e,leafId:ke});const $e=ye instanceof Error?ye.message:String(ye);on({type:"localError",sessionId:_e,text:lVe({error:Ee($e)})})})},[Pe,Cr,go]);function J(Y){if(!Pe)return;const _e=Pe;sEr(_e,Y).then(({removed:ke})=>{if(ke)return sa(_e)}).catch(()=>Lt(qGe()))}async function fe(Y){if(!Pe||ds)return;const _e=Pe;Lt(null),Rs(Y);try{await oEr(_e,Y),await sa(_e)}catch{Lt(bWe())}finally{Rs(null)}}const we=C.useRef(!1);C.useEffect(()=>{const Y=_e=>{we.current=j3(_e.target)};return document.addEventListener("pointerdown",Y,!0),()=>document.removeEventListener("pointerdown",Y,!0)},[]),C.useEffect(()=>{if(!Cr||l!=="chat")return;function Y(_e){var ye;_e.key!=="Escape"||_e.defaultPrevented||(_e.target===document.body?we.current:j3(_e.target))!==L||(_e.preventDefault(),bo(),(ye=xr.current)==null||ye.focus())}return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[Cr,Pe,l,L]);function Me(Y){kx(Y),zt.current.delete(Y),sr.current===Y&&(sr.current=null),ut.current.projectId===e&&ut.current.activeId===Y&&ut.current.mainView==="chat"&&(Wt(""),zn([]),nr([]),Jt.current(null,{replace:!0})),ln(_e=>{if(!_e.has(Y))return _e;const ke=new Set(_e);return ke.delete(Y),ke}),Rr.current.delete(Y)}function Te(Y,_e){const ke=Co(Y.projectId);ji(et,ke.queryKey,Y.id),ns(ke.queryKey,ye=>ye==null?void 0:ye.map($e=>$e.id===Y.id?{...$e,..._e}:$e))}function mt(Y,_e){const ke=Y.archived;Te(Y,{archived:_e}),F.mutateAsync([Y.id,_e]).catch(()=>{Te(Y,{archived:ke})})}function _t(Y,_e){const ke=Y.title;Te(Y,{title:_e}),U.mutateAsync([Y.id,_e]).catch(()=>{Te(Y,{title:ke})})}async function $t(Y){var ke;const _e=((ke=Y.title)==null?void 0:ke.trim())||Eb();if(window.confirm(r6e({title:su(_e)}))){try{await G.mutateAsync(Y.id)}catch(ye){tn(d6e({title:su(_e),error:Ee(ye instanceof Error?ye.message:String(ye))}),"error");return}Me(Y.id)}}const Gn=C.useCallback(Y=>{if(!Pe)return Promise.resolve(!1);const _e=Pe;return on({type:"busy",sessionId:_e,busy:!0}),go(()=>dEr(_e,Y)).then(()=>!0).catch(()=>!1).finally(()=>{Vn(Je.queryKey)&&(et.fetchQuery({...Xc(_e),staleTime:0}).catch(()=>{}),et.fetchQuery({...Co(e),staleTime:0}).catch(()=>{}))})},[Pe,e,go,Je]),_r=/Mac|iPhone|iPad/.test(navigator.platform),co=_r?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",Qr=_r?"⌘ Enter":"Ctrl + Enter",pi=C.useCallback(()=>{Be("active"),E(null)},[E]),Aa=C.useCallback(async()=>{try{const _e=(await et.fetchQuery({...ET(),staleTime:0})).reduce((ke,ye)=>!ke||ye.lastActivityAt>ke.lastActivityAt?ye:ke,void 0);Be("active"),E(null,{projectId:(_e==null?void 0:_e.projectId)??e})}catch(Y){tn(Y instanceof Error?Y.message:String(Y),"error")}},[e,E]),Io=C.useCallback(async Y=>{const _e=Tt.current,ke=ut.current;try{const ye=await X8r(Y);if(Tt.current!==_e||ut.current!==ke)return;Be("all"),E(Y,{projectId:ye.projectId})}catch(ye){if(Tt.current!==_e||ut.current!==ke)return;tn(ye instanceof Error?ye.message:String(ye),"error")}},[E]);C.useEffect(()=>{if(L)return;const Y=_e=>{_e.repeat||_e.key!=="Enter"||!_e.metaKey&&!_e.ctrlKey||_e.altKey||!_e.shiftKey||j3(_e.target)||(_e.preventDefault(),Aa())};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[Aa,L]);const xc=(Y,_e)=>Y.id===e?kn.busySessions.has(_e.id):_e.busy,Mr=[];if(ne==="projects"&&Ie.forEach((Y,_e)=>{const ke=Ae[_e],$e=(Y.id===e?at:ke.data??ID).filter(jn=>!jn.sideParentSessionId&&(ens(je,jn.archived)||jn.id===Pe)).sort((jn,ys)=>ys.updatedAt-jn.updatedAt),yt=Gt[Y.id]??6;let pt=$e.slice(0,yt);const Sn=$e.find(jn=>jn.id===Pe);Sn&&!pt.some(jn=>jn.id===Pe)&&(pt=[...pt.slice(0,yt-1),Sn]);const hn=me.includes(Y.id);Mr.push({kind:"project",project:Y,collapsed:hn,busy:hn&&$e.some(jn=>xc(Y,jn)&&!vc.has(jn.id))}),!hn&&(pt.forEach(jn=>Mr.push({kind:"chat",project:Y,session:jn})),$e.length>yt&&Mr.push({kind:"more",project:Y}),!pt.length&&(ne==="projects"||ke.isPending||ke.error)&&Mr.push({kind:"status",project:Y,pending:ke.isPending,error:!!ke.error,retry:()=>{ke.refetch()}}))}),ne==="list"){const Y=((bs=Xe.data)==null?void 0:bs.pages.flatMap(ye=>ye.sessions))??[],_e=at.find(ye=>ye.id===Pe);_e&&!Y.some(ye=>ye.id===_e.id)&&Y.push(_e),Y.filter(ye=>!Kc.has(ye.id)).sort((ye,$e)=>$e.updatedAt-ye.updatedAt).forEach(ye=>{const $e=ie.find(yt=>yt.id===ye.projectId);$e&&Mr.push({kind:"chat",project:$e,session:ye})});const ke=Ze??ie[0];ke&&(!Mr.length||Xe.isFetchingNextPage||Xe.isError)&&Mr.push({kind:"status",project:ke,pending:Xe.isPending||Xe.isFetchingNextPage,error:Xe.isError,retry:()=>{Xe.isFetchNextPageError?Xe.fetchNextPage():Xe.refetch()}})}const mi=ne==="list"||Ve,hm=rO(Mr,ht,Pe),Po=hm.lengthY+Rg(_e),0),kc=Y=>Y.kind==="chat"?Y.session.id:`${Y.kind}:${Y.project.id}`,Ws=uG({count:Mr.length,getScrollElement:()=>Fe.current,getItemKey:Y=>kc(Mr[Y]),estimateSize:Y=>Rg(Mr[Y]),overscan:5,rangeExtractor:Y=>{const _e=C7(Y),ke=Mr.findIndex(ye=>kc(ye)===Vt);return ke<0||_e.includes(ke)?_e:[..._e,ke].sort((ye,$e)=>ye-$e)},enabled:mi&&a&&!L}),Bo=Ws.getVirtualItems(),qi=((fr=Bo.at(-1))==null?void 0:fr.index)??-1;C.useEffect(()=>{ne==="list"&&a&&!L&&qi>=Mr.length-6&&Xe.hasNextPage&&!Xe.isFetching&&!Xe.isError&&Xe.fetchNextPage()},[ne,a,L,qi,Mr.length,Xe.hasNextPage,Xe.isFetching,Xe.isError,Xe.fetchNextPage]);const Ta=f.jsxs("aside",{className:"session-rail w-75 shrink-0 flex flex-col mt-5 mac-titlebar:mt-8 me-3.5 mb-5 ms-0 bg-background min-h-0 [&_.rail-body]:flex-1 [&_.rail-body]:min-h-0 [&_.rail-body]:pt-0 [&_.rail-body]:pb-0 [&_.rail-body]:ps-2 [&_.rail-body]:pe-1 border border-border rounded-lg overflow-visible shadow-elevated",children:[o,f.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[f.jsxs("button",{className:"rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start hover:bg-surface [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":co,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Aa,children:[f.jsx(Bd,{size:15}),v5()]}),f.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${l==="skills"?"active":""}`,onClick:()=>d("skills"),children:[f.jsx(jH,{size:15}),vTe()]}),ces.map(Y=>f.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${l!=="chat"&&l!=="skills"&&Y.activeTabs.includes(l)?"active":""}`,"data-onboarding":Y.id==="compute"?"nav-compute":void 0,onClick:()=>d(Y.id),children:[Y.icon,Y.label()]},Y.id))]}),f.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-0 ps-4.5",children:[f.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:ne==="projects"?C6():II()}),f.jsxs("div",{className:"rail-section-actions flex items-center gap-0.5",children:[c&&f.jsx(tv,{interactive:!0,content:fy(),className:"rounded-sm",children:f.jsx(Rt,{size:"small",className:"text-subtext","aria-label":fy(),onClick:c,children:f.jsx(fDr,{size:15,className:"text-subtext"})})}),f.jsx(nns,{value:je,onChange:Be,grouping:ne,onGroupingChange:Y=>{W(Y);try{localStorage.setItem("sidebar-grouping",Y)}catch{}Re(!1),Le({}),Fe.current&&(Fe.current.scrollTop=0)}})]})]}),f.jsxs("div",{className:"relative flex-1 min-h-0",children:[f.jsx("div",{ref:Fe,tabIndex:-1,className:`rail-body h-full overflow-x-hidden ${mi?"overflow-y-auto":"overflow-y-hidden"}`,children:f.jsxs("div",{className:"relative",style:{height:(mi?Ws.getTotalSize():gf)+(wc?38:0)+(Ve?46:0)},children:[(mi?Bo.map(Y=>({row:Mr[Y.index],top:Y.start,index:Y.index})):Tl.map((Y,_e)=>({row:Y,top:0,index:_e}))).map(({row:Y,top:_e,index:ke})=>{var yt;const ye=Y.project,$e=Y.kind==="chat"?Y.session:null;return f.jsx("div",{"data-index":ke,onFocusCapture:()=>Ut(kc(Y)),onBlurCapture:pt=>{pt.currentTarget.contains(pt.relatedTarget)||Ut(null)},className:mi?"absolute top-0 start-0 w-full":"relative",style:{height:Rg(Y),transform:mi?`translateY(${_e}px)`:void 0},children:Y.kind==="project"?f.jsx("div",{className:"group h-9 flex items-end gap-1 rounded-md px-2.5 text-text",children:f.jsx(kWr,{project:ye,chatCount:(yt=ce.find(pt=>pt.projectId===ye.id))==null?void 0:yt.totalAgents,collapsed:Y.collapsed,busy:Y.busy,onToggleCollapsed:()=>{const pt=me.includes(ye.id)?me.filter(Sn=>Sn!==ye.id):[...me,ye.id];be(pt);try{localStorage.setItem("sidebar-collapsed-projects",JSON.stringify(pt))}catch{}},pinned:ae.includes(ye.id),onPin:()=>{const pt=ae.includes(ye.id)?ae.filter(Sn=>Sn!==ye.id):[...ae,ye.id];le(pt);try{localStorage.setItem("sidebar-pinned-projects",JSON.stringify(pt))}catch{}},onRemoved:()=>{ye.id===e&&oe({to:"/projects"})},onNewChat:()=>{ye.id===e?pi():oe({to:"/projects/$projectId/tasks/new",params:{projectId:ye.id}})}})}):$e?f.jsx("div",{className:ne==="projects"?"ms-5.5":void 0,children:f.jsx(ans,{session:$e,active:$e.id===Pe&&l==="chat",unread:er.has($e.id),busy:xc(ye,$e),waiting:vc.has($e.id),revealTitle:ai.get($e.id),onOpen:()=>{if(ye.id===e?E($e.id):oe({to:"/projects/$projectId/tasks/$sessionId",params:{projectId:ye.id,sessionId:$e.id}}),ye.id===Zm){c$r($e.id);const pt=O7r[$e.id];pt&&(m_({name:"demo_experiment_started",kind:"curated",experiment:pt}),m_({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:pt=>_t($e,pt),onSetArchived:pt=>mt($e,pt),onDelete:()=>void $t($e)},$e.id)}):Y.kind==="more"?f.jsx(Oe,{variant:"ghost",size:"small",className:"ms-5.5 font-normal text-subtext",onClick:()=>{Re(!0),Le(pt=>({...pt,[ye.id]:(pt[ye.id]??6)+6}))},children:y5()}):Y.kind==="status"&&f.jsx("div",{className:`flex h-full items-center px-2.5 text-sm text-subtext ${ne==="projects"?"ms-5.5":""}`,children:Y.error?f.jsx(Oe,{size:"small",onClick:Y.retry,children:Xs()}):Y.pending?f.jsx(Nt,{}):je==="archived"?yze():Aze()})},kc(Y))}),wc&&f.jsx("div",{className:"absolute start-0 flex h-9.5 w-full items-center pt-1",style:{top:mi?Ws.getTotalSize():gf},children:f.jsx(Oe,{variant:"ghost",size:"small",className:"text-subtext",onClick:()=>{Re(!0)},children:y5()})}),Ve&&f.jsx("div",{className:"absolute start-0 w-full pt-1",style:{top:Ws.getTotalSize()+(wc?38:0)},children:f.jsx(Oe,{variant:"ghost",size:"small",className:"text-subtext",onClick:()=>{Re(!1),Le({}),Ut(null),Fe.current&&(Fe.current.scrollTop=0,Fe.current.focus())},children:y6()})})]})}),mi&&f.jsxs(f.Fragment,{children:[(Ws.scrollOffset??0)>0&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 z-5 h-3 bg-linear-to-b from-background to-transparent"}),f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-5 h-3 bg-linear-to-t from-background to-transparent"})]})]}),f.jsx(Oq,{runtime:k})]}),gi="chat-header flex items-center gap-2 py-0 px-4 bg-background shrink-0 h-12 relative z-4 w-full max-w-readable my-0 mx-auto [&::after]:content-[''] [&::after]:absolute [&::after]:top-full [&::after]:start-0 [&::after]:end-0 [&::after]:h-6 [&::after]:bg-[linear-gradient(to_bottom,_var(--base),_transparent)] [&::after]:pointer-events-none",vi=!a&&!L&&f.jsx(Rt,{title:sA(),"aria-label":sA(),onClick:i,className:"mac-titlebar:ms-16",children:f.jsx(LH,{size:20})});return l!=="chat"?f.jsxs(f.Fragment,{children:[a&&Ta,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!a&&f.jsx("div",{className:"flex h-12 shrink-0 items-center",children:vi}),f.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:r?f.jsxs("div",{role:"alert",className:"p-6 text-subtext",children:[r,f.jsx(Oe,{onClick:s,children:Xs()})]}):t?f.jsxs(Wr,{className:"p-6",children:[f.jsx(Nt,{}),QN()]}):B})]})]}):f.jsxs(f.Fragment,{children:[a&&Ta,f.jsxs("section",{"data-side-chat":L||void 0,className:`chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 ${L?"":"mt-5"}`,children:[f.jsxs("div",{className:a||L?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] mac-titlebar:grid-cols-[6rem_minmax(0,1fr)_6rem] items-center",children:[vi,f.jsxs("div",{className:gi,children:[f.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:ar&&f.jsxs(f.Fragment,{children:[(Nn=ar.title)!=null&&Nn.trim()?f.jsx(t0,{variant:"header",className:"flex-initial",title:ar.title.trim(),children:f.jsx(UK,{title:ar.title.trim(),animate:_f!==void 0},_f??"static")}):Cr?f.jsx(Nt,{}):null,f.jsx("span",{className:"min-w-0 truncate rounded-md border border-border bg-surface px-2.5 py-0.5 text-sm font-normal text-subtext",title:n,children:n})]})}),x&&f.jsx(Rt,{"data-tip":LN(),"aria-label":LN(),onClick:x,children:f.jsx(POr,{size:15})})]})]}),r?f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[f.jsx("p",{children:r}),f.jsx(Oe,{onClick:s,children:Xs()})]}):gs?f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[f.jsx("p",{children:gs.message}),f.jsx(Oe,{onClick:()=>void En.refetch(),children:Xs()})]}):t||gc?f.jsx("div",{className:"chat-loading flex-1 min-h-0 overflow-hidden [scrollbar-gutter:stable_both-edges]",role:"status","aria-label":QN(),"aria-busy":"true",children:f.jsxs("div",{"aria-hidden":"true",className:"mx-auto flex h-full w-full max-w-readable flex-col gap-6 px-4 pb-8 pt-4 motion-safe:animate-pulse",children:[f.jsx("div",{className:"ms-auto h-14 w-3/5 shrink-0 rounded-lg bg-panel"}),f.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:["w-5/6","w-full","w-11/12","w-2/3","w-full","w-3/4","w-1/2"].map((Y,_e)=>f.jsx("div",{className:`h-3 rounded bg-panel ${Y}`},_e))}),f.jsx("div",{className:"ms-auto h-10 w-2/5 shrink-0 rounded-lg bg-panel"}),f.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:["w-full","w-11/12","w-3/4","w-5/6","w-1/2","w-full","w-5/6","w-11/12","w-2/3","w-3/4","w-1/3"].map((Y,_e)=>f.jsx("div",{className:`h-3 rounded bg-panel ${Y}`},_e))}),f.jsx("div",{className:"ms-auto h-16 w-1/2 shrink-0 rounded-lg bg-panel"})]})}):!$o&&(ar!=null&&ar.sideParentSessionId)?f.jsxs("div",{className:"chat-empty flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center text-subtext",children:[f.jsx(Zg,{size:22}),f.jsx("p",{className:"m-0 text-balance",children:oor()})]}):$o?f.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:po,tabIndex:0,role:"region","aria-label":((Ui=ar==null?void 0:ar.title)==null?void 0:Ui.trim())||Eb(),onScroll:Y=>{pf(Y.currentTarget),Mo.dismiss()},children:f.jsxs("div",{className:"chat-thread-inner max-w-readable my-0 mx-auto pt-4 px-4 pb-8 flex flex-col gap-4",ref:Vr,children:[f.jsx(aK,{projectId:e,sessionId:Pe,children:f.jsx(Jts,{scrollRef:po,scrollToEndRef:Zs,stickToBottom:Js,onPinToBottom:ao,messages:wr,allMessages:Bi,canFork:dm,onFork:io,onSelectFork:Hi,busy:Cr,onOpenFile:Nl,onOpenRun:p,onOpenSpawnedSession:Io,runExperimentName:m,onOpenExperiment:w,experimentName:y,onRespond:Gn,onOpenPlan:Xr,onOpenSubagent:fi,recoveringTurnId:Jo,onRecover:Al,skills:vo},Pe)}),Cr&&bc&&f.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:Dqe()}),Cr&&!bc&&!lf&&!Zd&&f.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:f.jsx("span",{className:"tool-running-shimmer",children:NVe()})})]})}):f.jsxs("div",{className:"chat-empty flex-1 flex flex-col items-center justify-center text-text p-8 text-center [&_h2]:m-0 [&_h2]:text-5xl [&_h2]:font-medium [&_h2]:tracking-[-0.015em] [&_h2]:text-text",children:[f.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:f.jsx(Kx,{})}),f.jsx("h2",{children:Gqe()}),Os&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:qD,"aria-hidden":"true",children:HD.map((Y,_e)=>f.jsxs("div",{className:`flex min-h-22 animate-pulse flex-col items-start justify-center gap-2.5 rounded-xl border bg-background px-5 py-4 ${C3[_e].box}`,children:[f.jsxs("span",{className:`flex w-full items-center gap-2.5 ${C3[_e].icon}`,children:[f.jsx(Y,{size:17}),f.jsx("span",{className:"h-3.5 w-2/5 rounded bg-panel"})]}),f.jsx("span",{className:"h-3 w-4/5 rounded bg-panel"})]},_e))}),f.jsxs(Wr,{className:"mt-3",role:"status",children:[f.jsx(Nt,{}),f.jsx("span",{children:_He()})]})]}),oa&&oa.length>0&&f.jsx("div",{className:qD,role:"group","aria-label":xHe(),children:oa.map((Y,_e)=>{const ke=HD[_e],ye=C3[_e],$e=yt=>{m_({name:"project_starter_clicked",slot:_e+1}),m_({name:"first_action",surface:$u,action:"starter_click"});const pt=!rn.trim()&&dn.length===0&&Un.length===0;yt||!(st!=null&&st.agentReady)||!pt?Fi(Y.prompt):mf({starter:Y.prompt})};return f.jsxs("div",{className:"relative min-w-0",children:[f.jsxs("button",{type:"button",className:`flex h-full min-h-22 w-full min-w-0 cursor-pointer flex-col items-start justify-center gap-1.5 rounded-xl border bg-background py-4 ps-5 pe-11 text-start font-sans transition-colors duration-120 ease-standard hover:bg-surface ${ye.box}`,onClick:()=>$e(!1),children:[f.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[f.jsx(ke,{size:17,className:ye.icon}),Y.title]}),f.jsx("span",{className:"w-full truncate text-sm text-subtext",children:Y.prompt})]}),f.jsx(Rt,{size:"small",className:"absolute end-2.5 top-2.5 [&:hover:not(:disabled)]:bg-surface-bright","aria-label":oA({title:Y.title}),title:oA({title:Y.title}),onClick:()=>$e(!0),children:f.jsx(Fx,{size:13})})]},_e)})})]}),Mo.action&&f.jsxs(Oe,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:Mo.action.x,top:Mo.action.top,transform:"translateX(-50%)"},onMouseDown:Y=>Y.preventDefault(),onClick:Mo.add,children:[f.jsx(OH,{size:14}),a9e()]}),f.jsxs("div",{inert:t||!!r||gc,className:"composer px-3 pb-5 shrink-0 relative z-4 bg-background w-full max-w-readable my-0 mx-auto [&_textarea]:border-0 [&_textarea]:bg-none [&_textarea]:bg-transparent [&_textarea]:resize-none [&_textarea]:pt-2.5 [&_textarea]:px-3 [&_textarea]:pb-1 [&_textarea]:text-base [&_textarea]:field-sizing-content [&_textarea]:min-h-18 [&_textarea]:max-h-45",children:[$o&&f.jsx(Rt,{className:`absolute bottom-full left-1/2 z-5 mb-6 h-9 w-9 -translate-x-1/2 rounded-full border border-border bg-background shadow-control transition-opacity duration-150 ease-standard ${Ro?"opacity-0":"opacity-100"}`,title:cA(),"aria-label":cA(),inert:Ro,onClick:Iu,children:Cr&&!bc?f.jsx(em,{size:18,className:"tool-running-shimmer-icon"}):f.jsx(wOr,{size:16})}),Gs&&!(ff&&Gs.promptId===ff.promptId)&&f.jsx(pJr,{synthesized:Gs.synthesized,agentLabel:ar?g_[ar.harness]:bVe(),showResumeModes:(ar==null?void 0:ar.harness)==="claude-code",onView:Y=>Xr==null?void 0:Xr(Gs.plan,Gs.promptId,Y),onApprove:Y=>Gn({promptId:Gs.promptId,approve:!0,...Y?{resumeMode:Y}:{}}),onReject:()=>Gn({promptId:Gs.promptId,approve:!1}),onRevise:Y=>{Pe&&_i({sessionId:Pe,promptId:Gs.promptId}),Gn({promptId:Gs.promptId,approve:!1,note:Y})}}),Us.length>0&&f.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:Us.map((Y,_e)=>f.jsxs("div",{className:"queued-chip flex flex-wrap items-center gap-x-2 gap-y-1 py-1.5 px-2.5 text-sm text-subtext bg-background border border-border rounded-sm",title:Y.error?`${Y.text} +`),i=r?OI():s&&o!==null?qSe({code:fn(o)}):null;return f.jsx("div",{className:"msg-shell ms-auto self-end flex w-full max-w-[88%] flex-col items-stretch gap-1.5",children:f.jsxs("div",{dir:"ltr",className:"max-w-full bg-panel rounded-[16px] py-2.5 px-[15px] text-base",children:[f.jsxs("div",{className:"flex items-start gap-2 font-mono text-sm text-text whitespace-pre-wrap wrap-anywhere",children:[f.jsxs("span",{className:"sr-only",children:[PI()," "]}),f.jsx(Fd,{size:16,strokeWidth:1.6,className:`mt-0.5 shrink-0 ${s?"text-accent-red":"text-muted"}`,"aria-hidden":"true"}),f.jsx("span",{children:t})]}),a&&f.jsx("div",{className:`${J7} mt-2`,children:a.slice(0,2e4)}),i&&f.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:i})]})})}function Ub(e,n){var k,x;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:o,onOpenSpawnedSession:a,runExperimentName:i,onOpenExperiment:c,experimentName:l,onRespond:d,onOpenPlan:_,onOpenSubagent:p,predictTextTail:m=!1}=n,w=e.filter(j=>j.type!=="steer"&&$p(j,t)).at(-1),y=[];let g=[];const b=()=>{g.length!==0&&(y.push(f.jsx($ts,{parts:g,pendingTail:g.some(j=>j.id===r),onOpenFile:s,onOpenRun:o,onOpenSpawnedSession:a,runExperimentName:i,onOpenExperiment:c,experimentName:l},`tg-${g[0].id}`)),g=[])};for(const j of e)if($p(j,t)){if(j.type==="tool"&&(Vts(j.tool)||(((k=j.children)==null?void 0:k.length)??0)>0)){b(),y.push(f.jsx(Qts,{part:j,pendingTail:m&&((x=j.state)==null?void 0:x.status)==="running"||j.id===r,onOpenSubagent:p},j.id));continue}if(j.type==="tool"){g.push(j);continue}b(),j.type==="text"?y.push(f.jsx(rl,{text:j.text,onOpenFile:s,onOpenRun:o,predict:m&&j.id===(w==null?void 0:w.id)},j.id)):j.type==="steer"?y.push(f.jsx("div",{dir:"auto",role:"note","aria-label":tUe(),className:"msg-steer my-2 ms-auto w-fit max-w-[88%] bg-panel rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere",children:j.text},j.id)):j.type==="prompt"&&j.prompt&&y.push(f.jsx(Its,{part:j,onRespond:d,onOpenFile:s,onOpenPlan:_},j.id))}return b(),y}function Kts(e){return Cd(e).label}function Vts(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function qK(e){var t,r;const n=((t=e.state)==null?void 0:t.status)==="completed"?((r=e.state)==null?void 0:r.output)??"":"";return n.startsWith("Async agent launched")?"":n}function nx(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&nx(t.children,n);if(r)return r}return null}function Xts({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:o,onOpenSubagent:a}){var w,y,g,b;const i=e.children??[],c=((w=e.state)==null?void 0:w.status)==="running",l=((y=e.state)==null?void 0:y.status)==="error",d=l?Pw(((g=e.state)==null?void 0:g.error)||((b=e.state)==null?void 0:b.output)||""):"",_=Ub(i,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:o,onOpenSubagent:a,predictTextTail:c,pendingTailToolId:c?_G(i):null}),m=i.some(k=>k.type==="text"&&!!k.text)?"":qK(e);return f.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[l&&f.jsxs("span",{className:"sr-only",children:[m6()," "]}),d&&f.jsx("div",{className:J7,children:d.slice(0,2e4)}),_.length===0&&!m&&!d?f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?g6():uze()}):f.jsxs(f.Fragment,{children:[_,m&&f.jsx(rl,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function Qts({part:e,pendingTail:n,onOpenSubagent:t}){var l,d,_,p;const r=((l=e.state)==null?void 0:l.status)==="error",s=Pw(((d=e.state)==null?void 0:d.error)||((_=e.state)==null?void 0:_.output)||""),o=n&&!r?tz(Cd(e)):Cd(e),a=FK(!!(n&&!r)),i=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!qK(e),c=f.jsxs(f.Fragment,{children:[r&&f.jsxs("span",{className:"sr-only",children:[m6()," "]}),r?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(EH,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):f.jsx(tx,{activity:o,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),f.jsx("span",{className:`${NK} ${a?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:o.label})]});return i?f.jsx("div",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 text-text text-base text-start rounded-sm",children:c}):f.jsxs("button",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 cursor-pointer text-text text-base text-start rounded-sm [&:hover:not(:disabled)]:bg-surface [&:disabled]:cursor-default",title:r&&s?s:C8e(),...rs(m=>t==null?void 0:t(e.id,o.label,m)),disabled:!t,children:[c,f.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:f.jsx(ei,{size:12})})]})}function Yts(e){const n=new Map;let t;for(let s=e.length-1;s>=0;s--)if(e[s].role==="assistant"){t=e[s];break}if(!t)return{messageId:"",states:n};const r=(s,o)=>{var a,i;for(const c of s){const l=`${o}/${c.id}`;c.type==="tool"&&((a=c.state)!=null&&a.status)&&n.set(l,{status:c.state.status,part:c}),(i=c.children)!=null&&i.length&&r(c.children,l)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function rz(e){const n=(t,r)=>{var s;for(const o of t){const a=o.prompt;if(o.type==="prompt"&&(a==null?void 0:a.kind)==="permission"&&!a.resolved){const i=a.toolInput??{},l=So(i,"reason","description")||BK(a.tool,i);return{id:o.id,path:`${r}/${o.id}`,label:l}}if((s=o.children)!=null&&s.length){const i=n(o.children,`${r}/${o.id}`);if(i)return i}}return null};for(const t of e){if(t.role!=="assistant")continue;const r=n(t.parts,t.id);if(r)return r}return null}function Zts(e){const[n,t]=C.useState({text:"",sequence:0}),r=C.useRef(null);return C.useEffect(()=>{var w,y,g,b,k;const s=((w=e[0])==null?void 0:w.id)??"",{messageId:o,states:a}=Yts(e),i=rz(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:o,states:a,permissionPath:(i==null?void 0:i.path)??null},t(x=>({text:i?jN({label:su(i.label)}):"",sequence:x.sequence+1}));return}const c=r.current.messageId===o?r.current.states:new Map,l=r.current.permissionPath,d=[...a].filter(([x,j])=>{var z;return((z=c.get(x))==null?void 0:z.status)!==j.status});if(r.current={transcript:s,messageId:o,states:a,permissionPath:(i==null?void 0:i.path)??null},i&&i.path!==l){t(x=>({text:jN({label:su(i.label)}),sequence:x.sequence+1}));return}const _=(y=d.find(([,x])=>fv(x.part)))==null?void 0:y[1].part;if((_==null?void 0:_.id)==="turn-recovery"){const x=gG((b=(g=_.state)==null?void 0:g.input)==null?void 0:b.recoveryAction);t(j=>({text:`${Mve()}${x?` ${x==="retry"?$0e():z0e()}`:""}`,sequence:j.sequence+1}));return}if((_==null?void 0:_.id)==="turn-retry"){t(x=>({text:g0e(),sequence:x.sequence+1}));return}const p=d.filter(([,x])=>x.status==="error");if(p.length>0){const x=p.slice(0,2).map(([,j])=>Cd(j.part).label).join(", ");t(j=>({text:p.length===1?dve({labels:x}):kve({count:fn(p.length),labels:x}),sequence:j.sequence+1}));return}const m=d.filter(([,x])=>x.status==="running");if(m.length>0){const x=(k=m.at(-1))==null?void 0:k[1].part;t(j=>({text:x?tz(Cd(x)).label:K0e(),sequence:j.sequence+1}));return}d.some(([,x])=>x.status==="completed")&&t(x=>({text:rve(),sequence:x.sequence+1}))},[e]),n}const Jts=C.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:o,allMessages:a,canFork:i,onFork:c,onSelectFork:l,busy:d,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:y,experimentName:g,onRespond:b,onOpenPlan:k,onOpenSubagent:x,recoveringTurnId:j,onRecover:z,skills:E}){var I,$,F;wu();const T=((I=rz(n))==null?void 0:I.id)??null,A=C.useMemo(()=>n.filter(U=>Pts(U,T)),[n,T]),R=C.useMemo(()=>{const U=A.filter(G=>G.role==="user"&&!G.id.startsWith(sd));return VWr(a,n,U,G=>G.startsWith(sd))},[n,A,a]),D=C.useRef(new Set),[L,P]=C.useState(!1),q=C.useCallback(U=>A[U].id,[A]),B=C.useCallback(U=>{if(L)return A.map((oe,ie)=>ie);const G=new Set(C7(U));return A.forEach((oe,ie)=>{D.current.has(oe.id)&&G.add(ie)}),[...G].sort((oe,ie)=>oe-ie)},[A,L]),X=uG({count:A.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:q,estimateSize:()=>400,overscan:1,initialRect:{width:(($=t.current)==null?void 0:$.clientWidth)??0,height:((F=t.current)==null?void 0:F.clientHeight)??0},initialOffset:()=>{var U;return Math.max(0,A.length*400-(((U=t.current)==null?void 0:U.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:B});C.useLayoutEffect(()=>{const U=()=>X.scrollToEnd();return r.current=U,o(),()=>{r.current=null}},[X,r,o]),C.useEffect(()=>{const U=()=>{var ie;const G=window.getSelection();if(!G||G.isCollapsed||!G.rangeCount)return;const oe=G.getRangeAt(0);for(const ce of((ie=t.current)==null?void 0:ie.querySelectorAll("[data-message-id]"))??[])oe.intersectsNode(ce)&&ce.dataset.messageId&&D.current.add(ce.dataset.messageId)};return document.addEventListener("selectionchange",U),()=>document.removeEventListener("selectionchange",U)},[t]);const K=A.at(-1),Z=Zts(n),ee=d?fG(n):null;return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f.jsx("span",{children:Z.text},Z.sequence)}),f.jsx("button",{type:"button",className:"sr-only focus:not-sr-only","aria-pressed":L,onClick:()=>P(U=>!U),children:kKe()}),f.jsx("div",{className:"relative",style:{height:X.getTotalSize()},children:X.getVirtualItems().map(U=>{var ne,W,ae,le,me,be;const G=A[U.index],oe=G.parts.find(fv),ie=(W=(ne=oe==null?void 0:oe.state)==null?void 0:ne.input)==null?void 0:W.turnId,ce=oe?d||j!==null:!1;return f.jsx("div",{"data-index":U.index,"data-message-id":G.id,ref:X.measureElement,className:"absolute left-0 w-full pb-4",style:{top:U.start},onClickCapture:je=>{!(je.target instanceof Element)||!je.target.closest("[data-work-toggle]")||(s.current=!1,X.setOptions({...X.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(G.id),onFocusCapture:()=>D.current.add(G.id),children:f.jsx(qts,{message:G,forkCount:(ae=R.get(G.id))==null?void 0:ae.count,forkIndex:(le=R.get(G.id))==null?void 0:le.index,forkPrevId:(me=R.get(G.id))==null?void 0:me.prevId,forkNextId:(be=R.get(G.id))==null?void 0:be.nextId,forkDisabled:!i,branchDisabled:d,onFork:c,onSelectFork:l,activePermissionId:T,pendingTailToolId:(ee==null?void 0:ee.messageId)===G.id?ee.toolId:null,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:y,experimentName:g,onRespond:b,onOpenPlan:k,onOpenSubagent:x,busy:ce,recoveringTurnId:ie===j?j:null,onRecover:z,skills:E,predictTextTail:d&&G===K&&G.role==="assistant"})},G.id)})})]})}),ens=(e,n)=>e==="all"?!0:e==="archived"?n:!n;function j3(e){return e instanceof Element&&e.closest("[data-side-chat]")!==null}const tns=[{id:"archived",label:$N,railLabel:$N},{id:"active",label:_Ee,railLabel:GI},{id:"all",label:xEe,railLabel:II}];function nns({value:e,onChange:n,grouping:t,onGroupingChange:r}){const{open:s,setOpen:o,ref:a}=ti();return f.jsxs("div",{className:"rail-filter relative inline-flex",ref:a,children:[f.jsx(Rt,{size:"small",className:"rail-filter-btn text-subtext",active:e!=="active",title:VN(),"aria-label":VN(),onClick:()=>o(i=>!i),children:f.jsx(IH,{size:15,className:"text-subtext"})}),s&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-40 p-1 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right",children:[f.jsx("div",{className:"px-2 py-0.5 text-sm text-subtext",children:Rar()}),["projects","list"].map(i=>f.jsxs(gn,{size:"compact",className:"text-sm",onClick:()=>{r(i),o(!1)},children:[f.jsx("span",{children:i==="projects"?C6():Har()}),t===i&&f.jsx(fo,{size:13})]},i)),f.jsx("div",{className:"my-1 border-t border-border"}),f.jsx("div",{className:"px-2 py-0.5 text-sm text-subtext",children:war()}),tns.map(i=>f.jsxs(gn,{size:"compact",className:"text-sm",onClick:()=>{n(i.id),o(!1)},children:[f.jsx("span",{children:i.label()}),e===i.id&&f.jsx(fo,{size:13})]},i.id))]})]})}const rns=14,sns=500,ons=1200;function UK({title:e,animate:n}){return n?f.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?f.jsx("span",{"aria-hidden":!0,children:t},r):f.jsx("span",{"aria-hidden":!0,className:"title-reveal-char inline-block animate-[title-char-in_240ms_ease-out_both] [@media((prefers-reduced-motion:_reduce))]:animate-none",style:{animationDelay:`${Math.min(r*rns,sns)}ms`},children:t},r))}):f.jsx(f.Fragment,{children:e})}function ans({session:e,menuBoundaryRef:n,active:t,unread:r,busy:s,waiting:o,revealTitle:a,onOpen:i,onRename:c,onSetArchived:l,onDelete:d}){var E;const _=C.useRef(null),[p,m]=C.useState(!1),w=((E=e.title)==null?void 0:E.trim())||"Untitled",[y,g]=C.useState(!1),[b,k]=C.useState(""),x=C.useRef(null);function j(){var T;k(((T=e.title)==null?void 0:T.trim())||""),g(!0)}function z(){var A;const T=b.trim();g(!1),T&&T!==(((A=e.title)==null?void 0:A.trim())||"")&&c(T)}return C.useEffect(()=>{var T,A;y&&((T=x.current)==null||T.focus(),(A=x.current)==null||A.select())},[y]),f.jsxs("div",{ref:_,role:"button",tabIndex:0,className:`session-row relative flex items-center gap-2 w-full text-start py-[7px] ps-2.5 pe-1.5 rounded-md text-sm text-text cursor-pointer select-none [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium [&_.session-dot:empty]:hidden [&_.session-dot]:w-4 [&_.session-dot]:inline-flex [&_.session-dot]:items-center [&_.session-dot]:justify-center [&_.session-dot]:shrink-0 [&_.session-title]:flex-1 [&_.session-title]:min-w-0 [&_.session-title]:overflow-hidden [&_.session-title]:[mask-image:linear-gradient(to_right,black_calc(100%_-_16px),transparent)] [&_.session-title]:whitespace-nowrap [&_.session-menu-btn]:hidden [&_.session-menu-btn]:items-center [&_.session-menu-btn]:justify-center [&_.session-menu-btn]:w-4 [&_.session-menu-btn]:h-4 [&_.session-menu-btn]:-my-0.5 [&_.session-menu-btn]:mx-0 [&_.session-menu-btn]:rounded-sm [&_.session-menu-btn]:text-muted [&_.session-menu-btn]:shrink-0 [&_.session-menu-btn:hover]:text-text [&_.session-menu-btn:hover]:bg-panel [&:hover_.session-menu-btn]:inline-flex [&:focus-visible_.session-menu-btn]:inline-flex [&_.session-menu-btn:focus-visible]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-dot]:hidden [&:focus-visible_.session-dot]:hidden [&:has(.session-menu-btn:focus-visible)_.session-dot]:hidden [&.menu-open_.session-dot]:hidden [&_.busy-dot]:w-[7px] [&_.busy-dot]:h-[7px] [&_.busy-dot]:rounded-full [&_.busy-dot]:bg-primary [&_.busy-dot]:animate-[or-pulse_1.2s_infinite] [&_.busy-dot]:shrink-0 [&_.unread-dot]:w-[7px] [&_.unread-dot]:h-[7px] [&_.unread-dot]:rounded-full [&_.unread-dot]:bg-primary [&_.unread-dot]:shrink-0 [&_.busy-dot.waiting]:animate-none [&_.session-title-input]:flex-1 [&_.session-title-input]:min-w-0 [&_.session-title-input]:py-px [&_.session-title-input]:px-[5px] [&_.session-title-input]:-my-0.5 [&_.session-title-input]:mx-0 [&_.session-title-input]:[font:inherit] [&_.session-title-input]:text-text [&_.session-title-input]:bg-background [&_.session-title-input]:border [&_.session-title-input]:border-primary [&_.session-title-input]:rounded-sm [&_.session-title-input]:outline-none [&.editing]:bg-surface [&.editing]:cursor-default [&.editing_.session-menu-btn]:hidden [&.editing_.session-dot]:hidden ${t?"active":""} ${r?"unread":""} ${p?"menu-open":""} ${y?"editing":""}`,title:`${g_[e.harness]}${e.model?` · ${e.model}`:""}`,onClick:()=>{y||(p?m(!1):i())},onKeyDown:T=>{T.target===T.currentTarget&&(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),p?m(!1):i())},children:[y?f.jsx("input",{ref:x,className:"session-title-input","aria-label":tBe(),value:b,onChange:T=>k(T.target.value),onClick:T=>T.stopPropagation(),onBlur:z,onKeyDown:T=>{T.stopPropagation(),T.key==="Enter"?(T.preventDefault(),z()):T.key==="Escape"&&(T.preventDefault(),g(!1))}}):f.jsx("span",{className:"session-title",children:f.jsx(UK,{title:w,animate:a!==void 0},a??"static")}),f.jsx("span",{className:"session-dot",children:s?f.jsx("span",{className:`busy-dot ${o?"waiting":""}`}):r&&f.jsx("span",{className:"unread-dot"})}),f.jsxs(NMr,{open:p,onOpenChange:m,children:[f.jsx(AMr,{asChild:!0,children:f.jsx("button",{className:"session-menu-btn",title:rA(),"aria-label":rA(),onClick:T=>T.stopPropagation(),children:f.jsx(em,{size:14})})}),f.jsxs(TMr,{className:"session-menu",ownerRef:_,collisionBoundary:n.current??void 0,restoreFocus:!y,children:[f.jsx(f4,{onSelect:j,children:f.jsx("span",{children:FI()})}),f.jsx(f4,{onSelect:()=>l(!e.archived),children:f.jsx("span",{children:e.archived?dXe():z5e()})}),f.jsx(f4,{danger:!0,onSelect:d,children:f.jsx("span",{children:BI()})})]})]})]})}const HD=[CH,$H,Fd,nv],ins=()=>[{title:BBe(),prompt:ABe()},{title:aFe(),prompt:QBe()},{title:CFe(),prompt:mFe()},{title:WFe(),prompt:LFe()}],C3=[{box:"border-accent-blue/45",icon:"text-accent-blue"},{box:"border-accent-green/45",icon:"text-accent-green"},{box:"border-accent-amber/45",icon:"text-accent-amber"},{box:"border-primary/45",icon:"text-primary"}],qD="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function cns(e,n){if(!e)return null;const t=e.model??null;return{...e,model:t,serviceTier:vy(n,t,e.serviceTier),reasoningLevel:vB(n,t,e.reasoningLevel)}}function UD({projectId:e,projectName:n,contentLoading:t=!1,contentError:r=null,onRetryContent:s,railHeader:o,railOpen:a,onShowRail:i,onNewProject:c,mainView:l,onSelectMainView:d,onOpenFile:_,onOpenRun:p,runExperimentName:m,onOpenExperiment:w,experimentName:y,onOpenPlan:g,onOpenSubagent:b,runtime:k,onOpenDemoWelcome:x,composerFocusNonce:j=0,activeSessionId:z,onActiveSessionChange:E,preferredAgent:T,onPreferredAgentChange:A,preferredAutonomy:R,onPreferredAutonomyChange:D,embedded:L=!1,onOpenSideChat:P,onRunSetup:q,children:B}){var pm,nh,rh,mm,bs,fr,Nn,Ui;const X=mn({mutationFn:Y=>nEr(...Y)}),K=mn({mutationFn:Y=>Z8r(...Y)}),Z=mn({mutationFn:Y=>tEr(...Y)}),ee=mn({mutationFn:Y=>eEr(...Y)}),I=mn({mutationFn:Y=>G8r(...Y)}),$=mn({mutationFn:Y=>V8r(...Y)}),F=mn({mutationFn:Y=>Q8r(...Y)}),U=mn({mutationFn:Y=>Y8r(...Y)}),G=mn({mutationFn:P5}),oe=q0(),{data:ie=[]}=dt({...pd(),enabled:!L}),{data:ce=[]}=dt({...ET(),enabled:!L}),[ne,W]=C.useState(()=>{try{return localStorage.getItem("sidebar-grouping")==="list"?"list":"projects"}catch{return"projects"}}),[ae,le]=C.useState(()=>{try{const Y=JSON.parse(localStorage.getItem("sidebar-pinned-projects")??"[]");return Array.isArray(Y)?Y.filter(_e=>typeof _e=="string"):[]}catch{return[]}}),[me,be]=C.useState(()=>{try{const Y=JSON.parse(localStorage.getItem("sidebar-collapsed-projects")??"[]");return Array.isArray(Y)?Y.filter(_e=>typeof _e=="string"):[]}catch{return[]}}),[je,Be]=C.useState("active"),[Ve,Re]=C.useState(!1),Fe=C.useRef(null),[ht,bt]=C.useState(0),[Vt,Ut]=C.useState(null),[Gt,Le]=C.useState({});C.useLayoutEffect(()=>{const Y=Fe.current;if(!Y||L)return;const _e=()=>bt(Y.clientHeight),ke=new ResizeObserver(_e);return ke.observe(Y),_e(),()=>ke.disconnect()},[a,L,l]);const ct=new Map(ce.map(Y=>[Y.projectId,Y.lastActivityAt])),lt=[...ie].sort((Y,_e)=>Number(ae.includes(_e.id))-Number(ae.includes(Y.id))||Math.max(ct.get(_e.id)??0,_e.updatedAt)-Math.max(ct.get(Y.id)??0,Y.updatedAt)),xe=ne==="list"||Ve?lt.length:Math.max(1,Math.ceil(ht/36));let Ie=lt.slice(0,xe);const Ze=ie.find(Y=>Y.id===e);Ze&&!Ie.some(Y=>Y.id===e)&&(Ie=[...Ie.slice(0,xe-1),Ze]);const Ae=H$({queries:(ne==="projects"?Ie:[]).map(Y=>({...Co(Y.id),enabled:!L}))}),Xe=JY({queryKey:Mt("listSidebarChatSessions",je),queryFn:({pageParam:Y,signal:_e})=>t9r(je,Y,_e),initialPageParam:null,getNextPageParam:Y=>Y.next??void 0,enabled:!L&&ne==="list"}),Je=C.useMemo(()=>Co(e),[e]),{data:at=ID}=dt(Je),At=C.useCallback(Y=>{ns(Je.queryKey,_e=>{if(!_e)return;const ke=typeof Y=="function"?Y(_e):Y,ye=new Map(_e.map($e=>[$e.id,$e]));for(const $e of ke)ye.get($e.id)!==$e&&ji(et,Je.queryKey,$e.id),ye.delete($e.id);for(const $e of ye.keys())ji(et,Je.queryKey,$e);return ke})},[Je]),Pe=z,Jt=C.useRef(E);Jt.current=E;const Tt=C.useRef({projectId:e});Tt.current.projectId!==e&&(Tt.current={projectId:e});const[er,ln]=C.useState(new Set),[rn,Wt]=C.useState(""),[kt,ss]=C.useState(!1),[Un,nr]=C.useState([]),vn=C.useRef(0),ut=C.useRef({projectId:e,activeId:Pe,mainView:l});(ut.current.projectId!==e||ut.current.activeId!==Pe||ut.current.mainView!==l)&&(ut.current={projectId:e,activeId:Pe,mainView:l});const[dn,zn]=C.useState([]),[Ln,kr]=C.useState(null),[Fn,xn]=C.useState(null),$n=Pe??`${e}:new`,zt=C.useRef(new Map),Ht=C.useRef(B4);Ht.current={draft:rn,attachments:dn,annotations:Un};const rr=e===Zm&&!L&&at.length>0&&at.every(Y=>Y.sideParentSessionId||D7r[Y.id]===Y.activeLeafId)?gT:null,sr=C.useRef(null);rr!==null&&sr.current===null&&Pe!==null&&(sr.current=$n);const Sr=$n===sr.current?rr:null;C.useLayoutEffect(()=>{const Y=zt.current.get($n)??B4;return Ht.current=Y,Wt(Y.draft),zn(Y.attachments),nr(Y.annotations),xn(null),()=>{const _e=oKr(Ht.current,Sr);_e?zt.current.set($n,_e):zt.current.delete($n)}},[$n,Sr]);const[lr,Lt]=C.useState(null),fs=C.useRef(Promise.resolve()),os=C.useRef(0),Ts=C.useRef(0),[Qs,Kr]=C.useState(null),tr=C.useRef(null),Ke=C.useRef(!1),vt=C.useRef(null),[kn,on,En]=a9r(e,l==="chat"?Pe:null),{data:wn=_ns}=dt(mu()),[as,Hs]=C.useState(T);C.useEffect(()=>Hs(T),[T]);const[or,Tr]=C.useState({}),[qs,ho]=C.useState(lg),[Jo,si]=C.useState(null),To=C.useRef(!1),Di=C.useRef(null),[ds,Rs]=C.useState(null),oi=C.useRef(!1),Ys=C.useRef(null),[ai,ea]=C.useState(new Map),Rr=C.useRef(new Map),po=C.useRef(null),Vr=C.useRef(null),Zs=C.useRef(null),Js=C.useRef(!0),[Ro,ta]=C.useState(!0),xr=C.useRef(null),[ef,mo]=C.useState(!1),Li=ti(),Xd=C.useCallback(Y=>{var _e;vn.current+=1,nr(ke=>[...ke,{id:`annotation-${vn.current}`,...Y}]),(_e=xr.current)==null||_e.focus()},[]),Mo=its(Vr,Xd);cts(Un,L?Zes:Yes),C.useEffect(()=>{mo(!1),Mo.dismiss()},[Pe,e,Mo.dismiss]);const[pl,ml]=C.useState(0),[Oo,na]=C.useState(0),[is,hs]=C.useState(!1),[Do,$i]=C.useState(0),[ur,jr]=C.useState(0),cs=C.useRef(!1);function ps(Y){if(!to)return;if(!oo&&Y.source==="command"&&Iw(Y.name)&&Y.name!=="goal"){cf(Y.name,rn,to);return}const _e=Y.name.replace(/@u$/,"^").replace(/@p$/,"~"),ke=Y.source==="command"?1:AD(_e,xr.current),ye=pes(rn,to,_e,ke);Wt(ye.text),window.requestAnimationFrame(()=>{var $e,yt;($e=xr.current)==null||$e.focus(),(yt=xr.current)==null||yt.setSelectionRange(ye.cursor,ye.cursor),jr(ye.cursor)})}function ja(Y){if(!dc)return;const _e=GWr(rn,dc,Y);Wt(_e.text),window.requestAnimationFrame(()=>{var ke,ye;(ke=xr.current)==null||ke.focus(),(ye=xr.current)==null||ye.setSelectionRange(_e.cursor,_e.cursor),jr(_e.cursor)})}function ra(Y){if(fc)return!1;const _e=Y.selectionStart;if(cs.current||_e!==Y.selectionEnd)return!1;const ke=rn.slice(0,_e).replace(/[ \t]+$/,"").length,ye=m3(rn,ke);if(!ye||ye.end!==ke||!eh(ye.query)||_e>ke&&_e-ke!==AD(ye.query,Y))return!1;const $e=ND(rn,{...ye,end:_e});return Wt($e.text),jr($e.cursor),window.requestAnimationFrame(()=>Y.setSelectionRange($e.cursor,$e.cursor)),!0}function gl(Y){kr(null),xn(null);let ye=dn.reduce(($e,yt)=>$e+yt.size,0);for(const $e of Y){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test($e.type))continue;if(Mu&&$e.type.startsWith("image/")){xn((no==null?void 0:no.id)??null);continue}if($e.size>31457280){kr(dSe({name:Ee($e.name)}));continue}if(ye+$e.size>41943040){kr(kSe());continue}ye+=$e.size;const yt=ut.current,pt=$n,Sn=new FileReader;Sn.onload=()=>{const hn={dataUrl:Sn.result,mediaType:$e.type,name:$e.name,size:$e.size};if(ut.current.projectId===yt.projectId&&ut.current.activeId===yt.activeId){zn(ys=>[...ys,hn]);return}const jn=zt.current.get(pt)??B4;zt.current.set(pt,{...jn,attachments:[...jn.attachments,hn]})},Sn.readAsDataURL($e)}}function Ii(Y){const _e=Array.from(Y.clipboardData.items).filter(ke=>ke.kind==="file"&&(ke.type.startsWith("image/")||ke.type==="application/pdf")).map(ke=>ke.getAsFile()).filter(ke=>ke!==null);_e.length>0&&(Y.preventDefault(),gl(_e))}const Et=at.find(Y=>Y.id===Pe),Au=as??M$r(wn),ms=Et?{harness:Et.harness,model:or.model!==void 0?or.model:Et.model,serviceTier:or.serviceTier!==void 0?or.serviceTier:Et.serviceTier,permissionMode:or.permissionMode??Et.permissionMode,reasoningLevel:or.reasoningLevel??Et.reasoningLevel}:Au?{...Au,...or}:null,{data:Tu=uns}=dt(MEr(ms==null?void 0:ms.harness,e)),st=ms?wn.find(Y=>Y.id===ms.harness):void 0,nn=st==null?void 0:st.options,{data:vl}=dt({...L6(),enabled:!!q}),Br=Y=>{if(!st)return;const _e=vl==null?void 0:vl[st.id];if(!(st.id==="claude-code"&&Y===(_e==null?void 0:_e.login)&&!st.loginEligible))return fK(st,_e,Y)},eo=C.useMemo(()=>mes(Tu,nn==null?void 0:nn.planActivation),[Tu,nn==null?void 0:nn.planActivation]),Pi=RD(rn),Ca=Pi!==null,to=m3(rn,ur),_c=(to==null?void 0:to.query)??null,bl=_c===null?[]:eo.filter(Y=>des(Y,_c)),fc=!Ca&&_c!==null&&(to==null?void 0:to.end)===ur&&bl.length>0,za=fc&&!is?bl:[],yl=za.length>0,xl=Math.min(pl,Math.max(0,za.length-1));C.useEffect(()=>ml(0),[_c]);const dc=Ca?null:FWr(rn,ur),un=(dc==null?void 0:dc.end)===ur?dc.query:null,hc=(pm=dt({...ZC(e,Pe?{sessionId:Pe}:{}),enabled:un!==null}).data)==null?void 0:pm.entries,Qd=C.useMemo(()=>qWr(hc??[]),[hc]),pc=C.useMemo(()=>un!==null&&!is?UWr(Qd,un):[],[Qd,un,is]),tf=pc.length>0,Ru=Math.min(Oo,Math.max(0,pc.length-1));C.useEffect(()=>na(0),[un]);const sn=cns(ms,st),nf=Cx(st,sn==null?void 0:sn.model),no=st==null?void 0:st.models.find(Y=>Y.id===(sn==null?void 0:sn.model)),Mu=(no==null?void 0:no.imageInput)===!1?U7e({model:Ee(Nb(no))}):null,rf=!!Mu&&dn.some(Y=>Y.mediaType.startsWith("image/")),ro=!!no&&Fn===no.id,wl=rf||ro?Mu:null;C.useEffect(()=>xn(null),[no==null?void 0:no.id]);const kl=Y=>{if(!sn)return;const _e={...sn,...Y},ke={};Y.model!==void 0&&Y.model!==sn.model&&(ke.model=Y.model),Y.serviceTier!==void 0&&Y.serviceTier!==sn.serviceTier&&(ke.serviceTier=Y.serviceTier),Y.permissionMode!==void 0&&Y.permissionMode!==sn.permissionMode&&(ke.permissionMode=Y.permissionMode),Y.reasoningLevel!==void 0&&Y.reasoningLevel!==sn.reasoningLevel&&(ke.reasoningLevel=Y.reasoningLevel),ho(ye=>({...ye,...ke})),Hs(_e),A(_e).catch(()=>{}),Et?Tr(ye=>({...ye,...Y})):Y.harness&&Y.harness!==sn.harness&&Tr({})},go=C.useCallback(Y=>{const _e=fs.current.catch(()=>{}).then(()=>{if(!Vn(Je.queryKey))throw new DOMException("Workspace changed","AbortError");return Y()});return fs.current=_e.then(()=>{},()=>{}),_e},[Je]),ci=Y=>{if(Y==="plan"&&(st==null?void 0:st.id)==="claude-code"?(ho(ye=>({...ye,permissionMode:Y})),Tr(ye=>({...ye,permissionMode:Y}))):(Tr(ye=>{const $e={...ye};return delete $e.permissionMode,$e}),kl({permissionMode:Y})),!Et)return;const _e=Et.id,ke=++os.current;Lt(null),go(()=>X.mutateAsync([_e,Y])).then(ye=>{At($e=>$e.map(yt=>yt.id===ye.id?ye:yt)),os.current===ke&&Tr($e=>{const yt={...$e};return delete yt.permissionMode,yt})}).catch(()=>{os.current===ke&&(Tr(ye=>{const $e={...ye};return delete $e.permissionMode,$e}),Lt(HXe()))})},_m=Y=>kl({reasoningLevel:Y}),Sl=Y=>{if(!Et){D(Y);return}const _e=Et.id,ke=Et.autonomy,ye=++os.current,$e=yt=>At(pt=>pt.map(Sn=>Sn.id===yt.id?yt:Sn));$e({...Et,autonomy:Y}),Lt(null),go(()=>Z.mutateAsync([_e,Y])).then(yt=>{$e(yt),D(yt.autonomy)}).catch(()=>{At(yt=>yt.map(pt=>pt.id===_e&&pt.autonomy===Y?{...pt,autonomy:ke}:pt)),os.current===ye&&Lt(RXe())})},Ou=((nh=Et==null?void 0:Et.goal)==null?void 0:nh.trim())||"",sf=(sn==null?void 0:sn.harness)==="claude-code"?sn.permissionMode==="plan":(nn==null?void 0:nn.planActivation)==="command"?Qs??(Et==null?void 0:Et.planMode)??!1:!1;C.useEffect(()=>{Qs===null||(Et==null?void 0:Et.planMode)!==Qs||(tr.current=null,Kr(null))},[Et==null?void 0:Et.planMode,Qs]);async function jl(Y){if(ho(ye=>({...ye,planMode:Y})),tr.current=Y,Kr(Y),!Et)return;const _e=Et.id,ke=++Ts.current;Lt(null);try{const ye=await go(()=>K.mutateAsync([_e,Y]));At($e=>$e.map(yt=>yt.id===ye.id?ye:yt)),Ts.current===ke&&(tr.current=null,Kr(null),Lt(null))}catch(ye){throw Ts.current===ke&&(tr.current=null,Kr(null)),ye}}async function fm(){if((sn==null?void 0:sn.harness)==="claude-code"){ci("auto");return}if(Et)try{await jl(!1)}catch{Lt(k6e())}}async function Cl(){const Y=!sf;try{if((sn==null?void 0:sn.harness)==="claude-code")ci(Y?"plan":"auto");else if((nn==null?void 0:nn.planActivation)==="command")await jl(Y);else throw new Error(S1())}catch{Lt(lA())}}function Yd(Y,_e=""){var ke;switch(Y){case"plan":return Cl(),!1;case"new":return L?Et!=null&&Et.sideParentSessionId&&(P==null||P(Et.sideParentSessionId,"")):Aa(),!1;case"resume":return mo(!0),!0;case"model":return $i(ye=>ye+1),!0;case"compact":return af(),!1;case"goal":return li(_e),!1;case"side":return of(_e),!1;case"copy":{const ye=wr.at(-1),$e=Cr&&(ye==null?void 0:ye.role)==="assistant"&&!ye.completedAt,yt=JWr($e?wr.slice(0,-1):wr);return yt?nz(yt):tn(Qze(),"info"),!1}case"export":{const ye=((ke=Et==null?void 0:Et.title)==null?void 0:ke.trim())||Eb(),$e=Et?eKr(ye,wr,{user:J6e(),assistant:g_[Et.harness]}):null;return $e?Fts(tKr(ye),$e):tn(a8e(),"info"),!1}}}function of(Y){L?tn(Cor(),"info"):!Et||!P?tn(mor(),"info"):P(Et.id,Y)}async function zl(Y){Lt(null);const _e=Tt.current;try{const ke=await I.mutateAsync([e,Y]);if(et.invalidateQueries({queryKey:SB().queryKey}),Tt.current!==_e)return;At(ye=>[ke,...ye.filter($e=>$e.id!==ke.id)]),Be("all"),E(ke.id,{projectId:ke.projectId})}catch(ke){if(Tt.current!==_e)return;Lt(h7e({error:Ee(ke instanceof Error?ke.message:String(ke))}))}}async function li(Y){var pt;const _e=Y.trim();if(!_e){const Sn=(pt=Et==null?void 0:Et.goal)==null?void 0:pt.trim();tn(Sn?bCe({goal:su(Sn)}):ICe(),"info");return}const ke=ut.current,ye=()=>ut.current.activeId===ke.activeId;Lt(null);let $e=Pe;if(!$e){if(!(st!=null&&st.agentReady)||!sn){Lt(S1());return}try{$e=(await yc(sn,v3(nn==null?void 0:nn.planActivation,void 0,tr.current))).id}catch(Sn){Lt(DN({error:Ee(Sn instanceof Error?Sn.message:String(Sn))}));return}}const yt=/^(clear|none|off)$/i.test(_e);try{const Sn=await go(()=>ee.mutateAsync([$e,yt?null:_e]));At(hn=>hn.map(jn=>jn.id===Sn.id?Sn:jn)),tn(yt?lCe():VCe(),"success")}catch(Sn){if(!ye())return;Lt(DN({error:Ee(Sn instanceof Error?Sn.message:String(Sn))}))}}async function af(){const Y=Pe;if(!Y){tn(Bze(),"info");return}if(Cr){Lt(vje());return}Lt(null),je==="archived"&&Be("active");const _e=ut.current;try{const{message:ke}=await iEr(Y);on({type:"upsertMessage",sessionId:Y,message:ke})}catch(ke){if(ut.current.activeId!==_e.activeId)return;Lt(Eje({error:Ee(ke instanceof Error?ke.message:String(ke))}))}}function cf(Y,_e,ke){const ye=ND(_e,ke);Wt(ye.text),hs(!0),!Yd(Y)&&window.requestAnimationFrame(()=>{var $e,yt;($e=xr.current)==null||$e.focus(),(yt=xr.current)==null||yt.setSelectionRange(ye.cursor,ye.cursor),jr(ye.cursor)})}const so=C.useCallback(async(Y=!1)=>{const _e=Tt.current;if(_e.projectId!==e||!Vn(Je.queryKey))return null;const ke=(et.getQueryData(Je.queryKey)??[]).map(ye=>ye.id);try{const ye=await et.fetchQuery({...Je,...Y?{staleTime:0}:{}});if(Tt.current!==_e||!Vn(Je.queryKey))return null;const $e=ye.filter(pt=>!Kc.has(pt.id)),yt=new Set($e.map(pt=>pt.id));for(const pt of ke)yt.has(pt)||Me(pt);return Rr.current=new Map($e.map(pt=>[pt.id,pt.title])),$e}catch{return null}},[e]),sa=C.useCallback(async Y=>{Tt.current.projectId!==e||!Vn(Je.queryKey)||await Promise.all([et.fetchQuery({...Xc(Y),staleTime:0}),so(!0)]).catch(()=>{})},[e,so]);C.useEffect(()=>{const Y=eq();ln(e===Zm?new Set([R6,M6].filter(ke=>!Y.has(ke))):new Set),ss(!1),ea(new Map),Rr.current=new Map,so();const _e=Tt.current;return()=>{Tt.current===_e&&(Tt.current={projectId:e})}},[e,so]),C.useEffect(()=>{ho(lg),Ys.current=null},[Pe]),C.useEffect(()=>Kg(Y=>{switch(Y.type){case"session":{if(Y.session.projectId!==e||Kc.has(Y.session.id))return;const _e=Rr.current.has(Y.session.id),ke=Rr.current.get(Y.session.id)!==Y.session.title;Rr.current.set(Y.session.id,Y.session.title),_e&&ke&&Y.session.titleSource==="generated"&&(ea(ye=>{const $e=new Map(ye);return $e.set(Y.session.id,(ye.get(Y.session.id)??0)+1),$e}),window.setTimeout(()=>{ea(ye=>{if(!ye.has(Y.session.id))return ye;const $e=new Map(ye);return $e.delete(Y.session.id),$e})},ons));break}case"sessionDeleted":Me(Y.sessionId);break}}),[e]),C.useEffect(()=>Kg(Y=>{Y.type==="reconnected"&&so(!0)}),[so]);const Bi=Pe?kn.messagesBySession[Pe]??$D:$D,Du=Pe?kn.activeLeafBySession[Pe]??null:null;Di.current=Du;const wr=C.useMemo(()=>WWr(Bi,Du),[Bi,Du]),Ms=C.useRef({projectId:e,ids:kn.busySessions});C.useEffect(()=>{const Y=Ms.current;Ms.current={projectId:e,ids:kn.busySessions},Y.projectId===e&&ln(_e=>ZWr(_e,Y.ids,kn.busySessions,at,l==="chat"?Pe:null))},[e,kn.busySessions,at,Pe,l]);const Cr=Pe?kn.busySessions.has(Pe):!1,dm=!Cr&&!!(st!=null&&st.agentReady),lf=Cr&&fG(wr)!=null,Zd=Cr&&YWr(wr),Us=Pe?kn.queuedBySession[Pe]??[]:[],mc=Us.some(Y=>Y.dispatchState==="retrying"),Jd=Us.findIndex(Y=>Y.dispatchState==="blocked"),Lo=Us.reduce((Y,_e)=>_e.dispatchState!=="retrying"||typeof _e.nextRetryAt!="number"?Y:Y===null?_e.nextRetryAt:Math.min(Y,_e.nextRetryAt),null),[Lu,uf]=C.useState(()=>Date.now());C.useEffect(()=>{if(!mc||Lo===null||(uf(Date.now()),Lo<=Date.now()))return;const Y=window.setInterval(()=>{const _e=Date.now();uf(_e),_e>=Lo&&window.clearInterval(Y)},1e3);return()=>window.clearInterval(Y)},[mc,Lo]),C.useEffect(()=>{const Y=Us.reduce((_e,ke)=>ke.planMode??_e,void 0);Y!==void 0?(Ke.current=!0,tr.current=Y,Kr(Y)):Ke.current&&(Ke.current=!1,tr.current=null,Kr(null))},[Us]);const gc=!!Pe&&En.isPending,vc=C.useMemo(()=>{const Y=new Set;for(const _e of kn.busySessions)(kn.messagesBySession[_e]??[]).some(ke=>ke.parts.some(ye=>ye.type==="prompt"&&ye.prompt&&!ye.prompt.resolved&&ye.prompt.nativeId))&&Y.add(_e);return Y},[kn.busySessions,kn.messagesBySession]),bc=Pe?vc.has(Pe):!1,ar=Et,_f=ar?ai.get(ar.id):void 0,Gs=C.useMemo(()=>{var Y;for(let _e=wr.length-1;_e>=0;_e--)for(const ke of wr[_e].parts)if(ke.type==="prompt"&&((Y=ke.prompt)==null?void 0:Y.kind)==="plan"&&!ke.prompt.resolved)return{promptId:ke.id,plan:ke.prompt.plan??"",synthesized:!!ke.prompt.synthesized};return null},[wr]),oo=C.useMemo(()=>Pe?XWr(wr,ar==null?void 0:ar.harness,kn.busySessions.has(Pe)):null,[wr,ar==null?void 0:ar.harness,Pe,kn.busySessions]),ui=Ca&&!oo,eh=Y=>{if(oo||Ca)return!1;const _e=bj(Y),ke=eo.find(ye=>ye.name===Y7(_e??Y));return!ke||ke.source!=="command"?!!ke:_e&&g3(_e)?_e==="plan"||rn.trim().toLowerCase().startsWith(`/${Y}`):rn.trim().toLowerCase()===`/${Y}`},vo=C.useMemo(()=>eo.filter(Y=>Y.source!=="command"),[eo]),[Yt,_i]=C.useState(null),ff=Yt&&Yt.sessionId===Pe?Yt:null;C.useEffect(()=>{if(!Yt)return;const Y=kn.busySessions.has(Yt.sessionId),_e=Yt.sessionId===Pe&&Gs&&Gs.promptId!==Yt.promptId;(!Y||_e)&&_i(null)},[Yt,Gs,kn.busySessions,Pe]);const El=C.useMemo(()=>rz(wr),[wr]),df=Cr&&!!(st!=null&&st.supportsSteering)&&!!(st!=null&&st.agentReady)&&!Gs&&!oo&&!El&&dn.length===0&&Un.length===0,Xr=C.useMemo(()=>g&&Pe?(Y,_e,ke)=>g(Y,Pe,_e,ke):void 0,[g,Pe]),fi=C.useMemo(()=>b&&Pe?(Y,_e,ke)=>b(Pe,Y,_e,ke):void 0,[b,Pe]),Nl=C.useMemo(()=>_&&((Y,_e,ke,ye,$e)=>_(Y,Pe??void 0,_e,ke,ye,$e)),[_,Pe]);C.useEffect(()=>{os.current+=1,Ts.current+=1;const Y=(Pe?kn.queuedBySession[Pe]??[]:[]).reduce((_e,ke)=>ke.planMode??_e,void 0);Ke.current=Y!==void 0,tr.current=Y??null,Kr(Y??null),Tr({}),Lt(null)},[Pe]);const $o=l==="chat"&&(wr.length>0||Cr),di=(sn==null?void 0:sn.harness)??null,hi=(sn==null?void 0:sn.model)??null,gs=En.data?null:En.error,vs=l==="chat"&&!L&&!$o&&!t&&!r&&!gc&&!gs,Ea=dt({...l9r(e,di??"claude-code",hi,N()),enabled:vs&&di!==null,subscribed:vs&&di!==null}),oa=(rh=Ea.data)!=null&&rh.blank?ins():((mm=Ea.data)==null?void 0:mm.prompts)??null,Os=di!==null&&Ea.isPending,$u=e===Zm?"demo":"project",Fi=Y=>{Wt(Y),hs(!1),window.requestAnimationFrame(()=>{const _e=xr.current;_e&&(_e.focus(),_e.setSelectionRange(Y.length,Y.length),jr(Y.length))})};C.useEffect(()=>{Sr&&(Wt(Y=>Y||Sr),hs(!1),jr(Sr.length))},[Sr]),C.useEffect(()=>{if(j===0)return;const Y=window.requestAnimationFrame(()=>{const _e=xr.current;_e&&(_e.focus(),_e.setSelectionRange(_e.value.length,_e.value.length),_e.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(Y)},[j]);const hf=C.useId(),Na=e===Zm&&rn===gT&&!kt,pf=C.useCallback(Y=>{const _e=Y.scrollHeight-Y.scrollTop-Y.clientHeight<60;Js.current=_e,ta(_e)},[]),ao=C.useCallback(()=>{var Y;Js.current=!0,ta(!0),(Y=Zs.current)==null||Y.call(Zs)},[]);C.useEffect(()=>{const Y=po.current,_e=Vr.current;if(!Y||!_e)return;const ke=new ResizeObserver(()=>{var ye;Js.current?(ye=Zs.current)==null||ye.call(Zs):ta(Y.scrollHeight-Y.scrollTop-Y.clientHeight<60)});return ke.observe(Y),ke.observe(_e),()=>ke.disconnect()},[$o]);const Iu=C.useCallback(Y=>{Y.currentTarget.blur(),ao()},[ao]);async function mf({queue:Y=!1,starter:_e}={}){var wv,Fr,oh,Bu,Fu,ah;const ke=(_e??rn).trim(),ye=!oo&&_e===void 0?ges(ke,nn==null?void 0:nn.planActivation):null;if(ye&&ye.name!=="plan"){Wt(g3(ye.name)?"":ye.prompt),hs(!1),Yd(ye.name,ye.prompt);return}if(rf||(_e===void 0&&m_({name:"first_action",surface:$u,action:"typed_prompt"}),oi.current))return;const $e=!!ye,yt=!sf,pt=v3(nn==null?void 0:nn.planActivation,$e?yt:void 0,tr.current),Sn=$e&&(st==null?void 0:st.id)==="claude-code"?yt?"plan":"auto":void 0,hn=ye?ye.prompt:ke,jn=dn,ys=Un,aa=ys.map(In=>({text:In.text})),Sc=e,Gi=l;let sh=Pe;const Ra=()=>{const In=ut.current;return Vn(Je.queryKey)&&In.projectId===Sc&&In.activeId===sh&&In.mainView===Gi},Wi=()=>{Ra()&&(Wt(In=>In||ke),zn(In=>In.length?In:jn),nr(In=>In.length?In:ys))};if($e&&!hn&&jn.length===0&&ys.length===0){Wt(""),hs(!1);try{if((st==null?void 0:st.id)==="claude-code")ci(yt?"plan":"auto");else if((nn==null?void 0:nn.planActivation)==="command")await jl(yt);else throw new Error(S1())}catch{Lt(lA()),Wi()}return}const Yr=sn?{...sn,...Sn?{permissionMode:Sn}:{}}:null;Sn&&ci(Sn);let Ki=null;const xs=tr.current;$e&&(nn==null?void 0:nn.planActivation)==="command"&&(Ki=++Ts.current,tr.current=yt,Kr(yt));const jc=()=>{!Ra()||Ki===null||Ts.current!==Ki||(tr.current=xs,Kr(xs))};if(!hn&&jn.length===0&&ys.length===0)return;if((hn||ys.length>0)&&oo&&jn.length===0){Wt(""),nr([]),Gn({promptId:oo,answers:[],note:hn||void 0,annotations:aa}).then(In=>{In||Wi()});return}const gm=JSON.stringify({text:hn,images:jn.map(In=>({mediaType:In.mediaType,name:In.name,dataUrl:In.dataUrl})),annotations:aa,settings:Yr?{model:Yr.model,serviceTier:Yr.serviceTier,permissionMode:Yr.permissionMode,planMode:pt,reasoningLevel:Yr.reasoningLevel}:null}),vf=((wv=Ys.current)==null?void 0:wv.signature)===gm?Ys.current.id:`ct_${crypto.randomUUID()}`;if(Ys.current={signature:gm,id:vf},Cr){if(!Pe||!(st!=null&&st.agentReady)){jc();return}const In=Pe;Wt(""),zn([]),nr([]),kr(null),xn(null);const ia=Yr?{model:Yr.model,serviceTier:Yr.serviceTier,permissionMode:Yr.permissionMode,planMode:(nn==null?void 0:nn.planActivation)==="command"?pt??(Et==null?void 0:Et.planMode):pt,reasoningLevel:Yr.reasoningLevel}:{};Ra()&&Tr({});const Rl=jn.map(ws=>({mediaType:ws.mediaType,dataBase64:ws.dataUrl.slice(ws.dataUrl.indexOf(",")+1),name:ws.name}));try{(Fr=(await go(()=>B5(In,hn,ia,Rl.length?Rl:void 0,aa,vf,df&&!Y&&!$e?"steer":void 0))).turn)!=null&&Fr.existing&&await sa(In),Ra()&&ho(lg),((oh=Ys.current)==null?void 0:oh.id)===vf&&(Ys.current=null)}catch{jc(),Wi()}return}if(!(st!=null&&st.agentReady)){jc();return}if(!Yr){jc();return}let bi=Pe;try{Wt(zr=>zr===rn?"":zr),zn(zr=>zr===jn?[]:zr),nr(zr=>zr===ys?[]:zr),kr(null),xn(null),oi.current=!0;try{if(!bi){const Cc=await yc(Yr,pt);bi=Cc.id,sh=Cc.id}if(!Vn(Je.queryKey))return;const zr=Xc(bi);await et.fetchQuery({...zr,...((Bu=et.getQueryState(zr.queryKey))==null?void 0:Bu.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{oi.current=!1}if(!Vn(Je.queryKey))return;on({type:"optimisticUser",sessionId:bi,text:hn||K5e(),attachments:jn.map(zr=>({url:zr.dataUrl,mediaType:zr.mediaType,name:zr.name})),annotations:ys}),on({type:"busy",sessionId:bi,busy:!0}),Ra()&&ao(),Ra()&&je==="archived"&&Be("active");const In=Yr?{model:Yr.model,serviceTier:Yr.serviceTier,permissionMode:Yr.permissionMode,planMode:pt,reasoningLevel:Yr.reasoningLevel}:{};Ra()&&Tr({});const ia=jn.map(zr=>({mediaType:zr.mediaType,dataBase64:zr.dataUrl.slice(zr.dataUrl.indexOf(",")+1),name:zr.name})),Rl=bi;if(!Rl)throw new Error(dKe());(Fu=(await go(()=>B5(Rl,hn,In,ia.length?ia:void 0,aa,vf))).turn)!=null&&Fu.existing&&await sa(Rl),Ra()&&ho(lg),((ah=Ys.current)==null?void 0:ah.id)===vf&&(Ys.current=null)}catch(In){if(!Vn(Je.queryKey)||(Wi(),jc(),!bi))return;const ia=In instanceof Error?In.message:String(In);if(!/session is busy/i.test(ia)&&await et.fetchQuery({...Co(e),staleTime:0}).then(ws=>{var ih;return!!((ih=ws.find(zr=>zr.id===bi))!=null&&ih.busy)}).catch(()=>!1)){Ra()&&(Wt(ws=>ws===hn?"":ws),zn(ws=>ws===jn?[]:ws),nr(ws=>ws===ys?[]:ws));return}on({type:"busy",sessionId:bi,busy:!1}),on({type:"localError",sessionId:bi,text:O7e({error:Ee(ia)})})}}async function yc(Y,_e){const ke=ut.current,ye=Tt.current,$e=await $.mutateAsync([e,Y.harness,{model:Y.model,serviceTier:Y.serviceTier,permissionMode:Y.permissionMode,planMode:_e,reasoningLevel:Y.reasoningLevel,autonomy:R}]);return Tt.current===ye&&(At(yt=>[$e,...yt.filter(pt=>pt.id!==$e.id)]),et.getQueryData(Je.queryKey)||so(!0)),Tt.current===ye&&ut.current===ke&&(Jt.current($e.id,{replace:!0}),ut.current={...ke,activeId:$e.id}),$e}function th(){const Y=Hes(rn);Wt(Y),window.requestAnimationFrame(()=>{var _e,ke;(_e=xr.current)==null||_e.focus(),(ke=xr.current)==null||ke.setSelectionRange(Y.length,Y.length),jr(Y.length)})}async function Pu(){const Y=Pi;if(!Y)return;if(Lt(null),Cr){Lt(MSe());return}const _e=rn,ke=ut.current;let ye=Pe;const $e=()=>{const hn=ut.current;return hn.projectId===ke.projectId&&hn.activeId===ye&&hn.mainView===ke.mainView},yt=()=>{$e()&&Wt(hn=>hn||_e)};Wt(""),hs(!1);let pt=Pe;if(!pt){if(!(st!=null&&st.agentReady)||!sn){yt(),Lt(S1());return}try{const hn=v3(nn==null?void 0:nn.planActivation,void 0,tr.current);pt=(await yc(sn,hn)).id,ye=pt,$e()&&Tr({})}catch(hn){yt();const jn=hn instanceof Error?hn.message:String(hn);$e()&&Lt(MN({error:Ee(jn)}));return}}$e()&&je==="archived"&&Be("active");const Sn=`${sd}shell-${Date.now()}`;on({type:"localShell",sessionId:pt,id:Sn,command:Y}),$e()&&ao();try{const{message:hn}=await cEr(pt,Y);on({type:"upsertMessage",sessionId:pt,message:hn})}catch(hn){const jn=hn instanceof Error?hn.message:String(hn);on({type:"localShell",sessionId:pt,id:Sn,command:Y,error:MN({error:Ee(jn)})})}}function bo(){Pe&&fEr(Pe).catch(()=>{Lt(JKe())})}const Al=C.useCallback(async(Y,_e)=>{if(!(!Pe||To.current)){To.current=!0,Lt(null),si(Y);try{const ke=sKr({model:qs.model,serviceTier:qs.serviceTier,permissionMode:qs.permissionMode,planMode:qs.planMode,reasoningLevel:qs.reasoningLevel}),ye=Pe;(await lEr(ye,Y,_e,ke)).turn.existing&&await sa(ye),ho(lg)}catch{Lt(MGe())}finally{To.current=!1,si(null)}}},[Pe,qs,sa]),io=C.useCallback((Y,_e)=>{if(!Pe||Cr||!(st!=null&&st.agentReady))return;const ke=Pe;on({type:"busy",sessionId:ke,busy:!0}),ao(),go(()=>uEr(ke,Y,_e)).catch(ye=>{on({type:"busy",sessionId:ke,busy:!1});const $e=ye instanceof Error?ye.message:String(ye);on({type:"localError",sessionId:ke,text:JGe({error:Ee($e)})})})},[Pe,Cr,st==null?void 0:st.agentReady,ao,go]),Hi=C.useCallback(Y=>{if(!Pe||Cr)return;const _e=Pe,ke=Di.current;on({type:"activeLeaf",sessionId:_e,leafId:Y}),go(()=>_Er(_e,Y)).catch(ye=>{on({type:"activeLeaf",sessionId:_e,leafId:ke});const $e=ye instanceof Error?ye.message:String(ye);on({type:"localError",sessionId:_e,text:lVe({error:Ee($e)})})})},[Pe,Cr,go]);function J(Y){if(!Pe)return;const _e=Pe;sEr(_e,Y).then(({removed:ke})=>{if(ke)return sa(_e)}).catch(()=>Lt(qGe()))}async function fe(Y){if(!Pe||ds)return;const _e=Pe;Lt(null),Rs(Y);try{await oEr(_e,Y),await sa(_e)}catch{Lt(bWe())}finally{Rs(null)}}const we=C.useRef(!1);C.useEffect(()=>{const Y=_e=>{we.current=j3(_e.target)};return document.addEventListener("pointerdown",Y,!0),()=>document.removeEventListener("pointerdown",Y,!0)},[]),C.useEffect(()=>{if(!Cr||l!=="chat")return;function Y(_e){var ye;_e.key!=="Escape"||_e.defaultPrevented||(_e.target===document.body?we.current:j3(_e.target))!==L||(_e.preventDefault(),bo(),(ye=xr.current)==null||ye.focus())}return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[Cr,Pe,l,L]);function Me(Y){kx(Y),zt.current.delete(Y),sr.current===Y&&(sr.current=null),ut.current.projectId===e&&ut.current.activeId===Y&&ut.current.mainView==="chat"&&(Wt(""),zn([]),nr([]),Jt.current(null,{replace:!0})),ln(_e=>{if(!_e.has(Y))return _e;const ke=new Set(_e);return ke.delete(Y),ke}),Rr.current.delete(Y)}function Te(Y,_e){const ke=Co(Y.projectId);ji(et,ke.queryKey,Y.id),ns(ke.queryKey,ye=>ye==null?void 0:ye.map($e=>$e.id===Y.id?{...$e,..._e}:$e))}function mt(Y,_e){const ke=Y.archived;Te(Y,{archived:_e}),F.mutateAsync([Y.id,_e]).catch(()=>{Te(Y,{archived:ke})})}function _t(Y,_e){const ke=Y.title;Te(Y,{title:_e}),U.mutateAsync([Y.id,_e]).catch(()=>{Te(Y,{title:ke})})}async function $t(Y){var ke;const _e=((ke=Y.title)==null?void 0:ke.trim())||Eb();if(window.confirm(r6e({title:su(_e)}))){try{await G.mutateAsync(Y.id)}catch(ye){tn(d6e({title:su(_e),error:Ee(ye instanceof Error?ye.message:String(ye))}),"error");return}Me(Y.id)}}const Gn=C.useCallback(Y=>{if(!Pe)return Promise.resolve(!1);const _e=Pe;return on({type:"busy",sessionId:_e,busy:!0}),go(()=>dEr(_e,Y)).then(()=>!0).catch(()=>!1).finally(()=>{Vn(Je.queryKey)&&(et.fetchQuery({...Xc(_e),staleTime:0}).catch(()=>{}),et.fetchQuery({...Co(e),staleTime:0}).catch(()=>{}))})},[Pe,e,go,Je]),_r=/Mac|iPhone|iPad/.test(navigator.platform),co=_r?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",Qr=_r?"⌘ Enter":"Ctrl + Enter",pi=C.useCallback(()=>{Be("active"),E(null)},[E]),Aa=C.useCallback(async()=>{try{const _e=(await et.fetchQuery({...ET(),staleTime:0})).reduce((ke,ye)=>!ke||ye.lastActivityAt>ke.lastActivityAt?ye:ke,void 0);Be("active"),E(null,{projectId:(_e==null?void 0:_e.projectId)??e})}catch(Y){tn(Y instanceof Error?Y.message:String(Y),"error")}},[e,E]),Io=C.useCallback(async Y=>{const _e=Tt.current,ke=ut.current;try{const ye=await X8r(Y);if(Tt.current!==_e||ut.current!==ke)return;Be("all"),E(Y,{projectId:ye.projectId})}catch(ye){if(Tt.current!==_e||ut.current!==ke)return;tn(ye instanceof Error?ye.message:String(ye),"error")}},[E]);C.useEffect(()=>{if(L)return;const Y=_e=>{_e.repeat||_e.key!=="Enter"||!_e.metaKey&&!_e.ctrlKey||_e.altKey||!_e.shiftKey||j3(_e.target)||(_e.preventDefault(),Aa())};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[Aa,L]);const xc=(Y,_e)=>Y.id===e?kn.busySessions.has(_e.id):_e.busy,Mr=[];if(ne==="projects"&&Ie.forEach((Y,_e)=>{const ke=Ae[_e],$e=(Y.id===e?at:ke.data??ID).filter(jn=>!jn.sideParentSessionId&&(ens(je,jn.archived)||jn.id===Pe)).sort((jn,ys)=>ys.updatedAt-jn.updatedAt),yt=Gt[Y.id]??6;let pt=$e.slice(0,yt);const Sn=$e.find(jn=>jn.id===Pe);Sn&&!pt.some(jn=>jn.id===Pe)&&(pt=[...pt.slice(0,yt-1),Sn]);const hn=me.includes(Y.id);Mr.push({kind:"project",project:Y,collapsed:hn,busy:hn&&$e.some(jn=>xc(Y,jn)&&!vc.has(jn.id))}),!hn&&(pt.forEach(jn=>Mr.push({kind:"chat",project:Y,session:jn})),$e.length>yt&&Mr.push({kind:"more",project:Y}),!pt.length&&(ne==="projects"||ke.isPending||ke.error)&&Mr.push({kind:"status",project:Y,pending:ke.isPending,error:!!ke.error,retry:()=>{ke.refetch()}}))}),ne==="list"){const Y=((bs=Xe.data)==null?void 0:bs.pages.flatMap(ye=>ye.sessions))??[],_e=at.find(ye=>ye.id===Pe);_e&&!Y.some(ye=>ye.id===_e.id)&&Y.push(_e),Y.filter(ye=>!Kc.has(ye.id)).sort((ye,$e)=>$e.updatedAt-ye.updatedAt).forEach(ye=>{const $e=ie.find(yt=>yt.id===ye.projectId);$e&&Mr.push({kind:"chat",project:$e,session:ye})});const ke=Ze??ie[0];ke&&(!Mr.length||Xe.isFetchingNextPage||Xe.isError)&&Mr.push({kind:"status",project:ke,pending:Xe.isPending||Xe.isFetchingNextPage,error:Xe.isError,retry:()=>{Xe.isFetchNextPageError?Xe.fetchNextPage():Xe.refetch()}})}const mi=ne==="list"||Ve,hm=rO(Mr,ht,Pe),Po=hm.lengthY+Rg(_e),0),kc=Y=>Y.kind==="chat"?Y.session.id:`${Y.kind}:${Y.project.id}`,Ws=uG({count:Mr.length,getScrollElement:()=>Fe.current,getItemKey:Y=>kc(Mr[Y]),estimateSize:Y=>Rg(Mr[Y]),overscan:5,rangeExtractor:Y=>{const _e=C7(Y),ke=Mr.findIndex(ye=>kc(ye)===Vt);return ke<0||_e.includes(ke)?_e:[..._e,ke].sort((ye,$e)=>ye-$e)},enabled:mi&&a&&!L}),Bo=Ws.getVirtualItems(),qi=((fr=Bo.at(-1))==null?void 0:fr.index)??-1;C.useEffect(()=>{ne==="list"&&a&&!L&&qi>=Mr.length-6&&Xe.hasNextPage&&!Xe.isFetching&&!Xe.isError&&Xe.fetchNextPage()},[ne,a,L,qi,Mr.length,Xe.hasNextPage,Xe.isFetching,Xe.isError,Xe.fetchNextPage]);const Ta=f.jsxs("aside",{className:"session-rail w-75 shrink-0 flex flex-col mt-5 mac-titlebar:mt-8 me-3.5 mb-5 ms-0 bg-background min-h-0 [&_.rail-body]:flex-1 [&_.rail-body]:min-h-0 [&_.rail-body]:pt-0 [&_.rail-body]:pb-0 [&_.rail-body]:ps-2 [&_.rail-body]:pe-1 border border-border rounded-lg overflow-visible shadow-elevated",children:[o,f.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[f.jsxs("button",{className:"rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start hover:bg-surface [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":co,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Aa,children:[f.jsx(Bd,{size:15}),v5()]}),f.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${l==="skills"?"active":""}`,onClick:()=>d("skills"),children:[f.jsx(jH,{size:15}),vTe()]}),ces.map(Y=>f.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${l!=="chat"&&l!=="skills"&&Y.activeTabs.includes(l)?"active":""}`,"data-onboarding":Y.id==="compute"?"nav-compute":void 0,onClick:()=>d(Y.id),children:[Y.icon,Y.label()]},Y.id))]}),f.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-0 ps-4.5",children:[f.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:ne==="projects"?C6():II()}),f.jsxs("div",{className:"rail-section-actions flex items-center gap-0.5",children:[c&&f.jsx(tv,{interactive:!0,content:fy(),className:"rounded-sm",children:f.jsx(Rt,{size:"small",className:"text-subtext","aria-label":fy(),onClick:c,children:f.jsx(fDr,{size:15,className:"text-subtext"})})}),f.jsx(nns,{value:je,onChange:Be,grouping:ne,onGroupingChange:Y=>{W(Y);try{localStorage.setItem("sidebar-grouping",Y)}catch{}Re(!1),Le({}),Fe.current&&(Fe.current.scrollTop=0)}})]})]}),f.jsxs("div",{className:"relative flex-1 min-h-0",children:[f.jsx("div",{ref:Fe,tabIndex:-1,className:`rail-body h-full overflow-x-hidden ${mi?"overflow-y-auto":"overflow-y-hidden"}`,children:f.jsxs("div",{className:"relative",style:{height:(mi?Ws.getTotalSize():gf)+(wc?38:0)+(Ve?46:0)},children:[(mi?Bo.map(Y=>({row:Mr[Y.index],top:Y.start,index:Y.index})):Tl.map((Y,_e)=>({row:Y,top:0,index:_e}))).map(({row:Y,top:_e,index:ke})=>{var yt;const ye=Y.project,$e=Y.kind==="chat"?Y.session:null;return f.jsx("div",{"data-index":ke,onFocusCapture:()=>Ut(kc(Y)),onBlurCapture:pt=>{pt.currentTarget.contains(pt.relatedTarget)||Ut(null)},className:mi?"absolute top-0 start-0 w-full":"relative",style:{height:Rg(Y),transform:mi?`translateY(${_e}px)`:void 0},children:Y.kind==="project"?f.jsx("div",{className:"group h-9 flex items-end gap-1 rounded-md px-2.5 text-text",children:f.jsx(kWr,{project:ye,chatCount:(yt=ce.find(pt=>pt.projectId===ye.id))==null?void 0:yt.totalAgents,collapsed:Y.collapsed,busy:Y.busy,onToggleCollapsed:()=>{const pt=me.includes(ye.id)?me.filter(Sn=>Sn!==ye.id):[...me,ye.id];be(pt);try{localStorage.setItem("sidebar-collapsed-projects",JSON.stringify(pt))}catch{}},pinned:ae.includes(ye.id),onPin:()=>{const pt=ae.includes(ye.id)?ae.filter(Sn=>Sn!==ye.id):[...ae,ye.id];le(pt);try{localStorage.setItem("sidebar-pinned-projects",JSON.stringify(pt))}catch{}},onRemoved:()=>{ye.id===e&&oe({to:"/projects"})},onNewChat:()=>{ye.id===e?pi():oe({to:"/projects/$projectId/tasks/new",params:{projectId:ye.id}})}})}):$e?f.jsx("div",{className:ne==="projects"?"ms-5.5":void 0,children:f.jsx(ans,{menuBoundaryRef:Fe,session:$e,active:$e.id===Pe&&l==="chat",unread:er.has($e.id),busy:xc(ye,$e),waiting:vc.has($e.id),revealTitle:ai.get($e.id),onOpen:()=>{if(ye.id===e?E($e.id):oe({to:"/projects/$projectId/tasks/$sessionId",params:{projectId:ye.id,sessionId:$e.id}}),ye.id===Zm){c$r($e.id);const pt=O7r[$e.id];pt&&(m_({name:"demo_experiment_started",kind:"curated",experiment:pt}),m_({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:pt=>_t($e,pt),onSetArchived:pt=>mt($e,pt),onDelete:()=>void $t($e)},$e.id)}):Y.kind==="more"?f.jsx(Oe,{variant:"ghost",size:"small",className:"ms-5.5 font-normal text-subtext",onClick:()=>{Re(!0),Le(pt=>({...pt,[ye.id]:(pt[ye.id]??6)+6}))},children:y5()}):Y.kind==="status"&&f.jsx("div",{className:`flex h-full items-center px-2.5 text-sm text-subtext ${ne==="projects"?"ms-5.5":""}`,children:Y.error?f.jsx(Oe,{size:"small",onClick:Y.retry,children:Xs()}):Y.pending?f.jsx(Nt,{}):je==="archived"?yze():Aze()})},kc(Y))}),wc&&f.jsx("div",{className:"absolute start-0 flex h-9.5 w-full items-center pt-1",style:{top:mi?Ws.getTotalSize():gf},children:f.jsx(Oe,{variant:"ghost",size:"small",className:"text-subtext",onClick:()=>{Re(!0)},children:y5()})}),Ve&&f.jsx("div",{className:"absolute start-0 w-full pt-1",style:{top:Ws.getTotalSize()+(wc?38:0)},children:f.jsx(Oe,{variant:"ghost",size:"small",className:"text-subtext",onClick:()=>{Re(!1),Le({}),Ut(null),Fe.current&&(Fe.current.scrollTop=0,Fe.current.focus())},children:y6()})})]})}),mi&&f.jsxs(f.Fragment,{children:[(Ws.scrollOffset??0)>0&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 z-5 h-3 bg-linear-to-b from-background to-transparent"}),f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-5 h-3 bg-linear-to-t from-background to-transparent"})]})]}),f.jsx(Oq,{runtime:k})]}),gi="chat-header flex items-center gap-2 py-0 px-4 bg-background shrink-0 h-12 relative z-4 w-full max-w-readable my-0 mx-auto [&::after]:content-[''] [&::after]:absolute [&::after]:top-full [&::after]:start-0 [&::after]:end-0 [&::after]:h-6 [&::after]:bg-[linear-gradient(to_bottom,_var(--base),_transparent)] [&::after]:pointer-events-none",vi=!a&&!L&&f.jsx(Rt,{title:sA(),"aria-label":sA(),onClick:i,className:"mac-titlebar:ms-16",children:f.jsx(LH,{size:20})});return l!=="chat"?f.jsxs(f.Fragment,{children:[a&&Ta,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!a&&f.jsx("div",{className:"flex h-12 shrink-0 items-center",children:vi}),f.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:r?f.jsxs("div",{role:"alert",className:"p-6 text-subtext",children:[r,f.jsx(Oe,{onClick:s,children:Xs()})]}):t?f.jsxs(Wr,{className:"p-6",children:[f.jsx(Nt,{}),QN()]}):B})]})]}):f.jsxs(f.Fragment,{children:[a&&Ta,f.jsxs("section",{"data-side-chat":L||void 0,className:`chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 ${L?"":"mt-5"}`,children:[f.jsxs("div",{className:a||L?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] mac-titlebar:grid-cols-[6rem_minmax(0,1fr)_6rem] items-center",children:[vi,f.jsxs("div",{className:gi,children:[f.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:ar&&f.jsxs(f.Fragment,{children:[(Nn=ar.title)!=null&&Nn.trim()?f.jsx(t0,{variant:"header",className:"flex-initial",title:ar.title.trim(),children:f.jsx(UK,{title:ar.title.trim(),animate:_f!==void 0},_f??"static")}):Cr?f.jsx(Nt,{}):null,f.jsx("span",{className:"min-w-0 truncate rounded-md border border-border bg-surface px-2.5 py-0.5 text-sm font-normal text-subtext",title:n,children:n})]})}),x&&f.jsx(Rt,{"data-tip":LN(),"aria-label":LN(),onClick:x,children:f.jsx(POr,{size:15})})]})]}),r?f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[f.jsx("p",{children:r}),f.jsx(Oe,{onClick:s,children:Xs()})]}):gs?f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[f.jsx("p",{children:gs.message}),f.jsx(Oe,{onClick:()=>void En.refetch(),children:Xs()})]}):t||gc?f.jsx("div",{className:"chat-loading flex-1 min-h-0 overflow-hidden [scrollbar-gutter:stable_both-edges]",role:"status","aria-label":QN(),"aria-busy":"true",children:f.jsxs("div",{"aria-hidden":"true",className:"mx-auto flex h-full w-full max-w-readable flex-col gap-6 px-4 pb-8 pt-4 motion-safe:animate-pulse",children:[f.jsx("div",{className:"ms-auto h-14 w-3/5 shrink-0 rounded-lg bg-panel"}),f.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:["w-5/6","w-full","w-11/12","w-2/3","w-full","w-3/4","w-1/2"].map((Y,_e)=>f.jsx("div",{className:`h-3 rounded bg-panel ${Y}`},_e))}),f.jsx("div",{className:"ms-auto h-10 w-2/5 shrink-0 rounded-lg bg-panel"}),f.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:["w-full","w-11/12","w-3/4","w-5/6","w-1/2","w-full","w-5/6","w-11/12","w-2/3","w-3/4","w-1/3"].map((Y,_e)=>f.jsx("div",{className:`h-3 rounded bg-panel ${Y}`},_e))}),f.jsx("div",{className:"ms-auto h-16 w-1/2 shrink-0 rounded-lg bg-panel"})]})}):!$o&&(ar!=null&&ar.sideParentSessionId)?f.jsxs("div",{className:"chat-empty flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center text-subtext",children:[f.jsx(Zg,{size:22}),f.jsx("p",{className:"m-0 text-balance",children:oor()})]}):$o?f.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:po,tabIndex:0,role:"region","aria-label":((Ui=ar==null?void 0:ar.title)==null?void 0:Ui.trim())||Eb(),onScroll:Y=>{pf(Y.currentTarget),Mo.dismiss()},children:f.jsxs("div",{className:"chat-thread-inner max-w-readable my-0 mx-auto pt-4 px-4 pb-8 flex flex-col gap-4",ref:Vr,children:[f.jsx(aK,{projectId:e,sessionId:Pe,children:f.jsx(Jts,{scrollRef:po,scrollToEndRef:Zs,stickToBottom:Js,onPinToBottom:ao,messages:wr,allMessages:Bi,canFork:dm,onFork:io,onSelectFork:Hi,busy:Cr,onOpenFile:Nl,onOpenRun:p,onOpenSpawnedSession:Io,runExperimentName:m,onOpenExperiment:w,experimentName:y,onRespond:Gn,onOpenPlan:Xr,onOpenSubagent:fi,recoveringTurnId:Jo,onRecover:Al,skills:vo},Pe)}),Cr&&bc&&f.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:Dqe()}),Cr&&!bc&&!lf&&!Zd&&f.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:f.jsx("span",{className:"tool-running-shimmer",children:NVe()})})]})}):f.jsxs("div",{className:"chat-empty flex-1 flex flex-col items-center justify-center text-text p-8 text-center [&_h2]:m-0 [&_h2]:text-5xl [&_h2]:font-medium [&_h2]:tracking-[-0.015em] [&_h2]:text-text",children:[f.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:f.jsx(Kx,{})}),f.jsx("h2",{children:Gqe()}),Os&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:qD,"aria-hidden":"true",children:HD.map((Y,_e)=>f.jsxs("div",{className:`flex min-h-22 animate-pulse flex-col items-start justify-center gap-2.5 rounded-xl border bg-background px-5 py-4 ${C3[_e].box}`,children:[f.jsxs("span",{className:`flex w-full items-center gap-2.5 ${C3[_e].icon}`,children:[f.jsx(Y,{size:17}),f.jsx("span",{className:"h-3.5 w-2/5 rounded bg-panel"})]}),f.jsx("span",{className:"h-3 w-4/5 rounded bg-panel"})]},_e))}),f.jsxs(Wr,{className:"mt-3",role:"status",children:[f.jsx(Nt,{}),f.jsx("span",{children:_He()})]})]}),oa&&oa.length>0&&f.jsx("div",{className:qD,role:"group","aria-label":xHe(),children:oa.map((Y,_e)=>{const ke=HD[_e],ye=C3[_e],$e=yt=>{m_({name:"project_starter_clicked",slot:_e+1}),m_({name:"first_action",surface:$u,action:"starter_click"});const pt=!rn.trim()&&dn.length===0&&Un.length===0;yt||!(st!=null&&st.agentReady)||!pt?Fi(Y.prompt):mf({starter:Y.prompt})};return f.jsxs("div",{className:"relative min-w-0",children:[f.jsxs("button",{type:"button",className:`flex h-full min-h-22 w-full min-w-0 cursor-pointer flex-col items-start justify-center gap-1.5 rounded-xl border bg-background py-4 ps-5 pe-11 text-start font-sans transition-colors duration-120 ease-standard hover:bg-surface ${ye.box}`,onClick:()=>$e(!1),children:[f.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[f.jsx(ke,{size:17,className:ye.icon}),Y.title]}),f.jsx("span",{className:"w-full truncate text-sm text-subtext",children:Y.prompt})]}),f.jsx(Rt,{size:"small",className:"absolute end-2.5 top-2.5 [&:hover:not(:disabled)]:bg-surface-bright","aria-label":oA({title:Y.title}),title:oA({title:Y.title}),onClick:()=>$e(!0),children:f.jsx(Fx,{size:13})})]},_e)})})]}),Mo.action&&f.jsxs(Oe,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:Mo.action.x,top:Mo.action.top,transform:"translateX(-50%)"},onMouseDown:Y=>Y.preventDefault(),onClick:Mo.add,children:[f.jsx(OH,{size:14}),a9e()]}),f.jsxs("div",{inert:t||!!r||gc,className:"composer px-3 pb-5 shrink-0 relative z-4 bg-background w-full max-w-readable my-0 mx-auto [&_textarea]:border-0 [&_textarea]:bg-none [&_textarea]:bg-transparent [&_textarea]:resize-none [&_textarea]:pt-2.5 [&_textarea]:px-3 [&_textarea]:pb-1 [&_textarea]:text-base [&_textarea]:field-sizing-content [&_textarea]:min-h-18 [&_textarea]:max-h-45",children:[$o&&f.jsx(Rt,{className:`absolute bottom-full left-1/2 z-5 mb-6 h-9 w-9 -translate-x-1/2 rounded-full border border-border bg-background shadow-control transition-opacity duration-150 ease-standard ${Ro?"opacity-0":"opacity-100"}`,title:cA(),"aria-label":cA(),inert:Ro,onClick:Iu,children:Cr&&!bc?f.jsx(em,{size:18,className:"tool-running-shimmer-icon"}):f.jsx(wOr,{size:16})}),Gs&&!(ff&&Gs.promptId===ff.promptId)&&f.jsx(pJr,{synthesized:Gs.synthesized,agentLabel:ar?g_[ar.harness]:bVe(),showResumeModes:(ar==null?void 0:ar.harness)==="claude-code",onView:Y=>Xr==null?void 0:Xr(Gs.plan,Gs.promptId,Y),onApprove:Y=>Gn({promptId:Gs.promptId,approve:!0,...Y?{resumeMode:Y}:{}}),onReject:()=>Gn({promptId:Gs.promptId,approve:!1}),onRevise:Y=>{Pe&&_i({sessionId:Pe,promptId:Gs.promptId}),Gn({promptId:Gs.promptId,approve:!1,note:Y})}}),Us.length>0&&f.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:Us.map((Y,_e)=>f.jsxs("div",{className:"queued-chip flex flex-wrap items-center gap-x-2 gap-y-1 py-1.5 px-2.5 text-sm text-subtext bg-background border border-border rounded-sm",title:Y.error?`${Y.text} ${Y.error}`:Y.text,children:[Y.dispatchState==="blocked"?f.jsx(uC,{size:13,className:"shrink-0 text-accent-amber"}):f.jsx(GOr,{size:13,className:"shrink-0 text-muted"}),f.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:Y.text}),Y.dispatchState!=="blocked"&&f.jsx("span",{className:"shrink-0 text-sm text-muted",children:Y.dispatchState==="retrying"?rKr(Y.nextRetryAt,Lu):sGe()}),Y.dispatchState==="blocked"?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>void fe(Y.id),"aria-label":Toe({text:Y.text}),disabled:ds!==null,className:"shrink-0 px-1.5 py-0.5 border border-border rounded-sm text-sm text-text bg-background cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:border-text",children:ds===Y.id?bP():Xs()}),f.jsx("button",{onClick:()=>J(Y.id),"aria-label":xoe({text:Y.text}),disabled:ds!==null,className:"shrink-0 px-1.5 py-0.5 border-0 text-sm text-muted bg-transparent cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:text-text",children:Q$e()}),_e===Jd&&_eJ(Y.id),className:"shrink-0 inline-flex items-center justify-center w-4 h-4 p-0 border-0 rounded-full text-muted cursor-pointer [&:hover]:bg-text [&:hover]:text-background",children:f.jsx(mr,{size:11})})]},Y.id))}),Na&&f.jsxs("div",{id:hf,role:"note",className:`composer-demo-hint ${lns}`,children:[f.jsxs("span",{className:"flex-1",dir:"auto",children:[f.jsx(nv,{size:16,className:"inline-block align-text-bottom me-2 text-primary"}),nRe()]}),f.jsx(Rt,{size:"small","aria-label":qN(),title:qN(),onClick:()=>{var Y;ss(!0),(Y=xr.current)==null||Y.focus()},children:f.jsx(mr,{size:14})})]}),!L&&!Pe&&c&&f.jsx(wWr,{projects:ie,activity:ce,projectId:e,projectName:n,onNewProject:c,onSelect:Y=>{Y!==e&&oe({to:"/projects/$projectId/tasks/new",params:{projectId:Y}})}}),f.jsxs("div",{className:`composer-box relative flex flex-col border ${ui?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[st&&!st.agentReady&&f.jsx("div",{className:"composer-harness-warning py-2 px-3 text-subtext text-sm leading-normal border-b border-b-border-variant [&_strong]:text-accent-amber [&_strong]:font-medium [&_code]:font-mono [&_code]:text-text",children:st.catalogPending?f.jsxs("span",{children:[st.name," — ",_d()]}):f.jsxs(f.Fragment,{children:[f.jsxs("strong",{children:[st.name," ",YMe()]})," ",st.agentNote?B_(st.agentNote,q&&{canRun:Y=>Br(Y)!==void 0,onRun:Y=>{const _e=Br(Y);_e&&q(Y,_e)}}):kGe()]})}),yl&&f.jsx(Ses,{skills:za,activeIndex:xl,onPick:ps,onHover:ml}),tf&&f.jsx(Les,{matches:pc,activeIndex:Ru,onPick:ja,onHover:na}),ef&&f.jsx(Fes,{activeSessionId:Pe,onClose:()=>mo(!1),onResume:Y=>{mo(!1),Be("all"),E(Y.id,{projectId:Y.projectId})},onImport:Y=>{mo(!1),zl(Y)}}),Un.length>0&&f.jsx(_ts,{annotations:Un,onClear:()=>{nr([]),window.requestAnimationFrame(()=>{var Y;return(Y=xr.current)==null?void 0:Y.focus()})},onRemove:Y=>{const _e=Un.filter(ke=>ke.id!==Y);nr(_e),_e.length===0&&window.requestAnimationFrame(()=>{var ke;return(ke=xr.current)==null?void 0:ke.focus()})}}),dn.length>0&&f.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:dn.map((Y,_e)=>{const ke=()=>zn(ye=>ye.filter(($e,yt)=>yt!==_e));return Y.mediaType==="application/pdf"?f.jsxs("div",{className:"attachment-file [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background relative inline-flex items-center gap-2 max-w-55 py-2 px-2.5 border border-border rounded-sm text-text bg-surface [&_svg]:shrink-0 [&_svg]:text-muted",title:Y.name,children:[f.jsx(Px,{size:22}),f.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:Y.name??"document.pdf"}),f.jsx("button",{title:JN(),"aria-label":JN(),onClick:ke,children:f.jsx(mr,{size:11})})]},_e):f.jsxs("div",{className:"attachment-thumb relative [&_img]:w-13 [&_img]:h-13 [&_img]:object-cover [&_img]:border [&_img]:border-border [&_img]:rounded-sm [&_img]:block [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background",children:[f.jsx("img",{src:Y.dataUrl,alt:qI()}),f.jsx("button",{title:eA(),"aria-label":eA(),onClick:ke,children:f.jsx(mr,{size:11})})]},_e)})}),(wl??Ln)&&f.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:wl??Ln}),lr&&f.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:lr}),f.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${ui?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[f.jsx("textarea",{dir:"auto",ref:xr,"aria-describedby":Na?hf:void 0,className:"relative z-1 bg-transparent",value:rn,placeholder:oo?rXe():df&&st?qKe({harness:Ee(g_[st.id]),shortcut:Ee(Qr)}):sn?st!=null&&st.agentReady?S7e({harness:Ee(g_[sn.harness])}):s7e({harness:Ee(g_[sn.harness])}):$5e(),rows:2,onPaste:Ii,onDragOver:Y=>{Y.dataTransfer.types.includes("Files")&&Y.preventDefault()},onDrop:Y=>{Y.dataTransfer.files.length!==0&&(Y.preventDefault(),gl(Array.from(Y.dataTransfer.files)))},onChange:Y=>{const _e=Y.target.value,ke=Y.target.selectionStart;jr(ke);const ye=ke>0&&/\s/.test(_e[ke-1])&&!oo&&!cs.current&&RD(_e)===null?m3(_e,ke-1):null,$e=ye&&bj(ye.query),yt=ye?(_e.slice(0,ye.start)+_e.slice(ye.end)).trim():"";if(ye&&$e&&($e==="plan"||!g3($e)&&!yt)&&eo.some(pt=>pt.name===$e)){cf($e,_e,ye);return}Wt(_e),hs(!1)},onSelect:Y=>jr(Y.currentTarget.selectionStart),onCompositionStart:()=>{cs.current=!0},onCompositionEnd:()=>{cs.current=!1},onKeyDown:Y=>{if(cs.current||Y.nativeEvent.isComposing||Y.nativeEvent.keyCode===229){Y.stopPropagation();return}if(yl){if(Y.key==="ArrowDown"||Y.key==="ArrowUp"){Y.preventDefault();const _e=Y.key==="ArrowDown"?1:-1;ml((xl+_e+za.length)%za.length);return}if(Y.key==="Tab"||Y.key==="Enter"){Y.preventDefault(),ps(za[xl]);return}if(Y.key==="Escape"){Y.preventDefault(),hs(!0);return}}if(tf){if(Y.key==="ArrowDown"||Y.key==="ArrowUp"){Y.preventDefault();const _e=Y.key==="ArrowDown"?1:-1;na((Ru+_e+pc.length)%pc.length);return}if(Y.key==="Tab"||Y.key==="Enter"&&un!==""&&!Y.shiftKey&&!Y.metaKey&&!Y.ctrlKey){Y.preventDefault(),ja(pc[Ru]);return}if(Y.key==="Escape"){Y.preventDefault(),hs(!0);return}}if(Y.key==="Backspace"&&ra(Y.currentTarget)){Y.preventDefault();return}if(Y.key==="Enter"&&!Y.shiftKey){if(Y.preventDefault(),ui){Pu();return}mf({queue:Y.metaKey||Y.ctrlKey})}}}),f.jsx(kes,{text:rn,editingTokenEnd:to==null?void 0:to.end,isCommand:eh,skills:eo,projectId:e,textareaRef:xr})]}),f.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:Li.ref,children:[f.jsx(Rt,{type:"button",className:"composer-bare",title:Uk(),"aria-label":Uk(),"aria-haspopup":"dialog","aria-expanded":Li.open,onClick:()=>Li.setOpen(Y=>!Y),children:f.jsx(wLr,{size:16})}),Li.open&&f.jsxs("div",{className:"composer-sources-menu absolute bottom-[calc(100%_+_8px)] start-0 z-50 flex min-w-55 flex-col gap-1 rounded-md border border-border bg-background p-2 shadow-dropdown",children:[f.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:Uk()}),f.jsx(yKr,{})]})]}),f.jsx("input",{ref:vt,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:Y=>{gl(Array.from(Y.target.files??[])),Y.target.value=""}}),f.jsx(Rt,{type:"button",className:"composer-attach",title:IN(),"aria-label":IN(),onClick:()=>{var Y;return(Y=vt.current)==null?void 0:Y.click()},children:f.jsx(eLr,{size:16})}),Ou&&f.jsxs(Oe,{type:"button",variant:"ghost",active:!0,className:"group max-w-60",title:HN({goal:su(Ou)}),"aria-label":HN({goal:su(Ou)}),onClick:()=>void li("clear"),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(RH,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(mr,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{className:"truncate",children:FMe()})]}),sf&&f.jsxs(Oe,{type:"button",variant:"ghost",active:!0,className:"group",title:KN(),"aria-label":KN(),onClick:()=>void fm(),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(TDr,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(mr,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:PDe()})]}),ui&&f.jsxs(Oe,{type:"button",variant:"ghost",active:!0,className:"group",title:WN(),"aria-label":WN(),onClick:th,children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(Fd,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(mr,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:PI()})]}),f.jsx("div",{className:"min-w-0 flex-1"}),f.jsxs("div",{className:"flex min-w-0 items-center",children:[f.jsx(O$r,{value:sn,onSelect:kl,onOpenSettings:()=>d("harnesses"),permissionChoices:st!=null&&st.agentReady?(nn==null?void 0:nn.permissionModes)??[]:[],defaultPermissionId:(nn==null?void 0:nn.defaultPermissionMode)??null,onSelectPermission:ci,reasoningChoices:st!=null&&st.agentReady?nf.choices:[],defaultReasoningId:nf.defaultId,onSelectReasoning:_m,autonomy:(Et==null?void 0:Et.autonomy)??R,onSelectAutonomy:Sl,lockHarness:!!Et,openRequest:Do}),f.jsx(Ies,{usage:Et==null?void 0:Et.contextUsage})]}),Cr&&!oo?f.jsx(Rt,{className:"send-btn",variant:"stop",title:aA(),"aria-label":aA(),onClick:bo,children:f.jsx(mr,{size:16})}):f.jsx(Rt,{className:`send-btn ${Na&&(st!=null&&st.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:ui?nA():b5(),"aria-label":ui?nA():b5(),onClick:()=>void(ui?Pu():mf()),disabled:ui?!Pi||!Pe&&!(st!=null&&st.agentReady):!(st!=null&&st.agentReady)||!rn.trim()&&dn.length===0&&Un.length===0,children:f.jsx(NH,{size:16})})]})]})]})]})]})}const lns="flex items-center gap-2.5 mb-2.5 py-2 ps-3.5 pe-2 rounded-lg border border-border bg-surface text-text text-sm leading-normal",uns=[],_ns=[];function ma({className:e,...n}){return f.jsx("div",{className:_s("relative flex min-h-0 flex-1 flex-col",e),...n})}function lp({className:e,...n}){return f.jsx("div",{className:_s("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Gc({className:e,...n}){return f.jsx("div",{className:_s("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const GD=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function fns({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:o,onOpenExperiment:a,experimentName:i,onOpenSubagent:c}){var y;const l=dt(Xc(n)),d=((y=l.data)==null?void 0:y.messages)??(l.isError?[]:null),_=C.useRef(null),p=C.useRef(null),m=C.useRef(!0);if(C.useLayoutEffect(()=>{m.current=!0;const g=_.current;g&&(g.scrollTop=g.scrollHeight)},[n,t]),C.useLayoutEffect(()=>{const g=_.current;g&&m.current&&(g.scrollTop=g.scrollHeight)},[d]),C.useEffect(()=>{const g=_.current,b=p.current;if(!g||!b)return;const k=new ResizeObserver(()=>{m.current&&(g.scrollTop=g.scrollHeight)});return k.observe(b),k.observe(g),()=>k.disconnect()},[d===null]),d===null)return f.jsx(ma,{children:f.jsx("div",{className:GD,children:f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:XP()})})});let w=null;for(const g of d)if(w=nx(g.parts,t),w)break;return f.jsx(ma,{children:f.jsx("div",{className:GD,ref:_,onScroll:g=>{const b=g.currentTarget;m.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:f.jsx("div",{ref:p,children:w?f.jsx(aK,{projectId:e,sessionId:n,children:f.jsx(Xts,{spawn:w,onOpenFile:r,onOpenRun:s,runExperimentName:o,onOpenExperiment:a,experimentName:i,onOpenSubagent:c})}):f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:f1r()})})})})}function dns({experiment:e}){var s;const n=dt(qq(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return f.jsx(lp,{className:"branch-changes [&_>_.changes-note]:mx-4 [&_>_.changes-note]:my-3.5 [&_>_.diff-explorer]:mx-4 [&_>_.diff-explorer]:mb-0 [&_>_.diff-explorer]:mt-3.5 [&_>_.openresearch-diff]:mx-4 [&_>_.openresearch-diff]:mb-0 [&_>_.openresearch-diff]:mt-3.5 [&_>_.truncated-notice]:mx-4 [&_>_.truncated-notice]:mb-0 [&_>_.truncated-notice]:mt-3.5",children:r&&!t?f.jsxs(Gc,{children:[d3e()," ",Ee(r)]}):t?t.diff.trim()?f.jsxs(f.Fragment,{children:[t.truncated&&f.jsx(EU,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),f.jsx(AU,{diff:t.diff,partial:t.truncated})]}):f.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?M3e():r3e()}):f.jsx(Gc,{children:k3e()})})}function GK({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:o,githubTitle:a,refreshing:i,onRefresh:c}){return f.jsxs("div",{className:"code-tab-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant shrink-0 [&_>_.seg]:p-0.5 [&_>_.seg]:rounded-sm [&_>_.seg_button]:py-0.5 [&_>_.seg_button]:px-2 [&_>_.seg_button]:text-sm [&_>_.seg_button]:font-medium",children:[t&&f.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default",role:"group","aria-label":nYe(),children:[f.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:fYe()}),f.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:WI()})]}),r&&f.jsxs("span",{className:"wt-branch-chip inline-flex items-center gap-1 min-w-0 py-0.5 px-2 rounded-full bg-hover-muted text-subtext text-xs [&_>_svg]:shrink-0",title:s,children:[f.jsx(rv,{size:12}),f.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),o&&f.jsx(Qp,{href:o,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:f.jsx(_7,{size:13})}),f.jsx("span",{className:"flex-1"}),f.jsx(Rt,{title:_A(),"aria-label":_A(),onClick:c,children:i?f.jsx(Nt,{}):f.jsx(lLr,{size:13})})]})}function WK(e,n){const t=navigator.clipboard;if(!t){tn(XI(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>tn(ud(),"success")).catch(r=>tn(r instanceof Error?r.message:String(r),"error"))}function KK({name:e,onCommit:n,onCancel:t}){const[r,s]=C.useState(e),o=C.useRef(!1),a=()=>{if(o.current)return;o.current=!0;const i=r.trim();!i||i===e?t():n(i)};return f.jsx(Ar,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":_ht({path:Ee(e)}),onFocus:i=>{const c=e.lastIndexOf(".");i.currentTarget.setSelectionRange(0,c>0?c:e.length)},onChange:i=>s(i.target.value),onClick:i=>i.stopPropagation(),onDoubleClick:i=>i.stopPropagation(),onBlur:a,onKeyDown:i=>{i.stopPropagation(),i.key==="Enter"?(i.preventDefault(),i.currentTarget.blur()):i.key==="Escape"&&(i.preventDefault(),o.current=!0,t())}})}function VK(e,n){const t=e.currentTarget.getBoundingClientRect(),r="clientX"in e?e.clientX:0,s="clientY"in e?e.clientY:0;return{path:n,x:r||t.left+16,y:s||t.top+t.height}}function XK({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:o,onClose:a}){const i=C.useRef(null),c=C.useRef(a);c.current=a;const[l,d]=C.useState({x:e.x,y:e.y});C.useLayoutEffect(()=>{var y;const m=i.current;if(!m)return;const w=document.activeElement instanceof HTMLElement?document.activeElement:null;return d({x:Math.max(8,Math.min(e.x,window.innerWidth-m.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-m.offsetHeight-8))}),(y=m.querySelector("button"))==null||y.focus(),()=>{m.contains(document.activeElement)&&(w==null||w.focus())}},[e]),C.useEffect(()=>{const m=()=>c.current(),w=g=>{var b;(b=i.current)!=null&&b.contains(g.target instanceof Node?g.target:null)||c.current()},y=g=>{if(g.key==="Tab"){g.preventDefault(),c.current();return}g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),c.current())};return document.addEventListener("pointerdown",w),window.addEventListener("blur",m),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("keydown",y,!0),()=>{document.removeEventListener("pointerdown",w),window.removeEventListener("blur",m),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("keydown",y,!0)}},[]);const _=m=>{c.current(),m()},p=(m,w,y=!1)=>f.jsx(gn,{size:"compact",role:"menuitem",danger:y,onClick:()=>_(w),children:f.jsx("span",{children:m})});return Fs.createPortal(f.jsxs("div",{ref:i,role:"menu","aria-label":Gdt({path:Ee(e.path)}),className:"option-menu fixed z-100 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 shadow-menu",style:{left:l.x,top:l.y},onContextMenu:m=>m.preventDefault(),onKeyDown:m=>{var b,k;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const w=[...((b=i.current)==null?void 0:b.querySelectorAll("button"))??[]],y=w.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:w[0]),g=m.key==="ArrowDown"?1:-1;(k=w[(y+g+w.length)%w.length])==null||k.focus()},children:[p(tht(),n),t&&p(FI(),t),r&&p(Ddt(),r),p(c2e(),s),o&&p(BI(),o,!0)]}),document.body)}const jj=["file-tree-row flex items-center gap-1.5 w-full py-[3px] px-2.5 border-0","bg-transparent text-text text-start cursor-pointer font-[inherit]","[&:hover]:bg-panel [&_>_svg]:shrink-0","[&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted"].join(" "),WD=["file-tree-chevron text-muted shrink-0 [button&]:inline-flex","[button&]:items-center [button&]:justify-center [button&]:w-[13px]","[button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent","[button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90"].join(" ");function KD(){return{dirs:new Map,files:[]}}function QK(e){const n=KD();for(const t of e){const r=t.split("/");let s=n;for(let o=0;oo(t),title:t,children:[p?f.jsx(cl,{size:13,className:WD}):f.jsx(ei,{size:13,className:WD}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&f.jsx(sz,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:o,onOpenFile:a,renamingPath:i,onContextMenu:c,onRename:l,onCancelRename:d})]})}function sz({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:o,renamingPath:a,onContextMenu:i,onRename:c,onCancelRename:l}){const d=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),_=[...e.files].sort((p,m)=>p.localeCompare(m));return f.jsxs(f.Fragment,{children:[d.map(p=>{const m=n?`${n}/${p}`:p;return f.jsx(hns,{name:p,node:e.dirs.get(p),path:m,depth:t,toggled:r,onToggle:s,onOpenFile:o,renamingPath:a,onContextMenu:i,onRename:c,onCancelRename:l},`d:${m}`)}),_.map(p=>{const m=n?`${n}/${p}`:p;if(a===m&&c&&l)return f.jsxs("div",{className:jj,style:{paddingInlineStart:8+t*14},children:[f.jsx(jd,{name:p}),f.jsx(KK,{name:p,onCommit:y=>c(m,y),onCancel:l})]},`f:${m}`);const w=rs(y=>o(m,y));return f.jsxs("button",{type:"button",className:jj,style:{paddingInlineStart:8+t*14},...w,onContextMenu:y=>{i&&(y.preventDefault(),i(y,m))},onKeyDown:y=>{if(i&&(y.key==="ContextMenu"||y.shiftKey&&y.key==="F10")){y.preventDefault(),i(y,m);return}w.onKeyDown(y)},title:xre({name:Ee(m)}),children:[f.jsx(jd,{name:p}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function pns({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:o,onToggledChange:a,onOpenFile:i}){var z,E;const c=t.branchName,l=dt({...ZC(e,{ref:c}),enabled:r==="files",subscribed:r==="files"}),d=dt({...Dy(t.chatSessionId??""),enabled:r==="files"&&!!t.chatSessionId,subscribed:r==="files"&&!!t.chatSessionId}),_=l.data,p=(z=l.error)==null?void 0:z.message,m=l.isFetching,w=qq(t.id),y=ZY({queryKey:w.queryKey})>0,g=(E=d.data)!=null&&E.exists&&d.data.branch===c?t.chatSessionId??void 0:void 0,b=()=>{l.refetch()},k=C.useMemo(()=>_?QK(_.entries):null,[_]),x=r==="files"?m:y,j=C.useCallback(T=>{const A=new Set(s);A.has(T)?A.delete(T):A.add(T),a(A)},[s,a]);return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[f.jsx(GK,{view:r,onViewChange:o,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?jx(n.githubOwner,n.githubRepo,c):void 0,githubTitle:RI({branch:Ee(c)}),refreshing:x,onRefresh:()=>r==="files"?b():void et.invalidateQueries(w)}),r==="changes"?f.jsx(dns,{experiment:t},t.id):f.jsxs(f.Fragment,{children:[(_==null?void 0:_.truncated)&&f.jsx(Gc,{children:TYe()}),p&&k&&f.jsxs(Gc,{children:[YYe()," ",Ee(p)]}),f.jsx(lp,{children:k?k.dirs.size===0&&k.files.length===0?f.jsx(Gc,{children:FYe()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(sz,{node:k,parentPath:"",depth:0,toggled:s,onToggle:j,onOpenFile:(T,A)=>g?i(T,g,void 0,A):i(T,void 0,c,A)})}):f.jsx(Gc,{children:p?v6({error:Ee(p)}):b6()})})]})]})}function oz({icon:e,title:n,description:t}){return f.jsxs("div",{className:"flex h-full w-full min-w-0 flex-1 flex-col items-center justify-center gap-1.5 bg-background p-6 text-center text-muted",children:[f.jsx(e,{size:36,strokeWidth:1.5,className:"shrink-0"}),f.jsx("h3",{className:"mt-1.5 mb-0 max-w-full wrap-anywhere text-xl font-medium text-text",children:n}),t&&f.jsx("p",{className:"m-0 w-full max-w-105 wrap-anywhere text-base leading-[1.55] text-subtext",children:t})]})}function mns({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:o,onOpenFile:a,canRenameFile:i}){var I,$,F;const c=n.id,d=((I=dt(Co(c)).data)==null?void 0:I.some(U=>U.id===e&&U.busy))??!1,_=dt({...Dy(e??""),enabled:!!e,refetchInterval:d?5e3:!1}),p=_.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},w=dt({...ZC(c,m),enabled:!e||_.isSuccess,refetchInterval:d?5e3:!1}),y=w.data,g=($=_.error??w.error)==null?void 0:$.message,b=_.isFetching||w.isFetching,[k,x]=C.useState(null),[j,z]=C.useState(null),E=C.useCallback(()=>{e&&et.invalidateQueries(Dy(e)),et.invalidateQueries({queryKey:Mt("getCodeTree",c),predicate:U=>!SI(U)})},[e,c]),T=C.useRef(d);C.useEffect(()=>{T.current&&!d&&E(),T.current=d},[d,E]);const A=C.useMemo(()=>y?QK(y.entries):null,[y]),R=C.useCallback(U=>{const G=new Set(r);G.has(U)?G.delete(U):G.add(U),o(G)},[r,o]),D=e&&(p!=null&&p.exists)?p:null,L=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?$Cr({branch:Ee(D.baselineBranch)}):E6()),P=((F=D==null?void 0:D.files)==null?void 0:F.length)??0,q=D?gCr({branch:Ee(`${L}${P>0?"*":""}`)}):zCr({branch:Ee(n.baselineBranch)}),B=D?D.branch:n.baselineBranch,X=(U,G)=>D?a(U,e,void 0,G):a(U,void 0,n.baselineBranch,G),K=(y==null?void 0:y.root)==="worktree",Z=async(U,G)=>{try{await fzr(c,U,G,{sessionId:e}),E()}catch(oe){tn(oe instanceof Error?oe.message:String(oe),"error")}},ee=U=>{const G=(y==null?void 0:y.path)??n.repoPath;WK(G,U)};return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[f.jsx(GK,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:q,branchTitle:q,githubHref:n.githubEnabled&&B?jx(n.githubOwner,n.githubRepo,B):void 0,githubTitle:B?RI({branch:Ee(B)}):void 0,refreshing:b,onRefresh:E}),g&&(p||y)&&f.jsxs(Gc,{children:[M7r()," ",Ee(g)]}),!y||e&&!p?f.jsx(lp,{children:f.jsx(Gc,{children:g?v6({error:Ee(g)}):b6()})}):D&&t==="changes"?f.jsx(lp,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:P===0||!D.diff?f.jsx("div",{className:"changes-note text-sm text-muted",children:d7r()}):f.jsxs(f.Fragment,{children:[D.diff.truncated&&f.jsx(EU,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),f.jsx(AU,{diff:D.diff.diff,partial:D.diff.truncated})]})}):f.jsxs(lp,{children:[y.truncated&&f.jsx(Gc,{children:KCr()}),A?A.dirs.size===0&&A.files.length===0?f.jsx(oz,{icon:Ri,title:k7r(),description:Nxt()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(sz,{node:A,parentPath:"",depth:0,toggled:r,onToggle:R,onOpenFile:X,renamingPath:j,onContextMenu:(U,G)=>{x(VK(U,G))},onRename:(U,G)=>{z(null),Z(U,{action:"rename",newName:G})},onCancelRename:()=>z(null)})}):f.jsx(Gc,{children:r7r()})]}),k&&f.jsx(XK,{target:k,onOpen:()=>X(k.path,"keepOpen"),onRename:K&&i(k.path)?()=>z(k.path):void 0,onDuplicate:K?()=>void Z(k.path,{action:"duplicate"}):void 0,onCopyPath:()=>ee(k.path),onDelete:K?()=>{window.confirm(jdt({path:Ee(k.path)}))&&Z(k.path,{action:"delete"})}:void 0,onClose:()=>x(null)})]})}function YK({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const o=C.useMemo(()=>{if(!e)return[];const d=e.replace(/\r\n?/g,` `),_=Aq(d,vC(n));return d.endsWith(` -`)?_.slice(0,-1):_},[e,n]),a=t&&o.length>0?Math.min(Math.max(Math.trunc(t),1),o.length):void 0,i=C.useRef(null);C.useEffect(()=>{var d;r!==void 0&&(a?((d=i.current)==null||d.scrollIntoView({block:"center"}),s==null||s()):o.length===0&&(s==null||s()))},[o.length,s,r,a]);const{ruleCh:c}=fq(o.length),l=C.useMemo(()=>o.map((d,_)=>f.jsxs("div",{ref:_+1===a?i:void 0,className:`file-view-line flex items-stretch ${_+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[f.jsx("span",{"data-line":_+1,className:`${_q} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),f.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${My} ${uq}`,children:Tq(d)?f.jsx("br",{}):d})]},_)),[o,c,a]);return f.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${My}`,children:[o.length>0&&f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${c}ch`},"aria-hidden":"true"}),l]})}const rx=C.createContext(null);function gns({url:e,name:n}){return f.jsx(Qp,{size:"small",href:e,download:n,"aria-label":ly({name:Ee(n)}),"data-tip":ly({name:Ee(n)}),"data-tip-align":"end",children:f.jsx(Ix,{size:13})})}const vns=C.lazy(()=>nZ(()=>import("./PdfPreview-CVq8sN63.js"),__vite__mapDeps([0,1])).catch(e=>(console.error("PDF viewer failed to load",e),{default:JK})));function ZK(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function JK({url:e,name:n}){return f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[CEt()," ",f.jsxs("a",{href:e,download:n,children:[w5()," ",Ee(n)]})]})}function Cj({kind:e,url:n,name:t,download:r=!0}){const[s,o]=C.useState(!1),a=C.useContext(rx);if(C.useEffect(()=>o(!1),[e,n]),s)return f.jsx(JK,{url:n,name:t});let i;return e==="image"?i=f.jsx("div",{className:"fpreview-image flex min-h-0 flex-1 items-start justify-center overflow-auto p-6 [&_img]:max-w-full [&_img]:h-auto [&_img]:border [&_img]:border-border [&_img]:rounded-sm",children:f.jsx("img",{src:n,alt:t,onError:()=>o(!0)})}):e==="audio"?i=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>o(!0)})}):e==="video"?i=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>o(!0)})}):i=f.jsx(C.Suspense,{fallback:f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center",children:f.jsx(Nt,{})}),children:f.jsx(vns,{url:n,name:t,download:r,onError:()=>o(!0)},n)}),f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i,r&&e!=="pdf"&&a&&Fs.createPortal(f.jsx(gns,{url:n,name:t}),a)]})}const bns=e=>({queryKey:Mt("fileVersion",e),staleTime:2e3,refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:2e3,queryFn:async({signal:n})=>{const t=await fetch(e,{method:"HEAD",cache:"no-store",signal:n});if(t.status===404)return"missing";if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.headers.get("etag")??t.headers.get("content-length")}});function eV(e,n=!0){return dt({...bns(e),enabled:n,subscribed:n}).data??null}function yns(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function xns(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),o=r===-1?"":t.slice(r),a=s.indexOf("?"),i=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1),l=i.startsWith("/")?[]:n.split("/").filter(m=>m.length>0);for(const m of i.split("/"))if(!(!m||m==="."))if(m===".."){if(l.length===0)return null;l.pop()}else l.push(m);const d=l.join("/");if(!d)return null;const _=new URLSearchParams(c);_.delete("path");const p=_.toString();return{path:d,url:`${dd(e,d)}${p?`&${p}`:""}${o}`}}function wns(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` +`)?_.slice(0,-1):_},[e,n]),a=t&&o.length>0?Math.min(Math.max(Math.trunc(t),1),o.length):void 0,i=C.useRef(null);C.useEffect(()=>{var d;r!==void 0&&(a?((d=i.current)==null||d.scrollIntoView({block:"center"}),s==null||s()):o.length===0&&(s==null||s()))},[o.length,s,r,a]);const{ruleCh:c}=fq(o.length),l=C.useMemo(()=>o.map((d,_)=>f.jsxs("div",{ref:_+1===a?i:void 0,className:`file-view-line flex items-stretch ${_+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[f.jsx("span",{"data-line":_+1,className:`${_q} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),f.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${My} ${uq}`,children:Tq(d)?f.jsx("br",{}):d})]},_)),[o,c,a]);return f.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${My}`,children:[o.length>0&&f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${c}ch`},"aria-hidden":"true"}),l]})}const rx=C.createContext(null);function gns({url:e,name:n}){return f.jsx(Qp,{size:"small",href:e,download:n,"aria-label":ly({name:Ee(n)}),"data-tip":ly({name:Ee(n)}),"data-tip-align":"end",children:f.jsx(Ix,{size:13})})}const vns=C.lazy(()=>nZ(()=>import("./PdfPreview-DZQw7Tpb.js"),__vite__mapDeps([0,1])).catch(e=>(console.error("PDF viewer failed to load",e),{default:JK})));function ZK(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function JK({url:e,name:n}){return f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[CEt()," ",f.jsxs("a",{href:e,download:n,children:[w5()," ",Ee(n)]})]})}function Cj({kind:e,url:n,name:t,download:r=!0}){const[s,o]=C.useState(!1),a=C.useContext(rx);if(C.useEffect(()=>o(!1),[e,n]),s)return f.jsx(JK,{url:n,name:t});let i;return e==="image"?i=f.jsx("div",{className:"fpreview-image flex min-h-0 flex-1 items-start justify-center overflow-auto p-6 [&_img]:max-w-full [&_img]:h-auto [&_img]:border [&_img]:border-border [&_img]:rounded-sm",children:f.jsx("img",{src:n,alt:t,onError:()=>o(!0)})}):e==="audio"?i=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>o(!0)})}):e==="video"?i=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>o(!0)})}):i=f.jsx(C.Suspense,{fallback:f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center",children:f.jsx(Nt,{})}),children:f.jsx(vns,{url:n,name:t,download:r,onError:()=>o(!0)},n)}),f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i,r&&e!=="pdf"&&a&&Fs.createPortal(f.jsx(gns,{url:n,name:t}),a)]})}const bns=e=>({queryKey:Mt("fileVersion",e),staleTime:2e3,refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:2e3,queryFn:async({signal:n})=>{const t=await fetch(e,{method:"HEAD",cache:"no-store",signal:n});if(t.status===404)return"missing";if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.headers.get("etag")??t.headers.get("content-length")}});function eV(e,n=!0){return dt({...bns(e),enabled:n,subscribed:n}).data??null}function yns(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function xns(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),o=r===-1?"":t.slice(r),a=s.indexOf("?"),i=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1),l=i.startsWith("/")?[]:n.split("/").filter(m=>m.length>0);for(const m of i.split("/"))if(!(!m||m==="."))if(m===".."){if(l.length===0)return null;l.pop()}else l.push(m);const d=l.join("/");if(!d)return null;const _=new URLSearchParams(c);_.delete("path");const p=_.toString();return{path:d,url:`${dd(e,d)}${p?`&${p}`:""}${o}`}}function wns(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` ---`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const tV="orx:files-tree-width",nV="orx:artifacts-collapsed:",rV=180,sV=320,kns=8,Sns=280;function jns(){try{const e=Number(localStorage.getItem(tV));if(Number.isFinite(e)&&e>=rV&&e<=sV)return e}catch{}return Sns}function Cns(e){try{const n=localStorage.getItem(`${nV}${e}`);if(!n)return new Set;const t=JSON.parse(n);return Array.isArray(t)?new Set(t.filter(r=>typeof r=="string")):new Set}catch{return new Set}}function m0(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=m0(t.children??[],n);if(r)return r}}return null}function oV({projectId:e,folder:n,markdown:t,entries:r}){const s=C.useRef(r);s.current=r;const o=C.useMemo(()=>{const a=i=>{if(yns(i))return i;const c=xns(e,n,i);if(!c)return null;const l=m0(s.current,c.path);if(!l)return c.url;const d=c.url.indexOf("#"),_=d===-1?c.url:c.url.slice(0,d),p=d===-1?"":c.url.slice(d);return`${_}&v=${l.modifiedAt}:${l.size}${p}`};return{a:({href:i,children:c,...l})=>{const d=!i||i.startsWith("#"),_=d?i:a(i);return _?f.jsx("a",{...l,href:_,...d?{}:{target:"_blank",rel:"noopener noreferrer"},children:c}):f.jsx("span",{children:c})},img:({src:i,alt:c})=>{if(!i||typeof i!="string")return null;const l=a(i);return l?f.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[f.jsx("img",{src:l,alt:c??"",loading:"lazy"}),c&&f.jsx("span",{className:"artifact-img-caption",children:c})]}):null},...lK}},[e,n]);return f.jsx("div",{className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-normal [&_code]:text-primary [&_code]:bg-surface [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:font-semibold [&_h2]:text-text [&_h2]:font-semibold [&_h3]:text-text [&_h3]:font-semibold [&_h4]:text-text [&_h4]:font-semibold [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text artifact-md text-lg [&_h1]:text-4xl [&_h1]:leading-[1.18] [&_h1]:mt-7 [&_h1]:mx-0 [&_h1]:mb-3.5 [&_h2]:text-3xl [&_h2]:leading-tight [&_h2]:mt-7 [&_h2]:mx-0 [&_h2]:mb-2.5 [&_h3]:text-xl [&_h3]:leading-[1.35] [&_h3]:mt-5.5 [&_h3]:mx-0 [&_h3]:mb-2 [&_h4]:text-lg [&_h4]:leading-[1.4] [&_h4]:mt-4.5 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:overflow-x-auto [&_.artifact-img]:block [&_.artifact-img]:my-3 [&_.artifact-img]:mx-0 [&_.artifact-img_img]:max-w-full [&_.artifact-img_img]:h-auto [&_.artifact-img_img]:border [&_.artifact-img_img]:border-border [&_.artifact-img_img]:rounded-sm [&_.artifact-img-caption]:block [&_.artifact-img-caption]:mt-1 [&_.artifact-img-caption]:text-center [&_.artifact-img-caption]:text-sm [&_.artifact-img-caption]:text-subtext",children:f.jsx(dWr,{remarkPlugins:[eK,[tK,cK]],rehypePlugins:[NW],components:o,children:rK(wns(t))})})}function zns(e){return e.presentation==="text"&&Z7(e.name)?"markdown":ZK(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function Ens(e,n,t,r){var l;const s=t==="markdown"||t==="text"&&n.size<=pB,o=JC(e,n.path),a=dt({...o,enabled:s,subscribed:s}),i=C.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});C.useEffect(()=>{const d=i.current;i.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&d.projectId===e&&d.path===n.path&&(d.modifiedAt!==n.modifiedAt||d.size!==n.size||d.version!==null&&d.version!==r)&&et.invalidateQueries({queryKey:o.queryKey,exact:!0})},[e,n.path,n.modifiedAt,n.size,r,s]);const c=a.data;return{text:c&&!c.binary?c.content:null,binary:(c==null?void 0:c.binary)??!1,truncated:(c==null?void 0:c.truncated)??!1,error:c?null:((l=a.error)==null?void 0:l.message)??(c===null?v2e():null),wantsText:s}}function Nns({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=zns(n),o=eV(dd(e,n.path)),{text:a,binary:i,truncated:c,error:l,wantsText:d}=Ens(e,n,s,o),[_,p]=C.useState(!1),[m,w]=C.useState(null),y=s==="markdown",g=n.path.split("/").slice(0,-1).join("/"),b=`${dd(e,n.path)}&v=${encodeURIComponent(o??`${n.modifiedAt}:${n.size}`)}`;let k;return s==="image"||s==="audio"||s==="video"||s==="pdf"?k=f.jsx(rx.Provider,{value:m,children:f.jsx(Cj,{kind:s,url:b,name:n.name})}):s==="download"||!d||i?k=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||i?Zwe():K4e()," ",f.jsx("a",{href:b,...s==="download"||i?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||i?QI():E2e()})]}):l?k=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[dke()," ",Ee(l)]}):a===null?k=f.jsxs(Wr,{children:[f.jsx(Nt,{})," ",$I()]}):y&&!_?k=f.jsx(oV,{projectId:e,folder:g,markdown:a,entries:r}):k=f.jsx(YK,{text:a,path:n.path}),f.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0 [@container((max-width:_720px))]:hidden",children:[f.jsxs("div",{className:"fpreview-head @container flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-subtext shrink-0",children:[f.jsx(jd,{name:n.name}),f.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ee(n.path),children:n.name}),f.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0 @max-xl:hidden",children:[c4e()," ",new Date(n.modifiedAt).toLocaleString(N(),{dateStyle:"medium",timeStyle:"short"})]}),f.jsx("div",{ref:w,className:"contents"}),(s==="text"||s==="download")&&f.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:au(n.size)}),y&&f.jsx(Rt,{size:"small",active:_,"data-tip":_?uy():Gh(),"data-tip-align":"end","aria-label":_?uy():Gh(),onClick:()=>p(x=>!x),children:f.jsx(uS,{size:13})}),f.jsx(Qp,{size:"small",href:b,target:"_blank",rel:"noopener noreferrer","data-tip":TN(),"data-tip-align":"end","aria-label":TN(),children:f.jsx(yd,{size:13})}),f.jsx(Rt,{size:"small","data-tip":AN(),"data-tip-align":"end","aria-label":AN(),onClick:()=>{window.confirm(p6({path:Ee(n.path)}))&&t(n.path)},children:f.jsx(Hd,{size:13})})]}),f.jsxs("div",{className:`fpreview-body flex-1 min-h-0 overflow-auto [&.doc]:pt-4.5 [&.doc]:px-7 [&.doc]:pb-12 [&.doc_.artifact-md]:max-w-readable [&.doc_.artifact-md]:my-0 [&.doc_.artifact-md]:mx-auto ${y&&!_?"doc":""}`,children:[k,c&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:kke()})]})]})}function aV({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:o,onOpenFile:a,onDelete:i,renamingPath:c,onContextMenu:l,onRename:d,onCancelRename:_}){return f.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(p=>{var w;const m={paddingInlineStart:8+Math.min(n,kns)*14};if(p.isDir){const y=!t.has(p.path);return f.jsxs("div",{className:"min-w-0 max-w-full",children:[f.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100",style:m,onClick:()=>s(p.path),children:[f.jsx("button",{className:"file-tree-chevron text-muted shrink-0 [button&]:inline-flex [button&]:items-center [button&]:justify-center [button&]:w-[13px] [button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent [button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90","aria-label":y?dwe({name:Ee(p.name)}):Hwe({name:Ee(p.name)}),onClick:g=>{g.stopPropagation(),s(p.path)},children:f.jsx(ei,{size:13,className:y?"open":""})}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name}),f.jsx(Rt,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":rke(),"data-tip-align":"end","aria-label":Rwe({name:Ee(p.name)}),onClick:g=>{g.stopPropagation(),window.confirm(p6({path:Ee(p.path)}))&&i(p.path)},children:f.jsx(Hd,{size:12})})]}),y&&(((w=p.children)==null?void 0:w.length)??0)>0&&f.jsx(aV,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:o,onOpenFile:a,onDelete:i,renamingPath:c,onContextMenu:l,onRename:d,onCancelRename:_})]},p.path)}return c===p.path?f.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start font-[inherit] artifact-tree-row",style:m,children:[f.jsx(jd,{name:p.name}),f.jsx(KK,{name:p.name,onCommit:y=>d(p.path,y),onCancel:_})]},p.path):f.jsxs("button",{type:"button",className:`file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100 ${r===p.path?"selected":""}`,style:m,title:Wee({path:Ee(p.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===p.path,onClick:()=>o(p.path),onDoubleClick:()=>a(p.path),onContextMenu:y=>{y.preventDefault(),o(p.path),l(y,p.path)},onAuxClick:y=>{y.button===1&&(y.preventDefault(),o(p.path),a(p.path))},onKeyDown:y=>{if(y.key==="ContextMenu"||y.shiftKey&&y.key==="F10"){y.preventDefault(),o(p.path),l(y,p.path);return}if(y.key===" "){y.preventDefault(),y.stopPropagation(),o(p.path);return}y.key==="Enter"&&(y.preventDefault(),y.stopPropagation(),o(p.path),a(p.path))},children:[f.jsx(jd,{name:p.name}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name})]},p.path)})})}function Ans({project:e,artifacts:n,onOpenFile:t,canRenameFile:r}){const[s,o]=C.useState(null),[a,i]=C.useState(()=>Cns(e.id)),[c,l]=C.useState(jns),[d,_]=C.useState(null),[p,m]=C.useState(null),w=C.useRef(null);C.useEffect(()=>{try{localStorage.setItem(`${nV}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const y=E=>{var L;E.preventDefault(),E.currentTarget.setPointerCapture(E.pointerId);const T=(L=w.current)==null?void 0:L.getBoundingClientRect(),A=document.body.style.userSelect;document.body.style.userSelect="none";const R=P=>{const q=Math.round(P.clientX-((T==null?void 0:T.left)??0)),B=Math.min(Math.max(q,rV),sV);l(B);try{localStorage.setItem(tV,String(B))}catch{}},D=()=>{window.removeEventListener("pointermove",R),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),document.body.style.userSelect=A};window.addEventListener("pointermove",R),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)};C.useEffect(()=>{if(!s||!n)return;const E=m0(n.entries,s);(!E||E.isDir)&&o(null)},[s,n]);const g=E=>i(T=>{const A=new Set(T);return A.has(E)?A.delete(E):A.add(E),A}),b=E=>{(s===E||s!=null&&s.startsWith(E+"/"))&&o(null),g8r(e.id,E).catch(()=>{})},k=async(E,T)=>{try{await v8r(e.id,E,T),T.action==="rename"&&s===E&&o(null)}catch(A){tn(A instanceof Error?A.message:String(A),"error")}},x=E=>{n&&WK(n.dir,E)};if(!n)return f.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:f.jsxs(Wr,{className:"p-5",children:[f.jsx(Nt,{})," ",Zke()]})});const j=E=>f.jsx(aV,{entries:E,depth:0,collapsed:a,selected:s,onToggle:g,onSelect:o,onOpenFile:t,onDelete:b,renamingPath:p,onContextMenu:(T,A)=>{_(VK(T,A))},onRename:(T,A)=>{m(null),k(T,{action:"rename",newName:A})},onCancelRename:()=>m(null)}),z=s?m0(n.entries,s):null;return n.entries.length===0?f.jsx(oz,{icon:cC,title:v4e(),description:$4e()}):f.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background @container",children:[f.jsxs("div",{className:"ftree-pane relative shrink-0 flex flex-col min-h-0 border-s border-s-border-variant border-e border-e-border-variant bg-background [@container((max-width:_720px))]:!w-full",ref:w,style:{width:c},children:[f.jsx("div",{className:"ftree-resizer absolute -end-[3px] top-0 bottom-0 w-1.5 cursor-col-resize z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover [@container((max-width:_720px))]:hidden",onPointerDown:y}),f.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[j(n.entries),n.truncated&&f.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:Mke()})]})]}),z?f.jsx(Nns,{projectId:e.id,entry:z,onDelete:b,artifactEntries:n.entries},z.path):f.jsxs("div",{className:"fpreview flex-1 min-w-0 flex flex-col min-h-0 bg-background fpreview-none items-center justify-center gap-2 text-sm text-muted [@container((max-width:_720px))]:hidden",children:[f.jsx(QDr,{size:22,strokeWidth:1.5}),f.jsx("span",{children:I2e()})]}),d&&f.jsx(XK,{target:d,onOpen:()=>t(d.path),onRename:r(d.path)?()=>m(d.path):void 0,onDuplicate:()=>void k(d.path,{action:"duplicate"}),onCopyPath:()=>x(d.path),onDelete:()=>{window.confirm(p6({path:Ee(d.path)}))&&b(d.path)},onClose:()=>_(null)})]})}const iV=20*1024*1024,cV="bg-background border border-border rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text",lV="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",Tns="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",Rns="text-sm font-normal text-text",Mns="mt-1 mb-0 text-sm leading-relaxed text-text";function uV(e){return new Promise((n,t)=>{const r=new FileReader;r.onload=()=>{const s=r.result;if(typeof s!="string"){t(new Error("could not read file"));return}const o=s.indexOf(",");n(o>=0?s.slice(o+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function Ons(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function _V({accept:e,busy:n,prompt:t,onFile:r}){const[s,o]=C.useState(!1),a=C.useRef(null);return f.jsxs("div",{className:`flex flex-col items-center justify-center gap-2 py-6.5 px-4.5 border-[1.5px] border-dashed rounded-md text-center text-sm text-text transition-[border-color,background] duration-120 ${n?"cursor-default":"cursor-pointer"} ${s?"border-primary bg-surface text-text":"border-border-variant bg-surface [&:hover]:border-primary"}`,onDragOver:i=>{i.preventDefault(),o(!0)},onDragLeave:()=>o(!1),onDrop:i=>{var l;if(i.preventDefault(),o(!1),n)return;const c=(l=i.dataTransfer.files)==null?void 0:l[0];c&&r(c)},onClick:()=>{var i;n||(i=a.current)==null||i.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:i=>{var c;(i.key==="Enter"||i.key===" ")&&!n&&(i.preventDefault(),(c=a.current)==null||c.click())},children:[f.jsx("input",{ref:a,type:"file",accept:e,hidden:!0,onChange:i=>{var l;const c=(l=i.target.files)==null?void 0:l[0];c&&r(c),i.target.value=""}}),n?f.jsxs(f.Fragment,{children:[f.jsx(Nt,{}),f.jsx("span",{children:kdr()})]}):f.jsxs(f.Fragment,{children:[f.jsx(CLr,{size:20,strokeWidth:1.5}),f.jsx("span",{children:t})]})]})}function fV({bytes:e,updatedAt:n}){return f.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[au(e),n>0&&f.jsxs("span",{className:"text-muted",children:[" · ",Zc(n)]})]})}function Dns({skill:e,onError:n}){const t=mn({mutationFn:H8r}),r=t.isPending;return f.jsxs("div",{className:"flex items-center gap-2 py-1 border-t border-t-border first:border-t-0",children:[f.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[f.jsx("span",{className:Rns,children:e.name}),e.origin&&f.jsx(Zt,{size:"small",children:e.origin})]}),f.jsx(fV,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Rt,{size:"small","data-tip":e.origin?Dur():Y_r(),"data-tip-align":"end","aria-label":e.origin?t_r({name:Ee(e.name)}):elr({name:Ee(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?Gur({name:Ee(e.name)}):Ucr({name:Ee(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:f.jsx(Hd,{size:13})})]})}function Lns({template:e,onError:n}){const t=mn({mutationFn:P8r}),r=t.isPending,s=e.supportFiles.length;return f.jsxs("div",{className:Tns,children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("span",{className:"text-base font-medium text-text",children:e.name}),f.jsxs("p",{className:Mns,children:[e.entry,s>0&&(s===1?pur():__r({count:fn(s)}))]})]}),f.jsx(fV,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Rt,{"data-tip":ifr(),"data-tip-align":"end","aria-label":ylr({name:Ee(e.name)}),disabled:r,onClick:()=>{window.confirm(ulr({name:Ee(e.name)}))&&t.mutateAsync(e.name).catch(o=>{n(o instanceof Error?o.message:String(o))})},children:f.jsx(Hd,{size:13})})]})}function $ns(){var k;const e=mn({mutationFn:F8r}),n=dt(LEr()),t=n.data,r=C.useRef(null),[s,o]=C.useState(!1),[a,i]=C.useState(!1),c=C.useCallback(()=>{const x=r.current;o(!!x&&x.scrollTop>1),i(!!x&&x.scrollHeight-x.scrollTop-x.clientHeight>1)},[]);C.useLayoutEffect(()=>{c();const x=r.current;if(!x)return;const j=new ResizeObserver(c);return j.observe(x),()=>j.disconnect()},[t,c]);const l=n.isFetching,d=(k=n.error)==null?void 0:k.message,[_,p]=C.useState(!1),[m,w]=C.useState(null),y=()=>{n.refetch()},g=C.useRef(!1),b=C.useCallback(async x=>{if(!g.current){if(w(null),!Ons(x.name)){w(qdr());return}if(x.size>iV){w(WP());return}g.current=!0,p(!0);try{await e.mutateAsync({filename:x.name,contentBase64:await uV(x)})}catch(j){w(j instanceof Error?j.message:String(j))}finally{g.current=!1,p(!1)}}},[]);return f.jsxs("section",{className:cV,children:[f.jsxs("div",{className:"flex items-baseline gap-2.5",children:[f.jsx("h3",{children:ddr()}),f.jsxs(Oe,{className:"ms-auto",size:"small",onClick:y,disabled:l,children:[f.jsx(Oi,{size:12,className:l?"animate-[spin_0.9s_linear_infinite]":""})," ",V0()]})]}),f.jsx("p",{className:lV,children:Alr()}),f.jsx(_V,{accept:".md,.markdown,.zip",busy:_,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:Blr()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:Ocr()})]}),onFile:x=>void b(x)}),m&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),d&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[x_r()," ",d]}),t===void 0?d?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Nt,{})," ",zfr()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:Kfr()}):f.jsxs("div",{className:"relative mt-1",children:[f.jsx("div",{ref:r,onScroll:c,className:"flex flex-col max-h-120 overflow-y-auto overscroll-contain",children:t.map(x=>f.jsx(Dns,{skill:x,onError:w},x.name))}),s&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 h-10 bg-gradient-to-b from-background to-transparent"}),a&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-background to-transparent"})]})]})}function Ins(){var d;const e=mn({mutationFn:I8r}),n=dt(DEr()),t=n.data,r=(d=n.error)==null?void 0:d.message,[s,o]=C.useState(!1),[a,i]=C.useState(null),c=C.useRef(!1),l=C.useCallback(async _=>{if(c.current)return;i(null);const p=_.name.toLowerCase();if(!p.endsWith(".tex")&&!p.endsWith(".zip")){i(Jdr());return}if(_.size>iV){i(WP());return}c.current=!0,o(!0);try{await e.mutateAsync({filename:_.name,contentBase64:await uV(_)})}catch(m){i(m instanceof Error?m.message:String(m))}finally{c.current=!1,o(!1)}},[]);return f.jsxs("section",{className:cV,children:[f.jsx("h3",{children:gfr()}),f.jsx("p",{className:lV,children:Mdr()}),f.jsx(_V,{accept:".tex,.zip",busy:s,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:Qlr()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:H1r()})]}),onFile:_=>void l(_)}),a&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:a}),r&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[T_r()," ",r]}),t===void 0?r?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Nt,{})," ",$fr()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:rdr()}):f.jsx("div",{className:"flex flex-col mt-1",children:t.map(_=>f.jsx(Lns,{template:_,onError:i},_.name))})]})}function Pns(){return f.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl",children:[f.jsx("h1",{children:F_r()}),f.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:jur()}),f.jsx($ns,{}),f.jsx(Ins,{})]})}const Bns="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Rc({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:o,onPromote:a,onClose:i}){return f.jsxs("button",{className:`tab [&.closable]:max-w-60 [&.closable]:pe-0.5 [&_.tab-label]:grid [&_.tab-label]:grid-cols-[minmax(0,_1fr)] [&_.tab-label]:min-w-0 [&_.tab-label]:overflow-hidden [&_.tab-label_>_span]:[grid-area:1_/_1] [&_.tab-label_>_span]:overflow-hidden [&_.tab-label_>_span]:text-ellipsis [&_.tab-label_>_span]:whitespace-nowrap [&_.tab-label::after]:[grid-area:1_/_1] [&_.tab-label::after]:overflow-hidden [&_.tab-label::after]:text-ellipsis [&_.tab-label::after]:whitespace-nowrap [&_.tab-label::after]:content-[attr(data-label)] [&_.tab-label::after]:invisible [&_.tab-label::after]:font-medium [&_.tab-close]:inline-flex [&_.tab-close]:items-center [&_.tab-close]:justify-center [&_.tab-close]:w-3.5 [&_.tab-close]:h-3.5 [&_.tab-close]:rounded-xs [&_.tab-close]:text-muted [&_.tab-close]:shrink-0 [&_.tab-close:hover]:bg-hover-strong [&_.tab-close:hover]:text-text relative inline-flex items-center gap-[5px] h-8 py-0 px-2 border border-transparent border-b-0 rounded-[var(--radius-md)_var(--radius-md)_0_0] text-sm font-normal text-subtext whitespace-nowrap select-none min-w-0 [&:hover]:bg-surface [&:hover]:text-text [&:not(.active)_+_.tab:not(.active)::before]:content-[''] [&:not(.active)_+_.tab:not(.active)::before]:absolute [&:not(.active)_+_.tab:not(.active)::before]:top-2.5 [&:not(.active)_+_.tab:not(.active)::before]:bottom-2.5 [&:not(.active)_+_.tab:not(.active)::before]:-start-px [&:not(.active)_+_.tab:not(.active)::before]:w-px [&:not(.active)_+_.tab:not(.active)::before]:bg-border [&.active]:border-border [&.active]:bg-background [&.active]:text-text [&.active]:font-medium [&.active::after]:content-[''] [&.active::after]:absolute [&.active::after]:end-0 [&.active::after]:-bottom-px [&.active::after]:start-0 [&.active::after]:h-px [&.active::after]:bg-background closable ${e?"active":""} ${s?Bns:""}`,onClick:o,onDoubleClick:a,title:s?R1r({label:n}):n,"aria-label":s?w1r({label:n}):n,children:[t,f.jsx("span",{className:"tab-label","data-label":n,children:f.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),f.jsx("span",{role:"button",className:"tab-close",title:$Qe(),onPointerDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),i()},children:f.jsx(mr,{size:12})})]})}const VD=["files-pill inline-flex items-center gap-2 min-w-0 border border-border","rounded-md py-[7px] px-[11px] bg-background text-text","no-underline [&_code]:font-mono [&_code]:text-sm","[&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap","[&_>_svg]:shrink-0 [&_>_svg]:text-muted [a&:hover]:border-muted"].join(" ");function Fns({owner:e,repo:n,branch:t}){return!e||!n?f.jsx("span",{className:VD,children:f.jsx("code",{children:t})}):f.jsxs("a",{className:VD,href:jx(e,n,t),target:"_blank",rel:"noopener noreferrer",title:m5({name:Ee(t)}),children:[f.jsx("code",{children:t}),f.jsx(_7,{size:12})]})}const z3=["experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant","[&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm","[&_h2]:font-semibold"].join(" "),XD=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function QD(e){return new Date(e).toLocaleString(N(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function YD(e,n){return Wg((e.endedAt??n)-e.createdAt)}function Hns({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:o}){const a=r[0]??null,i=nB(r),c=r.some(_=>_.status==="running"||_.status==="starting"),[l,d]=C.useState(()=>Date.now());return C.useEffect(()=>{if(!c)return;d(Date.now());const _=window.setInterval(()=>d(Date.now()),1e3);return()=>window.clearInterval(_)},[c]),f.jsx("div",{className:"experiment-overview absolute inset-0 overflow-y-auto bg-background [&_h1]:m-0 [&_h1]:text-text [&_h1]:text-xl [&_h1]:leading-tight",children:f.jsxs("div",{className:"experiment-overview-inner w-full max-w-230 my-0 mx-auto pt-6.5 px-7 pb-10 [@media((max-width:_720px))]:pt-5 [@media((max-width:_720px))]:px-4.5 [@media((max-width:_720px))]:pb-8",children:[f.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[f.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[f.jsx("h1",{children:e.title||e.slug}),f.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),f.jsx(du,{status:a?Ua(a):"idle"})]}),f.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&f.jsxs(Oe,{...rs(_=>s(a.id,_)),children:[f.jsx(tl,{size:15}),Hlt()]}),f.jsxs(Oe,{...rs(o),children:[f.jsx(Bx,{size:15}),Cct()]})]}),e.description&&f.jsxs("section",{className:"experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm [&_h2]:font-semibold overview-description [&_.md]:text-text [&_.md]:leading-[1.65]",children:[f.jsx("h2",{children:nlt()}),f.jsx(rl,{text:e.description})]}),f.jsxs("section",{className:z3,children:[f.jsx("h2",{children:a?mct():Eut()}),a&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap gap-y-2.5 gap-x-4.5 text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs",children:[f.jsx(du,{status:Ua(a)}),f.jsx(f7,{backend:a.backend}),f.jsxs("span",{title:vut(),children:[f.jsx(AOr,{size:13}),QD(a.createdAt)]}),f.jsxs("span",{title:flt(),children:[f.jsx(qOr,{size:13}),YD(a,l)]}),a.commitSha&&f.jsxs("span",{title:Lct(),children:[f.jsx(xDr,{size:14}),f.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&f.jsxs("span",{children:[wlt()," ",a.exitCode]})]}),a.command&&f.jsxs("code",{className:XD,children:["$ ",a.command]}),i&&f.jsx("p",{className:"experiment-overview-monitoring mt-4 text-accent-amber text-sm wrap-anywhere",children:i}),a.resultMarkdown&&f.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${a.status==="failed"?"failed":""}`,children:f.jsx(rl,{text:a.resultMarkdown})})]})]}),f.jsxs("section",{className:z3,children:[f.jsx("h2",{children:"Git"}),f.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs experiment-overview-git-meta gap-y-[9px] gap-x-3.5 [&_.files-pill]:py-[5px] [&_.files-pill]:px-2 [&_.files-pill]:rounded-sm [&_.files-pill_code]:text-xs",children:[f.jsx(Fns,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&f.jsxs("span",{children:[Rlt()," ",f.jsx("code",{children:n.slug})]}),f.jsxs("span",{title:QD(e.createdAt),children:[Wct()," ",Zc(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&f.jsxs("code",{className:XD,children:["$ ",e.runCommand]})]}),r.length>0&&f.jsxs("section",{className:z3,children:[f.jsx("h2",{children:cut()}),f.jsx("div",{className:"experiment-run-history border-t border-t-border-variant [&_button]:w-full [&_button]:grid [&_button]:grid-cols-[minmax(72px,_0.7fr)_minmax(100px,_1fr)_minmax(70px,_0.7fr)_60px_16px] [&_button]:items-center [&_button]:gap-3.5 [&_button]:py-[11px] [&_button]:px-0.5 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button]:text-sm [&_button:hover]:bg-surface [@media((max-width:_720px))]:[&_button]:grid-cols-[65px_1fr_60px_16px] [@media((max-width:_720px))]:[&_button_>_:nth-child(3)]:hidden",children:r.map((_,p)=>f.jsxs("button",{...rs(m=>s(_.id,m)),children:[f.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[Zlt()," ",r.length-p]}),f.jsx(du,{status:Ua(_)}),f.jsx("span",{children:Zc(_.createdAt)}),f.jsx("span",{children:YD(_,l)}),f.jsx(tl,{size:13})]},_.id))})]})]})})}function ZD(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r{const t=n.current;if(!t)return;const{terminal:r,dispose:s}=Ux(t,!0);let o=!1,a=0,i=!1,c=!1;async function l(){if(i){c=!0;return}i=!0;try{for(;;){const _=await azr(e,a);if(o)return;if(_.dataBase64&&r.write(ZD(_.dataBase64)),a=_.nextOffset,_.eof)break}}catch{}finally{i=!1,c&&!o&&(c=!1,l())}}const d=BEr(e,_=>{if(o)return;const p=ZD(_.dataBase64);!i&&_.offset===a?(r.write(p),a+=p.length):_.offset+p.length>a&&l()});return l(),()=>{o=!0,d(),s()}},[e]),f.jsx("div",{ref:n,className:"h-full w-full"})}function Uns({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:o,parentExperiment:a,onOpenView:i,onOpenCode:c}){const l=r.filter(d=>d.experimentId===e.id).sort((d,_)=>_.createdAt-d.createdAt);return t==="overview"?f.jsx(Hns,{experiment:e,parentExperiment:a,project:n,runs:l,onOpenLogs:(d,_)=>i("terminal",d,_),onOpenCode:d=>c("files",d)}):f.jsx(Gns,{experiment:e,expRuns:l,selectedRunId:s,onSelectRun:o})}function Gns({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,o]=C.useState(null),[a,i]=C.useState(null),[c,l]=C.useState(!1),d=C.useRef(null),_=t?n.find(g=>g.id===t)??null:n[0]??null,p=(_==null?void 0:_.status)==="running"||(_==null?void 0:_.status)==="starting",m=!!(_&&p&&(_.cancelRequested||a===_.id)),w=g=>{const b=n.findIndex(k=>k.id===g);return b===-1?n.length:n.length-b};C.useEffect(()=>{if(!c)return;const g=b=>{var k;(k=d.current)!=null&&k.contains(b.target)||l(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[c]);async function y(){if(_){o(null),i(_.id);try{await aB(_.id)}catch(g){i(null),o(g instanceof Error?g.message:String(g))}}}return f.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[f.jsxs("div",{className:"term-bar flex items-center gap-2 h-10 py-0 px-2.5 border-b border-b-border shrink-0 [&_.error]:text-sm [&_.error]:text-accent-red [&_.btn]:inline-flex [&_.btn]:items-center [&_.btn]:gap-[5px]",children:[f.jsx("div",{className:"term-title min-w-0 text-sm font-semibold text-text overflow-hidden text-ellipsis whitespace-nowrap",title:e.title||e.slug,children:e.title||e.slug}),f.jsx("span",{className:"flex-1"}),s&&f.jsx("span",{className:"error",role:"alert",children:s}),p&&f.jsxs(Oe,{size:"small",variant:"ghost",disabled:m,onClick:()=>void y(),children:[f.jsx(zH,{size:13}),m?iZe():KI()]}),n.length>0&&_&&f.jsxs("div",{className:"run-history relative shrink-0",ref:d,children:[f.jsxs(Oe,{title:Oat(),"aria-expanded":c,onClick:()=>l(g=>!g),children:[f.jsxs("span",{children:[fA()," ",w(_.id)]}),f.jsx(du,{status:m?"cancelling":Ua(_)}),f.jsx(cl,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),c&&f.jsx("div",{className:"history-menu absolute top-[calc(100%_+_6px)] end-0 min-w-57.5 max-h-80 overflow-y-auto bg-background border border-border rounded-lg shadow-menu p-[5px] z-50",children:n.map(g=>f.jsxs(gn,{className:"justify-start",active:g.id===(_==null?void 0:_.id),onClick:()=>{r(g.id),l(!1)},children:[f.jsxs("span",{className:"font-medium",children:[fA()," ",w(g.id)]}),f.jsx(du,{status:Ua(g)}),f.jsx("span",{className:"ms-auto text-xs text-muted",children:Zc(g.createdAt)})]},g.id))})]})]}),f.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:_?f.jsx(qns,{runId:_.id},_.id):f.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:t?zi():pat()})})]})}let zj=!1;function JD(e){zj=!0;try{return window.confirm(e)}finally{zj=!1}}const Ej=e=>e.replace(/\r\n/g,` `),eL=(e,n,t)=>{const r=Ej(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r `),conflict:null}},Ql=e=>e.draft!==e.baseline,Wns=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),Kns=e=>e.crlf?e.draft.replace(/\n/g,`\r diff --git a/ui/dist/index.html b/ui/dist/index.html index a34549689..cac5150fc 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -49,7 +49,7 @@ html { background: #ffffff; } html[data-theme="dark"] { background: #0e0c0c; } - + diff --git a/ui/src/components/ChatPanel.tsx b/ui/src/components/ChatPanel.tsx index 150709f9c..772994c96 100644 --- a/ui/src/components/ChatPanel.tsx +++ b/ui/src/components/ChatPanel.tsx @@ -4014,6 +4014,7 @@ function TitleReveal({ title, animate }: { title: string; animate: boolean }) { * the title into an inline input. */ export function SessionRow({ session, + menuBoundaryRef, active, unread, busy, @@ -4025,6 +4026,7 @@ export function SessionRow({ onDelete, }: { session: ChatSession; + menuBoundaryRef: React.RefObject; active: boolean; unread: boolean; busy: boolean; @@ -4145,7 +4147,7 @@ export function SessionRow({ - + {m.chat_panel_rename()} @@ -6347,6 +6349,7 @@ export function ChatPanel({
(); const view = render( <> -
+
{["First chat", "Older chat", "Following chat"].map((id, index) => (
onOpen(id)} onRename={(title) => onRename(id, title)} onSetArchived={(next) => onSetArchived(id, next)} onDelete={() => onDelete(id)} @@ -138,6 +141,23 @@ test("unrelated transcript scrolling does not dismiss the menu", async () => { expect(screen.queryByRole("menu")).not.toBeNull(); }); +test("sidebar scrolling hides a fully clipped but still mounted overscanned owner menu", async () => { + const { user, trigger } = sidebar(); + await user.click(trigger); + expect(screen.queryByRole("menu")).not.toBeNull(); + const bounds = vi.spyOn(trigger, "getBoundingClientRect").mockReturnValue(new DOMRect(100, 50, 16, 16)); + try { + fireEvent.scroll(screen.getByTestId("sidebar")); + await waitFor(() => expect(screen.queryByRole("menu")).toBeNull()); + expect(screen.getByText("Older chat").isConnected).toBe(true); + const wrapper = screen.getByRole("menu", { hidden: true }).parentElement!; + expect(wrapper.style.visibility).toBe("hidden"); + expect(wrapper.style.pointerEvents).toBe("none"); + } finally { + bounds.mockRestore(); + } +}); + test("unmounting a virtualized owner row removes its portal", async () => { const { user, trigger, unmount } = sidebar(); await user.click(trigger); diff --git a/ui/tests/components/setup.ts b/ui/tests/components/setup.ts index 555946ce7..96496a5af 100644 --- a/ui/tests/components/setup.ts +++ b/ui/tests/components/setup.ts @@ -20,6 +20,8 @@ vi.spyOn(HTMLCanvasElement.prototype, "getContext").mockReturnValue(null); // jsdom has no layout; give Radix a visible anchor and viewport. Browser verification covers geometry. vi.spyOn(HTMLElement.prototype, "getBoundingClientRect").mockReturnValue(new DOMRect(100, 100, 140, 30)); +Object.defineProperty(HTMLElement.prototype, "clientWidth", { configurable: true, get: () => 140 }); +Object.defineProperty(HTMLElement.prototype, "clientHeight", { configurable: true, get: () => 160 }); Object.defineProperty(document.documentElement, "clientWidth", { value: 1024 }); Object.defineProperty(document.documentElement, "clientHeight", { value: 768 });