Files
llama.cpp/tools/server/public/bundle.js
T

475 lines
5.0 MiB
JavaScript
Raw Normal View History

var Z3=t=>{throw TypeError(t)};var iv=(t,e,r)=>e.has(t)||Z3("Cannot "+r);var ba=(t,e,r)=>(iv(t,e,"read from private field"),r?r.call(t):e.get(t)),El=(t,e,r)=>e.has(t)?Z3("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),_s=(t,e,r,n)=>(iv(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),vl=(t,e,r)=>(iv(t,e,"access private method"),r);var J3=(t,e,r,n)=>({set _(a){_s(t,e,a,r)},get _(){return ba(t,e,n)}});var Yf=Array.isArray,AV=Array.prototype.indexOf,Tp=Array.prototype.includes,eS=Array.from,W2=Object.defineProperty,xu=Object.getOwnPropertyDescriptor,H8=Object.getOwnPropertyDescriptors,Y8=Object.prototype,RV=Array.prototype,tS=Object.getPrototypeOf,eD=Object.isExtensible;function Uh(t){return typeof t=="function"}const Ge=()=>{};function OV(t){return t()}function AA(t){for(var e=0;e<t.length;e++)t[e]()}function V8(){var t,e,r=new Promise((n,a)=>{t=n,e=a});return{promise:r,resolve:t,reject:e}}function NV(t,e,r=!1){return t===void 0?r?e():e:t}function K2(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const r=[];for(const n of t)if(r.push(n),r.length===e)break;return r}const ui=2,ff=4,Vf=8,j2=1<<24,Kl=16,Jc=32,Xu=64,Q2=128,xo=512,Yi=1024,Wi=2048,eu=4096,io=8192,xc=16384,Wf=32768,zl=65536,RA=1<<17,X2=1<<18,ch=1<<19,W8=1<<20,Oc=1<<25,eh=32768,OA=1<<21,Z2=1<<22,Du=1<<23,Fl=Symbol("$state"),J2=Symbol("legacy props"),IV=Symbol(""),Zh=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},xV=1,rS=3,tu=8;function K8(t){throw new Error("https://svelte.dev/e/experimental_async_required")}function Kp(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function DV(){throw new Error("https://svelte.dev/e/missing_context")}function MV(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function kV(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function PV(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function LV(t){throw new Error("https://svelte.dev/e/effect_orphan")}function FV(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function BV(){throw new Error("https://svelte.dev/e/fork_discarded")}function UV(){throw new Error("https://svelte.dev/e/fork_timing")}function GV(){throw new Error("https://svelte.dev/e/get_abort_signal_outside_reaction")}function qV(){throw new Error("https://svelte.dev/e/hydration_failed")}function j8(t){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function zV(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function $V(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function HV(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function YV(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function VV(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const WV=1,KV=2,Q8=4,jV=8,QV=16,XV=1,ZV=2,JV=4,eW=8,tW=16,rW=1,nW=2,aW=4,iW=1,sW=2,X8="[",nS="[!",eO="]",th={},_i=Symbol(),oW="http://www.w3.org/1999/xhtml",lW="http://www.w3.org/2000/svg",Z8="@attach";function cW(t){console.warn("https://svelte.dev/e/hydratable_missing_but_expected")}function Kf(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function uW(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function dW(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let Nr=!1;function cs(t){Nr=t}let tn;function Ga(t){if(t===null)throw Kf(),th;return tn=t}function Po(){return Ga(uo(tn))}function Y(t){if(Nr){if(uo(tn)!==null)throw Kf(),th;tn=t}}function et(t=1){if(Nr){for(var e=t,r=tn;e--;)r=uo(r);tn=r}}function L1(t=!0){for(var e=0,r=tn;;){if(r.nodeType===tu){var n=r.data;if(n===eO){if(e===0)return r;e-=1}else(n===X8||n===nS)&&(e+=1)}var a=uo(r);t&&r.remove(),r=a}}function J8(t){if(!t||t.nodeType!==tu)throw Kf(),th;return t.data}function eF(t){return t===this.v}function tO(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function tF(t){return!tO(t,t
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw s;return s!==th&&console.warn("Failed to hydrate: ",s),e.recover===!1&&qV(),MA(),sO(r),cs(!1),uS(t,e)}finally{cs(n),Ga(a)}}const Rh=new Map;function zF(t,{target:e,anchor:r,props:n={},events:a,context:i,intro:s=!0}){MA();var o=new Set,l=d=>{for(var h=0;h<d.length;h++){var m=d[h];if(!o.has(m)){o.add(m);var f=$W(m);e.addEventListener(m,qm,{passive:f});var g=Rh.get(m);g===void 0?(document.addEventListener(m,qm,{passive:f}),Rh.set(m,1)):Rh.set(m,g+1)}}};l(eS(GF)),PA.add(l);var c=void 0,u=xW(()=>{var d=r??e.appendChild(Vi());return vW(d,{pending:()=>{}},h=>{if(i){ye({});var m=qn;m.c=i}if(a&&(n.$$events=a),Nr&&Ds(h,null),U1=s,c=t(h,n)||{},U1=!0,Nr&&(Pn.nodes.end=tn,tn===null||tn.nodeType!==tu||tn.data!==eO))throw Kf(),th;i&&Te()}),()=>{for(var h of o){e.removeEventListener(h,qm);var m=Rh.get(h);--m===0?(document.removeEventListener(h,qm),Rh.delete(h)):Rh.set(h,m)}PA.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return LA.set(c,u),c}let LA=new WeakMap;function dO(t,e){const r=LA.get(t);return r?(LA.delete(t),r(e)):Promise.resolve()}class eg{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,r=!0){this.anchor=e,this.#i=r}#a=()=>{var e=Hn;if(this.#e.has(e)){var r=this.#e.get(e),n=this.#t.get(r);if(n)lO(n),this.#n.delete(r);else{var a=this.#r.get(r);a&&(this.#t.set(r,a.effect),this.#r.delete(r),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),n=a.effect)}for(const[i,s]of this.#e){if(this.#e.delete(i),i===e)break;const o=this.#r.get(s);o&&(Ei(o.effect),this.#r.delete(s))}for(const[i,s]of this.#t){if(i===r||this.#n.has(i))continue;const o=()=>{if(Array.from(this.#e.values()).includes(i)){var c=document.createDocumentFragment();xF(s,c),c.append(Vi()),this.#r.set(i,{effect:s,fragment:c})}else Ei(s);this.#n.delete(i),this.#t.delete(i)};this.#i||!n?(this.#n.add(i),Zd(s,o,!1)):o()}}};#s=e=>{this.#e.delete(e);const r=Array.from(this.#e.values());for(const[n,a]of this.#r)r.includes(n)||(Ei(a.effect),this.#r.delete(n))};ensure(e,r){var n=Hn,a=bF();if(r&&!this.#t.has(e)&&!this.#r.has(e))if(a){var i=document.createDocumentFragment(),s=Vi();i.append(s),this.#r.set(e,{effect:Rs(()=>r(s)),fragment:i})}else this.#t.set(e,Rs(()=>r(this.anchor)));if(this.#e.set(n,e),a){for(const[o,l]of this.#t)o===e?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[o,l]of this.#r)o===e?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#a),n.ondiscard(this.#s)}else Nr&&(this.anchor=tn),this.#a()}}function le(t,e,r=!1){Nr&&Po();var n=new eg(t),a=r?zl:0;function i(s,o){if(Nr){const c=J8(t)===nS;if(s===c){var l=L1();Ga(l),n.anchor=l,cs(!1),n.ensure(s,o),cs(!0);return}}n.ensure(s,o)}ed(()=>{var s=!1;e((o,l=!0)=>{s=!0,i(l,o)}),s||i(!1,null)},a)}function WW(t,e,r){Nr&&Po();var n=new eg(t),a=!Qp();ed(()=>{var i=e();a&&i!==null&&typeof i=="object"&&(i={}),n.ensure(i,r)})}function ku(t,e){return e}function KW(t,e,r){for(var n=[],a=e.length,i,s=e.length,o=0;o<a;o++){let d=e[o];Zd(d,()=>{if(i){if(i.pending.delete(d),i.done.add(d),i.pending.size===0){var h=t.outrogroups;FA(eS(i.done)),h.delete(i),h.size===0&&(t.outrogroups=null)}}else s-=1},!1)}if(s===0){var l=n.length===0&&r!==null;if(l){var c=r,u=c.parentNode;sO(u),u.append(c),t.items.clear()}FA(e,!l)}else i={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(i)}function FA(t,e=!0){for(var r=0;r<t.length;r++)Ei(t[r],e)}var oD;function xr(t,e,r,n,a,i=null){var s=t,o=new Map,l=(e&Q8)!==0;if(l){var c=t;s=Nr?Ga(xi(c)):c.appendChild(Vi())}Nr&&Po();var u=null,d=oS(()=>{var _=r();return Yf(_)?_:_==null?[]:eS(_)}),h,m=!0;function f(){b.fallback=u,jW(b,h,s,e,n),u!==null&&(h.length===0?(u.f&Oc)===0?lO(u):(u.f^=Oc,zm(u,null,s)):Zd(u,()=>{u=null}))}var g=ed(()=>{h=p(d);var _=h.length;let S=!1;if(Nr){var E=J8(s)===nS;E!==(_===0)&&(s=L1(),Ga(s),cs(!1),S=!0)}for(var y=new Set,v=Hn,T=bF(),w=0;w<_;w+=1){Nr&&tn.nodeType===tu&&tn.data===eO&&(s=tn,S=!0,cs(!1));var A=h[w],I=n(A,w),x=m?null:o.get(I);x?(x.v&&Ap(x.v,A),x.i&&Ap(x.i,w),T&&v.skipped_effects.delete(x.e)):(x=QW(o,m?s:oD??=Vi(),A,I,w,a,e,r),
\r\f \v\uFEFF`];function nK(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var a in r)if(r[a])n=n?n+" "+a:a;else if(n.length)for(var i=a.length,s=0;(s=n.indexOf(a,s))>=0;){var o=s+i;(s===0||cD.includes(n[s-1]))&&(o===n.length||cD.includes(n[o]))?n=(s===0?"":n.substring(0,s))+n.substring(o+1):s=o}}return n===""?null:n}function uD(t,e=!1){var r=e?" !important;":";",n="";for(var a in t){var i=t[a];i!=null&&i!==""&&(n+=" "+a+": "+i+r)}return n}function sv(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function aK(t,e){if(e){var r="",n,a;if(Array.isArray(e)?(n=e[0],a=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,o=!1,l=[];n&&l.push(...Object.keys(n).map(sv)),a&&l.push(...Object.keys(a).map(sv));var c=0,u=-1;const g=t.length;for(var d=0;d<g;d++){var h=t[d];if(o?h==="/"&&t[d-1]==="*"&&(o=!1):i?i===h&&(i=!1):h==="/"&&t[d+1]==="*"?o=!0:h==='"'||h==="'"?i=h:h==="("?s++:h===")"&&s--,!o&&i===!1&&s===0){if(h===":"&&u===-1)u=d;else if(h===";"||d===g-1){if(u!==-1){var m=sv(t.substring(c,u).trim());if(!l.includes(m)){h!==";"&&d++;var f=t.substring(c,d).trim();r+=" "+f+";"}}c=d+1,u=-1}}}}return n&&(r+=uD(n)),a&&(r+=uD(a,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function Et(t,e,r,n,a,i){var s=t.__className;if(Nr||s!==r||s===void 0){var o=nK(r,n,i);(!Nr||o!==t.getAttribute("class"))&&(o==null?t.removeAttribute("class"):e?t.className=o:t.setAttribute("class",o)),t.__className=r}else if(i&&a!==i)for(var l in i){var c=!!i[l];(a==null||c!==!!a[l])&&t.classList.toggle(l,c)}return i}function ov(t,e={},r,n){for(var a in r){var i=r[a];e[a]!==i&&(r[a]==null?t.style.removeProperty(a):t.style.setProperty(a,i,n))}}function ms(t,e,r,n){var a=t.__style;if(Nr||a!==e){var i=aK(e,n);(!Nr||i!==t.getAttribute("style"))&&(i==null?t.removeAttribute("style"):t.style.cssText=i),t.__style=e}else n&&(Array.isArray(n)?(ov(t,r?.[0],n[0]),ov(t,r?.[1],n[1],"important")):ov(t,r,n));return n}function UA(t,e,r=!1){if(t.multiple){if(e==null)return;if(!Yf(e))return uW();for(var n of t.options)n.selected=e.includes(dD(n));return}for(n of t.options){var a=dD(n);if(RW(a,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function iK(t){var e=new MutationObserver(()=>{UA(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),dh(()=>{e.disconnect()})}function dD(t){return"__value"in t?t.__value:t.value}const bm=Symbol("class"),Gh=Symbol("style"),VF=Symbol("is custom element"),WF=Symbol("is html");function sK(t){if(Nr){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;rr(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var a=t.checked;rr(t,"checked",null),t.checked=a}}};t.__on_r=r,Do(r),SF()}}function pO(t,e){var r=mO(t);r.value===(r.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function oK(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function rr(t,e,r,n){var a=mO(t);Nr&&(a[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||a[e]!==(a[e]=r)&&(e==="loading"&&(t[IV]=r),r==null?t.removeAttribute(e):typeof r!="string"&&KF(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function lK(t,e,r,n,a=!1,i=!1){if(Nr&&a&&t.tagName==="INPUT"){var s=t,o=s.type==="checkbox"?"defaultChecked":"defaultValue";o in r||sK(s)}var l=mO(t),c=l[VF],u=!l[WF];let d=Nr&&c;d&&cs(!1);var h=e||{},m=t.tagName==="OPTION";for(var f in e)f in r||(r[f]=null);r.class?r.class=Hr(r.class):(n||r[bm])&&(r.class=null),r[Gh]&&(r.style??=null);var g=KF(t);for(const T in r){let w=r[T];if(m&&T==="value"&&w==null){t.value=t.__value="",h[T]=w;continue}if(T==="class"){var b=t.namespaceURI==="http://www.w3.org/1999/xhtml";Et(t,b,w,n,e?.[bm],r[bm]),h[T]=w,h[bm]=r[bm];continue}if(T==="style"){ms(t,w,e?.[Gh],r[Gh]),h[T]=w,h[Gh]=r[Gh];continue}var _=h[T];if(!(w===_&&!(w===void 0&&t.hasAttribute(T)))){h[T]=w;var S=T[0]+T[1];if(S!=="$$")if(S==="on"){const A={},I="$$"+T;let x=T.slice(2);var E=UW(x);if(FW(x)&&(x=x.slice(0,-7),A.capture=!0),!E&&_){if(w!=null)continue;t.removeEventListener
`,c="/",u="*",d="",h="comment",m="declaration";gv=function(g,b){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];b=b||{};var _=1,S=1;function E(H){var G=H.match(e);G&&(_+=G.length);var K=H.lastIndexOf(l);S=~K?H.length-K:S+H.length}function y(){var H={line:_,column:S};return function(G){return G.position=new v(H),A(),G}}function v(H){this.start=H,this.end={line:_,column:S},this.source=b.source}v.prototype.content=g;function T(H){var G=new Error(b.source+":"+_+":"+S+": "+H);if(G.reason=H,G.filename=b.source,G.line=_,G.column=S,G.source=g,!b.silent)throw G}function w(H){var G=H.exec(g);if(G){var K=G[0];return E(K),g=g.slice(K.length),G}}function A(){w(r)}function I(H){var G;for(H=H||[];G=x();)G!==!1&&H.push(G);return H}function x(){var H=y();if(!(c!=g.charAt(0)||u!=g.charAt(1))){for(var G=2;d!=g.charAt(G)&&(u!=g.charAt(G)||c!=g.charAt(G+1));)++G;if(G+=2,d===g.charAt(G-1))return T("End of comment missing");var K=g.slice(2,G-2);return S+=2,E(K),g=g.slice(G),S+=2,H({type:h,comment:K})}}function D(){var H=y(),G=w(n);if(G){if(x(),!w(a))return T("property missing ':'");var K=w(i),z=H({type:m,property:f(G[0].replace(t,d)),value:K?f(K[0].replace(t,d)):d});return w(s),z}}function $(){var H=[];I(H);for(var G;G=D();)G!==!1&&(H.push(G),I(H));return H}return A(),$()};function f(g){return g?g.replace(o,d):d}return gv}var ID;function xQ(){if(ID)return xh;ID=1;var t=xh&&xh.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(xh,"__esModule",{value:!0}),xh.default=r;var e=t(IQ());function r(n,a){var i=null;if(!n||typeof n!="string")return i;var s=(0,e.default)(n),o=typeof a=="function";return s.forEach(function(l){if(l.type==="declaration"){var c=l.property,u=l.value;o?a(c,u,l):u&&(i=i||{},i[c]=u)}}),i}return xh}var DQ=xQ();const xD=ph(DQ),MQ=xD.default||xD,kQ=/\d/,PQ=["-","_","/","."];function LQ(t=""){if(!kQ.test(t))return t!==t.toLowerCase()}function FQ(t){const e=[];let r="",n,a;for(const i of t){const s=PQ.includes(i);if(s===!0){e.push(r),r="",n=void 0;continue}const o=LQ(i);if(a===!1){if(n===!1&&o===!0){e.push(r),r=i,n=o;continue}if(n===!0&&o===!1&&r.length>1){const l=r.at(-1);e.push(r.slice(0,Math.max(0,r.length-1))),r=l+i,n=o;continue}}r+=i,n=o,a=s}return e.push(r),e}function PB(t){return t?FQ(t).map(e=>UQ(e)).join(""):""}function BQ(t){return GQ(PB(t||""))}function UQ(t){return t?t[0].toUpperCase()+t.slice(1):""}function GQ(t){return t?t[0].toLowerCase()+t.slice(1):""}function Ym(t){if(!t)return{};const e={};function r(n,a){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[PB(n)]=a;return}if(n.startsWith("--")){e[n]=a;return}e[BQ(n)]=a}return MQ(t,r),e}function Dc(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function qQ(t,e){const r=RegExp(t,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,e):n}}const zQ=qQ(/[A-Z]/,t=>`-${t.toLowerCase()}`);function $Q(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an argument of type object, but got ${typeof t}`);return Object.keys(t).map(e=>`${zQ(e)}: ${t[e]};`).join(`
`)}function LO(t={}){return $Q(t).replace(`
`," ")}const HQ=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],YQ=new Set(HQ);function VQ(t){return YQ.has(t)}function Er(...t){const e={...t[0]};for(let r=1;r<t.length;r++){const n=t[r];if(n){for(const a of Object.keys(n)){const i=e[a],s=n[a],o=typeof i=="function",l=typeof s=="function";if(o&&VQ(a)){const c=i,u=s;e[a]=kB(c,u)}else if(o&&l)e[a]=Dc(i,s);else if(a==="class"){const c=ZA(i),u=ZA(s);c&&u?e[a]=nf(i,s):c?e[a]=nf(i):u&&(e[a]=nf(s))}else if(a==="style"){const c=typeof i=="object",u=typeof s=="object",d=typeof i=="string",h=typeof s=="string";if(c&&u)e[a]={...i,...s};else if(c&&h){const m=Ym(s);e[a]={...i,...m}}else if(d&&u){const m=Ym(i);e[a]={...m,...s}}else if(d&&h){const m=Ym(i),f=Ym(s);e[a]={...m,...f}}else c?e[a]=i:u?e[a]=s:d?e[a]=i:h&&(e[a]=s)}else e[a]=s!==void 0?s:i}for(const a of Object.getOwnPropertySymbols(n)){const i=e[a],s=n[a];e[a]=s!==void 0?s:i}}}return typeof e.style=="object"&&(e.style=LO(e.style).replaceAll(`
`," ")),e.hidden===!1&&(e.hidden=void 0,delete e.hidden),e.disabled===!1&&(e.disabled=void 0,delete e.disabled),e}const WQ={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},KQ=LO(WQ),LB=typeof window<"u"?window:void 0;function jQ(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}var QQ=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],XQ=["difference","intersection","symmetricDifference","union"],DD=!1;class ds extends Set{#e=new Map;#t=_e(0);#r=_e(0);#n=al||-1;constructor(e){if(super(),e){for(var r of e)super.add(r);this.#r.v=super.size}DD||this.#a()}#i(e){return al===this.#n?_e(e):Uc(e)}#a(){DD=!0;var e=ds.prototype,r=Set.prototype;for(const n of QQ)e[n]=function(...a){return p(this.#t),r[n].apply(this,a)};for(const n of XQ)e[n]=function(...a){p(this.#t);var i=r[n].apply(this,a);return new ds(i)}}has(e){var r=super.has(e),n=this.#e,a=n.get(e);if(a===void 0){if(!r)return p(this.#t),!1;a=this.#i(!0),n.set(e,a)}return p(a),r}add(e){return super.has(e)||(super.add(e),k(this.#r,super.size),eo(this.#t)),this}delete(e){var r=super.delete(e),n=this.#e,a=n.get(e);return a!==void 0&&(n.delete(e),k(a,!1)),r&&(k(this.#r,super.size),eo(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;for(var r of e.values())k(r,!1);e.clear(),k(this.#r,0),eo(this.#t)}}keys(){return this.values()}values(){return p(this.#t),super.values()}entries(){return p(this.#t),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return p(this.#r)}}class Ii extends Map{#e=new Map;#t=_e(0);#r=_e(0);#n=al||-1;constructor(e){if(super(),e){for(var[r,n]of e)super.set(r,n);this.#r.v=super.size}}#i(e){return al===this.#n?_e(e):Uc(e)}has(e){var r=this.#e,n=r.get(e);if(n===void 0){var a=super.get(e);if(a!==void 0)n=this.#i(0),r.set(e,n);else return p(this.#t),!1}return p(n),!0}forEach(e,r){this.#a(),super.forEach(e,r)}get(e){var r=this.#e,n=r.get(e);if(n===void 0){var a=super.get(e);if(a!==void 0)n=this.#i(0),r.set(e,n);else{p(this.#t);return}}return p(n),super.get(e)}set(e,r){var n=this.#e,a=n.get(e),i=super.get(e),s=super.set(e,r),o=this.#t;if(a===void 0)a=this.#i(0),n.set(e,a),k(this.#r,super.size),eo(o);else if(i!==r){eo(a);var l=o.reactions===null?null:new Set(o.reactions),c=l===null||!a.reactions?.every(u=>l.has(u));c&&eo(o)}return s}delete(e){var r=this.#e,n=r.get(e),a=super.delete(e);return n!==void 0&&(r.delete(e),k(this.#r,super.size),k(n,-1),eo(this.#t)),a}clear(){if(super.size!==0){super.clear();var e=this.#e;k(this.#r,0);for(var r of e.values())k(r,-1);eo(this.#t),e.clear()}}#a(){p(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var r of super.keys())if(!e.has(r)){var n=this.#i(0);e.set(r,n)}}for([,n]of this.#e)p(n)}keys(){return p(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(this.#r),super.size}}class ZQ{#e;#t;constructor(e,r){this.#e=e,this.#t=Ju(r)}get current(){return this.#t(),this.#e()}}const JQ=/\(.+\)/,eX=new Set(["all","print","screen","and","or","not","only"]);class FB extends ZQ{constructor(e,r){let n=JQ.test(e)||e.split(/[\s,]+/).some(i=>eX.has(i.trim()))?e:`(${e})`;const a=window.matchMedia(n);super(()=>a.matches,i=>Kr(a,"change",i))}}let tX=class{#e;#t;constructor(e={}){const{window:r=LB,document:n=r?.document}=e;r!==void 0&&(this.#e=n,this.#t=Ju(a=>{const i=Kr(r,"focusin",a),s=Kr(r,"focusout",a);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?jQ(this.#e):null}};new tX;function BB(t){return typeof t=="function"}function rX(t,e){if(BB(t)){const n=t();return n===void 0?e:n}return t===void 0?e:t}let ka=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return aS(this.#t)}get(){const e=$l(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const r=$l(this.#t);return r===void 0?e:r}set(e){return Zu(this.#t,e)}};
`,n5="\n\n```\nTurn limit reached\n```\n",a5=`
\`\`\`
Upstream LLM error:
`,i5="\n```\n",Tv={enabled:!0,maxTurns:100,maxToolPreviewLines:25},Bre={START:"<<<reasoning_content_start>>>"},hp={COMPLETED_TOOL_CALL:/<<<AGENTIC_TOOL_CALL_START>>>\n<<<TOOL_NAME:(.+?)>>>\n<<<TOOL_ARGS_START>>>([\s\S]*?)<<<TOOL_ARGS_END>>>([\s\S]*?)<<<AGENTIC_TOOL_CALL_END>>>/g,REASONING_BLOCK:/<<<reasoning_content_start>>>[\s\S]*?<<<reasoning_content_end>>>/g,REASONING_EXTRACT:/<<<reasoning_content_start>>>([\s\S]*?)<<<reasoning_content_end>>>/,REASONING_OPEN:/<<<reasoning_content_start>>>[\s\S]*$/,AGENTIC_TOOL_CALL_OPEN:/\n*<<<AGENTIC_TOOL_CALL_START>>>[\s\S]*$/,HAS_LEGACY_MARKERS:/<<<(?:AGENTIC_TOOL_CALL_START|reasoning_content_start)>>>/},u_={LIST:"/v1/models",LOAD:"/models/load",UNLOAD:"/models/unload"},WU="/cors-proxy",Ure="PDF File",Gre="MCP Prompt",qre="MCP Resource",s5=100,zre=10,$re={prefixLength:1024*10,suspiciousCharThresholdRatio:.15,maxAbsoluteNullBytes:2},KU=300*1e3,Hre=100,Yre=600*1e3,Vre=50,Wre=50,Kre=300*1e3,jre=10,Qre=1800*1e3,Xre=0,Zre=`
`,Jre='"',o5="/",Cv="@",ene="code-block-scroll-container",tne="code-block-wrapper",rne="code-block-header",nne="code-block-actions",ane="code-language",ine="copy-code-btn",sne="preview-code-btn",one="relative",lne=`
`,cne="text",une=/^(\w*)\n?/,dne=/&/g,hne=/</g,pne=/>/g,l5=/^```|\n```/g,mne="chat-message-edit",fne="chat-actions",gne="chat-settings-dialog",jU="border border-border/30 focus-within:border-border dark:border-border/20 dark:focus-within:border-border",OI=`
bg-muted/60 dark:bg-muted/75
${jU}
shadow-sm
outline-none
text-foreground
`,_ne=`
bg-background
border border-border/30 dark:border-border/20
shadow-sm backdrop-blur-lg!
rounded-t-lg!
`,bne="max-h-80",Sne="https://www.google.com/s2/favicons",Ene=32,c5=".",u5=2,T1=1e3,d5=60,h5=3600,vne=1,yne=10,p5="0s",QU=256,XU=8192,Tne=/[\x00-\x1F\x7F]/g,Cne=/[\x00-\x08\x0A-\x0D\x0E-\x1F\x7F]/g,Xo={[kn.IMAGE]:EI,[kn.AUDIO]:TI,[kn.TEXT]:Nc,[kn.PDF]:SI},wne={[jc.VISION]:bI,[jc.AUDIO]:TI},Ane={[jc.VISION]:"Vision",[jc.AUDIO]:"Audio"},Rne=/(```[\s\S]*?```|`[^`\n]+`)/g,One=new RegExp("(```[\\S\\s]*?```|`.*?`)|(?<!\\\\)\\\\\\[([\\S\\s]*?[^\\\\])\\\\]|(?<!\\\\)\\\\\\((.*?)\\\\\\)","g"),Nne=/\$\$([\s\S]*?\\\\[\s\S]*?)\$\$/,Ine=/\r?\n/,xne=new Set(["paragraph","heading","emphasis","strong","delete","link","linkReference","tableCell"]),ZU=" ",Dne=ZU.repeat(4),m5="LlamaCppWebui.config",f5="LlamaCppWebui.userOverrides",g5="LlamaCppWebui.favoriteModels",wv="LlamaCppWebui.mcpDefaultEnabled",Mne="img:not([data-error-bound])",kne="errorBound",_5="errorHandled",Av="true",JU="1.0.0",Pne=ta.PNG,Lne=new Set([ta.PNG,ta.JPEG,ta.JPG,ta.SVG,ta.WEBP]),Fne="2025-06-18",Va={protocolVersion:Fne,capabilities:{tools:{listChanged:!0}},clientInfo:{name:"llama-webui-mcp",version:JU},requestTimeoutSeconds:300,connectionTimeoutMs:1e4},NI="LlamaCpp-WebUI-MCP-Server",Bne=1e3,Une=2,Gne=3e4,b5=15e3,S5=3,qne=2,zne="url",$ne={[Is.WEBSOCKET]:"WebSocket",[Is.STREAMABLE_HTTP]:"HTTP",[Is.SSE]:"SSE"},Hne={[Is.WEBSOCKET]:AI,[Is.STREAMABLE_HTTP]:vre,[Is.SSE]:Ire},Yne="https://mcp.example.com/sse",Vne=1,eG=/\.(png|jpg|jpeg|gif|svg|webp)$/i,tG=/\.(js|ts|json|yaml|yml|xml|html|css|py|rs|go|java|cpp|c|h|rb|sh|toml)$/i,Wne=/\.(txt|md|log)$/i,Kne=/^[a-z]+:\/\//,jne=/\.[^.]+$/,Qne=/[-_]/,Xne=/^data:([^;]+);base64,([A-Za-z0-9+/]+=*)$/,Zne="mcp-attachment",Jne="res",eae="img",rG="resource.txt",tae="/",rae=`
`,E5="unknown type",v5="Binary content",nae={[ta.JPEG]:"jpg",[ta.JPG]:"jpg",[ta.PNG]:"png",[ta.GIF]:"gif",[ta.WEBP]:"webp"},aae=8,iae=20,sae=19,oae=/[^a-z0-9]/gi,lae="_",cae=/_+/g,nG="T",uae="_",dae=":",hae="-",lc=-1,pae="/",y5="-",mae=":",T5=/^(I?Q\d+(_[A-Z0-9]+)*|F\d+|BF\d+|MXFP\d+(_[A-Z0-9]+)*)$/i,fae=/^UD$/i,gae=/^\d+(\.\d+)?[BbMmKkTt]$/,_ae=/^[Aa]\d+(\.\d+)?[BbMmKkTt]$/,bae=new Set(["GGUF","GGML"]),C5=1e6,Sae=2e3,w5={TOKENS_PER_SECOND:"t/s"},_c={apiKey:"",systemMessage:"",showSystemMessage:!0,theme:Gl.SYSTEM,showThoughtInProgress:!1,disableReasoningParsing:!1,excludeReasoningFromContext:!1,showRawOutputSwitch:!1,keepStatsVisible:!1,showMessageStats:!0,askForTitleConfirmation:!1,pasteLongTextToFileLen:2500,copyTextAttachmentsAsPlainText:!1,pdfAsImage:!1,disableAutoScroll:!1,renderUserContentAsMarkdown:!1,alwaysShowSidebarOnDesktop:!1,autoShowSidebarOnNewChat:!0,autoMicOnEmpty:!1,fullHeightCodeBlocks:!1,showRawModelNames:!1,mcpServers:"[]",mcpServerUsageStats:"{}",agenticMaxTurns:10,agenticMaxToolPreviewLines:25,showToolCallInProgress:!1,alwaysShowAgenticTurns:!1,samplers:"",backend_sampling:!1,temperature:void 0,dynatemp_range:void 0,dynatemp_exponent:void 0,top_k:void 0,top_p:void 0,min_p:void 0,xtc_probability:void 0,xtc_threshold:void 0,typ_p:void 0,repeat_last_n:void 0,repeat_penalty:void 0,presence_penalty:void 0,frequency_penalty:void 0,dry_multiplier:void 0,dry_base:void 0,dry_allowed_length:void 0,dry_penalty_last_n:void 0,max_tokens:void 0,custom:"",pyInterpreterEnabled:!1,enableContinueGeneration:!1},fu={apiKey:"Set the API Key if you are using <code>--api-key</code> option for the server.",systemMessage:"The starting message that defines how model should behave.",showSystemMessage:"Display the system message at the top of each conversation.",theme:"Choose the color theme for the interface. You can choose between System (follows your device settings), Light, or Dark.",pasteLongTextToFileLen:"On pasting long text, it will be converted to a file. You can control the file length by setting the value of this parameter. Value 0 means disable.",copyTextAttachmentsAsPlainText:"When copying a message with text attachments, combine them into a single plain text string instead of a special format that can be pasted back as attachments.",samplers:'The order at which samplers are applied, in simplified way. Default is "top_k;typ_p;top_p;min_p;temperature": top_k->typ_p->top_p->min_p->temperature',backend_sampling:"Enable backend-based samplers. When enabled, supported samplers run on the accelerator backend for faster sampling.",temperature:"Controls the randomness of the generated text by affecting the probability distribution of the output tokens. Higher = more random, lower = more focused.",dynatemp_range:"Addon for the temperature sampler. The added value to the range of dynamic temperature, which adjusts probabilities by entropy of tokens.",dynatemp_exponent:"Addon for the temperature sampler. Smoothes out the probability redistribution based on the most probable token.",top_k:"Keeps only k top tokens.",top_p:"Limits tokens to those that together have a cumulative probability of at least p",min_p:"Limits tokens based on the minimum probability for a token to be considered, relative to the probability of the most likely token.",xtc_probability:"XTC sampler cuts out top tokens; this parameter controls the chance of cutting tokens at all. 0 disables XTC.",xtc_threshold:"XTC sampler cuts out top tokens; this parameter controls the token probability that is required to cut that token.",typ_p:"Sorts and limits tokens based on the difference between log-probability and entropy.",repeat_last_n:"Last n tokens to consider for penalizing repetition",repeat_penalty:"Controls the repetition of token sequences in the generated text",presence_penalty:"Limits tokens based on whether they appear in the output or not.",frequency_penalty:"Limits tokens based on how often they appear in the output.",dry_multiplier:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling multi
https://github.com/highlightjs/highlight.js/issues/2277`),fa=Gt,Un=Cr),ln===void 0&&(ln=!0);const Yr={code:Un,language:fa};$o("before:highlight",Yr);const Us=Yr.result?Yr.result:On(Yr.language,Yr.code,ln);return Us.code=Yr.code,$o("after:highlight",Us),Us}function On(Gt,Cr,ln,Un){const fa=Object.create(null);function Yr(Qt,gr){return Qt.keywords[gr]}function Us(){if(!nr.keywords){ga.addText(Fn);return}let Qt=0;nr.keywordPatternRe.lastIndex=0;let gr=nr.keywordPatternRe.exec(Fn),yr="";for(;gr;){yr+=Fn.substring(Qt,gr.index);const jr=$a.case_insensitive?gr[0].toLowerCase():gr[0],Xn=Yr(nr,jr);if(Xn){const[ai,gd]=Xn;if(ga.addText(yr),yr="",fa[jr]=(fa[jr]||0)+1,fa[jr]<=Ut&&(_a+=gd),ai.startsWith("_"))yr+=gr[0];else{const Yo=$a.classNameAliases[ai]||ai;fn(gr[0],Yo)}}else yr+=gr[0];Qt=nr.keywordPatternRe.lastIndex,gr=nr.keywordPatternRe.exec(Fn)}yr+=Fn.substring(Qt),ga.addText(yr)}function nc(){if(Fn==="")return;let Qt=null;if(typeof nr.subLanguage=="string"){if(!Xe[nr.subLanguage]){ga.addText(Fn);return}Qt=On(nr.subLanguage,Fn,!0,bl[nr.subLanguage]),bl[nr.subLanguage]=Qt._top}else Qt=Ln(Fn,nr.subLanguage.length?nr.subLanguage:null);nr.relevance>0&&(_a+=Qt.relevance),ga.__addSublanguage(Qt._emitter,Qt.language)}function fi(){nr.subLanguage!=null?nc():Us(),Fn=""}function fn(Qt,gr){Qt!==""&&(ga.startScope(gr),ga.addText(Qt),ga.endScope())}function gl(Qt,gr){let yr=1;const jr=gr.length-1;for(;yr<=jr;){if(!Qt._emit[yr]){yr++;continue}const Xn=$a.classNameAliases[Qt[yr]]||Qt[yr],ai=gr[yr];Xn?fn(ai,Xn):(Fn=ai,Us(),Fn=""),yr++}}function _l(Qt,gr){return Qt.scope&&typeof Qt.scope=="string"&&ga.openNode($a.classNameAliases[Qt.scope]||Qt.scope),Qt.beginScope&&(Qt.beginScope._wrap?(fn(Fn,$a.classNameAliases[Qt.beginScope._wrap]||Qt.beginScope._wrap),Fn=""):Qt.beginScope._multi&&(gl(Qt.beginScope,gr),Fn="")),nr=Object.create(Qt,{parent:{value:nr}}),nr}function Ho(Qt,gr,yr){let jr=E(Qt.endRe,yr);if(jr){if(Qt["on:end"]){const Xn=new e(Qt);Qt["on:end"](gr,Xn),Xn.isMatchIgnored&&(jr=!1)}if(jr){for(;Qt.endsParent&&Qt.parent;)Qt=Qt.parent;return Qt}}if(Qt.endsWithParent)return Ho(Qt.parent,gr,yr)}function md(Qt){return nr.matcher.regexIndex===0?(Fn+=Qt[0],1):(Ti=!0,0)}function fd(Qt){const gr=Qt[0],yr=Qt.rule,jr=new e(yr),Xn=[yr.__beforeBegin,yr["on:begin"]];for(const ai of Xn)if(ai&&(ai(Qt,jr),jr.isMatchIgnored))return md(gr);return yr.skip?Fn+=gr:(yr.excludeBegin&&(Fn+=gr),fi(),!yr.returnBegin&&!yr.excludeBegin&&(Fn=gr)),_l(yr,Qt),yr.returnBegin?0:gr.length}function uu(Qt){const gr=Qt[0],yr=Cr.substring(Qt.index),jr=Ho(nr,Qt,yr);if(!jr)return ut;const Xn=nr;nr.endScope&&nr.endScope._wrap?(fi(),fn(gr,nr.endScope._wrap)):nr.endScope&&nr.endScope._multi?(fi(),gl(nr.endScope,Qt)):Xn.skip?Fn+=gr:(Xn.returnEnd||Xn.excludeEnd||(Fn+=gr),fi(),Xn.excludeEnd&&(Fn=gr));do nr.scope&&ga.closeNode(),!nr.skip&&!nr.subLanguage&&(_a+=nr.relevance),nr=nr.parent;while(nr!==jr.parent);return jr.starts&&_l(jr.starts,Qt),Xn.returnEnd?0:gr.length}function wh(){const Qt=[];for(let gr=nr;gr!==$a;gr=gr.parent)gr.scope&&Qt.unshift(gr.scope);Qt.forEach(gr=>ga.openNode(gr))}let Eo={};function ac(Qt,gr){const yr=gr&&gr[0];if(Fn+=Qt,yr==null)return fi(),0;if(Eo.type==="begin"&&gr.type==="end"&&Eo.index===gr.index&&yr===""){if(Fn+=Cr.slice(gr.index,gr.index+1),!Pt){const jr=new Error(`0 width match regex (${Gt})`);throw jr.languageName=Gt,jr.badRule=Eo.rule,jr}return 1}if(Eo=gr,gr.type==="begin")return fd(gr);if(gr.type==="illegal"&&!ln){const jr=new Error('Illegal lexeme "'+yr+'" for mode "'+(nr.scope||"<unnamed>")+'"');throw jr.mode=nr,jr}else if(gr.type==="end"){const jr=uu(gr);if(jr!==ut)return jr}if(gr.type==="illegal"&&yr==="")return Fn+=`
`,1;if(vo>1e5&&vo>gr.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Fn+=yr,yr.length}const $a=Bi(Gt);if(!$a)throw st(kt.replace("{}",Gt)),new Error('Unknown language: "'+Gt+'"');const du=zt($a);let ic="",nr=Un||du;const bl={},ga=new Tt.__emitter(Tt);wh();let Fn="",_a=0,ni=0,vo=0,Ti=!1;try{if($a.__emitTokens)$a.__emitTokens(Cr,ga);else{for(nr.matcher.considerAll();;){vo++,Ti?Ti=!1:nr.matcher.considerAll(),nr.matcher.lastIndex=ni;const Qt=nr.matcher.exec(Cr);if(!Qt)break;const gr=Cr.substring(ni,Qt.index),yr=ac(gr,Qt);ni=Qt.index+yr}ac(Cr.substring(ni))}return ga.finalize(),ic=ga.toHTML(),{language:Gt,value:ic,relevance:_a,illegal:!1,_emitter:ga,_top:nr}}catch(Qt){if(Qt.message&&Qt.message.includes("Illegal"))return{language:Gt,value:Ft(Cr),illegal:!0,relevance:0,_illegalBy:{message:Qt.message,index:ni,context:Cr.slice(ni-100,ni+100),mode:Qt.mode,resultSoFar:ic},_emitter:ga};if(Pt)return{language:Gt,value:Ft(Cr),illegal:!1,relevance:0,errorRaised:Qt,_emitter:ga,_top:nr};throw Qt}}function vr(Gt){const Cr={value:Ft(Gt),illegal:!1,relevance:0,_top:bt,_emitter:new Tt.__emitter(Tt)};return Cr._emitter.addText(Gt),Cr}function Ln(Gt,Cr){Cr=Cr||Tt.languages||Object.keys(Xe);const ln=vr(Gt),Un=Cr.filter(Bi).filter(So).map(fi=>On(fi,Gt,!1));Un.unshift(ln);const fa=Un.sort((fi,fn)=>{if(fi.relevance!==fn.relevance)return fn.relevance-fi.relevance;if(fi.language&&fn.language){if(Bi(fi.language).supersetOf===fn.language)return 1;if(Bi(fn.language).supersetOf===fi.language)return-1}return 0}),[Yr,Us]=fa,nc=Yr;return nc.secondBest=Us,nc}function Fs(Gt,Cr,ln){const Un=Cr&&pt[Cr]||ln;Gt.classList.add("hljs"),Gt.classList.add(`language-${Un}`)}function mi(Gt){let Cr=null;const ln=Dt(Gt);if(St(ln))return;if($o("before:highlightElement",{el:Gt,language:ln}),Gt.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Gt);return}if(Gt.children.length>0&&(Tt.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Gt)),Tt.throwUnescapedHTML))throw new Ot("One of your code blocks includes unescaped HTML.",Gt.innerHTML);Cr=Gt;const Un=Cr.textContent,fa=ln?ur(Un,{language:ln,ignoreIllegals:!0}):Ln(Un);Gt.innerHTML=fa.value,Gt.dataset.highlighted="yes",Fs(Gt,ln,fa.language),Gt.result={language:fa.language,re:fa.relevance,relevance:fa.relevance},fa.secondBest&&(Gt.secondBest={language:fa.secondBest.language,relevance:fa.secondBest.relevance}),$o("after:highlightElement",{el:Gt,result:fa,text:Un})}function _o(Gt){Tt=Jt(Tt,Gt)}const gs=()=>{ri(),Ae("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ki(){ri(),Ae("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let bo=!1;function ri(){function Gt(){ri()}if(document.readyState==="loading"){bo||window.addEventListener("DOMContentLoaded",Gt,!1),bo=!0;return}document.querySelectorAll(Tt.cssSelector).forEach(mi)}function cu(Gt,Cr){let ln=null;try{ln=Cr(Re)}catch(Un){if(st("Language definition for '{}' could not be registered.".replace("{}",Gt)),Pt)st(Un);else throw Un;ln=bt}ln.name||(ln.name=Gt),Xe[Gt]=ln,ln.rawDefinition=Cr.bind(null,Re),ln.aliases&&ia(ln.aliases,{languageName:Gt})}function ji(Gt){delete Xe[Gt];for(const Cr of Object.keys(pt))pt[Cr]===Gt&&delete pt[Cr]}function rc(){return Object.keys(Xe)}function Bi(Gt){return Gt=(Gt||"").toLowerCase(),Xe[Gt]||Xe[pt[Gt]]}function ia(Gt,{languageName:Cr}){typeof Gt=="string"&&(Gt=[Gt]),Gt.forEach(ln=>{pt[ln.toLowerCase()]=Cr})}function So(Gt){const Cr=Bi(Gt);return Cr&&!Cr.disableAutodetect}function Bs(Gt){Gt["before:highlightBlock"]&&!Gt["before:highlightElement"]&&(Gt["before:highlightElement"]=Cr=>{Gt["before:highlightBlock"](Object.assign({block:Cr.el},Cr))}),Gt["after:highlightBlock"]&&!Gt["after:highlightElement"]&&(Gt["after:highlightElement"]=Cr=>{Gt["after:highlightBlock"](Object.as
`},f]}}return pT=a,pT}var mT,mk;function Ase(){if(mk)return mT;mk=1;function t(e){const r="[a-zA-Z_][\\w.]*",n="<\\?(lasso(script)?|=)",a="\\]|\\?>",i={$pattern:r+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},s=e.COMMENT("<!--","-->",{relevance:0}),o={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[s]}},l={className:"meta",begin:"\\[/noprocess|"+n},c={className:"symbol",begin:"'"+r+"'"},u=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$]"+r},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"type",begin:"::\\s*",end:r,illegal:"\\W"},{className:"params",variants:[{begin:"-(?!infinity)"+r,relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[c]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[e.inherit(e.TITLE_MODE,{begin:r+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:i,contains:[{className:"meta",begin:a,relevance:0,starts:{end:"\\[|"+n,returnEnd:!0,relevance:0,contains:[s]}},o,l,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",keywords:i,contains:[{className:"meta",begin:a,relevance:0,starts:{end:"\\[noprocess\\]|"+n,returnEnd:!0,contains:[s]}},o,l].concat(u)}},{className:"meta",begin:"\\[",relevance:0},{className:"meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(u)}}return mT=t,mT}var fT,fk;function Rse(){if(fk)return fT;fk=1;function t(e){const n=e.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map(D=>D+"(?![a-zA-Z@:_])")),a=new RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-
]`,g={scope:"string",variants:[d,u,h,m]},b={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},_=["false","null","true"],S=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],E=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],v={keyword:S,literal:(K=>{const z=[];return K.forEach(re=>{z.push(re),re.toLowerCase()===re?z.push(re.toUpperCase()):z.push(re.toLowerCase())}),z})(_),built_in:E},T=K=>K.map(z=>z.replace(/\|\d+$/,"")),w={variants:[{match:[/new/,r.concat(f,"+"),r.concat("(?!",T(E).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},A=r.concat(a,"\\b(?!\\()"),I={variants:[{match:[r.concat(/::/,r.lookahead(/(?!class\b)/)),A],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,r.concat(/::/,r.lookahead(/(?!class\b)/)),A],scope:{1:"title.class",3:"variable.constant"}},{match:[i,r.concat("::",r.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},x={scope:"attr",match:r.concat(a,r.lookahead(":"),r.lookahead(/(?!::)/))},D={relevance:0,begin:/\(/,end:/\)/,keywords:v,contains:[x,o,I,e.C_BLOCK_COMMENT_MODE,g,b,w]},$={relevance:0,match:[/\b/,r.concat("(?!fn\\b|function\\b|",T(S).join("\\b|"),"|",T(E).join("\\b|"),"\\b)"),a,r.concat(f,"*"),r.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[D]};D.contains.push($);const H=[x,I,e.C_BLOCK_COMMENT_MODE,g,b,w],G={begin:r.concat(/#\[\s*\\?/,r.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:_,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:_,keyword:["new","array"]},contains:[
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}return RC=t,RC}var OC,O9;function Goe(){if(O9)return OC;O9=1;function t(e){const r="[a-z][a-zA-Z0-9_]*",n={className:"string",begin:"\\$.{1}"},a={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:r+":",relevance:0},e.C_NUMBER_MODE,a,n,{begin:"\\|[ ]*"+r+"([ ]+"+r+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+r}]},{begin:"#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,n,e.C_NUMBER_MODE,a]}]}}return OC=t,OC}var NC,N9;function qoe(){if(N9)return NC;N9=1;function t(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}return NC=t,NC}var IC,I9;function zoe(){if(I9)return IC;I9=1;function t(e){const r={className:"variable",begin:/\b_+[a-zA-Z]\w*/},n={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},a={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},i=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],s=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],o=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler","a
]*?"'`},{begin:`"[^\r
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},e.COMMENT("^[ ]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}return MC=t,MC}var kC,k9;function Voe(){if(k9)return kC;k9=1;function t(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}return kC=t,kC}var PC,P9;function Woe(){if(P9)return PC;P9=1;const t=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...r],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","i
(multipart)?`,end:`\\]
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return LC=t,LC}var FC,F9;function joe(){if(F9)return FC;F9=1;function t(A){return A?typeof A=="string"?A:A.source:null}function e(A){return r("(?=",A,")")}function r(...A){return A.map(x=>t(x)).join("")}function n(A){const I=A[A.length-1];return typeof I=="object"&&I.constructor===Object?(A.splice(A.length-1,1),I):{}}function a(...A){return"("+(n(A).capture?"":"?:")+A.map(D=>t(D)).join("|")+")"}const i=A=>r(/\b/,A,/\w$/.test(A)?/\b/:/\B/),s=["Protocol","Type"].map(i),o=["init","self"].map(i),l=["Any","Self"],c=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],u=["false","nil","true"],d=["assignment","associativity","higherThan","left","lowerThan","none","right"],h=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],m=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],f=a(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),g=a(f,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),b=r(f,g,"*"),_=a(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),S=a(_,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),E=r(_,S,"*"),y=r(/[A-Z]/,S,"*"),v=["attached","autoclosure",r(/convention\(/,a("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",r(/objc\(/,E,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplica
`)}const a=n.map(i=>{if(i.type===Qr.MCP_PROMPT){const s=i;return{type:Qr.MCP_PROMPT,name:s.name,serverName:s.serverName,promptName:s.promptName,content:s.content,arguments:s.arguments}}return{type:Qr.TEXT,name:i.name,content:i.content}});return`${JSON.stringify(t)}
${JSON.stringify(a,null,2)}`}function Ece(t){const e={message:t,textAttachments:[],mcpPromptAttachments:[]};if(!t.startsWith('"'))return e;try{let r=-1,n=!1;for(let u=1;u<t.length;u++){const d=t[u];if(n){n=!1;continue}if(d==="\\"){n=!0;continue}if(d==='"'){r=u;break}}if(r===-1)return e;const a=t.substring(0,r+1),i=t.substring(r+1).trim(),s=JSON.parse(a);if(!i||!i.startsWith("["))return{message:s,textAttachments:[],mcpPromptAttachments:[]};const o=JSON.parse(i),l=[],c=[];for(const u of o)vce(u)?c.push({type:Qr.MCP_PROMPT,name:u.name,serverName:u.serverName,promptName:u.promptName,content:u.content,arguments:u.arguments}):yce(u)&&l.push({type:Qr.TEXT,name:u.name,content:u.content});return{message:s,textAttachments:l,mcpPromptAttachments:c}}catch{return e}}function vce(t){if(typeof t!="object"||t===null)return!1;const e=t;return(e.type===Qr.MCP_PROMPT||e.type==="MCP_PROMPT")&&typeof e.name=="string"&&typeof e.serverName=="string"&&typeof e.promptName=="string"&&typeof e.content=="string"}function yce(t){if(typeof t!="object"||t===null)return!1;const e=t;return(e.type===Qr.TEXT||e.type==="TEXT")&&typeof e.name=="string"&&typeof e.content=="string"}function p_(t){if(!t)return"FILE";if(t.includes("/")){const e=t.split("/").pop();if(e)return e.includes(".")?e.split(".").pop()?.toUpperCase()||"FILE":e.toUpperCase()}if(t.includes(".")){const e=t.split(".").pop();if(e)return e.toUpperCase()}return t.toUpperCase()}function SR(t,e=150){return t.length>e?t.slice(0,e)+"...":t}function sl(t){switch(t){case ta.JPEG:case ta.PNG:case ta.GIF:case ta.WEBP:case ta.SVG:return kn.IMAGE;case ja.MP3_MPEG:case ja.MP3:case ja.MP4:case ja.WAV:case ja.WEBM:case ja.WEBM_OPUS:return kn.AUDIO;case If.PDF:return kn.PDF;case Lt.PLAIN:case Lt.MARKDOWN:case Lt.ASCIIDOC:case Lt.JAVASCRIPT:case Lt.JAVASCRIPT_APP:case Lt.TYPESCRIPT:case Lt.JSX:case Lt.TSX:case Lt.CSS:case Lt.HTML:case Lt.JSON:case Lt.XML_TEXT:case Lt.XML_APP:case Lt.YAML_TEXT:case Lt.YAML_APP:case Lt.CSV:case Lt.PYTHON:case Lt.JAVA:case Lt.CPP_SRC:case Lt.C_SRC:case Lt.C_HDR:case Lt.PHP:case Lt.RUBY:case Lt.GO:case Lt.RUST:case Lt.SHELL:case Lt.BAT:case Lt.SQL:case Lt.R:case Lt.SCALA:case Lt.KOTLIN:case Lt.SWIFT:case Lt.DART:case Lt.VUE:case Lt.SVELTE:case Lt.LATEX:case Lt.BIBTEX:case Lt.CUDA:case Lt.CPP_HDR:case Lt.CSHARP:case Lt.HASKELL:case Lt.PROPERTIES:case Lt.TEX:case Lt.TEX_APP:return kn.TEXT;default:return null}}function DI(t){switch(t.toLowerCase().substring(t.lastIndexOf("."))){case Zs.JPG:case Zs.JPEG:case Zs.PNG:case Zs.GIF:case Zs.WEBP:case Zs.SVG:return kn.IMAGE;case Nf.MP3:case Nf.WAV:return kn.AUDIO;case RI.PDF:return kn.PDF;case Wt.TXT:case Wt.MD:case Wt.ADOC:case Wt.JS:case Wt.TS:case Wt.JSX:case Wt.TSX:case Wt.CSS:case Wt.HTML:case Wt.HTM:case Wt.JSON:case Wt.XML:case Wt.YAML:case Wt.YML:case Wt.CSV:case Wt.LOG:case Wt.PY:case Wt.JAVA:case Wt.CPP:case Wt.C:case Wt.H:case Wt.PHP:case Wt.RB:case Wt.GO:case Wt.RS:case Wt.SH:case Wt.BAT:case Wt.SQL:case Wt.R:case Wt.SCALA:case Wt.KT:case Wt.SWIFT:case Wt.DART:case Wt.VUE:case Wt.SVELTE:case Wt.TEX:case Wt.BIB:case Wt.COMP:case Wt.CU:case Wt.CUH:case Wt.HPP:case Wt.HS:case Wt.PROPERTIES:return kn.TEXT;default:return null}}function Tce(t,e){if(e){const n=sl(e);if(n===kn.IMAGE||n===kn.AUDIO||n===kn.PDF)return!0}const r=DI(t);return r===kn.IMAGE||r===kn.AUDIO||r===kn.PDF,!0}function pb(t){if(typeof t!="number")return"Unknown";if(t===0)return"0 Bytes";const e=1024,r=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(t)/Math.log(e));return parseFloat((t/Math.pow(e,n)).toFixed(2))+" "+r[n]}function Cce(t){return typeof t!="number"?"Unknown":t>=1e9?`${(t/1e9).toFixed(2)}B`:t>=1e6?`${(t/1e6).toFixed(2)}M`:t>=1e3?`${(t/1e3).toFixed(2)}K`:t.toString()}function m_(t){return typeof t!="number"?"Unknown":t.toLocaleString()}function u4(t){try{const e=JSON.parse(t);return JSON.stringify(e,null,2)}catch{return t}}function wce(t){return t.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function f_(t){if(t<0)return"0s";const e=t/T1;if(e<vne)return`${e.toFixed(1)}s`;if(e<yne)return`${e.toFixed(1)}s`;const r=Ma
--- ${t}: ${a} ---
${r}`}function MI(t){return t.isComposing||t.keyCode===229}function Ace(t,e){return t.includes("$")?t.split(`
`).map(r=>{if(r.indexOf("$")==-1)return r;let n="",a=0;for(;a<r.length;){const i=r.indexOf("$",a);if(i==-1){n+=r.slice(a);break}const s=r.indexOf("$",i+1);if(s==-1){n+=r.slice(a);break}const o=i>0?r[i-1]:"",l=r[i+1],c=i+1<s?r[s-1]:"",u=s+1<r.length?r[s+1]:"";let d=!1;if(s==a+1&&(d=!0),/[A-Za-z0-9_$-]/.test(o)&&(d=!0),/[0-9]/.test(l)&&(/[A-Za-z0-9_$-]/.test(u)||c==" ")&&(d=!0),d){n+=r.slice(a,i+1),a=i+1;continue}n+=r.slice(a,i);const h=r.slice(i,s+1);e.push(h),n+=`<<LATEX_${e.length-1}>>`,a=s+1}return n}).join(`
`):t}function Rce(t){return t.replace(One,(e,r,n,a)=>r??(n!=null?`$$${n}$$`:a!=null?`$${a}$`:e))}function d4(t){const e=new Map;t=t.split(`
`).map((s,o)=>{const l=s.match(/^(>\s*)/);return l?(e.set(o,l[1]),s.slice(l[1].length)):s}).join(`
`);const a=[];t=t.replace(Rne,s=>(a.push(s),`<<CODE_BLOCK_${a.length-1}>>`));const i=[];return t=t.replace(/([\S].*?)\\\[([\s\S]*?)\\\](.*)/g,(s,o,l,c)=>{if(o.endsWith("\\"))return s;const u=/\S/.test(c);let d;return u?(i.push(`\\(${l.trim()}\\)`),d=""):(i.push(`\\[${l}\\]`),d=`
`),`${o}${d}<<LATEX_${i.length-1}>>${d}${c}`}),t=t.replace(new RegExp("(\\$\\$[\\s\\S]*?\\$\\$|(?<!\\\\)\\\\\\[[\\s\\S]*?\\\\\\]|(?<!\\\\)\\\\\\(.*?\\\\\\))","g"),s=>(i.push(s),`<<LATEX_${i.length-1}>>`)),t=Ace(t,i),t=t.replace(/\$(?=\d)/g,"\\$"),t=t.replace(/<<LATEX_(\d+)>>/g,(s,o)=>{let l=i[parseInt(o)];const c=l.match(Nne);if(c){const u=c[1],d=u.startsWith(`
`)?"":`
`,h=u.endsWith(`
`)?"":`
`;l="$$"+d+u+h+"$$"}return l}),t=Rce(t),t=t.replace(new RegExp("(?<!\\\\)\\\\\\((.+?)\\\\\\)","g"),"$$$1$").replace(new RegExp("(?<!\\\\)\\\\\\[([\\s\\S]*?)\\\\\\]","g"),(s,o)=>`$$${o}$$`),t=t.replace(/<<CODE_BLOCK_(\d+)>>/g,(s,o)=>a[parseInt(o)]),e.size>0&&(t=t.split(`
`).map((l,c)=>{const u=e.get(c);return u?u+l:l}).join(`
`)),t}function Oce(t,e){const r=[],n=[],a={},{hasVision:i,hasAudio:s}=e;for(const o of t){const l=sl(o.type);let c=!0,u="";switch(l){case kn.IMAGE:i||(c=!1,u="Images require a vision-capable model");break;case kn.AUDIO:s||(c=!1,u="Audio files require an audio-capable model");break;case kn.TEXT:case kn.PDF:break}c?r.push(o):(n.push(o),a[o.name]=u)}return{supportedFiles:r,unsupportedFiles:n,modalityReasons:a}}function Nce(t){const e=t.trim();if(!e)return"";const r=e.split(/[\\/]/);if(r.length===2){const[i,s]=r,o=i?.trim(),l=s?.trim();if(o&&l)return`${o}/${l}`}const a=r.pop()?.trim();return a&&a.length>0?a:e}function Cu(t){return typeof t=="number"?Math.round(t*C5)/C5:t}function SG(t){switch(t.toLowerCase().substring(t.lastIndexOf("."))){case".js":case".mjs":case".cjs":return"javascript";case".ts":case".mts":case".cts":return"typescript";case".jsx":return"javascript";case".tsx":return"typescript";case".html":case".htm":return"html";case".css":return"css";case".scss":return"scss";case".less":return"less";case".vue":return"html";case".svelte":return"html";case".json":return"json";case".xml":return"xml";case".yaml":case".yml":return"yaml";case".toml":return"ini";case".csv":return"plaintext";case".py":return"python";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".cpp":case".cc":case".cxx":case".c++":return"cpp";case".c":return"c";case".h":case".hpp":return"cpp";case".cs":return"csharp";case".go":return"go";case".rs":return"rust";case".rb":return"ruby";case".php":return"php";case".swift":return"swift";case".dart":return"dart";case".r":return"r";case".lua":return"lua";case".pl":case".pm":return"perl";case".sh":case".bash":case".zsh":return"bash";case".bat":case".cmd":return"dos";case".ps1":return"powershell";case".sql":return"sql";case".md":case".markdown":return"markdown";case".tex":case".latex":return"latex";case".adoc":case".asciidoc":return"asciidoc";case".ini":case".cfg":case".conf":return"ini";case".dockerfile":return"dockerfile";case".nginx":return"nginx";case".graphql":case".gql":return"graphql";case".proto":return"protobuf";case".diff":case".patch":return"diff";case".log":return"plaintext";case".txt":return"plaintext";default:return"plaintext"}}async function Ice(t){return new Promise((e,r)=>{const n=new FileReader;n.onload=a=>{a.target?.result!==null&&a.target?.result!==void 0?e(a.target.result):r(new Error("Failed to read file"))},n.onerror=()=>r(new Error("File reading error")),n.readAsText(t)})}function xce(t,e={}){if(!t)return!0;const r={...$re,...e},n=t.substring(0,r.prefixLength);let a=0,i=0;for(let s=0;s<n.length;s++){const o=n.charCodeAt(s);if(o===0){a++;continue}o<32&&o!==9&&o!==10&&o!==13&&(o<8||o>13&&o<27)&&i++,o===65533&&i++}return!(a>r.maxAbsoluteNullBytes||i/n.length>r.suspiciousCharThresholdRatio)}function EG(t,e){let r=null;return(...n)=>{r&&clearTimeout(r),r=setTimeout(()=>{t(...n),r=null},e)}}function Dce(t){return t.replace(Tne,"").slice(0,QU)}function Mce(t){return t.replace(Cne,"").slice(0,XU)}function kce(t){return`<div class="image-error-content">
<span>Image cannot be displayed</span>
<a href="${t}" target="_blank" rel="noopener noreferrer">(open link)</a>
</div>`}function h4(t){const e=t.trim().toLowerCase();return e.startsWith(ho.WEBSOCKET)||e.startsWith(ho.WEBSOCKET_SECURE)?Is.WEBSOCKET:Is.STREAMABLE_HTTP}function p4(t){if(!t)return[];let e;if(typeof t=="string"){const r=t.trim();if(!r)return[];try{e=JSON.parse(r)}catch(n){return console.warn("[MCP] Failed to parse mcpServers JSON, ignoring value:",n),[]}}else e=t;return Array.isArray(e)?e.map((r,n)=>{const a=typeof r?.url=="string"?r.url.trim():"",i=typeof r?.headers=="string"?r.headers.trim():void 0;return{id:typeof r?.id=="string"&&r.id?.trim()?r.id.trim():`${NI}-${n+1}`,enabled:!!r?.enabled,url:a,name:r?.name,requestTimeoutSeconds:Va.requestTimeoutSeconds,headers:i||void 0,useProxy:!!r?.useProxy}}):[]}function Pce(t){switch(t){case qu.ERROR:return FU;case qu.WARN:return Kc;default:return vI}}function Lce(t){switch(t){case qu.ERROR:return"text-destructive";case qu.WARN:return"text-yellow-600 dark:text-yellow-500";default:return"text-muted-foreground"}}function Fce(t){return t?.startsWith(Pp.IMAGE)??!1}function mb(t){try{return t.replace(Kne,"").split(tae).filter(r=>r.length>0)}catch{return[t]}}function Bce(t){return t.replace(jne,"").split(Qne).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}function ER(t){try{const e=mb(t.uri);return e[e.length-1]||t.name||t.uri}catch{return t.name||t.uri}}function Uce(t,e){const r=t?.toLowerCase()||"",n=e?.toLowerCase()||"";return r.includes(Js.JSON)||r.includes(Js.JAVASCRIPT)||r.includes(Js.TYPESCRIPT)||tG.test(n)}function Gce(t,e){const r=t?.toLowerCase()||"",n=e?.toLowerCase()||"";return r.startsWith(Pp.IMAGE)||eG.test(n)}function vG(t,e){const r=t?.toLowerCase()||"",n=e?.toLowerCase()||"";return r.startsWith(Pp.IMAGE)||eG.test(n)?EI:r.includes(Js.JSON)||r.includes(Js.JAVASCRIPT)||r.includes(Js.TYPESCRIPT)||tG.test(n)?BU:r.includes(Pp.TEXT)||Wne.test(n)?Nc:n.includes(fR.DATABASE_KEYWORD)||n.includes(fR.DATABASE_SCHEME)?_I:SI}function Am(t){return t?t.filter(e=>"text"in e).map(e=>e.text).join(rae):""}function qce(t){return t?t.filter(e=>"blob"in e):[]}function yG(t,e=Lt.PLAIN,r=rG){const n=new Blob([t],{type:e}),a=URL.createObjectURL(n),i=document.createElement("a");i.href=a,i.download=r,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(a)}function g_(t){const e=t.indexOf(Rv);if(e===-1)return t;const r=t.substring(0,e),n=t.substring(e+Rv.length).replace(Rae,"");return`${r}${Rv}${n}`}function TG(t){const e=[],r=new Set;let n;for(db.lastIndex=0;(n=db.exec(t))!==null;){const a=n[1]||"",i=n[2];for(const s of i.split(",")){const o=s.replace(iG,"").replace(sG,"").trim();o&&!r.has(o)&&(r.add(o),e.push({name:o,operator:a}))}}return e}function zce(t,e){return db.lastIndex=0,t.replace(db,(r,n,a)=>{const i=a.split(",").map(o=>o.replace(iG,"").replace(sG,"").trim()),s=i.map(o=>e[o]??"").filter(o=>o!=="");if(s.length===0)return"";switch(n){case gu.RESERVED:return s.join(To.COMMA);case gu.FRAGMENT:return gu.FRAGMENT+s.join(To.COMMA);case gu.PATH_SEGMENT:return To.SLASH+s.join(To.SLASH);case gu.LABEL:return To.PERIOD+s.join(To.PERIOD);case gu.PATH_PARAM:return i.filter((o,l)=>s[l]).map((o,l)=>`${To.SEMICOLON}${o}=${s[l]}`).join("");case gu.FORM_QUERY:return To.QUERY_PREFIX+i.filter((o,l)=>s[l]).map((o,l)=>`${encodeURIComponent(o)}=${encodeURIComponent(s[l])}`).join(To.COMMA);case gu.FORM_CONTINUATION:return To.QUERY_CONTINUATION+i.filter((o,l)=>s[l]).map((o,l)=>`${encodeURIComponent(o)}=${encodeURIComponent(s[l])}`).join(To.COMMA);default:return s.map(o=>encodeURIComponent(o)).join(To.COMMA)}})}function $ce(t,e){return TG(t).every(n=>(e[n.name]??"").trim()!=="")}function fb(t,e){return`data:${t};base64,${e}`}function Hce(t){if(!t?.trim())return[];try{const e=JSON.parse(t);if(typeof e=="object"&&e!==null&&!Array.isArray(e))return Object.entries(e).map(([r,n])=>({key:r,value:String(n)}))}catch{return[]}return[]}function Yce(t){const e=t.filter(n=>n.key.trim());if(e.length===0)return"";const r={};for(const n of e)r[n.key.trim()]=n.value;return JSON.stringify(r)}function Vce(t,e=!0){try{const r=new URL(t),n=r.hostname.split(c5),a=n.length>=u5?n.slice(-
`)}function U(R,P,ee,ce){this.failures=P,this.failedKeys=ce,this.successCount=ee,this.message=O(R,P)}function X(R,P){this.name="BulkError",this.failures=Object.keys(P).map(function(ee){return P[ee]}),this.failuresByPos=P,this.message=O(R,this.failures)}g(N).from(Error).extend({toString:function(){return this.name+": "+this.message}}),g(U).from(N),g(X).from(N);var ne=yo.reduce(function(R,P){return R[P]=P+"Error",R},{}),ue=N,he=yo.reduce(function(R,P){var ee=P+"Error";function ce(de,Se){this.name=ee,de?typeof de=="string"?(this.message="".concat(de).concat(Se?`
`+Se:""),this.inner=Se||null):typeof de=="object"&&(this.message="".concat(de.name," ").concat(de.message),this.inner=de):(this.message=J[P]||ee,this.inner=null)}return g(ce).from(ue),R[P]=ce,R},{});he.Syntax=SyntaxError,he.Type=TypeError,he.Range=RangeError;var be=dt.reduce(function(R,P){return R[P+"Error"]=he[P],R},{}),Z=yo.reduce(function(R,P){return["Syntax","Type","Range"].indexOf(P)===-1&&(R[P+"Error"]=he[P]),R},{});function ae(){}function pe(R){return R}function me(R,P){return R==null||R===pe?P:function(ee){return P(R(ee))}}function Ee(R,P){return function(){R.apply(this,arguments),P.apply(this,arguments)}}function Ce(R,P){return R===ae?P:function(){var ee=R.apply(this,arguments);ee!==void 0&&(arguments[0]=ee);var ce=this.onsuccess,de=this.onerror;this.onsuccess=null,this.onerror=null;var Se=P.apply(this,arguments);return ce&&(this.onsuccess=this.onsuccess?Ee(ce,this.onsuccess):ce),de&&(this.onerror=this.onerror?Ee(de,this.onerror):de),Se!==void 0?Se:ee}}function Ne(R,P){return R===ae?P:function(){R.apply(this,arguments);var ee=this.onsuccess,ce=this.onerror;this.onsuccess=this.onerror=null,P.apply(this,arguments),ee&&(this.onsuccess=this.onsuccess?Ee(ee,this.onsuccess):ee),ce&&(this.onerror=this.onerror?Ee(ce,this.onerror):ce)}}function Ie(R,P){return R===ae?P:function(ee){var ce=R.apply(this,arguments);l(ee,ce);var de=this.onsuccess,Se=this.onerror;return this.onsuccess=null,this.onerror=null,ee=P.apply(this,arguments),de&&(this.onsuccess=this.onsuccess?Ee(de,this.onsuccess):de),Se&&(this.onerror=this.onerror?Ee(Se,this.onerror):Se),ce===void 0?ee===void 0?void 0:ee:l(ce,ee)}}function Ue(R,P){return R===ae?P:function(){return P.apply(this,arguments)!==!1&&R.apply(this,arguments)}}function Fe(R,P){return R===ae?P:function(){var ee=R.apply(this,arguments);if(ee&&typeof ee.then=="function"){for(var ce=this,de=arguments.length,Se=new Array(de);de--;)Se[de]=arguments[de];return ee.then(function(){return P.apply(ce,Se)})}return P.apply(this,arguments)}}Z.ModifyError=U,Z.DexieError=N,Z.BulkError=X;var je=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function He(R){je=R}var at={},st=100,Ae=typeof Promise>"u"?[]:function(){var R=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[R,c(R),R];var P=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[P,c(P),R]}(),dt=Ae[0],yo=Ae[1],Ae=Ae[2],yo=yo&&yo.then,Le=dt&&dt.constructor,ht=!!Ae,ze=function(R,P){Ot.push([R,P]),At&&(queueMicrotask(Ct),At=!1)},ft=!0,At=!0,Rt=[],zt=[],ir=pe,hr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ae,pgp:!1,env:{},finalize:ae},lt=hr,Ot=[],Ft=0,Jt=[];function ut(R){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var P=this._PSD=lt;if(typeof R!="function"){if(R!==at)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&xt(this,this._value))}this._state=null,this._value=null,++P.ref,function ee(ce,de){try{de(function(Se){if(ce._state===null){if(Se===ce)throw new TypeError("A promise cannot be resolved with itself.");var Oe=ce._lib&&Pt();Se&&typeof Se.then=="function"?ee(ce,function(ke,Ye){Se instanceof ut?Se._then(ke,Ye):Se.then(ke,Ye)}):(ce._state=!0,ce._value=Se,Re(ce)),Oe&&kt()}},xt.bind(null,ce))}catch(Se){xt(ce,Se)}}(this,R)}var Ut={get:function(){var R=lt,P=Ln;function ee(ce,de){var Se=this,Oe=!R.global&&(R!==lt||P!==Ln),ke=Oe&&!gs(),Ye=new ut(function(Qe,tt){Xe(Se,new yt(rc(ce,R,Oe,ke),rc(de,R,Oe,ke),Qe,tt,R))});return this._consoleTask&&(Ye._consoleTask=this._consoleTask),Ye}return ee.prototype=at,ee},set:function(R){f(this,"then",R&&R.prototype===at?Ut:{get:function(){return R},set:Ut.set})}};function yt(R,P,ee,ce,de){this.onFulfilled=typeof R=="function"?R:null,this.onRejected=typeof P=="function"?P:null,this.resolve=ee,this.reject=ce,this.psd=de}function xt(R,P){var ee,ce;zt.push(P),R._state===null&&(ee=R._lib&&Pt(),P=ir(P),R._state=!1,R._value=P,ce=R,Rt.some(function(de){return de._value===ce._value})||Rt.push(ce),Re(R),ee&&kt())}function Re(
`).filter(s=>s),a=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(a)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const e=Function,r=this?.args,a=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...r,a.join(`
`))}}const Nde={major:4,minor:2,patch:1},pa=vt("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Nde;const n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(const a of n)for(const i of a._zod.onattach)i(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const a=(s,o,l)=>{let c=Jh(s),u;for(const d of o){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(c)continue;const h=s.issues.length,m=d._zod.check(s);if(m instanceof Promise&&l?.async===!1)throw new fp;if(u||m instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await m,s.issues.length!==h&&(c||(c=Jh(s,h)))});else{if(s.issues.length===h)continue;c||(c=Jh(s,h))}}return u?u.then(()=>s):s},i=(s,o,l)=>{if(Jh(s))return s.aborted=!0,s;const c=a(o,n,l);if(c instanceof Promise){if(l.async===!1)throw new fp;return c.then(u=>t._zod.parse(u,l))}return t._zod.parse(c,l)};t._zod.run=(s,o)=>{if(o.skipChecks)return t._zod.parse(s,o);if(o.direction==="backward"){const c=t._zod.parse({value:s.value,issues:[]},{...o,skipChecks:!0});return c instanceof Promise?c.then(u=>i(u,s,o)):i(c,s,o)}const l=t._zod.parse(s,o);if(l instanceof Promise){if(o.async===!1)throw new fp;return l.then(c=>a(c,n,o))}return a(l,n,o)}}t["~standard"]={validate:a=>{try{const i=PG(t,a);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return kue(t,a).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),UI=vt("$ZodString",(t,e)=>{pa.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??cde(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),ya=vt("$ZodStringFormat",(t,e)=>{KS.init(t,e),UI.init(t,e)}),Ide=vt("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Que),ya.init(t,e)}),xde=vt("$ZodUUID",(t,e)=>{if(e.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=y4(n))}else e.pattern??(e.pattern=y4());ya.init(t,e)}),Dde=vt("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Xue),ya.init(t,e)}),Mde=vt("$ZodURL",(t,e)=>{ya.init(t,e),t._zod.check=r=>{try{const n=r.value.trim(),a=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(a.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=a.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),kde=vt("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Jue()),ya.init(t,e)}),Pde=vt("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Kue),ya.init(t,e)}),Lde=vt("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=$ue),ya.init(t,e)}),Fde=vt("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Hue),ya.init(t,e)}),Bde=vt("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Yue),ya.init(t,e)}),Ude=vt("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Vue),ya.init(t,e)}),Gde=vt("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Wue),ya.init(t,e)}),qde=vt("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=lde(e)),ya.init(t,e)}),zde=vt("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=sde),ya.init(t,e)}),$de=vt("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=ode(e)),ya.init(t,e)}),Hde=vt("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=jue),ya.init(t,e)}),Yde=vt("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=ede),ya.init(t,e),t._zod.bag.format="ipv4"}),Vde=vt("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=tde),ya.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),Wde=vt("$ZodCID
if (${y}.issues.length) {
payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
...iss,
path: iss.path ? [${v}, ...iss.path] : [${v}]
})));
}
if (${y}.value === undefined) {
if (${v} in input) {
newResult[${v}] = undefined;
}
} else {
newResult[${v}] = ${y}.value;
}
`)}m.write("payload.value = newResult;"),m.write("return payload;");const S=m.compile();return(E,y)=>S(h,E,y)};let i;const s=Mf,o=!OG.jitless,c=o&&vue.value,u=e.catchall;let d;t._zod.parse=(h,m)=>{d??(d=n.value);const f=h.value;return s(f)?o&&c&&m?.async===!1&&m.jitless!==!0?(i||(i=a(e.shape)),h=i(h,m),u?YG([],f,h,m,d,t):h):r(h,m):(h.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),h)}});function C4(t,e,r,n){for(const i of t)if(i.issues.length===0)return e.value=i.value,e;const a=t.filter(i=>!Jh(i));return a.length===1?(e.value=a[0].value,a[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(i=>i.issues.map(s=>$u(s,n,zu())))}),e)}const VG=vt("$ZodUnion",(t,e)=>{pa.init(t,e),ra(t._zod,"optin",()=>e.options.some(a=>a._zod.optin==="optional")?"optional":void 0),ra(t._zod,"optout",()=>e.options.some(a=>a._zod.optout==="optional")?"optional":void 0),ra(t._zod,"values",()=>{if(e.options.every(a=>a._zod.values))return new Set(e.options.flatMap(a=>Array.from(a._zod.values)))}),ra(t._zod,"pattern",()=>{if(e.options.every(a=>a._zod.pattern)){const a=e.options.map(i=>i._zod.pattern);return new RegExp(`^(${a.map(i=>PI(i.source)).join("|")})$`)}});const r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(a,i)=>{if(r)return n(a,i);let s=!1;const o=[];for(const l of e.options){const c=l._zod.run({value:a.value,issues:[]},i);if(c instanceof Promise)o.push(c),s=!0;else{if(c.issues.length===0)return c;o.push(c)}}return s?Promise.all(o).then(l=>C4(l,a,t,i)):C4(o,a,t,i)}}),uhe=vt("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,VG.init(t,e);const r=t._zod.parse;ra(t._zod,"propValues",()=>{const a={};for(const i of e.options){const s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(const[o,l]of Object.entries(s)){a[o]||(a[o]=new Set);for(const c of l)a[o].add(c)}}return a});const n=YS(()=>{const a=e.options,i=new Map;for(const s of a){const o=s._zod.propValues?.[e.discriminator];if(!o||o.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(const l of o){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,s)}}return i});t._zod.parse=(a,i)=>{const s=a.value;if(!Mf(s))return a.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),a;const o=n.value.get(s?.[e.discriminator]);return o?o._zod.run(a,i):e.unionFallback?r(a,i):(a.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:s,path:[e.discriminator],inst:t}),a)}}),dhe=vt("$ZodIntersection",(t,e)=>{pa.init(t,e),t._zod.parse=(r,n)=>{const a=r.value,i=e.left._zod.run({value:a,issues:[]},n),s=e.right._zod.run({value:a,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,c])=>w4(r,l,c)):w4(r,i,s)}});function wR(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Bp(t)&&Bp(e)){const r=Object.keys(e),n=Object.keys(t).filter(i=>r.indexOf(i)!==-1),a={...t,...e};for(const i of n){const s=wR(t[i],e[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};a[i]=s.data}return{valid:!0,data:a}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<t.length;n++){const a=t[n],i=e[n],s=wR(a,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function w4(t,e,r){if(e.issues.length&&t.issues.push(...e.issues),r.issues.length&&t.issues.push(...r.issues),Jh(t))return t;const n=wR(e.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return t.value=n.data,t}const hhe=vt("$ZodRecord",(t,e)=>{pa.init(t,e),t._zod.parse=(r,n)=>{const a=r.value;if(!Bp(a))return r.issues.push({expected:"record",code:"invalid_type",input:a,inst:t}),r;const i=[],s=e.keyType._zod.values;if(s){r.value={};con
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of t.seen.entries()){const s=i[1];if(e===i[0]){a(i);continue}if(t.external){const l=t.external.registry.get(i[0])?.id;if(e!==i[0]&&l){a(i);continue}}if(t.metadataRegistry.get(i[0])?.id){a(i);continue}if(s.cycle){a(i);continue}if(s.count>1&&t.reused==="ref"){a(i);continue}}}function ZG(t,e){const r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=s=>{const o=t.seen.get(s),l=o.def??o.schema,c={...l};if(o.ref===null)return;const u=o.ref;if(o.ref=null,u){n(u);const d=t.seen.get(u).schema;d.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(d)):(Object.assign(l,d),Object.assign(l,c))}o.isParent||t.override({zodSchema:s,jsonSchema:l,path:o.path??[]})};for(const s of[...t.seen.entries()].reverse())n(s[0]);const a={};if(t.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const s=t.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");a.$id=t.external.uri(s)}Object.assign(a,r.def??r.schema);const i=t.external?.defs??{};for(const s of t.seen.entries()){const o=s[1];o.def&&o.defId&&(i[o.defId]=o.def)}t.external||Object.keys(i).length>0&&(t.target==="draft-2020-12"?a.$defs=i:a.definitions=i);try{const s=JSON.parse(JSON.stringify(a));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:Sb(e,"input"),output:Sb(e,"output")}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function es(t,e){const r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);const n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return es(n.element,r);if(n.type==="set")return es(n.valueType,r);if(n.type==="lazy")return es(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return es(n.innerType,r);if(n.type==="intersection")return es(n.left,r)||es(n.right,r);if(n.type==="record"||n.type==="map")return es(n.keyType,r)||es(n.valueType,r);if(n.type==="pipe")return es(n.in,r)||es(n.out,r);if(n.type==="object"){for(const a in n.shape)if(es(n.shape[a],r))return!0;return!1}if(n.type==="union"){for(const a of n.options)if(es(a,r))return!0;return!1}if(n.type==="tuple"){for(const a of n.items)if(es(a,r))return!0;return!!(n.rest&&es(n.rest,r))}return!1}const ype=(t,e={})=>r=>{const n=QG({...r,processors:e});return di(t,n),XG(n,t),ZG(n,t)},Sb=(t,e)=>r=>{const{libraryOptions:n,target:a}=r??{},i=QG({...n??{},target:a,io:e,processors:{}});return di(t,i),XG(i,t),ZG(i,t)},Tpe={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Cpe=(t,e,r,n)=>{const a=r;a.type="string";const{minimum:i,maximum:s,format:o,patterns:l,contentEncoding:c}=t._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof s=="number"&&(a.maxLength=s),o&&(a.format=Tpe[o]??o,a.format===""&&delete a.format),c&&(a.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?a.pattern=u[0].source:u.length>1&&(a.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},wpe=(t,e,r,n)=>{const a=r,{minimum:i,maximum:s,format:o,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=t._zod.bag;typeof o=="string"&&o.includes("int")?a.type="integer":a.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(a.minimum=u,a.exclusiveMinimum=!0):a.exclusiveMinimum=u),typeof i=="number"&&(a.minimum=i,typeof u=="number"&&e.target!=="draft-04"&&(u>=i?delete a.minimum:delete a.exclusiveMinimum)),typeof c=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(a.maximum=c,a.exclusiveMaximum=!0):a.exclusiveMaximum=c),typeof s=="number"&&(a.maximum=s,typeof c=="number
`:""},this._extScope=O,this._scope=new r.Scope({parent:O}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(O){return this._scope.name(O)}scopeName(O){return this._extScope.name(O)}scopeValue(O,U){const X=this._extScope.value(O,U);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}getScopeValue(O,U){return this._extScope.getValue(O,U)}scopeRefs(O){return this._extScope.scopeRefs(O,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(O,U,X,ne){const ue=this._scope.toName(U);return X!==void 0&&ne&&(this._constants[ue.str]=X),this._leafNode(new s(O,ue,X)),ue}const(O,U,X){return this._def(r.varKinds.const,O,U,X)}let(O,U,X){return this._def(r.varKinds.let,O,U,X)}var(O,U,X){return this._def(r.varKinds.var,O,U,X)}assign(O,U,X){return this._leafNode(new o(O,U,X))}add(O,U){return this._leafNode(new l(O,t.operators.ADD,U))}code(O){return typeof O=="function"?O():O!==e.nil&&this._leafNode(new h(O)),this}object(...O){const U=["{"];for(const[X,ne]of O)U.length>1&&U.push(","),U.push(X),(X!==ne||this.opts.es5)&&(U.push(":"),(0,e.addCodeArg)(U,ne));return U.push("}"),new e._Code(U)}if(O,U,X){if(this._blockNode(new _(O)),U&&X)this.code(U).else().code(X).endIf();else if(U)this.code(U).endIf();else if(X)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(O){return this._elseNode(new _(O))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(_,b)}_for(O,U){return this._blockNode(O),U&&this.code(U).endFor(),this}for(O,U){return this._for(new E(O),U)}forRange(O,U,X,ne,ue=this.opts.es5?r.varKinds.var:r.varKinds.let){const he=this._scope.toName(O);return this._for(new y(ue,he,U,X),()=>ne(he))}forOf(O,U,X,ne=r.varKinds.const){const ue=this._scope.toName(O);if(this.opts.es5){const he=U instanceof e.Name?U:this.var("_arr",U);return this.forRange("_i",0,(0,e._)`${he}.length`,be=>{this.var(ue,(0,e._)`${he}[${be}]`),X(ue)})}return this._for(new v("of",ne,ue,U),()=>X(ue))}forIn(O,U,X,ne=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(O,(0,e._)`Object.keys(${U})`,X);const ue=this._scope.toName(O);return this._for(new v("in",ne,ue,U),()=>X(ue))}endFor(){return this._endBlockNode(S)}label(O){return this._leafNode(new c(O))}break(O){return this._leafNode(new u(O))}return(O){const U=new w;if(this._blockNode(U),this.code(O),U.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(w)}try(O,U,X){if(!U&&!X)throw new Error('CodeGen: "try" without "catch" and "finally"');const ne=new A;if(this._blockNode(ne),this.code(O),U){const ue=this.name("e");this._currNode=ne.catch=new I(ue),U(ue)}return X&&(this._currNode=ne.finally=new x,this.code(X)),this._endBlockNode(I,x)}throw(O){return this._leafNode(new d(O))}block(O,U){return this._blockStarts.push(this._nodes.length),O&&this.code(O).endBlock(U),this}endBlock(O){const U=this._blockStarts.pop();if(U===void 0)throw new Error("CodeGen: not in self-balancing block");const X=this._nodes.length-U;if(X<0||O!==void 0&&X!==O)throw new Error(`CodeGen: wrong number of nodes: ${X} vs ${O} expected`);return this._nodes.length=U,this}func(O,U=e.nil,X,ne){return this._blockNode(new T(O,U,X)),ne&&this.code(ne).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(O=1){for(;O-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(O){return this._currNode.nodes.push(O),this}_blockNode(O){this._currNode.nodes.push(O),this._nodes.push(O)}_endBlockNode(O,U){const X=this._currNode;if(X instanceof O||U&&X instanceof U)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${U?`${O.kind}/${U.kind}`:O.kind}"`)}_elseNode(O){const U=this._currNode;if(!(U instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=U.else=O,this}get _root(){return this._nodes[0]}get _currNode(){const O=this._nodes;return O[O.length-1]}set _currNode(O){const U=this._nodes;U[U.length-1]=O}}t.CodeGen=D;function $(N,O){for(const U in O)N[U]=(N[U]||0)+(O[U]||0);return N
|| (${A} == "string" && ${T} && ${T} == +${T})`).assign(I,(0,n._)`+${T}`);return;case"integer":v.elseIf((0,n._)`${A} === "boolean" || ${T} === null
|| (${A} === "string" && ${T} && ${T} == +${T} && !(${T} % 1))`).assign(I,(0,n._)`+${T}`);return;case"boolean":v.elseIf((0,n._)`${T} === "false" || ${T} === 0 || ${T} === null`).assign(I,!1).elseIf((0,n._)`${T} === "true" || ${T} === 1`).assign(I,!0);return;case"null":v.elseIf((0,n._)`${T} === "" || ${T} === 0 || ${T} === false`),v.assign(I,null);return;case"array":v.elseIf((0,n._)`${A} === "string" || ${A} === "number"
|| ${A} === "boolean" || ${T} === null`).assign(I,(0,n._)`[${T}]`)}}}function h({gen:S,parentData:E,parentDataProperty:y},v){S.if((0,n._)`${E} !== undefined`,()=>S.assign((0,n._)`${E}[${y}]`,v))}function m(S,E,y,v=i.Correct){const T=v===i.Correct?n.operators.EQ:n.operators.NEQ;let w;switch(S){case"null":return(0,n._)`${E} ${T} null`;case"array":w=(0,n._)`Array.isArray(${E})`;break;case"object":w=(0,n._)`${E} && typeof ${E} == "object" && !Array.isArray(${E})`;break;case"integer":w=A((0,n._)`!(${E} % 1) && !isNaN(${E})`);break;case"number":w=A();break;default:return(0,n._)`typeof ${E} ${T} ${S}`}return v===i.Correct?w:(0,n.not)(w);function A(I=n.nil){return(0,n.and)((0,n._)`typeof ${E} == "number"`,I,y?(0,n._)`isFinite(${E})`:n.nil)}}Ci.checkDataType=m;function f(S,E,y,v){if(S.length===1)return m(S[0],E,y,v);let T;const w=(0,a.toHash)(S);if(w.array&&w.object){const A=(0,n._)`typeof ${E} != "object"`;T=w.null?A:(0,n._)`!${E} || ${A}`,delete w.null,delete w.array,delete w.object}else T=n.nil;w.number&&delete w.integer;for(const A in w)T=(0,n.and)(T,m(A,E,y,v));return T}Ci.checkDataTypes=f;const g={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:E})=>typeof S=="string"?(0,n._)`{type: ${S}}`:(0,n._)`{type: ${E}}`};function b(S){const E=_(S);(0,r.reportError)(E,g)}Ci.reportTypeError=b;function _(S){const{gen:E,data:y,schema:v}=S,T=(0,a.schemaRefOrVal)(S,v,"type");return{gen:E,keyword:"type",data:y,schema:v.type,schemaCode:T,schemaValue:T,parentSchema:v,params:{},it:S}}return Ci}var Rm={},J4;function Yge(){if(J4)return Rm;J4=1,Object.defineProperty(Rm,"__esModule",{value:!0}),Rm.assignDefaults=void 0;const t=Rn(),e=zn();function r(a,i){const{properties:s,items:o}=a.schema;if(i==="object"&&s)for(const l in s)n(a,l,s[l].default);else i==="array"&&Array.isArray(o)&&o.forEach((l,c)=>n(a,c,l.default))}Rm.assignDefaults=r;function n(a,i,s){const{gen:o,compositeRule:l,data:c,opts:u}=a;if(s===void 0)return;const d=(0,t._)`${c}${(0,t.getProperty)(i)}`;if(l){(0,e.checkStrictMode)(a,`default is ignored for: ${d}`);return}let h=(0,t._)`${d} === undefined`;u.useDefaults==="empty"&&(h=(0,t._)`${h} || ${d} === null || ${d} === ""`),o.if(h,(0,t._)`${d} = ${(0,t.stringify)(s)}`)}return Rm}var Vo={},Wn={},eP;function hl(){if(eP)return Wn;eP=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.validateUnion=Wn.validateArray=Wn.usePattern=Wn.callValidateCode=Wn.schemaProperties=Wn.allSchemaProperties=Wn.noPropertyInData=Wn.propertyInData=Wn.isOwnProperty=Wn.hasPropFunc=Wn.reportMissingProp=Wn.checkMissingProp=Wn.checkReportMissingProp=void 0;const t=Rn(),e=zn(),r=nd(),n=zn();function a(S,E){const{gen:y,data:v,it:T}=S;y.if(u(y,v,E,T.opts.ownProperties),()=>{S.setParams({missingProperty:(0,t._)`${E}`},!0),S.error()})}Wn.checkReportMissingProp=a;function i({gen:S,data:E,it:{opts:y}},v,T){return(0,t.or)(...v.map(w=>(0,t.and)(u(S,E,w,y.ownProperties),(0,t._)`${T} = ${w}`)))}Wn.checkMissingProp=i;function s(S,E){S.setParams({missingProperty:E},!0),S.error()}Wn.reportMissingProp=s;function o(S){return S.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}Wn.hasPropFunc=o;function l(S,E,y){return(0,t._)`${o(S)}.call(${E}, ${y})`}Wn.isOwnProperty=l;function c(S,E,y,v){const T=(0,t._)`${E}${(0,t.getProperty)(y)} !== undefined`;return v?(0,t._)`${T} && ${l(S,E,y)}`:T}Wn.propertyInData=c;function u(S,E,y,v){const T=(0,t._)`${E}${(0,t.getProperty)(y)} === undefined`;return v?(0,t.or)(T,(0,t.not)(l(S,E,y))):T}Wn.noPropertyInData=u;function d(S){return S?Object.keys(S).filter(E=>E!=="__proto__"):[]}Wn.allSchemaProperties=d;function h(S,E){return d(E).filter(y=>!(0,e.alwaysValidSchema)(S,E[y]))}Wn.schemaProperties=h;function m({schemaCode:S,data:E,it:{gen:y,topSchemaRef:v,schemaPath:T,errorPath:w},it:A},I,x,D){const $=D?(0,t._)`${S}, ${E}, ${v}${T}`:E,H=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,w)],[r.default.parentData,A.parentData],[r.default.parentDataProperty,A.parentDataProperty],[r.default.rootData,r.default.rootData]];A.opts.dynamicRef&&H.push([r.de
missingProperty: ${d},
depsCount: ${c},
deps: ${u}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(l){const[c,u]=i(l);s(l,c),o(l,u)}};function i({schema:l}){const c={},u={};for(const d in l){if(d==="__proto__")continue;const h=Array.isArray(l[d])?c:u;h[d]=l[d]}return[c,u]}function s(l,c=l.schema){const{gen:u,data:d,it:h}=l;if(Object.keys(c).length===0)return;const m=u.let("missing");for(const f in c){const g=c[f];if(g.length===0)continue;const b=(0,n.propertyInData)(u,d,f,h.opts.ownProperties);l.setParams({property:f,depsCount:g.length,deps:g.join(", ")}),h.allErrors?u.if(b,()=>{for(const _ of g)(0,n.checkReportMissingProp)(l,_)}):(u.if((0,e._)`${b} && (${(0,n.checkMissingProp)(l,g,m)})`),(0,n.reportMissingProp)(l,m),u.else())}}t.validatePropertyDeps=s;function o(l,c=l.schema){const{gen:u,data:d,keyword:h,it:m}=l,f=u.name("valid");for(const g in c)(0,r.alwaysValidSchema)(m,c[g])||(u.if((0,n.propertyInData)(u,d,g,m.opts.ownProperties),()=>{const b=l.subschema({keyword:h,schemaProp:g},f);l.mergeValidEvaluated(b,f)},()=>u.var(f,!0)),l.ok(f))}t.validateSchemaDeps=o,t.default=a}(Sw)),Sw}var Y_={},FP;function C_e(){if(FP)return Y_;FP=1,Object.defineProperty(Y_,"__esModule",{value:!0});const t=Rn(),e=zn(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:a})=>(0,t._)`{propertyName: ${a.propertyName}}`},code(a){const{gen:i,schema:s,data:o,it:l}=a;if((0,e.alwaysValidSchema)(l,s))return;const c=i.name("valid");i.forIn("key",o,u=>{a.setParams({propertyName:u}),a.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},c),i.if((0,t.not)(c),()=>{a.error(!0),l.allErrors||i.break()})}),a.ok(c)}};return Y_.default=n,Y_}var V_={},BP;function Vq(){if(BP)return V_;BP=1,Object.defineProperty(V_,"__esModule",{value:!0});const t=hl(),e=Rn(),r=nd(),n=zn(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,e._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:o,schema:l,parentSchema:c,data:u,errsCount:d,it:h}=s;if(!d)throw new Error("ajv implementation error");const{allErrors:m,opts:f}=h;if(h.props=!0,f.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(h,l))return;const g=(0,t.allSchemaProperties)(c.properties),b=(0,t.allSchemaProperties)(c.patternProperties);_(),s.ok((0,e._)`${d} === ${r.default.errors}`);function _(){o.forIn("key",u,T=>{!g.length&&!b.length?y(T):o.if(S(T),()=>y(T))})}function S(T){let w;if(g.length>8){const A=(0,n.schemaRefOrVal)(h,c.properties,"properties");w=(0,t.isOwnProperty)(o,A,T)}else g.length?w=(0,e.or)(...g.map(A=>(0,e._)`${T} === ${A}`)):w=e.nil;return b.length&&(w=(0,e.or)(w,...b.map(A=>(0,e._)`${(0,t.usePattern)(s,A)}.test(${T})`))),(0,e.not)(w)}function E(T){o.code((0,e._)`delete ${u}[${T}]`)}function y(T){if(f.removeAdditional==="all"||f.removeAdditional&&l===!1){E(T);return}if(l===!1){s.setParams({additionalProperty:T}),s.error(),m||o.break();return}if(typeof l=="object"&&!(0,n.alwaysValidSchema)(h,l)){const w=o.name("valid");f.removeAdditional==="failing"?(v(T,w,!1),o.if((0,e.not)(w),()=>{s.reset(),E(T)})):(v(T,w),m||o.if((0,e.not)(w),()=>o.break()))}}function v(T,w,A){const I={keyword:"additionalProperties",dataProp:T,dataPropType:n.Type.Str};A===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(I,w)}}};return V_.default=i,V_}var W_={},UP;function w_e(){if(UP)return W_;UP=1,Object.defineProperty(W_,"__esModule",{value:!0});const t=nE(),e=hl(),r=zn(),n=Vq(),a={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:s,schema:o,parentSchema:l,data:c,it:u}=i;u.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(u,n.default,"additionalProperties"));const d=(0,e.allSchemaProperties)(o);for(const b of d)u.definedProperties.add(b);u.opts.unevaluated&&d.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(s,(0,r.toHash)(d),u.props));const h=d.fil
`:""},this._extScope=O,this._scope=new r.Scope({parent:O}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(O){return this._scope.name(O)}scopeName(O){return this._extScope.name(O)}scopeValue(O,U){const X=this._extScope.value(O,U);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}getScopeValue(O,U){return this._extScope.getValue(O,U)}scopeRefs(O){return this._extScope.scopeRefs(O,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(O,U,X,ne){const ue=this._scope.toName(U);return X!==void 0&&ne&&(this._constants[ue.str]=X),this._leafNode(new s(O,ue,X)),ue}const(O,U,X){return this._def(r.varKinds.const,O,U,X)}let(O,U,X){return this._def(r.varKinds.let,O,U,X)}var(O,U,X){return this._def(r.varKinds.var,O,U,X)}assign(O,U,X){return this._leafNode(new o(O,U,X))}add(O,U){return this._leafNode(new l(O,t.operators.ADD,U))}code(O){return typeof O=="function"?O():O!==e.nil&&this._leafNode(new h(O)),this}object(...O){const U=["{"];for(const[X,ne]of O)U.length>1&&U.push(","),U.push(X),(X!==ne||this.opts.es5)&&(U.push(":"),(0,e.addCodeArg)(U,ne));return U.push("}"),new e._Code(U)}if(O,U,X){if(this._blockNode(new _(O)),U&&X)this.code(U).else().code(X).endIf();else if(U)this.code(U).endIf();else if(X)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(O){return this._elseNode(new _(O))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(_,b)}_for(O,U){return this._blockNode(O),U&&this.code(U).endFor(),this}for(O,U){return this._for(new E(O),U)}forRange(O,U,X,ne,ue=this.opts.es5?r.varKinds.var:r.varKinds.let){const he=this._scope.toName(O);return this._for(new y(ue,he,U,X),()=>ne(he))}forOf(O,U,X,ne=r.varKinds.const){const ue=this._scope.toName(O);if(this.opts.es5){const he=U instanceof e.Name?U:this.var("_arr",U);return this.forRange("_i",0,(0,e._)`${he}.length`,be=>{this.var(ue,(0,e._)`${he}[${be}]`),X(ue)})}return this._for(new v("of",ne,ue,U),()=>X(ue))}forIn(O,U,X,ne=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(O,(0,e._)`Object.keys(${U})`,X);const ue=this._scope.toName(O);return this._for(new v("in",ne,ue,U),()=>X(ue))}endFor(){return this._endBlockNode(S)}label(O){return this._leafNode(new c(O))}break(O){return this._leafNode(new u(O))}return(O){const U=new w;if(this._blockNode(U),this.code(O),U.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(w)}try(O,U,X){if(!U&&!X)throw new Error('CodeGen: "try" without "catch" and "finally"');const ne=new A;if(this._blockNode(ne),this.code(O),U){const ue=this.name("e");this._currNode=ne.catch=new I(ue),U(ue)}return X&&(this._currNode=ne.finally=new x,this.code(X)),this._endBlockNode(I,x)}throw(O){return this._leafNode(new d(O))}block(O,U){return this._blockStarts.push(this._nodes.length),O&&this.code(O).endBlock(U),this}endBlock(O){const U=this._blockStarts.pop();if(U===void 0)throw new Error("CodeGen: not in self-balancing block");const X=this._nodes.length-U;if(X<0||O!==void 0&&X!==O)throw new Error(`CodeGen: wrong number of nodes: ${X} vs ${O} expected`);return this._nodes.length=U,this}func(O,U=e.nil,X,ne){return this._blockNode(new T(O,U,X)),ne&&this.code(ne).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(O=1){for(;O-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(O){return this._currNode.nodes.push(O),this}_blockNode(O){this._currNode.nodes.push(O),this._nodes.push(O)}_endBlockNode(O,U){const X=this._currNode;if(X instanceof O||U&&X instanceof U)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${U?`${O.kind}/${U.kind}`:O.kind}"`)}_elseNode(O){const U=this._currNode;if(!(U instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=U.else=O,this}get _root(){return this._nodes[0]}get _currNode(){const O=this._nodes;return O[O.length-1]}set _currNode(O){const U=this._nodes;U[U.length-1]=O}}t.CodeGen=D;function $(N,O){for(const U in O)N[U]=(N[U]||0)+(O[U]||0);return N
|| (${A} == "string" && ${T} && ${T} == +${T})`).assign(I,(0,n._)`+${T}`);return;case"integer":v.elseIf((0,n._)`${A} === "boolean" || ${T} === null
|| (${A} === "string" && ${T} && ${T} == +${T} && !(${T} % 1))`).assign(I,(0,n._)`+${T}`);return;case"boolean":v.elseIf((0,n._)`${T} === "false" || ${T} === 0 || ${T} === null`).assign(I,!1).elseIf((0,n._)`${T} === "true" || ${T} === 1`).assign(I,!0);return;case"null":v.elseIf((0,n._)`${T} === "" || ${T} === 0 || ${T} === false`),v.assign(I,null);return;case"array":v.elseIf((0,n._)`${A} === "string" || ${A} === "number"
|| ${A} === "boolean" || ${T} === null`).assign(I,(0,n._)`[${T}]`)}}}function h({gen:S,parentData:E,parentDataProperty:y},v){S.if((0,n._)`${E} !== undefined`,()=>S.assign((0,n._)`${E}[${y}]`,v))}function m(S,E,y,v=i.Correct){const T=v===i.Correct?n.operators.EQ:n.operators.NEQ;let w;switch(S){case"null":return(0,n._)`${E} ${T} null`;case"array":w=(0,n._)`Array.isArray(${E})`;break;case"object":w=(0,n._)`${E} && typeof ${E} == "object" && !Array.isArray(${E})`;break;case"integer":w=A((0,n._)`!(${E} % 1) && !isNaN(${E})`);break;case"number":w=A();break;default:return(0,n._)`typeof ${E} ${T} ${S}`}return v===i.Correct?w:(0,n.not)(w);function A(I=n.nil){return(0,n.and)((0,n._)`typeof ${E} == "number"`,I,y?(0,n._)`isFinite(${E})`:n.nil)}}wi.checkDataType=m;function f(S,E,y,v){if(S.length===1)return m(S[0],E,y,v);let T;const w=(0,a.toHash)(S);if(w.array&&w.object){const A=(0,n._)`typeof ${E} != "object"`;T=w.null?A:(0,n._)`!${E} || ${A}`,delete w.null,delete w.array,delete w.object}else T=n.nil;w.number&&delete w.integer;for(const A in w)T=(0,n.and)(T,m(A,E,y,v));return T}wi.checkDataTypes=f;const g={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:E})=>typeof S=="string"?(0,n._)`{type: ${S}}`:(0,n._)`{type: ${E}}`};function b(S){const E=_(S);(0,r.reportError)(E,g)}wi.reportTypeError=b;function _(S){const{gen:E,data:y,schema:v}=S,T=(0,a.schemaRefOrVal)(S,v,"type");return{gen:E,keyword:"type",data:y,schema:v.type,schemaCode:T,schemaValue:T,parentSchema:v,params:{},it:S}}return wi}var Im={},p6;function Z_e(){if(p6)return Im;p6=1,Object.defineProperty(Im,"__esModule",{value:!0}),Im.assignDefaults=void 0;const t=mn(),e=$n();function r(a,i){const{properties:s,items:o}=a.schema;if(i==="object"&&s)for(const l in s)n(a,l,s[l].default);else i==="array"&&Array.isArray(o)&&o.forEach((l,c)=>n(a,c,l.default))}Im.assignDefaults=r;function n(a,i,s){const{gen:o,compositeRule:l,data:c,opts:u}=a;if(s===void 0)return;const d=(0,t._)`${c}${(0,t.getProperty)(i)}`;if(l){(0,e.checkStrictMode)(a,`default is ignored for: ${d}`);return}let h=(0,t._)`${d} === undefined`;u.useDefaults==="empty"&&(h=(0,t._)`${h} || ${d} === null || ${d} === ""`),o.if(h,(0,t._)`${d} = ${(0,t.stringify)(s)}`)}return Im}var Wo={},Kn={},m6;function pl(){if(m6)return Kn;m6=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.validateUnion=Kn.validateArray=Kn.usePattern=Kn.callValidateCode=Kn.schemaProperties=Kn.allSchemaProperties=Kn.noPropertyInData=Kn.propertyInData=Kn.isOwnProperty=Kn.hasPropFunc=Kn.reportMissingProp=Kn.checkMissingProp=Kn.checkReportMissingProp=void 0;const t=mn(),e=$n(),r=ad(),n=$n();function a(S,E){const{gen:y,data:v,it:T}=S;y.if(u(y,v,E,T.opts.ownProperties),()=>{S.setParams({missingProperty:(0,t._)`${E}`},!0),S.error()})}Kn.checkReportMissingProp=a;function i({gen:S,data:E,it:{opts:y}},v,T){return(0,t.or)(...v.map(w=>(0,t.and)(u(S,E,w,y.ownProperties),(0,t._)`${T} = ${w}`)))}Kn.checkMissingProp=i;function s(S,E){S.setParams({missingProperty:E},!0),S.error()}Kn.reportMissingProp=s;function o(S){return S.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}Kn.hasPropFunc=o;function l(S,E,y){return(0,t._)`${o(S)}.call(${E}, ${y})`}Kn.isOwnProperty=l;function c(S,E,y,v){const T=(0,t._)`${E}${(0,t.getProperty)(y)} !== undefined`;return v?(0,t._)`${T} && ${l(S,E,y)}`:T}Kn.propertyInData=c;function u(S,E,y,v){const T=(0,t._)`${E}${(0,t.getProperty)(y)} === undefined`;return v?(0,t.or)(T,(0,t.not)(l(S,E,y))):T}Kn.noPropertyInData=u;function d(S){return S?Object.keys(S).filter(E=>E!=="__proto__"):[]}Kn.allSchemaProperties=d;function h(S,E){return d(E).filter(y=>!(0,e.alwaysValidSchema)(S,E[y]))}Kn.schemaProperties=h;function m({schemaCode:S,data:E,it:{gen:y,topSchemaRef:v,schemaPath:T,errorPath:w},it:A},I,x,D){const $=D?(0,t._)`${S}, ${E}, ${v}${T}`:E,H=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,w)],[r.default.parentData,A.parentData],[r.default.parentDataProperty,A.parentDataProperty],[r.default.rootData,r.default.rootData]];A.opts.dynamicRef&&H.push([r.de
missingProperty: ${d},
depsCount: ${c},
deps: ${u}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(l){const[c,u]=i(l);s(l,c),o(l,u)}};function i({schema:l}){const c={},u={};for(const d in l){if(d==="__proto__")continue;const h=Array.isArray(l[d])?c:u;h[d]=l[d]}return[c,u]}function s(l,c=l.schema){const{gen:u,data:d,it:h}=l;if(Object.keys(c).length===0)return;const m=u.let("missing");for(const f in c){const g=c[f];if(g.length===0)continue;const b=(0,n.propertyInData)(u,d,f,h.opts.ownProperties);l.setParams({property:f,depsCount:g.length,deps:g.join(", ")}),h.allErrors?u.if(b,()=>{for(const _ of g)(0,n.checkReportMissingProp)(l,_)}):(u.if((0,e._)`${b} && (${(0,n.checkMissingProp)(l,g,m)})`),(0,n.reportMissingProp)(l,m),u.else())}}t.validatePropertyDeps=s;function o(l,c=l.schema){const{gen:u,data:d,keyword:h,it:m}=l,f=u.name("valid");for(const g in c)(0,r.alwaysValidSchema)(m,c[g])||(u.if((0,n.propertyInData)(u,d,g,m.opts.ownProperties),()=>{const b=l.subschema({keyword:h,schemaProp:g},f);l.mergeValidEvaluated(b,f)},()=>u.var(f,!0)),l.ok(f))}t.validateSchemaDeps=o,t.default=a}(Ow)),Ow}var I0={},W6;function I0e(){if(W6)return I0;W6=1,Object.defineProperty(I0,"__esModule",{value:!0});const t=mn(),e=$n(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:a})=>(0,t._)`{propertyName: ${a.propertyName}}`},code(a){const{gen:i,schema:s,data:o,it:l}=a;if((0,e.alwaysValidSchema)(l,s))return;const c=i.name("valid");i.forIn("key",o,u=>{a.setParams({propertyName:u}),a.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},c),i.if((0,t.not)(c),()=>{a.error(!0),l.allErrors||i.break()})}),a.ok(c)}};return I0.default=n,I0}var x0={},K6;function Xq(){if(K6)return x0;K6=1,Object.defineProperty(x0,"__esModule",{value:!0});const t=pl(),e=mn(),r=ad(),n=$n(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,e._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:o,schema:l,parentSchema:c,data:u,errsCount:d,it:h}=s;if(!d)throw new Error("ajv implementation error");const{allErrors:m,opts:f}=h;if(h.props=!0,f.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(h,l))return;const g=(0,t.allSchemaProperties)(c.properties),b=(0,t.allSchemaProperties)(c.patternProperties);_(),s.ok((0,e._)`${d} === ${r.default.errors}`);function _(){o.forIn("key",u,T=>{!g.length&&!b.length?y(T):o.if(S(T),()=>y(T))})}function S(T){let w;if(g.length>8){const A=(0,n.schemaRefOrVal)(h,c.properties,"properties");w=(0,t.isOwnProperty)(o,A,T)}else g.length?w=(0,e.or)(...g.map(A=>(0,e._)`${T} === ${A}`)):w=e.nil;return b.length&&(w=(0,e.or)(w,...b.map(A=>(0,e._)`${(0,t.usePattern)(s,A)}.test(${T})`))),(0,e.not)(w)}function E(T){o.code((0,e._)`delete ${u}[${T}]`)}function y(T){if(f.removeAdditional==="all"||f.removeAdditional&&l===!1){E(T);return}if(l===!1){s.setParams({additionalProperty:T}),s.error(),m||o.break();return}if(typeof l=="object"&&!(0,n.alwaysValidSchema)(h,l)){const w=o.name("valid");f.removeAdditional==="failing"?(v(T,w,!1),o.if((0,e.not)(w),()=>{s.reset(),E(T)})):(v(T,w),m||o.if((0,e.not)(w),()=>o.break()))}}function v(T,w,A){const I={keyword:"additionalProperties",dataProp:T,dataPropType:n.Type.Str};A===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(I,w)}}};return x0.default=i,x0}var D0={},j6;function x0e(){if(j6)return D0;j6=1,Object.defineProperty(D0,"__esModule",{value:!0});const t=oE(),e=pl(),r=$n(),n=Xq(),a={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:s,schema:o,parentSchema:l,data:c,it:u}=i;u.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(u,n.default,"additionalProperties"));const d=(0,e.allSchemaProperties)(o);for(const b of d)u.definedProperties.add(b);u.opts.unevaluated&&d.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(s,(0,r.toHash)(d),u.props));const h=d.fil
`;break;case"id":o=b.includes("\0")?void 0:b;break;case"retry":/^\d+$/.test(b)?n(parseInt(b,10)):r(new f7(`Invalid \`retry\` value: "${b}"`,{type:"invalid-retry",value:b,line:_}));break;default:r(new f7(`Unknown field "${g.length>20?`${g.slice(0,20)}…`:g}"`,{type:"unknown-field",field:g,value:b,line:_}));break}}function m(){l.length>0&&e({id:o,event:c||void 0,data:l.endsWith(`
`)?l.slice(0,-1):l}),o=void 0,l="",c=""}function f(g={}){i&&g.consume&&d(i),s=!0,o=void 0,l="",c="",i=""}return{feed:u,reset:f}}function V1e(t){const e=[];let r="",n=0;for(;n<t.length;){const a=t.indexOf("\r",n),i=t.indexOf(`
`,n);let s=-1;if(a!==-1&&i!==-1?s=Math.min(a,i):a!==-1?a===t.length-1?s=-1:s=a:i!==-1&&(s=i),s===-1){r=t.slice(n);break}else{const o=t.slice(n,s);e.push(o),n=s+1,t[n-1]==="\r"&&t[n]===`
`&&n++}}return[e,r]}class W1e extends TransformStream{constructor({onError:e,onRetry:r,onComment:n}={}){let a;super({start(i){a=rz({onEvent:s=>{i.enqueue(s)},onError(s){e==="terminate"?i.error(s):typeof e=="function"&&e(s)},onRetry:r,onComment:n})},transform(i){a.feed(i)}})}}const K1e={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class Fd extends Error{constructor(e,r){super(`Streamable HTTP error: ${r}`),this.code=e}}class j1e{constructor(e,r){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=Zq(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??K1e}async _authThenStart(){if(!this._authProvider)throw new Jo("No auth provider");let e;try{e=await Yd(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(e!=="AUTHORIZED")throw new Jo;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const e={};if(this._authProvider){const n=await this._authProvider.tokens();n&&(e.Authorization=`Bearer ${n.access_token}`)}this._sessionId&&(e["mcp-session-id"]=this._sessionId),this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const r=Ab(this._requestInit?.headers);return new Headers({...e,...r})}async _startOrAuthSse(e){const{resumptionToken:r}=e;try{const n=await this._commonHeaders();n.set("Accept","text/event-stream"),r&&n.set("last-event-id",r);const a=await(this._fetch??fetch)(this._url,{method:"GET",headers:n,signal:this._abortController?.signal});if(!a.ok){if(await a.body?.cancel(),a.status===401&&this._authProvider)return await this._authThenStart();if(a.status===405)return;throw new Fd(a.status,`Failed to open SSE stream: ${a.statusText}`)}this._handleSseStream(a.body,e,!0)}catch(n){throw this.onerror?.(n),n}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const r=this._reconnectionOptions.initialReconnectionDelay,n=this._reconnectionOptions.reconnectionDelayGrowFactor,a=this._reconnectionOptions.maxReconnectionDelay;return Math.min(r*Math.pow(n,e),a)}_scheduleReconnection(e,r=0){const n=this._reconnectionOptions.maxRetries;if(r>=n){this.onerror?.(new Error(`Maximum reconnection attempts (${n}) exceeded.`));return}const a=this._getNextReconnectionDelay(r);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(i=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${i instanceof Error?i.message:String(i)}`)),this._scheduleReconnection(e,r+1)})},a)}_handleSseStream(e,r,n){if(!e)return;const{onresumptiontoken:a,replayMessageId:i}=r;let s,o=!1,l=!1;(async()=>{try{const u=e.pipeThrough(new TextDecoderStream).pipeThrough(new W1e({onRetry:m=>{this._serverRetryMs=m}})).getReader();for(;;){const{value:m,done:f}=await u.read();if(f)break;if(m.id&&(s=m.id,o=!0,a?.(m.id)),!!m.data&&(!m.event||m.event==="message"))try{const g=lf.parse(JSON.parse(m.data));jm(g)&&(l=!0,i!==void 0&&(g.id=i)),this.onmessage?.(g)}catch(g){this.onerror?.(g)}}(n||o)&&!l&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:s,onresumptiontoken:a,replayMessageId:i},0)}catch(u){if(this.onerror?.(new Error(`SSE stream disconnected: ${u}`)),(n||o)&&!l&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:s,onresumptiontoken:a,replayMessageId:i},0)}catch(m){this.onerror?.(new Error(`Failed to reconnect: ${m instanceof Error?m.message:String(m)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new Jo("No auth provider");if(await Yd(this._authProvider,{serv
`):""}static formatSingleContent(e){if(e.type===y1.TEXT&&e.text)return e.text;if(e.type===y1.IMAGE&&e.data)return fb(e.mimeType??Pne,e.data);if(e.type===y1.RESOURCE&&e.resource){const r=e.resource;return r.text?r.text:r.blob?r.blob:JSON.stringify(r)}return e.data&&e.mimeType?fb(e.mimeType,e.data):JSON.stringify(e)}static async complete(e,r,n){try{return(await e.client.complete({ref:r,argument:n})).completion}catch(a){return console.error("[MCPService] Failed to get completions:",a),null}}static async listResources(e,r){try{const n=await e.client.listResources(r?{cursor:r}:void 0);return{resources:n.resources??[],nextCursor:n.nextCursor}}catch(n){if(this.isSessionExpiredError(n))throw n;return console.warn(`[MCPService][${e.serverName}] Failed to list resources:`,n),{resources:[]}}}static async listAllResources(e){const r=[];let n;do{const a=await this.listResources(e,n);r.push(...a.resources),n=a.nextCursor}while(n);return r}static async listResourceTemplates(e,r){try{const n=await e.client.listResourceTemplates(r?{cursor:r}:void 0);return{resourceTemplates:n.resourceTemplates??[],nextCursor:n.nextCursor}}catch(n){if(this.isSessionExpiredError(n))throw n;return console.warn(`[MCPService][${e.serverName}] Failed to list resource templates:`,n),{resourceTemplates:[]}}}static async listAllResourceTemplates(e){const r=[];let n;do{const a=await this.listResourceTemplates(e,n);r.push(...a.resourceTemplates),n=a.nextCursor}while(n);return r}static async readResource(e,r){try{const n=await e.client.readResource({uri:r});return{contents:n.contents??[],_meta:n._meta}}catch(n){throw console.error(`[MCPService][${e.serverName}] Failed to read resource:`,n),n}}static async subscribeResource(e,r){try{await e.client.subscribeResource({uri:r}),console.log(`[MCPService][${e.serverName}] Subscribed to resource: ${r}`)}catch(n){throw console.error(`[MCPService][${e.serverName}] Failed to subscribe to resource:`,n),n}}static async unsubscribeResource(e,r){try{await e.client.unsubscribeResource({uri:r}),console.log(`[MCPService][${e.serverName}] Unsubscribed from resource: ${r}`)}catch(n){throw console.error(`[MCPService][${e.serverName}] Failed to unsubscribe from resource:`,n),n}}static supportsResources(e){return e.serverCapabilities?.resources!==void 0}static supportsResourceSubscriptions(e){return!!e.serverCapabilities?.resources?.subscribe}}function rbe(){return`${Jne}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`}class nbe{#e=_e(Tr(new Ii));get _serverResources(){return p(this.#e)}set _serverResources(e){k(this.#e,e,!0)}#t=_e(Tr(new Ii));get _cachedResources(){return p(this.#t)}set _cachedResources(e){k(this.#t,e,!0)}#r=_e(Tr(new Ii));get _subscriptions(){return p(this.#r)}set _subscriptions(e){k(this.#r,e,!0)}#n=_e(Tr([]));get _attachments(){return p(this.#n)}set _attachments(e){k(this.#n,e,!0)}#i=_e(!1);get _isLoading(){return p(this.#i)}set _isLoading(e){k(this.#i,e,!0)}get serverResources(){return this._serverResources}get cachedResources(){return this._cachedResources}get subscriptions(){return this._subscriptions}get attachments(){return this._attachments}get isLoading(){return this._isLoading}get totalResourceCount(){let e=0;for(const r of this._serverResources.values())e+=r.resources.length;return e}get totalTemplateCount(){let e=0;for(const r of this._serverResources.values())e+=r.templates.length;return e}get attachmentCount(){return this._attachments.length}get hasAttachments(){return this._attachments.length>0}setServerResources(e,r,n){this._serverResources.set(e,{serverName:e,resources:r,templates:n,lastFetched:new Date,loading:!1,error:void 0}),console.log(`[MCPResources][${e}] Set ${r.length} resources, ${n.length} templates`)}setServerLoading(e,r){const n=this._serverResources.get(e);n?this._serverResources.set(e,{...n,loading:r}):this._serverResources.set(e,{serverName:e,resources:[],templates:[],loading:r,error:void 0})}setServerError(e,r){const n=this._serverResources.get(e);n?this._serverResources.set(e,{...n,loading:!1,error:r}):this._serverResources.set(e,{serverName:e,resources:[],templates:[],loa
--- Resource: ${n} (from ${a}) ---
${i.text}`):"blob"in i&&i.blob&&e.push(`
--- Resource: ${n} (from ${a}) ---
[${v5}: ${i.mimeType||E5}]`)}return e.join("")}toMessageExtras(){const e=[];for(const r of this._attachments){if(r.error||!r.content||r.content.length===0)continue;const n=r.resource.title||r.resource.name,a=[];for(const i of r.content)"text"in i&&i.text?a.push(i.text):"blob"in i&&i.blob&&a.push(`[${v5}: ${i.mimeType||E5}]`);a.length>0&&e.push({type:Qr.MCP_RESOURCE,name:n,uri:r.resource.uri,serverName:r.resource.serverName,content:a.join(ub),mimeType:r.resource.mimeType})}return e}}const bn=new nbe,az=()=>bn.serverResources,abe=()=>bn.attachments,iz=()=>bn.hasAttachments,ibe=()=>bn.totalResourceCount,sbe=()=>bn.isLoading,sz=typeof window<"u"?window:void 0;function obe(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}let lbe=class{#e;#t;constructor(e={}){const{window:r=sz,document:n=r?.document}=e;r!==void 0&&(this.#e=n,this.#t=Ju(a=>{const i=Kr(r,"focusin",a),s=Kr(r,"focusout",a);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?obe(this.#e):null}};new lbe;function cbe(t,e){switch(t){case"post":It(e);break;case"pre":$i(e);break}}function oz(t,e,r,n={}){const{lazy:a=!1}=n;let i=!a,s=Array.isArray(t)?[]:void 0;cbe(e,()=>{const o=Array.isArray(t)?t.map(c=>c()):t();if(!i){i=!0,s=o;return}const l=Nn(()=>r(o,s));return s=o,l})}function fx(t,e,r){oz(t,"post",e,r)}function ube(t,e,r){oz(t,"pre",e,r)}fx.pre=ube;function dbe(t,e){switch(t){case"local":return e.localStorage;case"session":return e.sessionStorage}}class lz{#e;#t;#r;#n;#i;#a=_e(0);constructor(e,r,n={}){const{storage:a="local",serializer:i={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs:s=!0,window:o=sz}=n;if(this.#e=r,this.#t=e,this.#r=i,o===void 0)return;const l=dbe(a,o);this.#n=l;const c=l.getItem(e);c!==null?this.#e=this.#o(c):this.#l(r),s&&a==="local"&&(this.#i=Ju(()=>Kr(o,"storage",this.#s)))}get current(){this.#i?.(),p(this.#a);const e=this.#o(this.#n?.getItem(this.#t))??this.#e,r=new WeakMap,n=a=>{if(a===null||a?.constructor.name==="Date"||typeof a!="object")return a;let i=r.get(a);return i||(i=new Proxy(a,{get:(s,o)=>(p(this.#a),n(Reflect.get(s,o))),set:(s,o,l)=>(k(this.#a,p(this.#a)+1),Reflect.set(s,o,l),this.#l(e),!0)}),r.set(a,i)),i};return n(e)}set current(e){this.#l(e),k(this.#a,p(this.#a)+1)}#s=e=>{e.key!==this.#t||e.newValue===null||(this.#e=this.#o(e.newValue),k(this.#a,p(this.#a)+1))};#o(e){try{return this.#r.deserialize(e)}catch(r){console.error(`Error when parsing "${e}" from persisted store "${this.#t}"`,r);return}}#l(e){try{e!=null&&this.#n?.setItem(this.#t,this.#r.serialize(e))}catch(r){console.error(`Error when writing value from persisted store "${this.#t}" to ${this.#n}`,r)}}}function S7(t){return t.filter(e=>e.length>0)}const cz={getItem:t=>null,setItem:(t,e)=>{}},Tg=typeof document<"u";function hbe(t){return typeof t=="function"}function pbe(t){return t!==null&&typeof t=="object"}const Lf=Symbol("box"),gx=Symbol("is-writable");function mbe(t){return pbe(t)&&Lf in t}function fbe(t){return Ja.isBox(t)&&gx in t}function Ja(t){let e=_e(Tr(t));return{[Lf]:!0,[gx]:!0,get current(){return p(e)},set current(r){k(e,r,!0)}}}function gbe(t,e){const r=F(t);return e?{[Lf]:!0,[gx]:!0,get current(){return p(r)},set current(n){e(n)}}:{[Lf]:!0,get current(){return t()}}}function _be(t){return Ja.isBox(t)?t:hbe(t)?Ja.with(t):Ja(t)}function bbe(t){return Object.entries(t).reduce((e,[r,n])=>Ja.isBox(n)?(Ja.isWritableBox(n)?Object.defineProperty(e,r,{get(){return n.current},set(a){n.current=a}}):Object.defineProperty(e,r,{get(){return n.current}}),e):Object.assign(e,{[r]:n}),{})}function Sbe(t){return Ja.isWritableBox(t)?{[Lf]:!0,get current(){return t.current}}:t}Ja.from=_be;Ja.with=gbe;Ja.flatten=bbe;Ja.readonly=Sbe;Ja.isBox=mbe;Ja.isWritableBox=fbe;function Ebe(t,e){const r=RegExp(t,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,e):n}}const vbe=Ebe(/[A-Z]/,t=>`-${t.toLowerCase()}`);function ybe(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an ar
`)}function Tbe(t={}){return ybe(t).replace(`
`," ")}const Cbe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};Tbe(Cbe);const wbe=typeof window<"u"?window:void 0;function Abe(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class Rbe{#e;#t;constructor(e={}){const{window:r=wbe,document:n=r?.document}=e;r!==void 0&&(this.#e=n,this.#t=Ju(a=>{const i=Kr(r,"focusin",a),s=Kr(r,"focusout",a);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?Abe(this.#e):null}}new Rbe;const Vd=Ja("mode-watcher-mode"),Wd=Ja("mode-watcher-theme"),Obe=["dark","light","system"];function jR(t){return typeof t!="string"?!1:Obe.includes(t)}class Nbe{#e="system";#t=Tg?localStorage:cz;#r=this.#t.getItem(Vd.current);#n=jR(this.#r)?this.#r:this.#e;#i=_e(Tr(this.#a()));#a(e=this.#n){return new lz(Vd.current,e,{serializer:{serialize:r=>r,deserialize:r=>jR(r)?r:this.#e}})}constructor(){Xf(()=>fx.pre(()=>Vd.current,(e,r)=>{const n=p(this.#i).current;k(this.#i,this.#a(n),!0),r&&localStorage.removeItem(r)}))}get current(){return p(this.#i).current}set current(e){p(this.#i).current=e}}class Ibe{#e=void 0;#t=!0;#r=_e(Tr(this.#e));#n=typeof window<"u"&&typeof window.matchMedia=="function"?new FB("prefers-color-scheme: light"):{current:!1};query(){Tg&&k(this.#r,this.#n.current?"light":"dark",!0)}tracking(e){this.#t=e}constructor(){Xf(()=>{$i(()=>{this.#t&&this.query()})}),this.query=this.query.bind(this),this.tracking=this.tracking.bind(this)}get current(){return p(this.#r)}}const QR=new Nbe,XR=new Ibe;class xbe{#e=Tg?localStorage:cz;#t=this.#e.getItem(Wd.current);#r=this.#t===null||this.#t===void 0?"":this.#t;#n=_e(Tr(this.#i()));#i(e=this.#r){return new lz(Wd.current,e,{serializer:{serialize:r=>typeof r!="string"?"":r,deserialize:r=>r}})}constructor(){Xf(()=>fx.pre(()=>Wd.current,(e,r)=>{const n=p(this.#n).current;k(this.#n,this.#i(n),!0),r&&localStorage.removeItem(r)}))}get current(){return p(this.#n).current}set current(e){p(this.#n).current=e}}const O1=new xbe;let E7,v7,y7=!1,Dm=null;function Dbe(){return Dm||(Dm=document.createElement("style"),Dm.appendChild(document.createTextNode(`* {
-webkit-transition: none !important;
-moz-transition: none !important;
-o-transition: none !important;
-ms-transition: none !important;
transition: none !important;
}`)),Dm)}function uz(t,e=!1){if(typeof document>"u")return;if(!y7){y7=!0,t();return}if(typeof window<"u"&&window.__vitest_worker__){t();return}clearTimeout(E7),clearTimeout(v7);const n=Dbe(),a=()=>document.head.appendChild(n),i=()=>{n.parentNode&&document.head.removeChild(n)};function s(){t(),window.requestAnimationFrame(i)}if(typeof window.requestAnimationFrame<"u"){a(),e?s():window.requestAnimationFrame(()=>{s()});return}a(),E7=window.setTimeout(()=>{t(),v7=window.setTimeout(i,16)},16)}const Nu=Ja(void 0),Mb=Ja(!0),kb=Ja(!1),ZR=Ja([]),JR=Ja([]);function Mbe(){const t=F(()=>{if(!Tg)return;const e=QR.current==="system"?XR.current:QR.current,r=S7(ZR.current),n=S7(JR.current);function a(){const i=document.documentElement,s=document.querySelector('meta[name="theme-color"]');e==="light"?(r.length&&i.classList.remove(...r),n.length&&i.classList.add(...n),i.style.colorScheme="light",s&&Nu.current&&s.setAttribute("content",Nu.current.light)):(n.length&&i.classList.remove(...n),r.length&&i.classList.add(...r),i.style.colorScheme="dark",s&&Nu.current&&s.setAttribute("content",Nu.current.dark))}return Mb.current?uz(a,kb.current):a(),e});return{get current(){return p(t)}}}function kbe(){const t=F(()=>{if(O1.current,!Tg)return;function e(){document.documentElement.setAttribute("data-theme",O1.current)}return Mb.current?uz(e,Nn(()=>kb.current)):e(),O1.current});return{get current(){return p(t)}}}const cE=Mbe(),Pbe=kbe();function e2(t){QR.current=t}function Lbe(t){O1.current=t}function Fbe({defaultMode:t="system",themeColors:e,darkClassNames:r=["dark"],lightClassNames:n=[],defaultTheme:a="",modeStorageKey:i="mode-watcher-mode",themeStorageKey:s="mode-watcher-theme"}){const o=document.documentElement,l=localStorage.getItem(i)??t,c=localStorage.getItem(s)??a,u=l==="light"||l==="system"&&window.matchMedia("(prefers-color-scheme: light)").matches;if(u?(r.length&&o.classList.remove(...r.filter(Boolean)),n.length&&o.classList.add(...n.filter(Boolean))):(n.length&&o.classList.remove(...n.filter(Boolean)),r.length&&o.classList.add(...r.filter(Boolean))),o.style.colorScheme=u?"light":"dark",e){const d=document.querySelector('meta[name="theme-color"]');d&&d.setAttribute("content",l==="light"?e.light:e.dark)}c&&(o.setAttribute("data-theme",c),localStorage.setItem(s,c)),localStorage.setItem(i,l)}var Bbe=q('<meta name="theme-color"/>');function Ube(t,e){ye(e,!0);var r=se(),n=L(r);{var a=i=>{var s=Bbe();we(()=>rr(s,"content",e.themeColors.dark)),C(i,s)};le(n,i=>{e.themeColors&&i(a)})}C(t,r),Te()}var Gbe=q('<meta name="theme-color"/>'),qbe=q("<!> <!>",1);function zbe(t,e){ye(e,!0);let r=V(e,"trueNonce",3,"");dS("1funsus",n=>{var a=qbe(),i=L(a);{var s=l=>{var c=Gbe();we(()=>rr(c,"content",e.themeColors.dark)),C(l,c)};le(i,l=>{e.themeColors&&l(s)})}var o=te(i,2);op(o,()=>`<script${r()?` nonce=${r()}`:""}>(`+Fbe.toString()+")("+JSON.stringify(e.initConfig)+");<\/script>"),C(n,a)}),Te()}function $be(t,e){ye(e,!0);let r=V(e,"track",3,!0),n=V(e,"defaultMode",3,"system"),a=V(e,"disableTransitions",3,!0),i=V(e,"darkClassNames",19,()=>["dark"]),s=V(e,"lightClassNames",19,()=>[]),o=V(e,"defaultTheme",3,""),l=V(e,"nonce",3,""),c=V(e,"themeStorageKey",3,"mode-watcher-theme"),u=V(e,"modeStorageKey",3,"mode-watcher-mode"),d=V(e,"disableHeadScriptInjection",3,!1),h=V(e,"synchronousModeChanges",3,!1);Vd.current=u(),Wd.current=c(),ZR.current=i(),JR.current=s(),Mb.current=a(),Nu.current=e.themeColors,kb.current=h(),$i(()=>{kb.current=h()}),$i(()=>{Mb.current=a()}),$i(()=>{Nu.current=e.themeColors}),$i(()=>{ZR.current=i()}),$i(()=>{JR.current=s()}),$i(()=>{Vd.current=u()}),$i(()=>{Wd.current=c()}),$i(()=>{cE.current,Vd.current,Wd.current,Pbe.current}),vi(()=>{XR.tracking(r()),XR.query();const E=localStorage.getItem(Vd.current);e2(jR(E)?E:n());const y=localStorage.getItem(Wd.current);Lbe(y||o())});const m={defaultMode:n(),themeColors:e.themeColors,darkClassNames:i(),lightClassNames:s(),defaultTheme:o(),modeStorageKey:u(),themeStorageKey:c()},f=F(()=>typeof window>"u"?l():"");var g=se(),b=L(g);{var _=E=>{Ube(E,{get themeColors(){return Nu.current}})},S=E=>{zbe(E,{get
`);return e.join("")}}function Zm(t,e){const r=e?URL.parse(t,e):URL.parse(t);return r?.protocol==="http:"||r?.protocol==="https:"}function Fo(t){t.preventDefault()}function Qa(t){t.preventDefault(),t.stopPropagation()}function SSe(t){console.log("Deprecated API usage: "+t)}class o2{static#e;static toDateObject(e){if(e instanceof Date)return e;if(!e||typeof e!="string")return null;this.#e||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const r=this.#e.exec(e);if(!r)return null;const n=parseInt(r[1],10);let a=parseInt(r[2],10);a=a>=1&&a<=12?a-1:0;let i=parseInt(r[3],10);i=i>=1&&i<=31?i:1;let s=parseInt(r[4],10);s=s>=0&&s<=23?s:0;let o=parseInt(r[5],10);o=o>=0&&o<=59?o:0;let l=parseInt(r[6],10);l=l>=0&&l<=59?l:0;const c=r[7]||"Z";let u=parseInt(r[8],10);u=u>=0&&u<=23?u:0;let d=parseInt(r[9],10)||0;return d=d>=0&&d<=59?d:0,c==="-"?(s+=u,o+=d):c==="+"&&(s-=u,o-=d),new Date(Date.UTC(n,a,i,s,o,l))}}function ESe(t,{scale:e=1,rotation:r=0}){const{width:n,height:a}=t.attributes.style,i=[0,0,parseInt(n),parseInt(a)];return new Ag({viewBox:i,userUnit:1,scale:e,rotation:r})}function mE(t){if(t.startsWith("#")){const e=parseInt(t.slice(1),16);return[(e&16711680)>>16,(e&65280)>>8,e&255]}return t.startsWith("rgb(")?t.slice(4,-1).split(",").map(e=>parseInt(e)):t.startsWith("rgba(")?t.slice(5,-1).split(",").map(e=>parseInt(e)).slice(0,3):(en(`Not a valid color format: "${t}"`),[0,0,0])}function vSe(t){const e=document.createElement("span");e.style.visibility="hidden",e.style.colorScheme="only light",document.body.append(e);for(const r of t.keys()){e.style.color=r;const n=window.getComputedStyle(e).color;t.set(r,mE(n))}e.remove()}function wa(t){const{a:e,b:r,c:n,d:a,e:i,f:s}=t.getTransform();return[e,r,n,a,i,s]}function yl(t){const{a:e,b:r,c:n,d:a,e:i,f:s}=t.getTransform().invertSelf();return[e,r,n,a,i,s]}function ih(t,e,r=!1,n=!0){if(e instanceof Ag){const{pageWidth:a,pageHeight:i}=e.rawDims,{style:s}=t,o=ki.isCSSRoundSupported,l=`var(--total-scale-factor) * ${a}px`,c=`var(--total-scale-factor) * ${i}px`,u=o?`round(down, ${l}, var(--scale-round-x))`:`calc(${l})`,d=o?`round(down, ${c}, var(--scale-round-y))`:`calc(${c})`;!r||e.rotation%180===0?(s.width=u,s.height=d):(s.width=d,s.height=u)}n&&t.setAttribute("data-main-rotation",e.rotation)}class Wl{constructor(){const{pixelRatio:e}=Wl;this.sx=e,this.sy=e}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(e,r,n,a,i=-1){let s=1/0,o=1/0,l=1/0;n=Wl.capPixels(n,i),n>0&&(s=Math.sqrt(n/(e*r))),a!==-1&&(o=a/e,l=a/r);const c=Math.min(s,o,l);return this.sx>c||this.sy>c?(this.sx=c,this.sy=c,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(e,r){if(r>=0){const n=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+r/100));return e>0?Math.min(e,n):n}return e}}const l2=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class df{#e=null;#t=null;#r;#n=null;#i=null;#a=null;#s=null;static#o=null;constructor(e){this.#r=e,df.#o||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"})}render(){const e=this.#e=document.createElement("div");e.classList.add("editToolbar","hidden"),e.setAttribute("role","toolbar");const r=this.#r._uiManager._signal;e.addEventListener("contextmenu",Fo,{signal:r}),e.addEventListener("pointerdown",df.#l,{signal:r});const n=this.#n=document.createElement("div");n.className="buttons",e.append(n);const a=this.#r.toolbarPosition;if(a){const{style:i}=e,s=this.#r._uiManager.direction==="ltr"?1-a[0]:a[0];i.insetInlineEnd=`${100*s}%`,i.top=`calc(${100*a[1]}% + var(--editor-toolbar-vert-offset))`}return e}get div(){return this.#e}static#l(e){e.stopPropagation()}#c(e){this.#r._focusEventsAllowed=!1,Qa(e)}#d(e){this.#r._focusEventsAllowed=!0,Qa(e)}#u(e){const r=this.#r._uiManag
`)||null;o&&this.data.comb&&(o=o.replaceAll(/\s+/g,""));const l={userValue:i,formattedValue:o,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(n=document.createElement("textarea"),n.textContent=o??i,this.data.doNotScroll&&(n.style.overflowY="hidden")):(n=document.createElement("input"),n.type=this.data.password?"password":"text",n.setAttribute("value",o??i),this.data.doNotScroll&&(n.style.overflowX="hidden")),this.data.hasOwnCanvas&&(n.hidden=!0),sh.add(n),n.setAttribute("data-element-id",r),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=0;const{datetimeFormat:c,datetimeType:u,timeStep:d}=this.data,h=!!u&&this.enableScripting;c&&(n.title=c),this._setRequired(n,this.data.required),s&&(n.maxLength=s),n.addEventListener("input",f=>{e.setValue(r,{value:f.target.value}),this.setPropertyOnSiblings(n,"value",f.target.value,"value"),l.formattedValue=null}),n.addEventListener("resetform",f=>{const g=this.data.defaultFieldValue??"";n.value=l.userValue=g,l.formattedValue=null});let m=f=>{const{formattedValue:g}=l;g!=null&&(f.target.value=g),f.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){n.addEventListener("focus",g=>{if(l.focused)return;const{target:b}=g;if(h&&(b.type=u,d&&(b.step=d)),l.userValue){const _=l.userValue;if(h)if(u==="time"){const S=new Date(_),E=[S.getHours(),S.getMinutes(),S.getSeconds()];b.value=E.map(y=>y.toString().padStart(2,"0")).join(":")}else b.value=new Date(_-OEe).toISOString().split(u==="date"?"T":".",1)[0];else b.value=_}l.lastCommittedValue=b.value,l.commitKey=1,this.data.actions?.Focus||(l.focused=!0)}),n.addEventListener("updatefromsandbox",g=>{this.showElementAndHideCanvas(g.target);const b={value(_){l.userValue=_.detail.value??"",h||e.setValue(r,{value:l.userValue.toString()}),_.target.value=l.userValue},formattedValue(_){const{formattedValue:S}=_.detail;l.formattedValue=S,S!=null&&_.target!==document.activeElement&&(_.target.value=S);const E={formattedValue:S};h&&(E.value=S),e.setValue(r,E)},selRange(_){_.target.setSelectionRange(..._.detail.selRange)},charLimit:_=>{const{charLimit:S}=_.detail,{target:E}=_;if(S===0){E.removeAttribute("maxLength");return}E.setAttribute("maxLength",S);let y=l.userValue;!y||y.length<=S||(y=y.slice(0,S),E.value=l.userValue=y,e.setValue(r,{value:y}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r,name:"Keystroke",value:y,willCommit:!0,commitKey:1,selStart:E.selectionStart,selEnd:E.selectionEnd}}))}};this._dispatchEventFromSandbox(b,g)}),n.addEventListener("keydown",g=>{l.commitKey=1;let b=-1;if(g.key==="Escape"?b=0:g.key==="Enter"&&!this.data.multiLine?b=2:g.key==="Tab"&&(l.commitKey=3),b===-1)return;const{value:_}=g.target;l.lastCommittedValue!==_&&(l.lastCommittedValue=_,l.userValue=_,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r,name:"Keystroke",value:_,willCommit:!0,commitKey:b,selStart:g.target.selectionStart,selEnd:g.target.selectionEnd}}))});const f=m;m=null,n.addEventListener("blur",g=>{if(!l.focused||!g.relatedTarget)return;this.data.actions?.Blur||(l.focused=!1);const{target:b}=g;let{value:_}=b;if(h){if(_&&u==="time"){const S=_.split(":").map(E=>parseInt(E,10));_=new Date(2e3,0,1,S[0],S[1],S[2]||0).valueOf(),b.step=""}else _=new Date(_).valueOf();b.type="text"}l.userValue=_,l.lastCommittedValue!==_&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r,name:"Keystroke",value:_,willCommit:!0,commitKey:l.commitKey,selStart:g.target.selectionStart,selEnd:g.target.selectionEnd}}),f(g)}),this.data.actions?.Keystroke&&n.addEventListener("beforeinput",g=>{l.lastCommittedValue=null;const{data:b,target:_}=g,{value:S,selectionStart:E,selectionEnd:y}=_;let v=E,T=y;switch(g.inputType){case"deleteWordBackward":{const w=S.substring(0,E).match(/\w*[^\w]*$/);w&&(v-=w[0].length);break}case"deleteWordForward":{const w=S.substring(E).match(/^[^\w]*\w*/);w&&(T+=w[0].length);break}case"deleteContentBackward":E===y&&(v-=1);break;case"deleteContentForward":E===y&&(T+=1);break}g.preventDefault(),this.linkService.ev
`))r.push({name:"span",value:i,attributes:a});return n}_formatContents({str:e,dir:r}){const n=document.createElement("p");n.classList.add("popupContent"),n.dir=r;const a=e.split(/(?:\r\n?|\n)/);for(let i=0,s=a.length;i<s;++i){const o=a[i];n.append(document.createTextNode(o)),i<s-1&&n.append(document.createElement("br"))}return n}#I(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||(e.key==="Enter"||e.key==="Escape"&&this.#u)&&this.#O()}updateEdited({rect:e,popup:r,deleted:n}){if(n||r?.deleted){this.remove();return}this.#v(),this.#_||={contentsObj:this.#s,richText:this.#g},e&&(this.#p=null),r&&(this.#g=this.#w(r.text),this.#o=o2.toDateObject(r.date),this.#s=null),this.#m?.remove(),this.#m=null}resetEdited(){this.#_&&({contentsObj:this.#s,richText:this.#g}=this.#_,this.#_=null,this.#m?.remove(),this.#m=null,this.#p=null)}remove(){this.#f?.abort(),this.#f=null,this.#m?.remove(),this.#m=null,this.#E=!1,this.#u=!1;for(const e of this.trigger)e.classList.remove("popupTriggerArea")}#N(){if(this.#p!==null)return;const{page:{view:e},viewport:{rawDims:{pageWidth:r,pageHeight:n,pageX:a,pageY:i}}}=this.#c;let s=!!this.#d,o=s?this.#d:this.#h;for(const f of this.#l)if(!o||kr.intersect(f.data.rect,o)!==null){o=f.data.rect,s=!0;break}const l=kr.normalizeRect([o[0],e[3]-o[1]+e[1],o[2],e[3]-o[3]+e[1]]),u=s?o[2]-o[0]+5:0,d=l[0]+u,h=l[1];this.#p=[100*(d-a)/r,100*(h-i)/n];const{style:m}=this.#a;m.left=`${this.#p[0]}%`,m.top=`${this.#p[1]}%`}#O(){this.#u=!this.#u,this.#u?(this.#R(),this.#a.addEventListener("click",this.#n),this.#a.addEventListener("keydown",this.#e)):(this.#D(),this.#a.removeEventListener("click",this.#n),this.#a.removeEventListener("keydown",this.#e))}#R(){this.#m||this.render(),this.isVisible?this.#u&&this.#a.classList.add("focused"):(this.#N(),this.#a.hidden=!1,this.#a.style.zIndex=parseInt(this.#a.style.zIndex)+1e3)}#D(){this.#a.classList.remove("focused"),!(this.#u||!this.isVisible)&&(this.#a.hidden=!0,this.#a.style.zIndex=parseInt(this.#a.style.zIndex)-1e3)}forceHide(){this.#E=this.isVisible,this.#E&&(this.#a.hidden=!0)}maybeShow(){this.#v(),this.#E&&(this.#m||this.#R(),this.#E=!1,this.#a.hidden=!1)}get isVisible(){return this.#a.hidden===!1}}class Fz extends za{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=Jr.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const r of this.textContent){const n=document.createElement("span");n.textContent=r,e.append(n)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class LEe extends za{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const{data:e,width:r,height:n}=this,a=this.svgFactory.create(r,n,!0),i=this.#e=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),a.append(i),this.container.append(a),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class FEe extends za{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const{data:e,width:r,height:n}=this,a=this.svgFactory.create(r,n,!0),i=e.borderStyle.width,s=this.#e=this.svgFactory.createElement("svg:rect");return s.setAttribute("x",i/2),s.setAttribute("y",i/2),s.setAttribute("width",r-i),s.setAttribute("height",n-i),s.setAttribute("stroke-width",i||1),s.setAttribute("stroke","transparent"),s.s
`)}#l(){const[e,r]=this.parentDimensions;let n;if(this.isAttachedToDOM)n=this.div.getBoundingClientRect();else{const{currentLayer:a,div:i}=this,s=i.style.display,o=i.classList.contains("hidden");i.classList.remove("hidden"),i.style.display="hidden",a.div.append(this.div),n=i.getBoundingClientRect(),i.remove(),i.style.display=s,i.classList.toggle("hidden",o)}this.rotation%180===this.parentRotation%180?(this.width=n.width/e,this.height=n.height/r):(this.width=n.height/e,this.height=n.width/r),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=this.#t,r=this.#t=this.#o().trimEnd();if(e===r)return;const n=a=>{if(this.#t=a,!a){this.remove();return}this.#d(),this._uiManager.rebuild(this),this.#l()};this.addCommands({cmd:()=>{n(r)},undo:()=>{n(e)},mustExec:!1}),this.#l()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&e.key==="Enter"&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){oi._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let e,r;(this._isCopy||this.annotationElementId)&&(e=this.x,r=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#r),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:n}=this.editorDiv;if(n.fontSize=`calc(${this.#i}px * var(--total-scale-factor))`,n.color=this.#e,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[a,i]=this.parentDimensions;if(this.annotationElementId){const{position:s}=this._initialData;let[o,l]=this.getInitialTranslation();[o,l]=this.pageTranslationToScreen(o,l);const[c,u]=this.pageDimensions,[d,h]=this.pageTranslation;let m,f;switch(this.rotation){case 0:m=e+(s[0]-d)/c,f=r+this.height-(s[1]-h)/u;break;case 90:m=e+(s[0]-d)/c,f=r-(s[1]-h)/u,[o,l]=[l,-o];break;case 180:m=e-this.width+(s[0]-d)/c,f=r-(s[1]-h)/u,[o,l]=[-o,-l];break;case 270:m=e+(s[0]-d-this.height*u)/c,f=r+(s[1]-h-this.width*c)/u,[o,l]=[-l,o];break}this.setAt(m*a,f*i,o,l)}else this._moveAfterPaste(e,r);this.#d(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#c(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(j0,"")}editorDivPaste(e){const r=e.clipboardData||window.clipboardData,{types:n}=r;if(n.length===1&&n[0]==="text/plain")return;e.preventDefault();const a=oi.#m(r.getData("text")||"").replaceAll(j0,`
`);if(!a)return;const i=window.getSelection();if(!i.rangeCount)return;this.editorDiv.normalize(),i.deleteFromDocument();const s=i.getRangeAt(0);if(!a.includes(`
`)){s.insertNode(document.createTextNode(a)),this.editorDiv.normalize(),i.collapseToStart();return}const{startContainer:o,startOffset:l}=s,c=[],u=[];if(o.nodeType===Node.TEXT_NODE){const m=o.parentElement;if(u.push(o.nodeValue.slice(l).replaceAll(j0,"")),m!==this.editorDiv){let f=c;for(const g of this.editorDiv.childNodes){if(g===m){f=u;continue}f.push(oi.#c(g))}}c.push(o.nodeValue.slice(0,l).replaceAll(j0,""))}else if(o===this.editorDiv){let m=c,f=0;for(const g of this.editorDiv.childNodes)f++===l&&(m=u),m.push(oi.#c(g))}this.#t=`${c.join(`
`)}${a}${u.join(`
`)}`,this.#d();const d=new Range;let h=Math.sumPrecise(c.map(m=>m.length));for(const{firstChild:m}of this.editorDiv.childNodes)if(m.nodeType===Node.TEXT_NODE){const f=m.nodeValue.length;if(h<=f){d.setStart(m,h),d.setEnd(m,h);break}h-=f}i.removeAllRanges(),i.addRange(d)}#d(){if(this.editorDiv.replaceChildren(),!!this.#t)for(const e of this.#t.split(`
`)){const r=document.createElement("div");r.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(r)}}#u(){return this.#t.replaceAll(" "," ")}static#m(e){return e.replaceAll(" "," ")}get contentDiv(){return this.editorDiv}static async deserialize(e,r,n){let a=null;if(e instanceof Fz){const{data:{defaultAppearanceData:{fontSize:s,fontColor:o},rect:l,rotation:c,id:u,popupRef:d,contentsObj:h},textContent:m,textPosition:f,parent:{page:{pageNumber:g}}}=e;if(!m||m.length===0)return null;a=e={annotationType:Jr.FREETEXT,color:Array.from(o),fontSize:s,value:m.join(`
`),position:f,pageIndex:g-1,rect:l.slice(0),rotation:c,annotationElementId:u,id:u,deleted:!1,popupRef:d,comment:h?.str||null}}const i=await super.deserialize(e,r,n);return i.#i=e.fontSize,i.#e=kr.makeHexColor(...e.color),i.#t=oi.#m(e.value),i._initialData=a,e.comment&&i.setCommentData(e.comment),i}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const r=oi._internalPadding*this.parentScale,n=this.getRect(r,r),a=Fr._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#e),i={annotationType:Jr.FREETEXT,color:a,fontSize:this.#i,value:this.#u(),pageIndex:this.pageIndex,rect:n,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return this.addComment(i),e?(i.isCopy=!0,i):this.annotationElementId&&!this.#f(i)?null:(i.id=this.annotationElementId,i)}#f(e){const{value:r,fontSize:n,color:a,pageIndex:i}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||e.value!==r||e.fontSize!==n||e.color.some((s,o)=>s!==a[o])||e.pageIndex!==i}renderAnnotationElement(e){const r=super.renderAnnotationElement(e),{style:n}=r;n.fontSize=`calc(${this.#i}px * var(--total-scale-factor))`,n.color=this.#e,r.replaceChildren();for(const s of this.#t.split(`
`)){const o=document.createElement("div");o.append(s?document.createTextNode(s):document.createElement("br")),r.append(o)}const a=oi._internalPadding*this.parentScale,i={rect:this.getRect(a,a)};return i.popup=this.hasEditedComment?this.comment:{text:this.#t},e.updateEdited(i),r}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}}class Sr{static PRECISION=1e-4;toSVGPath(){Jn("Abstract method `toSVGPath` must be implemented.")}get box(){Jn("Abstract getter `box` must be implemented.")}serialize(e,r){Jn("Abstract method `serialize` must be implemented.")}static _rescale(e,r,n,a,i,s){s||=new Float32Array(e.length);for(let o=0,l=e.length;o<l;o+=2)s[o]=r+e[o]*a,s[o+1]=n+e[o+1]*i;return s}static _rescaleAndSwap(e,r,n,a,i,s){s||=new Float32Array(e.length);for(let o=0,l=e.length;o<l;o+=2)s[o]=r+e[o+1]*a,s[o+1]=n+e[o]*i;return s}static _translate(e,r,n,a){a||=new Float32Array(e.length);for(let i=0,s=e.length;i<s;i+=2)a[i]=r+e[i],a[i+1]=n+e[i+1];return a}static svgRound(e){return Math.round(e*1e4)}static _normalizePoint(e,r,n,a,i){switch(i){case 90:return[1-r/n,e/a];case 180:return[1-e/n,1-r/a];case 270:return[r/n,1-e/a];default:return[e/n,r/a]}}static _normalizePagePoint(e,r,n){switch(n){case 90:return[1-r,e];case 180:return[1-e,1-r];case 270:return[r,1-e];default:return[e,r]}}static createBezierPoints(e,r,n,a,i,s){return[(e+5*n)/6,(r+5*a)/6,(5*n+i)/6,(5*a+s)/6,(n+i)/2,(a+s)/2]}}class Kd{#e;#t=[];#r;#n;#i=[];#a=new Float32Array(18);#s;#o;#l;#c;#d;#u;#m=[];static#f=8;static#p=2;static#h=Kd.#f+Kd.#p;constructor({x:e,y:r},n,a,i,s,o=0){this.#e=n,this.#u=i*a,this.#n=s,this.#a.set([NaN,NaN,NaN,NaN,e,r],6),this.#r=o,this.#c=Kd.#f*a,this.#l=Kd.#h*a,this.#d=a,this.#m.push(e,r)}isEmpty(){return isNaN(this.#a[8])}#g(){const e=this.#a.subarray(4,6),r=this.#a.subarray(16,18),[n,a,i,s]=this.#e;return[(this.#s+(e[0]-r[0])/2-n)/i,(this.#o+(e[1]-r[1])/2-a)/s,(this.#s+(r[0]-e[0])/2-n)/i,(this.#o+(r[1]-e[1])/2-a)/s]}add({x:e,y:r}){this.#s=e,this.#o=r;const[n,a,i,s]=this.#e;let[o,l,c,u]=this.#a.subarray(8,12);const d=e-c,h=r-u,m=Math.hypot(d,h);if(m<this.#l)return!1;const f=m-this.#c,g=f/m,b=g*d,_=g*h;let S=o,E=l;o=c,l=u,c+=b,u+=_,this.#m?.push(e,r);const y=-_/f,v=b/f,T=y*this.#u,w=v*this.#u;return this.#a.set(this.#a.subarray(2,8),0),this.#a.set([c+T,u+w],4),this.#a.set(this.#a.subarray(14,18),12),this.#a.set([c-T,u-w],16),isNaN(this.#a[6])?(this.#i.length===0&&(this.#a.set([o+T,l+w],2),this.#i.push(NaN,NaN,NaN,NaN,(o+T-n)/i,(l+w-a)/s),this.#a.set([o-T,l-w],14),this.#t.push(NaN,NaN,NaN,NaN,(o-T-n)/i,(l-w-a)/s)),this.#a.set([S,E,o,l,c,u],6),!this.isEmpty()):(this.#a.set([S,E,o,l,c,u],6),Math.abs(Math.atan2(E-l,S-o)-Math.atan2(_,b))<Math.PI/2?([o,l,c,u]=this.#a.subarray(2,6),this.#i.push(NaN,NaN,NaN,NaN,((o+c)/2-n)/i,((l+u)/2-a)/s),[o,l,S,E]=this.#a.subarray(14,18),this.#t.push(NaN,NaN,NaN,NaN,((S+o)/2-n)/i,((E+l)/2-a)/s),!0):([S,E,o,l,c,u]=this.#a.subarray(0,6),this.#i.push(((S+5*o)/6-n)/i,((E+5*l)/6-a)/s,((5*o+c)/6-n)/i,((5*l+u)/6-a)/s,((o+c)/2-n)/i,((l+u)/2-a)/s),[c,u,o,l,S,E]=this.#a.subarray(12,18),this.#t.push(((S+5*o)/6-n)/i,((E+5*l)/6-a)/s,((5*o+c)/6-n)/i,((5*l+u)/6-a)/s,((o+c)/2-n)/i,((l+u)/2-a)/s),!0))}toSVGPath(){if(this.isEmpty())return"";const e=this.#i,r=this.#t;if(isNaN(this.#a[6])&&!this.isEmpty())return this.#S();const n=[];n.push(`M${e[4]} ${e[5]}`);for(let a=6;a<e.length;a+=6)isNaN(e[a])?n.push(`L${e[a+4]} ${e[a+5]}`):n.push(`C${e[a]} ${e[a+1]} ${e[a+2]} ${e[a+3]} ${e[a+4]} ${e[a+5]}`);this.#E(n);for(let a=r.length-6;a>=6;a-=6)isNaN(r[a])?n.push(`L${r[a+4]} ${r[a+5]}`):n.push(`C${r[a]} ${r[a+1]} ${r[a+2]} ${r[a+3]} ${r[a+4]} ${r[a+5]}`);return this.#_(n),n.join(" ")}#S(){const[e,r,n,a]=this.#e,[i,s,o,l]=this.#g();return`M${(this.#a[2]-e)/n} ${(this.#a[3]-r)/a} L${(this.#a[4]-e)/n} ${(this.#a[5]-r)/a} L${i} ${s} L${o} ${l} L${(this.#a[16]-e)/n} ${(this.#a[17]-r)/a} L${(this.#a[14]-e)/n} ${(this.#a[15]-r)/a} Z`}#_(e){const r=this.#t;e.push(`L${r[4]} ${r[5]} Z`)}#E(e){const[r,n,a,i]=this.#e,s=this.#a.subarray(4,6),o=this.#a.subarray(16,18),[l,c,u,d]=this.#g();e.push(`L${(s[0]-r)/a} ${(s[1]-n)/i} L${l} ${c} L${u}
`)}catch(e){throw console.error("Error converting PDF to text:",e),new Error(`Failed to convert PDF to text: ${e instanceof Error?e.message:"Unknown error"}`)}}async function Hz(t,e=1.5){try{const r=await $z(t),n=await Ax(r).promise,a=[];for(let i=1;i<=n.numPages;i++){const s=await n.getPage(i),o=s.getViewport({scale:e}),l=document.createElement("canvas"),c=l.getContext("2d");if(l.width=o.width,l.height=o.height,!c)throw new Error("Failed to get 2D context from canvas");const u=s.render({canvasContext:c,viewport:o,canvas:l});a.push(u.promise.then(()=>l.toDataURL(ta.PNG)))}return await Promise.all(a)}catch(r){throw console.error("Error converting PDF to images:",r),new Error(`Failed to convert PDF to images: ${r instanceof Error?r.message:"Unknown error"}`)}}function Yz(t,e="white"){return new Promise((r,n)=>{try{const a=new Image;a.onload=()=>{const i=document.createElement("canvas"),s=i.getContext("2d");if(!s){n(new Error("Failed to get 2D canvas context."));return}const o=a.naturalWidth||300,l=a.naturalHeight||300;i.width=o,i.height=l,e&&(s.fillStyle=e,s.fillRect(0,0,i.width,i.height)),s.drawImage(a,0,0,o,l),r(i.toDataURL(ta.PNG))},a.onerror=()=>{n(new Error("Failed to load SVG image. Ensure the SVG data is valid."))},a.src=t}catch(a){const s=`Error converting SVG to PNG: ${a instanceof Error?a.message:String(a)}`;console.error(s,a),n(new Error(s))}})}function Vz(t){return t===ta.SVG}function Wz(t,e="white"){return new Promise((r,n)=>{try{const a=new Image;a.onload=()=>{const i=document.createElement("canvas"),s=i.getContext("2d");if(!s){n(new Error("Failed to get 2D canvas context."));return}const o=a.naturalWidth||300,l=a.naturalHeight||300;i.width=o,i.height=l,e&&(s.fillStyle=e,s.fillRect(0,0,i.width,i.height)),s.drawImage(a,0,0,o,l),r(i.toDataURL(ta.PNG))},a.onerror=()=>{n(new Error("Failed to load WebP image. Ensure the WebP data is valid."))},a.src=t}catch(a){const s=`Error converting WebP to PNG: ${a instanceof Error?a.message:String(a)}`;console.error(s,a),n(new Error(s))}})}function Kz(t){return t===ta.WEBP}class is{static async sendMessage(e,r={},n,a){const{stream:i,onChunk:s,onComplete:o,onError:l,onReasoningChunk:c,onToolCallChunk:u,onModel:d,onTimings:h,tools:m,temperature:f,max_tokens:g,dynatemp_range:b,dynatemp_exponent:_,top_k:S,top_p:E,min_p:y,xtc_probability:v,xtc_threshold:T,typ_p:w,repeat_last_n:A,repeat_penalty:I,presence_penalty:x,frequency_penalty:D,dry_multiplier:$,dry_base:H,dry_allowed_length:G,dry_penalty_last_n:K,samplers:z,backend_sampling:re,custom:W,timings_per_token:ie,disableReasoningParsing:M,excludeReasoningFromContext:B}=r,J=e.map(O=>{if("id"in O&&"convId"in O&&"timestamp"in O){const U=O;return is.convertDbMessageToApiChatMessageData(U)}else return O}).filter(O=>O.role===tr.SYSTEM?(typeof O.content=="string"?O.content:"").trim().length>0:!0);r.model&&!ar.modelSupportsVision(r.model)&&J.forEach(O=>{Array.isArray(O.content)&&(O.content=O.content.filter(U=>U.type===ts.IMAGE_URL?(console.info(`[ChatService] Skipping image attachment in message history (model "${r.model}" does not support vision)`),!1):!0),O.content.length===1&&O.content[0].type===ts.TEXT&&(O.content=O.content[0].text))});const N={messages:J.map(O=>{const U={role:O.role,content:O.content,tool_calls:O.tool_calls,tool_call_id:O.tool_call_id};return!B&&O.reasoning_content&&(U.reasoning_content=O.reasoning_content),U}),stream:i,return_progress:i?!0:void 0,tools:m&&m.length>0?m:void 0};if(r.model&&(N.model=r.model),N.reasoning_format=M?pR.NONE:pR.AUTO,f!==void 0&&(N.temperature=f),g!==void 0&&(N.max_tokens=g!==null&&g!==0?g:-1),b!==void 0&&(N.dynatemp_range=b),_!==void 0&&(N.dynatemp_exponent=_),S!==void 0&&(N.top_k=S),E!==void 0&&(N.top_p=E),y!==void 0&&(N.min_p=y),v!==void 0&&(N.xtc_probability=v),T!==void 0&&(N.xtc_threshold=T),w!==void 0&&(N.typ_p=w),A!==void 0&&(N.repeat_last_n=A),I!==void 0&&(N.repeat_penalty=I),x!==void 0&&(N.presence_penalty=x),D!==void 0&&(N.frequency_penalty=D),$!==void 0&&(N.dry_multiplier=$),H!==void 0&&(N.dry_base=H),G!==void 0&&(N.dry_allowed_length=G),K!==void 0&&(N.dry_penalty_last_n=K),z!==vo
`);w=x.pop()||"";for(const D of x){if(u?.aborted)break;if(D.startsWith(ho.DATA)){const $=D.slice(6);if($==="[DONE]"){_=!0;continue}try{const H=JSON.parse($),G=H.choices[0]?.delta?.content,K=H.choices[0]?.delta?.reasoning_content,z=H.choices[0]?.delta?.tool_calls,re=H.timings,W=H.prompt_progress,ie=is.extractModelName(H);ie&&!S&&(S=!0,o?.(ie)),W&&is.notifyTimings(void 0,W,l),re&&(is.notifyTimings(re,W,l),b=re),G&&(v(),m+=G,u?.aborted||r?.(G)),K&&(v(),f+=K,u?.aborted||i?.(K)),T(z)}catch(H){console.error("Error parsing JSON chunk:",H)}}}if(u?.aborted)break}if(u?.aborted)return;if(_){v();const A=g.length>0?JSON.stringify(g):void 0;n?.(m,f||void 0,b,A)}}catch(w){const A=w instanceof Error?w:new Error("Stream error");throw a?.(A),A}finally{d.releaseLock()}}static async handleNonStreamResponse(e,r,n,a,i){try{const s=await e.text();if(!s.trim())throw new Error("No response received from server. Please try again.");const o=JSON.parse(s),l=is.extractModelName(o);l&&i?.(l);const c=o.choices[0]?.message?.content||"",u=o.choices[0]?.message?.reasoning_content,d=o.choices[0]?.message?.tool_calls;let h;if(d&&d.length>0){const m=is.mergeToolCallDeltas([],d);m.length>0&&(h=JSON.stringify(m),h&&a?.(h))}if(!c.trim()&&!h)throw new Error("No response received from server. Please try again.");return r?.(c,u,void 0,h),c}catch(s){const o=s instanceof Error?s:new Error("Parse error");throw n?.(o),o}}static mergeToolCallDeltas(e,r,n=0){const a=e.map(i=>({...i,function:i.function?{...i.function}:void 0}));for(const i of r){const s=typeof i.index=="number"&&i.index>=0?i.index+n:a.length;for(;a.length<=s;)a.push({function:void 0});const o=a[s];if(i.id&&(o.id=i.id),i.type&&(o.type=i.type),i.function){const l=o.function?{...o.function}:{};i.function.name&&(l.name=i.function.name),i.function.arguments&&(l.arguments=(l.arguments??"")+i.function.arguments),o.function=l}}return a}static convertDbMessageToApiChatMessageData(e){if(e.role===tr.TOOL&&e.toolCallId)return{role:tr.TOOL,content:e.content,tool_call_id:e.toolCallId};let r;if(e.toolCalls)try{r=JSON.parse(e.toolCalls)}catch{}if(!e.extra||e.extra.length===0){const h={role:e.role,content:e.content};return e.reasoningContent&&(h.reasoning_content=e.reasoningContent),r&&r.length>0&&(h.tool_calls=r),h}const n=[];e.content&&n.push({type:ts.TEXT,text:e.content});const a=e.extra.filter(h=>h.type===Qr.IMAGE);for(const h of a)n.push({type:ts.IMAGE_URL,image_url:{url:h.base64Url}});const i=e.extra.filter(h=>h.type===Qr.TEXT);for(const h of i)n.push({type:ts.TEXT,text:wm("File",h.name,h.content)});const s=e.extra.filter(h=>h.type===Qr.LEGACY_CONTEXT);for(const h of s)n.push({type:ts.TEXT,text:wm("File",h.name,h.content)});const o=e.extra.filter(h=>h.type===Qr.AUDIO);for(const h of o)n.push({type:ts.INPUT_AUDIO,input_audio:{data:h.base64Data,format:h.mimeType.includes("wav")?"wav":"mp3"}});const l=e.extra.filter(h=>h.type===Qr.PDF);for(const h of l)if(h.processedAsImages&&h.images)for(let m=0;m<h.images.length;m++)n.push({type:ts.IMAGE_URL,image_url:{url:h.images[m]}});else n.push({type:ts.TEXT,text:wm(Ure,h.name,h.content)});const c=e.extra.filter(h=>h.type===Qr.MCP_PROMPT);for(const h of c)n.push({type:ts.TEXT,text:wm(Gre,h.name,h.content,h.serverName)});const u=e.extra.filter(h=>h.type===Qr.MCP_RESOURCE);for(const h of u)n.push({type:ts.TEXT,text:wm(qre,h.name,h.content,h.serverName)});const d={role:e.role,content:n};return e.reasoningContent&&(d.reasoning_content=e.reasoningContent),r&&r.length>0&&(d.tool_calls=r),d}static async parseErrorResponse(e){try{const r=await e.text(),n=JSON.parse(r),a=n.error?.message||"Unknown server error",i=new Error(a);return i.name=e.status===400?"ServerError":"HttpError",n.error&&"n_prompt_tokens"in n.error&&"n_ctx"in n.error&&(i.contextInfo={n_prompt_tokens:n.error.n_prompt_tokens,n_ctx:n.error.n_ctx}),i}catch{const r=new Error(`Server error (${e.status}): ${e.statusText}`);return r.name="HttpError",r}}static extractModelName(e){const r=c=>typeof c=="object"&&c!==null?c:void 0,n=c=>typeof c=="string"&&c.trim()?c.trim():void 0,a=r(e);if(!a)return;const i=n(a.model);if(i)retur
p-0 md:h-[64vh] md:max-h-[64vh] md:min-h-0 md:rounded-lg`,children:(b,_)=>{mr(fOe(b,{onSave:i,get initialSection(){return e.initialSection}}),S=>k(n,S,!0),()=>p(n))},$$slots:{default:!0}})}),C(u,h)},$$slots:{default:!0}})}),C(t,s),Te()}function id(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class"]);var a=se(),i=L(a);{let s=F(()=>jt("text-lg font-semibold",e.class));fe(i,()=>WO,(o,l)=>{l(o,ot({"data-slot":"alert-dialog-title",get class(){return p(s)}},()=>n,{get ref(){return r()},set ref(c){r(c)}}))})}C(t,a),Te()}function Eh(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class"]);var a=se(),i=L(a);{let s=F(()=>jt(Cf(),e.class));fe(i,()=>xX,(o,l)=>{l(o,ot({"data-slot":"alert-dialog-action",get class(){return p(s)}},()=>n,{get ref(){return r()},set ref(c){r(c)}}))})}C(t,a),Te()}function Ux(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class"]);var a=se(),i=L(a);{let s=F(()=>jt(Cf({variant:"outline"}),e.class));fe(i,()=>MX,(o,l)=>{l(o,ot({"data-slot":"alert-dialog-cancel",get class(){return p(s)}},()=>n,{get ref(){return r()},set ref(c){r(c)}}))})}C(t,a),Te()}var Vve=q("<div><!></div>");function sd(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=Vve();$t(a,s=>({"data-slot":"alert-dialog-footer",class:s,...n}),[()=>jt("mt-6 flex flex-row gap-2 sm:mt-0 sm:justify-end [&>*]:flex-1 sm:[&>*]:flex-none",e.class)]);var i=j(a);De(i,()=>e.children??Ge),Y(a),mr(a,s=>r(s),()=>r()),C(t,a),Te()}var Wve=q("<div><!></div>");function od(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=Wve();$t(a,s=>({"data-slot":"alert-dialog-header",class:s,...n}),[()=>jt("flex flex-col gap-2 text-center sm:text-left",e.class)]);var i=j(a);De(i,()=>e.children??Ge),Y(a),mr(a,s=>r(s),()=>r()),C(t,a),Te()}function Zz(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class"]);var a=se(),i=L(a);{let s=F(()=>jt("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e.class));fe(i,()=>NS,(o,l)=>{l(o,ot({"data-slot":"alert-dialog-overlay",get class(){return p(s)}},()=>n,{get ref(){return r()},set ref(c){r(c)}}))})}C(t,a),Te()}var Kve=q("<!> <!>",1);function ld(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class","portalProps"]);var a=se(),i=L(a);fe(i,()=>iu,(s,o)=>{o(s,ot(()=>e.portalProps,{children:(l,c)=>{var u=Kve(),d=L(u);Zz(d,{});var h=te(d,2);{let m=F(()=>jt("fixed z-[999999] grid w-full gap-4 border bg-background p-6 shadow-lg duration-200","right-0 bottom-0 left-0 max-h-[100dvh] translate-x-0 translate-y-0 overflow-y-auto rounded-t-lg","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-bottom-full","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-bottom-full","sm:top-[50%] sm:right-auto sm:bottom-auto sm:left-[50%] sm:max-h-[100vh] sm:max-w-lg sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded-lg","sm:data-[state=closed]:slide-out-to-bottom-0 sm:data-[state=closed]:zoom-out-95","sm:data-[state=open]:slide-in-from-bottom-0 sm:data-[state=open]:zoom-in-95",e.class));fe(h,()=>UZ,(f,g)=>{g(f,ot({"data-slot":"alert-dialog-content",get class(){return p(m)}},()=>n,{get ref(){return r()},set ref(b){r(b)}}))})}C(l,u)},$$slots:{default:!0}}))}),C(t,a),Te()}function cd(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class"]);var a=se(),i=L(a);{let s=F(()=>jt("text-sm text-muted-foreground",e.class));fe(i,()=>hN,(o,l)=>{l(o,ot({"data-slot":"alert-dialog-description",get class(){return p(s)}},()=>n,{get ref(){return r()},set ref(c){r(c)}}))})}C(t,a),Te()}const ud=OX,jve=iu;var Qve=q("<!> ",1),Xve=q("<!> <!>",1),Zve=q("<!> <!>",1),Jve=q("<!> <!> <!>",1);function oh(t,e){ye(e,!0);let r=V(e,"confirmText",3,"Confirm"),n=V(e,"ca
as a JSON file.`);C(ne,ue)},X=ne=>{var ue=Nt(`Choose which conversations you want to import. Selected conversations will be merged
with your existing conversations.`);C(ne,ue)};le(O,ne=>{e.mode==="export"?ne(U):ne(X,!1)})}C(B,N)},$$slots:{default:!0}})}),C(G,z)},$$slots:{default:!0}})});var D=te(x,2);mr(nRe(D,{get conversations(){return e.conversations},get messageCountMap(){return r()},get mode(){return e.mode},get onCancel(){return e.onCancel},get onConfirm(){return e.onConfirm}}),$=>k(a,$,!0),()=>p(a)),C(w,I)},$$slots:{default:!0}})}),C(b,S)},$$slots:{default:!0}})}),C(u,h)},$$slots:{default:!0}})}),C(t,s),Te()}var Mye=q('<div data-slot="table-container" class="relative w-full overflow-x-auto"><table><!></table></div>');function kye(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=Mye(),i=j(a);$t(i,o=>({"data-slot":"table",class:o,...n}),[()=>jt("w-full caption-bottom text-sm",e.class)]);var s=j(i);De(s,()=>e.children??Ge),Y(i),mr(i,o=>r(o),()=>r()),Y(a),C(t,a),Te()}var Pye=q("<tbody><!></tbody>");function Lye(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=Pye();$t(a,s=>({"data-slot":"table-body",class:s,...n}),[()=>jt("[&_tr:last-child]:border-0",e.class)]);var i=j(a);De(i,()=>e.children??Ge),Y(a),mr(a,s=>r(s),()=>r()),C(t,a),Te()}var Fye=q("<td><!></td>");function sa(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=Fye();$t(a,s=>({"data-slot":"table-cell",class:s,...n}),[()=>jt("bg-clip-padding p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0",e.class)]);var i=j(a);De(i,()=>e.children??Ge),Y(a),mr(a,s=>r(s),()=>r()),C(t,a),Te()}var Bye=q("<th><!></th>");function W7(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=Bye();$t(a,s=>({"data-slot":"table-head",class:s,...n}),[()=>jt("h-10 bg-clip-padding px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pe-0",e.class)]);var i=j(a);De(i,()=>e.children??Ge),Y(a),mr(a,s=>r(s),()=>r()),C(t,a),Te()}var Uye=q("<thead><!></thead>");function Gye(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=Uye();$t(a,s=>({"data-slot":"table-header",class:s,...n}),[()=>jt("[&_tr]:border-b",e.class)]);var i=j(a);De(i,()=>e.children??Ge),Y(a),mr(a,s=>r(s),()=>r()),C(t,a),Te()}var qye=q("<tr><!></tr>");function bs(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=qye();$t(a,s=>({"data-slot":"table-row",class:s,...n}),[()=>jt("border-b transition-colors data-[state=selected]:bg-muted hover:[&,&>svelte-css-wrapper]:[&>th,td]:bg-muted/50",e.class)]);var i=j(a);De(i,()=>e.children??Ge),Y(a),mr(a,s=>r(s),()=>r()),C(t,a),Te()}var zye=q("<!> <!>",1),$ye=q('<div class="flex items-center justify-center py-8"><div class="text-sm text-muted-foreground">Loading model information...</div></div>'),Hye=q('<div class="inline-flex items-center gap-2"><span class="resizable-text-container min-w-0 flex-1 truncate"> </span> <!></div>'),Yye=q("<!> <!>",1),Vye=q('<span class="resizable-text-container min-w-0 flex-1 truncate"> </span> <!>',1),Wye=q("<!> <!>",1),Kye=q("<!> <!>",1),jye=q("<!> <!>",1),Qye=q("<!> <!>",1),Xye=q("<!> <!>",1),Zye=q("<!> <!>",1),Jye=q("<!> <!>",1),eTe=q("<!> <!>",1),tTe=q("<!> <!>",1),rTe=q("<!> <!>",1),nTe=q('<div class="flex flex-wrap gap-1"><!></div>'),aTe=q("<!> <!>",1),iTe=q("<!> <!>",1),sTe=q('<div class="rounded-md bg-muted p-4"><pre class="font-mono text-xs whitespace-pre-wrap"> </pre></div>'),oTe=q("<!> <!>",1),lTe=q("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),cTe=q("<!> <!>",1),uTe=q('<div class="flex items-center justify-center py-8"><div class="text-sm text-muted-foreground">No model information available</div></div>'),dTe=q(`<style>@container (max-width: 56rem) {
.resizable-text-container {
max-width: calc(100vw - var(--threshold));
}
}</style> <!> <div class="space-y-6 py-4"><!></div>`,1);function t$(t,e){ye(e,!0);let r=V(e,"open",15),n=V(e,"modelId",3,null),a=F(()=>Qn.isRouterMode),i=_e(null),s=_e(!1),o=F(()=>p(a)&&n()?p(i):Qn.props),l=F(()=>p(a)&&n()?n():ar.singleModelName),c=F(ao),u=F(Px),d=F(()=>p(a)&&n()?p(c).find(g=>g.model===n())??null:p(c)[0]??null),h=F(()=>p(d)?.id?ar.getModelModalitiesArray(p(d).id):[]);It(()=>{r()&&p(c).length===0&&ar.fetch()}),It(()=>{r()&&p(a)&&n()&&(k(s,!0),ar.fetchModelProps(n()).then(g=>{k(i,g,!0)}).catch(()=>{k(i,null)}).finally(()=>{k(s,!1)})),r()||k(i,null)});var m=se(),f=L(m);fe(f,()=>Sh,(g,b)=>{b(g,{get onOpenChange(){return e.onOpenChange},get open(){return r()},set open(_){r(_)},children:(_,S)=>{var E=se(),y=L(E);fe(y,()=>bh,(v,T)=>{T(v,{class:"@container z-9999 !max-h-[80dvh] !max-w-[60rem] max-w-full",children:(w,A)=>{var I=dTe(),x=te(L(I),2);fe(x,()=>om,(K,z)=>{z(K,{children:(re,W)=>{var ie=zye(),M=L(ie);fe(M,()=>sm,(J,N)=>{N(J,{children:(O,U)=>{et();var X=Nt("Model Information");C(O,X)},$$slots:{default:!0}})});var B=te(M,2);fe(B,()=>lm,(J,N)=>{N(J,{children:(O,U)=>{et();var X=Nt("Current model details and capabilities");C(O,X)},$$slots:{default:!0}})}),C(re,ie)},$$slots:{default:!0}})});var D=te(x,2),$=j(D);{var H=K=>{var z=$ye();C(K,z)},G=K=>{var z=se(),re=L(z);{var W=M=>{const B=F(()=>p(d).meta);var J=se(),N=L(J);{var O=U=>{var X=se(),ne=L(X);fe(ne,()=>kye,(ue,he)=>{he(ue,{children:(be,Z)=>{var ae=cTe(),pe=L(ae);fe(pe,()=>Gye,(Ee,Ce)=>{Ce(Ee,{children:(Ne,Ie)=>{var Ue=se(),Fe=L(Ue);fe(Fe,()=>bs,(je,He)=>{He(je,{children:(at,st)=>{var dt=Yye(),Ae=L(dt);fe(Ae,()=>W7,(ht,ze)=>{ze(ht,{class:"w-[10rem]",children:(ft,At)=>{et();var Rt=Nt("Model");C(ft,Rt)},$$slots:{default:!0}})});var Le=te(Ae,2);fe(Le,()=>W7,(ht,ze)=>{ze(ht,{children:(ft,At)=>{var Rt=Hye(),zt=j(Rt);ms(zt,"",{},{"--threshold":"12rem"});var ir=j(zt,!0);Y(zt);var hr=te(zt,2);{let lt=F(()=>p(l)||""),Ot=F(()=>!!p(l));Fp(hr,{get text(){return p(lt)},get canCopy(){return p(Ot)},ariaLabel:"Copy model name to clipboard"})}Y(Rt),we(()=>qe(ir,p(l))),C(ft,Rt)},$$slots:{default:!0}})}),C(at,dt)},$$slots:{default:!0}})}),C(Ne,Ue)},$$slots:{default:!0}})});var me=te(pe,2);fe(me,()=>Lye,(Ee,Ce)=>{Ce(Ee,{children:(Ne,Ie)=>{var Ue=lTe(),Fe=L(Ue);fe(Fe,()=>bs,(yt,xt)=>{xt(yt,{children:(Re,Xe)=>{var pt=Wye(),Ct=L(pt);fe(Ct,()=>sa,(kt,bt)=>{bt(kt,{class:"h-10 align-middle font-medium",children:(Tt,St)=>{et();var Dt=Nt("File Path");C(Tt,Dt)},$$slots:{default:!0}})});var Pt=te(Ct,2);fe(Pt,()=>sa,(kt,bt)=>{bt(kt,{class:"inline-flex h-10 items-center gap-2 align-middle font-mono text-xs",children:(Tt,St)=>{var Dt=Vye(),ur=L(Dt);ms(ur,"",{},{"--threshold":"14rem"});var On=j(ur,!0);Y(ur);var vr=te(ur,2);Fp(vr,{get text(){return p(o).model_path},ariaLabel:"Copy model path to clipboard"}),we(()=>qe(On,p(o).model_path)),C(Tt,Dt)},$$slots:{default:!0}})}),C(Re,pt)},$$slots:{default:!0}})});var je=te(Fe,2);{var He=yt=>{var xt=se(),Re=L(xt);fe(Re,()=>bs,(Xe,pt)=>{pt(Xe,{children:(Ct,Pt)=>{var kt=Kye(),bt=L(kt);fe(bt,()=>sa,(St,Dt)=>{Dt(St,{class:"h-10 align-middle font-medium",children:(ur,On)=>{et();var vr=Nt("Context Size");C(ur,vr)},$$slots:{default:!0}})});var Tt=te(bt,2);fe(Tt,()=>sa,(St,Dt)=>{Dt(St,{children:(ur,On)=>{et();var vr=Nt();we(Ln=>qe(vr,`${Ln??""} tokens`),[()=>m_(p(o).default_generation_settings.n_ctx)]),C(ur,vr)},$$slots:{default:!0}})}),C(Ct,kt)},$$slots:{default:!0}})}),C(yt,xt)},at=yt=>{var xt=se(),Re=L(xt);fe(Re,()=>bs,(Xe,pt)=>{pt(Xe,{children:(Ct,Pt)=>{var kt=jye(),bt=L(kt);fe(bt,()=>sa,(St,Dt)=>{Dt(St,{class:"h-10 align-middle font-medium text-red-500",children:(ur,On)=>{et();var vr=Nt("Context Size");C(ur,vr)},$$slots:{default:!0}})});var Tt=te(bt,2);fe(Tt,()=>sa,(St,Dt)=>{Dt(St,{class:"text-red-500",children:(ur,On)=>{et();var vr=Nt("Not available");C(ur,vr)},$$slots:{default:!0}})}),C(Ct,kt)},$$slots:{default:!0}})}),C(yt,xt)};le(je,yt=>{p(o)?.default_generation_settings?.n_ctx?yt(He):yt(at,!1)})}var st=te(je,2);{var dt=yt=>{var xt=se(),Re=L(xt);fe(Re,()=>bs,(Xe,pt)=>{pt(Xe,{children:(Ct,Pt)=>{var kt=Qye(),bt=L(kt);fe(bt,()=>sa,(St,Dt)=>{Dt(S
transform: ${c} translate(${(1-g)*d}${h}, ${(1-g)*m}${f});
opacity: ${l-u*b}`}}function Swe(t,{delay:e=0,duration:r=400,easing:n=Kx,axis:a="y"}={}){const i=getComputedStyle(t),s=+i.opacity,o=a==="y"?"height":"width",l=parseFloat(i[o]),c=a==="y"?["top","bottom"]:["left","right"],u=c.map(_=>`${_[0].toUpperCase()}${_.slice(1)}`),d=parseFloat(i[`padding${u[0]}`]),h=parseFloat(i[`padding${u[1]}`]),m=parseFloat(i[`margin${u[0]}`]),f=parseFloat(i[`margin${u[1]}`]),g=parseFloat(i[`border${u[0]}Width`]),b=parseFloat(i[`border${u[1]}Width`]);return{delay:e,duration:r,easing:n,css:_=>`overflow: hidden;opacity: ${Math.min(_*20,1)*s};${o}: ${_*l}px;padding-${c[0]}: ${_*d}px;padding-${c[1]}: ${_*h}px;margin-${c[0]}: ${_*m}px;margin-${c[1]}: ${_*f}px;border-${c[0]}-width: ${_*g}px;border-${c[1]}-width: ${_*b}px;min-${o}: 0`}}function X7(t,{delay:e=0,duration:r=400,easing:n=Kx,start:a=0,opacity:i=0}={}){const s=getComputedStyle(t),o=+s.opacity,l=s.transform==="none"?"":s.transform,c=1-a,u=o*(1-i);return{delay:e,duration:r,easing:n,css:(d,h)=>`
transform: ${l} scale(${1-c*h});
opacity: ${o-u*h}
`}}var Ewe=q("<input/>"),vwe=q("<input/>");function ml(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=V(e,"value",15),a=V(e,"files",15),i=Ve(e,["$$slots","$$events","$$legacy","ref","value","type","files","class"]);var s=se(),o=L(s);{var l=u=>{var d=Ewe();$t(d,h=>({"data-slot":"input",class:h,type:"file",...i}),[()=>jt("flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs ring-offset-background transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e.class)],void 0,void 0,void 0,!0),mr(d,h=>r(h),()=>r()),cK(d,a),bf(d,n),C(u,d)},c=u=>{var d=vwe();$t(d,h=>({"data-slot":"input",class:h,style:"backdrop-filter: blur(0.5rem);",type:e.type,...i}),[()=>jt("flex h-9 w-full min-w-0 rounded-md border border-input bg-background px-3 py-1 text-base shadow-xs ring-offset-background transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e.class)],void 0,void 0,void 0,!0),mr(d,h=>r(h),()=>r()),bf(d,n),C(u,d)};le(o,u=>{e.type==="file"?u(l):u(c,!1)})}C(t,s),Te()}function rl(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class"]);var a=se(),i=L(a);{let s=F(()=>jt("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e.class));fe(i,()=>dte,(o,l)=>{l(o,ot({"data-slot":"label",get class(){return p(s)}},()=>n,{get ref(){return r()},set ref(c){r(c)}}))})}C(t,a),Te()}var ywe=q('<span class="text-destructive">*</span>'),Twe=q('<span class="text-xs text-muted-foreground/50">...</span>'),Cwe=q("<span> <!></span> <!>",1),wwe=q('<button type="button"> </button>'),Awe=q('<div class="absolute top-full right-0 left-0 z-10 mt-1 max-h-32 overflow-y-auto rounded-lg border border-border/50 bg-background shadow-lg"></div>'),Rwe=q('<div class="relative grid gap-1"><!> <!> <!></div>');function Owe(t,e){ye(e,!0);let r=V(e,"value",3,""),n=V(e,"suggestions",19,()=>[]),a=V(e,"isLoadingSuggestions",3,!1),i=V(e,"isAutocompleteActive",3,!1),s=V(e,"autocompleteIndex",3,0);var o=Rwe(),l=j(o);rl(l,{get for(){return`arg-${e.argument.name??""}`},class:"mb-1 text-muted-foreground",children:(h,m)=>{var f=Cwe(),g=L(f),b=j(g),_=te(b);{var S=v=>{var T=ywe();C(v,T)};le(_,v=>{e.argument.required&&v(S)})}Y(g);var E=te(g,2);{var y=v=>{var T=Twe();C(v,T)};le(E,v=>{a()&&v(y)})}we(()=>qe(b,`${e.argument.name??""} `)),C(h,f)},$$slots:{default:!0}});var c=te(l,2);{let h=F(()=>e.argument.description||e.argument.name);ml(c,{get id(){return`arg-${e.argument.name??""}`},type:"text",get value(){return r()},oninput:m=>e.onInput(m.currentTarget.value),get onkeydown(){return e.onKeydown},get onblur(){return e.onBlur},get onfocus(){return e.onFocus},get placeholder(){return p(h)},get required(){return e.argument.required},autocomplete:"off"})}var u=te(c,2);{var d=h=>{var m=Awe();xr(m,22,n,f=>f,(f,g,b)=>{var _=wwe();_.__mousedown=()=>e.onSelectSuggestion(g);var S=j(_,!0);Y(_),we(()=>{Et(_,1,`w-full px-3 py-1.5 text-left text-sm hover:bg-accent ${p(b)===s()?"bg-accent":""}`),qe(S,g)}),C(f,_)}),Y(m),li(3,m,()=>el,()=>({y:-5,duration:100})),C(h,m)};le(u,h=>{i()&&n().length>0&&h(d)})}Y(o),C(t,o),Te()}Bn(["mousedown"]);var Nwe=q('<div class="flex items-start gap-2 rounded-lg border border-destructive/50 bg-destructive/10 px-3 py-2 text-sm text-destructive" role="alert"><span class="shr
`)&&k(o,!0);const E=new ResizeObserver(y=>{for(const v of y){const T=v.target;k(o,T.offsetHeight>24*1.5),k(u,T.scrollHeight,!0)}});return E.observe(p(l)),()=>{E.disconnect()}});function f(){k(c,!p(c))}var g=FRe(),b=j(g);{var _=E=>{var y=ORe(),v=j(y);Qf(v),v.__keydown=s,v.__input=I=>i.setContent(I.currentTarget.value),mr(v,I=>a(I),()=>a());var T=te(v,2),w=j(T);Dr(w,{class:"h-8 px-3",get onclick(){return i.cancel},size:"sm",variant:"outline",children:(I,x)=>{var D=ARe(),$=L(D);Xl($,{class:"mr-1 h-3 w-3"}),et(),C(I,D)},$$slots:{default:!0}});var A=te(w,2);{let I=F(()=>!i.editedContent.trim());Dr(A,{class:"h-8 px-3",get onclick(){return i.save},get disabled(){return p(I)},size:"sm",children:(x,D)=>{var $=RRe(),H=L($);US(H,{class:"mr-1 h-3 w-3"}),et(),C(x,$)},$$slots:{default:!0}})}Y(T),Y(y),we(()=>{pO(v,i.editedContent),Et(v,1,`min-h-[60px] w-full resize-none rounded-2xl px-3 py-2 text-sm ${OI??""}`)}),C(E,y)},S=E=>{var y=LRe(),v=L(y);{var T=I=>{var x=kRe(),D=j(x);D.__click=function(...H){(p(m)&&!p(c)?f:void 0)?.apply(this,H)};var $=j(D);{let H=F(()=>p(o)?"":void 0);Pc($,{class:"overflow-y-auto rounded-[1.125rem] !border-2 !border-dashed !border-border/50 bg-muted px-3.75 py-1.5 data-[multiline]:py-2.5",get"data-multiline"(){return p(H)},style:"border: 2px dashed hsl(var(--border)); max-height: var(--max-message-height); overflow-wrap: anywhere; word-break: break-word;",children:(G,K)=>{var z=MRe(),re=L(z),W=j(re);{var ie=U=>{var X=NRe(),ne=j(X);k3(ne,{class:"markdown-system-content -my-4",get content(){return e.message.content}}),Y(X),mr(X,ue=>k(l,ue),()=>p(l)),we(()=>Et(X,1,Hr(p(c)?"cursor-text":""))),C(U,X)},M=U=>{var X=IRe(),ne=j(X,!0);Y(X),mr(X,ue=>k(l,ue),()=>p(l)),we(()=>{Et(X,1,`text-md whitespace-pre-wrap ${p(c)?"cursor-text":""}`),qe(ne,e.message.content)}),C(U,X)};le(W,U=>{h.renderUserContentAsMarkdown?U(ie):U(M,!1)})}var B=te(W,2);{var J=U=>{var X=xRe(),ne=te(L(X),2),ue=j(ne);Dr(ue,{class:"rounded-full px-4 py-1.5 text-xs shadow-md",size:"sm",variant:"outline",children:(he,be)=>{et();var Z=Nt("Show full system message");C(he,Z)},$$slots:{default:!0}}),Y(ne),C(U,X)};le(B,U=>{!p(c)&&p(m)&&U(J)})}Y(re);var N=te(re,2);{var O=U=>{var X=DRe(),ne=j(X);Dr(ne,{class:"rounded-full px-4 py-1.5 text-xs",onclick:ue=>{ue.stopPropagation(),f()},size:"sm",variant:"outline",children:(ue,he)=>{et();var be=Nt("Collapse System Message");C(ue,be)},$$slots:{default:!0}}),Y(X),C(U,X)};le(N,U=>{p(c)&&p(m)&&U(O)})}we(()=>{Et(re,1,`relative transition-all duration-300 ${p(c)?"cursor-text select-text":"select-none"}`),ms(re,!p(c)&&p(m)?`max-height: ${d}px;`:"max-height: none;")}),C(G,z)},$$slots:{default:!0}})}Y(D),Y(x),we(()=>Et(D,1,`group/expand w-full text-left ${!p(c)&&p(m)?"cursor-pointer":"cursor-auto"}`)),C(I,x)};le(v,I=>{e.message.content.trim()&&I(T)})}var w=te(v,2);{var A=I=>{var x=PRe(),D=j(x);yE(D,{actionsPosition:"right",get deletionInfo(){return e.deletionInfo},justify:"end",get onConfirmDelete(){return e.onConfirmDelete},get onCopy(){return e.onCopy},get onDelete(){return e.onDelete},get onEdit(){return e.onEdit},get onNavigateToSibling(){return e.onNavigateToSibling},get onShowDeleteDialogChange(){return e.onShowDeleteDialogChange},get siblingInfo(){return n()},get showDeleteDialog(){return e.showDeleteDialog},get role(){return tr.USER}}),Y(x),C(I,x)};le(w,I=>{e.message.timestamp&&I(A)})}C(E,y)};le(b,E=>{i.isEditing?E(_):E(S,!1)})}Y(g),we(()=>Et(g,1,`group flex flex-col items-end gap-3 md:gap-2 ${r()??""}`)),C(t,g),Te()}Bn(["keydown","input","click"]);var URe=q('<div class="flex items-center gap-2"><!> <label for="save-only-switch" class="cursor-pointer text-xs text-muted-foreground">Update without re-sending</label></div>'),GRe=q("<div></div>"),qRe=q("<!> Cancel",1),zRe=q('<div class="relative w-full max-w-[80%]"><!></div> <div class="mt-2 flex w-full max-w-[80%] items-center justify-between"><!> <!></div> <!>',1);function p$(t,e){ye(e,!0);const r=Ig();let n=_e(void 0),a=_e(!1),i=_e(!1),s=F(()=>!!(r.editedContent!==r.originalContent||r.editedUploadedFiles.length>0||r.editedExtras.length!==r.originalExtras.length||r.edited
`)){k(i,!0);return}const h=new ResizeObserver(m=>{for(const f of m){const g=f.target;k(i,g.offsetHeight>24*1.5)}});return h.observe(p(s)),()=>{h.disconnect()}});var l=KRe(),c=j(l);{var u=h=>{p$(h,{})},d=h=>{var m=WRe(),f=L(m);{var g=y=>{var v=$Re(),T=j(v);AG(T,{get attachments(){return e.message.extra},readonly:!0,imageHeight:"h-80"}),Y(v),C(y,v)};le(f,y=>{e.message.extra&&e.message.extra.length>0&&y(g)})}var b=te(f,2);{var _=y=>{{let v=F(()=>p(i)?"":void 0);Pc(y,{class:"max-w-[80%] overflow-y-auto rounded-[1.125rem] border-none bg-primary/5 px-3.75 py-1.5 text-foreground backdrop-blur-md data-[multiline]:py-2.5 dark:bg-primary/15",get"data-multiline"(){return p(v)},style:"max-height: var(--max-message-height); overflow-wrap: anywhere; word-break: break-word;",children:(T,w)=>{var A=se(),I=L(A);{var x=$=>{var H=HRe(),G=j(H);k3(G,{class:"markdown-user-content -my-4",get content(){return e.message.content}}),Y(H),mr(H,K=>k(s,K),()=>p(s)),C($,H)},D=$=>{var H=YRe(),G=j(H,!0);Y(H),mr(H,K=>k(s,K),()=>p(s)),we(()=>qe(G,e.message.content)),C($,H)};le(I,$=>{o.renderUserContentAsMarkdown?$(x):$(D,!1)})}C(T,A)},$$slots:{default:!0}})}};le(b,y=>{e.message.content.trim()&&y(_)})}var S=te(b,2);{var E=y=>{var v=VRe(),T=j(v);yE(T,{actionsPosition:"right",get deletionInfo(){return e.deletionInfo},justify:"end",get onConfirmDelete(){return e.onConfirmDelete},get onCopy(){return e.onCopy},get onDelete(){return e.onDelete},get onEdit(){return e.onEdit},get onForkConversation(){return e.onForkConversation},get onNavigateToSibling(){return e.onNavigateToSibling},get onShowDeleteDialogChange(){return e.onShowDeleteDialogChange},get siblingInfo(){return n()},get showDeleteDialog(){return e.showDeleteDialog},get role(){return tr.USER}}),Y(v),C(y,v)};le(S,y=>{e.message.timestamp&&y(E)})}C(h,m)};le(c,h=>{a.isEditing?h(u):h(d,!1)})}Y(l),we(()=>Et(l,1,`group flex flex-col items-end gap-3 md:gap-2 ${r()??""}`)),C(t,l),Te()}function m$(){let t=_e(!1),e=_e(null),r=_e(null);const n=F(()=>p(t)?zTe():p(e));It(()=>{p(n)&&p(t)&&k(e,p(n),!0)}),It(()=>{if(p(n)?.promptProgress){const{processed:f,total:g,time_ms:b,cache:_}=p(n).promptProgress,S=f-_,E=g-_;if(S>0&&b>0){const y=S/(b/1e3);k(r,{tokensProcessed:S,totalTokens:E,timeMs:b,tokensPerSecond:y},!0)}}});function a(f,g,b){const _=b/1e3;return f===0||_<.5?void 0:_*(g/f-1)}function i(){p(t)||k(t,!0)}function s(){if(!p(t))return;k(t,!1),An().keepStatsVisible||(k(e,null),k(r,null))}function o(){if(!p(n))return"Processing...";switch(p(n).status){case"initializing":return"Initializing...";case"preparing":return p(n).progressPercent!==void 0?`Processing (${p(n).progressPercent}%)`:"Preparing response...";case"generating":return"";default:return"Processing..."}}function l(){const f=p(n)||p(e);if(!f)return[];const g=[];if(f.promptProgress){const{processed:b,total:_,time_ms:S,cache:E}=f.promptProgress,y=b-E,v=_-E;if(y<v&&y>0){const T=Math.round(y/v*100),w=a(y,v,S);if(w!==void 0){const A=Math.ceil(w);g.push(`Processing ${T}% (ETA: ${A}s)`)}else g.push(`Processing ${T}%`)}}if(typeof f.contextTotal=="number"&&f.contextUsed>=0&&f.contextTotal>0){const b=Math.round(f.contextUsed/f.contextTotal*100);g.push(`Context: ${f.contextUsed}/${f.contextTotal} (${b}%)`)}if(f.outputTokensUsed>0)if(f.outputTokensMax<=0)g.push(`Output: ${f.outputTokensUsed}/∞`);else{const b=Math.round(f.outputTokensUsed/f.outputTokensMax*100);g.push(`Output: ${f.outputTokensUsed}/${f.outputTokensMax} (${b}%)`)}return f.tokensPerSecond&&f.tokensPerSecond>0&&g.push(`${f.tokensPerSecond.toFixed(1)} ${w5.TOKENS_PER_SECOND}`),f.speculative&&g.push("Speculative decoding enabled"),g}function c(){const f=p(n)||p(e);if(!f)return[];const g=[];if(typeof f.contextTotal=="number"&&f.contextUsed>=0&&f.contextTotal>0){const b=Math.round(f.contextUsed/f.contextTotal*100);g.push(`Context: ${f.contextUsed}/${f.contextTotal} (${b}%)`)}if(f.outputTokensUsed>0)if(f.outputTokensMax<=0)g.push(`Output: ${f.outputTokensUsed}/∞`);else{const b=Math.round(f.outputTokensUsed/f.outputTokensMax*100);g.push(`Output: ${f.outputTokensUsed}/${f.outputTokensMax} (${b}%)`)}return f.tok
parameters to the values provided by the server's /props endpoint and remove all your custom
configurations.`);C(W,M)},$$slots:{default:!0}})}),C(D,H)},$$slots:{default:!0}})});var A=te(w,2);fe(A,()=>sd,(I,x)=>{x(I,{children:(D,$)=>{var H=bOe(),G=L(H);fe(G,()=>Ux,(z,re)=>{re(z,{children:(W,ie)=>{et();var M=Nt("Cancel");C(W,M)},$$slots:{default:!0}})});var K=te(G,2);fe(K,()=>Eh,(z,re)=>{re(z,{onclick:a,children:(W,ie)=>{et();var M=Nt("Reset to Default");C(W,M)},$$slots:{default:!0}})}),C(D,H)},$$slots:{default:!0}})}),C(y,T)},$$slots:{default:!0}})}),C(f,b)},$$slots:{default:!0}})}),C(t,s),Te()}var yOe=q('<span class="absolute right-2 flex size-3.5 items-center justify-center"><!></span> <!>',1);function TOe(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class","value","label","children"]);var a=se(),i=L(a);{const s=(l,c)=>{let u=()=>c?.().selected,d=()=>c?.().highlighted;var h=yOe(),m=L(h),f=j(m);{var g=E=>{US(E,{class:"size-4"})};le(f,E=>{u()&&E(g)})}Y(m);var b=te(m,2);{var _=E=>{var y=se(),v=L(y);De(v,()=>e.children,()=>({selected:u(),highlighted:d()})),C(E,y)},S=E=>{var y=Nt();we(()=>qe(y,e.label||e.value)),C(E,y)};le(b,E=>{e.children?E(_):E(S,!1)})}C(l,h)};let o=F(()=>jt("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e.class));fe(i,()=>Nee,(l,c)=>{c(l,ot({get value(){return e.value},"data-slot":"select-item",get class(){return p(o)}},()=>n,{get ref(){return r()},set ref(u){r(u)},children:s,$$slots:{default:!0}}))})}C(t,a),Te()}function COe(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class"]);var a=se(),i=L(a);{let s=F(()=>jt("flex cursor-default items-center justify-center py-1",e.class));fe(i,()=>Fee,(o,l)=>{l(o,ot({"data-slot":"select-scroll-up-button",get class(){return p(s)}},()=>n,{get ref(){return r()},set ref(c){r(c)},children:(c,u)=>{mre(c,{class:"size-4"})},$$slots:{default:!0}}))})}C(t,a),Te()}function wOe(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=Ve(e,["$$slots","$$events","$$legacy","ref","class"]);var a=se(),i=L(a);{let s=F(()=>jt("flex cursor-default items-center justify-center py-1",e.class));fe(i,()=>kee,(o,l)=>{l(o,ot({"data-slot":"select-scroll-down-button",get class(){return p(s)}},()=>n,{get ref(){return r()},set ref(c){r(c)},children:(c,u)=>{Yc(c,{class:"size-4"})},$$slots:{default:!0}}))})}C(t,a),Te()}var AOe=q("<!> <!> <!>",1);function ROe(t,e){ye(e,!0);let r=V(e,"ref",15,null),n=V(e,"sideOffset",3,4),a=Ve(e,["$$slots","$$events","$$legacy","ref","class","sideOffset","portalProps","children"]),i;vi(()=>{const l={passive:!1},c=d=>{if(!r())return;const h=d.target;(!h||!r().contains(h))&&(d.preventDefault(),d.stopPropagation())},u=d=>{if(!r())return;const h=d.target;(!h||!r().contains(h))&&(d.preventDefault(),d.stopPropagation())};return document.addEventListener("wheel",c,l),document.addEventListener("touchmove",u,l),()=>{document.removeEventListener("wheel",c,l),document.removeEventListener("touchmove",u,l)}}),It(()=>{const l=r();if(i?.(),!l)return;const c=d=>{d.stopPropagation()},u=d=>{d.stopPropagation()};l.addEventListener("wheel",c),l.addEventListener("touchmove",u),i=()=>{l.removeEventListener("wheel",c),l.removeEventListener("touchmove",u)}}),_O(()=>{i?.()});var s=se(),o=L(s);fe(o,()=>iu,(l,c)=>{c(l,ot(()=>e.portalProps,{children:(u,d)=>{var h=se(),m=L(h);{let f=F(()=>jt("relative z-[var(--layer-popover,1000000)] max-h-(--bits-select-content-available-height) min-w-[8rem] origin-(--bits-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:translate-y-1 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:-translate-x-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:translate-x-1 data-[side=r
conversation history.</p> <!> <!></div> <div class="grid border-t border-border/30 pt-4"><h4 class="mb-2 text-sm font-medium">Import Conversations</h4> <p class="mb-4 text-sm text-muted-foreground">Import one or more conversations from a previously exported JSON file. This will merge with
your existing conversations.</p> <!> <!></div> <div class="grid border-t border-border/30 pt-4"><h4 class="mb-2 text-sm font-medium text-destructive">Delete All Conversations</h4> <p class="mb-4 text-sm text-muted-foreground">Permanently delete all conversations and their messages. This action cannot be undone.
Consider exporting your conversations first if you want to keep a backup.</p> <!></div></div></div> <!> <!> <!>`,1);function oNe(t,e){ye(e,!0);let r=_e(Tr([])),n=_e(Tr([])),a=_e(!1),i=_e(!1),s=_e(!1),o=_e(!1),l=_e(Tr([])),c=_e(Tr(new Map)),u=_e(Tr([])),d=_e(!1);async function h(){try{const ie=qd();if(ie.length===0){ea.info("No conversations to export");return}const M=await Promise.all(ie.map(async B=>{const J=await rt.getConversationMessages(B.id);return{conv:B,messages:J}}));k(c,s4(M),!0),k(l,ie,!0),k(s,!0)}catch(ie){console.error("Failed to load conversations:",ie),alert("Failed to load conversations")}}async function m(ie){try{const M=await Promise.all(ie.map(async B=>{const J=await rt.getConversationMessages(B.id);return{conv:sp(B),messages:sp(J)}}));rt.downloadConversationFile(M,`${new Date().toISOString().split(nG)[0]}_conversations.json`),k(r,ie,!0),k(a,!0),k(i,!1),k(s,!1)}catch(M){console.error("Export failed:",M),alert("Failed to export conversations")}}async function f(){try{const ie=document.createElement("input");ie.type="file",ie.accept=".json",ie.onchange=async M=>{const B=M.target?.files?.[0];if(B)try{const J=await B.text(),N=JSON.parse(J);let O;if(Array.isArray(N))O=N;else if(N&&typeof N=="object"&&"conv"in N&&"messages"in N)O=[N];else throw new Error("Invalid file format: expected array of conversations or single conversation object");k(u,O,!0),k(l,O.map(U=>U.conv),!0),k(c,s4(O),!0),k(o,!0)}catch(J){const N=J instanceof Error?J.message:"Unknown error";console.error("Failed to parse file:",J),alert(`Failed to parse file: ${N}`)}},ie.click()}catch(ie){console.error("Import failed:",ie),alert("Failed to import conversations")}}async function g(ie){try{const M=new Set(ie.map(J=>J.id)),B=sp(p(u)).filter(J=>M.has(J.conv.id));await rt.importConversationsData(B),k(n,ie,!0),k(i,!0),k(a,!1),k(o,!1)}catch(M){console.error("Import failed:",M),alert("Failed to import conversations. Please check the file format.")}}async function b(){try{if(qd().length===0){ea.info("No conversations to delete");return}k(d,!0)}catch(ie){console.error("Failed to load conversations for deletion:",ie),ea.error("Failed to load conversations")}}async function _(){try{await rt.deleteAll(),k(d,!1)}catch(ie){console.error("Failed to delete conversations:",ie)}}function S(){k(d,!1)}var E=sNe(),y=L(E),v=j(y),T=j(v),w=te(j(T),4);Dr(w,{class:"w-full justify-start justify-self-start md:w-auto",onclick:h,variant:"outline",children:(ie,M)=>{var B=XOe(),J=L(B);GS(J,{class:"mr-2 h-4 w-4"}),et(),C(ie,B)},$$slots:{default:!0}});var A=te(w,2);{var I=ie=>{var M=eNe(),B=j(M),J=j(B);Y(B);var N=te(B,2),O=j(N);xr(O,17,()=>p(r).slice(0,10),ne=>ne.id,(ne,ue)=>{var he=ZOe(),be=j(he);Y(he),we(()=>qe(be,`• ${p(ue).name||"Untitled conversation"}`)),C(ne,he)});var U=te(O,2);{var X=ne=>{var ue=JOe(),he=j(ue);Y(ue),we(()=>qe(he,`... and ${p(r).length-10} more`)),C(ne,ue)};le(U,ne=>{p(r).length>10&&ne(X)})}Y(N),Y(M),we(()=>qe(J,`Exported ${p(r).length??""} conversation${p(r).length===1?"":"s"}`)),C(ie,M)};le(A,ie=>{p(a)&&p(r).length>0&&ie(I)})}Y(T);var x=te(T,2),D=te(j(x),4);Dr(D,{class:"w-full justify-start justify-self-start md:w-auto",onclick:f,variant:"outline",children:(ie,M)=>{var B=tNe(),J=L(B);HU(J,{class:"mr-2 h-4 w-4"}),et(),C(ie,B)},$$slots:{default:!0}});var $=te(D,2);{var H=ie=>{var M=aNe(),B=j(M),J=j(B);Y(B);var N=te(B,2),O=j(N);xr(O,17,()=>p(n).slice(0,10),ne=>ne.id,(ne,ue)=>{var he=rNe(),be=j(he);Y(he),we(()=>qe(be,`• ${p(ue).name||"Untitled conversation"}`)),C(ne,he)});var U=te(O,2);{var X=ne=>{var ue=nNe(),he=j(ue);Y(ue),we(()=>qe(he,`... and ${p(n).length-10} more`)),C(ne,ue)};le(U,ne=>{p(n).length>10&&ne(X)})}Y(N),Y(M),we(()=>qe(J,`Imported ${p(n).length??""} conversation${p(n).length===1?"":"s"}`)),C(ie,M)};le($,ie=>{p(i)&&p(n).length>0&&ie(H)})}Y(x);var G=te(x,2),K=te(j(G),4);Dr(K,{class:"text-destructive-foreground w-full justify-start justify-self-start bg-destructive hover:bg-destructive/80 md:w-auto",onclick:b,variant:"destructive",children:(ie,M)=>{var B=iNe(),J=L(B);Wc(J,{class:"mr-2 h-4 w-4"}),et(),C(ie,B)},$$slots:{default:!0}}),Y(
`;break}case-3:{s=`\r
`;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&a)continue;s=" ";break}default:s=String.fromCharCode(i)}a=i===-2,n.push(s)}return n.join("")}function wxe(t){const n={constructs:b$([vxe,...(t||{}).extensions||[]]),content:a(GNe),defined:[],document:a(zNe),flow:a(sxe),lazy:{},string:a(cxe),text:a(uxe)};return n;function a(i){return s;function s(o){return yxe(n,i,o)}}}function Axe(t){for(;!T$(t););return t}const dL=/[\0\t\n\r]/g;function Rxe(){let t=1,e="",r=!0,n;return a;function a(i,s,o){const l=[];let c,u,d,h,m;for(i=e+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),d=0,e="",r&&(i.charCodeAt(0)===65279&&d++,r=void 0);d<i.length;){if(dL.lastIndex=d,c=dL.exec(i),h=c&&c.index!==void 0?c.index:i.length,m=i.charCodeAt(h),!c){e=i.slice(d);break}if(m===10&&d===h&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),d<h&&(l.push(i.slice(d,h)),t+=h-d),m){case 0:{l.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,l.push(-2);t++<u;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:n=!0,t=1}d=h+1}return o&&(n&&l.push(-5),e&&l.push(e),l.push(null)),l}}const Oxe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function N$(t){return t.replace(Oxe,Nxe)}function Nxe(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){const a=r.charCodeAt(1),i=a===120||a===88;return S$(r.slice(i?2:1),i?16:10)}return Xx(r)||t}function M1(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?hL(t.position):"start"in t||"end"in t?hL(t):"line"in t||"column"in t?w2(t):""}function w2(t){return pL(t&&t.line)+":"+pL(t&&t.column)}function hL(t){return w2(t&&t.start)+"-"+w2(t&&t.end)}function pL(t){return t&&typeof t=="number"?t:1}const I$={}.hasOwnProperty;function Ixe(t,e,r){return typeof e!="string"&&(r=e,e=void 0),xxe(r)(Axe(wxe(r).document().write(Rxe()(t,e,!0))))}function xxe(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Ue),autolinkProtocol:I,autolinkEmail:I,atxHeading:i(Ee),blockQuote:i(be),characterEscape:I,characterReference:I,codeFenced:i(Z),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(Z,s),codeText:i(ae,s),codeTextData:I,data:I,codeFlowValue:I,definition:i(pe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(me),hardBreakEscape:i(Ce),hardBreakTrailing:i(Ce),htmlFlow:i(Ne,s),htmlFlowData:I,htmlText:i(Ne,s),htmlTextData:I,image:i(Ie),label:s,link:i(Ue),listItem:i(je),listItemValue:h,listOrdered:i(Fe,d),listUnordered:i(Fe),paragraph:i(He),reference:N,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(Ee),strong:i(at),thematicBreak:i(dt)},exit:{atxHeading:l(),atxHeadingSequence:v,autolink:l(),autolinkEmail:he,autolinkProtocol:ue,blockQuote:l(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:X,characterReference:ne,codeFenced:l(b),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:f,codeFlowValue:x,codeIndented:l(_),codeText:l(K),codeTextData:x,data:x,definition:l(),definitionDestinationString:y,definitionLabelString:S,definitionTitleString:E,emphasis:l(),hardBreakEscape:l($),hardBreakTrailing:l($),htmlFlow:l(H),htmlFlowData:x,htmlText:l(G),htmlTextData:x,image:l(re),label:ie,labelText:W,lineEnding:D,link:l(z),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:O,resourceDestinationString:M,resourceTitleString:B,resource:J,setextHeading:l(A),setextHeadingLineSequence:w,setextHeadingText:T,strong:l(),thematicBreak:l()}};x$(e,(t||{}).mdastExtensions||[]);const r={};return n;function n(Ae){let Le={type:"root",children:[]};const ht={stack:[Le],tokenStack:[],config:e,enter:o,exit:c,buffer:s,resume:u,data:r},ze=[];let ft=-1;for(;++ft<Ae.length;)if(Ae[ft][1].type==="listOrdered"||Ae[ft][1].type==="listUnordered")if(Ae[ft][0]==="enter")ze.push(ft);else{const At=ze.pop();ft=a(Ae,At,ft)}for(ft=-1;++ft<Ae.length;){const At=e[Ae[ft][0]];I$.call(At,Ae[ft][1].type)&&At[Ae[ft][1].type].call(Object.assign({sliceSerialize:Ae[ft][2].sliceSerialize},ht),Ae[ft][1
`&&k$(r.stack,r.unsafe[a]))return/[ \t]/.test(n.before)?"":" ";return`\\
`}function P$(t,e){const r=String(t);let n=r.indexOf(e),a=n,i=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===a?++i>s&&(s=i):i=1,a=n+e.length,n=r.indexOf(e,a);return s}function A2(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function Bxe(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function Uxe(t,e,r,n){const a=Bxe(r),i=t.value||"",s=a==="`"?"GraveAccent":"Tilde";if(A2(t,r)){const d=r.enter("codeIndented"),h=r.indentLines(i,Gxe);return d(),h}const o=r.createTracker(n),l=a.repeat(Math.max(P$(i,a)+1,3)),c=r.enter("codeFenced");let u=o.move(l);if(t.lang){const d=r.enter(`codeFencedLang${s}`);u+=o.move(r.safe(t.lang,{before:u,after:" ",encode:["`"],...o.current()})),d()}if(t.lang&&t.meta){const d=r.enter(`codeFencedMeta${s}`);u+=o.move(" "),u+=o.move(r.safe(t.meta,{before:u,after:`
`,encode:["`"],...o.current()})),d()}return u+=o.move(`
`),i&&(u+=o.move(i+`
`)),u+=o.move(l),c(),u}function Gxe(t,e,r){return(r?"":" ")+t}function Jx(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function qxe(t,e,r,n){const a=Jx(r),i=a==='"'?"Quote":"Apostrophe",s=r.enter("definition");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("[");return c+=l.move(r.safe(r.associationId(t),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!t.url||/[\0- \u007F]/.test(t.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(t.url,{before:c,after:t.title?" ":`
`,...l.current()}))),o(),t.title&&(o=r.enter(`title${i}`),c+=l.move(" "+a),c+=l.move(r.safe(t.title,{before:c,after:a,...l.current()})),c+=l.move(a),o()),s(),c}function zxe(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Wu(t){return"&#x"+t.toString(16).toUpperCase()+";"}function qb(t,e,r){const n=$p(t),a=$p(e);return n===void 0?a===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}L$.peek=$xe;function L$(t,e,r,n){const a=zxe(r),i=r.enter("emphasis"),s=r.createTracker(n),o=s.move(a);let l=s.move(r.containerPhrasing(t,{after:a,before:o,...s.current()}));const c=l.charCodeAt(0),u=qb(n.before.charCodeAt(n.before.length-1),c,a);u.inside&&(l=Wu(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=qb(n.after.charCodeAt(0),d,a);h.inside&&(l=l.slice(0,-1)+Wu(d));const m=s.move(a);return i(),r.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},o+l+m}function $xe(t,e,r){return r.options.emphasis||"*"}const Dg=function(t){if(t==null)return Wxe;if(typeof t=="function")return AE(t);if(typeof t=="object")return Array.isArray(t)?Hxe(t):Yxe(t);if(typeof t=="string")return Vxe(t);throw new Error("Expected function, string, or object as test")};function Hxe(t){const e=[];let r=-1;for(;++r<t.length;)e[r]=Dg(t[r]);return AE(n);function n(...a){let i=-1;for(;++i<e.length;)if(e[i].apply(this,a))return!0;return!1}}function Yxe(t){const e=t;return AE(r);function r(n){const a=n;let i;for(i in t)if(a[i]!==e[i])return!1;return!0}}function Vxe(t){return AE(e);function e(r){return r&&r.type===t}}function AE(t){return e;function e(r,n,a){return!!(Kxe(r)&&t.call(this,r,typeof n=="number"?n:void 0,a||void 0))}}function Wxe(){return!0}function Kxe(t){return t!==null&&typeof t=="object"&&"type"in t}const F$=[],jxe=!0,R2=!1,B$="skip";function RE(t,e,r,n){let a;typeof e=="function"&&typeof r!="function"?(n=r,r=e):a=e;const i=Dg(a),s=n?-1:1;o(t,void 0,[])();function o(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const m=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(m?"<"+m+">":""))+")"})}return h;function h(){let m=F$,f,g,b;if((!e||i(l,c,u[u.length-1]||void 0))&&(m=Qxe(r(l,u)),m[0]===R2))return m;if("children"in l&&l.children){const _=l;if(_.children&&m[0]!==B$)for(g=(n?_.children.length:-1)+s,b=u.concat(_);g>-1&&g<_.children.length;){const S=_.children[g];if(f=o(S,g,b)(),f[0]===R2)return f;g=typeof f[1]=="number"?f[1]:g+s}}return m}}}function Qxe(t){return Array.isArray(t)?t:typeof t=="number"?[jxe,t]:t==null?F$:[t]}function su(t,e,r,n){let a,i,s;typeof e=="function"&&typeof r!="function"?(i=void 0,s=e,a=r):(i=e,s=r,a=n),RE(t,i,o,a);function o(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return s(l,d,u)}}function U$(t,e){let r=!1;return su(t,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,R2}),!!((!t.depth||t.depth<3)&&Qx(t)&&(e.options.setext||r))}function Xxe(t,e,r,n){const a=Math.max(Math.min(6,t.depth||1),1),i=r.createTracker(n);if(U$(t,r)){const u=r.enter("headingSetext"),d=r.enter("phrasing"),h=r.containerPhrasing(t,{...i.current(),before:`
`,after:`
`});return d(),u(),h+`
`+(a===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
`))+1))}const s="#".repeat(a),o=r.enter("headingAtx"),l=r.enter("phrasing");i.move(s+" ");let c=r.containerPhrasing(t,{before:"# ",after:`
`,...i.current()});return/^[\t ]/.test(c)&&(c=Wu(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,r.options.closeAtx&&(c+=" "+s),l(),o(),c}G$.peek=Zxe;function G$(t){return t.value||""}function Zxe(){return"<"}q$.peek=Jxe;function q$(t,e,r,n){const a=Jx(r),i=a==='"'?"Quote":"Apostrophe",s=r.enter("image");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("![");return c+=l.move(r.safe(t.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(t.url,{before:c,after:t.title?" ":")",...l.current()}))),o(),t.title&&(o=r.enter(`title${i}`),c+=l.move(" "+a),c+=l.move(r.safe(t.title,{before:c,after:a,...l.current()})),c+=l.move(a),o()),c+=l.move(")"),s(),c}function Jxe(){return"!"}z$.peek=e3e;function z$(t,e,r,n){const a=t.referenceType,i=r.enter("imageReference");let s=r.enter("label");const o=r.createTracker(n);let l=o.move("![");const c=r.safe(t.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),s();const u=r.stack;r.stack=[],s=r.enter("reference");const d=r.safe(r.associationId(t),{before:l,after:"]",...o.current()});return s(),r.stack=u,i(),a==="full"||!c||c!==d?l+=o.move(d+"]"):a==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function e3e(){return"!"}$$.peek=t3e;function $$(t,e,r){let n=t.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(n);)a+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++i<r.unsafe.length;){const s=r.unsafe[i],o=r.compilePattern(s);let l;if(s.atBreak)for(;l=o.exec(n);){let c=l.index;n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(l.index+1)}}return a+n+a}function t3e(){return"`"}function H$(t,e){const r=Qx(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Y$.peek=r3e;function Y$(t,e,r,n){const a=Jx(r),i=a==='"'?"Quote":"Apostrophe",s=r.createTracker(n);let o,l;if(H$(t,r)){const u=r.stack;r.stack=[],o=r.enter("autolink");let d=s.move("<");return d+=s.move(r.containerPhrasing(t,{before:d,after:">",...s.current()})),d+=s.move(">"),o(),r.stack=u,d}o=r.enter("link"),l=r.enter("label");let c=s.move("[");return c+=s.move(r.containerPhrasing(t,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=r.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(r.safe(t.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=r.enter("destinationRaw"),c+=s.move(r.safe(t.url,{before:c,after:t.title?" ":")",...s.current()}))),l(),t.title&&(l=r.enter(`title${i}`),c+=s.move(" "+a),c+=s.move(r.safe(t.title,{before:c,after:a,...s.current()})),c+=s.move(a),l()),c+=s.move(")"),o(),c}function r3e(t,e,r){return H$(t,r)?"<":"["}V$.peek=n3e;function V$(t,e,r,n){const a=t.referenceType,i=r.enter("linkReference");let s=r.enter("label");const o=r.createTracker(n);let l=o.move("[");const c=r.containerPhrasing(t,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),s();const u=r.stack;r.stack=[],s=r.enter("reference");const d=r.safe(r.associationId(t),{before:l,after:"]",...o.current()});return s(),r.stack=u,i(),a==="full"||!c||c!==d?l+=o.move(d+"]"):a==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function n3e(){return"["}function e3(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function a3e(t){const e=e3(t),r=t.options.bulletOther;if(!r)return e==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+r+"`) to be different");return r}function i3e(t){const e=t.options.bulletOrdered||".";if(e!=="."
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Id},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Id},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:Id},{atBreak:!0,character:"+",after:`(?:[ \r
])`},{atBreak:!0,character:"-",after:`(?:[ \r
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Id},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Id},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Id},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Id},{atBreak:!0,character:"~"}];function E3e(t){return t.label||!t.identifier?t.label||"":N$(t.identifier)}function v3e(t){if(!t._compiled){const e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function y3e(t,e,r){const n=e.indexStack,a=t.children||[],i=[];let s=-1,o=r.before,l;n.push(-1);let c=e.createTracker(r);for(;++s<a.length;){const u=a[s];let d;if(n[n.length-1]=s,s+1<a.length){let f=e.handle.handlers[a[s+1].type];f&&f.peek&&(f=f.peek),d=f?f(a[s+1],t,e,{before:"",after:"",...c.current()}).charAt(0):""}else d=r.after;i.length>0&&(o==="\r"||o===`
`)&&u.type==="html"&&(i[i.length-1]=i[i.length-1].replace(/(\r?\n|\r)$/," "),o=" ",c=e.createTracker(r),c.move(i.join("")));let h=e.handle(u,t,e,{...c.current(),after:d,before:o});l&&l===h.slice(0,1)&&(h=Wu(l.charCodeAt(0))+h.slice(1));const m=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,l=void 0,m&&(i.length>0&&m.before&&o===i[i.length-1].slice(-1)&&(i[i.length-1]=i[i.length-1].slice(0,-1)+Wu(o.charCodeAt(0))),m.after&&(l=d)),c.move(h),i.push(h),o=h.slice(-1)}return n.pop(),i.join("")}function T3e(t,e,r){const n=e.indexStack,a=t.children||[],i=e.createTracker(r),s=[];let o=-1;for(n.push(-1);++o<a.length;){const l=a[o];n[n.length-1]=o,s.push(i.move(e.handle(l,t,e,{before:`
`,after:`
`,...i.current()}))),l.type!=="list"&&(e.bulletLastUsed=void 0),o<a.length-1&&s.push(i.move(C3e(l,a[o+1],t,e)))}return n.pop(),s.join("")}function C3e(t,e,r,n){let a=n.join.length;for(;a--;){const i=n.join[a](t,e,r,n);if(i===!0||i===1)break;if(typeof i=="number")return`
`.repeat(1+i);if(i===!1)return`
<!---->
`}return`
`}const w3e=/\r?\n|\r/g;function A3e(t,e){const r=[];let n=0,a=0,i;for(;i=w3e.exec(t);)s(t.slice(n,i.index)),r.push(i[0]),n=i.index+i[0].length,a++;return s(t.slice(n)),r.join("");function s(o){r.push(e(o,a,!o))}}function R3e(t,e,r){const n=(r.before||"")+(e||"")+(r.after||""),a=[],i=[],s={};let o=-1;for(;++o<t.unsafe.length;){const u=t.unsafe[o];if(!k$(t.stack,u))continue;const d=t.compilePattern(u);let h;for(;h=d.exec(n);){const m="before"in u||!!u.atBreak,f="after"in u,g=h.index+(m?h[1].length:0);a.includes(g)?(s[g].before&&!m&&(s[g].before=!1),s[g].after&&!f&&(s[g].after=!1)):(a.push(g),s[g]={before:m,after:f})}}a.sort(O3e);let l=r.before?r.before.length:0;const c=n.length-(r.after?r.after.length:0);for(o=-1;++o<a.length;){const u=a[o];u<l||u>=c||u+1<c&&a[o+1]===u+1&&s[u].after&&!s[u+1].before&&!s[u+1].after||a[o-1]===u-1&&s[u].before&&!s[u-1].before&&!s[u-1].after||(l!==u&&i.push(SL(n.slice(l,u),"\\")),l=u,/[!-/:-@[-`{-~]/.test(n.charAt(u))&&(!r.encode||!r.encode.includes(n.charAt(u)))?i.push("\\"):(i.push(Wu(n.charCodeAt(u))),l++))}return i.push(SL(n.slice(l,c),r.after)),i.join("")}function O3e(t,e){return t-e}function SL(t,e){const r=/\\(?=[!-/:-@[-`{-~])/g,n=[],a=[],i=t+e;let s=-1,o=0,l;for(;l=r.exec(i);)n.push(l.index);for(;++s<n.length;)o!==n[s]&&a.push(t.slice(o,n[s])),a.push("\\"),o=n[s];return a.push(t.slice(o)),a.join("")}function N3e(t){const e=t||{},r=e.now||{};let n=e.lineShift||0,a=r.line||1,i=r.column||1;return{move:l,current:s,shift:o};function s(){return{now:{line:a,column:i},lineShift:n}}function o(c){n+=c}function l(c){const u=c||"",d=u.split(/\r?\n|\r/g),h=d[d.length-1];return a+=d.length-1,i=d.length===1?i+h.length:1+h.length+n,u}}function I3e(t,e){const r=e||{},n={associationId:E3e,containerPhrasing:k3e,containerFlow:P3e,createTracker:N3e,compilePattern:v3e,enter:i,handlers:{...t3},handle:void 0,indentLines:A3e,indexStack:[],join:[..._3e],options:{},safe:L3e,stack:[],unsafe:[...S3e]};M$(n,r),n.options.tightDefinitions&&n.join.push(M3e),n.handle=D$("type",{invalid:x3e,unknown:D3e,handlers:n.handlers});let a=n.handle(t,void 0,n,{before:`
`,after:`
`,now:{line:1,column:1},lineShift:0});return a&&a.charCodeAt(a.length-1)!==10&&a.charCodeAt(a.length-1)!==13&&(a+=`
`),a;function i(s){return n.stack.push(s),o;function o(){n.stack.pop()}}}function x3e(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function D3e(t){const e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function M3e(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function k3e(t,e){return y3e(t,this,e)}function P3e(t,e){return T3e(t,this,e)}function L3e(t,e){return R3e(this,t,e)}function F3e(t){const e=this;e.compiler=r;function r(n){return I3e(n,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function EL(t){if(t)throw t}var Hw,vL;function B3e(){if(vL)return Hw;vL=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=function(c){return typeof Array.isArray=="function"?Array.isArray(c):e.call(c)==="[object Array]"},i=function(c){if(!c||e.call(c)!=="[object Object]")return!1;var u=t.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&t.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!u&&!d)return!1;var h;for(h in c);return typeof h>"u"||t.call(c,h)},s=function(c,u){r&&u.name==="__proto__"?r(c,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):c[u.name]=u.newValue},o=function(c,u){if(u==="__proto__")if(t.call(c,u)){if(n)return n(c,u).value}else return;return c[u]};return Hw=function l(){var c,u,d,h,m,f,g=arguments[0],b=1,_=arguments.length,S=!1;for(typeof g=="boolean"&&(S=g,g=arguments[1]||{},b=2),(g==null||typeof g!="object"&&typeof g!="function")&&(g={});b<_;++b)if(c=arguments[b],c!=null)for(u in c)d=o(g,u),h=o(c,u),g!==h&&(S&&h&&(i(h)||(m=a(h)))?(m?(m=!1,f=d&&a(d)?d:[]):f=d&&i(d)?d:{},s(g,{name:u,newValue:l(S,f,h)})):typeof h<"u"&&s(g,{name:u,newValue:h}));return g},Hw}var U3e=B3e();const Yw=ph(U3e);function O2(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function G3e(){const t=[],e={run:r,use:n};return e;function r(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...a);function o(l,...c){const u=t[++i];let d=-1;if(l){s(l);return}for(;++d<a.length;)(c[d]===null||c[d]===void 0)&&(c[d]=a[d]);a=c,u?q3e(u,o)(...c):s(null,...c)}}function n(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return t.push(a),e}}function q3e(t,e){let r;return n;function n(...s){const o=t.length>s.length;let l;o&&s.push(a);try{l=t.apply(this,s)}catch(c){const u=c;if(o&&r)throw u;return a(u)}o||(l&&l.then&&typeof l.then=="function"?l.then(i,a):l instanceof Error?a(l):i(l))}function a(s,...o){r||(r=!0,e(s,...o))}function i(s){a(null,s)}}function z3e(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?yL(t.position):"start"in t||"end"in t?yL(t):"line"in t||"column"in t?N2(t):""}function N2(t){return TL(t&&t.line)+":"+TL(t&&t.column)}function yL(t){return N2(t&&t.start)+"-"+N2(t&&t.end)}function TL(t){return t&&typeof t=="number"?t:1}class ks extends Error{constructor(e,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let a="",i={},s=!1;if(r&&("line"in r&&"column"in r?i={place:r}:"start"in r&&"end"in r?i={place:r}:"type"in r?i={ancestors:[r],place:r.position}:i={...r}),typeof e=="string"?a=e:!i.cause&&e&&(s=!0,a=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?i.ruleId=n:(i.source=n.slice(0,l),i.ruleId=n.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=a,this.line=o?o.line:void 0,this.name=z3e(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stac
`:" ")+i.indentLines(i.containerFlow(n,o.current()),e?Z$:BDe))),c(),l}}function BDe(t,e,r){return e===0?t:Z$(t,e,r)}function Z$(t,e,r){return(r?"":" ")+t}const UDe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];J$.peek=HDe;function GDe(){return{canContainEols:["delete"],enter:{strikethrough:zDe},exit:{strikethrough:$De}}}function qDe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:UDe}],handlers:{delete:J$}}}function zDe(t){this.enter({type:"delete",children:[]},t)}function $De(t){this.exit(t)}function J$(t,e,r,n){const a=r.createTracker(n),i=r.enter("strikethrough");let s=a.move("~~");return s+=r.containerPhrasing(t,{...a.current(),before:s,after:"~"}),s+=a.move("~~"),i(),s}function HDe(){return"~"}function YDe(t){return t.length}function VDe(t,e){const r=e||{},n=(r.align||[]).concat(),a=r.stringLength||YDe,i=[],s=[],o=[],l=[];let c=0,u=-1;for(;++u<t.length;){const g=[],b=[];let _=-1;for(t[u].length>c&&(c=t[u].length);++_<t[u].length;){const S=WDe(t[u][_]);if(r.alignDelimiters!==!1){const E=a(S);b[_]=E,(l[_]===void 0||E>l[_])&&(l[_]=E)}g.push(S)}s[u]=g,o[u]=b}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<c;)i[d]=RL(n[d]);else{const g=RL(n);for(;++d<c;)i[d]=g}d=-1;const h=[],m=[];for(;++d<c;){const g=i[d];let b="",_="";g===99?(b=":",_=":"):g===108?b=":":g===114&&(_=":");let S=r.alignDelimiters===!1?1:Math.max(1,l[d]-b.length-_.length);const E=b+"-".repeat(S)+_;r.alignDelimiters!==!1&&(S=b.length+S+_.length,S>l[d]&&(l[d]=S),m[d]=S),h[d]=E}s.splice(1,0,h),o.splice(1,0,m),u=-1;const f=[];for(;++u<s.length;){const g=s[u],b=o[u];d=-1;const _=[];for(;++d<c;){const S=g[d]||"";let E="",y="";if(r.alignDelimiters!==!1){const v=l[d]-(b[d]||0),T=i[d];T===114?E=" ".repeat(v):T===99?v%2?(E=" ".repeat(v/2+.5),y=" ".repeat(v/2-.5)):(E=" ".repeat(v/2),y=E):y=" ".repeat(v)}r.delimiterStart!==!1&&!d&&_.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&S==="")&&(r.delimiterStart!==!1||d)&&_.push(" "),r.alignDelimiters!==!1&&_.push(E),_.push(S),r.alignDelimiters!==!1&&_.push(y),r.padding!==!1&&_.push(" "),(r.delimiterEnd!==!1||d!==c-1)&&_.push("|")}f.push(r.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return f.join(`
`)}function WDe(t){return t==null?"":String(t)}function RL(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function KDe(){return{enter:{table:jDe,tableData:OL,tableHeader:OL,tableRow:XDe},exit:{codeText:ZDe,table:QDe,tableData:tA,tableHeader:tA,tableRow:tA}}}function jDe(t){const e=t._align;this.enter({type:"table",align:e.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function QDe(t){this.exit(t),this.data.inTable=void 0}function XDe(t){this.enter({type:"tableRow",children:[]},t)}function tA(t){this.exit(t)}function OL(t){this.enter({type:"tableCell",children:[]},t)}function ZDe(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,JDe));const r=this.stack[this.stack.length-1];r.type,r.value=e,this.exit(t)}function JDe(t,e){return e==="|"?e:t}function e5e(t){const e=t||{},r=e.tableCellPadding,n=e.tablePipeAlign,a=e.stringLength,i=r?" ":"|";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:h,table:s,tableCell:l,tableRow:o}};function s(m,f,g,b){return c(u(m,g,b),m.align)}function o(m,f,g,b){const _=d(m,g,b),S=c([_]);return S.slice(0,S.indexOf(`
`))}function l(m,f,g,b){const _=g.enter("tableCell"),S=g.enter("phrasing"),E=g.containerPhrasing(m,{...b,before:i,after:i});return S(),_(),E}function c(m,f){return VDe(m,{align:f,alignDelimiters:n,padding:r,stringLength:a})}function u(m,f,g){const b=m.children;let _=-1;const S=[],E=f.enter("table");for(;++_<b.length;)S[_]=d(b[_],f,g);return E(),S}function d(m,f,g){const b=m.children;let _=-1;const S=[],E=f.enter("tableRow");for(;++_<b.length;)S[_]=l(b[_],m,f,g);return E(),S}function h(m,f,g){let b=t3.inlineCode(m,f,g);return g.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function t5e(){return{exit:{taskListCheckValueChecked:NL,taskListCheckValueUnchecked:NL,paragraph:n5e}}}function r5e(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:a5e}}}function NL(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function n5e(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const a=e.children;let i=-1,s;for(;++i<a.length;){const o=a[i];if(o.type==="paragraph"){s=o;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(t)}function a5e(t,e,r,n){const a=t.children[0],i=typeof t.checked=="boolean"&&a&&a.type==="paragraph",s="["+(t.checked?"x":" ")+"] ",o=r.createTracker(n);i&&o.move(s);let l=t3.listItem(t,e,r,{...n,...o.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+s}}function i5e(){return[fDe(),LDe(),GDe(),KDe(),t5e()]}function s5e(t){return{extensions:[gDe(),FDe(t),qDe(),e5e(t),r5e()]}}const o5e={tokenize:p5e,partial:!0},eH={tokenize:m5e,partial:!0},tH={tokenize:f5e,partial:!0},rH={tokenize:g5e,partial:!0},l5e={tokenize:_5e,partial:!0},nH={name:"wwwAutolink",tokenize:d5e,previous:iH},aH={name:"protocolAutolink",tokenize:h5e,previous:sH},ou={name:"emailAutolink",tokenize:u5e,previous:oH},Zl={};function c5e(){return{text:Zl}}let xd=48;for(;xd<123;)Zl[xd]=ou,xd++,xd===58?xd=65:xd===91&&(xd=97);Zl[43]=ou;Zl[45]=ou;Zl[46]=ou;Zl[95]=ou;Zl[72]=[ou,aH];Zl[104]=[ou,aH];Zl[87]=[ou,nH];Zl[119]=[ou,nH];function u5e(t,e,r){const n=this;let a,i;return s;function s(d){return!x2(d)||!oH.call(n,n.previous)||n3(n.events)?r(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),o(d))}function o(d){return x2(d)?(t.consume(d),o):d===64?(t.consume(d),l):r(d)}function l(d){return d===46?t.check(l5e,u,c)(d):d===45||d===95||Hi(d)?(i=!0,t.consume(d),l):u(d)}function c(d){return t.consume(d),a=!0,l}function u(d){return i&&a&&ls(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):r(d)}}function d5e(t,e,r){const n=this;return a;function a(s){return s!==87&&s!==119||!iH.call(n,n.previous)||n3(n.events)?r(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(o5e,t.attempt(eH,t.attempt(tH,i),r),r)(s))}function i(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function h5e(t,e,r){const n=this;let a="",i=!1;return s;function s(d){return(d===72||d===104)&&sH.call(n,n.previous)&&!n3(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),a+=String.fromCodePoint(d),t.consume(d),o):r(d)}function o(d){if(ls(d)&&a.length<5)return a+=String.fromCodePoint(d),t.consume(d),o;if(d===58){const h=a.toLowerCase();if(h==="http"||h==="https")return t.consume(d),l}return r(d)}function l(d){return d===47?(t.consume(d),i?c:(i=!0,l)):r(d)}function c(d){return d===null||Gb(d)||na(d)||lh(d)||CE(d)?r(d):t.attempt(eH,t.attempt(tH,u),r)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function p5e(t,e,r){let n=0;return a;function a(s){return(s===87||s===119)&&n<3?(n++,t.consume(s),a):s===46&&n===3?(t.consume(s),i):r(s)}function i(s){return s===null?r(s):e(s)}}function m5e(t,e,r){let n,a,i;ret
`,inConstruct:"mathFlowMeta"},{character:"$",after:e?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(i,s,o,l){const c=i.value||"",u=o.createTracker(l),d="$".repeat(Math.max(P$(c,"$")+1,2)),h=o.enter("mathFlow");let m=u.move(d);if(i.meta){const f=o.enter("mathFlowMeta");m+=u.move(o.safe(i.meta,{after:`
`,before:m,encode:["$"],...u.current()})),f()}return m+=u.move(`
`),c&&(m+=u.move(c+`
`)),m+=u.move(d),h(),m}function n(i,s,o){let l=i.value||"",c=1;for(e||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(l);)c++;const u="$".repeat(c);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let d=-1;for(;++d<o.unsafe.length;){const h=o.unsafe[d];if(!h.atBreak)continue;const m=o.compilePattern(h);let f;for(;f=m.exec(l);){let g=f.index;l.codePointAt(g)===10&&l.codePointAt(g-1)===13&&g--,l=l.slice(0,g)+" "+l.slice(f.index+1)}}return u+l+u}function a(){return"$"}}const $5e={tokenize:H5e,concrete:!0,name:"mathFlow"},xL={tokenize:Y5e,partial:!0};function H5e(t,e,r){const n=this,a=n.events[n.events.length-1],i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let s=0;return o;function o(S){return t.enter("mathFlow"),t.enter("mathFlowFence"),t.enter("mathFlowFenceSequence"),l(S)}function l(S){return S===36?(t.consume(S),s++,l):s<2?r(S):(t.exit("mathFlowFenceSequence"),En(t,c,"whitespace")(S))}function c(S){return S===null||Ir(S)?d(S):(t.enter("mathFlowFenceMeta"),t.enter("chunkString",{contentType:"string"}),u(S))}function u(S){return S===null||Ir(S)?(t.exit("chunkString"),t.exit("mathFlowFenceMeta"),d(S)):S===36?r(S):(t.consume(S),u)}function d(S){return t.exit("mathFlowFence"),n.interrupt?e(S):t.attempt(xL,h,b)(S)}function h(S){return t.attempt({tokenize:_,partial:!0},b,m)(S)}function m(S){return(i?En(t,f,"linePrefix",i+1):f)(S)}function f(S){return S===null?b(S):Ir(S)?t.attempt(xL,h,b)(S):(t.enter("mathFlowValue"),g(S))}function g(S){return S===null||Ir(S)?(t.exit("mathFlowValue"),f(S)):(t.consume(S),g)}function b(S){return t.exit("mathFlow"),e(S)}function _(S,E,y){let v=0;return En(S,T,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function T(I){return S.enter("mathFlowFence"),S.enter("mathFlowFenceSequence"),w(I)}function w(I){return I===36?(v++,S.consume(I),w):v<s?y(I):(S.exit("mathFlowFenceSequence"),En(S,A,"whitespace")(I))}function A(I){return I===null||Ir(I)?(S.exit("mathFlowFence"),E(I)):y(I)}}}function Y5e(t,e,r){const n=this;return a;function a(s){return s===null?e(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i)}function i(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}function V5e(t){let r=(t||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:W5e,previous:K5e,name:"mathText"};function n(a,i,s){let o=0,l,c;return u;function u(g){return a.enter("mathText"),a.enter("mathTextSequence"),d(g)}function d(g){return g===36?(a.consume(g),o++,d):o<2&&!r?s(g):(a.exit("mathTextSequence"),h(g))}function h(g){return g===null?s(g):g===36?(c=a.enter("mathTextSequence"),l=0,f(g)):g===32?(a.enter("space"),a.consume(g),a.exit("space"),h):Ir(g)?(a.enter("lineEnding"),a.consume(g),a.exit("lineEnding"),h):(a.enter("mathTextData"),m(g))}function m(g){return g===null||g===32||g===36||Ir(g)?(a.exit("mathTextData"),h(g)):(a.consume(g),m)}function f(g){return g===36?(a.consume(g),l++,f):l===o?(a.exit("mathTextSequence"),a.exit("mathText"),i(g)):(c.type="mathTextData",m(g))}}}function W5e(t){let e=t.length-4,r=3,n,a;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=r;++n<e;)if(t[n][1].type==="mathTextData"){t[e][1].type="mathTextPadding",t[r][1].type="mathTextPadding",r+=2,e-=2;break}}for(n=r-1,e++;++n<=e;)a===void 0?n!==e&&t[n][1].type!=="lineEnding"&&(a=n):(n===e||t[n][1].type==="lineEnding")&&(t[a][1].type="mathTextData",n!==a+2&&(t[a][1].end=t[n-1][1].end,t.splice(a+2,n-a-2),e-=n-a-2,n=a+2),a=void 0);return t}function K5e(t){return t!==36||this.events[this.events.length-1][1].type==="characterEscape"}function j5e(t){return{flow:{36:$5e},text:{36:V5e(t)}}}class Qs{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new Qs(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class ko{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}ra
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+e/2.075+" -"+e+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+e)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},fMe=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+e/2.084+" -"+e+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+e)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},gMe=function(e,r){return"M983 "+(10+e+r)+`
l`+e/3.13+" -"+e+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},_Me=function(e,r){return"M424,"+(2398+e+r)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+e)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+`
h400000v`+(40+e)+"h-400000z"},bMe=function(e,r){return"M473,"+(2713+e+r)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},SMe=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},EMe=function(e,r,n){var a=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+`
H742v`+a+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},vMe=function(e,r,n){r=1e3*r;var a="";switch(e){case"sqrtMain":a=mMe(r,Fh);break;case"sqrtSize1":a=fMe(r,Fh);break;case"sqrtSize2":a=gMe(r,Fh);break;case"sqrtSize3":a=_Me(r,Fh);break;case"sqrtSize4":a=bMe(r,Fh);break;case"sqrtTall":a=EMe(r,Fh,n)}return a},yMe=function(e,r){switch(e){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"�":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},DL={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},TMe=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
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,11
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,-`+(r+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.")}};class kg{constructor(e){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=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Lr.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){for(var e="",r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e}toText(){var e=r=>r.toText();return this.children.map(e).join("")}}var Pl={"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,.755
`+w+" children.");for(var D=0;D<w;D++){var $=new ju(E[D]),H=new Qc([$],{width:"400em",height:Xt(T),viewBox:"0 0 "+o+" "+v,preserveAspectRatio:I[D]+" slice"}),G=ct.makeSvgSpan([A[D]],[H],r);if(w===1)return{span:G,minWidth:y,height:T};G.style.height=Xt(T),_.push(G)}return{span:ct.makeSpan(["stretchy"],_,r),minWidth:y,height:T}}}var{span:a,minWidth:i,height:s}=n();return a.height=s,a.style.height=Xt(s),i>0&&(a.style.minWidth=Xt(i)),a},lke=function(e,r,n,a,i){var s,o=e.height+e.depth+n+a;if(/fbox|color|angl/.test(r)){if(s=ct.makeSpan(["stretchy",r],[],i),r==="fbox"){var l=i.color&&i.getColor();l&&(s.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new k2({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new k2({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new Qc(c,{width:"100%",height:Xt(o)});s=ct.makeSvgSpan([],[u],i)}return s.height=o,s.style.height=Xt(o),s},Zc={encloseSpan:lke,mathMLnode:ake,svgSpan:oke};function on(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function d3(t){var e=IE(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function IE(t){return t&&(t.type==="atom"||MMe.hasOwnProperty(t.type))?t:null}var h3=(t,e)=>{var r,n,a;t&&t.type==="supsub"?(n=on(t.base,"accent"),r=n.base,t.base=r,a=xMe(Gn(t,e)),t.base=n):(n=on(t,"accent"),r=n.base);var i=Gn(r,e.havingCrampedStyle()),s=n.isShifty&&Lr.isCharacterBox(r),o=0;if(s){var l=Lr.getBaseElem(r),c=Gn(l,e.havingCrampedStyle());o=LL(c).skew}var u=n.label==="\\c",d=u?i.height+i.depth:Math.min(i.height,e.fontMetrics().xHeight),h;if(n.isStretchy)h=Zc.svgSpan(n,e),h=ct.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Xt(2*o)+")",marginLeft:Xt(2*o)}:void 0}]},e);else{var m,f;n.label==="\\vec"?(m=ct.staticSvg("vec",e),f=ct.svgData.vec[1]):(m=ct.makeOrd({mode:n.mode,text:n.label},e,"textord"),m=LL(m),m.italic=0,f=m.width,u&&(d+=m.depth)),h=ct.makeSpan(["accent-body"],[m]);var g=n.label==="\\textcircled";g&&(h.classes.push("accent-full"),d=i.height);var b=o;g||(b-=f/2),h.style.left=Xt(b),n.label==="\\textcircled"&&(h.style.top=".2em"),h=ct.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-d},{type:"elem",elem:h}]},e)}var _=ct.makeSpan(["mord","accent"],[h],e);return a?(a.children[0]=_,a.height=Math.max(_.height,a.height),a.classes[0]="mord",a):_},CH=(t,e)=>{var r=t.isStretchy?Zc.mathMLnode(t.label):new Bt.MathNode("mo",[Uo(t.label,t.mode)]),n=new Bt.MathNode("mover",[aa(t.base,e),r]);return n.setAttribute("accent","true"),n},cke=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));dr({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:(t,e)=>{var r=Wb(e[0]),n=!cke.test(t.funcName),a=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:h3,mathmlBuilder:CH});dr({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:h3,mathmlBuilder:CH});dr({type:"accentUnder",names:["\\underleftarro
]`,Lke="\\\\[a-zA-Z@]+",Fke="\\\\[^\uD800-\uDFFF]",Bke="("+Lke+")"+XH+"*",Uke=`\\\\(
|[ \r ]+
?)[ \r ]*`,G2="[̀-ͯ]",Gke=new RegExp(G2+"+$"),qke="("+XH+"+)|"+(Uke+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(G2+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(G2+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Bke)+("|"+Fke+")");class o8{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(qke,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new ko("EOF",new Qs(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new qt("Unexpected character: '"+e[r]+"'",new ko(e[r],new Qs(this,r,r+1)));var a=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[a]===14){var i=e.indexOf(`
`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.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=i+1,this.lex()}return new ko(a,new Qs(this,r,this.tokenRegex.lastIndex))}}class zke{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new qt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var a=0;a<this.undefStack.length;a++)delete this.undefStack[a][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}}var $ke=GH;ve("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});ve("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});ve("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});ve("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});ve("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});ve("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ve("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var l8={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};ve("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new qt("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=l8[e.text],n==null||n>=r)throw new qt("Invalid base-"+r+" digit "+e.text);for(var a;(a=l8[t.future().text])!=null&&a<r;)n*=r,n+=a,t.popToken()}return"\\@char{"+n+"}"});var E3=(t,e,r,n)=>{var a=t.consumeArg().tokens;if(a.length!==1)throw new qt("\\newcommand's first argument must be a macro name");var i=a[0].text,s=t.isDefined(i);if(s&&!e)throw new qt("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!s&&!r)throw new qt("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(a=t.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var l="",c=t.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new qt("Invalid number of arguments: "+l);o=parseInt(l),a=t.consumeArg().tokens}return s&&n||t.macros.set(i,{tokens:a,numArgs:o}),""};ve("\\newcommand",t=>E3(t,!1,!0,!1));ve("\\renewcommand",t=>E3(t,!0,!1,!1));ve("\\providecommand",t=>E3(t,!0,!0,!0));ve("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});ve("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});ve("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Iu[r],la.math[r],la.text[r]),""});ve("\\bgroup","{");ve("\\egroup","}");ve("~","\\nobreakspace");ve("\\lq","`");ve("\\rq","'");ve("\\aa","\\r a");ve("\\AA","\\r A");ve("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ve("\\
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:a}}d8.hasOwnProperty(r[0])&&!la[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',e),r=d8[r[0]]+r.slice(1));var i=Gke.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var s;if(la[this.mode][r]){this.settings.strict&&this.mode==="math"&&P2.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var o=la[this.mode][r].group,l=Qs.range(e),c;if(DMe.hasOwnProperty(o)){var u=o;c={type:"atom",mode:this.mode,family:u,loc:l,text:r}}else c={type:o,mode:this.mode,loc:l,text:r};s=c}else if(r.charCodeAt(0)>=128)this.settings.strict&&(cH(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:Qs.range(e),text:r};else return null;if(this.consume(),i)for(var d=0;d<i[0].length;d++){var h=i[0][d];if(!gA[h])throw new qt("Unknown accent ' "+h+"'",e);var m=gA[h][this.mode]||gA[h].text;if(!m)throw new qt("Accent "+h+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:Qs.range(e),label:m,isStretchy:!1,isShifty:!0,base:s}}return s}}kE.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var y3=function(e,r){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new kE(e,r);delete n.gullet.macros.current["\\df@tag"];var a=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new qt("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:n.subparse([new ko("\\df@tag")])}]}return a},tY=function(e,r,n){r.textContent="";var a=T3(e,n).toNode();r.appendChild(a)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),tY=function(){throw new qt("KaTeX doesn't work in quirks mode.")});var Yke=function(e,r){var n=T3(e,r).toMarkup();return n},Vke=function(e,r){var n=new a3(r);return y3(e,n)},rY=function(e,r,n){if(n.throwOnError||!(e instanceof qt))throw e;var a=ct.makeSpan(["katex-error"],[new Bo(r)]);return a.setAttribute("title",e.toString()),a.setAttribute("style","color:"+n.errorColor),a},T3=function(e,r){var n=new a3(r);try{var a=y3(e,n);return tke(a,e,n)}catch(i){return rY(i,e,n)}},Wke=function(e,r){var n=new a3(r);try{var a=y3(e,n);return rke(a,e,n)}catch(i){return rY(i,e,n)}},Kke="0.16.22",jke={Span:Pg,Anchor:o3,SymbolNode:Bo,SvgNode:Qc,PathNode:ju,LineNode:k2},h8={version:Kke,render:tY,renderToString:Yke,ParseError:qt,SETTINGS_SCHEMA:k1,__parse:Vke,__renderToDomTree:T3,__renderToHTMLTree:Wke,__setFontMetrics:CMe,__defineSymbol:Q,__defineFunction:dr,__defineMacro:ve,__domTree:jke};const Qke={};function Xke(t){const e=this,r=t||Qke,n=e.data(),a=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);a.push(j5e(r)),i.push(q5e()),s.push(z5e(r))}const p8=function(t,e,r){const n=Dg(r);if(!t||!t.type||!t.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=t.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<t.children.length;)if(n(t.children[e],e,t))return t.children[e]},yh=function(t){if(t==null)return e9e;if(typeof t=="string")return Jke(t);if(typeof t=="object")return Zke(t);if(typeof t=="function")return C3(t);throw new Error("Expected function, string, or a
`.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function iY(t,e,r){return t.type==="element"?a9e(t,e,r):t.type==="text"?r.whitespace==="normal"?sY(t,r):i9e(t):[]}function a9e(t,e,r){const n=oY(t,r),a=t.children||[];let i=-1,s=[];if(n9e(t))return s;let o,l;for(q2(t)||_8(t)&&p8(e,t,_8)?l=`
`:r9e(t)?(o=2,l=2):nY(t)&&(o=1,l=1);++i<a.length;)s=s.concat(iY(a[i],t,{whitespace:n,breakBefore:i?void 0:o,breakAfter:i<a.length-1?q2(a[i+1]):l}));return g8(t)&&p8(e,t,g8)&&s.push(" "),o&&s.unshift(o),l&&s.push(l),s}function sY(t,e){const r=String(t.value),n=[],a=[];let i=0;for(;i<=r.length;){m8.lastIndex=i;const l=m8.exec(r),c=l&&"index"in l?l.index:r.length;n.push(s9e(r.slice(i,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),i===0?e.breakBefore:!0,c===r.length?e.breakAfter:!0)),i=c+1}let s=-1,o;for(;++s<n.length;)n[s].charCodeAt(n[s].length-1)===8203||s<n.length-1&&n[s+1].charCodeAt(0)===8203?(a.push(n[s]),o=void 0):n[s]?(typeof o=="number"&&a.push(o),a.push(n[s]),o=0):(s===0||s===n.length-1)&&a.push(0);return a}function i9e(t){return[String(t.value)]}function s9e(t,e,r){const n=[];let a=0,i;for(;a<t.length;){f8.lastIndex=a;const s=f8.exec(t);i=s?s.index:t.length,!a&&!i&&s&&!e&&n.push(""),a!==i&&n.push(t.slice(a,i)),a=s?i+s[0].length:i}return a!==i&&!r&&n.push(""),n.join(" ")}function oY(t,e){if(t.type==="element"){const r=t.properties||{};switch(t.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":e.whitespace;case"textarea":return"pre-wrap"}}return e.whitespace}function o9e(t){return!!(t.properties||{}).hidden}function l9e(t){return t.tagName==="td"||t.tagName==="th"}function c9e(t){return t.tagName==="dialog"&&!(t.properties||{}).open}function u9e(t){const e="[A-Za-zÐ�-Яа-Ñ�Ñ‘Ð�_][A-Za-zÐ�-Яа-Ñ�Ñ‘Ð�_0-9]+",a="далее "+"возврат вызватьиÑ�ключение выполнить длÑ� еÑ�ли и из или иначе иначееÑ�ли иÑ�ключение каждого конецеÑ�ли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл Ñ�кÑ�порт ",o="загрузитьизфайла "+"вебклиент вмеÑ�то внешнееÑ�оединение клиент конецоблаÑ�ти мобильноеприложениеклиент мобильноеприложениеÑ�ервер наклиенте наклиентенаÑ�ервере наклиентенаÑ�ерверебезконтекÑ�та наÑ�ервере наÑ�ерверебезконтекÑ�та облаÑ�ть перед поÑ�ле Ñ�ервер толÑ�тыйклиентобычноеприложение толÑ�тыйклиентуправлÑ�емоеприложение тонкийклиент ",h="разделительÑ�траниц разделительÑ�трок Ñ�имволтабулÑ�ции "+"ansitooem oemtoansi ввеÑ�тивидÑ�убконто ввеÑ�типеречиÑ�ление ввеÑ�типериод ввеÑ�типланÑ�четов выбранныйпланÑ�четов датагод датамеÑ�Ñ�ц датачиÑ�ло заголовокÑ�иÑ�темы значениевÑ�троку значениеизÑ�троки каталогиб каталогпользователÑ� кодÑ�имв конгода конецпериодаби конецраÑ�Ñ�читанногопериодаби конецÑ�тандартногоинтервала конквартала конмеÑ�Ñ�ца коннедели лог лог10 макÑ�имальноеколичеÑ�твоÑ�убконто названиеинтерфейÑ�а названиенабораправ назначитьвид назначитьÑ�чет найтиÑ�Ñ�ылки началопериодаби началоÑ�тандартногоинтервала начгода начквартала начмеÑ�Ñ�ца начнедели номерднÑ�года номерднÑ�недели номернеделигода обработкаожиданиÑ� оÑ�новнойжурналраÑ�четов оÑ�новнойпланÑ�четов оÑ�новнойÑ�зык очиÑ�титьокноÑ�ообщений периодÑ�тр получитьвремÑ�та получитьдатута получитьдокÑ
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}function WPe(t){const e="[a-z][a-zA-Z0-9_]*",r={className:"string",begin:"\\$.{1}"},n={className:"symbol",begin:"#"+t.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[t.COMMENT('"','"'),t.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:e+":",relevance:0},t.C_NUMBER_MODE,n,r,{begin:"\\|[ ]*"+e+"([ ]+"+e+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+e}]},{begin:"#\\(",end:"\\)",contains:[t.APOS_STRING_MODE,r,t.C_NUMBER_MODE,n]}]}}function KPe(t){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},t.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},t.inherit(t.APOS_STRING_MODE,{className:"string",relevance:0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}function jPe(t){const e={className:"variable",begin:/\b_+[a-zA-Z]\w*/},r={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},n={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},a=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],i=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],s=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachme
]*?"'`},{begin:`"[^\r
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},t.COMMENT("^[ ]*\\*.*$",!1),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]}}function ZPe(t){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.COMMENT("/\\*\\*!","\\*/"),t.C_NUMBER_MODE,t.inherit(t.APOS_STRING_MODE,{illegal:null}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}const JPe=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e6e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t6e=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r6e=[...e6e,...t6e],n6e=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-sch
(multipart)?`,end:`\\]
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}function c6e(t){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}function u6e(t){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[t.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}function d6e(t){const e=t.regex,r=/[a-zA-Z_][a-zA-Z0-9_]*/,n={className:"number",variants:[t.BINARY_NUMBER_MODE,t.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[t.COMMENT(";[ \\t]*#","$"),t.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:e.concat(/\$/,e.optional(/::/),r,"(::",r,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[n]}]},{className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.inherit(t.QUOTE_STRING_MODE,{illegal:null})]},n]}}function h6e(t){const e=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:e,literal:"true false"},contains:[t.QUOTE_STRING_MODE,t.NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[t.inherit(t.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...e,"set","list","map"]},end:">",contains:["self"]}]}}function p6e(t){const e={className:"number",begin:"[1-9][0-9]*",relevance:0},r={className:"symbol",begin:":[^\\]]+"},n={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",e,r]},a={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",e,t.QUOTE_STRING_MODE,r]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJU
`},c]}}const e7e=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t7e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r7e=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n7e=[...t7e,...r7e],a7e=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),pY=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),mY=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),i7e=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-b
]`,f={scope:"string",variants:[u,c,d,h]},g={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],_=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],S=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],y={keyword:_,literal:(G=>{const K=[];return G.forEach(z=>{K.push(z),z.toLowerCase()===z?K.push(z.toUpperCase()):K.push(z.toLowerCase())}),K})(b),built_in:S},v=G=>G.map(K=>K.replace(/\|\d+$/,"")),T={variants:[{match:[/new/,e.concat(m,"+"),e.concat("(?!",v(S).join("\\b|"),"\\b)"),a],scope:{1:"keyword",4:"title.class"}}]},w=e.concat(n,"\\b(?!\\()"),A={variants:[{match:[e.concat(/::/,e.lookahead(/(?!class\b)/)),w],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[a,e.concat(/::/,e.lookahead(/(?!class\b)/)),w],scope:{1:"title.class",3:"variable.constant"}},{match:[a,e.concat("::",e.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[a,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},I={scope:"attr",match:e.concat(n,e.lookahead(":"),e.lookahead(/(?!::)/))},x={relevance:0,begin:/\(/,end:/\)/,keywords:y,contains:[I,s,A,t.C_BLOCK_COMMENT_MODE,f,g,T]},D={relevance:0,match:[/\b/,e.concat("(?!fn\\b|function\\b|",v(_).join("\\b|"),"|",v(S).join("\\b|"),"\\b)"),n,e.concat(m,"*"),e.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[x]};x.contains.push(D);const $=[I,A,t.C_BLOCK_COMMENT_MODE,f,g,T],H={begin:e.concat(/#\[\s*\\?/,e.either(a,i)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self"
`}]}function nLe(t,e){const r=e.value?e.value+`
`:"",n={},a=e.lang?e.lang.split(/\s+/):[];a.length>0&&(n.className=["language-"+a[0]]);let i={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return e.meta&&(i.data={meta:e.meta}),t.patch(e,i),i=t.applyData(e,i),i={type:"element",tagName:"pre",properties:{},children:[i]},t.patch(e,i),i}function aLe(t,e){const r={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function iLe(t,e){const r={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function sLe(t,e){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),a=um(n.toLowerCase()),i=t.footnoteOrder.indexOf(n);let s,o=t.footnoteCounts.get(n);o===void 0?(o=0,t.footnoteOrder.push(n),s=t.footnoteOrder.length):s=i+1,o+=1,t.footnoteCounts.set(n,o);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+a,id:r+"fnref-"+a+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};t.patch(e,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,c),t.applyData(e,c)}function oLe(t,e){const r={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function lLe(t,e){if(t.options.allowDangerousHtml){const r={type:"raw",value:e.value};return t.patch(e,r),t.applyData(e,r)}}function RY(t,e){const r=e.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+n}];const a=t.all(e),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=n:a.push({type:"text",value:n}),a}function cLe(t,e){const r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return RY(t,e);const a={src:um(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(a.title=n.title);const i={type:"element",tagName:"img",properties:a,children:[]};return t.patch(e,i),t.applyData(e,i)}function uLe(t,e){const r={src:um(e.url)};e.alt!==null&&e.alt!==void 0&&(r.alt=e.alt),e.title!==null&&e.title!==void 0&&(r.title=e.title);const n={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,n),t.applyData(e,n)}function dLe(t,e){const r={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(e,n),t.applyData(e,n)}function hLe(t,e){const r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return RY(t,e);const a={href:um(n.url||"")};n.title!==null&&n.title!==void 0&&(a.title=n.title);const i={type:"element",tagName:"a",properties:a,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function pLe(t,e){const r={href:um(e.url)};e.title!==null&&e.title!==void 0&&(r.title=e.title);const n={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function mLe(t,e,r){const n=t.all(e),a=r?fLe(r):OY(e),i={},s=[];if(typeof e.checked=="boolean"){const u=n[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},n.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++o<n.length;){const u=n[o];(a||o!==0||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
`}),u.type==="element"&&u.tagName==="p"&&!a?s.push(...u.children):s.push(u)}const l=n[n.length-1];l&&(a||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
`});const c={type:"element",tagName:"li",properties:i,children:s};return t.patch(e,c),t.applyData(e,c)}function fLe(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const r=t.children;let n=-1;for(;!e&&++n<r.length;)e=OY(r[n])}return e}function OY(t){const e=t.spread;return e??t.children.length>1}function gLe(t,e){const r={},n=t.all(e);let a=-1;for(typeof e.start=="number"&&e.start!==1&&(r.start=e.start);++a<n.length;){const s=n[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const i={type:"element",tagName:e.ordered?"ol":"ul",properties:r,children:t.wrap(n,!0)};return t.patch(e,i),t.applyData(e,i)}function _Le(t,e){const r={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function bLe(t,e){const r={type:"root",children:t.wrap(t.all(e))};return t.patch(e,r),t.applyData(e,r)}function SLe(t,e){const r={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}const NY=xY("end"),IY=xY("start");function xY(t){return e;function e(r){const n=r&&r.position&&r.position[t]||{};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 ELe(t){const e=IY(t),r=NY(t);if(e&&r)return{start:e,end:r}}function vLe(t,e){const r=t.all(e),n=r.shift(),a=[];if(n){const s={type:"element",tagName:"thead",properties:{},children:t.wrap([n],!0)};t.patch(e.children[0],s),a.push(s)}if(r.length>0){const s={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},o=IY(e.children[1]),l=NY(e.children[e.children.length-1]);o&&l&&(s.position={start:o,end:l}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:t.wrap(a,!0)};return t.patch(e,i),t.applyData(e,i)}function yLe(t,e,r){const n=r?r.children:void 0,i=(n?n.indexOf(e):1)===0?"th":"td",s=r&&r.type==="table"?r.align:void 0,o=s?s.length:e.children.length;let l=-1;const c=[];for(;++l<o;){const d=e.children[l],h={},m=s?s[l]:void 0;m&&(h.align=m);let f={type:"element",tagName:i,properties:h,children:[]};d&&(f.children=t.all(d),t.patch(d,f),f=t.applyData(d,f)),c.push(f)}const u={type:"element",tagName:"tr",properties:{},children:t.wrap(c,!0)};return t.patch(e,u),t.applyData(e,u)}function TLe(t,e){const r={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}const C8=9,w8=32;function CLe(t){const e=String(t),r=/\r?\n|\r/g;let n=r.exec(e),a=0;const i=[];for(;n;)i.push(A8(e.slice(a,n.index),a>0,!0),n[0]),a=n.index+n[0].length,n=r.exec(e);return i.push(A8(e.slice(a),a>0,!1)),i.join("")}function A8(t,e,r){let n=0,a=t.length;if(e){let i=t.codePointAt(n);for(;i===C8||i===w8;)n++,i=t.codePointAt(n)}if(r){let i=t.codePointAt(a-1);for(;i===C8||i===w8;)a--,i=t.codePointAt(a-1)}return a>n?t.slice(n,a):""}function wLe(t,e){const r={type:"text",value:CLe(String(e.value))};return t.patch(e,r),t.applyData(e,r)}function ALe(t,e){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,r),t.applyData(e,r)}const RLe={blockquote:tLe,break:rLe,code:nLe,delete:aLe,emphasis:iLe,footnoteReference:sLe,heading:oLe,html:lLe,imageReference:cLe,image:uLe,inlineCode:dLe,linkReference:hLe,link:pLe,listItem:mLe,list:gLe,paragraph:_Le,root:bLe,strong:SLe,table:vLe,tableCell:TLe,tableRow:yLe,text:wLe,thematicBreak:ALe,toml:p1,yaml:p1,definition:p1,footnoteDefinition:p1};function p1(){}const DY=-1,PE=0,mf=1,Qb=2,A3=3,R3=4,O3=5,N3=6,MY=7,kY=8,R8=typeof self=="object"?self:globalThis,OLe=(t,e)=>{const r=(a,i)=>(t.set(i,a),a),n=a=>{if(t.has(a))return t.get(a);const[i,s]=e[a];switch(i){case PE:case DY:return r(s,a);case mf:{const o=r([],a);for(const l of s)o.push(n(l));return o}case Qb:{const o=r({},a);for(const[l,c]of s)o[n(l)]=n(c);return o}case A3:return r(new Date(s),a);case R3:{const{source:o,flags:l}=s;return r(new RegExp(o,l),a)}case O3:{const o=r(new Map,a);for(const[l,c]of s)o.set(n(l),
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(o,!0)},{type:"text",value:`
`}]}}const z2={}.hasOwnProperty,PLe={};function LLe(t,e){const r=e||PLe,n=new Map,a=new Map,i=new Map,s={...RLe,...r.handlers},o={all:c,applyData:BLe,definitionById:n,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:l,options:r,patch:FLe,wrap:GLe};return su(t,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?n:a,h=String(u.identifier).toUpperCase();d.has(h)||d.set(h,u)}}),o;function l(u,d){const h=u.type,m=o.handlers[h];if(z2.call(o.handlers,h)&&m)return m(o,u,d);if(o.options.passThrough&&o.options.passThrough.includes(h)){if("children"in u){const{children:g,...b}=u,_=Xb(b);return _.children=o.all(u),_}return Xb(u)}return(o.options.unknownHandler||ULe)(o,u,d)}function c(u){const d=[];if("children"in u){const h=u.children;let m=-1;for(;++m<h.length;){const f=o.one(h[m],u);if(f){if(m&&h[m-1].type==="break"&&(!Array.isArray(f)&&f.type==="text"&&(f.value=I8(f.value)),!Array.isArray(f)&&f.type==="element")){const g=f.children[0];g&&g.type==="text"&&(g.value=I8(g.value))}Array.isArray(f)?d.push(...f):d.push(f)}}}return d}}function FLe(t,e){t.position&&(e.position=ELe(t))}function BLe(t,e){let r=e;if(t&&t.data){const n=t.data.hName,a=t.data.hChildren,i=t.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const s="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:s}}r.type==="element"&&i&&Object.assign(r.properties,Xb(i)),"children"in r&&r.children&&a!==null&&a!==void 0&&(r.children=a)}return r}function ULe(t,e){const r=e.data||{},n="value"in e&&!(z2.call(r,"hProperties")||z2.call(r,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function GLe(t,e){const r=[];let n=-1;for(e&&r.push({type:"text",value:`
`});++n<t.length;)n&&r.push({type:"text",value:`
`}),r.push(t[n]);return e&&t.length>0&&r.push({type:"text",value:`
`}),r}function I8(t){let e=0,r=t.charCodeAt(e);for(;r===9||r===32;)e++,r=t.charCodeAt(e);return t.slice(e)}function x8(t,e){const r=LLe(t,e),n=r.one(t,void 0),a=kLe(r),i=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
`},a),i}function qLe(t,e){return t&&"run"in t?async function(r,n){const a=x8(r,{file:n,...e});await t.run(a,n)}:function(r,n){return x8(r,{file:n,...t||e})}}class Fg{constructor(e,r,n){this.normal=r,this.property=e,n&&(this.space=n)}}Fg.prototype.normal={};Fg.prototype.property={};Fg.prototype.space=void 0;function PY(t,e){const r={},n={};for(const a of t)Object.assign(r,a.property),Object.assign(n,a.normal);return new Fg(r,n,e)}function Hf(t){return t.toLowerCase()}class Ls{constructor(e,r){this.attribute=r,this.property=e}}Ls.prototype.attribute="";Ls.prototype.booleanish=!1;Ls.prototype.boolean=!1;Ls.prototype.commaOrSpaceSeparated=!1;Ls.prototype.commaSeparated=!1;Ls.prototype.defined=!1;Ls.prototype.mustUseProperty=!1;Ls.prototype.number=!1;Ls.prototype.overloadedBoolean=!1;Ls.prototype.property="";Ls.prototype.spaceSeparated=!1;Ls.prototype.space=void 0;let zLe=0;const sn=Th(),Wa=Th(),$2=Th(),Vt=Th(),oa=Th(),Ep=Th(),$s=Th();function Th(){return 2**++zLe}const H2=Object.freeze(Object.defineProperty({__proto__:null,boolean:sn,booleanish:Wa,commaOrSpaceSeparated:$s,commaSeparated:Ep,number:Vt,overloadedBoolean:$2,spaceSeparated:oa},Symbol.toStringTag,{value:"Module"})),EA=Object.keys(H2);class I3 extends Ls{constructor(e,r,n,a){let i=-1;if(super(e,r),D8(this,"space",a),typeof n=="number")for(;++i<EA.length;){const s=EA[i];D8(this,EA[i],(n&H2[s])===H2[s])}}}I3.prototype.defined=!0;function D8(t,e,r){r&&(t[e]=r)}function pm(t){const e={},r={};for(const[n,a]of Object.entries(t.properties)){const i=new I3(n,t.transform(t.attributes||{},n),a,t.space);t.mustUseProperty&&t.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),e[n]=i,r[Hf(n)]=n,r[Hf(i.attribute)]=n}return new Fg(e,r,t.space)}const LY=pm({properties:{ariaActiveDescendant:null,ariaAtomic:Wa,ariaAutoComplete:null,ariaBusy:Wa,ariaChecked:Wa,ariaColCount:Vt,ariaColIndex:Vt,ariaColSpan:Vt,ariaControls:oa,ariaCurrent:null,ariaDescribedBy:oa,ariaDetails:null,ariaDisabled:Wa,ariaDropEffect:oa,ariaErrorMessage:null,ariaExpanded:Wa,ariaFlowTo:oa,ariaGrabbed:Wa,ariaHasPopup:null,ariaHidden:Wa,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:oa,ariaLevel:Vt,ariaLive:null,ariaModal:Wa,ariaMultiLine:Wa,ariaMultiSelectable:Wa,ariaOrientation:null,ariaOwns:oa,ariaPlaceholder:null,ariaPosInSet:Vt,ariaPressed:Wa,ariaReadOnly:Wa,ariaRelevant:null,ariaRequired:Wa,ariaRoleDescription:oa,ariaRowCount:Vt,ariaRowIndex:Vt,ariaRowSpan:Vt,ariaSelected:Wa,ariaSetSize:Vt,ariaSort:null,ariaValueMax:Vt,ariaValueMin:Vt,ariaValueNow:Vt,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function FY(t,e){return e in t?t[e]:e}function BY(t,e){return FY(t,e.toLowerCase())}const $Le=pm({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ep,acceptCharset:oa,accessKey:oa,action:null,allow:null,allowFullScreen:sn,allowPaymentRequest:sn,allowUserMedia:sn,alt:null,as:null,async:sn,autoCapitalize:null,autoComplete:oa,autoFocus:sn,autoPlay:sn,blocking:oa,capture:null,charSet:null,checked:sn,cite:null,className:oa,cols:Vt,colSpan:null,content:null,contentEditable:Wa,controls:sn,controlsList:oa,coords:Vt|Ep,crossOrigin:null,data:null,dateTime:null,decoding:null,default:sn,defer:sn,dir:null,dirName:null,disabled:sn,download:$2,draggable:Wa,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:sn,formTarget:null,headers:oa,height:Vt,hidden:$2,high:Vt,href:null,hrefLang:null,htmlFor:oa,httpEquiv:oa,id:null,imageSizes:null,imageSrcSet:null,inert:sn,inputMode:null,integrity:null,is:null,isMap:sn,itemId:null,itemProp:oa,itemRef:oa,itemScope:sn,itemType:oa,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:sn,low:Vt,manifest:null,max:null,maxLength:Vt,media:null,method:null,min:null,minLength:Vt,multiple:sn,muted:sn,name:null,nonce:null,noModule:sn,noValidate:sn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:
\f\r &/=>`.split(""),`
\f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
\f\r "&'/<=>\``.split("")]],unquoted:[[`
\f\r &>`.split(""),`\0
\f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function iFe(t,e,r,n){const a=n.schema,i=a.space==="svg"?!1:n.settings.omitOptionalTags;let s=a.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(t.tagName.toLowerCase());const o=[];let l;a.space==="html"&&t.tagName==="svg"&&(n.schema=x3);const c=sFe(n,t.properties),u=n.all(a.space==="html"&&t.tagName==="template"?t.content:t);return n.schema=a,u&&(s=!1),(c||!i||!J8e(t,e,r))&&(o.push("<",t.tagName,c?" "+c:""),s&&(a.space==="svg"||n.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!n.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(u),!s&&(!i||!M3(t,e,r))&&o.push("</"+t.tagName+">"),o.join("")}function sFe(t,e){const r=[];let n=-1,a;if(e){for(a in e)if(e[a]!==null&&e[a]!==void 0){const i=oFe(t,a,e[a]);i&&r.push(i)}}for(;++n<r.length;){const i=t.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&i!=='"'&&i!=="'"&&(r[n]+=" ")}return r.join("")}function oFe(t,e,r){const n=zY(t.schema,e),a=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,i=t.settings.allowDangerousCharacters?0:1;let s=t.quote,o;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const l=vp(n.attribute,Object.assign({},t.settings.characterReferences,{subset:g1.name[a][i]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?jLe:XLe)(r,{padLeft:!t.settings.tightCommaSeparatedLists}):String(r),t.settings.collapseEmptyAttributes&&!r)?l:(t.settings.preferUnquoted&&(o=vp(r,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:g1.unquoted[a][i]}))),o!==r&&(t.settings.quoteSmart&&zb(r,s)>zb(r,t.alternative)&&(s=t.alternative),o=s+vp(r,Object.assign({},t.settings.characterReferences,{subset:(s==="'"?g1.single:g1.double)[a][i],attribute:!0}))+s),l+(o&&"="+o))}const lFe=["<","&"];function XY(t,e,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?t.value:vp(t.value,Object.assign({},n.settings.characterReferences,{subset:lFe}))}function cFe(t,e,r,n){return n.settings.allowDangerousHtml?t.value:XY(t,e,r,n)}function uFe(t,e,r,n){return n.all(t)}const dFe=D$("type",{invalid:hFe,unknown:pFe,handlers:{comment:L8e,doctype:F8e,element:iFe,raw:cFe,root:uFe,text:XY}});function hFe(t){throw new Error("Expected node, not `"+t+"`")}function pFe(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const mFe={},fFe={},gFe=[];function _Fe(t,e){const r=e||mFe,n=r.quote||'"',a=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:bFe,all:SFe,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||g8e,characterReferences:r.characterReferences||fFe,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?x3:$Y,quote:n,alternative:a}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function bFe(t,e,r){return dFe(t,e,r,this)}function SFe(t){const e=[],r=t&&t.children||gFe;let n=-1;for(;++n<r.length;)e[n]=this.one(r[n],n,t);return e.join("")}function EFe(t){const e=this,r={...e.data("settings"),...t};e.compiler=n;function n(a){return _Fe(a,r)}}function ZY(t){const e=[...t.matchAll(Tae)];if(!e.length)return[{type:"text",value:t}];const r=[];let n=0;for(const a of e)a.index
`,l=d;else break}const c=vFe(o);if(c){i.splice(s,l-s+1,c);return}const u=ZY(e.value);(u.length!==1||u[0]!==e)&&i.splice(s,1,...u)})}const TFe=()=>t=>{su(t,"element",e=>{(e.tagName==="td"||e.tagName==="th")&&yFe(e)})},CFe=()=>t=>{su(t,"element",e=>{if(e.tagName!=="a")return;const r=e.properties??{};r.href&&(r.target="_blank",r.rel="noopener noreferrer",e.properties=r)})},wFe='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy-icon lucide-copy"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>',AFe='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-eye lucide-eye-icon"><path d="M2.062 12.345a1 1 0 0 1 0-.69C3.5 7.73 7.36 5 12 5s8.5 2.73 9.938 6.655a1 1 0 0 1 0 .69C20.5 16.27 16.64 19 12 19s-8.5-2.73-9.938-6.655"/><circle cx="12" cy="12" r="3"/></svg>';function JY(t){return{type:"element",tagName:"span",properties:{},children:[{type:"raw",value:t}]}}function RFe(t){return{type:"element",tagName:"button",properties:{className:[ine],"data-code-id":t,title:"Copy code",type:"button"},children:[JY(wFe)]}}function OFe(t){return{type:"element",tagName:"button",properties:{className:[sne],"data-code-id":t,title:"Preview code",type:"button"},children:[JY(AFe)]}}function NFe(t,e){const r=[RFe(e)];return t.toLowerCase()==="html"&&r.push(OFe(e)),{type:"element",tagName:"div",properties:{className:[rne]},children:[{type:"element",tagName:"span",properties:{className:[ane]},children:[{type:"text",value:t}]},{type:"element",tagName:"div",properties:{className:[nne]},children:r}]}}function IFe(t){return{type:"element",tagName:"div",properties:{className:[ene]},children:[t]}}function xFe(t,e){return{type:"element",tagName:"div",properties:{className:[tne,one]},children:[t,IFe(e)]}}function DFe(t){const e=t.properties?.className;if(!Array.isArray(e))return"text";for(const r of e)if(typeof r=="string"&&r.startsWith("language-"))return r.replace("language-","");return"text"}function MFe(){return typeof window<"u"?`code-${window.idxCodeBlock=(window.idxCodeBlock??0)+1}`:`code-${Date.now()}-${Math.random().toString(36).slice(2,7)}`}const kFe=()=>t=>{su(t,"element",(e,r,n)=>{if(e.tagName!=="pre"||!n||r===void 0)return;const a=e.children.find(c=>c.type==="element"&&c.tagName==="code");if(!a)return;const i=DFe(a),s=MFe();a.properties={...a.properties,"data-code-id":s};const o=NFe(i,s),l=xFe(o,e);n.children[r]=l})};function PFe(t){return e=>{su(e,"element",r=>{if(r.tagName==="img"&&r.properties?.src){const n=String(r.properties.src);if(n.startsWith(ho.DATA)||n.startsWith(ho.HTTP))return;const a=t.attachments?.find(i=>i.type===Qr.IMAGE&&i.name===n);a?.base64Url&&(r.properties.src=a.base64Url)}})}}const LFe=()=>t=>{su(t,"element",e=>{e.children&&e.children.length>0&&(e.properties={...e.properties,dir:"auto"})})};function FFe(t){let e=0,r="";for(;e<t.length;){const n=t[e];if(n===" "){r+=ZU,e+=1;continue}if(n===" "){r+=Dne,e+=1;continue}break}return r+t.slice(e)}function BFe(t){const e=t.split(Ine),r=[];for(const[n,a]of e.entries())n>0&&r.push({type:"break"}),r.push({type:"text",value:FFe(a)});return r.length||r.push({type:"text",value:""}),r}const UFe=()=>t=>{su(t,"html",(e,r,n)=>{if(!n||typeof r!="number")return;const a=BFe(e.value);if(!xne.has(n.type)){const i={type:"paragraph",children:a,data:{literalHtml:!0}},s=n.children;if(s.splice(r,1,i),r>0){const o=s[r-1];if(o?.type==="paragraph"&&o.data?.literalHtml){const l=o.children;return l.length&&l[l.length-1].type!=="break"&&l.push({type:"break"}),l.push(...i.children),s.splice(r,1),r}}return r+1}return n.children.splice(r,1,...a),r+a.length})},eV="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.h
undone.`,1),SUe=q("<!> <!>",1),EUe=q("<!> <!>",1),vUe=q("<!> <!>",1);function yUe(t,e){ye(e,!0);let r=V(e,"open",15);var n=se(),a=L(n);fe(a,()=>ud,(i,s)=>{s(i,{get onOpenChange(){return e.onOpenChange},get open(){return r()},set open(o){r(o)},children:(o,l)=>{var c=se(),u=L(c);fe(u,()=>ld,(d,h)=>{h(d,{children:(m,f)=>{var g=vUe(),b=L(g);fe(b,()=>od,(S,E)=>{E(S,{children:(y,v)=>{var T=SUe(),w=L(T);fe(w,()=>id,(I,x)=>{x(I,{children:(D,$)=>{et();var H=Nt("Delete Server");C(D,H)},$$slots:{default:!0}})});var A=te(w,2);fe(A,()=>cd,(I,x)=>{x(I,{children:(D,$)=>{et();var H=bUe(),G=te(L(H)),K=j(G,!0);Y(G),et(),we(()=>qe(K,e.displayName)),C(D,H)},$$slots:{default:!0}})}),C(y,T)},$$slots:{default:!0}})});var _=te(b,2);fe(_,()=>sd,(S,E)=>{E(S,{children:(y,v)=>{var T=EUe(),w=L(T);fe(w,()=>Ux,(I,x)=>{x(I,{children:(D,$)=>{et();var H=Nt("Cancel");C(D,H)},$$slots:{default:!0}})});var A=te(w,2);fe(A,()=>Eh,(I,x)=>{x(I,{class:"text-destructive-foreground bg-destructive hover:bg-destructive/90",get onclick(){return e.onConfirm},children:(D,$)=>{et();var H=Nt("Delete");C(D,H)},$$slots:{default:!0}})}),C(y,T)},$$slots:{default:!0}})}),C(m,g)},$$slots:{default:!0}})}),C(o,c)},$$slots:{default:!0}})}),C(t,n),Te()}var TUe=q('<div class="flex items-center justify-between gap-4"><div class="flex items-center gap-2"><!> <!> <!></div> <!></div> <div class="flex flex-wrap gap-1.5"><!> <!> <!></div> <div class="space-y-1.5"><!> <!></div> <!> <div class="flex justify-end gap-2"><!> <!> <!></div>',1);function CUe(t){Pc(t,{class:"grid gap-3 p-4",children:(e,r)=>{var n=TUe(),a=L(n),i=j(a),s=j(i);Fa(s,{class:"h-5 w-5 rounded"});var o=te(s,2);Fa(o,{class:"h-5 w-28"});var l=te(o,2);Fa(l,{class:"h-5 w-12 rounded-full"}),Y(i);var c=te(i,2);Fa(c,{class:"h-6 w-11 rounded-full"}),Y(a);var u=te(a,2),d=j(u);Fa(d,{class:"h-5 w-14 rounded-full"});var h=te(d,2);Fa(h,{class:"h-5 w-12 rounded-full"});var m=te(h,2);Fa(m,{class:"h-5 w-16 rounded-full"}),Y(u);var f=te(u,2),g=j(f);Fa(g,{class:"h-4 w-40"});var b=te(g,2);Fa(b,{class:"h-4 w-52"}),Y(f);var _=te(f,2);Fa(_,{class:"h-3.5 w-36"});var S=te(_,2),E=j(S);Fa(E,{class:"h-8 w-8 rounded"});var y=te(E,2);Fa(y,{class:"h-8 w-8 rounded"});var v=te(y,2);Fa(v,{class:"h-8 w-8 rounded"}),Y(S),C(e,n)},$$slots:{default:!0}})}var wUe=q("<!> <span>Server instructions</span>",1),AUe=q('<p class="rounded bg-muted/50 p-2 text-xs text-muted-foreground"> </p>'),RUe=q("<!> <!>",1);function OUe(t,e){let r=_e(!1);var n=se(),a=L(n);{var i=s=>{var o=se(),l=L(o);fe(l,()=>Yp,(c,u)=>{u(c,{get class(){return e.class},get open(){return p(r)},set open(d){k(r,d,!0)},children:(d,h)=>{var m=RUe(),f=L(m);fe(f,()=>Vp,(b,_)=>{_(b,{class:"flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:(S,E)=>{var y=wUe(),v=L(y);{var T=A=>{Yc(A,{class:"h-3.5 w-3.5"})},w=A=>{Vc(A,{class:"h-3.5 w-3.5"})};le(v,A=>{p(r)?A(T):A(w,!1)})}et(2),C(S,y)},$$slots:{default:!0}})});var g=te(f,2);fe(g,()=>Wp,(b,_)=>{_(b,{class:"mt-2",children:(S,E)=>{var y=AUe(),v=j(y,!0);Y(y),we(()=>qe(v,e.instructions)),C(S,y)},$$slots:{default:!0}})}),C(d,m)},$$slots:{default:!0}})}),C(s,o)};le(a,s=>{e.instructions&&s(i)})}C(t,n)}var NUe=q('<div class="flex flex-col gap-2"><div class="mb-2 flex items-center gap-4"><!> <!></div> <h3 class="text-sm font-medium">Available resources</h3></div>');function IUe(t,e){ye(e,!0);let r=V(e,"searchQuery",3,"");var n=NUe(),a=j(n),i=j(a);LE(i,{placeholder:"Search resources...",get value(){return r()},onInput:o=>e.onSearch?.(o)});var s=te(i,2);Dr(s,{variant:"ghost",size:"sm",class:"h-8 w-8 p-0",get onclick(){return e.onRefresh},get disabled(){return e.isLoading},title:"Refresh resources",children:(o,l)=>{var c=se(),u=L(c);{var d=m=>{Xa(m,{class:"h-4 w-4 animate-spin"})},h=m=>{Ic(m,{class:"h-4 w-4"})};le(u,m=>{e.isLoading?m(d):m(h,!1)})}C(o,c)},$$slots:{default:!0}}),Y(a),et(2),Y(n),C(t,n),Te()}var xUe=q('<div class="py-4 text-center text-sm text-muted-foreground"><!></div>');function DUe(t,e){var r=xUe(),n=j(r);{var a=s=>{var o=Nt("Loading resources...");C(s,o)},i=s=>{var o=Nt("No resources available");C(s,o)};le(n,