omo-web 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.js CHANGED
@@ -1,31 +1,31 @@
1
- var Im=Object.create;var{getPrototypeOf:Nm,defineProperty:Qa,getOwnPropertyNames:Bm}=Object;var S0=Object.prototype.hasOwnProperty;function Om(e){return this[e]}var zm,Fm,$m=(e,t,n)=>{var r=e!=null&&typeof e==="object";if(r){var s=t?zm??=new WeakMap:Fm??=new WeakMap,i=s.get(e);if(i)return i}n=e!=null?Im(Nm(e)):{};let a=t||!e||!e.__esModule||!S0.call(e,"default")?Qa(n,"default",{value:e,enumerable:!0}):n;if(e&&typeof e==="object"||typeof e==="function"){for(let o of Bm(e))if(!S0.call(a,o))Qa(a,o,{get:Om.bind(e,o),enumerable:!0})}if(r)s.set(e,a);return a};var qm=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Hm=(e)=>e;function Pm(e,t){this[e]=Hm.bind(null,t)}var R0=(e,t)=>{for(var n in t)Qa(e,n,{get:t[n],enumerable:!0,configurable:!0,set:Pm.bind(t,n)})};var Zd=qm(function(z6,Jd){function Nd(e){if(e instanceof Map)e.clear=e.delete=e.set=function(){throw Error("map is read-only")};else if(e instanceof Set)e.add=e.clear=e.delete=function(){throw Error("set is read-only")};return Object.freeze(e),Object.getOwnPropertyNames(e).forEach((t)=>{let n=e[t],r=typeof n;if((r==="object"||r==="function")&&!Object.isFrozen(n))Nd(n)}),e}class yl{constructor(e){if(e.data===void 0)e.data={};this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Bd(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function or(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let s in r)n[s]=r[s]}),n}var j2="</span>",Sd=(e)=>!!e.scope,G2=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,s)=>`${r}${"_".repeat(s+1)}`)].join(" ")}return`${t}${e}`};class Od{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Bd(e)}openNode(e){if(!Sd(e))return;let t=G2(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){if(!Sd(e))return;this.buffer+=j2}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}var Rd=(e={})=>{let t={children:[]};return Object.assign(t,e),t};class wl{constructor(){this.rootNode=Rd(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=Rd({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop();return}closeAllNodes(){while(this.closeNode());}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){if(typeof t==="string")e.addText(t);else if(t.children)e.openNode(t),t.children.forEach((n)=>this._walk(e,n)),e.closeNode(t);return e}static _collapse(e){if(typeof e==="string")return;if(!e.children)return;if(e.children.every((t)=>typeof t==="string"))e.children=[e.children.join("")];else e.children.forEach((t)=>{wl._collapse(t)})}}class zd extends wl{constructor(e){super();this.options=e}addText(e){if(e==="")return;this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;if(t)n.scope=`language:${t}`;this.add(n)}toHTML(){return new Od(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function ti(e){if(!e)return null;if(typeof e==="string")return e;return e.source}function Fd(e){return Sr("(?=",e,")")}function K2(e){return Sr("(?:",e,")*")}function V2(e){return Sr("(?:",e,")?")}function Sr(...e){return e.map((n)=>ti(n)).join("")}function J2(e){let t=e[e.length-1];if(typeof t==="object"&&t.constructor===Object)return e.splice(e.length-1,1),t;else return{}}function va(...e){return"("+(J2(e).capture?"":"?:")+e.map((r)=>ti(r)).join("|")+")"}function $d(e){return new RegExp(e.toString()+"|").exec("").length-1}function Z2(e,t){let n=e&&e.exec(t);return n&&n.index===0}var Y2=new RegExp(va(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function kl(e,{joinWith:t}){let n=0;return e.map((r)=>{n+=1;let s=n,i=ti(r),a="";while(i.length>0){let o=Y2.exec(i);if(!o){a+=i;break}if(a+=i.substring(0,o.index),i=i.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1])a+="\\"+String(Number(o[1])+s);else if(a+=o[0],o[0]==="("||/^\(\?[<']/.test(o[0]))n++}return a}).map((r)=>`(${r})`).join(t)}var X2=/\b\B/,qd="[a-zA-Z]\\w*",xl="[a-zA-Z_]\\w*",Hd="\\b\\d+(\\.\\d+)?",Pd="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ud="\\b(0b[01]+)",Q2="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e3=(e={})=>{let t=/^#![ ]*\//;if(e.binary)e.begin=Sr(t,/.*\b/,e.binary,/\b.*/);return or({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{if(n.index!==0)r.ignoreMatch()}},e)},ni={begin:"\\\\[\\s\\S]",relevance:0},t3={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ni]},n3={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ni]},r3={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ya=function(e,t,n={}){let r=or({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let s=va("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Sr(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},s3=ya("//","$"),i3=ya("/\\*","\\*/"),a3=ya("#","$"),o3={scope:"number",begin:Hd,relevance:0},l3={scope:"number",begin:Pd,relevance:0},c3={scope:"number",begin:Ud,relevance:0},u3={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ni,{begin:/\[/,end:/\]/,relevance:0,contains:[ni]}]},d3={scope:"title",begin:qd,relevance:0},h3={scope:"title",begin:xl,relevance:0},f3={begin:"\\.\\s*"+xl,relevance:0},m3=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{if(n.data._beginMatch!==t[1])n.ignoreMatch()}})},ga=Object.freeze({__proto__:null,APOS_STRING_MODE:t3,BACKSLASH_ESCAPE:ni,BINARY_NUMBER_MODE:c3,BINARY_NUMBER_RE:Ud,COMMENT:ya,C_BLOCK_COMMENT_MODE:i3,C_LINE_COMMENT_MODE:s3,C_NUMBER_MODE:l3,C_NUMBER_RE:Pd,END_SAME_AS_BEGIN:m3,HASH_COMMENT_MODE:a3,IDENT_RE:qd,MATCH_NOTHING_RE:X2,METHOD_GUARD:f3,NUMBER_MODE:o3,NUMBER_RE:Hd,PHRASAL_WORDS_MODE:r3,QUOTE_STRING_MODE:n3,REGEXP_MODE:u3,RE_STARTERS_RE:Q2,SHEBANG:e3,TITLE_MODE:d3,UNDERSCORE_IDENT_RE:xl,UNDERSCORE_TITLE_MODE:h3});function p3(e,t){if(e.input[e.index-1]===".")t.ignoreMatch()}function g3(e,t){if(e.className!==void 0)e.scope=e.className,delete e.className}function b3(e,t){if(!t)return;if(!e.beginKeywords)return;if(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=p3,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0)e.relevance=0}function v3(e,t){if(!Array.isArray(e.illegal))return;e.illegal=va(...e.illegal)}function y3(e,t){if(!e.match)return;if(e.begin||e.end)throw Error("begin & end are not supported with match");e.begin=e.match,delete e.match}function w3(e,t){if(e.relevance===void 0)e.relevance=1}var k3=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach((r)=>{delete e[r]}),e.keywords=n.keywords,e.begin=Sr(n.beforeMatch,Fd(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},x3=["of","and","for","in","not","or","if","then","parent","list","value"],E3="keyword";function Wd(e,t,n=E3){let r=Object.create(null);if(typeof e==="string")s(n,e.split(" "));else if(Array.isArray(e))s(n,e);else Object.keys(e).forEach(function(i){Object.assign(r,Wd(e[i],t,i))});return r;function s(i,a){if(t)a=a.map((o)=>o.toLowerCase());a.forEach(function(o){let l=o.split("|");r[l[0]]=[i,A3(l[0],l[1])]})}}function A3(e,t){if(t)return Number(t);return C3(e)?0:1}function C3(e){return x3.includes(e.toLowerCase())}var Md={},Tr=(e)=>{console.error(e)},Dd=(e,...t)=>{console.log(`WARN: ${e}`,...t)},ss=(e,t)=>{if(Md[`${e}/${t}`])return;console.log(`Deprecated as of ${e}. ${t}`),Md[`${e}/${t}`]=!0},ba=Error();function jd(e,t,{key:n}){let r=0,s=e[n],i={},a={};for(let o=1;o<=t.length;o++)a[o+r]=s[o],i[o+r]=!0,r+=$d(t[o-1]);e[n]=a,e[n]._emit=i,e[n]._multi=!0}function _3(e){if(!Array.isArray(e.begin))return;if(e.skip||e.excludeBegin||e.returnBegin)throw Tr("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ba;if(typeof e.beginScope!=="object"||e.beginScope===null)throw Tr("beginScope must be object"),ba;jd(e,e.begin,{key:"beginScope"}),e.begin=kl(e.begin,{joinWith:""})}function T3(e){if(!Array.isArray(e.end))return;if(e.skip||e.excludeEnd||e.returnEnd)throw Tr("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ba;if(typeof e.endScope!=="object"||e.endScope===null)throw Tr("endScope must be object"),ba;jd(e,e.end,{key:"endScope"}),e.end=kl(e.end,{joinWith:""})}function S3(e){if(e.scope&&typeof e.scope==="object"&&e.scope!==null)e.beginScope=e.scope,delete e.scope}function R3(e){if(S3(e),typeof e.beginScope==="string")e.beginScope={_wrap:e.beginScope};if(typeof e.endScope==="string")e.endScope={_wrap:e.endScope};_3(e),T3(e)}function M3(e){function t(a,o){return new RegExp(ti(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(o?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,o){o.position=this.position++,this.matchIndexes[this.matchAt]=o,this.regexes.push([o,a]),this.matchAt+=$d(a)+1}compile(){if(this.regexes.length===0)this.exec=()=>null;let a=this.regexes.map((o)=>o[1]);this.matcherRe=t(kl(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;let o=this.matcherRe.exec(a);if(!o)return null;let l=o.findIndex((d,f)=>f>0&&d!==void 0),u=this.matchIndexes[l];return o.splice(0,l),Object.assign(o,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];let o=new n;return this.rules.slice(a).forEach(([l,u])=>o.addRule(l,u)),o.compile(),this.multiRegexes[a]=o,o}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,o){if(this.rules.push([a,o]),o.type==="begin")this.count++}exec(a){let o=this.getMatcher(this.regexIndex);o.lastIndex=this.lastIndex;let l=o.exec(a);if(this.resumingScanAtSamePosition())if(l&&l.index===this.lastIndex);else{let u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,l=u.exec(a)}if(l){if(this.regexIndex+=l.position+1,this.regexIndex===this.count)this.considerAll()}return l}}function s(a){let o=new r;if(a.contains.forEach((l)=>o.addRule(l.begin,{rule:l,type:"begin"})),a.terminatorEnd)o.addRule(a.terminatorEnd,{type:"end"});if(a.illegal)o.addRule(a.illegal,{type:"illegal"});return o}function i(a,o){let l=a;if(a.isCompiled)return l;[g3,y3,R3,k3].forEach((d)=>d(a,o)),e.compilerExtensions.forEach((d)=>d(a,o)),a.__beforeBegin=null,[b3,v3,w3].forEach((d)=>d(a,o)),a.isCompiled=!0;let u=null;if(typeof a.keywords==="object"&&a.keywords.$pattern)a.keywords=Object.assign({},a.keywords),u=a.keywords.$pattern,delete a.keywords.$pattern;if(u=u||/\w+/,a.keywords)a.keywords=Wd(a.keywords,e.case_insensitive);if(l.keywordPatternRe=t(u,!0),o){if(!a.begin)a.begin=/\B|\b/;if(l.beginRe=t(l.begin),!a.end&&!a.endsWithParent)a.end=/\B|\b/;if(a.end)l.endRe=t(l.end);if(l.terminatorEnd=ti(l.end)||"",a.endsWithParent&&o.terminatorEnd)l.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd}if(a.illegal)l.illegalRe=t(a.illegal);if(!a.contains)a.contains=[];if(a.contains=[].concat(...a.contains.map(function(d){return D3(d==="self"?a:d)})),a.contains.forEach(function(d){i(d,l)}),a.starts)i(a.starts,o);return l.matcher=s(l),l}if(!e.compilerExtensions)e.compilerExtensions=[];if(e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=or(e.classNameAliases||{}),i(e)}function Gd(e){if(!e)return!1;return e.endsWithParent||Gd(e.starts)}function D3(e){if(e.variants&&!e.cachedVariants)e.cachedVariants=e.variants.map(function(t){return or(e,{variants:null},t)});if(e.cachedVariants)return e.cachedVariants;if(Gd(e))return or(e,{starts:e.starts?or(e.starts):null});if(Object.isFrozen(e))return or(e);return e}var L3="11.12.0";class Kd extends Error{constructor(e,t){super(e);this.name="HTMLInjectionError",this.html=t}}var vl=Bd,Ld=or,Id=Symbol("nomatch"),I3=7,Vd=function(e){let t=Object.create(null),n=Object.create(null),r=[],s=!0,i="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]},o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:zd};function l(F){return o.noHighlightRe.test(F)}function u(F){let K=F.className+" ";K+=F.parentNode?F.parentNode.className:"";let Y=o.languageDetectRe.exec(K);if(Y){let ee=z(Y[1]);if(!ee)Dd(i.replace("{}",Y[1])),Dd("Falling back to no-highlight mode for this block.",F);return ee?Y[1]:"no-highlight"}return K.split(/\s+/).find((ee)=>l(ee)||z(ee))}function d(F,K,Y){let ee="",ie="";if(typeof K==="object")ee=F,Y=K.ignoreIllegals,ie=K.language;else ss("10.7.0","highlight(lang, code, ...args) has been deprecated."),ss("10.7.0",`Please use highlight(code, options) instead.
2
- https://github.com/highlightjs/highlight.js/issues/2277`),ie=F,ee=K;if(Y===void 0)Y=!0;let H={code:ee,language:ie};re("before:highlight",H);let q=H.result?H.result:f(H.language,H.code,Y);return q.code=H.code,re("after:highlight",q),q}function f(F,K,Y,ee){let ie=Object.create(null);function H(ue,be){return ue.keywords[be]}function q(){if(!Te.keywords){nt.addText($e);return}let ue=0;Te.keywordPatternRe.lastIndex=0;let be=Te.keywordPatternRe.exec($e),Re="";while(be){Re+=$e.substring(ue,be.index);let Ie=yt.case_insensitive?be[0].toLowerCase():be[0],Et=H(Te,Ie);if(Et){let[_n,Dm]=Et;if(nt.addText(Re),Re="",ie[Ie]=(ie[Ie]||0)+1,ie[Ie]<=I3)jr+=Dm;if(_n.startsWith("_"))Re+=be[0];else{let Lm=yt.classNameAliases[_n]||_n;N(be[0],Lm)}}else Re+=be[0];ue=Te.keywordPatternRe.lastIndex,be=Te.keywordPatternRe.exec($e)}Re+=$e.substring(ue),nt.addText(Re)}function W(){if($e==="")return;let ue=null;if(typeof Te.subLanguage==="string"){if(!t[Te.subLanguage]){nt.addText($e);return}ue=f(Te.subLanguage,$e,!0,Ss[Te.subLanguage]),Ss[Te.subLanguage]=ue._top}else ue=g($e,Te.subLanguage.length?Te.subLanguage:null);if(Te.relevance>0)jr+=ue.relevance;nt.__addSublanguage(ue._emitter,ue.language)}function le(){if(Te.subLanguage!=null)W();else q();$e=""}function N(ue,be){if(ue==="")return;nt.startScope(be),nt.addText(ue),nt.endScope()}function J(ue,be){let Re=1,Ie=be.length-1;while(Re<=Ie){if(!ue._emit[Re]){Re++;continue}let Et=yt.classNameAliases[ue[Re]]||ue[Re],_n=be[Re];if(Et)N(_n,Et);else $e=_n,q(),$e="";Re++}}function oe(ue,be){if(ue.scope&&typeof ue.scope==="string")nt.openNode(yt.classNameAliases[ue.scope]||ue.scope);if(ue.beginScope){if(ue.beginScope._wrap)N($e,yt.classNameAliases[ue.beginScope._wrap]||ue.beginScope._wrap),$e="";else if(ue.beginScope._multi)J(ue.beginScope,be),$e=""}return Te=Object.create(ue,{parent:{value:Te}}),Te}function Ce(ue,be,Re){let Ie=Z2(ue.endRe,Re);if(Ie){if(ue["on:end"]){let Et=new yl(ue);if(ue["on:end"](be,Et),Et.isMatchIgnored)Ie=!1}if(Ie){while(ue.endsParent&&ue.parent)ue=ue.parent;return ue}}if(ue.endsWithParent)return Ce(ue.parent,be,Re)}function ye(ue){if(Te.matcher.regexIndex===0)return $e+=ue[0],1;else return Kr=!0,0}function Be(ue){let be=ue[0],Re=ue.rule,Ie=new yl(Re),Et=[Re.__beforeBegin,Re["on:begin"]];for(let _n of Et){if(!_n)continue;if(_n(ue,Ie),Ie.isMatchIgnored)return ye(be)}if(Re.skip)$e+=be;else{if(Re.excludeBegin)$e+=be;if(le(),!Re.returnBegin&&!Re.excludeBegin)$e=be}return oe(Re,ue),Re.returnBegin?0:be.length}function Fe(ue){let be=ue[0],Re=K.substring(ue.index),Ie=Ce(Te,ue,Re);if(!Ie)return Id;let Et=Te;if(Te.endScope&&Te.endScope._wrap)le(),N(be,Te.endScope._wrap);else if(Te.endScope&&Te.endScope._multi)le(),J(Te.endScope,ue);else if(Et.skip)$e+=be;else{if(!(Et.returnEnd||Et.excludeEnd))$e+=be;if(le(),Et.excludeEnd)$e=be}do{if(Te.scope)nt.closeNode();if(!Te.skip&&!Te.subLanguage)jr+=Te.relevance;Te=Te.parent}while(Te!==Ie.parent);if(Ie.starts)oe(Ie.starts,ue);return Et.returnEnd?0:be.length}function Pe(){let ue=[];for(let be=Te;be!==yt;be=be.parent)if(be.scope)ue.unshift(be.scope);ue.forEach((be)=>nt.openNode(be))}let Ve={};function mt(ue,be){let Re=be&&be[0];if($e+=ue,Re==null)return le(),0;if(Ve.type==="begin"&&be.type==="end"&&Ve.index===be.index&&Re===""){if($e+=K.slice(be.index,be.index+1),!s){let Ie=Error(`0 width match regex (${F})`);throw Ie.languageName=F,Ie.badRule=Ve.rule,Ie}return 1}if(Ve=be,be.type==="begin")return Be(be);else if(be.type==="illegal"&&!Y){let Ie=Error('Illegal lexeme "'+Re+'" for mode "'+(Te.scope||"<unnamed>")+'"');throw Ie.mode=Te,Ie}else if(be.type==="end"){let Ie=Fe(be);if(Ie!==Id)return Ie}if(be.type==="illegal"&&Re===""){if(be.index===K.length);else $e+=`
3
- `;return 1}if(Gr>1e5&&Gr>be.index*3)throw Error("potential infinite loop, way more iterations than matches");return $e+=Re,Re.length}let yt=z(F);if(!yt)throw Tr(i.replace("{}",F)),Error('Unknown language: "'+F+'"');let Wr=M3(yt),Cn="",Te=ee||Wr,Ss={},nt=new o.__emitter(o);Pe();let $e="",jr=0,Zt=0,Gr=0,Kr=!1;try{if(!yt.__emitTokens){Te.matcher.considerAll();for(;;){if(Gr++,Kr)Kr=!1;else Te.matcher.considerAll();Te.matcher.lastIndex=Zt;let ue=Te.matcher.exec(K);if(!ue)break;let be=K.substring(Zt,ue.index),Re=mt(be,ue);Zt=ue.index+Re}mt(K.substring(Zt))}else yt.__emitTokens(K,nt);return nt.finalize(),Cn=nt.toHTML(),{language:F,value:Cn,relevance:jr,illegal:!1,_emitter:nt,_top:Te}}catch(ue){if(ue.message&&ue.message.includes("Illegal"))return{language:F,value:vl(K),illegal:!0,relevance:0,_illegalBy:{message:ue.message,index:Zt,context:K.slice(Zt-100,Zt+100),mode:ue.mode,resultSoFar:Cn},_emitter:nt};else if(s)return{language:F,value:vl(K),illegal:!1,relevance:0,errorRaised:ue,_emitter:nt,_top:Te};else throw ue}}function p(F){let K={value:vl(F),illegal:!1,relevance:0,_top:a,_emitter:new o.__emitter(o)};return K._emitter.addText(F),K}function g(F,K){K=K||o.languages||Object.keys(t);let Y=p(F),ee=K.filter(z).filter(P).map((le)=>f(le,F,!1));ee.unshift(Y);let ie=ee.sort((le,N)=>{if(le.relevance!==N.relevance)return N.relevance-le.relevance;if(le.language&&N.language){if(z(le.language).supersetOf===N.language)return 1;else if(z(N.language).supersetOf===le.language)return-1}return 0}),[H,q]=ie,W=H;return W.secondBest=q,W}function b(F,K,Y){let ee=K&&n[K]||Y;F.classList.add("hljs"),F.classList.add(`language-${ee}`)}function x(F){let K=null,Y=u(F);if(l(Y))return;if(re("before:highlightElement",{el:F,language:Y}),F.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",F);return}if(F.children.length>0){if(!o.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(F);if(o.throwUnescapedHTML)throw new Kd("One of your code blocks includes unescaped HTML.",F.innerHTML)}K=F;let ee=K.textContent,ie=Y?d(ee,{language:Y,ignoreIllegals:!0}):g(ee);if(F.innerHTML=ie.value,F.dataset.highlighted="yes",b(F,Y,ie.language),F.result={language:ie.language,re:ie.relevance,relevance:ie.relevance},ie.secondBest)F.secondBest={language:ie.secondBest.language,relevance:ie.secondBest.relevance};re("after:highlightElement",{el:F,result:ie,text:ee})}function k(F){o=Ld(o,F)}let A=()=>{E(),ss("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function T(){E(),ss("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let S=!1;function E(){function F(){E()}if(document.readyState==="loading"){if(!S)window.addEventListener("DOMContentLoaded",F,!1);S=!0;return}document.querySelectorAll(o.cssSelector).forEach(x)}function D(F,K){let Y=null;try{Y=K(e)}catch(ee){if(Tr("Language definition for '{}' could not be registered.".replace("{}",F)),!s)throw ee;else Tr(ee);Y=a}if(!Y.name)Y.name=F;if(t[F]=Y,Y.rawDefinition=K.bind(null,e),Y.aliases)O(Y.aliases,{languageName:F})}function M(F){delete t[F];for(let K of Object.keys(n))if(n[K]===F)delete n[K]}function L(){return Object.keys(t)}function z(F){return F=(F||"").toLowerCase(),t[F]||t[n[F]]}function O(F,{languageName:K}){if(typeof F==="string")F=[F];F.forEach((Y)=>{n[Y.toLowerCase()]=K})}function P(F){let K=z(F);return K&&!K.disableAutodetect}function V(F){if(F["before:highlightBlock"]&&!F["before:highlightElement"])F["before:highlightElement"]=(K)=>{F["before:highlightBlock"](Object.assign({block:K.el},K))};if(F["after:highlightBlock"]&&!F["after:highlightElement"])F["after:highlightElement"]=(K)=>{F["after:highlightBlock"](Object.assign({block:K.el},K))}}function G(F){V(F),r.push(F)}function ce(F){let K=r.indexOf(F);if(K!==-1)r.splice(K,1)}function re(F,K){let Y=F;r.forEach(function(ee){if(ee[Y])ee[Y](K)})}function de(F){return ss("10.7.0","highlightBlock will be removed entirely in v12.0"),ss("10.7.0","Please use highlightElement now."),x(F)}Object.assign(e,{highlight:d,highlightAuto:g,highlightAll:E,highlightElement:x,highlightBlock:de,configure:k,initHighlighting:A,initHighlightingOnLoad:T,registerLanguage:D,unregisterLanguage:M,listLanguages:L,getLanguage:z,registerAliases:O,autoDetection:P,inherit:Ld,addPlugin:G,removePlugin:ce}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString=L3,e.regex={concat:Sr,lookahead:Fd,either:va,optional:V2,anyNumberOfTimes:K2};for(let F in ga)if(typeof ga[F]==="object")Nd(ga[F]);return Object.assign(e,ga),e},is=Vd({});is.newInstance=()=>Vd({});Jd.exports=is;is.HighlightJS=is;is.default=is});var so={};R0(so,{decode:()=>Ms,encode:()=>Qn,format:()=>Vr,parse:()=>Ds});var co={};R0(co,{Any:()=>io,Cc:()=>ao,Cf:()=>ap,P:()=>Ls,S:()=>oo,Z:()=>lo});function Um(){if(typeof window>"u")return"zh-CN";try{return window.localStorage.getItem("omo-web-language")==="en"?"en":"zh-CN"}catch{return"zh-CN"}}var me=Um();function c(e,t){return me==="en"?t:e}function M0(e){try{return window.localStorage.setItem("omo-web-language",e),!0}catch{return!1}}function D0(e=document){if(e.documentElement.lang=me,me!=="en")return;for(let t of e.querySelectorAll("[data-en]"))t.textContent=t.getAttribute("data-en");for(let t of["title","aria-label","placeholder","alt"]){let n=`data-en-${t}`;for(let r of e.querySelectorAll(`[${n}]`)){let s=r.getAttribute(n);if(s!==null)r.setAttribute(t,s)}}}function ge(e,t){let n=document.getElementById(e);if(n instanceof t)return n;throw Error(c(`界面控件不存在:${e}`,`Missing interface control: ${e}`))}function y(e,t="",n=""){let r=document.createElement(e);if(t)r.className=t;if(n)r.textContent=n;return r}function We(e,t,n=""){let r=y("button",`button ${n}`,e);return r.type="button",r.addEventListener("click",t),r}function se(e,t=""){if(e.textContent!==t)e.textContent=t;e.hidden=!t}function Xn(e,t){let n=y("label","field");return n.append(y("span","",e),t),n}function pt(e,t){let n=y("option","",e);return n.value=t,n}function Yt(e,...t){let n=y("details"),r=y("div","fold-body stack stack--tight");return r.append(...t),n.append(y("summary","",e),r),n}function Tn(e){let t=y("pre");return t.tabIndex=0,t.append(y("code","",e)),t}var Wm=(e)=>e!==null&&typeof e==="object"&&!Array.isArray(e),j=(e)=>Wm(e)?e:{},ve=(e)=>Array.isArray(e)?e:[],C=(e)=>typeof e==="string"?e:"",we=(e)=>typeof e==="number"&&Number.isFinite(e)?e:void 0,L0=(e)=>typeof e==="string"?e:JSON.stringify(e,null,2)??"",Ee=(e)=>e instanceof Error?e.message:c("发生未知错误","An unknown error occurred"),jm=["image/png","image/jpeg","image/gif","image/webp"],Li=(e)=>jm.some((t)=>t===e);function ln(e){let t=j(e),n=C(t.id);if(!n)return;return{id:n,name:C(t.name)||c("未命名会话","Untitled session"),cwd:C(t.cwd),updatedAt:we(t.updatedAt)??0,archived:t.archived===!0,settled:t.settled===!0,active:t.active===!0,running:t.running===!0}}var eo=(e)=>ve(e.sessions).flatMap((t)=>{let n=ln(t);return n?[n]:[]});class De extends Error{status;code;constructor(e,t,n){super(e);this.status=t;this.code=n}}var Xe=(e)=>`/api/sessions/${encodeURIComponent(e)}`,Ii=(e)=>`/api/cli-history/${encodeURIComponent(e)}`,Ni=(e)=>`/api/cli-live/${encodeURIComponent(e)}`,to=({kind:e,id:t})=>{switch(e){case"web":return Xe(t);case"history":return Ii(t);case"live":return Ni(t)}};class no{token="";async request(e,t,n){let r=t!==void 0,s=await fetch(e,{method:r?"POST":"GET",signal:n,cache:"no-store",...r?{headers:{"Content-Type":"application/json","X-OmO-Token":this.token},body:JSON.stringify(t)}:{}}),i;try{let a=await s.json();i=j(a)}catch(a){if(!(a instanceof SyntaxError))throw a;throw new De(c(`本机 Web 服务返回了无效响应(HTTP ${s.status})`,`The local Web server returned an invalid response (HTTP ${s.status}).`),s.status,"")}if(!s.ok)throw new De(C(i.error)||c(`请求失败(HTTP ${s.status})`,`Request failed (HTTP ${s.status}).`),s.status,C(i.code));return i}action(e,t){return this.request(`${Xe(e)}/actions`,t)}cliLiveAction(e,t){return this.request(`${Ni(e)}/actions`,t)}async resumeHistory(e){let t=await this.request(`${Ii(e)}/resume`,{}),n=ln(t.session);if(!n?.active)throw new De(c("没有收到可继续的 Web 会话。请检查会话列表。","No active Web session was returned. Check the session list."),502,"");return n}async handoff(e){let t=await this.request(`${Xe(e)}/handoff`,{}),n=ln(t.session),r=C(t.command);if(!n||n.id!==e||j(t.session).active!==!1||!r.trim())throw new De(c("无法确认会话已释放,未显示启动命令。","Could not confirm that the session was released. The launch command was not shown."),502,"");return{session:n,command:r}}}var Gm=new Set(["select","confirm","input","editor","question"]),Rs=(e)=>C(e.id)||C(e.requestId),Bi=(e)=>Boolean(Rs(e)&&Gm.has(C(e.method)));function Km(e,t){let n=[];for(let[s,i]of ve(t.questions).entries()){let a=j(i),o=C(a.id);if(!o)continue;let l=y("fieldset","stack stack--tight"),u=(s+1).toLocaleString(me);if(l.append(y("legend","",C(a.header)||c(`问题 ${u}`,`Question ${u}`))),C(a.question))l.append(y("p","plain",C(a.question)));let d=[];for(let p of ve(a.options)){let g=j(p),b=C(g.label);if(!b)continue;let x=y("input");x.name=`question-${s}`,x.type=a.multiSelect===!0?"checkbox":"radio",x.value=b;let k=y("label","interaction-option"),A=y("span","break",b);if(C(g.description))A.append(y("small","muted",` · ${C(g.description)}`));k.append(x,A),d.push(x),l.append(k)}let f=y("input");f.type="text",f.maxLength=12000,f.autocomplete="off",l.append(Xn(c("自填回答(选填)","Your own answer (optional)"),f)),e.append(l),n.push(()=>{let p=d.filter((b)=>b.checked).map((b)=>b.value),g=f.value.trim();return p.length||g?[o,{selected:p,...g?{text:g}:{}}]:void 0})}let r=y("textarea");return r.rows=2,r.maxLength=12000,e.append(Xn(c("补充说明(选填)","Comment (optional)"),r)),e.append(y("p","small muted",c("至少回答一题或填写补充说明。","Answer at least one question or leave a comment."))),()=>{let s=n.flatMap((a)=>{let o=a();return o?[o]:[]}),i=r.value.trim();return s.length||i?{answers:Object.fromEntries(s),...i?{comment:i}:{}}:void 0}}function N0(e,t){let n=e.querySelector("[data-question-metadata]");if(!n)return;let r=[];if(t.waitForAnswer===!0)r.push(c("等待回答","Waiting for your answer"));else if(t.waitForAnswer===!1)r.push(c("异步提问","Not waiting for an answer"));let s=C(t.raisedBy);if(s)r.push(c(`提问人:${s}`,`Asked by: ${s}`));let i=we(t.remainingMs);if(i!==void 0){let o=Math.ceil(Math.max(0,i)/1000),l=o.toLocaleString(me);r.push(c(`更新时剩余 ${l} 秒`,`${l} ${o===1?"second":"seconds"} left at last update`))}let a=we(t.deadlineAtMs);if(a!==void 0){let o=new Date(a);if(!Number.isNaN(o.getTime())){let l=o.toLocaleString(me);r.push(c(`截止:${l}`,`Deadline: ${l}`))}}n.textContent=r.join(" · "),n.hidden=r.length===0}var I0={Allow:c("允许","Allow"),"Allow once":c("仅允许这次","Allow once"),"Allow always":c("始终允许","Always allow"),"Allow for session":c("本会话始终允许","Allow for this session"),Deny:c("拒绝","Deny"),Block:c("阻止","Block"),"Deny with feedback":c("拒绝并说明原因","Deny with feedback")};function Vm(e,t){let n=C(e.method),r=C(e.title),s=Boolean(e.toolCallId)&&n!=="question",i=y("form","request-form"),a=n==="question"?c("待回答问题","Pending question"):s?c("工具批准","Tool approval"):c("等待你的决定","Your response is needed");i.setAttribute("aria-label",a),i.dataset.method=n;let o=y(r?"p":"h2","request-kind",n==="question"?c("Agent 提问","Agent question"):a),l=y("div","request-copy");if(r)l.append(y("h2","plain request-title",r));if(C(e.message))l.append(y("p","plain",C(e.message)));if(n==="question"){let E=y("p","small muted");E.dataset.questionMetadata="",l.append(E)}let u=j(e.remoteOrigin),d=C(u.deviceName)||C(u.deviceId);if(d)l.append(y("p","small muted break",c(`请求设备:${d}`,`Requesting device: ${d}`)));if(s){let E=C(e.toolCallId);l.append(y("p","small muted path",c(`工具调用:${E}`,`Tool call: ${E}`)))}let f=y("div","stack stack--tight request-fields"),p=y("p","notice error small");p.setAttribute("role","alert"),p.hidden=!0;let g=y("div","row request-actions"),b=!1,x=async(E)=>{if(b||i.dataset.offline==="true")return;b=!0,i.setAttribute("aria-busy","true"),se(p);for(let D of g.querySelectorAll("button"))D.disabled=!0;try{await t(Rs(e),E)}catch(D){let M=D instanceof Error?D.message:c("发生未知错误","Unknown error");se(p,c(`未能提交:${M}`,`Could not submit: ${M}`))}finally{b=!1,i.removeAttribute("aria-busy");for(let D of g.querySelectorAll("button"))D.disabled=i.dataset.offline==="true"}},k,A=e.secret===!0||Boolean(e.privateInput);switch(n){case"question":k=Km(f,e);break;case"confirm":g.append(We(c("不批准",s?"Deny":"No"),()=>void x({confirmed:!1})),We(c("确认","Confirm"),()=>void x({confirmed:!0})));break;case"select":{let E=y("select"),D=pt(c("请选择,不会自动批准","Choose an option. Nothing is approved automatically."),"");D.disabled=!0,E.append(D);for(let M of ve(e.options))if(typeof M==="string"&&M)E.append(pt(Object.hasOwn(I0,M)?I0[M]??M:M,M));E.value="",f.append(Xn(c("可选操作","Options"),E)),k=()=>E.value?{value:E.value}:void 0;break}case"input":case"editor":{if(A){f.append(y("p","muted",c("此输入需要在原生客户端中处理。","Respond in the native client.")));break}let E=n==="editor"?y("textarea"):y("input");if(E instanceof HTMLTextAreaElement)E.rows=5,E.value=C(e.prefill);else E.autocomplete="off";E.placeholder=C(e.placeholder),f.append(Xn(c("输入内容","Response"),E)),k=()=>({value:E.value});break}}if(!A)g.append(We(c("取消请求","Cancel request"),()=>void x({cancelled:!0}),"button--quiet"));if(k){let E=y("button","button",c("提交回答","Submit response"));E.type="submit",g.append(E)}i.addEventListener("submit",(E)=>{if(E.preventDefault(),!k)return;let D=k();if(D)x(D);else se(p,c("请至少填写一项回答或选择一个操作。","Enter a response or choose an option."))});let T=y("div",n==="select"?"request-controls request-controls--choice":"request-controls");T.append(f,g);let S=y("div","request-body");if(S.append(l,T,p),i.append(o,S),n==="question")N0(i,e);return i}class ro{root;nodes=new Map;constructor(e){this.root=e}get first(){return this.nodes.values().next().value}get firstQuestion(){return[...this.nodes.values()].find((e)=>e.dataset.method==="question")}render(e,t,n){for(let[r,s]of this.nodes)if(!e.has(r))s.remove(),this.nodes.delete(r);for(let[r,s]of e){let i=this.nodes.get(r);if(!i)i=Vm(s,n),this.nodes.set(r,i),this.root.append(i);if(s.method==="question")N0(i,s);if(i.dataset.offline=String(!t),i.getAttribute("aria-busy")!=="true")for(let a of i.querySelectorAll("button"))a.disabled=!t}}reset(){this.nodes.clear(),this.root.replaceChildren()}}var B0={};function Jm(e){let t=B0[e];if(t)return t;t=B0[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function Oi(e,t){if(typeof t!=="string")t=Oi.defaultChars;let n=Jm(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let s="";for(let i=0,a=r.length;i<a;i+=3){let o=parseInt(r.slice(i+1,i+3),16);if(o<128){s+=n[o];continue}if((o&224)===192&&i+3<a){let l=parseInt(r.slice(i+4,i+6),16);if((l&192)===128){let u=o<<6&1984|l&63;if(u<128)s+="��";else s+=String.fromCharCode(u);i+=3;continue}}if((o&240)===224&&i+6<a){let l=parseInt(r.slice(i+4,i+6),16),u=parseInt(r.slice(i+7,i+9),16);if((l&192)===128&&(u&192)===128){let d=o<<12&61440|l<<6&4032|u&63;if(d<2048||d>=55296&&d<=57343)s+="���";else s+=String.fromCharCode(d);i+=6;continue}}if((o&248)===240&&i+9<a){let l=parseInt(r.slice(i+4,i+6),16),u=parseInt(r.slice(i+7,i+9),16),d=parseInt(r.slice(i+10,i+12),16);if((l&192)===128&&(u&192)===128&&(d&192)===128){let f=o<<18&1835008|l<<12&258048|u<<6&4032|d&63;if(f<65536||f>1114111)s+="����";else f-=65536,s+=String.fromCharCode(55296+(f>>10),56320+(f&1023));i+=9;continue}}s+="�"}return s})}Oi.defaultChars=";/?:@&=+$,#";Oi.componentChars="";var Ms=Oi;var O0={};function Zm(e){let t=O0[e];if(t)return t;t=O0[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);if(/^[0-9a-z]$/i.test(r))t.push(r);else t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function zi(e,t,n){if(typeof t!=="string")n=t,t=zi.defaultChars;if(typeof n>"u")n=!0;let r=Zm(t),s="";for(let i=0,a=e.length;i<a;i++){let o=e.charCodeAt(i);if(n&&o===37&&i+2<a){if(/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){s+=e.slice(i,i+3),i+=2;continue}}if(o<128){s+=r[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&i+1<a){let l=e.charCodeAt(i+1);if(l>=56320&&l<=57343){s+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[i])}return s}zi.defaultChars=";/?:@&=+$,-_.!~*'()#";zi.componentChars="-_.!~*'()";var Qn=zi;function Vr(e){let t="";if(t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1)t+="["+e.hostname+"]";else t+=e.hostname||"";return t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Fi(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Ym=/^([a-z0-9.+-]+:)/i,Xm=/:[0-9]*$/,Qm=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ep=["<",">",'"',"`"," ","\r",`
4
- `,"\t"],tp=["{","}","|","\\","^","`"].concat(ep),np=["'"].concat(tp),z0=["%","/","?",";","#"].concat(np),F0=["/","?","#"],rp=255,$0=/^[+a-z0-9A-Z_-]{0,63}$/,sp=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,q0={javascript:!0,"javascript:":!0},H0={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function ip(e,t){if(e&&e instanceof Fi)return e;let n=new Fi;return n.parse(e,t),n}Fi.prototype.parse=function(e,t){let n,r,s,i=e;if(i=i.trim(),!t&&e.split("#").length===1){let u=Qm.exec(i);if(u){if(this.pathname=u[1],u[2])this.search=u[2];return this}}let a=Ym.exec(i);if(a)a=a[0],n=a.toLowerCase(),this.protocol=a,i=i.substr(a.length);if(t||a||i.match(/^\/\/[^@\/]+@[^@\/]+/)){if(s=i.substr(0,2)==="//",s&&!(a&&q0[a]))i=i.substr(2),this.slashes=!0}if(!q0[a]&&(s||a&&!H0[a])){let u=-1;for(let b=0;b<F0.length;b++)if(r=i.indexOf(F0[b]),r!==-1&&(u===-1||r<u))u=r;let d,f;if(u===-1)f=i.lastIndexOf("@");else f=i.lastIndexOf("@",u);if(f!==-1)d=i.slice(0,f),i=i.slice(f+1),this.auth=d;u=-1;for(let b=0;b<z0.length;b++)if(r=i.indexOf(z0[b]),r!==-1&&(u===-1||r<u))u=r;if(u===-1)u=i.length;if(i[u-1]===":")u--;let p=i.slice(0,u);i=i.slice(u),this.parseHost(p),this.hostname=this.hostname||"";let g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g){let b=this.hostname.split(/\./);for(let x=0,k=b.length;x<k;x++){let A=b[x];if(!A)continue;if(!A.match($0)){let T="";for(let S=0,E=A.length;S<E;S++)if(A.charCodeAt(S)>127)T+="x";else T+=A[S];if(!T.match($0)){let S=b.slice(0,x),E=b.slice(x+1),D=A.match(sp);if(D)S.push(D[1]),E.unshift(D[2]);if(E.length)i=E.join(".")+i;this.hostname=S.join(".");break}}}}if(this.hostname.length>rp)this.hostname="";if(g)this.hostname=this.hostname.substr(1,this.hostname.length-2)}let o=i.indexOf("#");if(o!==-1)this.hash=i.substr(o),i=i.slice(0,o);let l=i.indexOf("?");if(l!==-1)this.search=i.substr(l),i=i.slice(0,l);if(i)this.pathname=i;if(H0[n]&&this.hostname&&!this.pathname)this.pathname="";return this};Fi.prototype.parseHost=function(e){let t=Xm.exec(e);if(t){if(t=t[0],t!==":")this.port=t.substr(1);e=e.substr(0,e.length-t.length)}if(e)this.hostname=e};var Ds=ip;var io=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ao=/[\0-\x1F\x7F-\x9F]/,ap=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Ls=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,oo=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/,lo=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var op=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function lp(e){return e===0||e>=55296&&e<=57343||e>1114111}function P0(e){if(lp(e))return 65533;if(e>=128&&e<=159)return op[e-128]||e;return e}function U0(e){return e-1>>>0<127||e-160>>>0<55136?String.fromCharCode(e):String.fromCodePoint(P0(e))}var Xt=(()=>{let e=new Uint8Array(127),t=0;for(let n=33;n<=126;n++)if(n!==34&&n!==36&&n!==92)e[n]=t++;return e})();function W0(e,t,n,r,s,i){let o=e.length,l=i*90,u=0,d=()=>{let O=Xt[e.charCodeAt(u++)];return O<i?O:O*91-l+Xt[e.charCodeAt(u++)]},f=n-r,p=n+s,g=new Int32Array(p);g.fill(-1,r,i),g.fill(-1,i+f,p);let b=new Int32Array(p),x=new Int32Array(p);function k(O,P){let V=0,G=P,ce=P+O;while(G<ce){let re=Xt[e.charCodeAt(u++)];if(re<89)V+=re,g[G++]=V;else if(re===89){let de=Xt[e.charCodeAt(u++)]+2;while(de--)g[G++]=++V}else{let de=Xt[e.charCodeAt(u++)];V+=89+(de<90?de*91+Xt[e.charCodeAt(u++)]:Xt[e.charCodeAt(u++)]*8281+Xt[e.charCodeAt(u++)]*91+Xt[e.charCodeAt(u++)]),g[G++]=V}}}k(r,0),k(f,i);let A=new Int32Array(s*2),T=0,S=0;function E(O,P){for(let V=0;V<O;V++){let G=P+V,ce=d(),re=d();A[S*2]=ce,A[S*2+1]=re,S+=1,b[G]=T;let de=(g[ce]<0?x[ce]:1)+(g[re]<0?x[re]:1);x[G]=de,T+=de}}E(s-i+r,i+f),E(i-r,r);let D=new Uint16Array(T),M=0;for(let O=0;O<S;O++)for(let P=0;P<2;P++){let V=A[O*2+P],G=g[V];if(G<0){let ce=b[V],re=ce+x[V];while(ce<re)D[M++]=D[ce++]}else D[M++]=G}let L=new Uint16Array(t),z=0;while(u<o){let O=Xt[e.charCodeAt(u++)];if(O>=i)O=O*91-l+Xt[e.charCodeAt(u++)];let P=g[O];if(P<0){let V=b[O],G=V+x[O];while(V<G)L[z++]=D[V++]}else L[z++]=P}return L}var j0=W0("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61);var rt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE",e[e.VALUE_MASK=8191]="VALUE_MASK"})(rt||(rt={}));var wt;(function(e){e[e.AMP=38]="AMP",e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_X=120]="LOWER_X"})(wt||(wt={}));var $i=32,V0=21,cp=2097151,uo=2047,J0=0;function up(e){let t=e>>>V0;return t===uo?J0:t}function Z0(e){return e-wt.ZERO>>>0<=9}function dp(e){return(e|$i)-wt.LOWER_A>>>0<=5}function Y0(e){return(e|$i)-wt.LOWER_A>>>0<=25}function hp(e){return e===wt.EQUALS||Y0(e)||Z0(e)}var G0;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(G0||(G0={}));var ho;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ho||(ho={}));function fp(e,t,n,r){let s=(t&rt.BRANCH_LENGTH)>>7,i=t&rt.JUMP_TABLE;if(i){if(s===0)return r===i?n:-1;let l=r-i;if(l>>>0>=s)return-1;let u=e[n+l];return u===0?-1:n+s+u-1&65535}if(s===0)return-1;let a=s+1>>1,o=n+a+s;for(let l=0;l<s;l++){let d=e[n+(l>>1)]>>((l&1)<<3)&255;if(d===r){let f=n+a+l;return o+e[f]&65535}if(d>r)return-1}return-1}function K0(e,t,n){if(n===1)return String.fromCharCode(e[t]&rt.VALUE_MASK);if(n===2)return String.fromCharCode(e[t+1]);return String.fromCharCode(e[t+1],e[t+2])}function mp(e,t,n){let r=t+1,s=0,i=r;if(r<n&&(e.charCodeAt(r)|$i)===wt.LOWER_X){r+=1,i=r;while(r<n){let o=e.charCodeAt(r);if(Z0(o))s=s*16+(o-wt.ZERO);else if(dp(o))s=s*16+((o|$i)-wt.LOWER_A+10);else break;r+=1}}else while(r<n){let o=e.charCodeAt(r)-wt.ZERO;if(o>>>0>9)break;s=s*10+o,r+=1}if(r===i)return 0;if(r<n&&e.charCodeAt(r)===wt.SEMI)r+=1;if(s>1114111)s=1114112;let a=r-t;if(a>=uo)J0=a,a=uo;return a<<V0|s}function pp(e,t,n){let r=j0,s=e.indexOf("&");if(s<0)return e;let i=e.length,a=0,o="",l=r[0],u=l&rt.JUMP_TABLE,d=(l&rt.BRANCH_LENGTH)>>7;do{let f=s+1,p=e.charCodeAt(f),g,b;if(p===wt.NUM){let x=mp(e,f,i);if(g=up(x),t&&g>0&&e.charCodeAt(f+g-1)!==wt.SEMI)g=0;b=g===0?"":U0(x&cp)}else if(Y0(p)){g=0,b="";let x=p-u,k;if(x>>>0<d){let D=r[1+x];k=D===0?-1:d+D&65535}else k=-1;let A=0,T=0,S=k<0?0:r[k],E=f+1;e:while(E<i){while((S&(rt.VALUE_LENGTH|rt.FLAG13))===0&&(S&rt.JUMP_TABLE)!==0){let z=S&rt.JUMP_TABLE,O=(S&rt.BRANCH_LENGTH)>>7;if(O===0){if(e.charCodeAt(E)!==z)break e;k+=1}else{let P=e.charCodeAt(E)-z;if(P>>>0>=O)break e;let V=r[k+1+P];if(V===0)break e;k=k+O+V&65535}if(S=r[k],E+=1,E>=i)break e}if((S&(rt.VALUE_LENGTH|rt.FLAG13))===rt.FLAG13){let z=(S&rt.BRANCH_LENGTH)>>7;if(e.charCodeAt(E)!==(S&rt.JUMP_TABLE))break;E+=1;let O=z-1,P=k+1,V=0;for(;V+1<O;V+=2){let G=r[P];if(e.charCodeAt(E)!==(G&255))break e;if(E+=1,e.charCodeAt(E)!==(G>>8&255))break e;E+=1,P+=1}if(V<O){if(e.charCodeAt(E)!==(r[P]&255))break;E+=1}k+=1+(z>>1),S=r[k];continue}let D=S>>>14,M=e.charCodeAt(E);if(D!==0){if(M===wt.SEMI){g=E-f+1,b=D===1?String.fromCharCode(S&rt.VALUE_MASK):K0(r,k,D);break}if(!t&&(S&rt.FLAG13)===0)g=E-f,A=k,T=D;if(D===1)break}let L=fp(r,S,k+(D||1),M);if(L<0)break;k=L,S=r[k],E+=1}if(b===""){let D=S>>>14;if(D!==0&&!t&&(S&rt.FLAG13)===0)g=E-f,A=k,T=D;if(g>0)b=K0(r,A,T)}}else g=0,b="";if(g===0||n&&p!==wt.NUM&&e.charCodeAt(f+g-1)!==wt.SEMI&&f+g<i&&hp(e.charCodeAt(f+g)))s=f;else{if(a<s)o+=e.slice(a,s);o+=b,s=a=f+g}if(e.charCodeAt(s)!==wt.AMP)s=e.indexOf("&",s)}while(s>=0);return o+e.slice(a)}function qi(e){return pp(e,!0,!1)}var X0;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(X0||(X0={}));var Q0;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(Q0||(Q0={}));var bp=class{src_Any=io.source;src_Cc=ao.source;src_Z=lo.source;src_P=Ls.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){let r=this.escapeRE(e),s=this.escapeRE(t),i=`(?:(?!${this.src_ZCc}|${r}|${s}).)`,a=`${r}${i}{0,1000}${s}`;for(let o=2;o<=n;o++)a=`${r}(?:${i}|${a}){0,1000}${s}`;return a}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){let t=`(?:(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:[0-9A-Fa-f]{1,4}:){6}${t}|::(?:[0-9A-Fa-f]{1,4}:){5}${t}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;let e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map((e)=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},fo={validate:(e,t,n)=>{let r=n.re.get_http_validator();r.lastIndex=t;let s=r.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)},vp={"http:":fo,"https:":fo,"ftp:":fo,"//":{validate:function(e,t,n){let r=n.re.get_relative_proto_validator();r.lastIndex=t;let s=r.exec(e);if(s){if(t>=3&&e[t-3]===":")return 0;if(t>=3&&e[t-3]==="/")return 0;return s[0].length}return 0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){let r=n.re.get_mailto_validator();r.lastIndex=t;let s=r.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)}},yp="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",wp="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function kp(){let e=wp.split("|");return yp.split("|").forEach((t)=>{let n=t.indexOf(":"),r=t.slice(0,n);for(let s of t.slice(n+1))e.push(r+s)}),e}var xp={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:kp(),urlAuth:!1,maxLength:1e4},ec=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,r){let s=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=s,this.text=s,this.url=s}},tc=class{__opts__;__schemas__;re;constructor(e={}){let{rebuilder:t,...n}=e;this.__opts__={...xp,...n},this.__schemas__={...vp},this.re=t||new bp,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{let n={normalize:(r,s)=>s.normalize(r),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;n=this.re.get_schema_search(),n.lastIndex=0;while((t=n.exec(e))!==null)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]){if(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null)return!0}if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]){if(e.indexOf("@")>=0){let r=this.re.get_fuzzy_mail_host_search(),s=this.re.get_mail_name_validator();r.lastIndex=0;while((t=r.exec(e))!==null){let i=e.slice(Math.max(0,t.index-65),t.index);if(s.test(i))return!0}}}return!1}testSchemaAt(e,t,n){if(!this.__schemas__[t.toLowerCase()])return 0;return this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this)}match(e){let t=[],n=this.re.get_schema_search(),r,s,i,a,o,l,u=!1,d=!1,f=!1,p=0;if(!e.length)return null;if(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"])r=this.re.get_fuzzy_link_search(),r.lastIndex=0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"])s=this.re.get_fuzzy_mail_host_search(),s.lastIndex=0,i=this.re.get_mail_name_validator();for(;;){let g=Math.max(p-1,0);if(s&&i&&!f&&(!o||o.index<p)){if(s.lastIndex<g)s.lastIndex=g;for(;;){let T=s.exec(e);if(!T){f=!0,o=void 0;break}let S=i.exec(e.slice(Math.max(0,T.index-65),T.index));if(!S)continue;if(o={schema:"mailto:",index:T.index-S[1].length,lastIndex:T.index+T[0].length},o.index>=p)break;if(s.lastIndex<g)s.lastIndex=g}}if(r&&!d&&(!a||a.index<p)){if(r.lastIndex<g)r.lastIndex=g;for(;;){let T=r.exec(e);if(!T){d=!0,a=void 0;break}if(a={schema:"",index:T.index+T[1].length,lastIndex:T.index+T[0].length},a.index>=p)break;if(r.lastIndex<g)r.lastIndex=g}}let b=o;if(!b||a&&(a.index<b.index||a.index===b.index&&a.lastIndex>b.lastIndex))b=a;let x;if(!u)for(;;){if(!l){if(n.lastIndex<g)n.lastIndex=g;let E=n.exec(e);if(!E){u=!0;break}l={schema:E[2],index:E.index+E[1].length,lastIndex:E.index+E[0].length}}if(l.index<p){l=void 0;continue}if(b&&l.index>b.index)break;let T=l;l=void 0;let S=this.testSchemaAt(e,T.schema,T.lastIndex);if(S){x={schema:T.schema,index:T.index,lastIndex:T.lastIndex+S};break}}let k=x;if(!k||o&&(o.index<k.index||o.index===k.index&&o.lastIndex>k.lastIndex))k=o;if(!k||a&&(a.index<k.index||a.index===k.index&&a.lastIndex>k.lastIndex))k=a;if(!k)break;if(k===o)o=void 0;else if(k===a)a=void 0;let A=new ec(e,k.schema,k.index,k.lastIndex);if(A.schema)this.__schemas__[A.schema].normalize(A,this);else this.normalize(A);t.push(A),p=k.lastIndex}if(t.length)return t;return null}matchAtStart(e){if(!e.length)return null;let t=this.re.get_schema_at_start().exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;let r=new ec(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[r.schema].normalize(r,this),r}tlds(e,t=!1){if(e=Array.isArray(e)?e:[e],!t)this.__opts__.tlds=e;else this.__opts__.tlds=this.__opts__.tlds.concat(e);return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){if(!e.schema)e.url=`http://${e.url}`;if(e.schema==="mailto:"&&!/^mailto:/i.test(e.url))e.url=`mailto:${e.url}`}};var Ep=/^xn--/,Ap=/[^\0-\x7F]/,Cp=/[\x2E\u3002\uFF0E\uFF61]/g,_p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var cn=Math.floor,mo=String.fromCharCode;function er(e){throw RangeError(_p[e])}function Tp(e,t){let n=[],r=e.length;while(r--)n[r]=t(e[r]);return n}function rc(e,t){let n=e.split("@"),r="";if(n.length>1)r=n[0]+"@",e=n[1];e=e.replace(Cp,".");let s=e.split("."),i=Tp(s,t).join(".");return r+i}function sc(e){let t=[],n=0,r=e.length;while(n<r){let s=e.charCodeAt(n++);if(s>=55296&&s<=56319&&n<r){let i=e.charCodeAt(n++);if((i&64512)==56320)t.push(((s&1023)<<10)+(i&1023)+65536);else t.push(s),n--}else t.push(s)}return t}var Sp=(e)=>String.fromCodePoint(...e),Rp=function(e){if(e>=48&&e<58)return 26+(e-48);if(e>=65&&e<91)return e-65;if(e>=97&&e<123)return e-97;return 36},nc=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ic=function(e,t,n){let r=0;e=n?cn(e/700):e>>1,e+=cn(e/t);for(;e>455;r+=36)e=cn(e/35);return cn(r+36*e/(e+38))},ac=function(e){let t=[],n=e.length,r=0,s=128,i=72,a=e.lastIndexOf("-");if(a<0)a=0;for(let o=0;o<a;++o){if(e.charCodeAt(o)>=128)er("not-basic");t.push(e.charCodeAt(o))}for(let o=a>0?a+1:0;o<n;){let l=r;for(let d=1,f=36;;f+=36){if(o>=n)er("invalid-input");let p=Rp(e.charCodeAt(o++));if(p>=36)er("invalid-input");if(p>cn((2147483647-r)/d))er("overflow");r+=p*d;let g=f<=i?1:f>=i+26?26:f-i;if(p<g)break;let b=36-g;if(d>cn(2147483647/b))er("overflow");d*=b}let u=t.length+1;if(i=ic(r-l,u,l==0),cn(r/u)>2147483647-s)er("overflow");s+=cn(r/u),r%=u,t.splice(r++,0,s)}return String.fromCodePoint(...t)},oc=function(e){let t=[];e=sc(e);let n=e.length,r=128,s=0,i=72;for(let l of e)if(l<128)t.push(mo(l));let a=t.length,o=a;if(a)t.push("-");while(o<n){let l=2147483647;for(let d of e)if(d>=r&&d<l)l=d;let u=o+1;if(l-r>cn((2147483647-s)/u))er("overflow");s+=(l-r)*u,r=l;for(let d of e){if(d<r&&++s>2147483647)er("overflow");if(d===r){let f=s;for(let p=36;;p+=36){let g=p<=i?1:p>=i+26?26:p-i;if(f<g)break;let b=f-g,x=36-g;t.push(mo(nc(g+b%x,0))),f=cn(b/x)}t.push(mo(nc(f,0))),i=ic(s,u,o===a),s=0,++o}}++s,++r}return t.join("")},Mp=function(e){return rc(e,function(t){return Ep.test(t)?ac(t.slice(4).toLowerCase()):t})},Dp=function(e){return rc(e,function(t){return Ap.test(t)?"xn--"+oc(t):t})},Lp={version:"2.3.1",ucs2:{decode:sc,encode:Sp},decode:ac,encode:oc,toASCII:Dp,toUnicode:Mp};var po=Lp;/*! markdown-it 15.0.3 https://github.com/markdown-it/markdown-it @license MIT */var lc=Object.defineProperty,wc=(e,t)=>{let n={};for(var r in e)lc(n,r,{get:e[r],enumerable:!0});if(!t)lc(n,Symbol.toStringTag,{value:"Module"});return n},Ip=wc({arrayReplaceAt:()=>Np,asciiTrim:()=>ji,callable:()=>kc,escapeHtml:()=>tr,escapeRE:()=>Wp,fromCodePoint:()=>Ns,isMdAsciiPunct:()=>zs,isPunctChar:()=>Ec,isPunctCharCode:()=>Os,isSpace:()=>je,isValidEntityCode:()=>ko,isWhiteSpace:()=>Bs,lib:()=>jp,normalizeReference:()=>Wi,unescapeAll:()=>Jr,unescapeMd:()=>Fp});function kc(e){let t=function(...n){return Reflect.construct(e,n,new.target&&new.target!==t?new.target:e)};return Object.defineProperty(t,"name",{value:e.name}),Object.setPrototypeOf(t,e),t.prototype=e.prototype,t}function Np(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function ko(e){if(e>=55296&&e<=57343)return!1;if(e>=64976&&e<=65007)return!1;if((e&65535)===65535||(e&65535)===65534)return!1;if(e>=0&&e<=8)return!1;if(e===11)return!1;if(e>=14&&e<=31)return!1;if(e>=127&&e<=159)return!1;if(e>1114111)return!1;return!0}function Ns(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var xc=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Bp=new RegExp(`${xc.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),Op=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function zp(e,t){if(t.charCodeAt(0)===35&&Op.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);if(ko(r))return Ns(r);return e}let n=qi(e);if(n!==e)return n;return e}function Fp(e){if(e.indexOf("\\")<0)return e;return e.replace(xc,"$1")}function Jr(e){if(e.indexOf("\\")<0&&e.indexOf("&")<0)return e;return e.replace(Bp,function(t,n,r){if(n)return n;return zp(t,r)})}var $p=/[&<>"]/,qp=/[&<>"]/g,Hp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function Pp(e){return Hp[e]}function tr(e){if($p.test(e))return e.replace(qp,Pp);return e}var Up=/[.?*+^$[\]\\(){}|-]/g;function Wp(e){return e.replace(Up,"\\$&")}function je(e){switch(e){case 9:case 32:return!0}return!1}function Bs(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Ec(e){return Ls.test(e)||oo.test(e)}function Os(e){return Ec(Ns(e))}function zs(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Wi(e){return e=e.trim().replace(/\s+/g," "),e.toLowerCase().toUpperCase()}function cc(e){return e===32||e===9||e===10||e===13}function ji(e){let t=0;for(;t<e.length;t++)if(!cc(e.charCodeAt(t)))break;let n=e.length-1;for(;n>=t;n--)if(!cc(e.charCodeAt(n)))break;return e.slice(t,n+1)}var jp={mdurl:so,ucmicro:co};function Gp(e,t,n){let r,s,i,a,{posMax:o,pos:l}=e;e.pos=t+1,r=1;while(e.pos<o){if(i=e.src.charCodeAt(e.pos),i===93){if(r--,r===0){s=!0;break}}if(a=e.pos,e.md.inline.skipToken(e),i===91){if(a===e.pos-1)r++;else if(n)return e.pos=l,-1}}let u=-1;if(s)u=e.pos;return e.pos=l,u}function Kp(e,t,n){let r,s=t,i={ok:!1,pos:0,str:""};if(e.charCodeAt(s)===60){s++;while(s<n){if(r=e.charCodeAt(s),r===10)return i;if(r===60)return i;if(r===62)return i.pos=s+1,i.str=Jr(e.slice(t+1,s)),i.ok=!0,i;if(r===92&&s+1<n){s+=2;continue}s++}return i}let a=0;while(s<n){if(r=e.charCodeAt(s),r===32)break;if(r<32||r===127)break;if(r===92&&s+1<n){if(e.charCodeAt(s+1)===32){s++;continue}s+=2;continue}if(r===40){if(a++,a>32)return i}if(r===41){if(a===0)break;a--}s++}if(t===s)return i;if(a!==0)return i;return i.str=Jr(e.slice(t,s)),i.pos=s,i.ok=!0,i}function Vp(e,t,n,r){let s,i=t,a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(i>=n)return a;let o=e.charCodeAt(i);if(o!==34&&o!==39&&o!==40)return a;if(t++,i++,o===40)o=41;a.marker=o}while(i<n){if(s=e.charCodeAt(i),s===a.marker)return a.pos=i+1,a.str+=Jr(e.slice(t,i)),a.ok=!0,a;else if(s===40&&a.marker===41)return a;else if(s===92&&i+1<n)i++;i++}return a.can_continue=!0,a.str+=Jr(e.slice(t,i)),a}var Jp=wc({parseLinkDestination:()=>Kp,parseLinkLabel:()=>Gp,parseLinkTitle:()=>Vp});function Fs(e){return Fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fs(e)}function Zp(e,t){if(Fs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Fs(r)!="object")return r;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yp(e){var t=Zp(e,"string");return Fs(t)=="symbol"?t:t+""}function pe(e,t,n){return(t=Yp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kr=class{constructor(e,t,n){pe(this,"map",null),pe(this,"level",0),pe(this,"children",null),pe(this,"content",""),pe(this,"markup",""),pe(this,"info",""),pe(this,"block",!1),pe(this,"hidden",!1),this.type=e,this.tag=t,this.attrs=null,this.nesting=n,this.meta=null}attrIndex(e){if(!this.attrs)return-1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1}attrPush(e){if(this.attrs)this.attrs.push(e);else this.attrs=[e]}attrSet(e,t){let n=this.attrIndex(e),r=[e,t];if(n<0)this.attrPush(r);else this.attrs[n]=r}attrGet(e){let t=this.attrIndex(e),n=null;if(t>=0)n=this.attrs[t][1];return n}attrJoin(e,t){let n=this.attrIndex(e);if(n<0)this.attrPush([e,t]);else this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},$s=class{constructor(){pe(this,"__rules__",[]),pe(this,"__cache__",null)}__find__(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1}__compile__(){let e=new Set;this.__rules__.forEach((t)=>{if(!t.enabled)return;t.alt.forEach((n)=>{if(n)e.add(n)})}),this.__cache__=Object.create(null),this.__cache__[""]=[],this.__rules__.forEach((t)=>{if(t.enabled)this.__cache__[""].push(t.fn)}),e.forEach((t)=>{this.__cache__[t]=[],this.__rules__.forEach((n)=>{if(n.enabled&&n.alt.indexOf(t)>=0)this.__cache__[t].push(n.fn)})})}at(e,t,n={}){let r=this.__find__(e);if(r===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__[r].fn=t,this.__rules__[r].alt=n.alt||[],this.__cache__=null}before(e,t,n,r={}){let s=this.__find__(e);if(s===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(s,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}after(e,t,n,r={}){let s=this.__find__(e);if(s===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}push(e,t,n={}){this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null}enable(e,t=!1){if(!Array.isArray(e))e=[e];let n=[];return e.forEach((r)=>{let s=this.__find__(r);if(s<0){if(t)return;throw Error(`Rules manager: invalid rule name ${r}`)}this.__rules__[s].enabled=!0,n.push(r)}),this.__cache__=null,n}enableOnly(e,t=!1){if(!Array.isArray(e))e=[e];this.__rules__.forEach((n)=>{n.enabled=!1}),this.enable(e,t)}disable(e,t=!1){if(!Array.isArray(e))e=[e];let n=[];return e.forEach((r)=>{let s=this.__find__(r);if(s<0){if(t)return;throw Error(`Rules manager: invalid rule name ${r}`)}this.__rules__[s].enabled=!1,n.push(r)}),this.__cache__=null,n}getRules(e){if(!this.__cache__)this.__compile__();return this.__cache__[e]||[]}},un={};un.code_inline=function(e,t,n,r,s){let i=e[t];return`<code${s.renderAttrs(i)}>${tr(i.content)}</code>`};un.code_block=function(e,t,n,r,s){let i=e[t];return`<pre${s.renderAttrs(i)}><code>${tr(e[t].content)}</code></pre>
5
- `};un.fence=function(e,t,n,r,s){let i=e[t],a=i.info?Jr(i.info).trim():"",o="",l="";if(a){let d=a.split(/(\s+)/g);o=d[0],l=d.slice(2).join("")}let u;if(n.highlight)u=n.highlight(i.content,o,l)||tr(i.content);else u=tr(i.content);if(u.indexOf("<pre")===0)return u+`
6
- `;if(a){let d=i.attrIndex("class"),f=i.attrs?i.attrs.slice():[];if(d<0)f.push(["class",`${n.langPrefix}${o}`]);else f[d]=[f[d][0],f[d][1]],f[d][1]+=` ${n.langPrefix}${o}`;let p={attrs:f};return`<pre><code${s.renderAttrs(p)}>${u}</code></pre>
1
+ var Mp=Object.create;var{getPrototypeOf:Dp,defineProperty:wa,getOwnPropertyNames:Lp}=Object;var ac=Object.prototype.hasOwnProperty;function Ip(e){return this[e]}var Np,Bp,Op=(e,t,n)=>{var r=e!=null&&typeof e==="object";if(r){var s=t?Np??=new WeakMap:Bp??=new WeakMap,i=s.get(e);if(i)return i}n=e!=null?Mp(Dp(e)):{};let o=t||!e||!e.__esModule||!ac.call(e,"default")?wa(n,"default",{value:e,enumerable:!0}):n;if(e&&typeof e==="object"||typeof e==="function"){for(let a of Lp(e))if(!ac.call(o,a))wa(o,a,{get:Ip.bind(e,a),enumerable:!0})}if(r)s.set(e,o);return o};var $p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var zp=(e)=>e;function Fp(e,t){this[e]=zp.bind(null,t)}var lc=(e,t)=>{for(var n in t)wa(e,n,{get:t[n],enumerable:!0,configurable:!0,set:Fp.bind(t,n)})};var Mf=$p(function(Hv,Rf){function mf(e){if(e instanceof Map)e.clear=e.delete=e.set=function(){throw Error("map is read-only")};else if(e instanceof Set)e.add=e.clear=e.delete=function(){throw Error("set is read-only")};return Object.freeze(e),Object.getOwnPropertyNames(e).forEach((t)=>{let n=e[t],r=typeof n;if((r==="object"||r==="function")&&!Object.isFrozen(n))mf(n)}),e}class ql{constructor(e){if(e.data===void 0)e.data={};this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function pf(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function mr(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let s in r)n[s]=r[s]}),n}var Pb="</span>",lf=(e)=>!!e.scope,Ub=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,s)=>`${r}${"_".repeat(s+1)}`)].join(" ")}return`${t}${e}`};class gf{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=pf(e)}openNode(e){if(!lf(e))return;let t=Ub(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){if(!lf(e))return;this.buffer+=Pb}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}var cf=(e={})=>{let t={children:[]};return Object.assign(t,e),t};class Hl{constructor(){this.rootNode=cf(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=cf({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop();return}closeAllNodes(){while(this.closeNode());}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){if(typeof t==="string")e.addText(t);else if(t.children)e.openNode(t),t.children.forEach((n)=>this._walk(e,n)),e.closeNode(t);return e}static _collapse(e){if(typeof e==="string")return;if(!e.children)return;if(e.children.every((t)=>typeof t==="string"))e.children=[e.children.join("")];else e.children.forEach((t)=>{Hl._collapse(t)})}}class bf extends Hl{constructor(e){super();this.options=e}addText(e){if(e==="")return;this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;if(t)n.scope=`language:${t}`;this.add(n)}toHTML(){return new gf(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function hi(e){if(!e)return null;if(typeof e==="string")return e;return e.source}function vf(e){return Fr("(?=",e,")")}function Wb(e){return Fr("(?:",e,")*")}function jb(e){return Fr("(?:",e,")?")}function Fr(...e){return e.map((n)=>hi(n)).join("")}function Gb(e){let t=e[e.length-1];if(typeof t==="object"&&t.constructor===Object)return e.splice(e.length-1,1),t;else return{}}function Io(...e){return"("+(Gb(e).capture?"":"?:")+e.map((r)=>hi(r)).join("|")+")"}function yf(e){return new RegExp(e.toString()+"|").exec("").length-1}function Kb(e,t){let n=e&&e.exec(t);return n&&n.index===0}var Vb=new RegExp(Io(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function Pl(e,{joinWith:t}){let n=0;return e.map((r)=>{n+=1;let s=n,i=hi(r),o="";while(i.length>0){let a=Vb.exec(i);if(!a){o+=i;break}if(o+=i.substring(0,a.index),i=i.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1])o+="\\"+String(Number(a[1])+s);else if(o+=a[0],a[0]==="("||/^\(\?[<']/.test(a[0]))n++}return o}).map((r)=>`(${r})`).join(t)}var Jb=/\b\B/,kf="[a-zA-Z]\\w*",Ul="[a-zA-Z_]\\w*",wf="\\b\\d+(\\.\\d+)?",xf="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ef="\\b(0b[01]+)",Zb="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Yb=(e={})=>{let t=/^#![ ]*\//;if(e.binary)e.begin=Fr(t,/.*\b/,e.binary,/\b.*/);return mr({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{if(n.index!==0)r.ignoreMatch()}},e)},mi={begin:"\\\\[\\s\\S]",relevance:0},Xb={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[mi]},Qb={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[mi]},e3={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},No=function(e,t,n={}){let r=mr({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let s=Io("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Fr(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},t3=No("//","$"),n3=No("/\\*","\\*/"),r3=No("#","$"),s3={scope:"number",begin:wf,relevance:0},i3={scope:"number",begin:xf,relevance:0},o3={scope:"number",begin:Ef,relevance:0},a3={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[mi,{begin:/\[/,end:/\]/,relevance:0,contains:[mi]}]},l3={scope:"title",begin:kf,relevance:0},c3={scope:"title",begin:Ul,relevance:0},u3={begin:"\\.\\s*"+Ul,relevance:0},d3=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{if(n.data._beginMatch!==t[1])n.ignoreMatch()}})},Do=Object.freeze({__proto__:null,APOS_STRING_MODE:Xb,BACKSLASH_ESCAPE:mi,BINARY_NUMBER_MODE:o3,BINARY_NUMBER_RE:Ef,COMMENT:No,C_BLOCK_COMMENT_MODE:n3,C_LINE_COMMENT_MODE:t3,C_NUMBER_MODE:i3,C_NUMBER_RE:xf,END_SAME_AS_BEGIN:d3,HASH_COMMENT_MODE:r3,IDENT_RE:kf,MATCH_NOTHING_RE:Jb,METHOD_GUARD:u3,NUMBER_MODE:s3,NUMBER_RE:wf,PHRASAL_WORDS_MODE:e3,QUOTE_STRING_MODE:Qb,REGEXP_MODE:a3,RE_STARTERS_RE:Zb,SHEBANG:Yb,TITLE_MODE:l3,UNDERSCORE_IDENT_RE:Ul,UNDERSCORE_TITLE_MODE:c3});function f3(e,t){if(e.input[e.index-1]===".")t.ignoreMatch()}function h3(e,t){if(e.className!==void 0)e.scope=e.className,delete e.className}function m3(e,t){if(!t)return;if(!e.beginKeywords)return;if(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=f3,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0)e.relevance=0}function p3(e,t){if(!Array.isArray(e.illegal))return;e.illegal=Io(...e.illegal)}function g3(e,t){if(!e.match)return;if(e.begin||e.end)throw Error("begin & end are not supported with match");e.begin=e.match,delete e.match}function b3(e,t){if(e.relevance===void 0)e.relevance=1}var v3=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach((r)=>{delete e[r]}),e.keywords=n.keywords,e.begin=Fr(n.beforeMatch,vf(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},y3=["of","and","for","in","not","or","if","then","parent","list","value"],k3="keyword";function Af(e,t,n=k3){let r=Object.create(null);if(typeof e==="string")s(n,e.split(" "));else if(Array.isArray(e))s(n,e);else Object.keys(e).forEach(function(i){Object.assign(r,Af(e[i],t,i))});return r;function s(i,o){if(t)o=o.map((a)=>a.toLowerCase());o.forEach(function(a){let l=a.split("|");r[l[0]]=[i,w3(l[0],l[1])]})}}function w3(e,t){if(t)return Number(t);return x3(e)?0:1}function x3(e){return y3.includes(e.toLowerCase())}var uf={},zr=(e)=>{console.error(e)},df=(e,...t)=>{console.log(`WARN: ${e}`,...t)},bs=(e,t)=>{if(uf[`${e}/${t}`])return;console.log(`Deprecated as of ${e}. ${t}`),uf[`${e}/${t}`]=!0},Lo=Error();function Cf(e,t,{key:n}){let r=0,s=e[n],i={},o={};for(let a=1;a<=t.length;a++)o[a+r]=s[a],i[a+r]=!0,r+=yf(t[a-1]);e[n]=o,e[n]._emit=i,e[n]._multi=!0}function E3(e){if(!Array.isArray(e.begin))return;if(e.skip||e.excludeBegin||e.returnBegin)throw zr("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Lo;if(typeof e.beginScope!=="object"||e.beginScope===null)throw zr("beginScope must be object"),Lo;Cf(e,e.begin,{key:"beginScope"}),e.begin=Pl(e.begin,{joinWith:""})}function A3(e){if(!Array.isArray(e.end))return;if(e.skip||e.excludeEnd||e.returnEnd)throw zr("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Lo;if(typeof e.endScope!=="object"||e.endScope===null)throw zr("endScope must be object"),Lo;Cf(e,e.end,{key:"endScope"}),e.end=Pl(e.end,{joinWith:""})}function C3(e){if(e.scope&&typeof e.scope==="object"&&e.scope!==null)e.beginScope=e.scope,delete e.scope}function _3(e){if(C3(e),typeof e.beginScope==="string")e.beginScope={_wrap:e.beginScope};if(typeof e.endScope==="string")e.endScope={_wrap:e.endScope};E3(e),A3(e)}function S3(e){function t(o,a){return new RegExp(hi(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,a){a.position=this.position++,this.matchIndexes[this.matchAt]=a,this.regexes.push([a,o]),this.matchAt+=yf(o)+1}compile(){if(this.regexes.length===0)this.exec=()=>null;let o=this.regexes.map((a)=>a[1]);this.matcherRe=t(Pl(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;let a=this.matcherRe.exec(o);if(!a)return null;let l=a.findIndex((d,h)=>h>0&&d!==void 0),u=this.matchIndexes[l];return a.splice(0,l),Object.assign(a,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];let a=new n;return this.rules.slice(o).forEach(([l,u])=>a.addRule(l,u)),a.compile(),this.multiRegexes[o]=a,a}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,a){if(this.rules.push([o,a]),a.type==="begin")this.count++}exec(o){let a=this.getMatcher(this.regexIndex);a.lastIndex=this.lastIndex;let l=a.exec(o);if(this.resumingScanAtSamePosition())if(l&&l.index===this.lastIndex);else{let u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,l=u.exec(o)}if(l){if(this.regexIndex+=l.position+1,this.regexIndex===this.count)this.considerAll()}return l}}function s(o){let a=new r;if(o.contains.forEach((l)=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd)a.addRule(o.terminatorEnd,{type:"end"});if(o.illegal)a.addRule(o.illegal,{type:"illegal"});return a}function i(o,a){let l=o;if(o.isCompiled)return l;[h3,g3,_3,v3].forEach((d)=>d(o,a)),e.compilerExtensions.forEach((d)=>d(o,a)),o.__beforeBegin=null,[m3,p3,b3].forEach((d)=>d(o,a)),o.isCompiled=!0;let u=null;if(typeof o.keywords==="object"&&o.keywords.$pattern)o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern;if(u=u||/\w+/,o.keywords)o.keywords=Af(o.keywords,e.case_insensitive);if(l.keywordPatternRe=t(u,!0),a){if(!o.begin)o.begin=/\B|\b/;if(l.beginRe=t(l.begin),!o.end&&!o.endsWithParent)o.end=/\B|\b/;if(o.end)l.endRe=t(l.end);if(l.terminatorEnd=hi(l.end)||"",o.endsWithParent&&a.terminatorEnd)l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd}if(o.illegal)l.illegalRe=t(o.illegal);if(!o.contains)o.contains=[];if(o.contains=[].concat(...o.contains.map(function(d){return T3(d==="self"?o:d)})),o.contains.forEach(function(d){i(d,l)}),o.starts)i(o.starts,a);return l.matcher=s(l),l}if(!e.compilerExtensions)e.compilerExtensions=[];if(e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=mr(e.classNameAliases||{}),i(e)}function _f(e){if(!e)return!1;return e.endsWithParent||_f(e.starts)}function T3(e){if(e.variants&&!e.cachedVariants)e.cachedVariants=e.variants.map(function(t){return mr(e,{variants:null},t)});if(e.cachedVariants)return e.cachedVariants;if(_f(e))return mr(e,{starts:e.starts?mr(e.starts):null});if(Object.isFrozen(e))return mr(e);return e}var R3="11.12.0";class Sf extends Error{constructor(e,t){super(e);this.name="HTMLInjectionError",this.html=t}}var Fl=pf,ff=mr,hf=Symbol("nomatch"),M3=7,Tf=function(e){let t=Object.create(null),n=Object.create(null),r=[],s=!0,i="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]},a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:bf};function l(z){return a.noHighlightRe.test(z)}function u(z){let j=z.className+" ";j+=z.parentNode?z.parentNode.className:"";let Z=a.languageDetectRe.exec(j);if(Z){let Q=B(Z[1]);if(!Q)df(i.replace("{}",Z[1])),df("Falling back to no-highlight mode for this block.",z);return Q?Z[1]:"no-highlight"}return j.split(/\s+/).find((Q)=>l(Q)||B(Q))}function d(z,j,Z){let Q="",oe="";if(typeof j==="object")Q=z,Z=j.ignoreIllegals,oe=j.language;else bs("10.7.0","highlight(lang, code, ...args) has been deprecated."),bs("10.7.0",`Please use highlight(code, options) instead.
2
+ https://github.com/highlightjs/highlight.js/issues/2277`),oe=z,Q=j;if(Z===void 0)Z=!0;let F={code:Q,language:oe};ne("before:highlight",F);let X=F.result?F.result:h(F.language,F.code,Z);return X.code=F.code,ne("after:highlight",X),X}function h(z,j,Z,Q){let oe=Object.create(null);function F(fe,ke){return fe.keywords[ke]}function X(){if(!Te.keywords){st.addText(We);return}let fe=0;Te.keywordPatternRe.lastIndex=0;let ke=Te.keywordPatternRe.exec(We),Le="";while(ke){Le+=We.substring(fe,ke.index);let $e=Pe.case_insensitive?ke[0].toLowerCase():ke[0],At=F(Te,$e);if(At){let[Ln,Tp]=At;if(st.addText(Le),Le="",oe[$e]=(oe[$e]||0)+1,oe[$e]<=M3)ss+=Tp;if(Ln.startsWith("_"))Le+=ke[0];else{let Rp=Pe.classNameAliases[Ln]||Ln;W(ke[0],Rp)}}else Le+=ke[0];fe=Te.keywordPatternRe.lastIndex,ke=Te.keywordPatternRe.exec(We)}Le+=We.substring(fe),st.addText(Le)}function te(){if(We==="")return;let fe=null;if(typeof Te.subLanguage==="string"){if(!t[Te.subLanguage]){st.addText(We);return}fe=h(Te.subLanguage,We,!0,Mr[Te.subLanguage]),Mr[Te.subLanguage]=fe._top}else fe=g(We,Te.subLanguage.length?Te.subLanguage:null);if(Te.relevance>0)ss+=fe.relevance;st.__addSublanguage(fe._emitter,fe.language)}function xe(){if(Te.subLanguage!=null)te();else X();We=""}function W(fe,ke){if(fe==="")return;st.startScope(ke),st.addText(fe),st.endScope()}function ge(fe,ke){let Le=1,$e=ke.length-1;while(Le<=$e){if(!fe._emit[Le]){Le++;continue}let At=Pe.classNameAliases[fe[Le]]||fe[Le],Ln=ke[Le];if(At)W(Ln,At);else We=Ln,X(),We="";Le++}}function q(fe,ke){if(fe.scope&&typeof fe.scope==="string")st.openNode(Pe.classNameAliases[fe.scope]||fe.scope);if(fe.beginScope){if(fe.beginScope._wrap)W(We,Pe.classNameAliases[fe.beginScope._wrap]||fe.beginScope._wrap),We="";else if(fe.beginScope._multi)ge(fe.beginScope,ke),We=""}return Te=Object.create(fe,{parent:{value:Te}}),Te}function Y(fe,ke,Le){let $e=Kb(fe.endRe,Le);if($e){if(fe["on:end"]){let At=new ql(fe);if(fe["on:end"](ke,At),At.isMatchIgnored)$e=!1}if($e){while(fe.endsParent&&fe.parent)fe=fe.parent;return fe}}if(fe.endsWithParent)return Y(fe.parent,ke,Le)}function ue(fe){if(Te.matcher.regexIndex===0)return We+=fe[0],1;else return os=!0,0}function le(fe){let ke=fe[0],Le=fe.rule,$e=new ql(Le),At=[Le.__beforeBegin,Le["on:begin"]];for(let Ln of At){if(!Ln)continue;if(Ln(fe,$e),$e.isMatchIgnored)return ue(ke)}if(Le.skip)We+=ke;else{if(Le.excludeBegin)We+=ke;if(xe(),!Le.returnBegin&&!Le.excludeBegin)We=ke}return q(Le,fe),Le.returnBegin?0:ke.length}function be(fe){let ke=fe[0],Le=j.substring(fe.index),$e=Y(Te,fe,Le);if(!$e)return hf;let At=Te;if(Te.endScope&&Te.endScope._wrap)xe(),W(ke,Te.endScope._wrap);else if(Te.endScope&&Te.endScope._multi)xe(),ge(Te.endScope,fe);else if(At.skip)We+=ke;else{if(!(At.returnEnd||At.excludeEnd))We+=ke;if(xe(),At.excludeEnd)We=ke}do{if(Te.scope)st.closeNode();if(!Te.skip&&!Te.subLanguage)ss+=Te.relevance;Te=Te.parent}while(Te!==$e.parent);if($e.starts)q($e.starts,fe);return At.returnEnd?0:ke.length}function Ae(){let fe=[];for(let ke=Te;ke!==Pe;ke=ke.parent)if(ke.scope)fe.unshift(ke.scope);fe.forEach((ke)=>st.openNode(ke))}let He={};function Ne(fe,ke){let Le=ke&&ke[0];if(We+=fe,Le==null)return xe(),0;if(He.type==="begin"&&ke.type==="end"&&He.index===ke.index&&Le===""){if(We+=j.slice(ke.index,ke.index+1),!s){let $e=Error(`0 width match regex (${z})`);throw $e.languageName=z,$e.badRule=He.rule,$e}return 1}if(He=ke,ke.type==="begin")return le(ke);else if(ke.type==="illegal"&&!Z){let $e=Error('Illegal lexeme "'+Le+'" for mode "'+(Te.scope||"<unnamed>")+'"');throw $e.mode=Te,$e}else if(ke.type==="end"){let $e=be(ke);if($e!==hf)return $e}if(ke.type==="illegal"&&Le===""){if(ke.index===j.length);else We+=`
3
+ `;return 1}if(is>1e5&&is>ke.index*3)throw Error("potential infinite loop, way more iterations than matches");return We+=Le,Le.length}let Pe=B(z);if(!Pe)throw zr(i.replace("{}",z)),Error('Unknown language: "'+z+'"');let mt=S3(Pe),Dn="",Te=Q||mt,Mr={},st=new a.__emitter(a);Ae();let We="",ss=0,rn=0,is=0,os=!1;try{if(!Pe.__emitTokens){Te.matcher.considerAll();for(;;){if(is++,os)os=!1;else Te.matcher.considerAll();Te.matcher.lastIndex=rn;let fe=Te.matcher.exec(j);if(!fe)break;let ke=j.substring(rn,fe.index),Le=Ne(ke,fe);rn=fe.index+Le}Ne(j.substring(rn))}else Pe.__emitTokens(j,st);return st.finalize(),Dn=st.toHTML(),{language:z,value:Dn,relevance:ss,illegal:!1,_emitter:st,_top:Te}}catch(fe){if(fe.message&&fe.message.includes("Illegal"))return{language:z,value:Fl(j),illegal:!0,relevance:0,_illegalBy:{message:fe.message,index:rn,context:j.slice(rn-100,rn+100),mode:fe.mode,resultSoFar:Dn},_emitter:st};else if(s)return{language:z,value:Fl(j),illegal:!1,relevance:0,errorRaised:fe,_emitter:st,_top:Te};else throw fe}}function p(z){let j={value:Fl(z),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return j._emitter.addText(z),j}function g(z,j){j=j||a.languages||Object.keys(t);let Z=p(z),Q=j.filter(B).filter(H).map((xe)=>h(xe,z,!1));Q.unshift(Z);let oe=Q.sort((xe,W)=>{if(xe.relevance!==W.relevance)return W.relevance-xe.relevance;if(xe.language&&W.language){if(B(xe.language).supersetOf===W.language)return 1;else if(B(W.language).supersetOf===xe.language)return-1}return 0}),[F,X]=oe,te=F;return te.secondBest=X,te}function b(z,j,Z){let Q=j&&n[j]||Z;z.classList.add("hljs"),z.classList.add(`language-${Q}`)}function x(z){let j=null,Z=u(z);if(l(Z))return;if(ne("before:highlightElement",{el:z,language:Z}),z.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",z);return}if(z.children.length>0){if(!a.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(z);if(a.throwUnescapedHTML)throw new Sf("One of your code blocks includes unescaped HTML.",z.innerHTML)}j=z;let Q=j.textContent,oe=Z?d(Q,{language:Z,ignoreIllegals:!0}):g(Q);if(z.innerHTML=oe.value,z.dataset.highlighted="yes",b(z,Z,oe.language),z.result={language:oe.language,re:oe.relevance,relevance:oe.relevance},oe.secondBest)z.secondBest={language:oe.secondBest.language,relevance:oe.secondBest.relevance};ne("after:highlightElement",{el:z,result:oe,text:Q})}function k(z){a=ff(a,z)}let E=()=>{A(),bs("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function T(){A(),bs("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let _=!1;function A(){function z(){A()}if(document.readyState==="loading"){if(!_)window.addEventListener("DOMContentLoaded",z,!1);_=!0;return}document.querySelectorAll(a.cssSelector).forEach(x)}function D(z,j){let Z=null;try{Z=j(e)}catch(Q){if(zr("Language definition for '{}' could not be registered.".replace("{}",z)),!s)throw Q;else zr(Q);Z=o}if(!Z.name)Z.name=z;if(t[z]=Z,Z.rawDefinition=j.bind(null,e),Z.aliases)O(Z.aliases,{languageName:z})}function R(z){delete t[z];for(let j of Object.keys(n))if(n[j]===z)delete n[j]}function L(){return Object.keys(t)}function B(z){return z=(z||"").toLowerCase(),t[z]||t[n[z]]}function O(z,{languageName:j}){if(typeof z==="string")z=[z];z.forEach((Z)=>{n[Z.toLowerCase()]=j})}function H(z){let j=B(z);return j&&!j.disableAutodetect}function K(z){if(z["before:highlightBlock"]&&!z["before:highlightElement"])z["before:highlightElement"]=(j)=>{z["before:highlightBlock"](Object.assign({block:j.el},j))};if(z["after:highlightBlock"]&&!z["after:highlightElement"])z["after:highlightElement"]=(j)=>{z["after:highlightBlock"](Object.assign({block:j.el},j))}}function G(z){K(z),r.push(z)}function de(z){let j=r.indexOf(z);if(j!==-1)r.splice(j,1)}function ne(z,j){let Z=z;r.forEach(function(Q){if(Q[Z])Q[Z](j)})}function ae(z){return bs("10.7.0","highlightBlock will be removed entirely in v12.0"),bs("10.7.0","Please use highlightElement now."),x(z)}Object.assign(e,{highlight:d,highlightAuto:g,highlightAll:A,highlightElement:x,highlightBlock:ae,configure:k,initHighlighting:E,initHighlightingOnLoad:T,registerLanguage:D,unregisterLanguage:R,listLanguages:L,getLanguage:B,registerAliases:O,autoDetection:H,inherit:ff,addPlugin:G,removePlugin:de}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString=R3,e.regex={concat:Fr,lookahead:vf,either:Io,optional:jb,anyNumberOfTimes:Wb};for(let z in Do)if(typeof Do[z]==="object")mf(Do[z]);return Object.assign(e,Do),e},vs=Tf({});vs.newInstance=()=>Tf({});Rf.exports=vs;vs.HighlightJS=vs;vs.default=vs});var _a={};lc(_a,{decode:()=>Ps,encode:()=>or,format:()=>as,parse:()=>Us});var Da={};lc(Da,{Any:()=>Sa,Cc:()=>Ta,Cf:()=>r1,P:()=>Ws,S:()=>Ra,Z:()=>Ma});function qp(){if(typeof window>"u")return"zh-CN";try{return window.localStorage.getItem("omo-web-language")==="en"?"en":"zh-CN"}catch{return"zh-CN"}}var me=qp();function c(e,t){return me==="en"?t:e}function cc(e){try{return window.localStorage.setItem("omo-web-language",e),!0}catch{return!1}}function uc(e=document){if(e.documentElement.lang=me,me!=="en")return;for(let t of e.querySelectorAll("[data-en]"))t.textContent=t.getAttribute("data-en");for(let t of["title","aria-label","placeholder","alt"]){let n=`data-en-${t}`;for(let r of e.querySelectorAll(`[${n}]`)){let s=r.getAttribute(n);if(s!==null)r.setAttribute(t,s)}}}function ve(e,t){let n=document.getElementById(e);if(n instanceof t)return n;throw Error(c(`界面控件不存在:${e}`,`Missing interface control: ${e}`))}function y(e,t="",n=""){let r=document.createElement(e);if(t)r.className=t;if(n)r.textContent=n;return r}function Ue(e,t,n=""){let r=y("button",`button ${n}`,e);return r.type="button",r.addEventListener("click",t),r}function re(e,t=""){if(e.textContent!==t)e.textContent=t;e.hidden=!t}function ir(e,t){let n=y("label","field");return n.append(y("span","",e),t),n}function ot(e,t){let n=y("option","",e);return n.value=t,n}function Mt(e,...t){let n=y("details"),r=y("div","fold-body stack stack--tight");return r.append(...t),n.append(y("summary","",e),r),n}function In(e){let t=y("pre");return t.tabIndex=0,t.append(y("code","",e)),t}var Hp=(e)=>e!==null&&typeof e==="object"&&!Array.isArray(e),U=(e)=>Hp(e)?e:{},we=(e)=>Array.isArray(e)?e:[],C=(e)=>typeof e==="string"?e:"",Ce=(e)=>typeof e==="number"&&Number.isFinite(e)?e:void 0,dc=(e)=>typeof e==="string"?e:JSON.stringify(e,null,2)??"",Re=(e)=>e instanceof Error?e.message:c("发生未知错误","An unknown error occurred"),Pp=["image/png","image/jpeg","image/gif","image/webp"],Gi=(e)=>Pp.some((t)=>t===e);function un(e){let t=U(e),n=C(t.id);if(!n)return;return{id:n,name:C(t.name)||c("未命名会话","Untitled session"),cwd:C(t.cwd),updatedAt:Ce(t.updatedAt)??0,archived:t.archived===!0,settled:t.settled===!0,active:t.active===!0,running:t.running===!0}}var xa=(e)=>we(e.sessions).flatMap((t)=>{let n=un(t);return n?[n]:[]});class Be extends Error{status;code;constructor(e,t,n){super(e);this.status=t;this.code=n}}var Ze=(e)=>`/api/sessions/${encodeURIComponent(e)}`,Ki=(e)=>`/api/cli-history/${encodeURIComponent(e)}`,Vi=(e)=>`/api/cli-live/${encodeURIComponent(e)}`,Ea=({kind:e,id:t})=>{switch(e){case"web":return Ze(t);case"history":return Ki(t);case"live":return Vi(t)}};class Aa{token="";async request(e,t,n){let r=t!==void 0,s=await fetch(e,{method:r?"POST":"GET",signal:n,cache:"no-store",...r?{headers:{"Content-Type":"application/json","X-OmO-Token":this.token},body:JSON.stringify(t)}:{}}),i;try{let o=await s.json();i=U(o)}catch(o){if(!(o instanceof SyntaxError))throw o;throw new Be(c(`本机 Web 服务返回了无效响应(HTTP ${s.status})`,`The local Web server returned an invalid response (HTTP ${s.status}).`),s.status,"")}if(!s.ok)throw new Be(C(i.error)||c(`请求失败(HTTP ${s.status})`,`Request failed (HTTP ${s.status}).`),s.status,C(i.code));return i}action(e,t){return this.request(`${Ze(e)}/actions`,t)}cliLiveAction(e,t){return this.request(`${Vi(e)}/actions`,t)}async resumeHistory(e){let t=await this.request(`${Ki(e)}/resume`,{}),n=un(t.session);if(!n?.active)throw new Be(c("没有收到可继续的 Web 会话。请检查会话列表。","No active Web session was returned. Check the session list."),502,"");return n}async handoff(e){let t=await this.request(`${Ze(e)}/handoff`,{}),n=un(t.session),r=C(t.command);if(!n||n.id!==e||U(t.session).active!==!1||!r.trim())throw new Be(c("无法确认会话已释放,未显示启动命令。","Could not confirm that the session was released. The launch command was not shown."),502,"");return{session:n,command:r}}}var Up=new Set(["select","confirm","input","editor","question"]),Hs=(e)=>C(e.id)||C(e.requestId),Ji=(e)=>Boolean(Hs(e)&&Up.has(C(e.method)));function Wp(e,t){let n=[];for(let[s,i]of we(t.questions).entries()){let o=U(i),a=C(o.id);if(!a)continue;let l=y("fieldset","stack stack--tight"),u=(s+1).toLocaleString(me);if(l.append(y("legend","",C(o.header)||c(`问题 ${u}`,`Question ${u}`))),C(o.question))l.append(y("p","plain",C(o.question)));let d=[];for(let p of we(o.options)){let g=U(p),b=C(g.label);if(!b)continue;let x=y("input");x.name=`question-${s}`,x.type=o.multiSelect===!0?"checkbox":"radio",x.value=b;let k=y("label","interaction-option"),E=y("span","break",b);if(C(g.description))E.append(y("small","muted",` · ${C(g.description)}`));k.append(x,E),d.push(x),l.append(k)}let h=y("input");h.type="text",h.maxLength=12000,h.autocomplete="off",l.append(ir(c("自填回答(选填)","Your own answer (optional)"),h)),e.append(l),n.push(()=>{let p=d.filter((b)=>b.checked).map((b)=>b.value),g=h.value.trim();return p.length||g?[a,{selected:p,...g?{text:g}:{}}]:void 0})}let r=y("textarea");return r.rows=2,r.maxLength=12000,e.append(ir(c("补充说明(选填)","Comment (optional)"),r)),e.append(y("p","small muted",c("至少回答一题或填写补充说明。","Answer at least one question or leave a comment."))),()=>{let s=n.flatMap((o)=>{let a=o();return a?[a]:[]}),i=r.value.trim();return s.length||i?{answers:Object.fromEntries(s),...i?{comment:i}:{}}:void 0}}function hc(e,t){let n=e.querySelector("[data-question-metadata]");if(!n)return;let r=[];if(t.waitForAnswer===!0)r.push(c("等待回答","Waiting for your answer"));else if(t.waitForAnswer===!1)r.push(c("异步提问","Not waiting for an answer"));let s=C(t.raisedBy);if(s)r.push(c(`提问人:${s}`,`Asked by: ${s}`));let i=Ce(t.remainingMs);if(i!==void 0){let a=Math.ceil(Math.max(0,i)/1000),l=a.toLocaleString(me);r.push(c(`更新时剩余 ${l} 秒`,`${l} ${a===1?"second":"seconds"} left at last update`))}let o=Ce(t.deadlineAtMs);if(o!==void 0){let a=new Date(o);if(!Number.isNaN(a.getTime())){let l=a.toLocaleString(me);r.push(c(`截止:${l}`,`Deadline: ${l}`))}}n.textContent=r.join(" · "),n.hidden=r.length===0}var fc={Allow:c("允许","Allow"),"Allow once":c("仅允许这次","Allow once"),"Allow always":c("始终允许","Always allow"),"Allow for session":c("本会话始终允许","Allow for this session"),Deny:c("拒绝","Deny"),Block:c("阻止","Block"),"Deny with feedback":c("拒绝并说明原因","Deny with feedback")};function jp(e,t){let n=C(e.method),r=C(e.title),s=Boolean(e.toolCallId)&&n!=="question",i=y("form","request-form"),o=n==="question"?c("待回答问题","Pending question"):s?c("工具批准","Tool approval"):c("等待你的决定","Your response is needed");i.setAttribute("aria-label",o),i.dataset.method=n;let a=y(r?"p":"h2","request-kind",n==="question"?c("Agent 提问","Agent question"):o),l=y("div","request-copy");if(r)l.append(y("h2","plain request-title",r));if(C(e.message))l.append(y("p","plain",C(e.message)));if(n==="question"){let A=y("p","small muted");A.dataset.questionMetadata="",l.append(A)}let u=U(e.remoteOrigin),d=C(u.deviceName)||C(u.deviceId);if(d)l.append(y("p","small muted break",c(`请求设备:${d}`,`Requesting device: ${d}`)));if(s){let A=C(e.toolCallId);l.append(y("p","small muted path",c(`工具调用:${A}`,`Tool call: ${A}`)))}let h=y("div","stack stack--tight request-fields"),p=y("p","notice error small");p.setAttribute("role","alert"),p.hidden=!0;let g=y("div","row request-actions"),b=!1,x=async(A)=>{if(b||i.dataset.offline==="true")return;b=!0,i.setAttribute("aria-busy","true"),re(p);for(let D of g.querySelectorAll("button"))D.disabled=!0;try{await t(Hs(e),A)}catch(D){let R=D instanceof Error?D.message:c("发生未知错误","Unknown error");re(p,c(`未能提交:${R}`,`Could not submit: ${R}`))}finally{b=!1,i.removeAttribute("aria-busy");for(let D of g.querySelectorAll("button"))D.disabled=i.dataset.offline==="true"}},k,E=e.secret===!0||Boolean(e.privateInput);switch(n){case"question":k=Wp(h,e);break;case"confirm":g.append(Ue(c("不批准",s?"Deny":"No"),()=>void x({confirmed:!1})),Ue(c("确认","Confirm"),()=>void x({confirmed:!0})));break;case"select":{let A=y("select"),D=ot(c("请选择,不会自动批准","Choose an option. Nothing is approved automatically."),"");D.disabled=!0,A.append(D);for(let R of we(e.options))if(typeof R==="string"&&R)A.append(ot(Object.hasOwn(fc,R)?fc[R]??R:R,R));A.value="",h.append(ir(c("可选操作","Options"),A)),k=()=>A.value?{value:A.value}:void 0;break}case"input":case"editor":{if(E){h.append(y("p","muted",c("此输入需要在原生客户端中处理。","Respond in the native client.")));break}let A=n==="editor"?y("textarea"):y("input");if(A instanceof HTMLTextAreaElement)A.rows=5,A.value=C(e.prefill);else A.autocomplete="off";A.placeholder=C(e.placeholder),h.append(ir(c("输入内容","Response"),A)),k=()=>({value:A.value});break}}if(!E)g.append(Ue(c("取消请求","Cancel request"),()=>void x({cancelled:!0}),"button--quiet"));if(k){let A=y("button","button",c("提交回答","Submit response"));A.type="submit",g.append(A)}i.addEventListener("submit",(A)=>{if(A.preventDefault(),!k)return;let D=k();if(D)x(D);else re(p,c("请至少填写一项回答或选择一个操作。","Enter a response or choose an option."))});let T=y("div",n==="select"?"request-controls request-controls--choice":"request-controls");T.append(h,g);let _=y("div","request-body");if(_.append(l,T,p),i.append(a,_),n==="question")hc(i,e);return i}class Ca{root;nodes=new Map;constructor(e){this.root=e}get first(){return this.nodes.values().next().value}get firstQuestion(){return[...this.nodes.values()].find((e)=>e.dataset.method==="question")}render(e,t,n){for(let[r,s]of this.nodes)if(!e.has(r))s.remove(),this.nodes.delete(r);for(let[r,s]of e){let i=this.nodes.get(r);if(!i)i=jp(s,n),this.nodes.set(r,i),this.root.append(i);if(s.method==="question")hc(i,s);if(i.dataset.offline=String(!t),i.getAttribute("aria-busy")!=="true")for(let o of i.querySelectorAll("button"))o.disabled=!t}}reset(){this.nodes.clear(),this.root.replaceChildren()}}var mc={};function Gp(e){let t=mc[e];if(t)return t;t=mc[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function Zi(e,t){if(typeof t!=="string")t=Zi.defaultChars;let n=Gp(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let s="";for(let i=0,o=r.length;i<o;i+=3){let a=parseInt(r.slice(i+1,i+3),16);if(a<128){s+=n[a];continue}if((a&224)===192&&i+3<o){let l=parseInt(r.slice(i+4,i+6),16);if((l&192)===128){let u=a<<6&1984|l&63;if(u<128)s+="��";else s+=String.fromCharCode(u);i+=3;continue}}if((a&240)===224&&i+6<o){let l=parseInt(r.slice(i+4,i+6),16),u=parseInt(r.slice(i+7,i+9),16);if((l&192)===128&&(u&192)===128){let d=a<<12&61440|l<<6&4032|u&63;if(d<2048||d>=55296&&d<=57343)s+="���";else s+=String.fromCharCode(d);i+=6;continue}}if((a&248)===240&&i+9<o){let l=parseInt(r.slice(i+4,i+6),16),u=parseInt(r.slice(i+7,i+9),16),d=parseInt(r.slice(i+10,i+12),16);if((l&192)===128&&(u&192)===128&&(d&192)===128){let h=a<<18&1835008|l<<12&258048|u<<6&4032|d&63;if(h<65536||h>1114111)s+="����";else h-=65536,s+=String.fromCharCode(55296+(h>>10),56320+(h&1023));i+=9;continue}}s+="�"}return s})}Zi.defaultChars=";/?:@&=+$,#";Zi.componentChars="";var Ps=Zi;var pc={};function Kp(e){let t=pc[e];if(t)return t;t=pc[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);if(/^[0-9a-z]$/i.test(r))t.push(r);else t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Yi(e,t,n){if(typeof t!=="string")n=t,t=Yi.defaultChars;if(typeof n>"u")n=!0;let r=Kp(t),s="";for(let i=0,o=e.length;i<o;i++){let a=e.charCodeAt(i);if(n&&a===37&&i+2<o){if(/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){s+=e.slice(i,i+3),i+=2;continue}}if(a<128){s+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<o){let l=e.charCodeAt(i+1);if(l>=56320&&l<=57343){s+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[i])}return s}Yi.defaultChars=";/?:@&=+$,-_.!~*'()#";Yi.componentChars="-_.!~*'()";var or=Yi;function as(e){let t="";if(t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1)t+="["+e.hostname+"]";else t+=e.hostname||"";return t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Xi(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Vp=/^([a-z0-9.+-]+:)/i,Jp=/:[0-9]*$/,Zp=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Yp=["<",">",'"',"`"," ","\r",`
4
+ `,"\t"],Xp=["{","}","|","\\","^","`"].concat(Yp),Qp=["'"].concat(Xp),gc=["%","/","?",";","#"].concat(Qp),bc=["/","?","#"],e1=255,vc=/^[+a-z0-9A-Z_-]{0,63}$/,t1=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,yc={javascript:!0,"javascript:":!0},kc={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function n1(e,t){if(e&&e instanceof Xi)return e;let n=new Xi;return n.parse(e,t),n}Xi.prototype.parse=function(e,t){let n,r,s,i=e;if(i=i.trim(),!t&&e.split("#").length===1){let u=Zp.exec(i);if(u){if(this.pathname=u[1],u[2])this.search=u[2];return this}}let o=Vp.exec(i);if(o)o=o[0],n=o.toLowerCase(),this.protocol=o,i=i.substr(o.length);if(t||o||i.match(/^\/\/[^@\/]+@[^@\/]+/)){if(s=i.substr(0,2)==="//",s&&!(o&&yc[o]))i=i.substr(2),this.slashes=!0}if(!yc[o]&&(s||o&&!kc[o])){let u=-1;for(let b=0;b<bc.length;b++)if(r=i.indexOf(bc[b]),r!==-1&&(u===-1||r<u))u=r;let d,h;if(u===-1)h=i.lastIndexOf("@");else h=i.lastIndexOf("@",u);if(h!==-1)d=i.slice(0,h),i=i.slice(h+1),this.auth=d;u=-1;for(let b=0;b<gc.length;b++)if(r=i.indexOf(gc[b]),r!==-1&&(u===-1||r<u))u=r;if(u===-1)u=i.length;if(i[u-1]===":")u--;let p=i.slice(0,u);i=i.slice(u),this.parseHost(p),this.hostname=this.hostname||"";let g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g){let b=this.hostname.split(/\./);for(let x=0,k=b.length;x<k;x++){let E=b[x];if(!E)continue;if(!E.match(vc)){let T="";for(let _=0,A=E.length;_<A;_++)if(E.charCodeAt(_)>127)T+="x";else T+=E[_];if(!T.match(vc)){let _=b.slice(0,x),A=b.slice(x+1),D=E.match(t1);if(D)_.push(D[1]),A.unshift(D[2]);if(A.length)i=A.join(".")+i;this.hostname=_.join(".");break}}}}if(this.hostname.length>e1)this.hostname="";if(g)this.hostname=this.hostname.substr(1,this.hostname.length-2)}let a=i.indexOf("#");if(a!==-1)this.hash=i.substr(a),i=i.slice(0,a);let l=i.indexOf("?");if(l!==-1)this.search=i.substr(l),i=i.slice(0,l);if(i)this.pathname=i;if(kc[n]&&this.hostname&&!this.pathname)this.pathname="";return this};Xi.prototype.parseHost=function(e){let t=Jp.exec(e);if(t){if(t=t[0],t!==":")this.port=t.substr(1);e=e.substr(0,e.length-t.length)}if(e)this.hostname=e};var Us=n1;var Sa=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ta=/[\0-\x1F\x7F-\x9F]/,r1=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Ws=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,Ra=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/,Ma=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var s1=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function i1(e){return e===0||e>=55296&&e<=57343||e>1114111}function wc(e){if(i1(e))return 65533;if(e>=128&&e<=159)return s1[e-128]||e;return e}function xc(e){return e-1>>>0<127||e-160>>>0<55136?String.fromCharCode(e):String.fromCodePoint(wc(e))}var sn=(()=>{let e=new Uint8Array(127),t=0;for(let n=33;n<=126;n++)if(n!==34&&n!==36&&n!==92)e[n]=t++;return e})();function Ec(e,t,n,r,s,i){let a=e.length,l=i*90,u=0,d=()=>{let O=sn[e.charCodeAt(u++)];return O<i?O:O*91-l+sn[e.charCodeAt(u++)]},h=n-r,p=n+s,g=new Int32Array(p);g.fill(-1,r,i),g.fill(-1,i+h,p);let b=new Int32Array(p),x=new Int32Array(p);function k(O,H){let K=0,G=H,de=H+O;while(G<de){let ne=sn[e.charCodeAt(u++)];if(ne<89)K+=ne,g[G++]=K;else if(ne===89){let ae=sn[e.charCodeAt(u++)]+2;while(ae--)g[G++]=++K}else{let ae=sn[e.charCodeAt(u++)];K+=89+(ae<90?ae*91+sn[e.charCodeAt(u++)]:sn[e.charCodeAt(u++)]*8281+sn[e.charCodeAt(u++)]*91+sn[e.charCodeAt(u++)]),g[G++]=K}}}k(r,0),k(h,i);let E=new Int32Array(s*2),T=0,_=0;function A(O,H){for(let K=0;K<O;K++){let G=H+K,de=d(),ne=d();E[_*2]=de,E[_*2+1]=ne,_+=1,b[G]=T;let ae=(g[de]<0?x[de]:1)+(g[ne]<0?x[ne]:1);x[G]=ae,T+=ae}}A(s-i+r,i+h),A(i-r,r);let D=new Uint16Array(T),R=0;for(let O=0;O<_;O++)for(let H=0;H<2;H++){let K=E[O*2+H],G=g[K];if(G<0){let de=b[K],ne=de+x[K];while(de<ne)D[R++]=D[de++]}else D[R++]=G}let L=new Uint16Array(t),B=0;while(u<a){let O=sn[e.charCodeAt(u++)];if(O>=i)O=O*91-l+sn[e.charCodeAt(u++)];let H=g[O];if(H<0){let K=b[O],G=K+x[O];while(K<G)L[B++]=D[K++]}else L[B++]=H}return L}var Ac=Ec("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61);var at;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE",e[e.VALUE_MASK=8191]="VALUE_MASK"})(at||(at={}));var xt;(function(e){e[e.AMP=38]="AMP",e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_X=120]="LOWER_X"})(xt||(xt={}));var Qi=32,Sc=21,o1=2097151,La=2047,Tc=0;function a1(e){let t=e>>>Sc;return t===La?Tc:t}function Rc(e){return e-xt.ZERO>>>0<=9}function l1(e){return(e|Qi)-xt.LOWER_A>>>0<=5}function Mc(e){return(e|Qi)-xt.LOWER_A>>>0<=25}function c1(e){return e===xt.EQUALS||Mc(e)||Rc(e)}var Cc;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Cc||(Cc={}));var Ia;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ia||(Ia={}));function u1(e,t,n,r){let s=(t&at.BRANCH_LENGTH)>>7,i=t&at.JUMP_TABLE;if(i){if(s===0)return r===i?n:-1;let l=r-i;if(l>>>0>=s)return-1;let u=e[n+l];return u===0?-1:n+s+u-1&65535}if(s===0)return-1;let o=s+1>>1,a=n+o+s;for(let l=0;l<s;l++){let d=e[n+(l>>1)]>>((l&1)<<3)&255;if(d===r){let h=n+o+l;return a+e[h]&65535}if(d>r)return-1}return-1}function _c(e,t,n){if(n===1)return String.fromCharCode(e[t]&at.VALUE_MASK);if(n===2)return String.fromCharCode(e[t+1]);return String.fromCharCode(e[t+1],e[t+2])}function d1(e,t,n){let r=t+1,s=0,i=r;if(r<n&&(e.charCodeAt(r)|Qi)===xt.LOWER_X){r+=1,i=r;while(r<n){let a=e.charCodeAt(r);if(Rc(a))s=s*16+(a-xt.ZERO);else if(l1(a))s=s*16+((a|Qi)-xt.LOWER_A+10);else break;r+=1}}else while(r<n){let a=e.charCodeAt(r)-xt.ZERO;if(a>>>0>9)break;s=s*10+a,r+=1}if(r===i)return 0;if(r<n&&e.charCodeAt(r)===xt.SEMI)r+=1;if(s>1114111)s=1114112;let o=r-t;if(o>=La)Tc=o,o=La;return o<<Sc|s}function f1(e,t,n){let r=Ac,s=e.indexOf("&");if(s<0)return e;let i=e.length,o=0,a="",l=r[0],u=l&at.JUMP_TABLE,d=(l&at.BRANCH_LENGTH)>>7;do{let h=s+1,p=e.charCodeAt(h),g,b;if(p===xt.NUM){let x=d1(e,h,i);if(g=a1(x),t&&g>0&&e.charCodeAt(h+g-1)!==xt.SEMI)g=0;b=g===0?"":xc(x&o1)}else if(Mc(p)){g=0,b="";let x=p-u,k;if(x>>>0<d){let D=r[1+x];k=D===0?-1:d+D&65535}else k=-1;let E=0,T=0,_=k<0?0:r[k],A=h+1;e:while(A<i){while((_&(at.VALUE_LENGTH|at.FLAG13))===0&&(_&at.JUMP_TABLE)!==0){let B=_&at.JUMP_TABLE,O=(_&at.BRANCH_LENGTH)>>7;if(O===0){if(e.charCodeAt(A)!==B)break e;k+=1}else{let H=e.charCodeAt(A)-B;if(H>>>0>=O)break e;let K=r[k+1+H];if(K===0)break e;k=k+O+K&65535}if(_=r[k],A+=1,A>=i)break e}if((_&(at.VALUE_LENGTH|at.FLAG13))===at.FLAG13){let B=(_&at.BRANCH_LENGTH)>>7;if(e.charCodeAt(A)!==(_&at.JUMP_TABLE))break;A+=1;let O=B-1,H=k+1,K=0;for(;K+1<O;K+=2){let G=r[H];if(e.charCodeAt(A)!==(G&255))break e;if(A+=1,e.charCodeAt(A)!==(G>>8&255))break e;A+=1,H+=1}if(K<O){if(e.charCodeAt(A)!==(r[H]&255))break;A+=1}k+=1+(B>>1),_=r[k];continue}let D=_>>>14,R=e.charCodeAt(A);if(D!==0){if(R===xt.SEMI){g=A-h+1,b=D===1?String.fromCharCode(_&at.VALUE_MASK):_c(r,k,D);break}if(!t&&(_&at.FLAG13)===0)g=A-h,E=k,T=D;if(D===1)break}let L=u1(r,_,k+(D||1),R);if(L<0)break;k=L,_=r[k],A+=1}if(b===""){let D=_>>>14;if(D!==0&&!t&&(_&at.FLAG13)===0)g=A-h,E=k,T=D;if(g>0)b=_c(r,E,T)}}else g=0,b="";if(g===0||n&&p!==xt.NUM&&e.charCodeAt(h+g-1)!==xt.SEMI&&h+g<i&&c1(e.charCodeAt(h+g)))s=h;else{if(o<s)a+=e.slice(o,s);a+=b,s=o=h+g}if(e.charCodeAt(s)!==xt.AMP)s=e.indexOf("&",s)}while(s>=0);return a+e.slice(o)}function eo(e){return f1(e,!0,!1)}var Dc;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(Dc||(Dc={}));var Lc;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(Lc||(Lc={}));var m1=class{src_Any=Sa.source;src_Cc=Ta.source;src_Z=Ma.source;src_P=Ws.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){let r=this.escapeRE(e),s=this.escapeRE(t),i=`(?:(?!${this.src_ZCc}|${r}|${s}).)`,o=`${r}${i}{0,1000}${s}`;for(let a=2;a<=n;a++)o=`${r}(?:${i}|${o}){0,1000}${s}`;return o}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){let t=`(?:(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:[0-9A-Fa-f]{1,4}:){6}${t}|::(?:[0-9A-Fa-f]{1,4}:){5}${t}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;let e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map((e)=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},Na={validate:(e,t,n)=>{let r=n.re.get_http_validator();r.lastIndex=t;let s=r.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)},p1={"http:":Na,"https:":Na,"ftp:":Na,"//":{validate:function(e,t,n){let r=n.re.get_relative_proto_validator();r.lastIndex=t;let s=r.exec(e);if(s){if(t>=3&&e[t-3]===":")return 0;if(t>=3&&e[t-3]==="/")return 0;return s[0].length}return 0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){let r=n.re.get_mailto_validator();r.lastIndex=t;let s=r.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)}},g1="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",b1="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function v1(){let e=b1.split("|");return g1.split("|").forEach((t)=>{let n=t.indexOf(":"),r=t.slice(0,n);for(let s of t.slice(n+1))e.push(r+s)}),e}var y1={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:v1(),urlAuth:!1,maxLength:1e4},Ic=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,r){let s=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=s,this.text=s,this.url=s}},Nc=class{__opts__;__schemas__;re;constructor(e={}){let{rebuilder:t,...n}=e;this.__opts__={...y1,...n},this.__schemas__={...p1},this.re=t||new m1,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{let n={normalize:(r,s)=>s.normalize(r),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;n=this.re.get_schema_search(),n.lastIndex=0;while((t=n.exec(e))!==null)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]){if(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null)return!0}if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]){if(e.indexOf("@")>=0){let r=this.re.get_fuzzy_mail_host_search(),s=this.re.get_mail_name_validator();r.lastIndex=0;while((t=r.exec(e))!==null){let i=e.slice(Math.max(0,t.index-65),t.index);if(s.test(i))return!0}}}return!1}testSchemaAt(e,t,n){if(!this.__schemas__[t.toLowerCase()])return 0;return this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this)}match(e){let t=[],n=this.re.get_schema_search(),r,s,i,o,a,l,u=!1,d=!1,h=!1,p=0;if(!e.length)return null;if(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"])r=this.re.get_fuzzy_link_search(),r.lastIndex=0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"])s=this.re.get_fuzzy_mail_host_search(),s.lastIndex=0,i=this.re.get_mail_name_validator();for(;;){let g=Math.max(p-1,0);if(s&&i&&!h&&(!a||a.index<p)){if(s.lastIndex<g)s.lastIndex=g;for(;;){let T=s.exec(e);if(!T){h=!0,a=void 0;break}let _=i.exec(e.slice(Math.max(0,T.index-65),T.index));if(!_)continue;if(a={schema:"mailto:",index:T.index-_[1].length,lastIndex:T.index+T[0].length},a.index>=p)break;if(s.lastIndex<g)s.lastIndex=g}}if(r&&!d&&(!o||o.index<p)){if(r.lastIndex<g)r.lastIndex=g;for(;;){let T=r.exec(e);if(!T){d=!0,o=void 0;break}if(o={schema:"",index:T.index+T[1].length,lastIndex:T.index+T[0].length},o.index>=p)break;if(r.lastIndex<g)r.lastIndex=g}}let b=a;if(!b||o&&(o.index<b.index||o.index===b.index&&o.lastIndex>b.lastIndex))b=o;let x;if(!u)for(;;){if(!l){if(n.lastIndex<g)n.lastIndex=g;let A=n.exec(e);if(!A){u=!0;break}l={schema:A[2],index:A.index+A[1].length,lastIndex:A.index+A[0].length}}if(l.index<p){l=void 0;continue}if(b&&l.index>b.index)break;let T=l;l=void 0;let _=this.testSchemaAt(e,T.schema,T.lastIndex);if(_){x={schema:T.schema,index:T.index,lastIndex:T.lastIndex+_};break}}let k=x;if(!k||a&&(a.index<k.index||a.index===k.index&&a.lastIndex>k.lastIndex))k=a;if(!k||o&&(o.index<k.index||o.index===k.index&&o.lastIndex>k.lastIndex))k=o;if(!k)break;if(k===a)a=void 0;else if(k===o)o=void 0;let E=new Ic(e,k.schema,k.index,k.lastIndex);if(E.schema)this.__schemas__[E.schema].normalize(E,this);else this.normalize(E);t.push(E),p=k.lastIndex}if(t.length)return t;return null}matchAtStart(e){if(!e.length)return null;let t=this.re.get_schema_at_start().exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;let r=new Ic(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[r.schema].normalize(r,this),r}tlds(e,t=!1){if(e=Array.isArray(e)?e:[e],!t)this.__opts__.tlds=e;else this.__opts__.tlds=this.__opts__.tlds.concat(e);return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){if(!e.schema)e.url=`http://${e.url}`;if(e.schema==="mailto:"&&!/^mailto:/i.test(e.url))e.url=`mailto:${e.url}`}};var k1=/^xn--/,w1=/[^\0-\x7F]/,x1=/[\x2E\u3002\uFF0E\uFF61]/g,E1={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var dn=Math.floor,Ba=String.fromCharCode;function ar(e){throw RangeError(E1[e])}function A1(e,t){let n=[],r=e.length;while(r--)n[r]=t(e[r]);return n}function Oc(e,t){let n=e.split("@"),r="";if(n.length>1)r=n[0]+"@",e=n[1];e=e.replace(x1,".");let s=e.split("."),i=A1(s,t).join(".");return r+i}function $c(e){let t=[],n=0,r=e.length;while(n<r){let s=e.charCodeAt(n++);if(s>=55296&&s<=56319&&n<r){let i=e.charCodeAt(n++);if((i&64512)==56320)t.push(((s&1023)<<10)+(i&1023)+65536);else t.push(s),n--}else t.push(s)}return t}var C1=(e)=>String.fromCodePoint(...e),_1=function(e){if(e>=48&&e<58)return 26+(e-48);if(e>=65&&e<91)return e-65;if(e>=97&&e<123)return e-97;return 36},Bc=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},zc=function(e,t,n){let r=0;e=n?dn(e/700):e>>1,e+=dn(e/t);for(;e>455;r+=36)e=dn(e/35);return dn(r+36*e/(e+38))},Fc=function(e){let t=[],n=e.length,r=0,s=128,i=72,o=e.lastIndexOf("-");if(o<0)o=0;for(let a=0;a<o;++a){if(e.charCodeAt(a)>=128)ar("not-basic");t.push(e.charCodeAt(a))}for(let a=o>0?o+1:0;a<n;){let l=r;for(let d=1,h=36;;h+=36){if(a>=n)ar("invalid-input");let p=_1(e.charCodeAt(a++));if(p>=36)ar("invalid-input");if(p>dn((2147483647-r)/d))ar("overflow");r+=p*d;let g=h<=i?1:h>=i+26?26:h-i;if(p<g)break;let b=36-g;if(d>dn(2147483647/b))ar("overflow");d*=b}let u=t.length+1;if(i=zc(r-l,u,l==0),dn(r/u)>2147483647-s)ar("overflow");s+=dn(r/u),r%=u,t.splice(r++,0,s)}return String.fromCodePoint(...t)},qc=function(e){let t=[];e=$c(e);let n=e.length,r=128,s=0,i=72;for(let l of e)if(l<128)t.push(Ba(l));let o=t.length,a=o;if(o)t.push("-");while(a<n){let l=2147483647;for(let d of e)if(d>=r&&d<l)l=d;let u=a+1;if(l-r>dn((2147483647-s)/u))ar("overflow");s+=(l-r)*u,r=l;for(let d of e){if(d<r&&++s>2147483647)ar("overflow");if(d===r){let h=s;for(let p=36;;p+=36){let g=p<=i?1:p>=i+26?26:p-i;if(h<g)break;let b=h-g,x=36-g;t.push(Ba(Bc(g+b%x,0))),h=dn(b/x)}t.push(Ba(Bc(h,0))),i=zc(s,u,a===o),s=0,++a}}++s,++r}return t.join("")},S1=function(e){return Oc(e,function(t){return k1.test(t)?Fc(t.slice(4).toLowerCase()):t})},T1=function(e){return Oc(e,function(t){return w1.test(t)?"xn--"+qc(t):t})},R1={version:"2.3.1",ucs2:{decode:$c,encode:C1},decode:Fc,encode:qc,toASCII:T1,toUnicode:S1};var Oa=R1;/*! markdown-it 15.0.3 https://github.com/markdown-it/markdown-it @license MIT */var Hc=Object.defineProperty,Qc=(e,t)=>{let n={};for(var r in e)Hc(n,r,{get:e[r],enumerable:!0});if(!t)Hc(n,Symbol.toStringTag,{value:"Module"});return n},M1=Qc({arrayReplaceAt:()=>D1,asciiTrim:()=>io,callable:()=>eu,escapeHtml:()=>lr,escapeRE:()=>H1,fromCodePoint:()=>Gs,isMdAsciiPunct:()=>Js,isPunctChar:()=>nu,isPunctCharCode:()=>Vs,isSpace:()=>Je,isValidEntityCode:()=>Pa,isWhiteSpace:()=>Ks,lib:()=>P1,normalizeReference:()=>so,unescapeAll:()=>ls,unescapeMd:()=>B1});function eu(e){let t=function(...n){return Reflect.construct(e,n,new.target&&new.target!==t?new.target:e)};return Object.defineProperty(t,"name",{value:e.name}),Object.setPrototypeOf(t,e),t.prototype=e.prototype,t}function D1(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Pa(e){if(e>=55296&&e<=57343)return!1;if(e>=64976&&e<=65007)return!1;if((e&65535)===65535||(e&65535)===65534)return!1;if(e>=0&&e<=8)return!1;if(e===11)return!1;if(e>=14&&e<=31)return!1;if(e>=127&&e<=159)return!1;if(e>1114111)return!1;return!0}function Gs(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var tu=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,L1=new RegExp(`${tu.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),I1=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function N1(e,t){if(t.charCodeAt(0)===35&&I1.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);if(Pa(r))return Gs(r);return e}let n=eo(e);if(n!==e)return n;return e}function B1(e){if(e.indexOf("\\")<0)return e;return e.replace(tu,"$1")}function ls(e){if(e.indexOf("\\")<0&&e.indexOf("&")<0)return e;return e.replace(L1,function(t,n,r){if(n)return n;return N1(t,r)})}var O1=/[&<>"]/,$1=/[&<>"]/g,z1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function F1(e){return z1[e]}function lr(e){if(O1.test(e))return e.replace($1,F1);return e}var q1=/[.?*+^$[\]\\(){}|-]/g;function H1(e){return e.replace(q1,"\\$&")}function Je(e){switch(e){case 9:case 32:return!0}return!1}function Ks(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function nu(e){return Ws.test(e)||Ra.test(e)}function Vs(e){return nu(Gs(e))}function Js(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function so(e){return e=e.trim().replace(/\s+/g," "),e.toLowerCase().toUpperCase()}function Pc(e){return e===32||e===9||e===10||e===13}function io(e){let t=0;for(;t<e.length;t++)if(!Pc(e.charCodeAt(t)))break;let n=e.length-1;for(;n>=t;n--)if(!Pc(e.charCodeAt(n)))break;return e.slice(t,n+1)}var P1={mdurl:_a,ucmicro:Da};function U1(e,t,n){let r,s,i,o,{posMax:a,pos:l}=e;e.pos=t+1,r=1;while(e.pos<a){if(i=e.src.charCodeAt(e.pos),i===93){if(r--,r===0){s=!0;break}}if(o=e.pos,e.md.inline.skipToken(e),i===91){if(o===e.pos-1)r++;else if(n)return e.pos=l,-1}}let u=-1;if(s)u=e.pos;return e.pos=l,u}function W1(e,t,n){let r,s=t,i={ok:!1,pos:0,str:""};if(e.charCodeAt(s)===60){s++;while(s<n){if(r=e.charCodeAt(s),r===10)return i;if(r===60)return i;if(r===62)return i.pos=s+1,i.str=ls(e.slice(t+1,s)),i.ok=!0,i;if(r===92&&s+1<n){s+=2;continue}s++}return i}let o=0;while(s<n){if(r=e.charCodeAt(s),r===32)break;if(r<32||r===127)break;if(r===92&&s+1<n){if(e.charCodeAt(s+1)===32){s++;continue}s+=2;continue}if(r===40){if(o++,o>32)return i}if(r===41){if(o===0)break;o--}s++}if(t===s)return i;if(o!==0)return i;return i.str=ls(e.slice(t,s)),i.pos=s,i.ok=!0,i}function j1(e,t,n,r){let s,i=t,o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(i>=n)return o;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return o;if(t++,i++,a===40)a=41;o.marker=a}while(i<n){if(s=e.charCodeAt(i),s===o.marker)return o.pos=i+1,o.str+=ls(e.slice(t,i)),o.ok=!0,o;else if(s===40&&o.marker===41)return o;else if(s===92&&i+1<n)i++;i++}return o.can_continue=!0,o.str+=ls(e.slice(t,i)),o}var G1=Qc({parseLinkDestination:()=>W1,parseLinkLabel:()=>U1,parseLinkTitle:()=>j1});function Zs(e){return Zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zs(e)}function K1(e,t){if(Zs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Zs(r)!="object")return r;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V1(e){var t=K1(e,"string");return Zs(t)=="symbol"?t:t+""}function ye(e,t,n){return(t=V1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lr=class{constructor(e,t,n){ye(this,"map",null),ye(this,"level",0),ye(this,"children",null),ye(this,"content",""),ye(this,"markup",""),ye(this,"info",""),ye(this,"block",!1),ye(this,"hidden",!1),this.type=e,this.tag=t,this.attrs=null,this.nesting=n,this.meta=null}attrIndex(e){if(!this.attrs)return-1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1}attrPush(e){if(this.attrs)this.attrs.push(e);else this.attrs=[e]}attrSet(e,t){let n=this.attrIndex(e),r=[e,t];if(n<0)this.attrPush(r);else this.attrs[n]=r}attrGet(e){let t=this.attrIndex(e),n=null;if(t>=0)n=this.attrs[t][1];return n}attrJoin(e,t){let n=this.attrIndex(e);if(n<0)this.attrPush([e,t]);else this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},Ys=class{constructor(){ye(this,"__rules__",[]),ye(this,"__cache__",null)}__find__(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1}__compile__(){let e=new Set;this.__rules__.forEach((t)=>{if(!t.enabled)return;t.alt.forEach((n)=>{if(n)e.add(n)})}),this.__cache__=Object.create(null),this.__cache__[""]=[],this.__rules__.forEach((t)=>{if(t.enabled)this.__cache__[""].push(t.fn)}),e.forEach((t)=>{this.__cache__[t]=[],this.__rules__.forEach((n)=>{if(n.enabled&&n.alt.indexOf(t)>=0)this.__cache__[t].push(n.fn)})})}at(e,t,n={}){let r=this.__find__(e);if(r===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__[r].fn=t,this.__rules__[r].alt=n.alt||[],this.__cache__=null}before(e,t,n,r={}){let s=this.__find__(e);if(s===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(s,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}after(e,t,n,r={}){let s=this.__find__(e);if(s===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}push(e,t,n={}){this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null}enable(e,t=!1){if(!Array.isArray(e))e=[e];let n=[];return e.forEach((r)=>{let s=this.__find__(r);if(s<0){if(t)return;throw Error(`Rules manager: invalid rule name ${r}`)}this.__rules__[s].enabled=!0,n.push(r)}),this.__cache__=null,n}enableOnly(e,t=!1){if(!Array.isArray(e))e=[e];this.__rules__.forEach((n)=>{n.enabled=!1}),this.enable(e,t)}disable(e,t=!1){if(!Array.isArray(e))e=[e];let n=[];return e.forEach((r)=>{let s=this.__find__(r);if(s<0){if(t)return;throw Error(`Rules manager: invalid rule name ${r}`)}this.__rules__[s].enabled=!1,n.push(r)}),this.__cache__=null,n}getRules(e){if(!this.__cache__)this.__compile__();return this.__cache__[e]||[]}},fn={};fn.code_inline=function(e,t,n,r,s){let i=e[t];return`<code${s.renderAttrs(i)}>${lr(i.content)}</code>`};fn.code_block=function(e,t,n,r,s){let i=e[t];return`<pre${s.renderAttrs(i)}><code>${lr(e[t].content)}</code></pre>
5
+ `};fn.fence=function(e,t,n,r,s){let i=e[t],o=i.info?ls(i.info).trim():"",a="",l="";if(o){let d=o.split(/(\s+)/g);a=d[0],l=d.slice(2).join("")}let u;if(n.highlight)u=n.highlight(i.content,a,l)||lr(i.content);else u=lr(i.content);if(u.indexOf("<pre")===0)return u+`
6
+ `;if(o){let d=i.attrIndex("class"),h=i.attrs?i.attrs.slice():[];if(d<0)h.push(["class",`${n.langPrefix}${a}`]);else h[d]=[h[d][0],h[d][1]],h[d][1]+=` ${n.langPrefix}${a}`;let p={attrs:h};return`<pre><code${s.renderAttrs(p)}>${u}</code></pre>
7
7
  `}return`<pre><code${s.renderAttrs(i)}>${u}</code></pre>
8
- `};un.image=function(e,t,n,r,s){let i=e[t];return i.attrs[i.attrIndex("alt")][1]=s.renderInlineAsText(i.children,n,r),s.renderToken(e,t,n)};un.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
8
+ `};fn.image=function(e,t,n,r,s){let i=e[t];return i.attrs[i.attrIndex("alt")][1]=s.renderInlineAsText(i.children,n,r),s.renderToken(e,t,n)};fn.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
9
9
  `:`<br>
10
- `};un.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
10
+ `};fn.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
11
11
  `:`<br>
12
12
  `:`
13
- `};un.text=function(e,t){return tr(e[t].content)};un.html_block=function(e,t){return e[t].content};un.html_inline=function(e,t){return e[t].content};var Ac=class{constructor(){pe(this,"rules",Object.assign({},un))}renderAttrs(e){let t,n,r;if(!e.attrs)return"";r="";for(t=0,n=e.attrs.length;t<n;t++)r+=` ${tr(e.attrs[t][0])}="${tr(String(e.attrs[t][1]))}"`;return r}renderToken(e,t,n){let r=e[t],s="";if(r.hidden)return"";let i=t-1;while(i>=0&&e[i].hidden&&e[i].nesting===0)i--;if(r.block&&r.nesting!==-1&&i>=0&&e[i].hidden&&e[i].nesting===-1)s+=`
14
- `;if(s+=(r.nesting===-1?"</":"<")+r.tag,s+=this.renderAttrs(r),r.nesting===0&&n.xhtmlOut)s+=" /";let a=!1;if(r.block){if(a=!0,r.nesting===1){let o=t+1;while(o<e.length&&e[o].hidden&&e[o].nesting===0)o++;if(o<e.length){let l=e[o];if(l.type==="inline"||l.hidden)a=!1;else if(l.nesting===-1&&l.tag===r.tag)a=!1}}}return s+=a?`>
15
- `:">",s}renderInline(e,t,n){let r="",s=this.rules;for(let i=0,a=e.length;i<a;i++){let o=e[i].type;if(typeof s[o]<"u")r+=s[o](e,i,t,n,this);else r+=this.renderToken(e,i,t)}return r}renderInlineAsText(e,t,n){let r="";for(let s=0,i=e.length;s<i;s++)switch(e[s].type){case"text":case"code_inline":r+=e[s].content;break;case"image":r+=this.renderInlineAsText(e[s].children,t,n);break;case"html_inline":case"html_block":r+=e[s].content;break;case"softbreak":case"hardbreak":r+=`
16
- `}return r}render(e,t,n){let r="",s=this.rules;for(let i=0,a=e.length;i<a;i++){let o=e[i].type;if(o==="inline")r+=this.renderInline(e[i].children,t,n);else if(typeof s[o]<"u")r+=s[o](e,i,t,n,this);else r+=this.renderToken(e,i,t)}return r}},Cc=class{constructor(e,t,n){pe(this,"tokens",[]),pe(this,"inlineMode",!1),pe(this,"Token",kr),this.src=e,this.env=n,this.md=t}},Xp=/\r\n?/g,Qp=/\0/g;function e1(e){let t;t=e.src.replace(Xp,`
17
- `),t=t.replace(Qp,"�"),e.src=t}function t1(e){let t;if(e.inlineMode)t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t);else e.md.block.parse(e.src,e.md,e.env,e.tokens)}function n1(e){let t=e.tokens,n=0;for(let r=0;r<t.length;r++){if(t[r].type==="reference_definition")continue;if(r!==n)t[n]=t[r];n++}if(t.length!==n)t.length=n}function r1(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let s=t[n];if(s.type==="inline")e.md.inline.parse(s.content,e.md,e.env,s.children)}}function s1(e){return/^<a[>\s]/i.test(e)}function i1(e){return/^<\/a\s*>/i.test(e)}function a1(e){let t=e.tokens;if(!e.md.options.linkify)return;for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.test(t[n].content))continue;let s=t[n].children,i=[],a=0;for(let o=s.length-1;o>=0;o--){let l=s[o];if(l.type==="link_close"){o--;while(s[o].level!==l.level&&s[o].type!=="link_open")o--;continue}if(l.type==="html_inline"){if(s1(l.content)&&a>0)a--;if(i1(l.content))a++}if(a>0)continue;if(l.type==="text"&&e.md.linkify.test(l.content)){let u=l.content,d=e.md.linkify.match(u),f=[],p=l.level,g=0;if(d.length>0&&d[0].index===0&&o>0&&s[o-1].type==="text_special")d=d.slice(1);for(let b=0;b<d.length;b++){let x=d[b].url,k=e.md.normalizeLink(x);if(!e.md.validateLink(k))continue;let A=d[b].text;if(!d[b].schema)A=e.md.normalizeLinkText(`http://${A}`).replace(/^http:\/\//,"");else if(d[b].schema==="mailto:"&&!/^mailto:/i.test(A))A=e.md.normalizeLinkText(`mailto:${A}`).replace(/^mailto:/,"");else A=e.md.normalizeLinkText(A);let T=d[b].index;if(T>g){let M=new e.Token("text","",0);M.content=u.slice(g,T),M.level=p,f.push(M)}let S=new e.Token("link_open","a",1);S.attrs=[["href",k]],S.level=p++,S.markup="linkify",S.info="auto",f.push(S);let E=new e.Token("text","",0);E.content=A,E.level=p,f.push(E);let D=new e.Token("link_close","a",-1);D.level=--p,D.markup="linkify",D.info="auto",f.push(D),g=d[b].lastIndex}if(g<u.length){let b=new e.Token("text","",0);b.content=u.slice(g),b.level=p,f.push(b)}i.push({index:o,nodes:f})}}if(i.length>0){let o=s.length;for(let f of i)o+=f.nodes.length-1;let l=Array(o),u=0,d=0;i.reverse();for(let f=0;f<s.length;f++){let p=i[u];if((p===null||p===void 0?void 0:p.index)===f){for(let g of p.nodes)l[d++]=g;u++}else l[d++]=s[f]}t[n].children=l}}}var _c=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,o1=/\((c|tm|r)\)/i,l1=/\((c|tm|r)\)/gi,c1={c:"©",r:"®",tm:"™"};function u1(e,t){return c1[t.toLowerCase()]}function d1(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type==="text"&&!t)r.content=r.content.replace(l1,u1);if(r.type==="link_open"&&r.info==="auto")t--;if(r.type==="link_close"&&r.info==="auto")t++}}function h1(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type==="text"&&!t){if(_c.test(r.content))r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")}if(r.type==="link_open"&&r.info==="auto")t--;if(r.type==="link_close"&&r.info==="auto")t++}}function f1(e){let t;if(!e.md.options.typographer)return;for(t=e.tokens.length-1;t>=0;t--){if(e.tokens[t].type!=="inline")continue;if(o1.test(e.tokens[t].content))d1(e.tokens[t].children);if(_c.test(e.tokens[t].content))h1(e.tokens[t].children)}}var m1=/['"]/,uc=/['"]/g,dc="’",p1=1000;function hc(e,t,n){while(e.length>n){let r=e.pop();if(r.isSingleQuote)t.single=r.prevSameQuoteIdx;else t.double=r.prevSameQuoteIdx}}function Hi(e,t,n,r){if(!e[t])e[t]=[];e[t].push({pos:n,ch:r})}function g1(e,t){let n="",r=0;t.sort((s,i)=>s.pos-i.pos);for(let s=0;s<t.length;s++){let i=t[s];n+=e.slice(r,i.pos)+i.ch,r=i.pos+1}return n+e.slice(r)}function b1(e,t){let n,r=[],s={single:-1,double:-1},i={};for(let a=0;a<e.length;a++){let o=e[a],l=e[a].level;for(n=r.length-1;n>=0;n--)if(r[n].level<=l)break;if(hc(r,s,n+1),o.type!=="text")continue;let u=o.content,d=0,f=u.length;e:while(d<f){uc.lastIndex=d;let p=uc.exec(u);if(!p)break;let g=!0,b=!0;d=p.index+1;let x=p[0]==="'",k=32;if(p.index-1>=0)k=u.charCodeAt(p.index-1);else for(n=a-1;n>=0;n--){if(e[n].type==="softbreak"||e[n].type==="hardbreak")break;if(!e[n].content)continue;k=e[n].content.charCodeAt(e[n].content.length-1);break}let A=32;if(d<f)A=u.charCodeAt(d);else for(n=a+1;n<e.length;n++){if(e[n].type==="softbreak"||e[n].type==="hardbreak")break;if(!e[n].content)continue;A=e[n].content.charCodeAt(0);break}let T=zs(k)||Os(k),S=zs(A)||Os(A),E=Bs(k),D=Bs(A);if(D)g=!1;else if(S){if(!(E||T))g=!1}if(E)b=!1;else if(T){if(!(D||S))b=!1}if(A===34&&p[0]==='"'){if(k>=48&&k<=57)b=g=!1}if(g&&b)g=T,b=S;if(!g&&!b){if(x)Hi(i,a,p.index,dc);continue}if(b){if(n=x?s.single:s.double,n>=0&&r[n].level===l){let M=r[n],L,z;if(x)L=t.md.options.quotes[2],z=t.md.options.quotes[3];else L=t.md.options.quotes[0],z=t.md.options.quotes[1];Hi(i,a,p.index,z),Hi(i,M.tokenIdx,M.contentPos,L),hc(r,s,n);continue e}}if(g){if(r.length>=p1)return;if(r.push({tokenIdx:a,contentPos:p.index,isSingleQuote:x,level:l,prevSameQuoteIdx:x?s.single:s.double}),x)s.single=r.length-1;else s.double=r.length-1}else if(b&&x)Hi(i,a,p.index,dc)}}Object.keys(i).forEach(function(a){let o=Number(a);e[o].content=g1(e[o].content,i[a])})}function v1(e){if(!e.md.options.typographer)return;for(let t=e.tokens.length-1;t>=0;t--){if(e.tokens[t].type!=="inline"||!m1.test(e.tokens[t].content))continue;b1(e.tokens[t].children,e)}}function y1(e){let t,n,r=e.length;for(t=0;t<r;t++)if(e[t].type==="text_special")e[t].type="text";for(t=n=0;t<r;t++)if(e[t].type==="text"&&t+1<r&&e[t+1].type==="text")e[t+1].content=e[t].content+e[t+1].content;else{if(t!==n)e[n]=e[t];n++}if(t!==n)e.length=n}function w1(e){let t,n,r=e.tokens,s=r.length;for(let i=0;i<s;i++){if(r[i].type!=="inline")continue;let a=r[i].children,o=a.length;for(t=0;t<o;t++){if(a[t].type==="text_special")a[t].type="text";if(a[t].children)y1(a[t].children)}for(t=n=0;t<o;t++)if(a[t].type==="text"&&t+1<o&&a[t+1].type==="text")a[t+1].content=a[t].content+a[t+1].content;else{if(t!==n)a[n]=a[t];n++}if(t!==n)a.length=n}}var go=[["normalize",e1],["block",t1],["strip_references",n1],["inline",r1],["linkify",a1],["replacements",f1],["smartquotes",v1],["text_join",w1]],Tc=class{constructor(){pe(this,"ruler",new $s),pe(this,"State",Cc);for(let e=0;e<go.length;e++)this.ruler.push(go[e][0],go[e][1])}process(e){let t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)}},Sc=class{constructor(e,t,n,r){pe(this,"bMarks",[]),pe(this,"eMarks",[]),pe(this,"tShift",[]),pe(this,"sCount",[]),pe(this,"bsCount",[]),pe(this,"blkIndent",0),pe(this,"line",0),pe(this,"lineMax",0),pe(this,"tight",!1),pe(this,"listIndent",-1),pe(this,"parentType","root"),pe(this,"level",0),pe(this,"Token",kr),this.src=e,this.md=t,this.env=n,this.tokens=r;let s=this.src;for(let i=0,a=0,o=0,l=0,u=s.length,d=!1;a<u;a++){let f=s.charCodeAt(a);if(!d)if(je(f)){if(o++,f===9)l+=4-l%4;else l++;continue}else d=!0;if(f===10||a===u-1){if(f!==10)a++;this.bMarks.push(i),this.eMarks.push(a),this.tShift.push(o),this.sCount.push(l),this.bsCount.push(0),d=!1,o=0,l=0,i=a+1}}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){let r=new kr(e,t,n);if(r.block=!0,n<0)this.level--;if(r.level=this.level,n>0)this.level++;return this.tokens.push(r),r}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t;e++)if(this.bMarks[e]+this.tShift[e]<this.eMarks[e])break;return e}skipSpaces(e){for(let t=this.src.length;e<t;e++)if(!je(this.src.charCodeAt(e)))break;return e}skipSpacesBack(e,t){if(e<=t)return e;while(e>t)if(!je(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let n=this.src.length;e<n;e++)if(this.src.charCodeAt(e)!==t)break;return e}skipCharsBack(e,t,n){if(e<=n)return e;while(e>n)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,n,r){if(e>=t)return"";let s=Array(t-e);for(let i=0,a=e;a<t;a++,i++){let o=0,l=this.bMarks[a],u=l,d;if(a+1<t||r)d=this.eMarks[a]+1;else d=this.eMarks[a];while(u<d&&o<n){let f=this.src.charCodeAt(u);if(je(f))if(f===9)o+=4-(o+this.bsCount[a])%4;else o++;else if(u-l<this.tShift[a])o++;else break;u++}if(o>n)s[i]=Array(o-n+1).join(" ")+this.src.slice(u,d);else s[i]=this.src.slice(u,d)}return s.join("")}},k1=65536;function bo(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function fc(e){let t=[],n=e.length,r=0,s=e.charCodeAt(r),i=!1,a=0,o="";while(r<n){if(s===124)if(!i)t.push(o+e.substring(a,r)),o="",a=r+1;else o+=e.substring(a,r-1),a=r;i=s===92,r++,s=e.charCodeAt(r)}return t.push(o+e.substring(a)),t}function x1(e,t,n,r){if(t+2>n)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent)return!1;if(e.sCount[s]-e.blkIndent>=4)return!1;let i=e.bMarks[s]+e.tShift[s];if(i>=e.eMarks[s])return!1;let a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58)return!1;if(i>=e.eMarks[s])return!1;let o=e.src.charCodeAt(i++);if(o!==124&&o!==45&&o!==58&&!je(o))return!1;if(a===45&&je(o))return!1;while(i<e.eMarks[s]){let E=e.src.charCodeAt(i);if(E!==124&&E!==45&&E!==58&&!je(E))return!1;i++}let l=bo(e,t+1),u=l.split("|"),d=[];for(let E=0;E<u.length;E++){let D=u[E].trim();if(!D)if(E===0||E===u.length-1)continue;else return!1;if(!/^:?-+:?$/.test(D))return!1;if(D.charCodeAt(D.length-1)===58)d.push(D.charCodeAt(0)===58?"center":"right");else if(D.charCodeAt(0)===58)d.push("left");else d.push("")}if(l=bo(e,t).trim(),l.indexOf("|")===-1)return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(u=fc(l),u.length&&u[0]==="")u.shift();if(u.length&&u[u.length-1]==="")u.pop();let f=u.length;if(f===0||f!==d.length)return!1;if(r)return!0;let p=e.parentType;e.parentType="table";let g=e.md.block.ruler.getRules("blockquote"),b=e.push("table_open","table",1),x=[t,0];b.map=x;let k=e.push("thead_open","thead",1);k.map=[t,t+1];let A=e.push("tr_open","tr",1);A.map=[t,t+1];for(let E=0;E<u.length;E++){let D=e.push("th_open","th",1);if(d[E])D.attrs=[["style",`text-align:${d[E]}`]];let M=e.push("inline","",0);M.content=u[E].trim(),M.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let T,S=0;for(s=t+2;s<n;s++){if(e.sCount[s]<e.blkIndent)break;let E=!1;for(let M=0,L=g.length;M<L;M++)if(g[M](e,s,n,!0)){E=!0;break}if(E)break;if(l=bo(e,s).trim(),!l)break;if(e.sCount[s]-e.blkIndent>=4)break;if(u=fc(l),u.length&&u[0]==="")u.shift();if(u.length&&u[u.length-1]==="")u.pop();if(S+=f-u.length,S>k1)break;if(s===t+2){let M=e.push("tbody_open","tbody",1);M.map=T=[t+2,0]}let D=e.push("tr_open","tr",1);D.map=[s,s+1];for(let M=0;M<f;M++){let L=e.push("td_open","td",1);if(d[M])L.attrs=[["style",`text-align:${d[M]}`]];let z=e.push("inline","",0);z.content=u[M]?u[M].trim():"",z.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}if(T)e.push("tbody_close","tbody",-1),T[1]=s;return e.push("table_close","table",-1),x[1]=s,e.parentType=p,e.line=s,!0}function E1(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,s=r;while(r<n){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,s=r;continue}break}e.line=s;let i=e.push("code_block","code",0);return i.content=e.getLines(t,s,4+e.blkIndent,!1)+`
18
- `,i.map=[t,e.line],!0}function A1(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(s+3>i)return!1;let a=e.src.charCodeAt(s);if(a!==126&&a!==96)return!1;let o=s;s=e.skipChars(s,a);let l=s-o;if(l<3)return!1;let u=e.src.slice(o,s),d=e.src.slice(s,i);if(a===96){if(d.indexOf(String.fromCharCode(a))>=0)return!1}if(r)return!0;let f=t,p=!1;for(;;){if(f++,f>=n)break;if(s=o=e.bMarks[f]+e.tShift[f],i=e.eMarks[f],s<i&&e.sCount[f]<e.blkIndent)break;if(e.src.charCodeAt(s)!==a)continue;if(e.sCount[f]-e.blkIndent>=4)continue;if(s=e.skipChars(s,a),s-o<l)continue;if(s=e.skipSpaces(s),s<i)continue;p=!0;break}l=e.sCount[t],e.line=f+(p?1:0);let g=e.push("fence","code",0);return g.info=d,g.content=e.getLines(t+1,f,l,!0),g.markup=u,g.map=[t,e.line],!0}function C1(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.src.charCodeAt(s)!==62)return!1;if(r)return!0;let o=[],l=[],u=[],d=[],f=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";let g=!1,b;for(b=t;b<n;b++){let S=e.sCount[b]<e.blkIndent;if(s=e.bMarks[b]+e.tShift[b],i=e.eMarks[b],s>=i)break;if(e.src.charCodeAt(s++)===62&&!S){let D=e.sCount[b]+1,M,L;if(e.src.charCodeAt(s)===32)s++,D++,L=!1,M=!0;else if(e.src.charCodeAt(s)===9)if(M=!0,(e.bsCount[b]+D)%4===3)s++,D++,L=!1;else L=!0;else M=!1;let z=D;o.push(e.bMarks[b]),e.bMarks[b]=s;while(s<i){let O=e.src.charCodeAt(s);if(je(O))if(O===9)z+=4-(z+e.bsCount[b]+(L?1:0))%4;else z++;else break;s++}g=s>=i,l.push(e.bsCount[b]),e.bsCount[b]=e.sCount[b]+1+(M?1:0),u.push(e.sCount[b]),e.sCount[b]=z-D,d.push(e.tShift[b]),e.tShift[b]=s-e.bMarks[b];continue}if(g)break;let E=!1;for(let D=0,M=f.length;D<M;D++)if(f[D](e,b,n,!0)){E=!0;break}if(E){if(e.lineMax=b,e.blkIndent!==0)o.push(e.bMarks[b]),l.push(e.bsCount[b]),d.push(e.tShift[b]),u.push(e.sCount[b]),e.sCount[b]-=e.blkIndent;break}o.push(e.bMarks[b]),l.push(e.bsCount[b]),d.push(e.tShift[b]),u.push(e.sCount[b]),e.sCount[b]=-1}let x=e.blkIndent;e.blkIndent=0;let k=e.push("blockquote_open","blockquote",1);k.markup=">";let A=[t,0];k.map=A,e.md.block.tokenize(e,t,b);let T=e.push("blockquote_close","blockquote",-1);T.markup=">",e.lineMax=a,e.parentType=p,A[1]=e.line;for(let S=0;S<d.length;S++)e.bMarks[S+t]=o[S],e.tShift[S+t]=d[S],e.sCount[S+t]=u[S],e.bsCount[S+t]=l[S];return e.blkIndent=x,!0}function _1(e,t,n,r){let s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t],a=e.src.charCodeAt(i++);if(a!==42&&a!==45&&a!==95)return!1;let o=1;while(i<s){let u=e.src.charCodeAt(i++);if(u!==a&&!je(u))return!1;if(u===a)o++}if(o<3)return!1;if(r)return!0;e.line=t+1;let l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(o+1).join(String.fromCharCode(a)),!0}function mc(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(r++);if(s!==42&&s!==45&&s!==43)return-1;if(r<n){if(!je(e.src.charCodeAt(r)))return-1}return r}function pc(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],s=n;if(s+1>=r)return-1;let i=e.src.charCodeAt(s++);if(i<48||i>57)return-1;for(;;){if(s>=r)return-1;if(i=e.src.charCodeAt(s++),i>=48&&i<=57){if(s-n>=10)return-1;continue}if(i===41||i===46)break;return-1}if(s<r){if(i=e.src.charCodeAt(s),!je(i))return-1}return s}function T1(e,t){let n=e.level+2;for(let r=t+2,s=e.tokens.length-2;r<s;r++)if(e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open")e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2}function S1(e,t,n,r){let s,i,a,o,l=t,u=!0;if(e.sCount[l]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let d=!1;if(r&&e.parentType==="paragraph"){if(e.sCount[l]>=e.blkIndent)d=!0}let f,p,g;if((g=pc(e,l))>=0){if(f=!0,a=e.bMarks[l]+e.tShift[l],p=Number(e.src.slice(a,g-1)),d&&p!==1)return!1}else if((g=mc(e,l))>=0)f=!1;else return!1;if(d){if(e.skipSpaces(g)>=e.eMarks[l])return!1}if(r)return!0;let b=e.src.charCodeAt(g-1),x=e.tokens.length;if(f){if(o=e.push("ordered_list_open","ol",1),p!==1)o.attrs=[["start",p]]}else o=e.push("bullet_list_open","ul",1);let k=[l,0];o.map=k,o.markup=String.fromCharCode(b);let A=!1,T=e.md.block.ruler.getRules("list"),S=e.parentType;e.parentType="list";while(l<n){i=g,s=e.eMarks[l];let E=e.sCount[l]+g-(e.bMarks[l]+e.tShift[l]),D=E;while(i<s){let de=e.src.charCodeAt(i);if(de===9)D+=4-(D+e.bsCount[l])%4;else if(de===32)D++;else break;i++}let M=i,L;if(M>=s)L=1;else L=D-E;if(L>4)L=1;let z=E+L;o=e.push("list_item_open","li",1),o.markup=String.fromCharCode(b);let O=[l,0];if(o.map=O,f)o.info=e.src.slice(a,g-1);let P=e.tight,V=e.tShift[l],G=e.sCount[l],ce=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=z,e.tight=!0,e.tShift[l]=M-e.bMarks[l],e.sCount[l]=D,M>=s&&e.isEmpty(l+1))e.line=Math.min(e.line+2,n);else e.md.block.tokenize(e,l,n);if(!e.tight||A)u=!1;if(A=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ce,e.tShift[l]=V,e.sCount[l]=G,e.tight=P,o=e.push("list_item_close","li",-1),o.markup=String.fromCharCode(b),l=e.line,O[1]=l,l>=n)break;if(e.sCount[l]<e.blkIndent)break;if(e.sCount[l]-e.blkIndent>=4)break;let re=!1;for(let de=0,F=T.length;de<F;de++)if(T[de](e,l,n,!0)){re=!0;break}if(re)break;if(f){if(g=pc(e,l),g<0)break;a=e.bMarks[l]+e.tShift[l]}else if(g=mc(e,l),g<0)break;if(b!==e.src.charCodeAt(g-1))break}if(f)o=e.push("ordered_list_close","ol",-1);else o=e.push("bullet_list_close","ul",-1);if(o.markup=String.fromCharCode(b),k[1]=l,e.line=l,e.parentType=S,u)T1(e,x);return!0}var vo=999;function R1(e){let t=e.length;for(let n=0;n<e.length-1;n++){let r=e.charCodeAt(n);if(r<55296||r>56319)continue;let s=e.charCodeAt(n+1);if(s>=56320&&s<=57343)t--,n++}return t}function Is(e,t){return Math.min(e.eMarks[t]+1,e.src.length)}function Pi(e,t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return-1;let r=!1;if(e.sCount[t]-e.blkIndent>3)r=!0;if(e.sCount[t]<0)r=!0;if(!r){let s=e.md.block.ruler.getRules("reference"),i=e.parentType;e.parentType="reference";let a=!1;for(let o=0,l=s.length;o<l;o++)if(s[o](e,t,n,!0)){a=!0;break}if(e.parentType=i,a)return-1}return e.bMarks[t]+e.tShift[t]}function M1(e,t,n,r){let s=e.src,i=e.bMarks[t]+e.tShift[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(s.charCodeAt(i)!==91)return!1;let o=Is(e,t),l="",u=-1,d=++i;while(i<o){if(l.length+i-d>vo*2)return!1;let M=s.charCodeAt(i);if(M===91)return!1;if(M===93){u=i;break}if(M===92)M=s.charCodeAt(++i);if(M===10&&i<o){let L=Pi(e,a);if(L<0)return!1;l+=s.slice(d,o),i=d=L,o=Is(e,a++);continue}i++}if(u<0||s.charCodeAt(u+1)!==58)return!1;if(l+=s.slice(d,u),l.length>vo&&R1(l)>vo)return!1;i=u+2;while(i<o){let M=s.charCodeAt(i);if(M===10){let L=Pi(e,a);if(L<0)break;i=L,o=Is(e,a++)}else if(je(M))i++;else break}let f=e.md.helpers.parseLinkDestination(s,i,o);if(!f.ok)return!1;let p=e.md.normalizeLink(f.str);if(!e.md.validateLink(p))return!1;i=f.pos;let g=i,b=o,x=a;while(i<o){let M=s.charCodeAt(i);if(M===10){let L=Pi(e,a);if(L<0)break;i=L,o=Is(e,a++)}else if(je(M))i++;else break}let k=i,A=e.md.helpers.parseLinkTitle(s,i,o);while(A.can_continue){let M=Pi(e,a);if(M<0)break;i=M,o=Is(e,a++),A=e.md.helpers.parseLinkTitle(s,i,o,A)}let T;if(k!==g&&A.ok)T=A.str,i=A.pos;else T="",i=g,o=b,a=x;while(i<o){if(!je(s.charCodeAt(i)))break;i++}if(i<o&&s.charCodeAt(i)!==10){if(T){T="",i=g,o=b,a=x;while(i<o){if(!je(s.charCodeAt(i)))break;i++}}}if(i<o&&s.charCodeAt(i)!==10)return!1;let S=Wi(l);if(!S)return!1;if(r)return!0;if(typeof e.env.references>"u")e.env.references={};if(typeof e.env.references[S]>"u")e.env.references[S]={title:T,href:p};let E=e.push("reference_definition","",0);E.map=[t,a],E.hidden=!0;let D=Object.create(null);return D.label=S,E.meta=D,e.line=a,!0}var D1=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Rc=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,Mc="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";new RegExp(`^(?:${Rc}|${Mc}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`);var Dc=new RegExp(`^(?:${Rc}|${Mc})`),wr=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${D1.join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${Dc.source}\\s*$`),/^$/,!1]];function L1(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(e.src.charCodeAt(s)!==60)return!1;let a=e.src.slice(s,i),o=0;for(;o<wr.length;o++)if(wr[o][0].test(a))break;if(o===wr.length)return!1;if(r)return wr[o][2];let l=t+1,u=wr[o][1].test("");if(!wr[o][1].test(a))for(;l<n;l++){if(e.sCount[l]<e.blkIndent){if(u||!e.isEmpty(l))break}if(s=e.bMarks[l]+e.tShift[l],i=e.eMarks[l],a=e.src.slice(s,i),wr[o][1].test(a)){if(a.length!==0)l++;break}}e.line=l;let d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function I1(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(s);if(a!==35||s>=i)return!1;let o=1;a=e.src.charCodeAt(++s);while(a===35&&s<i&&o<=6)o++,a=e.src.charCodeAt(++s);if(o>6||s<i&&!je(a))return!1;if(r)return!0;i=e.skipSpacesBack(i,s);let l=e.skipCharsBack(i,35,s);if(l>s&&je(e.src.charCodeAt(l-1)))i=l;e.line=t+1;let u=e.push("heading_open",`h${o}`,1);u.markup="########".slice(0,o),u.map=[t,e.line];let d=e.push("inline","",0);d.content=ji(e.src.slice(s,i)),d.map=[t,e.line],d.children=[];let f=e.push("heading_close",`h${o}`,-1);return f.markup="########".slice(0,o),!0}function N1(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.parentType;e.parentType="paragraph";let i=0,a,o=t+1;for(;o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3)continue;if(e.sCount[o]>=e.blkIndent){let g=e.bMarks[o]+e.tShift[o],b=e.eMarks[o];if(g<b){if(a=e.src.charCodeAt(g),a===45||a===61){if(g=e.skipChars(g,a),g=e.skipSpaces(g),g>=b){i=a===61?1:2;break}}}}if(e.sCount[o]<0)continue;let p=!1;for(let g=0,b=r.length;g<b;g++)if(r[g](e,o,n,!0)){p=!0;break}if(p)break}if(!i)return e.parentType=s,!1;let l=ji(e.getLines(t,o,e.blkIndent,!1));e.line=o+1;let u=e.push("heading_open",`h${i}`,1);u.markup=String.fromCharCode(a),u.map=[t,e.line];let d=e.push("inline","",0);d.content=l,d.map=[t,e.line-1],d.children=[];let f=e.push("heading_close",`h${i}`,-1);return f.markup=String.fromCharCode(a),e.parentType=s,!0}function B1(e,t,n){let r=e.md.block.ruler.getRules("paragraph"),s=e.parentType,i=t+1;e.parentType="paragraph";for(;i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3)continue;if(e.sCount[i]<0)continue;let u=!1;for(let d=0,f=r.length;d<f;d++)if(r[d](e,i,n,!0)){u=!0;break}if(u)break}let a=ji(e.getLines(t,i,e.blkIndent,!1));e.line=i;let o=e.push("paragraph_open","p",1);o.map=[t,e.line];let l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}var Ui=[["table",x1,["paragraph","reference"]],["code",E1],["fence",A1,["paragraph","reference","blockquote","list"]],["blockquote",C1,["paragraph","reference","blockquote","list"]],["hr",_1,["paragraph","reference","blockquote","list"]],["list",S1,["paragraph","reference","blockquote"]],["reference",M1],["html_block",L1,["paragraph","reference","blockquote"]],["heading",I1,["paragraph","reference","blockquote"]],["lheading",N1],["paragraph",B1]],Lc=class{constructor(){pe(this,"ruler",new $s),pe(this,"State",Sc);for(let e=0;e<Ui.length;e++)this.ruler.push(Ui[e][0],Ui[e][1],{alt:(Ui[e][2]||[]).slice()})}tokenize(e,t,n){let r=this.ruler.getRules(""),s=r.length,i=e.md.options.maxNesting,a=t,o=!1;while(a<n){if(e.line=a=e.skipEmptyLines(a),a>=n)break;if(e.sCount[a]<e.blkIndent)break;if(e.level>=i){e.line=n;break}let l=e.line,u=!1;for(let d=0;d<s;d++)if(u=r[d](e,a,n,!1),u){if(l>=e.line)throw Error("block rule didn't increment state.line");break}if(!u)throw Error("none of the block rules matched");if(e.tight=!o,e.isEmpty(e.line-1))o=!0;if(a=e.line,a<n&&e.isEmpty(a))o=!0,a++,e.line=a}}parse(e,t,n,r){if(!e)return;let s=new this.State(e,t,n,r);this.tokenize(s,s.line,s.lineMax)}},Ic=class{constructor(e,t,n,r){pe(this,"pos",0),pe(this,"level",0),pe(this,"pending",""),pe(this,"pendingLevel",0),pe(this,"cache",{}),pe(this,"backticks",{}),pe(this,"backticksScanned",!1),pe(this,"skipHtmlSpecial",!1),pe(this,"linkLevel",0),pe(this,"delimiters",[]),pe(this,"_prev_delimiters",[]),pe(this,"Token",kr),this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.posMax=this.src.length}pushPending(){let e=new kr("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}push(e,t,n){if(this.pending)this.pushPending();let r=new kr(e,t,n),s=void 0;if(n<0)this.level--,this.delimiters=this._prev_delimiters.pop();if(r.level=this.level,n>0)this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters};return this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(s),r}scanDelims(e,t){let n=this.posMax,r=this.src.charCodeAt(e),s;if(e===0)s=32;else if(e===1){if(s=this.src.charCodeAt(0),(s&63488)===55296)s=65533}else if(s=this.src.charCodeAt(e-1),(s&64512)===56320){let b=this.src.charCodeAt(e-2);s=(b&64512)===55296?65536+(b-55296<<10)+(s-56320):65533}else if((s&64512)===55296)s=65533;let i=e;while(i<n&&this.src.charCodeAt(i)===r)i++;let a=i-e,o=i<n?this.src.charCodeAt(i):32;if((o&64512)===55296){let b=this.src.charCodeAt(i+1);o=(b&64512)===56320?65536+(o-55296<<10)+(b-56320):65533}else if((o&64512)===56320)o=65533;let l=zs(s)||Os(s),u=zs(o)||Os(o),d=Bs(s),f=Bs(o),p=!f&&(!u||d||l),g=!d&&(!l||f||u);return{can_open:p&&(t||!g||l),can_close:g&&(t||!p||u),length:a}}};function O1(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function z1(e,t){let n=e.pos;while(n<e.posMax&&!O1(e.src.charCodeAt(n)))n++;if(n===e.pos)return!1;if(!t)e.pending+=e.src.slice(e.pos,n);return e.pos=n,!0}function F1(e){return e>=65&&e<=90||e>=97&&e<=122}function $1(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===45||e===46}function q1(e,t){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;let{pos:n,posMax:r}=e;if(n+3>r)return!1;if(e.src.charCodeAt(n)!==58)return!1;if(e.src.charCodeAt(n+1)!==47)return!1;if(e.src.charCodeAt(n+2)!==47)return!1;let s=n-Math.min(10,e.pending.length,n),i=n;while(i>s&&$1(e.src.charCodeAt(i-1)))i--;if(i===n||!F1(e.src.charCodeAt(i)))return!1;let a=n-i,o=e.md.linkify.matchAtStart(e.src.slice(i));if(!o)return!1;let l=o.url;if(l.length<=a)return!1;let u=l.length;while(u>0&&l.charCodeAt(u-1)===42)u--;if(u!==l.length)l=l.slice(0,u);let d=e.md.normalizeLink(l);if(!e.md.validateLink(d))return!1;if(!t){e.pending=e.pending.slice(0,-a);let f=e.push("link_open","a",1);f.attrs=[["href",d]],f.markup="linkify",f.info="auto";let p=e.push("text","",0);p.content=e.md.normalizeLinkText(l);let g=e.push("link_close","a",-1);g.markup="linkify",g.info="auto"}return e.pos+=l.length-a,!0}function H1(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,s=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;while(i>=1&&e.pending.charCodeAt(i-1)===32)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);n++;while(n<s&&je(e.src.charCodeAt(n)))n++;return e.pos=n,!0}var xo=[];for(let e=0;e<256;e++)xo.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){xo[e.charCodeAt(0)]=1});function P1(e,t){let{pos:n,posMax:r}=e;if(e.src.charCodeAt(n)!==92)return!1;if(n++,n>=r)return!1;let s=e.src.charCodeAt(n);if(s===10){if(!t)e.push("hardbreak","br",0);n++;while(n<r){if(s=e.src.charCodeAt(n),!je(s))break;n++}return e.pos=n,!0}if(s===32){if(!t){let o=e.push("text_special","",0);o.content="\\",o.markup="\\",o.info="escape"}return e.pos=n,!0}let i=e.src[n];if(s>=55296&&s<=56319&&n+1<r){let o=e.src.charCodeAt(n+1);if(o>=56320&&o<=57343)i+=e.src[n+1],n++}let a="\\"+i;if(!t){let o=e.push("text_special","",0);if(s<256&&xo[s]!==0)o.content=i;else o.content=a;o.markup=a,o.info="escape"}return e.pos=n+1,!0}function U1(e){let t={},n=0;while((n=e.indexOf("`",n))!==-1){let r=n;while(e.charCodeAt(++n)===96);t[n-r]=r}return t}function W1(e,t){var n;let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;let s=e.posMax,i=r+1;while(i<s&&e.src.charCodeAt(i)===96)i++;let a=e.src.slice(r,i),o=a.length;if(!e.backticksScanned)e.backticks=U1(e.src),e.backticksScanned=!0;if(((n=e.backticks[o])!==null&&n!==void 0?n:-1)>=i){let l=i,u;while((u=e.src.indexOf("`",l))!==-1&&u<s){l=u+1;while(e.src.charCodeAt(l)===96)l++;if(l>s)break;if(l-u===o){if(!t){let d=e.push("code_inline","code",0);d.markup=a;let f=e.src.slice(i,u).replace(/\n/g," ");if(f.startsWith(" ")&&f.endsWith(" ")&&/[^ ]/.test(f))f=f.slice(1,-1);d.content=f}return e.pos=l,!0}}}if(!t)e.pending+=a;return e.pos=i,!0}function j1(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(r!==126)return!1;let s=e.scanDelims(e.pos,!0),i=s.length,a=String.fromCharCode(r);if(i<2)return!1;let o;if(i%2)o=e.push("text","",0),o.content=a,i--;for(let l=0;l<i;l+=2)o=e.push("text","",0),o.content=a+a,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}function gc(e,t){let n,r=[],s=t.length;for(let i=0;i<s;i++){let a=t[i];if(a.marker!==126)continue;if(a.end===-1)continue;let o=t[a.end];if(n=e.tokens[a.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[o.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[o.token-1].type==="text"&&e.tokens[o.token-1].content==="~")r.push(o.token-1)}while(r.length){let i=r.pop(),a=i+1;while(a<e.tokens.length&&e.tokens[a].type==="s_close")a++;if(a--,i!==a)n=e.tokens[a],e.tokens[a]=e.tokens[i],e.tokens[i]=n}}function G1(e){let t=e.tokens_meta,n=e.tokens_meta.length;gc(e,e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)gc(e,i)}}var Nc={tokenize:j1,postProcess:G1};function K1(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(r!==95&&r!==42)return!1;let s=e.scanDelims(e.pos,r===42);for(let i=0;i<s.length;i++){let a=e.push("text","",0);a.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:s.length,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close})}return e.pos+=s.length,!0}function bc(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let s=t[r];if(s.marker!==95&&s.marker!==42)continue;if(s.end===-1)continue;let i=t[s.end],a=r>0&&t[r-1].end===s.end+1&&t[r-1].marker===s.marker&&t[r-1].token===s.token-1&&t[s.end+1].token===i.token+1,o=String.fromCharCode(s.marker),l=e.tokens[s.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?o+o:o,l.content="";let u=e.tokens[i.token];if(u.type=a?"strong_close":"em_close",u.tag=a?"strong":"em",u.nesting=-1,u.markup=a?o+o:o,u.content="",a)e.tokens[t[r-1].token].content="",e.tokens[t[s.end+1].token].content="",r--}}function V1(e){let t=e.tokens_meta,n=e.tokens_meta.length;bc(e,e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)bc(e,i)}}var Bc={tokenize:K1,postProcess:V1};function J1(e,t){let n,r,s,i,a="",o="",l=e.pos,u=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let{pos:d,posMax:f}=e,p=e.pos+1,g=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(g<0)return!1;let b=g+1;if(b<f&&e.src.charCodeAt(b)===40){u=!1,b++;for(;b<f;b++)if(n=e.src.charCodeAt(b),!je(n)&&n!==10)break;if(b>=f)return!1;if(l=b,s=e.md.helpers.parseLinkDestination(e.src,b,e.posMax),s.ok){if(a=e.md.normalizeLink(s.str),e.md.validateLink(a))b=s.pos;else a="";l=b;for(;b<f;b++)if(n=e.src.charCodeAt(b),!je(n)&&n!==10)break;if(s=e.md.helpers.parseLinkTitle(e.src,b,e.posMax),b<f&&l!==b&&s.ok){o=s.str,b=s.pos;for(;b<f;b++)if(n=e.src.charCodeAt(b),!je(n)&&n!==10)break}}if(b>=f||e.src.charCodeAt(b)!==41)u=!0;b++}if(u){if(typeof e.env.references>"u")return!1;if(b<f&&e.src.charCodeAt(b)===91)if(l=b+1,b=e.md.helpers.parseLinkLabel(e,b),b>=0)r=e.src.slice(l,b++);else b=g+1;else b=g+1;if(!r)r=e.src.slice(p,g);if(r=Wi(r),i=e.env.references[r],!i)return e.pos=d,!1;a=i.href,o=i.title}if(!t){e.pos=p,e.posMax=g;let x=e.push("link_open","a",1),k=[["href",a]];if(x.attrs=k,o)k.push(["title",o]);if(r){let A=Object.create(null);A.label=r,x.meta=A}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=b,e.posMax=f,!0}function Z1(e,t){let n,r,s,i,a,o,l,u,d="",{pos:f,posMax:p}=e;if(e.src.charCodeAt(e.pos)!==33)return!1;if(e.src.charCodeAt(e.pos+1)!==91)return!1;let g=e.pos+2,b=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(b<0)return!1;if(i=b+1,i<p&&e.src.charCodeAt(i)===40){i++;for(;i<p;i++)if(n=e.src.charCodeAt(i),!je(n)&&n!==10)break;if(i>=p)return!1;if(u=i,o=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),o.ok)if(d=e.md.normalizeLink(o.str),e.md.validateLink(d))i=o.pos;else d="";u=i;for(;i<p;i++)if(n=e.src.charCodeAt(i),!je(n)&&n!==10)break;if(o=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<p&&u!==i&&o.ok){l=o.str,i=o.pos;for(;i<p;i++)if(n=e.src.charCodeAt(i),!je(n)&&n!==10)break}else l="";if(i>=p||e.src.charCodeAt(i)!==41)return e.pos=f,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<p&&e.src.charCodeAt(i)===91)if(u=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0)s=e.src.slice(u,i++);else i=b+1;else i=b+1;if(!s)s=e.src.slice(g,b);if(s=Wi(s),a=e.env.references[s],!a)return e.pos=f,!1;d=a.href,l=a.title}if(!t){r=e.src.slice(g,b);let x=[];e.md.inline.parse(r,e.md,e.env,x);let k=e.push("image","img",0),A=[["src",d],["alt",""]];if(k.attrs=A,k.children=x,k.content=r,l)A.push(["title",l]);if(s){let T=Object.create(null);T.label=s,k.meta=T}}return e.pos=i,e.posMax=p,!0}var Y1=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,X1=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Q1(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let{pos:r,posMax:s}=e;for(;;){if(++n>=s)return!1;let a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}let i=e.src.slice(r+1,n);if(X1.test(i)){let a=e.md.normalizeLink(i);if(!e.md.validateLink(a))return!1;if(!t){let o=e.push("link_open","a",1);o.attrs=[["href",a]],o.markup="autolink",o.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}if(Y1.test(i)){let a=e.md.normalizeLink(`mailto:${i}`);if(!e.md.validateLink(a))return!1;if(!t){let o=e.push("link_open","a",1);o.attrs=[["href",a]],o.markup="autolink",o.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}return!1}function eg(e){return/^<a[>\s]/i.test(e)}function tg(e){return/^<\/a\s*>/i.test(e)}function Oc(e){let t=e|32;return t>=97&&t<=122}function ng(e,t){let n=e.src,r,s;if(n.startsWith("<!--",t)){if(n.startsWith(">",t+4))return t+5;if(n.startsWith("->",t+4))return t+6;r=t+4,s="-->"}else if(n.startsWith("<![CDATA[",t))r=t+9,s="]]>";else if(n.charCodeAt(t+1)===63)r=t+2,s="?>";else if(Oc(n.charCodeAt(t+2)))r=t+3,s=">";else return-1;if(e.skipHtmlSpecial)return-1;let i=n.indexOf(s,r);if(i<0)return e.skipHtmlSpecial=!0,-1;return i+s.length}function rg(e,t){if(!e.md.options.html)return!1;let{posMax:n,pos:r}=e;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let s,i=e.src.charCodeAt(r+1);if(i===33||i===63)s=ng(e,r);else if(i===47||Oc(i)){let a=e.src.slice(r).match(Dc);s=a?r+a[0].length:-1}else return!1;if(s<0)return!1;if(!t){let a=e.push("html_inline","",0);if(a.content=e.src.slice(r,s),eg(a.content))e.linkLevel++;if(tg(a.content))e.linkLevel--}return e.pos=s,!0}var sg=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,ig=/^&([a-z][a-z0-9]{1,31});/i;function ag(e,t){let{pos:n,posMax:r}=e;if(e.src.charCodeAt(n)!==38)return!1;if(n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let s=e.src.slice(n).match(sg);if(s){if(!t){let i=s[1][0].toLowerCase()==="x"?parseInt(s[1].slice(1),16):parseInt(s[1],10),a=e.push("text_special","",0);a.content=ko(i)?Ns(i):Ns(65533),a.markup=s[0],a.info="entity"}return e.pos+=s[0].length,!0}}else{let s=e.src.slice(n).match(ig);if(s){let i=qi(s[0]);if(i!==s[0]){if(!t){let a=e.push("text_special","",0);a.content=i,a.markup=s[0],a.info="entity"}return e.pos+=s[0].length,!0}}}return!1}function vc(e){let t={},n=e.length;if(!n)return;let r=0,s=-2,i=[];for(let a=0;a<n;a++){let o=e[a];if(i.push(0),e[r].marker!==o.marker||s!==o.token-1)r=a;if(s=o.token,o.length=o.length||0,!o.close)continue;if(!t.hasOwnProperty(o.marker))t[o.marker]=[-1,-1,-1,-1,-1,-1];let l=t[o.marker][(o.open?3:0)+o.length%3],u=r-i[r]-1,d=u;for(;u>l;u-=i[u]+1){let f=e[u];if(f.marker!==o.marker)continue;if(f.open&&f.end<0){let p=!1;if(f.close||o.open){if((f.length+o.length)%3===0){if(f.length%3!==0||o.length%3!==0)p=!0}}if(!p){let g=u>0&&!e[u-1].open?i[u-1]+1:0;i[a]=a-u+g,i[u]=g,o.open=!1,f.end=a,f.close=!1,d=-1,s=-2;break}}}if(d!==-1)t[o.marker][(o.open?3:0)+(o.length||0)%3]=d}}function og(e){let t=e.tokens_meta,n=e.tokens_meta.length;vc(e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)vc(i)}}function lg(e){let t,n,r=0,s=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++){if(s[t].nesting<0)r--;if(s[t].level=r,s[t].nesting>0)r++;if(s[t].type==="text"&&t+1<i&&s[t+1].type==="text")s[t+1].content=s[t].content+s[t+1].content;else{if(t!==n)s[n]=s[t];n++}}if(t!==n)s.length=n}var yo=[["text",z1],["linkify",q1],["newline",H1],["escape",P1],["backticks",W1],["strikethrough",Nc.tokenize],["emphasis",Bc.tokenize],["link",J1],["image",Z1],["autolink",Q1],["html_inline",rg],["entity",ag]],wo=[["balance_pairs",og],["strikethrough",Nc.postProcess],["emphasis",Bc.postProcess],["fragments_join",lg]],zc=class{constructor(){pe(this,"ruler",new $s),pe(this,"ruler2",new $s),pe(this,"State",Ic);for(let e=0;e<yo.length;e++)this.ruler.push(yo[e][0],yo[e][1]);for(let e=0;e<wo.length;e++)this.ruler2.push(wo[e][0],wo[e][1])}skipToken(e){let t=e.pos,n=this.ruler.getRules(""),r=n.length,s=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let a=!1;if(e.level<s){for(let o=0;o<r;o++)if(e.level++,a=n[o](e,!0),e.level--,a){if(t>=e.pos)throw Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;if(!a)e.pos++;i[t]=e.pos}tokenize(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,s=e.md.options.maxNesting;while(e.pos<r){let i=e.pos,a=!1;if(e.level<s){for(let o=0;o<n;o++)if(a=t[o](e,!1),a){if(i>=e.pos)throw Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}if(e.pending)e.pushPending()}parse(e,t,n,r){let s=new this.State(e,t,n,r);this.tokenize(s);let i=this.ruler2.getRules(""),a=i.length;for(let o=0;o<a;o++)i[o](s)}},cg={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},ug=/^(vbscript|javascript|file|data):/,dg=/^data:image\/(gif|png|jpeg|webp);/,yc=["http:","https:","mailto:"],dn=class{validateLink(e){let t=e.trim().toLowerCase();return ug.test(t)?dg.test(t):!0}normalizeLink(e){let t=Ds(e,!0);if(t.hostname){if(!t.protocol||yc.indexOf(t.protocol)>=0)try{t.hostname=po.toASCII(t.hostname)}catch(n){}}if(t.auth)t.auth=Qn(t.auth);if(t.hostname)t.hostname=Qn(t.hostname);if(t.pathname)t.pathname=Qn(t.pathname);if(t.search)t.search=Qn(t.search);if(t.hash)t.hash=Qn(t.hash);return Vr(t)}normalizeLinkText(e){let t=Ds(e,!0);if(t.hostname){if(!t.protocol||yc.indexOf(t.protocol)>=0)try{t.hostname=po.toUnicode(t.hostname)}catch(n){}}return Ms(Vr(t),Ms.defaultChars+"%")}constructor(...e){pe(this,"inline",new zc),pe(this,"block",new Lc),pe(this,"core",new Tc),pe(this,"renderer",new Ac),pe(this,"linkify",new tc),pe(this,"utils",Ip),pe(this,"helpers",Object.assign({},Jp));let[t,n]=e;if(typeof t==="string"){if(this.configure(t),n)this.set(n)}else this.configure("default"),this.set(t||{})}set(e){return Object.assign(this.options,e),this}configure(e){let t;if(typeof e==="string"){let s=e;if(t=cg[s],!t)throw Error(`Wrong 'markdown-it' preset "${s}", check name`)}else t=e;if(!t)throw Error("Wrong `markdown-it` preset, can't be empty");if(t.options)this.options={...t.options};let n=t.components;if(n){var r;["core","block","inline"].forEach((i)=>{var a;let o=(a=n[i])===null||a===void 0?void 0:a.rules;if(o)this[i].ruler.enableOnly(o)});let s=(r=n.inline)===null||r===void 0?void 0:r.rules2;if(s)this.inline.ruler2.enableOnly(s)}return this}enable(e,t=!1){let n=[];if(!Array.isArray(e))e=[e];["core","block","inline"].forEach((s)=>{n=n.concat(this[s].ruler.enable(e,!0))}),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter((s)=>n.indexOf(s)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to enable unknown rule(s): ${r}`);return this}disable(e,t=!1){let n=[];if(!Array.isArray(e))e=[e];["core","block","inline"].forEach((s)=>{n=n.concat(this[s].ruler.disable(e,!0))}),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter((s)=>n.indexOf(s)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to disable unknown rule(s): ${r}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if(typeof e!=="string")throw Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}};pe(dn,"Token",kr);pe(dn,"Ruler",$s);pe(dn,"Renderer",Ac);pe(dn,"ParserCore",Tc);pe(dn,"StateCore",Cc);pe(dn,"ParserBlock",Lc);pe(dn,"StateBlock",Sc);pe(dn,"ParserInline",zc);pe(dn,"StateInline",Ic);var Fc=kc(dn);var T6=String.raw`\$&`,$c=(e)=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;");var Sn=(e,t,n)=>(n?[e[n].ruler]:[e.core.ruler,e.block.ruler,e.inline.ruler]).some((r)=>r.__rules__.some(({name:s})=>s===t)),S6=String.raw`\^$.*+?()[]{}|`;var hg=(e)=>{if(e.length===0)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=32||n===34||n===39||n===47||n===60||n===61||n===62)return!1}return!0},qs=(e)=>{let t="",n=0;for(let r=0;r<e.length;r++){let s="";switch(e.charCodeAt(r)){case 34:s="&quot;";break;case 38:s="&amp;";break;case 60:s="&lt;";break;case 62:s="&gt;"}s&&(t+=e.slice(n,r)+s,n=r+1)}return n===0?e:t+e.slice(n)},Gi=(e,t)=>{if(t){for(let[n,r]of Object.entries(t))if(hg(n))if(n==="class"){let s=String(r).trim();s&&e.attrJoin("class",s)}else e.attrSet(n,r)}},Eo=(e)=>(e??0)>0?`:${e}`:"",qc=(e,t)=>`${typeof e=="string"?`-${e}-`:""}${t+1}`,fg=(e,t)=>`[${e+1}${Eo(t)}]`,mg=(e,t)=>{let{id:n,subId:r}=e[t].meta;return fg(n,r)},pg=(e,t,n,r,s)=>{let{href:i,anchorId:a,anchorClass:o}=e[t].meta,l=s.rules.footnote_caption(e,t,n,r,s);return`<sup${s.renderAttrs(e[t])}><a href="${qs(i)}">${l}</a><a class="${qs(o)}" id="${qs(a)}"></a></sup>`},gg=(e,t,n,r,s)=>{let{separatorClass:i,listClass:a}=e[t].meta;return`<hr class="${qs(i)}"${n.xhtmlOut?" /":""}>
13
+ `};fn.text=function(e,t){return lr(e[t].content)};fn.html_block=function(e,t){return e[t].content};fn.html_inline=function(e,t){return e[t].content};var ru=class{constructor(){ye(this,"rules",Object.assign({},fn))}renderAttrs(e){let t,n,r;if(!e.attrs)return"";r="";for(t=0,n=e.attrs.length;t<n;t++)r+=` ${lr(e.attrs[t][0])}="${lr(String(e.attrs[t][1]))}"`;return r}renderToken(e,t,n){let r=e[t],s="";if(r.hidden)return"";let i=t-1;while(i>=0&&e[i].hidden&&e[i].nesting===0)i--;if(r.block&&r.nesting!==-1&&i>=0&&e[i].hidden&&e[i].nesting===-1)s+=`
14
+ `;if(s+=(r.nesting===-1?"</":"<")+r.tag,s+=this.renderAttrs(r),r.nesting===0&&n.xhtmlOut)s+=" /";let o=!1;if(r.block){if(o=!0,r.nesting===1){let a=t+1;while(a<e.length&&e[a].hidden&&e[a].nesting===0)a++;if(a<e.length){let l=e[a];if(l.type==="inline"||l.hidden)o=!1;else if(l.nesting===-1&&l.tag===r.tag)o=!1}}}return s+=o?`>
15
+ `:">",s}renderInline(e,t,n){let r="",s=this.rules;for(let i=0,o=e.length;i<o;i++){let a=e[i].type;if(typeof s[a]<"u")r+=s[a](e,i,t,n,this);else r+=this.renderToken(e,i,t)}return r}renderInlineAsText(e,t,n){let r="";for(let s=0,i=e.length;s<i;s++)switch(e[s].type){case"text":case"code_inline":r+=e[s].content;break;case"image":r+=this.renderInlineAsText(e[s].children,t,n);break;case"html_inline":case"html_block":r+=e[s].content;break;case"softbreak":case"hardbreak":r+=`
16
+ `}return r}render(e,t,n){let r="",s=this.rules;for(let i=0,o=e.length;i<o;i++){let a=e[i].type;if(a==="inline")r+=this.renderInline(e[i].children,t,n);else if(typeof s[a]<"u")r+=s[a](e,i,t,n,this);else r+=this.renderToken(e,i,t)}return r}},su=class{constructor(e,t,n){ye(this,"tokens",[]),ye(this,"inlineMode",!1),ye(this,"Token",Lr),this.src=e,this.env=n,this.md=t}},J1=/\r\n?/g,Z1=/\0/g;function Y1(e){let t;t=e.src.replace(J1,`
17
+ `),t=t.replace(Z1,"�"),e.src=t}function X1(e){let t;if(e.inlineMode)t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t);else e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Q1(e){let t=e.tokens,n=0;for(let r=0;r<t.length;r++){if(t[r].type==="reference_definition")continue;if(r!==n)t[n]=t[r];n++}if(t.length!==n)t.length=n}function eg(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let s=t[n];if(s.type==="inline")e.md.inline.parse(s.content,e.md,e.env,s.children)}}function tg(e){return/^<a[>\s]/i.test(e)}function ng(e){return/^<\/a\s*>/i.test(e)}function rg(e){let t=e.tokens;if(!e.md.options.linkify)return;for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.test(t[n].content))continue;let s=t[n].children,i=[],o=0;for(let a=s.length-1;a>=0;a--){let l=s[a];if(l.type==="link_close"){a--;while(s[a].level!==l.level&&s[a].type!=="link_open")a--;continue}if(l.type==="html_inline"){if(tg(l.content)&&o>0)o--;if(ng(l.content))o++}if(o>0)continue;if(l.type==="text"&&e.md.linkify.test(l.content)){let u=l.content,d=e.md.linkify.match(u),h=[],p=l.level,g=0;if(d.length>0&&d[0].index===0&&a>0&&s[a-1].type==="text_special")d=d.slice(1);for(let b=0;b<d.length;b++){let x=d[b].url,k=e.md.normalizeLink(x);if(!e.md.validateLink(k))continue;let E=d[b].text;if(!d[b].schema)E=e.md.normalizeLinkText(`http://${E}`).replace(/^http:\/\//,"");else if(d[b].schema==="mailto:"&&!/^mailto:/i.test(E))E=e.md.normalizeLinkText(`mailto:${E}`).replace(/^mailto:/,"");else E=e.md.normalizeLinkText(E);let T=d[b].index;if(T>g){let R=new e.Token("text","",0);R.content=u.slice(g,T),R.level=p,h.push(R)}let _=new e.Token("link_open","a",1);_.attrs=[["href",k]],_.level=p++,_.markup="linkify",_.info="auto",h.push(_);let A=new e.Token("text","",0);A.content=E,A.level=p,h.push(A);let D=new e.Token("link_close","a",-1);D.level=--p,D.markup="linkify",D.info="auto",h.push(D),g=d[b].lastIndex}if(g<u.length){let b=new e.Token("text","",0);b.content=u.slice(g),b.level=p,h.push(b)}i.push({index:a,nodes:h})}}if(i.length>0){let a=s.length;for(let h of i)a+=h.nodes.length-1;let l=Array(a),u=0,d=0;i.reverse();for(let h=0;h<s.length;h++){let p=i[u];if((p===null||p===void 0?void 0:p.index)===h){for(let g of p.nodes)l[d++]=g;u++}else l[d++]=s[h]}t[n].children=l}}}var iu=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,sg=/\((c|tm|r)\)/i,ig=/\((c|tm|r)\)/gi,og={c:"©",r:"®",tm:"™"};function ag(e,t){return og[t.toLowerCase()]}function lg(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type==="text"&&!t)r.content=r.content.replace(ig,ag);if(r.type==="link_open"&&r.info==="auto")t--;if(r.type==="link_close"&&r.info==="auto")t++}}function cg(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type==="text"&&!t){if(iu.test(r.content))r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")}if(r.type==="link_open"&&r.info==="auto")t--;if(r.type==="link_close"&&r.info==="auto")t++}}function ug(e){let t;if(!e.md.options.typographer)return;for(t=e.tokens.length-1;t>=0;t--){if(e.tokens[t].type!=="inline")continue;if(sg.test(e.tokens[t].content))lg(e.tokens[t].children);if(iu.test(e.tokens[t].content))cg(e.tokens[t].children)}}var dg=/['"]/,Uc=/['"]/g,Wc="’",fg=1000;function jc(e,t,n){while(e.length>n){let r=e.pop();if(r.isSingleQuote)t.single=r.prevSameQuoteIdx;else t.double=r.prevSameQuoteIdx}}function to(e,t,n,r){if(!e[t])e[t]=[];e[t].push({pos:n,ch:r})}function hg(e,t){let n="",r=0;t.sort((s,i)=>s.pos-i.pos);for(let s=0;s<t.length;s++){let i=t[s];n+=e.slice(r,i.pos)+i.ch,r=i.pos+1}return n+e.slice(r)}function mg(e,t){let n,r=[],s={single:-1,double:-1},i={};for(let o=0;o<e.length;o++){let a=e[o],l=e[o].level;for(n=r.length-1;n>=0;n--)if(r[n].level<=l)break;if(jc(r,s,n+1),a.type!=="text")continue;let u=a.content,d=0,h=u.length;e:while(d<h){Uc.lastIndex=d;let p=Uc.exec(u);if(!p)break;let g=!0,b=!0;d=p.index+1;let x=p[0]==="'",k=32;if(p.index-1>=0)k=u.charCodeAt(p.index-1);else for(n=o-1;n>=0;n--){if(e[n].type==="softbreak"||e[n].type==="hardbreak")break;if(!e[n].content)continue;k=e[n].content.charCodeAt(e[n].content.length-1);break}let E=32;if(d<h)E=u.charCodeAt(d);else for(n=o+1;n<e.length;n++){if(e[n].type==="softbreak"||e[n].type==="hardbreak")break;if(!e[n].content)continue;E=e[n].content.charCodeAt(0);break}let T=Js(k)||Vs(k),_=Js(E)||Vs(E),A=Ks(k),D=Ks(E);if(D)g=!1;else if(_){if(!(A||T))g=!1}if(A)b=!1;else if(T){if(!(D||_))b=!1}if(E===34&&p[0]==='"'){if(k>=48&&k<=57)b=g=!1}if(g&&b)g=T,b=_;if(!g&&!b){if(x)to(i,o,p.index,Wc);continue}if(b){if(n=x?s.single:s.double,n>=0&&r[n].level===l){let R=r[n],L,B;if(x)L=t.md.options.quotes[2],B=t.md.options.quotes[3];else L=t.md.options.quotes[0],B=t.md.options.quotes[1];to(i,o,p.index,B),to(i,R.tokenIdx,R.contentPos,L),jc(r,s,n);continue e}}if(g){if(r.length>=fg)return;if(r.push({tokenIdx:o,contentPos:p.index,isSingleQuote:x,level:l,prevSameQuoteIdx:x?s.single:s.double}),x)s.single=r.length-1;else s.double=r.length-1}else if(b&&x)to(i,o,p.index,Wc)}}Object.keys(i).forEach(function(o){let a=Number(o);e[a].content=hg(e[a].content,i[o])})}function pg(e){if(!e.md.options.typographer)return;for(let t=e.tokens.length-1;t>=0;t--){if(e.tokens[t].type!=="inline"||!dg.test(e.tokens[t].content))continue;mg(e.tokens[t].children,e)}}function gg(e){let t,n,r=e.length;for(t=0;t<r;t++)if(e[t].type==="text_special")e[t].type="text";for(t=n=0;t<r;t++)if(e[t].type==="text"&&t+1<r&&e[t+1].type==="text")e[t+1].content=e[t].content+e[t+1].content;else{if(t!==n)e[n]=e[t];n++}if(t!==n)e.length=n}function bg(e){let t,n,r=e.tokens,s=r.length;for(let i=0;i<s;i++){if(r[i].type!=="inline")continue;let o=r[i].children,a=o.length;for(t=0;t<a;t++){if(o[t].type==="text_special")o[t].type="text";if(o[t].children)gg(o[t].children)}for(t=n=0;t<a;t++)if(o[t].type==="text"&&t+1<a&&o[t+1].type==="text")o[t+1].content=o[t].content+o[t+1].content;else{if(t!==n)o[n]=o[t];n++}if(t!==n)o.length=n}}var $a=[["normalize",Y1],["block",X1],["strip_references",Q1],["inline",eg],["linkify",rg],["replacements",ug],["smartquotes",pg],["text_join",bg]],ou=class{constructor(){ye(this,"ruler",new Ys),ye(this,"State",su);for(let e=0;e<$a.length;e++)this.ruler.push($a[e][0],$a[e][1])}process(e){let t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)}},au=class{constructor(e,t,n,r){ye(this,"bMarks",[]),ye(this,"eMarks",[]),ye(this,"tShift",[]),ye(this,"sCount",[]),ye(this,"bsCount",[]),ye(this,"blkIndent",0),ye(this,"line",0),ye(this,"lineMax",0),ye(this,"tight",!1),ye(this,"listIndent",-1),ye(this,"parentType","root"),ye(this,"level",0),ye(this,"Token",Lr),this.src=e,this.md=t,this.env=n,this.tokens=r;let s=this.src;for(let i=0,o=0,a=0,l=0,u=s.length,d=!1;o<u;o++){let h=s.charCodeAt(o);if(!d)if(Je(h)){if(a++,h===9)l+=4-l%4;else l++;continue}else d=!0;if(h===10||o===u-1){if(h!==10)o++;this.bMarks.push(i),this.eMarks.push(o),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),d=!1,a=0,l=0,i=o+1}}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){let r=new Lr(e,t,n);if(r.block=!0,n<0)this.level--;if(r.level=this.level,n>0)this.level++;return this.tokens.push(r),r}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t;e++)if(this.bMarks[e]+this.tShift[e]<this.eMarks[e])break;return e}skipSpaces(e){for(let t=this.src.length;e<t;e++)if(!Je(this.src.charCodeAt(e)))break;return e}skipSpacesBack(e,t){if(e<=t)return e;while(e>t)if(!Je(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let n=this.src.length;e<n;e++)if(this.src.charCodeAt(e)!==t)break;return e}skipCharsBack(e,t,n){if(e<=n)return e;while(e>n)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,n,r){if(e>=t)return"";let s=Array(t-e);for(let i=0,o=e;o<t;o++,i++){let a=0,l=this.bMarks[o],u=l,d;if(o+1<t||r)d=this.eMarks[o]+1;else d=this.eMarks[o];while(u<d&&a<n){let h=this.src.charCodeAt(u);if(Je(h))if(h===9)a+=4-(a+this.bsCount[o])%4;else a++;else if(u-l<this.tShift[o])a++;else break;u++}if(a>n)s[i]=Array(a-n+1).join(" ")+this.src.slice(u,d);else s[i]=this.src.slice(u,d)}return s.join("")}},vg=65536;function za(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Gc(e){let t=[],n=e.length,r=0,s=e.charCodeAt(r),i=!1,o=0,a="";while(r<n){if(s===124)if(!i)t.push(a+e.substring(o,r)),a="",o=r+1;else a+=e.substring(o,r-1),o=r;i=s===92,r++,s=e.charCodeAt(r)}return t.push(a+e.substring(o)),t}function yg(e,t,n,r){if(t+2>n)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent)return!1;if(e.sCount[s]-e.blkIndent>=4)return!1;let i=e.bMarks[s]+e.tShift[s];if(i>=e.eMarks[s])return!1;let o=e.src.charCodeAt(i++);if(o!==124&&o!==45&&o!==58)return!1;if(i>=e.eMarks[s])return!1;let a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!Je(a))return!1;if(o===45&&Je(a))return!1;while(i<e.eMarks[s]){let A=e.src.charCodeAt(i);if(A!==124&&A!==45&&A!==58&&!Je(A))return!1;i++}let l=za(e,t+1),u=l.split("|"),d=[];for(let A=0;A<u.length;A++){let D=u[A].trim();if(!D)if(A===0||A===u.length-1)continue;else return!1;if(!/^:?-+:?$/.test(D))return!1;if(D.charCodeAt(D.length-1)===58)d.push(D.charCodeAt(0)===58?"center":"right");else if(D.charCodeAt(0)===58)d.push("left");else d.push("")}if(l=za(e,t).trim(),l.indexOf("|")===-1)return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(u=Gc(l),u.length&&u[0]==="")u.shift();if(u.length&&u[u.length-1]==="")u.pop();let h=u.length;if(h===0||h!==d.length)return!1;if(r)return!0;let p=e.parentType;e.parentType="table";let g=e.md.block.ruler.getRules("blockquote"),b=e.push("table_open","table",1),x=[t,0];b.map=x;let k=e.push("thead_open","thead",1);k.map=[t,t+1];let E=e.push("tr_open","tr",1);E.map=[t,t+1];for(let A=0;A<u.length;A++){let D=e.push("th_open","th",1);if(d[A])D.attrs=[["style",`text-align:${d[A]}`]];let R=e.push("inline","",0);R.content=u[A].trim(),R.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let T,_=0;for(s=t+2;s<n;s++){if(e.sCount[s]<e.blkIndent)break;let A=!1;for(let R=0,L=g.length;R<L;R++)if(g[R](e,s,n,!0)){A=!0;break}if(A)break;if(l=za(e,s).trim(),!l)break;if(e.sCount[s]-e.blkIndent>=4)break;if(u=Gc(l),u.length&&u[0]==="")u.shift();if(u.length&&u[u.length-1]==="")u.pop();if(_+=h-u.length,_>vg)break;if(s===t+2){let R=e.push("tbody_open","tbody",1);R.map=T=[t+2,0]}let D=e.push("tr_open","tr",1);D.map=[s,s+1];for(let R=0;R<h;R++){let L=e.push("td_open","td",1);if(d[R])L.attrs=[["style",`text-align:${d[R]}`]];let B=e.push("inline","",0);B.content=u[R]?u[R].trim():"",B.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}if(T)e.push("tbody_close","tbody",-1),T[1]=s;return e.push("table_close","table",-1),x[1]=s,e.parentType=p,e.line=s,!0}function kg(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,s=r;while(r<n){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,s=r;continue}break}e.line=s;let i=e.push("code_block","code",0);return i.content=e.getLines(t,s,4+e.blkIndent,!1)+`
18
+ `,i.map=[t,e.line],!0}function wg(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(s+3>i)return!1;let o=e.src.charCodeAt(s);if(o!==126&&o!==96)return!1;let a=s;s=e.skipChars(s,o);let l=s-a;if(l<3)return!1;let u=e.src.slice(a,s),d=e.src.slice(s,i);if(o===96){if(d.indexOf(String.fromCharCode(o))>=0)return!1}if(r)return!0;let h=t,p=!1;for(;;){if(h++,h>=n)break;if(s=a=e.bMarks[h]+e.tShift[h],i=e.eMarks[h],s<i&&e.sCount[h]<e.blkIndent)break;if(e.src.charCodeAt(s)!==o)continue;if(e.sCount[h]-e.blkIndent>=4)continue;if(s=e.skipChars(s,o),s-a<l)continue;if(s=e.skipSpaces(s),s<i)continue;p=!0;break}l=e.sCount[t],e.line=h+(p?1:0);let g=e.push("fence","code",0);return g.info=d,g.content=e.getLines(t+1,h,l,!0),g.markup=u,g.map=[t,e.line],!0}function xg(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.src.charCodeAt(s)!==62)return!1;if(r)return!0;let a=[],l=[],u=[],d=[],h=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";let g=!1,b;for(b=t;b<n;b++){let _=e.sCount[b]<e.blkIndent;if(s=e.bMarks[b]+e.tShift[b],i=e.eMarks[b],s>=i)break;if(e.src.charCodeAt(s++)===62&&!_){let D=e.sCount[b]+1,R,L;if(e.src.charCodeAt(s)===32)s++,D++,L=!1,R=!0;else if(e.src.charCodeAt(s)===9)if(R=!0,(e.bsCount[b]+D)%4===3)s++,D++,L=!1;else L=!0;else R=!1;let B=D;a.push(e.bMarks[b]),e.bMarks[b]=s;while(s<i){let O=e.src.charCodeAt(s);if(Je(O))if(O===9)B+=4-(B+e.bsCount[b]+(L?1:0))%4;else B++;else break;s++}g=s>=i,l.push(e.bsCount[b]),e.bsCount[b]=e.sCount[b]+1+(R?1:0),u.push(e.sCount[b]),e.sCount[b]=B-D,d.push(e.tShift[b]),e.tShift[b]=s-e.bMarks[b];continue}if(g)break;let A=!1;for(let D=0,R=h.length;D<R;D++)if(h[D](e,b,n,!0)){A=!0;break}if(A){if(e.lineMax=b,e.blkIndent!==0)a.push(e.bMarks[b]),l.push(e.bsCount[b]),d.push(e.tShift[b]),u.push(e.sCount[b]),e.sCount[b]-=e.blkIndent;break}a.push(e.bMarks[b]),l.push(e.bsCount[b]),d.push(e.tShift[b]),u.push(e.sCount[b]),e.sCount[b]=-1}let x=e.blkIndent;e.blkIndent=0;let k=e.push("blockquote_open","blockquote",1);k.markup=">";let E=[t,0];k.map=E,e.md.block.tokenize(e,t,b);let T=e.push("blockquote_close","blockquote",-1);T.markup=">",e.lineMax=o,e.parentType=p,E[1]=e.line;for(let _=0;_<d.length;_++)e.bMarks[_+t]=a[_],e.tShift[_+t]=d[_],e.sCount[_+t]=u[_],e.bsCount[_+t]=l[_];return e.blkIndent=x,!0}function Eg(e,t,n,r){let s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(i++);if(o!==42&&o!==45&&o!==95)return!1;let a=1;while(i<s){let u=e.src.charCodeAt(i++);if(u!==o&&!Je(u))return!1;if(u===o)a++}if(a<3)return!1;if(r)return!0;e.line=t+1;let l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(o)),!0}function Kc(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(r++);if(s!==42&&s!==45&&s!==43)return-1;if(r<n){if(!Je(e.src.charCodeAt(r)))return-1}return r}function Vc(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],s=n;if(s+1>=r)return-1;let i=e.src.charCodeAt(s++);if(i<48||i>57)return-1;for(;;){if(s>=r)return-1;if(i=e.src.charCodeAt(s++),i>=48&&i<=57){if(s-n>=10)return-1;continue}if(i===41||i===46)break;return-1}if(s<r){if(i=e.src.charCodeAt(s),!Je(i))return-1}return s}function Ag(e,t){let n=e.level+2;for(let r=t+2,s=e.tokens.length-2;r<s;r++)if(e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open")e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2}function Cg(e,t,n,r){let s,i,o,a,l=t,u=!0;if(e.sCount[l]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let d=!1;if(r&&e.parentType==="paragraph"){if(e.sCount[l]>=e.blkIndent)d=!0}let h,p,g;if((g=Vc(e,l))>=0){if(h=!0,o=e.bMarks[l]+e.tShift[l],p=Number(e.src.slice(o,g-1)),d&&p!==1)return!1}else if((g=Kc(e,l))>=0)h=!1;else return!1;if(d){if(e.skipSpaces(g)>=e.eMarks[l])return!1}if(r)return!0;let b=e.src.charCodeAt(g-1),x=e.tokens.length;if(h){if(a=e.push("ordered_list_open","ol",1),p!==1)a.attrs=[["start",p]]}else a=e.push("bullet_list_open","ul",1);let k=[l,0];a.map=k,a.markup=String.fromCharCode(b);let E=!1,T=e.md.block.ruler.getRules("list"),_=e.parentType;e.parentType="list";while(l<n){i=g,s=e.eMarks[l];let A=e.sCount[l]+g-(e.bMarks[l]+e.tShift[l]),D=A;while(i<s){let ae=e.src.charCodeAt(i);if(ae===9)D+=4-(D+e.bsCount[l])%4;else if(ae===32)D++;else break;i++}let R=i,L;if(R>=s)L=1;else L=D-A;if(L>4)L=1;let B=A+L;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(b);let O=[l,0];if(a.map=O,h)a.info=e.src.slice(o,g-1);let H=e.tight,K=e.tShift[l],G=e.sCount[l],de=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=B,e.tight=!0,e.tShift[l]=R-e.bMarks[l],e.sCount[l]=D,R>=s&&e.isEmpty(l+1))e.line=Math.min(e.line+2,n);else e.md.block.tokenize(e,l,n);if(!e.tight||E)u=!1;if(E=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=de,e.tShift[l]=K,e.sCount[l]=G,e.tight=H,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(b),l=e.line,O[1]=l,l>=n)break;if(e.sCount[l]<e.blkIndent)break;if(e.sCount[l]-e.blkIndent>=4)break;let ne=!1;for(let ae=0,z=T.length;ae<z;ae++)if(T[ae](e,l,n,!0)){ne=!0;break}if(ne)break;if(h){if(g=Vc(e,l),g<0)break;o=e.bMarks[l]+e.tShift[l]}else if(g=Kc(e,l),g<0)break;if(b!==e.src.charCodeAt(g-1))break}if(h)a=e.push("ordered_list_close","ol",-1);else a=e.push("bullet_list_close","ul",-1);if(a.markup=String.fromCharCode(b),k[1]=l,e.line=l,e.parentType=_,u)Ag(e,x);return!0}var Fa=999;function _g(e){let t=e.length;for(let n=0;n<e.length-1;n++){let r=e.charCodeAt(n);if(r<55296||r>56319)continue;let s=e.charCodeAt(n+1);if(s>=56320&&s<=57343)t--,n++}return t}function js(e,t){return Math.min(e.eMarks[t]+1,e.src.length)}function no(e,t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return-1;let r=!1;if(e.sCount[t]-e.blkIndent>3)r=!0;if(e.sCount[t]<0)r=!0;if(!r){let s=e.md.block.ruler.getRules("reference"),i=e.parentType;e.parentType="reference";let o=!1;for(let a=0,l=s.length;a<l;a++)if(s[a](e,t,n,!0)){o=!0;break}if(e.parentType=i,o)return-1}return e.bMarks[t]+e.tShift[t]}function Sg(e,t,n,r){let s=e.src,i=e.bMarks[t]+e.tShift[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(s.charCodeAt(i)!==91)return!1;let a=js(e,t),l="",u=-1,d=++i;while(i<a){if(l.length+i-d>Fa*2)return!1;let R=s.charCodeAt(i);if(R===91)return!1;if(R===93){u=i;break}if(R===92)R=s.charCodeAt(++i);if(R===10&&i<a){let L=no(e,o);if(L<0)return!1;l+=s.slice(d,a),i=d=L,a=js(e,o++);continue}i++}if(u<0||s.charCodeAt(u+1)!==58)return!1;if(l+=s.slice(d,u),l.length>Fa&&_g(l)>Fa)return!1;i=u+2;while(i<a){let R=s.charCodeAt(i);if(R===10){let L=no(e,o);if(L<0)break;i=L,a=js(e,o++)}else if(Je(R))i++;else break}let h=e.md.helpers.parseLinkDestination(s,i,a);if(!h.ok)return!1;let p=e.md.normalizeLink(h.str);if(!e.md.validateLink(p))return!1;i=h.pos;let g=i,b=a,x=o;while(i<a){let R=s.charCodeAt(i);if(R===10){let L=no(e,o);if(L<0)break;i=L,a=js(e,o++)}else if(Je(R))i++;else break}let k=i,E=e.md.helpers.parseLinkTitle(s,i,a);while(E.can_continue){let R=no(e,o);if(R<0)break;i=R,a=js(e,o++),E=e.md.helpers.parseLinkTitle(s,i,a,E)}let T;if(k!==g&&E.ok)T=E.str,i=E.pos;else T="",i=g,a=b,o=x;while(i<a){if(!Je(s.charCodeAt(i)))break;i++}if(i<a&&s.charCodeAt(i)!==10){if(T){T="",i=g,a=b,o=x;while(i<a){if(!Je(s.charCodeAt(i)))break;i++}}}if(i<a&&s.charCodeAt(i)!==10)return!1;let _=so(l);if(!_)return!1;if(r)return!0;if(typeof e.env.references>"u")e.env.references={};if(typeof e.env.references[_]>"u")e.env.references[_]={title:T,href:p};let A=e.push("reference_definition","",0);A.map=[t,o],A.hidden=!0;let D=Object.create(null);return D.label=_,A.meta=D,e.line=o,!0}var Tg=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],lu=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,cu="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";new RegExp(`^(?:${lu}|${cu}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`);var uu=new RegExp(`^(?:${lu}|${cu})`),Dr=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${Tg.join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${uu.source}\\s*$`),/^$/,!1]];function Rg(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(e.src.charCodeAt(s)!==60)return!1;let o=e.src.slice(s,i),a=0;for(;a<Dr.length;a++)if(Dr[a][0].test(o))break;if(a===Dr.length)return!1;if(r)return Dr[a][2];let l=t+1,u=Dr[a][1].test("");if(!Dr[a][1].test(o))for(;l<n;l++){if(e.sCount[l]<e.blkIndent){if(u||!e.isEmpty(l))break}if(s=e.bMarks[l]+e.tShift[l],i=e.eMarks[l],o=e.src.slice(s,i),Dr[a][1].test(o)){if(o.length!==0)l++;break}}e.line=l;let d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function Mg(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(s);if(o!==35||s>=i)return!1;let a=1;o=e.src.charCodeAt(++s);while(o===35&&s<i&&a<=6)a++,o=e.src.charCodeAt(++s);if(a>6||s<i&&!Je(o))return!1;if(r)return!0;i=e.skipSpacesBack(i,s);let l=e.skipCharsBack(i,35,s);if(l>s&&Je(e.src.charCodeAt(l-1)))i=l;e.line=t+1;let u=e.push("heading_open",`h${a}`,1);u.markup="########".slice(0,a),u.map=[t,e.line];let d=e.push("inline","",0);d.content=io(e.src.slice(s,i)),d.map=[t,e.line],d.children=[];let h=e.push("heading_close",`h${a}`,-1);return h.markup="########".slice(0,a),!0}function Dg(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.parentType;e.parentType="paragraph";let i=0,o,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let g=e.bMarks[a]+e.tShift[a],b=e.eMarks[a];if(g<b){if(o=e.src.charCodeAt(g),o===45||o===61){if(g=e.skipChars(g,o),g=e.skipSpaces(g),g>=b){i=o===61?1:2;break}}}}if(e.sCount[a]<0)continue;let p=!1;for(let g=0,b=r.length;g<b;g++)if(r[g](e,a,n,!0)){p=!0;break}if(p)break}if(!i)return e.parentType=s,!1;let l=io(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;let u=e.push("heading_open",`h${i}`,1);u.markup=String.fromCharCode(o),u.map=[t,e.line];let d=e.push("inline","",0);d.content=l,d.map=[t,e.line-1],d.children=[];let h=e.push("heading_close",`h${i}`,-1);return h.markup=String.fromCharCode(o),e.parentType=s,!0}function Lg(e,t,n){let r=e.md.block.ruler.getRules("paragraph"),s=e.parentType,i=t+1;e.parentType="paragraph";for(;i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3)continue;if(e.sCount[i]<0)continue;let u=!1;for(let d=0,h=r.length;d<h;d++)if(r[d](e,i,n,!0)){u=!0;break}if(u)break}let o=io(e.getLines(t,i,e.blkIndent,!1));e.line=i;let a=e.push("paragraph_open","p",1);a.map=[t,e.line];let l=e.push("inline","",0);return l.content=o,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}var ro=[["table",yg,["paragraph","reference"]],["code",kg],["fence",wg,["paragraph","reference","blockquote","list"]],["blockquote",xg,["paragraph","reference","blockquote","list"]],["hr",Eg,["paragraph","reference","blockquote","list"]],["list",Cg,["paragraph","reference","blockquote"]],["reference",Sg],["html_block",Rg,["paragraph","reference","blockquote"]],["heading",Mg,["paragraph","reference","blockquote"]],["lheading",Dg],["paragraph",Lg]],du=class{constructor(){ye(this,"ruler",new Ys),ye(this,"State",au);for(let e=0;e<ro.length;e++)this.ruler.push(ro[e][0],ro[e][1],{alt:(ro[e][2]||[]).slice()})}tokenize(e,t,n){let r=this.ruler.getRules(""),s=r.length,i=e.md.options.maxNesting,o=t,a=!1;while(o<n){if(e.line=o=e.skipEmptyLines(o),o>=n)break;if(e.sCount[o]<e.blkIndent)break;if(e.level>=i){e.line=n;break}let l=e.line,u=!1;for(let d=0;d<s;d++)if(u=r[d](e,o,n,!1),u){if(l>=e.line)throw Error("block rule didn't increment state.line");break}if(!u)throw Error("none of the block rules matched");if(e.tight=!a,e.isEmpty(e.line-1))a=!0;if(o=e.line,o<n&&e.isEmpty(o))a=!0,o++,e.line=o}}parse(e,t,n,r){if(!e)return;let s=new this.State(e,t,n,r);this.tokenize(s,s.line,s.lineMax)}},fu=class{constructor(e,t,n,r){ye(this,"pos",0),ye(this,"level",0),ye(this,"pending",""),ye(this,"pendingLevel",0),ye(this,"cache",{}),ye(this,"backticks",{}),ye(this,"backticksScanned",!1),ye(this,"skipHtmlSpecial",!1),ye(this,"linkLevel",0),ye(this,"delimiters",[]),ye(this,"_prev_delimiters",[]),ye(this,"Token",Lr),this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.posMax=this.src.length}pushPending(){let e=new Lr("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}push(e,t,n){if(this.pending)this.pushPending();let r=new Lr(e,t,n),s=void 0;if(n<0)this.level--,this.delimiters=this._prev_delimiters.pop();if(r.level=this.level,n>0)this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters};return this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(s),r}scanDelims(e,t){let n=this.posMax,r=this.src.charCodeAt(e),s;if(e===0)s=32;else if(e===1){if(s=this.src.charCodeAt(0),(s&63488)===55296)s=65533}else if(s=this.src.charCodeAt(e-1),(s&64512)===56320){let b=this.src.charCodeAt(e-2);s=(b&64512)===55296?65536+(b-55296<<10)+(s-56320):65533}else if((s&64512)===55296)s=65533;let i=e;while(i<n&&this.src.charCodeAt(i)===r)i++;let o=i-e,a=i<n?this.src.charCodeAt(i):32;if((a&64512)===55296){let b=this.src.charCodeAt(i+1);a=(b&64512)===56320?65536+(a-55296<<10)+(b-56320):65533}else if((a&64512)===56320)a=65533;let l=Js(s)||Vs(s),u=Js(a)||Vs(a),d=Ks(s),h=Ks(a),p=!h&&(!u||d||l),g=!d&&(!l||h||u);return{can_open:p&&(t||!g||l),can_close:g&&(t||!p||u),length:o}}};function Ig(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Ng(e,t){let n=e.pos;while(n<e.posMax&&!Ig(e.src.charCodeAt(n)))n++;if(n===e.pos)return!1;if(!t)e.pending+=e.src.slice(e.pos,n);return e.pos=n,!0}function Bg(e){return e>=65&&e<=90||e>=97&&e<=122}function Og(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===45||e===46}function $g(e,t){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;let{pos:n,posMax:r}=e;if(n+3>r)return!1;if(e.src.charCodeAt(n)!==58)return!1;if(e.src.charCodeAt(n+1)!==47)return!1;if(e.src.charCodeAt(n+2)!==47)return!1;let s=n-Math.min(10,e.pending.length,n),i=n;while(i>s&&Og(e.src.charCodeAt(i-1)))i--;if(i===n||!Bg(e.src.charCodeAt(i)))return!1;let o=n-i,a=e.md.linkify.matchAtStart(e.src.slice(i));if(!a)return!1;let l=a.url;if(l.length<=o)return!1;let u=l.length;while(u>0&&l.charCodeAt(u-1)===42)u--;if(u!==l.length)l=l.slice(0,u);let d=e.md.normalizeLink(l);if(!e.md.validateLink(d))return!1;if(!t){e.pending=e.pending.slice(0,-o);let h=e.push("link_open","a",1);h.attrs=[["href",d]],h.markup="linkify",h.info="auto";let p=e.push("text","",0);p.content=e.md.normalizeLinkText(l);let g=e.push("link_close","a",-1);g.markup="linkify",g.info="auto"}return e.pos+=l.length-o,!0}function zg(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,s=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;while(i>=1&&e.pending.charCodeAt(i-1)===32)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);n++;while(n<s&&Je(e.src.charCodeAt(n)))n++;return e.pos=n,!0}var Ua=[];for(let e=0;e<256;e++)Ua.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Ua[e.charCodeAt(0)]=1});function Fg(e,t){let{pos:n,posMax:r}=e;if(e.src.charCodeAt(n)!==92)return!1;if(n++,n>=r)return!1;let s=e.src.charCodeAt(n);if(s===10){if(!t)e.push("hardbreak","br",0);n++;while(n<r){if(s=e.src.charCodeAt(n),!Je(s))break;n++}return e.pos=n,!0}if(s===32){if(!t){let a=e.push("text_special","",0);a.content="\\",a.markup="\\",a.info="escape"}return e.pos=n,!0}let i=e.src[n];if(s>=55296&&s<=56319&&n+1<r){let a=e.src.charCodeAt(n+1);if(a>=56320&&a<=57343)i+=e.src[n+1],n++}let o="\\"+i;if(!t){let a=e.push("text_special","",0);if(s<256&&Ua[s]!==0)a.content=i;else a.content=o;a.markup=o,a.info="escape"}return e.pos=n+1,!0}function qg(e){let t={},n=0;while((n=e.indexOf("`",n))!==-1){let r=n;while(e.charCodeAt(++n)===96);t[n-r]=r}return t}function Hg(e,t){var n;let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;let s=e.posMax,i=r+1;while(i<s&&e.src.charCodeAt(i)===96)i++;let o=e.src.slice(r,i),a=o.length;if(!e.backticksScanned)e.backticks=qg(e.src),e.backticksScanned=!0;if(((n=e.backticks[a])!==null&&n!==void 0?n:-1)>=i){let l=i,u;while((u=e.src.indexOf("`",l))!==-1&&u<s){l=u+1;while(e.src.charCodeAt(l)===96)l++;if(l>s)break;if(l-u===a){if(!t){let d=e.push("code_inline","code",0);d.markup=o;let h=e.src.slice(i,u).replace(/\n/g," ");if(h.startsWith(" ")&&h.endsWith(" ")&&/[^ ]/.test(h))h=h.slice(1,-1);d.content=h}return e.pos=l,!0}}}if(!t)e.pending+=o;return e.pos=i,!0}function Pg(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(r!==126)return!1;let s=e.scanDelims(e.pos,!0),i=s.length,o=String.fromCharCode(r);if(i<2)return!1;let a;if(i%2)a=e.push("text","",0),a.content=o,i--;for(let l=0;l<i;l+=2)a=e.push("text","",0),a.content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}function Jc(e,t){let n,r=[],s=t.length;for(let i=0;i<s;i++){let o=t[i];if(o.marker!==126)continue;if(o.end===-1)continue;let a=t[o.end];if(n=e.tokens[o.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~")r.push(a.token-1)}while(r.length){let i=r.pop(),o=i+1;while(o<e.tokens.length&&e.tokens[o].type==="s_close")o++;if(o--,i!==o)n=e.tokens[o],e.tokens[o]=e.tokens[i],e.tokens[i]=n}}function Ug(e){let t=e.tokens_meta,n=e.tokens_meta.length;Jc(e,e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)Jc(e,i)}}var hu={tokenize:Pg,postProcess:Ug};function Wg(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(r!==95&&r!==42)return!1;let s=e.scanDelims(e.pos,r===42);for(let i=0;i<s.length;i++){let o=e.push("text","",0);o.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:s.length,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close})}return e.pos+=s.length,!0}function Zc(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let s=t[r];if(s.marker!==95&&s.marker!==42)continue;if(s.end===-1)continue;let i=t[s.end],o=r>0&&t[r-1].end===s.end+1&&t[r-1].marker===s.marker&&t[r-1].token===s.token-1&&t[s.end+1].token===i.token+1,a=String.fromCharCode(s.marker),l=e.tokens[s.token];l.type=o?"strong_open":"em_open",l.tag=o?"strong":"em",l.nesting=1,l.markup=o?a+a:a,l.content="";let u=e.tokens[i.token];if(u.type=o?"strong_close":"em_close",u.tag=o?"strong":"em",u.nesting=-1,u.markup=o?a+a:a,u.content="",o)e.tokens[t[r-1].token].content="",e.tokens[t[s.end+1].token].content="",r--}}function jg(e){let t=e.tokens_meta,n=e.tokens_meta.length;Zc(e,e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)Zc(e,i)}}var mu={tokenize:Wg,postProcess:jg};function Gg(e,t){let n,r,s,i,o="",a="",l=e.pos,u=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let{pos:d,posMax:h}=e,p=e.pos+1,g=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(g<0)return!1;let b=g+1;if(b<h&&e.src.charCodeAt(b)===40){u=!1,b++;for(;b<h;b++)if(n=e.src.charCodeAt(b),!Je(n)&&n!==10)break;if(b>=h)return!1;if(l=b,s=e.md.helpers.parseLinkDestination(e.src,b,e.posMax),s.ok){if(o=e.md.normalizeLink(s.str),e.md.validateLink(o))b=s.pos;else o="";l=b;for(;b<h;b++)if(n=e.src.charCodeAt(b),!Je(n)&&n!==10)break;if(s=e.md.helpers.parseLinkTitle(e.src,b,e.posMax),b<h&&l!==b&&s.ok){a=s.str,b=s.pos;for(;b<h;b++)if(n=e.src.charCodeAt(b),!Je(n)&&n!==10)break}}if(b>=h||e.src.charCodeAt(b)!==41)u=!0;b++}if(u){if(typeof e.env.references>"u")return!1;if(b<h&&e.src.charCodeAt(b)===91)if(l=b+1,b=e.md.helpers.parseLinkLabel(e,b),b>=0)r=e.src.slice(l,b++);else b=g+1;else b=g+1;if(!r)r=e.src.slice(p,g);if(r=so(r),i=e.env.references[r],!i)return e.pos=d,!1;o=i.href,a=i.title}if(!t){e.pos=p,e.posMax=g;let x=e.push("link_open","a",1),k=[["href",o]];if(x.attrs=k,a)k.push(["title",a]);if(r){let E=Object.create(null);E.label=r,x.meta=E}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=b,e.posMax=h,!0}function Kg(e,t){let n,r,s,i,o,a,l,u,d="",{pos:h,posMax:p}=e;if(e.src.charCodeAt(e.pos)!==33)return!1;if(e.src.charCodeAt(e.pos+1)!==91)return!1;let g=e.pos+2,b=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(b<0)return!1;if(i=b+1,i<p&&e.src.charCodeAt(i)===40){i++;for(;i<p;i++)if(n=e.src.charCodeAt(i),!Je(n)&&n!==10)break;if(i>=p)return!1;if(u=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok)if(d=e.md.normalizeLink(a.str),e.md.validateLink(d))i=a.pos;else d="";u=i;for(;i<p;i++)if(n=e.src.charCodeAt(i),!Je(n)&&n!==10)break;if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<p&&u!==i&&a.ok){l=a.str,i=a.pos;for(;i<p;i++)if(n=e.src.charCodeAt(i),!Je(n)&&n!==10)break}else l="";if(i>=p||e.src.charCodeAt(i)!==41)return e.pos=h,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<p&&e.src.charCodeAt(i)===91)if(u=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0)s=e.src.slice(u,i++);else i=b+1;else i=b+1;if(!s)s=e.src.slice(g,b);if(s=so(s),o=e.env.references[s],!o)return e.pos=h,!1;d=o.href,l=o.title}if(!t){r=e.src.slice(g,b);let x=[];e.md.inline.parse(r,e.md,e.env,x);let k=e.push("image","img",0),E=[["src",d],["alt",""]];if(k.attrs=E,k.children=x,k.content=r,l)E.push(["title",l]);if(s){let T=Object.create(null);T.label=s,k.meta=T}}return e.pos=i,e.posMax=p,!0}var Vg=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Jg=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Zg(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let{pos:r,posMax:s}=e;for(;;){if(++n>=s)return!1;let o=e.src.charCodeAt(n);if(o===60)return!1;if(o===62)break}let i=e.src.slice(r+1,n);if(Jg.test(i)){let o=e.md.normalizeLink(i);if(!e.md.validateLink(o))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}if(Vg.test(i)){let o=e.md.normalizeLink(`mailto:${i}`);if(!e.md.validateLink(o))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}return!1}function Yg(e){return/^<a[>\s]/i.test(e)}function Xg(e){return/^<\/a\s*>/i.test(e)}function pu(e){let t=e|32;return t>=97&&t<=122}function Qg(e,t){let n=e.src,r,s;if(n.startsWith("<!--",t)){if(n.startsWith(">",t+4))return t+5;if(n.startsWith("->",t+4))return t+6;r=t+4,s="-->"}else if(n.startsWith("<![CDATA[",t))r=t+9,s="]]>";else if(n.charCodeAt(t+1)===63)r=t+2,s="?>";else if(pu(n.charCodeAt(t+2)))r=t+3,s=">";else return-1;if(e.skipHtmlSpecial)return-1;let i=n.indexOf(s,r);if(i<0)return e.skipHtmlSpecial=!0,-1;return i+s.length}function e4(e,t){if(!e.md.options.html)return!1;let{posMax:n,pos:r}=e;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let s,i=e.src.charCodeAt(r+1);if(i===33||i===63)s=Qg(e,r);else if(i===47||pu(i)){let o=e.src.slice(r).match(uu);s=o?r+o[0].length:-1}else return!1;if(s<0)return!1;if(!t){let o=e.push("html_inline","",0);if(o.content=e.src.slice(r,s),Yg(o.content))e.linkLevel++;if(Xg(o.content))e.linkLevel--}return e.pos=s,!0}var t4=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,n4=/^&([a-z][a-z0-9]{1,31});/i;function r4(e,t){let{pos:n,posMax:r}=e;if(e.src.charCodeAt(n)!==38)return!1;if(n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let s=e.src.slice(n).match(t4);if(s){if(!t){let i=s[1][0].toLowerCase()==="x"?parseInt(s[1].slice(1),16):parseInt(s[1],10),o=e.push("text_special","",0);o.content=Pa(i)?Gs(i):Gs(65533),o.markup=s[0],o.info="entity"}return e.pos+=s[0].length,!0}}else{let s=e.src.slice(n).match(n4);if(s){let i=eo(s[0]);if(i!==s[0]){if(!t){let o=e.push("text_special","",0);o.content=i,o.markup=s[0],o.info="entity"}return e.pos+=s[0].length,!0}}}return!1}function Yc(e){let t={},n=e.length;if(!n)return;let r=0,s=-2,i=[];for(let o=0;o<n;o++){let a=e[o];if(i.push(0),e[r].marker!==a.marker||s!==a.token-1)r=o;if(s=a.token,a.length=a.length||0,!a.close)continue;if(!t.hasOwnProperty(a.marker))t[a.marker]=[-1,-1,-1,-1,-1,-1];let l=t[a.marker][(a.open?3:0)+a.length%3],u=r-i[r]-1,d=u;for(;u>l;u-=i[u]+1){let h=e[u];if(h.marker!==a.marker)continue;if(h.open&&h.end<0){let p=!1;if(h.close||a.open){if((h.length+a.length)%3===0){if(h.length%3!==0||a.length%3!==0)p=!0}}if(!p){let g=u>0&&!e[u-1].open?i[u-1]+1:0;i[o]=o-u+g,i[u]=g,a.open=!1,h.end=o,h.close=!1,d=-1,s=-2;break}}}if(d!==-1)t[a.marker][(a.open?3:0)+(a.length||0)%3]=d}}function s4(e){let t=e.tokens_meta,n=e.tokens_meta.length;Yc(e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)Yc(i)}}function i4(e){let t,n,r=0,s=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++){if(s[t].nesting<0)r--;if(s[t].level=r,s[t].nesting>0)r++;if(s[t].type==="text"&&t+1<i&&s[t+1].type==="text")s[t+1].content=s[t].content+s[t+1].content;else{if(t!==n)s[n]=s[t];n++}}if(t!==n)s.length=n}var qa=[["text",Ng],["linkify",$g],["newline",zg],["escape",Fg],["backticks",Hg],["strikethrough",hu.tokenize],["emphasis",mu.tokenize],["link",Gg],["image",Kg],["autolink",Zg],["html_inline",e4],["entity",r4]],Ha=[["balance_pairs",s4],["strikethrough",hu.postProcess],["emphasis",mu.postProcess],["fragments_join",i4]],gu=class{constructor(){ye(this,"ruler",new Ys),ye(this,"ruler2",new Ys),ye(this,"State",fu);for(let e=0;e<qa.length;e++)this.ruler.push(qa[e][0],qa[e][1]);for(let e=0;e<Ha.length;e++)this.ruler2.push(Ha[e][0],Ha[e][1])}skipToken(e){let t=e.pos,n=this.ruler.getRules(""),r=n.length,s=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let o=!1;if(e.level<s){for(let a=0;a<r;a++)if(e.level++,o=n[a](e,!0),e.level--,o){if(t>=e.pos)throw Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;if(!o)e.pos++;i[t]=e.pos}tokenize(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,s=e.md.options.maxNesting;while(e.pos<r){let i=e.pos,o=!1;if(e.level<s){for(let a=0;a<n;a++)if(o=t[a](e,!1),o){if(i>=e.pos)throw Error("inline rule didn't increment state.pos");break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}if(e.pending)e.pushPending()}parse(e,t,n,r){let s=new this.State(e,t,n,r);this.tokenize(s);let i=this.ruler2.getRules(""),o=i.length;for(let a=0;a<o;a++)i[a](s)}},o4={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},a4=/^(vbscript|javascript|file|data):/,l4=/^data:image\/(gif|png|jpeg|webp);/,Xc=["http:","https:","mailto:"],hn=class{validateLink(e){let t=e.trim().toLowerCase();return a4.test(t)?l4.test(t):!0}normalizeLink(e){let t=Us(e,!0);if(t.hostname){if(!t.protocol||Xc.indexOf(t.protocol)>=0)try{t.hostname=Oa.toASCII(t.hostname)}catch(n){}}if(t.auth)t.auth=or(t.auth);if(t.hostname)t.hostname=or(t.hostname);if(t.pathname)t.pathname=or(t.pathname);if(t.search)t.search=or(t.search);if(t.hash)t.hash=or(t.hash);return as(t)}normalizeLinkText(e){let t=Us(e,!0);if(t.hostname){if(!t.protocol||Xc.indexOf(t.protocol)>=0)try{t.hostname=Oa.toUnicode(t.hostname)}catch(n){}}return Ps(as(t),Ps.defaultChars+"%")}constructor(...e){ye(this,"inline",new gu),ye(this,"block",new du),ye(this,"core",new ou),ye(this,"renderer",new ru),ye(this,"linkify",new Nc),ye(this,"utils",M1),ye(this,"helpers",Object.assign({},G1));let[t,n]=e;if(typeof t==="string"){if(this.configure(t),n)this.set(n)}else this.configure("default"),this.set(t||{})}set(e){return Object.assign(this.options,e),this}configure(e){let t;if(typeof e==="string"){let s=e;if(t=o4[s],!t)throw Error(`Wrong 'markdown-it' preset "${s}", check name`)}else t=e;if(!t)throw Error("Wrong `markdown-it` preset, can't be empty");if(t.options)this.options={...t.options};let n=t.components;if(n){var r;["core","block","inline"].forEach((i)=>{var o;let a=(o=n[i])===null||o===void 0?void 0:o.rules;if(a)this[i].ruler.enableOnly(a)});let s=(r=n.inline)===null||r===void 0?void 0:r.rules2;if(s)this.inline.ruler2.enableOnly(s)}return this}enable(e,t=!1){let n=[];if(!Array.isArray(e))e=[e];["core","block","inline"].forEach((s)=>{n=n.concat(this[s].ruler.enable(e,!0))}),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter((s)=>n.indexOf(s)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to enable unknown rule(s): ${r}`);return this}disable(e,t=!1){let n=[];if(!Array.isArray(e))e=[e];["core","block","inline"].forEach((s)=>{n=n.concat(this[s].ruler.disable(e,!0))}),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter((s)=>n.indexOf(s)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to disable unknown rule(s): ${r}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if(typeof e!=="string")throw Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}};ye(hn,"Token",Lr);ye(hn,"Ruler",Ys);ye(hn,"Renderer",ru);ye(hn,"ParserCore",ou);ye(hn,"StateCore",su);ye(hn,"ParserBlock",du);ye(hn,"StateBlock",au);ye(hn,"ParserInline",gu);ye(hn,"StateInline",fu);var bu=eu(hn);var Dv=String.raw`\$&`,vu=(e)=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;");var Nn=(e,t,n)=>(n?[e[n].ruler]:[e.core.ruler,e.block.ruler,e.inline.ruler]).some((r)=>r.__rules__.some(({name:s})=>s===t)),Lv=String.raw`\^$.*+?()[]{}|`;var c4=(e)=>{if(e.length===0)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=32||n===34||n===39||n===47||n===60||n===61||n===62)return!1}return!0},Xs=(e)=>{let t="",n=0;for(let r=0;r<e.length;r++){let s="";switch(e.charCodeAt(r)){case 34:s="&quot;";break;case 38:s="&amp;";break;case 60:s="&lt;";break;case 62:s="&gt;"}s&&(t+=e.slice(n,r)+s,n=r+1)}return n===0?e:t+e.slice(n)},oo=(e,t)=>{if(t){for(let[n,r]of Object.entries(t))if(c4(n))if(n==="class"){let s=String(r).trim();s&&e.attrJoin("class",s)}else e.attrSet(n,r)}},Wa=(e)=>(e??0)>0?`:${e}`:"",yu=(e,t)=>`${typeof e=="string"?`-${e}-`:""}${t+1}`,u4=(e,t)=>`[${e+1}${Wa(t)}]`,d4=(e,t)=>{let{id:n,subId:r}=e[t].meta;return u4(n,r)},f4=(e,t,n,r,s)=>{let{href:i,anchorId:o,anchorClass:a}=e[t].meta,l=s.rules.footnote_caption(e,t,n,r,s);return`<sup${s.renderAttrs(e[t])}><a href="${Xs(i)}">${l}</a><a class="${Xs(a)}" id="${Xs(o)}"></a></sup>`},h4=(e,t,n,r,s)=>{let{separatorClass:i,listClass:o}=e[t].meta;return`<hr class="${Xs(i)}"${n.xhtmlOut?" /":""}>
19
19
  <section${s.renderAttrs(e[t])}>
20
- <ol class="${qs(a)}">
21
- `},bg=()=>`</ol>
20
+ <ol class="${Xs(o)}">
21
+ `},m4=()=>`</ol>
22
22
  </section>
23
- `,vg=(e,t,n,r,s)=>`<li${s.renderAttrs(e[t])}>`,yg=()=>`</li>
24
- `,wg=(e,t,n,r,s)=>{let{text:i}=e[t].meta;return` <a${s.renderAttrs(e[t])}>${$c(i)}</a>`},kg=(e,t,n,r)=>{let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],a;if(s+4>i||e.src.charCodeAt(s)!==91||e.src.charCodeAt(s+1)!==94)return!1;let o=s+2;for(;o<i;){if(a=e.src.charCodeAt(o),a===32)return!1;if(a===93)break;o++}if(o===s+2||o+1>=i||e.src.charCodeAt(++o)!==58)return!1;if(r)return!0;o++,(e.env.footnotes??={}).refs??={};let l=e.src.slice(s+2,o-2);e.env.footnotes.refs[`:${l}`]=-1;let u=e.push("footnote_reference_open","",1);u.meta={label:l},u.level=e.level++;let d=e.bMarks[t],f=e.tShift[t],p=e.sCount[t],g=e.parentType,b=o,x=e.sCount[t]+o-(e.bMarks[t]+e.tShift[t]),k=x;for(;o<i;){if(a=e.src.charCodeAt(o),a===9)k+=4-k%4;else if(a===32)k++;else break;o++}e.tShift[t]=o-b,e.sCount[t]=k-x,e.bMarks[t]=b,e.blkIndent+=4,e.parentType="footnote",e.sCount[t]<e.blkIndent&&(e.sCount[t]+=e.blkIndent),e.md.block.tokenize(e,t,n),e.parentType=g,e.blkIndent-=4,e.tShift[t]=f,e.sCount[t]=p,e.bMarks[t]=d;let A=e.push("footnote_reference_close","",-1);return A.level=--e.level,!0},Hc=(e,t,n,r,s)=>{let i=e.push("footnote_ref","",0),a=qc(e.env.docId,n),o=Eo(r);i.meta={id:n,subId:r,label:s,href:`#footnote${a}`,anchorId:`footnote-ref${a}${o}`,anchorClass:"footnote-anchor"},i.attrJoin("class","footnote-ref"),Gi(i,t.refAttrs)},xg=(e)=>(t,n)=>{let{posMax:r,pos:s}=t;if(s+2>=r||t.src.charCodeAt(s)!==94||t.src.charCodeAt(s+1)!==91)return!1;let i=t.md.helpers.parseLinkLabel(t,s+1);if(i<0)return!1;let a=s+2;if(!n){let o=((t.env.footnotes??={}).list??=[]).length,l=[];t.md.inline.parse(t.src.slice(a,i),t.md,t.env,l),t.env.footnotes.list[o]={content:t.src.slice(a,i),tokens:l},Hc(t,e,o)}return t.pos=i+1,t.posMax=r,!0},Eg=(e)=>(t,n)=>{let{pos:r,posMax:s}=t;if(r+3>s||!t.env.footnotes?.refs||t.src.charCodeAt(r)!==91||t.src.charCodeAt(r+1)!==94)return!1;let i=r+2,a;for(;i<s;){if(a=t.src.charCodeAt(i),a===32||a===10)return!1;if(a===93)break;i++}if(i===r+2||i>=s)return!1;i++;let o=t.src.slice(r+2,i-1);if(typeof t.env.footnotes.refs[`:${o}`]!="number")return!1;if(!n){let l=t.env.footnotes.list??=[],{refs:u}=t.env.footnotes,d;u[`:${o}`]<0?(d=l.length,l[d]={label:o,count:0},u[`:${o}`]=d):d=u[`:${o}`];let f=l[d].count;l[d].count+=1,Hc(t,e,d,f,o)}return t.pos=i,t.posMax=s,!0},Ag=(e)=>(t)=>{let n={},r=[];if(!t.env.footnotes?.list){let o=0;t.tokens=t.tokens.filter((l)=>l.type==="footnote_reference_open"?(o++,!1):l.type==="footnote_reference_close"?(o--,!1):o===0);return}let{list:s}=t.env.footnotes;t.tokens=t.tokens.filter((o)=>{if(o.type==="footnote_reference_open")return r.push({label:o.meta.label,tokens:[]}),!1;if(o.type==="footnote_reference_close"){let{label:l,tokens:u}=r.pop();return n[`:${l}`]=u,!1}return r.length===0||(r[r.length-1].tokens.push(o),!1)});let i=new t.Token("footnote_block_open","",1);i.meta={separatorClass:"footnotes-sep",listClass:"footnotes-list"},i.attrJoin("class","footnotes"),Gi(i,e.containerAttrs),t.tokens.push(i);let a=s.length;for(let o=0;o<a;o++){let l=new t.Token("footnote_open","",1),u=qc(t.env.docId,o);if(l.meta={id:o,label:s[o].label},l.attrSet("id",`footnote${u}`),l.attrJoin("class","footnote-item"),Gi(l,e.itemAttrs),t.tokens.push(l),s[o].tokens){let f=new t.Token("paragraph_open","p",1);f.block=!0;let p=new t.Token("inline","",0);p.children=s[o].tokens,p.content=s[o].content;let g=new t.Token("paragraph_close","p",-1);g.block=!0,t.tokens.push(f,p,g)}else{let f=n[`:${s[o].label}`];f&&t.tokens.push(...f)}let d=t.tokens[t.tokens.length-1].type==="paragraph_close"?t.tokens.pop():null;for(let f=0;f<(Number(s[o].count)>0?s[o].count:1);f++){let p=new t.Token("footnote_anchor","",0);p.meta={id:o,subId:f,label:s[o].label,text:"↩︎"},p.attrSet("href",`#footnote-ref${u}${Eo(f)}`),p.attrJoin("class","footnote-backref"),Gi(p,e.backrefAttrs),t.tokens.push(p)}d&&t.tokens.push(d),t.tokens.push(new t.Token("footnote_close","",-1))}t.tokens.push(new t.Token("footnote_block_close","",-1))},Pc=(e,t)=>{Sn(e,"footnoteTail","core")||(e.renderer.rules.footnote_ref=pg,e.renderer.rules.footnote_block_open=gg,e.renderer.rules.footnote_block_close=bg,e.renderer.rules.footnote_open=vg,e.renderer.rules.footnote_close=yg,e.renderer.rules.footnote_anchor=wg,e.renderer.rules.footnote_caption=mg,e.block.ruler.before("reference","footnoteDef",kg,{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnoteInline",xg(t??{})),e.inline.ruler.after("footnoteInline","footnote_ref",Eg(t??{})),e.core.ruler.after("inline","footnoteTail",Ag(t??{})))};var Uc=(e,t,n)=>{let r=e.attrIndex(t),s=[t,n];r<0?e.attrPush(s):e.attrs[r]=s},Cg=(e)=>e.type==="inline",_g=(e)=>e.type==="paragraph_open",Tg=(e)=>e.type==="list_item_open",Sg=(e)=>{let t=e.content;if(t.length<4||t.charCodeAt(0)!==91||t.charCodeAt(2)!==93)return!1;let n=t.charCodeAt(3);if(n!==32&&n!==160)return!1;let r=t.charCodeAt(1);return r===120||r===88?"checked":r===32||r===160},Rg=(e)=>{e[0].type==="text"?e[0].content=e[0].content.slice(4):(e.splice(0,3),e[0].content=e[0].content.slice(1))},Wc=(e,t={})=>{if(Sn(e,"task_list","core"))return;let{disabled:n=!0,label:r=!0,containerClass:s="task-list-container",itemClass:i="task-list-item",checkboxClass:a="task-list-item-checkbox",labelClass:o="task-list-item-label"}=t;e.core.ruler.after("inline","task_list",(l)=>{let u=l.tokens,d=[];for(let f=0;f<u.length;f++){let p=u[f];if(d[p.level]=f,f<2||!Cg(p)||!_g(u[f-1])||!Tg(u[f-2]))continue;let g=Sg(p);if(g===!1)continue;p.children??=[],Rg(p.children);let b=new l.Token("checkbox_input","input",0);if(b.attrs=[["type","checkbox"],["class",a]],g==="checked"&&b.attrs.push(["checked","checked"]),n&&b.attrs.push(["disabled","disabled"]),p.children.unshift(b),r){let x=new l.Token("label_open","label",1);x.attrs=[["class",o]],p.children.unshift(x),p.children.push(new l.Token("label_close","label",-1))}Uc(u[f-2],"class",i),Uc(u[d[u[f-2].level-1]],"class",s)}})};var Mg=String.raw`\[`,Dg=String.raw`\(`,jc=(e,t,n=0)=>{let r=0,s=t-1;for(;s>=n&&e.charCodeAt(s)===92;)r++,s--;return r},Vc=(e)=>e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95,Lg=(e,t,n)=>{let r=e.src.charCodeAt(t-1),s=e.src.charCodeAt(t+1),i=e.md.utils.isSpace;return r!==36&&(t===0||i(r)||!Vc(r))&&(n||!i(s))},Ig=(e,t,n)=>{let r=e.src.charCodeAt(t-1),s=e.src.charCodeAt(t+1),i=e.md.utils.isSpace;return s!==36&&(s==null||i(s)||!Vc(s))&&(n||!i(r))},Ng=(e)=>(t,n)=>{if(n||t.src[t.pos]!=="$")return!1;if(!Lg(t,t.pos,e))return t.pending+="$",t.pos++,!0;let r=t.pos+1,s,i=t.md.utils.isSpace;for(;(r=t.src.indexOf("$",r))!==-1;){if(r>=t.posMax){r=-1;break}for(s=r-1;t.src.charCodeAt(s)===92;)s--;if((r-s)%2==0){r++;continue}if(Ig(t,r,e))break;let o=t.src.charCodeAt(r-1),l=t.src.charCodeAt(r+1);if(!e&&i(o)&&(r+1>=t.posMax||i(l)))r++;else{r=-1;break}}if(r===-1)return t.pending+="$",t.pos+=1,!0;if(r-(t.pos+1)===0)return t.pending+="$$",t.pos+=2,!0;let a=t.push("math_inline","math",0);return a.markup="$",a.content=t.src.slice(t.pos+1,r),t.pos=r+1,!0},Bg=()=>(e,t)=>{let{pos:n,posMax:r}=e;if(t||n+1>=r||e.src.charCodeAt(n)!==92||e.src.charCodeAt(n+1)!==40)return!1;let s=n+2,i=!1;for(;s+1<r;){if(e.src.charCodeAt(s)===92&&e.src.charCodeAt(s+1)===41){if(jc(e.src,n)%2==1)return!1;if(jc(e.src,s,n+2)%2==0){i=!0;break}}s++}if(!i)return!1;let a=e.push("math_inline","math",0);return a.markup=Dg,a.content=e.src.slice(n+2,s),e.pos=s+2,!0},Hs=(e,t,n)=>{let r=e.md.utils.isWhiteSpace,s=t;for(;s>n&&r(e.src.charCodeAt(s-1));)s--;return s},Ao=(e,t,n,r,s)=>n-t>=2&&e.charCodeAt(n-1)===s&&e.charCodeAt(n-2)===r,Gc=new WeakMap,Jc=(e,t,n,r,s)=>{let i=Gc.get(e);if(i&&i.endLine===n&&i.blkIndent===e.blkIndent&&i.close1===r&&i.close2===s&&t>=i.from&&t<i.stop)return-1;let{src:a}=e,o=n;for(let l=t+1;l<n;l++){let u=e.bMarks[l]+e.tShift[l],d=e.eMarks[l];if(u<d&&e.sCount[l]<e.blkIndent){o=l;break}let f=Hs(e,d,u);if(Ao(a,u,f,r,s))return l}return Gc.set(e,{blkIndent:e.blkIndent,close1:r,close2:s,endLine:n,from:t,stop:o}),-1},Og=(e,t,n)=>{let r=e.md.utils.isWhiteSpace;for(let s=t;s<n-1;s++)if(e.src.charCodeAt(s)===36&&e.src.charCodeAt(s+1)===36){for(let i=s+2;i<n;i++)if(!r(e.src.charCodeAt(i)))return!0;break}return!1},zg=(e,t,n,r)=>{let{src:s}=e,i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(s.charCodeAt(i)!==36||s.charCodeAt(i+1)!==36||Og(e,i+2,a))return!1;let o=Hs(e,a,i),l=i+2,u=Ao(s,l,o,36,36),d=u?t:Jc(e,t,n,36,36);if(d===-1)return!1;if(r)return!0;let f=s.slice(l,u?o-2:a),p="";if(!u){let b=e.bMarks[d]+e.tShift[d];p=s.slice(b,Hs(e,e.eMarks[d],b)-2)}e.line=d+1;let g=e.push("math_block","math",0);return g.block=!0,g.content=(f?`${f}
23
+ `,p4=(e,t,n,r,s)=>`<li${s.renderAttrs(e[t])}>`,g4=()=>`</li>
24
+ `,b4=(e,t,n,r,s)=>{let{text:i}=e[t].meta;return` <a${s.renderAttrs(e[t])}>${vu(i)}</a>`},v4=(e,t,n,r)=>{let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],o;if(s+4>i||e.src.charCodeAt(s)!==91||e.src.charCodeAt(s+1)!==94)return!1;let a=s+2;for(;a<i;){if(o=e.src.charCodeAt(a),o===32)return!1;if(o===93)break;a++}if(a===s+2||a+1>=i||e.src.charCodeAt(++a)!==58)return!1;if(r)return!0;a++,(e.env.footnotes??={}).refs??={};let l=e.src.slice(s+2,a-2);e.env.footnotes.refs[`:${l}`]=-1;let u=e.push("footnote_reference_open","",1);u.meta={label:l},u.level=e.level++;let d=e.bMarks[t],h=e.tShift[t],p=e.sCount[t],g=e.parentType,b=a,x=e.sCount[t]+a-(e.bMarks[t]+e.tShift[t]),k=x;for(;a<i;){if(o=e.src.charCodeAt(a),o===9)k+=4-k%4;else if(o===32)k++;else break;a++}e.tShift[t]=a-b,e.sCount[t]=k-x,e.bMarks[t]=b,e.blkIndent+=4,e.parentType="footnote",e.sCount[t]<e.blkIndent&&(e.sCount[t]+=e.blkIndent),e.md.block.tokenize(e,t,n),e.parentType=g,e.blkIndent-=4,e.tShift[t]=h,e.sCount[t]=p,e.bMarks[t]=d;let E=e.push("footnote_reference_close","",-1);return E.level=--e.level,!0},ku=(e,t,n,r,s)=>{let i=e.push("footnote_ref","",0),o=yu(e.env.docId,n),a=Wa(r);i.meta={id:n,subId:r,label:s,href:`#footnote${o}`,anchorId:`footnote-ref${o}${a}`,anchorClass:"footnote-anchor"},i.attrJoin("class","footnote-ref"),oo(i,t.refAttrs)},y4=(e)=>(t,n)=>{let{posMax:r,pos:s}=t;if(s+2>=r||t.src.charCodeAt(s)!==94||t.src.charCodeAt(s+1)!==91)return!1;let i=t.md.helpers.parseLinkLabel(t,s+1);if(i<0)return!1;let o=s+2;if(!n){let a=((t.env.footnotes??={}).list??=[]).length,l=[];t.md.inline.parse(t.src.slice(o,i),t.md,t.env,l),t.env.footnotes.list[a]={content:t.src.slice(o,i),tokens:l},ku(t,e,a)}return t.pos=i+1,t.posMax=r,!0},k4=(e)=>(t,n)=>{let{pos:r,posMax:s}=t;if(r+3>s||!t.env.footnotes?.refs||t.src.charCodeAt(r)!==91||t.src.charCodeAt(r+1)!==94)return!1;let i=r+2,o;for(;i<s;){if(o=t.src.charCodeAt(i),o===32||o===10)return!1;if(o===93)break;i++}if(i===r+2||i>=s)return!1;i++;let a=t.src.slice(r+2,i-1);if(typeof t.env.footnotes.refs[`:${a}`]!="number")return!1;if(!n){let l=t.env.footnotes.list??=[],{refs:u}=t.env.footnotes,d;u[`:${a}`]<0?(d=l.length,l[d]={label:a,count:0},u[`:${a}`]=d):d=u[`:${a}`];let h=l[d].count;l[d].count+=1,ku(t,e,d,h,a)}return t.pos=i,t.posMax=s,!0},w4=(e)=>(t)=>{let n={},r=[];if(!t.env.footnotes?.list){let a=0;t.tokens=t.tokens.filter((l)=>l.type==="footnote_reference_open"?(a++,!1):l.type==="footnote_reference_close"?(a--,!1):a===0);return}let{list:s}=t.env.footnotes;t.tokens=t.tokens.filter((a)=>{if(a.type==="footnote_reference_open")return r.push({label:a.meta.label,tokens:[]}),!1;if(a.type==="footnote_reference_close"){let{label:l,tokens:u}=r.pop();return n[`:${l}`]=u,!1}return r.length===0||(r[r.length-1].tokens.push(a),!1)});let i=new t.Token("footnote_block_open","",1);i.meta={separatorClass:"footnotes-sep",listClass:"footnotes-list"},i.attrJoin("class","footnotes"),oo(i,e.containerAttrs),t.tokens.push(i);let o=s.length;for(let a=0;a<o;a++){let l=new t.Token("footnote_open","",1),u=yu(t.env.docId,a);if(l.meta={id:a,label:s[a].label},l.attrSet("id",`footnote${u}`),l.attrJoin("class","footnote-item"),oo(l,e.itemAttrs),t.tokens.push(l),s[a].tokens){let h=new t.Token("paragraph_open","p",1);h.block=!0;let p=new t.Token("inline","",0);p.children=s[a].tokens,p.content=s[a].content;let g=new t.Token("paragraph_close","p",-1);g.block=!0,t.tokens.push(h,p,g)}else{let h=n[`:${s[a].label}`];h&&t.tokens.push(...h)}let d=t.tokens[t.tokens.length-1].type==="paragraph_close"?t.tokens.pop():null;for(let h=0;h<(Number(s[a].count)>0?s[a].count:1);h++){let p=new t.Token("footnote_anchor","",0);p.meta={id:a,subId:h,label:s[a].label,text:"↩︎"},p.attrSet("href",`#footnote-ref${u}${Wa(h)}`),p.attrJoin("class","footnote-backref"),oo(p,e.backrefAttrs),t.tokens.push(p)}d&&t.tokens.push(d),t.tokens.push(new t.Token("footnote_close","",-1))}t.tokens.push(new t.Token("footnote_block_close","",-1))},wu=(e,t)=>{Nn(e,"footnoteTail","core")||(e.renderer.rules.footnote_ref=f4,e.renderer.rules.footnote_block_open=h4,e.renderer.rules.footnote_block_close=m4,e.renderer.rules.footnote_open=p4,e.renderer.rules.footnote_close=g4,e.renderer.rules.footnote_anchor=b4,e.renderer.rules.footnote_caption=d4,e.block.ruler.before("reference","footnoteDef",v4,{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnoteInline",y4(t??{})),e.inline.ruler.after("footnoteInline","footnote_ref",k4(t??{})),e.core.ruler.after("inline","footnoteTail",w4(t??{})))};var xu=(e,t,n)=>{let r=e.attrIndex(t),s=[t,n];r<0?e.attrPush(s):e.attrs[r]=s},x4=(e)=>e.type==="inline",E4=(e)=>e.type==="paragraph_open",A4=(e)=>e.type==="list_item_open",C4=(e)=>{let t=e.content;if(t.length<4||t.charCodeAt(0)!==91||t.charCodeAt(2)!==93)return!1;let n=t.charCodeAt(3);if(n!==32&&n!==160)return!1;let r=t.charCodeAt(1);return r===120||r===88?"checked":r===32||r===160},_4=(e)=>{e[0].type==="text"?e[0].content=e[0].content.slice(4):(e.splice(0,3),e[0].content=e[0].content.slice(1))},Eu=(e,t={})=>{if(Nn(e,"task_list","core"))return;let{disabled:n=!0,label:r=!0,containerClass:s="task-list-container",itemClass:i="task-list-item",checkboxClass:o="task-list-item-checkbox",labelClass:a="task-list-item-label"}=t;e.core.ruler.after("inline","task_list",(l)=>{let u=l.tokens,d=[];for(let h=0;h<u.length;h++){let p=u[h];if(d[p.level]=h,h<2||!x4(p)||!E4(u[h-1])||!A4(u[h-2]))continue;let g=C4(p);if(g===!1)continue;p.children??=[],_4(p.children);let b=new l.Token("checkbox_input","input",0);if(b.attrs=[["type","checkbox"],["class",o]],g==="checked"&&b.attrs.push(["checked","checked"]),n&&b.attrs.push(["disabled","disabled"]),p.children.unshift(b),r){let x=new l.Token("label_open","label",1);x.attrs=[["class",a]],p.children.unshift(x),p.children.push(new l.Token("label_close","label",-1))}xu(u[h-2],"class",i),xu(u[d[u[h-2].level-1]],"class",s)}})};var S4=String.raw`\[`,T4=String.raw`\(`,Au=(e,t,n=0)=>{let r=0,s=t-1;for(;s>=n&&e.charCodeAt(s)===92;)r++,s--;return r},Su=(e)=>e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95,R4=(e,t,n)=>{let r=e.src.charCodeAt(t-1),s=e.src.charCodeAt(t+1),i=e.md.utils.isSpace;return r!==36&&(t===0||i(r)||!Su(r))&&(n||!i(s))},M4=(e,t,n)=>{let r=e.src.charCodeAt(t-1),s=e.src.charCodeAt(t+1),i=e.md.utils.isSpace;return s!==36&&(s==null||i(s)||!Su(s))&&(n||!i(r))},D4=(e)=>(t,n)=>{if(n||t.src[t.pos]!=="$")return!1;if(!R4(t,t.pos,e))return t.pending+="$",t.pos++,!0;let r=t.pos+1,s,i=t.md.utils.isSpace;for(;(r=t.src.indexOf("$",r))!==-1;){if(r>=t.posMax){r=-1;break}for(s=r-1;t.src.charCodeAt(s)===92;)s--;if((r-s)%2==0){r++;continue}if(M4(t,r,e))break;let a=t.src.charCodeAt(r-1),l=t.src.charCodeAt(r+1);if(!e&&i(a)&&(r+1>=t.posMax||i(l)))r++;else{r=-1;break}}if(r===-1)return t.pending+="$",t.pos+=1,!0;if(r-(t.pos+1)===0)return t.pending+="$$",t.pos+=2,!0;let o=t.push("math_inline","math",0);return o.markup="$",o.content=t.src.slice(t.pos+1,r),t.pos=r+1,!0},L4=()=>(e,t)=>{let{pos:n,posMax:r}=e;if(t||n+1>=r||e.src.charCodeAt(n)!==92||e.src.charCodeAt(n+1)!==40)return!1;let s=n+2,i=!1;for(;s+1<r;){if(e.src.charCodeAt(s)===92&&e.src.charCodeAt(s+1)===41){if(Au(e.src,n)%2==1)return!1;if(Au(e.src,s,n+2)%2==0){i=!0;break}}s++}if(!i)return!1;let o=e.push("math_inline","math",0);return o.markup=T4,o.content=e.src.slice(n+2,s),e.pos=s+2,!0},Qs=(e,t,n)=>{let r=e.md.utils.isWhiteSpace,s=t;for(;s>n&&r(e.src.charCodeAt(s-1));)s--;return s},ja=(e,t,n,r,s)=>n-t>=2&&e.charCodeAt(n-1)===s&&e.charCodeAt(n-2)===r,Cu=new WeakMap,Tu=(e,t,n,r,s)=>{let i=Cu.get(e);if(i&&i.endLine===n&&i.blkIndent===e.blkIndent&&i.close1===r&&i.close2===s&&t>=i.from&&t<i.stop)return-1;let{src:o}=e,a=n;for(let l=t+1;l<n;l++){let u=e.bMarks[l]+e.tShift[l],d=e.eMarks[l];if(u<d&&e.sCount[l]<e.blkIndent){a=l;break}let h=Qs(e,d,u);if(ja(o,u,h,r,s))return l}return Cu.set(e,{blkIndent:e.blkIndent,close1:r,close2:s,endLine:n,from:t,stop:a}),-1},I4=(e,t,n)=>{let r=e.md.utils.isWhiteSpace;for(let s=t;s<n-1;s++)if(e.src.charCodeAt(s)===36&&e.src.charCodeAt(s+1)===36){for(let i=s+2;i<n;i++)if(!r(e.src.charCodeAt(i)))return!0;break}return!1},N4=(e,t,n,r)=>{let{src:s}=e,i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(s.charCodeAt(i)!==36||s.charCodeAt(i+1)!==36||I4(e,i+2,o))return!1;let a=Qs(e,o,i),l=i+2,u=ja(s,l,a,36,36),d=u?t:Tu(e,t,n,36,36);if(d===-1)return!1;if(r)return!0;let h=s.slice(l,u?a-2:o),p="";if(!u){let b=e.bMarks[d]+e.tShift[d];p=s.slice(b,Qs(e,e.eMarks[d],b)-2)}e.line=d+1;let g=e.push("math_block","math",0);return g.block=!0,g.content=(h?`${h}
25
25
  `:"")+e.getLines(t+1,d,e.sCount[t],!0)+(p?`${p}
26
- `:""),g.map=[t,e.line],g.markup="$$",!0},Fg=(e,t,n,r)=>{let{src:s}=e,i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(s.charCodeAt(i)!==92||s.charCodeAt(i+1)!==91)return!1;let o=Hs(e,a,i),l=i+2,u=Ao(s,l,o,92,93),d=u?t:Jc(e,t,n,92,93);if(d===-1)return!1;if(r)return!0;let f=s.slice(l,u?o-2:a),p="";if(!u){let b=e.bMarks[d]+e.tShift[d];p=s.slice(b,Hs(e,e.eMarks[d],b)-2)}e.line=d+1;let g=e.push("math_block","math",0);return g.block=!0,g.content=(f?`${f}
26
+ `:""),g.map=[t,e.line],g.markup="$$",!0},B4=(e,t,n,r)=>{let{src:s}=e,i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(s.charCodeAt(i)!==92||s.charCodeAt(i+1)!==91)return!1;let a=Qs(e,o,i),l=i+2,u=ja(s,l,a,92,93),d=u?t:Tu(e,t,n,92,93);if(d===-1)return!1;if(r)return!0;let h=s.slice(l,u?a-2:o),p="";if(!u){let b=e.bMarks[d]+e.tShift[d];p=s.slice(b,Qs(e,e.eMarks[d],b)-2)}e.line=d+1;let g=e.push("math_block","math",0);return g.block=!0,g.content=(h?`${h}
27
27
  `:"")+e.getLines(t+1,d,e.sCount[t],!0)+(p?`${p}
28
- `:""),g.map=[t,e.line],g.markup=Mg,!0},Kc={alt:["paragraph","reference","blockquote","list"]},Zc=(e,t)=>{if(typeof t?.render!="function")throw TypeError('[@mdit/plugin-tex]: "render" option should be a function');let{allowInlineWithSpace:n=!1,mathFence:r=!1,delimiters:s="dollars",render:i}=t;if(!(Sn(e,"math_inline_dollar","inline")||Sn(e,"math_block_dollar","block")||Sn(e,"math_inline_bracket","inline")||Sn(e,"math_block_bracket","block"))){if(r){let a=e.renderer.rules.fence;e.renderer.rules.fence=(o,l,u,d,f)=>{let p=o[l];return p.info.trim()==="math"?i(p.content,!0,d):a(o,l,u,d,f)}}(s==="dollars"||s==="all")&&(e.inline.ruler.after("escape","math_inline_dollar",Ng(n)),e.block.ruler.after("blockquote","math_block_dollar",zg,Kc)),(s==="brackets"||s==="all")&&(e.inline.ruler.before("escape","math_inline_bracket",Bg()),e.block.ruler.after("blockquote","math_block_bracket",Fg,Kc)),e.renderer.rules.math_inline=(a,o,l,u)=>i(a[o].content,!1,u),e.renderer.rules.math_block=(a,o,l,u)=>i(a[o].content,!0,u)}};class te extends Error{constructor(e,t){var n="KaTeX parse error: "+e,r,s,i=t&&t.loc;if(i&&i.start<=i.end){var a=i.lexer.input;if(r=i.start,s=i.end,r===a.length)n+=" at end of input: ";else n+=" at position "+(r+1)+": ";var o=a.slice(r,s).replace(/[^]/g,"$&̲"),l;if(r>15)l="…"+a.slice(r-15,r);else l=a.slice(0,r);var u;if(s+15<a.length)u=a.slice(s,s+15)+"…";else u=a.slice(s);n+=l+o+u}super(n);if(this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,te.prototype),this.position=r,r!=null&&s!=null)this.length=s-r;this.rawMessage=e}}var $g=/([A-Z])/g,qg=(e)=>e.replace($g,"-$1").toLowerCase(),Hg={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Pg=/[&><"']/g,At=(e)=>String(e).replace(Pg,(t)=>Hg[t]),Xi=(e)=>{if(e.type==="ordgroup")if(e.body.length===1)return Xi(e.body[0]);else return e;else if(e.type==="color")if(e.body.length===1)return Xi(e.body[0]);else return e;else if(e.type==="font")return Xi(e.body);else return e},Ug=new Set(["mathord","textord","atom"]),Bn=(e)=>Ug.has(Xi(e).type),Wg=(e)=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);if(!t)return"_relative";if(t[2]!==":")return null;if(!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1]))return null;return t[1].toLowerCase()},Oo={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:(e)=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:(e)=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:(e)=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1000,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:(e)=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:(e)=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function jg(e){if(typeof e!=="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw Error("Unexpected schema type; settings must declare an explicit default.")}}function Gg(e){if(Object.prototype.hasOwnProperty.call(e,"default")&&e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return jg(t)}function Kg(e,t,n,r){var s=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,i=Object.prototype.hasOwnProperty.call(r,"processor")?r.processor:void 0;e[t]=s!==void 0?i?i(s):s:Gg(r)}class ia{constructor(e){if(e===void 0)e={};this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t of Object.keys(Oo)){var n=Oo[t];if(n)Kg(this,t,e,n)}}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=Wg(e.url);if(t==null)return!1;e.protocol=t}var n=typeof this.trust==="function"?this.trust(e):this.trust;return Boolean(n)}}class Mn{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return fn[Vg[this.id]]}sub(){return fn[Jg[this.id]]}fracNum(){return fn[Zg[this.id]]}fracDen(){return fn[Yg[this.id]]}cramp(){return fn[Xg[this.id]]}text(){return fn[Qg[this.id]]}isTight(){return this.size>=2}}var tl=0,na=1,Qr=2,In=3,Vs=4,Gt=5,es=6,St=7,fn=[new Mn(tl,0,!1),new Mn(na,0,!0),new Mn(Qr,1,!1),new Mn(In,1,!0),new Mn(Vs,2,!1),new Mn(Gt,2,!0),new Mn(es,3,!1),new Mn(St,3,!0)],Vg=[Vs,Gt,Vs,Gt,es,St,es,St],Jg=[Gt,Gt,Gt,Gt,St,St,St,St],Zg=[Qr,In,Vs,Gt,es,St,es,St],Yg=[In,In,Gt,Gt,St,St,St,St],Xg=[na,na,In,In,Gt,Gt,St,St],Qg=[tl,na,Qr,In,Qr,In,Qr,In],Se={DISPLAY:fn[tl],TEXT:fn[Qr],SCRIPT:fn[Vs],SCRIPTSCRIPT:fn[es]},zo=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function e4(e){for(var t=0;t<zo.length;t++){var n=zo[t];for(var r=0;r<n.blocks.length;r++){var s=n.blocks[r];if(e>=s[0]&&e<=s[1])return n.name}}return null}var Qi=[];zo.forEach((e)=>e.blocks.forEach((t)=>Qi.push(...t)));function Nu(e){for(var t=0;t<Qi.length;t+=2)if(e>=Qi[t]&&e<=Qi[t+1])return!0;return!1}var ut=(e)=>e+" "+e,Zr=80,t4=function(t,n){return"M95,"+(622+t+n)+`
28
+ `:""),g.map=[t,e.line],g.markup=S4,!0},_u={alt:["paragraph","reference","blockquote","list"]},Ru=(e,t)=>{if(typeof t?.render!="function")throw TypeError('[@mdit/plugin-tex]: "render" option should be a function');let{allowInlineWithSpace:n=!1,mathFence:r=!1,delimiters:s="dollars",render:i}=t;if(!(Nn(e,"math_inline_dollar","inline")||Nn(e,"math_block_dollar","block")||Nn(e,"math_inline_bracket","inline")||Nn(e,"math_block_bracket","block"))){if(r){let o=e.renderer.rules.fence;e.renderer.rules.fence=(a,l,u,d,h)=>{let p=a[l];return p.info.trim()==="math"?i(p.content,!0,d):o(a,l,u,d,h)}}(s==="dollars"||s==="all")&&(e.inline.ruler.after("escape","math_inline_dollar",D4(n)),e.block.ruler.after("blockquote","math_block_dollar",N4,_u)),(s==="brackets"||s==="all")&&(e.inline.ruler.before("escape","math_inline_bracket",L4()),e.block.ruler.after("blockquote","math_block_bracket",B4,_u)),e.renderer.rules.math_inline=(o,a,l,u)=>i(o[a].content,!1,u),e.renderer.rules.math_block=(o,a,l,u)=>i(o[a].content,!0,u)}};class se extends Error{constructor(e,t){var n="KaTeX parse error: "+e,r,s,i=t&&t.loc;if(i&&i.start<=i.end){var o=i.lexer.input;if(r=i.start,s=i.end,r===o.length)n+=" at end of input: ";else n+=" at position "+(r+1)+": ";var a=o.slice(r,s).replace(/[^]/g,"$&̲"),l;if(r>15)l="…"+o.slice(r-15,r);else l=o.slice(0,r);var u;if(s+15<o.length)u=o.slice(s,s+15)+"…";else u=o.slice(s);n+=l+a+u}super(n);if(this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,se.prototype),this.position=r,r!=null&&s!=null)this.length=s-r;this.rawMessage=e}}var O4=/([A-Z])/g,$4=(e)=>e.replace(O4,"-$1").toLowerCase(),z4={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},F4=/[&><"']/g,Ct=(e)=>String(e).replace(F4,(t)=>z4[t]),ho=(e)=>{if(e.type==="ordgroup")if(e.body.length===1)return ho(e.body[0]);else return e;else if(e.type==="color")if(e.body.length===1)return ho(e.body[0]);else return e;else if(e.type==="font")return ho(e.body);else return e},q4=new Set(["mathord","textord","atom"]),Hn=(e)=>q4.has(ho(e).type),H4=(e)=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);if(!t)return"_relative";if(t[2]!==":")return null;if(!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1]))return null;return t[1].toLowerCase()},rl={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:(e)=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:(e)=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:(e)=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1000,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:(e)=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:(e)=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function P4(e){if(typeof e!=="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw Error("Unexpected schema type; settings must declare an explicit default.")}}function U4(e){if(Object.prototype.hasOwnProperty.call(e,"default")&&e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return P4(t)}function W4(e,t,n,r){var s=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,i=Object.prototype.hasOwnProperty.call(r,"processor")?r.processor:void 0;e[t]=s!==void 0?i?i(s):s:U4(r)}class ko{constructor(e){if(e===void 0)e={};this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t of Object.keys(rl)){var n=rl[t];if(n)W4(this,t,e,n)}}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=H4(e.url);if(t==null)return!1;e.protocol=t}var n=typeof this.trust==="function"?this.trust(e):this.trust;return Boolean(n)}}class On{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return pn[j4[this.id]]}sub(){return pn[G4[this.id]]}fracNum(){return pn[K4[this.id]]}fracDen(){return pn[V4[this.id]]}cramp(){return pn[J4[this.id]]}text(){return pn[Z4[this.id]]}isTight(){return this.size>=2}}var xl=0,bo=1,fs=2,Fn=3,oi=4,Qt=5,hs=6,Lt=7,pn=[new On(xl,0,!1),new On(bo,0,!0),new On(fs,1,!1),new On(Fn,1,!0),new On(oi,2,!1),new On(Qt,2,!0),new On(hs,3,!1),new On(Lt,3,!0)],j4=[oi,Qt,oi,Qt,hs,Lt,hs,Lt],G4=[Qt,Qt,Qt,Qt,Lt,Lt,Lt,Lt],K4=[fs,Fn,oi,Qt,hs,Lt,hs,Lt],V4=[Fn,Fn,Qt,Qt,Lt,Lt,Lt,Lt],J4=[bo,bo,Fn,Fn,Qt,Qt,Lt,Lt],Z4=[xl,bo,fs,Fn,fs,Fn,fs,Fn],De={DISPLAY:pn[xl],TEXT:pn[fs],SCRIPT:pn[oi],SCRIPTSCRIPT:pn[hs]},sl=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Y4(e){for(var t=0;t<sl.length;t++){var n=sl[t];for(var r=0;r<n.blocks.length;r++){var s=n.blocks[r];if(e>=s[0]&&e<=s[1])return n.name}}return null}var mo=[];sl.forEach((e)=>e.blocks.forEach((t)=>mo.push(...t)));function hd(e){for(var t=0;t<mo.length;t+=2)if(e>=mo[t]&&e<=mo[t+1])return!0;return!1}var pt=(e)=>e+" "+e,cs=80,X4=function(t,n){return"M95,"+(622+t+n)+`
29
29
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
30
30
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
31
31
  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
@@ -36,7 +36,7 @@ c5.3,-9.3,12,-14,20,-14
36
36
  H400000v`+(40+t)+`H845.2724
37
37
  s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
38
38
  c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
39
- M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},n4=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119
39
+ M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Q4=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119
40
40
  c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
41
41
  c340,-704.7,510.7,-1060.3,512,-1067
42
42
  l`+t/2.084+" -"+t+`
@@ -46,7 +46,7 @@ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,
46
46
  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
47
47
  s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
48
48
  c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
49
- M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},r4=function(t,n){return"M983 "+(10+t+n)+`
49
+ M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},e2=function(t,n){return"M983 "+(10+t+n)+`
50
50
  l`+t/3.13+" -"+t+`
51
51
  c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
52
52
  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
@@ -55,7 +55,7 @@ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
55
55
  c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
56
56
  c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
57
57
  c53.7,-170.3,84.5,-266.8,92.5,-289.5z
58
- M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},s4=function(t,n){return"M424,"+(2398+t+n)+`
58
+ M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},t2=function(t,n){return"M424,"+(2398+t+n)+`
59
59
  c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
60
60
  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
61
61
  s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
@@ -65,18 +65,18 @@ v`+(40+t)+`H1014.6
65
65
  s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
66
66
  c-2,6,-10,9,-24,9
67
67
  c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+`
68
- h400000v`+(40+t)+"h-400000z"},i4=function(t,n){return"M473,"+(2713+t+n)+`
68
+ h400000v`+(40+t)+"h-400000z"},n2=function(t,n){return"M473,"+(2713+t+n)+`
69
69
  c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
70
70
  c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
71
71
  s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
72
72
  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
73
73
  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
74
74
  s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
75
- 606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},a4=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},o4=function(t,n,r){var s=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+`
75
+ 606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},r2=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},s2=function(t,n,r){var s=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+`
76
76
  H742v`+s+`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
77
77
  h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
78
78
  c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
79
- 219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},l4=function(t,n,r){n=1000*n;var s="";switch(t){case"sqrtMain":s=t4(n,Zr);break;case"sqrtSize1":s=n4(n,Zr);break;case"sqrtSize2":s=r4(n,Zr);break;case"sqrtSize3":s=s4(n,Zr);break;case"sqrtSize4":s=i4(n,Zr);break;case"sqrtTall":s=o4(n,Zr,r)}return s},c4=function(t,n){switch(t){case"⎜":return ut("M291 0 H417 V"+n+" H291z");case"∣":return ut("M145 0 H188 V"+n+" H145z");case"∥":return ut("M145 0 H188 V"+n+" H145z")+ut("M367 0 H410 V"+n+" H367z");case"⎟":return ut("M457 0 H583 V"+n+" H457z");case"⎢":return ut("M319 0 H403 V"+n+" H319z");case"⎥":return ut("M263 0 H347 V"+n+" H263z");case"⎪":return ut("M384 0 H504 V"+n+" H384z");case"⏐":return ut("M312 0 H355 V"+n+" H312z");case"‖":return ut("M257 0 H300 V"+n+" H257z")+ut("M478 0 H521 V"+n+" H478z");default:return""}},Yc={doubleleftarrow:`M262 157
79
+ 219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},i2=function(t,n,r){n=1000*n;var s="";switch(t){case"sqrtMain":s=X4(n,cs);break;case"sqrtSize1":s=Q4(n,cs);break;case"sqrtSize2":s=e2(n,cs);break;case"sqrtSize3":s=t2(n,cs);break;case"sqrtSize4":s=n2(n,cs);break;case"sqrtTall":s=s2(n,cs,r)}return s},o2=function(t,n){switch(t){case"⎜":return pt("M291 0 H417 V"+n+" H291z");case"∣":return pt("M145 0 H188 V"+n+" H145z");case"∥":return pt("M145 0 H188 V"+n+" H145z")+pt("M367 0 H410 V"+n+" H367z");case"⎟":return pt("M457 0 H583 V"+n+" H457z");case"⎢":return pt("M319 0 H403 V"+n+" H319z");case"⎥":return pt("M263 0 H347 V"+n+" H263z");case"⎪":return pt("M384 0 H504 V"+n+" H384z");case"⏐":return pt("M312 0 H355 V"+n+" H312z");case"‖":return pt("M257 0 H300 V"+n+" H257z")+pt("M478 0 H521 V"+n+" H478z");default:return""}},Mu={doubleleftarrow:`M262 157
80
80
  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
81
81
  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
82
82
  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
@@ -122,10 +122,10 @@ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9
122
122
  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
123
123
  -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
124
124
  -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
125
- 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:ut("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:ut("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:ut("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:ut("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
125
+ 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:pt("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:pt("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:pt("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:pt("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
126
126
  -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
127
127
  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
128
- 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:ut("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
128
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:pt("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
129
129
  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
130
130
  -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
131
131
  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
@@ -174,7 +174,7 @@ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown
174
174
  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
175
175
  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
176
176
  -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
177
- 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:ut("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:ut("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:ut("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
177
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:pt("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:pt("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:pt("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
178
178
  1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
179
179
  -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
180
180
  -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
@@ -247,7 +247,7 @@ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`
247
247
  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,
248
248
  -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
249
249
  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
250
- M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},u4=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 v84 h347 v-84
250
+ M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},a2=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 v84 h347 v-84
251
251
  H403z M403 1759 V0 H319 V1759 v`+n+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z
252
252
  M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
253
253
  c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
@@ -275,16 +275,26 @@ 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
275
275
  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
276
276
  c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
277
277
  l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
278
- -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error("Unknown stretchy delimiter.")}};function d4(e){return"toText"in e}class Ar{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 this.classes.includes(e)}toNode(){var e=document.createDocumentFragment();for(var t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){var e="";for(var t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e)=>{if(d4(e))return e.toText();throw Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}var Fo={pt:1,mm:2.8452755905511813,cm:28.45275590551181,in:72.27,bp:1.00375,pc:12,dd:1.070008643042351,cc:12.84010371650821,nd:1.0669781931464175,nc:12.80373831775701,sp:0.0000152587890625,px:1.00375},h4={ex:!0,em:!0,mu:!0},Bu=function(t){if(typeof t!=="string")t=t.unit;return t in Fo||t in h4||t==="ex"},et=function(t,n){var r;if(t.unit in Fo)r=Fo[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var s;if(n.style.isTight())s=n.havingStyle(n.style.text());else s=n;if(t.unit==="ex")r=s.fontMetrics().xHeight;else if(t.unit==="em")r=s.fontMetrics().quad;else throw new te("Invalid unit: '"+t.unit+"'");if(s!==n)r*=s.sizeMultiplier/n.sizeMultiplier}return Math.min(t.number*r,n.maxSize)},ae=function(t){return+t.toFixed(4)+"em"},rr=function(t){return t.filter((n)=>n).join(" ")},nl=function(t){var n="";for(var r of Object.keys(t)){var s=t[r];if(s!==void 0)n+=qg(r)+":"+s+";"}return n},Ou=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){if(n.style.isTight())this.classes.push("mtight");var s=n.getColor();if(s)this.style.color=s}},zu=function(t){var n=document.createElement(t);n.className=rr(this.classes),Object.assign(n.style,this.style);for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n},f4=/[\s"'>/=\x00-\x1f]/,Fu=function(t){var n="<"+t;if(this.classes.length)n+=' class="'+At(rr(this.classes))+'"';var r=nl(this.style);if(r)n+=' style="'+At(r)+'"';for(var s of Object.keys(this.attributes)){if(f4.test(s))throw new te("Invalid attribute name '"+s+"'");n+=" "+s+'="'+At(this.attributes[s])+'"'}n+=">";for(var i=0;i<this.children.length;i++)n+=this.children[i].toMarkup();return n+="</"+t+">",n};class Cr{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,Ou.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return zu.call(this,"span")}toMarkup(){return Fu.call(this,"span")}}class Qs{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Ou.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return zu.call(this,"a")}toMarkup(){return Fu.call(this,"a")}}class $u{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e='<img src="'+At(this.src)+'"'+(' alt="'+At(this.alt)+'"'),t=nl(this.style);if(t)e+=' style="'+At(t)+'"';return e+="'/>",e}}var m4={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class zt{constructor(e,t,n,r,s,i,a,o){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=s||0,this.width=i||0,this.classes=a||[],this.style=o||{},this.maxFontSize=0;var l=e4(this.text.charCodeAt(0));if(l)this.classes.push(l+"_fallback");if(/[îïíì]/.test(this.text))this.text=m4[this.text]}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;if(this.italic>0)t=document.createElement("span"),t.style.marginRight=ae(this.italic);if(this.classes.length>0)t=t||document.createElement("span"),t.className=rr(this.classes);if(Object.keys(this.style).length>0)t=t||document.createElement("span"),Object.assign(t.style,this.style);if(t)return t.appendChild(e),t;else return e}toMarkup(){var e=!1,t="<span";if(this.classes.length)e=!0,t+=' class="',t+=At(rr(this.classes)),t+='"';var n="";if(this.italic>0)n+="margin-right:"+ae(this.italic)+";";if(n+=nl(this.style),n)e=!0,t+=' style="'+At(n)+'"';var r=At(this.text);if(e)return t+=">",t+=r,t+="</span>",t;else return r}}class pn{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t of Object.keys(this.attributes))e+=" "+t+'="'+At(this.attributes[t])+'"';e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}}class Nn{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");if(this.alternate)t.setAttribute("d",this.alternate);else t.setAttribute("d",Yc[this.pathName]);return t}toMarkup(){if(this.alternate)return'<path d="'+At(this.alternate)+'"/>';else return'<path d="'+At(Yc[this.pathName])+'"/>'}}class ra{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var e="<line";for(var t of Object.keys(this.attributes))e+=" "+t+'="'+At(this.attributes[t])+'"';return e+="/>",e}}function p4(e){if(e instanceof zt)return e;else throw Error("Expected symbolNode but got "+String(e)+".")}function g4(e){if(e instanceof Cr)return e;else throw Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var b4=(e)=>e instanceof Cr||e instanceof Qs||e instanceof Ar,mn={"AMS-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.68889,0,0,0.72222],"66":[0,0.68889,0,0,0.66667],"67":[0,0.68889,0,0,0.72222],"68":[0,0.68889,0,0,0.72222],"69":[0,0.68889,0,0,0.66667],"70":[0,0.68889,0,0,0.61111],"71":[0,0.68889,0,0,0.77778],"72":[0,0.68889,0,0,0.77778],"73":[0,0.68889,0,0,0.38889],"74":[0.16667,0.68889,0,0,0.5],"75":[0,0.68889,0,0,0.77778],"76":[0,0.68889,0,0,0.66667],"77":[0,0.68889,0,0,0.94445],"78":[0,0.68889,0,0,0.72222],"79":[0.16667,0.68889,0,0,0.77778],"80":[0,0.68889,0,0,0.61111],"81":[0.16667,0.68889,0,0,0.77778],"82":[0,0.68889,0,0,0.72222],"83":[0,0.68889,0,0,0.55556],"84":[0,0.68889,0,0,0.66667],"85":[0,0.68889,0,0,0.72222],"86":[0,0.68889,0,0,0.72222],"87":[0,0.68889,0,0,1],"88":[0,0.68889,0,0,0.72222],"89":[0,0.68889,0,0,0.72222],"90":[0,0.68889,0,0,0.66667],"107":[0,0.68889,0,0,0.55556],"160":[0,0,0,0,0.25],"165":[0,0.675,0.025,0,0.75],"174":[0.15559,0.69224,0,0,0.94666],"240":[0,0.68889,0,0,0.55556],"295":[0,0.68889,0,0,0.54028],"710":[0,0.825,0,0,2.33334],"732":[0,0.9,0,0,2.33334],"770":[0,0.825,0,0,2.33334],"771":[0,0.9,0,0,2.33334],"989":[0.08167,0.58167,0,0,0.77778],"1008":[0,0.43056,0.04028,0,0.66667],"8245":[0,0.54986,0,0,0.275],"8463":[0,0.68889,0,0,0.54028],"8487":[0,0.68889,0,0,0.72222],"8498":[0,0.68889,0,0,0.55556],"8502":[0,0.68889,0,0,0.66667],"8503":[0,0.68889,0,0,0.44445],"8504":[0,0.68889,0,0,0.66667],"8513":[0,0.68889,0,0,0.63889],"8592":[-0.03598,0.46402,0,0,0.5],"8594":[-0.03598,0.46402,0,0,0.5],"8602":[-0.13313,0.36687,0,0,1],"8603":[-0.13313,0.36687,0,0,1],"8606":[0.01354,0.52239,0,0,1],"8608":[0.01354,0.52239,0,0,1],"8610":[0.01354,0.52239,0,0,1.11111],"8611":[0.01354,0.52239,0,0,1.11111],"8619":[0,0.54986,0,0,1],"8620":[0,0.54986,0,0,1],"8621":[-0.13313,0.37788,0,0,1.38889],"8622":[-0.13313,0.36687,0,0,1],"8624":[0,0.69224,0,0,0.5],"8625":[0,0.69224,0,0,0.5],"8630":[0,0.43056,0,0,1],"8631":[0,0.43056,0,0,1],"8634":[0.08198,0.58198,0,0,0.77778],"8635":[0.08198,0.58198,0,0,0.77778],"8638":[0.19444,0.69224,0,0,0.41667],"8639":[0.19444,0.69224,0,0,0.41667],"8642":[0.19444,0.69224,0,0,0.41667],"8643":[0.19444,0.69224,0,0,0.41667],"8644":[0.1808,0.675,0,0,1],"8646":[0.1808,0.675,0,0,1],"8647":[0.1808,0.675,0,0,1],"8648":[0.19444,0.69224,0,0,0.83334],"8649":[0.1808,0.675,0,0,1],"8650":[0.19444,0.69224,0,0,0.83334],"8651":[0.01354,0.52239,0,0,1],"8652":[0.01354,0.52239,0,0,1],"8653":[-0.13313,0.36687,0,0,1],"8654":[-0.13313,0.36687,0,0,1],"8655":[-0.13313,0.36687,0,0,1],"8666":[0.13667,0.63667,0,0,1],"8667":[0.13667,0.63667,0,0,1],"8669":[-0.13313,0.37788,0,0,1],"8672":[-0.064,0.437,0,0,1.334],"8674":[-0.064,0.437,0,0,1.334],"8705":[0,0.825,0,0,0.5],"8708":[0,0.68889,0,0,0.55556],"8709":[0.08167,0.58167,0,0,0.77778],"8717":[0,0.43056,0,0,0.42917],"8722":[-0.03598,0.46402,0,0,0.5],"8724":[0.08198,0.69224,0,0,0.77778],"8726":[0.08167,0.58167,0,0,0.77778],"8733":[0,0.69224,0,0,0.77778],"8736":[0,0.69224,0,0,0.72222],"8737":[0,0.69224,0,0,0.72222],"8738":[0.03517,0.52239,0,0,0.72222],"8739":[0.08167,0.58167,0,0,0.22222],"8740":[0.25142,0.74111,0,0,0.27778],"8741":[0.08167,0.58167,0,0,0.38889],"8742":[0.25142,0.74111,0,0,0.5],"8756":[0,0.69224,0,0,0.66667],"8757":[0,0.69224,0,0,0.66667],"8764":[-0.13313,0.36687,0,0,0.77778],"8765":[-0.13313,0.37788,0,0,0.77778],"8769":[-0.13313,0.36687,0,0,0.77778],"8770":[-0.03625,0.46375,0,0,0.77778],"8774":[0.30274,0.79383,0,0,0.77778],"8776":[-0.01688,0.48312,0,0,0.77778],"8778":[0.08167,0.58167,0,0,0.77778],"8782":[0.06062,0.54986,0,0,0.77778],"8783":[0.06062,0.54986,0,0,0.77778],"8785":[0.08198,0.58198,0,0,0.77778],"8786":[0.08198,0.58198,0,0,0.77778],"8787":[0.08198,0.58198,0,0,0.77778],"8790":[0,0.69224,0,0,0.77778],"8791":[0.22958,0.72958,0,0,0.77778],"8796":[0.08198,0.91667,0,0,0.77778],"8806":[0.25583,0.75583,0,0,0.77778],"8807":[0.25583,0.75583,0,0,0.77778],"8808":[0.25142,0.75726,0,0,0.77778],"8809":[0.25142,0.75726,0,0,0.77778],"8812":[0.25583,0.75583,0,0,0.5],"8814":[0.20576,0.70576,0,0,0.77778],"8815":[0.20576,0.70576,0,0,0.77778],"8816":[0.30274,0.79383,0,0,0.77778],"8817":[0.30274,0.79383,0,0,0.77778],"8818":[0.22958,0.72958,0,0,0.77778],"8819":[0.22958,0.72958,0,0,0.77778],"8822":[0.1808,0.675,0,0,0.77778],"8823":[0.1808,0.675,0,0,0.77778],"8828":[0.13667,0.63667,0,0,0.77778],"8829":[0.13667,0.63667,0,0,0.77778],"8830":[0.22958,0.72958,0,0,0.77778],"8831":[0.22958,0.72958,0,0,0.77778],"8832":[0.20576,0.70576,0,0,0.77778],"8833":[0.20576,0.70576,0,0,0.77778],"8840":[0.30274,0.79383,0,0,0.77778],"8841":[0.30274,0.79383,0,0,0.77778],"8842":[0.13597,0.63597,0,0,0.77778],"8843":[0.13597,0.63597,0,0,0.77778],"8847":[0.03517,0.54986,0,0,0.77778],"8848":[0.03517,0.54986,0,0,0.77778],"8858":[0.08198,0.58198,0,0,0.77778],"8859":[0.08198,0.58198,0,0,0.77778],"8861":[0.08198,0.58198,0,0,0.77778],"8862":[0,0.675,0,0,0.77778],"8863":[0,0.675,0,0,0.77778],"8864":[0,0.675,0,0,0.77778],"8865":[0,0.675,0,0,0.77778],"8872":[0,0.69224,0,0,0.61111],"8873":[0,0.69224,0,0,0.72222],"8874":[0,0.69224,0,0,0.88889],"8876":[0,0.68889,0,0,0.61111],"8877":[0,0.68889,0,0,0.61111],"8878":[0,0.68889,0,0,0.72222],"8879":[0,0.68889,0,0,0.72222],"8882":[0.03517,0.54986,0,0,0.77778],"8883":[0.03517,0.54986,0,0,0.77778],"8884":[0.13667,0.63667,0,0,0.77778],"8885":[0.13667,0.63667,0,0,0.77778],"8888":[0,0.54986,0,0,1.11111],"8890":[0.19444,0.43056,0,0,0.55556],"8891":[0.19444,0.69224,0,0,0.61111],"8892":[0.19444,0.69224,0,0,0.61111],"8901":[0,0.54986,0,0,0.27778],"8903":[0.08167,0.58167,0,0,0.77778],"8905":[0.08167,0.58167,0,0,0.77778],"8906":[0.08167,0.58167,0,0,0.77778],"8907":[0,0.69224,0,0,0.77778],"8908":[0,0.69224,0,0,0.77778],"8909":[-0.03598,0.46402,0,0,0.77778],"8910":[0,0.54986,0,0,0.76042],"8911":[0,0.54986,0,0,0.76042],"8912":[0.03517,0.54986,0,0,0.77778],"8913":[0.03517,0.54986,0,0,0.77778],"8914":[0,0.54986,0,0,0.66667],"8915":[0,0.54986,0,0,0.66667],"8916":[0,0.69224,0,0,0.66667],"8918":[0.0391,0.5391,0,0,0.77778],"8919":[0.0391,0.5391,0,0,0.77778],"8920":[0.03517,0.54986,0,0,1.33334],"8921":[0.03517,0.54986,0,0,1.33334],"8922":[0.38569,0.88569,0,0,0.77778],"8923":[0.38569,0.88569,0,0,0.77778],"8926":[0.13667,0.63667,0,0,0.77778],"8927":[0.13667,0.63667,0,0,0.77778],"8928":[0.30274,0.79383,0,0,0.77778],"8929":[0.30274,0.79383,0,0,0.77778],"8934":[0.23222,0.74111,0,0,0.77778],"8935":[0.23222,0.74111,0,0,0.77778],"8936":[0.23222,0.74111,0,0,0.77778],"8937":[0.23222,0.74111,0,0,0.77778],"8938":[0.20576,0.70576,0,0,0.77778],"8939":[0.20576,0.70576,0,0,0.77778],"8940":[0.30274,0.79383,0,0,0.77778],"8941":[0.30274,0.79383,0,0,0.77778],"8994":[0.19444,0.69224,0,0,0.77778],"8995":[0.19444,0.69224,0,0,0.77778],"9416":[0.15559,0.69224,0,0,0.90222],"9484":[0,0.69224,0,0,0.5],"9488":[0,0.69224,0,0,0.5],"9492":[0,0.37788,0,0,0.5],"9496":[0,0.37788,0,0,0.5],"9585":[0.19444,0.68889,0,0,0.88889],"9586":[0.19444,0.74111,0,0,0.88889],"9632":[0,0.675,0,0,0.77778],"9633":[0,0.675,0,0,0.77778],"9650":[0,0.54986,0,0,0.72222],"9651":[0,0.54986,0,0,0.72222],"9654":[0.03517,0.54986,0,0,0.77778],"9660":[0,0.54986,0,0,0.72222],"9661":[0,0.54986,0,0,0.72222],"9664":[0.03517,0.54986,0,0,0.77778],"9674":[0.11111,0.69224,0,0,0.66667],"9733":[0.19444,0.69224,0,0,0.94445],"10003":[0,0.69224,0,0,0.83334],"10016":[0,0.69224,0,0,0.83334],"10731":[0.11111,0.69224,0,0,0.66667],"10846":[0.19444,0.75583,0,0,0.61111],"10877":[0.13667,0.63667,0,0,0.77778],"10878":[0.13667,0.63667,0,0,0.77778],"10885":[0.25583,0.75583,0,0,0.77778],"10886":[0.25583,0.75583,0,0,0.77778],"10887":[0.13597,0.63597,0,0,0.77778],"10888":[0.13597,0.63597,0,0,0.77778],"10889":[0.26167,0.75726,0,0,0.77778],"10890":[0.26167,0.75726,0,0,0.77778],"10891":[0.48256,0.98256,0,0,0.77778],"10892":[0.48256,0.98256,0,0,0.77778],"10901":[0.13667,0.63667,0,0,0.77778],"10902":[0.13667,0.63667,0,0,0.77778],"10933":[0.25142,0.75726,0,0,0.77778],"10934":[0.25142,0.75726,0,0,0.77778],"10935":[0.26167,0.75726,0,0,0.77778],"10936":[0.26167,0.75726,0,0,0.77778],"10937":[0.26167,0.75726,0,0,0.77778],"10938":[0.26167,0.75726,0,0,0.77778],"10949":[0.25583,0.75583,0,0,0.77778],"10950":[0.25583,0.75583,0,0,0.77778],"10955":[0.28481,0.79383,0,0,0.77778],"10956":[0.28481,0.79383,0,0,0.77778],"57350":[0.08167,0.58167,0,0,0.22222],"57351":[0.08167,0.58167,0,0,0.38889],"57352":[0.08167,0.58167,0,0,0.77778],"57353":[0,0.43056,0.04028,0,0.66667],"57356":[0.25142,0.75726,0,0,0.77778],"57357":[0.25142,0.75726,0,0,0.77778],"57358":[0.41951,0.91951,0,0,0.77778],"57359":[0.30274,0.79383,0,0,0.77778],"57360":[0.30274,0.79383,0,0,0.77778],"57361":[0.41951,0.91951,0,0,0.77778],"57366":[0.25142,0.75726,0,0,0.77778],"57367":[0.25142,0.75726,0,0,0.77778],"57368":[0.25142,0.75726,0,0,0.77778],"57369":[0.25142,0.75726,0,0,0.77778],"57370":[0.13597,0.63597,0,0,0.77778],"57371":[0.13597,0.63597,0,0,0.77778]},"Caligraphic-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.68333,0,0.19445,0.79847],"66":[0,0.68333,0.03041,0.13889,0.65681],"67":[0,0.68333,0.05834,0.13889,0.52653],"68":[0,0.68333,0.02778,0.08334,0.77139],"69":[0,0.68333,0.08944,0.11111,0.52778],"70":[0,0.68333,0.09931,0.11111,0.71875],"71":[0.09722,0.68333,0.0593,0.11111,0.59487],"72":[0,0.68333,0.00965,0.11111,0.84452],"73":[0,0.68333,0.07382,0,0.54452],"74":[0.09722,0.68333,0.18472,0.16667,0.67778],"75":[0,0.68333,0.01445,0.05556,0.76195],"76":[0,0.68333,0,0.13889,0.68972],"77":[0,0.68333,0,0.13889,1.2009],"78":[0,0.68333,0.14736,0.08334,0.82049],"79":[0,0.68333,0.02778,0.11111,0.79611],"80":[0,0.68333,0.08222,0.08334,0.69556],"81":[0.09722,0.68333,0,0.11111,0.81667],"82":[0,0.68333,0,0.08334,0.8475],"83":[0,0.68333,0.075,0.13889,0.60556],"84":[0,0.68333,0.25417,0,0.54464],"85":[0,0.68333,0.09931,0.08334,0.62583],"86":[0,0.68333,0.08222,0,0.61278],"87":[0,0.68333,0.08222,0.08334,0.98778],"88":[0,0.68333,0.14643,0.13889,0.7133],"89":[0.09722,0.68333,0.08222,0.08334,0.66834],"90":[0,0.68333,0.07944,0.13889,0.72473],"160":[0,0,0,0,0.25]},"Fraktur-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69141,0,0,0.29574],"34":[0,0.69141,0,0,0.21471],"38":[0,0.69141,0,0,0.73786],"39":[0,0.69141,0,0,0.21201],"40":[0.24982,0.74947,0,0,0.38865],"41":[0.24982,0.74947,0,0,0.38865],"42":[0,0.62119,0,0,0.27764],"43":[0.08319,0.58283,0,0,0.75623],"44":[0,0.10803,0,0,0.27764],"45":[0.08319,0.58283,0,0,0.75623],"46":[0,0.10803,0,0,0.27764],"47":[0.24982,0.74947,0,0,0.50181],"48":[0,0.47534,0,0,0.50181],"49":[0,0.47534,0,0,0.50181],"50":[0,0.47534,0,0,0.50181],"51":[0.18906,0.47534,0,0,0.50181],"52":[0.18906,0.47534,0,0,0.50181],"53":[0.18906,0.47534,0,0,0.50181],"54":[0,0.69141,0,0,0.50181],"55":[0.18906,0.47534,0,0,0.50181],"56":[0,0.69141,0,0,0.50181],"57":[0.18906,0.47534,0,0,0.50181],"58":[0,0.47534,0,0,0.21606],"59":[0.12604,0.47534,0,0,0.21606],"61":[-0.13099,0.36866,0,0,0.75623],"63":[0,0.69141,0,0,0.36245],"65":[0,0.69141,0,0,0.7176],"66":[0,0.69141,0,0,0.88397],"67":[0,0.69141,0,0,0.61254],"68":[0,0.69141,0,0,0.83158],"69":[0,0.69141,0,0,0.66278],"70":[0.12604,0.69141,0,0,0.61119],"71":[0,0.69141,0,0,0.78539],"72":[0.06302,0.69141,0,0,0.7203],"73":[0,0.69141,0,0,0.55448],"74":[0.12604,0.69141,0,0,0.55231],"75":[0,0.69141,0,0,0.66845],"76":[0,0.69141,0,0,0.66602],"77":[0,0.69141,0,0,1.04953],"78":[0,0.69141,0,0,0.83212],"79":[0,0.69141,0,0,0.82699],"80":[0.18906,0.69141,0,0,0.82753],"81":[0.03781,0.69141,0,0,0.82699],"82":[0,0.69141,0,0,0.82807],"83":[0,0.69141,0,0,0.82861],"84":[0,0.69141,0,0,0.66899],"85":[0,0.69141,0,0,0.64576],"86":[0,0.69141,0,0,0.83131],"87":[0,0.69141,0,0,1.04602],"88":[0,0.69141,0,0,0.71922],"89":[0.18906,0.69141,0,0,0.83293],"90":[0.12604,0.69141,0,0,0.60201],"91":[0.24982,0.74947,0,0,0.27764],"93":[0.24982,0.74947,0,0,0.27764],"94":[0,0.69141,0,0,0.49965],"97":[0,0.47534,0,0,0.50046],"98":[0,0.69141,0,0,0.51315],"99":[0,0.47534,0,0,0.38946],"100":[0,0.62119,0,0,0.49857],"101":[0,0.47534,0,0,0.40053],"102":[0.18906,0.69141,0,0,0.32626],"103":[0.18906,0.47534,0,0,0.5037],"104":[0.18906,0.69141,0,0,0.52126],"105":[0,0.69141,0,0,0.27899],"106":[0,0.69141,0,0,0.28088],"107":[0,0.69141,0,0,0.38946],"108":[0,0.69141,0,0,0.27953],"109":[0,0.47534,0,0,0.76676],"110":[0,0.47534,0,0,0.52666],"111":[0,0.47534,0,0,0.48885],"112":[0.18906,0.52396,0,0,0.50046],"113":[0.18906,0.47534,0,0,0.48912],"114":[0,0.47534,0,0,0.38919],"115":[0,0.47534,0,0,0.44266],"116":[0,0.62119,0,0,0.33301],"117":[0,0.47534,0,0,0.5172],"118":[0,0.52396,0,0,0.5118],"119":[0,0.52396,0,0,0.77351],"120":[0.18906,0.47534,0,0,0.38865],"121":[0.18906,0.47534,0,0,0.49884],"122":[0.18906,0.47534,0,0,0.39054],"160":[0,0,0,0,0.25],"8216":[0,0.69141,0,0,0.21471],"8217":[0,0.69141,0,0,0.21471],"58112":[0,0.62119,0,0,0.49749],"58113":[0,0.62119,0,0,0.4983],"58114":[0.18906,0.69141,0,0,0.33328],"58115":[0.18906,0.69141,0,0,0.32923],"58116":[0.18906,0.47534,0,0,0.50343],"58117":[0,0.69141,0,0,0.33301],"58118":[0,0.62119,0,0,0.33409],"58119":[0,0.47534,0,0,0.50073]},"Main-Bold":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.35],"34":[0,0.69444,0,0,0.60278],"35":[0.19444,0.69444,0,0,0.95833],"36":[0.05556,0.75,0,0,0.575],"37":[0.05556,0.75,0,0,0.95833],"38":[0,0.69444,0,0,0.89444],"39":[0,0.69444,0,0,0.31944],"40":[0.25,0.75,0,0,0.44722],"41":[0.25,0.75,0,0,0.44722],"42":[0,0.75,0,0,0.575],"43":[0.13333,0.63333,0,0,0.89444],"44":[0.19444,0.15556,0,0,0.31944],"45":[0,0.44444,0,0,0.38333],"46":[0,0.15556,0,0,0.31944],"47":[0.25,0.75,0,0,0.575],"48":[0,0.64444,0,0,0.575],"49":[0,0.64444,0,0,0.575],"50":[0,0.64444,0,0,0.575],"51":[0,0.64444,0,0,0.575],"52":[0,0.64444,0,0,0.575],"53":[0,0.64444,0,0,0.575],"54":[0,0.64444,0,0,0.575],"55":[0,0.64444,0,0,0.575],"56":[0,0.64444,0,0,0.575],"57":[0,0.64444,0,0,0.575],"58":[0,0.44444,0,0,0.31944],"59":[0.19444,0.44444,0,0,0.31944],"60":[0.08556,0.58556,0,0,0.89444],"61":[-0.10889,0.39111,0,0,0.89444],"62":[0.08556,0.58556,0,0,0.89444],"63":[0,0.69444,0,0,0.54305],"64":[0,0.69444,0,0,0.89444],"65":[0,0.68611,0,0,0.86944],"66":[0,0.68611,0,0,0.81805],"67":[0,0.68611,0,0,0.83055],"68":[0,0.68611,0,0,0.88194],"69":[0,0.68611,0,0,0.75555],"70":[0,0.68611,0,0,0.72361],"71":[0,0.68611,0,0,0.90416],"72":[0,0.68611,0,0,0.9],"73":[0,0.68611,0,0,0.43611],"74":[0,0.68611,0,0,0.59444],"75":[0,0.68611,0,0,0.90138],"76":[0,0.68611,0,0,0.69166],"77":[0,0.68611,0,0,1.09166],"78":[0,0.68611,0,0,0.9],"79":[0,0.68611,0,0,0.86388],"80":[0,0.68611,0,0,0.78611],"81":[0.19444,0.68611,0,0,0.86388],"82":[0,0.68611,0,0,0.8625],"83":[0,0.68611,0,0,0.63889],"84":[0,0.68611,0,0,0.8],"85":[0,0.68611,0,0,0.88472],"86":[0,0.68611,0.01597,0,0.86944],"87":[0,0.68611,0.01597,0,1.18888],"88":[0,0.68611,0,0,0.86944],"89":[0,0.68611,0.02875,0,0.86944],"90":[0,0.68611,0,0,0.70277],"91":[0.25,0.75,0,0,0.31944],"92":[0.25,0.75,0,0,0.575],"93":[0.25,0.75,0,0,0.31944],"94":[0,0.69444,0,0,0.575],"95":[0.31,0.13444,0.03194,0,0.575],"97":[0,0.44444,0,0,0.55902],"98":[0,0.69444,0,0,0.63889],"99":[0,0.44444,0,0,0.51111],"100":[0,0.69444,0,0,0.63889],"101":[0,0.44444,0,0,0.52708],"102":[0,0.69444,0.10903,0,0.35139],"103":[0.19444,0.44444,0.01597,0,0.575],"104":[0,0.69444,0,0,0.63889],"105":[0,0.69444,0,0,0.31944],"106":[0.19444,0.69444,0,0,0.35139],"107":[0,0.69444,0,0,0.60694],"108":[0,0.69444,0,0,0.31944],"109":[0,0.44444,0,0,0.95833],"110":[0,0.44444,0,0,0.63889],"111":[0,0.44444,0,0,0.575],"112":[0.19444,0.44444,0,0,0.63889],"113":[0.19444,0.44444,0,0,0.60694],"114":[0,0.44444,0,0,0.47361],"115":[0,0.44444,0,0,0.45361],"116":[0,0.63492,0,0,0.44722],"117":[0,0.44444,0,0,0.63889],"118":[0,0.44444,0.01597,0,0.60694],"119":[0,0.44444,0.01597,0,0.83055],"120":[0,0.44444,0,0,0.60694],"121":[0.19444,0.44444,0.01597,0,0.60694],"122":[0,0.44444,0,0,0.51111],"123":[0.25,0.75,0,0,0.575],"124":[0.25,0.75,0,0,0.31944],"125":[0.25,0.75,0,0,0.575],"126":[0.35,0.34444,0,0,0.575],"160":[0,0,0,0,0.25],"163":[0,0.69444,0,0,0.86853],"168":[0,0.69444,0,0,0.575],"172":[0,0.44444,0,0,0.76666],"176":[0,0.69444,0,0,0.86944],"177":[0.13333,0.63333,0,0,0.89444],"184":[0.17014,0,0,0,0.51111],"198":[0,0.68611,0,0,1.04166],"215":[0.13333,0.63333,0,0,0.89444],"216":[0.04861,0.73472,0,0,0.89444],"223":[0,0.69444,0,0,0.59722],"230":[0,0.44444,0,0,0.83055],"247":[0.13333,0.63333,0,0,0.89444],"248":[0.09722,0.54167,0,0,0.575],"305":[0,0.44444,0,0,0.31944],"338":[0,0.68611,0,0,1.16944],"339":[0,0.44444,0,0,0.89444],"567":[0.19444,0.44444,0,0,0.35139],"710":[0,0.69444,0,0,0.575],"711":[0,0.63194,0,0,0.575],"713":[0,0.59611,0,0,0.575],"714":[0,0.69444,0,0,0.575],"715":[0,0.69444,0,0,0.575],"728":[0,0.69444,0,0,0.575],"729":[0,0.69444,0,0,0.31944],"730":[0,0.69444,0,0,0.86944],"732":[0,0.69444,0,0,0.575],"733":[0,0.69444,0,0,0.575],"915":[0,0.68611,0,0,0.69166],"916":[0,0.68611,0,0,0.95833],"920":[0,0.68611,0,0,0.89444],"923":[0,0.68611,0,0,0.80555],"926":[0,0.68611,0,0,0.76666],"928":[0,0.68611,0,0,0.9],"931":[0,0.68611,0,0,0.83055],"933":[0,0.68611,0,0,0.89444],"934":[0,0.68611,0,0,0.83055],"936":[0,0.68611,0,0,0.89444],"937":[0,0.68611,0,0,0.83055],"8211":[0,0.44444,0.03194,0,0.575],"8212":[0,0.44444,0.03194,0,1.14999],"8216":[0,0.69444,0,0,0.31944],"8217":[0,0.69444,0,0,0.31944],"8220":[0,0.69444,0,0,0.60278],"8221":[0,0.69444,0,0,0.60278],"8224":[0.19444,0.69444,0,0,0.51111],"8225":[0.19444,0.69444,0,0,0.51111],"8242":[0,0.55556,0,0,0.34444],"8407":[0,0.72444,0.15486,0,0.575],"8463":[0,0.69444,0,0,0.66759],"8465":[0,0.69444,0,0,0.83055],"8467":[0,0.69444,0,0,0.47361],"8472":[0.19444,0.44444,0,0,0.74027],"8476":[0,0.69444,0,0,0.83055],"8501":[0,0.69444,0,0,0.70277],"8592":[-0.10889,0.39111,0,0,1.14999],"8593":[0.19444,0.69444,0,0,0.575],"8594":[-0.10889,0.39111,0,0,1.14999],"8595":[0.19444,0.69444,0,0,0.575],"8596":[-0.10889,0.39111,0,0,1.14999],"8597":[0.25,0.75,0,0,0.575],"8598":[0.19444,0.69444,0,0,1.14999],"8599":[0.19444,0.69444,0,0,1.14999],"8600":[0.19444,0.69444,0,0,1.14999],"8601":[0.19444,0.69444,0,0,1.14999],"8636":[-0.10889,0.39111,0,0,1.14999],"8637":[-0.10889,0.39111,0,0,1.14999],"8640":[-0.10889,0.39111,0,0,1.14999],"8641":[-0.10889,0.39111,0,0,1.14999],"8656":[-0.10889,0.39111,0,0,1.14999],"8657":[0.19444,0.69444,0,0,0.70277],"8658":[-0.10889,0.39111,0,0,1.14999],"8659":[0.19444,0.69444,0,0,0.70277],"8660":[-0.10889,0.39111,0,0,1.14999],"8661":[0.25,0.75,0,0,0.70277],"8704":[0,0.69444,0,0,0.63889],"8706":[0,0.69444,0.06389,0,0.62847],"8707":[0,0.69444,0,0,0.63889],"8709":[0.05556,0.75,0,0,0.575],"8711":[0,0.68611,0,0,0.95833],"8712":[0.08556,0.58556,0,0,0.76666],"8715":[0.08556,0.58556,0,0,0.76666],"8722":[0.13333,0.63333,0,0,0.89444],"8723":[0.13333,0.63333,0,0,0.89444],"8725":[0.25,0.75,0,0,0.575],"8726":[0.25,0.75,0,0,0.575],"8727":[-0.02778,0.47222,0,0,0.575],"8728":[-0.02639,0.47361,0,0,0.575],"8729":[-0.02639,0.47361,0,0,0.575],"8730":[0.18,0.82,0,0,0.95833],"8733":[0,0.44444,0,0,0.89444],"8734":[0,0.44444,0,0,1.14999],"8736":[0,0.69224,0,0,0.72222],"8739":[0.25,0.75,0,0,0.31944],"8741":[0.25,0.75,0,0,0.575],"8743":[0,0.55556,0,0,0.76666],"8744":[0,0.55556,0,0,0.76666],"8745":[0,0.55556,0,0,0.76666],"8746":[0,0.55556,0,0,0.76666],"8747":[0.19444,0.69444,0.12778,0,0.56875],"8764":[-0.10889,0.39111,0,0,0.89444],"8768":[0.19444,0.69444,0,0,0.31944],"8771":[0.00222,0.50222,0,0,0.89444],"8773":[0.027,0.638,0,0,0.894],"8776":[0.02444,0.52444,0,0,0.89444],"8781":[0.00222,0.50222,0,0,0.89444],"8801":[0.00222,0.50222,0,0,0.89444],"8804":[0.19667,0.69667,0,0,0.89444],"8805":[0.19667,0.69667,0,0,0.89444],"8810":[0.08556,0.58556,0,0,1.14999],"8811":[0.08556,0.58556,0,0,1.14999],"8826":[0.08556,0.58556,0,0,0.89444],"8827":[0.08556,0.58556,0,0,0.89444],"8834":[0.08556,0.58556,0,0,0.89444],"8835":[0.08556,0.58556,0,0,0.89444],"8838":[0.19667,0.69667,0,0,0.89444],"8839":[0.19667,0.69667,0,0,0.89444],"8846":[0,0.55556,0,0,0.76666],"8849":[0.19667,0.69667,0,0,0.89444],"8850":[0.19667,0.69667,0,0,0.89444],"8851":[0,0.55556,0,0,0.76666],"8852":[0,0.55556,0,0,0.76666],"8853":[0.13333,0.63333,0,0,0.89444],"8854":[0.13333,0.63333,0,0,0.89444],"8855":[0.13333,0.63333,0,0,0.89444],"8856":[0.13333,0.63333,0,0,0.89444],"8857":[0.13333,0.63333,0,0,0.89444],"8866":[0,0.69444,0,0,0.70277],"8867":[0,0.69444,0,0,0.70277],"8868":[0,0.69444,0,0,0.89444],"8869":[0,0.69444,0,0,0.89444],"8900":[-0.02639,0.47361,0,0,0.575],"8901":[-0.02639,0.47361,0,0,0.31944],"8902":[-0.02778,0.47222,0,0,0.575],"8968":[0.25,0.75,0,0,0.51111],"8969":[0.25,0.75,0,0,0.51111],"8970":[0.25,0.75,0,0,0.51111],"8971":[0.25,0.75,0,0,0.51111],"8994":[-0.13889,0.36111,0,0,1.14999],"8995":[-0.13889,0.36111,0,0,1.14999],"9651":[0.19444,0.69444,0,0,1.02222],"9657":[-0.02778,0.47222,0,0,0.575],"9661":[0.19444,0.69444,0,0,1.02222],"9667":[-0.02778,0.47222,0,0,0.575],"9711":[0.19444,0.69444,0,0,1.14999],"9824":[0.12963,0.69444,0,0,0.89444],"9825":[0.12963,0.69444,0,0,0.89444],"9826":[0.12963,0.69444,0,0,0.89444],"9827":[0.12963,0.69444,0,0,0.89444],"9837":[0,0.75,0,0,0.44722],"9838":[0.19444,0.69444,0,0,0.44722],"9839":[0.19444,0.69444,0,0,0.44722],"10216":[0.25,0.75,0,0,0.44722],"10217":[0.25,0.75,0,0,0.44722],"10815":[0,0.68611,0,0,0.9],"10927":[0.19667,0.69667,0,0,0.89444],"10928":[0.19667,0.69667,0,0,0.89444],"57376":[0.19444,0.69444,0,0,0]},"Main-BoldItalic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.11417,0,0.38611],"34":[0,0.69444,0.07939,0,0.62055],"35":[0.19444,0.69444,0.06833,0,0.94444],"37":[0.05556,0.75,0.12861,0,0.94444],"38":[0,0.69444,0.08528,0,0.88555],"39":[0,0.69444,0.12945,0,0.35555],"40":[0.25,0.75,0.15806,0,0.47333],"41":[0.25,0.75,0.03306,0,0.47333],"42":[0,0.75,0.14333,0,0.59111],"43":[0.10333,0.60333,0.03306,0,0.88555],"44":[0.19444,0.14722,0,0,0.35555],"45":[0,0.44444,0.02611,0,0.41444],"46":[0,0.14722,0,0,0.35555],"47":[0.25,0.75,0.15806,0,0.59111],"48":[0,0.64444,0.13167,0,0.59111],"49":[0,0.64444,0.13167,0,0.59111],"50":[0,0.64444,0.13167,0,0.59111],"51":[0,0.64444,0.13167,0,0.59111],"52":[0.19444,0.64444,0.13167,0,0.59111],"53":[0,0.64444,0.13167,0,0.59111],"54":[0,0.64444,0.13167,0,0.59111],"55":[0.19444,0.64444,0.13167,0,0.59111],"56":[0,0.64444,0.13167,0,0.59111],"57":[0,0.64444,0.13167,0,0.59111],"58":[0,0.44444,0.06695,0,0.35555],"59":[0.19444,0.44444,0.06695,0,0.35555],"61":[-0.10889,0.39111,0.06833,0,0.88555],"63":[0,0.69444,0.11472,0,0.59111],"64":[0,0.69444,0.09208,0,0.88555],"65":[0,0.68611,0,0,0.86555],"66":[0,0.68611,0.0992,0,0.81666],"67":[0,0.68611,0.14208,0,0.82666],"68":[0,0.68611,0.09062,0,0.87555],"69":[0,0.68611,0.11431,0,0.75666],"70":[0,0.68611,0.12903,0,0.72722],"71":[0,0.68611,0.07347,0,0.89527],"72":[0,0.68611,0.17208,0,0.8961],"73":[0,0.68611,0.15681,0,0.47166],"74":[0,0.68611,0.145,0,0.61055],"75":[0,0.68611,0.14208,0,0.89499],"76":[0,0.68611,0,0,0.69777],"77":[0,0.68611,0.17208,0,1.07277],"78":[0,0.68611,0.17208,0,0.8961],"79":[0,0.68611,0.09062,0,0.85499],"80":[0,0.68611,0.0992,0,0.78721],"81":[0.19444,0.68611,0.09062,0,0.85499],"82":[0,0.68611,0.02559,0,0.85944],"83":[0,0.68611,0.11264,0,0.64999],"84":[0,0.68611,0.12903,0,0.7961],"85":[0,0.68611,0.17208,0,0.88083],"86":[0,0.68611,0.18625,0,0.86555],"87":[0,0.68611,0.18625,0,1.15999],"88":[0,0.68611,0.15681,0,0.86555],"89":[0,0.68611,0.19803,0,0.86555],"90":[0,0.68611,0.14208,0,0.70888],"91":[0.25,0.75,0.1875,0,0.35611],"93":[0.25,0.75,0.09972,0,0.35611],"94":[0,0.69444,0.06709,0,0.59111],"95":[0.31,0.13444,0.09811,0,0.59111],"97":[0,0.44444,0.09426,0,0.59111],"98":[0,0.69444,0.07861,0,0.53222],"99":[0,0.44444,0.05222,0,0.53222],"100":[0,0.69444,0.10861,0,0.59111],"101":[0,0.44444,0.085,0,0.53222],"102":[0.19444,0.69444,0.21778,0,0.4],"103":[0.19444,0.44444,0.105,0,0.53222],"104":[0,0.69444,0.09426,0,0.59111],"105":[0,0.69326,0.11387,0,0.35555],"106":[0.19444,0.69326,0.1672,0,0.35555],"107":[0,0.69444,0.11111,0,0.53222],"108":[0,0.69444,0.10861,0,0.29666],"109":[0,0.44444,0.09426,0,0.94444],"110":[0,0.44444,0.09426,0,0.64999],"111":[0,0.44444,0.07861,0,0.59111],"112":[0.19444,0.44444,0.07861,0,0.59111],"113":[0.19444,0.44444,0.105,0,0.53222],"114":[0,0.44444,0.11111,0,0.50167],"115":[0,0.44444,0.08167,0,0.48694],"116":[0,0.63492,0.09639,0,0.385],"117":[0,0.44444,0.09426,0,0.62055],"118":[0,0.44444,0.11111,0,0.53222],"119":[0,0.44444,0.11111,0,0.76777],"120":[0,0.44444,0.12583,0,0.56055],"121":[0.19444,0.44444,0.105,0,0.56166],"122":[0,0.44444,0.13889,0,0.49055],"126":[0.35,0.34444,0.11472,0,0.59111],"160":[0,0,0,0,0.25],"168":[0,0.69444,0.11473,0,0.59111],"176":[0,0.69444,0,0,0.94888],"184":[0.17014,0,0,0,0.53222],"198":[0,0.68611,0.11431,0,1.02277],"216":[0.04861,0.73472,0.09062,0,0.88555],"223":[0.19444,0.69444,0.09736,0,0.665],"230":[0,0.44444,0.085,0,0.82666],"248":[0.09722,0.54167,0.09458,0,0.59111],"305":[0,0.44444,0.09426,0,0.35555],"338":[0,0.68611,0.11431,0,1.14054],"339":[0,0.44444,0.085,0,0.82666],"567":[0.19444,0.44444,0.04611,0,0.385],"710":[0,0.69444,0.06709,0,0.59111],"711":[0,0.63194,0.08271,0,0.59111],"713":[0,0.59444,0.10444,0,0.59111],"714":[0,0.69444,0.08528,0,0.59111],"715":[0,0.69444,0,0,0.59111],"728":[0,0.69444,0.10333,0,0.59111],"729":[0,0.69444,0.12945,0,0.35555],"730":[0,0.69444,0,0,0.94888],"732":[0,0.69444,0.11472,0,0.59111],"733":[0,0.69444,0.11472,0,0.59111],"915":[0,0.68611,0.12903,0,0.69777],"916":[0,0.68611,0,0,0.94444],"920":[0,0.68611,0.09062,0,0.88555],"923":[0,0.68611,0,0,0.80666],"926":[0,0.68611,0.15092,0,0.76777],"928":[0,0.68611,0.17208,0,0.8961],"931":[0,0.68611,0.11431,0,0.82666],"933":[0,0.68611,0.10778,0,0.88555],"934":[0,0.68611,0.05632,0,0.82666],"936":[0,0.68611,0.10778,0,0.88555],"937":[0,0.68611,0.0992,0,0.82666],"8211":[0,0.44444,0.09811,0,0.59111],"8212":[0,0.44444,0.09811,0,1.18221],"8216":[0,0.69444,0.12945,0,0.35555],"8217":[0,0.69444,0.12945,0,0.35555],"8220":[0,0.69444,0.16772,0,0.62055],"8221":[0,0.69444,0.07939,0,0.62055]},"Main-Italic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.12417,0,0.30667],"34":[0,0.69444,0.06961,0,0.51444],"35":[0.19444,0.69444,0.06616,0,0.81777],"37":[0.05556,0.75,0.13639,0,0.81777],"38":[0,0.69444,0.09694,0,0.76666],"39":[0,0.69444,0.12417,0,0.30667],"40":[0.25,0.75,0.16194,0,0.40889],"41":[0.25,0.75,0.03694,0,0.40889],"42":[0,0.75,0.14917,0,0.51111],"43":[0.05667,0.56167,0.03694,0,0.76666],"44":[0.19444,0.10556,0,0,0.30667],"45":[0,0.43056,0.02826,0,0.35778],"46":[0,0.10556,0,0,0.30667],"47":[0.25,0.75,0.16194,0,0.51111],"48":[0,0.64444,0.13556,0,0.51111],"49":[0,0.64444,0.13556,0,0.51111],"50":[0,0.64444,0.13556,0,0.51111],"51":[0,0.64444,0.13556,0,0.51111],"52":[0.19444,0.64444,0.13556,0,0.51111],"53":[0,0.64444,0.13556,0,0.51111],"54":[0,0.64444,0.13556,0,0.51111],"55":[0.19444,0.64444,0.13556,0,0.51111],"56":[0,0.64444,0.13556,0,0.51111],"57":[0,0.64444,0.13556,0,0.51111],"58":[0,0.43056,0.0582,0,0.30667],"59":[0.19444,0.43056,0.0582,0,0.30667],"61":[-0.13313,0.36687,0.06616,0,0.76666],"63":[0,0.69444,0.1225,0,0.51111],"64":[0,0.69444,0.09597,0,0.76666],"65":[0,0.68333,0,0,0.74333],"66":[0,0.68333,0.10257,0,0.70389],"67":[0,0.68333,0.14528,0,0.71555],"68":[0,0.68333,0.09403,0,0.755],"69":[0,0.68333,0.12028,0,0.67833],"70":[0,0.68333,0.13305,0,0.65277],"71":[0,0.68333,0.08722,0,0.77361],"72":[0,0.68333,0.16389,0,0.74333],"73":[0,0.68333,0.15806,0,0.38555],"74":[0,0.68333,0.14028,0,0.525],"75":[0,0.68333,0.14528,0,0.76888],"76":[0,0.68333,0,0,0.62722],"77":[0,0.68333,0.16389,0,0.89666],"78":[0,0.68333,0.16389,0,0.74333],"79":[0,0.68333,0.09403,0,0.76666],"80":[0,0.68333,0.10257,0,0.67833],"81":[0.19444,0.68333,0.09403,0,0.76666],"82":[0,0.68333,0.03868,0,0.72944],"83":[0,0.68333,0.11972,0,0.56222],"84":[0,0.68333,0.13305,0,0.71555],"85":[0,0.68333,0.16389,0,0.74333],"86":[0,0.68333,0.18361,0,0.74333],"87":[0,0.68333,0.18361,0,0.99888],"88":[0,0.68333,0.15806,0,0.74333],"89":[0,0.68333,0.19383,0,0.74333],"90":[0,0.68333,0.14528,0,0.61333],"91":[0.25,0.75,0.1875,0,0.30667],"93":[0.25,0.75,0.10528,0,0.30667],"94":[0,0.69444,0.06646,0,0.51111],"95":[0.31,0.12056,0.09208,0,0.51111],"97":[0,0.43056,0.07671,0,0.51111],"98":[0,0.69444,0.06312,0,0.46],"99":[0,0.43056,0.05653,0,0.46],"100":[0,0.69444,0.10333,0,0.51111],"101":[0,0.43056,0.07514,0,0.46],"102":[0.19444,0.69444,0.21194,0,0.30667],"103":[0.19444,0.43056,0.08847,0,0.46],"104":[0,0.69444,0.07671,0,0.51111],"105":[0,0.65536,0.1019,0,0.30667],"106":[0.19444,0.65536,0.14467,0,0.30667],"107":[0,0.69444,0.10764,0,0.46],"108":[0,0.69444,0.10333,0,0.25555],"109":[0,0.43056,0.07671,0,0.81777],"110":[0,0.43056,0.07671,0,0.56222],"111":[0,0.43056,0.06312,0,0.51111],"112":[0.19444,0.43056,0.06312,0,0.51111],"113":[0.19444,0.43056,0.08847,0,0.46],"114":[0,0.43056,0.10764,0,0.42166],"115":[0,0.43056,0.08208,0,0.40889],"116":[0,0.61508,0.09486,0,0.33222],"117":[0,0.43056,0.07671,0,0.53666],"118":[0,0.43056,0.10764,0,0.46],"119":[0,0.43056,0.10764,0,0.66444],"120":[0,0.43056,0.12042,0,0.46389],"121":[0.19444,0.43056,0.08847,0,0.48555],"122":[0,0.43056,0.12292,0,0.40889],"126":[0.35,0.31786,0.11585,0,0.51111],"160":[0,0,0,0,0.25],"168":[0,0.66786,0.10474,0,0.51111],"176":[0,0.69444,0,0,0.83129],"184":[0.17014,0,0,0,0.46],"198":[0,0.68333,0.12028,0,0.88277],"216":[0.04861,0.73194,0.09403,0,0.76666],"223":[0.19444,0.69444,0.10514,0,0.53666],"230":[0,0.43056,0.07514,0,0.71555],"248":[0.09722,0.52778,0.09194,0,0.51111],"338":[0,0.68333,0.12028,0,0.98499],"339":[0,0.43056,0.07514,0,0.71555],"710":[0,0.69444,0.06646,0,0.51111],"711":[0,0.62847,0.08295,0,0.51111],"713":[0,0.56167,0.10333,0,0.51111],"714":[0,0.69444,0.09694,0,0.51111],"715":[0,0.69444,0,0,0.51111],"728":[0,0.69444,0.10806,0,0.51111],"729":[0,0.66786,0.11752,0,0.30667],"730":[0,0.69444,0,0,0.83129],"732":[0,0.66786,0.11585,0,0.51111],"733":[0,0.69444,0.1225,0,0.51111],"915":[0,0.68333,0.13305,0,0.62722],"916":[0,0.68333,0,0,0.81777],"920":[0,0.68333,0.09403,0,0.76666],"923":[0,0.68333,0,0,0.69222],"926":[0,0.68333,0.15294,0,0.66444],"928":[0,0.68333,0.16389,0,0.74333],"931":[0,0.68333,0.12028,0,0.71555],"933":[0,0.68333,0.11111,0,0.76666],"934":[0,0.68333,0.05986,0,0.71555],"936":[0,0.68333,0.11111,0,0.76666],"937":[0,0.68333,0.10257,0,0.71555],"8211":[0,0.43056,0.09208,0,0.51111],"8212":[0,0.43056,0.09208,0,1.02222],"8216":[0,0.69444,0.12417,0,0.30667],"8217":[0,0.69444,0.12417,0,0.30667],"8220":[0,0.69444,0.1685,0,0.51444],"8221":[0,0.69444,0.06961,0,0.51444],"8463":[0,0.68889,0,0,0.54028]},"Main-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.27778],"34":[0,0.69444,0,0,0.5],"35":[0.19444,0.69444,0,0,0.83334],"36":[0.05556,0.75,0,0,0.5],"37":[0.05556,0.75,0,0,0.83334],"38":[0,0.69444,0,0,0.77778],"39":[0,0.69444,0,0,0.27778],"40":[0.25,0.75,0,0,0.38889],"41":[0.25,0.75,0,0,0.38889],"42":[0,0.75,0,0,0.5],"43":[0.08333,0.58333,0,0,0.77778],"44":[0.19444,0.10556,0,0,0.27778],"45":[0,0.43056,0,0,0.33333],"46":[0,0.10556,0,0,0.27778],"47":[0.25,0.75,0,0,0.5],"48":[0,0.64444,0,0,0.5],"49":[0,0.64444,0,0,0.5],"50":[0,0.64444,0,0,0.5],"51":[0,0.64444,0,0,0.5],"52":[0,0.64444,0,0,0.5],"53":[0,0.64444,0,0,0.5],"54":[0,0.64444,0,0,0.5],"55":[0,0.64444,0,0,0.5],"56":[0,0.64444,0,0,0.5],"57":[0,0.64444,0,0,0.5],"58":[0,0.43056,0,0,0.27778],"59":[0.19444,0.43056,0,0,0.27778],"60":[0.0391,0.5391,0,0,0.77778],"61":[-0.13313,0.36687,0,0,0.77778],"62":[0.0391,0.5391,0,0,0.77778],"63":[0,0.69444,0,0,0.47222],"64":[0,0.69444,0,0,0.77778],"65":[0,0.68333,0,0,0.75],"66":[0,0.68333,0,0,0.70834],"67":[0,0.68333,0,0,0.72222],"68":[0,0.68333,0,0,0.76389],"69":[0,0.68333,0,0,0.68056],"70":[0,0.68333,0,0,0.65278],"71":[0,0.68333,0,0,0.78472],"72":[0,0.68333,0,0,0.75],"73":[0,0.68333,0,0,0.36111],"74":[0,0.68333,0,0,0.51389],"75":[0,0.68333,0,0,0.77778],"76":[0,0.68333,0,0,0.625],"77":[0,0.68333,0,0,0.91667],"78":[0,0.68333,0,0,0.75],"79":[0,0.68333,0,0,0.77778],"80":[0,0.68333,0,0,0.68056],"81":[0.19444,0.68333,0,0,0.77778],"82":[0,0.68333,0,0,0.73611],"83":[0,0.68333,0,0,0.55556],"84":[0,0.68333,0,0,0.72222],"85":[0,0.68333,0,0,0.75],"86":[0,0.68333,0.01389,0,0.75],"87":[0,0.68333,0.01389,0,1.02778],"88":[0,0.68333,0,0,0.75],"89":[0,0.68333,0.025,0,0.75],"90":[0,0.68333,0,0,0.61111],"91":[0.25,0.75,0,0,0.27778],"92":[0.25,0.75,0,0,0.5],"93":[0.25,0.75,0,0,0.27778],"94":[0,0.69444,0,0,0.5],"95":[0.31,0.12056,0.02778,0,0.5],"97":[0,0.43056,0,0,0.5],"98":[0,0.69444,0,0,0.55556],"99":[0,0.43056,0,0,0.44445],"100":[0,0.69444,0,0,0.55556],"101":[0,0.43056,0,0,0.44445],"102":[0,0.69444,0.07778,0,0.30556],"103":[0.19444,0.43056,0.01389,0,0.5],"104":[0,0.69444,0,0,0.55556],"105":[0,0.66786,0,0,0.27778],"106":[0.19444,0.66786,0,0,0.30556],"107":[0,0.69444,0,0,0.52778],"108":[0,0.69444,0,0,0.27778],"109":[0,0.43056,0,0,0.83334],"110":[0,0.43056,0,0,0.55556],"111":[0,0.43056,0,0,0.5],"112":[0.19444,0.43056,0,0,0.55556],"113":[0.19444,0.43056,0,0,0.52778],"114":[0,0.43056,0,0,0.39167],"115":[0,0.43056,0,0,0.39445],"116":[0,0.61508,0,0,0.38889],"117":[0,0.43056,0,0,0.55556],"118":[0,0.43056,0.01389,0,0.52778],"119":[0,0.43056,0.01389,0,0.72222],"120":[0,0.43056,0,0,0.52778],"121":[0.19444,0.43056,0.01389,0,0.52778],"122":[0,0.43056,0,0,0.44445],"123":[0.25,0.75,0,0,0.5],"124":[0.25,0.75,0,0,0.27778],"125":[0.25,0.75,0,0,0.5],"126":[0.35,0.31786,0,0,0.5],"160":[0,0,0,0,0.25],"163":[0,0.69444,0,0,0.76909],"167":[0.19444,0.69444,0,0,0.44445],"168":[0,0.66786,0,0,0.5],"172":[0,0.43056,0,0,0.66667],"176":[0,0.69444,0,0,0.75],"177":[0.08333,0.58333,0,0,0.77778],"182":[0.19444,0.69444,0,0,0.61111],"184":[0.17014,0,0,0,0.44445],"198":[0,0.68333,0,0,0.90278],"215":[0.08333,0.58333,0,0,0.77778],"216":[0.04861,0.73194,0,0,0.77778],"223":[0,0.69444,0,0,0.5],"230":[0,0.43056,0,0,0.72222],"247":[0.08333,0.58333,0,0,0.77778],"248":[0.09722,0.52778,0,0,0.5],"305":[0,0.43056,0,0,0.27778],"338":[0,0.68333,0,0,1.01389],"339":[0,0.43056,0,0,0.77778],"567":[0.19444,0.43056,0,0,0.30556],"710":[0,0.69444,0,0,0.5],"711":[0,0.62847,0,0,0.5],"713":[0,0.56778,0,0,0.5],"714":[0,0.69444,0,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0,0,0.5],"729":[0,0.66786,0,0,0.27778],"730":[0,0.69444,0,0,0.75],"732":[0,0.66786,0,0,0.5],"733":[0,0.69444,0,0,0.5],"915":[0,0.68333,0,0,0.625],"916":[0,0.68333,0,0,0.83334],"920":[0,0.68333,0,0,0.77778],"923":[0,0.68333,0,0,0.69445],"926":[0,0.68333,0,0,0.66667],"928":[0,0.68333,0,0,0.75],"931":[0,0.68333,0,0,0.72222],"933":[0,0.68333,0,0,0.77778],"934":[0,0.68333,0,0,0.72222],"936":[0,0.68333,0,0,0.77778],"937":[0,0.68333,0,0,0.72222],"8211":[0,0.43056,0.02778,0,0.5],"8212":[0,0.43056,0.02778,0,1],"8216":[0,0.69444,0,0,0.27778],"8217":[0,0.69444,0,0,0.27778],"8220":[0,0.69444,0,0,0.5],"8221":[0,0.69444,0,0,0.5],"8224":[0.19444,0.69444,0,0,0.44445],"8225":[0.19444,0.69444,0,0,0.44445],"8230":[0,0.123,0,0,1.172],"8242":[0,0.55556,0,0,0.275],"8407":[0,0.71444,0.15382,0,0.5],"8463":[0,0.68889,0,0,0.54028],"8465":[0,0.69444,0,0,0.72222],"8467":[0,0.69444,0,0.11111,0.41667],"8472":[0.19444,0.43056,0,0.11111,0.63646],"8476":[0,0.69444,0,0,0.72222],"8501":[0,0.69444,0,0,0.61111],"8592":[-0.13313,0.36687,0,0,1],"8593":[0.19444,0.69444,0,0,0.5],"8594":[-0.13313,0.36687,0,0,1],"8595":[0.19444,0.69444,0,0,0.5],"8596":[-0.13313,0.36687,0,0,1],"8597":[0.25,0.75,0,0,0.5],"8598":[0.19444,0.69444,0,0,1],"8599":[0.19444,0.69444,0,0,1],"8600":[0.19444,0.69444,0,0,1],"8601":[0.19444,0.69444,0,0,1],"8614":[0.011,0.511,0,0,1],"8617":[0.011,0.511,0,0,1.126],"8618":[0.011,0.511,0,0,1.126],"8636":[-0.13313,0.36687,0,0,1],"8637":[-0.13313,0.36687,0,0,1],"8640":[-0.13313,0.36687,0,0,1],"8641":[-0.13313,0.36687,0,0,1],"8652":[0.011,0.671,0,0,1],"8656":[-0.13313,0.36687,0,0,1],"8657":[0.19444,0.69444,0,0,0.61111],"8658":[-0.13313,0.36687,0,0,1],"8659":[0.19444,0.69444,0,0,0.61111],"8660":[-0.13313,0.36687,0,0,1],"8661":[0.25,0.75,0,0,0.61111],"8704":[0,0.69444,0,0,0.55556],"8706":[0,0.69444,0.05556,0.08334,0.5309],"8707":[0,0.69444,0,0,0.55556],"8709":[0.05556,0.75,0,0,0.5],"8711":[0,0.68333,0,0,0.83334],"8712":[0.0391,0.5391,0,0,0.66667],"8715":[0.0391,0.5391,0,0,0.66667],"8722":[0.08333,0.58333,0,0,0.77778],"8723":[0.08333,0.58333,0,0,0.77778],"8725":[0.25,0.75,0,0,0.5],"8726":[0.25,0.75,0,0,0.5],"8727":[-0.03472,0.46528,0,0,0.5],"8728":[-0.05555,0.44445,0,0,0.5],"8729":[-0.05555,0.44445,0,0,0.5],"8730":[0.2,0.8,0,0,0.83334],"8733":[0,0.43056,0,0,0.77778],"8734":[0,0.43056,0,0,1],"8736":[0,0.69224,0,0,0.72222],"8739":[0.25,0.75,0,0,0.27778],"8741":[0.25,0.75,0,0,0.5],"8743":[0,0.55556,0,0,0.66667],"8744":[0,0.55556,0,0,0.66667],"8745":[0,0.55556,0,0,0.66667],"8746":[0,0.55556,0,0,0.66667],"8747":[0.19444,0.69444,0.11111,0,0.41667],"8764":[-0.13313,0.36687,0,0,0.77778],"8768":[0.19444,0.69444,0,0,0.27778],"8771":[-0.03625,0.46375,0,0,0.77778],"8773":[-0.022,0.589,0,0,0.778],"8776":[-0.01688,0.48312,0,0,0.77778],"8781":[-0.03625,0.46375,0,0,0.77778],"8784":[-0.133,0.673,0,0,0.778],"8801":[-0.03625,0.46375,0,0,0.77778],"8804":[0.13597,0.63597,0,0,0.77778],"8805":[0.13597,0.63597,0,0,0.77778],"8810":[0.0391,0.5391,0,0,1],"8811":[0.0391,0.5391,0,0,1],"8826":[0.0391,0.5391,0,0,0.77778],"8827":[0.0391,0.5391,0,0,0.77778],"8834":[0.0391,0.5391,0,0,0.77778],"8835":[0.0391,0.5391,0,0,0.77778],"8838":[0.13597,0.63597,0,0,0.77778],"8839":[0.13597,0.63597,0,0,0.77778],"8846":[0,0.55556,0,0,0.66667],"8849":[0.13597,0.63597,0,0,0.77778],"8850":[0.13597,0.63597,0,0,0.77778],"8851":[0,0.55556,0,0,0.66667],"8852":[0,0.55556,0,0,0.66667],"8853":[0.08333,0.58333,0,0,0.77778],"8854":[0.08333,0.58333,0,0,0.77778],"8855":[0.08333,0.58333,0,0,0.77778],"8856":[0.08333,0.58333,0,0,0.77778],"8857":[0.08333,0.58333,0,0,0.77778],"8866":[0,0.69444,0,0,0.61111],"8867":[0,0.69444,0,0,0.61111],"8868":[0,0.69444,0,0,0.77778],"8869":[0,0.69444,0,0,0.77778],"8872":[0.249,0.75,0,0,0.867],"8900":[-0.05555,0.44445,0,0,0.5],"8901":[-0.05555,0.44445,0,0,0.27778],"8902":[-0.03472,0.46528,0,0,0.5],"8904":[0.005,0.505,0,0,0.9],"8942":[0.03,0.903,0,0,0.278],"8943":[-0.19,0.313,0,0,1.172],"8945":[-0.1,0.823,0,0,1.282],"8968":[0.25,0.75,0,0,0.44445],"8969":[0.25,0.75,0,0,0.44445],"8970":[0.25,0.75,0,0,0.44445],"8971":[0.25,0.75,0,0,0.44445],"8994":[-0.14236,0.35764,0,0,1],"8995":[-0.14236,0.35764,0,0,1],"9136":[0.244,0.744,0,0,0.412],"9137":[0.244,0.745,0,0,0.412],"9651":[0.19444,0.69444,0,0,0.88889],"9657":[-0.03472,0.46528,0,0,0.5],"9661":[0.19444,0.69444,0,0,0.88889],"9667":[-0.03472,0.46528,0,0,0.5],"9711":[0.19444,0.69444,0,0,1],"9824":[0.12963,0.69444,0,0,0.77778],"9825":[0.12963,0.69444,0,0,0.77778],"9826":[0.12963,0.69444,0,0,0.77778],"9827":[0.12963,0.69444,0,0,0.77778],"9837":[0,0.75,0,0,0.38889],"9838":[0.19444,0.69444,0,0,0.38889],"9839":[0.19444,0.69444,0,0,0.38889],"10216":[0.25,0.75,0,0,0.38889],"10217":[0.25,0.75,0,0,0.38889],"10222":[0.244,0.744,0,0,0.412],"10223":[0.244,0.745,0,0,0.412],"10229":[0.011,0.511,0,0,1.609],"10230":[0.011,0.511,0,0,1.638],"10231":[0.011,0.511,0,0,1.859],"10232":[0.024,0.525,0,0,1.609],"10233":[0.024,0.525,0,0,1.638],"10234":[0.024,0.525,0,0,1.858],"10236":[0.011,0.511,0,0,1.638],"10815":[0,0.68333,0,0,0.75],"10927":[0.13597,0.63597,0,0,0.77778],"10928":[0.13597,0.63597,0,0,0.77778],"57376":[0.19444,0.69444,0,0,0]},"Math-BoldItalic":{"32":[0,0,0,0,0.25],"48":[0,0.44444,0,0,0.575],"49":[0,0.44444,0,0,0.575],"50":[0,0.44444,0,0,0.575],"51":[0.19444,0.44444,0,0,0.575],"52":[0.19444,0.44444,0,0,0.575],"53":[0.19444,0.44444,0,0,0.575],"54":[0,0.64444,0,0,0.575],"55":[0.19444,0.44444,0,0,0.575],"56":[0,0.64444,0,0,0.575],"57":[0.19444,0.44444,0,0,0.575],"65":[0,0.68611,0,0,0.86944],"66":[0,0.68611,0.04835,0,0.8664],"67":[0,0.68611,0.06979,0,0.81694],"68":[0,0.68611,0.03194,0,0.93812],"69":[0,0.68611,0.05451,0,0.81007],"70":[0,0.68611,0.15972,0,0.68889],"71":[0,0.68611,0,0,0.88673],"72":[0,0.68611,0.08229,0,0.98229],"73":[0,0.68611,0.07778,0,0.51111],"74":[0,0.68611,0.10069,0,0.63125],"75":[0,0.68611,0.06979,0,0.97118],"76":[0,0.68611,0,0,0.75555],"77":[0,0.68611,0.11424,0,1.14201],"78":[0,0.68611,0.11424,0,0.95034],"79":[0,0.68611,0.03194,0,0.83666],"80":[0,0.68611,0.15972,0,0.72309],"81":[0.19444,0.68611,0,0,0.86861],"82":[0,0.68611,0.00421,0,0.87235],"83":[0,0.68611,0.05382,0,0.69271],"84":[0,0.68611,0.15972,0,0.63663],"85":[0,0.68611,0.11424,0,0.80027],"86":[0,0.68611,0.25555,0,0.67778],"87":[0,0.68611,0.15972,0,1.09305],"88":[0,0.68611,0.07778,0,0.94722],"89":[0,0.68611,0.25555,0,0.67458],"90":[0,0.68611,0.06979,0,0.77257],"97":[0,0.44444,0,0,0.63287],"98":[0,0.69444,0,0,0.52083],"99":[0,0.44444,0,0,0.51342],"100":[0,0.69444,0,0,0.60972],"101":[0,0.44444,0,0,0.55361],"102":[0.19444,0.69444,0.11042,0,0.56806],"103":[0.19444,0.44444,0.03704,0,0.5449],"104":[0,0.69444,0,0,0.66759],"105":[0,0.69326,0,0,0.4048],"106":[0.19444,0.69326,0.0622,0,0.47083],"107":[0,0.69444,0.01852,0,0.6037],"108":[0,0.69444,0.0088,0,0.34815],"109":[0,0.44444,0,0,1.0324],"110":[0,0.44444,0,0,0.71296],"111":[0,0.44444,0,0,0.58472],"112":[0.19444,0.44444,0,0,0.60092],"113":[0.19444,0.44444,0.03704,0,0.54213],"114":[0,0.44444,0.03194,0,0.5287],"115":[0,0.44444,0,0,0.53125],"116":[0,0.63492,0,0,0.41528],"117":[0,0.44444,0,0,0.68102],"118":[0,0.44444,0.03704,0,0.56666],"119":[0,0.44444,0.02778,0,0.83148],"120":[0,0.44444,0,0,0.65903],"121":[0.19444,0.44444,0.03704,0,0.59028],"122":[0,0.44444,0.04213,0,0.55509],"160":[0,0,0,0,0.25],"915":[0,0.68611,0.15972,0,0.65694],"916":[0,0.68611,0,0,0.95833],"920":[0,0.68611,0.03194,0,0.86722],"923":[0,0.68611,0,0,0.80555],"926":[0,0.68611,0.07458,0,0.84125],"928":[0,0.68611,0.08229,0,0.98229],"931":[0,0.68611,0.05451,0,0.88507],"933":[0,0.68611,0.15972,0,0.67083],"934":[0,0.68611,0,0,0.76666],"936":[0,0.68611,0.11653,0,0.71402],"937":[0,0.68611,0.04835,0,0.8789],"945":[0,0.44444,0,0,0.76064],"946":[0.19444,0.69444,0.03403,0,0.65972],"947":[0.19444,0.44444,0.06389,0,0.59003],"948":[0,0.69444,0.03819,0,0.52222],"949":[0,0.44444,0,0,0.52882],"950":[0.19444,0.69444,0.06215,0,0.50833],"951":[0.19444,0.44444,0.03704,0,0.6],"952":[0,0.69444,0.03194,0,0.5618],"953":[0,0.44444,0,0,0.41204],"954":[0,0.44444,0,0,0.66759],"955":[0,0.69444,0,0,0.67083],"956":[0.19444,0.44444,0,0,0.70787],"957":[0,0.44444,0.06898,0,0.57685],"958":[0.19444,0.69444,0.03021,0,0.50833],"959":[0,0.44444,0,0,0.58472],"960":[0,0.44444,0.03704,0,0.68241],"961":[0.19444,0.44444,0,0,0.6118],"962":[0.09722,0.44444,0.07917,0,0.42361],"963":[0,0.44444,0.03704,0,0.68588],"964":[0,0.44444,0.13472,0,0.52083],"965":[0,0.44444,0.03704,0,0.63055],"966":[0.19444,0.44444,0,0,0.74722],"967":[0.19444,0.44444,0,0,0.71805],"968":[0.19444,0.69444,0.03704,0,0.75833],"969":[0,0.44444,0.03704,0,0.71782],"977":[0,0.69444,0,0,0.69155],"981":[0.19444,0.69444,0,0,0.7125],"982":[0,0.44444,0.03194,0,0.975],"1009":[0.19444,0.44444,0,0,0.6118],"1013":[0,0.44444,0,0,0.48333],"57649":[0,0.44444,0,0,0.39352],"57911":[0.19444,0.44444,0,0,0.43889]},"Math-Italic":{"32":[0,0,0,0,0.25],"48":[0,0.43056,0,0,0.5],"49":[0,0.43056,0,0,0.5],"50":[0,0.43056,0,0,0.5],"51":[0.19444,0.43056,0,0,0.5],"52":[0.19444,0.43056,0,0,0.5],"53":[0.19444,0.43056,0,0,0.5],"54":[0,0.64444,0,0,0.5],"55":[0.19444,0.43056,0,0,0.5],"56":[0,0.64444,0,0,0.5],"57":[0.19444,0.43056,0,0,0.5],"65":[0,0.68333,0,0.13889,0.75],"66":[0,0.68333,0.05017,0.08334,0.75851],"67":[0,0.68333,0.07153,0.08334,0.71472],"68":[0,0.68333,0.02778,0.05556,0.82792],"69":[0,0.68333,0.05764,0.08334,0.7382],"70":[0,0.68333,0.13889,0.08334,0.64306],"71":[0,0.68333,0,0.08334,0.78625],"72":[0,0.68333,0.08125,0.05556,0.83125],"73":[0,0.68333,0.07847,0.11111,0.43958],"74":[0,0.68333,0.09618,0.16667,0.55451],"75":[0,0.68333,0.07153,0.05556,0.84931],"76":[0,0.68333,0,0.02778,0.68056],"77":[0,0.68333,0.10903,0.08334,0.97014],"78":[0,0.68333,0.10903,0.08334,0.80347],"79":[0,0.68333,0.02778,0.08334,0.76278],"80":[0,0.68333,0.13889,0.08334,0.64201],"81":[0.19444,0.68333,0,0.08334,0.79056],"82":[0,0.68333,0.00773,0.08334,0.75929],"83":[0,0.68333,0.05764,0.08334,0.6132],"84":[0,0.68333,0.13889,0.08334,0.58438],"85":[0,0.68333,0.10903,0.02778,0.68278],"86":[0,0.68333,0.22222,0,0.58333],"87":[0,0.68333,0.13889,0,0.94445],"88":[0,0.68333,0.07847,0.08334,0.82847],"89":[0,0.68333,0.22222,0,0.58056],"90":[0,0.68333,0.07153,0.08334,0.68264],"97":[0,0.43056,0,0,0.52859],"98":[0,0.69444,0,0,0.42917],"99":[0,0.43056,0,0.05556,0.43276],"100":[0,0.69444,0,0.16667,0.52049],"101":[0,0.43056,0,0.05556,0.46563],"102":[0.19444,0.69444,0.10764,0.16667,0.48959],"103":[0.19444,0.43056,0.03588,0.02778,0.47697],"104":[0,0.69444,0,0,0.57616],"105":[0,0.65952,0,0,0.34451],"106":[0.19444,0.65952,0.05724,0,0.41181],"107":[0,0.69444,0.03148,0,0.5206],"108":[0,0.69444,0.01968,0.08334,0.29838],"109":[0,0.43056,0,0,0.87801],"110":[0,0.43056,0,0,0.60023],"111":[0,0.43056,0,0.05556,0.48472],"112":[0.19444,0.43056,0,0.08334,0.50313],"113":[0.19444,0.43056,0.03588,0.08334,0.44641],"114":[0,0.43056,0.02778,0.05556,0.45116],"115":[0,0.43056,0,0.05556,0.46875],"116":[0,0.61508,0,0.08334,0.36111],"117":[0,0.43056,0,0.02778,0.57246],"118":[0,0.43056,0.03588,0.02778,0.48472],"119":[0,0.43056,0.02691,0.08334,0.71592],"120":[0,0.43056,0,0.02778,0.57153],"121":[0.19444,0.43056,0.03588,0.05556,0.49028],"122":[0,0.43056,0.04398,0.05556,0.46505],"160":[0,0,0,0,0.25],"915":[0,0.68333,0.13889,0.08334,0.61528],"916":[0,0.68333,0,0.16667,0.83334],"920":[0,0.68333,0.02778,0.08334,0.76278],"923":[0,0.68333,0,0.16667,0.69445],"926":[0,0.68333,0.07569,0.08334,0.74236],"928":[0,0.68333,0.08125,0.05556,0.83125],"931":[0,0.68333,0.05764,0.08334,0.77986],"933":[0,0.68333,0.13889,0.05556,0.58333],"934":[0,0.68333,0,0.08334,0.66667],"936":[0,0.68333,0.11,0.05556,0.61222],"937":[0,0.68333,0.05017,0.08334,0.7724],"945":[0,0.43056,0.0037,0.02778,0.6397],"946":[0.19444,0.69444,0.05278,0.08334,0.56563],"947":[0.19444,0.43056,0.05556,0,0.51773],"948":[0,0.69444,0.03785,0.05556,0.44444],"949":[0,0.43056,0,0.08334,0.46632],"950":[0.19444,0.69444,0.07378,0.08334,0.4375],"951":[0.19444,0.43056,0.03588,0.05556,0.49653],"952":[0,0.69444,0.02778,0.08334,0.46944],"953":[0,0.43056,0,0.05556,0.35394],"954":[0,0.43056,0,0,0.57616],"955":[0,0.69444,0,0,0.58334],"956":[0.19444,0.43056,0,0.02778,0.60255],"957":[0,0.43056,0.06366,0.02778,0.49398],"958":[0.19444,0.69444,0.04601,0.11111,0.4375],"959":[0,0.43056,0,0.05556,0.48472],"960":[0,0.43056,0.03588,0,0.57003],"961":[0.19444,0.43056,0,0.08334,0.51702],"962":[0.09722,0.43056,0.07986,0.08334,0.36285],"963":[0,0.43056,0.03588,0,0.57141],"964":[0,0.43056,0.1132,0.02778,0.43715],"965":[0,0.43056,0.03588,0.02778,0.54028],"966":[0.19444,0.43056,0,0.08334,0.65417],"967":[0.19444,0.43056,0,0.05556,0.62569],"968":[0.19444,0.69444,0.03588,0.11111,0.65139],"969":[0,0.43056,0.03588,0,0.62245],"977":[0,0.69444,0,0.08334,0.59144],"981":[0.19444,0.69444,0,0.08334,0.59583],"982":[0,0.43056,0.02778,0,0.82813],"1009":[0.19444,0.43056,0,0.08334,0.51702],"1013":[0,0.43056,0,0.05556,0.4059],"57649":[0,0.43056,0,0.02778,0.32246],"57911":[0.19444,0.43056,0,0.08334,0.38403]},"SansSerif-Bold":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.36667],"34":[0,0.69444,0,0,0.55834],"35":[0.19444,0.69444,0,0,0.91667],"36":[0.05556,0.75,0,0,0.55],"37":[0.05556,0.75,0,0,1.02912],"38":[0,0.69444,0,0,0.83056],"39":[0,0.69444,0,0,0.30556],"40":[0.25,0.75,0,0,0.42778],"41":[0.25,0.75,0,0,0.42778],"42":[0,0.75,0,0,0.55],"43":[0.11667,0.61667,0,0,0.85556],"44":[0.10556,0.13056,0,0,0.30556],"45":[0,0.45833,0,0,0.36667],"46":[0,0.13056,0,0,0.30556],"47":[0.25,0.75,0,0,0.55],"48":[0,0.69444,0,0,0.55],"49":[0,0.69444,0,0,0.55],"50":[0,0.69444,0,0,0.55],"51":[0,0.69444,0,0,0.55],"52":[0,0.69444,0,0,0.55],"53":[0,0.69444,0,0,0.55],"54":[0,0.69444,0,0,0.55],"55":[0,0.69444,0,0,0.55],"56":[0,0.69444,0,0,0.55],"57":[0,0.69444,0,0,0.55],"58":[0,0.45833,0,0,0.30556],"59":[0.10556,0.45833,0,0,0.30556],"61":[-0.09375,0.40625,0,0,0.85556],"63":[0,0.69444,0,0,0.51945],"64":[0,0.69444,0,0,0.73334],"65":[0,0.69444,0,0,0.73334],"66":[0,0.69444,0,0,0.73334],"67":[0,0.69444,0,0,0.70278],"68":[0,0.69444,0,0,0.79445],"69":[0,0.69444,0,0,0.64167],"70":[0,0.69444,0,0,0.61111],"71":[0,0.69444,0,0,0.73334],"72":[0,0.69444,0,0,0.79445],"73":[0,0.69444,0,0,0.33056],"74":[0,0.69444,0,0,0.51945],"75":[0,0.69444,0,0,0.76389],"76":[0,0.69444,0,0,0.58056],"77":[0,0.69444,0,0,0.97778],"78":[0,0.69444,0,0,0.79445],"79":[0,0.69444,0,0,0.79445],"80":[0,0.69444,0,0,0.70278],"81":[0.10556,0.69444,0,0,0.79445],"82":[0,0.69444,0,0,0.70278],"83":[0,0.69444,0,0,0.61111],"84":[0,0.69444,0,0,0.73334],"85":[0,0.69444,0,0,0.76389],"86":[0,0.69444,0.01528,0,0.73334],"87":[0,0.69444,0.01528,0,1.03889],"88":[0,0.69444,0,0,0.73334],"89":[0,0.69444,0.0275,0,0.73334],"90":[0,0.69444,0,0,0.67223],"91":[0.25,0.75,0,0,0.34306],"93":[0.25,0.75,0,0,0.34306],"94":[0,0.69444,0,0,0.55],"95":[0.35,0.10833,0.03056,0,0.55],"97":[0,0.45833,0,0,0.525],"98":[0,0.69444,0,0,0.56111],"99":[0,0.45833,0,0,0.48889],"100":[0,0.69444,0,0,0.56111],"101":[0,0.45833,0,0,0.51111],"102":[0,0.69444,0.07639,0,0.33611],"103":[0.19444,0.45833,0.01528,0,0.55],"104":[0,0.69444,0,0,0.56111],"105":[0,0.69444,0,0,0.25556],"106":[0.19444,0.69444,0,0,0.28611],"107":[0,0.69444,0,0,0.53056],"108":[0,0.69444,0,0,0.25556],"109":[0,0.45833,0,0,0.86667],"110":[0,0.45833,0,0,0.56111],"111":[0,0.45833,0,0,0.55],"112":[0.19444,0.45833,0,0,0.56111],"113":[0.19444,0.45833,0,0,0.56111],"114":[0,0.45833,0.01528,0,0.37222],"115":[0,0.45833,0,0,0.42167],"116":[0,0.58929,0,0,0.40417],"117":[0,0.45833,0,0,0.56111],"118":[0,0.45833,0.01528,0,0.5],"119":[0,0.45833,0.01528,0,0.74445],"120":[0,0.45833,0,0,0.5],"121":[0.19444,0.45833,0.01528,0,0.5],"122":[0,0.45833,0,0,0.47639],"126":[0.35,0.34444,0,0,0.55],"160":[0,0,0,0,0.25],"168":[0,0.69444,0,0,0.55],"176":[0,0.69444,0,0,0.73334],"180":[0,0.69444,0,0,0.55],"184":[0.17014,0,0,0,0.48889],"305":[0,0.45833,0,0,0.25556],"567":[0.19444,0.45833,0,0,0.28611],"710":[0,0.69444,0,0,0.55],"711":[0,0.63542,0,0,0.55],"713":[0,0.63778,0,0,0.55],"728":[0,0.69444,0,0,0.55],"729":[0,0.69444,0,0,0.30556],"730":[0,0.69444,0,0,0.73334],"732":[0,0.69444,0,0,0.55],"733":[0,0.69444,0,0,0.55],"915":[0,0.69444,0,0,0.58056],"916":[0,0.69444,0,0,0.91667],"920":[0,0.69444,0,0,0.85556],"923":[0,0.69444,0,0,0.67223],"926":[0,0.69444,0,0,0.73334],"928":[0,0.69444,0,0,0.79445],"931":[0,0.69444,0,0,0.79445],"933":[0,0.69444,0,0,0.85556],"934":[0,0.69444,0,0,0.79445],"936":[0,0.69444,0,0,0.85556],"937":[0,0.69444,0,0,0.79445],"8211":[0,0.45833,0.03056,0,0.55],"8212":[0,0.45833,0.03056,0,1.10001],"8216":[0,0.69444,0,0,0.30556],"8217":[0,0.69444,0,0,0.30556],"8220":[0,0.69444,0,0,0.55834],"8221":[0,0.69444,0,0,0.55834]},"SansSerif-Italic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.05733,0,0.31945],"34":[0,0.69444,0.00316,0,0.5],"35":[0.19444,0.69444,0.05087,0,0.83334],"36":[0.05556,0.75,0.11156,0,0.5],"37":[0.05556,0.75,0.03126,0,0.83334],"38":[0,0.69444,0.03058,0,0.75834],"39":[0,0.69444,0.07816,0,0.27778],"40":[0.25,0.75,0.13164,0,0.38889],"41":[0.25,0.75,0.02536,0,0.38889],"42":[0,0.75,0.11775,0,0.5],"43":[0.08333,0.58333,0.02536,0,0.77778],"44":[0.125,0.08333,0,0,0.27778],"45":[0,0.44444,0.01946,0,0.33333],"46":[0,0.08333,0,0,0.27778],"47":[0.25,0.75,0.13164,0,0.5],"48":[0,0.65556,0.11156,0,0.5],"49":[0,0.65556,0.11156,0,0.5],"50":[0,0.65556,0.11156,0,0.5],"51":[0,0.65556,0.11156,0,0.5],"52":[0,0.65556,0.11156,0,0.5],"53":[0,0.65556,0.11156,0,0.5],"54":[0,0.65556,0.11156,0,0.5],"55":[0,0.65556,0.11156,0,0.5],"56":[0,0.65556,0.11156,0,0.5],"57":[0,0.65556,0.11156,0,0.5],"58":[0,0.44444,0.02502,0,0.27778],"59":[0.125,0.44444,0.02502,0,0.27778],"61":[-0.13,0.37,0.05087,0,0.77778],"63":[0,0.69444,0.11809,0,0.47222],"64":[0,0.69444,0.07555,0,0.66667],"65":[0,0.69444,0,0,0.66667],"66":[0,0.69444,0.08293,0,0.66667],"67":[0,0.69444,0.11983,0,0.63889],"68":[0,0.69444,0.07555,0,0.72223],"69":[0,0.69444,0.11983,0,0.59722],"70":[0,0.69444,0.13372,0,0.56945],"71":[0,0.69444,0.11983,0,0.66667],"72":[0,0.69444,0.08094,0,0.70834],"73":[0,0.69444,0.13372,0,0.27778],"74":[0,0.69444,0.08094,0,0.47222],"75":[0,0.69444,0.11983,0,0.69445],"76":[0,0.69444,0,0,0.54167],"77":[0,0.69444,0.08094,0,0.875],"78":[0,0.69444,0.08094,0,0.70834],"79":[0,0.69444,0.07555,0,0.73611],"80":[0,0.69444,0.08293,0,0.63889],"81":[0.125,0.69444,0.07555,0,0.73611],"82":[0,0.69444,0.08293,0,0.64584],"83":[0,0.69444,0.09205,0,0.55556],"84":[0,0.69444,0.13372,0,0.68056],"85":[0,0.69444,0.08094,0,0.6875],"86":[0,0.69444,0.1615,0,0.66667],"87":[0,0.69444,0.1615,0,0.94445],"88":[0,0.69444,0.13372,0,0.66667],"89":[0,0.69444,0.17261,0,0.66667],"90":[0,0.69444,0.11983,0,0.61111],"91":[0.25,0.75,0.15942,0,0.28889],"93":[0.25,0.75,0.08719,0,0.28889],"94":[0,0.69444,0.0799,0,0.5],"95":[0.35,0.09444,0.08616,0,0.5],"97":[0,0.44444,0.00981,0,0.48056],"98":[0,0.69444,0.03057,0,0.51667],"99":[0,0.44444,0.08336,0,0.44445],"100":[0,0.69444,0.09483,0,0.51667],"101":[0,0.44444,0.06778,0,0.44445],"102":[0,0.69444,0.21705,0,0.30556],"103":[0.19444,0.44444,0.10836,0,0.5],"104":[0,0.69444,0.01778,0,0.51667],"105":[0,0.67937,0.09718,0,0.23889],"106":[0.19444,0.67937,0.09162,0,0.26667],"107":[0,0.69444,0.08336,0,0.48889],"108":[0,0.69444,0.09483,0,0.23889],"109":[0,0.44444,0.01778,0,0.79445],"110":[0,0.44444,0.01778,0,0.51667],"111":[0,0.44444,0.06613,0,0.5],"112":[0.19444,0.44444,0.0389,0,0.51667],"113":[0.19444,0.44444,0.04169,0,0.51667],"114":[0,0.44444,0.10836,0,0.34167],"115":[0,0.44444,0.0778,0,0.38333],"116":[0,0.57143,0.07225,0,0.36111],"117":[0,0.44444,0.04169,0,0.51667],"118":[0,0.44444,0.10836,0,0.46111],"119":[0,0.44444,0.10836,0,0.68334],"120":[0,0.44444,0.09169,0,0.46111],"121":[0.19444,0.44444,0.10836,0,0.46111],"122":[0,0.44444,0.08752,0,0.43472],"126":[0.35,0.32659,0.08826,0,0.5],"160":[0,0,0,0,0.25],"168":[0,0.67937,0.06385,0,0.5],"176":[0,0.69444,0,0,0.73752],"184":[0.17014,0,0,0,0.44445],"305":[0,0.44444,0.04169,0,0.23889],"567":[0.19444,0.44444,0.04169,0,0.26667],"710":[0,0.69444,0.0799,0,0.5],"711":[0,0.63194,0.08432,0,0.5],"713":[0,0.60889,0.08776,0,0.5],"714":[0,0.69444,0.09205,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0.09483,0,0.5],"729":[0,0.67937,0.07774,0,0.27778],"730":[0,0.69444,0,0,0.73752],"732":[0,0.67659,0.08826,0,0.5],"733":[0,0.69444,0.09205,0,0.5],"915":[0,0.69444,0.13372,0,0.54167],"916":[0,0.69444,0,0,0.83334],"920":[0,0.69444,0.07555,0,0.77778],"923":[0,0.69444,0,0,0.61111],"926":[0,0.69444,0.12816,0,0.66667],"928":[0,0.69444,0.08094,0,0.70834],"931":[0,0.69444,0.11983,0,0.72222],"933":[0,0.69444,0.09031,0,0.77778],"934":[0,0.69444,0.04603,0,0.72222],"936":[0,0.69444,0.09031,0,0.77778],"937":[0,0.69444,0.08293,0,0.72222],"8211":[0,0.44444,0.08616,0,0.5],"8212":[0,0.44444,0.08616,0,1],"8216":[0,0.69444,0.07816,0,0.27778],"8217":[0,0.69444,0.07816,0,0.27778],"8220":[0,0.69444,0.14205,0,0.5],"8221":[0,0.69444,0.00316,0,0.5]},"SansSerif-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.31945],"34":[0,0.69444,0,0,0.5],"35":[0.19444,0.69444,0,0,0.83334],"36":[0.05556,0.75,0,0,0.5],"37":[0.05556,0.75,0,0,0.83334],"38":[0,0.69444,0,0,0.75834],"39":[0,0.69444,0,0,0.27778],"40":[0.25,0.75,0,0,0.38889],"41":[0.25,0.75,0,0,0.38889],"42":[0,0.75,0,0,0.5],"43":[0.08333,0.58333,0,0,0.77778],"44":[0.125,0.08333,0,0,0.27778],"45":[0,0.44444,0,0,0.33333],"46":[0,0.08333,0,0,0.27778],"47":[0.25,0.75,0,0,0.5],"48":[0,0.65556,0,0,0.5],"49":[0,0.65556,0,0,0.5],"50":[0,0.65556,0,0,0.5],"51":[0,0.65556,0,0,0.5],"52":[0,0.65556,0,0,0.5],"53":[0,0.65556,0,0,0.5],"54":[0,0.65556,0,0,0.5],"55":[0,0.65556,0,0,0.5],"56":[0,0.65556,0,0,0.5],"57":[0,0.65556,0,0,0.5],"58":[0,0.44444,0,0,0.27778],"59":[0.125,0.44444,0,0,0.27778],"61":[-0.13,0.37,0,0,0.77778],"63":[0,0.69444,0,0,0.47222],"64":[0,0.69444,0,0,0.66667],"65":[0,0.69444,0,0,0.66667],"66":[0,0.69444,0,0,0.66667],"67":[0,0.69444,0,0,0.63889],"68":[0,0.69444,0,0,0.72223],"69":[0,0.69444,0,0,0.59722],"70":[0,0.69444,0,0,0.56945],"71":[0,0.69444,0,0,0.66667],"72":[0,0.69444,0,0,0.70834],"73":[0,0.69444,0,0,0.27778],"74":[0,0.69444,0,0,0.47222],"75":[0,0.69444,0,0,0.69445],"76":[0,0.69444,0,0,0.54167],"77":[0,0.69444,0,0,0.875],"78":[0,0.69444,0,0,0.70834],"79":[0,0.69444,0,0,0.73611],"80":[0,0.69444,0,0,0.63889],"81":[0.125,0.69444,0,0,0.73611],"82":[0,0.69444,0,0,0.64584],"83":[0,0.69444,0,0,0.55556],"84":[0,0.69444,0,0,0.68056],"85":[0,0.69444,0,0,0.6875],"86":[0,0.69444,0.01389,0,0.66667],"87":[0,0.69444,0.01389,0,0.94445],"88":[0,0.69444,0,0,0.66667],"89":[0,0.69444,0.025,0,0.66667],"90":[0,0.69444,0,0,0.61111],"91":[0.25,0.75,0,0,0.28889],"93":[0.25,0.75,0,0,0.28889],"94":[0,0.69444,0,0,0.5],"95":[0.35,0.09444,0.02778,0,0.5],"97":[0,0.44444,0,0,0.48056],"98":[0,0.69444,0,0,0.51667],"99":[0,0.44444,0,0,0.44445],"100":[0,0.69444,0,0,0.51667],"101":[0,0.44444,0,0,0.44445],"102":[0,0.69444,0.06944,0,0.30556],"103":[0.19444,0.44444,0.01389,0,0.5],"104":[0,0.69444,0,0,0.51667],"105":[0,0.67937,0,0,0.23889],"106":[0.19444,0.67937,0,0,0.26667],"107":[0,0.69444,0,0,0.48889],"108":[0,0.69444,0,0,0.23889],"109":[0,0.44444,0,0,0.79445],"110":[0,0.44444,0,0,0.51667],"111":[0,0.44444,0,0,0.5],"112":[0.19444,0.44444,0,0,0.51667],"113":[0.19444,0.44444,0,0,0.51667],"114":[0,0.44444,0.01389,0,0.34167],"115":[0,0.44444,0,0,0.38333],"116":[0,0.57143,0,0,0.36111],"117":[0,0.44444,0,0,0.51667],"118":[0,0.44444,0.01389,0,0.46111],"119":[0,0.44444,0.01389,0,0.68334],"120":[0,0.44444,0,0,0.46111],"121":[0.19444,0.44444,0.01389,0,0.46111],"122":[0,0.44444,0,0,0.43472],"126":[0.35,0.32659,0,0,0.5],"160":[0,0,0,0,0.25],"168":[0,0.67937,0,0,0.5],"176":[0,0.69444,0,0,0.66667],"184":[0.17014,0,0,0,0.44445],"305":[0,0.44444,0,0,0.23889],"567":[0.19444,0.44444,0,0,0.26667],"710":[0,0.69444,0,0,0.5],"711":[0,0.63194,0,0,0.5],"713":[0,0.60889,0,0,0.5],"714":[0,0.69444,0,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0,0,0.5],"729":[0,0.67937,0,0,0.27778],"730":[0,0.69444,0,0,0.66667],"732":[0,0.67659,0,0,0.5],"733":[0,0.69444,0,0,0.5],"915":[0,0.69444,0,0,0.54167],"916":[0,0.69444,0,0,0.83334],"920":[0,0.69444,0,0,0.77778],"923":[0,0.69444,0,0,0.61111],"926":[0,0.69444,0,0,0.66667],"928":[0,0.69444,0,0,0.70834],"931":[0,0.69444,0,0,0.72222],"933":[0,0.69444,0,0,0.77778],"934":[0,0.69444,0,0,0.72222],"936":[0,0.69444,0,0,0.77778],"937":[0,0.69444,0,0,0.72222],"8211":[0,0.44444,0.02778,0,0.5],"8212":[0,0.44444,0.02778,0,1],"8216":[0,0.69444,0,0,0.27778],"8217":[0,0.69444,0,0,0.27778],"8220":[0,0.69444,0,0,0.5],"8221":[0,0.69444,0,0,0.5]},"Script-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.7,0.22925,0,0.80253],"66":[0,0.7,0.04087,0,0.90757],"67":[0,0.7,0.1689,0,0.66619],"68":[0,0.7,0.09371,0,0.77443],"69":[0,0.7,0.18583,0,0.56162],"70":[0,0.7,0.13634,0,0.89544],"71":[0,0.7,0.17322,0,0.60961],"72":[0,0.7,0.29694,0,0.96919],"73":[0,0.7,0.19189,0,0.80907],"74":[0.27778,0.7,0.19189,0,1.05159],"75":[0,0.7,0.31259,0,0.91364],"76":[0,0.7,0.19189,0,0.87373],"77":[0,0.7,0.15981,0,1.08031],"78":[0,0.7,0.3525,0,0.9015],"79":[0,0.7,0.08078,0,0.73787],"80":[0,0.7,0.08078,0,1.01262],"81":[0,0.7,0.03305,0,0.88282],"82":[0,0.7,0.06259,0,0.85],"83":[0,0.7,0.19189,0,0.86767],"84":[0,0.7,0.29087,0,0.74697],"85":[0,0.7,0.25815,0,0.79996],"86":[0,0.7,0.27523,0,0.62204],"87":[0,0.7,0.27523,0,0.80532],"88":[0,0.7,0.26006,0,0.94445],"89":[0,0.7,0.2939,0,0.70961],"90":[0,0.7,0.24037,0,0.8212],"160":[0,0,0,0,0.25]},"Size1-Regular":{"32":[0,0,0,0,0.25],"40":[0.35001,0.85,0,0,0.45834],"41":[0.35001,0.85,0,0,0.45834],"47":[0.35001,0.85,0,0,0.57778],"91":[0.35001,0.85,0,0,0.41667],"92":[0.35001,0.85,0,0,0.57778],"93":[0.35001,0.85,0,0,0.41667],"123":[0.35001,0.85,0,0,0.58334],"125":[0.35001,0.85,0,0,0.58334],"160":[0,0,0,0,0.25],"710":[0,0.72222,0,0,0.55556],"732":[0,0.72222,0,0,0.55556],"770":[0,0.72222,0,0,0.55556],"771":[0,0.72222,0,0,0.55556],"8214":[-0.00099,0.601,0,0,0.77778],"8593":[0.00001,0.6,0,0,0.66667],"8595":[0.00001,0.6,0,0,0.66667],"8657":[0.00001,0.6,0,0,0.77778],"8659":[0.00001,0.6,0,0,0.77778],"8719":[0.25001,0.75,0,0,0.94445],"8720":[0.25001,0.75,0,0,0.94445],"8721":[0.25001,0.75,0,0,1.05556],"8730":[0.35001,0.85,0,0,1],"8739":[-0.00599,0.606,0,0,0.33333],"8741":[-0.00599,0.606,0,0,0.55556],"8747":[0.30612,0.805,0.19445,0,0.47222],"8748":[0.306,0.805,0.19445,0,0.47222],"8749":[0.306,0.805,0.19445,0,0.47222],"8750":[0.30612,0.805,0.19445,0,0.47222],"8896":[0.25001,0.75,0,0,0.83334],"8897":[0.25001,0.75,0,0,0.83334],"8898":[0.25001,0.75,0,0,0.83334],"8899":[0.25001,0.75,0,0,0.83334],"8968":[0.35001,0.85,0,0,0.47222],"8969":[0.35001,0.85,0,0,0.47222],"8970":[0.35001,0.85,0,0,0.47222],"8971":[0.35001,0.85,0,0,0.47222],"9168":[-0.00099,0.601,0,0,0.66667],"10216":[0.35001,0.85,0,0,0.47222],"10217":[0.35001,0.85,0,0,0.47222],"10752":[0.25001,0.75,0,0,1.11111],"10753":[0.25001,0.75,0,0,1.11111],"10754":[0.25001,0.75,0,0,1.11111],"10756":[0.25001,0.75,0,0,0.83334],"10758":[0.25001,0.75,0,0,0.83334]},"Size2-Regular":{"32":[0,0,0,0,0.25],"40":[0.65002,1.15,0,0,0.59722],"41":[0.65002,1.15,0,0,0.59722],"47":[0.65002,1.15,0,0,0.81111],"91":[0.65002,1.15,0,0,0.47222],"92":[0.65002,1.15,0,0,0.81111],"93":[0.65002,1.15,0,0,0.47222],"123":[0.65002,1.15,0,0,0.66667],"125":[0.65002,1.15,0,0,0.66667],"160":[0,0,0,0,0.25],"710":[0,0.75,0,0,1],"732":[0,0.75,0,0,1],"770":[0,0.75,0,0,1],"771":[0,0.75,0,0,1],"8719":[0.55001,1.05,0,0,1.27778],"8720":[0.55001,1.05,0,0,1.27778],"8721":[0.55001,1.05,0,0,1.44445],"8730":[0.65002,1.15,0,0,1],"8747":[0.86225,1.36,0.44445,0,0.55556],"8748":[0.862,1.36,0.44445,0,0.55556],"8749":[0.862,1.36,0.44445,0,0.55556],"8750":[0.86225,1.36,0.44445,0,0.55556],"8896":[0.55001,1.05,0,0,1.11111],"8897":[0.55001,1.05,0,0,1.11111],"8898":[0.55001,1.05,0,0,1.11111],"8899":[0.55001,1.05,0,0,1.11111],"8968":[0.65002,1.15,0,0,0.52778],"8969":[0.65002,1.15,0,0,0.52778],"8970":[0.65002,1.15,0,0,0.52778],"8971":[0.65002,1.15,0,0,0.52778],"10216":[0.65002,1.15,0,0,0.61111],"10217":[0.65002,1.15,0,0,0.61111],"10752":[0.55001,1.05,0,0,1.51112],"10753":[0.55001,1.05,0,0,1.51112],"10754":[0.55001,1.05,0,0,1.51112],"10756":[0.55001,1.05,0,0,1.11111],"10758":[0.55001,1.05,0,0,1.11111]},"Size3-Regular":{"32":[0,0,0,0,0.25],"40":[0.95003,1.45,0,0,0.73611],"41":[0.95003,1.45,0,0,0.73611],"47":[0.95003,1.45,0,0,1.04445],"91":[0.95003,1.45,0,0,0.52778],"92":[0.95003,1.45,0,0,1.04445],"93":[0.95003,1.45,0,0,0.52778],"123":[0.95003,1.45,0,0,0.75],"125":[0.95003,1.45,0,0,0.75],"160":[0,0,0,0,0.25],"710":[0,0.75,0,0,1.44445],"732":[0,0.75,0,0,1.44445],"770":[0,0.75,0,0,1.44445],"771":[0,0.75,0,0,1.44445],"8730":[0.95003,1.45,0,0,1],"8968":[0.95003,1.45,0,0,0.58334],"8969":[0.95003,1.45,0,0,0.58334],"8970":[0.95003,1.45,0,0,0.58334],"8971":[0.95003,1.45,0,0,0.58334],"10216":[0.95003,1.45,0,0,0.75],"10217":[0.95003,1.45,0,0,0.75]},"Size4-Regular":{"32":[0,0,0,0,0.25],"40":[1.25003,1.75,0,0,0.79167],"41":[1.25003,1.75,0,0,0.79167],"47":[1.25003,1.75,0,0,1.27778],"91":[1.25003,1.75,0,0,0.58334],"92":[1.25003,1.75,0,0,1.27778],"93":[1.25003,1.75,0,0,0.58334],"123":[1.25003,1.75,0,0,0.80556],"125":[1.25003,1.75,0,0,0.80556],"160":[0,0,0,0,0.25],"710":[0,0.825,0,0,1.8889],"732":[0,0.825,0,0,1.8889],"770":[0,0.825,0,0,1.8889],"771":[0,0.825,0,0,1.8889],"8730":[1.25003,1.75,0,0,1],"8968":[1.25003,1.75,0,0,0.63889],"8969":[1.25003,1.75,0,0,0.63889],"8970":[1.25003,1.75,0,0,0.63889],"8971":[1.25003,1.75,0,0,0.63889],"9115":[0.64502,1.155,0,0,0.875],"9116":[0.00001,0.6,0,0,0.875],"9117":[0.64502,1.155,0,0,0.875],"9118":[0.64502,1.155,0,0,0.875],"9119":[0.00001,0.6,0,0,0.875],"9120":[0.64502,1.155,0,0,0.875],"9121":[0.64502,1.155,0,0,0.66667],"9122":[-0.00099,0.601,0,0,0.66667],"9123":[0.64502,1.155,0,0,0.66667],"9124":[0.64502,1.155,0,0,0.66667],"9125":[-0.00099,0.601,0,0,0.66667],"9126":[0.64502,1.155,0,0,0.66667],"9127":[0.00001,0.9,0,0,0.88889],"9128":[0.65002,1.15,0,0,0.88889],"9129":[0.90001,0,0,0,0.88889],"9130":[0,0.3,0,0,0.88889],"9131":[0.00001,0.9,0,0,0.88889],"9132":[0.65002,1.15,0,0,0.88889],"9133":[0.90001,0,0,0,0.88889],"9143":[0.88502,0.915,0,0,1.05556],"10216":[1.25003,1.75,0,0,0.80556],"10217":[1.25003,1.75,0,0,0.80556],"57344":[-0.00499,0.605,0,0,1.05556],"57345":[-0.00499,0.605,0,0,1.05556],"57680":[0,0.12,0,0,0.45],"57681":[0,0.12,0,0,0.45],"57682":[0,0.12,0,0,0.45],"57683":[0,0.12,0,0,0.45]},"Typewriter-Regular":{"32":[0,0,0,0,0.525],"33":[0,0.61111,0,0,0.525],"34":[0,0.61111,0,0,0.525],"35":[0,0.61111,0,0,0.525],"36":[0.08333,0.69444,0,0,0.525],"37":[0.08333,0.69444,0,0,0.525],"38":[0,0.61111,0,0,0.525],"39":[0,0.61111,0,0,0.525],"40":[0.08333,0.69444,0,0,0.525],"41":[0.08333,0.69444,0,0,0.525],"42":[0,0.52083,0,0,0.525],"43":[-0.08056,0.53055,0,0,0.525],"44":[0.13889,0.125,0,0,0.525],"45":[-0.08056,0.53055,0,0,0.525],"46":[0,0.125,0,0,0.525],"47":[0.08333,0.69444,0,0,0.525],"48":[0,0.61111,0,0,0.525],"49":[0,0.61111,0,0,0.525],"50":[0,0.61111,0,0,0.525],"51":[0,0.61111,0,0,0.525],"52":[0,0.61111,0,0,0.525],"53":[0,0.61111,0,0,0.525],"54":[0,0.61111,0,0,0.525],"55":[0,0.61111,0,0,0.525],"56":[0,0.61111,0,0,0.525],"57":[0,0.61111,0,0,0.525],"58":[0,0.43056,0,0,0.525],"59":[0.13889,0.43056,0,0,0.525],"60":[-0.05556,0.55556,0,0,0.525],"61":[-0.19549,0.41562,0,0,0.525],"62":[-0.05556,0.55556,0,0,0.525],"63":[0,0.61111,0,0,0.525],"64":[0,0.61111,0,0,0.525],"65":[0,0.61111,0,0,0.525],"66":[0,0.61111,0,0,0.525],"67":[0,0.61111,0,0,0.525],"68":[0,0.61111,0,0,0.525],"69":[0,0.61111,0,0,0.525],"70":[0,0.61111,0,0,0.525],"71":[0,0.61111,0,0,0.525],"72":[0,0.61111,0,0,0.525],"73":[0,0.61111,0,0,0.525],"74":[0,0.61111,0,0,0.525],"75":[0,0.61111,0,0,0.525],"76":[0,0.61111,0,0,0.525],"77":[0,0.61111,0,0,0.525],"78":[0,0.61111,0,0,0.525],"79":[0,0.61111,0,0,0.525],"80":[0,0.61111,0,0,0.525],"81":[0.13889,0.61111,0,0,0.525],"82":[0,0.61111,0,0,0.525],"83":[0,0.61111,0,0,0.525],"84":[0,0.61111,0,0,0.525],"85":[0,0.61111,0,0,0.525],"86":[0,0.61111,0,0,0.525],"87":[0,0.61111,0,0,0.525],"88":[0,0.61111,0,0,0.525],"89":[0,0.61111,0,0,0.525],"90":[0,0.61111,0,0,0.525],"91":[0.08333,0.69444,0,0,0.525],"92":[0.08333,0.69444,0,0,0.525],"93":[0.08333,0.69444,0,0,0.525],"94":[0,0.61111,0,0,0.525],"95":[0.09514,0,0,0,0.525],"96":[0,0.61111,0,0,0.525],"97":[0,0.43056,0,0,0.525],"98":[0,0.61111,0,0,0.525],"99":[0,0.43056,0,0,0.525],"100":[0,0.61111,0,0,0.525],"101":[0,0.43056,0,0,0.525],"102":[0,0.61111,0,0,0.525],"103":[0.22222,0.43056,0,0,0.525],"104":[0,0.61111,0,0,0.525],"105":[0,0.61111,0,0,0.525],"106":[0.22222,0.61111,0,0,0.525],"107":[0,0.61111,0,0,0.525],"108":[0,0.61111,0,0,0.525],"109":[0,0.43056,0,0,0.525],"110":[0,0.43056,0,0,0.525],"111":[0,0.43056,0,0,0.525],"112":[0.22222,0.43056,0,0,0.525],"113":[0.22222,0.43056,0,0,0.525],"114":[0,0.43056,0,0,0.525],"115":[0,0.43056,0,0,0.525],"116":[0,0.55358,0,0,0.525],"117":[0,0.43056,0,0,0.525],"118":[0,0.43056,0,0,0.525],"119":[0,0.43056,0,0,0.525],"120":[0,0.43056,0,0,0.525],"121":[0.22222,0.43056,0,0,0.525],"122":[0,0.43056,0,0,0.525],"123":[0.08333,0.69444,0,0,0.525],"124":[0.08333,0.69444,0,0,0.525],"125":[0.08333,0.69444,0,0,0.525],"126":[0,0.61111,0,0,0.525],"127":[0,0.61111,0,0,0.525],"160":[0,0,0,0,0.525],"176":[0,0.61111,0,0,0.525],"184":[0.19445,0,0,0,0.525],"305":[0,0.43056,0,0,0.525],"567":[0.22222,0.43056,0,0,0.525],"711":[0,0.56597,0,0,0.525],"713":[0,0.56555,0,0,0.525],"714":[0,0.61111,0,0,0.525],"715":[0,0.61111,0,0,0.525],"728":[0,0.61111,0,0,0.525],"730":[0,0.61111,0,0,0.525],"770":[0,0.61111,0,0,0.525],"771":[0,0.61111,0,0,0.525],"776":[0,0.61111,0,0,0.525],"915":[0,0.61111,0,0,0.525],"916":[0,0.61111,0,0,0.525],"920":[0,0.61111,0,0,0.525],"923":[0,0.61111,0,0,0.525],"926":[0,0.61111,0,0,0.525],"928":[0,0.61111,0,0,0.525],"931":[0,0.61111,0,0,0.525],"933":[0,0.61111,0,0,0.525],"934":[0,0.61111,0,0,0.525],"936":[0,0.61111,0,0,0.525],"937":[0,0.61111,0,0,0.525],"8216":[0,0.61111,0,0,0.525],"8217":[0,0.61111,0,0,0.525],"8242":[0,0.61111,0,0,0.525],"9251":[0.11111,0.21944,0,0,0.525]}};var Co={slant:[0.25,0.25,0.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[0.431,0.431,0.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[0.677,0.732,0.925],num2:[0.394,0.384,0.387],num3:[0.444,0.471,0.504],denom1:[0.686,0.752,1.025],denom2:[0.345,0.344,0.532],sup1:[0.413,0.503,0.504],sup2:[0.363,0.431,0.404],sup3:[0.289,0.286,0.294],sub1:[0.15,0.143,0.2],sub2:[0.247,0.286,0.4],supDrop:[0.386,0.353,0.494],subDrop:[0.05,0.071,0.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[0.25,0.25,0.25],defaultRuleThickness:[0.04,0.049,0.049],bigOpSpacing1:[0.111,0.111,0.111],bigOpSpacing2:[0.166,0.166,0.166],bigOpSpacing3:[0.2,0.2,0.2],bigOpSpacing4:[0.6,0.611,0.611],bigOpSpacing5:[0.1,0.143,0.143],sqrtRuleThickness:[0.04,0.04,0.04],ptPerEm:[10,10,10],doubleRuleSep:[0.2,0.2,0.2],arrayRuleWidth:[0.04,0.04,0.04],fboxsep:[0.3,0.3,0.3],fboxrule:[0.04,0.04,0.04]},Xc={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function v4(e,t){mn[e]=t}function rl(e,t,n){if(!mn[t])throw Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),s=mn[t][r];if(!s&&e[0]in Xc)r=Xc[e[0]].charCodeAt(0),s=mn[t][r];if(!s&&n==="text"){if(Nu(r))s=mn[t][77]}if(s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var _o={};function y4(e){var t;if(e>=5)t=0;else if(e>=3)t=1;else t=2;if(!_o[t]){var n=_o[t]={cssEmPerMu:Co.quad[t]/18};for(var r of Object.keys(Co))n[r]=Co[r][t]}return _o[t]}var Ze={math:{},text:{}};function h(e,t,n,r,s,i){if(Ze[e][s]={font:t,group:n,replace:r},i&&r)Ze[e][r]=Ze[e][s]}var m="math",Z="text",v="main",_="ams",Ye="accent-token",fe="bin",Rt="close",rs="inner",ke="mathord",lt="op-token",Ut="open",ei="punct",R="rel",On="spacing",I="textord";h(m,v,R,"≡","\\equiv",!0);h(m,v,R,"≺","\\prec",!0);h(m,v,R,"≻","\\succ",!0);h(m,v,R,"∼","\\sim",!0);h(m,v,R,"⊥","\\perp");h(m,v,R,"⪯","\\preceq",!0);h(m,v,R,"⪰","\\succeq",!0);h(m,v,R,"≃","\\simeq",!0);h(m,v,R,"∣","\\mid",!0);h(m,v,R,"≪","\\ll",!0);h(m,v,R,"≫","\\gg",!0);h(m,v,R,"≍","\\asymp",!0);h(m,v,R,"∥","\\parallel");h(m,v,R,"⋈","\\bowtie",!0);h(m,v,R,"⌣","\\smile",!0);h(m,v,R,"⊑","\\sqsubseteq",!0);h(m,v,R,"⊒","\\sqsupseteq",!0);h(m,v,R,"≐","\\doteq",!0);h(m,v,R,"⌢","\\frown",!0);h(m,v,R,"∋","\\ni",!0);h(m,v,R,"∝","\\propto",!0);h(m,v,R,"⊢","\\vdash",!0);h(m,v,R,"⊣","\\dashv",!0);h(m,v,R,"∋","\\owns");h(m,v,ei,".","\\ldotp");h(m,v,ei,"⋅","\\cdotp");h(m,v,ei,"⋅","·");h(Z,v,I,"⋅","·");h(m,v,I,"#","\\#");h(Z,v,I,"#","\\#");h(m,v,I,"&","\\&");h(Z,v,I,"&","\\&");h(m,v,I,"ℵ","\\aleph",!0);h(m,v,I,"∀","\\forall",!0);h(m,v,I,"ℏ","\\hbar",!0);h(m,v,I,"∃","\\exists",!0);h(m,v,I,"∇","\\nabla",!0);h(m,v,I,"♭","\\flat",!0);h(m,v,I,"ℓ","\\ell",!0);h(m,v,I,"♮","\\natural",!0);h(m,v,I,"♣","\\clubsuit",!0);h(m,v,I,"℘","\\wp",!0);h(m,v,I,"♯","\\sharp",!0);h(m,v,I,"♢","\\diamondsuit",!0);h(m,v,I,"ℜ","\\Re",!0);h(m,v,I,"♡","\\heartsuit",!0);h(m,v,I,"ℑ","\\Im",!0);h(m,v,I,"♠","\\spadesuit",!0);h(m,v,I,"§","\\S",!0);h(Z,v,I,"§","\\S");h(m,v,I,"¶","\\P",!0);h(Z,v,I,"¶","\\P");h(m,v,I,"†","\\dag");h(Z,v,I,"†","\\dag");h(Z,v,I,"†","\\textdagger");h(m,v,I,"‡","\\ddag");h(Z,v,I,"‡","\\ddag");h(Z,v,I,"‡","\\textdaggerdbl");h(m,v,Rt,"⎱","\\rmoustache",!0);h(m,v,Ut,"⎰","\\lmoustache",!0);h(m,v,Rt,"⟯","\\rgroup",!0);h(m,v,Ut,"⟮","\\lgroup",!0);h(m,v,fe,"∓","\\mp",!0);h(m,v,fe,"⊖","\\ominus",!0);h(m,v,fe,"⊎","\\uplus",!0);h(m,v,fe,"⊓","\\sqcap",!0);h(m,v,fe,"∗","\\ast");h(m,v,fe,"⊔","\\sqcup",!0);h(m,v,fe,"◯","\\bigcirc",!0);h(m,v,fe,"∙","\\bullet",!0);h(m,v,fe,"‡","\\ddagger");h(m,v,fe,"≀","\\wr",!0);h(m,v,fe,"⨿","\\amalg");h(m,v,fe,"&","\\And");h(m,v,R,"⟵","\\longleftarrow",!0);h(m,v,R,"⇐","\\Leftarrow",!0);h(m,v,R,"⟸","\\Longleftarrow",!0);h(m,v,R,"⟶","\\longrightarrow",!0);h(m,v,R,"⇒","\\Rightarrow",!0);h(m,v,R,"⟹","\\Longrightarrow",!0);h(m,v,R,"↔","\\leftrightarrow",!0);h(m,v,R,"⟷","\\longleftrightarrow",!0);h(m,v,R,"⇔","\\Leftrightarrow",!0);h(m,v,R,"⟺","\\Longleftrightarrow",!0);h(m,v,R,"↦","\\mapsto",!0);h(m,v,R,"⟼","\\longmapsto",!0);h(m,v,R,"↗","\\nearrow",!0);h(m,v,R,"↩","\\hookleftarrow",!0);h(m,v,R,"↪","\\hookrightarrow",!0);h(m,v,R,"↘","\\searrow",!0);h(m,v,R,"↼","\\leftharpoonup",!0);h(m,v,R,"⇀","\\rightharpoonup",!0);h(m,v,R,"↙","\\swarrow",!0);h(m,v,R,"↽","\\leftharpoondown",!0);h(m,v,R,"⇁","\\rightharpoondown",!0);h(m,v,R,"↖","\\nwarrow",!0);h(m,v,R,"⇌","\\rightleftharpoons",!0);h(m,_,R,"≮","\\nless",!0);h(m,_,R,"","\\@nleqslant");h(m,_,R,"","\\@nleqq");h(m,_,R,"⪇","\\lneq",!0);h(m,_,R,"≨","\\lneqq",!0);h(m,_,R,"","\\@lvertneqq");h(m,_,R,"⋦","\\lnsim",!0);h(m,_,R,"⪉","\\lnapprox",!0);h(m,_,R,"⊀","\\nprec",!0);h(m,_,R,"⋠","\\npreceq",!0);h(m,_,R,"⋨","\\precnsim",!0);h(m,_,R,"⪹","\\precnapprox",!0);h(m,_,R,"≁","\\nsim",!0);h(m,_,R,"","\\@nshortmid");h(m,_,R,"∤","\\nmid",!0);h(m,_,R,"⊬","\\nvdash",!0);h(m,_,R,"⊭","\\nvDash",!0);h(m,_,R,"⋪","\\ntriangleleft");h(m,_,R,"⋬","\\ntrianglelefteq",!0);h(m,_,R,"⊊","\\subsetneq",!0);h(m,_,R,"","\\@varsubsetneq");h(m,_,R,"⫋","\\subsetneqq",!0);h(m,_,R,"","\\@varsubsetneqq");h(m,_,R,"≯","\\ngtr",!0);h(m,_,R,"","\\@ngeqslant");h(m,_,R,"","\\@ngeqq");h(m,_,R,"⪈","\\gneq",!0);h(m,_,R,"≩","\\gneqq",!0);h(m,_,R,"","\\@gvertneqq");h(m,_,R,"⋧","\\gnsim",!0);h(m,_,R,"⪊","\\gnapprox",!0);h(m,_,R,"⊁","\\nsucc",!0);h(m,_,R,"⋡","\\nsucceq",!0);h(m,_,R,"⋩","\\succnsim",!0);h(m,_,R,"⪺","\\succnapprox",!0);h(m,_,R,"≆","\\ncong",!0);h(m,_,R,"","\\@nshortparallel");h(m,_,R,"∦","\\nparallel",!0);h(m,_,R,"⊯","\\nVDash",!0);h(m,_,R,"⋫","\\ntriangleright");h(m,_,R,"⋭","\\ntrianglerighteq",!0);h(m,_,R,"","\\@nsupseteqq");h(m,_,R,"⊋","\\supsetneq",!0);h(m,_,R,"","\\@varsupsetneq");h(m,_,R,"⫌","\\supsetneqq",!0);h(m,_,R,"","\\@varsupsetneqq");h(m,_,R,"⊮","\\nVdash",!0);h(m,_,R,"⪵","\\precneqq",!0);h(m,_,R,"⪶","\\succneqq",!0);h(m,_,R,"","\\@nsubseteqq");h(m,_,fe,"⊴","\\unlhd");h(m,_,fe,"⊵","\\unrhd");h(m,_,R,"↚","\\nleftarrow",!0);h(m,_,R,"↛","\\nrightarrow",!0);h(m,_,R,"⇍","\\nLeftarrow",!0);h(m,_,R,"⇏","\\nRightarrow",!0);h(m,_,R,"↮","\\nleftrightarrow",!0);h(m,_,R,"⇎","\\nLeftrightarrow",!0);h(m,_,R,"△","\\vartriangle");h(m,_,I,"ℏ","\\hslash");h(m,_,I,"▽","\\triangledown");h(m,_,I,"◊","\\lozenge");h(m,_,I,"Ⓢ","\\circledS");h(m,_,I,"®","\\circledR");h(Z,_,I,"®","\\circledR");h(m,_,I,"∡","\\measuredangle",!0);h(m,_,I,"∄","\\nexists");h(m,_,I,"℧","\\mho");h(m,_,I,"Ⅎ","\\Finv",!0);h(m,_,I,"⅁","\\Game",!0);h(m,_,I,"‵","\\backprime");h(m,_,I,"▲","\\blacktriangle");h(m,_,I,"▼","\\blacktriangledown");h(m,_,I,"■","\\blacksquare");h(m,_,I,"⧫","\\blacklozenge");h(m,_,I,"★","\\bigstar");h(m,_,I,"∢","\\sphericalangle",!0);h(m,_,I,"∁","\\complement",!0);h(m,_,I,"ð","\\eth",!0);h(Z,v,I,"ð","ð");h(m,_,I,"╱","\\diagup");h(m,_,I,"╲","\\diagdown");h(m,_,I,"□","\\square");h(m,_,I,"□","\\Box");h(m,_,I,"◊","\\Diamond");h(m,_,I,"¥","\\yen",!0);h(Z,_,I,"¥","\\yen",!0);h(m,_,I,"✓","\\checkmark",!0);h(Z,_,I,"✓","\\checkmark");h(m,_,I,"ℶ","\\beth",!0);h(m,_,I,"ℸ","\\daleth",!0);h(m,_,I,"ℷ","\\gimel",!0);h(m,_,I,"ϝ","\\digamma",!0);h(m,_,I,"ϰ","\\varkappa");h(m,_,Ut,"┌","\\@ulcorner",!0);h(m,_,Rt,"┐","\\@urcorner",!0);h(m,_,Ut,"└","\\@llcorner",!0);h(m,_,Rt,"┘","\\@lrcorner",!0);h(m,_,R,"≦","\\leqq",!0);h(m,_,R,"⩽","\\leqslant",!0);h(m,_,R,"⪕","\\eqslantless",!0);h(m,_,R,"≲","\\lesssim",!0);h(m,_,R,"⪅","\\lessapprox",!0);h(m,_,R,"≊","\\approxeq",!0);h(m,_,fe,"⋖","\\lessdot");h(m,_,R,"⋘","\\lll",!0);h(m,_,R,"≶","\\lessgtr",!0);h(m,_,R,"⋚","\\lesseqgtr",!0);h(m,_,R,"⪋","\\lesseqqgtr",!0);h(m,_,R,"≑","\\doteqdot");h(m,_,R,"≓","\\risingdotseq",!0);h(m,_,R,"≒","\\fallingdotseq",!0);h(m,_,R,"∽","\\backsim",!0);h(m,_,R,"⋍","\\backsimeq",!0);h(m,_,R,"⫅","\\subseteqq",!0);h(m,_,R,"⋐","\\Subset",!0);h(m,_,R,"⊏","\\sqsubset",!0);h(m,_,R,"≼","\\preccurlyeq",!0);h(m,_,R,"⋞","\\curlyeqprec",!0);h(m,_,R,"≾","\\precsim",!0);h(m,_,R,"⪷","\\precapprox",!0);h(m,_,R,"⊲","\\vartriangleleft");h(m,_,R,"⊴","\\trianglelefteq");h(m,_,R,"⊨","\\vDash",!0);h(m,_,R,"⊪","\\Vvdash",!0);h(m,_,R,"⌣","\\smallsmile");h(m,_,R,"⌢","\\smallfrown");h(m,_,R,"≏","\\bumpeq",!0);h(m,_,R,"≎","\\Bumpeq",!0);h(m,_,R,"≧","\\geqq",!0);h(m,_,R,"⩾","\\geqslant",!0);h(m,_,R,"⪖","\\eqslantgtr",!0);h(m,_,R,"≳","\\gtrsim",!0);h(m,_,R,"⪆","\\gtrapprox",!0);h(m,_,fe,"⋗","\\gtrdot");h(m,_,R,"⋙","\\ggg",!0);h(m,_,R,"≷","\\gtrless",!0);h(m,_,R,"⋛","\\gtreqless",!0);h(m,_,R,"⪌","\\gtreqqless",!0);h(m,_,R,"≖","\\eqcirc",!0);h(m,_,R,"≗","\\circeq",!0);h(m,_,R,"≜","\\triangleq",!0);h(m,_,R,"∼","\\thicksim");h(m,_,R,"≈","\\thickapprox");h(m,_,R,"⫆","\\supseteqq",!0);h(m,_,R,"⋑","\\Supset",!0);h(m,_,R,"⊐","\\sqsupset",!0);h(m,_,R,"≽","\\succcurlyeq",!0);h(m,_,R,"⋟","\\curlyeqsucc",!0);h(m,_,R,"≿","\\succsim",!0);h(m,_,R,"⪸","\\succapprox",!0);h(m,_,R,"⊳","\\vartriangleright");h(m,_,R,"⊵","\\trianglerighteq");h(m,_,R,"⊩","\\Vdash",!0);h(m,_,R,"∣","\\shortmid");h(m,_,R,"∥","\\shortparallel");h(m,_,R,"≬","\\between",!0);h(m,_,R,"⋔","\\pitchfork",!0);h(m,_,R,"∝","\\varpropto");h(m,_,R,"◀","\\blacktriangleleft");h(m,_,R,"∴","\\therefore",!0);h(m,_,R,"∍","\\backepsilon");h(m,_,R,"▶","\\blacktriangleright");h(m,_,R,"∵","\\because",!0);h(m,_,R,"⋘","\\llless");h(m,_,R,"⋙","\\gggtr");h(m,_,fe,"⊲","\\lhd");h(m,_,fe,"⊳","\\rhd");h(m,_,R,"≂","\\eqsim",!0);h(m,v,R,"⋈","\\Join");h(m,_,R,"≑","\\Doteq",!0);h(m,_,fe,"∔","\\dotplus",!0);h(m,_,fe,"∖","\\smallsetminus");h(m,_,fe,"⋒","\\Cap",!0);h(m,_,fe,"⋓","\\Cup",!0);h(m,_,fe,"⩞","\\doublebarwedge",!0);h(m,_,fe,"⊟","\\boxminus",!0);h(m,_,fe,"⊞","\\boxplus",!0);h(m,_,fe,"⋇","\\divideontimes",!0);h(m,_,fe,"⋉","\\ltimes",!0);h(m,_,fe,"⋊","\\rtimes",!0);h(m,_,fe,"⋋","\\leftthreetimes",!0);h(m,_,fe,"⋌","\\rightthreetimes",!0);h(m,_,fe,"⋏","\\curlywedge",!0);h(m,_,fe,"⋎","\\curlyvee",!0);h(m,_,fe,"⊝","\\circleddash",!0);h(m,_,fe,"⊛","\\circledast",!0);h(m,_,fe,"⋅","\\centerdot");h(m,_,fe,"⊺","\\intercal",!0);h(m,_,fe,"⋒","\\doublecap");h(m,_,fe,"⋓","\\doublecup");h(m,_,fe,"⊠","\\boxtimes",!0);h(m,_,R,"⇢","\\dashrightarrow",!0);h(m,_,R,"⇠","\\dashleftarrow",!0);h(m,_,R,"⇇","\\leftleftarrows",!0);h(m,_,R,"⇆","\\leftrightarrows",!0);h(m,_,R,"⇚","\\Lleftarrow",!0);h(m,_,R,"↞","\\twoheadleftarrow",!0);h(m,_,R,"↢","\\leftarrowtail",!0);h(m,_,R,"↫","\\looparrowleft",!0);h(m,_,R,"⇋","\\leftrightharpoons",!0);h(m,_,R,"↶","\\curvearrowleft",!0);h(m,_,R,"↺","\\circlearrowleft",!0);h(m,_,R,"↰","\\Lsh",!0);h(m,_,R,"⇈","\\upuparrows",!0);h(m,_,R,"↿","\\upharpoonleft",!0);h(m,_,R,"⇃","\\downharpoonleft",!0);h(m,v,R,"⊶","\\origof",!0);h(m,v,R,"⊷","\\imageof",!0);h(m,_,R,"⊸","\\multimap",!0);h(m,_,R,"↭","\\leftrightsquigarrow",!0);h(m,_,R,"⇉","\\rightrightarrows",!0);h(m,_,R,"⇄","\\rightleftarrows",!0);h(m,_,R,"↠","\\twoheadrightarrow",!0);h(m,_,R,"↣","\\rightarrowtail",!0);h(m,_,R,"↬","\\looparrowright",!0);h(m,_,R,"↷","\\curvearrowright",!0);h(m,_,R,"↻","\\circlearrowright",!0);h(m,_,R,"↱","\\Rsh",!0);h(m,_,R,"⇊","\\downdownarrows",!0);h(m,_,R,"↾","\\upharpoonright",!0);h(m,_,R,"⇂","\\downharpoonright",!0);h(m,_,R,"⇝","\\rightsquigarrow",!0);h(m,_,R,"⇝","\\leadsto");h(m,_,R,"⇛","\\Rrightarrow",!0);h(m,_,R,"↾","\\restriction");h(m,v,I,"‘","`");h(m,v,I,"$","\\$");h(Z,v,I,"$","\\$");h(Z,v,I,"$","\\textdollar");h(m,v,I,"%","\\%");h(Z,v,I,"%","\\%");h(m,v,I,"_","\\_");h(Z,v,I,"_","\\_");h(Z,v,I,"_","\\textunderscore");h(m,v,I,"∠","\\angle",!0);h(m,v,I,"∞","\\infty",!0);h(m,v,I,"′","\\prime");h(m,v,I,"△","\\triangle");h(m,v,I,"Γ","\\Gamma",!0);h(m,v,I,"Δ","\\Delta",!0);h(m,v,I,"Θ","\\Theta",!0);h(m,v,I,"Λ","\\Lambda",!0);h(m,v,I,"Ξ","\\Xi",!0);h(m,v,I,"Π","\\Pi",!0);h(m,v,I,"Σ","\\Sigma",!0);h(m,v,I,"Υ","\\Upsilon",!0);h(m,v,I,"Φ","\\Phi",!0);h(m,v,I,"Ψ","\\Psi",!0);h(m,v,I,"Ω","\\Omega",!0);h(m,v,I,"A","Α");h(m,v,I,"B","Β");h(m,v,I,"E","Ε");h(m,v,I,"Z","Ζ");h(m,v,I,"H","Η");h(m,v,I,"I","Ι");h(m,v,I,"K","Κ");h(m,v,I,"M","Μ");h(m,v,I,"N","Ν");h(m,v,I,"O","Ο");h(m,v,I,"P","Ρ");h(m,v,I,"T","Τ");h(m,v,I,"X","Χ");h(m,v,I,"¬","\\neg",!0);h(m,v,I,"¬","\\lnot");h(m,v,I,"⊤","\\top");h(m,v,I,"⊥","\\bot");h(m,v,I,"∅","\\emptyset");h(m,_,I,"∅","\\varnothing");h(m,v,ke,"α","\\alpha",!0);h(m,v,ke,"β","\\beta",!0);h(m,v,ke,"γ","\\gamma",!0);h(m,v,ke,"δ","\\delta",!0);h(m,v,ke,"ϵ","\\epsilon",!0);h(m,v,ke,"ζ","\\zeta",!0);h(m,v,ke,"η","\\eta",!0);h(m,v,ke,"θ","\\theta",!0);h(m,v,ke,"ι","\\iota",!0);h(m,v,ke,"κ","\\kappa",!0);h(m,v,ke,"λ","\\lambda",!0);h(m,v,ke,"μ","\\mu",!0);h(m,v,ke,"ν","\\nu",!0);h(m,v,ke,"ξ","\\xi",!0);h(m,v,ke,"ο","\\omicron",!0);h(m,v,ke,"π","\\pi",!0);h(m,v,ke,"ρ","\\rho",!0);h(m,v,ke,"σ","\\sigma",!0);h(m,v,ke,"τ","\\tau",!0);h(m,v,ke,"υ","\\upsilon",!0);h(m,v,ke,"ϕ","\\phi",!0);h(m,v,ke,"χ","\\chi",!0);h(m,v,ke,"ψ","\\psi",!0);h(m,v,ke,"ω","\\omega",!0);h(m,v,ke,"ε","\\varepsilon",!0);h(m,v,ke,"ϑ","\\vartheta",!0);h(m,v,ke,"ϖ","\\varpi",!0);h(m,v,ke,"ϱ","\\varrho",!0);h(m,v,ke,"ς","\\varsigma",!0);h(m,v,ke,"φ","\\varphi",!0);h(m,v,fe,"∗","*",!0);h(m,v,fe,"+","+");h(m,v,fe,"−","-",!0);h(m,v,fe,"⋅","\\cdot",!0);h(m,v,fe,"∘","\\circ",!0);h(m,v,fe,"÷","\\div",!0);h(m,v,fe,"±","\\pm",!0);h(m,v,fe,"×","\\times",!0);h(m,v,fe,"∩","\\cap",!0);h(m,v,fe,"∪","\\cup",!0);h(m,v,fe,"∖","\\setminus",!0);h(m,v,fe,"∧","\\land");h(m,v,fe,"∨","\\lor");h(m,v,fe,"∧","\\wedge",!0);h(m,v,fe,"∨","\\vee",!0);h(m,v,I,"√","\\surd");h(m,v,Ut,"⟨","\\langle",!0);h(m,v,Ut,"∣","\\lvert");h(m,v,Ut,"∥","\\lVert");h(m,v,Rt,"?","?");h(m,v,Rt,"!","!");h(m,v,Rt,"⟩","\\rangle",!0);h(m,v,Rt,"∣","\\rvert");h(m,v,Rt,"∥","\\rVert");h(m,v,R,"=","=");h(m,v,R,":",":");h(m,v,R,"≈","\\approx",!0);h(m,v,R,"≅","\\cong",!0);h(m,v,R,"≥","\\ge");h(m,v,R,"≥","\\geq",!0);h(m,v,R,"←","\\gets");h(m,v,R,">","\\gt",!0);h(m,v,R,"∈","\\in",!0);h(m,v,R,"","\\@not");h(m,v,R,"⊂","\\subset",!0);h(m,v,R,"⊃","\\supset",!0);h(m,v,R,"⊆","\\subseteq",!0);h(m,v,R,"⊇","\\supseteq",!0);h(m,_,R,"⊈","\\nsubseteq",!0);h(m,_,R,"⊉","\\nsupseteq",!0);h(m,v,R,"⊨","\\models");h(m,v,R,"←","\\leftarrow",!0);h(m,v,R,"≤","\\le");h(m,v,R,"≤","\\leq",!0);h(m,v,R,"<","\\lt",!0);h(m,v,R,"→","\\rightarrow",!0);h(m,v,R,"→","\\to");h(m,_,R,"≱","\\ngeq",!0);h(m,_,R,"≰","\\nleq",!0);h(m,v,On," ","\\ ");h(m,v,On," ","\\space");h(m,v,On," ","\\nobreakspace");h(Z,v,On," ","\\ ");h(Z,v,On," "," ");h(Z,v,On," ","\\space");h(Z,v,On," ","\\nobreakspace");h(m,v,On,"","\\nobreak");h(m,v,On,"","\\allowbreak");h(m,v,ei,",",",");h(m,v,ei,";",";");h(m,_,fe,"⊼","\\barwedge",!0);h(m,_,fe,"⊻","\\veebar",!0);h(m,v,fe,"⊙","\\odot",!0);h(m,v,fe,"⊕","\\oplus",!0);h(m,v,fe,"⊗","\\otimes",!0);h(m,v,I,"∂","\\partial",!0);h(m,v,fe,"⊘","\\oslash",!0);h(m,_,fe,"⊚","\\circledcirc",!0);h(m,_,fe,"⊡","\\boxdot",!0);h(m,v,fe,"△","\\bigtriangleup");h(m,v,fe,"▽","\\bigtriangledown");h(m,v,fe,"†","\\dagger");h(m,v,fe,"⋄","\\diamond");h(m,v,fe,"⋆","\\star");h(m,v,fe,"◃","\\triangleleft");h(m,v,fe,"▹","\\triangleright");h(m,v,Ut,"{","\\{");h(Z,v,I,"{","\\{");h(Z,v,I,"{","\\textbraceleft");h(m,v,Rt,"}","\\}");h(Z,v,I,"}","\\}");h(Z,v,I,"}","\\textbraceright");h(m,v,Ut,"{","\\lbrace");h(m,v,Rt,"}","\\rbrace");h(m,v,Ut,"[","\\lbrack",!0);h(Z,v,I,"[","\\lbrack",!0);h(m,v,Rt,"]","\\rbrack",!0);h(Z,v,I,"]","\\rbrack",!0);h(m,v,Ut,"(","\\lparen",!0);h(m,v,Rt,")","\\rparen",!0);h(Z,v,I,"<","\\textless",!0);h(Z,v,I,">","\\textgreater",!0);h(m,v,Ut,"⌊","\\lfloor",!0);h(m,v,Rt,"⌋","\\rfloor",!0);h(m,v,Ut,"⌈","\\lceil",!0);h(m,v,Rt,"⌉","\\rceil",!0);h(m,v,I,"\\","\\backslash");h(m,v,I,"∣","|");h(m,v,I,"∣","\\vert");h(Z,v,I,"|","\\textbar",!0);h(m,v,I,"∥","\\|");h(m,v,I,"∥","\\Vert");h(Z,v,I,"∥","\\textbardbl");h(Z,v,I,"~","\\textasciitilde");h(Z,v,I,"\\","\\textbackslash");h(Z,v,I,"^","\\textasciicircum");h(m,v,R,"↑","\\uparrow",!0);h(m,v,R,"⇑","\\Uparrow",!0);h(m,v,R,"↓","\\downarrow",!0);h(m,v,R,"⇓","\\Downarrow",!0);h(m,v,R,"↕","\\updownarrow",!0);h(m,v,R,"⇕","\\Updownarrow",!0);h(m,v,lt,"∐","\\coprod");h(m,v,lt,"⋁","\\bigvee");h(m,v,lt,"⋀","\\bigwedge");h(m,v,lt,"⨄","\\biguplus");h(m,v,lt,"⋂","\\bigcap");h(m,v,lt,"⋃","\\bigcup");h(m,v,lt,"∫","\\int");h(m,v,lt,"∫","\\intop");h(m,v,lt,"∬","\\iint");h(m,v,lt,"∭","\\iiint");h(m,v,lt,"∏","\\prod");h(m,v,lt,"∑","\\sum");h(m,v,lt,"⨂","\\bigotimes");h(m,v,lt,"⨁","\\bigoplus");h(m,v,lt,"⨀","\\bigodot");h(m,v,lt,"∮","\\oint");h(m,v,lt,"∯","\\oiint");h(m,v,lt,"∰","\\oiiint");h(m,v,lt,"⨆","\\bigsqcup");h(m,v,lt,"∫","\\smallint");h(Z,v,rs,"…","\\textellipsis");h(m,v,rs,"…","\\mathellipsis");h(Z,v,rs,"…","\\ldots",!0);h(m,v,rs,"…","\\ldots",!0);h(m,v,rs,"⋯","\\@cdots",!0);h(m,v,rs,"⋱","\\ddots",!0);h(m,v,I,"⋮","\\varvdots");h(Z,v,I,"⋮","\\varvdots");h(m,v,Ye,"ˊ","\\acute");h(m,v,Ye,"ˋ","\\grave");h(m,v,Ye,"¨","\\ddot");h(m,v,Ye,"~","\\tilde");h(m,v,Ye,"ˉ","\\bar");h(m,v,Ye,"˘","\\breve");h(m,v,Ye,"ˇ","\\check");h(m,v,Ye,"^","\\hat");h(m,v,Ye,"⃗","\\vec");h(m,v,Ye,"˙","\\dot");h(m,v,Ye,"˚","\\mathring");h(m,v,ke,"","\\@imath");h(m,v,ke,"","\\@jmath");h(m,v,I,"ı","ı");h(m,v,I,"ȷ","ȷ");h(Z,v,I,"ı","\\i",!0);h(Z,v,I,"ȷ","\\j",!0);h(Z,v,I,"ß","\\ss",!0);h(Z,v,I,"æ","\\ae",!0);h(Z,v,I,"œ","\\oe",!0);h(Z,v,I,"ø","\\o",!0);h(Z,v,I,"Æ","\\AE",!0);h(Z,v,I,"Œ","\\OE",!0);h(Z,v,I,"Ø","\\O",!0);h(Z,v,Ye,"ˊ","\\'");h(Z,v,Ye,"ˋ","\\`");h(Z,v,Ye,"ˆ","\\^");h(Z,v,Ye,"˜","\\~");h(Z,v,Ye,"ˉ","\\=");h(Z,v,Ye,"˘","\\u");h(Z,v,Ye,"˙","\\.");h(Z,v,Ye,"¸","\\c");h(Z,v,Ye,"˚","\\r");h(Z,v,Ye,"ˇ","\\v");h(Z,v,Ye,"¨","\\\"");h(Z,v,Ye,"˝","\\H");h(Z,v,Ye,"◯","\\textcircled");var qu={"--":!0,"---":!0,"``":!0,"''":!0};h(Z,v,I,"–","--",!0);h(Z,v,I,"–","\\textendash");h(Z,v,I,"—","---",!0);h(Z,v,I,"—","\\textemdash");h(Z,v,I,"‘","`",!0);h(Z,v,I,"‘","\\textquoteleft");h(Z,v,I,"’","'",!0);h(Z,v,I,"’","\\textquoteright");h(Z,v,I,"“","``",!0);h(Z,v,I,"“","\\textquotedblleft");h(Z,v,I,"”","''",!0);h(Z,v,I,"”","\\textquotedblright");h(m,v,I,"°","\\degree",!0);h(Z,v,I,"°","\\degree");h(Z,v,I,"°","\\textdegree",!0);h(m,v,I,"£","\\pounds");h(m,v,I,"£","\\mathsterling",!0);h(Z,v,I,"£","\\pounds");h(Z,v,I,"£","\\textsterling",!0);h(m,_,I,"✠","\\maltese");h(Z,_,I,"✠","\\maltese");var Qc='0123456789/@."';for(Ps=0;Ps<Qc.length;Ps++)ea=Qc.charAt(Ps),h(m,v,I,ea,ea);var ea,Ps,eu='0123456789!@*()-=+";:?/.,';for(Us=0;Us<eu.length;Us++)ta=eu.charAt(Us),h(Z,v,I,ta,ta);var ta,Us,sa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(Ws=0;Ws<sa.length;Ws++)Yr=sa.charAt(Ws),h(m,v,ke,Yr,Yr),h(Z,v,I,Yr,Yr);var Yr,Ws;h(m,_,I,"C","ℂ");h(Z,_,I,"C","ℂ");h(m,_,I,"H","ℍ");h(Z,_,I,"H","ℍ");h(m,_,I,"N","ℕ");h(Z,_,I,"N","ℕ");h(m,_,I,"P","ℙ");h(Z,_,I,"P","ℙ");h(m,_,I,"Q","ℚ");h(Z,_,I,"Q","ℚ");h(m,_,I,"R","ℝ");h(Z,_,I,"R","ℝ");h(m,_,I,"Z","ℤ");h(Z,_,I,"Z","ℤ");h(m,v,ke,"h","ℎ");h(Z,v,ke,"h","ℎ");var Ae;for(kt=0;kt<sa.length;kt++)if(Je=sa.charAt(kt),Ae=String.fromCharCode(55349,56320+kt),h(m,v,ke,Je,Ae),h(Z,v,I,Je,Ae),Ae=String.fromCharCode(55349,56372+kt),h(m,v,ke,Je,Ae),h(Z,v,I,Je,Ae),Ae=String.fromCharCode(55349,56424+kt),h(m,v,ke,Je,Ae),h(Z,v,I,Je,Ae),Ae=String.fromCharCode(55349,56580+kt),h(m,v,ke,Je,Ae),h(Z,v,I,Je,Ae),Ae=String.fromCharCode(55349,56684+kt),h(m,v,ke,Je,Ae),h(Z,v,I,Je,Ae),Ae=String.fromCharCode(55349,56736+kt),h(m,v,ke,Je,Ae),h(Z,v,I,Je,Ae),Ae=String.fromCharCode(55349,56788+kt),h(m,v,ke,Je,Ae),h(Z,v,I,Je,Ae),Ae=String.fromCharCode(55349,56840+kt),h(m,v,ke,Je,Ae),h(Z,v,I,Je,Ae),Ae=String.fromCharCode(55349,56944+kt),h(m,v,ke,Je,Ae),h(Z,v,I,Je,Ae),kt<26)Ae=String.fromCharCode(55349,56632+kt),h(m,v,ke,Je,Ae),h(Z,v,I,Je,Ae),Ae=String.fromCharCode(55349,56476+kt),h(m,v,ke,Je,Ae),h(Z,v,I,Je,Ae);var Je,kt;Ae=String.fromCharCode(55349,56668);h(m,v,ke,"k",Ae);h(Z,v,I,"k",Ae);for(Dn=0;Dn<10;Dn++)hn=Dn.toString(),Ae=String.fromCharCode(55349,57294+Dn),h(m,v,ke,hn,Ae),h(Z,v,I,hn,Ae),Ae=String.fromCharCode(55349,57314+Dn),h(m,v,ke,hn,Ae),h(Z,v,I,hn,Ae),Ae=String.fromCharCode(55349,57324+Dn),h(m,v,ke,hn,Ae),h(Z,v,I,hn,Ae),Ae=String.fromCharCode(55349,57334+Dn),h(m,v,ke,hn,Ae),h(Z,v,I,hn,Ae);var hn,Dn,$o="ÐÞþ";for(js=0;js<$o.length;js++)Xr=$o.charAt(js),h(m,v,ke,Xr,Xr),h(Z,v,I,Xr,Xr);var Xr,js,qo={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},tu={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},nu={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},w4={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Er={mathClass:"",textClass:"",font:""},ru={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},su={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},iu={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},Ho={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},Po={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},au={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},Uo={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},ou=[qo,qo,tu,tu,nu,nu,w4,Er,Er,Er,ru,ru,su,su,iu,iu,Ho,Ho,Po,Po,au,au,Er,Er,Uo,Uo],k4=[qo,Er,Ho,Po,Uo],x4=(e)=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484){var s=Math.floor((r-119808)/26);return ou[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return k4[i]}else if(r===120485||r===120486)return ou[0];else if(120486<r&&r<120782)return Er;else throw new te("Unsupported character: "+e)};function Ot(e){var{strict:t,errorCode:n,errorMsg:r,token:s,report:i}=e,a=t;if(typeof t==="function")if(i)a=t(n,r,s);else try{a=t(n,r,s)}catch(o){a="error"}switch(a){case!0:case"error":if(i)throw new te("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+n+"]"),s);else return!0;case!1:case"ignore":if(!i)return!1;break;case"warn":default:if(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+n+"]")),!i)return!1;break}}var aa=function(t,n,r){if(Ze[r][t]){var s=Ze[r][t].replace;if(s)t=s}return{value:t,metrics:rl(t,n,r)}},Tt=function(t,n,r,s,i){var a=aa(t,n,r),o=a.metrics;t=a.value;var l;if(o){var u=o.italic;if(r==="text"||s&&s.font==="mathit")u=0;l=new zt(t,o.height,o.depth,u,o.skew,o.width,i)}else Ot({strict:s.strict,errorCode:"symbolNotInFont",errorMsg:"No character metrics for '"+t+"' in style '"+n+"' and mode '"+r+"'",report:!0}),l=new zt(t,0,0,0,0,0,i);if(l.maxFontSize=s.sizeMultiplier,s.style.isTight())l.classes.push("mtight");var d=s.getColor();if(d)l.style.color=d;return l},sl=function(t,n,r,s){if(s===void 0)s=[];if(r.font==="boldsymbol"&&aa(t,"Main-Bold",n).metrics)return Tt(t,"Main-Bold",n,r,s.concat(["mathbf"]));else if(t==="\\"||Ze[n][t].font==="main")return Tt(t,"Main-Regular",n,r,s);else return Tt(t,"AMS-Regular",n,r,s.concat(["amsrm"]))},E4=function(t,n,r){if(r!=="textord"&&aa(t,"Math-BoldItalic",n).metrics)return{fontName:"Math-BoldItalic",fontClass:"boldsymbol"};else return{fontName:"Main-Bold",fontClass:"mathbf"}},oa=function(t,n){var r=t.type==="mathord"?"mathord":"textord",{mode:s,text:i}=t,a=["mord"],{font:o,fontFamily:l,fontWeight:u,fontShape:d}=n,f=s==="math"||s==="text"&&!!o,p=f?o:l,g="",b="";if(i.charCodeAt(0)===55349){var x=x4(i);g=x.font,b=x[s+"Class"]}if(g)return Tt(i,g,s,n,a.concat(b));else if(p){var k,A;if(p==="boldsymbol"){var T=E4(i,s,r);k=T.fontName,A=[T.fontClass]}else if(f)k=Wo[o].fontName,A=[o];else k=Ki(l,u,d),A=[l,u,d];if(aa(i,k,s).metrics)return Tt(i,k,s,n,a.concat(A));else if(Object.prototype.hasOwnProperty.call(qu,i)&&k.slice(0,10)==="Typewriter"){var S=[];for(var E=0;E<i.length;E++)S.push(Tt(i[E],k,s,n,a.concat(A)));return zn(S)}}if(r==="mathord")return Tt(i,"Math-Italic",s,n,a.concat(["mathnormal"]));else if(r==="textord"){var D=Ze[s][i]&&Ze[s][i].font;if(D==="ams"){var M=Ki("amsrm",u,d);return Tt(i,M,s,n,a.concat("amsrm",u,d))}else if(D==="main"||!D){var L=Ki("textrm",u,d);return Tt(i,L,s,n,a.concat(u,d))}else{var z=Ki(D,u,d);return Tt(i,z,s,n,a.concat(z,u,d))}}else throw Error("unexpected type: "+r+" in makeOrd")},A4=(e,t)=>{if(rr(e.classes)!==rr(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var s of Object.keys(t.style))if(e.style[s]!==t.style[s])return!1;return!0},Hu=(e)=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];if(n instanceof zt&&r instanceof zt&&A4(n,r))n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--}return e},il=function(t){var n=0,r=0,s=0;for(var i=0;i<t.children.length;i++){var a=t.children[i];if(a.height>n)n=a.height;if(a.depth>r)r=a.depth;if(a.maxFontSize>s)s=a.maxFontSize}t.height=n,t.depth=r,t.maxFontSize=s},X=function(t,n,r,s){var i=new Cr(t,n,r,s);return il(i),i},sr=(e,t,n,r)=>new Cr(e,t,n,r),ts=function(t,n,r){var s=X([t],[],n);return s.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),s.style.borderBottomWidth=ae(s.height),s.maxFontSize=1,s},C4=function(t,n,r,s){var i=new Qs(t,n,r,s);return il(i),i},zn=function(t){var n=new Ar(t);return il(n),n},ns=function(t,n){if(t instanceof Ar)return X([],[t],n);return t},_4=function(t){if(t.positionType==="individualShift"){var n=t.children,r=[n[0]],s=-n[0].shift-n[0].elem.depth,i=s;for(var a=1;a<n.length;a++){var o=-n[a].shift-i-n[a].elem.depth,l=o-(n[a-1].elem.height+n[a-1].elem.depth);i=i+o,r.push({type:"kern",size:l}),r.push(n[a])}return{children:r,depth:s}}var u;if(t.positionType==="top"){var d=t.positionData;for(var f=0;f<t.children.length;f++){var p=t.children[f];d-=p.type==="kern"?p.size:p.elem.height+p.elem.depth}u=d}else if(t.positionType==="bottom")u=-t.positionData;else{var g=t.children[0];if(g.type!=="elem")throw Error('First child must have type "elem".');if(t.positionType==="shift")u=-g.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")u=-g.elem.depth;else throw Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:u}},Oe=function(t,n){var r=_4(t),{children:s,depth:i}=r,a=0;for(var o=0;o<s.length;o++){var l=s[o];if(l.type==="elem"){var u=l.elem;a=Math.max(a,u.maxFontSize,u.height)}}a+=2;var d=X(["pstrut"],[]);d.style.height=ae(a);var f=[],p=i,g=i,b=i;for(var x=0;x<s.length;x++){var k=s[x];if(k.type==="kern")b+=k.size;else{var A=k.elem,T=k.wrapperClasses||[],S=k.wrapperStyle||{},E=X(T,[d,A],void 0,S);if(E.style.top=ae(-a-b-A.depth),k.marginLeft)E.style.marginLeft=k.marginLeft;if(k.marginRight)E.style.marginRight=k.marginRight;f.push(E),b+=A.height+A.depth}p=Math.min(p,b),g=Math.max(g,b)}var D=X(["vlist"],f);D.style.height=ae(g);var M;if(p<0){var L=X([],[]),z=X(["vlist"],[L]);z.style.height=ae(-p);var O=X(["vlist-s"],[new zt("​")]);M=[X(["vlist-r"],[D,O]),X(["vlist-r"],[z])]}else M=[X(["vlist-r"],[D])];var P=X(["vlist-t"],M);if(M.length===2)P.classes.push("vlist-t2");return P.height=g,P.depth=-p,P},Pu=(e,t)=>{var n=X(["mspace"],[],t),r=et(e,t);return n.style.marginRight=ae(r),n},Ki=(e,t,n)=>{var r,s;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}if(t==="textbf"&&n==="textit")s="BoldItalic";else if(t==="textbf")s="Bold";else if(n==="textit")s="Italic";else s="Regular";return r+"-"+s},Wo={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Uu={vec:["vec",0.471,0.714],oiintSize1:["oiintSize1",0.957,0.499],oiintSize2:["oiintSize2",1.472,0.659],oiiintSize1:["oiiintSize1",1.304,0.499],oiiintSize2:["oiiintSize2",1.98,0.659]},Wu=function(t,n){var r=Uu[t],s=r[0],i=r[1],a=r[2],o=new Nn(s),l=new pn([o],{width:ae(i),height:ae(a),style:"width:"+ae(i),viewBox:"0 0 "+1000*i+" "+1000*a,preserveAspectRatio:"xMinYMin"}),u=sr(["katex-overlay"],[l],n);return u.height=a,u.style.height=ae(a),u.style.width=ae(i),u},Qe={number:3,unit:"mu"},xr={number:4,unit:"mu"},Rn={number:5,unit:"mu"},T4={mord:{mop:Qe,mbin:xr,mrel:Rn,minner:Qe},mop:{mord:Qe,mop:Qe,mrel:Rn,minner:Qe},mbin:{mord:xr,mop:xr,mopen:xr,minner:xr},mrel:{mord:Rn,mop:Rn,mopen:Rn,minner:Rn},mopen:{},mclose:{mop:Qe,mbin:xr,mrel:Rn,minner:Qe},mpunct:{mord:Qe,mop:Qe,mrel:Rn,mopen:Qe,mclose:Qe,mpunct:Qe,minner:Qe},minner:{mord:Qe,mop:Qe,mbin:xr,mrel:Rn,mopen:Qe,mpunct:Qe,minner:Qe}},S4={mord:{mop:Qe},mop:{mord:Qe,mop:Qe},mbin:{},mrel:{},mopen:{},mclose:{mop:Qe},mpunct:{},minner:{mop:Qe}},ju={},Js={},Zs={};function he(e){var{type:t,names:n,htmlBuilder:r,mathmlBuilder:s}=e;for(var i=0;i<n.length;++i)ju[n[i]]=e;if(t){if(r)Js[t]=r;if(s)Zs[t]=s}}function _r(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;if(n)Js[t]=n;if(r)Zs[t]=r}var Ys=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},ot=function(t){return t.type==="ordgroup"?t.body:[t]},R4=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),M4=new Set(["rightmost","mrel","mclose","mpunct"]),D4={display:Se.DISPLAY,text:Se.TEXT,script:Se.SCRIPT,scriptscript:Se.SCRIPTSCRIPT},L4={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},dt=function(t,n,r,s){if(s===void 0)s=[null,null];var i=[];for(var a=0;a<t.length;a++){var o=Ne(t[a],n);if(o instanceof Ar){var l=o.children;i.push(...l)}else i.push(o)}if(Hu(i),!r)return i;var u=n;if(t.length===1){var d=t[0];if(d.type==="sizing")u=n.havingSize(d.size);else if(d.type==="styling")u=n.havingStyle(D4[d.style])}var f=X([s[0]||"leftmost"],[],n),p=X([s[1]||"rightmost"],[],n),g=r==="root";return jo(i,(b,x)=>{var k=x.classes[0],A=b.classes[0];if(k==="mbin"&&M4.has(A))x.classes[0]="mord";else if(A==="mbin"&&R4.has(k))b.classes[0]="mord"},{node:f},p,g),jo(i,(b,x)=>{var k,A,T=Ko(x),S=Ko(b),E=T&&S?b.hasClass("mtight")?(k=S4[T])==null?void 0:k[S]:(A=T4[T])==null?void 0:A[S]:null;if(E)return Pu(E,u)},{node:f},p,g),i},jo=function(t,n,r,s,i){if(s)t.push(s);var a=0;for(;a<t.length;a++){var o=t[a],l=Gu(o);if(l){jo(l.children,n,r,null,i);continue}var u=!o.hasClass("mspace");if(u){var d=n(o,r.node);if(d)if(r.insertAfter)r.insertAfter(d);else t.unshift(d),a++}if(u)r.node=o;else if(i&&o.hasClass("katex-newline"))r.node=X(["leftmost"]);r.insertAfter=((f)=>(p)=>{t.splice(f+1,0,p),a++})(a)}if(s)t.pop()},Gu=function(t){if(t instanceof Ar||t instanceof Qs||t instanceof Cr&&t.hasClass("enclosing"))return t;return null},Go=function(t,n){var r=Gu(t);if(r){var s=r.children;if(s.length){if(n==="right")return Go(s[s.length-1],"right");else if(n==="left")return Go(s[0],"left")}}return t},Ko=function(t,n){if(!t)return null;if(n)t=Go(t,n);var r=t.classes[0];return L4[r]||null},Xs=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return X(n.concat(r))},Ne=function(t,n,r){if(!t)return X();if(Js[t.type]){var s=Js[t.type](t,n);if(r&&n.size!==r.size){s=X(n.sizingClasses(r),[s],n);var i=n.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new te("Got group of unknown type: '"+t.type+"'")};function Vi(e,t){var n=X(["katex-base"],e,t),r=X(["katex-strut"]);if(r.style.height=ae(n.height+n.depth),n.depth)r.style.verticalAlign=ae(-n.depth);return n.children.unshift(r),n}function Vo(e,t){var n=null;if(e.length===1&&e[0].type==="tag")n=e[0].tag,e=e[0].body;var r=dt(e,t,"root"),s;if(r.length===2&&r[1].hasClass("katex-tag"))s=r.pop();var i=[],a=[];for(var o=0;o<r.length;o++)if(a.push(r[o]),r[o].hasClass("mbin")||r[o].hasClass("mrel")||r[o].hasClass("allowbreak")){var l=!1;while(o<r.length-1&&r[o+1].hasClass("mspace")&&!r[o+1].hasClass("katex-newline"))if(o++,a.push(r[o]),r[o].hasClass("nobreak"))l=!0;if(!l)i.push(Vi(a,t)),a=[]}else if(r[o].hasClass("katex-newline")){if(a.pop(),a.length>0)i.push(Vi(a,t)),a=[];i.push(r[o])}if(a.length>0)i.push(Vi(a,t));var u;if(n)u=Vi(dt(n,t,!0),t),u.classes=["katex-tag"],i.push(u);else if(s)i.push(s);var d=X(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),u){var f=u.children[0];if(f.style.height=ae(d.height+d.depth),d.depth)f.style.verticalAlign=ae(-d.depth)}return d}function Ku(e){return new Ar(e)}class ne{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}if(this.classes.length>0)e.className=rr(this.classes);for(var s=0;s<this.children.length;s++)if(this.children[s]instanceof st&&this.children[s+1]instanceof st){var i=this.children[s].toText()+this.children[++s].toText();while(this.children[s+1]instanceof st)i+=this.children[++s].toText();e.appendChild(new st(i).toNode())}else e.appendChild(this.children[s].toNode());return e}toMarkup(){var e="<"+this.type;for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e+=" "+n+'="',e+=At(r),e+='"'}if(this.classes.length>0)e+=' class ="'+At(rr(this.classes))+'"';e+=">";for(var s=0;s<this.children.length;s++)e+=this.children[s].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map((e)=>e.toText()).join("")}}class st{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return At(this.toText())}toText(){return this.text}}class al{constructor(e){if(this.width=void 0,this.character=void 0,this.width=e,e>=0.05555&&e<=0.05556)this.character=" ";else if(e>=0.1666&&e<=0.1667)this.character=" ";else if(e>=0.2222&&e<=0.2223)this.character=" ";else if(e>=0.2777&&e<=0.2778)this.character="  ";else if(e>=-0.05556&&e<=-0.05555)this.character=" ⁣";else if(e>=-0.1667&&e<=-0.1666)this.character=" ⁣";else if(e>=-0.2223&&e<=-0.2222)this.character=" ⁣";else if(e>=-0.2778&&e<=-0.2777)this.character=" ⁣";else this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);else{var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",ae(this.width)),e}}toMarkup(){if(this.character)return"<mtext>"+this.character+"</mtext>";else return'<mspace width="'+ae(this.width)+'"/>'}toText(){if(this.character)return this.character;else return" "}}var I4=new Set(["\\imath","\\jmath"]),N4=new Set(["mrow","mtable"]),Kt=function(t,n,r){var s,i;if(Ze[n][t]&&Ze[n][t].replace&&t.charCodeAt(0)!==55349&&!(Object.prototype.hasOwnProperty.call(qu,t)&&((r==null||(s=r.fontFamily)==null?void 0:s.slice(4,6))==="tt"||(r==null||(i=r.font)==null?void 0:i.slice(4,6))==="tt")))t=Ze[n][t].replace;return new st(t)},ol=function(t){if(t.length===1)return t[0];else return new ne("mrow",t)},B4={mathit:"italic",boldsymbol:(e)=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},ll=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";else if(t.fontFamily==="textsf")if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"sans-serif-bold-italic";else if(t.fontShape==="textit")return"sans-serif-italic";else if(t.fontWeight==="textbf")return"bold-sans-serif";else return"sans-serif";else if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";else if(t.fontShape==="textit")return"italic";else if(t.fontWeight==="textbf")return"bold"}var n=t.font;if(!n||n==="mathnormal")return null;var r=e.mode,s=B4[n];if(s)return typeof s==="function"?s(e):s;var i=e.text;if(I4.has(i))return null;if(Ze[r][i]){var a=Ze[r][i].replace;if(a)i=a}var o=Wo[n].fontName;if(rl(i,o,r))return Wo[n].variant;return null};function To(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof st&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof st&&n.text===","}else return!1}var Wt=function(t,n,r){if(t.length===1){var s=qe(t[0],n);if(r&&s instanceof ne&&s.type==="mo")s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em");return[s]}var i=[],a;for(var o=0;o<t.length;o++){var l=qe(t[o],n);if(l instanceof ne&&a instanceof ne){if(l.type==="mtext"&&a.type==="mtext"&&l.getAttribute("mathvariant")===a.getAttribute("mathvariant")){a.children.push(...l.children);continue}else if(l.type==="mn"&&a.type==="mn"){a.children.push(...l.children);continue}else if(To(l)&&a.type==="mn"){a.children.push(...l.children);continue}else if(l.type==="mn"&&To(a))l.children=[...a.children,...l.children],i.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(a.type==="mn"||To(a))){var u=l.children[0];if(u instanceof ne&&u.type==="mn")u.children=[...a.children,...u.children],i.pop()}else if(a.type==="mi"&&a.children.length===1){var d=a.children[0];if(d instanceof st&&d.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];if(f instanceof st&&f.text.length>0)f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop()}}}i.push(l),a=l}return i},ir=function(t,n,r){return ol(Wt(t,n,r))},qe=function(t,n){if(!t)return new ne("mrow");if(Zs[t.type])return Zs[t.type](t,n);else throw new te("Got group of unknown type: '"+t.type+"'")};function lu(e,t,n,r,s){var i=Wt(e,n),a;if(i.length===1&&i[0]instanceof ne&&N4.has(i[0].type))a=i[0];else a=new ne("mrow",i);var o=new ne("annotation",[new st(t)]);o.setAttribute("encoding","application/x-tex");var l=new ne("semantics",[a,o]),u=new ne("math",[l]);if(u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r)u.setAttribute("display","block");var d=s?"katex":"katex-mathml";return X([d],[u])}var O4=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],cu=[0.5,0.6,0.7,0.8,0.9,1,1.2,1.44,1.728,2.074,2.488],uu=function(t,n){return n.size<2?t:O4[t-1][n.size-1]};class Ln{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.strict=void 0,this.style=e.style,this.color=e.color,this.size=e.size||Ln.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=cu[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this.strict=e.strict,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness,strict:this.strict};return Object.assign(t,e),new Ln(t)}havingStyle(e){if(this.style===e)return this;else return this.extend({style:e,size:uu(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){if(this.size===e&&this.textSize===e)return this;else return this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:cu[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=uu(Ln.BASESIZE,e);if(this.size===t&&this.textSize===Ln.BASESIZE&&this.style===e)return this;else return this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){if(e.size!==this.size)return["katex-sizing","reset-size"+e.size,"size"+this.size];else return[]}baseSizingClasses(){if(this.size!==Ln.BASESIZE)return["katex-sizing","reset-size"+this.size,"size"+Ln.BASESIZE];else return[]}fontMetrics(){if(!this._fontMetrics)this._fontMetrics=y4(this.size);return this._fontMetrics}getColor(){if(this.phantom)return"transparent";else return this.color}}Ln.BASESIZE=6;var Vu=(e)=>new Ln({style:e.displayMode?Se.DISPLAY:Se.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness,strict:e.strict}),Ju=function(t,n){if(n.displayMode){var r=["katex-display"];if(n.leqno)r.push("leqno");if(n.fleqn)r.push("fleqn");t=X(r,[t])}return t},z4=function(t,n,r){var s=Vu(r),i;if(r.output==="mathml")return lu(t,n,s,r.displayMode,!0);else if(r.output==="html"){var a=Vo(t,s);i=X(["katex"],[a])}else{var o=lu(t,n,s,r.displayMode,!1),l=Vo(t,s);i=X(["katex"],[o,l])}return Ju(i,r)},F4=function(t,n){var r=Vu(n),s=Vo(t,r),i=X(["katex"],[s]);return Ju(i,n)},$4={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},la=function(t){var n=new ne("mo",[new st($4[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},q4={overrightarrow:[["rightarrow"],0.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],0.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],0.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],0.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],0.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],0.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],0.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],0.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],0.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],0.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],0.888,522,"xMaxYMin"],xlongequal:[["longequal"],0.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],0.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],0.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],0.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],0.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],0.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],0.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],0.888,342],undergroup:[["leftgroupunder","rightgroupunder"],0.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},H4=new Set(["widehat","widecheck","widetilde","utilde"]),ca=function(t,n){function r(){var l=400000,u=t.label.slice(1);if(H4.has(u)&&"base"in t){var d=t.base.type==="ordgroup"?t.base.body.length:1,f,p,g;if(d>5)if(u==="widehat"||u==="widecheck")f=420,l=2364,g=0.42,p=u+"4";else f=312,l=2340,g=0.34,p="tilde4";else{var b=[1,1,2,2,3,3][d];if(u==="widehat"||u==="widecheck")l=[0,1062,2364,2364,2364][b],f=[0,239,300,360,420][b],g=[0,0.24,0.3,0.3,0.36,0.42][b],p=u+b;else l=[0,600,1033,2339,2340][b],f=[0,260,286,306,312][b],g=[0,0.26,0.286,0.3,0.306,0.34][b],p="tilde"+b}var x=new Nn(p),k=new pn([x],{width:"100%",height:ae(g),viewBox:"0 0 "+l+" "+f,preserveAspectRatio:"none"});return{span:sr([],[k],n),minWidth:0,height:g}}else{var A=[],T=q4[u];if(!T)throw Error('No SVG data for "'+u+'".');var S=T[0],E=T[1],D=T[2],M=D/1000,L=S.length,z,O;if(L===1){if(T.length!==4)throw Error('Expected 4-tuple for single-path SVG data "'+u+'".');z=["hide-tail"],O=[T[3]]}else if(L===2)z=["halfarrow-left","halfarrow-right"],O=["xMinYMin","xMaxYMin"];else if(L===3)z=["brace-left","brace-center","brace-right"],O=["xMinYMin","xMidYMin","xMaxYMin"];else throw Error(`Correct katexImagesData or update code here to support
279
- `+L+" children.");for(var P=0;P<L;P++){var V=new Nn(S[P]),G=new pn([V],{width:"400em",height:ae(M),viewBox:"0 0 "+l+" "+D,preserveAspectRatio:O[P]+" slice"}),ce=sr([z[P]],[G],n);if(L===1)return{span:ce,minWidth:E,height:M};else ce.style.height=ae(M),A.push(ce)}return{span:X(["katex-stretchy"],A,n),minWidth:E,height:M}}}var s=r(),{span:i,minWidth:a,height:o}=s;if(i.height=o,i.style.height=ae(o),a>0)i.style.minWidth=ae(a);return i},P4=function(t,n,r,s,i){var a,o=t.height+t.depth+r+s;if(/fbox|color|angl/.test(n)){if(a=X(["katex-stretchy",n],[],i),n==="fbox"){var l=i.color&&i.getColor();if(l)a.style.borderColor=l}}else{var u=[];if(/^[bx]cancel$/.test(n))u.push(new ra({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"}));if(/^x?cancel$/.test(n))u.push(new ra({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new pn(u,{width:"100%",height:ae(o)});a=sr([],[d],i)}return a.height=o,a.style.height=ae(o),a},U4=["bin","close","inner","open","punct","rel"],W4=["accent-token","mathord","op-token","spacing","textord"],j4=new Set(U4),G4=new Set(W4);function K4(e){return j4.has(e)}function Me(e,t){if(!e||e.type!==t)throw Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function ua(e){var t=da(e);if(!t)throw Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function da(e){if(e.type==="atom"||G4.has(e.type))return e;return null}function cl(e,t,n){var r="";for(var s of e.body)if(s.type==="textord")r+=s.text;else if(n&&s.type==="spacing"&&s.text===" ")r+=" ";else throw new te(t,e);return r}var Zu=(e)=>{if(e instanceof zt)return e;if(b4(e)&&e.children.length===1)return Zu(e.children[0])},Yu=(e,t)=>{var n,r,s;if(e&&e.type==="supsub")r=Me(e.base,"accent"),n=r.base,e.base=n,s=g4(Ne(e,t)),e.base=r;else r=Me(e,"accent"),n=r.base;var i=Ne(n,t.havingCrampedStyle()),a=r.isShifty&&Bn(n),o=0;if(a){var l,u;o=(l=(u=Zu(i))==null?void 0:u.skew)!=null?l:0}var d=r.label==="\\c",f=d?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight),p;if(!r.isStretchy){var g,b;if(r.label==="\\vec")g=Wu("vec",t),b=Uu.vec[1];else if(g=oa({type:"textord",mode:r.mode,text:r.label},t),g=p4(g),g.italic=0,b=g.width,d)f+=g.depth;p=X(["accent-body"],[g]);var x=r.label==="\\textcircled";if(x)p.classes.push("accent-full"),f=i.height;var k=o;if(!x)k-=b/2;if(p.style.left=ae(k),r.label==="\\textcircled")p.style.top=".2em";p=Oe({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]})}else p=ca(r,t),p=Oe({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ae(2*o)+")",marginLeft:ae(2*o)}:void 0}]});var A=X(["mord","katex-accent"],[p],t);if(s)return s.children[0]=A,s.height=Math.max(A.height,s.height),s.classes[0]="mord",s;else return A};var V4=(e,t)=>{var n=e.isStretchy?la(e.label):new ne("mo",[Kt(e.label,e.mode)]),r=new ne("mover",[qe(e.base,t),n]);return r.setAttribute("accent","true"),r},J4=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e)=>"\\"+e).join("|"));he({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"],numArgs:1,handler:(e,t)=>{var n=Ys(t[0]),r=!J4.test(e.funcName),s=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:n}},htmlBuilder:Yu,mathmlBuilder:V4});he({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.","\\\"","\\c","\\r","\\H","\\v","\\textcircled"],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"],handler:(e,t)=>{var n=t[0],r=e.parser.mode;if(r==="math")Ot({strict:e.parser.settings.strict,errorCode:"mathVsTextAccents",errorMsg:"LaTeX's accent "+e.funcName+" works only in text mode",report:!0}),r="text";return{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}});he({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:s}},htmlBuilder:(e,t)=>{var n=Ne(e.base,t),r=ca(e,t),s=e.label==="\\utilde"?0.12:0,i=Oe({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:n}]});return X(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var n=la(e.label),r=new ne("munder",[qe(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Ji=(e)=>{var t=new ne("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};he({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),s=ns(Ne(e.body,r,t),t),i=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var a;if(e.below)r=t.havingStyle(n.sub()),a=ns(Ne(e.below,r,t),t),a.classes.push(i+"-arrow-pad");var o=ca(e,t),l=-t.fontMetrics().axisHeight+0.5*o.height,u=-t.fontMetrics().axisHeight-0.5*o.height-0.111;if(s.depth>0.25||e.label==="\\xleftequilibrium")u-=s.depth;var d;if(a){var f=-t.fontMetrics().axisHeight+a.height+0.5*o.height+0.111;d=Oe({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:f}]})}else d=Oe({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return X(["mrel","x-arrow"],[d],t)},mathmlBuilder(e,t){var n=la(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=Ji(qe(e.body,t));if(e.below){var i=Ji(qe(e.below,t));r=new ne("munderover",[n,i,s])}else r=new ne("mover",[n,s])}else if(e.below){var a=Ji(qe(e.below,t));r=new ne("munder",[n,a])}else r=Ji(),r=new ne("mover",[n,r]);return r}});function Z4(e,t){var n=dt(e.body,t,!0);return X([e.mclass],n,t)}function Y4(e,t){var n,r=Wt(e.body,t);if(e.mclass==="minner")n=new ne("mpadded",r);else if(e.mclass==="mord")if(e.isCharacterBox)n=r[0],n.type="mi";else n=new ne("mi",r);else{if(e.isCharacterBox)n=r[0],n.type="mo";else n=new ne("mo",r);if(e.mclass==="mbin")n.attributes.lspace="0.22em",n.attributes.rspace="0.22em";else if(e.mclass==="mpunct")n.attributes.lspace="0em",n.attributes.rspace="0.17em";else if(e.mclass==="mopen"||e.mclass==="mclose")n.attributes.lspace="0em",n.attributes.rspace="0em"}return n}he({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],numArgs:1,primitive:!0,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:ot(s),isCharacterBox:Bn(s)}},htmlBuilder:Z4,mathmlBuilder:Y4});var ha=(e)=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;if(t.type==="atom"&&(t.family==="bin"||t.family==="rel"))return"m"+t.family;else return"mord"};he({type:"mclass",names:["\\@binrel"],numArgs:2,handler(e,t){var n=e.parser;return{type:"mclass",mode:n.mode,mclass:ha(t[0]),body:ot(t[1]),isCharacterBox:Bn(t[1])}}});he({type:"mclass",names:["\\stackrel","\\overset","\\underset"],numArgs:2,handler(e,t){var{parser:n,funcName:r}=e,s=t[1],i=t[0],a;if(r!=="\\stackrel")a=ha(s);else a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ot(s)},l=r==="\\underset"?{type:"supsub",mode:i.mode,base:o,sub:i}:{type:"supsub",mode:i.mode,base:o,sup:i};return{type:"mclass",mode:n.mode,mclass:a,body:[l],isCharacterBox:Bn(l)}}});he({type:"pmb",names:["\\pmb"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser;return{type:"pmb",mode:n.mode,mclass:ha(t[0]),body:ot(t[0])}},htmlBuilder(e,t){var n=dt(e.body,t,!0),r=X([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=Wt(e.body,t),r=new ne("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var X4={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},du=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),hu=(e)=>e.type==="textord"&&e.text==="@",Q4=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function e2(e,t,n){var r=X4[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var s=n.callFunction("\\\\cdleft",[t[0]],[]),i={type:"atom",text:r,mode:"math",family:"rel"},a=n.callFunction("\\Big",[i],[]),o=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[s,a,o]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function t2(e){var t=[];e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();while(!0){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){if(t[t.length-1].length===0)t.pop();break}else throw new te("Expected \\\\ or \\cr or \\end",e.nextToken)}var r=[],s=[r];for(var i=0;i<t.length;i++){var a=t[i],o=du();for(var l=0;l<a.length;l++)if(!hu(a[l]))o.body.push(a[l]);else{r.push(o),l+=1;var u=ua(a[l]).text,d=[,,];if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(u));else if("<>AV".includes(u))for(var f=0;f<2;f++){var p=!0;for(var g=l+1;g<a.length;g++){if(Q4(a[g],u)){p=!1,l=g;break}if(hu(a[g]))throw new te("Missing a "+u+" character to complete a CD arrow.",a[g]);d[f].body.push(a[g])}if(p)throw new te("Missing a "+u+" character to complete a CD arrow.",a[l])}else throw new te('Expected one of "<>AV=|." after @',a[l]);var b=e2(u,d,e),x={type:"styling",body:[b],mode:"math",style:"display",resetFont:!0};r.push(x),o=du()}if(i%2===0)r.push(o);else r.shift();r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var k=Array(s[0].length).fill({type:"align",align:"c",pregap:0.25,postgap:0.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:k,colSeparationType:"CD",hLinesBeforeRow:Array(s.length+1).fill([])}}he({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=ns(Ne(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=ae(0.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new ne("mrow",[qe(e.label,t)]);if(n=new ne("mpadded",[n]),n.setAttribute("width","0"),e.side==="left")n.setAttribute("lspace","-1width");return n.setAttribute("voffset","0.7em"),n=new ne("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});he({type:"cdlabelparent",names:["\\\\cdparent"],numArgs:1,handler(e,t){var n=e.parser;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=ns(Ne(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new ne("mrow",[qe(e.fragment,t)])}});he({type:"textord",names:["\\@char"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=Me(t[0],"ordgroup"),s=cl(r,"\\@char has non-numeric argument"),i=parseInt(s),a;if(isNaN(i))throw new te("\\@char has non-numeric argument "+s);else if(i<0||i>1114111)throw new te("\\@char with invalid code point "+s);else if(i<=65535)a=String.fromCharCode(i);else i-=65536,a=String.fromCharCode((i>>10)+55296,(i&1023)+56320);return{type:"textord",mode:n.mode,text:a}}});var n2=(e,t)=>{var n=dt(e.body,t.withColor(e.color),!1);return zn(n)},r2=(e,t)=>{var n=Wt(e.body,t.withColor(e.color)),r=new ne("mstyle",n);return r.setAttribute("mathcolor",e.color),r};he({type:"color",names:["\\textcolor"],numArgs:2,allowedInText:!0,argTypes:["color","original"],handler(e,t){var n=e.parser,r=Me(t[0],"color-token").color,s=t[1];return{type:"color",mode:n.mode,color:r,body:ot(s)}},htmlBuilder:n2,mathmlBuilder:r2});he({type:"color",names:["\\color"],numArgs:1,allowedInText:!0,argTypes:["color"],handler(e,t){var{parser:n,breakOnTokenText:r}=e,s=Me(t[0],"color-token").color;n.gullet.macros.set("\\current@color",s);var i=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:s,body:i}}});he({type:"cr",names:["\\\\"],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=t.gullet.future().text==="["?t.parseSizeGroup(!0):null,r=!t.settings.displayMode||!Ot({strict:t.settings.strict,errorCode:"newLineInDisplayMode",errorMsg:"In LaTeX, \\\\ or \\newline does nothing in display mode",report:!1});return{type:"cr",mode:t.mode,newLine:r,size:n&&Me(n,"size").value}},htmlBuilder(e,t){var n=X(["mspace"],[],t);if(e.newLine){if(n.classes.push("katex-newline"),e.size)n.style.marginTop=ae(et(e.size,t))}return n},mathmlBuilder(e,t){var n=new ne("mspace");if(e.newLine){if(n.setAttribute("linebreak","newline"),e.size)n.setAttribute("height",ae(et(e.size,t)))}return n}});var Jo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Xu=(e)=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new te("Expected a control sequence",e);return t},s2=(e)=>{var t=e.gullet.popToken();if(t.text==="="){if(t=e.gullet.popToken(),t.text===" ")t=e.gullet.popToken()}return t},Qu=(e,t,n,r)=>{var s=e.gullet.macros.get(n.text);if(s==null)n.noexpand=!0,s={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)};e.gullet.macros.set(t,s,r)};he({type:"internal",names:["\\global","\\long","\\\\globallong"],numArgs:0,allowedInText:!0,handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Jo[r.text]){if(n==="\\global"||n==="\\\\globallong")r.text=Jo[r.text];return Me(t.parseFunction(),"internal")}throw new te("Invalid token after macro prefix",r)}});he({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new te("Expected a control sequence",r);var i=0,a,o=[[]];while(t.gullet.future().text!=="{")if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){a=t.gullet.future(),o[i].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new te('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new te('Argument number "'+r.text+'" out of order');i++,o.push([])}else if(r.text==="EOF")throw new te("Expected a macro definition");else o[i].push(r.text);var l=t.gullet.consumeArg(),u=l.tokens;if(a)u.unshift(a);if(n==="\\edef"||n==="\\xdef")u=t.gullet.expandTokens(u),u.reverse();return t.gullet.macros.set(s,{tokens:u,numArgs:i,delimiters:o},n===Jo[n]),{type:"internal",mode:t.mode}}});he({type:"internal",names:["\\let","\\\\globallet"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=Xu(t.gullet.popToken());t.gullet.consumeSpaces();var s=s2(t);return Qu(t,r,s,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});he({type:"internal",names:["\\futurelet","\\\\globalfuture"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=Xu(t.gullet.popToken()),s=t.gullet.popToken(),i=t.gullet.popToken();return Qu(t,r,i,n==="\\\\globalfuture"),t.gullet.pushToken(i),t.gullet.pushToken(s),{type:"internal",mode:t.mode}}});var Gs=function(t,n,r){var s=Ze.math[t]&&Ze.math[t].replace,i=rl(s||t,n,r);if(!i)throw Error("Unsupported symbol "+t+" and font size "+n+".");return i},ul=function(t,n,r,s){var i=r.havingBaseStyle(n),a=X(s.concat(i.sizingClasses(r)),[t],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},ed=function(t,n,r){var s=n.havingBaseStyle(r),i=(1-n.sizeMultiplier/s.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=ae(i),t.height-=i,t.depth+=i},i2=function(t,n,r,s,i,a){var o=Tt(t,"Main-Regular",i,s),l=ul(o,n,s,a);if(r)ed(l,s,n);return l},a2=function(t,n,r,s){return Tt(t,"Size"+n+"-Regular",r,s)},td=function(t,n,r,s,i,a){var o=a2(t,n,i,s),l=ul(X(["delimsizing","size"+n],[o],s),Se.TEXT,s,a);if(r)ed(l,s,Se.TEXT);return l},So=function(t,n,r,s){var i;if(n==="Size1-Regular")i="delim-size1";else i="delim-size4";var a=X(["delimsizinginner",i],[X([],[Tt(t,n,r,s)])]);return{type:"elem",elem:a}},Ro=function(t,n,r){var s=mn["Size4-Regular"][t.charCodeAt(0)]?mn["Size4-Regular"][t.charCodeAt(0)][4]:mn["Size1-Regular"][t.charCodeAt(0)][4],i=new Nn("inner",c4(t,Math.round(1000*n))),a=new pn([i],{width:ae(s),height:ae(n),style:"width:"+ae(s),viewBox:"0 0 "+1000*s+" "+Math.round(1000*n),preserveAspectRatio:"xMinYMin"}),o=sr([],[a],r);return o.height=n,o.style.height=ae(n),o.style.width=ae(s),{type:"elem",elem:o}},Zo=0.008,Zi={type:"kern",size:-1*Zo},o2=new Set(["|","\\lvert","\\rvert","\\vert"]),l2=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),nd=function(t,n,r,s,i,a){var o,l,u,d,f="",p=0;o=u=d=t,l=null;var g="Size1-Regular";if(t==="\\uparrow")u=d="⏐";else if(t==="\\Uparrow")u=d="‖";else if(t==="\\downarrow")o=u="⏐";else if(t==="\\Downarrow")o=u="‖";else if(t==="\\updownarrow")o="\\uparrow",u="⏐",d="\\downarrow";else if(t==="\\Updownarrow")o="\\Uparrow",u="‖",d="\\Downarrow";else if(o2.has(t))u="∣",f="vert",p=333;else if(l2.has(t))u="∥",f="doublevert",p=556;else if(t==="["||t==="\\lbrack")o="⎡",u="⎢",d="⎣",g="Size4-Regular",f="lbrack",p=667;else if(t==="]"||t==="\\rbrack")o="⎤",u="⎥",d="⎦",g="Size4-Regular",f="rbrack",p=667;else if(t==="\\lfloor"||t==="⌊")u=o="⎢",d="⎣",g="Size4-Regular",f="lfloor",p=667;else if(t==="\\lceil"||t==="⌈")o="⎡",u=d="⎢",g="Size4-Regular",f="lceil",p=667;else if(t==="\\rfloor"||t==="⌋")u=o="⎥",d="⎦",g="Size4-Regular",f="rfloor",p=667;else if(t==="\\rceil"||t==="⌉")o="⎤",u=d="⎥",g="Size4-Regular",f="rceil",p=667;else if(t==="("||t==="\\lparen")o="⎛",u="⎜",d="⎝",g="Size4-Regular",f="lparen",p=875;else if(t===")"||t==="\\rparen")o="⎞",u="⎟",d="⎠",g="Size4-Regular",f="rparen",p=875;else if(t==="\\{"||t==="\\lbrace")o="⎧",l="⎨",d="⎩",u="⎪",g="Size4-Regular";else if(t==="\\}"||t==="\\rbrace")o="⎫",l="⎬",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\lgroup"||t==="⟮")o="⎧",d="⎩",u="⎪",g="Size4-Regular";else if(t==="\\rgroup"||t==="⟯")o="⎫",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\lmoustache"||t==="⎰")o="⎧",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\rmoustache"||t==="⎱")o="⎫",d="⎩",u="⎪",g="Size4-Regular";var b=Gs(o,g,i),x=b.height+b.depth,k=Gs(u,g,i),A=k.height+k.depth,T=Gs(d,g,i),S=T.height+T.depth,E=0,D=1;if(l!==null){var M=Gs(l,g,i);E=M.height+M.depth,D=2}var L=x+S+E,z=Math.max(0,Math.ceil((n-L)/(D*A))),O=L+z*D*A,P=s.fontMetrics().axisHeight;if(r)P*=s.sizeMultiplier;var V=O/2-P,G=[];if(f.length>0){var ce=O-x-S,re=Math.round(O*1000),de=u4(f,Math.round(ce*1000)),F=new Nn(f,de),K=ae(p/1000),Y=ae(re/1000),ee=new pn([F],{width:K,height:Y,viewBox:"0 0 "+p+" "+re}),ie=sr([],[ee],s);ie.height=re/1000,ie.style.width=K,ie.style.height=Y,G.push({type:"elem",elem:ie})}else{if(G.push(So(d,g,i,s)),G.push(Zi),l===null){var H=O-x-S+2*Zo;G.push(Ro(u,H,s))}else{var q=(O-x-S-E)/2+2*Zo;G.push(Ro(u,q,s)),G.push(Zi),G.push(So(l,g,i,s)),G.push(Zi),G.push(Ro(u,q,s))}G.push(Zi),G.push(So(o,g,i,s))}var W=s.havingBaseStyle(Se.TEXT),le=Oe({positionType:"bottom",positionData:V,children:G});return ul(X(["delimsizing","mult"],[le],W),Se.TEXT,s,a)},Mo=80,Do=0.08,Lo=function(t,n,r,s,i){var a=l4(t,s,r),o=new Nn(t,a),l=new pn([o],{width:"400em",height:ae(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return sr(["hide-tail"],[l],i)},c2=function(t,n){var r=n.havingBaseSizing(),s=od("\\surd",t*r.sizeMultiplier,ad,r),i=r.sizeMultiplier,a=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),o,l,u,d,f;if(s.type==="small"){if(d=1000+1000*a+Mo,t<1)i=1;else if(t<1.4)i=0.7;l=(1+a+Do)/i,u=(1+a)/i,o=Lo("sqrtMain",l,d,a,n),o.style.minWidth="0.853em",f=0.833/i}else if(s.type==="large")d=(1000+Mo)*Ks[s.size],u=(Ks[s.size]+a)/i,l=(Ks[s.size]+a+Do)/i,o=Lo("sqrtSize"+s.size,l,d,a,n),o.style.minWidth="1.02em",f=1/i;else l=t+a+Do,u=t+a,d=Math.floor(1000*t+a)+Mo,o=Lo("sqrtTall",l,d,a,n),o.style.minWidth="0.742em",f=1.056;return o.height=u,o.style.height=ae(l),{span:o,advanceWidth:f,ruleWidth:(n.fontMetrics().sqrtRuleThickness+a)*i}},rd=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),u2=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),sd=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Ks=[0,1.2,1.8,2.4,3],id=function(t,n,r,s,i){if(t==="<"||t==="\\lt"||t==="⟨")t="\\langle";else if(t===">"||t==="\\gt"||t==="⟩")t="\\rangle";if(rd.has(t)||sd.has(t))return td(t,n,!1,r,s,i);else if(u2.has(t))return nd(t,Ks[n],!1,r,s,i);else throw new te("Illegal delimiter: '"+t+"'")},d2=[{type:"small",style:Se.SCRIPTSCRIPT},{type:"small",style:Se.SCRIPT},{type:"small",style:Se.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],h2=[{type:"small",style:Se.SCRIPTSCRIPT},{type:"small",style:Se.SCRIPT},{type:"small",style:Se.TEXT},{type:"stack"}],ad=[{type:"small",style:Se.SCRIPTSCRIPT},{type:"small",style:Se.SCRIPT},{type:"small",style:Se.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],f2=function(t){if(t.type==="small")return"Main-Regular";else if(t.type==="large")return"Size"+t.size+"-Regular";else if(t.type==="stack")return"Size4-Regular";else{var n=t.type;throw Error("Add support for delim type '"+n+"' here.")}},od=function(t,n,r,s){var i=Math.min(2,3-s.style.size);for(var a=i;a<r.length;a++){var o=r[a];if(o.type==="stack")break;var l=Gs(t,f2(o),"math"),u=l.height+l.depth;if(o.type==="small"){var d=s.havingBaseStyle(o.style);u*=d.sizeMultiplier}if(u>n)return o}return r[r.length-1]},Yo=function(t,n,r,s,i,a){if(t==="<"||t==="\\lt"||t==="⟨")t="\\langle";else if(t===">"||t==="\\gt"||t==="⟩")t="\\rangle";var o;if(sd.has(t))o=d2;else if(rd.has(t))o=ad;else o=h2;var l=od(t,n,o,s);if(l.type==="small")return i2(t,l.style,r,s,i,a);else if(l.type==="large")return td(t,l.size,r,s,i,a);else return nd(t,n,r,s,i,a)},Io=function(t,n,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,l=901,u=5/s.fontMetrics().ptPerEm,d=Math.max(n-o,r+o),f=Math.max(d/500*l,2*d-u);return Yo(t,f,!0,s,i,a)},fu={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},m2=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function mu(e){return"isMiddle"in e}function fa(e,t){var n=da(e);if(n&&m2.has(n.text))return n;else if(n)throw new te("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e);else throw new te("Invalid delimiter type '"+e.type+"'",e)}he({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],numArgs:1,argTypes:["primitive"],handler:(e,t)=>{var n=fa(Ys(t[0]),e);return{type:"delimsizing",mode:e.parser.mode,size:fu[e.funcName].size,mclass:fu[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>{if(e.delim===".")return X([e.mclass]);return id(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:(e)=>{var t=[];if(e.delim!==".")t.push(Kt(e.delim,e.mode));var n=new ne("mo",t);if(e.mclass==="mopen"||e.mclass==="mclose")n.setAttribute("fence","true");else n.setAttribute("fence","false");n.setAttribute("stretchy","true");var r=ae(Ks[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function pu(e){if(!e.body)throw Error("Bug: The leftright ParseNode wasn't fully parsed.")}he({type:"leftright-right",names:["\\right"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!=="string")throw new te("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:fa(t[0],e).text,color:n}}});he({type:"leftright",names:["\\left"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=fa(t[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=Me(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:n.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{pu(e);var n=dt(e.body,t,!0,["mopen","mclose"]),r=0,s=0,i=!1;for(var a=0;a<n.length;a++){var o=n[a];if(mu(o))i=!0;else r=Math.max(n[a].height,r),s=Math.max(n[a].depth,s)}r*=t.sizeMultiplier,s*=t.sizeMultiplier;var l;if(e.left===".")l=Xs(t,["mopen"]);else l=Io(e.left,r,s,t,e.mode,["mopen"]);if(n.unshift(l),i)for(var u=1;u<n.length;u++){var d=n[u];if(mu(d)){var f=d.isMiddle;n[u]=Io(f.delim,r,s,f.options,e.mode,[])}}var p;if(e.right===".")p=Xs(t,["mclose"]);else{var g=e.rightColor?t.withColor(e.rightColor):t;p=Io(e.right,r,s,g,e.mode,["mclose"])}return n.push(p),X(["minner"],n,t)},mathmlBuilder:(e,t)=>{pu(e);var n=Wt(e.body,t);if(e.left!=="."){var r=new ne("mo",[Kt(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var s=new ne("mo",[Kt(e.right,e.mode)]);if(s.setAttribute("fence","true"),e.rightColor)s.setAttribute("mathcolor",e.rightColor);n.push(s)}return ol(n)}});he({type:"middle",names:["\\middle"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=fa(t[0],e);if(!e.parser.leftrightDepth)throw new te("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=Xs(t,[]);else n=id(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t};return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?Kt("|","text"):Kt(e.delim,e.mode),r=new ne("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var p2=(e,t)=>{var n=ns(Ne(e.body,t),t),r=e.label.slice(1),s=t.sizeMultiplier,i,a,o=Bn(e.body);if(r==="sout")i=X(["katex-stretchy","katex-sout"]),i.height=t.fontMetrics().defaultRuleThickness/s,a=-0.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=et({number:0.6,unit:"pt"},t),u=et({number:0.35,unit:"ex"},t),d=t.havingBaseSizing();s=s/d.sizeMultiplier;var f=n.height+n.depth+l+u;n.style.paddingLeft=ae(f/2+l);var p=Math.floor(1000*f*s),g=a4(p),b=new pn([new Nn("phase",g)],{width:"400em",height:ae(p/1000),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=sr(["hide-tail"],[b],t),i.style.height=ae(f),a=n.depth+l+u}else{if(/cancel/.test(r)){if(!o)n.classes.push("cancel-pad")}else if(r==="angl")n.classes.push("anglpad");else n.classes.push("boxpad");var x,k,A=0;if(/box/.test(r))A=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),x=t.fontMetrics().fboxsep+(r==="colorbox"?0:A),k=x;else if(r==="angl")A=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),x=4*A,k=Math.max(0,0.25-n.depth);else x=o?0.2:0,k=x;if(i=P4(n,r,x,k,t),/fbox|boxed|fcolorbox/.test(r))i.style.borderStyle="solid",i.style.borderWidth=ae(A);else if(r==="angl"&&A!==0.049)i.style.borderTopWidth=ae(A),i.style.borderRightWidth=ae(A);if(a=n.depth+k,e.backgroundColor){if(i.style.backgroundColor=e.backgroundColor,e.borderColor)i.style.borderColor=e.borderColor}}var T;if(e.backgroundColor)T=Oe({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:n,shift:0}]});else{var S=/cancel|phase/.test(r)?["svg-align"]:[];T=Oe({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:S}]})}if(/cancel/.test(r))T.height=n.height,T.depth=n.depth;if(/cancel/.test(r)&&!o)return X(["mord","cancel-lap"],[T],t);else return X(["mord"],[T],t)},g2=(e,t)=>{var n,r=new ne(e.label.includes("colorbox")?"mpadded":"menclose",[qe(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var s=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+ae(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}if(e.backgroundColor)r.setAttribute("mathbackground",e.backgroundColor);return r};he({type:"enclose",names:["\\colorbox"],numArgs:2,allowedInText:!0,argTypes:["color","hbox"],handler(e,t,n){var{parser:r,funcName:s}=e,i=Me(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:p2,mathmlBuilder:g2});he({type:"enclose",names:["\\fcolorbox"],numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"],handler(e,t,n){var{parser:r,funcName:s}=e,i=Me(t[0],"color-token").color,a=Me(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}}});he({type:"enclose",names:["\\fbox"],numArgs:1,argTypes:["hbox"],allowedInText:!0,handler(e,t){var n=e.parser;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});he({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"enclose",mode:n.mode,label:r,body:s}}});he({type:"enclose",names:["\\sout"],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e;if(n.mode==="math")Ot({strict:n.settings.strict,errorCode:"mathVsSout",errorMsg:"LaTeX's \\sout works only in text mode",report:!0});var s=t[0];return{type:"enclose",mode:n.mode,label:r,body:s}}});he({type:"enclose",names:["\\angl"],numArgs:1,argTypes:["hbox"],allowedInText:!1,handler(e,t){var n=e.parser;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var ld={};function gn(e){var{type:t,names:n,props:r,handler:s,htmlBuilder:i,mathmlBuilder:a}=e,o={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s};for(var l=0;l<n.length;++l)ld[n[l]]=o;if(i)Js[t]=i;if(a)Zs[t]=a}var cd={};function w(e,t){cd[e]=t}class Bt{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){if(!t)return e&&e.loc;else if(!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer)return null;else return new Bt(e.loc.lexer,e.loc.start,t.loc.end)}}class Pt{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Pt(t,Bt.range(this,e))}}function gu(e){var t=[];e.consumeSpaces();var n=e.fetch().text;if(n==="\\relax")e.consume(),e.consumeSpaces(),n=e.fetch().text;while(n==="\\hline"||n==="\\hdashline")e.consume(),t.push(n==="\\hdashline"),e.consumeSpaces(),n=e.fetch().text;return t}var ma=(e)=>{var t=e.parser.settings;if(!t.displayMode)throw new te("{"+e.envName+"} can be used only in display mode.")},b2=new Set(["gather","gather*"]);function dl(e){if(!e.includes("ed"))return!e.includes("*")}function ar(e,t,n){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:u,emptySingleRow:d,maxNumCols:f,leqno:p}=t;if(e.gullet.beginGroup(),!u)e.gullet.macros.set("\\cr","\\\\\\relax");if(!a){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)a=1;else if(a=parseFloat(g),!a||a<0)throw new te("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var b=[],x=[b],k=[],A=[],T=l!=null?[]:void 0;function S(){if(l)e.gullet.macros.set("\\@eqnsw","1",!0)}function E(){if(T)if(e.gullet.macros.get("\\df@tag"))T.push(e.subparse([new Pt("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0);else T.push(Boolean(l)&&e.gullet.macros.get("\\@eqnsw")==="1")}S(),A.push(gu(e));while(!0){var D=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var M={type:"ordgroup",mode:e.mode,body:D};if(n)M={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[M]};b.push(M);var L=e.fetch().text;if(L==="&"){if(f&&b.length===f)if(u||o)throw new te("Too many tab characters: &",e.nextToken);else Ot({strict:e.settings.strict,errorCode:"textEnv",errorMsg:"Too few columns specified in the {array} column argument.",report:!0});e.consume()}else if(L==="\\end"){if(E(),b.length===1&&M.type==="styling"&&M.body.length===1&&M.body[0].type==="ordgroup"&&M.body[0].body.length===0&&(x.length>1||!d)&&!Array.isArray(T==null?void 0:T[T.length-1])&&!(l&&(T==null?void 0:T[T.length-1])===!0))x.pop();if(A.length<x.length+1)A.push([]);break}else if(L==="\\\\"){e.consume();var z=void 0;if(e.gullet.future().text!==" ")z=e.parseSizeGroup(!0);k.push(z?z.value:null),E(),A.push(gu(e)),b=[],x.push(b),S()}else throw new te("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:a,body:x,cols:i,rowGaps:k,hskipBeforeAndAfter:r,hLinesBeforeRow:A,colSeparationType:o,tags:T,leqno:p}}function hl(e){if(e.slice(0,1)==="d")return"display";else return"text"}var bn=function(t,n){var r,s,i=t.body.length,a=t.hLinesBeforeRow,o=0,l=Array(i),u=[],d=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),f=1/n.fontMetrics().ptPerEm,p=5*f;if(t.colSeparationType&&t.colSeparationType==="small"){var g=n.havingStyle(Se.SCRIPT).sizeMultiplier;p=0.2778*(g/n.sizeMultiplier)}var b=t.colSeparationType==="CD"?et({number:3,unit:"ex"},n):12*f,x=3*f,k=t.arraystretch*b,A=0.7*k,T=0.3*k,S=0;function E(Re){for(var Ie=0;Ie<Re.length;++Ie){if(Ie>0)S+=0.25;u.push({pos:S,isDashed:Re[Ie]})}}E(a[0]);for(r=0;r<t.body.length;++r){var D=t.body[r],M=A,L=T;if(o<D.length)o=D.length;var z={cells:Array(D.length),height:0,depth:0,pos:0};for(s=0;s<D.length;++s){var O=Ne(D[s],n);if(L<O.depth)L=O.depth;if(M<O.height)M=O.height;z.cells[s]=O}var P=t.rowGaps[r],V=0;if(P){if(V=et(P,n),V>0){if(V+=T,L<V)L=V;V=0}}if(t.addJot&&r<t.body.length-1)L+=x;z.height=M,z.depth=L,S+=M,z.pos=S,S+=L+V,l[r]=z,E(a[r+1])}var G=S/2+n.fontMetrics().axisHeight,ce=t.cols||[],re=[],de,F,K=[];if(t.tags&&t.tags.some((Re)=>Re))for(r=0;r<i;++r){var Y=l[r],ee=Y.pos-G,ie=t.tags[r],H=void 0;if(ie===!0)H=X(["eqn-num"],[],n);else if(ie===!1)H=X([],[],n);else H=X([],dt(ie,n,!0),n);H.depth=Y.depth,H.height=Y.height,K.push({type:"elem",elem:H,shift:ee})}for(s=0,F=0;s<o||F<ce.length;++s,++F){var q,W=ce[F],le=!0;while(((N=W)==null?void 0:N.type)==="separator"){var N;if(!le)de=X(["arraycolsep"],[]),de.style.width=ae(n.fontMetrics().doubleRuleSep),re.push(de);if(W.separator==="|"||W.separator===":"){var J=W.separator==="|"?"solid":"dashed",oe=X(["vertical-separator"],[],n);oe.style.height=ae(S),oe.style.borderRightWidth=ae(d),oe.style.borderRightStyle=J,oe.style.margin="0 "+ae(-d/2);var Ce=S-G;if(Ce)oe.style.verticalAlign=ae(-Ce);re.push(oe)}else throw new te("Invalid separator type: "+W.separator);F++,W=ce[F],le=!1}if(s>=o)continue;var ye=void 0;if(s>0||t.hskipBeforeAndAfter){var Be,Fe;if(ye=(Be=(Fe=W)==null?void 0:Fe.pregap)!=null?Be:p,ye!==0)de=X(["arraycolsep"],[]),de.style.width=ae(ye),re.push(de)}var Pe=[];for(r=0;r<i;++r){var Ve=l[r],mt=Ve.cells[s];if(!mt)continue;var yt=Ve.pos-G;mt.depth=Ve.depth,mt.height=Ve.height,Pe.push({type:"elem",elem:mt,shift:yt})}var Wr=Oe({positionType:"individualShift",children:Pe}),Cn=X(["col-align-"+(((q=W)==null?void 0:q.align)||"c")],[Wr]);if(re.push(Cn),s<o-1||t.hskipBeforeAndAfter){var Te,Ss;if(ye=(Te=(Ss=W)==null?void 0:Ss.postgap)!=null?Te:p,ye!==0)de=X(["arraycolsep"],[]),de.style.width=ae(ye),re.push(de)}}var nt=X(["mtable"],re);if(u.length>0){var $e=ts("katex-hline",n,d),jr=ts("katex-hdashline",n,d),Zt=[{type:"elem",elem:nt,shift:0}];while(u.length>0){var Gr=u.pop(),Kr=Gr.pos-G;if(Gr.isDashed)Zt.push({type:"elem",elem:jr,shift:Kr});else Zt.push({type:"elem",elem:$e,shift:Kr})}nt=Oe({positionType:"individualShift",children:Zt})}if(K.length===0)return X(["mord"],[nt],n);else{var ue=Oe({positionType:"individualShift",children:K}),be=X(["katex-tag"],[ue],n);return zn([nt,be])}},v2={c:"center ",l:"left ",r:"right "},vn=function(t,n){var r=[],s=new ne("mtd",[],["mtr-glue"]),i=new ne("mtd",[],["mml-eqn-num"]);for(var a=0;a<t.body.length;a++){var o=t.body[a],l=[];for(var u=0;u<o.length;u++)l.push(new ne("mtd",[qe(o[u],n)]));if(t.tags&&t.tags[a])if(l.unshift(s),l.push(s),t.leqno)l.unshift(i);else l.push(i);r.push(new ne("mtr",l))}var d=new ne("mtable",r),f=t.arraystretch===0.5?0.1:0.16+t.arraystretch-1+(t.addJot?0.09:0);d.setAttribute("rowspacing",ae(f));var p="",g="";if(t.cols&&t.cols.length>0){var b=t.cols,x="",k=!1,A=0,T=b.length;if(b[0].type==="separator")p+="top ",A=1;if(b[b.length-1].type==="separator")p+="bottom ",T-=1;for(var S=A;S<T;S++){var E=b[S];if(E.type==="align"){if(g+=v2[E.align],k)x+="none ";k=!0}else if(E.type==="separator"){if(k)x+=E.separator==="|"?"solid ":"dashed ",k=!1}}if(d.setAttribute("columnalign",g.trim()),/[sd]/.test(x))d.setAttribute("columnlines",x.trim())}if(t.colSeparationType==="align"){var D=t.cols||[],M="";for(var L=1;L<D.length;L++)M+=L%2?"0em ":"1em ";d.setAttribute("columnspacing",M.trim())}else if(t.colSeparationType==="alignat"||t.colSeparationType==="gather")d.setAttribute("columnspacing","0em");else if(t.colSeparationType==="small")d.setAttribute("columnspacing","0.2778em");else if(t.colSeparationType==="CD")d.setAttribute("columnspacing","0.5em");else d.setAttribute("columnspacing","1em");var z="",O=t.hLinesBeforeRow;p+=O[0].length>0?"left ":"",p+=O[O.length-1].length>0?"right ":"";for(var P=1;P<O.length-1;P++)z+=O[P].length===0?"none ":O[P][0]?"dashed ":"solid ";if(/[sd]/.test(z))d.setAttribute("rowlines",z.trim());if(p!=="")d=new ne("menclose",[d]),d.setAttribute("notation",p.trim());if(t.arraystretch&&t.arraystretch<1)d=new ne("mstyle",[d]),d.setAttribute("scriptlevel","1");return d},ud=function(t,n){if(!t.envName.includes("ed"))ma(t);var r=[],s=t.envName==="split",i=ar(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:dl(t.envName),emptySingleRow:!0,colSeparationType:t.envName.includes("at")?"alignat":"align",maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),a=0,o=0,l={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){var u="Number of columns should be a positive integer",d=cl(n[0],u);if(!/^[0-9]+$/.test(d)||Number(d)<1)throw new te(u,n[0]);a=Number(d),o=a*2}var f=!o;i.body.forEach(function(x){for(var k=1;k<x.length;k+=2){var A=Me(x[k],"styling"),T=Me(A.body[0],"ordgroup");T.body.unshift(l)}if(!f){var S=x.length/2;if(a<S)throw new te("Too many math in a row: "+("expected "+a+", but got "+S),x[0])}else if(o<x.length)o=x.length});for(var p=0;p<o;++p){var g="r",b=0;if(p%2===1)g="l";else if(p>0&&f)b=1;r[p]={type:"align",align:g,pregap:b,postgap:0}}return i.colSeparationType=f?"align":"alignat",i};gn({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=da(t[0]),r=n?[t[0]]:Me(t[0],"ordgroup").body,s=r.map(function(a){var o=ua(a),l=o.text;if("lcr".includes(l))return{type:"align",align:l};else if(l==="|")return{type:"separator",separator:"|"};else if(l===":")return{type:"separator",separator:":"};throw new te("Unknown column alignment: "+l,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return ar(e.parser,i,hl(e.envName))},htmlBuilder:bn,mathmlBuilder:vn});gn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),n=s.fetch().text,!"lcr".includes(n))throw new te("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:n}]}}var i=ar(e.parser,r,hl(e.envName)),a=Math.max(0,...i.body.map((o)=>o.length));return i.cols=Array(a).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:bn,mathmlBuilder:vn});gn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:0.5},n=ar(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:bn,mathmlBuilder:vn});gn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=da(t[0]),r=n?[t[0]]:Me(t[0],"ordgroup").body,s=r.map(function(o){var l=ua(o),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new te("Unknown column alignment: "+u,o)});if(s.length>1)throw new te("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:0.5},a=ar(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new te("{subarray} can contain only one column");return a},htmlBuilder:bn,mathmlBuilder:vn});gn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=ar(e.parser,t,hl(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:bn,mathmlBuilder:vn});gn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ud,htmlBuilder:bn,mathmlBuilder:vn});gn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){if(b2.has(e.envName))ma(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:dl(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ar(e.parser,t,"display")},htmlBuilder:bn,mathmlBuilder:vn});gn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ud,htmlBuilder:bn,mathmlBuilder:vn});gn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){ma(e);var t={autoTag:dl(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ar(e.parser,t,"display")},htmlBuilder:bn,mathmlBuilder:vn});gn({type:"array",names:["CD"],props:{numArgs:0},handler(e){return ma(e),t2(e.parser)},htmlBuilder:bn,mathmlBuilder:vn});w("\\nonumber","\\gdef\\@eqnsw{0}");w("\\notag","\\nonumber");he({type:"text",names:["\\hline","\\hdashline"],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new te(e.funcName+" valid only within array environment")}});var bu=ld;he({type:"environment",names:["\\begin","\\end"],numArgs:1,argTypes:["text"],handler(e,t){var{parser:n,funcName:r}=e,s=t[0];if(s.type!=="ordgroup")throw new te("Invalid environment name",s);var i=cl(s,"Environment name should contain only text characters and spaces",!0);if(r==="\\begin"){if(!Object.prototype.hasOwnProperty.call(bu,i))throw new te("No such environment: "+i,s);var a=bu[i],o=n.parseArguments("\\begin{"+i+"}",a),{args:l,optArgs:u}=o,d={mode:n.mode,envName:i,parser:n},f=a.handler(d,l,u);n.expect("\\end",!1);var p=n.nextToken,g=Me(n.parseFunction(),"environment");if(g.name!==i)throw new te("Mismatch: \\begin{"+i+"} matched by \\end{"+g.name+"}",p);return f}return{type:"environment",mode:n.mode,name:i,nameGroup:s}}});var y2=(e,t)=>{var n=e.font,r=t.withFont(n);return Ne(e.body,r)},w2=(e,t)=>{var n=e.font,r=t.withFont(n);return qe(e.body,r)},vu={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};he({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=Ys(t[0]),i=r in vu?vu[r]:r;return{type:"font",mode:n.mode,font:i.slice(1),body:s}},htmlBuilder:y2,mathmlBuilder:w2});he({type:"mclass",names:["\\boldsymbol","\\bm"],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"mclass",mode:n.mode,mclass:ha(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:Bn(r)}}});he({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],numArgs:0,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:s}=e,i=n.mode,a=n.parseExpression(!0,s);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:a}}}});var k2=(e,t)=>{var n=t.style,r=n.fracNum(),s=n.fracDen(),i;i=t.havingStyle(r);var a=Ne(e.numer,i,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;a.height=a.height<o?o:a.height,a.depth=a.depth<l?l:a.depth}i=t.havingStyle(s);var u=Ne(e.denom,i,t),d,f,p;if(e.hasBarLine){if(e.barSize)f=et(e.barSize,t),d=ts("frac-line",t,f);else d=ts("frac-line",t);f=d.height,p=d.height}else d=null,f=0,p=t.fontMetrics().defaultRuleThickness;var g,b,x;if(n.size===Se.DISPLAY.size){if(g=t.fontMetrics().num1,f>0)b=3*p;else b=7*p;x=t.fontMetrics().denom1}else{if(f>0)g=t.fontMetrics().num2,b=p;else g=t.fontMetrics().num3,b=3*p;x=t.fontMetrics().denom2}var k;if(!d){var A=g-a.depth-(u.height-x);if(A<b)g+=0.5*(b-A),x+=0.5*(b-A);k=Oe({positionType:"individualShift",children:[{type:"elem",elem:u,shift:x},{type:"elem",elem:a,shift:-g}]})}else{var T=t.fontMetrics().axisHeight;if(g-a.depth-(T+0.5*f)<b)g+=b-(g-a.depth-(T+0.5*f));if(T-0.5*f-(u.height-x)<b)x+=b-(T-0.5*f-(u.height-x));var S=-(T-0.5*f);k=Oe({positionType:"individualShift",children:[{type:"elem",elem:u,shift:x},{type:"elem",elem:d,shift:S},{type:"elem",elem:a,shift:-g}]})}i=t.havingStyle(n),k.height*=i.sizeMultiplier/t.sizeMultiplier,k.depth*=i.sizeMultiplier/t.sizeMultiplier;var E;if(n.size===Se.DISPLAY.size)E=t.fontMetrics().delim1;else if(n.size===Se.SCRIPTSCRIPT.size)E=t.havingStyle(Se.SCRIPT).fontMetrics().delim2;else E=t.fontMetrics().delim2;var D,M;if(e.leftDelim==null)D=Xs(t,["mopen"]);else D=Yo(e.leftDelim,E,!0,t.havingStyle(n),e.mode,["mopen"]);if(e.continued)M=X([]);else if(e.rightDelim==null)M=Xs(t,["mclose"]);else M=Yo(e.rightDelim,E,!0,t.havingStyle(n),e.mode,["mclose"]);return X(["mord"].concat(i.sizingClasses(t)),[D,X(["mfrac"],[k]),M],t)},x2=(e,t)=>{var n=new ne("mfrac",[qe(e.numer,t),qe(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=et(e.barSize,t);n.setAttribute("linethickness",ae(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new ne("mo",[new st(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(n),e.rightDelim!=null){var a=new ne("mo",[new st(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return ol(s)}return n},dd=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};he({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0],i=t[1],a,o=null,l=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw Error("Unrecognized genfrac command")}var u=r==="\\cfrac",d=null;if(u||r.startsWith("\\d"))d="display";else if(r.startsWith("\\t"))d="text";return dd({type:"genfrac",mode:n.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:l,barSize:null},d)},htmlBuilder:k2,mathmlBuilder:x2});he({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],numArgs:0,infix:!0,handler(e){var{parser:t,funcName:n,token:r}=e,s;switch(n){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:s,token:r}}});var yu=["display","text","script","scriptscript"],wu=function(t){var n=null;if(t.length>0)n=t,n=n==="."?null:n;return n};he({type:"genfrac",names:["\\genfrac"],numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"],handler(e,t){var n=e.parser,r=t[4],s=t[5],i=Ys(t[0]),a=i.type==="atom"&&i.family==="open"?wu(i.text):null,o=Ys(t[1]),l=o.type==="atom"&&o.family==="close"?wu(o.text):null,u=Me(t[2],"size"),d,f=null;if(u.isBlank)d=!0;else f=u.value,d=f.number>0;var p=null,g=t[3];if(g.type==="ordgroup"){if(g.body.length>0){var b=Me(g.body[0],"textord");p=yu[Number(b.text)]}}else g=Me(g,"textord"),p=yu[Number(g.text)];return dd({type:"genfrac",mode:n.mode,numer:r,denom:s,continued:!1,hasBarLine:d,barSize:f,leftDelim:a,rightDelim:l},p)}});he({type:"infix",names:["\\above"],numArgs:1,argTypes:["size"],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Me(t[0],"size").value,token:r}}});he({type:"genfrac",names:["\\\\abovefrac"],numArgs:3,argTypes:["math","size","math"],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],s=Me(t[1],"infix").size;if(!s)throw Error("\\\\abovefrac expected size, but got "+String(s));var i=t[2],a=s.number>0;return{type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:a,barSize:s,leftDelim:null,rightDelim:null}}});var hd=(e,t)=>{var n=t.style,r,s;if(e.type==="supsub")r=e.sup?Ne(e.sup,t.havingStyle(n.sup()),t):Ne(e.sub,t.havingStyle(n.sub()),t),s=Me(e.base,"horizBrace");else s=Me(e,"horizBrace");var i=Ne(s.base,t.havingBaseStyle(Se.DISPLAY)),a=ca(s,t),o;if(s.isOver)o=Oe({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:0.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]});else o=Oe({positionType:"bottom",positionData:i.depth+0.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:0.1},{type:"elem",elem:i}]});if(r){var l=X(["minner",s.isOver?"mover":"munder"],[o],t);if(s.isOver)o=Oe({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:0.2},{type:"elem",elem:r}]});else o=Oe({positionType:"bottom",positionData:l.depth+0.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:0.2},{type:"elem",elem:l}]})}return X(["minner",s.isOver?"mover":"munder"],[o],t)};var E2=(e,t)=>{var n=la(e.label);return new ne(e.isOver?"mover":"munder",[qe(e.base,t),n])};he({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:r.includes("\\over"),base:t[0]}},htmlBuilder:hd,mathmlBuilder:E2});he({type:"href",names:["\\href"],numArgs:2,argTypes:["url","original"],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],s=Me(t[0],"url").url;if(!n.settings.isTrusted({command:"\\href",url:s}))return n.formatUnsupportedCmd("\\href");return{type:"href",mode:n.mode,href:s,body:ot(r)}},htmlBuilder:(e,t)=>{var n=dt(e.body,t,!1);return C4(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=ir(e.body,t);if(!(n instanceof ne))n=new ne("mrow",[n]);return n.setAttribute("href",e.href),n}});he({type:"href",names:["\\url"],numArgs:1,argTypes:["url"],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=Me(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");var s=[];for(var i=0;i<r.length;i++){var a=r[i];if(a==="~")a="\\textasciitilde";s.push({type:"textord",mode:"text",text:a})}var o={type:"text",mode:n.mode,font:"\\texttt",body:s};return{type:"href",mode:n.mode,href:r,body:ot(o)}}});he({type:"hbox",names:["\\hbox"],numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0,handler(e,t){var n=e.parser;return{type:"hbox",mode:n.mode,body:ot(t[0])}},htmlBuilder(e,t){var n=dt(e.body,t.withFont(""),!1);return zn(n)},mathmlBuilder(e,t){return new ne("mrow",Wt(e.body,t.withFont("")))}});he({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],numArgs:2,argTypes:["raw","original"],allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e;e.token;var s=Me(t[0],"raw").string,i=t[1];if(n.settings.strict)Ot({strict:n.settings.strict,errorCode:"htmlExtension",errorMsg:"HTML extension is disabled on strict mode",report:!0});var a,o={};switch(r){case"\\htmlClass":o.class=s,a={command:"\\htmlClass",class:s};break;case"\\htmlId":o.id=s,a={command:"\\htmlId",id:s};break;case"\\htmlStyle":o.style=s,a={command:"\\htmlStyle",style:s};break;case"\\htmlData":{var l="{,}",u=[],d="";for(var f=0;f<s.length;f++)if(s.startsWith(l,f))d+=",",f+=l.length-1;else if(s[f]===",")u.push(d),d="";else d+=s[f];u.push(d);for(var p=0;p<u.length;p++){var g=u[p],b=g.indexOf("=");if(b<0)throw new te("\\htmlData key/value '"+g+"' missing equals sign");var x=g.slice(0,b),k=g.slice(b+1);o["data-"+x.trim()]=k}a={command:"\\htmlData",attributes:o};break}default:throw Error("Unrecognized html command")}if(!n.settings.isTrusted(a))return n.formatUnsupportedCmd(r);return{type:"html",mode:n.mode,attributes:o,body:ot(i)}},htmlBuilder:(e,t)=>{var n=dt(e.body,t,!1),r=["enclosing"];if(e.attributes.class)r.push(...e.attributes.class.trim().split(/\s+/));var s=X(r,n,t);for(var i of Object.entries(e.attributes)){var a=i[0],o=i[1];if(a!=="class")s.setAttribute(a,o)}return s},mathmlBuilder:(e,t)=>ir(e.body,t)});he({type:"htmlmathml",names:["\\html@mathml"],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>{var n=e.parser;return{type:"htmlmathml",mode:n.mode,html:ot(t[0]),mathml:ot(t[1])}},htmlBuilder:(e,t)=>{var n=dt(e.html,t,!1);return zn(n)},mathmlBuilder:(e,t)=>ir(e.mathml,t)});var No=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};else{var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new te("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!Bu(r))throw new te("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r}};he({type:"includegraphics",names:["\\includegraphics"],numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,s={number:0,unit:"em"},i={number:0.9,unit:"em"},a={number:0,unit:"em"},o="";if(n[0]){var l=Me(n[0],"raw").string,u=l.split(",");for(var d=0;d<u.length;d++){var f=u[d].split("=");if(f.length===2){var p=f[1].trim();switch(f[0].trim()){case"alt":o=p;break;case"width":s=No(p);break;case"height":i=No(p);break;case"totalheight":a=No(p);break;default:throw new te("Invalid key: '"+f[0]+"' in \\includegraphics.")}}}}var g=Me(t[0],"url").url;if(o==="")o=g,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."));if(!r.settings.isTrusted({command:"\\includegraphics",url:g}))return r.formatUnsupportedCmd("\\includegraphics");return{type:"includegraphics",mode:r.mode,alt:o,width:s,height:i,totalheight:a,src:g}},htmlBuilder:(e,t)=>{var n=et(e.height,t),r=0;if(e.totalheight.number>0)r=et(e.totalheight,t)-n;var s=0;if(e.width.number>0)s=et(e.width,t);var i={height:ae(n+r)};if(s>0)i.width=ae(s);if(r>0)i.verticalAlign=ae(-r);var a=new $u(e.src,e.alt,i);return a.height=n,a.depth=r,a},mathmlBuilder:(e,t)=>{var n=new ne("mglyph",[]);n.setAttribute("alt",e.alt);var r=et(e.height,t),s=0;if(e.totalheight.number>0)s=et(e.totalheight,t)-r,n.setAttribute("valign",ae(-s));if(n.setAttribute("height",ae(r+s)),e.width.number>0){var i=et(e.width,t);n.setAttribute("width",ae(i))}return n.setAttribute("src",e.src),n}});he({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,s=Me(t[0],"size");if(n.settings.strict){var i=r[1]==="m",a=s.value.unit==="mu";if(i){if(!a)Ot({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" supports only mu units, "+("not "+s.value.unit+" units"),report:!0});if(n.mode!=="math")Ot({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" works only in math mode",report:!0})}else if(a)Ot({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" doesn't support mu units",report:!0})}return{type:"kern",mode:n.mode,dimension:s.value}},htmlBuilder(e,t){return Pu(e.dimension,t)},mathmlBuilder(e,t){var n=et(e.dimension,t);return new al(n)}});he({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,t)=>{var n;if(e.alignment==="clap")n=X([],[Ne(e.body,t)]),n=X(["katex-inner"],[n],t);else n=X(["katex-inner"],[Ne(e.body,t)]);var r=X(["katex-fix"],[]),s=X([e.alignment],[n,r],t),i=X(["katex-strut"]);if(i.style.height=ae(s.height+s.depth),s.depth)i.style.verticalAlign=ae(-s.depth);return s.children.unshift(i),s=X(["katex-thinbox"],[s],t),X(["mord","katex-vbox"],[s],t)},mathmlBuilder:(e,t)=>{var n=new ne("mpadded",[qe(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});he({type:"styling",names:["\\(","$"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var{funcName:n,parser:r}=e,s=r.mode;r.switchMode("math");var i=n==="\\("?"\\)":"$",a=r.parseExpression(!1,i);return r.expect(i),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:a}}});he({type:"text",names:["\\)","\\]"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new te("Mismatched "+e.funcName)}});var ku=(e,t)=>{switch(t.style.size){case Se.DISPLAY.size:return e.display;case Se.TEXT.size:return e.text;case Se.SCRIPT.size:return e.script;case Se.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};he({type:"mathchoice",names:["\\mathchoice"],numArgs:4,primitive:!0,handler:(e,t)=>{var n=e.parser;return{type:"mathchoice",mode:n.mode,display:ot(t[0]),text:ot(t[1]),script:ot(t[2]),scriptscript:ot(t[3])}},htmlBuilder:(e,t)=>{var n=ku(e,t),r=dt(n,t,!1);return zn(r)},mathmlBuilder:(e,t)=>{var n=ku(e,t);return ir(n,t)}});var fd=(e,t,n,r,s,i,a)=>{e=X([],[e]);var o=n&&Bn(n),l,u;if(t){var d=Ne(t,r.havingStyle(s.sup()),r);u={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var f=Ne(n,r.havingStyle(s.sub()),r);l={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var p;if(u&&l){var g=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+a;p=Oe({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ae(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ae(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(l){var b=e.height-a;p=Oe({positionType:"top",positionData:b,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ae(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var x=e.depth+a;p=Oe({positionType:"bottom",positionData:x,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ae(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var k=[p];if(l&&i!==0&&!o){var A=X(["mspace"],[],r);A.style.marginRight=ae(i),k.unshift(A)}return X(["mop","op-limits"],k,r)},md=new Set(["\\smallint"]),pd=(e,t)=>{var n,r,s=!1,i;if(e.type==="supsub")n=e.sup,r=e.sub,i=Me(e.base,"op"),s=!0;else i=Me(e,"op");var a=t.style,o=!1;if(a.size===Se.DISPLAY.size&&i.symbol&&!md.has(i.name))o=!0;var l,u;if(i.symbol){var d=o?"Size2-Regular":"Size1-Regular",f="";if(i.name==="\\oiint"||i.name==="\\oiiint")f=i.name.slice(1),i.name=f==="oiint"?"\\iint":"\\iiint";if(l=Tt(i.name,d,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),u=l.italic,f.length>0){var p=Wu(f+"Size"+(o?"2":"1"),t);l=Oe({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:o?0.08:0}]}),i.name="\\"+f,l.classes.unshift("mop"),l.italic=u}}else if(i.body){var g=dt(i.body,t,!0);if(g.length===1&&g[0]instanceof zt)l=g[0],l.classes[0]="mop";else l=X(["mop"],g,t)}else{var b=[];for(var x=1;x<i.name.length;x++)b.push(sl(i.name[x],i.mode,t));l=X(["mop"],b,t)}var k=0,A=0;if((l instanceof zt||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift){var T;k=(l.height-l.depth)/2-t.fontMetrics().axisHeight,A=(T=l.italic)!=null?T:0}if(s)return fd(l,n,r,t,a,A,k);else{if(k)l.style.position="relative",l.style.top=ae(k);return l}},A2=(e,t)=>{var n;if(e.symbol){if(n=new ne("mo",[Kt(e.name,e.mode)]),md.has(e.name))n.setAttribute("largeop","false")}else if(e.body)n=new ne("mo",Wt(e.body,t));else{n=new ne("mi",[new st(e.name.slice(1))]);var r=new ne("mo",[Kt("⁡","text")]);if(e.parentIsSupSub)n=new ne("mrow",[n,r]);else n=Ku([n,r])}return n},C2={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};he({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],numArgs:0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=r;if(s.length===1)s=C2[s];return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:pd,mathmlBuilder:A2});he({type:"op",names:["\\mathop"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ot(r)}}});var _2={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};he({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}});he({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}});he({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],numArgs:0,allowedInArgument:!0,handler(e){var{parser:t,funcName:n}=e,r=n;if(r.length===1)r=_2[r];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}}});var gd=(e,t)=>{var n,r,s=!1,i;if(e.type==="supsub")n=e.sup,r=e.sub,i=Me(e.base,"operatorname"),s=!0;else i=Me(e,"operatorname");var a;if(i.body.length>0){var o=i.body.map((f)=>{var p="text"in f?f.text:void 0;if(typeof p==="string")return{type:"textord",mode:f.mode,text:p};else return f}),l=dt(o,t.withFont("mathrm"),!0);for(var u=0;u<l.length;u++){var d=l[u];if(d instanceof zt)d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*")}a=X(["mop"],l,t)}else a=X(["mop"],[],t);if(s)return fd(a,n,r,t,t.style,0,0);else return a},T2=(e,t)=>{var n=Wt(e.body,t.withFont("mathrm")),r=!0;for(var s=0;s<n.length;s++){var i=n[s];if(i instanceof al);else if(i instanceof ne)switch(i.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var a=i.children[0];if(i.children.length===1&&a instanceof st)a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*");else r=!1;break}default:r=!1}else r=!1}if(r){var o=n.map((d)=>d.toText()).join("");n=[new st(o)]}var l=new ne("mi",n);l.setAttribute("mathvariant","normal");var u=new ne("mo",[Kt("⁡","text")]);if(e.parentIsSupSub)return new ne("mrow",[l,u]);else return Ku([l,u])};he({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"operatorname",mode:n.mode,body:ot(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:gd,mathmlBuilder:T2});w("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");_r({type:"ordgroup",htmlBuilder(e,t){if(e.semisimple)return zn(dt(e.body,t,!1));return X(["mord"],dt(e.body,t,!0),t)},mathmlBuilder(e,t){return ir(e.body,t,!0)}});he({type:"overline",names:["\\overline"],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=Ne(e.body,t.havingCrampedStyle()),r=ts("overline-line",t),s=t.fontMetrics().defaultRuleThickness,i=Oe({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return X(["mord","katex-overline"],[i],t)},mathmlBuilder(e,t){var n=new ne("mo",[new st("‾")]);n.setAttribute("stretchy","true");var r=new ne("mover",[qe(e.body,t),n]);return r.setAttribute("accent","true"),r}});he({type:"phantom",names:["\\phantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"phantom",mode:n.mode,body:ot(r)}},htmlBuilder:(e,t)=>{var n=dt(e.body,t.withPhantom(),!1);return zn(n)},mathmlBuilder:(e,t)=>{var n=Wt(e.body,t);return new ne("mphantom",n)}});w("\\hphantom","\\smash{\\phantom{#1}}");he({type:"vphantom",names:["\\vphantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=X(["katex-inner"],[Ne(e.body,t.withPhantom())]),r=X(["katex-fix"],[]);return X(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=Wt(ot(e.body),t),r=new ne("mphantom",n),s=new ne("mpadded",[r]);return s.setAttribute("width","0px"),s}});he({type:"raisebox",names:["\\raisebox"],numArgs:2,argTypes:["size","hbox"],allowedInText:!0,handler(e,t){var n=e.parser,r=Me(t[0],"size").value,s=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:s}},htmlBuilder(e,t){var n=Ne(e.body,t),r=et(e.dy,t);return Oe({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ne("mpadded",[qe(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});var bd=(e,t)=>{var n=e.parser;return{type:"reflectbox",mode:n.mode,body:t[0]}};he({type:"reflectbox",names:["\\reflectbox"],numArgs:1,argTypes:["hbox"],allowedInText:!0,handler:bd,htmlBuilder(e,t){return X(["mord","reflectbox"],[Ne(e.body,t)],t)},mathmlBuilder(e,t){return qe(e.body,t)}});he({type:"reflectbox",names:["\\mathreflectbox"],numArgs:1,argTypes:["math"],handler:bd});he({type:"internal",names:["\\relax"],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){var t=e.parser;return{type:"internal",mode:t.mode}}});he({type:"rule",names:["\\rule"],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"],handler(e,t,n){var r=e.parser,s=n[0],i=Me(t[0],"size"),a=Me(t[1],"size");return{type:"rule",mode:r.mode,shift:s&&Me(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,t){var n=X(["mord","katex-rule"],[],t),r=et(e.width,t),s=et(e.height,t),i=e.shift?et(e.shift,t):0;return n.style.borderRightWidth=ae(r),n.style.borderTopWidth=ae(s),n.style.bottom=ae(i),n.width=r,n.height=s+i,n.depth=-i,n.maxFontSize=s*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=et(e.width,t),r=et(e.height,t),s=e.shift?et(e.shift,t):0,i=t.color&&t.getColor()||"black",a=new ne("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",ae(n)),a.setAttribute("height",ae(r));var o=new ne("mpadded",[a]);if(s>=0)o.setAttribute("height",ae(s));else o.setAttribute("height",ae(s)),o.setAttribute("depth",ae(-s));return o.setAttribute("voffset",ae(s)),o}});function vd(e,t,n){var r=dt(e,t,!1),s=t.sizeMultiplier/n.sizeMultiplier;for(var i=0;i<r.length;i++){var a=r[i].classes.indexOf("katex-sizing");if(a<0)Array.prototype.push.apply(r[i].classes,t.sizingClasses(n));else if(r[i].classes[a+1]==="reset-size"+t.size)r[i].classes[a+1]="reset-size"+n.size;r[i].height*=s,r[i].depth*=s}return zn(r)}var xu=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],S2=(e,t)=>{var n=t.havingSize(e.size);return vd(e.body,n,t)};he({type:"sizing",names:xu,numArgs:0,allowedInText:!0,handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:s}=e,i=s.parseExpression(!1,n);return{type:"sizing",mode:s.mode,size:xu.indexOf(r)+1,body:i}},htmlBuilder:S2,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=Wt(e.body,n),s=new ne("mstyle",r);return s.setAttribute("mathsize",ae(n.sizeMultiplier)),s}});he({type:"smash",names:["\\smash"],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,s=!1,i=!1,a=n[0]&&Me(n[0],"ordgroup");if(a){var o;for(var l=0;l<a.body.length;++l){var u=a.body[l];if(o=ua(u).text,o==="t")s=!0;else if(o==="b")i=!0;else{s=!1,i=!1;break}}}else s=!0,i=!0;var d=t[0];return{type:"smash",mode:r.mode,body:d,smashHeight:s,smashDepth:i}},htmlBuilder:(e,t)=>{var n=X([],[Ne(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight)n.height=0;if(e.smashDepth)n.depth=0;if(e.smashHeight&&e.smashDepth)return X(["mord","katex-smash"],[n],t);if(n.children)for(var r=0;r<n.children.length;r++){if(e.smashHeight)n.children[r].height=0;if(e.smashDepth)n.children[r].depth=0}var s=Oe({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return X(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var n=new ne("mpadded",[qe(e.body,t)]);if(e.smashHeight)n.setAttribute("height","0px");if(e.smashDepth)n.setAttribute("depth","0px");return n}});he({type:"sqrt",names:["\\sqrt"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,s=n[0],i=t[0];return{type:"sqrt",mode:r.mode,body:i,index:s}},htmlBuilder(e,t){var n=Ne(e.body,t.havingCrampedStyle());if(n.height===0)n.height=t.fontMetrics().xHeight;n=ns(n,t);var r=t.fontMetrics(),s=r.defaultRuleThickness,i=s;if(t.style.id<Se.TEXT.id)i=t.fontMetrics().xHeight;var a=s+i/4,o=n.height+n.depth+a+s,l=c2(o,t),{span:u,ruleWidth:d,advanceWidth:f}=l,p=u.height-d;if(p>n.height+n.depth+a)a=(a+p-n.height-n.depth)/2;var g=u.height-n.height-a-d;n.style.paddingLeft=ae(f);var b=Oe({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+g)},{type:"elem",elem:u},{type:"kern",size:d}]});if(!e.index)return X(["mord","sqrt"],[b],t);else{var x=t.havingStyle(Se.SCRIPTSCRIPT),k=Ne(e.index,x,t),A=0.6*(b.height-b.depth),T=Oe({positionType:"shift",positionData:-A,children:[{type:"elem",elem:k}]}),S=X(["katex-root"],[T]);return X(["mord","sqrt"],[S,b],t)}},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new ne("mroot",[qe(n,t),qe(r,t)]):new ne("msqrt",[qe(n,t)])}});var Xo={display:Se.DISPLAY,text:Se.TEXT,script:Se.SCRIPT,scriptscript:Se.SCRIPTSCRIPT};function R2(e){return e in Xo}he({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var{breakOnTokenText:n,funcName:r,parser:s}=e,i=s.parseExpression(!0,n),a=r.slice(1,r.length-5);if(!R2(a))throw Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,t){var n=Xo[e.style],r=t.havingStyle(n);if(e.resetFont)r=r.withFont("");return vd(e.body,r,t)},mathmlBuilder(e,t){var n=Xo[e.style],r=t.havingStyle(n);if(e.resetFont)r=r.withFont("");var s=Wt(e.body,r),i=new ne("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var M2=function(t,n){var r=t.base;if(!r)return null;else if(r.type==="op"){var s=r.limits&&(n.style.size===Se.DISPLAY.size||r.alwaysHandleSupSub);return s?pd:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(n.style.size===Se.DISPLAY.size||r.limits);return i?gd:null}else if(r.type==="accent")return Bn(r.base)?Yu:null;else if(r.type==="horizBrace"){var a=!t.sub;return a===r.isOver?hd:null}else return null};_r({type:"supsub",htmlBuilder(e,t){var n=M2(e,t);if(n)return n(e,t);var{base:r,sup:s,sub:i}=e,a=Ne(r,t),o,l,u=t.fontMetrics(),d=0,f=0,p=r&&Bn(r);if(s){var g=t.havingStyle(t.style.sup());if(o=Ne(s,g,t),!p)d=a.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier}if(i){var b=t.havingStyle(t.style.sub());if(l=Ne(i,b,t),!p)f=a.depth+b.fontMetrics().subDrop*b.sizeMultiplier/t.sizeMultiplier}var x;if(t.style===Se.DISPLAY)x=u.sup1;else if(t.style.cramped)x=u.sup3;else x=u.sup2;var k=t.sizeMultiplier,A=ae(0.5/u.ptPerEm/k),T=null;if(l){var S=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof zt||S){var E;T=ae(-((E=a.italic)!=null?E:0))}}var D;if(o&&l){d=Math.max(d,x,o.depth+0.25*u.xHeight),f=Math.max(f,u.sub2);var M=u.defaultRuleThickness,L=4*M;if(d-o.depth-(l.height-f)<L){f=L-(d-o.depth)+l.height;var z=0.8*u.xHeight-(d-o.depth);if(z>0)d+=z,f-=z}var O=[{type:"elem",elem:l,shift:f,marginRight:A,marginLeft:T},{type:"elem",elem:o,shift:-d,marginRight:A}];D=Oe({positionType:"individualShift",children:O})}else if(l){f=Math.max(f,u.sub1,l.height-0.8*u.xHeight);var P=[{type:"elem",elem:l,marginLeft:T,marginRight:A}];D=Oe({positionType:"shift",positionData:f,children:P})}else if(o)d=Math.max(d,x,o.depth+0.25*u.xHeight),D=Oe({positionType:"shift",positionData:-d,children:[{type:"elem",elem:o,marginRight:A}]});else throw Error("supsub must have either sup or sub.");var V=Ko(a,"right")||"mord";return X([V],[a,X(["msupsub"],[D])],t)},mathmlBuilder(e,t){var n=!1,r,s;if(e.base&&e.base.type==="horizBrace"){if(s=!!e.sup,s===e.base.isOver)n=!0,r=e.base.isOver}if(e.base&&(e.base.type==="op"||e.base.type==="operatorname"))e.base.parentIsSupSub=!0;var i=[qe(e.base,t)];if(e.sub)i.push(qe(e.sub,t));if(e.sup)i.push(qe(e.sup,t));var a;if(n)a=r?"mover":"munder";else if(!e.sub){var o=e.base;if(o&&o.type==="op"&&o.limits&&(t.style===Se.DISPLAY||o.alwaysHandleSupSub))a="mover";else if(o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===Se.DISPLAY))a="mover";else a="msup"}else if(!e.sup){var l=e.base;if(l&&l.type==="op"&&l.limits&&(t.style===Se.DISPLAY||l.alwaysHandleSupSub))a="munder";else if(l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===Se.DISPLAY))a="munder";else a="msub"}else{var u=e.base;if(u&&u.type==="op"&&u.limits&&t.style===Se.DISPLAY)a="munderover";else if(u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===Se.DISPLAY||u.limits))a="munderover";else a="msubsup"}return new ne(a,i)}});_r({type:"atom",htmlBuilder(e,t){return sl(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new ne("mo",[Kt(e.text,e.mode)]);if(e.family==="bin"){var r=ll(e,t);if(r==="bold-italic")n.setAttribute("mathvariant",r)}else if(e.family==="punct")n.setAttribute("separator","true");else if(e.family==="open"||e.family==="close")n.setAttribute("stretchy","false");return n}});var yd={mi:"italic",mn:"normal",mtext:"normal"};_r({type:"mathord",htmlBuilder(e,t){return oa(e,t)},mathmlBuilder(e,t){var n=new ne("mi",[Kt(e.text,e.mode,t)]),r=ll(e,t)||"italic";if(r!==yd[n.type])n.setAttribute("mathvariant",r);return n}});_r({type:"textord",htmlBuilder(e,t){return oa(e,t)},mathmlBuilder(e,t){var n=Kt(e.text,e.mode,t),r=ll(e,t)||"normal",s;if(e.mode==="text")s=new ne("mtext",[n]);else if(/[0-9]/.test(e.text))s=new ne("mn",[n]);else if(e.text==="\\prime")s=new ne("mo",[n]);else s=new ne("mi",[n]);if(r!==yd[s.type])s.setAttribute("mathvariant",r);return s}});var Eu=new Map([["\\nobreak","nobreak"],["\\allowbreak","allowbreak"]]),Au=new Map([[" ",{}],["\\ ",{}],["~",{className:"nobreak"}],["\\space",{}],["\\nobreakspace",{className:"nobreak"}]]);_r({type:"spacing",htmlBuilder(e,t){var n=Au.get(e.text),r=Eu.get(e.text);if(n){var s=n.className||"";if(e.mode==="text"){var i=oa(e,t);return i.classes.push(s),i}else return X(["mspace",s],[sl(e.text,e.mode,t)],t)}else if(r)return X(["mspace",r],[],t);else throw new te('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){var n;if(Au.has(e.text))n=new ne("mtext",[new st(" ")]);else if(Eu.has(e.text))return new ne("mspace");else throw new te('Unknown type of space "'+e.text+'"');return n}});var Cu=()=>{var e=new ne("mtd",[]);return e.setAttribute("width","50%"),e};_r({type:"tag",mathmlBuilder(e,t){var n=new ne("mtable",[new ne("mtr",[Cu(),new ne("mtd",[ir(e.body,t)]),Cu(),new ne("mtd",[ir(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var _u={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tu={"\\textbf":"textbf","\\textmd":"textmd"},D2={"\\textit":"textit","\\textup":"textup"},Su=(e,t)=>{var n=e.font;if(!n)return t;else if(_u[n])return t.withTextFontFamily(_u[n]);else if(Tu[n])return t.withTextFontWeight(Tu[n]);else if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit");return t.withTextFontShape(D2[n])};he({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"text",mode:n.mode,body:ot(s),font:r}},htmlBuilder(e,t){var n=Su(e,t),r=dt(e.body,n,!0);return X(["mord","text"],r,n)},mathmlBuilder(e,t){var n=Su(e,t);return ir(e.body,n)}});he({type:"underline",names:["\\underline"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Ne(e.body,t),r=ts("underline-line",t),s=t.fontMetrics().defaultRuleThickness,i=Oe({positionType:"top",positionData:n.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:n}]});return X(["mord","katex-underline"],[i],t)},mathmlBuilder(e,t){var n=new ne("mo",[new st("‾")]);n.setAttribute("stretchy","true");var r=new ne("munder",[qe(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});he({type:"vcenter",names:["\\vcenter"],numArgs:1,argTypes:["original"],allowedInText:!1,handler(e,t){var n=e.parser;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Ne(e.body,t),r=t.fontMetrics().axisHeight,s=0.5*(n.height-r-(n.depth+r));return Oe({positionType:"shift",positionData:s,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ne("mpadded",[qe(e.body,t)],["vcenter"]);return new ne("mrow",[n])}});he({type:"verb",names:["\\verb"],numArgs:0,allowedInText:!0,handler(e,t,n){throw new te("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){var n=Ru(e),r=[],s=t.havingStyle(t.style.text());for(var i=0;i<n.length;i++){var a=n[i];if(a==="~")a="\\textasciitilde";r.push(Tt(a,"Typewriter-Regular",e.mode,s,["mord","texttt"]))}return X(["mord","text"].concat(s.sizingClasses(t)),Hu(r),s)},mathmlBuilder(e,t){var n=new st(Ru(e)),r=new ne("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var Ru=(e)=>e.body.replace(/ /g,e.star?"␣":" "),nr=ju,wd=`[ \r
280
- ]`,L2="\\\\[a-zA-Z@]+",I2="\\\\[^\uD800-\uDFFF]",N2="("+L2+")"+wd+"*",B2=`\\\\(
278
+ -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error("Unknown stretchy delimiter.")}};function l2(e){return"toText"in e}class Br{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 this.classes.includes(e)}toNode(){var e=document.createDocumentFragment();for(var t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){var e="";for(var t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e)=>{if(l2(e))return e.toText();throw Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}var il={pt:1,mm:2.8452755905511813,cm:28.45275590551181,in:72.27,bp:1.00375,pc:12,dd:1.070008643042351,cc:12.84010371650821,nd:1.0669781931464175,nc:12.80373831775701,sp:0.0000152587890625,px:1.00375},c2={ex:!0,em:!0,mu:!0},md=function(t){if(typeof t!=="string")t=t.unit;return t in il||t in c2||t==="ex"},rt=function(t,n){var r;if(t.unit in il)r=il[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var s;if(n.style.isTight())s=n.havingStyle(n.style.text());else s=n;if(t.unit==="ex")r=s.fontMetrics().xHeight;else if(t.unit==="em")r=s.fontMetrics().quad;else throw new se("Invalid unit: '"+t.unit+"'");if(s!==n)r*=s.sizeMultiplier/n.sizeMultiplier}return Math.min(t.number*r,n.maxSize)},ce=function(t){return+t.toFixed(4)+"em"},ur=function(t){return t.filter((n)=>n).join(" ")},El=function(t){var n="";for(var r of Object.keys(t)){var s=t[r];if(s!==void 0)n+=$4(r)+":"+s+";"}return n},pd=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){if(n.style.isTight())this.classes.push("mtight");var s=n.getColor();if(s)this.style.color=s}},gd=function(t){var n=document.createElement(t);n.className=ur(this.classes),Object.assign(n.style,this.style);for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n},u2=/[\s"'>/=\x00-\x1f]/,bd=function(t){var n="<"+t;if(this.classes.length)n+=' class="'+Ct(ur(this.classes))+'"';var r=El(this.style);if(r)n+=' style="'+Ct(r)+'"';for(var s of Object.keys(this.attributes)){if(u2.test(s))throw new se("Invalid attribute name '"+s+"'");n+=" "+s+'="'+Ct(this.attributes[s])+'"'}n+=">";for(var i=0;i<this.children.length;i++)n+=this.children[i].toMarkup();return n+="</"+t+">",n};class Or{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,pd.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return gd.call(this,"span")}toMarkup(){return bd.call(this,"span")}}class di{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,pd.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return gd.call(this,"a")}toMarkup(){return bd.call(this,"a")}}class vd{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e='<img src="'+Ct(this.src)+'"'+(' alt="'+Ct(this.alt)+'"'),t=El(this.style);if(t)e+=' style="'+Ct(t)+'"';return e+="'/>",e}}var d2={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class qt{constructor(e,t,n,r,s,i,o,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=s||0,this.width=i||0,this.classes=o||[],this.style=a||{},this.maxFontSize=0;var l=Y4(this.text.charCodeAt(0));if(l)this.classes.push(l+"_fallback");if(/[îïíì]/.test(this.text))this.text=d2[this.text]}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;if(this.italic>0)t=document.createElement("span"),t.style.marginRight=ce(this.italic);if(this.classes.length>0)t=t||document.createElement("span"),t.className=ur(this.classes);if(Object.keys(this.style).length>0)t=t||document.createElement("span"),Object.assign(t.style,this.style);if(t)return t.appendChild(e),t;else return e}toMarkup(){var e=!1,t="<span";if(this.classes.length)e=!0,t+=' class="',t+=Ct(ur(this.classes)),t+='"';var n="";if(this.italic>0)n+="margin-right:"+ce(this.italic)+";";if(n+=El(this.style),n)e=!0,t+=' style="'+Ct(n)+'"';var r=Ct(this.text);if(e)return t+=">",t+=r,t+="</span>",t;else return r}}class bn{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Ct(this.attributes[t])+'"';e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}}class qn{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");if(this.alternate)t.setAttribute("d",this.alternate);else t.setAttribute("d",Mu[this.pathName]);return t}toMarkup(){if(this.alternate)return'<path d="'+Ct(this.alternate)+'"/>';else return'<path d="'+Ct(Mu[this.pathName])+'"/>'}}class vo{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var e="<line";for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Ct(this.attributes[t])+'"';return e+="/>",e}}function f2(e){if(e instanceof qt)return e;else throw Error("Expected symbolNode but got "+String(e)+".")}function h2(e){if(e instanceof Or)return e;else throw Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var m2=(e)=>e instanceof Or||e instanceof di||e instanceof Br,gn={"AMS-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.68889,0,0,0.72222],"66":[0,0.68889,0,0,0.66667],"67":[0,0.68889,0,0,0.72222],"68":[0,0.68889,0,0,0.72222],"69":[0,0.68889,0,0,0.66667],"70":[0,0.68889,0,0,0.61111],"71":[0,0.68889,0,0,0.77778],"72":[0,0.68889,0,0,0.77778],"73":[0,0.68889,0,0,0.38889],"74":[0.16667,0.68889,0,0,0.5],"75":[0,0.68889,0,0,0.77778],"76":[0,0.68889,0,0,0.66667],"77":[0,0.68889,0,0,0.94445],"78":[0,0.68889,0,0,0.72222],"79":[0.16667,0.68889,0,0,0.77778],"80":[0,0.68889,0,0,0.61111],"81":[0.16667,0.68889,0,0,0.77778],"82":[0,0.68889,0,0,0.72222],"83":[0,0.68889,0,0,0.55556],"84":[0,0.68889,0,0,0.66667],"85":[0,0.68889,0,0,0.72222],"86":[0,0.68889,0,0,0.72222],"87":[0,0.68889,0,0,1],"88":[0,0.68889,0,0,0.72222],"89":[0,0.68889,0,0,0.72222],"90":[0,0.68889,0,0,0.66667],"107":[0,0.68889,0,0,0.55556],"160":[0,0,0,0,0.25],"165":[0,0.675,0.025,0,0.75],"174":[0.15559,0.69224,0,0,0.94666],"240":[0,0.68889,0,0,0.55556],"295":[0,0.68889,0,0,0.54028],"710":[0,0.825,0,0,2.33334],"732":[0,0.9,0,0,2.33334],"770":[0,0.825,0,0,2.33334],"771":[0,0.9,0,0,2.33334],"989":[0.08167,0.58167,0,0,0.77778],"1008":[0,0.43056,0.04028,0,0.66667],"8245":[0,0.54986,0,0,0.275],"8463":[0,0.68889,0,0,0.54028],"8487":[0,0.68889,0,0,0.72222],"8498":[0,0.68889,0,0,0.55556],"8502":[0,0.68889,0,0,0.66667],"8503":[0,0.68889,0,0,0.44445],"8504":[0,0.68889,0,0,0.66667],"8513":[0,0.68889,0,0,0.63889],"8592":[-0.03598,0.46402,0,0,0.5],"8594":[-0.03598,0.46402,0,0,0.5],"8602":[-0.13313,0.36687,0,0,1],"8603":[-0.13313,0.36687,0,0,1],"8606":[0.01354,0.52239,0,0,1],"8608":[0.01354,0.52239,0,0,1],"8610":[0.01354,0.52239,0,0,1.11111],"8611":[0.01354,0.52239,0,0,1.11111],"8619":[0,0.54986,0,0,1],"8620":[0,0.54986,0,0,1],"8621":[-0.13313,0.37788,0,0,1.38889],"8622":[-0.13313,0.36687,0,0,1],"8624":[0,0.69224,0,0,0.5],"8625":[0,0.69224,0,0,0.5],"8630":[0,0.43056,0,0,1],"8631":[0,0.43056,0,0,1],"8634":[0.08198,0.58198,0,0,0.77778],"8635":[0.08198,0.58198,0,0,0.77778],"8638":[0.19444,0.69224,0,0,0.41667],"8639":[0.19444,0.69224,0,0,0.41667],"8642":[0.19444,0.69224,0,0,0.41667],"8643":[0.19444,0.69224,0,0,0.41667],"8644":[0.1808,0.675,0,0,1],"8646":[0.1808,0.675,0,0,1],"8647":[0.1808,0.675,0,0,1],"8648":[0.19444,0.69224,0,0,0.83334],"8649":[0.1808,0.675,0,0,1],"8650":[0.19444,0.69224,0,0,0.83334],"8651":[0.01354,0.52239,0,0,1],"8652":[0.01354,0.52239,0,0,1],"8653":[-0.13313,0.36687,0,0,1],"8654":[-0.13313,0.36687,0,0,1],"8655":[-0.13313,0.36687,0,0,1],"8666":[0.13667,0.63667,0,0,1],"8667":[0.13667,0.63667,0,0,1],"8669":[-0.13313,0.37788,0,0,1],"8672":[-0.064,0.437,0,0,1.334],"8674":[-0.064,0.437,0,0,1.334],"8705":[0,0.825,0,0,0.5],"8708":[0,0.68889,0,0,0.55556],"8709":[0.08167,0.58167,0,0,0.77778],"8717":[0,0.43056,0,0,0.42917],"8722":[-0.03598,0.46402,0,0,0.5],"8724":[0.08198,0.69224,0,0,0.77778],"8726":[0.08167,0.58167,0,0,0.77778],"8733":[0,0.69224,0,0,0.77778],"8736":[0,0.69224,0,0,0.72222],"8737":[0,0.69224,0,0,0.72222],"8738":[0.03517,0.52239,0,0,0.72222],"8739":[0.08167,0.58167,0,0,0.22222],"8740":[0.25142,0.74111,0,0,0.27778],"8741":[0.08167,0.58167,0,0,0.38889],"8742":[0.25142,0.74111,0,0,0.5],"8756":[0,0.69224,0,0,0.66667],"8757":[0,0.69224,0,0,0.66667],"8764":[-0.13313,0.36687,0,0,0.77778],"8765":[-0.13313,0.37788,0,0,0.77778],"8769":[-0.13313,0.36687,0,0,0.77778],"8770":[-0.03625,0.46375,0,0,0.77778],"8774":[0.30274,0.79383,0,0,0.77778],"8776":[-0.01688,0.48312,0,0,0.77778],"8778":[0.08167,0.58167,0,0,0.77778],"8782":[0.06062,0.54986,0,0,0.77778],"8783":[0.06062,0.54986,0,0,0.77778],"8785":[0.08198,0.58198,0,0,0.77778],"8786":[0.08198,0.58198,0,0,0.77778],"8787":[0.08198,0.58198,0,0,0.77778],"8790":[0,0.69224,0,0,0.77778],"8791":[0.22958,0.72958,0,0,0.77778],"8796":[0.08198,0.91667,0,0,0.77778],"8806":[0.25583,0.75583,0,0,0.77778],"8807":[0.25583,0.75583,0,0,0.77778],"8808":[0.25142,0.75726,0,0,0.77778],"8809":[0.25142,0.75726,0,0,0.77778],"8812":[0.25583,0.75583,0,0,0.5],"8814":[0.20576,0.70576,0,0,0.77778],"8815":[0.20576,0.70576,0,0,0.77778],"8816":[0.30274,0.79383,0,0,0.77778],"8817":[0.30274,0.79383,0,0,0.77778],"8818":[0.22958,0.72958,0,0,0.77778],"8819":[0.22958,0.72958,0,0,0.77778],"8822":[0.1808,0.675,0,0,0.77778],"8823":[0.1808,0.675,0,0,0.77778],"8828":[0.13667,0.63667,0,0,0.77778],"8829":[0.13667,0.63667,0,0,0.77778],"8830":[0.22958,0.72958,0,0,0.77778],"8831":[0.22958,0.72958,0,0,0.77778],"8832":[0.20576,0.70576,0,0,0.77778],"8833":[0.20576,0.70576,0,0,0.77778],"8840":[0.30274,0.79383,0,0,0.77778],"8841":[0.30274,0.79383,0,0,0.77778],"8842":[0.13597,0.63597,0,0,0.77778],"8843":[0.13597,0.63597,0,0,0.77778],"8847":[0.03517,0.54986,0,0,0.77778],"8848":[0.03517,0.54986,0,0,0.77778],"8858":[0.08198,0.58198,0,0,0.77778],"8859":[0.08198,0.58198,0,0,0.77778],"8861":[0.08198,0.58198,0,0,0.77778],"8862":[0,0.675,0,0,0.77778],"8863":[0,0.675,0,0,0.77778],"8864":[0,0.675,0,0,0.77778],"8865":[0,0.675,0,0,0.77778],"8872":[0,0.69224,0,0,0.61111],"8873":[0,0.69224,0,0,0.72222],"8874":[0,0.69224,0,0,0.88889],"8876":[0,0.68889,0,0,0.61111],"8877":[0,0.68889,0,0,0.61111],"8878":[0,0.68889,0,0,0.72222],"8879":[0,0.68889,0,0,0.72222],"8882":[0.03517,0.54986,0,0,0.77778],"8883":[0.03517,0.54986,0,0,0.77778],"8884":[0.13667,0.63667,0,0,0.77778],"8885":[0.13667,0.63667,0,0,0.77778],"8888":[0,0.54986,0,0,1.11111],"8890":[0.19444,0.43056,0,0,0.55556],"8891":[0.19444,0.69224,0,0,0.61111],"8892":[0.19444,0.69224,0,0,0.61111],"8901":[0,0.54986,0,0,0.27778],"8903":[0.08167,0.58167,0,0,0.77778],"8905":[0.08167,0.58167,0,0,0.77778],"8906":[0.08167,0.58167,0,0,0.77778],"8907":[0,0.69224,0,0,0.77778],"8908":[0,0.69224,0,0,0.77778],"8909":[-0.03598,0.46402,0,0,0.77778],"8910":[0,0.54986,0,0,0.76042],"8911":[0,0.54986,0,0,0.76042],"8912":[0.03517,0.54986,0,0,0.77778],"8913":[0.03517,0.54986,0,0,0.77778],"8914":[0,0.54986,0,0,0.66667],"8915":[0,0.54986,0,0,0.66667],"8916":[0,0.69224,0,0,0.66667],"8918":[0.0391,0.5391,0,0,0.77778],"8919":[0.0391,0.5391,0,0,0.77778],"8920":[0.03517,0.54986,0,0,1.33334],"8921":[0.03517,0.54986,0,0,1.33334],"8922":[0.38569,0.88569,0,0,0.77778],"8923":[0.38569,0.88569,0,0,0.77778],"8926":[0.13667,0.63667,0,0,0.77778],"8927":[0.13667,0.63667,0,0,0.77778],"8928":[0.30274,0.79383,0,0,0.77778],"8929":[0.30274,0.79383,0,0,0.77778],"8934":[0.23222,0.74111,0,0,0.77778],"8935":[0.23222,0.74111,0,0,0.77778],"8936":[0.23222,0.74111,0,0,0.77778],"8937":[0.23222,0.74111,0,0,0.77778],"8938":[0.20576,0.70576,0,0,0.77778],"8939":[0.20576,0.70576,0,0,0.77778],"8940":[0.30274,0.79383,0,0,0.77778],"8941":[0.30274,0.79383,0,0,0.77778],"8994":[0.19444,0.69224,0,0,0.77778],"8995":[0.19444,0.69224,0,0,0.77778],"9416":[0.15559,0.69224,0,0,0.90222],"9484":[0,0.69224,0,0,0.5],"9488":[0,0.69224,0,0,0.5],"9492":[0,0.37788,0,0,0.5],"9496":[0,0.37788,0,0,0.5],"9585":[0.19444,0.68889,0,0,0.88889],"9586":[0.19444,0.74111,0,0,0.88889],"9632":[0,0.675,0,0,0.77778],"9633":[0,0.675,0,0,0.77778],"9650":[0,0.54986,0,0,0.72222],"9651":[0,0.54986,0,0,0.72222],"9654":[0.03517,0.54986,0,0,0.77778],"9660":[0,0.54986,0,0,0.72222],"9661":[0,0.54986,0,0,0.72222],"9664":[0.03517,0.54986,0,0,0.77778],"9674":[0.11111,0.69224,0,0,0.66667],"9733":[0.19444,0.69224,0,0,0.94445],"10003":[0,0.69224,0,0,0.83334],"10016":[0,0.69224,0,0,0.83334],"10731":[0.11111,0.69224,0,0,0.66667],"10846":[0.19444,0.75583,0,0,0.61111],"10877":[0.13667,0.63667,0,0,0.77778],"10878":[0.13667,0.63667,0,0,0.77778],"10885":[0.25583,0.75583,0,0,0.77778],"10886":[0.25583,0.75583,0,0,0.77778],"10887":[0.13597,0.63597,0,0,0.77778],"10888":[0.13597,0.63597,0,0,0.77778],"10889":[0.26167,0.75726,0,0,0.77778],"10890":[0.26167,0.75726,0,0,0.77778],"10891":[0.48256,0.98256,0,0,0.77778],"10892":[0.48256,0.98256,0,0,0.77778],"10901":[0.13667,0.63667,0,0,0.77778],"10902":[0.13667,0.63667,0,0,0.77778],"10933":[0.25142,0.75726,0,0,0.77778],"10934":[0.25142,0.75726,0,0,0.77778],"10935":[0.26167,0.75726,0,0,0.77778],"10936":[0.26167,0.75726,0,0,0.77778],"10937":[0.26167,0.75726,0,0,0.77778],"10938":[0.26167,0.75726,0,0,0.77778],"10949":[0.25583,0.75583,0,0,0.77778],"10950":[0.25583,0.75583,0,0,0.77778],"10955":[0.28481,0.79383,0,0,0.77778],"10956":[0.28481,0.79383,0,0,0.77778],"57350":[0.08167,0.58167,0,0,0.22222],"57351":[0.08167,0.58167,0,0,0.38889],"57352":[0.08167,0.58167,0,0,0.77778],"57353":[0,0.43056,0.04028,0,0.66667],"57356":[0.25142,0.75726,0,0,0.77778],"57357":[0.25142,0.75726,0,0,0.77778],"57358":[0.41951,0.91951,0,0,0.77778],"57359":[0.30274,0.79383,0,0,0.77778],"57360":[0.30274,0.79383,0,0,0.77778],"57361":[0.41951,0.91951,0,0,0.77778],"57366":[0.25142,0.75726,0,0,0.77778],"57367":[0.25142,0.75726,0,0,0.77778],"57368":[0.25142,0.75726,0,0,0.77778],"57369":[0.25142,0.75726,0,0,0.77778],"57370":[0.13597,0.63597,0,0,0.77778],"57371":[0.13597,0.63597,0,0,0.77778]},"Caligraphic-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.68333,0,0.19445,0.79847],"66":[0,0.68333,0.03041,0.13889,0.65681],"67":[0,0.68333,0.05834,0.13889,0.52653],"68":[0,0.68333,0.02778,0.08334,0.77139],"69":[0,0.68333,0.08944,0.11111,0.52778],"70":[0,0.68333,0.09931,0.11111,0.71875],"71":[0.09722,0.68333,0.0593,0.11111,0.59487],"72":[0,0.68333,0.00965,0.11111,0.84452],"73":[0,0.68333,0.07382,0,0.54452],"74":[0.09722,0.68333,0.18472,0.16667,0.67778],"75":[0,0.68333,0.01445,0.05556,0.76195],"76":[0,0.68333,0,0.13889,0.68972],"77":[0,0.68333,0,0.13889,1.2009],"78":[0,0.68333,0.14736,0.08334,0.82049],"79":[0,0.68333,0.02778,0.11111,0.79611],"80":[0,0.68333,0.08222,0.08334,0.69556],"81":[0.09722,0.68333,0,0.11111,0.81667],"82":[0,0.68333,0,0.08334,0.8475],"83":[0,0.68333,0.075,0.13889,0.60556],"84":[0,0.68333,0.25417,0,0.54464],"85":[0,0.68333,0.09931,0.08334,0.62583],"86":[0,0.68333,0.08222,0,0.61278],"87":[0,0.68333,0.08222,0.08334,0.98778],"88":[0,0.68333,0.14643,0.13889,0.7133],"89":[0.09722,0.68333,0.08222,0.08334,0.66834],"90":[0,0.68333,0.07944,0.13889,0.72473],"160":[0,0,0,0,0.25]},"Fraktur-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69141,0,0,0.29574],"34":[0,0.69141,0,0,0.21471],"38":[0,0.69141,0,0,0.73786],"39":[0,0.69141,0,0,0.21201],"40":[0.24982,0.74947,0,0,0.38865],"41":[0.24982,0.74947,0,0,0.38865],"42":[0,0.62119,0,0,0.27764],"43":[0.08319,0.58283,0,0,0.75623],"44":[0,0.10803,0,0,0.27764],"45":[0.08319,0.58283,0,0,0.75623],"46":[0,0.10803,0,0,0.27764],"47":[0.24982,0.74947,0,0,0.50181],"48":[0,0.47534,0,0,0.50181],"49":[0,0.47534,0,0,0.50181],"50":[0,0.47534,0,0,0.50181],"51":[0.18906,0.47534,0,0,0.50181],"52":[0.18906,0.47534,0,0,0.50181],"53":[0.18906,0.47534,0,0,0.50181],"54":[0,0.69141,0,0,0.50181],"55":[0.18906,0.47534,0,0,0.50181],"56":[0,0.69141,0,0,0.50181],"57":[0.18906,0.47534,0,0,0.50181],"58":[0,0.47534,0,0,0.21606],"59":[0.12604,0.47534,0,0,0.21606],"61":[-0.13099,0.36866,0,0,0.75623],"63":[0,0.69141,0,0,0.36245],"65":[0,0.69141,0,0,0.7176],"66":[0,0.69141,0,0,0.88397],"67":[0,0.69141,0,0,0.61254],"68":[0,0.69141,0,0,0.83158],"69":[0,0.69141,0,0,0.66278],"70":[0.12604,0.69141,0,0,0.61119],"71":[0,0.69141,0,0,0.78539],"72":[0.06302,0.69141,0,0,0.7203],"73":[0,0.69141,0,0,0.55448],"74":[0.12604,0.69141,0,0,0.55231],"75":[0,0.69141,0,0,0.66845],"76":[0,0.69141,0,0,0.66602],"77":[0,0.69141,0,0,1.04953],"78":[0,0.69141,0,0,0.83212],"79":[0,0.69141,0,0,0.82699],"80":[0.18906,0.69141,0,0,0.82753],"81":[0.03781,0.69141,0,0,0.82699],"82":[0,0.69141,0,0,0.82807],"83":[0,0.69141,0,0,0.82861],"84":[0,0.69141,0,0,0.66899],"85":[0,0.69141,0,0,0.64576],"86":[0,0.69141,0,0,0.83131],"87":[0,0.69141,0,0,1.04602],"88":[0,0.69141,0,0,0.71922],"89":[0.18906,0.69141,0,0,0.83293],"90":[0.12604,0.69141,0,0,0.60201],"91":[0.24982,0.74947,0,0,0.27764],"93":[0.24982,0.74947,0,0,0.27764],"94":[0,0.69141,0,0,0.49965],"97":[0,0.47534,0,0,0.50046],"98":[0,0.69141,0,0,0.51315],"99":[0,0.47534,0,0,0.38946],"100":[0,0.62119,0,0,0.49857],"101":[0,0.47534,0,0,0.40053],"102":[0.18906,0.69141,0,0,0.32626],"103":[0.18906,0.47534,0,0,0.5037],"104":[0.18906,0.69141,0,0,0.52126],"105":[0,0.69141,0,0,0.27899],"106":[0,0.69141,0,0,0.28088],"107":[0,0.69141,0,0,0.38946],"108":[0,0.69141,0,0,0.27953],"109":[0,0.47534,0,0,0.76676],"110":[0,0.47534,0,0,0.52666],"111":[0,0.47534,0,0,0.48885],"112":[0.18906,0.52396,0,0,0.50046],"113":[0.18906,0.47534,0,0,0.48912],"114":[0,0.47534,0,0,0.38919],"115":[0,0.47534,0,0,0.44266],"116":[0,0.62119,0,0,0.33301],"117":[0,0.47534,0,0,0.5172],"118":[0,0.52396,0,0,0.5118],"119":[0,0.52396,0,0,0.77351],"120":[0.18906,0.47534,0,0,0.38865],"121":[0.18906,0.47534,0,0,0.49884],"122":[0.18906,0.47534,0,0,0.39054],"160":[0,0,0,0,0.25],"8216":[0,0.69141,0,0,0.21471],"8217":[0,0.69141,0,0,0.21471],"58112":[0,0.62119,0,0,0.49749],"58113":[0,0.62119,0,0,0.4983],"58114":[0.18906,0.69141,0,0,0.33328],"58115":[0.18906,0.69141,0,0,0.32923],"58116":[0.18906,0.47534,0,0,0.50343],"58117":[0,0.69141,0,0,0.33301],"58118":[0,0.62119,0,0,0.33409],"58119":[0,0.47534,0,0,0.50073]},"Main-Bold":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.35],"34":[0,0.69444,0,0,0.60278],"35":[0.19444,0.69444,0,0,0.95833],"36":[0.05556,0.75,0,0,0.575],"37":[0.05556,0.75,0,0,0.95833],"38":[0,0.69444,0,0,0.89444],"39":[0,0.69444,0,0,0.31944],"40":[0.25,0.75,0,0,0.44722],"41":[0.25,0.75,0,0,0.44722],"42":[0,0.75,0,0,0.575],"43":[0.13333,0.63333,0,0,0.89444],"44":[0.19444,0.15556,0,0,0.31944],"45":[0,0.44444,0,0,0.38333],"46":[0,0.15556,0,0,0.31944],"47":[0.25,0.75,0,0,0.575],"48":[0,0.64444,0,0,0.575],"49":[0,0.64444,0,0,0.575],"50":[0,0.64444,0,0,0.575],"51":[0,0.64444,0,0,0.575],"52":[0,0.64444,0,0,0.575],"53":[0,0.64444,0,0,0.575],"54":[0,0.64444,0,0,0.575],"55":[0,0.64444,0,0,0.575],"56":[0,0.64444,0,0,0.575],"57":[0,0.64444,0,0,0.575],"58":[0,0.44444,0,0,0.31944],"59":[0.19444,0.44444,0,0,0.31944],"60":[0.08556,0.58556,0,0,0.89444],"61":[-0.10889,0.39111,0,0,0.89444],"62":[0.08556,0.58556,0,0,0.89444],"63":[0,0.69444,0,0,0.54305],"64":[0,0.69444,0,0,0.89444],"65":[0,0.68611,0,0,0.86944],"66":[0,0.68611,0,0,0.81805],"67":[0,0.68611,0,0,0.83055],"68":[0,0.68611,0,0,0.88194],"69":[0,0.68611,0,0,0.75555],"70":[0,0.68611,0,0,0.72361],"71":[0,0.68611,0,0,0.90416],"72":[0,0.68611,0,0,0.9],"73":[0,0.68611,0,0,0.43611],"74":[0,0.68611,0,0,0.59444],"75":[0,0.68611,0,0,0.90138],"76":[0,0.68611,0,0,0.69166],"77":[0,0.68611,0,0,1.09166],"78":[0,0.68611,0,0,0.9],"79":[0,0.68611,0,0,0.86388],"80":[0,0.68611,0,0,0.78611],"81":[0.19444,0.68611,0,0,0.86388],"82":[0,0.68611,0,0,0.8625],"83":[0,0.68611,0,0,0.63889],"84":[0,0.68611,0,0,0.8],"85":[0,0.68611,0,0,0.88472],"86":[0,0.68611,0.01597,0,0.86944],"87":[0,0.68611,0.01597,0,1.18888],"88":[0,0.68611,0,0,0.86944],"89":[0,0.68611,0.02875,0,0.86944],"90":[0,0.68611,0,0,0.70277],"91":[0.25,0.75,0,0,0.31944],"92":[0.25,0.75,0,0,0.575],"93":[0.25,0.75,0,0,0.31944],"94":[0,0.69444,0,0,0.575],"95":[0.31,0.13444,0.03194,0,0.575],"97":[0,0.44444,0,0,0.55902],"98":[0,0.69444,0,0,0.63889],"99":[0,0.44444,0,0,0.51111],"100":[0,0.69444,0,0,0.63889],"101":[0,0.44444,0,0,0.52708],"102":[0,0.69444,0.10903,0,0.35139],"103":[0.19444,0.44444,0.01597,0,0.575],"104":[0,0.69444,0,0,0.63889],"105":[0,0.69444,0,0,0.31944],"106":[0.19444,0.69444,0,0,0.35139],"107":[0,0.69444,0,0,0.60694],"108":[0,0.69444,0,0,0.31944],"109":[0,0.44444,0,0,0.95833],"110":[0,0.44444,0,0,0.63889],"111":[0,0.44444,0,0,0.575],"112":[0.19444,0.44444,0,0,0.63889],"113":[0.19444,0.44444,0,0,0.60694],"114":[0,0.44444,0,0,0.47361],"115":[0,0.44444,0,0,0.45361],"116":[0,0.63492,0,0,0.44722],"117":[0,0.44444,0,0,0.63889],"118":[0,0.44444,0.01597,0,0.60694],"119":[0,0.44444,0.01597,0,0.83055],"120":[0,0.44444,0,0,0.60694],"121":[0.19444,0.44444,0.01597,0,0.60694],"122":[0,0.44444,0,0,0.51111],"123":[0.25,0.75,0,0,0.575],"124":[0.25,0.75,0,0,0.31944],"125":[0.25,0.75,0,0,0.575],"126":[0.35,0.34444,0,0,0.575],"160":[0,0,0,0,0.25],"163":[0,0.69444,0,0,0.86853],"168":[0,0.69444,0,0,0.575],"172":[0,0.44444,0,0,0.76666],"176":[0,0.69444,0,0,0.86944],"177":[0.13333,0.63333,0,0,0.89444],"184":[0.17014,0,0,0,0.51111],"198":[0,0.68611,0,0,1.04166],"215":[0.13333,0.63333,0,0,0.89444],"216":[0.04861,0.73472,0,0,0.89444],"223":[0,0.69444,0,0,0.59722],"230":[0,0.44444,0,0,0.83055],"247":[0.13333,0.63333,0,0,0.89444],"248":[0.09722,0.54167,0,0,0.575],"305":[0,0.44444,0,0,0.31944],"338":[0,0.68611,0,0,1.16944],"339":[0,0.44444,0,0,0.89444],"567":[0.19444,0.44444,0,0,0.35139],"710":[0,0.69444,0,0,0.575],"711":[0,0.63194,0,0,0.575],"713":[0,0.59611,0,0,0.575],"714":[0,0.69444,0,0,0.575],"715":[0,0.69444,0,0,0.575],"728":[0,0.69444,0,0,0.575],"729":[0,0.69444,0,0,0.31944],"730":[0,0.69444,0,0,0.86944],"732":[0,0.69444,0,0,0.575],"733":[0,0.69444,0,0,0.575],"915":[0,0.68611,0,0,0.69166],"916":[0,0.68611,0,0,0.95833],"920":[0,0.68611,0,0,0.89444],"923":[0,0.68611,0,0,0.80555],"926":[0,0.68611,0,0,0.76666],"928":[0,0.68611,0,0,0.9],"931":[0,0.68611,0,0,0.83055],"933":[0,0.68611,0,0,0.89444],"934":[0,0.68611,0,0,0.83055],"936":[0,0.68611,0,0,0.89444],"937":[0,0.68611,0,0,0.83055],"8211":[0,0.44444,0.03194,0,0.575],"8212":[0,0.44444,0.03194,0,1.14999],"8216":[0,0.69444,0,0,0.31944],"8217":[0,0.69444,0,0,0.31944],"8220":[0,0.69444,0,0,0.60278],"8221":[0,0.69444,0,0,0.60278],"8224":[0.19444,0.69444,0,0,0.51111],"8225":[0.19444,0.69444,0,0,0.51111],"8242":[0,0.55556,0,0,0.34444],"8407":[0,0.72444,0.15486,0,0.575],"8463":[0,0.69444,0,0,0.66759],"8465":[0,0.69444,0,0,0.83055],"8467":[0,0.69444,0,0,0.47361],"8472":[0.19444,0.44444,0,0,0.74027],"8476":[0,0.69444,0,0,0.83055],"8501":[0,0.69444,0,0,0.70277],"8592":[-0.10889,0.39111,0,0,1.14999],"8593":[0.19444,0.69444,0,0,0.575],"8594":[-0.10889,0.39111,0,0,1.14999],"8595":[0.19444,0.69444,0,0,0.575],"8596":[-0.10889,0.39111,0,0,1.14999],"8597":[0.25,0.75,0,0,0.575],"8598":[0.19444,0.69444,0,0,1.14999],"8599":[0.19444,0.69444,0,0,1.14999],"8600":[0.19444,0.69444,0,0,1.14999],"8601":[0.19444,0.69444,0,0,1.14999],"8636":[-0.10889,0.39111,0,0,1.14999],"8637":[-0.10889,0.39111,0,0,1.14999],"8640":[-0.10889,0.39111,0,0,1.14999],"8641":[-0.10889,0.39111,0,0,1.14999],"8656":[-0.10889,0.39111,0,0,1.14999],"8657":[0.19444,0.69444,0,0,0.70277],"8658":[-0.10889,0.39111,0,0,1.14999],"8659":[0.19444,0.69444,0,0,0.70277],"8660":[-0.10889,0.39111,0,0,1.14999],"8661":[0.25,0.75,0,0,0.70277],"8704":[0,0.69444,0,0,0.63889],"8706":[0,0.69444,0.06389,0,0.62847],"8707":[0,0.69444,0,0,0.63889],"8709":[0.05556,0.75,0,0,0.575],"8711":[0,0.68611,0,0,0.95833],"8712":[0.08556,0.58556,0,0,0.76666],"8715":[0.08556,0.58556,0,0,0.76666],"8722":[0.13333,0.63333,0,0,0.89444],"8723":[0.13333,0.63333,0,0,0.89444],"8725":[0.25,0.75,0,0,0.575],"8726":[0.25,0.75,0,0,0.575],"8727":[-0.02778,0.47222,0,0,0.575],"8728":[-0.02639,0.47361,0,0,0.575],"8729":[-0.02639,0.47361,0,0,0.575],"8730":[0.18,0.82,0,0,0.95833],"8733":[0,0.44444,0,0,0.89444],"8734":[0,0.44444,0,0,1.14999],"8736":[0,0.69224,0,0,0.72222],"8739":[0.25,0.75,0,0,0.31944],"8741":[0.25,0.75,0,0,0.575],"8743":[0,0.55556,0,0,0.76666],"8744":[0,0.55556,0,0,0.76666],"8745":[0,0.55556,0,0,0.76666],"8746":[0,0.55556,0,0,0.76666],"8747":[0.19444,0.69444,0.12778,0,0.56875],"8764":[-0.10889,0.39111,0,0,0.89444],"8768":[0.19444,0.69444,0,0,0.31944],"8771":[0.00222,0.50222,0,0,0.89444],"8773":[0.027,0.638,0,0,0.894],"8776":[0.02444,0.52444,0,0,0.89444],"8781":[0.00222,0.50222,0,0,0.89444],"8801":[0.00222,0.50222,0,0,0.89444],"8804":[0.19667,0.69667,0,0,0.89444],"8805":[0.19667,0.69667,0,0,0.89444],"8810":[0.08556,0.58556,0,0,1.14999],"8811":[0.08556,0.58556,0,0,1.14999],"8826":[0.08556,0.58556,0,0,0.89444],"8827":[0.08556,0.58556,0,0,0.89444],"8834":[0.08556,0.58556,0,0,0.89444],"8835":[0.08556,0.58556,0,0,0.89444],"8838":[0.19667,0.69667,0,0,0.89444],"8839":[0.19667,0.69667,0,0,0.89444],"8846":[0,0.55556,0,0,0.76666],"8849":[0.19667,0.69667,0,0,0.89444],"8850":[0.19667,0.69667,0,0,0.89444],"8851":[0,0.55556,0,0,0.76666],"8852":[0,0.55556,0,0,0.76666],"8853":[0.13333,0.63333,0,0,0.89444],"8854":[0.13333,0.63333,0,0,0.89444],"8855":[0.13333,0.63333,0,0,0.89444],"8856":[0.13333,0.63333,0,0,0.89444],"8857":[0.13333,0.63333,0,0,0.89444],"8866":[0,0.69444,0,0,0.70277],"8867":[0,0.69444,0,0,0.70277],"8868":[0,0.69444,0,0,0.89444],"8869":[0,0.69444,0,0,0.89444],"8900":[-0.02639,0.47361,0,0,0.575],"8901":[-0.02639,0.47361,0,0,0.31944],"8902":[-0.02778,0.47222,0,0,0.575],"8968":[0.25,0.75,0,0,0.51111],"8969":[0.25,0.75,0,0,0.51111],"8970":[0.25,0.75,0,0,0.51111],"8971":[0.25,0.75,0,0,0.51111],"8994":[-0.13889,0.36111,0,0,1.14999],"8995":[-0.13889,0.36111,0,0,1.14999],"9651":[0.19444,0.69444,0,0,1.02222],"9657":[-0.02778,0.47222,0,0,0.575],"9661":[0.19444,0.69444,0,0,1.02222],"9667":[-0.02778,0.47222,0,0,0.575],"9711":[0.19444,0.69444,0,0,1.14999],"9824":[0.12963,0.69444,0,0,0.89444],"9825":[0.12963,0.69444,0,0,0.89444],"9826":[0.12963,0.69444,0,0,0.89444],"9827":[0.12963,0.69444,0,0,0.89444],"9837":[0,0.75,0,0,0.44722],"9838":[0.19444,0.69444,0,0,0.44722],"9839":[0.19444,0.69444,0,0,0.44722],"10216":[0.25,0.75,0,0,0.44722],"10217":[0.25,0.75,0,0,0.44722],"10815":[0,0.68611,0,0,0.9],"10927":[0.19667,0.69667,0,0,0.89444],"10928":[0.19667,0.69667,0,0,0.89444],"57376":[0.19444,0.69444,0,0,0]},"Main-BoldItalic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.11417,0,0.38611],"34":[0,0.69444,0.07939,0,0.62055],"35":[0.19444,0.69444,0.06833,0,0.94444],"37":[0.05556,0.75,0.12861,0,0.94444],"38":[0,0.69444,0.08528,0,0.88555],"39":[0,0.69444,0.12945,0,0.35555],"40":[0.25,0.75,0.15806,0,0.47333],"41":[0.25,0.75,0.03306,0,0.47333],"42":[0,0.75,0.14333,0,0.59111],"43":[0.10333,0.60333,0.03306,0,0.88555],"44":[0.19444,0.14722,0,0,0.35555],"45":[0,0.44444,0.02611,0,0.41444],"46":[0,0.14722,0,0,0.35555],"47":[0.25,0.75,0.15806,0,0.59111],"48":[0,0.64444,0.13167,0,0.59111],"49":[0,0.64444,0.13167,0,0.59111],"50":[0,0.64444,0.13167,0,0.59111],"51":[0,0.64444,0.13167,0,0.59111],"52":[0.19444,0.64444,0.13167,0,0.59111],"53":[0,0.64444,0.13167,0,0.59111],"54":[0,0.64444,0.13167,0,0.59111],"55":[0.19444,0.64444,0.13167,0,0.59111],"56":[0,0.64444,0.13167,0,0.59111],"57":[0,0.64444,0.13167,0,0.59111],"58":[0,0.44444,0.06695,0,0.35555],"59":[0.19444,0.44444,0.06695,0,0.35555],"61":[-0.10889,0.39111,0.06833,0,0.88555],"63":[0,0.69444,0.11472,0,0.59111],"64":[0,0.69444,0.09208,0,0.88555],"65":[0,0.68611,0,0,0.86555],"66":[0,0.68611,0.0992,0,0.81666],"67":[0,0.68611,0.14208,0,0.82666],"68":[0,0.68611,0.09062,0,0.87555],"69":[0,0.68611,0.11431,0,0.75666],"70":[0,0.68611,0.12903,0,0.72722],"71":[0,0.68611,0.07347,0,0.89527],"72":[0,0.68611,0.17208,0,0.8961],"73":[0,0.68611,0.15681,0,0.47166],"74":[0,0.68611,0.145,0,0.61055],"75":[0,0.68611,0.14208,0,0.89499],"76":[0,0.68611,0,0,0.69777],"77":[0,0.68611,0.17208,0,1.07277],"78":[0,0.68611,0.17208,0,0.8961],"79":[0,0.68611,0.09062,0,0.85499],"80":[0,0.68611,0.0992,0,0.78721],"81":[0.19444,0.68611,0.09062,0,0.85499],"82":[0,0.68611,0.02559,0,0.85944],"83":[0,0.68611,0.11264,0,0.64999],"84":[0,0.68611,0.12903,0,0.7961],"85":[0,0.68611,0.17208,0,0.88083],"86":[0,0.68611,0.18625,0,0.86555],"87":[0,0.68611,0.18625,0,1.15999],"88":[0,0.68611,0.15681,0,0.86555],"89":[0,0.68611,0.19803,0,0.86555],"90":[0,0.68611,0.14208,0,0.70888],"91":[0.25,0.75,0.1875,0,0.35611],"93":[0.25,0.75,0.09972,0,0.35611],"94":[0,0.69444,0.06709,0,0.59111],"95":[0.31,0.13444,0.09811,0,0.59111],"97":[0,0.44444,0.09426,0,0.59111],"98":[0,0.69444,0.07861,0,0.53222],"99":[0,0.44444,0.05222,0,0.53222],"100":[0,0.69444,0.10861,0,0.59111],"101":[0,0.44444,0.085,0,0.53222],"102":[0.19444,0.69444,0.21778,0,0.4],"103":[0.19444,0.44444,0.105,0,0.53222],"104":[0,0.69444,0.09426,0,0.59111],"105":[0,0.69326,0.11387,0,0.35555],"106":[0.19444,0.69326,0.1672,0,0.35555],"107":[0,0.69444,0.11111,0,0.53222],"108":[0,0.69444,0.10861,0,0.29666],"109":[0,0.44444,0.09426,0,0.94444],"110":[0,0.44444,0.09426,0,0.64999],"111":[0,0.44444,0.07861,0,0.59111],"112":[0.19444,0.44444,0.07861,0,0.59111],"113":[0.19444,0.44444,0.105,0,0.53222],"114":[0,0.44444,0.11111,0,0.50167],"115":[0,0.44444,0.08167,0,0.48694],"116":[0,0.63492,0.09639,0,0.385],"117":[0,0.44444,0.09426,0,0.62055],"118":[0,0.44444,0.11111,0,0.53222],"119":[0,0.44444,0.11111,0,0.76777],"120":[0,0.44444,0.12583,0,0.56055],"121":[0.19444,0.44444,0.105,0,0.56166],"122":[0,0.44444,0.13889,0,0.49055],"126":[0.35,0.34444,0.11472,0,0.59111],"160":[0,0,0,0,0.25],"168":[0,0.69444,0.11473,0,0.59111],"176":[0,0.69444,0,0,0.94888],"184":[0.17014,0,0,0,0.53222],"198":[0,0.68611,0.11431,0,1.02277],"216":[0.04861,0.73472,0.09062,0,0.88555],"223":[0.19444,0.69444,0.09736,0,0.665],"230":[0,0.44444,0.085,0,0.82666],"248":[0.09722,0.54167,0.09458,0,0.59111],"305":[0,0.44444,0.09426,0,0.35555],"338":[0,0.68611,0.11431,0,1.14054],"339":[0,0.44444,0.085,0,0.82666],"567":[0.19444,0.44444,0.04611,0,0.385],"710":[0,0.69444,0.06709,0,0.59111],"711":[0,0.63194,0.08271,0,0.59111],"713":[0,0.59444,0.10444,0,0.59111],"714":[0,0.69444,0.08528,0,0.59111],"715":[0,0.69444,0,0,0.59111],"728":[0,0.69444,0.10333,0,0.59111],"729":[0,0.69444,0.12945,0,0.35555],"730":[0,0.69444,0,0,0.94888],"732":[0,0.69444,0.11472,0,0.59111],"733":[0,0.69444,0.11472,0,0.59111],"915":[0,0.68611,0.12903,0,0.69777],"916":[0,0.68611,0,0,0.94444],"920":[0,0.68611,0.09062,0,0.88555],"923":[0,0.68611,0,0,0.80666],"926":[0,0.68611,0.15092,0,0.76777],"928":[0,0.68611,0.17208,0,0.8961],"931":[0,0.68611,0.11431,0,0.82666],"933":[0,0.68611,0.10778,0,0.88555],"934":[0,0.68611,0.05632,0,0.82666],"936":[0,0.68611,0.10778,0,0.88555],"937":[0,0.68611,0.0992,0,0.82666],"8211":[0,0.44444,0.09811,0,0.59111],"8212":[0,0.44444,0.09811,0,1.18221],"8216":[0,0.69444,0.12945,0,0.35555],"8217":[0,0.69444,0.12945,0,0.35555],"8220":[0,0.69444,0.16772,0,0.62055],"8221":[0,0.69444,0.07939,0,0.62055]},"Main-Italic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.12417,0,0.30667],"34":[0,0.69444,0.06961,0,0.51444],"35":[0.19444,0.69444,0.06616,0,0.81777],"37":[0.05556,0.75,0.13639,0,0.81777],"38":[0,0.69444,0.09694,0,0.76666],"39":[0,0.69444,0.12417,0,0.30667],"40":[0.25,0.75,0.16194,0,0.40889],"41":[0.25,0.75,0.03694,0,0.40889],"42":[0,0.75,0.14917,0,0.51111],"43":[0.05667,0.56167,0.03694,0,0.76666],"44":[0.19444,0.10556,0,0,0.30667],"45":[0,0.43056,0.02826,0,0.35778],"46":[0,0.10556,0,0,0.30667],"47":[0.25,0.75,0.16194,0,0.51111],"48":[0,0.64444,0.13556,0,0.51111],"49":[0,0.64444,0.13556,0,0.51111],"50":[0,0.64444,0.13556,0,0.51111],"51":[0,0.64444,0.13556,0,0.51111],"52":[0.19444,0.64444,0.13556,0,0.51111],"53":[0,0.64444,0.13556,0,0.51111],"54":[0,0.64444,0.13556,0,0.51111],"55":[0.19444,0.64444,0.13556,0,0.51111],"56":[0,0.64444,0.13556,0,0.51111],"57":[0,0.64444,0.13556,0,0.51111],"58":[0,0.43056,0.0582,0,0.30667],"59":[0.19444,0.43056,0.0582,0,0.30667],"61":[-0.13313,0.36687,0.06616,0,0.76666],"63":[0,0.69444,0.1225,0,0.51111],"64":[0,0.69444,0.09597,0,0.76666],"65":[0,0.68333,0,0,0.74333],"66":[0,0.68333,0.10257,0,0.70389],"67":[0,0.68333,0.14528,0,0.71555],"68":[0,0.68333,0.09403,0,0.755],"69":[0,0.68333,0.12028,0,0.67833],"70":[0,0.68333,0.13305,0,0.65277],"71":[0,0.68333,0.08722,0,0.77361],"72":[0,0.68333,0.16389,0,0.74333],"73":[0,0.68333,0.15806,0,0.38555],"74":[0,0.68333,0.14028,0,0.525],"75":[0,0.68333,0.14528,0,0.76888],"76":[0,0.68333,0,0,0.62722],"77":[0,0.68333,0.16389,0,0.89666],"78":[0,0.68333,0.16389,0,0.74333],"79":[0,0.68333,0.09403,0,0.76666],"80":[0,0.68333,0.10257,0,0.67833],"81":[0.19444,0.68333,0.09403,0,0.76666],"82":[0,0.68333,0.03868,0,0.72944],"83":[0,0.68333,0.11972,0,0.56222],"84":[0,0.68333,0.13305,0,0.71555],"85":[0,0.68333,0.16389,0,0.74333],"86":[0,0.68333,0.18361,0,0.74333],"87":[0,0.68333,0.18361,0,0.99888],"88":[0,0.68333,0.15806,0,0.74333],"89":[0,0.68333,0.19383,0,0.74333],"90":[0,0.68333,0.14528,0,0.61333],"91":[0.25,0.75,0.1875,0,0.30667],"93":[0.25,0.75,0.10528,0,0.30667],"94":[0,0.69444,0.06646,0,0.51111],"95":[0.31,0.12056,0.09208,0,0.51111],"97":[0,0.43056,0.07671,0,0.51111],"98":[0,0.69444,0.06312,0,0.46],"99":[0,0.43056,0.05653,0,0.46],"100":[0,0.69444,0.10333,0,0.51111],"101":[0,0.43056,0.07514,0,0.46],"102":[0.19444,0.69444,0.21194,0,0.30667],"103":[0.19444,0.43056,0.08847,0,0.46],"104":[0,0.69444,0.07671,0,0.51111],"105":[0,0.65536,0.1019,0,0.30667],"106":[0.19444,0.65536,0.14467,0,0.30667],"107":[0,0.69444,0.10764,0,0.46],"108":[0,0.69444,0.10333,0,0.25555],"109":[0,0.43056,0.07671,0,0.81777],"110":[0,0.43056,0.07671,0,0.56222],"111":[0,0.43056,0.06312,0,0.51111],"112":[0.19444,0.43056,0.06312,0,0.51111],"113":[0.19444,0.43056,0.08847,0,0.46],"114":[0,0.43056,0.10764,0,0.42166],"115":[0,0.43056,0.08208,0,0.40889],"116":[0,0.61508,0.09486,0,0.33222],"117":[0,0.43056,0.07671,0,0.53666],"118":[0,0.43056,0.10764,0,0.46],"119":[0,0.43056,0.10764,0,0.66444],"120":[0,0.43056,0.12042,0,0.46389],"121":[0.19444,0.43056,0.08847,0,0.48555],"122":[0,0.43056,0.12292,0,0.40889],"126":[0.35,0.31786,0.11585,0,0.51111],"160":[0,0,0,0,0.25],"168":[0,0.66786,0.10474,0,0.51111],"176":[0,0.69444,0,0,0.83129],"184":[0.17014,0,0,0,0.46],"198":[0,0.68333,0.12028,0,0.88277],"216":[0.04861,0.73194,0.09403,0,0.76666],"223":[0.19444,0.69444,0.10514,0,0.53666],"230":[0,0.43056,0.07514,0,0.71555],"248":[0.09722,0.52778,0.09194,0,0.51111],"338":[0,0.68333,0.12028,0,0.98499],"339":[0,0.43056,0.07514,0,0.71555],"710":[0,0.69444,0.06646,0,0.51111],"711":[0,0.62847,0.08295,0,0.51111],"713":[0,0.56167,0.10333,0,0.51111],"714":[0,0.69444,0.09694,0,0.51111],"715":[0,0.69444,0,0,0.51111],"728":[0,0.69444,0.10806,0,0.51111],"729":[0,0.66786,0.11752,0,0.30667],"730":[0,0.69444,0,0,0.83129],"732":[0,0.66786,0.11585,0,0.51111],"733":[0,0.69444,0.1225,0,0.51111],"915":[0,0.68333,0.13305,0,0.62722],"916":[0,0.68333,0,0,0.81777],"920":[0,0.68333,0.09403,0,0.76666],"923":[0,0.68333,0,0,0.69222],"926":[0,0.68333,0.15294,0,0.66444],"928":[0,0.68333,0.16389,0,0.74333],"931":[0,0.68333,0.12028,0,0.71555],"933":[0,0.68333,0.11111,0,0.76666],"934":[0,0.68333,0.05986,0,0.71555],"936":[0,0.68333,0.11111,0,0.76666],"937":[0,0.68333,0.10257,0,0.71555],"8211":[0,0.43056,0.09208,0,0.51111],"8212":[0,0.43056,0.09208,0,1.02222],"8216":[0,0.69444,0.12417,0,0.30667],"8217":[0,0.69444,0.12417,0,0.30667],"8220":[0,0.69444,0.1685,0,0.51444],"8221":[0,0.69444,0.06961,0,0.51444],"8463":[0,0.68889,0,0,0.54028]},"Main-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.27778],"34":[0,0.69444,0,0,0.5],"35":[0.19444,0.69444,0,0,0.83334],"36":[0.05556,0.75,0,0,0.5],"37":[0.05556,0.75,0,0,0.83334],"38":[0,0.69444,0,0,0.77778],"39":[0,0.69444,0,0,0.27778],"40":[0.25,0.75,0,0,0.38889],"41":[0.25,0.75,0,0,0.38889],"42":[0,0.75,0,0,0.5],"43":[0.08333,0.58333,0,0,0.77778],"44":[0.19444,0.10556,0,0,0.27778],"45":[0,0.43056,0,0,0.33333],"46":[0,0.10556,0,0,0.27778],"47":[0.25,0.75,0,0,0.5],"48":[0,0.64444,0,0,0.5],"49":[0,0.64444,0,0,0.5],"50":[0,0.64444,0,0,0.5],"51":[0,0.64444,0,0,0.5],"52":[0,0.64444,0,0,0.5],"53":[0,0.64444,0,0,0.5],"54":[0,0.64444,0,0,0.5],"55":[0,0.64444,0,0,0.5],"56":[0,0.64444,0,0,0.5],"57":[0,0.64444,0,0,0.5],"58":[0,0.43056,0,0,0.27778],"59":[0.19444,0.43056,0,0,0.27778],"60":[0.0391,0.5391,0,0,0.77778],"61":[-0.13313,0.36687,0,0,0.77778],"62":[0.0391,0.5391,0,0,0.77778],"63":[0,0.69444,0,0,0.47222],"64":[0,0.69444,0,0,0.77778],"65":[0,0.68333,0,0,0.75],"66":[0,0.68333,0,0,0.70834],"67":[0,0.68333,0,0,0.72222],"68":[0,0.68333,0,0,0.76389],"69":[0,0.68333,0,0,0.68056],"70":[0,0.68333,0,0,0.65278],"71":[0,0.68333,0,0,0.78472],"72":[0,0.68333,0,0,0.75],"73":[0,0.68333,0,0,0.36111],"74":[0,0.68333,0,0,0.51389],"75":[0,0.68333,0,0,0.77778],"76":[0,0.68333,0,0,0.625],"77":[0,0.68333,0,0,0.91667],"78":[0,0.68333,0,0,0.75],"79":[0,0.68333,0,0,0.77778],"80":[0,0.68333,0,0,0.68056],"81":[0.19444,0.68333,0,0,0.77778],"82":[0,0.68333,0,0,0.73611],"83":[0,0.68333,0,0,0.55556],"84":[0,0.68333,0,0,0.72222],"85":[0,0.68333,0,0,0.75],"86":[0,0.68333,0.01389,0,0.75],"87":[0,0.68333,0.01389,0,1.02778],"88":[0,0.68333,0,0,0.75],"89":[0,0.68333,0.025,0,0.75],"90":[0,0.68333,0,0,0.61111],"91":[0.25,0.75,0,0,0.27778],"92":[0.25,0.75,0,0,0.5],"93":[0.25,0.75,0,0,0.27778],"94":[0,0.69444,0,0,0.5],"95":[0.31,0.12056,0.02778,0,0.5],"97":[0,0.43056,0,0,0.5],"98":[0,0.69444,0,0,0.55556],"99":[0,0.43056,0,0,0.44445],"100":[0,0.69444,0,0,0.55556],"101":[0,0.43056,0,0,0.44445],"102":[0,0.69444,0.07778,0,0.30556],"103":[0.19444,0.43056,0.01389,0,0.5],"104":[0,0.69444,0,0,0.55556],"105":[0,0.66786,0,0,0.27778],"106":[0.19444,0.66786,0,0,0.30556],"107":[0,0.69444,0,0,0.52778],"108":[0,0.69444,0,0,0.27778],"109":[0,0.43056,0,0,0.83334],"110":[0,0.43056,0,0,0.55556],"111":[0,0.43056,0,0,0.5],"112":[0.19444,0.43056,0,0,0.55556],"113":[0.19444,0.43056,0,0,0.52778],"114":[0,0.43056,0,0,0.39167],"115":[0,0.43056,0,0,0.39445],"116":[0,0.61508,0,0,0.38889],"117":[0,0.43056,0,0,0.55556],"118":[0,0.43056,0.01389,0,0.52778],"119":[0,0.43056,0.01389,0,0.72222],"120":[0,0.43056,0,0,0.52778],"121":[0.19444,0.43056,0.01389,0,0.52778],"122":[0,0.43056,0,0,0.44445],"123":[0.25,0.75,0,0,0.5],"124":[0.25,0.75,0,0,0.27778],"125":[0.25,0.75,0,0,0.5],"126":[0.35,0.31786,0,0,0.5],"160":[0,0,0,0,0.25],"163":[0,0.69444,0,0,0.76909],"167":[0.19444,0.69444,0,0,0.44445],"168":[0,0.66786,0,0,0.5],"172":[0,0.43056,0,0,0.66667],"176":[0,0.69444,0,0,0.75],"177":[0.08333,0.58333,0,0,0.77778],"182":[0.19444,0.69444,0,0,0.61111],"184":[0.17014,0,0,0,0.44445],"198":[0,0.68333,0,0,0.90278],"215":[0.08333,0.58333,0,0,0.77778],"216":[0.04861,0.73194,0,0,0.77778],"223":[0,0.69444,0,0,0.5],"230":[0,0.43056,0,0,0.72222],"247":[0.08333,0.58333,0,0,0.77778],"248":[0.09722,0.52778,0,0,0.5],"305":[0,0.43056,0,0,0.27778],"338":[0,0.68333,0,0,1.01389],"339":[0,0.43056,0,0,0.77778],"567":[0.19444,0.43056,0,0,0.30556],"710":[0,0.69444,0,0,0.5],"711":[0,0.62847,0,0,0.5],"713":[0,0.56778,0,0,0.5],"714":[0,0.69444,0,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0,0,0.5],"729":[0,0.66786,0,0,0.27778],"730":[0,0.69444,0,0,0.75],"732":[0,0.66786,0,0,0.5],"733":[0,0.69444,0,0,0.5],"915":[0,0.68333,0,0,0.625],"916":[0,0.68333,0,0,0.83334],"920":[0,0.68333,0,0,0.77778],"923":[0,0.68333,0,0,0.69445],"926":[0,0.68333,0,0,0.66667],"928":[0,0.68333,0,0,0.75],"931":[0,0.68333,0,0,0.72222],"933":[0,0.68333,0,0,0.77778],"934":[0,0.68333,0,0,0.72222],"936":[0,0.68333,0,0,0.77778],"937":[0,0.68333,0,0,0.72222],"8211":[0,0.43056,0.02778,0,0.5],"8212":[0,0.43056,0.02778,0,1],"8216":[0,0.69444,0,0,0.27778],"8217":[0,0.69444,0,0,0.27778],"8220":[0,0.69444,0,0,0.5],"8221":[0,0.69444,0,0,0.5],"8224":[0.19444,0.69444,0,0,0.44445],"8225":[0.19444,0.69444,0,0,0.44445],"8230":[0,0.123,0,0,1.172],"8242":[0,0.55556,0,0,0.275],"8407":[0,0.71444,0.15382,0,0.5],"8463":[0,0.68889,0,0,0.54028],"8465":[0,0.69444,0,0,0.72222],"8467":[0,0.69444,0,0.11111,0.41667],"8472":[0.19444,0.43056,0,0.11111,0.63646],"8476":[0,0.69444,0,0,0.72222],"8501":[0,0.69444,0,0,0.61111],"8592":[-0.13313,0.36687,0,0,1],"8593":[0.19444,0.69444,0,0,0.5],"8594":[-0.13313,0.36687,0,0,1],"8595":[0.19444,0.69444,0,0,0.5],"8596":[-0.13313,0.36687,0,0,1],"8597":[0.25,0.75,0,0,0.5],"8598":[0.19444,0.69444,0,0,1],"8599":[0.19444,0.69444,0,0,1],"8600":[0.19444,0.69444,0,0,1],"8601":[0.19444,0.69444,0,0,1],"8614":[0.011,0.511,0,0,1],"8617":[0.011,0.511,0,0,1.126],"8618":[0.011,0.511,0,0,1.126],"8636":[-0.13313,0.36687,0,0,1],"8637":[-0.13313,0.36687,0,0,1],"8640":[-0.13313,0.36687,0,0,1],"8641":[-0.13313,0.36687,0,0,1],"8652":[0.011,0.671,0,0,1],"8656":[-0.13313,0.36687,0,0,1],"8657":[0.19444,0.69444,0,0,0.61111],"8658":[-0.13313,0.36687,0,0,1],"8659":[0.19444,0.69444,0,0,0.61111],"8660":[-0.13313,0.36687,0,0,1],"8661":[0.25,0.75,0,0,0.61111],"8704":[0,0.69444,0,0,0.55556],"8706":[0,0.69444,0.05556,0.08334,0.5309],"8707":[0,0.69444,0,0,0.55556],"8709":[0.05556,0.75,0,0,0.5],"8711":[0,0.68333,0,0,0.83334],"8712":[0.0391,0.5391,0,0,0.66667],"8715":[0.0391,0.5391,0,0,0.66667],"8722":[0.08333,0.58333,0,0,0.77778],"8723":[0.08333,0.58333,0,0,0.77778],"8725":[0.25,0.75,0,0,0.5],"8726":[0.25,0.75,0,0,0.5],"8727":[-0.03472,0.46528,0,0,0.5],"8728":[-0.05555,0.44445,0,0,0.5],"8729":[-0.05555,0.44445,0,0,0.5],"8730":[0.2,0.8,0,0,0.83334],"8733":[0,0.43056,0,0,0.77778],"8734":[0,0.43056,0,0,1],"8736":[0,0.69224,0,0,0.72222],"8739":[0.25,0.75,0,0,0.27778],"8741":[0.25,0.75,0,0,0.5],"8743":[0,0.55556,0,0,0.66667],"8744":[0,0.55556,0,0,0.66667],"8745":[0,0.55556,0,0,0.66667],"8746":[0,0.55556,0,0,0.66667],"8747":[0.19444,0.69444,0.11111,0,0.41667],"8764":[-0.13313,0.36687,0,0,0.77778],"8768":[0.19444,0.69444,0,0,0.27778],"8771":[-0.03625,0.46375,0,0,0.77778],"8773":[-0.022,0.589,0,0,0.778],"8776":[-0.01688,0.48312,0,0,0.77778],"8781":[-0.03625,0.46375,0,0,0.77778],"8784":[-0.133,0.673,0,0,0.778],"8801":[-0.03625,0.46375,0,0,0.77778],"8804":[0.13597,0.63597,0,0,0.77778],"8805":[0.13597,0.63597,0,0,0.77778],"8810":[0.0391,0.5391,0,0,1],"8811":[0.0391,0.5391,0,0,1],"8826":[0.0391,0.5391,0,0,0.77778],"8827":[0.0391,0.5391,0,0,0.77778],"8834":[0.0391,0.5391,0,0,0.77778],"8835":[0.0391,0.5391,0,0,0.77778],"8838":[0.13597,0.63597,0,0,0.77778],"8839":[0.13597,0.63597,0,0,0.77778],"8846":[0,0.55556,0,0,0.66667],"8849":[0.13597,0.63597,0,0,0.77778],"8850":[0.13597,0.63597,0,0,0.77778],"8851":[0,0.55556,0,0,0.66667],"8852":[0,0.55556,0,0,0.66667],"8853":[0.08333,0.58333,0,0,0.77778],"8854":[0.08333,0.58333,0,0,0.77778],"8855":[0.08333,0.58333,0,0,0.77778],"8856":[0.08333,0.58333,0,0,0.77778],"8857":[0.08333,0.58333,0,0,0.77778],"8866":[0,0.69444,0,0,0.61111],"8867":[0,0.69444,0,0,0.61111],"8868":[0,0.69444,0,0,0.77778],"8869":[0,0.69444,0,0,0.77778],"8872":[0.249,0.75,0,0,0.867],"8900":[-0.05555,0.44445,0,0,0.5],"8901":[-0.05555,0.44445,0,0,0.27778],"8902":[-0.03472,0.46528,0,0,0.5],"8904":[0.005,0.505,0,0,0.9],"8942":[0.03,0.903,0,0,0.278],"8943":[-0.19,0.313,0,0,1.172],"8945":[-0.1,0.823,0,0,1.282],"8968":[0.25,0.75,0,0,0.44445],"8969":[0.25,0.75,0,0,0.44445],"8970":[0.25,0.75,0,0,0.44445],"8971":[0.25,0.75,0,0,0.44445],"8994":[-0.14236,0.35764,0,0,1],"8995":[-0.14236,0.35764,0,0,1],"9136":[0.244,0.744,0,0,0.412],"9137":[0.244,0.745,0,0,0.412],"9651":[0.19444,0.69444,0,0,0.88889],"9657":[-0.03472,0.46528,0,0,0.5],"9661":[0.19444,0.69444,0,0,0.88889],"9667":[-0.03472,0.46528,0,0,0.5],"9711":[0.19444,0.69444,0,0,1],"9824":[0.12963,0.69444,0,0,0.77778],"9825":[0.12963,0.69444,0,0,0.77778],"9826":[0.12963,0.69444,0,0,0.77778],"9827":[0.12963,0.69444,0,0,0.77778],"9837":[0,0.75,0,0,0.38889],"9838":[0.19444,0.69444,0,0,0.38889],"9839":[0.19444,0.69444,0,0,0.38889],"10216":[0.25,0.75,0,0,0.38889],"10217":[0.25,0.75,0,0,0.38889],"10222":[0.244,0.744,0,0,0.412],"10223":[0.244,0.745,0,0,0.412],"10229":[0.011,0.511,0,0,1.609],"10230":[0.011,0.511,0,0,1.638],"10231":[0.011,0.511,0,0,1.859],"10232":[0.024,0.525,0,0,1.609],"10233":[0.024,0.525,0,0,1.638],"10234":[0.024,0.525,0,0,1.858],"10236":[0.011,0.511,0,0,1.638],"10815":[0,0.68333,0,0,0.75],"10927":[0.13597,0.63597,0,0,0.77778],"10928":[0.13597,0.63597,0,0,0.77778],"57376":[0.19444,0.69444,0,0,0]},"Math-BoldItalic":{"32":[0,0,0,0,0.25],"48":[0,0.44444,0,0,0.575],"49":[0,0.44444,0,0,0.575],"50":[0,0.44444,0,0,0.575],"51":[0.19444,0.44444,0,0,0.575],"52":[0.19444,0.44444,0,0,0.575],"53":[0.19444,0.44444,0,0,0.575],"54":[0,0.64444,0,0,0.575],"55":[0.19444,0.44444,0,0,0.575],"56":[0,0.64444,0,0,0.575],"57":[0.19444,0.44444,0,0,0.575],"65":[0,0.68611,0,0,0.86944],"66":[0,0.68611,0.04835,0,0.8664],"67":[0,0.68611,0.06979,0,0.81694],"68":[0,0.68611,0.03194,0,0.93812],"69":[0,0.68611,0.05451,0,0.81007],"70":[0,0.68611,0.15972,0,0.68889],"71":[0,0.68611,0,0,0.88673],"72":[0,0.68611,0.08229,0,0.98229],"73":[0,0.68611,0.07778,0,0.51111],"74":[0,0.68611,0.10069,0,0.63125],"75":[0,0.68611,0.06979,0,0.97118],"76":[0,0.68611,0,0,0.75555],"77":[0,0.68611,0.11424,0,1.14201],"78":[0,0.68611,0.11424,0,0.95034],"79":[0,0.68611,0.03194,0,0.83666],"80":[0,0.68611,0.15972,0,0.72309],"81":[0.19444,0.68611,0,0,0.86861],"82":[0,0.68611,0.00421,0,0.87235],"83":[0,0.68611,0.05382,0,0.69271],"84":[0,0.68611,0.15972,0,0.63663],"85":[0,0.68611,0.11424,0,0.80027],"86":[0,0.68611,0.25555,0,0.67778],"87":[0,0.68611,0.15972,0,1.09305],"88":[0,0.68611,0.07778,0,0.94722],"89":[0,0.68611,0.25555,0,0.67458],"90":[0,0.68611,0.06979,0,0.77257],"97":[0,0.44444,0,0,0.63287],"98":[0,0.69444,0,0,0.52083],"99":[0,0.44444,0,0,0.51342],"100":[0,0.69444,0,0,0.60972],"101":[0,0.44444,0,0,0.55361],"102":[0.19444,0.69444,0.11042,0,0.56806],"103":[0.19444,0.44444,0.03704,0,0.5449],"104":[0,0.69444,0,0,0.66759],"105":[0,0.69326,0,0,0.4048],"106":[0.19444,0.69326,0.0622,0,0.47083],"107":[0,0.69444,0.01852,0,0.6037],"108":[0,0.69444,0.0088,0,0.34815],"109":[0,0.44444,0,0,1.0324],"110":[0,0.44444,0,0,0.71296],"111":[0,0.44444,0,0,0.58472],"112":[0.19444,0.44444,0,0,0.60092],"113":[0.19444,0.44444,0.03704,0,0.54213],"114":[0,0.44444,0.03194,0,0.5287],"115":[0,0.44444,0,0,0.53125],"116":[0,0.63492,0,0,0.41528],"117":[0,0.44444,0,0,0.68102],"118":[0,0.44444,0.03704,0,0.56666],"119":[0,0.44444,0.02778,0,0.83148],"120":[0,0.44444,0,0,0.65903],"121":[0.19444,0.44444,0.03704,0,0.59028],"122":[0,0.44444,0.04213,0,0.55509],"160":[0,0,0,0,0.25],"915":[0,0.68611,0.15972,0,0.65694],"916":[0,0.68611,0,0,0.95833],"920":[0,0.68611,0.03194,0,0.86722],"923":[0,0.68611,0,0,0.80555],"926":[0,0.68611,0.07458,0,0.84125],"928":[0,0.68611,0.08229,0,0.98229],"931":[0,0.68611,0.05451,0,0.88507],"933":[0,0.68611,0.15972,0,0.67083],"934":[0,0.68611,0,0,0.76666],"936":[0,0.68611,0.11653,0,0.71402],"937":[0,0.68611,0.04835,0,0.8789],"945":[0,0.44444,0,0,0.76064],"946":[0.19444,0.69444,0.03403,0,0.65972],"947":[0.19444,0.44444,0.06389,0,0.59003],"948":[0,0.69444,0.03819,0,0.52222],"949":[0,0.44444,0,0,0.52882],"950":[0.19444,0.69444,0.06215,0,0.50833],"951":[0.19444,0.44444,0.03704,0,0.6],"952":[0,0.69444,0.03194,0,0.5618],"953":[0,0.44444,0,0,0.41204],"954":[0,0.44444,0,0,0.66759],"955":[0,0.69444,0,0,0.67083],"956":[0.19444,0.44444,0,0,0.70787],"957":[0,0.44444,0.06898,0,0.57685],"958":[0.19444,0.69444,0.03021,0,0.50833],"959":[0,0.44444,0,0,0.58472],"960":[0,0.44444,0.03704,0,0.68241],"961":[0.19444,0.44444,0,0,0.6118],"962":[0.09722,0.44444,0.07917,0,0.42361],"963":[0,0.44444,0.03704,0,0.68588],"964":[0,0.44444,0.13472,0,0.52083],"965":[0,0.44444,0.03704,0,0.63055],"966":[0.19444,0.44444,0,0,0.74722],"967":[0.19444,0.44444,0,0,0.71805],"968":[0.19444,0.69444,0.03704,0,0.75833],"969":[0,0.44444,0.03704,0,0.71782],"977":[0,0.69444,0,0,0.69155],"981":[0.19444,0.69444,0,0,0.7125],"982":[0,0.44444,0.03194,0,0.975],"1009":[0.19444,0.44444,0,0,0.6118],"1013":[0,0.44444,0,0,0.48333],"57649":[0,0.44444,0,0,0.39352],"57911":[0.19444,0.44444,0,0,0.43889]},"Math-Italic":{"32":[0,0,0,0,0.25],"48":[0,0.43056,0,0,0.5],"49":[0,0.43056,0,0,0.5],"50":[0,0.43056,0,0,0.5],"51":[0.19444,0.43056,0,0,0.5],"52":[0.19444,0.43056,0,0,0.5],"53":[0.19444,0.43056,0,0,0.5],"54":[0,0.64444,0,0,0.5],"55":[0.19444,0.43056,0,0,0.5],"56":[0,0.64444,0,0,0.5],"57":[0.19444,0.43056,0,0,0.5],"65":[0,0.68333,0,0.13889,0.75],"66":[0,0.68333,0.05017,0.08334,0.75851],"67":[0,0.68333,0.07153,0.08334,0.71472],"68":[0,0.68333,0.02778,0.05556,0.82792],"69":[0,0.68333,0.05764,0.08334,0.7382],"70":[0,0.68333,0.13889,0.08334,0.64306],"71":[0,0.68333,0,0.08334,0.78625],"72":[0,0.68333,0.08125,0.05556,0.83125],"73":[0,0.68333,0.07847,0.11111,0.43958],"74":[0,0.68333,0.09618,0.16667,0.55451],"75":[0,0.68333,0.07153,0.05556,0.84931],"76":[0,0.68333,0,0.02778,0.68056],"77":[0,0.68333,0.10903,0.08334,0.97014],"78":[0,0.68333,0.10903,0.08334,0.80347],"79":[0,0.68333,0.02778,0.08334,0.76278],"80":[0,0.68333,0.13889,0.08334,0.64201],"81":[0.19444,0.68333,0,0.08334,0.79056],"82":[0,0.68333,0.00773,0.08334,0.75929],"83":[0,0.68333,0.05764,0.08334,0.6132],"84":[0,0.68333,0.13889,0.08334,0.58438],"85":[0,0.68333,0.10903,0.02778,0.68278],"86":[0,0.68333,0.22222,0,0.58333],"87":[0,0.68333,0.13889,0,0.94445],"88":[0,0.68333,0.07847,0.08334,0.82847],"89":[0,0.68333,0.22222,0,0.58056],"90":[0,0.68333,0.07153,0.08334,0.68264],"97":[0,0.43056,0,0,0.52859],"98":[0,0.69444,0,0,0.42917],"99":[0,0.43056,0,0.05556,0.43276],"100":[0,0.69444,0,0.16667,0.52049],"101":[0,0.43056,0,0.05556,0.46563],"102":[0.19444,0.69444,0.10764,0.16667,0.48959],"103":[0.19444,0.43056,0.03588,0.02778,0.47697],"104":[0,0.69444,0,0,0.57616],"105":[0,0.65952,0,0,0.34451],"106":[0.19444,0.65952,0.05724,0,0.41181],"107":[0,0.69444,0.03148,0,0.5206],"108":[0,0.69444,0.01968,0.08334,0.29838],"109":[0,0.43056,0,0,0.87801],"110":[0,0.43056,0,0,0.60023],"111":[0,0.43056,0,0.05556,0.48472],"112":[0.19444,0.43056,0,0.08334,0.50313],"113":[0.19444,0.43056,0.03588,0.08334,0.44641],"114":[0,0.43056,0.02778,0.05556,0.45116],"115":[0,0.43056,0,0.05556,0.46875],"116":[0,0.61508,0,0.08334,0.36111],"117":[0,0.43056,0,0.02778,0.57246],"118":[0,0.43056,0.03588,0.02778,0.48472],"119":[0,0.43056,0.02691,0.08334,0.71592],"120":[0,0.43056,0,0.02778,0.57153],"121":[0.19444,0.43056,0.03588,0.05556,0.49028],"122":[0,0.43056,0.04398,0.05556,0.46505],"160":[0,0,0,0,0.25],"915":[0,0.68333,0.13889,0.08334,0.61528],"916":[0,0.68333,0,0.16667,0.83334],"920":[0,0.68333,0.02778,0.08334,0.76278],"923":[0,0.68333,0,0.16667,0.69445],"926":[0,0.68333,0.07569,0.08334,0.74236],"928":[0,0.68333,0.08125,0.05556,0.83125],"931":[0,0.68333,0.05764,0.08334,0.77986],"933":[0,0.68333,0.13889,0.05556,0.58333],"934":[0,0.68333,0,0.08334,0.66667],"936":[0,0.68333,0.11,0.05556,0.61222],"937":[0,0.68333,0.05017,0.08334,0.7724],"945":[0,0.43056,0.0037,0.02778,0.6397],"946":[0.19444,0.69444,0.05278,0.08334,0.56563],"947":[0.19444,0.43056,0.05556,0,0.51773],"948":[0,0.69444,0.03785,0.05556,0.44444],"949":[0,0.43056,0,0.08334,0.46632],"950":[0.19444,0.69444,0.07378,0.08334,0.4375],"951":[0.19444,0.43056,0.03588,0.05556,0.49653],"952":[0,0.69444,0.02778,0.08334,0.46944],"953":[0,0.43056,0,0.05556,0.35394],"954":[0,0.43056,0,0,0.57616],"955":[0,0.69444,0,0,0.58334],"956":[0.19444,0.43056,0,0.02778,0.60255],"957":[0,0.43056,0.06366,0.02778,0.49398],"958":[0.19444,0.69444,0.04601,0.11111,0.4375],"959":[0,0.43056,0,0.05556,0.48472],"960":[0,0.43056,0.03588,0,0.57003],"961":[0.19444,0.43056,0,0.08334,0.51702],"962":[0.09722,0.43056,0.07986,0.08334,0.36285],"963":[0,0.43056,0.03588,0,0.57141],"964":[0,0.43056,0.1132,0.02778,0.43715],"965":[0,0.43056,0.03588,0.02778,0.54028],"966":[0.19444,0.43056,0,0.08334,0.65417],"967":[0.19444,0.43056,0,0.05556,0.62569],"968":[0.19444,0.69444,0.03588,0.11111,0.65139],"969":[0,0.43056,0.03588,0,0.62245],"977":[0,0.69444,0,0.08334,0.59144],"981":[0.19444,0.69444,0,0.08334,0.59583],"982":[0,0.43056,0.02778,0,0.82813],"1009":[0.19444,0.43056,0,0.08334,0.51702],"1013":[0,0.43056,0,0.05556,0.4059],"57649":[0,0.43056,0,0.02778,0.32246],"57911":[0.19444,0.43056,0,0.08334,0.38403]},"SansSerif-Bold":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.36667],"34":[0,0.69444,0,0,0.55834],"35":[0.19444,0.69444,0,0,0.91667],"36":[0.05556,0.75,0,0,0.55],"37":[0.05556,0.75,0,0,1.02912],"38":[0,0.69444,0,0,0.83056],"39":[0,0.69444,0,0,0.30556],"40":[0.25,0.75,0,0,0.42778],"41":[0.25,0.75,0,0,0.42778],"42":[0,0.75,0,0,0.55],"43":[0.11667,0.61667,0,0,0.85556],"44":[0.10556,0.13056,0,0,0.30556],"45":[0,0.45833,0,0,0.36667],"46":[0,0.13056,0,0,0.30556],"47":[0.25,0.75,0,0,0.55],"48":[0,0.69444,0,0,0.55],"49":[0,0.69444,0,0,0.55],"50":[0,0.69444,0,0,0.55],"51":[0,0.69444,0,0,0.55],"52":[0,0.69444,0,0,0.55],"53":[0,0.69444,0,0,0.55],"54":[0,0.69444,0,0,0.55],"55":[0,0.69444,0,0,0.55],"56":[0,0.69444,0,0,0.55],"57":[0,0.69444,0,0,0.55],"58":[0,0.45833,0,0,0.30556],"59":[0.10556,0.45833,0,0,0.30556],"61":[-0.09375,0.40625,0,0,0.85556],"63":[0,0.69444,0,0,0.51945],"64":[0,0.69444,0,0,0.73334],"65":[0,0.69444,0,0,0.73334],"66":[0,0.69444,0,0,0.73334],"67":[0,0.69444,0,0,0.70278],"68":[0,0.69444,0,0,0.79445],"69":[0,0.69444,0,0,0.64167],"70":[0,0.69444,0,0,0.61111],"71":[0,0.69444,0,0,0.73334],"72":[0,0.69444,0,0,0.79445],"73":[0,0.69444,0,0,0.33056],"74":[0,0.69444,0,0,0.51945],"75":[0,0.69444,0,0,0.76389],"76":[0,0.69444,0,0,0.58056],"77":[0,0.69444,0,0,0.97778],"78":[0,0.69444,0,0,0.79445],"79":[0,0.69444,0,0,0.79445],"80":[0,0.69444,0,0,0.70278],"81":[0.10556,0.69444,0,0,0.79445],"82":[0,0.69444,0,0,0.70278],"83":[0,0.69444,0,0,0.61111],"84":[0,0.69444,0,0,0.73334],"85":[0,0.69444,0,0,0.76389],"86":[0,0.69444,0.01528,0,0.73334],"87":[0,0.69444,0.01528,0,1.03889],"88":[0,0.69444,0,0,0.73334],"89":[0,0.69444,0.0275,0,0.73334],"90":[0,0.69444,0,0,0.67223],"91":[0.25,0.75,0,0,0.34306],"93":[0.25,0.75,0,0,0.34306],"94":[0,0.69444,0,0,0.55],"95":[0.35,0.10833,0.03056,0,0.55],"97":[0,0.45833,0,0,0.525],"98":[0,0.69444,0,0,0.56111],"99":[0,0.45833,0,0,0.48889],"100":[0,0.69444,0,0,0.56111],"101":[0,0.45833,0,0,0.51111],"102":[0,0.69444,0.07639,0,0.33611],"103":[0.19444,0.45833,0.01528,0,0.55],"104":[0,0.69444,0,0,0.56111],"105":[0,0.69444,0,0,0.25556],"106":[0.19444,0.69444,0,0,0.28611],"107":[0,0.69444,0,0,0.53056],"108":[0,0.69444,0,0,0.25556],"109":[0,0.45833,0,0,0.86667],"110":[0,0.45833,0,0,0.56111],"111":[0,0.45833,0,0,0.55],"112":[0.19444,0.45833,0,0,0.56111],"113":[0.19444,0.45833,0,0,0.56111],"114":[0,0.45833,0.01528,0,0.37222],"115":[0,0.45833,0,0,0.42167],"116":[0,0.58929,0,0,0.40417],"117":[0,0.45833,0,0,0.56111],"118":[0,0.45833,0.01528,0,0.5],"119":[0,0.45833,0.01528,0,0.74445],"120":[0,0.45833,0,0,0.5],"121":[0.19444,0.45833,0.01528,0,0.5],"122":[0,0.45833,0,0,0.47639],"126":[0.35,0.34444,0,0,0.55],"160":[0,0,0,0,0.25],"168":[0,0.69444,0,0,0.55],"176":[0,0.69444,0,0,0.73334],"180":[0,0.69444,0,0,0.55],"184":[0.17014,0,0,0,0.48889],"305":[0,0.45833,0,0,0.25556],"567":[0.19444,0.45833,0,0,0.28611],"710":[0,0.69444,0,0,0.55],"711":[0,0.63542,0,0,0.55],"713":[0,0.63778,0,0,0.55],"728":[0,0.69444,0,0,0.55],"729":[0,0.69444,0,0,0.30556],"730":[0,0.69444,0,0,0.73334],"732":[0,0.69444,0,0,0.55],"733":[0,0.69444,0,0,0.55],"915":[0,0.69444,0,0,0.58056],"916":[0,0.69444,0,0,0.91667],"920":[0,0.69444,0,0,0.85556],"923":[0,0.69444,0,0,0.67223],"926":[0,0.69444,0,0,0.73334],"928":[0,0.69444,0,0,0.79445],"931":[0,0.69444,0,0,0.79445],"933":[0,0.69444,0,0,0.85556],"934":[0,0.69444,0,0,0.79445],"936":[0,0.69444,0,0,0.85556],"937":[0,0.69444,0,0,0.79445],"8211":[0,0.45833,0.03056,0,0.55],"8212":[0,0.45833,0.03056,0,1.10001],"8216":[0,0.69444,0,0,0.30556],"8217":[0,0.69444,0,0,0.30556],"8220":[0,0.69444,0,0,0.55834],"8221":[0,0.69444,0,0,0.55834]},"SansSerif-Italic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.05733,0,0.31945],"34":[0,0.69444,0.00316,0,0.5],"35":[0.19444,0.69444,0.05087,0,0.83334],"36":[0.05556,0.75,0.11156,0,0.5],"37":[0.05556,0.75,0.03126,0,0.83334],"38":[0,0.69444,0.03058,0,0.75834],"39":[0,0.69444,0.07816,0,0.27778],"40":[0.25,0.75,0.13164,0,0.38889],"41":[0.25,0.75,0.02536,0,0.38889],"42":[0,0.75,0.11775,0,0.5],"43":[0.08333,0.58333,0.02536,0,0.77778],"44":[0.125,0.08333,0,0,0.27778],"45":[0,0.44444,0.01946,0,0.33333],"46":[0,0.08333,0,0,0.27778],"47":[0.25,0.75,0.13164,0,0.5],"48":[0,0.65556,0.11156,0,0.5],"49":[0,0.65556,0.11156,0,0.5],"50":[0,0.65556,0.11156,0,0.5],"51":[0,0.65556,0.11156,0,0.5],"52":[0,0.65556,0.11156,0,0.5],"53":[0,0.65556,0.11156,0,0.5],"54":[0,0.65556,0.11156,0,0.5],"55":[0,0.65556,0.11156,0,0.5],"56":[0,0.65556,0.11156,0,0.5],"57":[0,0.65556,0.11156,0,0.5],"58":[0,0.44444,0.02502,0,0.27778],"59":[0.125,0.44444,0.02502,0,0.27778],"61":[-0.13,0.37,0.05087,0,0.77778],"63":[0,0.69444,0.11809,0,0.47222],"64":[0,0.69444,0.07555,0,0.66667],"65":[0,0.69444,0,0,0.66667],"66":[0,0.69444,0.08293,0,0.66667],"67":[0,0.69444,0.11983,0,0.63889],"68":[0,0.69444,0.07555,0,0.72223],"69":[0,0.69444,0.11983,0,0.59722],"70":[0,0.69444,0.13372,0,0.56945],"71":[0,0.69444,0.11983,0,0.66667],"72":[0,0.69444,0.08094,0,0.70834],"73":[0,0.69444,0.13372,0,0.27778],"74":[0,0.69444,0.08094,0,0.47222],"75":[0,0.69444,0.11983,0,0.69445],"76":[0,0.69444,0,0,0.54167],"77":[0,0.69444,0.08094,0,0.875],"78":[0,0.69444,0.08094,0,0.70834],"79":[0,0.69444,0.07555,0,0.73611],"80":[0,0.69444,0.08293,0,0.63889],"81":[0.125,0.69444,0.07555,0,0.73611],"82":[0,0.69444,0.08293,0,0.64584],"83":[0,0.69444,0.09205,0,0.55556],"84":[0,0.69444,0.13372,0,0.68056],"85":[0,0.69444,0.08094,0,0.6875],"86":[0,0.69444,0.1615,0,0.66667],"87":[0,0.69444,0.1615,0,0.94445],"88":[0,0.69444,0.13372,0,0.66667],"89":[0,0.69444,0.17261,0,0.66667],"90":[0,0.69444,0.11983,0,0.61111],"91":[0.25,0.75,0.15942,0,0.28889],"93":[0.25,0.75,0.08719,0,0.28889],"94":[0,0.69444,0.0799,0,0.5],"95":[0.35,0.09444,0.08616,0,0.5],"97":[0,0.44444,0.00981,0,0.48056],"98":[0,0.69444,0.03057,0,0.51667],"99":[0,0.44444,0.08336,0,0.44445],"100":[0,0.69444,0.09483,0,0.51667],"101":[0,0.44444,0.06778,0,0.44445],"102":[0,0.69444,0.21705,0,0.30556],"103":[0.19444,0.44444,0.10836,0,0.5],"104":[0,0.69444,0.01778,0,0.51667],"105":[0,0.67937,0.09718,0,0.23889],"106":[0.19444,0.67937,0.09162,0,0.26667],"107":[0,0.69444,0.08336,0,0.48889],"108":[0,0.69444,0.09483,0,0.23889],"109":[0,0.44444,0.01778,0,0.79445],"110":[0,0.44444,0.01778,0,0.51667],"111":[0,0.44444,0.06613,0,0.5],"112":[0.19444,0.44444,0.0389,0,0.51667],"113":[0.19444,0.44444,0.04169,0,0.51667],"114":[0,0.44444,0.10836,0,0.34167],"115":[0,0.44444,0.0778,0,0.38333],"116":[0,0.57143,0.07225,0,0.36111],"117":[0,0.44444,0.04169,0,0.51667],"118":[0,0.44444,0.10836,0,0.46111],"119":[0,0.44444,0.10836,0,0.68334],"120":[0,0.44444,0.09169,0,0.46111],"121":[0.19444,0.44444,0.10836,0,0.46111],"122":[0,0.44444,0.08752,0,0.43472],"126":[0.35,0.32659,0.08826,0,0.5],"160":[0,0,0,0,0.25],"168":[0,0.67937,0.06385,0,0.5],"176":[0,0.69444,0,0,0.73752],"184":[0.17014,0,0,0,0.44445],"305":[0,0.44444,0.04169,0,0.23889],"567":[0.19444,0.44444,0.04169,0,0.26667],"710":[0,0.69444,0.0799,0,0.5],"711":[0,0.63194,0.08432,0,0.5],"713":[0,0.60889,0.08776,0,0.5],"714":[0,0.69444,0.09205,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0.09483,0,0.5],"729":[0,0.67937,0.07774,0,0.27778],"730":[0,0.69444,0,0,0.73752],"732":[0,0.67659,0.08826,0,0.5],"733":[0,0.69444,0.09205,0,0.5],"915":[0,0.69444,0.13372,0,0.54167],"916":[0,0.69444,0,0,0.83334],"920":[0,0.69444,0.07555,0,0.77778],"923":[0,0.69444,0,0,0.61111],"926":[0,0.69444,0.12816,0,0.66667],"928":[0,0.69444,0.08094,0,0.70834],"931":[0,0.69444,0.11983,0,0.72222],"933":[0,0.69444,0.09031,0,0.77778],"934":[0,0.69444,0.04603,0,0.72222],"936":[0,0.69444,0.09031,0,0.77778],"937":[0,0.69444,0.08293,0,0.72222],"8211":[0,0.44444,0.08616,0,0.5],"8212":[0,0.44444,0.08616,0,1],"8216":[0,0.69444,0.07816,0,0.27778],"8217":[0,0.69444,0.07816,0,0.27778],"8220":[0,0.69444,0.14205,0,0.5],"8221":[0,0.69444,0.00316,0,0.5]},"SansSerif-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.31945],"34":[0,0.69444,0,0,0.5],"35":[0.19444,0.69444,0,0,0.83334],"36":[0.05556,0.75,0,0,0.5],"37":[0.05556,0.75,0,0,0.83334],"38":[0,0.69444,0,0,0.75834],"39":[0,0.69444,0,0,0.27778],"40":[0.25,0.75,0,0,0.38889],"41":[0.25,0.75,0,0,0.38889],"42":[0,0.75,0,0,0.5],"43":[0.08333,0.58333,0,0,0.77778],"44":[0.125,0.08333,0,0,0.27778],"45":[0,0.44444,0,0,0.33333],"46":[0,0.08333,0,0,0.27778],"47":[0.25,0.75,0,0,0.5],"48":[0,0.65556,0,0,0.5],"49":[0,0.65556,0,0,0.5],"50":[0,0.65556,0,0,0.5],"51":[0,0.65556,0,0,0.5],"52":[0,0.65556,0,0,0.5],"53":[0,0.65556,0,0,0.5],"54":[0,0.65556,0,0,0.5],"55":[0,0.65556,0,0,0.5],"56":[0,0.65556,0,0,0.5],"57":[0,0.65556,0,0,0.5],"58":[0,0.44444,0,0,0.27778],"59":[0.125,0.44444,0,0,0.27778],"61":[-0.13,0.37,0,0,0.77778],"63":[0,0.69444,0,0,0.47222],"64":[0,0.69444,0,0,0.66667],"65":[0,0.69444,0,0,0.66667],"66":[0,0.69444,0,0,0.66667],"67":[0,0.69444,0,0,0.63889],"68":[0,0.69444,0,0,0.72223],"69":[0,0.69444,0,0,0.59722],"70":[0,0.69444,0,0,0.56945],"71":[0,0.69444,0,0,0.66667],"72":[0,0.69444,0,0,0.70834],"73":[0,0.69444,0,0,0.27778],"74":[0,0.69444,0,0,0.47222],"75":[0,0.69444,0,0,0.69445],"76":[0,0.69444,0,0,0.54167],"77":[0,0.69444,0,0,0.875],"78":[0,0.69444,0,0,0.70834],"79":[0,0.69444,0,0,0.73611],"80":[0,0.69444,0,0,0.63889],"81":[0.125,0.69444,0,0,0.73611],"82":[0,0.69444,0,0,0.64584],"83":[0,0.69444,0,0,0.55556],"84":[0,0.69444,0,0,0.68056],"85":[0,0.69444,0,0,0.6875],"86":[0,0.69444,0.01389,0,0.66667],"87":[0,0.69444,0.01389,0,0.94445],"88":[0,0.69444,0,0,0.66667],"89":[0,0.69444,0.025,0,0.66667],"90":[0,0.69444,0,0,0.61111],"91":[0.25,0.75,0,0,0.28889],"93":[0.25,0.75,0,0,0.28889],"94":[0,0.69444,0,0,0.5],"95":[0.35,0.09444,0.02778,0,0.5],"97":[0,0.44444,0,0,0.48056],"98":[0,0.69444,0,0,0.51667],"99":[0,0.44444,0,0,0.44445],"100":[0,0.69444,0,0,0.51667],"101":[0,0.44444,0,0,0.44445],"102":[0,0.69444,0.06944,0,0.30556],"103":[0.19444,0.44444,0.01389,0,0.5],"104":[0,0.69444,0,0,0.51667],"105":[0,0.67937,0,0,0.23889],"106":[0.19444,0.67937,0,0,0.26667],"107":[0,0.69444,0,0,0.48889],"108":[0,0.69444,0,0,0.23889],"109":[0,0.44444,0,0,0.79445],"110":[0,0.44444,0,0,0.51667],"111":[0,0.44444,0,0,0.5],"112":[0.19444,0.44444,0,0,0.51667],"113":[0.19444,0.44444,0,0,0.51667],"114":[0,0.44444,0.01389,0,0.34167],"115":[0,0.44444,0,0,0.38333],"116":[0,0.57143,0,0,0.36111],"117":[0,0.44444,0,0,0.51667],"118":[0,0.44444,0.01389,0,0.46111],"119":[0,0.44444,0.01389,0,0.68334],"120":[0,0.44444,0,0,0.46111],"121":[0.19444,0.44444,0.01389,0,0.46111],"122":[0,0.44444,0,0,0.43472],"126":[0.35,0.32659,0,0,0.5],"160":[0,0,0,0,0.25],"168":[0,0.67937,0,0,0.5],"176":[0,0.69444,0,0,0.66667],"184":[0.17014,0,0,0,0.44445],"305":[0,0.44444,0,0,0.23889],"567":[0.19444,0.44444,0,0,0.26667],"710":[0,0.69444,0,0,0.5],"711":[0,0.63194,0,0,0.5],"713":[0,0.60889,0,0,0.5],"714":[0,0.69444,0,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0,0,0.5],"729":[0,0.67937,0,0,0.27778],"730":[0,0.69444,0,0,0.66667],"732":[0,0.67659,0,0,0.5],"733":[0,0.69444,0,0,0.5],"915":[0,0.69444,0,0,0.54167],"916":[0,0.69444,0,0,0.83334],"920":[0,0.69444,0,0,0.77778],"923":[0,0.69444,0,0,0.61111],"926":[0,0.69444,0,0,0.66667],"928":[0,0.69444,0,0,0.70834],"931":[0,0.69444,0,0,0.72222],"933":[0,0.69444,0,0,0.77778],"934":[0,0.69444,0,0,0.72222],"936":[0,0.69444,0,0,0.77778],"937":[0,0.69444,0,0,0.72222],"8211":[0,0.44444,0.02778,0,0.5],"8212":[0,0.44444,0.02778,0,1],"8216":[0,0.69444,0,0,0.27778],"8217":[0,0.69444,0,0,0.27778],"8220":[0,0.69444,0,0,0.5],"8221":[0,0.69444,0,0,0.5]},"Script-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.7,0.22925,0,0.80253],"66":[0,0.7,0.04087,0,0.90757],"67":[0,0.7,0.1689,0,0.66619],"68":[0,0.7,0.09371,0,0.77443],"69":[0,0.7,0.18583,0,0.56162],"70":[0,0.7,0.13634,0,0.89544],"71":[0,0.7,0.17322,0,0.60961],"72":[0,0.7,0.29694,0,0.96919],"73":[0,0.7,0.19189,0,0.80907],"74":[0.27778,0.7,0.19189,0,1.05159],"75":[0,0.7,0.31259,0,0.91364],"76":[0,0.7,0.19189,0,0.87373],"77":[0,0.7,0.15981,0,1.08031],"78":[0,0.7,0.3525,0,0.9015],"79":[0,0.7,0.08078,0,0.73787],"80":[0,0.7,0.08078,0,1.01262],"81":[0,0.7,0.03305,0,0.88282],"82":[0,0.7,0.06259,0,0.85],"83":[0,0.7,0.19189,0,0.86767],"84":[0,0.7,0.29087,0,0.74697],"85":[0,0.7,0.25815,0,0.79996],"86":[0,0.7,0.27523,0,0.62204],"87":[0,0.7,0.27523,0,0.80532],"88":[0,0.7,0.26006,0,0.94445],"89":[0,0.7,0.2939,0,0.70961],"90":[0,0.7,0.24037,0,0.8212],"160":[0,0,0,0,0.25]},"Size1-Regular":{"32":[0,0,0,0,0.25],"40":[0.35001,0.85,0,0,0.45834],"41":[0.35001,0.85,0,0,0.45834],"47":[0.35001,0.85,0,0,0.57778],"91":[0.35001,0.85,0,0,0.41667],"92":[0.35001,0.85,0,0,0.57778],"93":[0.35001,0.85,0,0,0.41667],"123":[0.35001,0.85,0,0,0.58334],"125":[0.35001,0.85,0,0,0.58334],"160":[0,0,0,0,0.25],"710":[0,0.72222,0,0,0.55556],"732":[0,0.72222,0,0,0.55556],"770":[0,0.72222,0,0,0.55556],"771":[0,0.72222,0,0,0.55556],"8214":[-0.00099,0.601,0,0,0.77778],"8593":[0.00001,0.6,0,0,0.66667],"8595":[0.00001,0.6,0,0,0.66667],"8657":[0.00001,0.6,0,0,0.77778],"8659":[0.00001,0.6,0,0,0.77778],"8719":[0.25001,0.75,0,0,0.94445],"8720":[0.25001,0.75,0,0,0.94445],"8721":[0.25001,0.75,0,0,1.05556],"8730":[0.35001,0.85,0,0,1],"8739":[-0.00599,0.606,0,0,0.33333],"8741":[-0.00599,0.606,0,0,0.55556],"8747":[0.30612,0.805,0.19445,0,0.47222],"8748":[0.306,0.805,0.19445,0,0.47222],"8749":[0.306,0.805,0.19445,0,0.47222],"8750":[0.30612,0.805,0.19445,0,0.47222],"8896":[0.25001,0.75,0,0,0.83334],"8897":[0.25001,0.75,0,0,0.83334],"8898":[0.25001,0.75,0,0,0.83334],"8899":[0.25001,0.75,0,0,0.83334],"8968":[0.35001,0.85,0,0,0.47222],"8969":[0.35001,0.85,0,0,0.47222],"8970":[0.35001,0.85,0,0,0.47222],"8971":[0.35001,0.85,0,0,0.47222],"9168":[-0.00099,0.601,0,0,0.66667],"10216":[0.35001,0.85,0,0,0.47222],"10217":[0.35001,0.85,0,0,0.47222],"10752":[0.25001,0.75,0,0,1.11111],"10753":[0.25001,0.75,0,0,1.11111],"10754":[0.25001,0.75,0,0,1.11111],"10756":[0.25001,0.75,0,0,0.83334],"10758":[0.25001,0.75,0,0,0.83334]},"Size2-Regular":{"32":[0,0,0,0,0.25],"40":[0.65002,1.15,0,0,0.59722],"41":[0.65002,1.15,0,0,0.59722],"47":[0.65002,1.15,0,0,0.81111],"91":[0.65002,1.15,0,0,0.47222],"92":[0.65002,1.15,0,0,0.81111],"93":[0.65002,1.15,0,0,0.47222],"123":[0.65002,1.15,0,0,0.66667],"125":[0.65002,1.15,0,0,0.66667],"160":[0,0,0,0,0.25],"710":[0,0.75,0,0,1],"732":[0,0.75,0,0,1],"770":[0,0.75,0,0,1],"771":[0,0.75,0,0,1],"8719":[0.55001,1.05,0,0,1.27778],"8720":[0.55001,1.05,0,0,1.27778],"8721":[0.55001,1.05,0,0,1.44445],"8730":[0.65002,1.15,0,0,1],"8747":[0.86225,1.36,0.44445,0,0.55556],"8748":[0.862,1.36,0.44445,0,0.55556],"8749":[0.862,1.36,0.44445,0,0.55556],"8750":[0.86225,1.36,0.44445,0,0.55556],"8896":[0.55001,1.05,0,0,1.11111],"8897":[0.55001,1.05,0,0,1.11111],"8898":[0.55001,1.05,0,0,1.11111],"8899":[0.55001,1.05,0,0,1.11111],"8968":[0.65002,1.15,0,0,0.52778],"8969":[0.65002,1.15,0,0,0.52778],"8970":[0.65002,1.15,0,0,0.52778],"8971":[0.65002,1.15,0,0,0.52778],"10216":[0.65002,1.15,0,0,0.61111],"10217":[0.65002,1.15,0,0,0.61111],"10752":[0.55001,1.05,0,0,1.51112],"10753":[0.55001,1.05,0,0,1.51112],"10754":[0.55001,1.05,0,0,1.51112],"10756":[0.55001,1.05,0,0,1.11111],"10758":[0.55001,1.05,0,0,1.11111]},"Size3-Regular":{"32":[0,0,0,0,0.25],"40":[0.95003,1.45,0,0,0.73611],"41":[0.95003,1.45,0,0,0.73611],"47":[0.95003,1.45,0,0,1.04445],"91":[0.95003,1.45,0,0,0.52778],"92":[0.95003,1.45,0,0,1.04445],"93":[0.95003,1.45,0,0,0.52778],"123":[0.95003,1.45,0,0,0.75],"125":[0.95003,1.45,0,0,0.75],"160":[0,0,0,0,0.25],"710":[0,0.75,0,0,1.44445],"732":[0,0.75,0,0,1.44445],"770":[0,0.75,0,0,1.44445],"771":[0,0.75,0,0,1.44445],"8730":[0.95003,1.45,0,0,1],"8968":[0.95003,1.45,0,0,0.58334],"8969":[0.95003,1.45,0,0,0.58334],"8970":[0.95003,1.45,0,0,0.58334],"8971":[0.95003,1.45,0,0,0.58334],"10216":[0.95003,1.45,0,0,0.75],"10217":[0.95003,1.45,0,0,0.75]},"Size4-Regular":{"32":[0,0,0,0,0.25],"40":[1.25003,1.75,0,0,0.79167],"41":[1.25003,1.75,0,0,0.79167],"47":[1.25003,1.75,0,0,1.27778],"91":[1.25003,1.75,0,0,0.58334],"92":[1.25003,1.75,0,0,1.27778],"93":[1.25003,1.75,0,0,0.58334],"123":[1.25003,1.75,0,0,0.80556],"125":[1.25003,1.75,0,0,0.80556],"160":[0,0,0,0,0.25],"710":[0,0.825,0,0,1.8889],"732":[0,0.825,0,0,1.8889],"770":[0,0.825,0,0,1.8889],"771":[0,0.825,0,0,1.8889],"8730":[1.25003,1.75,0,0,1],"8968":[1.25003,1.75,0,0,0.63889],"8969":[1.25003,1.75,0,0,0.63889],"8970":[1.25003,1.75,0,0,0.63889],"8971":[1.25003,1.75,0,0,0.63889],"9115":[0.64502,1.155,0,0,0.875],"9116":[0.00001,0.6,0,0,0.875],"9117":[0.64502,1.155,0,0,0.875],"9118":[0.64502,1.155,0,0,0.875],"9119":[0.00001,0.6,0,0,0.875],"9120":[0.64502,1.155,0,0,0.875],"9121":[0.64502,1.155,0,0,0.66667],"9122":[-0.00099,0.601,0,0,0.66667],"9123":[0.64502,1.155,0,0,0.66667],"9124":[0.64502,1.155,0,0,0.66667],"9125":[-0.00099,0.601,0,0,0.66667],"9126":[0.64502,1.155,0,0,0.66667],"9127":[0.00001,0.9,0,0,0.88889],"9128":[0.65002,1.15,0,0,0.88889],"9129":[0.90001,0,0,0,0.88889],"9130":[0,0.3,0,0,0.88889],"9131":[0.00001,0.9,0,0,0.88889],"9132":[0.65002,1.15,0,0,0.88889],"9133":[0.90001,0,0,0,0.88889],"9143":[0.88502,0.915,0,0,1.05556],"10216":[1.25003,1.75,0,0,0.80556],"10217":[1.25003,1.75,0,0,0.80556],"57344":[-0.00499,0.605,0,0,1.05556],"57345":[-0.00499,0.605,0,0,1.05556],"57680":[0,0.12,0,0,0.45],"57681":[0,0.12,0,0,0.45],"57682":[0,0.12,0,0,0.45],"57683":[0,0.12,0,0,0.45]},"Typewriter-Regular":{"32":[0,0,0,0,0.525],"33":[0,0.61111,0,0,0.525],"34":[0,0.61111,0,0,0.525],"35":[0,0.61111,0,0,0.525],"36":[0.08333,0.69444,0,0,0.525],"37":[0.08333,0.69444,0,0,0.525],"38":[0,0.61111,0,0,0.525],"39":[0,0.61111,0,0,0.525],"40":[0.08333,0.69444,0,0,0.525],"41":[0.08333,0.69444,0,0,0.525],"42":[0,0.52083,0,0,0.525],"43":[-0.08056,0.53055,0,0,0.525],"44":[0.13889,0.125,0,0,0.525],"45":[-0.08056,0.53055,0,0,0.525],"46":[0,0.125,0,0,0.525],"47":[0.08333,0.69444,0,0,0.525],"48":[0,0.61111,0,0,0.525],"49":[0,0.61111,0,0,0.525],"50":[0,0.61111,0,0,0.525],"51":[0,0.61111,0,0,0.525],"52":[0,0.61111,0,0,0.525],"53":[0,0.61111,0,0,0.525],"54":[0,0.61111,0,0,0.525],"55":[0,0.61111,0,0,0.525],"56":[0,0.61111,0,0,0.525],"57":[0,0.61111,0,0,0.525],"58":[0,0.43056,0,0,0.525],"59":[0.13889,0.43056,0,0,0.525],"60":[-0.05556,0.55556,0,0,0.525],"61":[-0.19549,0.41562,0,0,0.525],"62":[-0.05556,0.55556,0,0,0.525],"63":[0,0.61111,0,0,0.525],"64":[0,0.61111,0,0,0.525],"65":[0,0.61111,0,0,0.525],"66":[0,0.61111,0,0,0.525],"67":[0,0.61111,0,0,0.525],"68":[0,0.61111,0,0,0.525],"69":[0,0.61111,0,0,0.525],"70":[0,0.61111,0,0,0.525],"71":[0,0.61111,0,0,0.525],"72":[0,0.61111,0,0,0.525],"73":[0,0.61111,0,0,0.525],"74":[0,0.61111,0,0,0.525],"75":[0,0.61111,0,0,0.525],"76":[0,0.61111,0,0,0.525],"77":[0,0.61111,0,0,0.525],"78":[0,0.61111,0,0,0.525],"79":[0,0.61111,0,0,0.525],"80":[0,0.61111,0,0,0.525],"81":[0.13889,0.61111,0,0,0.525],"82":[0,0.61111,0,0,0.525],"83":[0,0.61111,0,0,0.525],"84":[0,0.61111,0,0,0.525],"85":[0,0.61111,0,0,0.525],"86":[0,0.61111,0,0,0.525],"87":[0,0.61111,0,0,0.525],"88":[0,0.61111,0,0,0.525],"89":[0,0.61111,0,0,0.525],"90":[0,0.61111,0,0,0.525],"91":[0.08333,0.69444,0,0,0.525],"92":[0.08333,0.69444,0,0,0.525],"93":[0.08333,0.69444,0,0,0.525],"94":[0,0.61111,0,0,0.525],"95":[0.09514,0,0,0,0.525],"96":[0,0.61111,0,0,0.525],"97":[0,0.43056,0,0,0.525],"98":[0,0.61111,0,0,0.525],"99":[0,0.43056,0,0,0.525],"100":[0,0.61111,0,0,0.525],"101":[0,0.43056,0,0,0.525],"102":[0,0.61111,0,0,0.525],"103":[0.22222,0.43056,0,0,0.525],"104":[0,0.61111,0,0,0.525],"105":[0,0.61111,0,0,0.525],"106":[0.22222,0.61111,0,0,0.525],"107":[0,0.61111,0,0,0.525],"108":[0,0.61111,0,0,0.525],"109":[0,0.43056,0,0,0.525],"110":[0,0.43056,0,0,0.525],"111":[0,0.43056,0,0,0.525],"112":[0.22222,0.43056,0,0,0.525],"113":[0.22222,0.43056,0,0,0.525],"114":[0,0.43056,0,0,0.525],"115":[0,0.43056,0,0,0.525],"116":[0,0.55358,0,0,0.525],"117":[0,0.43056,0,0,0.525],"118":[0,0.43056,0,0,0.525],"119":[0,0.43056,0,0,0.525],"120":[0,0.43056,0,0,0.525],"121":[0.22222,0.43056,0,0,0.525],"122":[0,0.43056,0,0,0.525],"123":[0.08333,0.69444,0,0,0.525],"124":[0.08333,0.69444,0,0,0.525],"125":[0.08333,0.69444,0,0,0.525],"126":[0,0.61111,0,0,0.525],"127":[0,0.61111,0,0,0.525],"160":[0,0,0,0,0.525],"176":[0,0.61111,0,0,0.525],"184":[0.19445,0,0,0,0.525],"305":[0,0.43056,0,0,0.525],"567":[0.22222,0.43056,0,0,0.525],"711":[0,0.56597,0,0,0.525],"713":[0,0.56555,0,0,0.525],"714":[0,0.61111,0,0,0.525],"715":[0,0.61111,0,0,0.525],"728":[0,0.61111,0,0,0.525],"730":[0,0.61111,0,0,0.525],"770":[0,0.61111,0,0,0.525],"771":[0,0.61111,0,0,0.525],"776":[0,0.61111,0,0,0.525],"915":[0,0.61111,0,0,0.525],"916":[0,0.61111,0,0,0.525],"920":[0,0.61111,0,0,0.525],"923":[0,0.61111,0,0,0.525],"926":[0,0.61111,0,0,0.525],"928":[0,0.61111,0,0,0.525],"931":[0,0.61111,0,0,0.525],"933":[0,0.61111,0,0,0.525],"934":[0,0.61111,0,0,0.525],"936":[0,0.61111,0,0,0.525],"937":[0,0.61111,0,0,0.525],"8216":[0,0.61111,0,0,0.525],"8217":[0,0.61111,0,0,0.525],"8242":[0,0.61111,0,0,0.525],"9251":[0.11111,0.21944,0,0,0.525]}};var Ga={slant:[0.25,0.25,0.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[0.431,0.431,0.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[0.677,0.732,0.925],num2:[0.394,0.384,0.387],num3:[0.444,0.471,0.504],denom1:[0.686,0.752,1.025],denom2:[0.345,0.344,0.532],sup1:[0.413,0.503,0.504],sup2:[0.363,0.431,0.404],sup3:[0.289,0.286,0.294],sub1:[0.15,0.143,0.2],sub2:[0.247,0.286,0.4],supDrop:[0.386,0.353,0.494],subDrop:[0.05,0.071,0.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[0.25,0.25,0.25],defaultRuleThickness:[0.04,0.049,0.049],bigOpSpacing1:[0.111,0.111,0.111],bigOpSpacing2:[0.166,0.166,0.166],bigOpSpacing3:[0.2,0.2,0.2],bigOpSpacing4:[0.6,0.611,0.611],bigOpSpacing5:[0.1,0.143,0.143],sqrtRuleThickness:[0.04,0.04,0.04],ptPerEm:[10,10,10],doubleRuleSep:[0.2,0.2,0.2],arrayRuleWidth:[0.04,0.04,0.04],fboxsep:[0.3,0.3,0.3],fboxrule:[0.04,0.04,0.04]},Du={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function p2(e,t){gn[e]=t}function Al(e,t,n){if(!gn[t])throw Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),s=gn[t][r];if(!s&&e[0]in Du)r=Du[e[0]].charCodeAt(0),s=gn[t][r];if(!s&&n==="text"){if(hd(r))s=gn[t][77]}if(s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Ka={};function g2(e){var t;if(e>=5)t=0;else if(e>=3)t=1;else t=2;if(!Ka[t]){var n=Ka[t]={cssEmPerMu:Ga.quad[t]/18};for(var r of Object.keys(Ga))n[r]=Ga[r][t]}return Ka[t]}var Qe={math:{},text:{}};function f(e,t,n,r,s,i){if(Qe[e][s]={font:t,group:n,replace:r},i&&r)Qe[e][r]=Qe[e][s]}var m="math",J="text",v="main",S="ams",et="accent-token",pe="bin",It="close",gs="inner",_e="mathord",dt="op-token",Vt="open",fi="punct",M="rel",Pn="spacing",I="textord";f(m,v,M,"≡","\\equiv",!0);f(m,v,M,"≺","\\prec",!0);f(m,v,M,"≻","\\succ",!0);f(m,v,M,"∼","\\sim",!0);f(m,v,M,"⊥","\\perp");f(m,v,M,"⪯","\\preceq",!0);f(m,v,M,"⪰","\\succeq",!0);f(m,v,M,"≃","\\simeq",!0);f(m,v,M,"∣","\\mid",!0);f(m,v,M,"≪","\\ll",!0);f(m,v,M,"≫","\\gg",!0);f(m,v,M,"≍","\\asymp",!0);f(m,v,M,"∥","\\parallel");f(m,v,M,"⋈","\\bowtie",!0);f(m,v,M,"⌣","\\smile",!0);f(m,v,M,"⊑","\\sqsubseteq",!0);f(m,v,M,"⊒","\\sqsupseteq",!0);f(m,v,M,"≐","\\doteq",!0);f(m,v,M,"⌢","\\frown",!0);f(m,v,M,"∋","\\ni",!0);f(m,v,M,"∝","\\propto",!0);f(m,v,M,"⊢","\\vdash",!0);f(m,v,M,"⊣","\\dashv",!0);f(m,v,M,"∋","\\owns");f(m,v,fi,".","\\ldotp");f(m,v,fi,"⋅","\\cdotp");f(m,v,fi,"⋅","·");f(J,v,I,"⋅","·");f(m,v,I,"#","\\#");f(J,v,I,"#","\\#");f(m,v,I,"&","\\&");f(J,v,I,"&","\\&");f(m,v,I,"ℵ","\\aleph",!0);f(m,v,I,"∀","\\forall",!0);f(m,v,I,"ℏ","\\hbar",!0);f(m,v,I,"∃","\\exists",!0);f(m,v,I,"∇","\\nabla",!0);f(m,v,I,"♭","\\flat",!0);f(m,v,I,"ℓ","\\ell",!0);f(m,v,I,"♮","\\natural",!0);f(m,v,I,"♣","\\clubsuit",!0);f(m,v,I,"℘","\\wp",!0);f(m,v,I,"♯","\\sharp",!0);f(m,v,I,"♢","\\diamondsuit",!0);f(m,v,I,"ℜ","\\Re",!0);f(m,v,I,"♡","\\heartsuit",!0);f(m,v,I,"ℑ","\\Im",!0);f(m,v,I,"♠","\\spadesuit",!0);f(m,v,I,"§","\\S",!0);f(J,v,I,"§","\\S");f(m,v,I,"¶","\\P",!0);f(J,v,I,"¶","\\P");f(m,v,I,"†","\\dag");f(J,v,I,"†","\\dag");f(J,v,I,"†","\\textdagger");f(m,v,I,"‡","\\ddag");f(J,v,I,"‡","\\ddag");f(J,v,I,"‡","\\textdaggerdbl");f(m,v,It,"⎱","\\rmoustache",!0);f(m,v,Vt,"⎰","\\lmoustache",!0);f(m,v,It,"⟯","\\rgroup",!0);f(m,v,Vt,"⟮","\\lgroup",!0);f(m,v,pe,"∓","\\mp",!0);f(m,v,pe,"⊖","\\ominus",!0);f(m,v,pe,"⊎","\\uplus",!0);f(m,v,pe,"⊓","\\sqcap",!0);f(m,v,pe,"∗","\\ast");f(m,v,pe,"⊔","\\sqcup",!0);f(m,v,pe,"◯","\\bigcirc",!0);f(m,v,pe,"∙","\\bullet",!0);f(m,v,pe,"‡","\\ddagger");f(m,v,pe,"≀","\\wr",!0);f(m,v,pe,"⨿","\\amalg");f(m,v,pe,"&","\\And");f(m,v,M,"⟵","\\longleftarrow",!0);f(m,v,M,"⇐","\\Leftarrow",!0);f(m,v,M,"⟸","\\Longleftarrow",!0);f(m,v,M,"⟶","\\longrightarrow",!0);f(m,v,M,"⇒","\\Rightarrow",!0);f(m,v,M,"⟹","\\Longrightarrow",!0);f(m,v,M,"↔","\\leftrightarrow",!0);f(m,v,M,"⟷","\\longleftrightarrow",!0);f(m,v,M,"⇔","\\Leftrightarrow",!0);f(m,v,M,"⟺","\\Longleftrightarrow",!0);f(m,v,M,"↦","\\mapsto",!0);f(m,v,M,"⟼","\\longmapsto",!0);f(m,v,M,"↗","\\nearrow",!0);f(m,v,M,"↩","\\hookleftarrow",!0);f(m,v,M,"↪","\\hookrightarrow",!0);f(m,v,M,"↘","\\searrow",!0);f(m,v,M,"↼","\\leftharpoonup",!0);f(m,v,M,"⇀","\\rightharpoonup",!0);f(m,v,M,"↙","\\swarrow",!0);f(m,v,M,"↽","\\leftharpoondown",!0);f(m,v,M,"⇁","\\rightharpoondown",!0);f(m,v,M,"↖","\\nwarrow",!0);f(m,v,M,"⇌","\\rightleftharpoons",!0);f(m,S,M,"≮","\\nless",!0);f(m,S,M,"","\\@nleqslant");f(m,S,M,"","\\@nleqq");f(m,S,M,"⪇","\\lneq",!0);f(m,S,M,"≨","\\lneqq",!0);f(m,S,M,"","\\@lvertneqq");f(m,S,M,"⋦","\\lnsim",!0);f(m,S,M,"⪉","\\lnapprox",!0);f(m,S,M,"⊀","\\nprec",!0);f(m,S,M,"⋠","\\npreceq",!0);f(m,S,M,"⋨","\\precnsim",!0);f(m,S,M,"⪹","\\precnapprox",!0);f(m,S,M,"≁","\\nsim",!0);f(m,S,M,"","\\@nshortmid");f(m,S,M,"∤","\\nmid",!0);f(m,S,M,"⊬","\\nvdash",!0);f(m,S,M,"⊭","\\nvDash",!0);f(m,S,M,"⋪","\\ntriangleleft");f(m,S,M,"⋬","\\ntrianglelefteq",!0);f(m,S,M,"⊊","\\subsetneq",!0);f(m,S,M,"","\\@varsubsetneq");f(m,S,M,"⫋","\\subsetneqq",!0);f(m,S,M,"","\\@varsubsetneqq");f(m,S,M,"≯","\\ngtr",!0);f(m,S,M,"","\\@ngeqslant");f(m,S,M,"","\\@ngeqq");f(m,S,M,"⪈","\\gneq",!0);f(m,S,M,"≩","\\gneqq",!0);f(m,S,M,"","\\@gvertneqq");f(m,S,M,"⋧","\\gnsim",!0);f(m,S,M,"⪊","\\gnapprox",!0);f(m,S,M,"⊁","\\nsucc",!0);f(m,S,M,"⋡","\\nsucceq",!0);f(m,S,M,"⋩","\\succnsim",!0);f(m,S,M,"⪺","\\succnapprox",!0);f(m,S,M,"≆","\\ncong",!0);f(m,S,M,"","\\@nshortparallel");f(m,S,M,"∦","\\nparallel",!0);f(m,S,M,"⊯","\\nVDash",!0);f(m,S,M,"⋫","\\ntriangleright");f(m,S,M,"⋭","\\ntrianglerighteq",!0);f(m,S,M,"","\\@nsupseteqq");f(m,S,M,"⊋","\\supsetneq",!0);f(m,S,M,"","\\@varsupsetneq");f(m,S,M,"⫌","\\supsetneqq",!0);f(m,S,M,"","\\@varsupsetneqq");f(m,S,M,"⊮","\\nVdash",!0);f(m,S,M,"⪵","\\precneqq",!0);f(m,S,M,"⪶","\\succneqq",!0);f(m,S,M,"","\\@nsubseteqq");f(m,S,pe,"⊴","\\unlhd");f(m,S,pe,"⊵","\\unrhd");f(m,S,M,"↚","\\nleftarrow",!0);f(m,S,M,"↛","\\nrightarrow",!0);f(m,S,M,"⇍","\\nLeftarrow",!0);f(m,S,M,"⇏","\\nRightarrow",!0);f(m,S,M,"↮","\\nleftrightarrow",!0);f(m,S,M,"⇎","\\nLeftrightarrow",!0);f(m,S,M,"△","\\vartriangle");f(m,S,I,"ℏ","\\hslash");f(m,S,I,"▽","\\triangledown");f(m,S,I,"◊","\\lozenge");f(m,S,I,"Ⓢ","\\circledS");f(m,S,I,"®","\\circledR");f(J,S,I,"®","\\circledR");f(m,S,I,"∡","\\measuredangle",!0);f(m,S,I,"∄","\\nexists");f(m,S,I,"℧","\\mho");f(m,S,I,"Ⅎ","\\Finv",!0);f(m,S,I,"⅁","\\Game",!0);f(m,S,I,"‵","\\backprime");f(m,S,I,"▲","\\blacktriangle");f(m,S,I,"▼","\\blacktriangledown");f(m,S,I,"■","\\blacksquare");f(m,S,I,"⧫","\\blacklozenge");f(m,S,I,"★","\\bigstar");f(m,S,I,"∢","\\sphericalangle",!0);f(m,S,I,"∁","\\complement",!0);f(m,S,I,"ð","\\eth",!0);f(J,v,I,"ð","ð");f(m,S,I,"╱","\\diagup");f(m,S,I,"╲","\\diagdown");f(m,S,I,"□","\\square");f(m,S,I,"□","\\Box");f(m,S,I,"◊","\\Diamond");f(m,S,I,"¥","\\yen",!0);f(J,S,I,"¥","\\yen",!0);f(m,S,I,"✓","\\checkmark",!0);f(J,S,I,"✓","\\checkmark");f(m,S,I,"ℶ","\\beth",!0);f(m,S,I,"ℸ","\\daleth",!0);f(m,S,I,"ℷ","\\gimel",!0);f(m,S,I,"ϝ","\\digamma",!0);f(m,S,I,"ϰ","\\varkappa");f(m,S,Vt,"┌","\\@ulcorner",!0);f(m,S,It,"┐","\\@urcorner",!0);f(m,S,Vt,"└","\\@llcorner",!0);f(m,S,It,"┘","\\@lrcorner",!0);f(m,S,M,"≦","\\leqq",!0);f(m,S,M,"⩽","\\leqslant",!0);f(m,S,M,"⪕","\\eqslantless",!0);f(m,S,M,"≲","\\lesssim",!0);f(m,S,M,"⪅","\\lessapprox",!0);f(m,S,M,"≊","\\approxeq",!0);f(m,S,pe,"⋖","\\lessdot");f(m,S,M,"⋘","\\lll",!0);f(m,S,M,"≶","\\lessgtr",!0);f(m,S,M,"⋚","\\lesseqgtr",!0);f(m,S,M,"⪋","\\lesseqqgtr",!0);f(m,S,M,"≑","\\doteqdot");f(m,S,M,"≓","\\risingdotseq",!0);f(m,S,M,"≒","\\fallingdotseq",!0);f(m,S,M,"∽","\\backsim",!0);f(m,S,M,"⋍","\\backsimeq",!0);f(m,S,M,"⫅","\\subseteqq",!0);f(m,S,M,"⋐","\\Subset",!0);f(m,S,M,"⊏","\\sqsubset",!0);f(m,S,M,"≼","\\preccurlyeq",!0);f(m,S,M,"⋞","\\curlyeqprec",!0);f(m,S,M,"≾","\\precsim",!0);f(m,S,M,"⪷","\\precapprox",!0);f(m,S,M,"⊲","\\vartriangleleft");f(m,S,M,"⊴","\\trianglelefteq");f(m,S,M,"⊨","\\vDash",!0);f(m,S,M,"⊪","\\Vvdash",!0);f(m,S,M,"⌣","\\smallsmile");f(m,S,M,"⌢","\\smallfrown");f(m,S,M,"≏","\\bumpeq",!0);f(m,S,M,"≎","\\Bumpeq",!0);f(m,S,M,"≧","\\geqq",!0);f(m,S,M,"⩾","\\geqslant",!0);f(m,S,M,"⪖","\\eqslantgtr",!0);f(m,S,M,"≳","\\gtrsim",!0);f(m,S,M,"⪆","\\gtrapprox",!0);f(m,S,pe,"⋗","\\gtrdot");f(m,S,M,"⋙","\\ggg",!0);f(m,S,M,"≷","\\gtrless",!0);f(m,S,M,"⋛","\\gtreqless",!0);f(m,S,M,"⪌","\\gtreqqless",!0);f(m,S,M,"≖","\\eqcirc",!0);f(m,S,M,"≗","\\circeq",!0);f(m,S,M,"≜","\\triangleq",!0);f(m,S,M,"∼","\\thicksim");f(m,S,M,"≈","\\thickapprox");f(m,S,M,"⫆","\\supseteqq",!0);f(m,S,M,"⋑","\\Supset",!0);f(m,S,M,"⊐","\\sqsupset",!0);f(m,S,M,"≽","\\succcurlyeq",!0);f(m,S,M,"⋟","\\curlyeqsucc",!0);f(m,S,M,"≿","\\succsim",!0);f(m,S,M,"⪸","\\succapprox",!0);f(m,S,M,"⊳","\\vartriangleright");f(m,S,M,"⊵","\\trianglerighteq");f(m,S,M,"⊩","\\Vdash",!0);f(m,S,M,"∣","\\shortmid");f(m,S,M,"∥","\\shortparallel");f(m,S,M,"≬","\\between",!0);f(m,S,M,"⋔","\\pitchfork",!0);f(m,S,M,"∝","\\varpropto");f(m,S,M,"◀","\\blacktriangleleft");f(m,S,M,"∴","\\therefore",!0);f(m,S,M,"∍","\\backepsilon");f(m,S,M,"▶","\\blacktriangleright");f(m,S,M,"∵","\\because",!0);f(m,S,M,"⋘","\\llless");f(m,S,M,"⋙","\\gggtr");f(m,S,pe,"⊲","\\lhd");f(m,S,pe,"⊳","\\rhd");f(m,S,M,"≂","\\eqsim",!0);f(m,v,M,"⋈","\\Join");f(m,S,M,"≑","\\Doteq",!0);f(m,S,pe,"∔","\\dotplus",!0);f(m,S,pe,"∖","\\smallsetminus");f(m,S,pe,"⋒","\\Cap",!0);f(m,S,pe,"⋓","\\Cup",!0);f(m,S,pe,"⩞","\\doublebarwedge",!0);f(m,S,pe,"⊟","\\boxminus",!0);f(m,S,pe,"⊞","\\boxplus",!0);f(m,S,pe,"⋇","\\divideontimes",!0);f(m,S,pe,"⋉","\\ltimes",!0);f(m,S,pe,"⋊","\\rtimes",!0);f(m,S,pe,"⋋","\\leftthreetimes",!0);f(m,S,pe,"⋌","\\rightthreetimes",!0);f(m,S,pe,"⋏","\\curlywedge",!0);f(m,S,pe,"⋎","\\curlyvee",!0);f(m,S,pe,"⊝","\\circleddash",!0);f(m,S,pe,"⊛","\\circledast",!0);f(m,S,pe,"⋅","\\centerdot");f(m,S,pe,"⊺","\\intercal",!0);f(m,S,pe,"⋒","\\doublecap");f(m,S,pe,"⋓","\\doublecup");f(m,S,pe,"⊠","\\boxtimes",!0);f(m,S,M,"⇢","\\dashrightarrow",!0);f(m,S,M,"⇠","\\dashleftarrow",!0);f(m,S,M,"⇇","\\leftleftarrows",!0);f(m,S,M,"⇆","\\leftrightarrows",!0);f(m,S,M,"⇚","\\Lleftarrow",!0);f(m,S,M,"↞","\\twoheadleftarrow",!0);f(m,S,M,"↢","\\leftarrowtail",!0);f(m,S,M,"↫","\\looparrowleft",!0);f(m,S,M,"⇋","\\leftrightharpoons",!0);f(m,S,M,"↶","\\curvearrowleft",!0);f(m,S,M,"↺","\\circlearrowleft",!0);f(m,S,M,"↰","\\Lsh",!0);f(m,S,M,"⇈","\\upuparrows",!0);f(m,S,M,"↿","\\upharpoonleft",!0);f(m,S,M,"⇃","\\downharpoonleft",!0);f(m,v,M,"⊶","\\origof",!0);f(m,v,M,"⊷","\\imageof",!0);f(m,S,M,"⊸","\\multimap",!0);f(m,S,M,"↭","\\leftrightsquigarrow",!0);f(m,S,M,"⇉","\\rightrightarrows",!0);f(m,S,M,"⇄","\\rightleftarrows",!0);f(m,S,M,"↠","\\twoheadrightarrow",!0);f(m,S,M,"↣","\\rightarrowtail",!0);f(m,S,M,"↬","\\looparrowright",!0);f(m,S,M,"↷","\\curvearrowright",!0);f(m,S,M,"↻","\\circlearrowright",!0);f(m,S,M,"↱","\\Rsh",!0);f(m,S,M,"⇊","\\downdownarrows",!0);f(m,S,M,"↾","\\upharpoonright",!0);f(m,S,M,"⇂","\\downharpoonright",!0);f(m,S,M,"⇝","\\rightsquigarrow",!0);f(m,S,M,"⇝","\\leadsto");f(m,S,M,"⇛","\\Rrightarrow",!0);f(m,S,M,"↾","\\restriction");f(m,v,I,"‘","`");f(m,v,I,"$","\\$");f(J,v,I,"$","\\$");f(J,v,I,"$","\\textdollar");f(m,v,I,"%","\\%");f(J,v,I,"%","\\%");f(m,v,I,"_","\\_");f(J,v,I,"_","\\_");f(J,v,I,"_","\\textunderscore");f(m,v,I,"∠","\\angle",!0);f(m,v,I,"∞","\\infty",!0);f(m,v,I,"′","\\prime");f(m,v,I,"△","\\triangle");f(m,v,I,"Γ","\\Gamma",!0);f(m,v,I,"Δ","\\Delta",!0);f(m,v,I,"Θ","\\Theta",!0);f(m,v,I,"Λ","\\Lambda",!0);f(m,v,I,"Ξ","\\Xi",!0);f(m,v,I,"Π","\\Pi",!0);f(m,v,I,"Σ","\\Sigma",!0);f(m,v,I,"Υ","\\Upsilon",!0);f(m,v,I,"Φ","\\Phi",!0);f(m,v,I,"Ψ","\\Psi",!0);f(m,v,I,"Ω","\\Omega",!0);f(m,v,I,"A","Α");f(m,v,I,"B","Β");f(m,v,I,"E","Ε");f(m,v,I,"Z","Ζ");f(m,v,I,"H","Η");f(m,v,I,"I","Ι");f(m,v,I,"K","Κ");f(m,v,I,"M","Μ");f(m,v,I,"N","Ν");f(m,v,I,"O","Ο");f(m,v,I,"P","Ρ");f(m,v,I,"T","Τ");f(m,v,I,"X","Χ");f(m,v,I,"¬","\\neg",!0);f(m,v,I,"¬","\\lnot");f(m,v,I,"⊤","\\top");f(m,v,I,"⊥","\\bot");f(m,v,I,"∅","\\emptyset");f(m,S,I,"∅","\\varnothing");f(m,v,_e,"α","\\alpha",!0);f(m,v,_e,"β","\\beta",!0);f(m,v,_e,"γ","\\gamma",!0);f(m,v,_e,"δ","\\delta",!0);f(m,v,_e,"ϵ","\\epsilon",!0);f(m,v,_e,"ζ","\\zeta",!0);f(m,v,_e,"η","\\eta",!0);f(m,v,_e,"θ","\\theta",!0);f(m,v,_e,"ι","\\iota",!0);f(m,v,_e,"κ","\\kappa",!0);f(m,v,_e,"λ","\\lambda",!0);f(m,v,_e,"μ","\\mu",!0);f(m,v,_e,"ν","\\nu",!0);f(m,v,_e,"ξ","\\xi",!0);f(m,v,_e,"ο","\\omicron",!0);f(m,v,_e,"π","\\pi",!0);f(m,v,_e,"ρ","\\rho",!0);f(m,v,_e,"σ","\\sigma",!0);f(m,v,_e,"τ","\\tau",!0);f(m,v,_e,"υ","\\upsilon",!0);f(m,v,_e,"ϕ","\\phi",!0);f(m,v,_e,"χ","\\chi",!0);f(m,v,_e,"ψ","\\psi",!0);f(m,v,_e,"ω","\\omega",!0);f(m,v,_e,"ε","\\varepsilon",!0);f(m,v,_e,"ϑ","\\vartheta",!0);f(m,v,_e,"ϖ","\\varpi",!0);f(m,v,_e,"ϱ","\\varrho",!0);f(m,v,_e,"ς","\\varsigma",!0);f(m,v,_e,"φ","\\varphi",!0);f(m,v,pe,"∗","*",!0);f(m,v,pe,"+","+");f(m,v,pe,"−","-",!0);f(m,v,pe,"⋅","\\cdot",!0);f(m,v,pe,"∘","\\circ",!0);f(m,v,pe,"÷","\\div",!0);f(m,v,pe,"±","\\pm",!0);f(m,v,pe,"×","\\times",!0);f(m,v,pe,"∩","\\cap",!0);f(m,v,pe,"∪","\\cup",!0);f(m,v,pe,"∖","\\setminus",!0);f(m,v,pe,"∧","\\land");f(m,v,pe,"∨","\\lor");f(m,v,pe,"∧","\\wedge",!0);f(m,v,pe,"∨","\\vee",!0);f(m,v,I,"√","\\surd");f(m,v,Vt,"⟨","\\langle",!0);f(m,v,Vt,"∣","\\lvert");f(m,v,Vt,"∥","\\lVert");f(m,v,It,"?","?");f(m,v,It,"!","!");f(m,v,It,"⟩","\\rangle",!0);f(m,v,It,"∣","\\rvert");f(m,v,It,"∥","\\rVert");f(m,v,M,"=","=");f(m,v,M,":",":");f(m,v,M,"≈","\\approx",!0);f(m,v,M,"≅","\\cong",!0);f(m,v,M,"≥","\\ge");f(m,v,M,"≥","\\geq",!0);f(m,v,M,"←","\\gets");f(m,v,M,">","\\gt",!0);f(m,v,M,"∈","\\in",!0);f(m,v,M,"","\\@not");f(m,v,M,"⊂","\\subset",!0);f(m,v,M,"⊃","\\supset",!0);f(m,v,M,"⊆","\\subseteq",!0);f(m,v,M,"⊇","\\supseteq",!0);f(m,S,M,"⊈","\\nsubseteq",!0);f(m,S,M,"⊉","\\nsupseteq",!0);f(m,v,M,"⊨","\\models");f(m,v,M,"←","\\leftarrow",!0);f(m,v,M,"≤","\\le");f(m,v,M,"≤","\\leq",!0);f(m,v,M,"<","\\lt",!0);f(m,v,M,"→","\\rightarrow",!0);f(m,v,M,"→","\\to");f(m,S,M,"≱","\\ngeq",!0);f(m,S,M,"≰","\\nleq",!0);f(m,v,Pn," ","\\ ");f(m,v,Pn," ","\\space");f(m,v,Pn," ","\\nobreakspace");f(J,v,Pn," ","\\ ");f(J,v,Pn," "," ");f(J,v,Pn," ","\\space");f(J,v,Pn," ","\\nobreakspace");f(m,v,Pn,"","\\nobreak");f(m,v,Pn,"","\\allowbreak");f(m,v,fi,",",",");f(m,v,fi,";",";");f(m,S,pe,"⊼","\\barwedge",!0);f(m,S,pe,"⊻","\\veebar",!0);f(m,v,pe,"⊙","\\odot",!0);f(m,v,pe,"⊕","\\oplus",!0);f(m,v,pe,"⊗","\\otimes",!0);f(m,v,I,"∂","\\partial",!0);f(m,v,pe,"⊘","\\oslash",!0);f(m,S,pe,"⊚","\\circledcirc",!0);f(m,S,pe,"⊡","\\boxdot",!0);f(m,v,pe,"△","\\bigtriangleup");f(m,v,pe,"▽","\\bigtriangledown");f(m,v,pe,"†","\\dagger");f(m,v,pe,"⋄","\\diamond");f(m,v,pe,"⋆","\\star");f(m,v,pe,"◃","\\triangleleft");f(m,v,pe,"▹","\\triangleright");f(m,v,Vt,"{","\\{");f(J,v,I,"{","\\{");f(J,v,I,"{","\\textbraceleft");f(m,v,It,"}","\\}");f(J,v,I,"}","\\}");f(J,v,I,"}","\\textbraceright");f(m,v,Vt,"{","\\lbrace");f(m,v,It,"}","\\rbrace");f(m,v,Vt,"[","\\lbrack",!0);f(J,v,I,"[","\\lbrack",!0);f(m,v,It,"]","\\rbrack",!0);f(J,v,I,"]","\\rbrack",!0);f(m,v,Vt,"(","\\lparen",!0);f(m,v,It,")","\\rparen",!0);f(J,v,I,"<","\\textless",!0);f(J,v,I,">","\\textgreater",!0);f(m,v,Vt,"⌊","\\lfloor",!0);f(m,v,It,"⌋","\\rfloor",!0);f(m,v,Vt,"⌈","\\lceil",!0);f(m,v,It,"⌉","\\rceil",!0);f(m,v,I,"\\","\\backslash");f(m,v,I,"∣","|");f(m,v,I,"∣","\\vert");f(J,v,I,"|","\\textbar",!0);f(m,v,I,"∥","\\|");f(m,v,I,"∥","\\Vert");f(J,v,I,"∥","\\textbardbl");f(J,v,I,"~","\\textasciitilde");f(J,v,I,"\\","\\textbackslash");f(J,v,I,"^","\\textasciicircum");f(m,v,M,"↑","\\uparrow",!0);f(m,v,M,"⇑","\\Uparrow",!0);f(m,v,M,"↓","\\downarrow",!0);f(m,v,M,"⇓","\\Downarrow",!0);f(m,v,M,"↕","\\updownarrow",!0);f(m,v,M,"⇕","\\Updownarrow",!0);f(m,v,dt,"∐","\\coprod");f(m,v,dt,"⋁","\\bigvee");f(m,v,dt,"⋀","\\bigwedge");f(m,v,dt,"⨄","\\biguplus");f(m,v,dt,"⋂","\\bigcap");f(m,v,dt,"⋃","\\bigcup");f(m,v,dt,"∫","\\int");f(m,v,dt,"∫","\\intop");f(m,v,dt,"∬","\\iint");f(m,v,dt,"∭","\\iiint");f(m,v,dt,"∏","\\prod");f(m,v,dt,"∑","\\sum");f(m,v,dt,"⨂","\\bigotimes");f(m,v,dt,"⨁","\\bigoplus");f(m,v,dt,"⨀","\\bigodot");f(m,v,dt,"∮","\\oint");f(m,v,dt,"∯","\\oiint");f(m,v,dt,"∰","\\oiiint");f(m,v,dt,"⨆","\\bigsqcup");f(m,v,dt,"∫","\\smallint");f(J,v,gs,"…","\\textellipsis");f(m,v,gs,"…","\\mathellipsis");f(J,v,gs,"…","\\ldots",!0);f(m,v,gs,"…","\\ldots",!0);f(m,v,gs,"⋯","\\@cdots",!0);f(m,v,gs,"⋱","\\ddots",!0);f(m,v,I,"⋮","\\varvdots");f(J,v,I,"⋮","\\varvdots");f(m,v,et,"ˊ","\\acute");f(m,v,et,"ˋ","\\grave");f(m,v,et,"¨","\\ddot");f(m,v,et,"~","\\tilde");f(m,v,et,"ˉ","\\bar");f(m,v,et,"˘","\\breve");f(m,v,et,"ˇ","\\check");f(m,v,et,"^","\\hat");f(m,v,et,"⃗","\\vec");f(m,v,et,"˙","\\dot");f(m,v,et,"˚","\\mathring");f(m,v,_e,"","\\@imath");f(m,v,_e,"","\\@jmath");f(m,v,I,"ı","ı");f(m,v,I,"ȷ","ȷ");f(J,v,I,"ı","\\i",!0);f(J,v,I,"ȷ","\\j",!0);f(J,v,I,"ß","\\ss",!0);f(J,v,I,"æ","\\ae",!0);f(J,v,I,"œ","\\oe",!0);f(J,v,I,"ø","\\o",!0);f(J,v,I,"Æ","\\AE",!0);f(J,v,I,"Œ","\\OE",!0);f(J,v,I,"Ø","\\O",!0);f(J,v,et,"ˊ","\\'");f(J,v,et,"ˋ","\\`");f(J,v,et,"ˆ","\\^");f(J,v,et,"˜","\\~");f(J,v,et,"ˉ","\\=");f(J,v,et,"˘","\\u");f(J,v,et,"˙","\\.");f(J,v,et,"¸","\\c");f(J,v,et,"˚","\\r");f(J,v,et,"ˇ","\\v");f(J,v,et,"¨","\\\"");f(J,v,et,"˝","\\H");f(J,v,et,"◯","\\textcircled");var yd={"--":!0,"---":!0,"``":!0,"''":!0};f(J,v,I,"–","--",!0);f(J,v,I,"–","\\textendash");f(J,v,I,"—","---",!0);f(J,v,I,"—","\\textemdash");f(J,v,I,"‘","`",!0);f(J,v,I,"‘","\\textquoteleft");f(J,v,I,"’","'",!0);f(J,v,I,"’","\\textquoteright");f(J,v,I,"“","``",!0);f(J,v,I,"“","\\textquotedblleft");f(J,v,I,"”","''",!0);f(J,v,I,"”","\\textquotedblright");f(m,v,I,"°","\\degree",!0);f(J,v,I,"°","\\degree");f(J,v,I,"°","\\textdegree",!0);f(m,v,I,"£","\\pounds");f(m,v,I,"£","\\mathsterling",!0);f(J,v,I,"£","\\pounds");f(J,v,I,"£","\\textsterling",!0);f(m,S,I,"✠","\\maltese");f(J,S,I,"✠","\\maltese");var Lu='0123456789/@."';for(ei=0;ei<Lu.length;ei++)po=Lu.charAt(ei),f(m,v,I,po,po);var po,ei,Iu='0123456789!@*()-=+";:?/.,';for(ti=0;ti<Iu.length;ti++)go=Iu.charAt(ti),f(J,v,I,go,go);var go,ti,yo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(ni=0;ni<yo.length;ni++)us=yo.charAt(ni),f(m,v,_e,us,us),f(J,v,I,us,us);var us,ni;f(m,S,I,"C","ℂ");f(J,S,I,"C","ℂ");f(m,S,I,"H","ℍ");f(J,S,I,"H","ℍ");f(m,S,I,"N","ℕ");f(J,S,I,"N","ℕ");f(m,S,I,"P","ℙ");f(J,S,I,"P","ℙ");f(m,S,I,"Q","ℚ");f(J,S,I,"Q","ℚ");f(m,S,I,"R","ℝ");f(J,S,I,"R","ℝ");f(m,S,I,"Z","ℤ");f(J,S,I,"Z","ℤ");f(m,v,_e,"h","ℎ");f(J,v,_e,"h","ℎ");var Se;for(Et=0;Et<yo.length;Et++)if(Xe=yo.charAt(Et),Se=String.fromCharCode(55349,56320+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56372+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56424+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56580+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56684+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56736+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56788+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56840+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56944+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Et<26)Se=String.fromCharCode(55349,56632+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56476+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se);var Xe,Et;Se=String.fromCharCode(55349,56668);f(m,v,_e,"k",Se);f(J,v,I,"k",Se);for($n=0;$n<10;$n++)mn=$n.toString(),Se=String.fromCharCode(55349,57294+$n),f(m,v,_e,mn,Se),f(J,v,I,mn,Se),Se=String.fromCharCode(55349,57314+$n),f(m,v,_e,mn,Se),f(J,v,I,mn,Se),Se=String.fromCharCode(55349,57324+$n),f(m,v,_e,mn,Se),f(J,v,I,mn,Se),Se=String.fromCharCode(55349,57334+$n),f(m,v,_e,mn,Se),f(J,v,I,mn,Se);var mn,$n,ol="ÐÞþ";for(ri=0;ri<ol.length;ri++)ds=ol.charAt(ri),f(m,v,_e,ds,ds),f(J,v,I,ds,ds);var ds,ri,al={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Nu={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Bu={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},b2={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Nr={mathClass:"",textClass:"",font:""},Ou={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},$u={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},zu={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},ll={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},cl={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Fu={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},ul={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},qu=[al,al,Nu,Nu,Bu,Bu,b2,Nr,Nr,Nr,Ou,Ou,$u,$u,zu,zu,ll,ll,cl,cl,Fu,Fu,Nr,Nr,ul,ul],v2=[al,Nr,ll,cl,ul],y2=(e)=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484){var s=Math.floor((r-119808)/26);return qu[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return v2[i]}else if(r===120485||r===120486)return qu[0];else if(120486<r&&r<120782)return Nr;else throw new se("Unsupported character: "+e)};function Ft(e){var{strict:t,errorCode:n,errorMsg:r,token:s,report:i}=e,o=t;if(typeof t==="function")if(i)o=t(n,r,s);else try{o=t(n,r,s)}catch(a){o="error"}switch(o){case!0:case"error":if(i)throw new se("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+n+"]"),s);else return!0;case!1:case"ignore":if(!i)return!1;break;case"warn":default:if(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+n+"]")),!i)return!1;break}}var wo=function(t,n,r){if(Qe[r][t]){var s=Qe[r][t].replace;if(s)t=s}return{value:t,metrics:Al(t,n,r)}},Dt=function(t,n,r,s,i){var o=wo(t,n,r),a=o.metrics;t=o.value;var l;if(a){var u=a.italic;if(r==="text"||s&&s.font==="mathit")u=0;l=new qt(t,a.height,a.depth,u,a.skew,a.width,i)}else Ft({strict:s.strict,errorCode:"symbolNotInFont",errorMsg:"No character metrics for '"+t+"' in style '"+n+"' and mode '"+r+"'",report:!0}),l=new qt(t,0,0,0,0,0,i);if(l.maxFontSize=s.sizeMultiplier,s.style.isTight())l.classes.push("mtight");var d=s.getColor();if(d)l.style.color=d;return l},Cl=function(t,n,r,s){if(s===void 0)s=[];if(r.font==="boldsymbol"&&wo(t,"Main-Bold",n).metrics)return Dt(t,"Main-Bold",n,r,s.concat(["mathbf"]));else if(t==="\\"||Qe[n][t].font==="main")return Dt(t,"Main-Regular",n,r,s);else return Dt(t,"AMS-Regular",n,r,s.concat(["amsrm"]))},k2=function(t,n,r){if(r!=="textord"&&wo(t,"Math-BoldItalic",n).metrics)return{fontName:"Math-BoldItalic",fontClass:"boldsymbol"};else return{fontName:"Main-Bold",fontClass:"mathbf"}},xo=function(t,n){var r=t.type==="mathord"?"mathord":"textord",{mode:s,text:i}=t,o=["mord"],{font:a,fontFamily:l,fontWeight:u,fontShape:d}=n,h=s==="math"||s==="text"&&!!a,p=h?a:l,g="",b="";if(i.charCodeAt(0)===55349){var x=y2(i);g=x.font,b=x[s+"Class"]}if(g)return Dt(i,g,s,n,o.concat(b));else if(p){var k,E;if(p==="boldsymbol"){var T=k2(i,s,r);k=T.fontName,E=[T.fontClass]}else if(h)k=dl[a].fontName,E=[a];else k=ao(l,u,d),E=[l,u,d];if(wo(i,k,s).metrics)return Dt(i,k,s,n,o.concat(E));else if(Object.prototype.hasOwnProperty.call(yd,i)&&k.slice(0,10)==="Typewriter"){var _=[];for(var A=0;A<i.length;A++)_.push(Dt(i[A],k,s,n,o.concat(E)));return Un(_)}}if(r==="mathord")return Dt(i,"Math-Italic",s,n,o.concat(["mathnormal"]));else if(r==="textord"){var D=Qe[s][i]&&Qe[s][i].font;if(D==="ams"){var R=ao("amsrm",u,d);return Dt(i,R,s,n,o.concat("amsrm",u,d))}else if(D==="main"||!D){var L=ao("textrm",u,d);return Dt(i,L,s,n,o.concat(u,d))}else{var B=ao(D,u,d);return Dt(i,B,s,n,o.concat(B,u,d))}}else throw Error("unexpected type: "+r+" in makeOrd")},w2=(e,t)=>{if(ur(e.classes)!==ur(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var s of Object.keys(t.style))if(e.style[s]!==t.style[s])return!1;return!0},kd=(e)=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];if(n instanceof qt&&r instanceof qt&&w2(n,r))n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--}return e},_l=function(t){var n=0,r=0,s=0;for(var i=0;i<t.children.length;i++){var o=t.children[i];if(o.height>n)n=o.height;if(o.depth>r)r=o.depth;if(o.maxFontSize>s)s=o.maxFontSize}t.height=n,t.depth=r,t.maxFontSize=s},ee=function(t,n,r,s){var i=new Or(t,n,r,s);return _l(i),i},dr=(e,t,n,r)=>new Or(e,t,n,r),ms=function(t,n,r){var s=ee([t],[],n);return s.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),s.style.borderBottomWidth=ce(s.height),s.maxFontSize=1,s},x2=function(t,n,r,s){var i=new di(t,n,r,s);return _l(i),i},Un=function(t){var n=new Br(t);return _l(n),n},ps=function(t,n){if(t instanceof Br)return ee([],[t],n);return t},E2=function(t){if(t.positionType==="individualShift"){var n=t.children,r=[n[0]],s=-n[0].shift-n[0].elem.depth,i=s;for(var o=1;o<n.length;o++){var a=-n[o].shift-i-n[o].elem.depth,l=a-(n[o-1].elem.height+n[o-1].elem.depth);i=i+a,r.push({type:"kern",size:l}),r.push(n[o])}return{children:r,depth:s}}var u;if(t.positionType==="top"){var d=t.positionData;for(var h=0;h<t.children.length;h++){var p=t.children[h];d-=p.type==="kern"?p.size:p.elem.height+p.elem.depth}u=d}else if(t.positionType==="bottom")u=-t.positionData;else{var g=t.children[0];if(g.type!=="elem")throw Error('First child must have type "elem".');if(t.positionType==="shift")u=-g.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")u=-g.elem.depth;else throw Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:u}},qe=function(t,n){var r=E2(t),{children:s,depth:i}=r,o=0;for(var a=0;a<s.length;a++){var l=s[a];if(l.type==="elem"){var u=l.elem;o=Math.max(o,u.maxFontSize,u.height)}}o+=2;var d=ee(["pstrut"],[]);d.style.height=ce(o);var h=[],p=i,g=i,b=i;for(var x=0;x<s.length;x++){var k=s[x];if(k.type==="kern")b+=k.size;else{var E=k.elem,T=k.wrapperClasses||[],_=k.wrapperStyle||{},A=ee(T,[d,E],void 0,_);if(A.style.top=ce(-o-b-E.depth),k.marginLeft)A.style.marginLeft=k.marginLeft;if(k.marginRight)A.style.marginRight=k.marginRight;h.push(A),b+=E.height+E.depth}p=Math.min(p,b),g=Math.max(g,b)}var D=ee(["vlist"],h);D.style.height=ce(g);var R;if(p<0){var L=ee([],[]),B=ee(["vlist"],[L]);B.style.height=ce(-p);var O=ee(["vlist-s"],[new qt("​")]);R=[ee(["vlist-r"],[D,O]),ee(["vlist-r"],[B])]}else R=[ee(["vlist-r"],[D])];var H=ee(["vlist-t"],R);if(R.length===2)H.classes.push("vlist-t2");return H.height=g,H.depth=-p,H},wd=(e,t)=>{var n=ee(["mspace"],[],t),r=rt(e,t);return n.style.marginRight=ce(r),n},ao=(e,t,n)=>{var r,s;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}if(t==="textbf"&&n==="textit")s="BoldItalic";else if(t==="textbf")s="Bold";else if(n==="textit")s="Italic";else s="Regular";return r+"-"+s},dl={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},xd={vec:["vec",0.471,0.714],oiintSize1:["oiintSize1",0.957,0.499],oiintSize2:["oiintSize2",1.472,0.659],oiiintSize1:["oiiintSize1",1.304,0.499],oiiintSize2:["oiiintSize2",1.98,0.659]},Ed=function(t,n){var r=xd[t],s=r[0],i=r[1],o=r[2],a=new qn(s),l=new bn([a],{width:ce(i),height:ce(o),style:"width:"+ce(i),viewBox:"0 0 "+1000*i+" "+1000*o,preserveAspectRatio:"xMinYMin"}),u=dr(["katex-overlay"],[l],n);return u.height=o,u.style.height=ce(o),u.style.width=ce(i),u},nt={number:3,unit:"mu"},Ir={number:4,unit:"mu"},Bn={number:5,unit:"mu"},A2={mord:{mop:nt,mbin:Ir,mrel:Bn,minner:nt},mop:{mord:nt,mop:nt,mrel:Bn,minner:nt},mbin:{mord:Ir,mop:Ir,mopen:Ir,minner:Ir},mrel:{mord:Bn,mop:Bn,mopen:Bn,minner:Bn},mopen:{},mclose:{mop:nt,mbin:Ir,mrel:Bn,minner:nt},mpunct:{mord:nt,mop:nt,mrel:Bn,mopen:nt,mclose:nt,mpunct:nt,minner:nt},minner:{mord:nt,mop:nt,mbin:Ir,mrel:Bn,mopen:nt,mpunct:nt,minner:nt}},C2={mord:{mop:nt},mop:{mord:nt,mop:nt},mbin:{},mrel:{},mopen:{},mclose:{mop:nt},mpunct:{},minner:{mop:nt}},Ad={},ai={},li={};function he(e){var{type:t,names:n,htmlBuilder:r,mathmlBuilder:s}=e;for(var i=0;i<n.length;++i)Ad[n[i]]=e;if(t){if(r)ai[t]=r;if(s)li[t]=s}}function $r(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;if(n)ai[t]=n;if(r)li[t]=r}var ci=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},ut=function(t){return t.type==="ordgroup"?t.body:[t]},_2=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),S2=new Set(["rightmost","mrel","mclose","mpunct"]),T2={display:De.DISPLAY,text:De.TEXT,script:De.SCRIPT,scriptscript:De.SCRIPTSCRIPT},R2={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},gt=function(t,n,r,s){if(s===void 0)s=[null,null];var i=[];for(var o=0;o<t.length;o++){var a=ze(t[o],n);if(a instanceof Br){var l=a.children;i.push(...l)}else i.push(a)}if(kd(i),!r)return i;var u=n;if(t.length===1){var d=t[0];if(d.type==="sizing")u=n.havingSize(d.size);else if(d.type==="styling")u=n.havingStyle(T2[d.style])}var h=ee([s[0]||"leftmost"],[],n),p=ee([s[1]||"rightmost"],[],n),g=r==="root";return fl(i,(b,x)=>{var k=x.classes[0],E=b.classes[0];if(k==="mbin"&&S2.has(E))x.classes[0]="mord";else if(E==="mbin"&&_2.has(k))b.classes[0]="mord"},{node:h},p,g),fl(i,(b,x)=>{var k,E,T=ml(x),_=ml(b),A=T&&_?b.hasClass("mtight")?(k=C2[T])==null?void 0:k[_]:(E=A2[T])==null?void 0:E[_]:null;if(A)return wd(A,u)},{node:h},p,g),i},fl=function(t,n,r,s,i){if(s)t.push(s);var o=0;for(;o<t.length;o++){var a=t[o],l=Cd(a);if(l){fl(l.children,n,r,null,i);continue}var u=!a.hasClass("mspace");if(u){var d=n(a,r.node);if(d)if(r.insertAfter)r.insertAfter(d);else t.unshift(d),o++}if(u)r.node=a;else if(i&&a.hasClass("katex-newline"))r.node=ee(["leftmost"]);r.insertAfter=((h)=>(p)=>{t.splice(h+1,0,p),o++})(o)}if(s)t.pop()},Cd=function(t){if(t instanceof Br||t instanceof di||t instanceof Or&&t.hasClass("enclosing"))return t;return null},hl=function(t,n){var r=Cd(t);if(r){var s=r.children;if(s.length){if(n==="right")return hl(s[s.length-1],"right");else if(n==="left")return hl(s[0],"left")}}return t},ml=function(t,n){if(!t)return null;if(n)t=hl(t,n);var r=t.classes[0];return R2[r]||null},ui=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return ee(n.concat(r))},ze=function(t,n,r){if(!t)return ee();if(ai[t.type]){var s=ai[t.type](t,n);if(r&&n.size!==r.size){s=ee(n.sizingClasses(r),[s],n);var i=n.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new se("Got group of unknown type: '"+t.type+"'")};function lo(e,t){var n=ee(["katex-base"],e,t),r=ee(["katex-strut"]);if(r.style.height=ce(n.height+n.depth),n.depth)r.style.verticalAlign=ce(-n.depth);return n.children.unshift(r),n}function pl(e,t){var n=null;if(e.length===1&&e[0].type==="tag")n=e[0].tag,e=e[0].body;var r=gt(e,t,"root"),s;if(r.length===2&&r[1].hasClass("katex-tag"))s=r.pop();var i=[],o=[];for(var a=0;a<r.length;a++)if(o.push(r[a]),r[a].hasClass("mbin")||r[a].hasClass("mrel")||r[a].hasClass("allowbreak")){var l=!1;while(a<r.length-1&&r[a+1].hasClass("mspace")&&!r[a+1].hasClass("katex-newline"))if(a++,o.push(r[a]),r[a].hasClass("nobreak"))l=!0;if(!l)i.push(lo(o,t)),o=[]}else if(r[a].hasClass("katex-newline")){if(o.pop(),o.length>0)i.push(lo(o,t)),o=[];i.push(r[a])}if(o.length>0)i.push(lo(o,t));var u;if(n)u=lo(gt(n,t,!0),t),u.classes=["katex-tag"],i.push(u);else if(s)i.push(s);var d=ee(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),u){var h=u.children[0];if(h.style.height=ce(d.height+d.depth),d.depth)h.style.verticalAlign=ce(-d.depth)}return d}function _d(e){return new Br(e)}class ie{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}if(this.classes.length>0)e.className=ur(this.classes);for(var s=0;s<this.children.length;s++)if(this.children[s]instanceof lt&&this.children[s+1]instanceof lt){var i=this.children[s].toText()+this.children[++s].toText();while(this.children[s+1]instanceof lt)i+=this.children[++s].toText();e.appendChild(new lt(i).toNode())}else e.appendChild(this.children[s].toNode());return e}toMarkup(){var e="<"+this.type;for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e+=" "+n+'="',e+=Ct(r),e+='"'}if(this.classes.length>0)e+=' class ="'+Ct(ur(this.classes))+'"';e+=">";for(var s=0;s<this.children.length;s++)e+=this.children[s].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map((e)=>e.toText()).join("")}}class lt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ct(this.toText())}toText(){return this.text}}class Sl{constructor(e){if(this.width=void 0,this.character=void 0,this.width=e,e>=0.05555&&e<=0.05556)this.character=" ";else if(e>=0.1666&&e<=0.1667)this.character=" ";else if(e>=0.2222&&e<=0.2223)this.character=" ";else if(e>=0.2777&&e<=0.2778)this.character="  ";else if(e>=-0.05556&&e<=-0.05555)this.character=" ⁣";else if(e>=-0.1667&&e<=-0.1666)this.character=" ⁣";else if(e>=-0.2223&&e<=-0.2222)this.character=" ⁣";else if(e>=-0.2778&&e<=-0.2777)this.character=" ⁣";else this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);else{var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",ce(this.width)),e}}toMarkup(){if(this.character)return"<mtext>"+this.character+"</mtext>";else return'<mspace width="'+ce(this.width)+'"/>'}toText(){if(this.character)return this.character;else return" "}}var M2=new Set(["\\imath","\\jmath"]),D2=new Set(["mrow","mtable"]),en=function(t,n,r){var s,i;if(Qe[n][t]&&Qe[n][t].replace&&t.charCodeAt(0)!==55349&&!(Object.prototype.hasOwnProperty.call(yd,t)&&((r==null||(s=r.fontFamily)==null?void 0:s.slice(4,6))==="tt"||(r==null||(i=r.font)==null?void 0:i.slice(4,6))==="tt")))t=Qe[n][t].replace;return new lt(t)},Tl=function(t){if(t.length===1)return t[0];else return new ie("mrow",t)},L2={mathit:"italic",boldsymbol:(e)=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},Rl=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";else if(t.fontFamily==="textsf")if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"sans-serif-bold-italic";else if(t.fontShape==="textit")return"sans-serif-italic";else if(t.fontWeight==="textbf")return"bold-sans-serif";else return"sans-serif";else if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";else if(t.fontShape==="textit")return"italic";else if(t.fontWeight==="textbf")return"bold"}var n=t.font;if(!n||n==="mathnormal")return null;var r=e.mode,s=L2[n];if(s)return typeof s==="function"?s(e):s;var i=e.text;if(M2.has(i))return null;if(Qe[r][i]){var o=Qe[r][i].replace;if(o)i=o}var a=dl[n].fontName;if(Al(i,a,r))return dl[n].variant;return null};function Va(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof lt&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof lt&&n.text===","}else return!1}var Jt=function(t,n,r){if(t.length===1){var s=je(t[0],n);if(r&&s instanceof ie&&s.type==="mo")s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em");return[s]}var i=[],o;for(var a=0;a<t.length;a++){var l=je(t[a],n);if(l instanceof ie&&o instanceof ie){if(l.type==="mtext"&&o.type==="mtext"&&l.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...l.children);continue}else if(l.type==="mn"&&o.type==="mn"){o.children.push(...l.children);continue}else if(Va(l)&&o.type==="mn"){o.children.push(...l.children);continue}else if(l.type==="mn"&&Va(o))l.children=[...o.children,...l.children],i.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(o.type==="mn"||Va(o))){var u=l.children[0];if(u instanceof ie&&u.type==="mn")u.children=[...o.children,...u.children],i.pop()}else if(o.type==="mi"&&o.children.length===1){var d=o.children[0];if(d instanceof lt&&d.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var h=l.children[0];if(h instanceof lt&&h.text.length>0)h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),i.pop()}}}i.push(l),o=l}return i},fr=function(t,n,r){return Tl(Jt(t,n,r))},je=function(t,n){if(!t)return new ie("mrow");if(li[t.type])return li[t.type](t,n);else throw new se("Got group of unknown type: '"+t.type+"'")};function Hu(e,t,n,r,s){var i=Jt(e,n),o;if(i.length===1&&i[0]instanceof ie&&D2.has(i[0].type))o=i[0];else o=new ie("mrow",i);var a=new ie("annotation",[new lt(t)]);a.setAttribute("encoding","application/x-tex");var l=new ie("semantics",[o,a]),u=new ie("math",[l]);if(u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r)u.setAttribute("display","block");var d=s?"katex":"katex-mathml";return ee([d],[u])}var I2=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Pu=[0.5,0.6,0.7,0.8,0.9,1,1.2,1.44,1.728,2.074,2.488],Uu=function(t,n){return n.size<2?t:I2[t-1][n.size-1]};class zn{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.strict=void 0,this.style=e.style,this.color=e.color,this.size=e.size||zn.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Pu[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this.strict=e.strict,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness,strict:this.strict};return Object.assign(t,e),new zn(t)}havingStyle(e){if(this.style===e)return this;else return this.extend({style:e,size:Uu(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){if(this.size===e&&this.textSize===e)return this;else return this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Pu[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Uu(zn.BASESIZE,e);if(this.size===t&&this.textSize===zn.BASESIZE&&this.style===e)return this;else return this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){if(e.size!==this.size)return["katex-sizing","reset-size"+e.size,"size"+this.size];else return[]}baseSizingClasses(){if(this.size!==zn.BASESIZE)return["katex-sizing","reset-size"+this.size,"size"+zn.BASESIZE];else return[]}fontMetrics(){if(!this._fontMetrics)this._fontMetrics=g2(this.size);return this._fontMetrics}getColor(){if(this.phantom)return"transparent";else return this.color}}zn.BASESIZE=6;var Sd=(e)=>new zn({style:e.displayMode?De.DISPLAY:De.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness,strict:e.strict}),Td=function(t,n){if(n.displayMode){var r=["katex-display"];if(n.leqno)r.push("leqno");if(n.fleqn)r.push("fleqn");t=ee(r,[t])}return t},N2=function(t,n,r){var s=Sd(r),i;if(r.output==="mathml")return Hu(t,n,s,r.displayMode,!0);else if(r.output==="html"){var o=pl(t,s);i=ee(["katex"],[o])}else{var a=Hu(t,n,s,r.displayMode,!1),l=pl(t,s);i=ee(["katex"],[a,l])}return Td(i,r)},B2=function(t,n){var r=Sd(n),s=pl(t,r),i=ee(["katex"],[s]);return Td(i,n)},O2={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Eo=function(t){var n=new ie("mo",[new lt(O2[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},$2={overrightarrow:[["rightarrow"],0.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],0.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],0.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],0.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],0.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],0.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],0.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],0.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],0.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],0.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],0.888,522,"xMaxYMin"],xlongequal:[["longequal"],0.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],0.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],0.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],0.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],0.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],0.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],0.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],0.888,342],undergroup:[["leftgroupunder","rightgroupunder"],0.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},z2=new Set(["widehat","widecheck","widetilde","utilde"]),Ao=function(t,n){function r(){var l=400000,u=t.label.slice(1);if(z2.has(u)&&"base"in t){var d=t.base.type==="ordgroup"?t.base.body.length:1,h,p,g;if(d>5)if(u==="widehat"||u==="widecheck")h=420,l=2364,g=0.42,p=u+"4";else h=312,l=2340,g=0.34,p="tilde4";else{var b=[1,1,2,2,3,3][d];if(u==="widehat"||u==="widecheck")l=[0,1062,2364,2364,2364][b],h=[0,239,300,360,420][b],g=[0,0.24,0.3,0.3,0.36,0.42][b],p=u+b;else l=[0,600,1033,2339,2340][b],h=[0,260,286,306,312][b],g=[0,0.26,0.286,0.3,0.306,0.34][b],p="tilde"+b}var x=new qn(p),k=new bn([x],{width:"100%",height:ce(g),viewBox:"0 0 "+l+" "+h,preserveAspectRatio:"none"});return{span:dr([],[k],n),minWidth:0,height:g}}else{var E=[],T=$2[u];if(!T)throw Error('No SVG data for "'+u+'".');var _=T[0],A=T[1],D=T[2],R=D/1000,L=_.length,B,O;if(L===1){if(T.length!==4)throw Error('Expected 4-tuple for single-path SVG data "'+u+'".');B=["hide-tail"],O=[T[3]]}else if(L===2)B=["halfarrow-left","halfarrow-right"],O=["xMinYMin","xMaxYMin"];else if(L===3)B=["brace-left","brace-center","brace-right"],O=["xMinYMin","xMidYMin","xMaxYMin"];else throw Error(`Correct katexImagesData or update code here to support
279
+ `+L+" children.");for(var H=0;H<L;H++){var K=new qn(_[H]),G=new bn([K],{width:"400em",height:ce(R),viewBox:"0 0 "+l+" "+D,preserveAspectRatio:O[H]+" slice"}),de=dr([B[H]],[G],n);if(L===1)return{span:de,minWidth:A,height:R};else de.style.height=ce(R),E.push(de)}return{span:ee(["katex-stretchy"],E,n),minWidth:A,height:R}}}var s=r(),{span:i,minWidth:o,height:a}=s;if(i.height=a,i.style.height=ce(a),o>0)i.style.minWidth=ce(o);return i},F2=function(t,n,r,s,i){var o,a=t.height+t.depth+r+s;if(/fbox|color|angl/.test(n)){if(o=ee(["katex-stretchy",n],[],i),n==="fbox"){var l=i.color&&i.getColor();if(l)o.style.borderColor=l}}else{var u=[];if(/^[bx]cancel$/.test(n))u.push(new vo({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"}));if(/^x?cancel$/.test(n))u.push(new vo({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new bn(u,{width:"100%",height:ce(a)});o=dr([],[d],i)}return o.height=a,o.style.height=ce(a),o},q2=["bin","close","inner","open","punct","rel"],H2=["accent-token","mathord","op-token","spacing","textord"],P2=new Set(q2),U2=new Set(H2);function W2(e){return P2.has(e)}function Ie(e,t){if(!e||e.type!==t)throw Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Co(e){var t=_o(e);if(!t)throw Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function _o(e){if(e.type==="atom"||U2.has(e.type))return e;return null}function Ml(e,t,n){var r="";for(var s of e.body)if(s.type==="textord")r+=s.text;else if(n&&s.type==="spacing"&&s.text===" ")r+=" ";else throw new se(t,e);return r}var Rd=(e)=>{if(e instanceof qt)return e;if(m2(e)&&e.children.length===1)return Rd(e.children[0])},Md=(e,t)=>{var n,r,s;if(e&&e.type==="supsub")r=Ie(e.base,"accent"),n=r.base,e.base=n,s=h2(ze(e,t)),e.base=r;else r=Ie(e,"accent"),n=r.base;var i=ze(n,t.havingCrampedStyle()),o=r.isShifty&&Hn(n),a=0;if(o){var l,u;a=(l=(u=Rd(i))==null?void 0:u.skew)!=null?l:0}var d=r.label==="\\c",h=d?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight),p;if(!r.isStretchy){var g,b;if(r.label==="\\vec")g=Ed("vec",t),b=xd.vec[1];else if(g=xo({type:"textord",mode:r.mode,text:r.label},t),g=f2(g),g.italic=0,b=g.width,d)h+=g.depth;p=ee(["accent-body"],[g]);var x=r.label==="\\textcircled";if(x)p.classes.push("accent-full"),h=i.height;var k=a;if(!x)k-=b/2;if(p.style.left=ce(k),r.label==="\\textcircled")p.style.top=".2em";p=qe({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-h},{type:"elem",elem:p}]})}else p=Ao(r,t),p=qe({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+ce(2*a)+")",marginLeft:ce(2*a)}:void 0}]});var E=ee(["mord","katex-accent"],[p],t);if(s)return s.children[0]=E,s.height=Math.max(E.height,s.height),s.classes[0]="mord",s;else return E};var j2=(e,t)=>{var n=e.isStretchy?Eo(e.label):new ie("mo",[en(e.label,e.mode)]),r=new ie("mover",[je(e.base,t),n]);return r.setAttribute("accent","true"),r},G2=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e)=>"\\"+e).join("|"));he({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"],numArgs:1,handler:(e,t)=>{var n=ci(t[0]),r=!G2.test(e.funcName),s=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:n}},htmlBuilder:Md,mathmlBuilder:j2});he({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.","\\\"","\\c","\\r","\\H","\\v","\\textcircled"],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"],handler:(e,t)=>{var n=t[0],r=e.parser.mode;if(r==="math")Ft({strict:e.parser.settings.strict,errorCode:"mathVsTextAccents",errorMsg:"LaTeX's accent "+e.funcName+" works only in text mode",report:!0}),r="text";return{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}});he({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:s}},htmlBuilder:(e,t)=>{var n=ze(e.base,t),r=Ao(e,t),s=e.label==="\\utilde"?0.12:0,i=qe({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:n}]});return ee(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var n=Eo(e.label),r=new ie("munder",[je(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var co=(e)=>{var t=new ie("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};he({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),s=ps(ze(e.body,r,t),t),i=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var o;if(e.below)r=t.havingStyle(n.sub()),o=ps(ze(e.below,r,t),t),o.classes.push(i+"-arrow-pad");var a=Ao(e,t),l=-t.fontMetrics().axisHeight+0.5*a.height,u=-t.fontMetrics().axisHeight-0.5*a.height-0.111;if(s.depth>0.25||e.label==="\\xleftequilibrium")u-=s.depth;var d;if(o){var h=-t.fontMetrics().axisHeight+o.height+0.5*a.height+0.111;d=qe({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:a,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:o,shift:h}]})}else d=qe({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:a,shift:l,wrapperClasses:["svg-align"]}]});return ee(["mrel","x-arrow"],[d],t)},mathmlBuilder(e,t){var n=Eo(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=co(je(e.body,t));if(e.below){var i=co(je(e.below,t));r=new ie("munderover",[n,i,s])}else r=new ie("mover",[n,s])}else if(e.below){var o=co(je(e.below,t));r=new ie("munder",[n,o])}else r=co(),r=new ie("mover",[n,r]);return r}});function K2(e,t){var n=gt(e.body,t,!0);return ee([e.mclass],n,t)}function V2(e,t){var n,r=Jt(e.body,t);if(e.mclass==="minner")n=new ie("mpadded",r);else if(e.mclass==="mord")if(e.isCharacterBox)n=r[0],n.type="mi";else n=new ie("mi",r);else{if(e.isCharacterBox)n=r[0],n.type="mo";else n=new ie("mo",r);if(e.mclass==="mbin")n.attributes.lspace="0.22em",n.attributes.rspace="0.22em";else if(e.mclass==="mpunct")n.attributes.lspace="0em",n.attributes.rspace="0.17em";else if(e.mclass==="mopen"||e.mclass==="mclose")n.attributes.lspace="0em",n.attributes.rspace="0em"}return n}he({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],numArgs:1,primitive:!0,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:ut(s),isCharacterBox:Hn(s)}},htmlBuilder:K2,mathmlBuilder:V2});var So=(e)=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;if(t.type==="atom"&&(t.family==="bin"||t.family==="rel"))return"m"+t.family;else return"mord"};he({type:"mclass",names:["\\@binrel"],numArgs:2,handler(e,t){var n=e.parser;return{type:"mclass",mode:n.mode,mclass:So(t[0]),body:ut(t[1]),isCharacterBox:Hn(t[1])}}});he({type:"mclass",names:["\\stackrel","\\overset","\\underset"],numArgs:2,handler(e,t){var{parser:n,funcName:r}=e,s=t[1],i=t[0],o;if(r!=="\\stackrel")o=So(s);else o="mrel";var a={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ut(s)},l=r==="\\underset"?{type:"supsub",mode:i.mode,base:a,sub:i}:{type:"supsub",mode:i.mode,base:a,sup:i};return{type:"mclass",mode:n.mode,mclass:o,body:[l],isCharacterBox:Hn(l)}}});he({type:"pmb",names:["\\pmb"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser;return{type:"pmb",mode:n.mode,mclass:So(t[0]),body:ut(t[0])}},htmlBuilder(e,t){var n=gt(e.body,t,!0),r=ee([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=Jt(e.body,t),r=new ie("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var J2={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Wu=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),ju=(e)=>e.type==="textord"&&e.text==="@",Z2=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function Y2(e,t,n){var r=J2[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var s=n.callFunction("\\\\cdleft",[t[0]],[]),i={type:"atom",text:r,mode:"math",family:"rel"},o=n.callFunction("\\Big",[i],[]),a=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[s,o,a]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function X2(e){var t=[];e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();while(!0){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){if(t[t.length-1].length===0)t.pop();break}else throw new se("Expected \\\\ or \\cr or \\end",e.nextToken)}var r=[],s=[r];for(var i=0;i<t.length;i++){var o=t[i],a=Wu();for(var l=0;l<o.length;l++)if(!ju(o[l]))a.body.push(o[l]);else{r.push(a),l+=1;var u=Co(o[l]).text,d=[,,];if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(u));else if("<>AV".includes(u))for(var h=0;h<2;h++){var p=!0;for(var g=l+1;g<o.length;g++){if(Z2(o[g],u)){p=!1,l=g;break}if(ju(o[g]))throw new se("Missing a "+u+" character to complete a CD arrow.",o[g]);d[h].body.push(o[g])}if(p)throw new se("Missing a "+u+" character to complete a CD arrow.",o[l])}else throw new se('Expected one of "<>AV=|." after @',o[l]);var b=Y2(u,d,e),x={type:"styling",body:[b],mode:"math",style:"display",resetFont:!0};r.push(x),a=Wu()}if(i%2===0)r.push(a);else r.shift();r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var k=Array(s[0].length).fill({type:"align",align:"c",pregap:0.25,postgap:0.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:k,colSeparationType:"CD",hLinesBeforeRow:Array(s.length+1).fill([])}}he({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=ps(ze(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=ce(0.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new ie("mrow",[je(e.label,t)]);if(n=new ie("mpadded",[n]),n.setAttribute("width","0"),e.side==="left")n.setAttribute("lspace","-1width");return n.setAttribute("voffset","0.7em"),n=new ie("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});he({type:"cdlabelparent",names:["\\\\cdparent"],numArgs:1,handler(e,t){var n=e.parser;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=ps(ze(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new ie("mrow",[je(e.fragment,t)])}});he({type:"textord",names:["\\@char"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=Ie(t[0],"ordgroup"),s=Ml(r,"\\@char has non-numeric argument"),i=parseInt(s),o;if(isNaN(i))throw new se("\\@char has non-numeric argument "+s);else if(i<0||i>1114111)throw new se("\\@char with invalid code point "+s);else if(i<=65535)o=String.fromCharCode(i);else i-=65536,o=String.fromCharCode((i>>10)+55296,(i&1023)+56320);return{type:"textord",mode:n.mode,text:o}}});var Q2=(e,t)=>{var n=gt(e.body,t.withColor(e.color),!1);return Un(n)},eb=(e,t)=>{var n=Jt(e.body,t.withColor(e.color)),r=new ie("mstyle",n);return r.setAttribute("mathcolor",e.color),r};he({type:"color",names:["\\textcolor"],numArgs:2,allowedInText:!0,argTypes:["color","original"],handler(e,t){var n=e.parser,r=Ie(t[0],"color-token").color,s=t[1];return{type:"color",mode:n.mode,color:r,body:ut(s)}},htmlBuilder:Q2,mathmlBuilder:eb});he({type:"color",names:["\\color"],numArgs:1,allowedInText:!0,argTypes:["color"],handler(e,t){var{parser:n,breakOnTokenText:r}=e,s=Ie(t[0],"color-token").color;n.gullet.macros.set("\\current@color",s);var i=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:s,body:i}}});he({type:"cr",names:["\\\\"],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=t.gullet.future().text==="["?t.parseSizeGroup(!0):null,r=!t.settings.displayMode||!Ft({strict:t.settings.strict,errorCode:"newLineInDisplayMode",errorMsg:"In LaTeX, \\\\ or \\newline does nothing in display mode",report:!1});return{type:"cr",mode:t.mode,newLine:r,size:n&&Ie(n,"size").value}},htmlBuilder(e,t){var n=ee(["mspace"],[],t);if(e.newLine){if(n.classes.push("katex-newline"),e.size)n.style.marginTop=ce(rt(e.size,t))}return n},mathmlBuilder(e,t){var n=new ie("mspace");if(e.newLine){if(n.setAttribute("linebreak","newline"),e.size)n.setAttribute("height",ce(rt(e.size,t)))}return n}});var gl={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Dd=(e)=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new se("Expected a control sequence",e);return t},tb=(e)=>{var t=e.gullet.popToken();if(t.text==="="){if(t=e.gullet.popToken(),t.text===" ")t=e.gullet.popToken()}return t},Ld=(e,t,n,r)=>{var s=e.gullet.macros.get(n.text);if(s==null)n.noexpand=!0,s={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)};e.gullet.macros.set(t,s,r)};he({type:"internal",names:["\\global","\\long","\\\\globallong"],numArgs:0,allowedInText:!0,handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(gl[r.text]){if(n==="\\global"||n==="\\\\globallong")r.text=gl[r.text];return Ie(t.parseFunction(),"internal")}throw new se("Invalid token after macro prefix",r)}});he({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new se("Expected a control sequence",r);var i=0,o,a=[[]];while(t.gullet.future().text!=="{")if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),a[i].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new se('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new se('Argument number "'+r.text+'" out of order');i++,a.push([])}else if(r.text==="EOF")throw new se("Expected a macro definition");else a[i].push(r.text);var l=t.gullet.consumeArg(),u=l.tokens;if(o)u.unshift(o);if(n==="\\edef"||n==="\\xdef")u=t.gullet.expandTokens(u),u.reverse();return t.gullet.macros.set(s,{tokens:u,numArgs:i,delimiters:a},n===gl[n]),{type:"internal",mode:t.mode}}});he({type:"internal",names:["\\let","\\\\globallet"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=Dd(t.gullet.popToken());t.gullet.consumeSpaces();var s=tb(t);return Ld(t,r,s,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});he({type:"internal",names:["\\futurelet","\\\\globalfuture"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=Dd(t.gullet.popToken()),s=t.gullet.popToken(),i=t.gullet.popToken();return Ld(t,r,i,n==="\\\\globalfuture"),t.gullet.pushToken(i),t.gullet.pushToken(s),{type:"internal",mode:t.mode}}});var si=function(t,n,r){var s=Qe.math[t]&&Qe.math[t].replace,i=Al(s||t,n,r);if(!i)throw Error("Unsupported symbol "+t+" and font size "+n+".");return i},Dl=function(t,n,r,s){var i=r.havingBaseStyle(n),o=ee(s.concat(i.sizingClasses(r)),[t],r),a=i.sizeMultiplier/r.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=i.sizeMultiplier,o},Id=function(t,n,r){var s=n.havingBaseStyle(r),i=(1-n.sizeMultiplier/s.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=ce(i),t.height-=i,t.depth+=i},nb=function(t,n,r,s,i,o){var a=Dt(t,"Main-Regular",i,s),l=Dl(a,n,s,o);if(r)Id(l,s,n);return l},rb=function(t,n,r,s){return Dt(t,"Size"+n+"-Regular",r,s)},Nd=function(t,n,r,s,i,o){var a=rb(t,n,i,s),l=Dl(ee(["delimsizing","size"+n],[a],s),De.TEXT,s,o);if(r)Id(l,s,De.TEXT);return l},Ja=function(t,n,r,s){var i;if(n==="Size1-Regular")i="delim-size1";else i="delim-size4";var o=ee(["delimsizinginner",i],[ee([],[Dt(t,n,r,s)])]);return{type:"elem",elem:o}},Za=function(t,n,r){var s=gn["Size4-Regular"][t.charCodeAt(0)]?gn["Size4-Regular"][t.charCodeAt(0)][4]:gn["Size1-Regular"][t.charCodeAt(0)][4],i=new qn("inner",o2(t,Math.round(1000*n))),o=new bn([i],{width:ce(s),height:ce(n),style:"width:"+ce(s),viewBox:"0 0 "+1000*s+" "+Math.round(1000*n),preserveAspectRatio:"xMinYMin"}),a=dr([],[o],r);return a.height=n,a.style.height=ce(n),a.style.width=ce(s),{type:"elem",elem:a}},bl=0.008,uo={type:"kern",size:-1*bl},sb=new Set(["|","\\lvert","\\rvert","\\vert"]),ib=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Bd=function(t,n,r,s,i,o){var a,l,u,d,h="",p=0;a=u=d=t,l=null;var g="Size1-Regular";if(t==="\\uparrow")u=d="⏐";else if(t==="\\Uparrow")u=d="‖";else if(t==="\\downarrow")a=u="⏐";else if(t==="\\Downarrow")a=u="‖";else if(t==="\\updownarrow")a="\\uparrow",u="⏐",d="\\downarrow";else if(t==="\\Updownarrow")a="\\Uparrow",u="‖",d="\\Downarrow";else if(sb.has(t))u="∣",h="vert",p=333;else if(ib.has(t))u="∥",h="doublevert",p=556;else if(t==="["||t==="\\lbrack")a="⎡",u="⎢",d="⎣",g="Size4-Regular",h="lbrack",p=667;else if(t==="]"||t==="\\rbrack")a="⎤",u="⎥",d="⎦",g="Size4-Regular",h="rbrack",p=667;else if(t==="\\lfloor"||t==="⌊")u=a="⎢",d="⎣",g="Size4-Regular",h="lfloor",p=667;else if(t==="\\lceil"||t==="⌈")a="⎡",u=d="⎢",g="Size4-Regular",h="lceil",p=667;else if(t==="\\rfloor"||t==="⌋")u=a="⎥",d="⎦",g="Size4-Regular",h="rfloor",p=667;else if(t==="\\rceil"||t==="⌉")a="⎤",u=d="⎥",g="Size4-Regular",h="rceil",p=667;else if(t==="("||t==="\\lparen")a="⎛",u="⎜",d="⎝",g="Size4-Regular",h="lparen",p=875;else if(t===")"||t==="\\rparen")a="⎞",u="⎟",d="⎠",g="Size4-Regular",h="rparen",p=875;else if(t==="\\{"||t==="\\lbrace")a="⎧",l="⎨",d="⎩",u="⎪",g="Size4-Regular";else if(t==="\\}"||t==="\\rbrace")a="⎫",l="⎬",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\lgroup"||t==="⟮")a="⎧",d="⎩",u="⎪",g="Size4-Regular";else if(t==="\\rgroup"||t==="⟯")a="⎫",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\lmoustache"||t==="⎰")a="⎧",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\rmoustache"||t==="⎱")a="⎫",d="⎩",u="⎪",g="Size4-Regular";var b=si(a,g,i),x=b.height+b.depth,k=si(u,g,i),E=k.height+k.depth,T=si(d,g,i),_=T.height+T.depth,A=0,D=1;if(l!==null){var R=si(l,g,i);A=R.height+R.depth,D=2}var L=x+_+A,B=Math.max(0,Math.ceil((n-L)/(D*E))),O=L+B*D*E,H=s.fontMetrics().axisHeight;if(r)H*=s.sizeMultiplier;var K=O/2-H,G=[];if(h.length>0){var de=O-x-_,ne=Math.round(O*1000),ae=a2(h,Math.round(de*1000)),z=new qn(h,ae),j=ce(p/1000),Z=ce(ne/1000),Q=new bn([z],{width:j,height:Z,viewBox:"0 0 "+p+" "+ne}),oe=dr([],[Q],s);oe.height=ne/1000,oe.style.width=j,oe.style.height=Z,G.push({type:"elem",elem:oe})}else{if(G.push(Ja(d,g,i,s)),G.push(uo),l===null){var F=O-x-_+2*bl;G.push(Za(u,F,s))}else{var X=(O-x-_-A)/2+2*bl;G.push(Za(u,X,s)),G.push(uo),G.push(Ja(l,g,i,s)),G.push(uo),G.push(Za(u,X,s))}G.push(uo),G.push(Ja(a,g,i,s))}var te=s.havingBaseStyle(De.TEXT),xe=qe({positionType:"bottom",positionData:K,children:G});return Dl(ee(["delimsizing","mult"],[xe],te),De.TEXT,s,o)},Ya=80,Xa=0.08,Qa=function(t,n,r,s,i){var o=i2(t,s,r),a=new qn(t,o),l=new bn([a],{width:"400em",height:ce(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return dr(["hide-tail"],[l],i)},ob=function(t,n){var r=n.havingBaseSizing(),s=qd("\\surd",t*r.sizeMultiplier,Fd,r),i=r.sizeMultiplier,o=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),a,l,u,d,h;if(s.type==="small"){if(d=1000+1000*o+Ya,t<1)i=1;else if(t<1.4)i=0.7;l=(1+o+Xa)/i,u=(1+o)/i,a=Qa("sqrtMain",l,d,o,n),a.style.minWidth="0.853em",h=0.833/i}else if(s.type==="large")d=(1000+Ya)*ii[s.size],u=(ii[s.size]+o)/i,l=(ii[s.size]+o+Xa)/i,a=Qa("sqrtSize"+s.size,l,d,o,n),a.style.minWidth="1.02em",h=1/i;else l=t+o+Xa,u=t+o,d=Math.floor(1000*t+o)+Ya,a=Qa("sqrtTall",l,d,o,n),a.style.minWidth="0.742em",h=1.056;return a.height=u,a.style.height=ce(l),{span:a,advanceWidth:h,ruleWidth:(n.fontMetrics().sqrtRuleThickness+o)*i}},Od=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),ab=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),$d=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),ii=[0,1.2,1.8,2.4,3],zd=function(t,n,r,s,i){if(t==="<"||t==="\\lt"||t==="⟨")t="\\langle";else if(t===">"||t==="\\gt"||t==="⟩")t="\\rangle";if(Od.has(t)||$d.has(t))return Nd(t,n,!1,r,s,i);else if(ab.has(t))return Bd(t,ii[n],!1,r,s,i);else throw new se("Illegal delimiter: '"+t+"'")},lb=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],cb=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"stack"}],Fd=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ub=function(t){if(t.type==="small")return"Main-Regular";else if(t.type==="large")return"Size"+t.size+"-Regular";else if(t.type==="stack")return"Size4-Regular";else{var n=t.type;throw Error("Add support for delim type '"+n+"' here.")}},qd=function(t,n,r,s){var i=Math.min(2,3-s.style.size);for(var o=i;o<r.length;o++){var a=r[o];if(a.type==="stack")break;var l=si(t,ub(a),"math"),u=l.height+l.depth;if(a.type==="small"){var d=s.havingBaseStyle(a.style);u*=d.sizeMultiplier}if(u>n)return a}return r[r.length-1]},vl=function(t,n,r,s,i,o){if(t==="<"||t==="\\lt"||t==="⟨")t="\\langle";else if(t===">"||t==="\\gt"||t==="⟩")t="\\rangle";var a;if($d.has(t))a=lb;else if(Od.has(t))a=Fd;else a=cb;var l=qd(t,n,a,s);if(l.type==="small")return nb(t,l.style,r,s,i,o);else if(l.type==="large")return Nd(t,l.size,r,s,i,o);else return Bd(t,n,r,s,i,o)},el=function(t,n,r,s,i,o){var a=s.fontMetrics().axisHeight*s.sizeMultiplier,l=901,u=5/s.fontMetrics().ptPerEm,d=Math.max(n-a,r+a),h=Math.max(d/500*l,2*d-u);return vl(t,h,!0,s,i,o)},Gu={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},db=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function Ku(e){return"isMiddle"in e}function To(e,t){var n=_o(e);if(n&&db.has(n.text))return n;else if(n)throw new se("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e);else throw new se("Invalid delimiter type '"+e.type+"'",e)}he({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],numArgs:1,argTypes:["primitive"],handler:(e,t)=>{var n=To(ci(t[0]),e);return{type:"delimsizing",mode:e.parser.mode,size:Gu[e.funcName].size,mclass:Gu[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>{if(e.delim===".")return ee([e.mclass]);return zd(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:(e)=>{var t=[];if(e.delim!==".")t.push(en(e.delim,e.mode));var n=new ie("mo",t);if(e.mclass==="mopen"||e.mclass==="mclose")n.setAttribute("fence","true");else n.setAttribute("fence","false");n.setAttribute("stretchy","true");var r=ce(ii[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function Vu(e){if(!e.body)throw Error("Bug: The leftright ParseNode wasn't fully parsed.")}he({type:"leftright-right",names:["\\right"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!=="string")throw new se("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:To(t[0],e).text,color:n}}});he({type:"leftright",names:["\\left"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=To(t[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=Ie(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:n.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{Vu(e);var n=gt(e.body,t,!0,["mopen","mclose"]),r=0,s=0,i=!1;for(var o=0;o<n.length;o++){var a=n[o];if(Ku(a))i=!0;else r=Math.max(n[o].height,r),s=Math.max(n[o].depth,s)}r*=t.sizeMultiplier,s*=t.sizeMultiplier;var l;if(e.left===".")l=ui(t,["mopen"]);else l=el(e.left,r,s,t,e.mode,["mopen"]);if(n.unshift(l),i)for(var u=1;u<n.length;u++){var d=n[u];if(Ku(d)){var h=d.isMiddle;n[u]=el(h.delim,r,s,h.options,e.mode,[])}}var p;if(e.right===".")p=ui(t,["mclose"]);else{var g=e.rightColor?t.withColor(e.rightColor):t;p=el(e.right,r,s,g,e.mode,["mclose"])}return n.push(p),ee(["minner"],n,t)},mathmlBuilder:(e,t)=>{Vu(e);var n=Jt(e.body,t);if(e.left!=="."){var r=new ie("mo",[en(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var s=new ie("mo",[en(e.right,e.mode)]);if(s.setAttribute("fence","true"),e.rightColor)s.setAttribute("mathcolor",e.rightColor);n.push(s)}return Tl(n)}});he({type:"middle",names:["\\middle"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=To(t[0],e);if(!e.parser.leftrightDepth)throw new se("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=ui(t,[]);else n=zd(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t};return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?en("|","text"):en(e.delim,e.mode),r=new ie("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var fb=(e,t)=>{var n=ps(ze(e.body,t),t),r=e.label.slice(1),s=t.sizeMultiplier,i,o,a=Hn(e.body);if(r==="sout")i=ee(["katex-stretchy","katex-sout"]),i.height=t.fontMetrics().defaultRuleThickness/s,o=-0.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=rt({number:0.6,unit:"pt"},t),u=rt({number:0.35,unit:"ex"},t),d=t.havingBaseSizing();s=s/d.sizeMultiplier;var h=n.height+n.depth+l+u;n.style.paddingLeft=ce(h/2+l);var p=Math.floor(1000*h*s),g=r2(p),b=new bn([new qn("phase",g)],{width:"400em",height:ce(p/1000),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=dr(["hide-tail"],[b],t),i.style.height=ce(h),o=n.depth+l+u}else{if(/cancel/.test(r)){if(!a)n.classes.push("cancel-pad")}else if(r==="angl")n.classes.push("anglpad");else n.classes.push("boxpad");var x,k,E=0;if(/box/.test(r))E=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),x=t.fontMetrics().fboxsep+(r==="colorbox"?0:E),k=x;else if(r==="angl")E=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),x=4*E,k=Math.max(0,0.25-n.depth);else x=a?0.2:0,k=x;if(i=F2(n,r,x,k,t),/fbox|boxed|fcolorbox/.test(r))i.style.borderStyle="solid",i.style.borderWidth=ce(E);else if(r==="angl"&&E!==0.049)i.style.borderTopWidth=ce(E),i.style.borderRightWidth=ce(E);if(o=n.depth+k,e.backgroundColor){if(i.style.backgroundColor=e.backgroundColor,e.borderColor)i.style.borderColor=e.borderColor}}var T;if(e.backgroundColor)T=qe({positionType:"individualShift",children:[{type:"elem",elem:i,shift:o},{type:"elem",elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?["svg-align"]:[];T=qe({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:i,shift:o,wrapperClasses:_}]})}if(/cancel/.test(r))T.height=n.height,T.depth=n.depth;if(/cancel/.test(r)&&!a)return ee(["mord","cancel-lap"],[T],t);else return ee(["mord"],[T],t)},hb=(e,t)=>{var n,r=new ie(e.label.includes("colorbox")?"mpadded":"menclose",[je(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var s=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+ce(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}if(e.backgroundColor)r.setAttribute("mathbackground",e.backgroundColor);return r};he({type:"enclose",names:["\\colorbox"],numArgs:2,allowedInText:!0,argTypes:["color","hbox"],handler(e,t,n){var{parser:r,funcName:s}=e,i=Ie(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:o}},htmlBuilder:fb,mathmlBuilder:hb});he({type:"enclose",names:["\\fcolorbox"],numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"],handler(e,t,n){var{parser:r,funcName:s}=e,i=Ie(t[0],"color-token").color,o=Ie(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:o,borderColor:i,body:a}}});he({type:"enclose",names:["\\fbox"],numArgs:1,argTypes:["hbox"],allowedInText:!0,handler(e,t){var n=e.parser;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});he({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"enclose",mode:n.mode,label:r,body:s}}});he({type:"enclose",names:["\\sout"],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e;if(n.mode==="math")Ft({strict:n.settings.strict,errorCode:"mathVsSout",errorMsg:"LaTeX's \\sout works only in text mode",report:!0});var s=t[0];return{type:"enclose",mode:n.mode,label:r,body:s}}});he({type:"enclose",names:["\\angl"],numArgs:1,argTypes:["hbox"],allowedInText:!1,handler(e,t){var n=e.parser;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var Hd={};function vn(e){var{type:t,names:n,props:r,handler:s,htmlBuilder:i,mathmlBuilder:o}=e,a={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s};for(var l=0;l<n.length;++l)Hd[n[l]]=a;if(i)ai[t]=i;if(o)li[t]=o}var Pd={};function w(e,t){Pd[e]=t}class zt{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){if(!t)return e&&e.loc;else if(!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer)return null;else return new zt(e.loc.lexer,e.loc.start,t.loc.end)}}class Kt{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Kt(t,zt.range(this,e))}}function Ju(e){var t=[];e.consumeSpaces();var n=e.fetch().text;if(n==="\\relax")e.consume(),e.consumeSpaces(),n=e.fetch().text;while(n==="\\hline"||n==="\\hdashline")e.consume(),t.push(n==="\\hdashline"),e.consumeSpaces(),n=e.fetch().text;return t}var Ro=(e)=>{var t=e.parser.settings;if(!t.displayMode)throw new se("{"+e.envName+"} can be used only in display mode.")},mb=new Set(["gather","gather*"]);function Ll(e){if(!e.includes("ed"))return!e.includes("*")}function hr(e,t,n){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:o,colSeparationType:a,autoTag:l,singleRow:u,emptySingleRow:d,maxNumCols:h,leqno:p}=t;if(e.gullet.beginGroup(),!u)e.gullet.macros.set("\\cr","\\\\\\relax");if(!o){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)o=1;else if(o=parseFloat(g),!o||o<0)throw new se("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var b=[],x=[b],k=[],E=[],T=l!=null?[]:void 0;function _(){if(l)e.gullet.macros.set("\\@eqnsw","1",!0)}function A(){if(T)if(e.gullet.macros.get("\\df@tag"))T.push(e.subparse([new Kt("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0);else T.push(Boolean(l)&&e.gullet.macros.get("\\@eqnsw")==="1")}_(),E.push(Ju(e));while(!0){var D=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var R={type:"ordgroup",mode:e.mode,body:D};if(n)R={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[R]};b.push(R);var L=e.fetch().text;if(L==="&"){if(h&&b.length===h)if(u||a)throw new se("Too many tab characters: &",e.nextToken);else Ft({strict:e.settings.strict,errorCode:"textEnv",errorMsg:"Too few columns specified in the {array} column argument.",report:!0});e.consume()}else if(L==="\\end"){if(A(),b.length===1&&R.type==="styling"&&R.body.length===1&&R.body[0].type==="ordgroup"&&R.body[0].body.length===0&&(x.length>1||!d)&&!Array.isArray(T==null?void 0:T[T.length-1])&&!(l&&(T==null?void 0:T[T.length-1])===!0))x.pop();if(E.length<x.length+1)E.push([]);break}else if(L==="\\\\"){e.consume();var B=void 0;if(e.gullet.future().text!==" ")B=e.parseSizeGroup(!0);k.push(B?B.value:null),A(),E.push(Ju(e)),b=[],x.push(b),_()}else throw new se("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:o,body:x,cols:i,rowGaps:k,hskipBeforeAndAfter:r,hLinesBeforeRow:E,colSeparationType:a,tags:T,leqno:p}}function Il(e){if(e.slice(0,1)==="d")return"display";else return"text"}var yn=function(t,n){var r,s,i=t.body.length,o=t.hLinesBeforeRow,a=0,l=Array(i),u=[],d=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),h=1/n.fontMetrics().ptPerEm,p=5*h;if(t.colSeparationType&&t.colSeparationType==="small"){var g=n.havingStyle(De.SCRIPT).sizeMultiplier;p=0.2778*(g/n.sizeMultiplier)}var b=t.colSeparationType==="CD"?rt({number:3,unit:"ex"},n):12*h,x=3*h,k=t.arraystretch*b,E=0.7*k,T=0.3*k,_=0;function A(Le){for(var $e=0;$e<Le.length;++$e){if($e>0)_+=0.25;u.push({pos:_,isDashed:Le[$e]})}}A(o[0]);for(r=0;r<t.body.length;++r){var D=t.body[r],R=E,L=T;if(a<D.length)a=D.length;var B={cells:Array(D.length),height:0,depth:0,pos:0};for(s=0;s<D.length;++s){var O=ze(D[s],n);if(L<O.depth)L=O.depth;if(R<O.height)R=O.height;B.cells[s]=O}var H=t.rowGaps[r],K=0;if(H){if(K=rt(H,n),K>0){if(K+=T,L<K)L=K;K=0}}if(t.addJot&&r<t.body.length-1)L+=x;B.height=R,B.depth=L,_+=R,B.pos=_,_+=L+K,l[r]=B,A(o[r+1])}var G=_/2+n.fontMetrics().axisHeight,de=t.cols||[],ne=[],ae,z,j=[];if(t.tags&&t.tags.some((Le)=>Le))for(r=0;r<i;++r){var Z=l[r],Q=Z.pos-G,oe=t.tags[r],F=void 0;if(oe===!0)F=ee(["eqn-num"],[],n);else if(oe===!1)F=ee([],[],n);else F=ee([],gt(oe,n,!0),n);F.depth=Z.depth,F.height=Z.height,j.push({type:"elem",elem:F,shift:Q})}for(s=0,z=0;s<a||z<de.length;++s,++z){var X,te=de[z],xe=!0;while(((W=te)==null?void 0:W.type)==="separator"){var W;if(!xe)ae=ee(["arraycolsep"],[]),ae.style.width=ce(n.fontMetrics().doubleRuleSep),ne.push(ae);if(te.separator==="|"||te.separator===":"){var ge=te.separator==="|"?"solid":"dashed",q=ee(["vertical-separator"],[],n);q.style.height=ce(_),q.style.borderRightWidth=ce(d),q.style.borderRightStyle=ge,q.style.margin="0 "+ce(-d/2);var Y=_-G;if(Y)q.style.verticalAlign=ce(-Y);ne.push(q)}else throw new se("Invalid separator type: "+te.separator);z++,te=de[z],xe=!1}if(s>=a)continue;var ue=void 0;if(s>0||t.hskipBeforeAndAfter){var le,be;if(ue=(le=(be=te)==null?void 0:be.pregap)!=null?le:p,ue!==0)ae=ee(["arraycolsep"],[]),ae.style.width=ce(ue),ne.push(ae)}var Ae=[];for(r=0;r<i;++r){var He=l[r],Ne=He.cells[s];if(!Ne)continue;var Pe=He.pos-G;Ne.depth=He.depth,Ne.height=He.height,Ae.push({type:"elem",elem:Ne,shift:Pe})}var mt=qe({positionType:"individualShift",children:Ae}),Dn=ee(["col-align-"+(((X=te)==null?void 0:X.align)||"c")],[mt]);if(ne.push(Dn),s<a-1||t.hskipBeforeAndAfter){var Te,Mr;if(ue=(Te=(Mr=te)==null?void 0:Mr.postgap)!=null?Te:p,ue!==0)ae=ee(["arraycolsep"],[]),ae.style.width=ce(ue),ne.push(ae)}}var st=ee(["mtable"],ne);if(u.length>0){var We=ms("katex-hline",n,d),ss=ms("katex-hdashline",n,d),rn=[{type:"elem",elem:st,shift:0}];while(u.length>0){var is=u.pop(),os=is.pos-G;if(is.isDashed)rn.push({type:"elem",elem:ss,shift:os});else rn.push({type:"elem",elem:We,shift:os})}st=qe({positionType:"individualShift",children:rn})}if(j.length===0)return ee(["mord"],[st],n);else{var fe=qe({positionType:"individualShift",children:j}),ke=ee(["katex-tag"],[fe],n);return Un([st,ke])}},pb={c:"center ",l:"left ",r:"right "},kn=function(t,n){var r=[],s=new ie("mtd",[],["mtr-glue"]),i=new ie("mtd",[],["mml-eqn-num"]);for(var o=0;o<t.body.length;o++){var a=t.body[o],l=[];for(var u=0;u<a.length;u++)l.push(new ie("mtd",[je(a[u],n)]));if(t.tags&&t.tags[o])if(l.unshift(s),l.push(s),t.leqno)l.unshift(i);else l.push(i);r.push(new ie("mtr",l))}var d=new ie("mtable",r),h=t.arraystretch===0.5?0.1:0.16+t.arraystretch-1+(t.addJot?0.09:0);d.setAttribute("rowspacing",ce(h));var p="",g="";if(t.cols&&t.cols.length>0){var b=t.cols,x="",k=!1,E=0,T=b.length;if(b[0].type==="separator")p+="top ",E=1;if(b[b.length-1].type==="separator")p+="bottom ",T-=1;for(var _=E;_<T;_++){var A=b[_];if(A.type==="align"){if(g+=pb[A.align],k)x+="none ";k=!0}else if(A.type==="separator"){if(k)x+=A.separator==="|"?"solid ":"dashed ",k=!1}}if(d.setAttribute("columnalign",g.trim()),/[sd]/.test(x))d.setAttribute("columnlines",x.trim())}if(t.colSeparationType==="align"){var D=t.cols||[],R="";for(var L=1;L<D.length;L++)R+=L%2?"0em ":"1em ";d.setAttribute("columnspacing",R.trim())}else if(t.colSeparationType==="alignat"||t.colSeparationType==="gather")d.setAttribute("columnspacing","0em");else if(t.colSeparationType==="small")d.setAttribute("columnspacing","0.2778em");else if(t.colSeparationType==="CD")d.setAttribute("columnspacing","0.5em");else d.setAttribute("columnspacing","1em");var B="",O=t.hLinesBeforeRow;p+=O[0].length>0?"left ":"",p+=O[O.length-1].length>0?"right ":"";for(var H=1;H<O.length-1;H++)B+=O[H].length===0?"none ":O[H][0]?"dashed ":"solid ";if(/[sd]/.test(B))d.setAttribute("rowlines",B.trim());if(p!=="")d=new ie("menclose",[d]),d.setAttribute("notation",p.trim());if(t.arraystretch&&t.arraystretch<1)d=new ie("mstyle",[d]),d.setAttribute("scriptlevel","1");return d},Ud=function(t,n){if(!t.envName.includes("ed"))Ro(t);var r=[],s=t.envName==="split",i=hr(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:Ll(t.envName),emptySingleRow:!0,colSeparationType:t.envName.includes("at")?"alignat":"align",maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),o=0,a=0,l={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){var u="Number of columns should be a positive integer",d=Ml(n[0],u);if(!/^[0-9]+$/.test(d)||Number(d)<1)throw new se(u,n[0]);o=Number(d),a=o*2}var h=!a;i.body.forEach(function(x){for(var k=1;k<x.length;k+=2){var E=Ie(x[k],"styling"),T=Ie(E.body[0],"ordgroup");T.body.unshift(l)}if(!h){var _=x.length/2;if(o<_)throw new se("Too many math in a row: "+("expected "+o+", but got "+_),x[0])}else if(a<x.length)a=x.length});for(var p=0;p<a;++p){var g="r",b=0;if(p%2===1)g="l";else if(p>0&&h)b=1;r[p]={type:"align",align:g,pregap:b,postgap:0}}return i.colSeparationType=h?"align":"alignat",i};vn({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=_o(t[0]),r=n?[t[0]]:Ie(t[0],"ordgroup").body,s=r.map(function(o){var a=Co(o),l=a.text;if("lcr".includes(l))return{type:"align",align:l};else if(l==="|")return{type:"separator",separator:"|"};else if(l===":")return{type:"separator",separator:":"};throw new se("Unknown column alignment: "+l,o)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return hr(e.parser,i,Il(e.envName))},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),n=s.fetch().text,!"lcr".includes(n))throw new se("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:n}]}}var i=hr(e.parser,r,Il(e.envName)),o=Math.max(0,...i.body.map((a)=>a.length));return i.cols=Array(o).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:0.5},n=hr(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=_o(t[0]),r=n?[t[0]]:Ie(t[0],"ordgroup").body,s=r.map(function(a){var l=Co(a),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new se("Unknown column alignment: "+u,a)});if(s.length>1)throw new se("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:0.5},o=hr(e.parser,i,"script");if(o.body.length>0&&o.body[0].length>1)throw new se("{subarray} can contain only one column");return o},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=hr(e.parser,t,Il(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Ud,htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){if(mb.has(e.envName))Ro(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ll(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return hr(e.parser,t,"display")},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Ud,htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Ro(e);var t={autoTag:Ll(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return hr(e.parser,t,"display")},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Ro(e),X2(e.parser)},htmlBuilder:yn,mathmlBuilder:kn});w("\\nonumber","\\gdef\\@eqnsw{0}");w("\\notag","\\nonumber");he({type:"text",names:["\\hline","\\hdashline"],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new se(e.funcName+" valid only within array environment")}});var Zu=Hd;he({type:"environment",names:["\\begin","\\end"],numArgs:1,argTypes:["text"],handler(e,t){var{parser:n,funcName:r}=e,s=t[0];if(s.type!=="ordgroup")throw new se("Invalid environment name",s);var i=Ml(s,"Environment name should contain only text characters and spaces",!0);if(r==="\\begin"){if(!Object.prototype.hasOwnProperty.call(Zu,i))throw new se("No such environment: "+i,s);var o=Zu[i],a=n.parseArguments("\\begin{"+i+"}",o),{args:l,optArgs:u}=a,d={mode:n.mode,envName:i,parser:n},h=o.handler(d,l,u);n.expect("\\end",!1);var p=n.nextToken,g=Ie(n.parseFunction(),"environment");if(g.name!==i)throw new se("Mismatch: \\begin{"+i+"} matched by \\end{"+g.name+"}",p);return h}return{type:"environment",mode:n.mode,name:i,nameGroup:s}}});var gb=(e,t)=>{var n=e.font,r=t.withFont(n);return ze(e.body,r)},bb=(e,t)=>{var n=e.font,r=t.withFont(n);return je(e.body,r)},Yu={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};he({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=ci(t[0]),i=r in Yu?Yu[r]:r;return{type:"font",mode:n.mode,font:i.slice(1),body:s}},htmlBuilder:gb,mathmlBuilder:bb});he({type:"mclass",names:["\\boldsymbol","\\bm"],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"mclass",mode:n.mode,mclass:So(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:Hn(r)}}});he({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],numArgs:0,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:s}=e,i=n.mode,o=n.parseExpression(!0,s);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:o}}}});var vb=(e,t)=>{var n=t.style,r=n.fracNum(),s=n.fracDen(),i;i=t.havingStyle(r);var o=ze(e.numer,i,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height<a?a:o.height,o.depth=o.depth<l?l:o.depth}i=t.havingStyle(s);var u=ze(e.denom,i,t),d,h,p;if(e.hasBarLine){if(e.barSize)h=rt(e.barSize,t),d=ms("frac-line",t,h);else d=ms("frac-line",t);h=d.height,p=d.height}else d=null,h=0,p=t.fontMetrics().defaultRuleThickness;var g,b,x;if(n.size===De.DISPLAY.size){if(g=t.fontMetrics().num1,h>0)b=3*p;else b=7*p;x=t.fontMetrics().denom1}else{if(h>0)g=t.fontMetrics().num2,b=p;else g=t.fontMetrics().num3,b=3*p;x=t.fontMetrics().denom2}var k;if(!d){var E=g-o.depth-(u.height-x);if(E<b)g+=0.5*(b-E),x+=0.5*(b-E);k=qe({positionType:"individualShift",children:[{type:"elem",elem:u,shift:x},{type:"elem",elem:o,shift:-g}]})}else{var T=t.fontMetrics().axisHeight;if(g-o.depth-(T+0.5*h)<b)g+=b-(g-o.depth-(T+0.5*h));if(T-0.5*h-(u.height-x)<b)x+=b-(T-0.5*h-(u.height-x));var _=-(T-0.5*h);k=qe({positionType:"individualShift",children:[{type:"elem",elem:u,shift:x},{type:"elem",elem:d,shift:_},{type:"elem",elem:o,shift:-g}]})}i=t.havingStyle(n),k.height*=i.sizeMultiplier/t.sizeMultiplier,k.depth*=i.sizeMultiplier/t.sizeMultiplier;var A;if(n.size===De.DISPLAY.size)A=t.fontMetrics().delim1;else if(n.size===De.SCRIPTSCRIPT.size)A=t.havingStyle(De.SCRIPT).fontMetrics().delim2;else A=t.fontMetrics().delim2;var D,R;if(e.leftDelim==null)D=ui(t,["mopen"]);else D=vl(e.leftDelim,A,!0,t.havingStyle(n),e.mode,["mopen"]);if(e.continued)R=ee([]);else if(e.rightDelim==null)R=ui(t,["mclose"]);else R=vl(e.rightDelim,A,!0,t.havingStyle(n),e.mode,["mclose"]);return ee(["mord"].concat(i.sizingClasses(t)),[D,ee(["mfrac"],[k]),R],t)},yb=(e,t)=>{var n=new ie("mfrac",[je(e.numer,t),je(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=rt(e.barSize,t);n.setAttribute("linethickness",ce(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new ie("mo",[new lt(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(n),e.rightDelim!=null){var o=new ie("mo",[new lt(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}return Tl(s)}return n},Wd=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};he({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0],i=t[1],o,a=null,l=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,a="(",l=")";break;case"\\\\bracefrac":o=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":o=!1,a="[",l="]";break;default:throw Error("Unrecognized genfrac command")}var u=r==="\\cfrac",d=null;if(u||r.startsWith("\\d"))d="display";else if(r.startsWith("\\t"))d="text";return Wd({type:"genfrac",mode:n.mode,numer:s,denom:i,continued:u,hasBarLine:o,leftDelim:a,rightDelim:l,barSize:null},d)},htmlBuilder:vb,mathmlBuilder:yb});he({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],numArgs:0,infix:!0,handler(e){var{parser:t,funcName:n,token:r}=e,s;switch(n){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:s,token:r}}});var Xu=["display","text","script","scriptscript"],Qu=function(t){var n=null;if(t.length>0)n=t,n=n==="."?null:n;return n};he({type:"genfrac",names:["\\genfrac"],numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"],handler(e,t){var n=e.parser,r=t[4],s=t[5],i=ci(t[0]),o=i.type==="atom"&&i.family==="open"?Qu(i.text):null,a=ci(t[1]),l=a.type==="atom"&&a.family==="close"?Qu(a.text):null,u=Ie(t[2],"size"),d,h=null;if(u.isBlank)d=!0;else h=u.value,d=h.number>0;var p=null,g=t[3];if(g.type==="ordgroup"){if(g.body.length>0){var b=Ie(g.body[0],"textord");p=Xu[Number(b.text)]}}else g=Ie(g,"textord"),p=Xu[Number(g.text)];return Wd({type:"genfrac",mode:n.mode,numer:r,denom:s,continued:!1,hasBarLine:d,barSize:h,leftDelim:o,rightDelim:l},p)}});he({type:"infix",names:["\\above"],numArgs:1,argTypes:["size"],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Ie(t[0],"size").value,token:r}}});he({type:"genfrac",names:["\\\\abovefrac"],numArgs:3,argTypes:["math","size","math"],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],s=Ie(t[1],"infix").size;if(!s)throw Error("\\\\abovefrac expected size, but got "+String(s));var i=t[2],o=s.number>0;return{type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null}}});var jd=(e,t)=>{var n=t.style,r,s;if(e.type==="supsub")r=e.sup?ze(e.sup,t.havingStyle(n.sup()),t):ze(e.sub,t.havingStyle(n.sub()),t),s=Ie(e.base,"horizBrace");else s=Ie(e,"horizBrace");var i=ze(s.base,t.havingBaseStyle(De.DISPLAY)),o=Ao(s,t),a;if(s.isOver)a=qe({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:0.1},{type:"elem",elem:o,wrapperClasses:["svg-align"]}]});else a=qe({positionType:"bottom",positionData:i.depth+0.1+o.height,children:[{type:"elem",elem:o,wrapperClasses:["svg-align"]},{type:"kern",size:0.1},{type:"elem",elem:i}]});if(r){var l=ee(["minner",s.isOver?"mover":"munder"],[a],t);if(s.isOver)a=qe({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:0.2},{type:"elem",elem:r}]});else a=qe({positionType:"bottom",positionData:l.depth+0.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:0.2},{type:"elem",elem:l}]})}return ee(["minner",s.isOver?"mover":"munder"],[a],t)};var kb=(e,t)=>{var n=Eo(e.label);return new ie(e.isOver?"mover":"munder",[je(e.base,t),n])};he({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:r.includes("\\over"),base:t[0]}},htmlBuilder:jd,mathmlBuilder:kb});he({type:"href",names:["\\href"],numArgs:2,argTypes:["url","original"],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],s=Ie(t[0],"url").url;if(!n.settings.isTrusted({command:"\\href",url:s}))return n.formatUnsupportedCmd("\\href");return{type:"href",mode:n.mode,href:s,body:ut(r)}},htmlBuilder:(e,t)=>{var n=gt(e.body,t,!1);return x2(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=fr(e.body,t);if(!(n instanceof ie))n=new ie("mrow",[n]);return n.setAttribute("href",e.href),n}});he({type:"href",names:["\\url"],numArgs:1,argTypes:["url"],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=Ie(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");var s=[];for(var i=0;i<r.length;i++){var o=r[i];if(o==="~")o="\\textasciitilde";s.push({type:"textord",mode:"text",text:o})}var a={type:"text",mode:n.mode,font:"\\texttt",body:s};return{type:"href",mode:n.mode,href:r,body:ut(a)}}});he({type:"hbox",names:["\\hbox"],numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0,handler(e,t){var n=e.parser;return{type:"hbox",mode:n.mode,body:ut(t[0])}},htmlBuilder(e,t){var n=gt(e.body,t.withFont(""),!1);return Un(n)},mathmlBuilder(e,t){return new ie("mrow",Jt(e.body,t.withFont("")))}});he({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],numArgs:2,argTypes:["raw","original"],allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e;e.token;var s=Ie(t[0],"raw").string,i=t[1];if(n.settings.strict)Ft({strict:n.settings.strict,errorCode:"htmlExtension",errorMsg:"HTML extension is disabled on strict mode",report:!0});var o,a={};switch(r){case"\\htmlClass":a.class=s,o={command:"\\htmlClass",class:s};break;case"\\htmlId":a.id=s,o={command:"\\htmlId",id:s};break;case"\\htmlStyle":a.style=s,o={command:"\\htmlStyle",style:s};break;case"\\htmlData":{var l="{,}",u=[],d="";for(var h=0;h<s.length;h++)if(s.startsWith(l,h))d+=",",h+=l.length-1;else if(s[h]===",")u.push(d),d="";else d+=s[h];u.push(d);for(var p=0;p<u.length;p++){var g=u[p],b=g.indexOf("=");if(b<0)throw new se("\\htmlData key/value '"+g+"' missing equals sign");var x=g.slice(0,b),k=g.slice(b+1);a["data-"+x.trim()]=k}o={command:"\\htmlData",attributes:a};break}default:throw Error("Unrecognized html command")}if(!n.settings.isTrusted(o))return n.formatUnsupportedCmd(r);return{type:"html",mode:n.mode,attributes:a,body:ut(i)}},htmlBuilder:(e,t)=>{var n=gt(e.body,t,!1),r=["enclosing"];if(e.attributes.class)r.push(...e.attributes.class.trim().split(/\s+/));var s=ee(r,n,t);for(var i of Object.entries(e.attributes)){var o=i[0],a=i[1];if(o!=="class")s.setAttribute(o,a)}return s},mathmlBuilder:(e,t)=>fr(e.body,t)});he({type:"htmlmathml",names:["\\html@mathml"],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>{var n=e.parser;return{type:"htmlmathml",mode:n.mode,html:ut(t[0]),mathml:ut(t[1])}},htmlBuilder:(e,t)=>{var n=gt(e.html,t,!1);return Un(n)},mathmlBuilder:(e,t)=>fr(e.mathml,t)});var tl=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};else{var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new se("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!md(r))throw new se("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r}};he({type:"includegraphics",names:["\\includegraphics"],numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,s={number:0,unit:"em"},i={number:0.9,unit:"em"},o={number:0,unit:"em"},a="";if(n[0]){var l=Ie(n[0],"raw").string,u=l.split(",");for(var d=0;d<u.length;d++){var h=u[d].split("=");if(h.length===2){var p=h[1].trim();switch(h[0].trim()){case"alt":a=p;break;case"width":s=tl(p);break;case"height":i=tl(p);break;case"totalheight":o=tl(p);break;default:throw new se("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}}var g=Ie(t[0],"url").url;if(a==="")a=g,a=a.replace(/^.*[\\/]/,""),a=a.substring(0,a.lastIndexOf("."));if(!r.settings.isTrusted({command:"\\includegraphics",url:g}))return r.formatUnsupportedCmd("\\includegraphics");return{type:"includegraphics",mode:r.mode,alt:a,width:s,height:i,totalheight:o,src:g}},htmlBuilder:(e,t)=>{var n=rt(e.height,t),r=0;if(e.totalheight.number>0)r=rt(e.totalheight,t)-n;var s=0;if(e.width.number>0)s=rt(e.width,t);var i={height:ce(n+r)};if(s>0)i.width=ce(s);if(r>0)i.verticalAlign=ce(-r);var o=new vd(e.src,e.alt,i);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new ie("mglyph",[]);n.setAttribute("alt",e.alt);var r=rt(e.height,t),s=0;if(e.totalheight.number>0)s=rt(e.totalheight,t)-r,n.setAttribute("valign",ce(-s));if(n.setAttribute("height",ce(r+s)),e.width.number>0){var i=rt(e.width,t);n.setAttribute("width",ce(i))}return n.setAttribute("src",e.src),n}});he({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,s=Ie(t[0],"size");if(n.settings.strict){var i=r[1]==="m",o=s.value.unit==="mu";if(i){if(!o)Ft({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" supports only mu units, "+("not "+s.value.unit+" units"),report:!0});if(n.mode!=="math")Ft({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" works only in math mode",report:!0})}else if(o)Ft({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" doesn't support mu units",report:!0})}return{type:"kern",mode:n.mode,dimension:s.value}},htmlBuilder(e,t){return wd(e.dimension,t)},mathmlBuilder(e,t){var n=rt(e.dimension,t);return new Sl(n)}});he({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,t)=>{var n;if(e.alignment==="clap")n=ee([],[ze(e.body,t)]),n=ee(["katex-inner"],[n],t);else n=ee(["katex-inner"],[ze(e.body,t)]);var r=ee(["katex-fix"],[]),s=ee([e.alignment],[n,r],t),i=ee(["katex-strut"]);if(i.style.height=ce(s.height+s.depth),s.depth)i.style.verticalAlign=ce(-s.depth);return s.children.unshift(i),s=ee(["katex-thinbox"],[s],t),ee(["mord","katex-vbox"],[s],t)},mathmlBuilder:(e,t)=>{var n=new ie("mpadded",[je(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});he({type:"styling",names:["\\(","$"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var{funcName:n,parser:r}=e,s=r.mode;r.switchMode("math");var i=n==="\\("?"\\)":"$",o=r.parseExpression(!1,i);return r.expect(i),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:o}}});he({type:"text",names:["\\)","\\]"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new se("Mismatched "+e.funcName)}});var ed=(e,t)=>{switch(t.style.size){case De.DISPLAY.size:return e.display;case De.TEXT.size:return e.text;case De.SCRIPT.size:return e.script;case De.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};he({type:"mathchoice",names:["\\mathchoice"],numArgs:4,primitive:!0,handler:(e,t)=>{var n=e.parser;return{type:"mathchoice",mode:n.mode,display:ut(t[0]),text:ut(t[1]),script:ut(t[2]),scriptscript:ut(t[3])}},htmlBuilder:(e,t)=>{var n=ed(e,t),r=gt(n,t,!1);return Un(r)},mathmlBuilder:(e,t)=>{var n=ed(e,t);return fr(n,t)}});var Gd=(e,t,n,r,s,i,o)=>{e=ee([],[e]);var a=n&&Hn(n),l,u;if(t){var d=ze(t,r.havingStyle(s.sup()),r);u={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var h=ze(n,r.havingStyle(s.sub()),r);l={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}var p;if(u&&l){var g=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;p=qe({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ce(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ce(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(l){var b=e.height-o;p=qe({positionType:"top",positionData:b,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ce(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var x=e.depth+o;p=qe({positionType:"bottom",positionData:x,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ce(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var k=[p];if(l&&i!==0&&!a){var E=ee(["mspace"],[],r);E.style.marginRight=ce(i),k.unshift(E)}return ee(["mop","op-limits"],k,r)},Kd=new Set(["\\smallint"]),Vd=(e,t)=>{var n,r,s=!1,i;if(e.type==="supsub")n=e.sup,r=e.sub,i=Ie(e.base,"op"),s=!0;else i=Ie(e,"op");var o=t.style,a=!1;if(o.size===De.DISPLAY.size&&i.symbol&&!Kd.has(i.name))a=!0;var l,u;if(i.symbol){var d=a?"Size2-Regular":"Size1-Regular",h="";if(i.name==="\\oiint"||i.name==="\\oiiint")h=i.name.slice(1),i.name=h==="oiint"?"\\iint":"\\iiint";if(l=Dt(i.name,d,"math",t,["mop","op-symbol",a?"large-op":"small-op"]),u=l.italic,h.length>0){var p=Ed(h+"Size"+(a?"2":"1"),t);l=qe({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:a?0.08:0}]}),i.name="\\"+h,l.classes.unshift("mop"),l.italic=u}}else if(i.body){var g=gt(i.body,t,!0);if(g.length===1&&g[0]instanceof qt)l=g[0],l.classes[0]="mop";else l=ee(["mop"],g,t)}else{var b=[];for(var x=1;x<i.name.length;x++)b.push(Cl(i.name[x],i.mode,t));l=ee(["mop"],b,t)}var k=0,E=0;if((l instanceof qt||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift){var T;k=(l.height-l.depth)/2-t.fontMetrics().axisHeight,E=(T=l.italic)!=null?T:0}if(s)return Gd(l,n,r,t,o,E,k);else{if(k)l.style.position="relative",l.style.top=ce(k);return l}},wb=(e,t)=>{var n;if(e.symbol){if(n=new ie("mo",[en(e.name,e.mode)]),Kd.has(e.name))n.setAttribute("largeop","false")}else if(e.body)n=new ie("mo",Jt(e.body,t));else{n=new ie("mi",[new lt(e.name.slice(1))]);var r=new ie("mo",[en("⁡","text")]);if(e.parentIsSupSub)n=new ie("mrow",[n,r]);else n=_d([n,r])}return n},xb={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};he({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],numArgs:0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=r;if(s.length===1)s=xb[s];return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:Vd,mathmlBuilder:wb});he({type:"op",names:["\\mathop"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ut(r)}}});var Eb={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};he({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}});he({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}});he({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],numArgs:0,allowedInArgument:!0,handler(e){var{parser:t,funcName:n}=e,r=n;if(r.length===1)r=Eb[r];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}}});var Jd=(e,t)=>{var n,r,s=!1,i;if(e.type==="supsub")n=e.sup,r=e.sub,i=Ie(e.base,"operatorname"),s=!0;else i=Ie(e,"operatorname");var o;if(i.body.length>0){var a=i.body.map((h)=>{var p="text"in h?h.text:void 0;if(typeof p==="string")return{type:"textord",mode:h.mode,text:p};else return h}),l=gt(a,t.withFont("mathrm"),!0);for(var u=0;u<l.length;u++){var d=l[u];if(d instanceof qt)d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*")}o=ee(["mop"],l,t)}else o=ee(["mop"],[],t);if(s)return Gd(o,n,r,t,t.style,0,0);else return o},Ab=(e,t)=>{var n=Jt(e.body,t.withFont("mathrm")),r=!0;for(var s=0;s<n.length;s++){var i=n[s];if(i instanceof Sl);else if(i instanceof ie)switch(i.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var o=i.children[0];if(i.children.length===1&&o instanceof lt)o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*");else r=!1;break}default:r=!1}else r=!1}if(r){var a=n.map((d)=>d.toText()).join("");n=[new lt(a)]}var l=new ie("mi",n);l.setAttribute("mathvariant","normal");var u=new ie("mo",[en("⁡","text")]);if(e.parentIsSupSub)return new ie("mrow",[l,u]);else return _d([l,u])};he({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"operatorname",mode:n.mode,body:ut(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Jd,mathmlBuilder:Ab});w("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");$r({type:"ordgroup",htmlBuilder(e,t){if(e.semisimple)return Un(gt(e.body,t,!1));return ee(["mord"],gt(e.body,t,!0),t)},mathmlBuilder(e,t){return fr(e.body,t,!0)}});he({type:"overline",names:["\\overline"],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=ze(e.body,t.havingCrampedStyle()),r=ms("overline-line",t),s=t.fontMetrics().defaultRuleThickness,i=qe({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return ee(["mord","katex-overline"],[i],t)},mathmlBuilder(e,t){var n=new ie("mo",[new lt("‾")]);n.setAttribute("stretchy","true");var r=new ie("mover",[je(e.body,t),n]);return r.setAttribute("accent","true"),r}});he({type:"phantom",names:["\\phantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"phantom",mode:n.mode,body:ut(r)}},htmlBuilder:(e,t)=>{var n=gt(e.body,t.withPhantom(),!1);return Un(n)},mathmlBuilder:(e,t)=>{var n=Jt(e.body,t);return new ie("mphantom",n)}});w("\\hphantom","\\smash{\\phantom{#1}}");he({type:"vphantom",names:["\\vphantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=ee(["katex-inner"],[ze(e.body,t.withPhantom())]),r=ee(["katex-fix"],[]);return ee(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=Jt(ut(e.body),t),r=new ie("mphantom",n),s=new ie("mpadded",[r]);return s.setAttribute("width","0px"),s}});he({type:"raisebox",names:["\\raisebox"],numArgs:2,argTypes:["size","hbox"],allowedInText:!0,handler(e,t){var n=e.parser,r=Ie(t[0],"size").value,s=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:s}},htmlBuilder(e,t){var n=ze(e.body,t),r=rt(e.dy,t);return qe({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ie("mpadded",[je(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});var Zd=(e,t)=>{var n=e.parser;return{type:"reflectbox",mode:n.mode,body:t[0]}};he({type:"reflectbox",names:["\\reflectbox"],numArgs:1,argTypes:["hbox"],allowedInText:!0,handler:Zd,htmlBuilder(e,t){return ee(["mord","reflectbox"],[ze(e.body,t)],t)},mathmlBuilder(e,t){return je(e.body,t)}});he({type:"reflectbox",names:["\\mathreflectbox"],numArgs:1,argTypes:["math"],handler:Zd});he({type:"internal",names:["\\relax"],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){var t=e.parser;return{type:"internal",mode:t.mode}}});he({type:"rule",names:["\\rule"],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"],handler(e,t,n){var r=e.parser,s=n[0],i=Ie(t[0],"size"),o=Ie(t[1],"size");return{type:"rule",mode:r.mode,shift:s&&Ie(s,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var n=ee(["mord","katex-rule"],[],t),r=rt(e.width,t),s=rt(e.height,t),i=e.shift?rt(e.shift,t):0;return n.style.borderRightWidth=ce(r),n.style.borderTopWidth=ce(s),n.style.bottom=ce(i),n.width=r,n.height=s+i,n.depth=-i,n.maxFontSize=s*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=rt(e.width,t),r=rt(e.height,t),s=e.shift?rt(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new ie("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",ce(n)),o.setAttribute("height",ce(r));var a=new ie("mpadded",[o]);if(s>=0)a.setAttribute("height",ce(s));else a.setAttribute("height",ce(s)),a.setAttribute("depth",ce(-s));return a.setAttribute("voffset",ce(s)),a}});function Yd(e,t,n){var r=gt(e,t,!1),s=t.sizeMultiplier/n.sizeMultiplier;for(var i=0;i<r.length;i++){var o=r[i].classes.indexOf("katex-sizing");if(o<0)Array.prototype.push.apply(r[i].classes,t.sizingClasses(n));else if(r[i].classes[o+1]==="reset-size"+t.size)r[i].classes[o+1]="reset-size"+n.size;r[i].height*=s,r[i].depth*=s}return Un(r)}var td=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Cb=(e,t)=>{var n=t.havingSize(e.size);return Yd(e.body,n,t)};he({type:"sizing",names:td,numArgs:0,allowedInText:!0,handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:s}=e,i=s.parseExpression(!1,n);return{type:"sizing",mode:s.mode,size:td.indexOf(r)+1,body:i}},htmlBuilder:Cb,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=Jt(e.body,n),s=new ie("mstyle",r);return s.setAttribute("mathsize",ce(n.sizeMultiplier)),s}});he({type:"smash",names:["\\smash"],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,s=!1,i=!1,o=n[0]&&Ie(n[0],"ordgroup");if(o){var a;for(var l=0;l<o.body.length;++l){var u=o.body[l];if(a=Co(u).text,a==="t")s=!0;else if(a==="b")i=!0;else{s=!1,i=!1;break}}}else s=!0,i=!0;var d=t[0];return{type:"smash",mode:r.mode,body:d,smashHeight:s,smashDepth:i}},htmlBuilder:(e,t)=>{var n=ee([],[ze(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight)n.height=0;if(e.smashDepth)n.depth=0;if(e.smashHeight&&e.smashDepth)return ee(["mord","katex-smash"],[n],t);if(n.children)for(var r=0;r<n.children.length;r++){if(e.smashHeight)n.children[r].height=0;if(e.smashDepth)n.children[r].depth=0}var s=qe({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return ee(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var n=new ie("mpadded",[je(e.body,t)]);if(e.smashHeight)n.setAttribute("height","0px");if(e.smashDepth)n.setAttribute("depth","0px");return n}});he({type:"sqrt",names:["\\sqrt"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,s=n[0],i=t[0];return{type:"sqrt",mode:r.mode,body:i,index:s}},htmlBuilder(e,t){var n=ze(e.body,t.havingCrampedStyle());if(n.height===0)n.height=t.fontMetrics().xHeight;n=ps(n,t);var r=t.fontMetrics(),s=r.defaultRuleThickness,i=s;if(t.style.id<De.TEXT.id)i=t.fontMetrics().xHeight;var o=s+i/4,a=n.height+n.depth+o+s,l=ob(a,t),{span:u,ruleWidth:d,advanceWidth:h}=l,p=u.height-d;if(p>n.height+n.depth+o)o=(o+p-n.height-n.depth)/2;var g=u.height-n.height-o-d;n.style.paddingLeft=ce(h);var b=qe({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+g)},{type:"elem",elem:u},{type:"kern",size:d}]});if(!e.index)return ee(["mord","sqrt"],[b],t);else{var x=t.havingStyle(De.SCRIPTSCRIPT),k=ze(e.index,x,t),E=0.6*(b.height-b.depth),T=qe({positionType:"shift",positionData:-E,children:[{type:"elem",elem:k}]}),_=ee(["katex-root"],[T]);return ee(["mord","sqrt"],[_,b],t)}},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new ie("mroot",[je(n,t),je(r,t)]):new ie("msqrt",[je(n,t)])}});var yl={display:De.DISPLAY,text:De.TEXT,script:De.SCRIPT,scriptscript:De.SCRIPTSCRIPT};function _b(e){return e in yl}he({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var{breakOnTokenText:n,funcName:r,parser:s}=e,i=s.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!_b(o))throw Error("Unknown style: "+o);return{type:"styling",mode:s.mode,style:o,body:i}},htmlBuilder(e,t){var n=yl[e.style],r=t.havingStyle(n);if(e.resetFont)r=r.withFont("");return Yd(e.body,r,t)},mathmlBuilder(e,t){var n=yl[e.style],r=t.havingStyle(n);if(e.resetFont)r=r.withFont("");var s=Jt(e.body,r),i=new ie("mstyle",s),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},a=o[e.style];return i.setAttribute("scriptlevel",a[0]),i.setAttribute("displaystyle",a[1]),i}});var Sb=function(t,n){var r=t.base;if(!r)return null;else if(r.type==="op"){var s=r.limits&&(n.style.size===De.DISPLAY.size||r.alwaysHandleSupSub);return s?Vd:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(n.style.size===De.DISPLAY.size||r.limits);return i?Jd:null}else if(r.type==="accent")return Hn(r.base)?Md:null;else if(r.type==="horizBrace"){var o=!t.sub;return o===r.isOver?jd:null}else return null};$r({type:"supsub",htmlBuilder(e,t){var n=Sb(e,t);if(n)return n(e,t);var{base:r,sup:s,sub:i}=e,o=ze(r,t),a,l,u=t.fontMetrics(),d=0,h=0,p=r&&Hn(r);if(s){var g=t.havingStyle(t.style.sup());if(a=ze(s,g,t),!p)d=o.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier}if(i){var b=t.havingStyle(t.style.sub());if(l=ze(i,b,t),!p)h=o.depth+b.fontMetrics().subDrop*b.sizeMultiplier/t.sizeMultiplier}var x;if(t.style===De.DISPLAY)x=u.sup1;else if(t.style.cramped)x=u.sup3;else x=u.sup2;var k=t.sizeMultiplier,E=ce(0.5/u.ptPerEm/k),T=null;if(l){var _=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(o instanceof qt||_){var A;T=ce(-((A=o.italic)!=null?A:0))}}var D;if(a&&l){d=Math.max(d,x,a.depth+0.25*u.xHeight),h=Math.max(h,u.sub2);var R=u.defaultRuleThickness,L=4*R;if(d-a.depth-(l.height-h)<L){h=L-(d-a.depth)+l.height;var B=0.8*u.xHeight-(d-a.depth);if(B>0)d+=B,h-=B}var O=[{type:"elem",elem:l,shift:h,marginRight:E,marginLeft:T},{type:"elem",elem:a,shift:-d,marginRight:E}];D=qe({positionType:"individualShift",children:O})}else if(l){h=Math.max(h,u.sub1,l.height-0.8*u.xHeight);var H=[{type:"elem",elem:l,marginLeft:T,marginRight:E}];D=qe({positionType:"shift",positionData:h,children:H})}else if(a)d=Math.max(d,x,a.depth+0.25*u.xHeight),D=qe({positionType:"shift",positionData:-d,children:[{type:"elem",elem:a,marginRight:E}]});else throw Error("supsub must have either sup or sub.");var K=ml(o,"right")||"mord";return ee([K],[o,ee(["msupsub"],[D])],t)},mathmlBuilder(e,t){var n=!1,r,s;if(e.base&&e.base.type==="horizBrace"){if(s=!!e.sup,s===e.base.isOver)n=!0,r=e.base.isOver}if(e.base&&(e.base.type==="op"||e.base.type==="operatorname"))e.base.parentIsSupSub=!0;var i=[je(e.base,t)];if(e.sub)i.push(je(e.sub,t));if(e.sup)i.push(je(e.sup,t));var o;if(n)o=r?"mover":"munder";else if(!e.sub){var a=e.base;if(a&&a.type==="op"&&a.limits&&(t.style===De.DISPLAY||a.alwaysHandleSupSub))o="mover";else if(a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||t.style===De.DISPLAY))o="mover";else o="msup"}else if(!e.sup){var l=e.base;if(l&&l.type==="op"&&l.limits&&(t.style===De.DISPLAY||l.alwaysHandleSupSub))o="munder";else if(l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===De.DISPLAY))o="munder";else o="msub"}else{var u=e.base;if(u&&u.type==="op"&&u.limits&&t.style===De.DISPLAY)o="munderover";else if(u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===De.DISPLAY||u.limits))o="munderover";else o="msubsup"}return new ie(o,i)}});$r({type:"atom",htmlBuilder(e,t){return Cl(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new ie("mo",[en(e.text,e.mode)]);if(e.family==="bin"){var r=Rl(e,t);if(r==="bold-italic")n.setAttribute("mathvariant",r)}else if(e.family==="punct")n.setAttribute("separator","true");else if(e.family==="open"||e.family==="close")n.setAttribute("stretchy","false");return n}});var Xd={mi:"italic",mn:"normal",mtext:"normal"};$r({type:"mathord",htmlBuilder(e,t){return xo(e,t)},mathmlBuilder(e,t){var n=new ie("mi",[en(e.text,e.mode,t)]),r=Rl(e,t)||"italic";if(r!==Xd[n.type])n.setAttribute("mathvariant",r);return n}});$r({type:"textord",htmlBuilder(e,t){return xo(e,t)},mathmlBuilder(e,t){var n=en(e.text,e.mode,t),r=Rl(e,t)||"normal",s;if(e.mode==="text")s=new ie("mtext",[n]);else if(/[0-9]/.test(e.text))s=new ie("mn",[n]);else if(e.text==="\\prime")s=new ie("mo",[n]);else s=new ie("mi",[n]);if(r!==Xd[s.type])s.setAttribute("mathvariant",r);return s}});var nd=new Map([["\\nobreak","nobreak"],["\\allowbreak","allowbreak"]]),rd=new Map([[" ",{}],["\\ ",{}],["~",{className:"nobreak"}],["\\space",{}],["\\nobreakspace",{className:"nobreak"}]]);$r({type:"spacing",htmlBuilder(e,t){var n=rd.get(e.text),r=nd.get(e.text);if(n){var s=n.className||"";if(e.mode==="text"){var i=xo(e,t);return i.classes.push(s),i}else return ee(["mspace",s],[Cl(e.text,e.mode,t)],t)}else if(r)return ee(["mspace",r],[],t);else throw new se('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){var n;if(rd.has(e.text))n=new ie("mtext",[new lt(" ")]);else if(nd.has(e.text))return new ie("mspace");else throw new se('Unknown type of space "'+e.text+'"');return n}});var sd=()=>{var e=new ie("mtd",[]);return e.setAttribute("width","50%"),e};$r({type:"tag",mathmlBuilder(e,t){var n=new ie("mtable",[new ie("mtr",[sd(),new ie("mtd",[fr(e.body,t)]),sd(),new ie("mtd",[fr(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var id={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},od={"\\textbf":"textbf","\\textmd":"textmd"},Tb={"\\textit":"textit","\\textup":"textup"},ad=(e,t)=>{var n=e.font;if(!n)return t;else if(id[n])return t.withTextFontFamily(id[n]);else if(od[n])return t.withTextFontWeight(od[n]);else if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit");return t.withTextFontShape(Tb[n])};he({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"text",mode:n.mode,body:ut(s),font:r}},htmlBuilder(e,t){var n=ad(e,t),r=gt(e.body,n,!0);return ee(["mord","text"],r,n)},mathmlBuilder(e,t){var n=ad(e,t);return fr(e.body,n)}});he({type:"underline",names:["\\underline"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=ze(e.body,t),r=ms("underline-line",t),s=t.fontMetrics().defaultRuleThickness,i=qe({positionType:"top",positionData:n.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:n}]});return ee(["mord","katex-underline"],[i],t)},mathmlBuilder(e,t){var n=new ie("mo",[new lt("‾")]);n.setAttribute("stretchy","true");var r=new ie("munder",[je(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});he({type:"vcenter",names:["\\vcenter"],numArgs:1,argTypes:["original"],allowedInText:!1,handler(e,t){var n=e.parser;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=ze(e.body,t),r=t.fontMetrics().axisHeight,s=0.5*(n.height-r-(n.depth+r));return qe({positionType:"shift",positionData:s,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ie("mpadded",[je(e.body,t)],["vcenter"]);return new ie("mrow",[n])}});he({type:"verb",names:["\\verb"],numArgs:0,allowedInText:!0,handler(e,t,n){throw new se("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){var n=ld(e),r=[],s=t.havingStyle(t.style.text());for(var i=0;i<n.length;i++){var o=n[i];if(o==="~")o="\\textasciitilde";r.push(Dt(o,"Typewriter-Regular",e.mode,s,["mord","texttt"]))}return ee(["mord","text"].concat(s.sizingClasses(t)),kd(r),s)},mathmlBuilder(e,t){var n=new lt(ld(e)),r=new ie("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var ld=(e)=>e.body.replace(/ /g,e.star?"␣":" "),cr=Ad,Qd=`[ \r
280
+ ]`,Rb="\\\\[a-zA-Z@]+",Mb="\\\\[^\uD800-\uDFFF]",Db="("+Rb+")"+Qd+"*",Lb=`\\\\(
281
281
  |[ \r ]+
282
- ?)[ \r ]*`,Qo="[̀-ͯ]",O2=new RegExp(Qo+"+$"),z2="("+wd+"+)|"+(B2+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Qo+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Qo+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+N2)+("|"+I2+")");class el{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(z2,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Pt("EOF",new Bt(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new te("Unexpected character: '"+e[t]+"'",new Pt(e[t],new Bt(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[r]===14){var s=e.indexOf(`
283
- `,this.tokenRegex.lastIndex);if(s===-1)this.tokenRegex.lastIndex=e.length,Ot({strict:this.settings.strict,errorCode:"commentAtEnd",errorMsg:"% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)",report:!0});else this.tokenRegex.lastIndex=s+1;return this.lex()}return new Pt(r,new Bt(this,t,this.tokenRegex.lastIndex))}}class kd{constructor(e,t){if(e===void 0)e={};if(t===void 0)t={};this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new te("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t of Object.keys(e))if(e[t]===void 0)delete this.current[t];else this.current[t]=e[t]}endGroups(){while(this.undefStack.length>0)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];else if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e];else return}set(e,t,n){if(n===void 0)n=!1;if(n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];if(this.undefStack.length>0)this.undefStack[this.undefStack.length-1][e]=t}else{var s=this.undefStack[this.undefStack.length-1];if(s&&!Object.prototype.hasOwnProperty.call(s,e))s[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0}if(t==null)delete this.current[e];else this.current[e]=t}}var F2=cd;w("\\noexpand",function(e){var t=e.popToken();if(e.isExpandable(t.text))t.noexpand=!0,t.treatAsRelax=!0;return{tokens:[t],numArgs:0}});w("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});w("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});w("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});w("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();if(t[0].length===1&&t[0][0].text===n.text)return{tokens:t[1],numArgs:0};else return{tokens:t[2],numArgs:0}});w("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");w("\\TextOrMath",function(e){var t=e.consumeArgs(2);if(e.mode==="text")return{tokens:t[0],numArgs:0};else return{tokens:t[1],numArgs:0}});var Mu={"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};w("\\char",function(e){var t=e.popToken(),n,r=0;if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else if(t.text==="EOF")throw new te("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=Mu[t.text],r==null||r>=n)throw new te("Invalid base-"+n+" digit "+t.text);var s;while((s=Mu[e.future().text])!=null&&s<n)r*=n,r+=s,e.popToken()}return"\\@char{"+r+"}"});var fl=(e,t,n,r)=>{var s=e.consumeArg().tokens;if(s.length!==1)throw new te("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!t)throw new te("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!n)throw new te("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){var l="",u=e.expandNextToken();while(u.text!=="]"&&u.text!=="EOF")l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new te("Invalid number of arguments: "+l);o=parseInt(l),s=e.consumeArg().tokens}if(!(a&&r))e.macros.set(i,{tokens:s,numArgs:o});return""};w("\\newcommand",(e)=>fl(e,!1,!0,!1));w("\\renewcommand",(e)=>fl(e,!0,!1,!1));w("\\providecommand",(e)=>fl(e,!0,!0,!0));w("\\message",(e)=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((n)=>n.text).join("")),""});w("\\errmessage",(e)=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((n)=>n.text).join("")),""});w("\\show",(e)=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),nr[n],Ze.math[n],Ze.text[n]),""});w("\\bgroup","{");w("\\egroup","}");w("~","\\nobreakspace");w("\\lq","`");w("\\rq","'");w("\\aa","\\r a");w("\\AA","\\r A");w("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");w("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");w("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");w("ℬ","\\mathscr{B}");w("ℰ","\\mathscr{E}");w("ℱ","\\mathscr{F}");w("ℋ","\\mathscr{H}");w("ℐ","\\mathscr{I}");w("ℒ","\\mathscr{L}");w("ℳ","\\mathscr{M}");w("ℛ","\\mathscr{R}");w("ℭ","\\mathfrak{C}");w("ℌ","\\mathfrak{H}");w("ℨ","\\mathfrak{Z}");w("\\Bbbk","\\Bbb{k}");w("\\llap","\\mathllap{\\textrm{#1}}");w("\\rlap","\\mathrlap{\\textrm{#1}}");w("\\clap","\\mathclap{\\textrm{#1}}");w("\\mathstrut","\\vphantom{(}");w("\\underbar","\\underline{\\text{#1}}");w("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');w("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");w("\\ne","\\neq");w("≠","\\neq");w("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}"+"{\\mathrel{\\char`∉}}");w("∉","\\notin");w("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}"+"}{\\mathrel{\\char`≘}}");w("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");w("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");w("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}"+"{\\mathrel{\\char`≛}}");w("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}"+"{\\mathrel{\\char`≝}}");w("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}"+"{\\mathrel{\\char`≞}}");w("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");w("⟂","\\perp");w("‼","\\mathclose{!\\mkern-0.8mu!}");w("∌","\\notni");w("⌜","\\ulcorner");w("⌝","\\urcorner");w("⌞","\\llcorner");w("⌟","\\lrcorner");w("©","\\copyright");w("®","\\textregistered");w("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');w("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');w("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');w("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');w("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");w("⋮","\\vdots");w("\\varGamma","\\mathit{\\Gamma}");w("\\varDelta","\\mathit{\\Delta}");w("\\varTheta","\\mathit{\\Theta}");w("\\varLambda","\\mathit{\\Lambda}");w("\\varXi","\\mathit{\\Xi}");w("\\varPi","\\mathit{\\Pi}");w("\\varSigma","\\mathit{\\Sigma}");w("\\varUpsilon","\\mathit{\\Upsilon}");w("\\varPhi","\\mathit{\\Phi}");w("\\varPsi","\\mathit{\\Psi}");w("\\varOmega","\\mathit{\\Omega}");w("\\substack","\\begin{subarray}{c}#1\\end{subarray}");w("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");w("\\boxed","\\fbox{$\\displaystyle{#1}$}");w("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");w("\\implies","\\DOTSB\\;\\Longrightarrow\\;");w("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");w("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");w("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Du={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},$2=new Set(["bin","rel"]);w("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;if(n in Du)t=Du[n];else if(n.slice(0,4)==="\\not")t="\\dotsb";else if(n in Ze.math){if($2.has(Ze.math[n].group))t="\\dotsb"}return t});var ml={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};w("\\dotso",function(e){var t=e.future().text;if(t in ml)return"\\ldots\\,";else return"\\ldots"});w("\\dotsc",function(e){var t=e.future().text;if(t in ml&&t!==",")return"\\ldots\\,";else return"\\ldots"});w("\\cdots",function(e){var t=e.future().text;if(t in ml)return"\\@cdots\\,";else return"\\@cdots"});w("\\dotsb","\\cdots");w("\\dotsm","\\cdots");w("\\dotsi","\\!\\cdots");w("\\dotsx","\\ldots\\,");w("\\DOTSI","\\relax");w("\\DOTSB","\\relax");w("\\DOTSX","\\relax");w("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");w("\\,","\\tmspace+{3mu}{.1667em}");w("\\thinspace","\\,");w("\\>","\\mskip{4mu}");w("\\:","\\tmspace+{4mu}{.2222em}");w("\\medspace","\\:");w("\\;","\\tmspace+{5mu}{.2777em}");w("\\thickspace","\\;");w("\\!","\\tmspace-{3mu}{.1667em}");w("\\negthinspace","\\!");w("\\negmedspace","\\tmspace-{4mu}{.2222em}");w("\\negthickspace","\\tmspace-{5mu}{.277em}");w("\\enspace","\\kern.5em ");w("\\enskip","\\hskip.5em\\relax");w("\\quad","\\hskip1em\\relax");w("\\qquad","\\hskip2em\\relax");w("\\tag","\\@ifstar\\tag@literal\\tag@paren");w("\\tag@paren","\\tag@literal{({#1})}");w("\\tag@literal",(e)=>{if(e.macros.get("\\df@tag"))throw new te("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});w("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");w("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");w("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");w("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");w("\\newline","\\\\\\relax");w("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var xd=ae(mn["Main-Regular"][84][1]-0.7*mn["Main-Regular"][65][1]);w("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+xd+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");w("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+xd+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");w("\\hspace","\\@ifstar\\@hspacer\\@hspace");w("\\@hspace","\\hskip #1\\relax");w("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");w("\\ordinarycolon",":");w("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");w("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');w("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');w("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');w("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');w("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');w("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');w("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');w("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');w("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');w("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');w("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');w("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');w("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');w("∷","\\dblcolon");w("∹","\\eqcolon");w("≔","\\coloneqq");w("≕","\\eqqcolon");w("⩴","\\Coloneqq");w("\\ratio","\\vcentcolon");w("\\coloncolon","\\dblcolon");w("\\colonequals","\\coloneqq");w("\\coloncolonequals","\\Coloneqq");w("\\equalscolon","\\eqqcolon");w("\\equalscoloncolon","\\Eqqcolon");w("\\colonminus","\\coloneq");w("\\coloncolonminus","\\Coloneq");w("\\minuscolon","\\eqcolon");w("\\minuscoloncolon","\\Eqcolon");w("\\coloncolonapprox","\\Colonapprox");w("\\coloncolonsim","\\Colonsim");w("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");w("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");w("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");w("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");w("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");w("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");w("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");w("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");w("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");w("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");w("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");w("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");w("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");w("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");w("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");w("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");w("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");w("\\nleqq","\\html@mathml{\\@nleqq}{≰}");w("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");w("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");w("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");w("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");w("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");w("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");w("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");w("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");w("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");w("\\imath","\\html@mathml{\\@imath}{ı}");w("\\jmath","\\html@mathml{\\@jmath}{ȷ}");w("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}"+"{\\mathopen{\\char`⟦}}");w("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}"+"{\\mathclose{\\char`⟧}}");w("⟦","\\llbracket");w("⟧","\\rrbracket");w("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}"+"{\\mathopen{\\char`⦃}}");w("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}"+"{\\mathclose{\\char`⦄}}");w("↤","\\mapsfrom");w("\\mapsfrom","\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}");w("⦃","\\lBrace");w("⦄","\\rBrace");w("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}"+"{\\char`⦵}}");w("⦵","\\minuso");w("\\darr","\\downarrow");w("\\dArr","\\Downarrow");w("\\Darr","\\Downarrow");w("\\lang","\\langle");w("\\rang","\\rangle");w("\\uarr","\\uparrow");w("\\uArr","\\Uparrow");w("\\Uarr","\\Uparrow");w("\\N","\\mathbb{N}");w("\\R","\\mathbb{R}");w("\\Z","\\mathbb{Z}");w("\\alef","\\aleph");w("\\alefsym","\\aleph");w("\\Alpha","\\mathrm{A}");w("\\Beta","\\mathrm{B}");w("\\bull","\\bullet");w("\\Chi","\\mathrm{X}");w("\\clubs","\\clubsuit");w("\\cnums","\\mathbb{C}");w("\\Complex","\\mathbb{C}");w("\\Dagger","\\ddagger");w("\\diamonds","\\diamondsuit");w("\\empty","\\emptyset");w("\\Epsilon","\\mathrm{E}");w("\\Eta","\\mathrm{H}");w("\\exist","\\exists");w("\\harr","\\leftrightarrow");w("\\hArr","\\Leftrightarrow");w("\\Harr","\\Leftrightarrow");w("\\hearts","\\heartsuit");w("\\image","\\Im");w("\\infin","\\infty");w("\\Iota","\\mathrm{I}");w("\\isin","\\in");w("\\Kappa","\\mathrm{K}");w("\\larr","\\leftarrow");w("\\lArr","\\Leftarrow");w("\\Larr","\\Leftarrow");w("\\lrarr","\\leftrightarrow");w("\\lrArr","\\Leftrightarrow");w("\\Lrarr","\\Leftrightarrow");w("\\Mu","\\mathrm{M}");w("\\natnums","\\mathbb{N}");w("\\Nu","\\mathrm{N}");w("\\Omicron","\\mathrm{O}");w("\\plusmn","\\pm");w("\\rarr","\\rightarrow");w("\\rArr","\\Rightarrow");w("\\Rarr","\\Rightarrow");w("\\real","\\Re");w("\\reals","\\mathbb{R}");w("\\Reals","\\mathbb{R}");w("\\Rho","\\mathrm{P}");w("\\sdot","\\cdot");w("\\sect","\\S");w("\\spades","\\spadesuit");w("\\sub","\\subset");w("\\sube","\\subseteq");w("\\supe","\\supseteq");w("\\Tau","\\mathrm{T}");w("\\thetasym","\\vartheta");w("\\weierp","\\wp");w("\\Zeta","\\mathrm{Z}");w("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");w("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");w("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");w("\\bra","\\mathinner{\\langle{#1}|}");w("\\ket","\\mathinner{|{#1}\\rangle}");w("\\braket","\\mathinner{\\langle{#1}\\rangle}");w("\\Bra","\\left\\langle#1\\right|");w("\\Ket","\\left|#1\\right\\rangle");var Ed=(e)=>(t)=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,s=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=(f)=>(p)=>{if(e){if(p.macros.set("|",a),s.length)p.macros.set("\\|",o)}var g=f;if(!f&&s.length){var b=p.future();if(b.text==="|")p.popToken(),g=!0}return{tokens:g?s:r,numArgs:0}};if(t.macros.set("|",l(!1)),s.length)t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,d=t.expandTokens([...i,...u,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};w("\\bra@ket",Ed(!1));w("\\bra@set",Ed(!0));w("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");w("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");w("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");w("\\angln","{\\angl n}");w("\\blue","\\textcolor{##6495ed}{#1}");w("\\orange","\\textcolor{##ffa500}{#1}");w("\\pink","\\textcolor{##ff00af}{#1}");w("\\red","\\textcolor{##df0030}{#1}");w("\\green","\\textcolor{##28ae7b}{#1}");w("\\gray","\\textcolor{gray}{#1}");w("\\purple","\\textcolor{##9d38bd}{#1}");w("\\blueA","\\textcolor{##ccfaff}{#1}");w("\\blueB","\\textcolor{##80f6ff}{#1}");w("\\blueC","\\textcolor{##63d9ea}{#1}");w("\\blueD","\\textcolor{##11accd}{#1}");w("\\blueE","\\textcolor{##0c7f99}{#1}");w("\\tealA","\\textcolor{##94fff5}{#1}");w("\\tealB","\\textcolor{##26edd5}{#1}");w("\\tealC","\\textcolor{##01d1c1}{#1}");w("\\tealD","\\textcolor{##01a995}{#1}");w("\\tealE","\\textcolor{##208170}{#1}");w("\\greenA","\\textcolor{##b6ffb0}{#1}");w("\\greenB","\\textcolor{##8af281}{#1}");w("\\greenC","\\textcolor{##74cf70}{#1}");w("\\greenD","\\textcolor{##1fab54}{#1}");w("\\greenE","\\textcolor{##0d923f}{#1}");w("\\goldA","\\textcolor{##ffd0a9}{#1}");w("\\goldB","\\textcolor{##ffbb71}{#1}");w("\\goldC","\\textcolor{##ff9c39}{#1}");w("\\goldD","\\textcolor{##e07d10}{#1}");w("\\goldE","\\textcolor{##a75a05}{#1}");w("\\redA","\\textcolor{##fca9a9}{#1}");w("\\redB","\\textcolor{##ff8482}{#1}");w("\\redC","\\textcolor{##f9685d}{#1}");w("\\redD","\\textcolor{##e84d39}{#1}");w("\\redE","\\textcolor{##bc2612}{#1}");w("\\maroonA","\\textcolor{##ffbde0}{#1}");w("\\maroonB","\\textcolor{##ff92c6}{#1}");w("\\maroonC","\\textcolor{##ed5fa6}{#1}");w("\\maroonD","\\textcolor{##ca337c}{#1}");w("\\maroonE","\\textcolor{##9e034e}{#1}");w("\\purpleA","\\textcolor{##ddd7ff}{#1}");w("\\purpleB","\\textcolor{##c6b9fc}{#1}");w("\\purpleC","\\textcolor{##aa87ff}{#1}");w("\\purpleD","\\textcolor{##7854ab}{#1}");w("\\purpleE","\\textcolor{##543b78}{#1}");w("\\mintA","\\textcolor{##f5f9e8}{#1}");w("\\mintB","\\textcolor{##edf2df}{#1}");w("\\mintC","\\textcolor{##e0e5cc}{#1}");w("\\grayA","\\textcolor{##f6f7f7}{#1}");w("\\grayB","\\textcolor{##f0f1f2}{#1}");w("\\grayC","\\textcolor{##e3e5e6}{#1}");w("\\grayD","\\textcolor{##d6d8da}{#1}");w("\\grayE","\\textcolor{##babec2}{#1}");w("\\grayF","\\textcolor{##888d93}{#1}");w("\\grayG","\\textcolor{##626569}{#1}");w("\\grayH","\\textcolor{##3b3e40}{#1}");w("\\grayI","\\textcolor{##21242c}{#1}");w("\\kaBlue","\\textcolor{##314453}{#1}");w("\\kaGreen","\\textcolor{##71B307}{#1}");var Ad={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Cd{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new kd(F2,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new el(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){if(this.stack.length===0)this.pushToken(this.lexer.lex());return this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken();var s=this.consumeArg(["]"]);r=s.tokens,n=s.end}else{var i=this.consumeArg();r=i.tokens,t=i.start,n=i.end}return this.pushToken(new Pt("EOF",n.loc)),this.pushTokens(r),new Pt("",Bt.range(t,n))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],n=e&&e.length>0;if(!n)this.consumeSpaces();var r=this.future(),s,i=0,a=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++i;else if(s.text==="}"){if(--i,i===-1)throw new te("Extra }",s)}else if(s.text==="EOF")throw new te("Unexpected end of input in a macro argument, expected '"+(e&&n?e[a]:"}")+"'",s);if(e&&n)if((i===0||i===1&&e[a]==="{")&&s.text===e[a]){if(++a,a===e.length){t.splice(-a,a);break}}else a=0}while(i!==0||n);if(r.text==="{"&&t[t.length-1].text==="}")t.pop(),t.shift();return t.reverse(),{tokens:t,start:r,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new te("The length of delimiters doesn't match the number of args!");var n=t[0];for(var r=0;r<n.length;r++){var s=this.popToken();if(n[r]!==s.text)throw new te("Use of the macro doesn't match its definition",s)}}var i=[];for(var a=0;a<e;a++)i.push(this.consumeArg(t&&t[a+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new te("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=!t.noexpand?this._getExpansion(n):null;if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]==="\\"&&!this.isDefined(n))throw new te("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var s=r.tokens,i=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){s=s.slice();for(var a=s.length-1;a>=0;--a){var o=s[a];if(o.text==="#"){if(a===0)throw new te("Incomplete placeholder at end of macro body",o);if(o=s[--a],o.text==="#")s.splice(a+1,1);else if(/^[1-9]$/.test(o.text))s.splice(a,2,...i[+o.text-1]);else throw new te("Not a valid argument number",o)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();if(e.treatAsRelax)e.text="\\relax";return e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Pt(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;this.pushTokens(e);while(this.stack.length>n)if(this.expandOnce(!0)===!1){var r=this.stack.pop();if(r.treatAsRelax)r.noexpand=!1,r.treatAsRelax=!1;t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);if(t)return t.map((n)=>n.text).join("");else return t}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==="function"?t(this):t;if(typeof r==="string"){var s=0;if(r.includes("#")){var i=r.replace(/##/g,"");while(i.includes("#"+(s+1)))++s}var a=new el(r,this.settings),o=[],l=a.lex();while(l.text!=="EOF")o.push(l),l=a.lex();o.reverse();var u={tokens:o,numArgs:s};return u}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(nr,e)||Object.prototype.hasOwnProperty.call(Ze.math,e)||Object.prototype.hasOwnProperty.call(Ze.text,e)||Object.prototype.hasOwnProperty.call(Ad,e)}isExpandable(e){var t=this.macros.get(e);if(t!=null)return typeof t==="string"||typeof t==="function"||!t.unexpandable;return Object.prototype.hasOwnProperty.call(nr,e)&&!nr[e].primitive}}var Lu=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Yi=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Bo={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:"\\\"",math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Iu={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class pa{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Cd(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0)t=!0;if(this.fetch().text!==e)throw new te("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());if(t)this.consume()}consume(){this.nextToken=null}fetch(){if(this.nextToken==null)this.nextToken=this.gullet.expandNextToken();return this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){if(!this.settings.globalGroup)this.gullet.beginGroup();if(this.settings.colorIsTextColor)this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);if(this.expect("EOF"),!this.settings.globalGroup)this.gullet.endGroup();return e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Pt("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){var n=[];while(!0){if(this.mode==="math")this.consumeSpaces();var r=this.fetch();if(pa.endOfExpression.has(r.text))break;if(t&&r.text===t)break;if(e&&nr[r.text]&&nr[r.text].infix)break;var s=this.parseAtom(t);if(!s)break;else if(s.type==="internal")continue;n.push(s)}if(this.mode==="text")this.formLigatures(n);return this.handleInfixNodes(n)}handleInfixNodes(e){var t=-1,n;for(var r=0;r<e.length;r++){var s=e[r];if(s.type==="infix"){if(t!==-1)throw new te("only one infix operator per group",s.token);t=r,n=s.replaceWith}}if(t!==-1&&n){var i,a,o=e.slice(0,t),l=e.slice(t+1);if(o.length===1&&o[0].type==="ordgroup")i=o[0];else i={type:"ordgroup",mode:this.mode,body:o};if(l.length===1&&l[0].type==="ordgroup")a=l[0];else a={type:"ordgroup",mode:this.mode,body:l};var u;if(n==="\\\\abovefrac")u=this.callFunction(n,[i,e[t],a],[]);else u=this.callFunction(n,[i,a],[]);return[u]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do{var s;r=this.parseGroup(e)}while(((s=r)==null?void 0:s.type)==="internal");if(!r)throw new te("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){var t=[];for(var n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t},s={type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]};return s}parseAtom(e){var t=this.parseGroup("atom",e);if((t==null?void 0:t.type)==="internal")return t;if(this.mode==="text")return t;var n,r;while(!0){this.consumeSpaces();var s=this.fetch();if(s.text==="\\limits"||s.text==="\\nolimits"){if(t&&t.type==="op")t.limits=s.text==="\\limits",t.alwaysHandleSupSub=!0;else if(t&&t.type==="operatorname"){if(t.alwaysHandleSupSub)t.limits=s.text==="\\limits"}else throw new te("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(n)throw new te("Double superscript",s);n=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(r)throw new te("Double subscript",s);r=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(n)throw new te("Double superscript",s);var i={type:"textord",mode:this.mode,text:"\\prime"},a=[i];this.consume();while(this.fetch().text==="'")a.push(i),this.consume();if(this.fetch().text==="^")a.push(this.handleSupSubscript("superscript"));n={type:"ordgroup",mode:this.mode,body:a}}else if(Yi[s.text]){var o=Lu.test(s.text),l=[];l.push(new Pt(Yi[s.text])),this.consume();while(!0){var u=this.fetch().text;if(!Yi[u])break;if(Lu.test(u)!==o)break;l.unshift(new Pt(Yi[u])),this.consume()}var d=this.subparse(l);if(o)r={type:"ordgroup",mode:"math",body:d};else n={type:"ordgroup",mode:"math",body:d}}else break}if(n&&r)return{type:"supsub",mode:this.mode,base:t,sup:n,sub:r};else if(n)return{type:"supsub",mode:this.mode,base:t,sup:n};else if(r)return{type:"supsub",mode:this.mode,base:t,sub:r};else return t}parseFunction(e,t){var n=this.fetch(),r=n.text,s=nr[r];if(!s)return null;if(this.consume(),t&&t!=="atom"&&!s.allowedInArgument)throw new te("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);else if(this.mode==="text"&&!s.allowedInText)throw new te("Can't use function '"+r+"' in text mode",n);else if(this.mode==="math"&&s.allowedInMath===!1)throw new te("Can't use function '"+r+"' in math mode",n);var i=this.parseArguments(r,s),{args:a,optArgs:o}=i;return this.callFunction(r,a,o,n,e)}callFunction(e,t,n,r,s){var i={funcName:e,parser:this,token:r,breakOnTokenText:s},a=nr[e];if(a&&a.handler)return a.handler(i,t,n);else throw new te("No function handler for "+e)}parseArguments(e,t){var n,r=(n=t.numOptionalArgs)!=null?n:0,s=t.numArgs+r;if(s===0)return{args:[],optArgs:[]};var i=[],a=[];for(var o=0;o<s;o++){var l,u=(l=t.argTypes)==null?void 0:l[o],d=o<r;if("primitive"in t&&t.primitive&&u==null||t.type==="sqrt"&&o===1&&a[0]==null)u="primitive";var f=this.parseGroupOfType("argument to '"+e+"'",u,d);if(d)a.push(f);else if(f!=null)i.push(f);else throw new te("Null argument, please report this as a bug")}return{args:i,optArgs:a}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":{var r=this.parseArgumentGroup(n,"text");return r!=null?{type:"styling",mode:r.mode,body:[r],style:"text",resetFont:!0}:null}case"raw":{this.gullet.consumeSpaces();var s=this.gullet.lexer.catcodes["%"];this.gullet.lexer.setCatcode("%",12);var i=this.parseStringGroup(n);return this.gullet.lexer.setCatcode("%",s),i!=null?{type:"raw",mode:"text",string:i.text}:null}case"primitive":{if(n)throw new te("A primitive argument cannot be optional");var a=this.parseGroup(e);if(a==null)throw new te("Expected group as "+e,this.fetch());return a}case"original":case void 0:return this.parseArgumentGroup(n);default:throw new te("Unknown group type as "+e,this.fetch())}}consumeSpaces(){while(this.fetch().text===" ")this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;var n="",r;while((r=this.fetch()).text!=="EOF")n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){var n=this.fetch(),r=n,s="",i;while((i=this.fetch()).text!=="EOF"&&e.test(s+i.text))r=i,s+=r.text,this.consume();if(s==="")throw new te("Invalid "+t+": '"+n.text+"'",n);return n.range(r,s)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new te("Invalid color: '"+t.text+"'",t);var r=n[0];if(/^[0-9a-f]{6}$/i.test(r))r="#"+r;return{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{")t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size");else t=this.parseStringGroup(e);if(!t)return null;if(!e&&t.text.length===0)t.text="0pt",n=!0;var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new te("Invalid size: '"+t.text+"'",t);var s={number:+(r[1]+r[2]),unit:r[3]};if(!Bu(s))throw new te("Invalid unit: '"+s.unit+"'",t);return{type:"size",mode:this.mode,value:s,isBlank:n}}parseUrlGroup(e){var t=this.gullet.lexer.catcodes["%"],n=this.gullet.lexer.catcodes["~"];this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode("%",t),this.gullet.lexer.setCatcode("~",n),r==null)return null;var s=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:s}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;if(t)this.switchMode(t);this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:n.loc,body:s};if(t)this.switchMode(r);return i}parseGroup(e,t){var n=this.fetch(),r=n.text,s;if(r==="{"||r==="\\begingroup"){this.consume();var i=r==="{"?"}":"\\endgroup";this.gullet.beginGroup();var a=this.parseExpression(!1,i),o=this.fetch();this.expect(i),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:Bt.range(n,o),body:a,semisimple:r==="\\begingroup"||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),s==null&&r[0]==="\\"&&!Object.prototype.hasOwnProperty.call(Ad,r)){if(this.settings.throwOnError)throw new te("Undefined control sequence: "+r,n);s=this.formatUnsupportedCmd(r),this.consume()}return s}formLigatures(e){var t=e.length-1;for(var n=0;n<t;++n){var r=e[n];if(r.type!=="textord")continue;var s=r.text,i=e[n+1];if(!i||i.type!=="textord")continue;if(s==="-"&&i.text==="-"){var a=e[n+2];if(n+1<t&&a&&a.type==="textord"&&a.text==="-")e.splice(n,3,{type:"textord",mode:"text",loc:Bt.range(r,a),text:"---"}),t-=2;else e.splice(n,2,{type:"textord",mode:"text",loc:Bt.range(r,i),text:"--"}),t-=1}if((s==="'"||s==="`")&&i.text===s)e.splice(n,2,{type:"textord",mode:"text",loc:Bt.range(r,i),text:s+s}),t-=1}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)==="*";if(r)n=n.slice(1);if(n.length<2||n.charAt(0)!==n.slice(-1))throw new te(`\\verb assertion failed --
284
- please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}if(Object.prototype.hasOwnProperty.call(Iu,t[0])&&!Ze[this.mode][t[0]]){if(this.settings.strict&&this.mode==="math")Ot({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Accented Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e});t=Iu[t[0]]+t.slice(1)}var s=O2.exec(t);if(s){if(t=t.substring(0,s.index),t==="i")t="ı";else if(t==="j")t="ȷ"}var i;if(Ze[this.mode][t]){if(this.settings.strict&&this.mode==="math"&&$o.includes(t))Ot({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Latin-1/Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e});var a=Ze[this.mode][t].group,o=Bt.range(e),l;if(K4(a))l={type:"atom",mode:this.mode,family:a,loc:o,text:t};else l={type:a,mode:this.mode,loc:o,text:t};i=l}else if(t.charCodeAt(0)>=128){if(this.settings.strict){if(!Nu(t.charCodeAt(0)))Ot({strict:this.settings.strict,errorCode:"unknownSymbol",errorMsg:'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),report:!0,token:e});else if(this.mode==="math")Ot({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e})}i={type:"textord",mode:"text",loc:Bt.range(e),text:t}}else return null;if(this.consume(),s)for(var u=0;u<s[0].length;u++){var d=s[0][u];if(!Bo[d])throw new te("Unknown accent ' "+d+"'",e);var f=Bo[d][this.mode]||Bo[d].text;if(!f)throw new te("Accent "+d+" unsupported in "+this.mode+" mode",e);i={type:"accent",mode:this.mode,loc:Bt.range(e),label:f,isStretchy:!1,isShifty:!0,base:i}}return i}}pa.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var pl=function(t,n){if(!(typeof t==="string"||t instanceof String))throw TypeError("KaTeX can only parse string typed expression");var r=new pa(t,n);delete r.gullet.macros.current["\\df@tag"];var s=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new te("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:r.subparse([new Pt("\\df@tag")])}]}return s},_d=function(t,n,r){n.textContent="";var s=gl(t,r).toNode();n.appendChild(s)};if(typeof document<"u"){if(document.compatMode!=="CSS1Compat")typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),_d=function(){throw new te("KaTeX doesn't work in quirks mode.")}}var q2=function(t,n){var r=gl(t,n).toMarkup();return r},H2=function(t,n){var r=new ia(n);return pl(t,r)},Td=function(t,n,r){if(r.throwOnError||!(t instanceof te))throw t;var s=X(["katex-error"],[new zt(n)]);return s.setAttribute("title",t.toString()),s.setAttribute("style","color:"+r.errorColor),s},gl=function(t,n){var r=new ia(n);try{var s=pl(t,r);return z4(s,t,r)}catch(i){return Td(i,t,r)}},P2=function(t,n){var r=new ia(n);try{var s=pl(t,r);return F4(s,r)}catch(i){return Td(i,t,r)}},U2="0.19.1",W2={Span:Cr,Anchor:Qs,SymbolNode:zt,SvgNode:pn,PathNode:Nn,LineNode:ra},bl={version:U2,render:_d,renderToString:q2,ParseError:te,SETTINGS_SCHEMA:Oo,__parse:H2,__renderToDomTree:gl,__renderToHTMLTree:P2,__setFontMetrics:v4,__defineSymbol:h,__defineFunction:he,__defineMacro:w,__domTree:W2};var Yd=$m(Zd(),1);var as=Yd.default;function Xd(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},o={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(o);let l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=e.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},x=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],A={match:/(\/[a-z._-]+)+/},T=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],S=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],E=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],D=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:x,literal:k,built_in:[...T,...S,"set","shopt",...E,...D]},contains:[g,e.SHEBANG(),b,f,i,a,A,o,l,u,d,n]}}function Qd(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",i="<[^<>]+>",a="(decltype\\(auto\\)|"+t.optional("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o=t.concat(/\batomic_/,t.either("bool","char","schar","uchar","short","ushort","int","uint","long","ulong","llong","ullong","char16_t","char32_t","wchar_t","int_least8_t","uint_least8_t","int_least16_t","uint_least16_t","int_least32_t","uint_least32_t","int_least64_t","uint_least64_t","int_fast8_t","uint_fast8_t","int_fast16_t","uint_fast16_t","int_fast32_t","uint_fast32_t","int_fast64_t","uint_fast64_t","intptr_t","uintptr_t","size_t","ptrdiff_t","intmax_t","uintmax_t"),/\b/),l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:o}]},u="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",d={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},f={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},p={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},d,{scope:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(d,{className:"string"}),n,e.C_BLOCK_COMMENT_MODE]},b=[p,g],x={className:"title",begin:t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},k=t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",A=12,E={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},D=[...b,l,n,e.C_BLOCK_COMMENT_MODE,f,d],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:E,contains:D.concat([{begin:/\(/,end:/\)/,keywords:E,contains:D.concat(["self"]),relevance:0}]),relevance:0},L={begin:"("+a+"[\\*&\\s]+){1,12}"+k,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:E,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:E,relevance:0},{begin:k,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,f,l,{begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,f,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,...b]};return{name:"C",aliases:["h"],keywords:E,disableAutodetect:!0,illegal:"</",contains:[].concat(M,L,D,[...b,{begin:e.IDENT_RE+"::",keywords:E},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:d,keywords:E}}}function eh(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",i="<[^<>]+>",a="(?!struct)(decltype\\(auto\\)|"+t.optional("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:\\b[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|\\b[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|\\b0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},u,{scope:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},p={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),n,e.C_BLOCK_COMMENT_MODE]},g=[f,p],b={className:"title",begin:t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},x=t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",k=12,A=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],T=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],E=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],L={type:T,keyword:A,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},z={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,`(?!${A.join("|")})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},O=[z,...g,o,n,e.C_BLOCK_COMMENT_MODE,d,u],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:L,contains:O.concat([{begin:/\(/,end:/\)/,keywords:L,contains:O.concat(["self"]),relevance:0}]),relevance:0},V={className:"function",begin:"("+a+"[\\*&\\s]+){1,12}"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:L,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:L,relevance:0},{begin:x,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:L,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,o,{begin:/\(/,end:/\)/,keywords:L,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,...g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:L,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,V,z,O,[...g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:L,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:L},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}var N3=(e)=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.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_-]*/}}),B3=["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"],O3=["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"],z3=[...B3,...O3],F3=["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(),$3=["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(),q3=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),H3=["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-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","corner-bottom-left-shape","corner-bottom-right-shape","corner-shape","corner-top-left-shape","corner-top-right-shape","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function th(e){let t=e.regex,n=N3(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",i=/@-?\w[\w]*(-\w+)*/,a="[a-zA-Z-][a-zA-Z0-9_-]*",o=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+$3.join("|")+")"},{begin:":(:)?("+q3.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+H3.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...o,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...o,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:F3.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...o,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+z3.join("|")+")\\b"}]}}function nh(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function rh(e){let i={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:i,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\b0[bB](_?[01])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,illegal:/["']/}]}]}}var os="[0-9](_*[0-9])*",wa=`\\.(${os})`,ka="[0-9a-fA-F](_*[0-9a-fA-F])*",sh={className:"number",variants:[{begin:`(\\b(${os})((${wa})|\\.)?|(${wa}))[eE][+-]?(${os})[fFdD]?\\b`},{begin:`\\b(${os})((${wa})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${wa})[fFdD]?\\b`},{begin:`\\b(${os})[fFdD]\\b`},{begin:`\\b0[xX]((${ka})\\.?|(${ka})?\\.(${ka}))[pP][+-]?(${os})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ka})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function ih(e,t,n){if(n===-1)return"";return e.replace(t,(r)=>ih(e,t,n-1))}function ah(e){let t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r="(?:(?:\\s*\\[\\s*])+)?",s="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"+"<@@@>(?:(?:\\s*\\[\\s*])+)?",a="(?:"+("\\?(?:\\s+(?:extends|super)\\s+"+s+")?")+"|"+s+")",o=ih("(?:\\s*<\\s*"+a+"(?:\\s*,\\s*"+a+")*\\s*>)?",/<@@@>/g,2),p={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},g={className:"meta",begin:"@"+"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{beginKeywords:"new throw return else yield assert",relevance:0},{begin:["[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t.concat(o,"(?:(?:\\s*\\[\\s*])+)?",/\s+/),"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*","(?:(?:\\s*\\[\\s*])+)?",/\s*/,/=(?!=)/],className:{1:"type",3:"variable",6:"operator"}},{begin:[/record/,/\s+/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"],className:{1:"keyword",3:"title.class"},contains:[b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:["[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t.concat(o,"(?:(?:\\s*\\[\\s*])+)?",/\s+/),"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",/\s*(?=\()/],className:{1:"type",3:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,sh,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},sh,g]}}var P3=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],U3=["true","false","null","undefined","NaN","Infinity"],oh=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],lh=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ch=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],W3=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],j3=[].concat(ch,oh,lh);function uh(e){let t=e.regex,n=(Y,{after:ee})=>{let ie="</"+Y[0].slice(1);return Y.input.indexOf(ie,ee)!==-1},r="[A-Za-z$_][0-9A-Za-z$_]*",s={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Y,ee)=>{let ie=Y[0].length+Y.index,H=Y.input[ie];if(H==="<"||H===","){ee.ignoreMatch();return}if(H===">"){if(!n(Y,{after:ie}))ee.ignoreMatch()}let q,W=Y.input.substring(ie);if(q=W.match(/^\s*=/)){ee.ignoreMatch();return}if(q=W.match(/^\s+extends\s+/)){if(q.index===0){ee.ignoreMatch();return}}}},o={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:P3,literal:U3,built_in:j3,"variable.language":W3},l="[0-9](_?[0-9])*",u="\\.([0-9](_?[0-9])*)",d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:"(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((\\.([0-9](_?[0-9])*))|\\.)?|(\\.([0-9](_?[0-9])*)))[eE][+-]?([0-9](_?[0-9])*)\\b"},{begin:"\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((\\.([0-9](_?[0-9])*))\\b|\\.)?|(\\.([0-9](_?[0-9])*))\\b"},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},T={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:"[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},S=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,{match:/\$\d+/},f];p.contains=S.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(S)});let E=[].concat(T,p.contains),D=E.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(E)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:D},L={variants:[{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s+/,/extends/,/\s+/,t.concat("[A-Za-z$_][0-9A-Za-z$_]*","(",t.concat(/\./,"[A-Za-z$_][0-9A-Za-z$_]*"),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*"],scope:{1:"keyword",3:"title.class"}}]},z={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...oh,...lh]}},O={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},V={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(Y){return t.concat("(?!",Y.join("|"),")")}let ce={match:t.concat(/\b/,G([...ch,"super","import","await"].map((Y)=>`${Y}\\s*\\(`)),"[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\(/)),className:"title.function",relevance:0},re={begin:t.concat(/\./,t.lookahead(t.concat("[A-Za-z$_][0-9A-Za-z$_]*",/(?![0-9A-Za-z$_(])/))),end:"[A-Za-z$_][0-9A-Za-z$_]*",excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},de={match:[/get|set/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",K={match:[/const|var|let/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:z},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),O,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,T,{match:/\$\d+/},f,z,{scope:"attr",match:"[A-Za-z$_][0-9A-Za-z$_]*"+t.lookahead(":"),relevance:0},K,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:F,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:i},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*",className:"title.function"})]},{match:/\.\.\./,relevance:0},re,{match:"\\$[A-Za-z$_][0-9A-Za-z$_]*",relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},ce,V,L,de,{match:/\$[(.]/}]}}var G3={scope:"number",match:"([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",relevance:0};function dh(e){let t={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,G3,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function hh(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={match:/^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},i={className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},o=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,o,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=e.inherit(u,{contains:[]}),p=e.inherit(d,{contains:[]});u.contains.push(p),d.contains.push(f);let g=[n,l];return[u,d,f,p].forEach((A)=>{A.contains=A.contains.concat(g)}),g=g.concat(u,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},n,i,r,u,d,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},s,l,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function fh(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","lazy","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","aiter","all","anext","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozendict","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","sentinel","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},d={begin:/\{\{/,relevance:0},f={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,d,u]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,d,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,u]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",g="(\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.",b=`\\b|${r.join("|")}`,x={className:"number",relevance:0,variants:[{begin:`(\\b([0-9](_?[0-9])*)|((\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.))[eE][+-]?([0-9](_?[0-9])*)[jJ]?(?=${b})`},{begin:"((\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.)[jJ]?"},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b([0-9](_?[0-9])*)[jJ](?=${b})`}]},k={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},A={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,x,f,e.HASH_COMMENT_MODE]}]};return u.contains=[f,x,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[l,x,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[A]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[x,A,f]}]}}function mh(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),i={scope:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!(?:let|for|while|if|else|match)\b)/,s,t.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(16|32|64|128))?",o=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","raw","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f16","f32","f64","f128","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:d,keyword:o,literal:l,built_in:u},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{scope:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|"|\\|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{scope:"number",variants:[{begin:"\\b0b([01_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b0o([0-7_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b0x([A-Fa-f0-9_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"}],relevance:0},{begin:[/\bsafe/,/\s+/,/extern/],scope:{1:"keyword",3:"keyword"}},{begin:[/fn/,/\s+/,r],scope:{1:"keyword",3:"title.function"}},{scope:"meta",begin:"#!?\\[",end:"\\]",contains:[{scope:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],scope:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],scope:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],scope:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],scope:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:u,type:d}},{scope:"punctuation",begin:"->"},i]}}function ph(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],p=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],g=d,b=[...u,...l].filter((D)=>!d.includes(D)),x={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},k={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},A={match:t.concat(/\b/,t.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function T(D){return t.concat(/\b/,t.either(...D.map((M)=>M.replace(/\s+/,"\\s+"))),/\b/)}let S={scope:"keyword",match:T(p),relevance:0};function E(D,{exceptions:M,when:L}={}){let z=L;return M=M||[],D.map((O)=>{if(O.match(/\|\d+$/)||M.includes(O))return O;else if(z(O))return`${O}|0`;else return O})}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:E(b,{when:(D)=>D.length<3}),literal:i,type:o,built_in:f},contains:[{scope:"type",match:T(a)},S,A,x,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}var gh=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],bh=["true","false","null","undefined","NaN","Infinity"],vh=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],yh=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wh=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],kh=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],xh=[].concat(wh,vh,yh);function K3(e){let t=e.regex,n=(Y,{after:ee})=>{let ie="</"+Y[0].slice(1);return Y.input.indexOf(ie,ee)!==-1},r="[A-Za-z$_][0-9A-Za-z$_]*",s={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Y,ee)=>{let ie=Y[0].length+Y.index,H=Y.input[ie];if(H==="<"||H===","){ee.ignoreMatch();return}if(H===">"){if(!n(Y,{after:ie}))ee.ignoreMatch()}let q,W=Y.input.substring(ie);if(q=W.match(/^\s*=/)){ee.ignoreMatch();return}if(q=W.match(/^\s+extends\s+/)){if(q.index===0){ee.ignoreMatch();return}}}},o={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:gh,literal:bh,built_in:xh,"variable.language":kh},l="[0-9](_?[0-9])*",u="\\.([0-9](_?[0-9])*)",d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:"(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((\\.([0-9](_?[0-9])*))|\\.)?|(\\.([0-9](_?[0-9])*)))[eE][+-]?([0-9](_?[0-9])*)\\b"},{begin:"\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((\\.([0-9](_?[0-9])*))\\b|\\.)?|(\\.([0-9](_?[0-9])*))\\b"},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},T={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:"[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},S=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,{match:/\$\d+/},f];p.contains=S.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(S)});let E=[].concat(T,p.contains),D=E.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(E)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:D},L={variants:[{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s+/,/extends/,/\s+/,t.concat("[A-Za-z$_][0-9A-Za-z$_]*","(",t.concat(/\./,"[A-Za-z$_][0-9A-Za-z$_]*"),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*"],scope:{1:"keyword",3:"title.class"}}]},z={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...vh,...yh]}},O={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},V={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(Y){return t.concat("(?!",Y.join("|"),")")}let ce={match:t.concat(/\b/,G([...wh,"super","import","await"].map((Y)=>`${Y}\\s*\\(`)),"[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\(/)),className:"title.function",relevance:0},re={begin:t.concat(/\./,t.lookahead(t.concat("[A-Za-z$_][0-9A-Za-z$_]*",/(?![0-9A-Za-z$_(])/))),end:"[A-Za-z$_][0-9A-Za-z$_]*",excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},de={match:[/get|set/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",K={match:[/const|var|let/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:z},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),O,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,T,{match:/\$\d+/},f,z,{scope:"attr",match:"[A-Za-z$_][0-9A-Za-z$_]*"+t.lookahead(":"),relevance:0},K,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:F,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:i},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*",className:"title.function"})]},{match:/\.\.\./,relevance:0},re,{match:"\\$[A-Za-z$_][0-9A-Za-z$_]*",relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},ce,V,L,de,{match:/\$[(.]/}]}}function Eh(e){let t=e.regex,n=K3(e),r="[A-Za-z$_][0-9A-Za-z$_]*",s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},a={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},o={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:gh.concat(l),literal:bh,built_in:xh.concat(s),"variable.language":kh},d={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},f=(x,k,A)=>{let T=x.contains.findIndex((S)=>S.label===k);if(T===-1)throw Error("can not find mode to replace");x.contains.splice(T,1,A)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(d);let p=n.contains.find((x)=>x.scope==="attr"),g=Object.assign({},p,{match:t.concat("[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,p,g]),n.contains=n.contains.concat([d,i,a,g]),f(n,"shebang",e.SHEBANG()),f(n,"use_strict",o);let b=n.contains.find((x)=>x.label==="func.def");return b.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Ah(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(i,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,l,o,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,a,l,o]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:"javascript"}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Ch(e){let r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},o=e.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l="[0-9]{4}(-[0-9][0-9]){0,2}",u="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",d="(\\.[0-9]*)?",f="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",p={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:"true false yes no null",relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},x={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},k=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"type",begin:"!<[\\w#;/?:@&=+$,.~*'()[\\]]+>"},{className:"type",begin:"![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"type",begin:"!![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:"true false yes no null",keywords:{literal:"true false yes no null"}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},b,x,i,a],A=[...k];return A.pop(),A.push(o),g.contains=A,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}var V3={bash:Xd,c:Qd,cpp:eh,css:th,diff:nh,go:rh,java:ah,javascript:uh,json:dh,markdown:hh,python:fh,rust:mh,sql:ph,typescript:Eh,xml:Ah,yaml:Ch};for(let[e,t]of Object.entries(V3))as.registerLanguage(e,t);as.registerAliases(["sh","shell","zsh"],{languageName:"bash"});as.registerAliases("tsx",{languageName:"typescript"});var xa=262144,J3=24576,Mh=4096,Z3=65536,Ft=new Fc({html:!1,linkify:!0,maxNesting:24}),lr=Ft.utils.escapeHtml,Y3=0,_h=new WeakMap,Th=new WeakMap;function Dh(e,t){if(!e||typeof e.remaining!=="number"||e.remaining<t)return!1;return e.remaining-=t,!0}function El(e){if(!/^(?:https?:\/\/|mailto:)/i.test(e))return;let t=URL.parse(e);if(t&&!t.username&&!t.password&&t.origin!==globalThis.location?.origin)return t}function Sh(e){return e.normalize("NFKC").toLowerCase().trim().replace(/[^\p{L}\p{N}\p{M}_\s-]/gu,"").replace(/\s+/g,"-")}Ft.validateLink=(e)=>e.startsWith("#")||El(e)!==void 0;function Lh(e,t,n){if(e.length<=Mh&&Dh(n,e.length+64))try{return bl.renderToString(e,{displayMode:t,output:"mathml",trust:!1,maxExpand:128,maxSize:20})}catch(r){if(!(r instanceof bl.ParseError))throw r}return`<code class="math-source">${lr(e)}</code>`}Ft.use(Pc).use(Wc,{disabled:!0,label:!1}).use(Zc,{delimiters:"all",mathFence:!0,render(e,t,n){let r=Lh(e,t,n);return t?`<div class="markdown-math">${r}</div>
285
- `:r}});Ft.inline.ruler.before("escape","web_display_math",(e,t)=>{if(!e.src.startsWith("\\[",e.pos)||e.pos+2>=e.posMax)return!1;let n=e.pos+2,r=e.src.slice(n,Math.min(e.posMax,n+Mh+2)),s=/(?<!\\)(?:\\\\)*\\\]/u.exec(r);if(!s||/[\r\n]/u.test(r.slice(0,s.index)))return!1;let i=s.index+s[0].length-2,a=r.slice(0,i);if(!a.trim())return!1;if(!t)e.push("web_display_math","span",0).content=a;return e.pos=n+i+2,!0});Ft.renderer.rules.web_display_math=(e,t,n,r)=>`<span class="markdown-math markdown-math-in-prose">${Lh(e[t].content,!0,r)}</span>`;Ft.renderer.rules.link_open=(e,t,n,r,s)=>{let i=e[t],a=String(i.attrGet("href")??"");if(a.startsWith("#"))i.attrSet("data-markdown-fragment",a.slice(1)),i.attrSet("href","#");else if(El(a)?.protocol!=="mailto:")i.attrSet("target","_blank"),i.attrSet("rel","noopener noreferrer");return s.renderToken(e,t,n)};Ft.renderer.rules.image=(e,t,n,r,s)=>{let i=e[t],a=s.renderInlineAsText(i.children??[],n,r),o=El(String(i.attrGet("src")??""));if(!o||o.protocol==="mailto:")return lr(a);for(let u=t-1;i.level>0&&u>=0;u--){if(e[u].type==="link_open")return lr(a||o.hostname);if(e[u].type==="link_close")break}let l=c(`打开图片:${a||o.hostname}`,`Open image: ${a||o.hostname}`);return`<a class="markdown-image" href="${lr(o.href)}" target="_blank" rel="noopener noreferrer">${lr(l)}</a>`};function Ih(e,t,n){let r=/^[a-z0-9][a-z0-9_+#.-]{0,23}$/i.test(t)?t.toLowerCase():"",s=r&&e.length<=J3&&as.getLanguage(r)&&Dh(n,e.length+64),i=s?as.highlight(e,{language:r,ignoreIllegals:!0}).value:lr(e);return`<div class="markdown-code"><div class="markdown-code-bar"><span>${lr(r||c("代码","Code"))}</span><button type="button" class="button button--quiet markdown-copy">${c("复制代码","Copy code")}</button></div><pre tabindex="0"><code${r?` class="${s?"hljs ":""}language-${lr(r)}"`:""}>${i}</code></pre></div>
286
- `}var Rh=Ft.renderer.rules.fence;Ft.renderer.rules.fence=(e,t,n,r,s)=>{let i=e[t],a=i.info.trim().split(/\s+/,1)[0]??"";return a==="math"&&Rh?Rh(e,t,n,r,s):Ih(i.content,a,r)};Ft.renderer.rules.code_block=(e,t,n,r)=>Ih(e[t].content,"",r);Ft.renderer.rules.table_open=()=>'<div class="markdown-table" tabindex="0" role="region" aria-label="'+c("表格","Table")+`"><table>
287
- `;Ft.renderer.rules.table_close=()=>`</table></div>
288
- `;for(let e of["th","td"])Ft.renderer.rules[`${e}_open`]=(t,n)=>{let r=String(t[n].attrGet("style")??"").match(/^text-align:(left|center|right)$/)?.[1];return r?`<${e} class="markdown-align-${r}">`:`<${e}>`};function X3(e,t){let n=new Map,r=new Map;for(let s of e.querySelectorAll("h1, h2, h3, h4, h5, h6")){let i=Sh(s.textContent);if(!i)continue;let a=i,o=r.get(i)??1;while(n.has(a))a=`${i}-${o++}`;r.set(i,o),s.id=`${t}-${a}`,n.set(a,s.id)}for(let s of e.querySelectorAll("a[data-markdown-fragment]")){let i=s.dataset.markdownFragment??"",a;try{a=decodeURIComponent(i)}catch(l){if(!(l instanceof URIError))throw l;a=i}let o=n.get(Sh(a));if(o)s.setAttribute("href",`#${encodeURIComponent(o)}`);else s.removeAttribute("href");delete s.dataset.markdownFragment}}function Q3(e){e.addEventListener("click",async(t)=>{let n=t.target;if(!(n instanceof HTMLButtonElement)||!n.matches(".markdown-copy"))return;let r=n.closest(".markdown-code")?.querySelector("pre > code");if(!r||n.getAttribute("aria-busy")==="true")return;n.setAttribute("aria-busy","true");try{await navigator.clipboard.writeText(r.textContent),n.textContent=c("已复制","Copied")}catch(s){if(!(s instanceof DOMException||s instanceof TypeError))throw s;n.textContent=c("复制失败","Copy failed")}finally{n.removeAttribute("aria-busy")}})}function e5(e,t,n){let r=e.children[n],s=t.outerHTML;if(r&&Th.get(r)===s)return;if(Th.set(t,s),!r){e.append(t);return}let i=document.activeElement,a=i instanceof HTMLAnchorElement&&r.contains(i)?i.getAttribute("href"):null;if(r.replaceWith(t),a)[...t.querySelectorAll("a[href]")].find((o)=>o.getAttribute("href")===a)?.focus({preventScroll:!0})}function Al(e,t=y("div","prose")){let n=_h.get(t);if(n?.text===e)return t;let r=n?.id??`omo-markdown-${++Y3}`;if(!n)Q3(t);let s=document.createDocumentFragment();if(e.length>xa)s.append(y("p","small muted",c("正文过长,已按纯文本显示。","This long message is displayed as plain text.")),y("div","plain break",e));else{let a=y("template");a.innerHTML=Ft.render(e,{docId:r,remaining:Z3}),X3(a.content,r),s.append(a.content)}let i=[...s.children];for(let[a,o]of i.entries())e5(t,o,a);while(t.childElementCount>i.length)t.lastElementChild?.remove();return _h.set(t,{id:r,text:e}),t}var Nh=/^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/u,t5=new Intl.NumberFormat(me,{style:"unit",unit:"byte"}),n5=new Intl.NumberFormat(me,{maximumFractionDigits:1}),r5=["KiB","MiB","GiB","TiB","PiB"];function Bh(e,t){if(!e||!Nh.test(e)||!Array.isArray(t)||t.length!==1)return;let n=j(t[0]),r=C(n.text);if(n.type!=="text"||!r||r.length>2048)return;let s;try{s=j(JSON.parse(r))}catch(g){if(g instanceof SyntaxError)return;throw g}let{omoWebAttachment:i,id:a,name:o,size:l}=s;if(Object.keys(s).length!==4||i!==1||typeof a!=="string"||!Nh.test(a)||typeof o!=="string"||!o||o.length>255||/[\\/\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u.test(o)||typeof l!=="number"||!Number.isSafeInteger(l)||l<0)return;let u=l,d;for(let g of r5){if(u<1024)break;u/=1024,d=g}let f=d?`${n5.format(u)} ${d}`:t5.format(u),p=y("a","tool-attachment");return p.href=`/api/sessions/${e}/attachments/${a}`,p.download=o,p.append(`${c("下载","Download")} `,y("bdi","tool-attachment-name",o),` · ${f}`),p}var s5=new Map([["init",c("初始化","Set up list")],["start",c("请求开始","Request to start")],["done",c("请求完成","Request to complete")],["drop",c("请求放弃","Request to drop")],["rm",c("请求移除","Request to remove")],["append",c("追加","Append")],["view",c("查看","View")]]),Oh=24,Cl=(e,t)=>typeof e==="string"&&e.length<=t&&Boolean(e.trim())&&!/[\p{Cc}\p{Cf}]/u.test(e);function i5(e){if(e.op!=="init"&&e.op!=="append")return;let t=e.list!==void 0;if(t&&(e.op!=="init"||e.items!==void 0))return;let n=t?e.list:[{items:e.items,phase:e.op==="append"?e.phase:void 0}];if(!Array.isArray(n)||n.length>Oh)return;let r=[],s=0;for(let i of n){let{phase:a,items:o}=j(i);if((t||a!==void 0)&&!Cl(a,96))return;if(!Array.isArray(o)||s+o.length>Oh||!o.every((l)=>Cl(l,240)))return;if(s+=o.length,o.length)r.push({phase:C(a)||void 0,items:o})}return r}function zh(e){return e.length<=48&&/^[\p{L}][\p{L}\p{M}\p{N}]*(?: [\p{L}\p{N}][\p{L}\p{M}\p{N}]*)*$/u.test(e)&&(e.includes(" ")||/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u.test(e))&&!/[a-z0-9]{21,}|\d{6,}|\b(?:password|passwd|secret|credential|token|authorization|bearer|api key|private key)\b|凭据|密钥|口令|令牌|密码/iu.test(e)&&!/^(?:bash|sh|zsh|fish|pwsh|powershell|sudo|env|git|cd|ls|cat|printf|echo|rm|cp|mv|mkdir|touch|curl|wget|ssh|scp|chmod|chown|find|grep|rg|node|bun|npm|npx|python3?|pip|uv|docker|kubectl|kubectx|systemctl|make|sed|awk|head|tail|dd|export|set)\b/iu.test(e)}function Fh(e){let t=C(e.op),n=s5.get(t),r=i5(e),s=r?.flatMap((p)=>p.items)??[],i=s.map((p)=>p.trim()).filter(zh),o=(t==="start"||t==="done"||t==="drop"||t==="rm")&&e.phase===void 0&&e.list===void 0&&e.items===void 0&&Cl(e.task,240)?e.task.trim():void 0,l=o&&zh(o)?o:void 0,u=l??i[0],d=s.length.toLocaleString(me),f=(s.length-1).toLocaleString(me);return{operation:n&&r!==void 0?c(`${n} · ${d} 项`,`${n} · ${d} ${s.length===1?"task":"tasks"}`):n,preview:u&&s.length>1?c(`${u} · 另 ${f} 项`,`${u} · ${f} more`):u,batches:r??[],card:l?{heading:c("待办变更","Task changes"),titles:[l],total:1}:i.length?{heading:t==="append"?c("新增待办","Add tasks"):c("提交的待办","Tasks submitted"),titles:i,total:s.length}:void 0}}var Tl={inspect:"M7 3h6l4 4v6l-4 4H7l-4-4V7Zm8 12 6 6",modify:"m3 15 12-12h3l3 3v3L9 21H3Zm10-10 6 6",terminal:"M3 5h14l4 4v10H7l-4-4Zm4 4 3 3-3 3m6 0h4",memory:"M8 5V3m8 2V3M8 21v-2m8 2v-2M5 5h11l3 3v11H8l-3-3Zm4 4h4m-4 5h6",todo:"M6 3h10l3 3v12l-3 3H5V4Zm2 6 2 2 4-4m-6 9h7",execution:"m8 6-6 6 6 6m8-12 6 6-6 6m-3-14-2 16",context:"M8 4H6L3 7v10l3 3h2m8-16h2l3 3v10l-3 3h-2M8 9h8m-8 6h8",agent:"M8 3h4l3 3v4l-3 3H8l-3-3V6ZM2 21v-3l3-3h10l3 3v3m0-18 4 4v5",web:"M8 3h8l5 5v8l-5 5H8l-5-5V8Zm-5 9h18m-9-9-3 5v8l3 5 3-5V8Z",unknown:"M7 3h10l4 4v10l-4 4H7l-4-4V7Zm2 5 2-1h2l2 2v2l-3 2v1m0 3v.1"},a5=new Map([["create",[c("新建","Create"),c("记忆条目","Memory entry")]],["str_replace",[c("替换","Replace"),c("正文","Content")]],["insert",[c("插入","Insert"),c("正文","Content")]],["delete",[c("删除","Delete"),c("记忆条目","Memory entry")]],["rename",[c("重命名","Rename"),c("名称","Name")]],["update_description",[c("更新描述","Update description"),c("描述","Description")]],["apply_patch",[c("应用补丁","Apply patch"),c("记忆补丁","Memory patch")]]]),o5=new Map([["js","JavaScript"],["javascript","JavaScript"],["ts","TypeScript"],["typescript","TypeScript"],["py","Python"],["python","Python"],["shell","Shell"],["bash","Bash"],["powershell","PowerShell"]]);function $h(e,t){if(e==="eval"&&t.action!==void 0&&t.action!=="run")return{};let n=e==="eval"?t.language==="js"?"JavaScript":t.language==="py"?"Python":void 0:o5.get(C(t.language).toLowerCase());return{preview:n,source:C(t.code)||void 0,facts:n?[[c("语言","Language"),n]]:void 0}}var Aa=/^(?:sk-|gh[pousr]_|github_pat_|xox[baprs]-|AKIA[A-Z0-9]{16}$)/iu,_l=(e)=>typeof e==="string"&&/^[a-z][a-z0-9_-]{0,47}$/u.test(e)&&!Aa.test(e);function l5(e){let t=[];for(let[n,r]of[[c("类别","Category"),e.category],[c("角色","Role"),e.subagent_type]])if(_l(r))t.push(`${n} ${r}`);if(typeof e.run_in_background==="boolean")t.push(e.run_in_background?c("后台","Background"):c("前台","Foreground"));return t}var Ph=24,c5=16384,Rr=(e)=>typeof e==="string"&&e.length<=c5&&/\S/u.test(e);function Ea(e,t){if(Array.isArray(e)&&e.length>0&&e.length<=Ph&&e.every(t))return e.length}function Uh(e,t){if(e===void 0&&_l(t))return c(`角色 ${t}`,`Role ${t}`);if(t===void 0&&_l(e))return c(`类别 ${e}`,`Category ${e}`)}function u5(e){if(e.prompt!==void 0||!Array.isArray(e.tasks)||!e.tasks.length||e.tasks.length>Ph)return;let t=[];for(let n of e.tasks){let r=j(n),s=r.category===void 0?e.category:r.category,i=r.subagent_type===void 0?e.subagent_type:r.subagent_type,a=Uh(s,i);if(!a||!Rr(r.prompt))return;t.push({route:a,prompt:r.prompt})}return t}var d5=new Map([["status",c("状态","Status")],["tail",c("最近输出","Recent output")],["full",c("完整输出","Full output")]]);function Mr(e){if(typeof e!=="string"||e.length>65536)return;if(!e.length)return 0;return(e.match(/\r\n|[\n\r]/gu)?.length??0)+(e.endsWith(`
289
- `)||e.endsWith("\r")?0:1)}function ri(e){let t=e.toLocaleString(me);return c(`${t} 行`,`${t} ${e===1?"line":"lines"}`)}function qh(e,t,n){if(e==="apply_patch"){let a=(C(n)||C(t.patch)||C(t.patchText)).trim();if(a.length>65536||!/^\*\*\* Begin Patch\r?\n/u.test(a)||!/\n\*\*\* End Patch$/u.test(a))return[];let o=[];for(let[l,u]of[["Add",c("提交新增","Add")],["Update",c("提交更新","Update")],["Delete",c("提交删除","Delete")]]){let d=[...a.matchAll(new RegExp(`^\\*\\*\\* ${l} File: [^\\r\\n]+`,"gmu"))].length,f=d.toLocaleString(me);if(d)o.push([u,c(`${f} 个文件`,`${f} ${d===1?"file":"files"}`)])}return o}if(e==="write"||e==="write_file"){let a=Mr(t.content);return a===void 0?[]:[[c("提交文本","Submitted text"),ri(a)]]}let r=Mr(t.oldText??t.old_string),s=Mr(t.newText??t.new_string),i=[];if(r!==void 0)i.push([c("替换前","Before replacement"),ri(r)]);if(s!==void 0)i.push([r===void 0?c("提交文本","Submitted text"):c("替换后","After replacement"),ri(s)]);return i}function Hh(e){let t=C(e),n=/^https?:\/\/([^/?#\\]+)/iu.exec(t)?.[1];if(!n||n.includes("@")||/[\s\\\p{Cc}\p{Cf}]/u.test(t))return;let r=URL.parse(t);if(!r||r.username||r.password)return;let s=r.hostname.replace(/\.$/u,"");if(s.length>253||!/[a-z]/iu.test(s))return;if(!s.split(".").every((i)=>/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/iu.test(i)&&!Aa.test(i)))return;return s}function cr(e){let t=C(e);if(!t||t.length>512||!/^[\p{L}\p{M}\p{N}_.~ /\\-]+$/u.test(t)||t.startsWith("-"))return"";if(t==="."||t===".."||t==="~")return t;let n=t.split(/[/\\]/).filter(Boolean);if(n.some((r)=>Aa.test(r)))return"";if(!/[/\\]/.test(t)&&!/^(?:[\p{L}_][\p{L}\p{M}\p{N}_-]{0,23}|[\p{L}\p{N}_-]*\.[\p{L}\p{N}]{1,10})$/u.test(t))return"";return n.length>3?`…/${n.slice(-3).join("/")}`:`${t.startsWith("/")?"/":""}${n.join("/")}`}function Sl(e,t){let n=j(t),{path:r,file_path:s,filePath:i}=n,a=e.toLowerCase();switch(a){case"read":case"read_file":return{kind:"inspect",label:c("读取文件","Read file"),group:"Read",target:cr(r??s??i)};case"grep":return{kind:"inspect",label:c("搜索内容","Search contents"),group:"Grep",target:cr(r)};case"search":return{kind:"inspect",label:c("搜索内容","Search contents"),target:cr(r)};case"find":return{kind:"inspect",label:c("查找文件","Find files"),group:"Find",target:cr(r)};case"glob":return{kind:"inspect",label:c("查找文件","Find files"),group:"Glob",target:cr(r)};case"ls":case"list":case"list_dir":case"list_directory":case"list_files":return{kind:"inspect",label:c("列出目录","List directory"),group:"List",target:cr(r)};case"tool_search":return{kind:"inspect",label:c("查找工具","Find tools"),group:"Tool Search"};case"edit":case"edit_file":case"multiedit":case"apply_patch":return{kind:"modify",label:c("编辑文件","Edit file"),target:cr(r??s??i),facts:qh(a,n,t)};case"write":case"write_file":return{kind:"modify",label:c("写入文件","Write file"),target:cr(r??s??i),facts:qh(a,n,t)};case"bash":case"shell":case"powershell":return{kind:"terminal",label:a==="powershell"?"PowerShell":a==="shell"?"Shell":"Bash",operation:c("运行命令","Run command"),command:C(n.command)};case"bash_output":return{kind:"terminal",label:"Bash",operation:c("读取输出","Read output")};case"kill_bash":return{kind:"terminal",label:"Bash",operation:c("终止命令","Stop command")};case"memory":{let[o,l]=a5.get(C(n.command))??[];return{kind:"memory",label:"Memory",operation:o,facts:l?[[c("变更对象","Change target"),l]]:void 0}}case"todo":case"todowrite":{let o=Fh(n);return{kind:"todo",label:"Todo",operation:o.operation,preview:o.preview,todo:o}}case"eval":{let o=C(n.action),l=o==="peek"?c("查看执行","View run"):o==="list"?c("列出执行","List runs"):o==="stop"?c("停止执行","Stop run"):o==="run"||n.action===void 0?c("执行脚本","Run script"):void 0;return{kind:"execution",label:"Eval",operation:l,...$h(a,n),group:l&&o!=="stop"&&(n.reset===void 0||n.reset===!1)?"Eval":void 0}}case"ctx_execute":case"ctx_execute_file":return{kind:"context",label:"Ctx Execute",operation:c("执行脚本","Run script"),group:"Ctx Execute",...$h(a,n)};case"ctx_search":{let o=Ea(n.queries,Rr);return{kind:"context",label:"Ctx Search",operation:c("搜索上下文","Search context"),group:"Ctx Search",facts:o===void 0?void 0:[[c("查询","Queries"),c(`${o.toLocaleString(me)} 条`,o.toLocaleString(me))]]}}case"ctx_batch":{let o=Ea(n.commands,Rr),l=Ea(n.queries,Rr),u=o!==void 0&&l!==void 0?{preview:c(`提交 ${o.toLocaleString(me)} 条命令 · ${l.toLocaleString(me)} 条查询`,`Submitted ${o.toLocaleString(me)} ${o===1?"command":"commands"} · ${l.toLocaleString(me)} ${l===1?"query":"queries"}`),facts:[[c("命令","Commands"),c(`${o.toLocaleString(me)} 条`,o.toLocaleString(me))],[c("查询","Queries"),c(`${l.toLocaleString(me)} 条`,l.toLocaleString(me))]]}:void 0;return{kind:"context",label:"Ctx Batch",operation:c("批量查询","Batch search"),group:"Ctx Batch",...u}}case"ctx_index":{let o=[[n.path,c("本机文件","Local file")],[n.content,c("提交文本","Submitted text")],[n.url,c("网页地址","Web address")]].filter(([u])=>Rr(u)),l=o.length===1?C(o[0]?.[1]):"";return{kind:"context",label:"Ctx Index",operation:c("收录上下文","Index context"),facts:l?[[c("来源类型","Source type"),l]]:void 0}}case"ctx_purge":{let o=[n.project===!0&&c("项目","Project"),C(n.session)&&c("指定会话","Selected session"),C(n.source)&&c("指定来源","Selected source")].filter(Boolean),l=o.length===1?C(o[0]):"";return{kind:"context",label:"Ctx Purge",operation:c("清除上下文","Clear context"),facts:l?[[c("清除范围","Scope"),l]]:void 0}}case"task":{let o=u5(n),l=o?.map((p)=>p.route),u=n.tasks===void 0?l5(n):void 0,d=n.tasks===void 0&&Uh(n.category,n.subagent_type)?C(n.prompt):"",f=l?.length.toLocaleString(me);return{kind:"agent",label:"Agent",operation:c("派发任务","Dispatch tasks"),preview:u?.join(" · ")??(l&&c(`提交 ${f} 项任务`,`Submitted ${f} ${l.length===1?"task":"tasks"}`)),dispatchRoutes:l,agentRouting:u,agentPrompts:o?.map((p)=>p.prompt)??(d.trim()?[d]:void 0)}}case"task_output":return{kind:"agent",label:"Agent",operation:c("查看任务","View task"),scope:d5.get(C(n.mode))};case"task_send":return{kind:"agent",label:"Agent",operation:c("发送消息","Send message")};case"web_search":case"mcp_tinyfish_search":return{kind:"web",label:"Web",operation:c("网页搜索","Search the web"),group:"Web Search",facts:Rr(n.query)?[[c("查询","Queries"),c("1 条","1")]]:void 0};case"webfetch":case"mcp_tinyfish_fetch_content":{let o=Hh(n.url),l=Ea(n.urls,Rr),u=l===1&&Array.isArray(n.urls)?Hh(n.urls[0]):void 0,d=o??u;return{kind:"web",label:"Web",operation:c("读取网页","Read webpage"),group:"Web Fetch",preview:d,facts:[...d?[[c("主机","Host"),d]]:[],...l===void 0?[]:[[c("地址","Addresses"),c(`${l.toLocaleString(me)} 个`,l.toLocaleString(me))]]]}}default:return{kind:"unknown",label:/^[\p{L}\p{N}_.:-]{1,80}$/u.test(e)&&/\p{L}/u.test(e)&&!e.split(/[.:]/u).some((l)=>Aa.test(l)||/^(?:token|password|authorization|bearer|api[_-]?key)$/iu.test(l))?e:c("工具调用","Tool call")}}}var h5=4;function Wh(e,t,n=t.length,r){let s=t.slice(0,h5),i=n-s.length,a=i.toLocaleString(me);return{heading:e,rows:s,note:[r,i>0&&c(`其余 ${a} 项见详情`,`${a} more in details`)].filter(Boolean).join(" · ")}}function jh(e,t){if(!t)return[];let n=Mr(t);return[[e,n===void 0?c("已附","Included"):ri(n)]]}function Gh(e){let t=e.toLocaleString(me);return c(`${t} 行文本`,`${t} ${e===1?"line":"lines"} of text`)}function Rl(e){let t=c("可见输出","Visible output"),n=c("已收到文本","Text received");if(typeof e==="string"){let o=Mr(e);return e.length?[[t,o===void 0?n:Gh(o)]]:[]}let r=0,s=0;for(let o of ve(e)){let l=j(o);if(l.type==="text"&&typeof l.text==="string"){let u=Mr(l.text);if(u===void 0)return[[t,n]];r+=u}else if(l.type==="image"||l.type==="image_placeholder"||l.type==="imagePlaceholder")s++}let i=s.toLocaleString(me),a=[r&&Gh(r),s&&c(`${i} 项图片`,`${i} ${s===1?"image":"images"}`)].filter(Boolean).join(" · ");return a?[[t,a]]:[]}function ls(e,t,n){if(t.length)return{heading:e,facts:t,note:n}}function f5(e){let t=e.trim().replace(/\s+/gu," "),n=/^[\s\S]{1,140}/u.exec(t)?.[0]??"";return n.length<t.length?`${n}…`:n}function Kh(e,t){let n=e.facts??[];switch(e.kind){case"todo":{let r=e.todo?.card;if(r)return Wh(r.heading,r.titles,r.total);return}case"agent":{let r=e.dispatchRoutes??e.agentRouting;if(r?.length){let s=e.agentPrompts;return{...Wh(c("派发配置","Dispatch settings"),r),prompts:s&&{previews:s.slice(0,2).map(f5),count:s.length}}}if(e.scope)return ls(c("任务读取","Task lookup"),[[c("范围","Scope"),e.scope]]);return}case"terminal":return ls(c("终端记录","Terminal log"),[...jh(c("命令","Command"),e.command),...Rl(t)]);case"execution":case"context":return ls(e.kind==="execution"?c("脚本记录","Script run"):c("上下文请求","Context request"),[...n,...jh(c("源码","Source code"),e.source),...Rl(t)]);case"modify":return ls(c("提交内容","Submitted changes"),n);case"memory":return ls(c("记忆变更","Memory changes"),n,c("路径与内容按需查看","Open details to inspect paths and content"));case"web":return ls(c("网页请求","Web request"),[...n,...Rl(t)]);case"inspect":case"unknown":return;default:return e.kind}}function Ml(e){let t=y("ul","tool-card-rows");return t.append(...e.map((n)=>y("li","",n))),t}function Dl(e,t){let n=(e+1).toLocaleString(me);return t>1?c(`任务 ${n} · 提示词`,`Task ${n} prompt`):c("提示词","Prompt")}function Vh(e){let t=y("div","tool-card-content");if(t.append(y("p","tool-card-heading",e.heading)),"rows"in e)t.append(Ml(e.rows));else{let n=y("dl","tool-card-facts");for(let[r,s]of e.facts){let i=y("div","tool-card-fact");i.append(y("dt","",r),y("dd","",s)),n.append(i)}t.append(n)}if(e.prompts){let{previews:n,count:r}=e.prompts,s=y("div","tool-card-prompts");if(n.forEach((i,a)=>{let o=y("div");o.append(y("p","tool-card-note",Dl(a,r)),y("p","tool-card-prompt",i)),s.append(o)}),r>n.length){let i=r-n.length,a=i.toLocaleString(me);s.append(y("p","tool-card-note",c(`其余 ${a} 条提示词见详情`,`${a} more ${i===1?"prompt":"prompts"} in details`)))}t.append(s)}if(e.note)t.append(y("p","tool-card-note",e.note));return t}class Ll{node=y("details","tool-group");body=y("ol","tool-group-body");count=y("span","tool-group-count");kinds=y("span","tool-group-kinds");paths=y("span","tool-group-paths");rows=new WeakMap;constructor(){let e=y("summary","tool-group-summary");e.append(this.count," ",this.kinds," ",this.paths),this.node.append(e,this.body)}update(e){let t=new Map,n=new Set,r=!0,s=this.body.firstElementChild;for(let u of e){let d=u.firstElementChild;if(d instanceof HTMLDetailsElement){let p=d.dataset.groupTool;if(p)t.set(p,(t.get(p)??0)+1);r&&=d.dataset.toolKind==="inspect";let g=d.querySelector(":scope > .tool-summary .tool-target:not([hidden])")?.textContent;if(g&&n.size<2)n.add(g)}let f=this.rows.get(u);if(!f)f=y("li","tool-group-row"),this.rows.set(u,f);if(u.parentElement!==f||f.parentElement!==this.body){if(u.contains(document.activeElement)||d instanceof HTMLDetailsElement&&d.open)this.node.open=!0}if(u.parentElement!==f)f.append(u);if(f!==s)this.body.insertBefore(f,s);s=f.nextElementSibling}while(s){let u=s.nextElementSibling;s.remove(),s=u}let i=r?c("探查工具","File and tool lookups"):c("工具调用","Tool calls"),a=e.length.toLocaleString(me),o=c(`${i} · ${a} 项成功`,`${i} · ${a} succeeded`);if(this.count.textContent!==o)this.count.textContent=o;let l=[...t].map(([u,d])=>`${u} ×${d.toLocaleString(me)}`);if(this.kinds.textContent!==l.join(" "))this.kinds.replaceChildren(...l.flatMap((u,d)=>[...d?[" "]:[],y("span","tool-group-kind",u)]));if(this.paths.textContent!==[...n].join(" "))this.paths.replaceChildren(...[...n].flatMap((u,d)=>[...d?[" "]:[],y("code","tool-group-path path",u)]));return this.paths.hidden=!n.size,this.node}}var Il={inspect:c("探查结果","Inspection results"),modify:c("文件变更回执","File change receipt"),terminal:c("终端输出","Terminal output"),todo:c("待办工具回执","Todo receipt"),memory:c("记忆工具回执","Memory receipt"),execution:c("执行结果","Execution results"),context:c("上下文结果","Context results"),agent:c("任务工具输出","Agent tool output"),web:c("网页输出","Web output"),unknown:c("输出","Output")};function m5(e){let t=y("div","tool-scene tool-terminal"),n=Tn(""),r=n.querySelector("code"),s=y("div","tool-terminal-input");return n.classList.add("tool-command-preview"),n.setAttribute("aria-label",c("提交的命令","Submitted command")),s.append(y("span","tool-scene-key",c("命令","Command")),n),t.append(s,e),{node:t,update(i){if(s.hidden=!i.command,r)se(r,i.command)}}}function Zh(e,t){let n=y("details",`tool-receipt tool-${e}-receipt`);return n.append(y("summary","",c("查看原始回执","View raw receipt")),t),n}function p5(e){let t=y("div","tool-scene tool-todo"),n=y("div","tool-todo-list"),r=y("div","tool-todo-board");return n.append(y("p","tool-scene-key",c("提交的待办","Tasks submitted")),r),t.append(n,Zh("todo",e)),{node:t,update(s){let i=s.todo?.batches??[];n.hidden=!i.length;let a=1;r.replaceChildren(...i.map((o)=>{let l=y("div","tool-todo-lane stack stack--tight"),u=y("ol");if(u.start=a,a+=o.items.length,u.append(...o.items.map((d)=>y("li","",d))),o.phase)l.append(y("p","small",o.phase));return l.append(u),l}))}}}function Jh(e,t){let n=y("div",`tool-scene tool-code-desk tool-code-desk--${t?"context":"execution"}`),r=y("details","tool-source"),s=Tn(""),i=s.querySelector("code");return r.append(y("summary","",c("查看原始代码","View source code")),s),n.append(r,e),{node:n,update(a){if(r.hidden=!a.source,i)se(i,a.source)}}}function Yh(e,t){switch(e){case"terminal":return m5(t);case"todo":return p5(t);case"memory":{let n=y("div","tool-scene tool-memory-audit");return n.append(y("p","tool-memory-note small muted",c("记忆路径与内容默认隐藏。","Memory paths and content are hidden by default.")),Zh("memory",t)),{node:n}}case"execution":return Jh(t,!1);case"context":return Jh(t,!0);case"inspect":case"modify":{let n=y("div",`tool-scene tool-file tool-file--${e}`);return n.append(t),{node:n}}case"agent":{let n=y("div","tool-scene tool-agent"),r=y("p","tool-agent-scope small muted"),s=y("div","stack stack--tight"),i=y("div","stack stack--tight"),a=[];return i.hidden=!0,n.append(r,s,i,t),{node:n,update(o){if(se(r,o.scope&&c(`范围:${o.scope}`,`Scope: ${o.scope}`)),s.hidden=!o.dispatchRoutes,o.dispatchRoutes)s.replaceChildren(y("p","tool-scene-key",c("派发配置","Dispatch settings")),Ml(o.dispatchRoutes));let l=o.agentPrompts??[];if(l.length===a.length&&l.every((u,d)=>u===a[d]))return;a=l,i.hidden=!l.length,i.replaceChildren(...l.flatMap((u,d)=>{let f=Dl(d,l.length),p=Tn(u);return p.classList.add("tool-agent-prompt"),p.setAttribute("aria-label",f),[y("p","tool-scene-key",f),p]}))}}}case"web":{let n=y("div","tool-scene tool-web");return n.append(t),{node:n}}case"unknown":return;default:return e}}var Xh={running:{label:c("运行中","Running"),icon:"M12 4a8 8 0 1 0 8 8"},success:{label:c("成功","Succeeded"),icon:"m5 12 4 4L19 6"},error:{label:c("失败","Failed"),icon:"m6 6 12 12M18 6 6 18"},unknown:{label:c("未见结果","No result"),icon:"M6 12h12"},incomplete:{label:c("结果不完整","Incomplete result"),icon:"M12 4v10m0 5v1"}},Qh=c("工具输出","Tool output"),cs=(e)=>e?.truncated===!0||e?.partial===!0,ef=(e)=>typeof e.content==="string"||Array.isArray(e.content);function g5(e,t,n){if(n?.isError===!0||C(n?.errorMessage)||t?.stage==="error")return"error";if(cs(e)||cs(n)||n?.isError===!1&&!ef(n))return"incomplete";if(n?.isError===!1||t?.stage==="done")return"success";return!n&&t?.stage==="running"?"running":"unknown"}function Nl(e){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("aria-hidden","true"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-linejoin","round"),t.append(e),t}class Bl{renderOutputPart;node=y("article","message message--tool");details=y("details","tool-details");label=y("span","tool-label");target=y("span","tool-target path");operation=y("span","tool-operation small muted");preview=y("span","tool-preview small muted");compactFacts=y("span","tool-card-inline small muted");status=y("span","tool-state-text");icon=document.createElementNS("http://www.w3.org/2000/svg","path");kindIcon=document.createElementNS("http://www.w3.org/2000/svg","path");identity=y("p","tool-name small muted",c("工具名:","Tool name: "));name=y("code");args=Tn("");argsSection=y("div","stack stack--tight");rawArgs=y("details","tool-raw-args");output=y("div","tool-output stack stack--tight");outputLabel=y("p","small muted",Il.unknown);empty=y("p","muted small");outputSection=y("div","tool-result stack stack--tight");body=y("div","fold-body stack stack--tight");card;cardKey;scene;lastName;lastArgs;lastOutput;group;attachment;constructor(e){this.renderOutputPart=e;let t=y("summary","tool-summary"),n=y("span","tool-chevron");n.setAttribute("aria-hidden","true");let r=y("span","tool-subject"),s=Nl(this.kindIcon);s.classList.add("tool-kind-icon"),this.compactFacts.hidden=!0,r.append(s,this.label,this.operation,this.target,this.preview,this.compactFacts);let i=y("span","tool-state");i.append(Nl(this.icon),this.status),t.append(n,r,i),this.identity.append(this.name),this.rawArgs.append(y("summary","",c("原始参数","Raw arguments"))),this.argsSection.append(y("p","small muted",c("调用参数","Call arguments"))),this.output.tabIndex=0,this.output.setAttribute("role","region"),this.output.setAttribute("aria-label",Qh),this.outputSection.append(this.outputLabel,this.output,this.empty),this.body.append(this.identity),this.details.append(t,this.body),this.node.append(this.details)}get open(){return this.details.open}set open(e){this.details.open=e}groupWith(e){return this.group??=new Ll,this.group.update(e)}updateCard(e,t){let n=Kh(e,t),r=Boolean(e.preview&&!e.dispatchRoutes),s=n&&JSON.stringify([e.kind,n,r]);if(this.cardKey===s)return;if(this.cardKey=s,this.card?.remove(),this.card=void 0,se(this.compactFacts,n&&"facts"in n?n.facts.map(([l,u])=>`${l} ${u}`).join(" · "):""),!n)return;let i=y("div","tool-card-preview");if(r)i.dataset.repeatRecap="";let a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d",e.kind==="todo"?"m3 12 6 6L21 6":Tl[e.kind]);let o=Nl(a);o.classList.add("tool-card-emblem"),i.append(o,Vh(n)),this.node.append(i),this.card=i}update(e,t,n,r){let s=C(e?.name)||t?.name||C(n?.toolName),i=e?.arguments===void 0?t?.args:e.arguments,a=n?.content??t?.output,o=g5(e,t,n),l=s==="send_file"&&o==="success"&&n?.role==="toolResult"&&n.toolName===s&&n.isError===!1?Bh(r,n.content):void 0;if(l?.href!==this.attachment?.href||l?.textContent!==this.attachment?.textContent){if(this.attachment?.remove(),this.attachment=l,l)this.node.append(l)}let u=o==="unknown"&&n?c("状态未知","Unknown status"):Xh[o].label,d=Sl(s,i),{kind:f,label:p,operation:g,target:b,preview:x,group:k}=d,A=this.details.dataset.toolKind!==f;if(A){this.details.dataset.toolKind=f,this.kindIcon.setAttribute("d",Tl[f]);let D=Il[f];if(this.outputLabel.textContent=D,this.output.setAttribute("aria-label",f==="unknown"?Qh:D),this.scene?.node.remove(),this.outputSection.remove(),this.argsSection.remove(),this.rawArgs.remove(),this.scene=Yh(f,this.outputSection),this.body.classList.toggle("tool-generic",!this.scene),this.scene)this.rawArgs.append(this.args),this.body.append(this.scene.node,this.rawArgs);else this.argsSection.append(this.args),this.body.append(this.argsSection,this.outputSection)}if(this.details.dataset.groupTool!==k)if(k)this.details.dataset.groupTool=k;else delete this.details.dataset.groupTool;let T=this.details.dataset.state;if(T!==o)if(this.details.dataset.state=o,this.icon.setAttribute("d",Xh[o].icon),o==="running"&&this.scene)this.details.dataset.toolMotion="entry";else if(T==="running"&&(o==="success"||o==="error"))this.details.dataset.toolMotion="settlement";else delete this.details.dataset.toolMotion;if(this.status.textContent!==u)this.status.textContent=u;if(this.label.textContent!==p)this.label.textContent=p;se(this.operation,g),se(this.target,b),se(this.preview,x),se(this.name,f==="unknown"||s.toLowerCase()===p.toLowerCase()?"":s),this.identity.hidden=this.name.hidden;let S=A||this.lastArgs!==i||this.lastName!==s;if(S||this.lastOutput!==a)this.updateCard(d,a);if(S){this.scene?.update?.(d),this.argsSection.hidden=this.rawArgs.hidden=i===void 0;let D=this.args.firstElementChild,M=L0(i);if(D&&D.textContent!==M)D.textContent=M;this.lastArgs=i,this.lastName=s}if(this.lastOutput!==a){let D=typeof a==="string"?[{type:"text",text:a}]:ve(a),M=this.output.scrollTop,L=this.output.scrollLeft;this.output.replaceChildren(...D.flatMap((z)=>{let O=this.renderOutputPart(j(z));if(O?.tagName==="PRE")O.removeAttribute("tabindex");return O??[]})),this.output.scrollTop=M,this.output.scrollLeft=L,this.lastOutput=a}this.output.hidden=!this.output.childElementCount,this.outputLabel.hidden=this.output.hidden,this.empty.hidden=!this.output.hidden;let E=o==="running"?c("等待工具输出…","Waiting for tool output…"):o==="unknown"&&!n?c("没有可见的工具结果。","No tool result is available."):c("无可显示的输出。","No output to display.");if(this.empty.textContent!==E)this.empty.textContent=E}}function tf({entries:e,start:t,liveKey:n,tools:r,calls:s,results:i}){let a=new Map,o=!1,l=[],u=()=>{if(l.length>1)for(let d of l)a.set(C(d.id),l);l=[]};for(let d=t;d<e.length;d++){let f=e[d],p=f?.message;if(!f||!p||p.role!=="assistant"||!o||f.key===n||p.streaming===!0||cs(p)||C(p.errorMessage)||p.stopReason!==void 0&&p.stopReason!=="toolUse"&&p.stopReason!=="stop"){if(u(),p?.role==="user")o=!cs(p);continue}let g=ve(p.content).map(j);if(!g.length){u();continue}let b=new Set(g.flatMap((k)=>k.type==="toolCall"?C(k.id)||[]:[])),x=new Map;for(let k=e[d+1]?.message;k?.role==="toolResult";k=e[d+1]?.message){let A=C(k.toolCallId);if(!b.has(A)||x.has(A)||i.get(A)!==d+1)break;x.set(A,k),d++}for(let k of g){let A=C(k.id),T=C(k.name).toLowerCase(),S=x.get(A),E=r.get(A),D=E?.stage,M=k.arguments===void 0?E?.args:k.arguments;if(k.type==="toolCall"&&s.get(A)===1&&Sl(T,M).group&&!cs(k)&&S?.isError===!1&&ef(S)&&!cs(S)&&!C(S.errorMessage)&&(!C(S.toolName)||C(S.toolName).toLowerCase()===T)&&(D===void 0||D==="done"))l.push(k);else u()}}return u(),a}function Ca(e){if(!e)return;return e.closest(".tool-group:not([open])")?.querySelector(":scope > summary")??e}function of(e){return typeof e==="string"?[{type:"text",text:e}]:ve(e)}function lf(e,t,n){if(t==="tool"&&e.type!=="text"&&e.type!=="image"&&e.type!=="image_placeholder"&&e.type!=="imagePlaceholder")return;switch(e.type){case"text":{let r=C(e.text);if(!r)return;return t==="markdown"?Al(r,n):t==="tool"?Tn(r):y("p","plain",r)}case"thinking":{let r=C(e.thinking);if(!r)return;let s=n?.querySelector(".plain");if(n&&s)return s.textContent=r,n;return Yt(c("思考过程","Thinking"),y("p","plain muted",r))}case"image":{let r=C(e.data);if(!Li(e.mimeType)||!/^[A-Za-z0-9+/]+={0,2}$/.test(r))return y("p","small muted",c("图片内容不可用","Image unavailable"));let s=y("img");return s.alt=t==="tool"?c("工具输出图片","Tool output image"):c("消息图片","Image attached to message"),s.loading="lazy",s.src=`data:${e.mimeType};base64,${r}`,s}case"image_placeholder":case"imagePlaceholder":return y("p","small muted",c("此图片未包含在会话快照中","This image is not included in the session snapshot."));default:{let r=C(e.type)||c("未知类型","Unknown type");return Object.keys(e).length?y("p","small muted",c(`未展开的内容 · ${r}`,`Content not displayed · ${r}`)):void 0}}}var Qt=(e)=>C(e.role),Dr=(e)=>{if(Qt(e)==="toolResult"&&C(e.toolCallId))return`result:${C(e.toolCallId)}`;if(C(e.id))return`id:${C(e.id)}`;let t=we(e.timestamp);return t===void 0?"":`${Qt(e)}:${t}`};function b5(e){let t=we(e);if(t===void 0)return;let n=new Date(t);if(!Number.isFinite(n.getTime()))return;let r=y("time","numerical",n.toLocaleTimeString(me,{hour:"2-digit",minute:"2-digit"}));return r.dateTime=n.toISOString(),r.title=n.toLocaleString(me),r}function v5(e,t,n,r){let s=Qt(e),i=r?.role===s?r:void 0,a=s==="user"||s==="assistant",o=i?.node??y("article",a?`message message--${s}`:"message"),l=i?.speaker??y("span","speaker"),u=s==="assistant"?t?c("助手 · 正在生成","Assistant · Writing"):c("助手","Assistant"):s==="user"?c("你","You"):s==="bashExecution"?c("命令输出","Command output"):c("会话记录","Session record");if(l.textContent!==u)l.textContent=u;let d=i?.body??y("div","message-body"),f=i?.timestamp===e.timestamp?i?.time:b5(e.timestamp),p=i?.header??y("header");if(!i){if(a){let z=document.createElementNS("http://www.w3.org/2000/svg","svg"),O=document.createElementNS("http://www.w3.org/2000/svg","path");z.setAttribute("viewBox","0 0 24 24"),z.setAttribute("fill","currentColor"),z.setAttribute("aria-hidden","true"),z.setAttribute("focusable","false"),O.setAttribute("fill-rule","evenodd"),O.setAttribute("d",s==="user"?"M3 6 6 3h15v15l-3 3H3V6Zm9 1-1.4 1.4 2.6 2.6H7v2h6.2l-2.6 2.6L12 17l5-5-5-5Z":"M12 2 22 12 12 22 2 12 12 2Zm0 3-7 7 7 7 7-7-7-7Zm0 4 3 3-3 3-3-3 3-3Z"),z.append(O);let P=y("span","message-identity");l.style.overflowWrap="normal",P.append(z,l),p.append(P)}else p.append(l);o.append(d)}if(i?.time!==f){if(i?.time?.remove(),f)p.append(f)}let g=of(e.content).map((L,z)=>{let O=j(L);if(O.type==="toolCall")return{part:O,node:n(O,z)};let P=i?.parts[z];if(P){let ce=Object.keys(O);if(P.part===O||ce.length===Object.keys(P.part).length&&ce.every((re)=>Object.hasOwn(P.part,re)&&O[re]===P.part[re]))return P}let V=P?.part.type===O.type?P?.node:void 0,G=lf(O,s==="assistant"?"markdown":"plain",V);if(G instanceof HTMLDetailsElement&&V instanceof HTMLDetailsElement)G.open=V.open;return{part:O,node:G}}),b=C(e.errorMessage),x=s==="bashExecution"?C(e.output):"",k=C(e.stopReason),A=JSON.stringify([x,b,k]),T=i?.metadata===A?i.notices:[...x?[Tn(x)]:[],...b||k==="error"?[y("p","notice error small",b||c("生成失败","Could not generate a response."))]:[],...k==="aborted"?[y("p","muted small",c("已停止生成","Response stopped."))]:[],...k==="length"?[y("p","muted small",c("已达到输出长度限制","Response reached the length limit."))]:[]],S=s==="assistant"&&!T.length&&g.some(({part:L})=>L.type==="toolCall")&&g.every(({part:L,node:z})=>L.type==="toolCall"||!z||L.type==="text"&&!C(L.text).trim());if(o.classList.toggle("message--tool-only",S),S)p.remove();else if(p.parentNode!==o)o.prepend(p);let E=(S?g.filter(({part:L})=>L.type==="toolCall"):g).flatMap((L)=>L.node??[]),D=new Set(E);for(let L of i?.parts??[])if(L.node?.parentNode===d&&!D.has(L.node))L.node.remove();if(i&&i.notices!==T)for(let L of i.notices)L.remove();let M=d.firstElementChild;for(let L of[...E,...T]){if(L!==M)d.insertBefore(L,M);M=L.nextElementSibling}return{node:o,body:d,header:p,speaker:l,time:f,timestamp:e.timestamp,role:s,parts:g,notices:T,metadata:A}}var Ol=80,nf=c("加载更早消息","Load older messages"),rf=c("重新加载记录","Reload transcript");function sf(e,t,n){if(e.textContent!==n)e.textContent=n;e.toggleAttribute("data-reload",t?.reload===!0),e.setAttribute("aria-disabled",String(Boolean(t?.busy||t?.disabled))),e.setAttribute("aria-busy",String(t?.busy===!0))}function af(e){if(e&&!e.busy&&!e.disabled)e.activate()}class Fn{root;scroller;empty;cache=new Map;openFolds=new Map;toolViews=new Map;openTools=new Set;results=new Map;contentViews=new WeakMap;older=We(nf,()=>{if(this.start)this.flush(!0);else af(this.latest?.history?.older)},"transcript-load");status=y("span","sr-only");olderError=y("p","notice small");latest;frame;forceBottom=!1;prepended;limit=Ol;start=0;first;displayed;indexed;indexedLength=0;trace;constructor(e,t,n){this.root=e;this.scroller=t;this.empty=n;this.status.setAttribute("role","status"),this.olderError.setAttribute("role","status")}observeTrace(e){this.trace=e}reset(){if(this.frame!==void 0)cancelAnimationFrame(this.frame);this.frame=void 0,this.latest=this.displayed=this.indexed=void 0,this.first=void 0,this.forceBottom=!1,this.prepended=void 0,this.limit=Ol,this.start=this.indexedLength=0,this.cache.clear(),this.openFolds.clear(),this.toolViews.clear(),this.openTools.clear(),this.results.clear(),this.root.replaceChildren(),this.status.textContent="",this.empty.hidden=!1,this.scroller.scrollTop=0,this.trace?.({})}render(e,t,n,r=!1,s,i,a){if(this.latest={entries:e,liveKey:t,tools:n,history:s,sessionId:a},this.forceBottom||=r,i!==void 0)this.prepended=(this.prepended??0)+i;this.frame??=requestAnimationFrame(()=>{this.frame=void 0,this.flush()})}indexResults(e){if(this.indexed!==e||this.indexedLength>e.length)this.indexed=e,this.indexedLength=0,this.results.clear();for(;this.indexedLength<e.length;this.indexedLength++){let t=e[this.indexedLength]?.message,n=C(t?.toolCallId);if(t?.role==="toolResult"&&n)this.results.set(n,this.indexedLength)}}flush(e=!1){if(!this.latest||e&&!this.start)return;if(this.frame!==void 0)cancelAnimationFrame(this.frame);this.frame=void 0;let{entries:t,liveKey:n,tools:r,history:s,sessionId:i}=this.latest,a=this.prepended;this.prepended=void 0;let o=e||a!==void 0,{scrollTop:l,scrollHeight:u,clientHeight:d}=this.scroller,f=document.activeElement,p=f instanceof HTMLElement&&this.root.contains(f)&&(f.closest(".tool-details, .tool-group, .tool-attachment, .transcript-content, .prose")||this.trace&&f.matches(".message[tabindex='-1']"))?f:void 0,g=p?.matches(".tool-group-summary")?p.parentElement?.querySelector(".tool-summary"):p?.querySelector(".tool-summary"),b=u-d-l<72,x=this.forceBottom||b&&!p&&f!==this.older;this.forceBottom=!1;let k=this.olderError.nextElementSibling,A=o&&k instanceof HTMLElement?k:void 0,T=A?.querySelector(".tool-summary")??void 0,S=o&&p?.closest(".tool-details, .tool-group")&&A?.contains(p)?p:A,E=S?.getBoundingClientRect().top,D=o&&document.activeElement===this.older;this.indexResults(t);let M=[];for(let[N,J]of r)if(!this.results.has(N))M.push({key:`result:${N}`,tool:J});let L=t.length+M.length;if(a!==void 0)this.limit+=a;let z=Math.max(0,L-this.limit);if(!this.displayed||x&&!o)this.start=z;else{if(t!==this.displayed&&this.first){let N=t.findIndex((J)=>J.key===this.first);if(N>=0)this.start=N}this.start=Math.min(this.start,z)}let O=a??0;if(e)O=Math.min(this.start,Ol),this.start-=O,this.limit=Math.max(this.limit,L-this.start);else if(a!==void 0)this.start=Math.max(0,this.start-a);this.displayed=t,this.first=t[this.start]?.key;let P=[],V=new Map;for(let N=this.start;N<t.length;N++){let J=t[N];if(!J)continue;let{message:oe}=J;if(oe.role==="toolResult"){let Ce=C(oe.toolCallId);if(!Ce||this.results.get(Ce)===N)P.push({...J,tool:r.get(Ce)})}else{let Ce=!1;if(oe.role==="assistant")for(let ye of of(oe.content)){let Be=j(ye);if(Be.type!=="toolCall")continue;Ce=!0;let Fe=C(Be.id);if(Fe)V.set(Fe,(V.get(Fe)??0)+1)}P.push({...J,live:J.key===n,hasCalls:Ce})}}for(let N=Math.max(0,this.start-t.length);N<M.length;N++)P.push(M[N]);let G=tf({entries:t,start:this.start,liveKey:n,tools:r,calls:V,results:this.results}),ce=new Set(P.filter((N)=>N.message&&N.message.role!=="toolResult").map((N)=>N.key));for(let[N,J]of this.cache)if(!ce.has(N)){let oe=[...J.view.body.querySelectorAll(":scope > details:not(.tool-group)")].flatMap((Ce,ye)=>Ce.open?[ye]:[]);if(oe.length)this.openFolds.set(N,oe);J.view.node.remove(),this.cache.delete(N)}let re=new Set,de,F=(N,J,oe,Ce)=>{if(re.has(N))return;re.add(N);let ye=this.toolViews.get(N);if(!ye)ye=new Bl((Fe)=>lf(Fe,"tool")),ye.open=this.openTools.delete(N),this.toolViews.set(N,ye);ye.update(J,oe,Ce,i);let Be=ye.node.querySelector(":scope > .tool-details > .fold-body");if(Be)this.renderHistoryContent(Be,Ce&&s?.content(Ce));if(this.trace&&(oe?.id||C(J?.id)||C(J?.name)||C(Ce?.toolCallId)||C(Ce?.toolName)))de=ye.node;return ye.node};if(this.older.parentNode!==this.root)this.root.prepend(this.status,this.older,this.olderError);let K=this.start?void 0:s?.older;this.older.hidden=!this.start&&!K;let Y=this.start.toLocaleString(me),ee=this.start?c(`加载更早消息(${Y} 条)`,`Load older messages (${Y})`):K?.reload?rf:K?.busy?c("正在读取…","Loading…"):nf;if(sf(this.older,K,ee),this.olderError.hidden=!K?.error,this.olderError.textContent!==(K?.error??""))this.olderError.textContent=K?.error??"";let ie=(N,J)=>{let oe=C(J.id),Ce=this.results.get(oe);return F(oe?`id:${oe}`:N,J,r.get(oe),Ce===void 0?void 0:t[Ce]?.message)},H=this.olderError,q,W;for(let N of P){let{message:J}=N,oe;if(!J||J.role==="toolResult"){let ye=C(J?.toolCallId)||N.tool?.id;if(ye&&V.has(ye))continue;oe=F(ye?`id:${ye}`:`row:${N.key}`,void 0,N.tool,J)}else{let ye=!1;oe=this.updateMessage(N,J,(Fe,Pe)=>{let Ve=C(Fe.id),mt=G.get(Ve),yt=`part:${N.key}:${Pe}`;if(!mt)return ie(yt,Fe);if(mt[0]!==Fe){ye=!0;return}let Wr=mt.flatMap((Cn)=>ie(yt,Cn)??[]);return this.toolViews.get(`id:${Ve}`)?.groupWith(Wr)});let Be=this.cache.get(N.key)?.view;if(Be){let Fe=s?.content(J),Pe=Be.parts.filter(({part:Ve})=>Ve.type==="text");if(Pe.length===1&&Pe[0]?.node)Pe[0].node.hidden=Boolean(Fe?.chunks.length);this.renderHistoryContent(Be.body,Fe,J.role==="assistant"&&Pe.length===1)}if(ye&&oe.classList.contains("message--tool-only")&&!this.cache.get(N.key)?.view.body.childElementCount){oe.remove();continue}if(this.trace&&(J.role==="user"||J.role==="assistant")){if(this.cache.get(N.key)?.view.parts?.some(({part:Pe,node:Ve})=>Ve&&Pe.type!=="toolCall"&&Pe.type!=="thinking"&&(Pe.type!=="text"||C(Pe.text).trim())))if(J.role==="user")q=oe;else W=oe}}if(!oe)continue;let Ce=H.nextElementSibling;if(oe!==Ce)this.root.insertBefore(oe,Ce);H=oe}for(let[N,J]of this.toolViews)if(!re.has(N)){if(J.open)this.openTools.add(N);J.node.remove(),this.toolViews.delete(N)}if(p&&document.activeElement===document.body){let N=this.root.contains(p)?p:g;if(N&&this.root.contains(N))Ca(N)?.focus({preventScroll:!0})}this.empty.hidden=L>0;let le=de?.closest(".tool-group")??de;if(this.trace?.({user:q,assistant:W,tool:le?.querySelector("summary")??void 0}),o){if(O){let J=O.toLocaleString(me);this.status.textContent=c(`已加载 ${J} 条更早消息。`,`Loaded ${J} older ${O===1?"message":"messages"}.`)}let N=S&&this.root.contains(S)?Ca(S):Ca(T);if(N&&this.root.contains(N)&&E!==void 0){if(D&&(O||this.older.hidden)){if(N.tagName!=="SUMMARY")N.tabIndex=-1;N.focus({preventScroll:!0})}this.scroller.scrollTop+=N.getBoundingClientRect().top-E}else if(D&&this.older.hidden)this.scroller.focus({preventScroll:!0})}else if(x)this.scroller.scrollTop=this.scroller.scrollHeight;if(!o&&f===this.older&&this.older.hidden)this.scroller.focus({preventScroll:!0})}renderHistoryContent(e,t,n=!1){let r=this.contentViews.get(e);if(r&&(!t||r.key!==t.key)){let u=r.node.contains(document.activeElement);if(r.node.remove(),this.contentViews.delete(e),r=void 0,u)this.scroller.focus({preventScroll:!0})}if(!t)return;if(!r){let u=y("div","transcript-content stack stack--tight"),d=y("div",n?"prose":"plain break"),f=y("p","small muted");f.setAttribute("role","status");let p=We("",()=>af(this.contentViews.get(e)?.control),"button--quiet");u.append(d,f,p),e.append(u),r={key:t.key,node:u,output:d,status:f,button:p,count:0,length:0},this.contentViews.set(e,r)}if(r.control=t.control,t.chunks.length<r.count)r.count=r.length=0,r.output.replaceChildren(),r.output.className=n?"prose":"plain break";let s=t.chunks.slice(r.count),i;if(s.length){let u=r.length;if(r.length+=s.reduce((d,f)=>d+f.length,0),n&&r.length<=xa)Al(t.chunks.join(""),r.output),i=r.output;else{let d=n&&u<=xa;if(d)r.output.className="plain break",r.output.replaceChildren(y("p","small muted",c("正文过长,已按纯文本显示。","This long message is displayed as plain text.")));let f=(d?t.chunks:s).map((p)=>y("span","",p));r.output.append(...f),i=f.find((p)=>p.textContent)}}r.count=t.chunks.length,r.output.hidden=!r.count;let a=t.control?.reload?rf:t.control?.busy?c("正在读取…","Loading…"):r.count?c("加载下一段正文","Load next content chunk"):c("加载正文","Load message content");sf(r.button,t.control,a);let o=t.control?.reload?c("记录版本已失效。","This transcript page expired."):t.control?.error??(s.length?c("已加载正文。","Message content loaded."):t.control?.busy||!r.count?"":r.status.textContent);if(r.status.textContent!==o)r.status.textContent=o;if(r.status.hidden=!o,i&&document.activeElement===r.button)i.tabIndex=-1,i.focus({preventScroll:!0});let l=!t.control&&document.activeElement===r.button;if(r.button.hidden=!t.control,l)this.scroller.focus({preventScroll:!0})}updateMessage(e,t,n){let{key:r,hasCalls:s}=e,i=Boolean(e.live),a=this.cache.get(r);if(!s&&a&&a.message===t&&a.live===i)return a.view.node;let o=v5(t,i,n,a?.view);if(a&&o.node!==a.view.node)a.view.node.remove();if(!a){let l=this.openFolds.get(r);if(l){let u=o.body.querySelectorAll(":scope > details:not(.tool-group)");for(let d of l)if(u[d])u[d].open=!0;this.openFolds.delete(r)}}return this.cache.set(r,{message:t,live:i,view:o}),o.node}}function zl(e){let t=j(e),n=C(t.id);if(n)return{id:n,olderCursor:C(t.olderCursor)}}function Fl(e){let t=j(e).status;if(t==="truncated"||t==="unavailable")return t}class $l{api;sessionId;current;enabled;tail;changed;reload;id;entries=[];status;stale=!1;reloading=!1;olderCursor;olderError;requests=new Map;contents=new Map;constructor(e,t,n,r,s,i,a,o){this.api=t;this.sessionId=n;this.current=r;this.enabled=s;this.tail=i;this.changed=a;this.reload=o;this.id=e.id,this.olderCursor=e.olderCursor}invalidate(){for(let e of this.requests.values())e.abort();this.requests.clear()}clearExpansion(){this.invalidate(),this.entries=[],this.status=void 0,this.contents.clear()}render(){let e=(t,n,r)=>({activate:this.stale?this.reload:t,disabled:!this.enabled(),busy:this.reloading||this.requests.has(n),reload:this.stale,error:r});return{older:this.olderCursor||this.stale?e(()=>{this.loadOlder()},this.olderCursor,this.olderError):void 0,content:(t)=>{let n=C(j(t.historyContent).cursor);if(!n)return;let r=this.contents.get(n),s=r?.next??n;return{key:n,chunks:r?.chunks??[],control:s?e(()=>{this.loadContent(n,s)},s,r?.error):void 0}}}}async read(e,t,n,r){if(!e||this.stale||!this.current()||!this.enabled()||this.requests.has(e))return;let s=new AbortController,i=()=>this.current()&&this.requests.get(e)===s&&!s.signal.aborted;this.requests.set(e,s),this.changed();let a;try{let o=`${Xe(this.sessionId)}/transcript${t?"/content":""}`,l=await this.api.request(`${o}?${new URLSearchParams({cursor:e})}`,void 0,AbortSignal.any([s.signal,AbortSignal.timeout(20000)]));if(i())a=n(l)}catch(o){if(!i())return;if(o instanceof De&&(o.code.includes("cursor")||[400,401,403,404,409,410].includes(o.status)))this.expire();else r(c("读取失败,请重试。","Couldn't load this part. Try again."))}finally{if(i())this.requests.delete(e),this.changed(a)}}expire(){this.stale=!0,this.olderError=c("记录版本已失效,请重新加载。","This transcript page expired. Reload the transcript."),this.invalidate(),this.changed()}async loadOlder(){let e=this.olderCursor;await this.read(e,!1,(t)=>{let n=zl(t.page);if(!n||n.id!==this.id||n.olderCursor===e||!Array.isArray(t.messages)){this.expire();return}let r=new Set([...this.entries,...this.tail()].map((i)=>i.key)),s=ve(t.messages).map(j).filter((i)=>Boolean(Qt(i))).flatMap((i,a)=>{let o=Dr(i),l=r.has(o);if(l&&(o.startsWith("id:")||o.startsWith("result:")))return[];let u=o&&!l?o:`older:${this.entries.length}:${a}`;return r.add(u),[{key:u,message:i}]});return this.entries=[...s,...this.entries],this.olderCursor=n.olderCursor,this.olderError=void 0,this.status=Fl(t.transcript)??this.status,s.length},(t)=>{this.olderError=t})}async loadContent(e,t){let n=this.contents.get(e)??{next:e,chunks:[]};if(this.contents.set(e,n),n.next!==t)return;await this.read(t,!0,(r)=>{let s=C(r.nextCursor);if(typeof r.text!=="string"||s===t||s&&s===e){this.expire();return}n.chunks.push(r.text),n.next=s,n.error=void 0;return},(r)=>{n.error=r})}}var cf={pending:c("等待中","Pending"),queued:c("排队中","Queued"),scheduled:c("已调度","Scheduled"),blocked:c("被依赖阻塞","Blocked by dependencies"),paused:c("已暂停","Paused"),running:c("运行中","Running"),completed:c("已完成","Completed"),done:c("已完成","Completed"),success:c("成功","Succeeded"),failed:c("失败","Failed"),error:c("出错","Error"),cancelled:c("已取消","Canceled"),skipped:c("已跳过","Skipped"),interrupted:c("已中断","Interrupted"),lost:c("已失联","Lost contact")},ql=c("未知时间","Unknown time"),Mt=new Intl.NumberFormat(me),Lr=(e)=>Object.hasOwn(cf,e)?cf[e]:void 0,_a=(e)=>Lr(e)??e;function Dt(e){let t=we(e);if(t===void 0)return ql;let n=new Date(t);return Number.isNaN(n.getTime())?ql:n.toLocaleString(me,{hour12:!1})}function y5(e,t){let n=we(e),r=we(t);if(n===void 0||r===void 0||r<n)return"";let s=Math.round((r-n)/1000);if(s<60)return c(`${Mt.format(s)} 秒`,`${Mt.format(s)} sec`);let i=Math.floor(s/60);if(i<60)return c(`${Mt.format(i)} 分钟`,`${Mt.format(i)} min`);let a=Mt.format(Math.floor(i/60)),o=Mt.format(i%60);return c(`${a} 小时 ${o} 分钟`,`${a} hr ${o} min`)}function w5(e){let t=y("dl","details-list small numerical");for(let[n,r]of e)if(r)t.append(y("dt","",n),y("dd","",r));return t.childElementCount?t:y("p","small muted",c("当前没有可用数据。","No data available."))}function k5(e,t){let n=ve(e.nodes).map(j),r=ve(e.edges).map(j),s=(a)=>{if(!a)return"";let o=t.get(a),l=o?C(o.description):"";return l?c(`${l}(${a})`,`${l} (${a})`):c(`子任务 ${a}`,`Subtask ${a}`)},i=[];if(n.length)i.push(w5(n.map((a)=>{let o=C(j(a).taskId),l=ve(j(a).upstream).map(C).filter(Boolean),u=Mt.format(we(j(a).attempt)??0);return[C(j(a).label)||C(j(a).id)||c("节点","Node"),[`${_a(C(j(a).state))}`,c(`尝试 ${u} 次`,`Attempts: ${u}`),o?c(`关联:${s(o)}`,`Task: ${s(o)}`):"",l.length?c(`上游:${l.join("、")}`,`Upstream: ${l.join(", ")}`):""].filter(Boolean).join(" · ")]})));else i.push(y("p","small muted",c("这次运行还没有节点记录。","No nodes were recorded for this run.")));if(r.length){let a=y("ul","inline-list");for(let o of r){let l=C(o.fromLabel)||C(o.from),u=C(o.toLabel)||C(o.to);if(l&&u){let d=y("li","stack stack--tight");d.append(y("p","plain",`${l} → ${u}`)),a.append(d)}}if(a.childElementCount)i.push(Yt(c(`依赖边(${Mt.format(a.childElementCount)})`,`Dependencies (${Mt.format(a.childElementCount)})`),a))}return Yt(`${C(e.name)||c("运行","Run")} · ${_a(C(e.status))}`,...i)}function x5(e){let t=y("ul","inline-list");for(let n of e){let r=j(n),s=[Dt(r.startedAt),r.completedAt===void 0?"":Dt(r.completedAt)].filter((u)=>u&&u!==ql),i=y5(r.startedAt,r.completedAt),a=we(r.turns),o=we(r.toolCalls),l=y("li","stack stack--tight");l.append(y("p","plain",C(r.description)||c("子任务","Subtask"))),l.append(y("p","small muted break",[C(r.id)?c(`任务 ID:${C(r.id)}`,`Task ID: ${C(r.id)}`):"",C(r.parentTaskId)?c(`父任务:${C(r.parentTaskId)}`,`Parent task: ${C(r.parentTaskId)}`):"",C(r.agent)?c(`智能体:${C(r.agent)}`,`Agent: ${C(r.agent)}`):"",C(r.model)?c(`模型:${C(r.model)}`,`Model: ${C(r.model)}`):"",C(r.status)?c(`状态:${_a(C(r.status))}`,`Status: ${_a(C(r.status))}`):"",s.length?c(`时间:${s.join(" → ")}${i?`(耗时 ${i})`:""}`,`Time: ${s.join(" → ")}${i?` (${i} elapsed)`:""}`):"",a!==void 0?c(`轮次:${Mt.format(a)}`,`Turns: ${Mt.format(a)}`):"",o!==void 0?c(`工具调用:${Mt.format(o)}`,`Tool calls: ${Mt.format(o)}`):""].filter(Boolean).join(" · "))),t.append(l)}return Yt(c(`子任务(${Mt.format(t.childElementCount)})`,`Subtasks (${Mt.format(t.childElementCount)})`),t)}var E5={"no-agent-dir":c("原生任务快照不可用:未配置原生配置目录,快照入口已关闭。","Native task snapshots are disabled because no native configuration directory is set."),"invalid-id":c("原生任务快照不可用:会话标识无效,无法定位快照。","Could not locate the native task snapshot: the session ID is invalid."),"session-unavailable":c("原生任务快照不可用:会话尚未接入引擎,请先恢复会话。","Resume the session to connect it to the engine before reading its native task snapshot."),"missing-projection":c("原生任务快照不可用:原生暂无此会话的任务快照,并非读取失败。","The native host has no task snapshot for this session. The read did not fail.")};function uf(e){let t=y("div","stack stack--tight"),n=y("section","subpanel stack stack--tight"),r=y("section","subpanel stack stack--tight");if(n.id="runtime-dag",n.tabIndex=-1,r.id="runtime-subagent",r.tabIndex=-1,n.append(y("h3","",c("DAG 快照","DAG snapshot"))),r.append(y("h3","",c("子代理","Subagents"))),t.append(r,n),C(e.status)!=="ok"){let l=C(e.reason),u=E5[l]??c("原生任务快照不可用。","Native task snapshot unavailable.");return n.append(y("p","small muted",u)),r.append(y("p","small muted",u)),t}let s=[c(`快照时间:${Dt(e.updatedAt)}`,`Snapshot time: ${Dt(e.updatedAt)}`),e.connected===void 0?c("工作区记录,非实时","Workspace record · Not live"):c(`Herdr 快照,记录时${e.connected===!0?"已连接":"未连接"},非实时`,`Herdr snapshot · ${e.connected===!0?"Connected":"Not connected"} at capture · Not live`)].join(" · ");n.append(y("p","small muted",s)),r.append(y("p","small muted",s));let i=ve(e.runs).map(j),a=ve(e.tasks).map(j);if(!i.length)n.append(y("p","small muted",c("快照中没有 DAG 记录。","No DAG runs in this snapshot.")));let o=new Map(a.map((l)=>[C(l.id),l]));for(let l of i)n.append(k5(l,o));if(a.length)r.append(x5(a));else r.append(y("p","small muted",c("快照中没有子代理记录。","No subagents in this snapshot.")));return t}function df(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)?e:{}}function hf(e){return typeof e==="number"&&Number.isFinite(e)?e:void 0}function us(e){let t=hf(e);return t===void 0||t<0?void 0:t}function ds(e){let t=df(e),n=us(t.tokens),r=us(t.contextWindow??t.window??t.context_window),s=us(t.percent??t.percentUsed??t.usagePercent);if(n===void 0&&r===void 0&&s===void 0)return{status:"unavailable",reason:"no-data"};return{status:"ok",...n===void 0?{}:{tokens:n},...r===void 0?{}:{window:r},...s===void 0?{}:{percent:s}}}function Ta(e){let t=df(e),n=hf(t.latestCacheHitRate),r=us(t.input),s=us(t.cacheRead),i=us(t.cacheWrite);if(!((s??0)>0||(i??0)>0||(n??0)>0))return{status:"unavailable",reason:"no-data"};let o=n===void 0||n<0||n>100?void 0:n/100,l;if(r!==void 0&&s!==void 0&&i!==void 0){let u=r+i+s;if(u>0&&Number.isFinite(u))l=s/u}if(o===void 0&&l===void 0)return{status:"unavailable",reason:"no-data"};return{status:"ok",...o===void 0?{}:{latest:o},...l===void 0?{}:{cumulative:l}}}var si={off:c("关闭","Off"),minimal:c("极低","Minimal"),low:c("低","Low"),medium:c("中","Medium"),high:c("高","High"),xhigh:c("极高","Extra high"),max:c("最高","Maximum")};function ff(e){let t=j(e),n=we(t.tokensPerSecond),r=we(t.measuredAt);return n!==void 0&&n>0&&r!==void 0&&r>=0?{tokensPerSecond:n,measuredAt:r}:void 0}function mf(e,t){let n=ge("runtime-instructions",HTMLDetailsElement),r=ge("runtime-instructions-status",HTMLElement),s=ge("runtime-instructions-text",HTMLPreElement),i=c("当前无法读取 AGENTS.md。关闭后可展开重试。","Could not read AGENTS.md. Close and reopen this section to try again."),a;function o(){a?.abort(),a=void 0,s.hidden=!0,s.textContent="",r.textContent=""}return n.addEventListener("toggle",async()=>{o();let l=t();if(!n.open||!l)return;let u=a=new AbortController,d=()=>a===u&&n.open&&t()===l;r.textContent=c("正在读取工作目录中的 AGENTS.md…","Reading AGENTS.md in the working directory…");try{let f=await e.request(`${Xe(l)}/instructions`,void 0,AbortSignal.any([u.signal,AbortSignal.timeout(18000)]));if(!d())return;switch(f.status){case"ok":if(f.file!=="AGENTS.md"||typeof f.content!=="string"){r.textContent=c("未能验证 AGENTS.md 原文。","Could not verify the contents of AGENTS.md.");break}s.textContent=f.content,s.hidden=!f.content,r.textContent=f.content?c("已读取 AGENTS.md 原文。","Showing AGENTS.md as written."):c("AGENTS.md 是空文件。","AGENTS.md is empty.");break;case"missing":r.textContent=c("当前工作目录没有 AGENTS.md。","There is no AGENTS.md in the working directory.");break;case"unsupported":r.textContent=c("当前宿主或连接方式不支持读取项目规则。","The current host or connection does not support reading project rules.");break;case"refused":r.textContent=c("宿主拒绝读取,或无法确认文件属于当前会话。","The host refused the read or could not verify that the file belongs to this session.");break;case"too_large":r.textContent=c("AGENTS.md 超过读取上限,未显示内容。","AGENTS.md exceeds the read limit. Its contents are not shown.");break;case"unavailable":default:r.textContent=i}}catch(f){if(!d())return;r.textContent=f instanceof De&&[401,403,409].includes(f.status)?c("读取被拒绝,或当前会话连接已变化。","The read was refused or the session connection changed."):f instanceof De&&f.status===404&&f.code==="not_found"?c("当前 Web 服务不支持读取项目规则。","This Web server does not support reading project rules."):i}finally{if(a===u)a=void 0}}),()=>{n.open=!1,o()}}var $t=new Intl.NumberFormat(me,{maximumFractionDigits:2}),A5=new Intl.NumberFormat(me,{style:"currency",currency:"USD",maximumFractionDigits:5}),it=(e)=>{let t=we(e);return t===void 0?"":$t.format(t)},pf=(e)=>typeof e==="boolean"?e?c("开启","On"):c("关闭","Off"):"";function wf(e){let t=y("span","","—");t.setAttribute("aria-hidden","true"),e.append(t,y("span","sr-only",Ct))}function kf(e,t=!1){let n=y("dl","details-list small numerical");for(let[r,s]of e)if(s){let a=y("dd",s===Ct||s===Hl||s===Pl?"metric-unreported":"");if(t&&s===Ct)wf(a);else a.textContent=s;n.append(y("dt","",r),a)}return n.childElementCount?n:y("p","small muted",c("当前没有可用数据。","No data available."))}function xf(e,...t){let n=y("section","subpanel stack stack--tight");return n.append(y("h3","",e),...t),n}function Ul(e,t,...n){let r=Yt(t,...n);return r.dataset.overviewDisclosure=e,r.querySelector("summary")?.setAttribute("data-overview-focus",e),r}function ii(e,t){let n=y("div","metric-group stack");return n.append(y("p","metric-label small",e),kf(t,!0)),n}var Ct=c("尚无数据(原生未报告)","Not reported by the native host"),Hl=c("未报告","Not reported"),Pl=c("已报告,无数值","Reported without a value"),gf=c("— 表示原生未报告","— means the native host did not report a value");function bf(e){let t=we(e);if(t===void 0)return"";if(t>=1048576)return`${$t.format(t/1048576)} MB`;if(t>=1024)return`${$t.format(t/1024)} KB`;return`${$t.format(t)} B`}function vf(e){return e===void 0?"":`${$t.format(e*100)}%`}function Ir(e){let t=we(e);if(t===void 0)return"";let n=new Date(t);return Number.isNaN(n.getTime())?"":n.toLocaleString(me,{hour12:!1})}function C5(e,t,n){let r=ds(e.contextUsage);if(r.status==="ok"&&(r.tokens!==void 0||r.window!==void 0||r.percent===0))return r;if(r.status!=="ok"&&Object.hasOwn(e,"contextUsage"))return r;let s=ds(t.contextUsage);if(s.status==="ok")return s;let i=ds(n.contextUsage);if(i.status==="ok"&&(!Object.hasOwn(e,"contextUsage")||r.status==="ok"&&i.tokens!==void 0&&i.window!==void 0))return i;return r}function Ef(e,t,n){let r=j(e.stats),s=j(e.state),i={...s,...t},a=j(e.sessionMemory),o=j(i.model),l=j(r.tokens??i.usageTotals),u=C5(t,s,r),d=u.status==="ok"?it(u.tokens):"",f=u.status==="ok"?it(u.window):"",p=u.status==="ok"?it(u.percent):"",g=Ta(i.usageTotals),b=g.status==="ok"?g.latest:void 0,x=g.status==="ok"?g.cumulative:void 0,k=we(l.input),A=we(l.cacheRead),T=we(l.cacheWrite),S=(H)=>H!==void 0&&H>=0,E=S(k)&&S(A)&&S(T),D=we(r.cost),M=j(r.failures),L=we(a.mainHeapBytes),z=we(a.kernelHeapBytes),O=we(a.kernelCount),P=L!==void 0||z!==void 0||O!==void 0,V=p?d?`${d} (${p}%)`:`${p}%`:d,G=vf(b),ce=it(r.toolCalls),re=D===void 0?"":A5.format(D),de=y("dl","metric-highlights numerical");for(let[H,q,W]of[["context",c("上下文已用","Context used"),p?`${p}%`:d?c(`${d} token`,`${d} tokens`):""],["cache",c("最新缓存命中率","Latest cache hit rate"),G],["tools",c("工具调用","Tool calls"),ce],["cost",c("估算费用","Estimated cost"),re]]){let le=y("div","metric-tile");le.dataset.tone=H;let N=y("dd",W?"":"metric-unreported",W);if(!W)wf(N);le.append(y("dt","",q),N),de.append(le)}let F=C(i.thinkingLevel),K=y("div","row row--between"),Y=y("button","button button--quiet small",c("规则与记忆","Rules and memory"));Y.type="button",Y.id="runtime-open-resources",Y.dataset.overviewFocus="resources",Y.setAttribute("aria-controls","runtime-resources"),K.append(y("h3","",c("运行状态与用量","Runtime and usage")),Y);let ee=y("section","subpanel stack stack--tight runtime-metrics");ee.append(K,de,ii(c("会话设置","Session settings"),[[c("模型","Model"),[C(o.provider),C(o.name)||C(o.id)].filter(Boolean).join(" · ")||Ct],[c("生效思考档","Active thinking level"),(Object.hasOwn(si,F)?si[F]:F)||Ct],[c("快速模式","Fast mode"),pf(i.fastMode)||Ct],[c("最近流式 · Web 观测","Latest streaming speed (Web)"),n?`${n.tokensPerSecond<0.01?`<${$t.format(0.01)}`:$t.format(n.tokensPerSecond)} token/s`:c("未测得","Not measured")]]));let ie=Ul("metrics",c("完整运行明细","Full runtime details"),ii(c("上下文与缓存","Context and cache"),[[c("上下文已用(原生)","Context used (native)"),V||Ct],[c("上下文窗口","Context window"),f?c(`${f} token`,`${f} tokens`):Ct],[c("缓存命中率(原生最新)","Latest cache hit rate (native)"),G||(g.status==="ok"?Pl:Ct)],[c("缓存累计命中率","Cumulative cache hit rate"),vf(x)||(g.status==="ok"?Pl:Ct)]]),ii(c("其他设置","Other settings"),[[c("权限预设","Permission preset"),C(i.effectivePermissionPreset)||C(i.permissionPreset)||Ct],[c("自动压缩","Auto-compaction"),pf(i.autoCompactionEnabled)||Ct]]),ii(c("流量与费用","Usage and cost"),[[c("用户消息","User messages"),it(r.userMessages)],[c("助手消息","Assistant messages"),it(r.assistantMessages)],[c("工具调用","Tool calls"),ce],[c("输入 token(含缓存)","Input tokens (including cache)"),E?it(k+A+T):Ct],[c("未缓存输入 token","Uncached input tokens"),E?it(k+T):it(k)],[c("输出 token","Output tokens"),it(l.output)],[c("缓存读取 token","Cache read tokens"),it(l.cacheRead)],[c("缓存写入 token","Cache write tokens"),it(l.cacheWrite)],[c("总 token","Total tokens"),it(l.total??l.totalTokens)],[c("估算费用","Estimated cost"),re],[c("失败请求","Failed requests"),it(M.erroredRequests)]]),ii(c("原生内存","Native memory"),[[c("OmO 宿主主堆(引擎共享)","OmO host heap (shared by the engine)"),L!==void 0?bf(L):Ct],[c("本会话内核堆","Session kernel heap"),z!==void 0?bf(z):P?Hl:Ct],[c("本会话内核数","Session kernel count"),O!==void 0?it(O):P?Hl:Ct]]));if(ie.classList.add("metric-breakdown"),ee.append(ie),de.querySelector(".metric-unreported"))de.after(y("p","metric-key small",gf));else if(ie.querySelector(".metric-unreported [aria-hidden='true']"))ie.querySelector(".fold-body")?.append(y("p","metric-key small",gf));return ee}function _5(e){let t=y("ul","inline-list");for(let n of e){let r=j(n),s=C(r.requestedMode),i={queued:c("排队中","Queued"),sending:c("正在发送","Sending"),held:c("等待中","Waiting"),pending:c("等待中","Waiting"),accepted:c("已接收","Accepted")}[C(r.state)]||"",a=[s==="steer"?c("引导","Steer"):s==="followUp"||s==="follow_up"?c("后续","Follow-up"):"",i].filter(Boolean).join(" · "),o=y("li","stack stack--tight");if(a)o.append(y("span","small muted",a));o.append(y("p","plain",C(r.text)||c("(无文本)","(No text)"))),t.append(o)}return t}function Af(e,t,n,r,s){let i=y("p","small muted"),a=y("p","small muted");a.setAttribute("role","status");let o=y("div","stack stack--tight"),l=Ul("queue",c("预览待处理输入","Preview pending inputs"),a,o),u=We(c("清空队列","Clear queue"),s,"button--danger");u.dataset.overviewFocus="queue:clear",u.dataset.write="";let d=y("div","row");d.append(u);let f=xf(c("输入队列","Input queue"),i,d,l),p,g,b=!1,x=!1,k=()=>{let D=!(p!==void 0&&p>0)&&!x;u.toggleAttribute("data-unavailable",D),u.disabled=D||!r()},A=(D="",...M)=>{if(o.contains(document.activeElement))l.querySelector("summary")?.focus({preventScroll:!0});se(a,D),o.replaceChildren(...M)},T=()=>{if(!b)return;g?.abort(),g=void 0,b=x=!1,A(),k()},S=()=>f.isConnected&&l.open&&n(),E=(D=!1)=>{if(!S())return;if(b&&!D)return;g?.abort();let M=g=new AbortController;b=!0,x=!1,k(),A(c("正在读取待处理输入…","Loading pending inputs…"));let L=()=>g===M&&S(),z=(O=!1)=>{A(O?c("队列响应超出读取上限。","The queue response exceeded the read limit."):c("无法读取待处理输入。","Couldn't load pending inputs."),We(c("重试队列预览","Retry queue preview"),()=>E(!0),"button--quiet"))};e.request(`${t}/queue`,void 0,M.signal).then((O)=>{if(!L())return;if(!Array.isArray(O.inputs)){z();return}x=O.inputs.length>0,k(),A(O.truncated===!0?c("预览已截断,仅显示部分队列内容。","Preview truncated. Only part of the queue is shown."):x?"":c("没有可预览的待处理输入。","No pending inputs to preview."),...x?[_5(O.inputs)]:[])},(O)=>{if(L())z(O instanceof De&&O.code==="queue_too_large")}).finally(()=>{if(g===M)g=void 0})};return l.addEventListener("toggle",()=>{if(l.open)E();else T()}),{root:f,activate:E,deactivate:T,update(D){p=D,i.textContent=D===void 0?c("待处理输入数量未知。","Pending input count unknown."):D>0?c(`${$t.format(D)} 条待处理输入`,`${$t.format(D)} pending ${D===1?"input":"inputs"}`):c("没有排队的输入。","No queued inputs."),k()}}}function T5(e,t){let n=ve(e.commands).map(j).filter((i)=>Boolean(C(i.invocation))),r=xf(c("可用命令","Available commands"));if(!n.length)return r.append(y("p","muted small",c("未读取到可用命令。","No commands were returned."))),r;let s=y("ul","command-list");for(let i of n){let a=C(i.invocation),o=We(a,()=>t.insertCommand(a),"button--quiet path");o.title=c("插入输入框,不会立即发送","Insert in the input box without sending"),o.setAttribute("aria-label",c(`插入命令:${a}`,`Insert command: ${a}`)),o.dataset.overviewFocus=`command:${a}`;let l=y("li","stack stack--tight");if(l.append(o),C(i.description))l.append(y("p","small muted break",C(i.description)));s.append(l)}return r.append(Ul("commands",c(`${$t.format(n.length)} 项 · 展开后可插入输入框`,`${$t.format(n.length)} ${n.length===1?"command":"commands"} · Expand to insert`),s)),r}var S5={pending:c("待办","Pending"),in_progress:c("进行中","In progress"),completed:c("已完成","Completed"),abandoned:c("已放弃","Abandoned")},yf={"missing-tree":c("快照缺少会话树","The snapshot has no session tree."),"invalid-leaf":c("活动分支标识无效","The active branch ID is invalid."),"unknown-leaf":c("活动分支不在会话树中","The active branch is not in the session tree."),"duplicate-id":c("会话树有重复标识","The session tree contains duplicate IDs."),"broken-ancestry":c("分支链断裂或指向其他分支","The branch chain is broken or points to another branch."),"tree-budget":c("会话树超出读取上限,可能不完整","The session tree exceeds the read limit and may be incomplete."),incomplete:c("历史超出分支读取上限","The branch history exceeds the read limit."),ownership_changed:c("会话或活动分支已变化","The session or active branch changed."),binding_unverified:c("无法确认会话归属","The session binding could not be verified."),unsupported:c("当前宿主不支持有界分支读取","The current host does not support bounded branch reads."),malformed:c("原生返回的分支数据格式无效","The native host returned invalid branch data.")};function R5(e){let t=y("section","subpanel stack stack--tight");if(t.append(y("h3","",c("待办 · 当前活动分支","Todo · Active branch"))),e.status==="loading"){let s=y("p","small muted",c("正在读取当前分支…","Loading the active branch…"));return s.setAttribute("role","status"),t.append(s),t}if(C(e.status)==="invalid"){let s=yf[C(e.reason)]??c("未知原因","Unknown reason.");return t.append(y("p","small muted",c(`无法确认活动分支(${s}),不显示待办,以免混入其他分支。`,`Could not verify the active branch. ${s} Todo is hidden to avoid showing another branch’s tasks.`))),t}if(C(e.status)!=="ok"){let s=yf[C(e.reason)];return t.append(y("p","small muted",s?c(`分支数据不可用(${s}),待办数量未知。`,`Branch data is unavailable. ${s} The Todo count is unknown.`):c("分支数据不可用,待办数量未知。可刷新重试。","Branch data is unavailable. The Todo count is unknown. Refresh to try again."))),t}let n=C(e.leafId);t.append(y("p","small muted",n?c(`活动分支:${n}`,`Active branch: ${n}`):c("当前没有活动分支。","No branch is active.")));let r=j(e.todo);if(C(r.status)==="ok"){let s=ve(r.phases).map(j),i=e.incomplete===!0;if(!s.length)t.append(y("p","small muted",c("当前活动分支待办为空(原生明确返回空列表)。","The native host returned an empty Todo list for the active branch.")));else{let a=y("ul","inline-list");for(let l of s){let u=y("li","stack stack--tight");u.append(y("p","plain",C(l.name)||c("待办","Todo")));let d=y("ul","inline-list");for(let f of ve(l.tasks).map(j)){let p=y("li");p.append(y("p","small break",`${S5[C(f.status)]??C(f.status)} · ${C(f.content)}`)),d.append(p)}if(d.childElementCount)u.append(d);a.append(u)}let o=a.childElementCount;t.append(Yt(c(`待办(${$t.format(o)} 组)${i?" · 内容已截断":""}`,`Todo (${$t.format(o)} ${o===1?"group":"groups"})${i?" · Truncated":""}`),y("p","small muted",c("只读:来自所选活动分支的最新原生记录;其他分支与原始自定义内容不在此显示。","Read-only. Shows the latest native record for the selected branch. Other branches and raw custom entries are not shown.")),a))}if(i&&s.length)t.append(y("p","small muted",c("待办内容超出显示上限,仅显示前面的记录。","The Todo list exceeds the display limit. Only the first entries are shown.")))}else t.append(y("p","small muted",c("当前分支未报告待办,数量未知。","No Todo record was reported for the active branch. The task count is unknown.")));return t}function M5(e){if(e.status==="loading")return[y("p","small muted",c("正在读取当前分支…","Loading the active branch…"))];if(e.status!=="ok")return[y("p","small muted",c("无法确认当前分支,未显示长期记忆计数。","Could not verify the active branch, so long-term memory counts are hidden."))];let t=j(e.memory);if(C(t.status)!=="ok")return[y("p","small muted",c("当前分支没有召回记录;不代表未启用长期记忆。","No recall record for this branch. Long-term memory may still be enabled."))];let n=we(t.recalledCount),r=Ir(t.recentRecalledAt),s=j(t.gate),i=j(t.unavailable),a=s.status==="failed"||s.status==="skipped"?c(`${s.status==="failed"?"失败":"跳过"} · 连续 ${it(s.consecutiveFailures)} 次 · 候选 ${it(s.candidateCount)}${Ir(s.at)?` · ${Ir(s.at)}`:""}`,`${s.status==="failed"?"Failed":"Skipped"} · Consecutive failures: ${it(s.consecutiveFailures)} · Candidates: ${it(s.candidateCount)}${Ir(s.at)?` · ${Ir(s.at)}`:""}`):"",o=we(i.count),u=[[c("长期记忆召回条目(累计,仅计数)","Long-term memory recalls (total count)"),n!==void 0?it(n):""],[c("最近召回时间","Last recall"),r],[c("召回门控","Recall gate"),a],[c("记忆不可用记录(仅计数)","Memory unavailability records (count only)"),o!==void 0?`${it(o)}${Ir(i.at)?` · ${Ir(i.at)}`:""}`:""]].filter(([,d])=>Boolean(d));return[y("p","small muted",c("仅活动分支的召回计数与状态,不含个人记忆原文、路径、提示词或宿主堆内存。","Recall counts and status for the active branch only. Personal memory text, paths, prompts, and host heap data are not shown.")),u.length?kf(u):y("p","small muted",c("有记忆聚合记录,但暂无可显示的数值。","Memory records exist, but there are no values to show."))]}function Cf(e,t,n){let r=ge("runtime-metrics",HTMLElement).querySelector(".runtime-metrics");if(!r)return;let s=Ef(e,t,n),i=r.querySelector("details"),a=s.querySelector("details"),o=document.activeElement,l=o instanceof HTMLElement&&r.contains(o)?o.dataset.overviewFocus:void 0;if(i&&a)a.open=i.open;if(r.replaceWith(s),l)s.querySelector(`[data-overview-focus="${CSS.escape(l)}"]`)?.focus({preventScroll:!0})}function _f(e,t,n,r,s,i,a){let o=ge("runtime-metrics",HTMLElement),l=document.activeElement,u=l instanceof HTMLElement&&o.contains(l)?l.dataset.overviewFocus:void 0,d=new Set([...o.querySelectorAll("details[open]")].map((f)=>f.dataset.overviewDisclosure));for(let f of[...o.children])if(f!==s&&f!==i)f.remove();if(i.parentElement!==o)o.prepend(i);if(o.prepend(Ef(e,t,a)),i.after(T5(n,r)),o.querySelectorAll("details[data-overview-disclosure]").forEach((f)=>{f.open=d.has(f.dataset.overviewDisclosure)}),u!==void 0&&document.activeElement!==l){let f=o.querySelector(`[data-overview-focus="${CSS.escape(u)}"]:not(:disabled)`);((f?.getClientRects().length)?f:o).focus({preventScroll:!0})}}function Wl(e){let t=ge("runtime-todo",HTMLElement),n=document.activeElement,r=R5(e),s=t.querySelector("[data-runtime-branch]"),i=s?.querySelector("details"),a=r.querySelector("details");if(i&&a)a.open=i.open;let o=i?.querySelector("summary")===n;if(r.dataset.runtimeBranch="",s)s.replaceWith(r);else t.prepend(r);if(ge("runtime-memory-branch-content",HTMLElement).replaceChildren(...M5(e)),o)(a?.querySelector("summary")??t).focus({preventScroll:!0})}function Tf(e,t){let n=new Set([...e.querySelectorAll("details[open]")].map((i)=>i.firstElementChild?.textContent)),r=uf(t);r.querySelectorAll("details").forEach((i)=>{i.open=n.has(i.firstElementChild?.textContent)});let s=e.querySelectorAll('[role="tabpanel"]');if(!s.length){for(let i of r.children)i.removeAttribute("id");e.replaceChildren(r)}for(let i of s){let a=[...r.children].find((o)=>o.id===i.id);if(!a)continue;a.removeAttribute("id"),a.removeAttribute("tabindex"),i.replaceChildren(a)}}function Sf(e,t){let n=ge("branch-dialog",HTMLDialogElement),r=ge("branch-message",HTMLSelectElement),s=(x)=>ge(x,HTMLElement),i=(x)=>ge(x,HTMLButtonElement),a={web:c("来源:Web 会话。新会话和原会话可分别继续。","Source: Web session. You can continue the original and the new session separately."),history:c("来源:CLI 最后保存的上下文,不修改 CLI 记录。","Source: Last saved CLI context. The CLI record will not change."),live:c("来源:CLI 当前上下文。无法校验实时位置时不会改用历史记录。","Source: Current CLI context. If the live position cannot be verified, history will not be used instead.")},o,l,u=!1,d=!1,f=new Map;function p(){let x=u||Boolean(l),k=f.get(r.value);r.disabled=x||!f.size,i("branch-fork").disabled=x||k===void 0,i("branch-clone").disabled=x||!d,i("branch-refresh").disabled=x,i("branch-close").disabled=u,se(s("branch-message-preview"),k)}async function g(x){if(u||l)return;let k=l=new AbortController,A=s("branch-status");se(A,c("正在读取可用分支与复制选项…","Loading branch and clone options…")),se(s("branch-error")),p();try{let T=await e.request(`${to(x)}/branch-options`,void 0,k.signal);if(k.signal.aborted||!n.open||o!==x)return;d=T.canClone===!0,f=new Map(ve(T.forkMessages).map(j).flatMap((E)=>{let D=C(E.entryId);return D&&typeof E.text==="string"?[[D,E.text]]:[]}));let S=r.value;if(r.replaceChildren(pt(c("选择一条用户消息","Choose a user message"),""),...Array.from(f,([E,D],M)=>{let L=D.trim().replace(/\s+/g," ");return pt(`${$t.format(M+1)} · ${L.slice(0,100)}${L.length>100?"…":""}`,E)})),f.has(S))r.value=S;se(A,!d&&!f.size?c("此来源没有可分支或复制的上下文。","This source has no context to branch or clone."):"")}catch(T){if(!k.signal.aborted&&n.open&&o===x)d=!1,f.clear(),r.replaceChildren(pt(c("未读取到选项","No options loaded"),"")),se(A),se(s("branch-error"),c(`无法读取分支选项:${Ee(T)}`,`Could not load branch options: ${Ee(T)}`))}finally{if(l===k)l=void 0;p()}}async function b(x){let k=o;if(!k||u||l)return;u=!0,se(s("branch-error")),se(s("branch-status"),c("正在创建独立的 Web 会话…","Creating a separate Web session…")),p();try{let A=await e.request(`${to(k)}/branches`,x);if(A.cancelled===!0){se(s("branch-status"),c("已取消,原会话没有修改。","Canceled. The original session did not change."));return}let T=ln(A.session);if(!T?.active)throw new De(c("没有收到可继续的 Web 会话。请检查会话列表。","No active Web session was returned. Check the session list."),502,"");n.close(),t(T,C(A.editorText),k)}catch(A){se(s("branch-status")),se(s("branch-error"),c(`无法确认新会话:${Ee(A)}`,`Could not confirm the new session: ${Ee(A)}`))}finally{u=!1,p()}}return r.addEventListener("change",p),ge("branch-form",HTMLFormElement).addEventListener("submit",(x)=>{if(x.preventDefault(),!i("branch-fork").disabled)b({kind:"fork",entryId:r.value})}),i("branch-clone").addEventListener("click",()=>void b({kind:"clone"})),i("branch-close").addEventListener("click",()=>n.close()),i("branch-refresh").addEventListener("click",()=>{if(o)g(o)}),n.addEventListener("cancel",(x)=>{if(u)x.preventDefault()}),n.addEventListener("close",()=>{if(n.open)return;l?.abort(),l=void 0,o=void 0}),(x)=>{if(n.open)return;o=x,d=!1,f.clear(),r.replaceChildren(pt(c("选择一条用户消息","Choose a user message"),"")),s("branch-source").textContent=x.name,s("branch-context").textContent=a[x.kind],n.showModal(),g(x)}}var jl=(e)=>e instanceof De&&e.status===409&&(e.code==="tree_stale"||e.code==="session_changed"||e.code==="stale_leaf");function D5(e){let{leafId:t,nextCursor:n}=e,r=(o)=>typeof o==="string"&&o.length>0,s=(o)=>o===void 0||typeof o==="string";if(!Array.isArray(e.nodes)||e.nodes.length>40||t!==null&&!r(t)||n!==void 0&&(!r(n)||!e.nodes.length))throw Error("Invalid tree page");let i=new Set;return{nodes:e.nodes.map((o)=>{let{id:l,parentId:u,type:d,role:f,label:p,summary:g}=j(o);if(!r(l)||i.has(l)||u!==null&&!r(u)||!r(d)||!s(f)||!s(p)||!s(g))throw Error("Invalid tree node");return i.add(l),{id:l,parentId:u,type:d,role:f,label:p,summary:g}}),leafId:t,nextCursor:n}}var Rf={user:c("你","You"),assistant:c("助手","Assistant"),toolResult:c("工具结果","Tool result"),bashExecution:c("命令输出","Command output"),message:c("消息","Message"),compaction:c("上下文压缩","Context compaction"),branch_summary:c("分支摘要","Branch summary"),model_change:c("模型变更","Model change"),thinking_level_change:c("思考档变更","Thinking level change"),custom:c("会话记录","Session entry"),session_info:c("会话信息","Session info")},Mf=c("会话位置已变化,请重新读取会话树。","The session position changed. Reload the session tree.");function Df(e,t,n,r,s){let i=y("section","subpanel stack stack--tight");i.id="runtime-tree";let a=y("p","small muted");a.setAttribute("role","status");let o=y("p","small muted",c("仅显示已加载的节点(最新记录在前),不代表完整的分支结构。选择历史用户消息可将其载入输入框;不会自动发送。","Shows loaded entries (newest first), not the complete branch structure. Select a past user message to load it into the input box without sending it.")),l=y("ul","tree"),u=y("div","row"),d=We(c("加载更早节点","Load older"),()=>{if(A)ce(A)});d.dataset.treeOlder="";let f=We(c("重新读取会话树","Reload session tree"),()=>{ce()});f.dataset.treeReload="";let p=We(c("切换到空上下文","Switch to an empty context"),()=>O(null));u.append(d,f,p);let g=Yt(c("查看会话节点","View session nodes"),a,o,l,u),b=g.querySelector("summary");i.append(y("h3","",c("会话树","Session tree")),g);let x,k,A,T=[],S=!1,E=!1,D="",M=new Map,L=()=>n()&&g.open;function z(){let F=!r();p.disabled=F;for(let K of M.values())K.disabled=F}function O(F){if(L()&&!S&&k!==void 0&&r())s(F,k)}function P(){let F=document.activeElement;if(a.textContent=D||(k!==void 0&&!M.size?k===null?c("没有可导航的会话节点。","No session nodes to navigate."):c("这一页没有列出活动节点。","This page does not include the active node."):M.size&&k!==null&&k!==void 0&&!M.has(k)?c("活动节点不在已加载的记录中。","The active node is not among the loaded entries."):""),a.classList.toggle("error",S||E),a.hidden=!a.textContent,o.hidden=!M.size,l.hidden=!M.size,d.hidden=S||!A&&F!==d,d.textContent=A?c("加载更早节点","Load older"):c("没有更早的可加载节点","No older entries to load"),f.hidden=!S&&!E&&F!==f,p.hidden=k===void 0||k===null||S,u.hidden=d.hidden&&f.hidden&&p.hidden,d.setAttribute("aria-disabled",String(Boolean(x)||!A)),f.setAttribute("aria-disabled",String(Boolean(x))),z(),L()&&(F===d&&d.hidden||F===p&&p.hidden))(S?f:b).focus({preventScroll:!0})}function V(F,K){let Y=F.nodes.map((H)=>H.id),ee=!K&&k===F.leafId&&Y.length===T.length&&Y.every((H,q)=>H===T[q]);if(!K&&!ee){let H=new Set(Y);for(let[q,W]of M)if(!H.has(q)){if(document.activeElement===W)b.focus({preventScroll:!0});W.parentElement?.remove(),M.delete(q)}}if(k=F.leafId,!ee||M.size===T.length)A=F.nextCursor;if(!K)T=Y;let ie=[];for(let H of[...F.nodes].reverse()){let q=M.get(H.id);if(!q){q=We("",()=>O(H.id),"button--quiet break"),M.set(H.id,q);let N=y("li");N.append(q),l.append(N)}let W=H.role||H.type,le=H.label||(Object.hasOwn(Rf,W)?Rf[W]:W);if(q.textContent=`${le} · ${C(H.summary)||H.id.slice(0,12)}`,H.id===k)q.setAttribute("aria-current","true");else q.removeAttribute("aria-current");ie.push(q.parentElement)}if(!K&&!ee){let H=null;for(let q of ie.reverse()){if(q.nextElementSibling!==H&&!q.contains(document.activeElement))l.insertBefore(q,H);H=q}}}function G(){if(re(),!g.open&&k===void 0)return;if(l.contains(document.activeElement))b.focus({preventScroll:!0});l.replaceChildren(),M.clear(),k=void 0,A=void 0,T=[],S=!0,E=!1,D=Mf,P()}async function ce(F){if(!L()||x||F!==void 0&&S)return;let K=x=new AbortController,Y=()=>x===K&&L(),ee=F===void 0?"":`?${new URLSearchParams({cursor:F})}`;E=!1,D=F===void 0?c("正在读取会话节点…","Loading session entries…"):c("正在读取更早的节点…","Loading older entries…");let ie=!1;P();try{let H=AbortSignal.any([K.signal,AbortSignal.timeout(12000)]),q=await e.request(`${t}/tree${ee}`,void 0,H);if(!Y())return;let W=D5(q);if(F!==void 0&&W.leafId!==k){G();return}if(F!==void 0&&(W.nextCursor===F||W.nodes.some((le)=>M.has(le.id))))throw Error("Overlapping tree page");if(S=!1,D="",V(W,F!==void 0),ie=F!==void 0,document.activeElement===f)b.focus({preventScroll:!0})}catch(H){if(!Y())return;if(jl(H)){G();return}E=!0,D=F===void 0?c("读取会话树失败。请重试。","Could not load the session tree. Try again."):c("读取更早的节点失败。已保留之前的节点。","Could not load older entries. The loaded entries are kept.")}finally{if(x===K){if(x=void 0,L()){if(P(),ie&&document.activeElement===d)d.scrollIntoView({block:"nearest",behavior:"instant"})}}}}function re(){if(!x)return;x.abort(),x=void 0,D=S?Mf:"",P()}let de=()=>{if(k===void 0&&!S&&!E)ce()};return g.addEventListener("toggle",()=>{if(L())de();else re()}),P(),{root:i,activate:de,abort:re,invalidate:G,syncWrites:z,checkLeaf:(F)=>{if(k!==void 0&&k!==F)G()},refresh:()=>{ce()}}}function ai(e){return!(e.defaultPrevented||e.isComposing||e.keyCode===229||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)}function oi(e,t,n,r){let s=n.length-1;if(s<0)return;switch(e){case"ArrowDown":return t===s?0:t+1;case"ArrowUp":return t<=0?s:t-1;case"PageUp":case"PageDown":{let i=e==="PageUp"?-1:1;if(t<0)return i<0?s:0;let a=i<0?0:s;if(t===a)return t;let o=n[t].getBoundingClientRect().top,l=t+i;while(l!==a&&Math.abs(n[l+i].getBoundingClientRect().top-o)<=r.clientHeight)l+=i;return l}}}function li(e,t){let n=e.getBoundingClientRect().top+e.clientTop,r=n+e.clientHeight,s=t.getBoundingClientRect();if(s.top<n)e.scrollTop-=n-s.top;else if(s.bottom>r)e.scrollTop+=Math.min(s.bottom-r,s.top-n)}function Lf(e,t,n){let r=!1;t.addEventListener("compositionstart",()=>{r=!0}),t.addEventListener("compositionend",()=>{r=!1}),t.addEventListener("blur",()=>{r=!1}),e.addEventListener("keydown",(s)=>{if(!e.open||r||!ai(s)||n.hidden)return;let i=s.target===t;if(!i&&!(s.target instanceof Element&&n.contains(s.target)))return;let a=Array.from(n.querySelectorAll("button[data-invocation]:enabled")),o=a.findIndex((u)=>u===s.target);if(!i&&o<0)return;if(i&&s.key==="Enter"&&a[0]){s.preventDefault(),a[0].click();return}let l=oi(s.key,o,a,e);if(l===void 0)return;s.preventDefault(),a[l].focus({preventScroll:!0}),li(e,a[l])})}var Nf=/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/,L5=new Map([["extension",c("扩展","Extension")],["prompt",c("提示模板","Prompt template")],["skill",c("技能","Skill")]]),I5=new Map([["enabled",c("已启用","Enabled")],["disabled",c("已停用","Disabled")],["untrusted",c("不受信任","Untrusted")],["idle",c("空闲","Idle")],["connecting",c("连接中","Connecting")],["connected",c("已连接","Connected")],["degraded",c("降级","Degraded")],["suspended",c("已挂起","Suspended")],["needs_auth",c("需要认证","Authentication required")],["needs_client_registration",c("需要注册客户端","Client registration required")]]),If=new Intl.NumberFormat(me);function N5(e){let t=C(e.invocation),n=C(e.source),r=L5.get(n);if(!r)return;if(n==="skill"?/^\$[A-Za-z0-9-]{1,64}$/.test(t):/^\/[A-Za-z0-9_-]{1,64}$/.test(t))return{name:t,detail:r}}function B5({name:e,enabled:t,origin:n}){if(typeof e!=="string"||!Nf.test(e)||typeof t!=="boolean")return;let r=n==="package"?c(" · 包来源"," · From package"):n==="top-level"?c(" · 顶层来源"," · Top-level"):"";return{name:e,detail:(t?c("已启用","Enabled"):c("已停用","Disabled"))+r}}function O5({name:e,status:t,toolCount:n}){let r=I5.get(C(t));if(!r||typeof e!=="string"||!Nf.test(e)||typeof n!=="number"||!Number.isSafeInteger(n)||n<0)return;return{name:e,detail:c(`${r} · ${If.format(n)} 个工具`,`${r} · ${If.format(n)} ${n===1?"tool":"tools"}`)}}function Gl(e,t){let n=j(e);if(n.status!=="ok"||!Array.isArray(n.rows)||typeof n.incomplete!=="boolean")return{status:"unavailable",reason:n.status==="unavailable"&&n.reason==="rpc-failed"?"rpc-failed":"invalid-response"};let r=n.rows.slice(0,128).flatMap((s)=>t(j(s))??[]);return{status:"ok",rows:r,incomplete:n.incomplete||r.length!==n.rows.length}}function Kl(e,t,n){let r=y("section","subpanel stack stack--tight");if(r.append(y("h3","",e)),n.status==="unavailable")return r.append(y("p","small muted",n.reason==="rpc-failed"?c("当前不可用:未能从当前宿主读取。","Unavailable: Could not read from the current host."):c("当前不可用:原生响应格式无效。","Unavailable: The native response was invalid."))),r;if(t)r.append(y("p","small muted",t));if(n.rows.length){let s=y("dl","capability-list small numerical");s.tabIndex=0,s.setAttribute("aria-label",c(`${e} · 只读列表`,`${e} · Read-only list`));for(let i of n.rows){let a=y("div");a.tabIndex=-1;let o=y("dt");o.append(y("code","",i.name)),a.append(o,y("dd","muted",i.detail)),s.append(a)}s.addEventListener("keydown",(i)=>{if(!ai(i))return;let a=s.closest(".details-scroll");if(!a)return;let o=Array.from(s.children),l=o.findIndex((d)=>d===i.target),u=oi(i.key,l,o,a);if(u===void 0)return;i.preventDefault(),o[u].focus({preventScroll:!0}),li(a,o[u])}),r.append(s)}if(n.incomplete)r.append(y("p","small muted",n.rows.length?c("清单不完整,部分项目未显示。","This list is incomplete. Some entries are not shown."):c("清单不完整,没有可显示的项目。","This list is incomplete. No entries can be shown.")));else if(!n.rows.length)r.append(y("p","small muted",c("原生未报告任何条目。","The native host did not report any entries.")));return r}function Bf(e){return[Kl(c("已加载扩展","Loaded extensions"),c("这里只显示当前会话的原生报告,不是安装清单。","Shows only what the native host reports for this session, not everything installed."),Gl(e.extensions,B5)),Kl(c("MCP 服务","MCP servers"),c("状态与工具数由原生报告,不代表工具可立即调用。","The native host reports status and tool counts. Tools may not be ready to use."),Gl(e.mcpServers,O5)),Vl(),Kl(c("注册命令与技能","Registered commands and skills"),c("已注册不代表当前可执行。","Registered commands and skills may not be available to run."),Gl(e.commands,N5))]}function Vl(){let e=y("section","subpanel stack stack--tight");return e.id="runtime-compatibility",e.append(y("h3","",c("浏览器原生兼容未启用","Native terminal features are unavailable in the browser")),y("p","small muted",c("尚未验证浏览器终端能在各模式下可靠隔离私密交互。","The browser terminal has not been verified to keep private interactions isolated in every mode.")),y("p","small muted",c("账户登录、凭据、私密授权(含 MCP)、直接 shell 或外部编辑器,请在本机 OmO 终端完成。","Use the local OmO terminal for sign-in, credentials, private approvals (including MCP), direct shell access, and external editors.")),y("p","small muted",c("请自行打开本机 OmO,选择对应的工作目录和会话,再手动操作。此提示不会启动终端、执行或重放命令,也不会传送私密内容。","Open OmO locally and select the working directory and session. This notice does not launch a terminal, run or replay commands, or transmit private content.")),y("p","small muted",c("如果要继续同一会话,符合条件的空闲会话可用「会话管理 → 转到 CLI」先释放,再按回执在本机继续。","To continue an eligible idle session, release it with “Manage session → Move to CLI”, then follow the instructions to continue locally."))),e}var ui=64,ci="http://www.w3.org/2000/svg",z5=0;function F5(e){if(!Array.isArray(e.nodes)||!e.nodes.length||e.nodes.length>ui||!Array.isArray(e.waves)||!e.waves.length||e.waves.length>e.nodes.length)return;let t=e.nodes.length,n=new Map,r=(a)=>typeof a==="number"&&Number.isInteger(a)&&a>=0&&a<t;for(let a of e.nodes){let{id:o,state:l,upstream:u}=j(a);if(!r(o)||n.has(o)||!Array.isArray(u)||u.length>=t||!u.every(r)||new Set(u).size!==u.length)return;n.set(o,{id:o,state:C(l),upstream:u})}let s=new Map,i=[];for(let[a,o]of e.waves.entries()){let l=j(o);if(l.index!==a||!Array.isArray(l.nodes)||!l.nodes.length||l.nodes.length>n.size)return;let u=[];for(let d of l.nodes){if(!r(d)||s.has(d))return;let f=n.get(d);if(!f)return;s.set(d,a),u.push(f)}i.push(u)}if(s.size!==n.size)return;for(let[a,o]of i.entries())for(let l of o)if(!l.upstream.every((u)=>(s.get(u)??1/0)<a))return;return i}function Of(e){let t=F5(e);if(!t)return;let n=88,r=46,s=16,i=12,a=96,o=21,l=(L)=>L*(n+s)-s,u=l(Math.max(...t.map((L)=>L.length))),d=Math.min(u,l(2)),f=new Map,p=new Map,g=y("div","dag-graph-map");g.tabIndex=0,g.setAttribute("role","region"),g.setAttribute("aria-label",c("有向依赖图;可滚动,完整依赖见下方文字列表","Scrollable directed dependency graph. See the text list below for all dependencies."));let b=y("div","dag-graph-canvas"),x=(L)=>`${L/16}rem`;for(let[L,z]of t.entries()){let O=i+L*a,P=y("div","dag-graph-wave",c(`第 ${L+1} 波`,`Wave ${L+1}`));P.style.top=x(O),b.append(P);for(let[V,G]of z.entries()){let ce=i+Math.max(0,(d-l(z.length))/2)+V*(n+s);f.set(G.id,{x:ce+n/2,y:O+o,wave:L});let re=y("div","dag-graph-node");re.dataset.node=String(G.id);let de=Lr(G.state);if(de)re.dataset.state=G.state;re.style.left=x(ce),re.style.top=x(O+o),re.style.width=x(n),re.style.height=x(r),re.append(y("strong","",c(`节点 ${G.id+1}`,`Node ${G.id+1}`)),y("span","",G.state==="blocked"?c("被依赖阻塞","Blocked"):de??c("状态未知","Unknown"))),b.append(re)}}let k=document.createElementNS(ci,"svg");k.setAttribute("class","dag-graph-edges"),k.setAttribute("aria-hidden","true"),k.setAttribute("focusable","false");let A=document.createElementNS(ci,"defs"),T=document.createElementNS(ci,"marker"),S=`dag-arrow-${++z5}`;T.setAttribute("id",S),T.setAttribute("viewBox","0 0 6 8"),T.setAttribute("markerWidth","6"),T.setAttribute("markerHeight","8"),T.setAttribute("markerUnits","userSpaceOnUse"),T.setAttribute("refX","6"),T.setAttribute("refY","4"),T.setAttribute("orient","auto");let E=document.createElementNS(ci,"path");E.setAttribute("d","M0 0 L6 4 L0 8 Z"),T.append(E),A.append(T),k.append(A);for(let L of t)for(let z of L){let O=f.get(z.id);for(let P of z.upstream){let V=f.get(P),G=V.y+r,ce=O.y-2,re=document.createElementNS(ci,"path");if(re.dataset.from=String(P),re.dataset.to=String(z.id),re.setAttribute("marker-end",`url(#${S})`),O.wave===V.wave+1){let de=(G+ce)/2;re.setAttribute("d",`M${V.x} ${G} C${V.x} ${de} ${O.x} ${de} ${O.x} ${ce}`)}else{let de=p.get(P)??p.size;p.set(P,de);let F=i+u+8+5*de;re.setAttribute("d",`M${V.x} ${G} V${G+6} H${F} V${ce-9} H${O.x} V${ce}`)}k.append(re)}}let D=2*i+u+p.size*5,M=2*i+(t.length-1)*a+o+r;return b.style.width=x(D),b.style.height=x(M),k.setAttribute("viewBox",`0 0 ${D} ${M}`),b.prepend(k),g.append(b),g}var $5=new Map([["inactive",c("会话尚未接入,或正在交接。","The session is not connected or is being handed off.")],["binding_unverified",c("无法验证当前会话的宿主绑定。","Could not verify which host owns the current session.")],["unsupported",c("当前宿主或连接方式不支持此读取。","The current host or connection does not support this read.")],["native_unavailable",c("宿主未能提供摘要。","The host could not provide a summary.")],["engine_unavailable",c("宿主连接忙碌、已断开或读取超时。","The host is busy, disconnected, or did not respond in time.")],["web_unsupported",c("当前 Web 服务没有实时摘要入口。","This Web server does not support live summaries.")],["read_refused",c("Web 服务未允许此读取,请确认当前会话仍可用。","The Web server refused this read. Check that the session is still available.")],["read_failed",c("读取失败或超时,可手动刷新。","The read failed or timed out. Refresh to try again.")]]),xt=new Intl.NumberFormat(me);function en(e){let t=we(e);return t!==void 0&&Number.isSafeInteger(t)&&t>=0?t:void 0}function di(e){switch(e.status){case"unavailable":{let t=$5.get(C(e.reason))??c("没有可用的读取结果。","No results are available.");return c(`不可用:${t}`,`Unavailable: ${t}`)}case"ownership_changed":return c("会话归属已变化,未显示任何宿主数据。","Session ownership changed. No host data is shown.");default:return c("摘要格式无效,未显示宿主数据。","The summary is invalid. No host data is shown.")}}function Sa(e){return e.status==="unavailable"&&e.reason==="unsupported"}var q5=/^[a-f0-9]{64}$/u;function Jl(e,t=!1){let n=y("div","dag-readout stack stack--tight");if(e.status!=="ok")return n.append(y("p","small muted",e.status==="not_found"?c("该运行不在当前列表中,请刷新。","This run is no longer in the list. Refresh to try again."):di(e))),n;let r=new Map(ve(e.nodes).slice(0,ui).map(j).flatMap((s)=>{let i=en(s.id);return i===void 0?[]:[[i,s]]}));for(let s of ve(e.waves).slice(0,ui)){let i=j(s),a=en(i.index);if(a===void 0)continue;let o=y("section","dag-wave stack stack--tight"),l=y("ol","inline-list numerical");for(let u of ve(i.nodes).slice(0,ui)){let d=en(u),f=d===void 0?void 0:r.get(d);if(d===void 0||!f)continue;r.delete(d);let p=t?ve(f.upstream).map(en).filter((A)=>A!==void 0):[],g=t?C(f.agent)||C(f.category):"",b=Lr(C(f.state))??c("状态未知","Unknown status"),x=en(f.attempt),k=y("li","stack stack--tight");if(k.append(y("p","small",[c(`节点 ${xt.format(d+1)}`,`Node ${xt.format(d+1)}`),b,g,x?c(`尝试 ${xt.format(x)} 次`,`Attempts: ${xt.format(x)}`):""].filter(Boolean).join(" · "))),p.length)k.append(y("p","small muted",c(`依赖:${p.map((A)=>`节点 ${xt.format(A+1)}`).join("、")}`,`Depends on: ${p.map((A)=>`Node ${xt.format(A+1)}`).join(", ")}`)));l.append(k)}if(l.childElementCount)o.append(y("h4","",c(`第 ${xt.format(a+1)} 波`,`Wave ${xt.format(a+1)}`)),l),n.append(o)}if(!n.childElementCount)n.append(y("p","small muted",c("运行未提供可显示的波次。","This run did not report any waves to display.")));return n}function H5(e){if(e.status!=="ok")return Jl(e);let t=Of(e),n=y("div","dag-graph-view stack stack--tight");if(t)n.append(t);else n.append(y("p","small muted",c("无法验证完整拓扑;仅显示可识别的节点,不显示依赖连线。","Could not verify the full graph. Only recognized nodes are shown, without dependency lines.")));let r=y("details","dag-graph-text");return r.open=!t,r.append(y("summary","small",c("文字列表 · 波次与依赖","Text list · Waves and dependencies")),Jl(e,!!t)),n.append(r),n}function zf(e,t,n,r){let s=y("ol","inline-list numerical");for(let[i,a]of t.entries()){let o=y("li","stack stack--tight"),l=e==="dag"?n?ve(a.nodes).length:en(a.nodeCount):void 0,u=n&&e==="tasks"?a.startedAt:a.createdAt,d=n&&e==="tasks"?a.completedAt:a.updatedAt,f=Lr(C(a.status))??c("状态未知","Unknown status"),p=`${e==="tasks"?c("任务","Task"):c("运行","Run")} ${xt.format(i+1)} · ${f}`,g=C(a.key),b=j(a.counts),x=[["completed",c("完成","Completed")],["running",c("运行中","Running")],["failed",c("失败","Failed")],["blocked",c("阻塞","Blocked")]].flatMap(([T,S])=>{let E=en(b[T]);return E?[`${S} ${xt.format(E)}`]:[]}),k=l===void 0?"":[c(`${xt.format(l)} 个节点`,`${xt.format(l)} ${l===1?"node":"nodes"}`),...x].join(" · ");if(r&&e==="dag"&&!n&&q5.test(g)){let T=y("details","dag-run");T.dataset.dagKey=g;let S=y("div","dag-content"),E=y("p","small muted",c("正在读取波次与依赖…","Loading waves and dependencies…"));E.setAttribute("role","status"),T.append(y("summary","",[p,k].filter(Boolean).join(" · ")),S);let D=!1,M=!1;T.addEventListener("toggle",()=>{if(!T.open||D||M)return;D=!0,S.replaceChildren(E),r(g).then((L)=>{if(T.isConnected)S.replaceChildren(H5(L));M=L.status==="ok"},(L)=>{if(L instanceof DOMException&&L.name==="AbortError")return;if(T.isConnected)S.replaceChildren(Jl({status:"unavailable",reason:"read_failed"}))}).finally(()=>{D=!1})}),o.append(T)}else if(o.append(y("p","metric-label small",p)),k)o.append(y("p","small muted",k));let A=e==="tasks"&&!n&&[C(a.agent),C(a.category),C(a.executionMode)].filter(Boolean).join(" · ");if(A)o.append(y("p","small muted",A));if(we(u)!==void 0)o.append(y("p","small muted",n&&e==="tasks"?c(`开始:${Dt(u)}`,`Started: ${Dt(u)}`):c(`创建:${Dt(u)}`,`Created: ${Dt(u)}`)));if(we(d)!==void 0&&d!==u)o.append(y("p","small muted",n&&e==="tasks"?c(`结束:${Dt(d)}`,`Ended: ${Dt(d)}`):c(`更新:${Dt(d)}`,`Updated: ${Dt(d)}`)));s.append(o)}return s}function P5(e,t){let n=y("section","subpanel stack stack--tight");if(n.append(y("h4","",c("磁盘快照 · 只读","Saved snapshot · Read-only"))),t==="waiting"){let r=y("p","small muted",c("正在查找已保存的快照…","Looking for a saved snapshot…"));r.setAttribute("role","status"),n.append(r)}else if(t.status==="ok"){let r=ve(e==="tasks"?t.tasks:t.runs).map(j);n.append(y("p","small muted",c(`保存时间:${Dt(t.updatedAt)} · 非实时`,`Saved: ${Dt(t.updatedAt)} · Not live`))),n.append(r.length?zf(e,r,!0):y("p","small muted",c("快照没有此类记录,不代表当前没有。","No matching records in the snapshot. There may still be live activity.")))}else n.append(y("p","small muted",c("没有可读取的快照。","No readable snapshot.")));return n}function Zl(e,t,n,r){let s=y("section","subpanel stack stack--tight");s.append(y("h3","",e==="tasks"?c("子代理任务","Subagent tasks"):c("DAG 运行","DAG runs")),y("p","metric-label small",c("实时宿主 · 只读","Live host · Read-only")));let i=y("p","small muted");if(i.setAttribute("role","status"),s.append(i),!t)i.textContent=c("正在读取宿主摘要…","Loading host summary…");else if(t.status==="empty")i.textContent=e==="tasks"?c("宿主报告当前没有子代理任务。","The host reports no current subagent tasks."):c("宿主报告当前没有 DAG 运行。","The host reports no current DAG runs.");else if(t.status==="ok"){let a=ve(t.rows).map(j),o=en(t.omittedCount);if(a.length&&a.length<=256&&a.every((l)=>Lr(C(l.status))&&we(l.createdAt)!==void 0&&we(l.updatedAt)!==void 0&&(e!=="dag"||en(l.nodeCount)!==void 0))&&(e==="tasks"?o!==void 0:typeof t.limitReached==="boolean")){if(i.textContent=c(`读到 ${xt.format(a.length)} 条摘要。`,`${xt.format(a.length)} ${a.length===1?"summary":"summaries"} loaded.`),s.append(zf(e,a,!1,r)),e==="tasks"&&o)s.append(y("p","small muted",c(`宿主另有 ${xt.format(o)} 条未返回。`,`The host omitted ${xt.format(o)} ${o===1?"additional entry":"additional entries"}.`)));if(e==="dag"&&t.limitReached)s.append(y("p","small muted",c("本次读取已达上限,不代表还有下一页。","The read limit was reached. It is not known whether there are more runs.")))}else i.textContent=di({})}else i.textContent=di(t);return[s,...t&&n&&Sa(t)?[P5(e,n)]:[]]}function Ff(e){let t=y("section","subpanel stack stack--tight");t.id="runtime-journal",t.append(y("h3","",c("本会话记忆计数","Session memory counts")));let n=y("p","small muted");if(n.setAttribute("role","status"),t.append(n),!e)n.textContent=c("正在读取会话记忆…","Loading session memory…");else if(e.status==="ok"){let r=en(e.totalSteps),s=en(e.reflectedSteps);if(r!==void 0&&s!==void 0){n.textContent=c("仅当前会话的原生日志计数,不含共享记忆或原文。","Native journal counts for this session only. Shared memory and original text are not shown.");let i=y("dl","capability-list small numerical");for(let[a,o]of[[c("记录步数","Recorded steps"),r],[c("已反思步数","Reflected steps"),s]]){let l=y("div");l.append(y("dt","",a),y("dd","",xt.format(o))),i.append(l)}t.append(i)}else n.textContent=di({})}else n.textContent=di(e);return t}var ct=(e)=>ge(e,HTMLElement),hi=(e)=>ge(e,HTMLButtonElement),U5=new Intl.DateTimeFormat(me,{dateStyle:"medium",timeStyle:"short"}),$f=(e)=>Number.isFinite(new Date(e).getTime())?U5.format(e):"";function qf(e,t,n,r,s,i){let a=ge("cli-history-dialog",HTMLDialogElement),o=ge("cli-history-search",HTMLInputElement),l=ct("cli-history-list"),u=ct("cli-history-index"),d=ct("cli-history-record"),f=ct("cli-history-record-title"),p=ct("cli-history-activity"),g=hi("cli-history-refresh"),b=hi("cli-history-refresh-activity"),x=hi("cli-history-branch"),k=hi("cli-history-resume"),A=ct("cli-history-resume-status"),T=ct("cli-history-resume-error"),S=new Fn(ct("cli-history-messages"),a,ct("cli-history-empty")),E=[],D,M,L,z,O,P=!1,V=!1,G;function ce(){let q=r();x.disabled=!P||G!==void 0,k.disabled=!P&&!V||G!==void 0||Boolean(q),b.disabled=V||O!==void 0,se(A,G?c("正在尝试打开同一会话…","Opening the same session in Web…"):P||V?q:"")}function re(){let q=o.value.trim().toLocaleLowerCase(),W=E.filter((le)=>i(le.cwd)&&`${le.name} ${le.cwd}`.toLocaleLowerCase().includes(q));l.replaceChildren();for(let le of W){let N=y("li"),J=We("",()=>ie(le),"button--quiet session-link");J.dataset.history=le.id,J.append(y("span","",le.name),y("span","small muted path",le.cwd),y("small","",$f(le.updatedAt)),...le.adopted?[y("small","muted",c("已在 Web 打开","Open in Web"))]:[]),N.append(J),l.append(N)}l.hidden=!W.length,se(ct("cli-history-list-status"),L?c("正在读取 CLI 历史…","Loading CLI history…"):D===!1?c("CLI 历史不可用:未启用或未找到本地历史记录。","CLI history is disabled or no local history records were found."):D&&!W.length?q?c("没有匹配的 CLI 历史。","No matching CLI history."):c("没有可显示的 CLI 历史。","No CLI history to show."):"")}async function de(){L?.abort();let q=L=new AbortController;g.disabled=!0,se(ct("cli-history-list-error")),re();try{let W=await e.request("/api/cli-history",void 0,q.signal);if(q.signal.aborted||!a.open)return;D=W.available===!0,E=ve(W.sessions).map(j).flatMap((le)=>{let N=C(le.id);return N?[{id:N,name:C(le.name)||c("未命名 CLI 会话","Untitled CLI session"),cwd:C(le.cwd),updatedAt:we(le.updatedAt)??0,adopted:le.adopted===!0}]:[]})}catch(W){if(!q.signal.aborted&&a.open)se(ct("cli-history-list-error"),c(`无法读取 CLI 历史:${Ee(W)}`,`Could not load CLI history: ${Ee(W)}`))}finally{if(L===q)L=void 0,g.disabled=!1,re()}}let F=(q)=>Ii(q.id);async function K(q){O?.abort();let W=O=new AbortController;ce(),p.querySelector("[data-activity-status]")?.remove();let N=y("p","small muted",c("正在读取原生快照…","Loading native snapshot…"));N.dataset.activityStatus="",N.setAttribute("role","status"),p.append(N);try{let J=await e.request(`${F(q)}/activity`,void 0,W.signal);if(W.signal.aborted||!a.open||M!==q)return;Tf(p,J)}catch(J){if(!W.signal.aborted&&a.open&&M===q)N.textContent=c(`无法读取原生快照:${Ee(J)}`,`Could not load the native snapshot: ${Ee(J)}`),N.className="notice error small",N.setAttribute("role","alert")}finally{if(O===W)O=void 0,ce()}}async function Y(q){z?.abort();let W=z=new AbortController,le=ct("cli-history-record-status");se(le,c("正在读取对话记录…","Loading conversation…")),se(ct("cli-history-record-error"));try{let N=await e.request(F(q),void 0,W.signal);if(W.signal.aborted||!a.open||M!==q)return;let J=j(N.session);f.textContent=C(J.name)||q.name,V=!1,P=!0,ce();let oe=$f(we(J.updatedAt)??q.updatedAt);ct("cli-history-record-meta").textContent=[q.cwd,oe&&c(`记录更新:${oe}`,`Record updated: ${oe}`)].filter(Boolean).join(" · ");let Ce=ve(N.messages).map(j).map((ye,Be)=>{let Fe=Qt(ye)==="toolResult"&&C(ye.toolCallId);return{key:Fe?`result:${Fe}`:`history-${Be}`,message:ye}});S.render(Ce,"",new Map),requestAnimationFrame(()=>{if(!W.signal.aborted&&a.open&&M===q)a.scrollTop=0})}catch(N){if(W.signal.aborted||!a.open||M!==q)return;if(N instanceof De&&N.code==="history_too_large"){V=!0,ce(),f.textContent=q.name,ct("cli-history-record-meta").textContent=q.cwd,se(ct("cli-history-record-error"),c("这条 CLI 历史记录过大,仅显示基本信息,无法预览完整对话。","This CLI history is too large to preview; only basic info is shown."));return}se(ct("cli-history-record-error"),c(`无法读取这条记录:${Ee(N)}`,`Could not load this record: ${Ee(N)}`))}finally{if(z===W)z=void 0,se(le)}}function ee(){z?.abort(),z=void 0,O?.abort(),O=void 0,M=void 0,P=!1,V=!1,G=void 0,se(T),ce(),S.reset(),p.replaceChildren()}function ie(q){if(!i(q.cwd))return;ee(),M=q,u.hidden=!0,d.hidden=!1,f.textContent=q.name,ct("cli-history-record-meta").textContent=q.cwd,ct("cli-history-empty").hidden=!0,f.focus({preventScroll:!0}),a.scrollTop=0,Y(q).then(()=>{if(M===q&&!V)K(q)})}o.addEventListener("input",re),g.addEventListener("click",()=>void de()),b.addEventListener("click",()=>{if(M&&!V)K(M)}),x.addEventListener("click",()=>{if(M)n({kind:"history",id:M.id,name:M.name})}),k.addEventListener("click",async()=>{let q=M;if(!q||k.disabled)return;let W=G=Symbol(),le=()=>G===W&&a.open&&M===q;se(T),ce(),A.focus();try{let N=await e.resumeHistory(q.id);s(N,le())}catch(N){if(le()){if(se(T,c(`无法在 Web 继续:${Ee(N)}`,`Could not continue in Web: ${Ee(N)}`)),document.activeElement===A)T.focus()}}finally{if(G===W)G=void 0,ce()}}),hi("cli-history-back").addEventListener("click",()=>{let q=M?.id;ee(),d.hidden=!0,u.hidden=!1,([...l.querySelectorAll("button")].find((W)=>W.dataset.history===q)??o).focus()}),a.querySelector("[data-close]")?.addEventListener("click",()=>a.close()),a.addEventListener("close",()=>{if(a.open)return;L?.abort(),L=void 0,ee(),t()});function H(q){if(!a.open)ee(),d.hidden=!0,u.hidden=!1,o.value="",a.showModal();de().then(()=>{if(!a.open||q===void 0)return;let W=E.find((le)=>le.id===q);if(W)ie(W)})}return{open:H,update:ce}}var ht=(e)=>ge(e,HTMLElement),gt=(e)=>ge(e,HTMLButtonElement),Yl=c("仅普通文字。命令、权限审批及私密交互请回到 CLI 处理。","Plain text only. Use the CLI for commands, permission approvals, and private interactions."),Hf=new Set(["terminal_not_attached","terminal_not_found","terminal_offline"]);function Pf(e,t,n,r){let s=ge("cli-live-dialog",HTMLDialogElement),i=ge("cli-live-session",HTMLSelectElement),a=ge("cli-live-input",HTMLTextAreaElement),o=new Fn(ht("cli-live-messages"),ht("cli-live-transcript"),ht("cli-live-empty")),l=new Map,u=new Map,d=new Map,f=[],p=[],g,b="",x="",k,A,T,S,E=!1,D=500,M="waiting",L=!1,z={},O=[],P,V=!0;function G(){let H=p.find((Fe)=>Fe.id===i.value),q=H!==void 0&&b===H.id,W=q&&L&&M==="open"&&!T,le=z.running===!0||z.compacting===!0,N=q||Boolean(H&&x===H.id),J=Boolean(H&&d.get(H.id)===a.value);i.disabled=Boolean(b||T||k||!p.length),gt("cli-live-close").disabled=Boolean(T),gt("cli-live-connect").hidden=q,gt("cli-live-connect").disabled=!H||!g||!e.token||M!=="open"||Boolean(T||k),gt("cli-live-disconnect").hidden=!q,gt("cli-live-disconnect").disabled=Boolean(T),gt("cli-live-refresh").disabled=Boolean(T||k),gt("cli-live-branch").hidden=!q,gt("cli-live-branch").disabled=!W||le,gt("cli-live-send").disabled=!W||le||J||!a.value.trim();let oe=gt("cli-live-stop"),Ce=q&&z.running===!0&&Boolean(C(z.turnId));if(!Ce&&document.activeElement===oe)a.focus({preventScroll:!0});oe.hidden=!Ce,oe.disabled=!W,a.readOnly=T==="input",ht("cli-live-conversation").hidden=!N&&!a.value,se(ht("cli-live-workspace"),H?.cwd);let ye=T==="connect"?c("正在连接 CLI…","Connecting to CLI…"):T==="disconnect"?c("正在释放 Web 连接…","Disconnecting Web…"):M==="lost"?c("实时更新已离线,草稿会保留。连接恢复后只刷新消息,不会重发。","Live updates are offline. Your draft is kept. Reconnecting refreshes messages without resending them."):k?c("正在查找本地 CLI 会话…","Looking for local CLI sessions…"):q?!L?c("正在同步 CLI 对话…","Syncing the CLI conversation…"):z.compacting===!0?c("CLI 正在压缩上下文。","CLI is compacting context."):z.running===!0?c("已连接 · CLI 正在运行","Connected · CLI is running"):c("已连接 · 等待输入","Connected · Waiting for input"):g===!1?c("CLI 实时不可用:未启用或找不到本地终端控制服务。","Live CLI is unavailable. The local terminal service is disabled or could not be found."):!p.length?c("没有发现可连接的 CLI 会话。","No CLI sessions are available to connect."):M==="waiting"?c("正在等待 Web 实时连接…","Waiting for the Web connection…"):x===H?.id?O.length?c("已断开;显示最后一次同步的消息。","Disconnected. Showing the last synced messages."):c("已断开。","Disconnected."):c("选择会话后,点击「连接」读取对话。","Select a session and choose “Connect” to read the conversation."),Be=x===H?.id&&(q?L:!T)?P==="unavailable"?c(" · 对话记录暂不可读"," · Conversation history is unavailable"):P==="truncated"?c(" · 仅显示部分近期消息"," · Showing a limited set of recent messages"):"":"";se(ht("cli-live-status"),ye+Be),ht("cli-live-hint").textContent=J?c(`上一次发送的结果未知,请先核对 CLI,不要重发这条消息。${Yl}`,`Delivery of your last message is unknown. Check the CLI before trying again. Do not resend this message. ${Yl}`):Yl}function ce(){x="",z={},O=[],P=void 0,o.reset(),a.value=u.get(i.value)??"",se(ht("cli-live-error")),se(ht("cli-live-receipt")),G()}function re(){let H=i.value,q=b||(T==="connect"?H:"");if(p=f.filter((W)=>W.id===q||r(W.cwd)),i.replaceChildren(pt(c("选择可用会话","Choose a session"),""),...p.map((W)=>pt(W.name,W.id))),i.value=p.some((W)=>W.id===H)?H:p.length===1?p[0]?.id??"":"",i.value!==H)ce()}async function de(){if(b||k||!s.open)return;let H=k=new AbortController;se(ht("cli-live-error")),G();try{let q=await e.request("/api/cli-live",void 0,H.signal);if(!s.open||H.signal.aborted)return;g=q.available===!0,f=ve(q.sessions).map(j).flatMap((W)=>{let le=C(W.id);return le?[{id:le,name:C(W.name)||c("未命名 CLI 会话","Untitled CLI session"),cwd:C(W.cwd)}]:[]}),re()}catch(q){if(!H.signal.aborted&&s.open)g=!1,se(ht("cli-live-error"),c(`无法发现 CLI 会话:${Ee(q)}`,`Could not find CLI sessions: ${Ee(q)}`))}finally{if(k===H)k=void 0;G()}}function F(H,q){z=j(q.state);let W=j(q.transcript).status;P=W==="truncated"||W==="unavailable"?W:void 0;let le=O;O=ve(q.messages).map(j).map((J,oe)=>({key:`cli-live:${oe}`,message:JSON.stringify(le[oe]?.message)===JSON.stringify(J)?le[oe]?.message??J:J}));let N=O.at(-1);if(!N&&P)o.reset();else o.render(O,N?.message.streaming===!0?N.key:"",l,x!==H);ht("cli-live-empty").hidden=Boolean(P)||O.length>0,x=H,L=!0,D=500}function K(){clearTimeout(S),S=void 0,A?.abort(),A=void 0,E=!1}function Y(H=50){if(!s.open||!b||M!=="open")return;if(A||T){E=!0;return}if(S!==void 0&&H!==0)return;clearTimeout(S),S=window.setTimeout(()=>{S=void 0,ee()},H)}async function ee(){let H=b;if(!H||A||!s.open||M!=="open")return;if(T){E=!0;return}let q=A=new AbortController,W=()=>b===H&&s.open&&!q.signal.aborted,le=0;E=!1;try{let N=await e.request(Ni(H),void 0,AbortSignal.any([q.signal,AbortSignal.timeout(1e4)]));if(W()){if(F(H,N),ht("cli-live-error").dataset.read==="true")se(ht("cli-live-error"))}}catch(N){if(W()){if(L=!1,N instanceof De&&Hf.has(N.code))b="";else le=D,D=Math.min(D*2,5000);let J=ht("cli-live-error");if(J.hidden||J.dataset.read==="true")J.dataset.read="true",se(J,c(`无法同步 CLI 对话:${Ee(N)}`,`Could not sync the CLI conversation: ${Ee(N)}`))}}finally{if(A===q)A=void 0;if(W()&&(le||E))Y(le||50);G()}}async function ie(H,q){if(!H||T)return;T=q.action;let W=ht("cli-live-error");if(delete W.dataset.read,se(W),q.action!=="disconnect")se(ht("cli-live-receipt"));if(q.action==="disconnect")K();G();let le;try{let N=await e.cliLiveAction(H,q);switch(q.action){case"connect":b=H,F(H,N),le=a;break;case"disconnect":b="",L=!1,le=gt("cli-live-connect");break;case"input":u.delete(H),d.delete(H),a.value="",se(ht("cli-live-receipt"),N.disposition==="held"?c("CLI 已暂存消息;请在 CLI 查看,勿重发。","The CLI is holding the message. Check the CLI and do not resend it."):N.disposition==="queued"?c("CLI 已将消息加入队列。","The CLI queued the message."):c("CLI 已接收消息。","The CLI accepted the message."));break;case"stop":se(ht("cli-live-receipt"),c("当前回合已停止。","The current turn stopped.")),le=a;break}}catch(N){if(q.action==="input"&&(!(N instanceof De)||N.status>=500||N.code==="terminal_outcome_unknown"))d.set(H,q.message);if(N instanceof De&&Hf.has(N.code))b="",L=!1;se(W,Ee(N))}finally{if(T=void 0,!b&&(q.action==="disconnect"||q.action==="connect"))re();if(G(),s.open)le?.focus({preventScroll:!0});if(b)Y(0)}}return i.addEventListener("change",ce),a.addEventListener("input",()=>{u.set(i.value,a.value),G()}),gt("cli-live-connect").addEventListener("click",()=>void ie(i.value,{action:"connect"})),gt("cli-live-disconnect").addEventListener("click",()=>void ie(b,{action:"disconnect"})),gt("cli-live-refresh").addEventListener("click",()=>{if(b)Y(0);else de()}),gt("cli-live-stop").addEventListener("click",()=>{let H=C(z.turnId);if(H)ie(b,{action:"stop",expectedTurnId:H})}),gt("cli-live-branch").addEventListener("click",()=>{let H=p.find((q)=>q.id===b);if(H)n({...H,kind:"live"})}),ge("cli-live-form",HTMLFormElement).addEventListener("submit",(H)=>{if(H.preventDefault(),!gt("cli-live-send").disabled)ie(b,{action:"input",mode:"prompt",clientMessageId:crypto.randomUUID(),message:a.value})}),gt("cli-live-close").addEventListener("click",()=>s.close()),s.addEventListener("cancel",(H)=>{if(T)H.preventDefault()}),s.addEventListener("close",()=>{if(s.open)return;if(k?.abort(),k=void 0,K(),b)ie(b,{action:"disconnect"});if(V)t();V=!0}),{open(){if(s.open)return;if(s.showModal(),G(),!b)de()},scopeChanged(){re(),G()},closeAfterBranch(){V=!1,s.close()},invalidate(H){if(b&&b===H)Y()},setTransport(H){if(H===M)return;if(M=H,H!=="open")L=!1,K();else if(b)Y(0);else if(!g)de();G()}}}var W5=2000,Uf=8000,j5={pending:c("正在查找 CLI 会话…","Looking for a CLI session…"),none:c("未发现可跟随的 CLI 会话。","No CLI session to follow."),ambiguous:c("有多个 CLI 会话,无法确认跟随哪一个。","Multiple CLI sessions were found. Could not determine which one to follow."),unavailable:c("无法核验 CLI 会话,暂不显示对话。","Could not verify the CLI session. The conversation is hidden.")};function G5(e,t){switch(e.status){case"none":return{status:"none"};case"ambiguous":return{status:"ambiguous"};case"ok":{let n=j(e.session),r=C(n.id),s=C(n.cwd),i=C(n.name);if(!r||!s||!t(s)||typeof n.name!=="string"||typeof n.running!=="boolean"||!Array.isArray(e.messages))return{status:"unavailable"};let a=j(e.transcript).status,o=[];for(let l of a==="unavailable"?[]:e.messages){let{role:u,content:d,timestamp:f,streaming:p}=j(l);if(u!=="user"&&u!=="assistant"&&u!=="custom"||typeof d!=="string")return{status:"unavailable"};o.push({role:u,content:d,timestamp:we(f),streaming:u==="assistant"&&p===!0})}return{status:"ok",target:{id:r,name:i||c("未命名 CLI 会话","Untitled CLI session"),cwd:s,running:n.running},messages:o,...a==="truncated"||a==="unavailable"?{history:a}:{}}}default:return{status:"unavailable"}}}function Wf(e,t,n){let r=ge("cli-follow-view",HTMLElement),s=ge("cli-follow-status",HTMLElement),i=ge("cli-follow-empty",HTMLElement),a=new Fn(ge("cli-follow-messages",HTMLElement),r,i),o=new Map,l=!1,u,d="",f,p,g=[];function b(){g=[],a.reset(),i.hidden=!0}function x(E,D=!1,M){let L=E==="ok"?c(`只读跟随 · ${D?"CLI 正在运行":"CLI 未在运行"}`,`Following · Read-only · ${D?"CLI is running":"CLI is idle"}`):j5[E],z=M==="unavailable"?c(" · 对话记录暂不可读"," · Conversation history is unavailable"):M==="truncated"?c(" · 仅显示部分近期消息"," · Showing a limited set of recent messages"):"";if(s.dataset.state!==E)s.dataset.state=E;if(s.textContent!==L+z)s.textContent=L+z}function k(E){let D=u;if(E.status!=="ok"){if(u)b();if(u=void 0,x(E.status),D)n();return}u=E.target,d=u.cwd;let M=!D||D.id!==u.id||D.cwd!==u.cwd;if(M)b();x("ok",u.running,E.history);let L=new Map(g.map((P)=>[P.key,P])),z=new Set,O=E.messages.map((P,V)=>{let G=Dr(P)||`follow:${V}`,ce=z.has(G)?`${G}:${V}`:G;z.add(ce);let re=L.get(ce);return re&&JSON.stringify(re.message)===JSON.stringify(P)?re:{key:ce,message:P}});if(E.history&&O.length===0)b();else if(M||g.length!==O.length||O.some((P,V)=>P!==g[V])){g=O;let P=g.at(-1);a.render(g,P?.message.streaming===!0?P.key:"",o,M)}if(i.hidden=Boolean(E.history)||g.length>0,M||D?.name!==u.name)n()}function A(){clearTimeout(p),p=void 0,f?.abort(),f=void 0}async function T(){if(!l||document.hidden||f)return;let E=f=new AbortController,D=AbortSignal.any([E.signal,AbortSignal.timeout(Uf)]),M=performance.now()+Uf,L=()=>l&&!document.hidden&&f===E;try{let z=await e.request("/api/cli-follow",void 0,D).catch(()=>{return});if(L())k(!z||D.aborted||performance.now()>=M?{status:"unavailable"}:G5(z,t))}finally{if(f===E){if(f=void 0,l&&!document.hidden)p=window.setTimeout(()=>{p=void 0,T()},W5)}}}function S(){if(!l)return;l=!1,A(),u=void 0,d="",b(),n()}return document.addEventListener("visibilitychange",()=>{if(!l)return;if(document.hidden){if(A(),u)b(),u=void 0,n();x("pending")}else T()}),window.addEventListener("pagehide",S),{get active(){return l},get target(){return u},get workspace(){return d},start(){if(l)return;l=!0,x("pending"),n(),T()},stop:S,recheckWorkspace(){if(!d||t(d))return;d="",k({status:"unavailable"})}}}var jf=1e4,Gf=(e)=>e instanceof DOMException&&e.name==="TimeoutError";function Xl(e){return Array.isArray(e)?[...new Set(e.filter((t)=>typeof t==="string"&&Boolean(t)))]:[]}function Kf(e,t,n,r){let s=ge("workspace-browser-button",HTMLButtonElement),i=ge("workspace-browser-dialog",HTMLDialogElement),a=ge("workspace-browser-close",HTMLButtonElement),o=ge("workspace-browser-form",HTMLFormElement),l=ge("workspace-browser-path",HTMLInputElement),u=ge("workspace-browser-use",HTMLButtonElement),d=ge("workspace-browser-navigation",HTMLElement),f=ge("workspace-browser-root-field",HTMLElement),p=ge("workspace-browser-root",HTMLSelectElement),g=ge("workspace-browser-up",HTMLButtonElement),b=ge("workspace-browser-current",HTMLElement),x=ge("workspace-browser-status",HTMLElement),k=ge("workspace-browser-entries",HTMLUListElement),A=ge("workspace-browser-feedback",HTMLElement),T=ge("workspace-browser-approval",HTMLElement),S=ge("workspace-browser-approval-title",HTMLElement),E=ge("workspace-browser-approval-path",HTMLElement),D=ge("workspace-browser-confirm",HTMLButtonElement),M=ge("workspace-browser-deny",HTMLButtonElement),L,z,O,P=0,V="";function G(N="",J=!1){A.classList.toggle("error",J),se(A,N)}function ce(){let N=z?.kind==="decision",J=z?.kind==="prepare";d.hidden=Boolean(O),T.hidden=!O,E.textContent=O?.path??"",u.disabled=!l.value||J||N,p.disabled=J,g.disabled=!V||J,a.setAttribute("aria-disabled",String(N)),D.setAttribute("aria-disabled",String(N)),M.setAttribute("aria-disabled",String(N))}function re(N){if(clearTimeout(P),O=N,N)P=window.setTimeout(()=>{if(O===N&&z?.kind!=="decision")de()},N.expiresAt-Date.now());ce()}function de(){re(),G(c("审批已过期。请重新选择「使用此目录」,发起新的审批。","Approval expired. Choose “Use this directory” to request approval again."),!0),u.focus()}function F(){let N=z;z=void 0,N?.controller.abort()}async function K(N,J,oe,Ce,ye){if(!i.open||z?.kind==="decision"||!L)return;F();let Be={kind:N,controller:new AbortController};z=Be,ce();let Fe=performance.now()+jf,Pe=AbortSignal.any([Be.controller.signal,AbortSignal.timeout(jf)]),Ve;try{let mt=new Promise((Wr,Cn)=>{Ve=()=>Cn(Pe.reason),Pe.addEventListener("abort",Ve,{once:!0})}),yt=await Promise.race([e.request(`/api/workspaces/${J}`,oe,Pe),mt]);if(z!==Be||!i.open||Be.controller.signal.aborted)return;if(Pe.throwIfAborted(),performance.now()>=Fe)throw new DOMException("Workspace request timed out","TimeoutError");z=void 0,ce(),Ce(yt)}catch(mt){if(z!==Be&&z!==void 0||!i.open||Be.controller.signal.aborted)return;z=void 0,ce(),ye(mt)}finally{if(Ve)Pe.removeEventListener("abort",Ve)}}function Y(N=""){V="",b.textContent=N,b.hidden=!N,k.replaceChildren(),k.hidden=!0}function ee(N,J=!0){if(!N||O||z?.kind==="prepare"||!i.open)return;if(l.value=N,J)b.textContent=N,b.hidden=!1,b.focus({preventScroll:!0});Y(N),G(),x.textContent=c("正在读取目录…","Reading directory…"),K("browse","browse",{path:N},(oe)=>{let Ce=C(oe.path);if(!Ce||!Array.isArray(oe.entries))throw Error("Invalid browse response");V=C(oe.parent),b.textContent=Ce,l.value=Ce,p.value=t().roots.includes(Ce)?Ce:"";for(let ye of oe.entries){let{name:Be,path:Fe,kind:Pe}=j(ye);if(typeof Be!=="string"||!Be||typeof Fe!=="string"||!Fe)continue;if(Pe!=="directory"&&Pe!=="file")continue;let Ve=y("li"),mt=Pe==="directory"?We("",()=>ee(Fe),"button--quiet workspace-entry"):y("div","workspace-entry");mt.append(y("bdi","break",Be),y("span","small muted",Pe==="directory"?c("目录 ›","Folder ›"):c("文件","File"))),Ve.append(mt),k.append(Ve)}k.hidden=!k.childElementCount,x.textContent=oe.truncated===!0?c("目录条目太多,仅显示部分名称。","This directory has too many entries to show them all."):k.hidden?c("没有可显示的条目。","No entries to show."):"",ce()},(oe)=>{x.textContent="",p.value="",G(Gf(oe)?c("读取目录超时。请重新选择一个已授权工作区。","Reading the directory timed out. Choose an authorized directory and try again."):c("无法读取该目录。只能浏览已授权范围内仍可访问的目录。","Could not read this directory. You can only browse accessible directories within authorized locations."),!0)})}function ie(N){let J=C(N.path),oe=Xl(N.workspaces);if(!J||!oe.includes(J))throw Error("Invalid workspace selection receipt");i.close(),n(J,oe)}function H(N){if(!N||O||z?.kind==="prepare")return;if(z?.kind==="browse")x.textContent=c("目录读取已取消。","Directory read canceled.");G(c("正在核验目录…","Verifying directory…")),K("prepare","prepare",{path:N},(J)=>{if(J.status==="authorized"){ie(J);return}let oe=C(J.path),Ce=C(J.confirmation),ye=we(J.expiresAt);if(J.status!=="confirmation_required"||!oe||!Ce||ye===void 0)throw Error("Invalid approval response");if(l.value=oe,ye<=Date.now()){de();return}G(),re({token:Ce,path:oe,expiresAt:ye}),S.focus()},(J)=>{G(Gf(J)?c("核验目录超时。路径已保留,请重试。","Directory verification timed out. The path is still in the field. Try again."):c("无法核验目录。请检查绝对路径、目录是否仍存在及本机 Web 服务是否可用。","Could not verify the directory. Check the absolute path, whether the directory still exists, and whether the local Web server is running."),!0)})}function q(N,J=!1){if(!O||z?.kind==="decision")return;let{token:oe,expiresAt:Ce}=O;if(Ce<=Date.now()){de();return}clearTimeout(P),G(N?c("正在提交允许决定…","Granting access…"):c("正在提交拒绝决定…","Denying access…")),K("decision","confirm",{confirmation:oe,allow:N},(ye)=>{if(N){ie(ye);return}if(ye.status!=="cancelled")throw Error("Invalid denial receipt");if(re(),J)i.close();else G(c("已拒绝。工作区未切换。","Access denied. The selected directory did not change.")),u.focus()},(ye)=>{re();let Be=ye instanceof De&&(ye.code==="workspace_confirmation_stale"||ye.status===410);G(Be?c("审批已失效:可能已过期或目录已变更。请重新核验路径。","Approval expired or the directory changed. Verify the path again."):c("未能确认审批结果,未切换工作区。请重新核验路径。","Could not confirm the approval result. The selected directory did not change. Verify the path again."),!0),u.focus()})}function W(){if(z?.kind==="decision")return;if(O)q(!1,!0);else F(),i.close()}function le(){let{roots:N}=t(),J=p.value;p.replaceChildren(pt(c("选择已授权工作区","Choose an authorized directory"),""),...N.map((oe)=>pt(oe,oe))),p.value=N.includes(J)?J:"",f.hidden=!N.length}return s.addEventListener("click",()=>{if(!L||document.querySelector("dialog:modal"))return;F(),re(),G();let{roots:N,selected:J}=t(),oe=N.includes(J)?J:N[0]??"";if(le(),p.value=oe,l.value=oe,x.textContent=oe?"":c("没有已授权目录。可手动输入目录的绝对路径。","No directories are authorized. Enter an absolute directory path."),Y(),ce(),i.showModal(),oe)ee(oe,!1)}),o.addEventListener("submit",(N)=>{N.preventDefault(),H(l.value)}),l.addEventListener("input",()=>{if(z?.kind==="browse"||z?.kind==="prepare"){if(z.kind==="browse")x.textContent=c("目录读取已取消。","Directory read canceled.");F()}G(),ce()}),p.addEventListener("change",()=>ee(p.value)),g.addEventListener("click",()=>ee(V)),D.addEventListener("click",()=>q(!0)),M.addEventListener("click",()=>q(!1)),a.addEventListener("click",W),i.addEventListener("cancel",(N)=>{N.preventDefault(),W()}),i.addEventListener("close",()=>{if(i.open)return;if(F(),re(),G(),Y(),!document.querySelector("dialog:modal"))r()}),{update(N,J){let oe=j(N).platform,Ce=oe==="win32"||oe==="posix"?oe:void 0,ye=L!==Ce||J;if(L=Ce,s.hidden=!L,l.placeholder=L==="win32"?"C:\\Projects\\OmO":"/home/me/projects/OmO",!i.open)return;if(!L)F(),i.close();else{if(le(),!ye)return;F(),re(),Y(),x.textContent="",G(c("本机 Web 服务连接已更新。请重新选择或核验目录。","The local Web server connection changed. Choose a directory or verify the path again."),!0),l.focus()}}}}var Vf=["scoped-models","favorite-models","task-kill","login","logout","trust","export","import","share","reload","keybindings","changelog","quit","exit","bug","debug"];var Yf=120,Xf=6000,Ra=Yf.toLocaleString(me),Ma=Xf.toLocaleString(me),Ql=[{name:"new",invocation:"/new",label:c("新会话","New session"),description:c("开始一个新会话。","Start a new session.")},{name:"resume",invocation:"/resume",label:c("继续会话","Resume session"),description:c("从历史会话中选择一个继续。","Choose a past session to resume.")},{name:"sessions",invocation:"/sessions",label:c("会话列表","Session list"),description:c("列出历史会话并继续其中一个。","Browse and resume past sessions.")},{name:"rename",invocation:"/rename",label:c("重命名","Rename"),description:c(`重命名当前会话(名称可选,最长 ${Ra} 字)。`,`Rename the current session. The name is optional and can be up to ${Ra} characters.`)},{name:"name",invocation:"/name",label:c("重命名(别名)","Rename (alias)"),description:c("与 /rename 相同:设置会话显示名。","Alias for /rename. Set the session's display name.")},{name:"session",invocation:"/session",label:c("会话信息","Session info"),description:c("查看当前会话的信息与统计。","View details and statistics for this session.")},{name:"tree",invocation:"/tree",label:c("会话树","Session tree"),description:c("查看会话分支树并跳到任意点继续。","Browse session branches and resume from any point.")},{name:"todo",invocation:"/todo",label:c("本会话待办","Session Todo"),description:c("查看当前分支的待办。","View the Todo list for the current branch.")},{name:"tasks",invocation:"/tasks",label:c("本会话任务","Session tasks"),description:c("查看当前会话的原生子代理任务。","View native subagent tasks for this session.")},{name:"dag",invocation:"/dag",label:c("本会话 DAG","Session DAG"),description:c("查看本会话的运行,展开读取波次和依赖。","View workflow runs and expand them to inspect execution waves and dependencies.")},{name:"help",invocation:"/help",label:c("命令帮助","Command help"),description:c("查看 Web 可用的命令和快捷键。","See which commands and keyboard shortcuts are available on the web.")},{name:"hotkeys",invocation:"/hotkeys",label:c("快捷键","Keyboard shortcuts"),description:c("查看此工作台的键盘操作。","View keyboard shortcuts for the workbench.")},{name:"fork",invocation:"/fork",label:c("分支","Fork"),description:c("选择一条用户消息,从该消息之前创建分支。","Choose a user message and start a branch from just before it.")},{name:"clone",invocation:"/clone",label:c("副本","Clone"),description:c("复制当前会话为新会话并切换过去。","Copy the current session and switch to the copy.")},{name:"compact",invocation:"/compact",label:c("压缩上下文","Compact context"),description:c(`手动压缩上下文(指示可选,最长 ${Ma} 字)。`,`Compact context manually. Optional instructions can be up to ${Ma} characters.`)},{name:"settings",invocation:"/settings",label:c("会话设置","Session settings"),description:c("打开当前会话的运行设置;全局配置请在本机终端修改。","Open this session's run settings. Change global configuration in the local terminal.")},{name:"setting",invocation:"/setting",label:c("会话设置(别名)","Session settings (alias)"),description:c("与 /settings 相同。","Alias for /settings.")},{name:"model",invocation:"/model",label:c("模型","Model"),description:c("切换本会话的模型(只对当前会话有效)。","Change the model for this session only.")},{name:"thinking",invocation:"/thinking",label:c("思考档位","Thinking level"),description:c("设置思考档位(可选;档位按实际可选值校验)。","Set a thinking level. If specified, it must be one of the available levels.")},{name:"reasoning",invocation:"/reasoning",label:c("推理状态","Reasoning status"),description:c("查看当前模型是否启用推理。持久设置在本机修改。","Check whether reasoning is enabled for the current model. Change persistent settings in the native client.")},{name:"efforts",invocation:"/efforts",label:c("原生推理档位","Native reasoning levels"),description:c("查看当前档和原生可用档位。持久设置在本机修改。","View the current level and available native levels. Change persistent settings in the native client.")},{name:"fast",invocation:"/fast",label:c("极速模式","Fast mode"),description:c("切换极速模式(开、关或不带参数切换;只影响当前模型)。","Set fast mode to on or off, or omit the argument to toggle it. Applies only to the current model.")},{name:"copy",invocation:"/copy",label:c("复制","Copy"),description:c("复制上一条助手消息。","Copy the last assistant message.")}],K5=Ql.map((e)=>e.name);function Qf(e){let t=hs(e);return t.kind==="builtin"&&["session","tree","todo","tasks","dag","help","hotkeys","reasoning","efforts","settings","setting"].includes(t.command.name)}var V5=/^\/[A-Za-z][A-Za-z0-9_-]*/,Jf=/[\0-\b\v\f\x0e-\x1f\x7f]/,J5=/^[A-Za-z0-9_./:@+-]+$/,Zf=c("命令只能是单行文本,不能包含换行或控制字符。","Commands must be on one line and cannot contain control characters."),$n=(e)=>({kind:"malformed",message:e});function hs(e){let t=V5.exec(e)?.[0];if(t===void 0)return{kind:"plain"};let n=e.slice(t.length),r=t.slice(1),s=K5.find((o)=>o===r),i=Vf.find((o)=>o===r);if(s===void 0&&i===void 0)return{kind:"plain"};if(n!==""&&!/^[ \t\r\n]/.test(n))return Jf.test(n[0])?$n(Zf):{kind:"plain"};if(Jf.test(e)||e.includes("\r")||e.includes(`
290
- `))return $n(Zf);if(i!==void 0)return{kind:"tui-only",name:i};let a=n.trim();switch(s){case"new":case"resume":case"sessions":case"session":case"tree":case"todo":case"tasks":case"dag":case"help":case"hotkeys":case"fork":case"clone":case"copy":case"settings":case"setting":if(a!=="")return $n(c(`“/${s}”不带参数。`,`/${s} does not take arguments.`));return{kind:"builtin",command:{name:s}};case"reasoning":case"efforts":return a===""?{kind:"builtin",command:{name:s}}:{kind:"tui-only",name:s};case"rename":case"name":if(a.length>Yf)return $n(c(`会话名称不能超过 ${Ra} 字。`,`Session names can be up to ${Ra} characters.`));return{kind:"builtin",command:{name:s,...a===""?{}:{value:a}}};case"compact":if(a.length>Xf)return $n(c(`压缩指示不能超过 ${Ma} 字。`,`Compaction instructions can be up to ${Ma} characters.`));if(a==="")return{kind:"builtin",command:{name:"compact"}};return{kind:"builtin",command:{name:"compact",instructions:a}};case"model":if(a==="")return{kind:"builtin",command:{name:"model"}};if(/(^|\s)--\S/.test(a))return $n(c("Web 只接受精确模型引用,不支持 --default 等持久化参数。","The web app accepts exact model references only. Persistent flags such as --default are not supported."));if(!J5.test(a))return $n(c("模型引用只能是单个精确引用(如 provider/model)。","Enter one exact model reference, such as provider/model."));return{kind:"builtin",command:{name:"model",reference:a}};case"thinking":if(a==="")return{kind:"builtin",command:{name:"thinking"}};if(!/^[^\s]+$/.test(a))return $n(c("请输入单个思考档位,例如 high。","Enter a single thinking level, such as high."));return{kind:"builtin",command:{name:"thinking",level:a.toLowerCase()}};case"fast":{if(a==="")return{kind:"builtin",command:{name:"fast"}};let o=a.toLowerCase();return o==="on"||o==="off"?{kind:"builtin",command:{name:s,mode:o}}:$n(c("“/fast”只接受 on、off 或无参数(切换)。","Use /fast on, /fast off, or /fast to toggle."))}default:return{kind:"plain"}}}var Nr=/^(?:\/(?:[A-Za-z0-9_-]{1,64}|skill:[A-Za-z0-9-]{1,64})|\$[A-Za-z0-9-]{1,64})$/,Z5=/^(?:\/(?:[A-Za-z0-9_-]{0,64}|skill:[A-Za-z0-9-]{0,64})|\$[A-Za-z0-9-]{0,64})$/;function Da(e){return[...Ql.map((t)=>({...t,source:"builtin"})),...ve(e).map(j).filter((t)=>hs(C(t.invocation)).kind==="plain")]}function em(e,t){let n=[],r=-1,s,i=!1;function a(){n=[],r=-1,t.hidden=!0,e.removeAttribute("aria-activedescendant")}function o(l){let u=n[l];if(!u)return;e.value=`${u.invocation} `,e.focus(),e.setSelectionRange(e.value.length,e.value.length),a(),e.dispatchEvent(new Event("input",{bubbles:!0}))}return e.addEventListener("compositionstart",()=>{i=!0,a()}),e.addEventListener("compositionend",()=>{i=!1}),e.addEventListener("blur",a),t.addEventListener("mousedown",(l)=>l.preventDefault()),t.addEventListener("click",(l)=>{let u=l.target;if(!(u instanceof Element))return;let d=Array.from(t.children).findIndex((f)=>f.contains(u));o(d)}),{get composing(){return i},reset(){s=void 0,a()},render(l,u){let d=e.value;if(s!==d)s=void 0;if(!u||i||s===d||document.activeElement!==e||!Z5.test(d)||e.selectionStart!==d.length||e.selectionEnd!==d.length){a();return}let f=d.startsWith("$")||d.startsWith("/skill:"),p=d.toLowerCase().replace(/^\/skill:/,"$"),g=new Map;for(let x of Da(l)){let k=C(x.invocation);if(!Nr.test(k)||k.startsWith("$")!==f)continue;if(k.toLowerCase().startsWith(p)&&!g.has(k))g.set(k,{invocation:k,description:C(x.description)})}let b=[...g.values()].sort((x,k)=>Number(k.invocation===p)-Number(x.invocation===p)||x.invocation.localeCompare(k.invocation));if(!b.length){a();return}if(b.length===n.length&&b.every((x,k)=>x.invocation===n[k]?.invocation&&x.description===n[k]?.description))return;n=b,r=-1,e.removeAttribute("aria-activedescendant"),t.replaceChildren(...b.map((x,k)=>{let A=y("li");return A.id=`inline-command-${k}`,A.setAttribute("role","option"),A.setAttribute("aria-selected","false"),A.append(y("code","",x.invocation),y("span","small muted",x.description)),A})),t.hidden=!1,t.scrollTop=0},key(l){if(i||t.hidden||!ai(l))return!1;switch(l.key){case"Escape":s=e.value,a();break;case"ArrowDown":case"ArrowUp":case"PageDown":case"PageUp":{let u=oi(l.key,r,t.children,t);if(u===void 0)return!1;t.children[r]?.setAttribute("aria-selected","false"),r=u;let d=t.children[r];d.setAttribute("aria-selected","true"),e.setAttribute("aria-activedescendant",d.id),li(t,d);break}case"Enter":case"Tab":if(r<0)return!1;o(r);break;default:return!1}return l.preventDefault(),!0}}}D0();var U=(e)=>ge(e,HTMLElement),Q=(e)=>ge(e,HTMLButtonElement),He=(e)=>ge(e,HTMLSelectElement),Lt=(e)=>ge(e,HTMLInputElement),Ia=(e)=>ge(e,HTMLFormElement),An=(e)=>ge(e,HTMLDialogElement),ze=new no,As=new Fn(U("messages"),U("transcript"),U("no-messages")),ur=y("p","notice small");ur.id="transcript-status";ur.setAttribute("role","status");ur.hidden=!0;Ia("composer").prepend(ur);var xi=new ro(U("interactions")),$a=U("session-trace"),fs={user:Q("trace-jump-user"),assistant:Q("trace-jump-assistant"),tool:Q("trace-jump-tool"),request:Q("jump-to-request")},ms=new Map,Ge=ge("prompt",HTMLTextAreaElement),pi=em(Ge,U("inline-commands")),Hn=He("prompt-mode"),Pn=He("model"),Na=He("thinking"),Gn=y("button","button button--quiet",c("应用模型","Apply model"));Gn.id="apply-model";Gn.type="button";Gn.hidden=!0;var En=y("p","small muted sr-only");En.id="model-preview";En.setAttribute("role","status");En.hidden=!0;Pn.setAttribute("aria-describedby",En.id);Na.setAttribute("aria-describedby",En.id);Pn.parentElement?.after(Gn);var bs=U("compose-options"),o0=bs.parentElement,dr=Q("compose-options-button"),um=y("div","row compose-selectors");um.append(...bs.children);var dm=y("div","stack stack--tight");dm.append(um,En);bs.append(dm);var vs=An("new-dialog"),Ke=An("manage-dialog"),xe=An("details-dialog"),Ht=An("command-dialog"),gi=An("branch-dialog"),tn=si,e0={explicit:c("显式指定","Selected"),session:c("会话内记录","Session"),global:c("设备记忆","Saved on this device"),"model-default":c("模型默认","Model default"),default:c("默认设置","Default"),fallback:c("回退档位","Fallback"),clamped:c("按模型能力调整","Adjusted for this model")},t0={ask:c("审批:询问","Ask first"),auto:c("审批:Auto","Auto"),"full-access":c("审批:无审批","No approval")},tm=[["ask",t0.ask],["auto",t0.auto],["full-access",t0["full-access"]]],B,v0=mf(ze,()=>xe.open&&B?.status==="ready"?B.session.id:void 0),bt={},Ei={},tt="connecting",jt="waiting",_t=!1,qr=!1,qa=!1,zr="",Ai="",Hr=new Map,hm=[],Ha="",nm=Number.NEGATIVE_INFINITY,n0=0,fm=30000,Y5=new Intl.DateTimeFormat(me,{dateStyle:"medium",timeStyle:"short"}),vt=[],l0=0,Ba=!1,Vt="",Fr="",Jt=(e)=>vt.includes(e),mm=(e)=>Jt(e)&&(!Vt||e===Vt),bi="omo-web-language-return-session",on=!1,yn,vi=0,X5=2000,Q5=2000,Or=0,mr,r0=0,Ci=0,c0=0,kn,yi=!1,wn=!1,rm="omo-web-navigation-collapsed",y0="omo-web-desktop-inspector",hr=!1,_i=!0,It=new Set,Jn=new Set,u0=new Map,Le=new Map,ys=matchMedia("(max-width: 760px)"),ws=matchMedia("(max-width: 1000px)"),sm=matchMedia("(prefers-color-scheme: dark)"),s0=new Intl.NumberFormat(me),eb=new Intl.NumberFormat(me,{maximumFractionDigits:2}),w0=(e)=>Q(ys.matches?"open-navigation":hr?"rail-toggle":e).focus(),tb=Sf(ze,bm),k0=(e)=>{if(gi.open)return;gi.dataset.sourceKind=e.kind,tb(e)},at=Wf(ze,Jt,()=>{if(at.active)B?.history?.invalidate();if(Vn(),$r(),_e(),B?.history)ks(B)}),Cs=Pf(ze,()=>w0("cli-live-button"),k0,Jt),nb=Kf(ze,()=>({roots:vt,selected:Fr||B?.session.cwd||Vt}),lb,()=>{if(ys.matches&&!wn)Q("open-navigation").focus();else if(Q("workspace-browser-button").hidden)Lt("search").focus();else Q("workspace-browser-button").focus()}),Oa=!1,pm=qf(ze,()=>{if(!Oa&&!document.querySelector("dialog:modal"))w0("cli-history-button");Oa=!1},k0,rb,(e,t)=>{if(_s(!0),!t){pr();return}if(Oa=!0,An("cli-history-dialog").close(),on=e.archived,Le.get(e.id)?.status==="pending"&&B?.session.id===e.id)Ka(B);Le.delete(e.id),Yn(e),Mi(e.id,!0)},Jt);function fi(e){switch(e){case"engine_offline":return c("本机引擎未连接。","The local engine is offline.");case"shared_transport":return c("切换到 CLI 需要私有本机连接。","Switching to the CLI requires a private local connection.");case"missing_capability":return c("此 OmO 版本不支持换端。","This version of OmO does not support handoff.");case"profile_mismatch":return c("本机引擎与 CLI 会话使用不同配置。","The local engine and the CLI session use different profiles.");case"session_busy":return c("等本轮结束后再换端。","Wait for this turn to finish before switching.");case"dialog_pending":return c("先处理会话中的待答事项。","Answer the pending request before switching.");default:return c("这个会话暂时无法换端。","This session cannot be switched right now.")}}function rb(){if(tt!=="online")return c("连接断开,只能浏览记录。","Offline. You can still browse the history.");return Ei.supported===!0?"":fi(Ei.reason)}function gm(e){if(!e.session.active||e.status!=="ready")return c("先恢复此会话。","Resume this session first.");if(tt!=="online")return c("连接断开,无法换端。","Reconnect before switching.");if(Ei.supported!==!0)return fi(Ei.reason);if(e.running||e.compacting)return fi("session_busy");if(e.requests.size)return fi("dialog_pending");if(e.queue)return c("等队列里的消息发送后再换端。","Wait for queued messages to finish before switching.");if(e.handoff.eligible!==!0)return fi(e.handoff.reason);if(It.has(e.session.id)||Jn.has(e.session.id))return c("正在提交,请稍候。","Submitting…");return""}function Ka(e){if(Ti(e),e.optionSync++,e.snapshotRequestChanges=void 0,e.status="inactive",e.running=!1,e.compacting=!1,e.workbench=void 0,e.generationSpeed=void 0,e===B)kn?.abort()}function Ti(e){if(Va(e),e.sync++,e.revision++,e.transcriptRefresh=e.stateRefresh=void 0,e.pendingStateUnknown=e.refreshScheduled=void 0,e.messages=[],e.liveKey="",e.liveMessageKeys.clear(),e.tools.clear(),e.transcript="unavailable",e===B)As.reset()}function Va(e){e.historyEpoch++,e.history?.invalidate(),e.history=void 0}function Ja(e){let t=Boolean(e.history);if(Va(e),t)e.messages=[],e.liveMessageKeys.clear(),e.transcript="unavailable",As.reset()}function bm(e,t,n){if(!vt.includes(e.cwd))return;if(n.kind==="live")Cs.closeAfterBranch();if(n.kind==="history")Oa=!0,An("cli-history-dialog").close();on=!1,Ue(e.id).text=t,Yn(e),_s(!0),Mi(e.id,!0)}function Ue(e){let t=u0.get(e);if(!t)t={text:"",mode:"prompt",images:[],reading:0,error:"",commandMode:!1,commandText:"",commandError:""},u0.set(e,t);return t}function vm(e){return hs(e).kind!=="plain"||Nr.test(e.split(/\s/,1)[0]??"")}function sb(){let e=He("theme");try{let n=localStorage.getItem("omo-web-theme");if(n==="dark"||n==="light")e.value=n}catch(n){if(!(n instanceof DOMException))throw n}let t=()=>{document.documentElement.dataset.theme=e.value==="system"?sm.matches?"dark":"light":e.value};e.addEventListener("change",()=>{t();try{localStorage.setItem("omo-web-theme",e.value)}catch(n){if(!(n instanceof DOMException))throw n}}),sm.addEventListener("change",t),t()}function ib(){let e=He("language-select"),t=U("language-feedback");e.value=me,e.addEventListener("change",()=>{let n=e.value;if(n!=="en"&&n!=="zh-CN"||n===me)return;let r=(i)=>{e.value=me,se(t,i)};if([...u0.values()].some((i)=>i.text||i.commandText||i.images.length||i.reading)){r(c("发送或清空草稿后,再切换语言。","Send or clear your drafts before changing the language."));return}if(yi||Jn.size||It.size||B?.requests.size){r(c("先完成当前操作,再切换语言。","Finish the current action before changing the language."));return}if(at.active){r(c("退出 CLI 跟随后,再切换语言。","Stop following the CLI before changing the language."));return}let s=B?.session.id;try{if(s)sessionStorage.setItem(bi,s);else sessionStorage.removeItem(bi)}catch{if(s){r(c("浏览器无法保留当前会话。关闭此会话页面后再切换语言。","The browser could not preserve this session. Change the language from the start screen."));return}}if(!M0(n)){try{sessionStorage.removeItem(bi)}catch{}r(c("浏览器无法保存语言设置。","The browser could not save your language setting."));return}location.reload()})}function ab(){let e;try{e=sessionStorage.getItem(bi),sessionStorage.removeItem(bi)}catch{return}let t=e?Hr.get(e):void 0;if(!t||!Jt(t.cwd))return;on=t.archived,Mi(t.id,!1,!1)}function im(e){try{return localStorage.getItem(e)}catch(t){if(!(t instanceof DOMException))throw t;return null}}function x0(e,t){try{localStorage.setItem(e,t)}catch(n){if(!(n instanceof DOMException))throw n}}function am(){U("workspace-shell").toggleAttribute("data-rail-collapsed",hr);let e=Q("rail-toggle");e.setAttribute("aria-expanded",String(!hr));let t=hr?c("展开会话导航","Expand sessions"):c("收起会话导航","Collapse sessions");e.setAttribute("aria-label",t),e.title=t}function nn(e,t=!1){if(wn=e&&ys.matches,U("navigation").classList.toggle("is-open",wn),U("nav-scrim").hidden=!wn,U("conversation").inert=wn,U("skip-link").inert=wn,Q("open-navigation").setAttribute("aria-expanded",String(wn)),wn)Lt("search").focus();else if(t&&ys.matches)Q("open-navigation").focus()}function Zn(){Cs.setTransport(jt);let e=tt==="online";tt=zr||bt.online===!1||jt==="lost"?"offline":qr&&jt==="open"&&!_t&&bt.online===!0?"online":"connecting",U("connection").dataset.state=tt,U("connection-label").textContent={online:c("本机已连接","Connected"),offline:c("连接不可用","Offline"),connecting:c("正在连接","Connecting")}[tt];let t=C(bt.version);se(U("engine-version"),t&&c(`引擎 ${t}`,`Engine ${t}`));let n=zr||(bt.online===!1?C(bt.error)||c("Senpi 引擎未连接。检查引擎后再重连。","The Senpi engine is offline. Check it and reconnect."):jt==="lost"?c("实时连接已断开。正在重连,草稿会保留。","Connection lost. Reconnecting; your drafts are kept."):Ai);U("banner").toggleAttribute("data-unprotected",qa),U("access-warning").hidden=!qa,Q("retry").hidden=!n,se(U("banner-text"),n);let r=tt==="online"&&Boolean(vt.length);if(Q("new-sidebar").disabled=!r,Q("new-welcome").disabled=!r,U("welcome-copy").textContent=qr&&!vt.length?Q("workspace-browser-button").hidden?c("没有可用目录。请检查 OmO Web 的启动配置。","No directories are available. Check your OmO Web startup settings."):c("还没有可用目录。打开侧栏的「目录」添加。","No directories yet. Open Directories in the sidebar to add one."):c("从列表打开会话,或选个目录开始新会话。","Open a session from the list, or choose a directory to start a new one."),Q("create").disabled=!r||yi,pm.update(),Vn(),_s(),$r(),_e(),B?.history)ks(B);if(!e&&tt==="online"&&B&&(B.stateRefresh||B.transcriptRefresh))ft(B)}async function _s(e=!1){if(!qr)return;if(!e&&performance.now()-nm<fm)return;let t=++n0;nm=performance.now();try{let n=await ze.request("/api/cli-history");if(t!==n0)return;Ha=n.available===!0?"":c("没有可读取的 CLI 历史。","No CLI history is available."),hm=n.available===!0?ve(n.sessions).map(j).flatMap((r)=>{let s=C(r.id);return s&&r.adopted!==!0?[{id:s,name:C(r.name)||c("未命名 CLI 会话","Untitled CLI session"),cwd:C(r.cwd),updatedAt:we(r.updatedAt)??0}]:[]}):[]}catch(n){if(t!==n0)return;Ha=c(`无法读取 CLI 历史:${Ee(n)}`,`Couldn't load CLI history: ${Ee(n)}`)}$r()}function $r(){let e=U("cli-sessions"),t=U("cli-session-list"),n=document.activeElement instanceof HTMLButtonElement&&t.contains(document.activeElement)?document.activeElement.dataset.cliSession:void 0,r=Lt("search").value.trim().toLocaleLowerCase(),s=on?[]:hm.filter((i)=>mm(i.cwd)&&(!r||`${i.name} ${i.cwd}`.toLocaleLowerCase().includes(r))).sort((i,a)=>a.updatedAt-i.updatedAt);e.hidden=s.length===0&&!Ha,t.replaceChildren();for(let i of s){let a=y("li"),o=We("",()=>Mm(i.id),"button--quiet session-link");o.dataset.cliSession=i.id;let l=Number.isFinite(new Date(i.updatedAt).getTime())?Y5.format(i.updatedAt):"",u=y("span","small muted path",Si(i.cwd));u.title=i.cwd,o.append(y("span","",i.name),u,y("small","",l)),a.append(o),t.append(a)}if(t.hidden=!s.length,se(U("cli-list-empty"),s.length?"":Ha||(qr?c("没有本机 CLI 会话。","No local CLI sessions."):"")),n)[...t.querySelectorAll("button")].find((i)=>i.dataset.cliSession===n)?.focus({preventScroll:!0})}function ym(e){if(Hr=new Map(e.map((t)=>[t.id,t])),B){let t=Hr.get(B.session.id);if(t&&t.cwd!==B.session.cwd)Ti(B);if(B.session=t??B.session,!vt.includes(B.session.cwd))A0();else if(!B.session.active&&B.status==="ready"&&Le.get(B.session.id)?.status!=="pending"){if(Ka(B),Ke.open)Ke.close()}}Vn(),_e()}function Yn(e){if(Ci++,Hr.set(e.id,e),B?.session.id===e.id)B.session=e;Vn()}async function pr(){let e=++r0,t=Ci;try{let n=await ze.request("/api/sessions");if(e!==r0||t!==Ci)return;Ai="",ym(eo(n))}catch(n){if(e===r0)Ai=c(`无法读取会话列表:${Ee(n)}`,`Couldn't load sessions: ${Ee(n)}`)}Zn()}function Si(e){let t=(r)=>Ba?r.replaceAll("\\","/"):r,n=t(e).split("/").filter(Boolean);if(Ba&&n.length===1)return e;for(let r=1;r<=n.length;r++){let s=n.slice(-r).join("/");if(!vt.some((i)=>i!==e&&t(i).endsWith(`/${s}`)))return Ba?s.replaceAll("/","\\"):s}return e}function E0(){let e=He("workspace-select"),t=c("所有目录","All directories");Pa(e,vt.map((n)=>[n,Si(n)]),Vt,t),e.title=Vt||t,U("workspace-field").hidden=vt.length<2}function A0(){if(B)Va(B);if(B=void 0,mr?.(),clearTimeout(c0),As.reset(),xi.reset(),Ge.value="",Ts(),Ke.open)Ke.close();if(yr(!1),jn(!1),Ht.open)fr?.abort(),Ht.close();if(gi.open&&gi.dataset.sourceKind==="web")gi.close()}function ob(e){if(e&&!Jt(e))return;Vt=e,E0(),Vn(),$r()}function lb(e,t){if(l0++,vt=t,Fr=Jt(e)?e:"",Vt&&!Jt(Vt))Vt="";if(B&&!Jt(B.session.cwd))A0();at.recheckWorkspace(),E0(),Cs.scopeChanged(),nn(!1),pr(),_s(!0),Zn()}async function Kn(e=!1){let t=++Or;mr?.();let n=Ci,r=l0;try{let s=await ze.request("/api/bootstrap");if(t!==Or)return;let i=C(s.token),a=i!==ze.token;if(a&&B)Ja(B);ze.token=i,bt=j(s.engine),qa=s.unprotected===!0,Ei=j(s.handoff);let o=j(s.fileBrowser);if(Ba=o.platform==="win32",r===l0||a)vt=Xl(s.workspaces);let l=!qr;if(Vt&&!Jt(Vt))Vt="";if(Fr&&!Jt(Fr))Fr="";if(nb.update(o,a),B&&!vt.includes(B.session.cwd))A0();if(at.recheckWorkspace(),E0(),Cs.scopeChanged(),qr=!0,zr="",Ai="",n===Ci)ym(eo(s));if(!yn)km();if(l)ab();let u=B&&Le.get(B.session.id);if(e&&_t==="transport"){if(tt==="offline"&&jt==="open"&&bt.online===!0)Zn();await cb(t)}else if(e&&B&&(!u||u.status==="failed")){if(!B.session.active&&B.status!=="loading"&&bt.online===!0)B.status="inactive",B.error="";else if(B.session.active&&bt.online===!0){let d=B;if(await Ur(d),d===B)gr(d)}}}catch(s){if(t===Or)zr=c(`无法连接本机 Web 服务:${Ee(s)}`,`Couldn't connect to OmO Web: ${Ee(s)}`)}if(t!==Or)return;if(_t!=="transport"||jt==="open"&&bt.online===!0&&!zr)_t=!1;Zn()}async function cb(e){let t=()=>e===Or&&_t==="transport"&&jt==="open"&&bt.online===!0;while(t()){let n=B;if(!n?.session.active)return;let r=Le.get(n.session.id);if(r&&r.status!=="failed")return;let s=Promise.withResolvers();mr=s.resolve;let i;try{let a=await Promise.race([n.pendingSnapshot??Ur(n,!1,!0),s.promise]);if(t()&&n===B&&Le.get(n.session.id)===r&&a===n.sync){gr(n);return}}catch(a){if(!(a instanceof De||a instanceof TypeError))throw a;if(t()&&n===B&&Le.get(n.session.id)===r)i=window.setTimeout(s.resolve,Q5),await s.promise}finally{if(clearTimeout(i),mr===s.resolve)mr=void 0}}}function Vn(){let e=Lt("search").value.trim().toLocaleLowerCase(),t=U("session-list"),n=document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)?document.activeElement.dataset.session:void 0,r=[...Hr.values()].filter((a)=>mm(a.cwd)&&a.archived===on&&(!e||`${a.name} ${a.cwd}`.toLocaleLowerCase().includes(e))).sort((a,o)=>o.updatedAt-a.updatedAt),s=new Map([...t.children].flatMap((a)=>a instanceof HTMLLIElement&&a.dataset.session?[[a.dataset.session,a]]:[])),i=t.firstElementChild;for(let a of r){let o=s.get(a.id);if(!o){o=y("li"),o.dataset.session=a.id;let u=We("",()=>Mi(a.id),"button--quiet session-link");u.dataset.session=a.id,u.append(y("span"),y("span","small muted path"),y("small")),o.append(u)}let l=o.firstElementChild;if(l instanceof HTMLButtonElement){l.firstElementChild&&(l.firstElementChild.textContent=a.name);let u=l.children.item(1);if(u instanceof HTMLElement)u.textContent=Si(a.cwd),u.title=a.cwd,u.hidden=!a.cwd;let d=l.lastElementChild;if(d)d.textContent=Le.get(a.id)?.status==="released"?c("已释放","Released"):a.running?c("运行中","Running"):a.settled?c("已结清","Done"):a.active?c("已打开","Open"):c("待恢复","Resume");if(!at.active&&a.id===B?.session.id)l.setAttribute("aria-current","true");else l.removeAttribute("aria-current")}if(o!==i)t.insertBefore(o,i);i=o.nextElementSibling,s.delete(a.id)}for(let a of s.values())a.remove();if(n&&!r.some((a)=>a.id===n))Lt("search").focus();se(U("list-empty"),r.length?"":e?c("没有匹配的会话","No matching sessions"):!qr?zr?c("暂时无法读取会话","Couldn't load sessions"):c("正在读取会话…","Loading sessions…"):on?c("没有已归档的会话","No archived sessions"):c("还没有最近会话","No recent sessions")),Q("recent").setAttribute("aria-pressed",String(!on)),Q("archived").setAttribute("aria-pressed",String(on))}function Mi(e,t=!1,n=!0){let r=Hr.get(e);if(!r||!vt.includes(r.cwd))return;if(at.stop(),n)nn(!1),U("conversation").focus();if(e===B?.session.id){if(!t)return;if(B.status==="ready"){Ge.focus();return}}if(B)Va(B);if(Ke.open)Ke.close();if(yr(!1),jn(!1),Ht.open)fr?.abort(),Ht.close();if(kn?.abort(),n)U("conversation").focus({preventScroll:!0});let s=Le.get(e),i=r.active&&s?.status!=="released"&&s?.status!=="uncertain",a={session:r,status:i?"loading":"inactive",error:"",state:{},messages:[],liveKey:"",liveMessageKeys:new Set,tools:new Map,requests:new Map,options:{},optionsError:"",handoff:{},queue:void 0,revision:0,serial:0,sync:0,optionSync:0,historyEpoch:0,running:r.running,compacting:!1};B=a,mr?.(),As.reset(),xi.reset();let o=Ue(e);if(Ge.value=o.commandMode?o.commandText:o.text,Hn.value=o.mode,Ts(),Vn(),_e(),i)Ur(a,!0).then(()=>{if(t&&a===B&&a.status==="ready"&&document.activeElement===U("conversation"))Ge.focus()}),gr(a);else if(n&&s?.status==="released"&&!document.querySelector("dialog:modal"))U("handoff-title").focus()}function qt(e){return C(e.id)?JSON.stringify([C(e.provider),C(e.id)]):""}function ub(e){let t=C(e.name)||C(e.id);return t?[C(e.provider),t].filter(Boolean).join(" · "):""}function Pa(e,t,n,r){let s=JSON.stringify(t);if(e.dataset.options!==s)e.replaceChildren(pt(r,""),...t.map(([i,a])=>pt(a,i))),e.dataset.options=s;if(e.value=n,e.selectedIndex<0)e.value=""}function db(e,t,n){let r=j(e.state.model),s=qt(r),i=ve(e.options.models).map(j).filter((x)=>Boolean(qt(x))),a=e.state.pendingModelSwitch!=null;if(!n||a||e.modelSelection===s)e.modelSelection=void 0;let o=i.find((x)=>qt(x)===e.modelSelection),l=o??i.find((x)=>qt(x)===s);if(s&&!i.some((x)=>qt(x)===s))i.unshift(r);Pa(Pn,i.map((x)=>[qt(x),ub(x)]),qt(o??r),c("模型","Model")),Pn.disabled=t||a||!ve(e.options.models).length,Gn.hidden=!o,Gn.disabled=t||a;let u=a?c("正在切换模型。","Changing model…"):"",d;if(n&&!a&&l){let x=JSON.stringify([s,qt(l),e.state.thinkingLevel]);if(e.modelPreview?.key!==x&&!It.has(e.session.id)){let S={key:x,result:void 0};e.modelPreview=S;let E=new URLSearchParams({provider:C(l.provider),modelId:C(l.id)});ze.request(`${Xe(e.session.id)}/model-preview?${E}`).catch(()=>({})).then((D)=>{if(B!==e||e.modelPreview!==S)return;S.result=D,_e()})}let k=e.modelPreview?.key===x?e.modelPreview.result:void 0,A=C(k?.source),T=C(k?.level);if(k?.status==="ok"&&Object.hasOwn(e0,A)&&Object.hasOwn(tn,T)){d=k;let S=ve(d.availableLevels).map(C).filter((M)=>Object.hasOwn(tn,M)),E=o?c("切换后","After switching"):c("当前","Current"),D=S.map((M)=>tn[M]).join(c("、",", "));u=c(`${E}:${tn[T]}(来源:${e0[A]}) · 可用:${D}`,`${E}: ${tn[T]} (${e0[A]}) · Available: ${D}`)}else u=k?c("无法预览此模型的思考档。","Thinking preview is unavailable for this model."):c("正在读取模型档位…","Loading thinking levels…")}else if(e.modelPreview=void 0,n&&!a&&s&&!e.optionsError&&ve(e.options.models).length)u=c("此模型不在可用列表里。","The current model is not available.");if(En.textContent!==u)En.textContent=u;En.classList.toggle("sr-only",!o),En.hidden=!u,Pn.title=!o&&u?u:c("模型","Model"),Na.title=!o&&u?u:c("思考档","Thinking level");let f=o?void 0:d,p=C(f?.level??e.state.thinkingLevel),g=ve(f?.availableLevels??e.options.levels).map(C).filter((x)=>Object.hasOwn(tn,x)),b=g.length>0;if(Object.hasOwn(tn,p)&&!g.includes(p))g.unshift(p);Pa(Na,g.map((x)=>[x,c(`思考:${tn[x]}`,`Thinking: ${tn[x]}`)]),p,c("思考档","Thinking")),Na.disabled=t||a||Boolean(o)||!b}function wm(e,t){if(!t||t===qt(j(e.state.model)))return;e.modelSelection=void 0,e.modelPreview=void 0,e.options={...e.options,levels:[]},gr(e)}function wi(e,t){let n=ms.get(e);if(n===t)return;if(n?.removeAttribute("id"),t){let r=e.getAttribute("aria-controls");if(r)t.id=r;ms.set(e,t)}else ms.delete(e);e.hidden=!t,$a.hidden=U("active-session").hidden||!ms.size}function hb(e){let t=Q("sidebar-question"),n=0;for(let i of e.values())if(i.method==="question"&&++n===100)break;if(!n){if(t===document.activeElement)xe.querySelector('[aria-selected="true"]')?.focus();t.hidden=!0;return}let r=n===100?"99+":String(n),s=c(`Agent 提问 · ${r}`,`Agent questions · ${r}`);if(t.textContent!==s)t.textContent=s,t.setAttribute("aria-label",c(`跳至首个 Agent 提问(${n===100?"超过 99":r} 个待答)`,`Jump to first Agent question (${n===100?"over 99":r} pending)`));t.hidden=!1}function _e(){let e=at.active;if(U("cli-follow-view").hidden=!e,U("transcript").hidden=e,Q("cli-follow-stop").hidden=!e,Q("cli-follow-button").setAttribute("aria-pressed",String(e)),U("banner").hidden=!qa&&(e||!U("banner-text").textContent),e){if(B)B.consideredDesktopDock=!1;pi.reset(),$a.hidden=!0,U("composer-shell").hidden=!0,Q("details-button").hidden=!0,Q("web-branch-button").hidden=!0,Q("manage-button").hidden=!0,om(at.target?.name??c("跟随 CLI","Follow CLI"),at.target?.cwd??"");return}let t=B,n=t?.session,r=n&&Le.get(n.id),s=r?.status==="pending",i=r?.status==="released"?r:void 0,a=Boolean(t&&t.status==="ready"),o=a?t?.transcript??t?.history?.status:void 0;if(o)ur.dataset.status=o,U("transcript").setAttribute("aria-describedby",ur.id);else delete ur.dataset.status,U("transcript").removeAttribute("aria-describedby");if(U("no-messages").style.display=o?"none":"",se(ur,o==="truncated"?c("部分聊天记录未包含在快照中。","Some chat history was omitted from this snapshot."):o==="unavailable"?c("暂时无法读取聊天记录。新消息仍会显示在这里。","Chat history is unavailable. New messages will still appear here."):""),U("welcome").hidden=Boolean(t),U("inactive-session").hidden=!t||a,U("active-session").hidden=!a,$a.hidden=!a||!ms.size,!a){pi.reset();for(let N of Object.values(fs))wi(N)}if(U("composer-shell").hidden=!a,Ge.disabled=!a||n?.active!==!0,om(n?.name??c("会话工作台","Workbench"),n?.cwd??""),Q("details-button").hidden=!a,!a)yr(!1);if(Q("web-branch-button").hidden=!n,Q("web-branch-button").disabled=s,Q("manage-button").hidden=!a,!t)return;let l=Ue(t.session.id);if(Ke.open){let N=s?c("正在释放会话…","Releasing session…"):gm(t);Q("manage-handoff").disabled=Boolean(N),se(U("manage-handoff-status"),N),se(U("manage-handoff-error"),r?.status==="failed"?r.error:"")}for(let N of[Ke,xe])if(N.open)N.querySelectorAll("[data-write]").forEach((J)=>{J.disabled=tt!=="online"||s||It.has(t.session.id)||J.hasAttribute("data-unavailable")||J.hasAttribute("data-idle")&&(t.running||t.compacting||Jn.has(t.session.id))});Nt?.syncWrites();let u=t.status!=="inactive";U("inactive-title").textContent=t.status==="loading"?c("正在读取会话…","Loading session…"):t.status==="failed"?c("无法读取会话","Couldn't load session"):c("继续此会话","Continue this session");let d=Boolean(i&&t.status!=="loading");U("inactive-title").hidden=d,U("inactive-copy").hidden=d,U("inactive-copy").textContent=s?c("等本机引擎确认释放。","Waiting for the local engine to release the session."):t.status==="loading"?"":t.status==="failed"?c("检查连接后重试。","Check the connection and try again."):t.session.archived?c("恢复已归档的会话,继续之前的对话。","Restore this archived session to continue the conversation."):c("恢复后可继续之前的对话。","Resume to pick up where you left off."),U("handoff-receipt").hidden=!d;let f=U("handoff-command").firstElementChild;if(f&&f.textContent!==(i?.command??""))f.textContent=i?.command??"";se(U("handoff-copy-status"),i?.copyStatus),se(U("handoff-draft-note"),!a&&(i||s||r?.status==="uncertain")&&(l.text||l.commandText||l.images.length||l.reading)?c("草稿仍在这页。","Your draft is still on this page."):""),se(U("session-error"),t.error||(r?.status==="uncertain"&&t.status!=="loading"?r.error:""));let p=Q("resume");if(p.hidden=a||t.status==="loading",p.disabled=tt!=="online"||s||It.has(t.session.id),p.classList.toggle("button--primary",!i),p.textContent=!i&&r?.status!=="uncertain"&&u&&t.session.active?c("重试读取","Retry"):c("恢复会话","Resume session"),!a){t.modelSelection=void 0,t.modelPreview=void 0;return}let g=tt==="online",b=s||It.has(t.session.id),x=Jn.has(t.session.id),k=t.session.archived,A=g&&t.session.active&&!k&&!t.compacting,T=Hn.value,S=l.commandMode,E=S||vm(l.text),D=t.running&&(T==="prompt"||k||E);Q("stop").hidden=!t.running,Q("stop").disabled=!g||b,Q("stop").classList.toggle("button--primary",D),Q("stop").classList.toggle("button--danger",!D);let M=Q("send");M.hidden=E||t.running&&(T==="prompt"||k),M.disabled=!A||b||x||l.reading>0||!l.text.trim()&&!l.images.length;let L=T==="follow_up"?c("排队","Queue"):T==="steer"?c("发送引导","Steer"):c("发送","Send");U("send-label").textContent=M.title=L;let z=Q("send-command");z.hidden=!E;let O=S?l.commandText:l.text,P=Qf(O);z.disabled=!g||!t.session.active||b||k&&!P||!P&&(t.running||t.compacting||Boolean(t.queue)||x)||!O.trim(),Q("command-mode").setAttribute("aria-pressed",String(S)),Q("command-picker").hidden=!S,Q("command-picker").disabled=!g||k,U("prompt-label").textContent=S?c("命令及参数","Command and arguments"):c("消息","Message"),Ge.placeholder=S?c("输入 /命令 或 $技能,可加参数…","Enter a /command or $skill…"):c("输入消息…","Write a message…"),Q("attach").disabled=S||k||l.images.length+l.reading>=4||b,Q("attach").hidden=S,(Hn.closest("label")??Hn).hidden=S,Hn.disabled=k||b,db(t,!A||t.running||b||x,g&&u&&!s);let V=C(t.state.effectivePermissionPreset)||C(t.state.permissionPreset)||"ask";Pa(He("approval"),[...tm],tm.some(([N])=>N===V)?V:"ask",c("审批","Approval")),He("approval").dataset.preset=He("approval").value,He("approval").disabled=!A||b||x,He("approval").title=V==="full-access"?c("无审批:工具默认放行。原生权限规则仍有效,用户问题仍需回答。","Off: Tools are allowed by default. Native permission rules and user questions still apply."):V==="auto"?c("Auto:原生确认安全的项目内操作自动放行,其余询问。","Auto: OmO allows safe project operations and asks about the rest."):c("询问:未被原生权限规则处理的工具操作需要批准。恢复会话会回到此模式。","Ask: Approve tool calls not covered by native rules. Resuming a session returns to Ask.");let G=ds(t.state.contextUsage),ce=c("上下文","Context");se(U("context-usage"),G.status!=="ok"?"":G.percent!==void 0?`${ce} ${s0.format(G.percent)}%`:G.tokens!==void 0&&G.window?`${ce} ${s0.format(G.tokens)} / ${s0.format(G.window)}`:"");let re=Ta(t.state.usageTotals),de=re.status==="ok"&&re.latest!==void 0?eb.format(re.latest*100):"";se(U("cache-usage"),g&&de?c(`最新缓存 ${de}%`,`Latest cache ${de}%`):"");let F=s?c("正在换端,草稿不会发送。","Switching clients. Your draft won't be sent."):!g?c("离线时可以编辑,重连后再发送。","You can edit offline and send when reconnected."):k?c("先在会话管理里取消归档。","Unarchive this session in Manage session."):l.commandStatus||(E?!P&&(t.running||t.compacting||t.queue)?c("等本轮和队列结束后再执行命令。","Wait for this turn and queue to finish before running a command."):c("Ctrl / ⌘ + Enter 执行命令;开头加空格就按文字发送。","Ctrl / ⌘ + Enter runs the command. Add a leading space to send it as text."):t.compacting?c("等压缩完成后再发送。","Send after compaction finishes."):l.reading?c("正在读取图片…","Loading images…"):t.running&&T==="prompt"?c("停止本轮,或选引导或排队。","Stop this turn, or choose Steer or Queue."):!t.running&&T!=="prompt"?c("当前空闲,这条消息会在下一轮处理。","No turn is running. This message will be handled in the next turn."):c("Ctrl / ⌘ + Enter 发送","Ctrl / ⌘ + Enter to send"));U("composer-hint").textContent=F,U("composer-hint").classList.toggle("sr-only",!l.commandStatus&&g&&!s&&!k&&!l.reading&&!t.compacting&&!E&&(T==="prompt"||t.running));let K=[t.requests.size?c(`待答 ${t.requests.size}`,`Pending ${t.requests.size}`):"",t.running?c("生成中","Generating"):"",t.compacting?c("压缩中","Compacting"):"",t.queue?c(`排队 ${t.queue}`,`Queued ${t.queue}`):""].filter(Boolean).join(" · ");if(U("activity-row").hidden=!K,U("activity-row").dataset.pending=String(t.requests.size>0),U("activity").textContent!==K)U("activity").textContent=K;let Y=Q("current-todo"),ee=t.workbench,ie=ee?.status==="ok"?C(ee.currentTodo):"",H=ee?.status==="ok"?we(ee.pendingTodo):void 0,q=c("待办","Todo"),W=ie?`${q} · ${ie}`:H?`${q} ${H}`:"";Y.hidden=!g||!W;let le=U("current-todo-label");if(le.textContent!==W)le.textContent=W;Y.title=ie&&H?c(`${W};另有 ${H} 项待处理`,`${W} · ${H} more pending`):W,se(U("compose-error"),(S?l.commandError:l.error)||t.optionsError||(!Ke.open&&r?.status==="failed"?r.error:"")),xi.render(t.requests,g&&!s,(N,J)=>bb(t,N,J)),hb(t.requests),wi(fs.request,xi.first),pi.render(t.options.commands,g&&!k&&!s),Rm(t)}function om(e,t){let n=U("session-title");if(n.textContent!==e)n.textContent=e;n.title=e;let r=U("session-path");if(se(r,t),r.title=t,se(U("session-path-short"),t?Si(t):""),Q("session-path-trigger").hidden=!t,at.active&&t)r.dataset.workspaceLabel=Si(t);else delete r.dataset.workspaceLabel}function fb(e){let t=new Map;for(let n of[...ve(e.pendingDialogs),...ve(e.pendingQuestions)]){let r=j(n);if(Bi(r))t.set(Rs(r),r)}return t}function ks(e,t=!1){if(e!==B||e.status!=="ready")return;za(e,t)}function za(e,t=!1,n){let r=e.history,s=r?.entries.length?[...r.entries,...e.messages]:e.messages;As.render(s,e.liveKey,e.tools,t,r?.render(),n,e.session.id)}function mb(e,t){let n=e.history;if(t&&n?.id===t.id&&!n.reloading)return;if(n?.invalidate(),e.history=void 0,!t)return;let{id:r,cwd:s}=e.session,i=()=>e===B&&e.history===o&&e.session.id===r&&e.session.cwd===s&&Jt(s)&&e.session.active&&!at.active&&(!Le.has(r)||Le.get(r)?.status==="failed"),a=()=>i()&&e.status==="ready"&&tt==="online"&&!at.active,o=new $l(t,ze,r,i,a,()=>e.messages,(l)=>{if(!i())return;_e(),za(e,!1,l)},()=>{if(!a()||o.reloading)return;o.reloading=!0,o.clearExpansion(),_e(),za(e),Ur(e).finally(()=>{if(o.reloading=!1,i())za(e)})});e.history=o}async function Ur(e,t=!1,n=!1){let r=Le.get(e.session.id),s=r?.status==="released"||r?.status==="uncertain";if(s&&(e.status!=="loading"||!It.has(e.session.id)))return;let i=++e.sync,{historyEpoch:a,session:o,transcriptRefresh:l,stateRefresh:u}=e,d=e.status==="ready"&&e.running&&Boolean(l||u),f=Promise.withResolvers();e.pendingSnapshot=f.promise;let p=e.revision,g=new Set(e.messages),{state:b,generationSpeed:x}=e,k=[];e.snapshotRequestChanges=k;let A=e.liveKey,T=new Set([...e.tools].filter(([,S])=>S.stage==="running").map(([S])=>S));try{let S=await ze.request(Xe(e.session.id));if(B!==e||i!==e.sync||Le.get(e.session.id)!==r)return;let E=ln(S.session),D=zl(S.page);if(D&&!E||E&&(E.id!==o.id||E.cwd!==o.cwd))throw new De(c("会话读取响应已失效。","The session read no longer matches this conversation."),409,"stale_session_read");if(e.historyEpoch!==a&&D)return;if(s&&!E?.active)throw Error(c("本机服务未确认已恢复此会话。","The local engine did not confirm the session resumed."));let M=E??e.session;if(s)Le.delete(M.id);Yn(M);let L=j(S.state),z=e.pendingStateUnknown?{...e.state,...L}:L;if(bt.online!==!1)if(S.generationSpeed===void 0&&e.generationSpeed===x)e.generationSpeed=void 0;else C0(e,S.generationSpeed);let O=qt(j(e.state.model));e.handoff=j(S.handoff);let P=n||!d&&(!e.transcriptRefresh||e.transcriptRefresh===l&&!e.running),V=Fl(S.transcript);if(P){if(e.transcript=V,mb(e,V==="unavailable"?void 0:D),e.transcriptRefresh===l)e.transcriptRefresh=void 0}let G=V==="unavailable"?[]:ve(S.messages).map(j),ce=p!==e.revision,re=new Map(e.messages.map((ee)=>[ee.key,ee.message])),de=new Set,F=G.filter((ee)=>Boolean(Qt(ee))).map((ee,ie)=>{let H=Dr(ee)||`snapshot:${ie}`,q=de.has(H)?`${H}:${ie}`:H;de.add(q);let W=re.get(q);return{key:q,message:W&&JSON.stringify(W)===JSON.stringify(ee)?W:ee}});if(P&&V==="unavailable")e.messages=e.messages.filter((ee)=>e.liveMessageKeys.has(ee.key));if(ce){if(P&&V!=="unavailable"){let ie=V==="truncated"||Boolean(l),H=e.messages.filter((W)=>e.liveMessageKeys.has(W.key)&&(!ie||!g.has(W)||e.running&&W.key===e.liveKey)),q=new Map(H.map((W)=>[W.key,W]));e.messages=[...F.map((W)=>q.get(W.key)??W),...H.filter((W)=>!de.has(W.key))]}if(e.state={...z,...Object.fromEntries(Object.entries(e.state).filter(([ie,H])=>H!==b[ie]))},!(M.running||z.isStreaming===!0)&&!e.running){if(e.liveKey="",P&&V!=="unavailable"&&A&&!de.has(A))e.messages=e.messages.filter((ie)=>ie.key!==A);for(let ie of T)if(e.tools.get(ie)?.stage==="running")e.tools.delete(ie)}}else{if(P&&V!=="unavailable")e.messages=F;if(e.state=z,!e.pendingStateUnknown||typeof L.isStreaming==="boolean"||M.running)e.running=M.running||z.isStreaming===!0;if(!e.pendingStateUnknown||typeof L.isCompacting==="boolean")e.compacting=z.isCompacting===!0;if(!e.pendingStateUnknown||we(L.pendingMessageCount)!==void 0)e.queue=we(z.pendingMessageCount);if(!e.running){e.liveKey="";for(let[ee,ie]of e.tools)if(ie.stage==="running")e.tools.delete(ee)}else if(P&&V!=="unavailable"&&e.liveKey&&!de.has(e.liveKey)){let ee=re.get(e.liveKey);if(ee)e.messages.push({key:e.liveKey,message:ee})}}e.liveMessageKeys=new Set(e.messages.flatMap((ee)=>e.liveMessageKeys.has(ee.key)?[ee.key]:[]));let K=fb(L);if(e.pendingStateUnknown){let ee=Array.isArray(L.pendingDialogs),ie=Array.isArray(L.pendingQuestions);for(let[H,q]of e.requests)if(!(q.method==="question"?ie:ee)&&!K.has(H))K.set(H,q);if(ee&&ie&&e.stateRefresh===u)e.pendingStateUnknown=void 0}if(e.stateRefresh===u)e.stateRefresh=void 0;if(!P&&!e.running&&e.transcriptRefresh)ft(e);for(let ee of k)xm(K,ee);e.requests=K,wm(e,O);let Y=e.status!=="ready";if(e.status="ready",e.error="",_e(),ks(e,t),mi(e),Y||!e.workbench)Ua(e);return i}catch(S){if(B!==e||i!==e.sync||Le.get(e.session.id)!==r)return;if(Le.get(e.session.id)?.status==="pending")return;if(n)throw S;if(e.status!=="ready"||!e.session.active)e.status="failed",e.error=Ee(S);else Ue(e.session.id).error=c(`无法刷新会话:${Ee(S)}`,`Couldn't refresh the session: ${Ee(S)}`);_e()}finally{if(e.pendingSnapshot===f.promise)e.pendingSnapshot=void 0;if(f.resolve(),e.snapshotRequestChanges===k)e.snapshotRequestChanges=void 0;if(e===B&&!e.pendingSnapshot&&e.refreshScheduled)e.refreshScheduled=void 0,ft(e)}}async function Ua(e){if(e!==B||e.status!=="ready"||!e.session.active||e.session.archived||tt!=="online"||at.active||Le.get(e.session.id)?.status==="pending")return;kn?.abort();let t=kn=new AbortController,n=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);try{let r=await ze.request(`${Xe(e.session.id)}/workbench-status`,void 0,n);if(t.signal.aborted||kn!==t||e!==B||e.status!=="ready")return;e.workbench=r}catch(r){if(!(r instanceof Error))throw r;if(t.signal.aborted||kn!==t||e!==B)return;e.workbench={status:"unavailable"}}finally{if(kn===t)kn=void 0}_e()}async function gr(e){let t=++e.optionSync;try{let n=await ze.request(`${Xe(e.session.id)}/options`);if(B!==e||t!==e.optionSync)return;e.options=n,e.optionsError=""}catch(n){if(B!==e||t!==e.optionSync)return;e.optionsError=c(`无法读取模型和运行选项:${Ee(n)}`,`Couldn't load models and settings: ${Ee(n)}`)}_e()}function km(){if(yn)return;let e=new EventSource("/api/events");yn=e,e.addEventListener("open",()=>{if(e!==yn)return;let t=jt==="lost";if(t)_t="transport";if(jt="open",Zn(),t)if(bt.online===!1)pr();else Kn(!0)}),e.addEventListener("error",()=>{if(e!==yn)return;if(jt!=="lost"&&B)Ja(B),B.liveMessageKeys.clear(),B.liveKey="",B.tools.clear();if(jt="lost",_t==="transport")Or++,mr?.();if(Zn(),e.readyState!==EventSource.CLOSED||vi)return;vi=window.setTimeout(()=>{if(vi=0,e!==yn)return;yn=void 0,km()},X5)}),e.addEventListener("omo",(t)=>{if(!(t instanceof MessageEvent)||typeof t.data!=="string"||e!==yn)return;try{let n=JSON.parse(t.data);gb(j(n))}catch(n){if(!(n instanceof SyntaxError))throw n;if(B?.session.active)ft(B)}})}function pb(e,t,n){let r=j(t.message),s=Qt(r);if(!s)return;if(s==="toolResult"&&r.toolName==="send_file"&&n!=="message_end")return;let i=e.messages[e.messages.length-1],a=Dr(r),o=s==="assistant"&&e.liveKey,l=n!=="message_start"&&o||a||"";if(!l&&n!=="message_start"&&i&&s===Qt(i.message))l=i.key;if(!l)l=`live:${++e.serial}`;let u=e.messages.findIndex((d)=>d.key===l);if(u<0)e.messages.push({key:l,message:r});else e.messages[u]={key:l,message:r};if(e.liveMessageKeys.add(l),s==="assistant"){if(e.liveKey=n==="message_end"?"":l,n!=="message_end")e.running=!0}}function ft(e){clearTimeout(c0),c0=window.setTimeout(()=>{if(B!==e||!e.session.active||jt!=="open"||_t==="transport"||Le.get(e.session.id)?.status==="pending")return;if(e.transcriptRefresh&&e.running&&!e.stateRefresh)return;if(e.pendingSnapshot){e.refreshScheduled=!0;return}Ur(e)},120)}function xm(e,t){if(t.type==="upsert"){e.set(Rs(t.request),t.request);return}for(let[n,r]of e){if(!t.ids.includes(n)&&!t.ids.includes(C(r.requestId)))continue;if(t.type==="resolve")e.delete(n);else if(r.method==="question")e.set(n,{...r,...t.timing})}}function Wa(e,t){xm(e.requests,t),e.snapshotRequestChanges?.push(t)}function i0(e,t){let n=j(t);if(Bi(n))Wa(e,{type:"upsert",request:n})}function C0(e,t){let n=ff(t);if(!n||e.generationSpeed&&e.generationSpeed.measuredAt>=n.measuredAt)return!1;return e.generationSpeed=n,!0}function mi(e){if(xe.open&&e.detailData)Cf(e.detailData,e.state,e.generationSpeed)}function gb(e){let t=C(e.type);if(t==="cli-live"){Cs.invalidate(C(e.id));return}if(t==="ready"||t==="engine"){if(t==="engine"){let r=j(e.engine);if(typeof r.online!=="boolean")return;if(_t!=="transport")_t=r.online&&bt.online===!1?"engine":!1;if(bt=r,!r.online&&_t==="transport")Or++,mr?.();if(!r.online&&B)Ja(B),B.liveMessageKeys.clear(),B.liveKey="",B.tools.clear(),B.generationSpeed=void 0,mi(B);if(Zn(),r.online)Kn(!0);else pr()}else if(_t==="transport"){if(bt.online===!1&&j(e.engine).online===!0)Kn(!0)}else if(_t)return;else if(B&&bt.online!==!1)Kn(!0);else pr();return}if(t==="sessions"){pr();return}let n=B;if(!n||e.sessionId!==n.session.id)return;if(n.status!=="ready"&&n.status!=="loading")return;if(t==="generation_speed"){if(C0(n,e.generationSpeed))mi(n);return}switch(n.revision++,t){case"transcript_refresh_required":if(n.transcriptRefresh={},!n.running)ft(n);return;case"state_refresh_required":n.stateRefresh={},n.pendingStateUnknown=!0,ft(n);return;case"agent_start":n.running=!0;break;case"turn_start":{let r=C(e.turnId);if(r)n.state={...n.state,currentTurnId:r};break}case"agent_end":if(e.willRetry===!0)break;n.liveKey="",ft(n);break;case"agent_settled":if(n.running=!1,n.liveKey="",n.state={...n.state,currentTurnId:void 0},ft(n),Ua(n),n.status==="ready"&&xe.open)Nt?.invalidate(),Fa(n);break;case"agent_idle":if(n.transcriptRefresh)n.running=!1,n.liveKey="";ft(n);break;case"message_start":case"message_update":case"message_end":pb(n,e,t);break;case"tool_execution_start":case"tool_execution_update":case"tool_execution_end":{let r=C(e.toolCallId);if(!r)break;let s=n.tools.get(r),i=j(e.result??e.partialResult);if(n.tools.set(r,{id:r,name:C(e.toolName)||s?.name||"",args:e.args??s?.args,output:i.content??s?.output,stage:e.isError===!0?"error":t==="tool_execution_end"?"done":"running"}),t==="tool_execution_end"&&e.isError!==!0&&/^(?:todo|todowrite)$/u.test(C(e.toolName)||s?.name||""))Ua(n);break}case"extension_ui_request":i0(n,e);break;case"ui_request_pending":i0(n,e.request);break;case"question_updated":{if(Bi(e))i0(n,e);else{let r=[C(e.id),C(e.requestId)].filter(Boolean),s=we(e.deadlineAtMs),i=we(e.remainingMs);if(!r.length||s===void 0&&i===void 0)return;Wa(n,{type:"timing",ids:r,timing:{...s===void 0?{}:{deadlineAtMs:s},...i===void 0?{}:{remainingMs:i}}})}break}case"question_resolved":case"ui_request_resolved":case"extension_ui_resolved":case"extension_ui_request_resolved":{let r=[e.id,e.requestId,e.uiRequestId].map(C).filter(Boolean);if(r.length)Wa(n,{type:"resolve",ids:r});ft(n);break}case"compaction_start":n.compacting=!0;break;case"compaction_end":if(n.compacting=!1,e.aborted!==!0&&C(e.errorMessage))Ue(n.session.id).error=C(e.errorMessage);if(e.aborted!==!0&&e.success!==!1&&!e.errorMessage&&!e.error)Ti(n);if(e.aborted!==!0&&!C(e.errorMessage)&&xe.open)Nt?.invalidate(),Fa(n);ft(n);break;case"queue_update":if(n.queue=ve(e.steering).length+ve(e.followUp).length,xe.open&&Pr())b0(n);else xs=!0;vr?.activate(!0);break;case"pending_input_update":if(ft(n),xe.open&&Pr())b0(n);else xs=!0;vr?.activate(!0);break;case"model_changed":case"service_tier_changed":{let r=qt(j(n.state.model));if(e.model)n.state={...n.state,model:e.model};if(typeof e.thinkingLevel==="string")n.state={...n.state,thinkingLevel:e.thinkingLevel};if(typeof e.fastMode==="boolean")n.state={...n.state,fastMode:e.fastMode};if(mi(n),!r||r===qt(j(n.state.model)))n.modelPreview=void 0,gr(n);else wm(n,r);ft(n);break}case"commands_changed":case"loaded_surfaces_changed":gr(n);break;case"auto_retry_start":n.running=!0;break;case"auto_retry_end":ft(n);break;case"session_replaced":if(Ti(n),n.status="loading",n.running=!1,n.compacting=!1,n.state={},n.requests.clear(),n.queue=void 0,kn?.abort(),n.workbench=void 0,n.generationSpeed=void 0,v0(),mi(n),xe.open)Nt?.invalidate(),Fa(n);ft(n);break;case"transcript_write_failed":case"extension_error":case"retry_fallback_exhausted":Ue(n.session.id).error=C(e.errorMessage)||C(e.error)||C(e.lastError)||c("本机引擎报告会话错误","The local engine reported a session error.");break;case"session_closed":case"session_parked":case"session_released":if(Le.get(n.session.id)?.status!=="pending")Ka(n);Yn({...n.session,active:!1,running:!1});break;default:return}_e(),ks(n)}async function Za(e,t){if(tt!=="online")throw Error(c("连接断开。重连后重试。","Offline. Reconnect and try again."));if(t.action!=="resume"&&(e!==B||e.status!=="ready"||!e.session.active||Le.get(e.session.id)?.status==="pending"))throw Error(c("恢复会话后再试。","Resume the session and try again."));try{let n=await ze.action(e.session.id,t),r=ln(n.session);if(r)Yn(r);return n}catch(n){if(n instanceof De&&(n.status===401||n.status===403))Kn(!0);throw n}}async function bb(e,t,n){let r=[t,C(e.requests.get(t)?.requestId)].filter(Boolean);if(await Za(e,{action:"answer",requestId:t,...n}),Wa(e,{type:"resolve",ids:r}),e===B)_e();ft(e)}function Ts(){let e=B,t=U("attachments"),n=e&&Ue(e.session.id);if(t.hidden=!n?.images.length||n.commandMode,t.replaceChildren(),!n)return;for(let r of n.images){let s=y("div","attachment"),i=y("img");i.alt=r.name,i.src=r.url;let a=We(c("移除","Remove"),()=>{n.images=n.images.filter((o)=>o!==r),Ts(),_e(),(t.querySelector("button")??Q("attach")).focus()},"button--quiet");a.setAttribute("aria-label",c(`移除图片:${r.name}`,`Remove image: ${r.name}`)),s.append(i,a),t.append(s)}}async function lm(e){let t=B;if(!t||t.status!=="ready"||t.session.archived||Ue(t.session.id).commandMode)return;let n=Ue(t.session.id),r=[],s=[];for(let a of e){let o=a.type;if(!Li(o)){r.push(c(`不支持图片格式:${a.name}`,`Unsupported image format: ${a.name}`));continue}if(!a.size||a.size>2100000){r.push(c(`图片为空或超过 2.1 MB:${a.name}`,`Image is empty or larger than 2.1 MB: ${a.name}`));continue}if(n.images.length+n.reading>=4){r.push(c("最多可添加 4 张图片。","You can attach up to 4 images."));break}n.reading++,s.push(new Promise((l,u)=>{let d=new FileReader;d.addEventListener("error",()=>u(Error(c(`无法读取图片:${a.name}`,`Couldn't read image: ${a.name}`))),{once:!0}),d.addEventListener("load",()=>{let f=typeof d.result==="string"?d.result:"",p=f.slice(f.indexOf(",")+1);if(!p||!f.startsWith(`data:${o};base64,`)){u(Error(c(`图片编码无效:${a.name}`,`Invalid image data: ${a.name}`)));return}l({type:"image",mimeType:o,data:p,name:a.name||c("粘贴的图片","Pasted image"),url:f})},{once:!0}),d.readAsDataURL(a)}))}if(t===B)_e();let i=await Promise.allSettled(s);n.reading-=s.length;for(let a of i)if(a.status==="fulfilled")n.images=[...n.images,a.value];else r.push(Ee(a.reason));if(n.error=[...new Set(r)].join(" "),t===B)Ts(),_e()}async function vb(){let e=B;if(!e||Q("send").disabled||Q("send").hidden)return;let t=e.session.id,n=Ue(t),{text:r,mode:s,images:i}=n,a=s==="prompt"?"":C(e.state.currentTurnId),o=n.admission,l=o&&o.text===r&&o.mode===s&&o.turn===a&&o.imageList===i?o.id:crypto.randomUUID();n.admission={id:l,text:r,mode:s,turn:a,imageList:i},n.error="",Jn.add(t),_e();try{if(await Za(e,{action:"prompt",message:r,mode:s,clientMessageId:l,...a?{expectedTurnId:a}:{},...i.length?{images:i.map(({type:u,mimeType:d,data:f})=>({type:u,mimeType:d,data:f}))}:{}}),n.admission=void 0,n.text===r){if(n.text="",e===B&&!n.commandMode)Ge.value=""}if(n.images=n.images.filter((u)=>!i.includes(u)),e===B)Ts();ft(e)}catch(u){if(n.error=c(`未能发送:${Ee(u)}`,`Couldn't send: ${Ee(u)}`),u instanceof De&&u.status>=400&&u.status<500)n.admission=void 0;ft(e)}finally{if(Jn.delete(t),e===B)_e()}}async function yb(e){if(Q("send-command").disabled||Q("send-command").hidden)return;let t=e.session.id,n=Ue(t),r=n.commandMode?"commandText":"text",s=n.commandMode?"commandError":"error",i=n[r],a=(p)=>{n[s]=p},o=()=>{if(n[r]!==i)return;if(n[r]="",B?.session.id===t&&n.commandMode===(r==="commandText"))Ge.value=""};n.commandStatus=void 0;let l=hs(i);if(l.kind==="malformed"||l.kind==="tui-only"){a(l.kind==="malformed"?l.message:c(`“/${l.name}”请在本机 OmO 终端重新发起。Web 没有转交输入,也没有发送给模型。`,`Run /${l.name} in the local OmO terminal. The Web app did not forward your input or send it to the model.`)),_e();return}if(l.kind==="builtin"){a("");try{if(await wb(e,l.command,a))o()}catch(p){a(c(`命令失败:${Ee(p)}`,`Command failed: ${Ee(p)}`))}if(B?.session.id===t)_e();return}let[,u,d]=/^(\S+)(?:[ \t]+([^\r\n]*))?$/.exec(i)??[];if(!u||!Nr.test(u)||/[\r\n]/.test(i)){a(c("请输入单行 /命令 或 $技能,可附加参数。","Enter a /command or $skill on one line. Arguments are optional.")),_e();return}let f=n.commandAdmission?.text===i?n.commandAdmission.id:crypto.randomUUID();n.commandAdmission={text:i,id:f},a(""),Jn.add(t),_e();try{await Za(e,{action:"command",invocation:u,...d?{arguments:d}:{},clientMessageId:f}),n.commandAdmission=void 0,o()}catch(p){if(p instanceof De&&p.status>=400&&p.status<500)n.commandAdmission=void 0;let g=p instanceof De?p.code:"",b=g==="unknown_command"?c("未知命令","Unknown command"):g==="session_busy"||g==="bridge_busy"?c("会话忙","Session is busy"):g==="invalid_arguments"||g==="invalid_request"?c("命令输入无效","Invalid command input"):c("原生命令失败","Native command failed");a(c(`${b}:${Ee(p)}`,`${b}: ${Ee(p)}`))}finally{if(Jn.delete(t),B?.session.id===t)_e(),ft(B)}}async function wb(e,t,n){let r=e.session.id,s=(i,a)=>rn(e,i,a,n);switch(t.name){case"new":return d0(),vs.open;case"resume":case"sessions":return Q("cli-history-button").click(),An("cli-history-dialog").open;case"name":case"rename":if(t.value!==void 0)return s({action:"rename",name:t.value},c("重命名","Rename"));return Q("manage-button").click(),Ke.querySelector('[data-key="name"]')?.focus(),Ke.open;case"session":return Br(),xe.open;case"settings":case"setting":return Q("manage-button").click(),Ke.querySelector('[data-key="run-settings"]')?.focus(),Ke.open;case"tree":return Br("overview",Ge,"tree"),xe.open;case"todo":return Br("todo",Ge,"todo"),xe.open;case"tasks":return Br("subagents",Ge),xe.open;case"dag":return Br("dag",Ge),xe.open;case"help":case"hotkeys":return await _m(e,!0),Ht.open;case"reasoning":case"efforts":{let i=j(e.state.model),a=C(e.state.thinkingLevel);if(!qt(i))return n(c("没有已确认的模型。","No model is selected yet.")),!1;if(!a||!Object.hasOwn(tn,a))return n(c("当前思考档未知。","The current thinking level is unknown.")),!1;if(t.name==="reasoning")return Ue(r).commandStatus=a==="off"?c("当前模型推理:关闭。","Model reasoning: off."):c(`当前模型推理:开启(${a})。`,`Model reasoning: on (${a}).`),!0;let o=ve(e.options.levels).map(C).filter((u)=>Object.hasOwn(tn,u)),l=o.filter((u)=>u!=="off");if(!o.length)return n(c("暂时无法读取可用思考档。","Thinking levels are unavailable.")),!1;if(i.reasoning===!1||!l.length)return n(c("当前模型不支持推理。","This model does not support reasoning.")),!1;if(o.includes("off")&&l.length===1)return n(c("此模型只能开启或关闭推理。","This model can only turn reasoning on or off.")),!1;return Ue(r).commandStatus=c(`当前档位:${a}。可用推理档:${l.join("、")}。`,`Thinking: ${a}. Available levels: ${l.join(", ")}.`),!0}case"fork":return Q("web-branch-button").click(),An("branch-dialog").open;case"compact":{let i=await s({action:"compact",...t.instructions?{instructions:t.instructions}:{}},c("压缩上下文","Compact context"));if(i)Ue(r).commandStatus=c("上下文已压缩。","Context compaction completed.");return i}case"model":{if(!t.reference){if(g0()&&!He("model").disabled)jn(!0);if(He("model").focus(),document.activeElement===He("model")){try{He("model").showPicker?.()}catch(a){if(!(a instanceof DOMException))throw a}return!0}return n(c("没有可选模型。","No models available.")),!1}let i=ve(e.options.models).map(j).filter((a)=>[C(a.id),`${C(a.provider)}/${C(a.id)}`].includes(t.reference??""));if(i.length===1)return s({action:"model",provider:C(i[0].provider),modelId:C(i[0].id)},c("切换模型","Change model"));return n(i.length?c("多个模型同名,请用 provider/model。","Multiple models have that name. Use provider/model."):c("找不到此模型。用 /model 查看列表。","Model not found. Use /model to list available models.")),!1}case"thinking":{if(!t.level){if(g0()&&!He("thinking").disabled)jn(!0);if(He("thinking").focus(),document.activeElement===He("thinking")){try{He("thinking").showPicker?.()}catch(i){if(!(i instanceof DOMException))throw i}return!0}return n(c("没有可选思考档。","No thinking levels available.")),!1}if(!ve(e.options.levels).includes(t.level))return n(c("此模型不支持这个思考档。","This model does not support that thinking level.")),!1;return s({action:"thinking",level:t.level},c("切换思考档","Change thinking level"))}case"fast":if(typeof e.state.fastMode!=="boolean")return n(c("此模型没有快速模式。","Fast mode is unavailable for this model.")),!1;return s({action:"fast",enabled:t.mode?t.mode==="on":!e.state.fastMode},c("切换快速模式","Change fast mode"));case"clone":case"copy":It.add(r),_e();try{if(t.name==="copy"){let{text:o}=await ze.request(`${Xe(r)}/last-assistant`);if(typeof o!=="string"||!o)return n(c("没有可复制的助手消息。","No assistant message to copy.")),!1;if(!navigator.clipboard)return n(c("浏览器无法访问剪贴板。","The browser can't access the clipboard.")),!1;return await navigator.clipboard.writeText(o),Ue(r).commandStatus=c("已复制上一条助手消息。","Copied the last assistant message."),!0}let i=await ze.request(`${Xe(r)}/branches`,{kind:"clone"});if(i.cancelled===!0)return n(c("原生引擎取消了复制。","OmO cancelled the clone.")),!1;let a=ln(i.session);if(!a)throw Error(c("本机服务没有返回新会话。","The local service did not return a new session."));if(e===B)bm(a,"",{kind:"web",id:r,name:e.session.name});else Yn(a);return!0}finally{It.delete(r)}}}function cm(){if(!B||B.status!=="ready"||!B.session.active||Le.get(B.session.id)?.status==="pending")return;let e=Ue(B.session.id);if(e.commandMode||vm(e.text))yb(B);else vb()}async function rn(e,t,n,r,s){let i=e.session.id;if(It.has(i)||Le.get(i)?.status==="pending")return!1;It.add(i),r(""),_e(),Ke.setAttribute("aria-busy","true"),xe.setAttribute("aria-busy","true");try{let a=await Za(e,t);if(e!==B)return!0;if(s?.(a),t.action==="navigate"){if(j(a.result).cancelled===!0)return!1;Nt?.invalidate(),Ti(e),kn?.abort(),e.workbench=void 0;let o=C(j(a.result).editorText);if(o){let l=Ue(i);if(l.text=o,!l.commandMode)Ge.value=o}}if(t.action==="resume")e.status="loading";if(t.action==="model"||t.action==="thinking")e.modelPreview=void 0;if(await Ur(e,t.action==="resume"||t.action==="navigate"),e!==B)return!0;if(t.action==="resume")gr(e);if(Ke.open)Em(e);if(xe.open&&t.action!=="abort")Fa(e);return!0}catch(a){if(e===B)r(c(`${n}失败:${Ee(a)}`,`${n} failed: ${Ee(a)}`),a);return!1}finally{if(It.delete(i),Ke.removeAttribute("aria-busy"),xe.removeAttribute("aria-busy"),e===B)_e()}}function d0(){if(tt!=="online"||!vt.length||vs.open)return;at.stop();let e=He("new-cwd");e.replaceChildren(...vt.map((n)=>pt(n,n))),e.value=Fr||B?.session.cwd||vt[0]||"";let t=vt.length>1;if(U("new-cwd-field").hidden=!t,U("new-cwd-fixed").hidden=t,U("new-cwd-path").textContent=e.value,Lt("new-name").value="",se(U("new-error")),vs.showModal(),!t)Lt("new-name").focus()}async function kb(){if(yi||tt!=="online")return;let e=He("new-cwd").value;if(!vt.includes(e))return;let t=Lt("new-name").value.trim();if(t.length>120){se(U("new-error"),c("会话名称不能超过 120 个字符。","Keep the session name to 120 characters or fewer."));return}yi=!0,Q("create").disabled=!0,se(U("new-error"));try{let n=await ze.request("/api/sessions",{cwd:e,...t?{name:t}:{}}),r=ln(n.session);if(!r)throw Error(c("本机服务没有返回会话。","The local service did not return a session."));if(Fr="",Yn(r),!at.active){if(on=r.archived,vs.open)vs.close();Mi(r.id)}}catch(n){if(se(U("new-error"),c(`创建失败:${Ee(n)}`,`Couldn't create session: ${Ee(n)}`)),n instanceof De&&(n.status===401||n.status===403))Kn(!0)}finally{yi=!1,Zn()}}async function xb(e){let t=e.session.id;if(e!==B||!Ke.open||Le.get(t)?.status==="pending"||gm(e))return;let n={status:"pending"};Le.set(t,n),e.history?.invalidate(),_e(),ks(e),U("manage-handoff-status").focus();let r=()=>B?.session.id===t?B:void 0,s=()=>Ke.open||document.activeElement===Q("manage-button")||U("composer-shell").contains(document.activeElement),i=(a,o)=>{let l=s();if(Ka(a),a.error="",Ke.open)Ke.close();if(_e(),l&&!document.querySelector("dialog:modal"))U(o).focus()};try{let{session:a,command:o}=await ze.handoff(t);if(Le.get(t)!==n)return;Le.set(t,{status:"released",command:o}),Yn(a),_s(!0);let l=r();if(l)i(l,"handoff-title")}catch(a){if(Le.get(t)!==n)return;let o=!(a instanceof De)||a.status>=500||a.code==="session_not_open",l=c(`无法转到 CLI:${Ee(a)}`,`Couldn't switch to the CLI: ${Ee(a)}`),u=r();if(o||u&&!u.session.active){Le.set(t,{status:"uncertain",error:l});let d=u?.session??Hr.get(t);if(d)Yn({...d,active:!1,running:!1});if(u)i(u,"session-error");pr()}else if(Le.set(t,{status:"failed",error:l}),u){if(_e(),ks(u),Ke.open&&document.activeElement===U("manage-handoff-status"))U("manage-handoff-error").focus()}if(a instanceof De&&(a.status===401||a.status===403))Kn(!0)}}function Em(e){let t=U("manage-body"),n=document.activeElement,r=n instanceof HTMLElement&&t.contains(n)?n.dataset.key:void 0,s=e.session.id,i=(M)=>se(U("manage-error"),M),a=y("input");a.type="text",a.required=!0,a.maxLength=120,a.value=e.session.name,a.dataset.key="name";let o=y("form","stack stack--tight"),l=y("button","button",c("保存名称","Save name"));l.type="submit",l.dataset.write="",l.dataset.key="save";let u=y("div","row");u.append(l),o.append(Xn(c("会话名称","Session name"),a),u),o.addEventListener("submit",(M)=>{M.preventDefault();let L=a.value.trim();if(!L){i(c("请输入会话名称。","Enter a session name."));return}if(L!==e.session.name)rn(e,{action:"rename",name:L},c("重命名","Rename"),i)});let d=(M,L,z,O=!1)=>{let P=We(M,()=>void rn(e,z,M,i));return P.dataset.key=L,P.dataset.write="",P.disabled=O||tt!=="online",P},f=y("section","subpanel stack stack--tight"),p=y("div","row");p.append(d(e.session.archived?c("取消归档","Unarchive"):c("归档","Archive"),"archive",{action:"archive",enabled:!e.session.archived}),d(e.session.settled?c("重新标为未结清","Mark as open"):c("标为已结清","Mark as done"),"settle",{action:"settle",enabled:!e.session.settled})),f.append(y("h3","",c("会话状态","Session status")),y("p","small muted",e.session.archived?c("已归档","Archived"):c("未归档","Not archived")),p);let g=y("section","subpanel stack stack--tight"),b=y("div","row"),x=e.state.fastMode,k=e.state.autoCompactionEnabled;if(typeof x==="boolean")b.append(d(x?c("关闭快速模式","Turn off fast mode"):c("开启快速模式","Turn on fast mode"),"fast",{action:"fast",enabled:!x}));if(typeof k==="boolean")b.append(d(k?c("关闭自动压缩","Turn off auto-compaction"):c("开启自动压缩","Turn on auto-compaction"),"auto",{action:"autoCompaction",enabled:!k}));let A=y("h3","",c("运行设置","Run settings"));if(A.dataset.key="run-settings",A.tabIndex=-1,g.append(A),b.childElementCount)g.append(b);let T=y("form","stack stack--tight"),S=y("input");S.type="text",S.maxLength=6000,S.dataset.key="instructions";let E=y("button","button",c("压缩上下文","Compact context"));E.type="submit",E.dataset.write="",E.dataset.idle="",E.dataset.key="compact",E.disabled=tt!=="online"||e.running||e.compacting;let D=y("div","row");if(D.append(E),T.append(Xn(c("压缩说明(选填)","Compaction instructions (optional)"),S),D),T.addEventListener("submit",(M)=>{if(M.preventDefault(),e.running||e.compacting||It.has(s)){i(c("等本轮结束后再压缩。","Wait for this turn to finish before compacting."));return}let L=S.value.trim();rn(e,{action:"compact",...L?{instructions:L}:{}},c("压缩上下文","Compact context"),i)}),g.append(T),l.disabled=tt!=="online",t.replaceChildren(o,f,g),r)[...t.querySelectorAll("[data-key]")].find((M)=>M.dataset.key===r)?.focus()}var fr,h0=[];function Am(e,t){if(e!==B)return;let n=Ue(e.session.id);n.commandMode=t,Ge.value=t?n.commandText:n.text,Ts(),_e(),Ge.focus()}function Cm(e,t){if(e!==B||!Nr.test(t))return;let n=Ue(e.session.id),[r=""]=n.commandText.split(/\s/,1),s=Nr.test(r)?n.commandText.slice(r.length):"";if(n.commandText=`${t}${s||" "}`,n.commandError="",Ht.open)Ht.close();if(xe.matches(":modal"))yr(!1);Am(e,!0),Ge.setSelectionRange(t.length+1,t.length+1)}function f0(e){let t=U("command-list"),n=document.activeElement,r=n instanceof HTMLButtonElement&&t.contains(n)?n.dataset.invocation:void 0,s,i=Lt("command-search").value.trim().toLocaleLowerCase(),a=h0.flatMap((o)=>{let l=C(o.invocation),u=C(o.description),d=C(o.source),f=d==="builtin"?c("内置命令","Built-in"):d==="skill"?c("技能","Skill"):d==="prompt"?c("提示模板","Prompt template"):c("扩展","Extension");if(!Nr.test(l)||!`${l} ${u} ${f} ${d}`.toLocaleLowerCase().includes(i))return[];let p=y("li","stack stack--tight"),g=We(l,()=>Cm(e,l),"button--quiet path");if(g.dataset.invocation=l,l===r)s=g;return g.setAttribute("aria-label",c(`插入命令:${l}`,`Insert command: ${l}`)),p.append(g,y("p","small muted break",[f,u].filter(Boolean).join(" · "))),[p]});t.replaceChildren(...a),t.hidden=!a.length,s?.focus({preventScroll:!0}),se(U("command-status"),a.length?"":i?c("没有匹配的命令。","No matching commands."):c("此会话没有可用命令。","This session has no listed commands."))}async function _m(e,t=!1){if(Ht.open||Q("command-picker").disabled)return;fr?.abort();let n=fr=new AbortController;h0=Da([]);let r=Lt("command-search"),s=ge("command-shortcuts",HTMLDetailsElement);if(s.open=t,r.value="",U("command-list").replaceChildren(),U("command-list").hidden=!0,se(U("command-error")),Ht.showModal(),f0(e),t)s.querySelector("summary")?.focus();let i=()=>!n.signal.aborted&&Ht.open&&e===B;try{let a=await ze.request(`${Xe(e.session.id)}/options`,void 0,n.signal);if(!i())return;h0=Da(a.commands),f0(e)}catch(a){if(!i())return;se(U("command-error"),c(`无法读取扩展命令:${Ee(a)}。内置命令仍可用。`,`Couldn't load extension commands: ${Ee(a)}. Built-in commands remain available.`))}finally{if(fr===n)fr=void 0}}var Un,sn,xn,br,an,Nt,vr,xs=!1,Ri,Wn,m0,ps,qn,Ya=!1,p0=()=>[...xe.querySelectorAll('[role="tab"]')],_0=()=>!U("runtime-capabilities").hidden,Pr=()=>!U("runtime-metrics").hidden,Di=()=>!U("runtime-todo").hidden,ja=()=>ge("runtime-memory-branch",HTMLDetailsElement),Es=()=>!U("runtime-subagent").hidden?"tasks":!U("runtime-dag").hidden?"dag":Di()&&ja().open?"memory":void 0;function Ga(){let e=Q("details-refresh");if(_0()&&qn)e.setAttribute("aria-disabled","true");else e.removeAttribute("aria-disabled")}function Tm(){qn?.abort(),qn=void 0,Ya=!1;let e=U("capabilities-status");e.textContent="",e.className="sr-only",U("capabilities-content").replaceChildren(),Ga()}function Eb(e){if(qn)return;let t=qn=new AbortController,n=()=>qn===t&&xe.open&&B===e,r=U("capabilities-status"),s=U("capabilities-content"),i=Vl();Ya=!0,s.replaceChildren(i),r.className="small muted",r.textContent=c("正在读取能力清单…","Loading capabilities…"),Ga();let a=AbortSignal.any([t.signal,AbortSignal.timeout(1e4)]);ze.request(`${Xe(e.session.id)}/capabilities`,void 0,a).then((o)=>{if(!n())return;s.replaceChildren(...Bf(o)),r.className="sr-only",r.textContent=c("能力清单已加载。","Capabilities loaded.")},(o)=>{if(!n())return;if(r.className="notice error small",o instanceof De&&o.status===404&&o.code==="not_found")r.textContent=c("此版本的 Web 服务不提供能力清单。","This Web server does not list capabilities.");else if(o instanceof De&&(o.code==="session_changed"||o.code==="session_not_open"||o.code==="session_not_found"))r.textContent=c("会话已断开。打开会话后重试。","Session disconnected. Open it and try again.");else r.textContent=c("无法读取能力清单。刷新重试。","Couldn't load capabilities. Refresh to try again.")}).finally(()=>{if(qn!==t)return;qn=void 0,Ga()})}function ki(e){if(e.getAttribute("aria-selected")==="true")return;for(let t of p0()){let n=t===e;t.setAttribute("aria-selected",String(n)),t.tabIndex=n?0:-1;let r=t.getAttribute("aria-controls");if(r)U(r).hidden=!n;if(r==="runtime-todo"&&!n)v0()}if(U("details-scroll").scrollTop=0,ps=void 0,xe.open&&B?.status==="ready")gs(B);Ga()}function Xa(){if(!ps)return;let e=ps==="todo"?"#runtime-todo [data-runtime-branch]":"#runtime-tree",t=xe.querySelector(`${e} details`);if(!t)return;ps=void 0,t.open=!0;let n=t.querySelector("summary");if(document.activeElement===Q(e==="#runtime-tree"?"runtime-open-overview":"runtime-open-todo"))n?.focus({preventScroll:!0}),n?.scrollIntoView({block:"start"})}function Br(e="overview",t=Q("details-button"),n){if(B?.status!=="ready")return;let r=Q(`runtime-open-${e}`);if(ki(r),m0=t,ps=n,!ws.matches&&!_i)_i=!0,x0(y0,"open");if(!xe.open)Sm(B);r.focus({preventScroll:!0}),Xa()}function Sm(e){se(U("details-error")),xs=!1;for(let s of xe.querySelectorAll('[role="tabpanel"]:not(#runtime-capabilities, #runtime-todo)'))s.replaceChildren();U("runtime-todo").querySelector("[data-runtime-branch]")?.remove(),U("runtime-memory-journal").replaceChildren(),U("runtime-memory-branch-content").replaceChildren(),ja().open=!1;let t=()=>B===e&&xe.open&&Pr();vr=Af(ze,Xe(e.session.id),()=>t()&&e.status==="ready",()=>e.session.active&&tt==="online"&&!It.has(e.session.id)&&Le.get(e.session.id)?.status!=="pending",()=>{if(window.confirm(c("清空所有尚未发送的排队输入?","Remove all unsent messages from the queue?")))rn(e,{action:"clearQueue"},c("清空队列","Clear queue"),(s)=>se(U("details-error"),s))});let n=()=>e.session.active&&tt==="online"&&!e.running&&!e.compacting&&!e.requests.size&&!(e.queue&&e.queue>0)&&!Jn.has(e.session.id)&&!It.has(e.session.id)&&Le.get(e.session.id)?.status!=="pending",r=Df(ze,Xe(e.session.id),t,n,(s,i)=>{let o=Ue(e.session.id).text.trim()?c("切换上下文位置?选中的消息可能替换当前草稿。","Switch context? The selected message may replace your draft."):c("切换上下文位置?原有分支仍会保留。","Switch context? Existing branches are kept."),l=(u,d)=>{if(Nt!==r)return;let f=jl(d);if(f)r.invalidate();se(U("details-error"),f?"":u)};if(window.confirm(o))rn(e,{action:"navigate",targetId:s,expectedLeafId:i},c("切换上下文","Switch context"),l,(d)=>{if(j(d.result).cancelled===!0)l(c("本次切换已取消。","Context switch cancelled."))})});if(Nt=r,U("runtime-metrics").append(Nt.root),ws.matches)xe.showModal();else xe.open=!0;Q("details-button").setAttribute("aria-expanded","true"),U("details-scroll").scrollTop=0,gs(e)}function Rm(e,t=!1){if(!e||e.status!=="ready"||at.active||e.consideredDesktopDock&&!t)return;if(e.consideredDesktopDock=!0,!_i||ws.matches||xe.open)return;ki(Q("runtime-open-overview")),Sm(e)}function yr(e=!0){if(!xe.open)return;if(xe.close(),Un?.abort(),Un=void 0,sn?.abort(),sn=void 0,xn?.abort(),xn=void 0,br?.abort(),br=void 0,an?.abort(),an=void 0,Nt?.abort(),Nt=void 0,vr?.deactivate(),vr=void 0,Ri=void 0,Wn=void 0,v0(),B)B.detailData=void 0;ps=void 0,Tm();let t=Q("details-button");t.setAttribute("aria-expanded","false");let n=m0??t;if(m0=void 0,e)(n.getClientRects().length?n:t.hidden?U("conversation"):t).focus({preventScroll:!0})}function La(){if(!xe.matches(":modal"))_i=!1,x0(y0,"closed");yr()}function a0(){let e=Q("details-button");if(ws.matches){if(e.setAttribute("aria-haspopup","dialog"),xe.open&&!xe.matches(":modal"))yr(xe.contains(document.activeElement));return}if(e.removeAttribute("aria-haspopup"),!xe.matches(":modal")||document.querySelector("dialog:modal:not(#details-dialog)"))return;let t=U("details-scroll"),n=t.scrollTop,r=document.activeElement;if(xe.close(),xe.open=!0,r instanceof HTMLElement&&xe.contains(r))r.focus({preventScroll:!0});t.scrollTop=n}function jn(e){dr.setAttribute("aria-expanded",String(e))}function g0(){return getComputedStyle(o0).getPropertyValue("--compact-options").trim()==="1"}function Ab(){let e=g0();if(e===o0.hasAttribute("data-compact"))return;let t=document.activeElement;if(!e)jn(!1);if(o0.toggleAttribute("data-compact",e),e&&bs.contains(t)&&dr.getAttribute("aria-expanded")!=="true")dr.focus({preventScroll:!0});else if(!e&&t===dr)(bs.querySelector("select:enabled:not([hidden] *)")??Ge).focus({preventScroll:!0})}function b0(e){Un?.abort();let t=Un=new AbortController,n=Nt?.root,r=vr,s=()=>!t.signal.aborted&&xe.open&&Pr()&&e===B,i=U("runtime-metrics"),a=(l)=>se(U("details-error"),l),o=!i.querySelector(".runtime-metrics")&&!i.querySelector(":scope > p")?y("p","muted",c("正在读取运行详情…","Loading run details…")):void 0;if(o)i.prepend(o);a(""),ze.request(`${Xe(e.session.id)}/details`,void 0,t.signal).then((l)=>{if(!s()||!n||!r)return;if(e.detailData=l,xs=!1,bt.online!==!1)C0(e,l.generationSpeed);r.update(we(j(l.state).pendingMessageCount)),_f(l,e.state,e.options,{insertCommand:(u)=>Cm(e,u)},n,r.root,e.generationSpeed),Xa()}).catch((l)=>{if(!s())return;i.querySelector(":scope > p")?.remove(),a(c(`无法读取运行详情:${Ee(l)}`,`Couldn't load run details: ${Ee(l)}`))}).finally(()=>{if(Un===t)Un=void 0})}function Cb(e){xn?.abort();let t=xn=new AbortController,n=()=>t===xn&&xe.open&&Di()&&B===e;if(!Ri)Wl({status:"loading"});let r=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);ze.request(`${Xe(e.session.id)}/branch-runtime`,void 0,r).catch(()=>({status:"unavailable",reason:"read_failed"})).then((s)=>{if(!n())return;if(Ri=s,s.status==="ok"&&(typeof s.leafId==="string"||s.leafId===null))Nt?.checkLeaf(s.leafId);Wl(s),Xa()}).finally(()=>{if(xn===t)xn=void 0})}function T0(e){let t=Es();if(!t||!Wn)return;if(t==="memory"){U("runtime-memory-journal").replaceChildren(Ff(Wn.memory));return}let n=Wn,r=Sa(n[t]),s=r?n.snapshot??"waiting":void 0;if(t==="tasks")U("runtime-subagent").replaceChildren(...Zl("tasks",n.tasks,s));else{let o=U("runtime-dag"),l=o.querySelector(".dag-run[open]")?.dataset.dagKey,u=document.activeElement?.closest(".dag-run")?.dataset.dagKey;br?.abort();let d=br=new AbortController;o.replaceChildren(...Zl("dag",n.dag,s,(f)=>{let p=AbortSignal.any([d.signal,AbortSignal.timeout(28000)]);return ze.request(`${Xe(e.session.id)}/native-runtime/dag/${f}`,void 0,p)}));for(let f of o.querySelectorAll(".dag-run")){if(f.dataset.dagKey===l)f.open=!0;if(u&&f.dataset.dagKey===u&&document.activeElement===document.body)f.querySelector("summary")?.focus({preventScroll:!0})}}if(!r||n.snapshot||an)return;let i=an=new AbortController,a=AbortSignal.any([i.signal,AbortSignal.timeout(8000)]);ze.request(`${Xe(e.session.id)}/activity`,void 0,a).catch(()=>({status:"unavailable"})).then((o)=>{if(an!==i||!xe.open||B!==e||Wn!==n)return;n.snapshot=o;let l=Es();if((l==="tasks"||l==="dag")&&Sa(n[l]))T0(e)}).finally(()=>{if(an===i)an=void 0})}function _b(e){sn?.abort(),an?.abort(),an=void 0;let t=sn=new AbortController,n=()=>sn===t&&xe.open&&B===e&&Boolean(Es()),r=Es();if(r==="dag")br?.abort(),br=void 0;let s=U(r==="memory"?"runtime-memory-journal":r==="dag"?"runtime-dag":"runtime-subagent");if(!s.childElementCount){let a=y("p","small muted",c("正在读取原生运行信息…","Loading native runtime…"));a.setAttribute("role","status"),s.append(a)}let i=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);ze.request(`${Xe(e.session.id)}/native-runtime`,void 0,i).catch((a)=>{let l={status:"unavailable",reason:a instanceof De&&a.status===404&&a.code==="not_found"?"web_unsupported":a instanceof De&&a.status>=400&&a.status<500?"read_refused":"read_failed"};return{tasks:l,dag:l,memory:l}}).then((a)=>{if(!n())return;Wn={tasks:j(a.tasks),dag:j(a.dag),memory:j(a.memory)},T0(e)}).finally(()=>{if(sn===t)sn=void 0})}function gs(e,t=!1){if(e!==B||e.status!=="ready"||!xe.open)return;if(Pr()){if(t||!Un&&(xs||!e.detailData))b0(e);Nt?.activate(),vr?.activate(t)}else Un?.abort(),Un=void 0,Nt?.abort(),vr?.deactivate();if(Di())if(t||!Ri&&!xn)Cb(e);else Xa();else xn?.abort(),xn=void 0;let n=Es();if(n){if(t||!Wn&&!sn)_b(e);else if(Wn&&!sn)T0(e)}else sn?.abort(),sn=void 0;if(n!=="dag")br?.abort(),br=void 0;if(!n||n==="memory")an?.abort(),an=void 0;if(_0()){if(t||!Ya)Eb(e)}else if(qn)Tm()}function Fa(e){if(!Pr())xs=!0;if(!Di())Ri=void 0;if(!Es())Wn=void 0;if(!_0())Ya=!1;gs(e,!0)}function Mm(e){at.stop(),nn(!1),pm.open(e)}function Tb(){let e=()=>{at.stop(),nn(!1),w0("cli-follow-button")};Q("cli-follow-button").addEventListener("click",()=>{if(at.active){e();return}nn(!1),yr(!1),jn(!1),at.start(),Q("cli-follow-stop").focus({preventScroll:!0})}),Q("cli-follow-stop").addEventListener("click",e),Q("cli-history-button").addEventListener("click",()=>Mm()),Q("cli-live-button").addEventListener("click",()=>{at.stop(),nn(!1),Cs.open()}),Q("web-branch-button").addEventListener("click",()=>{if(B&&Le.get(B.session.id)?.status!=="pending")k0({kind:"web",id:B.session.id,name:B.session.name})}),Q("open-navigation").addEventListener("click",()=>nn(!0)),Q("close-navigation").addEventListener("click",()=>nn(!1,!0)),Q("nav-scrim").addEventListener("click",()=>nn(!1,!0)),hr=im(rm)==="true",_i=im(y0)!=="closed",am(),Q("rail-toggle").addEventListener("click",()=>{hr=!hr,x0(rm,String(hr)),am()}),ys.addEventListener("change",()=>{let l=document.activeElement,u=wn||l===Q("open-navigation")||l===Q("rail-toggle")||U("navigation").contains(l);if(nn(!1),u&&!document.querySelector("dialog:modal"))Q(ys.matches?"open-navigation":"rail-toggle").focus({preventScroll:!0})}),a0(),ws.addEventListener("change",()=>{if(a0(),!ws.matches)Rm(B,!0)}),document.addEventListener("close",(l)=>{if(l.target!==xe)a0()},!0),new ResizeObserver(Ab).observe(Ia("composer"));let t=()=>dr.getAttribute("aria-expanded")==="true";dr.addEventListener("click",()=>jn(!t()));let n=(l)=>{if(t()&&l.target instanceof Node&&!dr.contains(l.target)&&!bs.contains(l.target))jn(!1)};document.addEventListener("click",n),document.addEventListener("focusin",n),document.addEventListener("keydown",(l)=>{if(l.key!=="Escape"||l.defaultPrevented||l.isComposing||document.querySelector("dialog:modal"))return;if(wn)nn(!1,!0);else if(t())jn(!1),dr.focus({preventScroll:!0});else if(xe.open)La()}),Lt("search").addEventListener("input",()=>{Vn(),$r()}),He("workspace-select").addEventListener("change",()=>ob(He("workspace-select").value)),Q("recent").addEventListener("click",()=>{on=!1,Vn(),$r()}),Q("archived").addEventListener("click",()=>{on=!0,Vn(),$r()}),document.addEventListener("visibilitychange",()=>{if(document.hidden)return;if(pr(),B)Ua(B);if(B&&xe.open)gs(B,!0)}),window.setInterval(()=>{if(!document.hidden&&tt==="online")_s(!0)},fm),Q("new-welcome").addEventListener("click",d0),Q("new-sidebar").addEventListener("click",d0),Ia("new-form").addEventListener("submit",(l)=>{l.preventDefault(),kb()});let r=An("session-path-dialog");for(let l of[vs,Ke,Ht,r])for(let u of l.querySelectorAll("[data-close]"))u.addEventListener("click",()=>l.close());Q("session-path-trigger").addEventListener("click",()=>{let l=U("session-path").textContent;if(!l||r.open)return;U("session-path-full").textContent=l,se(U("session-path-status")),r.showModal()}),Q("session-path-copy").addEventListener("click",async()=>{let l=U("session-path-full"),u=l.textContent;if(!u)return;let d=c("已复制路径。","Path copied.");try{await navigator.clipboard.writeText(u)}catch{d=c("剪贴板不可用。可选中路径手动复制。","Clipboard unavailable. Select and copy the path.")}if(r.open&&l.textContent===u)se(U("session-path-status"),d)}),Q("manage-button").addEventListener("click",()=>{if(!B||Ke.open)return;se(U("manage-error")),Em(B),Ke.showModal(),_e()}),Ke.addEventListener("close",_e),Q("manage-handoff").addEventListener("click",()=>{if(B)xb(B)}),Q("handoff-copy").addEventListener("click",async()=>{let l=B;if(!l)return;let u=Le.get(l.session.id);if(u?.status!=="released")return;try{await navigator.clipboard.writeText(u.command),u.copyStatus=c("已复制命令。","Command copied.")}catch{u.copyStatus=c("剪贴板不可用。可选中命令手动复制。","Clipboard unavailable. Select and copy the command.")}if(B?.session.id===l.session.id&&Le.get(l.session.id)===u)_e()}),Q("details-button").addEventListener("click",()=>{if(xe.open)La();else Br()}),Q("current-todo").addEventListener("click",()=>Br("todo",Q("current-todo"),"todo"));let s=U("runtime-memory-journal");s.classList.add("fold-body"),U("runtime-memory-branch-content").before(s),ja().addEventListener("toggle",()=>{if(B&&xe.open&&Di())gs(B)}),U("runtime-metrics").addEventListener("click",(l)=>{if(!(l.target instanceof Element)||!l.target.closest("#runtime-open-resources"))return;ki(Q("runtime-open-todo")),ja().open=!0;let u=U("runtime-resources-title");u.focus({preventScroll:!0}),u.scrollIntoView({block:"start"})});for(let l of p0())l.addEventListener("click",()=>ki(l));U("runtime-shortcuts").addEventListener("keydown",(l)=>{let u=p0(),d=u.findIndex((p)=>p===l.target);if(d<0)return;let f=l.key==="Home"?u[0]:l.key==="End"?u.at(-1):l.key==="ArrowLeft"?u[(d+u.length-1)%u.length]:l.key==="ArrowRight"?u[(d+1)%u.length]:void 0;if(!f)return;l.preventDefault(),ki(f),f.focus({preventScroll:!0})}),Q("details-refresh").addEventListener("click",()=>{if(!B||!xe.open)return;if(gs(B,!0),Pr())Nt?.refresh()}),xe.querySelector("[data-close]")?.addEventListener("click",La),xe.addEventListener("cancel",(l)=>{l.preventDefault(),La()}),Q("command-mode").addEventListener("click",()=>{if(B)Am(B,!Ue(B.session.id).commandMode)}),Q("command-picker").addEventListener("click",()=>{if(B)_m(B)}),Lf(Ht,Lt("command-search"),U("command-list")),Ht.addEventListener("close",()=>{if(!Ht.open)fr?.abort()}),Lt("command-search").addEventListener("input",()=>{if(B&&!fr&&U("command-error").hidden)f0(B)}),Q("retry").addEventListener("click",()=>{if(clearTimeout(vi),vi=0,yn?.close(),yn=void 0,B)Ja(B);if(jt=_t==="transport"?"lost":"waiting",_t!=="transport")_t=!1;zr="",Ai="",Zn(),Kn(!0)}),Q("resume").addEventListener("click",()=>{let l=B;if(!l||Q("resume").disabled)return;let u=Le.get(l.session.id),d=u?.status==="released"||u?.status==="uncertain";if(l.session.active&&!d){l.status="loading",l.error="",_e(),Ur(l,!0),gr(l);return}let f=U("conversation");f.focus(),rn(l,{action:"resume"},c("恢复会话","Resume session"),(p)=>{l.error=p,_e()}).then(()=>{if(l!==B||document.activeElement!==f||document.querySelector("dialog:modal"))return;if(l.status==="ready")Ge.focus();else if(!U("session-error").hidden)U("session-error").focus()})}),Ia("composer").addEventListener("submit",(l)=>{l.preventDefault(),cm()}),Ge.addEventListener("input",()=>{if(!B)return;let l=Ue(B.session.id);if(l.commandStatus=void 0,l.commandMode)l.commandText=Ge.value,l.commandError="";else l.text=Ge.value,l.error="";_e()}),Ge.addEventListener("keydown",(l)=>{if(pi.key(l))return;if(l.key==="Enter"&&!l.isComposing&&!pi.composing&&(l.ctrlKey||l.metaKey))l.preventDefault(),cm()}),Ge.addEventListener("focus",_e),Ge.maxLength=200000,Ge.addEventListener("paste",(l)=>{let u=[...l.clipboardData?.files??[]].filter((d)=>d.type.startsWith("image/"));if(u.length)lm(u)}),Q("attach").addEventListener("click",()=>Lt("files").click()),Lt("files").addEventListener("change",(l)=>{let u=l.currentTarget;if(u instanceof HTMLInputElement)lm([...u.files??[]]),u.value=""}),Hn.addEventListener("change",()=>{if(!B)return;Ue(B.session.id).mode=Hn.value==="steer"||Hn.value==="follow_up"?Hn.value:"prompt",_e()}),Q("stop").addEventListener("click",()=>{let l=B;if(l)rn(l,{action:"abort"},c("停止","Stop"),(u)=>{Ue(l.session.id).error=u,_e()})}),As.observeTrace(({user:l,assistant:u,tool:d})=>{wi(fs.user,l),wi(fs.assistant,u),wi(fs.tool,d)});let i=matchMedia("(prefers-reduced-motion: no-preference) and (forced-colors: none)"),a;i.addEventListener("change",()=>a?.cancel());let o=(l)=>{if(l.tagName!=="SUMMARY")l.tabIndex=-1;if(l.focus({preventScroll:!0}),l.scrollIntoView({block:"nearest",inline:"nearest"}),a?.cancel(),!i.matches)return;let u=l.animate([{backgroundColor:"var(--trace-arrival)"},{}],{duration:460,easing:"ease-out"});a=u,u.onfinish=u.oncancel=()=>{if(a===u)a=void 0}};for(let l of Object.values(fs))l.addEventListener("click",()=>{let u=ms.get(l);if(!$a.hidden&&u?.isConnected)o(u)});Q("sidebar-question").addEventListener("click",()=>{let l=xi.firstQuestion;if(!l?.isConnected)return;if(xe.matches(":modal"))yr(!1);o(l)}),Pn.addEventListener("change",()=>{let l=B;if(!l||Pn.disabled)return;l.modelSelection=Pn.value||void 0,_e()}),Gn.addEventListener("click",async()=>{let l=B,u=ve(l?.options.models).map(j).find((d)=>qt(d)===l?.modelSelection);if(!l||!u||Gn.disabled)return;if(await rn(l,{action:"model",provider:C(u.provider),modelId:C(u.id)},c("切换模型","Change model"),(d)=>{Ue(l.session.id).error=d,_e()}),B!==l)return;if(l.modelSelection=void 0,_e(),document.activeElement===document.body||document.activeElement===Gn)Pn.focus()}),He("thinking").addEventListener("change",()=>{let l=B,u=He("thinking").value;if(l&&u&&!He("thinking").disabled)rn(l,{action:"thinking",level:u},c("切换思考档","Change thinking level"),(d)=>{Ue(l.session.id).error=d,_e()});else _e()}),He("approval").addEventListener("change",()=>{let l=B,u=He("approval").value;if(!l||u!=="ask"&&u!=="auto"&&u!=="full-access"){_e();return}if(u==="full-access"&&!window.confirm(c("关闭此会话的审批?工具默认放行,包括删除文件或对外发送数据。原生权限规则仍有效,用户问题仍需回答。","Turn off approval for this session? Tools can delete files or send data without asking. Native rules and user questions still apply."))){_e();return}rn(l,{action:"preset",preset:u},c("切换审批模式","Change approval mode"),(d)=>{Ue(l.session.id).error=d,_e()})})}sb();ib();Tb();Kn();
282
+ ?)[ \r ]*`,kl="[̀-ͯ]",Ib=new RegExp(kl+"+$"),Nb="("+Qd+"+)|"+(Lb+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(kl+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(kl+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Db)+("|"+Mb+")");class wl{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Nb,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Kt("EOF",new zt(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new se("Unexpected character: '"+e[t]+"'",new Kt(e[t],new zt(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[r]===14){var s=e.indexOf(`
283
+ `,this.tokenRegex.lastIndex);if(s===-1)this.tokenRegex.lastIndex=e.length,Ft({strict:this.settings.strict,errorCode:"commentAtEnd",errorMsg:"% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)",report:!0});else this.tokenRegex.lastIndex=s+1;return this.lex()}return new Kt(r,new zt(this,t,this.tokenRegex.lastIndex))}}class ef{constructor(e,t){if(e===void 0)e={};if(t===void 0)t={};this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new se("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t of Object.keys(e))if(e[t]===void 0)delete this.current[t];else this.current[t]=e[t]}endGroups(){while(this.undefStack.length>0)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];else if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e];else return}set(e,t,n){if(n===void 0)n=!1;if(n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];if(this.undefStack.length>0)this.undefStack[this.undefStack.length-1][e]=t}else{var s=this.undefStack[this.undefStack.length-1];if(s&&!Object.prototype.hasOwnProperty.call(s,e))s[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0}if(t==null)delete this.current[e];else this.current[e]=t}}var Bb=Pd;w("\\noexpand",function(e){var t=e.popToken();if(e.isExpandable(t.text))t.noexpand=!0,t.treatAsRelax=!0;return{tokens:[t],numArgs:0}});w("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});w("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});w("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});w("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();if(t[0].length===1&&t[0][0].text===n.text)return{tokens:t[1],numArgs:0};else return{tokens:t[2],numArgs:0}});w("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");w("\\TextOrMath",function(e){var t=e.consumeArgs(2);if(e.mode==="text")return{tokens:t[0],numArgs:0};else return{tokens:t[1],numArgs:0}});var cd={"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};w("\\char",function(e){var t=e.popToken(),n,r=0;if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else if(t.text==="EOF")throw new se("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=cd[t.text],r==null||r>=n)throw new se("Invalid base-"+n+" digit "+t.text);var s;while((s=cd[e.future().text])!=null&&s<n)r*=n,r+=s,e.popToken()}return"\\@char{"+r+"}"});var Nl=(e,t,n,r)=>{var s=e.consumeArg().tokens;if(s.length!==1)throw new se("\\newcommand's first argument must be a macro name");var i=s[0].text,o=e.isDefined(i);if(o&&!t)throw new se("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!o&&!n)throw new se("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var a=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){var l="",u=e.expandNextToken();while(u.text!=="]"&&u.text!=="EOF")l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new se("Invalid number of arguments: "+l);a=parseInt(l),s=e.consumeArg().tokens}if(!(o&&r))e.macros.set(i,{tokens:s,numArgs:a});return""};w("\\newcommand",(e)=>Nl(e,!1,!0,!1));w("\\renewcommand",(e)=>Nl(e,!0,!1,!1));w("\\providecommand",(e)=>Nl(e,!0,!0,!0));w("\\message",(e)=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((n)=>n.text).join("")),""});w("\\errmessage",(e)=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((n)=>n.text).join("")),""});w("\\show",(e)=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),cr[n],Qe.math[n],Qe.text[n]),""});w("\\bgroup","{");w("\\egroup","}");w("~","\\nobreakspace");w("\\lq","`");w("\\rq","'");w("\\aa","\\r a");w("\\AA","\\r A");w("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");w("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");w("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");w("ℬ","\\mathscr{B}");w("ℰ","\\mathscr{E}");w("ℱ","\\mathscr{F}");w("ℋ","\\mathscr{H}");w("ℐ","\\mathscr{I}");w("ℒ","\\mathscr{L}");w("ℳ","\\mathscr{M}");w("ℛ","\\mathscr{R}");w("ℭ","\\mathfrak{C}");w("ℌ","\\mathfrak{H}");w("ℨ","\\mathfrak{Z}");w("\\Bbbk","\\Bbb{k}");w("\\llap","\\mathllap{\\textrm{#1}}");w("\\rlap","\\mathrlap{\\textrm{#1}}");w("\\clap","\\mathclap{\\textrm{#1}}");w("\\mathstrut","\\vphantom{(}");w("\\underbar","\\underline{\\text{#1}}");w("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');w("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");w("\\ne","\\neq");w("≠","\\neq");w("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}"+"{\\mathrel{\\char`∉}}");w("∉","\\notin");w("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}"+"}{\\mathrel{\\char`≘}}");w("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");w("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");w("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}"+"{\\mathrel{\\char`≛}}");w("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}"+"{\\mathrel{\\char`≝}}");w("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}"+"{\\mathrel{\\char`≞}}");w("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");w("⟂","\\perp");w("‼","\\mathclose{!\\mkern-0.8mu!}");w("∌","\\notni");w("⌜","\\ulcorner");w("⌝","\\urcorner");w("⌞","\\llcorner");w("⌟","\\lrcorner");w("©","\\copyright");w("®","\\textregistered");w("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');w("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');w("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');w("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');w("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");w("⋮","\\vdots");w("\\varGamma","\\mathit{\\Gamma}");w("\\varDelta","\\mathit{\\Delta}");w("\\varTheta","\\mathit{\\Theta}");w("\\varLambda","\\mathit{\\Lambda}");w("\\varXi","\\mathit{\\Xi}");w("\\varPi","\\mathit{\\Pi}");w("\\varSigma","\\mathit{\\Sigma}");w("\\varUpsilon","\\mathit{\\Upsilon}");w("\\varPhi","\\mathit{\\Phi}");w("\\varPsi","\\mathit{\\Psi}");w("\\varOmega","\\mathit{\\Omega}");w("\\substack","\\begin{subarray}{c}#1\\end{subarray}");w("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");w("\\boxed","\\fbox{$\\displaystyle{#1}$}");w("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");w("\\implies","\\DOTSB\\;\\Longrightarrow\\;");w("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");w("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");w("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var ud={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},Ob=new Set(["bin","rel"]);w("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;if(n in ud)t=ud[n];else if(n.slice(0,4)==="\\not")t="\\dotsb";else if(n in Qe.math){if(Ob.has(Qe.math[n].group))t="\\dotsb"}return t});var Bl={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};w("\\dotso",function(e){var t=e.future().text;if(t in Bl)return"\\ldots\\,";else return"\\ldots"});w("\\dotsc",function(e){var t=e.future().text;if(t in Bl&&t!==",")return"\\ldots\\,";else return"\\ldots"});w("\\cdots",function(e){var t=e.future().text;if(t in Bl)return"\\@cdots\\,";else return"\\@cdots"});w("\\dotsb","\\cdots");w("\\dotsm","\\cdots");w("\\dotsi","\\!\\cdots");w("\\dotsx","\\ldots\\,");w("\\DOTSI","\\relax");w("\\DOTSB","\\relax");w("\\DOTSX","\\relax");w("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");w("\\,","\\tmspace+{3mu}{.1667em}");w("\\thinspace","\\,");w("\\>","\\mskip{4mu}");w("\\:","\\tmspace+{4mu}{.2222em}");w("\\medspace","\\:");w("\\;","\\tmspace+{5mu}{.2777em}");w("\\thickspace","\\;");w("\\!","\\tmspace-{3mu}{.1667em}");w("\\negthinspace","\\!");w("\\negmedspace","\\tmspace-{4mu}{.2222em}");w("\\negthickspace","\\tmspace-{5mu}{.277em}");w("\\enspace","\\kern.5em ");w("\\enskip","\\hskip.5em\\relax");w("\\quad","\\hskip1em\\relax");w("\\qquad","\\hskip2em\\relax");w("\\tag","\\@ifstar\\tag@literal\\tag@paren");w("\\tag@paren","\\tag@literal{({#1})}");w("\\tag@literal",(e)=>{if(e.macros.get("\\df@tag"))throw new se("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});w("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");w("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");w("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");w("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");w("\\newline","\\\\\\relax");w("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var tf=ce(gn["Main-Regular"][84][1]-0.7*gn["Main-Regular"][65][1]);w("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+tf+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");w("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+tf+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");w("\\hspace","\\@ifstar\\@hspacer\\@hspace");w("\\@hspace","\\hskip #1\\relax");w("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");w("\\ordinarycolon",":");w("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");w("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');w("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');w("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');w("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');w("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');w("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');w("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');w("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');w("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');w("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');w("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');w("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');w("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');w("∷","\\dblcolon");w("∹","\\eqcolon");w("≔","\\coloneqq");w("≕","\\eqqcolon");w("⩴","\\Coloneqq");w("\\ratio","\\vcentcolon");w("\\coloncolon","\\dblcolon");w("\\colonequals","\\coloneqq");w("\\coloncolonequals","\\Coloneqq");w("\\equalscolon","\\eqqcolon");w("\\equalscoloncolon","\\Eqqcolon");w("\\colonminus","\\coloneq");w("\\coloncolonminus","\\Coloneq");w("\\minuscolon","\\eqcolon");w("\\minuscoloncolon","\\Eqcolon");w("\\coloncolonapprox","\\Colonapprox");w("\\coloncolonsim","\\Colonsim");w("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");w("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");w("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");w("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");w("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");w("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");w("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");w("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");w("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");w("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");w("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");w("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");w("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");w("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");w("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");w("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");w("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");w("\\nleqq","\\html@mathml{\\@nleqq}{≰}");w("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");w("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");w("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");w("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");w("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");w("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");w("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");w("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");w("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");w("\\imath","\\html@mathml{\\@imath}{ı}");w("\\jmath","\\html@mathml{\\@jmath}{ȷ}");w("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}"+"{\\mathopen{\\char`⟦}}");w("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}"+"{\\mathclose{\\char`⟧}}");w("⟦","\\llbracket");w("⟧","\\rrbracket");w("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}"+"{\\mathopen{\\char`⦃}}");w("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}"+"{\\mathclose{\\char`⦄}}");w("↤","\\mapsfrom");w("\\mapsfrom","\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}");w("⦃","\\lBrace");w("⦄","\\rBrace");w("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}"+"{\\char`⦵}}");w("⦵","\\minuso");w("\\darr","\\downarrow");w("\\dArr","\\Downarrow");w("\\Darr","\\Downarrow");w("\\lang","\\langle");w("\\rang","\\rangle");w("\\uarr","\\uparrow");w("\\uArr","\\Uparrow");w("\\Uarr","\\Uparrow");w("\\N","\\mathbb{N}");w("\\R","\\mathbb{R}");w("\\Z","\\mathbb{Z}");w("\\alef","\\aleph");w("\\alefsym","\\aleph");w("\\Alpha","\\mathrm{A}");w("\\Beta","\\mathrm{B}");w("\\bull","\\bullet");w("\\Chi","\\mathrm{X}");w("\\clubs","\\clubsuit");w("\\cnums","\\mathbb{C}");w("\\Complex","\\mathbb{C}");w("\\Dagger","\\ddagger");w("\\diamonds","\\diamondsuit");w("\\empty","\\emptyset");w("\\Epsilon","\\mathrm{E}");w("\\Eta","\\mathrm{H}");w("\\exist","\\exists");w("\\harr","\\leftrightarrow");w("\\hArr","\\Leftrightarrow");w("\\Harr","\\Leftrightarrow");w("\\hearts","\\heartsuit");w("\\image","\\Im");w("\\infin","\\infty");w("\\Iota","\\mathrm{I}");w("\\isin","\\in");w("\\Kappa","\\mathrm{K}");w("\\larr","\\leftarrow");w("\\lArr","\\Leftarrow");w("\\Larr","\\Leftarrow");w("\\lrarr","\\leftrightarrow");w("\\lrArr","\\Leftrightarrow");w("\\Lrarr","\\Leftrightarrow");w("\\Mu","\\mathrm{M}");w("\\natnums","\\mathbb{N}");w("\\Nu","\\mathrm{N}");w("\\Omicron","\\mathrm{O}");w("\\plusmn","\\pm");w("\\rarr","\\rightarrow");w("\\rArr","\\Rightarrow");w("\\Rarr","\\Rightarrow");w("\\real","\\Re");w("\\reals","\\mathbb{R}");w("\\Reals","\\mathbb{R}");w("\\Rho","\\mathrm{P}");w("\\sdot","\\cdot");w("\\sect","\\S");w("\\spades","\\spadesuit");w("\\sub","\\subset");w("\\sube","\\subseteq");w("\\supe","\\supseteq");w("\\Tau","\\mathrm{T}");w("\\thetasym","\\vartheta");w("\\weierp","\\wp");w("\\Zeta","\\mathrm{Z}");w("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");w("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");w("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");w("\\bra","\\mathinner{\\langle{#1}|}");w("\\ket","\\mathinner{|{#1}\\rangle}");w("\\braket","\\mathinner{\\langle{#1}\\rangle}");w("\\Bra","\\left\\langle#1\\right|");w("\\Ket","\\left|#1\\right\\rangle");var nf=(e)=>(t)=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,s=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();var l=(h)=>(p)=>{if(e){if(p.macros.set("|",o),s.length)p.macros.set("\\|",a)}var g=h;if(!h&&s.length){var b=p.future();if(b.text==="|")p.popToken(),g=!0}return{tokens:g?s:r,numArgs:0}};if(t.macros.set("|",l(!1)),s.length)t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,d=t.expandTokens([...i,...u,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};w("\\bra@ket",nf(!1));w("\\bra@set",nf(!0));w("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");w("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");w("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");w("\\angln","{\\angl n}");w("\\blue","\\textcolor{##6495ed}{#1}");w("\\orange","\\textcolor{##ffa500}{#1}");w("\\pink","\\textcolor{##ff00af}{#1}");w("\\red","\\textcolor{##df0030}{#1}");w("\\green","\\textcolor{##28ae7b}{#1}");w("\\gray","\\textcolor{gray}{#1}");w("\\purple","\\textcolor{##9d38bd}{#1}");w("\\blueA","\\textcolor{##ccfaff}{#1}");w("\\blueB","\\textcolor{##80f6ff}{#1}");w("\\blueC","\\textcolor{##63d9ea}{#1}");w("\\blueD","\\textcolor{##11accd}{#1}");w("\\blueE","\\textcolor{##0c7f99}{#1}");w("\\tealA","\\textcolor{##94fff5}{#1}");w("\\tealB","\\textcolor{##26edd5}{#1}");w("\\tealC","\\textcolor{##01d1c1}{#1}");w("\\tealD","\\textcolor{##01a995}{#1}");w("\\tealE","\\textcolor{##208170}{#1}");w("\\greenA","\\textcolor{##b6ffb0}{#1}");w("\\greenB","\\textcolor{##8af281}{#1}");w("\\greenC","\\textcolor{##74cf70}{#1}");w("\\greenD","\\textcolor{##1fab54}{#1}");w("\\greenE","\\textcolor{##0d923f}{#1}");w("\\goldA","\\textcolor{##ffd0a9}{#1}");w("\\goldB","\\textcolor{##ffbb71}{#1}");w("\\goldC","\\textcolor{##ff9c39}{#1}");w("\\goldD","\\textcolor{##e07d10}{#1}");w("\\goldE","\\textcolor{##a75a05}{#1}");w("\\redA","\\textcolor{##fca9a9}{#1}");w("\\redB","\\textcolor{##ff8482}{#1}");w("\\redC","\\textcolor{##f9685d}{#1}");w("\\redD","\\textcolor{##e84d39}{#1}");w("\\redE","\\textcolor{##bc2612}{#1}");w("\\maroonA","\\textcolor{##ffbde0}{#1}");w("\\maroonB","\\textcolor{##ff92c6}{#1}");w("\\maroonC","\\textcolor{##ed5fa6}{#1}");w("\\maroonD","\\textcolor{##ca337c}{#1}");w("\\maroonE","\\textcolor{##9e034e}{#1}");w("\\purpleA","\\textcolor{##ddd7ff}{#1}");w("\\purpleB","\\textcolor{##c6b9fc}{#1}");w("\\purpleC","\\textcolor{##aa87ff}{#1}");w("\\purpleD","\\textcolor{##7854ab}{#1}");w("\\purpleE","\\textcolor{##543b78}{#1}");w("\\mintA","\\textcolor{##f5f9e8}{#1}");w("\\mintB","\\textcolor{##edf2df}{#1}");w("\\mintC","\\textcolor{##e0e5cc}{#1}");w("\\grayA","\\textcolor{##f6f7f7}{#1}");w("\\grayB","\\textcolor{##f0f1f2}{#1}");w("\\grayC","\\textcolor{##e3e5e6}{#1}");w("\\grayD","\\textcolor{##d6d8da}{#1}");w("\\grayE","\\textcolor{##babec2}{#1}");w("\\grayF","\\textcolor{##888d93}{#1}");w("\\grayG","\\textcolor{##626569}{#1}");w("\\grayH","\\textcolor{##3b3e40}{#1}");w("\\grayI","\\textcolor{##21242c}{#1}");w("\\kaBlue","\\textcolor{##314453}{#1}");w("\\kaGreen","\\textcolor{##71B307}{#1}");var rf={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class sf{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new ef(Bb,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new wl(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){if(this.stack.length===0)this.pushToken(this.lexer.lex());return this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken();var s=this.consumeArg(["]"]);r=s.tokens,n=s.end}else{var i=this.consumeArg();r=i.tokens,t=i.start,n=i.end}return this.pushToken(new Kt("EOF",n.loc)),this.pushTokens(r),new Kt("",zt.range(t,n))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],n=e&&e.length>0;if(!n)this.consumeSpaces();var r=this.future(),s,i=0,o=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++i;else if(s.text==="}"){if(--i,i===-1)throw new se("Extra }",s)}else if(s.text==="EOF")throw new se("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",s);if(e&&n)if((i===0||i===1&&e[o]==="{")&&s.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(i!==0||n);if(r.text==="{"&&t[t.length-1].text==="}")t.pop(),t.shift();return t.reverse(),{tokens:t,start:r,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new se("The length of delimiters doesn't match the number of args!");var n=t[0];for(var r=0;r<n.length;r++){var s=this.popToken();if(n[r]!==s.text)throw new se("Use of the macro doesn't match its definition",s)}}var i=[];for(var o=0;o<e;o++)i.push(this.consumeArg(t&&t[o+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new se("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=!t.noexpand?this._getExpansion(n):null;if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]==="\\"&&!this.isDefined(n))throw new se("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var s=r.tokens,i=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){s=s.slice();for(var o=s.length-1;o>=0;--o){var a=s[o];if(a.text==="#"){if(o===0)throw new se("Incomplete placeholder at end of macro body",a);if(a=s[--o],a.text==="#")s.splice(o+1,1);else if(/^[1-9]$/.test(a.text))s.splice(o,2,...i[+a.text-1]);else throw new se("Not a valid argument number",a)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();if(e.treatAsRelax)e.text="\\relax";return e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Kt(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;this.pushTokens(e);while(this.stack.length>n)if(this.expandOnce(!0)===!1){var r=this.stack.pop();if(r.treatAsRelax)r.noexpand=!1,r.treatAsRelax=!1;t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);if(t)return t.map((n)=>n.text).join("");else return t}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==="function"?t(this):t;if(typeof r==="string"){var s=0;if(r.includes("#")){var i=r.replace(/##/g,"");while(i.includes("#"+(s+1)))++s}var o=new wl(r,this.settings),a=[],l=o.lex();while(l.text!=="EOF")a.push(l),l=o.lex();a.reverse();var u={tokens:a,numArgs:s};return u}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(cr,e)||Object.prototype.hasOwnProperty.call(Qe.math,e)||Object.prototype.hasOwnProperty.call(Qe.text,e)||Object.prototype.hasOwnProperty.call(rf,e)}isExpandable(e){var t=this.macros.get(e);if(t!=null)return typeof t==="string"||typeof t==="function"||!t.unexpandable;return Object.prototype.hasOwnProperty.call(cr,e)&&!cr[e].primitive}}var dd=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,fo=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),nl={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:"\\\"",math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},fd={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class Mo{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new sf(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0)t=!0;if(this.fetch().text!==e)throw new se("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());if(t)this.consume()}consume(){this.nextToken=null}fetch(){if(this.nextToken==null)this.nextToken=this.gullet.expandNextToken();return this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){if(!this.settings.globalGroup)this.gullet.beginGroup();if(this.settings.colorIsTextColor)this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);if(this.expect("EOF"),!this.settings.globalGroup)this.gullet.endGroup();return e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Kt("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){var n=[];while(!0){if(this.mode==="math")this.consumeSpaces();var r=this.fetch();if(Mo.endOfExpression.has(r.text))break;if(t&&r.text===t)break;if(e&&cr[r.text]&&cr[r.text].infix)break;var s=this.parseAtom(t);if(!s)break;else if(s.type==="internal")continue;n.push(s)}if(this.mode==="text")this.formLigatures(n);return this.handleInfixNodes(n)}handleInfixNodes(e){var t=-1,n;for(var r=0;r<e.length;r++){var s=e[r];if(s.type==="infix"){if(t!==-1)throw new se("only one infix operator per group",s.token);t=r,n=s.replaceWith}}if(t!==-1&&n){var i,o,a=e.slice(0,t),l=e.slice(t+1);if(a.length===1&&a[0].type==="ordgroup")i=a[0];else i={type:"ordgroup",mode:this.mode,body:a};if(l.length===1&&l[0].type==="ordgroup")o=l[0];else o={type:"ordgroup",mode:this.mode,body:l};var u;if(n==="\\\\abovefrac")u=this.callFunction(n,[i,e[t],o],[]);else u=this.callFunction(n,[i,o],[]);return[u]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do{var s;r=this.parseGroup(e)}while(((s=r)==null?void 0:s.type)==="internal");if(!r)throw new se("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){var t=[];for(var n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t},s={type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]};return s}parseAtom(e){var t=this.parseGroup("atom",e);if((t==null?void 0:t.type)==="internal")return t;if(this.mode==="text")return t;var n,r;while(!0){this.consumeSpaces();var s=this.fetch();if(s.text==="\\limits"||s.text==="\\nolimits"){if(t&&t.type==="op")t.limits=s.text==="\\limits",t.alwaysHandleSupSub=!0;else if(t&&t.type==="operatorname"){if(t.alwaysHandleSupSub)t.limits=s.text==="\\limits"}else throw new se("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(n)throw new se("Double superscript",s);n=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(r)throw new se("Double subscript",s);r=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(n)throw new se("Double superscript",s);var i={type:"textord",mode:this.mode,text:"\\prime"},o=[i];this.consume();while(this.fetch().text==="'")o.push(i),this.consume();if(this.fetch().text==="^")o.push(this.handleSupSubscript("superscript"));n={type:"ordgroup",mode:this.mode,body:o}}else if(fo[s.text]){var a=dd.test(s.text),l=[];l.push(new Kt(fo[s.text])),this.consume();while(!0){var u=this.fetch().text;if(!fo[u])break;if(dd.test(u)!==a)break;l.unshift(new Kt(fo[u])),this.consume()}var d=this.subparse(l);if(a)r={type:"ordgroup",mode:"math",body:d};else n={type:"ordgroup",mode:"math",body:d}}else break}if(n&&r)return{type:"supsub",mode:this.mode,base:t,sup:n,sub:r};else if(n)return{type:"supsub",mode:this.mode,base:t,sup:n};else if(r)return{type:"supsub",mode:this.mode,base:t,sub:r};else return t}parseFunction(e,t){var n=this.fetch(),r=n.text,s=cr[r];if(!s)return null;if(this.consume(),t&&t!=="atom"&&!s.allowedInArgument)throw new se("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);else if(this.mode==="text"&&!s.allowedInText)throw new se("Can't use function '"+r+"' in text mode",n);else if(this.mode==="math"&&s.allowedInMath===!1)throw new se("Can't use function '"+r+"' in math mode",n);var i=this.parseArguments(r,s),{args:o,optArgs:a}=i;return this.callFunction(r,o,a,n,e)}callFunction(e,t,n,r,s){var i={funcName:e,parser:this,token:r,breakOnTokenText:s},o=cr[e];if(o&&o.handler)return o.handler(i,t,n);else throw new se("No function handler for "+e)}parseArguments(e,t){var n,r=(n=t.numOptionalArgs)!=null?n:0,s=t.numArgs+r;if(s===0)return{args:[],optArgs:[]};var i=[],o=[];for(var a=0;a<s;a++){var l,u=(l=t.argTypes)==null?void 0:l[a],d=a<r;if("primitive"in t&&t.primitive&&u==null||t.type==="sqrt"&&a===1&&o[0]==null)u="primitive";var h=this.parseGroupOfType("argument to '"+e+"'",u,d);if(d)o.push(h);else if(h!=null)i.push(h);else throw new se("Null argument, please report this as a bug")}return{args:i,optArgs:o}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":{var r=this.parseArgumentGroup(n,"text");return r!=null?{type:"styling",mode:r.mode,body:[r],style:"text",resetFont:!0}:null}case"raw":{this.gullet.consumeSpaces();var s=this.gullet.lexer.catcodes["%"];this.gullet.lexer.setCatcode("%",12);var i=this.parseStringGroup(n);return this.gullet.lexer.setCatcode("%",s),i!=null?{type:"raw",mode:"text",string:i.text}:null}case"primitive":{if(n)throw new se("A primitive argument cannot be optional");var o=this.parseGroup(e);if(o==null)throw new se("Expected group as "+e,this.fetch());return o}case"original":case void 0:return this.parseArgumentGroup(n);default:throw new se("Unknown group type as "+e,this.fetch())}}consumeSpaces(){while(this.fetch().text===" ")this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;var n="",r;while((r=this.fetch()).text!=="EOF")n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){var n=this.fetch(),r=n,s="",i;while((i=this.fetch()).text!=="EOF"&&e.test(s+i.text))r=i,s+=r.text,this.consume();if(s==="")throw new se("Invalid "+t+": '"+n.text+"'",n);return n.range(r,s)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new se("Invalid color: '"+t.text+"'",t);var r=n[0];if(/^[0-9a-f]{6}$/i.test(r))r="#"+r;return{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{")t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size");else t=this.parseStringGroup(e);if(!t)return null;if(!e&&t.text.length===0)t.text="0pt",n=!0;var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new se("Invalid size: '"+t.text+"'",t);var s={number:+(r[1]+r[2]),unit:r[3]};if(!md(s))throw new se("Invalid unit: '"+s.unit+"'",t);return{type:"size",mode:this.mode,value:s,isBlank:n}}parseUrlGroup(e){var t=this.gullet.lexer.catcodes["%"],n=this.gullet.lexer.catcodes["~"];this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode("%",t),this.gullet.lexer.setCatcode("~",n),r==null)return null;var s=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:s}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;if(t)this.switchMode(t);this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:n.loc,body:s};if(t)this.switchMode(r);return i}parseGroup(e,t){var n=this.fetch(),r=n.text,s;if(r==="{"||r==="\\begingroup"){this.consume();var i=r==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,i),a=this.fetch();this.expect(i),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:zt.range(n,a),body:o,semisimple:r==="\\begingroup"||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),s==null&&r[0]==="\\"&&!Object.prototype.hasOwnProperty.call(rf,r)){if(this.settings.throwOnError)throw new se("Undefined control sequence: "+r,n);s=this.formatUnsupportedCmd(r),this.consume()}return s}formLigatures(e){var t=e.length-1;for(var n=0;n<t;++n){var r=e[n];if(r.type!=="textord")continue;var s=r.text,i=e[n+1];if(!i||i.type!=="textord")continue;if(s==="-"&&i.text==="-"){var o=e[n+2];if(n+1<t&&o&&o.type==="textord"&&o.text==="-")e.splice(n,3,{type:"textord",mode:"text",loc:zt.range(r,o),text:"---"}),t-=2;else e.splice(n,2,{type:"textord",mode:"text",loc:zt.range(r,i),text:"--"}),t-=1}if((s==="'"||s==="`")&&i.text===s)e.splice(n,2,{type:"textord",mode:"text",loc:zt.range(r,i),text:s+s}),t-=1}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)==="*";if(r)n=n.slice(1);if(n.length<2||n.charAt(0)!==n.slice(-1))throw new se(`\\verb assertion failed --
284
+ please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}if(Object.prototype.hasOwnProperty.call(fd,t[0])&&!Qe[this.mode][t[0]]){if(this.settings.strict&&this.mode==="math")Ft({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Accented Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e});t=fd[t[0]]+t.slice(1)}var s=Ib.exec(t);if(s){if(t=t.substring(0,s.index),t==="i")t="ı";else if(t==="j")t="ȷ"}var i;if(Qe[this.mode][t]){if(this.settings.strict&&this.mode==="math"&&ol.includes(t))Ft({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Latin-1/Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e});var o=Qe[this.mode][t].group,a=zt.range(e),l;if(W2(o))l={type:"atom",mode:this.mode,family:o,loc:a,text:t};else l={type:o,mode:this.mode,loc:a,text:t};i=l}else if(t.charCodeAt(0)>=128){if(this.settings.strict){if(!hd(t.charCodeAt(0)))Ft({strict:this.settings.strict,errorCode:"unknownSymbol",errorMsg:'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),report:!0,token:e});else if(this.mode==="math")Ft({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e})}i={type:"textord",mode:"text",loc:zt.range(e),text:t}}else return null;if(this.consume(),s)for(var u=0;u<s[0].length;u++){var d=s[0][u];if(!nl[d])throw new se("Unknown accent ' "+d+"'",e);var h=nl[d][this.mode]||nl[d].text;if(!h)throw new se("Accent "+d+" unsupported in "+this.mode+" mode",e);i={type:"accent",mode:this.mode,loc:zt.range(e),label:h,isStretchy:!1,isShifty:!0,base:i}}return i}}Mo.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var Ol=function(t,n){if(!(typeof t==="string"||t instanceof String))throw TypeError("KaTeX can only parse string typed expression");var r=new Mo(t,n);delete r.gullet.macros.current["\\df@tag"];var s=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new se("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:r.subparse([new Kt("\\df@tag")])}]}return s},of=function(t,n,r){n.textContent="";var s=$l(t,r).toNode();n.appendChild(s)};if(typeof document<"u"){if(document.compatMode!=="CSS1Compat")typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),of=function(){throw new se("KaTeX doesn't work in quirks mode.")}}var $b=function(t,n){var r=$l(t,n).toMarkup();return r},zb=function(t,n){var r=new ko(n);return Ol(t,r)},af=function(t,n,r){if(r.throwOnError||!(t instanceof se))throw t;var s=ee(["katex-error"],[new qt(n)]);return s.setAttribute("title",t.toString()),s.setAttribute("style","color:"+r.errorColor),s},$l=function(t,n){var r=new ko(n);try{var s=Ol(t,r);return N2(s,t,r)}catch(i){return af(i,t,r)}},Fb=function(t,n){var r=new ko(n);try{var s=Ol(t,r);return B2(s,r)}catch(i){return af(i,t,r)}},qb="0.19.1",Hb={Span:Or,Anchor:di,SymbolNode:qt,SvgNode:bn,PathNode:qn,LineNode:vo},zl={version:qb,render:of,renderToString:$b,ParseError:se,SETTINGS_SCHEMA:rl,__parse:zb,__renderToDomTree:$l,__renderToHTMLTree:Fb,__setFontMetrics:p2,__defineSymbol:f,__defineFunction:he,__defineMacro:w,__domTree:Hb};var Df=Op(Mf(),1);var ys=Df.default;function Lf(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(a);let l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},d={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=e.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},x=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],E={match:/(\/[a-z._-]+)+/},T=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],_=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],A=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],D=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:x,literal:k,built_in:[...T,..._,"set","shopt",...A,...D]},contains:[g,e.SHEBANG(),b,h,i,o,E,a,l,u,d,n]}}function If(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",i="<[^<>]+>",o="(decltype\\(auto\\)|"+t.optional("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a=t.concat(/\batomic_/,t.either("bool","char","schar","uchar","short","ushort","int","uint","long","ulong","llong","ullong","char16_t","char32_t","wchar_t","int_least8_t","uint_least8_t","int_least16_t","uint_least16_t","int_least32_t","uint_least32_t","int_least64_t","uint_least64_t","int_fast8_t","uint_fast8_t","int_fast16_t","uint_fast16_t","int_fast32_t","uint_fast32_t","int_fast64_t","uint_fast64_t","intptr_t","uintptr_t","size_t","ptrdiff_t","intmax_t","uintmax_t"),/\b/),l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:a}]},u="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",d={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},h={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},p={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},d,{scope:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(d,{className:"string"}),n,e.C_BLOCK_COMMENT_MODE]},b=[p,g],x={className:"title",begin:t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},k=t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",E=12,A={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},D=[...b,l,n,e.C_BLOCK_COMMENT_MODE,h,d],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:A,contains:D.concat([{begin:/\(/,end:/\)/,keywords:A,contains:D.concat(["self"]),relevance:0}]),relevance:0},L={begin:"("+o+"[\\*&\\s]+){1,12}"+k,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:A,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:A,relevance:0},{begin:k,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,l,{begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,h,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,...b]};return{name:"C",aliases:["h"],keywords:A,disableAutodetect:!0,illegal:"</",contains:[].concat(R,L,D,[...b,{begin:e.IDENT_RE+"::",keywords:A},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:d,keywords:A}}}function Nf(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",i="<[^<>]+>",o="(?!struct)(decltype\\(auto\\)|"+t.optional("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:\\b[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|\\b[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|\\b0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},u,{scope:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},p={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),n,e.C_BLOCK_COMMENT_MODE]},g=[h,p],b={className:"title",begin:t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},x=t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",k=12,E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],T=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],_=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],A=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],L={type:T,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},B={className:"function.dispatch",relevance:0,keywords:{_hint:A},begin:t.concat(/\b/,`(?!${E.join("|")})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},O=[B,...g,a,n,e.C_BLOCK_COMMENT_MODE,d,u],H={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:L,contains:O.concat([{begin:/\(/,end:/\)/,keywords:L,contains:O.concat(["self"]),relevance:0}]),relevance:0},K={className:"function",begin:"("+o+"[\\*&\\s]+){1,12}"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:L,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:L,relevance:0},{begin:x,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:L,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,a,{begin:/\(/,end:/\)/,keywords:L,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,...g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:L,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(H,K,B,O,[...g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:L,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:L},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}var D3=(e)=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.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_-]*/}}),L3=["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"],I3=["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"],N3=[...L3,...I3],B3=["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(),O3=["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(),$3=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),z3=["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-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","corner-bottom-left-shape","corner-bottom-right-shape","corner-shape","corner-top-left-shape","corner-top-right-shape","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Bf(e){let t=e.regex,n=D3(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",i=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+O3.join("|")+")"},{begin:":(:)?("+$3.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+z3.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:B3.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+N3.join("|")+")\\b"}]}}function Of(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function $f(e){let i={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:i,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\b0[bB](_?[01])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,illegal:/["']/}]}]}}var ks="[0-9](_*[0-9])*",Bo=`\\.(${ks})`,Oo="[0-9a-fA-F](_*[0-9a-fA-F])*",zf={className:"number",variants:[{begin:`(\\b(${ks})((${Bo})|\\.)?|(${Bo}))[eE][+-]?(${ks})[fFdD]?\\b`},{begin:`\\b(${ks})((${Bo})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Bo})[fFdD]?\\b`},{begin:`\\b(${ks})[fFdD]\\b`},{begin:`\\b0[xX]((${Oo})\\.?|(${Oo})?\\.(${Oo}))[pP][+-]?(${ks})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Oo})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Ff(e,t,n){if(n===-1)return"";return e.replace(t,(r)=>Ff(e,t,n-1))}function qf(e){let t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r="(?:(?:\\s*\\[\\s*])+)?",s="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"+"<@@@>(?:(?:\\s*\\[\\s*])+)?",o="(?:"+("\\?(?:\\s+(?:extends|super)\\s+"+s+")?")+"|"+s+")",a=Ff("(?:\\s*<\\s*"+o+"(?:\\s*,\\s*"+o+")*\\s*>)?",/<@@@>/g,2),p={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},g={className:"meta",begin:"@"+"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{beginKeywords:"new throw return else yield assert",relevance:0},{begin:["[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t.concat(a,"(?:(?:\\s*\\[\\s*])+)?",/\s+/),"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*","(?:(?:\\s*\\[\\s*])+)?",/\s*/,/=(?!=)/],className:{1:"type",3:"variable",6:"operator"}},{begin:[/record/,/\s+/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"],className:{1:"keyword",3:"title.class"},contains:[b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:["[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t.concat(a,"(?:(?:\\s*\\[\\s*])+)?",/\s+/),"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",/\s*(?=\()/],className:{1:"type",3:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,zf,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},zf,g]}}var F3=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],q3=["true","false","null","undefined","NaN","Infinity"],Hf=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Pf=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Uf=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],H3=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],P3=[].concat(Uf,Hf,Pf);function Wf(e){let t=e.regex,n=(Z,{after:Q})=>{let oe="</"+Z[0].slice(1);return Z.input.indexOf(oe,Q)!==-1},r="[A-Za-z$_][0-9A-Za-z$_]*",s={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,Q)=>{let oe=Z[0].length+Z.index,F=Z.input[oe];if(F==="<"||F===","){Q.ignoreMatch();return}if(F===">"){if(!n(Z,{after:oe}))Q.ignoreMatch()}let X,te=Z.input.substring(oe);if(X=te.match(/^\s*=/)){Q.ignoreMatch();return}if(X=te.match(/^\s+extends\s+/)){if(X.index===0){Q.ignoreMatch();return}}}},a={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:F3,literal:q3,built_in:P3,"variable.language":H3},l="[0-9](_?[0-9])*",u="\\.([0-9](_?[0-9])*)",d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:"(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((\\.([0-9](_?[0-9])*))|\\.)?|(\\.([0-9](_?[0-9])*)))[eE][+-]?([0-9](_?[0-9])*)\\b"},{begin:"\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((\\.([0-9](_?[0-9])*))\\b|\\.)?|(\\.([0-9](_?[0-9])*))\\b"},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},T={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:"[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,{match:/\$\d+/},h];p.contains=_.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(_)});let A=[].concat(T,p.contains),D=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(A)}]),R={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:D},L={variants:[{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s+/,/extends/,/\s+/,t.concat("[A-Za-z$_][0-9A-Za-z$_]*","(",t.concat(/\./,"[A-Za-z$_][0-9A-Za-z$_]*"),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*"],scope:{1:"keyword",3:"title.class"}}]},B={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Hf,...Pf]}},O={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},H={variants:[{match:[/function/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(Z){return t.concat("(?!",Z.join("|"),")")}let de={match:t.concat(/\b/,G([...Uf,"super","import","await"].map((Z)=>`${Z}\\s*\\(`)),"[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ne={begin:t.concat(/\./,t.lookahead(t.concat("[A-Za-z$_][0-9A-Za-z$_]*",/(?![0-9A-Za-z$_(])/))),end:"[A-Za-z$_][0-9A-Za-z$_]*",excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ae={match:[/get|set/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},R]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",j={match:[/const|var|let/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[R]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:B},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),O,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,T,{match:/\$\d+/},h,B,{scope:"attr",match:"[A-Za-z$_][0-9A-Za-z$_]*"+t.lookahead(":"),relevance:0},j,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:i},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},H,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*",className:"title.function"})]},{match:/\.\.\./,relevance:0},ne,{match:"\\$[A-Za-z$_][0-9A-Za-z$_]*",relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[R]},de,K,L,ae,{match:/\$[(.]/}]}}var U3={scope:"number",match:"([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",relevance:0};function jf(e){let t={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,U3,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function Gf(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={match:/^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},i={className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(u,{contains:[]}),p=e.inherit(d,{contains:[]});u.contains.push(p),d.contains.push(h);let g=[n,l];return[u,d,h,p].forEach((E)=>{E.contains=E.contains.concat(g)}),g=g.concat(u,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},n,i,r,u,d,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},s,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Kf(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","lazy","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","aiter","all","anext","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozendict","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","sentinel","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},d={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,d,u]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,d,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,u]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",g="(\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.",b=`\\b|${r.join("|")}`,x={className:"number",relevance:0,variants:[{begin:`(\\b([0-9](_?[0-9])*)|((\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.))[eE][+-]?([0-9](_?[0-9])*)[jJ]?(?=${b})`},{begin:"((\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.)[jJ]?"},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b([0-9](_?[0-9])*)[jJ](?=${b})`}]},k={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},E={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,x,h,e.HASH_COMMENT_MODE]}]};return u.contains=[h,x,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,x,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[E]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[x,E,h]}]}}function Vf(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),i={scope:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!(?:let|for|while|if|else|match)\b)/,s,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(16|32|64|128))?",a=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","raw","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f16","f32","f64","f128","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:d,keyword:a,literal:l,built_in:u},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{scope:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|"|\\|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{scope:"number",variants:[{begin:"\\b0b([01_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b0o([0-7_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b0x([A-Fa-f0-9_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"}],relevance:0},{begin:[/\bsafe/,/\s+/,/extern/],scope:{1:"keyword",3:"keyword"}},{begin:[/fn/,/\s+/,r],scope:{1:"keyword",3:"title.function"}},{scope:"meta",begin:"#!?\\[",end:"\\]",contains:[{scope:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],scope:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],scope:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],scope:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],scope:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:u,type:d}},{scope:"punctuation",begin:"->"},i]}}function Jf(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],h=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],p=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],g=d,b=[...u,...l].filter((D)=>!d.includes(D)),x={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},k={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},E={match:t.concat(/\b/,t.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function T(D){return t.concat(/\b/,t.either(...D.map((R)=>R.replace(/\s+/,"\\s+"))),/\b/)}let _={scope:"keyword",match:T(p),relevance:0};function A(D,{exceptions:R,when:L}={}){let B=L;return R=R||[],D.map((O)=>{if(O.match(/\|\d+$/)||R.includes(O))return O;else if(B(O))return`${O}|0`;else return O})}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:A(b,{when:(D)=>D.length<3}),literal:i,type:a,built_in:h},contains:[{scope:"type",match:T(o)},_,E,x,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}var Zf=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Yf=["true","false","null","undefined","NaN","Infinity"],Xf=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Qf=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],eh=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],th=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],nh=[].concat(eh,Xf,Qf);function W3(e){let t=e.regex,n=(Z,{after:Q})=>{let oe="</"+Z[0].slice(1);return Z.input.indexOf(oe,Q)!==-1},r="[A-Za-z$_][0-9A-Za-z$_]*",s={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,Q)=>{let oe=Z[0].length+Z.index,F=Z.input[oe];if(F==="<"||F===","){Q.ignoreMatch();return}if(F===">"){if(!n(Z,{after:oe}))Q.ignoreMatch()}let X,te=Z.input.substring(oe);if(X=te.match(/^\s*=/)){Q.ignoreMatch();return}if(X=te.match(/^\s+extends\s+/)){if(X.index===0){Q.ignoreMatch();return}}}},a={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:Zf,literal:Yf,built_in:nh,"variable.language":th},l="[0-9](_?[0-9])*",u="\\.([0-9](_?[0-9])*)",d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:"(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((\\.([0-9](_?[0-9])*))|\\.)?|(\\.([0-9](_?[0-9])*)))[eE][+-]?([0-9](_?[0-9])*)\\b"},{begin:"\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((\\.([0-9](_?[0-9])*))\\b|\\.)?|(\\.([0-9](_?[0-9])*))\\b"},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},T={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:"[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,{match:/\$\d+/},h];p.contains=_.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(_)});let A=[].concat(T,p.contains),D=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(A)}]),R={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:D},L={variants:[{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s+/,/extends/,/\s+/,t.concat("[A-Za-z$_][0-9A-Za-z$_]*","(",t.concat(/\./,"[A-Za-z$_][0-9A-Za-z$_]*"),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*"],scope:{1:"keyword",3:"title.class"}}]},B={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Xf,...Qf]}},O={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},H={variants:[{match:[/function/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(Z){return t.concat("(?!",Z.join("|"),")")}let de={match:t.concat(/\b/,G([...eh,"super","import","await"].map((Z)=>`${Z}\\s*\\(`)),"[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ne={begin:t.concat(/\./,t.lookahead(t.concat("[A-Za-z$_][0-9A-Za-z$_]*",/(?![0-9A-Za-z$_(])/))),end:"[A-Za-z$_][0-9A-Za-z$_]*",excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ae={match:[/get|set/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},R]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",j={match:[/const|var|let/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[R]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:B},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),O,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,T,{match:/\$\d+/},h,B,{scope:"attr",match:"[A-Za-z$_][0-9A-Za-z$_]*"+t.lookahead(":"),relevance:0},j,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:i},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},H,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*",className:"title.function"})]},{match:/\.\.\./,relevance:0},ne,{match:"\\$[A-Za-z$_][0-9A-Za-z$_]*",relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[R]},de,K,L,ae,{match:/\$[(.]/}]}}function rh(e){let t=e.regex,n=W3(e),r="[A-Za-z$_][0-9A-Za-z$_]*",s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:Zf.concat(l),literal:Yf,built_in:nh.concat(s),"variable.language":th},d={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},h=(x,k,E)=>{let T=x.contains.findIndex((_)=>_.label===k);if(T===-1)throw Error("can not find mode to replace");x.contains.splice(T,1,E)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(d);let p=n.contains.find((x)=>x.scope==="attr"),g=Object.assign({},p,{match:t.concat("[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,p,g]),n.contains=n.contains.concat([d,i,o,g]),h(n,"shebang",e.SHEBANG()),h(n,"use_strict",a);let b=n.contains.find((x)=>x.label==="func.def");return b.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function sh(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(i,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,l,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,o,l,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:"javascript"}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function ih(e){let r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},a=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l="[0-9]{4}(-[0-9][0-9]){0,2}",u="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",d="(\\.[0-9]*)?",h="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",p={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:"true false yes no null",relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},x={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},k=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"type",begin:"!<[\\w#;/?:@&=+$,.~*'()[\\]]+>"},{className:"type",begin:"![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"type",begin:"!![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:"true false yes no null",keywords:{literal:"true false yes no null"}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},b,x,i,o],E=[...k];return E.pop(),E.push(a),g.contains=E,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}var j3={bash:Lf,c:If,cpp:Nf,css:Bf,diff:Of,go:$f,java:qf,javascript:Wf,json:jf,markdown:Gf,python:Kf,rust:Vf,sql:Jf,typescript:rh,xml:sh,yaml:ih};for(let[e,t]of Object.entries(j3))ys.registerLanguage(e,t);ys.registerAliases(["sh","shell","zsh"],{languageName:"bash"});ys.registerAliases("tsx",{languageName:"typescript"});var $o=262144,G3=24576,uh=4096,K3=65536,Ht=new bu({html:!1,linkify:!0,maxNesting:24}),pr=Ht.utils.escapeHtml,V3=0,oh=new WeakMap,ah=new WeakMap;function dh(e,t){if(!e||typeof e.remaining!=="number"||e.remaining<t)return!1;return e.remaining-=t,!0}function Wl(e){if(!/^(?:https?:\/\/|mailto:)/i.test(e))return;let t=URL.parse(e);if(t&&!t.username&&!t.password&&t.origin!==globalThis.location?.origin)return t}function lh(e){return e.normalize("NFKC").toLowerCase().trim().replace(/[^\p{L}\p{N}\p{M}_\s-]/gu,"").replace(/\s+/g,"-")}Ht.validateLink=(e)=>e.startsWith("#")||Wl(e)!==void 0;function fh(e,t,n){if(e.length<=uh&&dh(n,e.length+64))try{return zl.renderToString(e,{displayMode:t,output:"mathml",trust:!1,maxExpand:128,maxSize:20})}catch(r){if(!(r instanceof zl.ParseError))throw r}return`<code class="math-source">${pr(e)}</code>`}Ht.use(wu).use(Eu,{disabled:!0,label:!1}).use(Ru,{delimiters:"all",mathFence:!0,render(e,t,n){let r=fh(e,t,n);return t?`<div class="markdown-math">${r}</div>
285
+ `:r}});Ht.inline.ruler.before("escape","web_display_math",(e,t)=>{if(!e.src.startsWith("\\[",e.pos)||e.pos+2>=e.posMax)return!1;let n=e.pos+2,r=e.src.slice(n,Math.min(e.posMax,n+uh+2)),s=/(?<!\\)(?:\\\\)*\\\]/u.exec(r);if(!s||/[\r\n]/u.test(r.slice(0,s.index)))return!1;let i=s.index+s[0].length-2,o=r.slice(0,i);if(!o.trim())return!1;if(!t)e.push("web_display_math","span",0).content=o;return e.pos=n+i+2,!0});Ht.renderer.rules.web_display_math=(e,t,n,r)=>`<span class="markdown-math markdown-math-in-prose">${fh(e[t].content,!0,r)}</span>`;Ht.renderer.rules.link_open=(e,t,n,r,s)=>{let i=e[t],o=String(i.attrGet("href")??"");if(o.startsWith("#"))i.attrSet("data-markdown-fragment",o.slice(1)),i.attrSet("href","#");else if(Wl(o)?.protocol!=="mailto:")i.attrSet("target","_blank"),i.attrSet("rel","noopener noreferrer");return s.renderToken(e,t,n)};Ht.renderer.rules.image=(e,t,n,r,s)=>{let i=e[t],o=s.renderInlineAsText(i.children??[],n,r),a=Wl(String(i.attrGet("src")??""));if(!a||a.protocol==="mailto:")return pr(o);for(let u=t-1;i.level>0&&u>=0;u--){if(e[u].type==="link_open")return pr(o||a.hostname);if(e[u].type==="link_close")break}let l=c(`打开图片:${o||a.hostname}`,`Open image: ${o||a.hostname}`);return`<a class="markdown-image" href="${pr(a.href)}" target="_blank" rel="noopener noreferrer">${pr(l)}</a>`};function hh(e,t,n){let r=/^[a-z0-9][a-z0-9_+#.-]{0,23}$/i.test(t)?t.toLowerCase():"",s=r&&e.length<=G3&&ys.getLanguage(r)&&dh(n,e.length+64),i=s?ys.highlight(e,{language:r,ignoreIllegals:!0}).value:pr(e);return`<div class="markdown-code"><div class="markdown-code-bar"><span>${pr(r||c("代码","Code"))}</span><button type="button" class="button button--quiet markdown-copy">${c("复制代码","Copy code")}</button></div><pre tabindex="0"><code${r?` class="${s?"hljs ":""}language-${pr(r)}"`:""}>${i}</code></pre></div>
286
+ `}var ch=Ht.renderer.rules.fence;Ht.renderer.rules.fence=(e,t,n,r,s)=>{let i=e[t],o=i.info.trim().split(/\s+/,1)[0]??"";return o==="math"&&ch?ch(e,t,n,r,s):hh(i.content,o,r)};Ht.renderer.rules.code_block=(e,t,n,r)=>hh(e[t].content,"",r);Ht.renderer.rules.table_open=()=>'<div class="markdown-table" tabindex="0" role="region" aria-label="'+c("表格","Table")+`"><table>
287
+ `;Ht.renderer.rules.table_close=()=>`</table></div>
288
+ `;for(let e of["th","td"])Ht.renderer.rules[`${e}_open`]=(t,n)=>{let r=String(t[n].attrGet("style")??"").match(/^text-align:(left|center|right)$/)?.[1];return r?`<${e} class="markdown-align-${r}">`:`<${e}>`};function J3(e,t){let n=new Map,r=new Map;for(let s of e.querySelectorAll("h1, h2, h3, h4, h5, h6")){let i=lh(s.textContent);if(!i)continue;let o=i,a=r.get(i)??1;while(n.has(o))o=`${i}-${a++}`;r.set(i,a),s.id=`${t}-${o}`,n.set(o,s.id)}for(let s of e.querySelectorAll("a[data-markdown-fragment]")){let i=s.dataset.markdownFragment??"",o;try{o=decodeURIComponent(i)}catch(l){if(!(l instanceof URIError))throw l;o=i}let a=n.get(lh(o));if(a)s.setAttribute("href",`#${encodeURIComponent(a)}`);else s.removeAttribute("href");delete s.dataset.markdownFragment}}function Z3(e){e.addEventListener("click",async(t)=>{let n=t.target;if(!(n instanceof HTMLButtonElement)||!n.matches(".markdown-copy"))return;let r=n.closest(".markdown-code")?.querySelector("pre > code");if(!r||n.getAttribute("aria-busy")==="true")return;n.setAttribute("aria-busy","true");try{await navigator.clipboard.writeText(r.textContent),n.textContent=c("已复制","Copied")}catch(s){if(!(s instanceof DOMException||s instanceof TypeError))throw s;n.textContent=c("复制失败","Copy failed")}finally{n.removeAttribute("aria-busy")}})}function Y3(e,t,n){let r=e.children[n],s=t.outerHTML;if(r&&ah.get(r)===s)return;if(ah.set(t,s),!r){e.append(t);return}let i=document.activeElement,o=i instanceof HTMLAnchorElement&&r.contains(i)?i.getAttribute("href"):null;if(r.replaceWith(t),o)[...t.querySelectorAll("a[href]")].find((a)=>a.getAttribute("href")===o)?.focus({preventScroll:!0})}function jl(e,t=y("div","prose")){let n=oh.get(t);if(n?.text===e)return t;let r=n?.id??`omo-markdown-${++V3}`;if(!n)Z3(t);let s=document.createDocumentFragment();if(e.length>$o)s.append(y("p","small muted",c("正文过长,已按纯文本显示。","This long message is displayed as plain text.")),y("div","plain break",e));else{let o=y("template");o.innerHTML=Ht.render(e,{docId:r,remaining:K3}),J3(o.content,r),s.append(o.content)}let i=[...s.children];for(let[o,a]of i.entries())Y3(t,a,o);while(t.childElementCount>i.length)t.lastElementChild?.remove();return oh.set(t,{id:r,text:e}),t}function mh(e){if(!e.startsWith('The user explicitly invoked the "')){if(!e.startsWith("<skill name="))return;let o=/^<skill name="([^"]+)" location="([^"]+)">\n([\s\S]*?)\n<\/skill>(?:\n\n([\s\S]+))?$/u.exec(e);if(o)return{skills:[{name:o[1],location:o[2],content:o[3]}],request:o[4]??""};return}let t=/The user explicitly invoked the "([^"]+)" skill\. Follow the instructions in <skill-instruction> as binding for this request, while respecting higher-priority instructions\.\n\n<skill-instruction name="([^"]+)" location="([^"]+)">\n([\s\S]*?)\n<\/skill-instruction>/uy,n=[],r=0;while(!0){t.lastIndex=r;let o=t.exec(e);if(!o||o[1]!==o[2])return;if(n.push({name:o[1],location:o[3],content:o[4]}),r=t.lastIndex,!e.startsWith(`
289
+
290
+ The user explicitly invoked the "`,r))break;r+=2}if(r===e.length)return{skills:n,request:""};let s=r+17,i=e.length-16;if(s<=i&&e.startsWith(`
291
+
292
+ <user-request>
293
+ `,r)&&e.endsWith(`
294
+ </user-request>`))return{skills:n,request:e.slice(s,i)}}function ph({skills:e}){let t=e.slice(0,3).map(({name:n})=>{let r=n.slice(0,24).replace(/[\uD800-\uDBFF]$/u,"").replace(/\s+/gu," ").trim();return n.length>24?`${r}…`:r||"…"});if(e.length>t.length)t.push(`+${e.length-t.length}`);return t.join(" · ")}function gh({skills:e}){return e.map(({name:t,location:n,content:r})=>`${t} · ${n}
295
+
296
+ ${r}`).join(`
297
+
298
+ `)}var bh=/^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/u,X3=new Intl.NumberFormat(me,{style:"unit",unit:"byte"}),Q3=new Intl.NumberFormat(me,{maximumFractionDigits:1}),e5=["KiB","MiB","GiB","TiB","PiB"];function vh(e,t){if(!e||!bh.test(e)||!Array.isArray(t)||t.length!==1)return;let n=U(t[0]),r=C(n.text);if(n.type!=="text"||!r||r.length>2048)return;let s;try{s=U(JSON.parse(r))}catch(g){if(g instanceof SyntaxError)return;throw g}let{omoWebAttachment:i,id:o,name:a,size:l}=s;if(Object.keys(s).length!==4||i!==1||typeof o!=="string"||!bh.test(o)||typeof a!=="string"||!a||a.length>255||/[\\/\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u.test(a)||typeof l!=="number"||!Number.isSafeInteger(l)||l<0)return;let u=l,d;for(let g of e5){if(u<1024)break;u/=1024,d=g}let h=d?`${Q3.format(u)} ${d}`:X3.format(u),p=y("a","tool-attachment");return p.href=`/api/sessions/${e}/attachments/${o}`,p.download=a,p.append(`${c("下载","Download")} `,y("bdi","tool-attachment-name",a),` · ${h}`),p}var t5=new Map([["init",c("初始化","Set up list")],["start",c("请求开始","Request to start")],["done",c("请求完成","Request to complete")],["drop",c("请求放弃","Request to drop")],["rm",c("请求移除","Request to remove")],["append",c("追加","Append")],["view",c("查看","View")]]),yh=24,Gl=(e,t)=>typeof e==="string"&&e.length<=t&&Boolean(e.trim())&&!/[\p{Cc}\p{Cf}]/u.test(e);function n5(e){if(e.op!=="init"&&e.op!=="append")return;let t=e.list!==void 0;if(t&&(e.op!=="init"||e.items!==void 0))return;let n=t?e.list:[{items:e.items,phase:e.op==="append"?e.phase:void 0}];if(!Array.isArray(n)||n.length>yh)return;let r=[],s=0;for(let i of n){let{phase:o,items:a}=U(i);if((t||o!==void 0)&&!Gl(o,96))return;if(!Array.isArray(a)||s+a.length>yh||!a.every((l)=>Gl(l,240)))return;if(s+=a.length,a.length)r.push({phase:C(o)||void 0,items:a})}return r}function kh(e){return e.length<=48&&/^[\p{L}][\p{L}\p{M}\p{N}]*(?: [\p{L}\p{N}][\p{L}\p{M}\p{N}]*)*$/u.test(e)&&(e.includes(" ")||/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u.test(e))&&!/[a-z0-9]{21,}|\d{6,}|\b(?:password|passwd|secret|credential|token|authorization|bearer|api key|private key)\b|凭据|密钥|口令|令牌|密码/iu.test(e)&&!/^(?:bash|sh|zsh|fish|pwsh|powershell|sudo|env|git|cd|ls|cat|printf|echo|rm|cp|mv|mkdir|touch|curl|wget|ssh|scp|chmod|chown|find|grep|rg|node|bun|npm|npx|python3?|pip|uv|docker|kubectl|kubectx|systemctl|make|sed|awk|head|tail|dd|export|set)\b/iu.test(e)}function wh(e){let t=C(e.op),n=t5.get(t),r=n5(e),s=r?.flatMap((p)=>p.items)??[],i=s.map((p)=>p.trim()).filter(kh),a=(t==="start"||t==="done"||t==="drop"||t==="rm")&&e.phase===void 0&&e.list===void 0&&e.items===void 0&&Gl(e.task,240)?e.task.trim():void 0,l=a&&kh(a)?a:void 0,u=l??i[0],d=s.length.toLocaleString(me),h=(s.length-1).toLocaleString(me);return{operation:n&&r!==void 0?c(`${n} · ${d} 项`,`${n} · ${d} ${s.length===1?"task":"tasks"}`):n,preview:u&&s.length>1?c(`${u} · 另 ${h} 项`,`${u} · ${h} more`):u,batches:r??[],card:l?{heading:c("待办变更","Task changes"),titles:[l],total:1}:i.length?{heading:t==="append"?c("新增待办","Add tasks"):c("提交的待办","Tasks submitted"),titles:i,total:s.length}:void 0}}var Vl={inspect:"M7 3h6l4 4v6l-4 4H7l-4-4V7Zm8 12 6 6",modify:"m3 15 12-12h3l3 3v3L9 21H3Zm10-10 6 6",terminal:"M3 5h14l4 4v10H7l-4-4Zm4 4 3 3-3 3m6 0h4",memory:"M8 5V3m8 2V3M8 21v-2m8 2v-2M5 5h11l3 3v11H8l-3-3Zm4 4h4m-4 5h6",todo:"M6 3h10l3 3v12l-3 3H5V4Zm2 6 2 2 4-4m-6 9h7",execution:"m8 6-6 6 6 6m8-12 6 6-6 6m-3-14-2 16",context:"M8 4H6L3 7v10l3 3h2m8-16h2l3 3v10l-3 3h-2M8 9h8m-8 6h8",agent:"M8 3h4l3 3v4l-3 3H8l-3-3V6ZM2 21v-3l3-3h10l3 3v3m0-18 4 4v5",web:"M8 3h8l5 5v8l-5 5H8l-5-5V8Zm-5 9h18m-9-9-3 5v8l3 5 3-5V8Z",unknown:"M7 3h10l4 4v10l-4 4H7l-4-4V7Zm2 5 2-1h2l2 2v2l-3 2v1m0 3v.1"},r5=new Map([["create",[c("新建","Create"),c("记忆条目","Memory entry")]],["str_replace",[c("替换","Replace"),c("正文","Content")]],["insert",[c("插入","Insert"),c("正文","Content")]],["delete",[c("删除","Delete"),c("记忆条目","Memory entry")]],["rename",[c("重命名","Rename"),c("名称","Name")]],["update_description",[c("更新描述","Update description"),c("描述","Description")]],["apply_patch",[c("应用补丁","Apply patch"),c("记忆补丁","Memory patch")]]]),s5=new Map([["js","JavaScript"],["javascript","JavaScript"],["ts","TypeScript"],["typescript","TypeScript"],["py","Python"],["python","Python"],["shell","Shell"],["bash","Bash"],["powershell","PowerShell"]]);function xh(e,t){if(e==="eval"&&t.action!==void 0&&t.action!=="run")return{};let n=e==="eval"?t.language==="js"?"JavaScript":t.language==="py"?"Python":void 0:s5.get(C(t.language).toLowerCase());return{preview:n,source:C(t.code)||void 0,facts:n?[[c("语言","Language"),n]]:void 0}}var Fo=/^(?:sk-|gh[pousr]_|github_pat_|xox[baprs]-|AKIA[A-Z0-9]{16}$)/iu,Kl=(e)=>typeof e==="string"&&/^[a-z][a-z0-9_-]{0,47}$/u.test(e)&&!Fo.test(e);function i5(e){let t=[];for(let[n,r]of[[c("类别","Category"),e.category],[c("角色","Role"),e.subagent_type]])if(Kl(r))t.push(`${n} ${r}`);if(typeof e.run_in_background==="boolean")t.push(e.run_in_background?c("后台","Background"):c("前台","Foreground"));return t}var Ch=24,o5=16384,qr=(e)=>typeof e==="string"&&e.length<=o5&&/\S/u.test(e);function zo(e,t){if(Array.isArray(e)&&e.length>0&&e.length<=Ch&&e.every(t))return e.length}function _h(e,t){if(e===void 0&&Kl(t))return c(`角色 ${t}`,`Role ${t}`);if(t===void 0&&Kl(e))return c(`类别 ${e}`,`Category ${e}`)}function a5(e){if(e.prompt!==void 0||!Array.isArray(e.tasks)||!e.tasks.length||e.tasks.length>Ch)return;let t=[];for(let n of e.tasks){let r=U(n),s=r.category===void 0?e.category:r.category,i=r.subagent_type===void 0?e.subagent_type:r.subagent_type,o=_h(s,i);if(!o||!qr(r.prompt))return;t.push({route:o,prompt:r.prompt})}return t}var l5=new Map([["status",c("状态","Status")],["tail",c("最近输出","Recent output")],["full",c("完整输出","Full output")]]);function Hr(e){if(typeof e!=="string"||e.length>65536)return;if(!e.length)return 0;return(e.match(/\r\n|[\n\r]/gu)?.length??0)+(e.endsWith(`
299
+ `)||e.endsWith("\r")?0:1)}function pi(e){let t=e.toLocaleString(me);return c(`${t} 行`,`${t} ${e===1?"line":"lines"}`)}function Eh(e,t,n){if(e==="apply_patch"){let o=(C(n)||C(t.patch)||C(t.patchText)).trim();if(o.length>65536||!/^\*\*\* Begin Patch\r?\n/u.test(o)||!/\n\*\*\* End Patch$/u.test(o))return[];let a=[];for(let[l,u]of[["Add",c("提交新增","Add")],["Update",c("提交更新","Update")],["Delete",c("提交删除","Delete")]]){let d=[...o.matchAll(new RegExp(`^\\*\\*\\* ${l} File: [^\\r\\n]+`,"gmu"))].length,h=d.toLocaleString(me);if(d)a.push([u,c(`${h} 个文件`,`${h} ${d===1?"file":"files"}`)])}return a}if(e==="write"||e==="write_file"){let o=Hr(t.content);return o===void 0?[]:[[c("提交文本","Submitted text"),pi(o)]]}let r=Hr(t.oldText??t.old_string),s=Hr(t.newText??t.new_string),i=[];if(r!==void 0)i.push([c("替换前","Before replacement"),pi(r)]);if(s!==void 0)i.push([r===void 0?c("提交文本","Submitted text"):c("替换后","After replacement"),pi(s)]);return i}function Ah(e){let t=C(e),n=/^https?:\/\/([^/?#\\]+)/iu.exec(t)?.[1];if(!n||n.includes("@")||/[\s\\\p{Cc}\p{Cf}]/u.test(t))return;let r=URL.parse(t);if(!r||r.username||r.password)return;let s=r.hostname.replace(/\.$/u,"");if(s.length>253||!/[a-z]/iu.test(s))return;if(!s.split(".").every((i)=>/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/iu.test(i)&&!Fo.test(i)))return;return s}function gr(e){let t=C(e);if(!t||t.length>512||!/^[\p{L}\p{M}\p{N}_.~ /\\-]+$/u.test(t)||t.startsWith("-"))return"";if(t==="."||t===".."||t==="~")return t;let n=t.split(/[/\\]/).filter(Boolean);if(n.some((r)=>Fo.test(r)))return"";if(!/[/\\]/.test(t)&&!/^(?:[\p{L}_][\p{L}\p{M}\p{N}_-]{0,23}|[\p{L}\p{N}_-]*\.[\p{L}\p{N}]{1,10})$/u.test(t))return"";return n.length>3?`…/${n.slice(-3).join("/")}`:`${t.startsWith("/")?"/":""}${n.join("/")}`}function Jl(e,t){let n=U(t),{path:r,file_path:s,filePath:i}=n,o=e.toLowerCase();switch(o){case"read":case"read_file":return{kind:"inspect",label:c("读取文件","Read file"),group:"Read",target:gr(r??s??i)};case"grep":return{kind:"inspect",label:c("搜索内容","Search contents"),group:"Grep",target:gr(r)};case"search":return{kind:"inspect",label:c("搜索内容","Search contents"),target:gr(r)};case"find":return{kind:"inspect",label:c("查找文件","Find files"),group:"Find",target:gr(r)};case"glob":return{kind:"inspect",label:c("查找文件","Find files"),group:"Glob",target:gr(r)};case"ls":case"list":case"list_dir":case"list_directory":case"list_files":return{kind:"inspect",label:c("列出目录","List directory"),group:"List",target:gr(r)};case"tool_search":return{kind:"inspect",label:c("查找工具","Find tools"),group:"Tool Search"};case"edit":case"edit_file":case"multiedit":case"apply_patch":return{kind:"modify",label:c("编辑文件","Edit file"),target:gr(r??s??i),facts:Eh(o,n,t)};case"write":case"write_file":return{kind:"modify",label:c("写入文件","Write file"),target:gr(r??s??i),facts:Eh(o,n,t)};case"bash":case"shell":case"powershell":return{kind:"terminal",label:o==="powershell"?"PowerShell":o==="shell"?"Shell":"Bash",operation:c("运行命令","Run command"),command:C(n.command)};case"bash_output":return{kind:"terminal",label:"Bash",operation:c("读取输出","Read output")};case"kill_bash":return{kind:"terminal",label:"Bash",operation:c("终止命令","Stop command")};case"memory":{let[a,l]=r5.get(C(n.command))??[];return{kind:"memory",label:"Memory",operation:a,facts:l?[[c("变更对象","Change target"),l]]:void 0}}case"todo":case"todowrite":{let a=wh(n);return{kind:"todo",label:"Todo",operation:a.operation,preview:a.preview,todo:a}}case"eval":{let a=C(n.action),l=a==="peek"?c("查看执行","View run"):a==="list"?c("列出执行","List runs"):a==="stop"?c("停止执行","Stop run"):a==="run"||n.action===void 0?c("执行脚本","Run script"):void 0;return{kind:"execution",label:"Eval",operation:l,...xh(o,n),group:l&&a!=="stop"&&(n.reset===void 0||n.reset===!1)?"Eval":void 0}}case"ctx_execute":case"ctx_execute_file":return{kind:"context",label:"Ctx Execute",operation:c("执行脚本","Run script"),group:"Ctx Execute",...xh(o,n)};case"ctx_search":{let a=zo(n.queries,qr);return{kind:"context",label:"Ctx Search",operation:c("搜索上下文","Search context"),group:"Ctx Search",facts:a===void 0?void 0:[[c("查询","Queries"),c(`${a.toLocaleString(me)} 条`,a.toLocaleString(me))]]}}case"ctx_batch":{let a=zo(n.commands,qr),l=zo(n.queries,qr),u=a!==void 0&&l!==void 0?{preview:c(`提交 ${a.toLocaleString(me)} 条命令 · ${l.toLocaleString(me)} 条查询`,`Submitted ${a.toLocaleString(me)} ${a===1?"command":"commands"} · ${l.toLocaleString(me)} ${l===1?"query":"queries"}`),facts:[[c("命令","Commands"),c(`${a.toLocaleString(me)} 条`,a.toLocaleString(me))],[c("查询","Queries"),c(`${l.toLocaleString(me)} 条`,l.toLocaleString(me))]]}:void 0;return{kind:"context",label:"Ctx Batch",operation:c("批量查询","Batch search"),group:"Ctx Batch",...u}}case"ctx_index":{let a=[[n.path,c("本机文件","Local file")],[n.content,c("提交文本","Submitted text")],[n.url,c("网页地址","Web address")]].filter(([u])=>qr(u)),l=a.length===1?C(a[0]?.[1]):"";return{kind:"context",label:"Ctx Index",operation:c("收录上下文","Index context"),facts:l?[[c("来源类型","Source type"),l]]:void 0}}case"ctx_purge":{let a=[n.project===!0&&c("项目","Project"),C(n.session)&&c("指定会话","Selected session"),C(n.source)&&c("指定来源","Selected source")].filter(Boolean),l=a.length===1?C(a[0]):"";return{kind:"context",label:"Ctx Purge",operation:c("清除上下文","Clear context"),facts:l?[[c("清除范围","Scope"),l]]:void 0}}case"task":{let a=a5(n),l=a?.map((p)=>p.route),u=n.tasks===void 0?i5(n):void 0,d=n.tasks===void 0&&_h(n.category,n.subagent_type)?C(n.prompt):"",h=l?.length.toLocaleString(me);return{kind:"agent",label:"Agent",operation:c("派发任务","Dispatch tasks"),preview:u?.join(" · ")??(l&&c(`提交 ${h} 项任务`,`Submitted ${h} ${l.length===1?"task":"tasks"}`)),dispatchRoutes:l,agentRouting:u,agentPrompts:a?.map((p)=>p.prompt)??(d.trim()?[d]:void 0)}}case"task_output":return{kind:"agent",label:"Agent",operation:c("查看任务","View task"),scope:l5.get(C(n.mode))};case"task_send":return{kind:"agent",label:"Agent",operation:c("发送消息","Send message")};case"web_search":case"mcp_tinyfish_search":return{kind:"web",label:"Web",operation:c("网页搜索","Search the web"),group:"Web Search",facts:qr(n.query)?[[c("查询","Queries"),c("1 条","1")]]:void 0};case"webfetch":case"mcp_tinyfish_fetch_content":{let a=Ah(n.url),l=zo(n.urls,qr),u=l===1&&Array.isArray(n.urls)?Ah(n.urls[0]):void 0,d=a??u;return{kind:"web",label:"Web",operation:c("读取网页","Read webpage"),group:"Web Fetch",preview:d,facts:[...d?[[c("主机","Host"),d]]:[],...l===void 0?[]:[[c("地址","Addresses"),c(`${l.toLocaleString(me)} 个`,l.toLocaleString(me))]]]}}default:return{kind:"unknown",label:/^[\p{L}\p{N}_.:-]{1,80}$/u.test(e)&&/\p{L}/u.test(e)&&!e.split(/[.:]/u).some((l)=>Fo.test(l)||/^(?:token|password|authorization|bearer|api[_-]?key)$/iu.test(l))?e:c("工具调用","Tool call")}}}var c5=4;function Sh(e,t,n=t.length,r){let s=t.slice(0,c5),i=n-s.length,o=i.toLocaleString(me);return{heading:e,rows:s,note:[r,i>0&&c(`其余 ${o} 项见详情`,`${o} more in details`)].filter(Boolean).join(" · ")}}function Th(e,t){if(!t)return[];let n=Hr(t);return[[e,n===void 0?c("已附","Included"):pi(n)]]}function Rh(e){let t=e.toLocaleString(me);return c(`${t} 行文本`,`${t} ${e===1?"line":"lines"} of text`)}function Zl(e){let t=c("可见输出","Visible output"),n=c("已收到文本","Text received");if(typeof e==="string"){let a=Hr(e);return e.length?[[t,a===void 0?n:Rh(a)]]:[]}let r=0,s=0;for(let a of we(e)){let l=U(a);if(l.type==="text"&&typeof l.text==="string"){let u=Hr(l.text);if(u===void 0)return[[t,n]];r+=u}else if(l.type==="image"||l.type==="image_placeholder"||l.type==="imagePlaceholder")s++}let i=s.toLocaleString(me),o=[r&&Rh(r),s&&c(`${i} 项图片`,`${i} ${s===1?"image":"images"}`)].filter(Boolean).join(" · ");return o?[[t,o]]:[]}function ws(e,t,n){if(t.length)return{heading:e,facts:t,note:n}}function u5(e){let t=e.trim().replace(/\s+/gu," "),n=/^[\s\S]{1,140}/u.exec(t)?.[0]??"";return n.length<t.length?`${n}…`:n}function Mh(e,t){let n=e.facts??[];switch(e.kind){case"todo":{let r=e.todo?.card;if(r)return Sh(r.heading,r.titles,r.total);return}case"agent":{let r=e.dispatchRoutes??e.agentRouting;if(r?.length){let s=e.agentPrompts;return{...Sh(c("派发配置","Dispatch settings"),r),prompts:s&&{previews:s.slice(0,2).map(u5),count:s.length}}}if(e.scope)return ws(c("任务读取","Task lookup"),[[c("范围","Scope"),e.scope]]);return}case"terminal":return ws(c("终端记录","Terminal log"),[...Th(c("命令","Command"),e.command),...Zl(t)]);case"execution":case"context":return ws(e.kind==="execution"?c("脚本记录","Script run"):c("上下文请求","Context request"),[...n,...Th(c("源码","Source code"),e.source),...Zl(t)]);case"modify":return ws(c("提交内容","Submitted changes"),n);case"memory":return ws(c("记忆变更","Memory changes"),n,c("路径与内容按需查看","Open details to inspect paths and content"));case"web":return ws(c("网页请求","Web request"),[...n,...Zl(t)]);case"inspect":case"unknown":return;default:return e.kind}}function Yl(e){let t=y("ul","tool-card-rows");return t.append(...e.map((n)=>y("li","",n))),t}function Xl(e,t){let n=(e+1).toLocaleString(me);return t>1?c(`任务 ${n} · 提示词`,`Task ${n} prompt`):c("提示词","Prompt")}function Dh(e){let t=y("div","tool-card-content");if(t.append(y("p","tool-card-heading",e.heading)),"rows"in e)t.append(Yl(e.rows));else{let n=y("dl","tool-card-facts");for(let[r,s]of e.facts){let i=y("div","tool-card-fact");i.append(y("dt","",r),y("dd","",s)),n.append(i)}t.append(n)}if(e.prompts){let{previews:n,count:r}=e.prompts,s=y("div","tool-card-prompts");if(n.forEach((i,o)=>{let a=y("div");a.append(y("p","tool-card-note",Xl(o,r)),y("p","tool-card-prompt",i)),s.append(a)}),r>n.length){let i=r-n.length,o=i.toLocaleString(me);s.append(y("p","tool-card-note",c(`其余 ${o} 条提示词见详情`,`${o} more ${i===1?"prompt":"prompts"} in details`)))}t.append(s)}if(e.note)t.append(y("p","tool-card-note",e.note));return t}class Ql{node=y("details","tool-group");body=y("ol","tool-group-body");count=y("span","tool-group-count");kinds=y("span","tool-group-kinds");paths=y("span","tool-group-paths");rows=new WeakMap;constructor(){let e=y("summary","tool-group-summary");e.append(this.count," ",this.kinds," ",this.paths),this.node.append(e,this.body)}update(e){let t=new Map,n=new Set,r=!0,s=this.body.firstElementChild;for(let u of e){let d=u.firstElementChild;if(d instanceof HTMLDetailsElement){let p=d.dataset.groupTool;if(p)t.set(p,(t.get(p)??0)+1);r&&=d.dataset.toolKind==="inspect";let g=d.querySelector(":scope > .tool-summary .tool-target:not([hidden])")?.textContent;if(g&&n.size<2)n.add(g)}let h=this.rows.get(u);if(!h)h=y("li","tool-group-row"),this.rows.set(u,h);if(u.parentElement!==h||h.parentElement!==this.body){if(u.contains(document.activeElement)||d instanceof HTMLDetailsElement&&d.open)this.node.open=!0}if(u.parentElement!==h)h.append(u);if(h!==s)this.body.insertBefore(h,s);s=h.nextElementSibling}while(s){let u=s.nextElementSibling;s.remove(),s=u}let i=r?c("探查工具","File and tool lookups"):c("工具调用","Tool calls"),o=e.length.toLocaleString(me),a=c(`${i} · ${o} 项成功`,`${i} · ${o} succeeded`);if(this.count.textContent!==a)this.count.textContent=a;let l=[...t].map(([u,d])=>`${u} ×${d.toLocaleString(me)}`);if(this.kinds.textContent!==l.join(" "))this.kinds.replaceChildren(...l.flatMap((u,d)=>[...d?[" "]:[],y("span","tool-group-kind",u)]));if(this.paths.textContent!==[...n].join(" "))this.paths.replaceChildren(...[...n].flatMap((u,d)=>[...d?[" "]:[],y("code","tool-group-path path",u)]));return this.paths.hidden=!n.size,this.node}}var e0={inspect:c("探查结果","Inspection results"),modify:c("文件变更回执","File change receipt"),terminal:c("终端输出","Terminal output"),todo:c("待办工具回执","Todo receipt"),memory:c("记忆工具回执","Memory receipt"),execution:c("执行结果","Execution results"),context:c("上下文结果","Context results"),agent:c("任务工具输出","Agent tool output"),web:c("网页输出","Web output"),unknown:c("输出","Output")};function d5(e){let t=y("div","tool-scene tool-terminal"),n=In(""),r=n.querySelector("code"),s=y("div","tool-terminal-input");return n.classList.add("tool-command-preview"),n.setAttribute("aria-label",c("提交的命令","Submitted command")),s.append(y("span","tool-scene-key",c("命令","Command")),n),t.append(s,e),{node:t,update(i){if(s.hidden=!i.command,r)re(r,i.command)}}}function Ih(e,t){let n=y("details",`tool-receipt tool-${e}-receipt`);return n.append(y("summary","",c("查看原始回执","View raw receipt")),t),n}function f5(e){let t=y("div","tool-scene tool-todo"),n=y("div","tool-todo-list"),r=y("div","tool-todo-board");return n.append(y("p","tool-scene-key",c("提交的待办","Tasks submitted")),r),t.append(n,Ih("todo",e)),{node:t,update(s){let i=s.todo?.batches??[];n.hidden=!i.length;let o=1;r.replaceChildren(...i.map((a)=>{let l=y("div","tool-todo-lane stack stack--tight"),u=y("ol");if(u.start=o,o+=a.items.length,u.append(...a.items.map((d)=>y("li","",d))),a.phase)l.append(y("p","small",a.phase));return l.append(u),l}))}}}function Lh(e,t){let n=y("div",`tool-scene tool-code-desk tool-code-desk--${t?"context":"execution"}`),r=y("details","tool-source"),s=In(""),i=s.querySelector("code");return r.append(y("summary","",c("查看原始代码","View source code")),s),n.append(r,e),{node:n,update(o){if(r.hidden=!o.source,i)re(i,o.source)}}}function Nh(e,t){switch(e){case"terminal":return d5(t);case"todo":return f5(t);case"memory":{let n=y("div","tool-scene tool-memory-audit");return n.append(y("p","tool-memory-note small muted",c("记忆路径与内容默认隐藏。","Memory paths and content are hidden by default.")),Ih("memory",t)),{node:n}}case"execution":return Lh(t,!1);case"context":return Lh(t,!0);case"inspect":case"modify":{let n=y("div",`tool-scene tool-file tool-file--${e}`);return n.append(t),{node:n}}case"agent":{let n=y("div","tool-scene tool-agent"),r=y("p","tool-agent-scope small muted"),s=y("div","stack stack--tight"),i=y("div","stack stack--tight"),o=[];return i.hidden=!0,n.append(r,s,i,t),{node:n,update(a){if(re(r,a.scope&&c(`范围:${a.scope}`,`Scope: ${a.scope}`)),s.hidden=!a.dispatchRoutes,a.dispatchRoutes)s.replaceChildren(y("p","tool-scene-key",c("派发配置","Dispatch settings")),Yl(a.dispatchRoutes));let l=a.agentPrompts??[];if(l.length===o.length&&l.every((u,d)=>u===o[d]))return;o=l,i.hidden=!l.length,i.replaceChildren(...l.flatMap((u,d)=>{let h=Xl(d,l.length),p=In(u);return p.classList.add("tool-agent-prompt"),p.setAttribute("aria-label",h),[y("p","tool-scene-key",h),p]}))}}}case"web":{let n=y("div","tool-scene tool-web");return n.append(t),{node:n}}case"unknown":return;default:return e}}var Bh={running:{label:c("运行中","Running"),icon:"M12 4a8 8 0 1 0 8 8"},success:{label:c("成功","Succeeded"),icon:"m5 12 4 4L19 6"},error:{label:c("失败","Failed"),icon:"m6 6 12 12M18 6 6 18"},unknown:{label:c("未见结果","No result"),icon:"M6 12h12"},incomplete:{label:c("结果不完整","Incomplete result"),icon:"M12 4v10m0 5v1"}},Oh=c("工具输出","Tool output"),xs=(e)=>e?.truncated===!0||e?.partial===!0,$h=(e)=>typeof e.content==="string"||Array.isArray(e.content);function h5(e,t,n){if(n?.isError===!0||C(n?.errorMessage)||t?.stage==="error")return"error";if(xs(e)||xs(n)||n?.isError===!1&&!$h(n))return"incomplete";if(n?.isError===!1||t?.stage==="done")return"success";return!n&&t?.stage==="running"?"running":"unknown"}function t0(e,t="16"){let n=document.createElementNS("http://www.w3.org/2000/svg","svg");for(let[r,s]of Object.entries({viewBox:"0 0 24 24",width:t,height:t,"aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))n.setAttribute(r,s);return n.append(e),n}class n0{renderOutputPart;node=y("article","message message--tool");details=y("details","tool-details");label=y("span","tool-label");target=y("span","tool-target path");operation=y("span","tool-operation small muted");preview=y("span","tool-preview small muted");compactFacts=y("span","tool-card-inline small muted");status=y("span","tool-state-text");icon=document.createElementNS("http://www.w3.org/2000/svg","path");kindIcon=document.createElementNS("http://www.w3.org/2000/svg","path");identity=y("p","tool-name small muted",c("工具名:","Tool name: "));name=y("code");args=In("");argsSection=y("div","stack stack--tight");rawArgs=y("details","tool-raw-args");output=y("div","tool-output stack stack--tight");outputLabel=y("p","small muted",e0.unknown);empty=y("p","muted small");outputSection=y("div","tool-result stack stack--tight");body=y("div","fold-body stack stack--tight");card;cardKey;scene;lastName;lastArgs;lastOutput;group;attachment;constructor(e){this.renderOutputPart=e;let t=y("summary","tool-summary"),n=y("span","tool-chevron");n.setAttribute("aria-hidden","true");let r=y("span","tool-subject"),s=t0(this.kindIcon);s.classList.add("tool-kind-icon"),this.compactFacts.hidden=!0,r.append(s,this.label,this.operation,this.target,this.preview,this.compactFacts);let i=y("span","tool-state");i.append(t0(this.icon),this.status),t.append(n,r," ",i),this.identity.append(this.name),this.rawArgs.append(y("summary","",c("原始参数","Raw arguments"))),this.argsSection.append(y("p","small muted",c("调用参数","Call arguments"))),this.output.tabIndex=0,this.output.setAttribute("role","region"),this.output.setAttribute("aria-label",Oh),this.outputSection.append(this.outputLabel,this.output,this.empty),this.body.append(this.identity),this.details.append(t,this.body),this.node.append(this.details)}get open(){return this.details.open}set open(e){this.details.open=e}groupWith(e){return this.group??=new Ql,this.group.update(e)}updateCard(e,t){let n=Mh(e,t),r=Boolean(e.preview&&!e.dispatchRoutes),s=n&&JSON.stringify([e.kind,n,r]);if(this.cardKey===s)return;if(this.cardKey=s,this.card?.remove(),this.card=void 0,re(this.compactFacts,n&&"facts"in n?n.facts.map(([l,u])=>`${l} ${u}`).join(" · "):""),!n)return;let i=y("div","tool-card-preview");if(r)i.dataset.repeatRecap="";let o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("d",e.kind==="todo"?"m3 12 6 6L21 6":Vl[e.kind]);let a=t0(o,"0");a.classList.add("tool-card-emblem"),i.append(a,Dh(n)),this.node.append(i),this.card=i}update(e,t,n,r){let s=C(e?.name)||t?.name||C(n?.toolName),i=e?.arguments===void 0?t?.args:e.arguments,o=n?.content??t?.output,a=h5(e,t,n),l=s==="send_file"&&a==="success"&&n?.role==="toolResult"&&n.toolName===s&&n.isError===!1?vh(r,n.content):void 0;if(l?.href!==this.attachment?.href||l?.textContent!==this.attachment?.textContent){if(this.attachment?.remove(),this.attachment=l,l)this.node.append(l)}let u=a==="unknown"&&n?c("状态未知","Unknown status"):Bh[a].label,d=Jl(s,i),{kind:h,label:p,operation:g,target:b,preview:x,group:k}=d,E=this.details.dataset.toolKind!==h;if(E){this.details.dataset.toolKind=h,this.kindIcon.setAttribute("d",Vl[h]);let D=e0[h];if(this.outputLabel.textContent=D,this.output.setAttribute("aria-label",h==="unknown"?Oh:D),this.scene?.node.remove(),this.outputSection.remove(),this.argsSection.remove(),this.rawArgs.remove(),this.scene=Nh(h,this.outputSection),this.body.classList.toggle("tool-generic",!this.scene),this.scene)this.rawArgs.append(this.args),this.body.append(this.scene.node,this.rawArgs);else this.argsSection.append(this.args),this.body.append(this.argsSection,this.outputSection)}if(this.details.dataset.groupTool!==k)if(k)this.details.dataset.groupTool=k;else delete this.details.dataset.groupTool;let T=this.details.dataset.state;if(T!==a)if(this.details.dataset.state=a,this.icon.setAttribute("d",Bh[a].icon),a==="running"&&this.scene)this.details.dataset.toolMotion="entry";else if(T==="running"&&(a==="success"||a==="error"))this.details.dataset.toolMotion="settlement";else delete this.details.dataset.toolMotion;if(this.status.textContent!==u)this.status.textContent=u;if(this.label.textContent!==p)this.label.textContent=p;re(this.operation,g),re(this.target,b),re(this.preview,x),re(this.name,h==="unknown"||s.toLowerCase()===p.toLowerCase()?"":s),this.identity.hidden=this.name.hidden;let _=E||this.lastArgs!==i||this.lastName!==s;if(_||this.lastOutput!==o)this.updateCard(d,o);if(_){this.scene?.update?.(d),this.argsSection.hidden=this.rawArgs.hidden=i===void 0;let D=this.args.firstElementChild,R=dc(i);if(D&&D.textContent!==R)D.textContent=R;this.lastArgs=i,this.lastName=s}if(this.lastOutput!==o){let D=typeof o==="string"?[{type:"text",text:o}]:we(o),R=this.output.scrollTop,L=this.output.scrollLeft;this.output.replaceChildren(...D.flatMap((B)=>{let O=this.renderOutputPart(U(B));if(O?.tagName==="PRE")O.removeAttribute("tabindex");return O??[]})),this.output.scrollTop=R,this.output.scrollLeft=L,this.lastOutput=o}this.output.hidden=!this.output.childElementCount,this.outputLabel.hidden=this.output.hidden,this.empty.hidden=!this.output.hidden;let A=a==="running"?c("等待工具输出…","Waiting for tool output…"):a==="unknown"&&!n?c("没有可见的工具结果。","No tool result is available."):c("无可显示的输出。","No output to display.");if(this.empty.textContent!==A)this.empty.textContent=A}}function zh({entries:e,start:t,liveKey:n,tools:r,calls:s,results:i}){let o=new Map,a=!1,l=[],u=()=>{if(l.length>1)for(let d of l)o.set(C(d.id),l);l=[]};for(let d=t;d<e.length;d++){let h=e[d],p=h?.message;if(!h||!p||p.role!=="assistant"||!a||h.key===n||p.streaming===!0||xs(p)||C(p.errorMessage)||p.stopReason!==void 0&&p.stopReason!=="toolUse"&&p.stopReason!=="stop"){if(u(),p?.role==="user")a=!xs(p);continue}let g=we(p.content).map(U);if(!g.length){u();continue}let b=new Set(g.flatMap((k)=>k.type==="toolCall"?C(k.id)||[]:[])),x=new Map;for(let k=e[d+1]?.message;k?.role==="toolResult";k=e[d+1]?.message){let E=C(k.toolCallId);if(!b.has(E)||x.has(E)||i.get(E)!==d+1)break;x.set(E,k),d++}for(let k of g){let E=C(k.id),T=C(k.name).toLowerCase(),_=x.get(E),A=r.get(E),D=A?.stage,R=k.arguments===void 0?A?.args:k.arguments;if(k.type==="toolCall"&&s.get(E)===1&&Jl(T,R).group&&!xs(k)&&_?.isError===!1&&$h(_)&&!xs(_)&&!C(_.errorMessage)&&(!C(_.toolName)||C(_.toolName).toLowerCase()===T)&&(D===void 0||D==="done"))l.push(k);else u()}}return u(),o}function qo(e){if(!e)return;return e.closest(".tool-group:not([open])")?.querySelector(":scope > summary")??e}function Uh(e){return typeof e==="string"?[{type:"text",text:e}]:we(e)}var Ho=Symbol("skill instructions");function m5(e){let t=Uh(e.content).map(U);if(e.role!=="user")return t;let n=U(e.historyContent);if(C(n.cursor)){let i=C(n.skillNames);return i?[...t,{type:Ho,names:i}]:t}let r=[];return[...t.map((i)=>{let o=i.type==="text"?mh(C(i.text)):void 0;if(!o)return i;return r.push({type:Ho,names:ph(o),text:gh(o)}),{type:"text",text:o.request}}),...r]}function p5(e,t){let n=t instanceof HTMLDetailsElement?t:Mt("",y("p","plain"));n.classList.add("skill-instructions");let r=C(e.names),s=n.querySelector("summary"),i=c(`Skill 指令 · ${r}`,`Skill instructions · ${r}`);if(s&&s.textContent!==i)s.textContent=i;let o=n.querySelector(":scope > .fold-body > p");if(o){let a=C(e.text);if(o.textContent!==a)o.textContent=a;o.hidden=!a}return n}function Wh(e,t,n){if(t==="tool"&&e.type!=="text"&&e.type!=="image"&&e.type!=="image_placeholder"&&e.type!=="imagePlaceholder")return;switch(e.type){case"text":{let r=C(e.text);if(!r)return;return t==="markdown"?jl(r,n):t==="tool"?In(r):y("p","plain",r)}case"thinking":{let r=C(e.thinking);if(!r)return;let s=n?.querySelector(".plain");if(n&&s)return s.textContent=r,n;return Mt(c("思考过程","Thinking"),y("p","plain muted",r))}case"image":{let r=C(e.data);if(!Gi(e.mimeType)||!/^[A-Za-z0-9+/]+={0,2}$/.test(r))return y("p","small muted",c("图片内容不可用","Image unavailable"));let s=y("img");return s.alt=t==="tool"?c("工具输出图片","Tool output image"):c("消息图片","Image attached to message"),s.loading="lazy",s.src=`data:${e.mimeType};base64,${r}`,s}case"image_placeholder":case"imagePlaceholder":return y("p","small muted",c("此图片未包含在会话快照中","This image is not included in the session snapshot."));default:{let r=C(e.type)||c("未知类型","Unknown type");return Object.keys(e).length?y("p","small muted",c(`未展开的内容 · ${r}`,`Content not displayed · ${r}`)):void 0}}}var on=(e)=>C(e.role),Pr=(e)=>{if(on(e)==="toolResult"&&C(e.toolCallId))return`result:${C(e.toolCallId)}`;if(C(e.id))return`id:${C(e.id)}`;let t=Ce(e.timestamp);return t===void 0?"":`${on(e)}:${t}`};function g5(e){let t=Ce(e);if(t===void 0)return;let n=new Date(t);if(!Number.isFinite(n.getTime()))return;let r=y("time","numerical",n.toLocaleTimeString(me,{hour:"2-digit",minute:"2-digit"}));return r.dateTime=n.toISOString(),r.title=n.toLocaleString(me),r}function b5(e,t,n,r){let s=on(e),i=r?.role===s?r:void 0,o=s==="user"||s==="assistant",a=i?.node??y("article",o?`message message--${s}`:"message"),l=i?.speaker??y("span","speaker"),u=s==="assistant"?t?c("助手 · 正在生成","Assistant · Writing"):c("助手","Assistant"):s==="user"?c("你","You"):s==="bashExecution"?c("命令输出","Command output"):c("会话记录","Session record");if(l.textContent!==u)l.textContent=u;let d=i?.body??y("div","message-body"),h=i?.timestamp===e.timestamp?i?.time:g5(e.timestamp),p=i?.header??y("header");if(!i){if(o){let B=document.createElementNS("http://www.w3.org/2000/svg","svg"),O=document.createElementNS("http://www.w3.org/2000/svg","path");B.setAttribute("viewBox","0 0 24 24"),B.setAttribute("fill","currentColor"),B.setAttribute("aria-hidden","true"),B.setAttribute("focusable","false"),O.setAttribute("fill-rule","evenodd"),O.setAttribute("d",s==="user"?"M3 6 6 3h15v15l-3 3H3V6Zm9 1-1.4 1.4 2.6 2.6H7v2h6.2l-2.6 2.6L12 17l5-5-5-5Z":"M12 2 22 12 12 22 2 12 12 2Zm0 3-7 7 7 7 7-7-7-7Zm0 4 3 3-3 3-3-3 3-3Z"),B.append(O);let H=y("span","message-identity");l.style.overflowWrap="normal",H.append(B,l),p.append(H)}else p.append(l);a.append(d)}if(i?.time!==h){if(i?.time?.remove(),h)p.append(h)}let g=m5(e).map((L,B)=>{if(L.type==="toolCall")return{part:L,node:n(L,B)};let O=i?.parts[B];if(O){let G=Object.keys(L);if(O.part===L||G.length===Object.keys(O.part).length&&G.every((de)=>Object.hasOwn(O.part,de)&&L[de]===O.part[de]))return O}let H=O?.part.type===L.type?O?.node:void 0,K=L.type===Ho?p5(L,H):Wh(L,s==="assistant"?"markdown":"plain",H);if(K instanceof HTMLDetailsElement&&H instanceof HTMLDetailsElement)K.open=H.open;return{part:L,node:K}}),b=C(e.errorMessage),x=s==="bashExecution"?C(e.output):"",k=C(e.stopReason),E=JSON.stringify([x,b,k]),T=i?.metadata===E?i.notices:[...x?[In(x)]:[],...b||k==="error"?[y("p","notice error small",b||c("生成失败","Could not generate a response."))]:[],...k==="aborted"?[y("p","muted small",c("已停止生成","Response stopped."))]:[],...k==="length"?[y("p","muted small",c("已达到输出长度限制","Response reached the length limit."))]:[]],_=s==="assistant"&&!T.length&&g.some(({part:L})=>L.type==="toolCall")&&g.every(({part:L,node:B})=>L.type==="toolCall"||!B||L.type==="text"&&!C(L.text).trim());if(a.classList.toggle("message--tool-only",_),_)p.remove();else if(p.parentNode!==a)a.prepend(p);let A=(_?g.filter(({part:L})=>L.type==="toolCall"):g).flatMap((L)=>L.node??[]),D=new Set(A);for(let L of i?.parts??[])if(L.node?.parentNode===d&&!D.has(L.node))L.node.remove();if(i&&i.notices!==T)for(let L of i.notices)L.remove();let R=d.firstElementChild;for(let L of[...A,...T]){if(L!==R)d.insertBefore(L,R);R=L.nextElementSibling}return{node:a,body:d,header:p,speaker:l,time:h,timestamp:e.timestamp,role:s,parts:g,notices:T,metadata:E}}var r0=80,Fh=c("加载更早消息","Load older messages"),qh=c("重新加载记录","Reload transcript");function Hh(e,t,n){if(e.textContent!==n)e.textContent=n;e.toggleAttribute("data-reload",t?.reload===!0),e.setAttribute("aria-disabled",String(Boolean(t?.busy||t?.disabled))),e.setAttribute("aria-busy",String(t?.busy===!0))}function Ph(e){if(e&&!e.busy&&!e.disabled)e.activate()}class Wn{root;scroller;empty;cache=new Map;openFolds=new Map;toolViews=new Map;openTools=new Set;results=new Map;contentViews=new WeakMap;older=Ue(Fh,()=>{if(this.start)this.flush(!0);else Ph(this.latest?.history?.older)},"transcript-load");status=y("span","sr-only");olderError=y("p","notice small");latest;frame;forceBottom=!1;prepended;limit=r0;start=0;first;displayed;indexed;indexedLength=0;trace;constructor(e,t,n){this.root=e;this.scroller=t;this.empty=n;this.status.setAttribute("role","status"),this.olderError.setAttribute("role","status")}observeTrace(e){this.trace=e}reset(){if(this.frame!==void 0)cancelAnimationFrame(this.frame);this.frame=void 0,this.latest=this.displayed=this.indexed=void 0,this.first=void 0,this.forceBottom=!1,this.prepended=void 0,this.limit=r0,this.start=this.indexedLength=0,this.cache.clear(),this.openFolds.clear(),this.toolViews.clear(),this.openTools.clear(),this.results.clear(),this.root.replaceChildren(),this.status.textContent="",this.empty.hidden=!1,this.scroller.scrollTop=0,this.trace?.({})}render(e,t,n,r=!1,s,i,o){if(this.latest={entries:e,liveKey:t,tools:n,history:s,sessionId:o},this.forceBottom||=r,i!==void 0)this.prepended=(this.prepended??0)+i;this.frame??=requestAnimationFrame(()=>{this.frame=void 0,this.flush()})}indexResults(e){if(this.indexed!==e||this.indexedLength>e.length)this.indexed=e,this.indexedLength=0,this.results.clear();for(;this.indexedLength<e.length;this.indexedLength++){let t=e[this.indexedLength]?.message,n=C(t?.toolCallId);if(t?.role==="toolResult"&&n)this.results.set(n,this.indexedLength)}}flush(e=!1){if(!this.latest||e&&!this.start)return;if(this.frame!==void 0)cancelAnimationFrame(this.frame);this.frame=void 0;let{entries:t,liveKey:n,tools:r,history:s,sessionId:i}=this.latest,o=this.prepended;this.prepended=void 0;let a=e||o!==void 0,{scrollTop:l,scrollHeight:u,clientHeight:d}=this.scroller,h=document.activeElement,p=h instanceof HTMLElement&&this.root.contains(h)&&(h.closest(".tool-details, .tool-group, .tool-attachment, .transcript-content, .skill-instructions, .prose")||this.trace&&h.matches(".message[tabindex='-1']"))?h:void 0,g=p?.matches(".tool-group-summary")?p.parentElement?.querySelector(".tool-summary"):p?.querySelector(".tool-summary"),b=u-d-l<72,x=this.forceBottom||b&&!p&&h!==this.older;this.forceBottom=!1;let k=this.olderError.nextElementSibling,E=a&&k instanceof HTMLElement?k:void 0,T=E?.querySelector(".tool-summary")??void 0,_=a&&p?.closest(".tool-details, .tool-group")&&E?.contains(p)?p:E,A=_?.getBoundingClientRect().top,D=a&&document.activeElement===this.older;this.indexResults(t);let R=[];for(let[W,ge]of r)if(!this.results.has(W))R.push({key:`result:${W}`,tool:ge});let L=t.length+R.length;if(o!==void 0)this.limit+=o;let B=Math.max(0,L-this.limit);if(!this.displayed||x&&!a)this.start=B;else{if(t!==this.displayed&&this.first){let W=t.findIndex((ge)=>ge.key===this.first);if(W>=0)this.start=W}this.start=Math.min(this.start,B)}let O=o??0;if(e)O=Math.min(this.start,r0),this.start-=O,this.limit=Math.max(this.limit,L-this.start);else if(o!==void 0)this.start=Math.max(0,this.start-o);this.displayed=t,this.first=t[this.start]?.key;let H=[],K=new Map;for(let W=this.start;W<t.length;W++){let ge=t[W];if(!ge)continue;let{message:q}=ge;if(q.role==="toolResult"){let Y=C(q.toolCallId);if(!Y||this.results.get(Y)===W)H.push({...ge,tool:r.get(Y)})}else{let Y=!1;if(q.role==="assistant")for(let ue of Uh(q.content)){let le=U(ue);if(le.type!=="toolCall")continue;Y=!0;let be=C(le.id);if(be)K.set(be,(K.get(be)??0)+1)}H.push({...ge,live:ge.key===n,hasCalls:Y})}}for(let W=Math.max(0,this.start-t.length);W<R.length;W++)H.push(R[W]);let G=zh({entries:t,start:this.start,liveKey:n,tools:r,calls:K,results:this.results}),de=new Set(H.filter((W)=>W.message&&W.message.role!=="toolResult").map((W)=>W.key));for(let[W,ge]of this.cache)if(!de.has(W)){let q=[...ge.view.body.querySelectorAll(":scope > details:not(.tool-group)")].flatMap((Y,ue)=>Y.open?[ue]:[]);if(q.length)this.openFolds.set(W,q);ge.view.node.remove(),this.cache.delete(W)}let ne=new Set,ae,z=(W,ge,q,Y)=>{if(ne.has(W))return;ne.add(W);let ue=this.toolViews.get(W);if(!ue)ue=new n0((be)=>Wh(be,"tool")),ue.open=this.openTools.delete(W),this.toolViews.set(W,ue);ue.update(ge,q,Y,i);let le=ue.node.querySelector(":scope > .tool-details > .fold-body");if(le)this.renderHistoryContent(le,Y&&s?.content(Y));if(this.trace&&(q?.id||C(ge?.id)||C(ge?.name)||C(Y?.toolCallId)||C(Y?.toolName)))ae=ue.node;return ue.node};if(this.older.parentNode!==this.root)this.root.prepend(this.status,this.older,this.olderError);let j=this.start?void 0:s?.older;this.older.hidden=!this.start&&!j;let Z=this.start.toLocaleString(me),Q=this.start?c(`加载更早消息(${Z} 条)`,`Load older messages (${Z})`):j?.reload?qh:j?.busy?c("正在读取…","Loading…"):Fh;if(Hh(this.older,j,Q),this.olderError.hidden=!j?.error,this.olderError.textContent!==(j?.error??""))this.olderError.textContent=j?.error??"";let oe=(W,ge)=>{let q=C(ge.id),Y=this.results.get(q);return z(q?`id:${q}`:W,ge,r.get(q),Y===void 0?void 0:t[Y]?.message)},F=this.olderError,X,te;for(let W of H){let{message:ge}=W,q;if(!ge||ge.role==="toolResult"){let ue=C(ge?.toolCallId)||W.tool?.id;if(ue&&K.has(ue))continue;q=z(ue?`id:${ue}`:`row:${W.key}`,void 0,W.tool,ge)}else{let ue=!1;q=this.updateMessage(W,ge,(be,Ae)=>{let He=C(be.id),Ne=G.get(He),Pe=`part:${W.key}:${Ae}`;if(!Ne)return oe(Pe,be);if(Ne[0]!==be){ue=!0;return}let mt=Ne.flatMap((Dn)=>oe(Pe,Dn)??[]);return this.toolViews.get(`id:${He}`)?.groupWith(mt)});let le=this.cache.get(W.key)?.view;if(le){let be=s?.content(ge),Ae=le.parts.filter(({part:mt})=>mt.type==="text"),Ne=le.parts.find(({part:mt})=>mt.type===Ho)?.node?.querySelector(":scope > .fold-body"),Pe=Ne&&C(U(ge.historyContent).skillNames);if(Ae.length===1&&Ae[0]?.node)Ae[0].node.hidden=!Pe&&Boolean(be?.chunks.length);if(this.renderHistoryContent(le.body,Pe?void 0:be,ge.role==="assistant"&&Ae.length===1),Ne)this.renderHistoryContent(Ne,Pe?be:void 0)}if(ue&&q.classList.contains("message--tool-only")&&!this.cache.get(W.key)?.view.body.childElementCount){q.remove();continue}if(this.trace&&(ge.role==="user"||ge.role==="assistant")){if(this.cache.get(W.key)?.view.parts?.some(({part:Ae,node:He})=>He&&Ae.type!=="toolCall"&&Ae.type!=="thinking"&&(Ae.type!=="text"||C(Ae.text).trim())))if(ge.role==="user")X=q;else te=q}}if(!q)continue;let Y=F.nextElementSibling;if(q!==Y)this.root.insertBefore(q,Y);F=q}for(let[W,ge]of this.toolViews)if(!ne.has(W)){if(ge.open)this.openTools.add(W);ge.node.remove(),this.toolViews.delete(W)}if(p&&document.activeElement===document.body){let W=this.root.contains(p)?p:g;if(W&&this.root.contains(W))qo(W)?.focus({preventScroll:!0})}this.empty.hidden=L>0;let xe=ae?.closest(".tool-group")??ae;if(this.trace?.({user:X,assistant:te,tool:xe?.querySelector("summary")??void 0}),a){if(O){let ge=O.toLocaleString(me);this.status.textContent=c(`已加载 ${ge} 条更早消息。`,`Loaded ${ge} older ${O===1?"message":"messages"}.`)}let W=_&&this.root.contains(_)?qo(_):qo(T);if(W&&this.root.contains(W)&&A!==void 0){if(D&&(O||this.older.hidden)){if(W.tagName!=="SUMMARY")W.tabIndex=-1;W.focus({preventScroll:!0})}this.scroller.scrollTop+=W.getBoundingClientRect().top-A}else if(D&&this.older.hidden)this.scroller.focus({preventScroll:!0})}else if(x)this.scroller.scrollTop=this.scroller.scrollHeight;if(!a&&h===this.older&&this.older.hidden)this.scroller.focus({preventScroll:!0})}renderHistoryContent(e,t,n=!1){let r=this.contentViews.get(e);if(r&&(!t||r.key!==t.key)){let u=r.node.contains(document.activeElement);if(r.node.remove(),this.contentViews.delete(e),r=void 0,u)this.scroller.focus({preventScroll:!0})}if(!t)return;if(!r){let u=y("div","transcript-content stack stack--tight"),d=y("div",n?"prose":"plain break"),h=y("p","small muted");h.setAttribute("role","status");let p=Ue("",()=>Ph(this.contentViews.get(e)?.control),"button--quiet");u.append(d,h,p),e.append(u),r={key:t.key,node:u,output:d,status:h,button:p,count:0,length:0},this.contentViews.set(e,r)}if(r.control=t.control,t.chunks.length<r.count)r.count=r.length=0,r.output.replaceChildren(),r.output.className=n?"prose":"plain break";let s=t.chunks.slice(r.count),i;if(s.length){let u=r.length;if(r.length+=s.reduce((d,h)=>d+h.length,0),n&&r.length<=$o)jl(t.chunks.join(""),r.output),i=r.output;else{let d=n&&u<=$o;if(d)r.output.className="plain break",r.output.replaceChildren(y("p","small muted",c("正文过长,已按纯文本显示。","This long message is displayed as plain text.")));let h=(d?t.chunks:s).map((p)=>y("span","",p));r.output.append(...h),i=h.find((p)=>p.textContent)}}r.count=t.chunks.length,r.output.hidden=!r.count;let o=t.control?.reload?qh:t.control?.busy?c("正在读取…","Loading…"):r.count?c("加载下一段正文","Load next content chunk"):c("加载正文","Load message content");Hh(r.button,t.control,o);let a=t.control?.reload?c("记录版本已失效。","This transcript page expired."):t.control?.error??(s.length?c("已加载正文。","Message content loaded."):t.control?.busy||!r.count?"":r.status.textContent);if(r.status.textContent!==a)r.status.textContent=a;if(r.status.hidden=!a,i&&document.activeElement===r.button)i.tabIndex=-1,i.focus({preventScroll:!0});let l=!t.control&&document.activeElement===r.button;if(r.button.hidden=!t.control,l)this.scroller.focus({preventScroll:!0})}updateMessage(e,t,n){let{key:r,hasCalls:s}=e,i=Boolean(e.live),o=this.cache.get(r);if(!s&&o&&o.message===t&&o.live===i)return o.view.node;let a=b5(t,i,n,o?.view);if(o&&a.node!==o.view.node)o.view.node.remove();if(!o){let l=this.openFolds.get(r);if(l){let u=a.body.querySelectorAll(":scope > details:not(.tool-group)");for(let d of l)if(u[d])u[d].open=!0;this.openFolds.delete(r)}}return this.cache.set(r,{message:t,live:i,view:a}),a.node}}function s0(e){let t=U(e),n=C(t.id);if(n)return{id:n,olderCursor:C(t.olderCursor)}}function i0(e){let t=U(e).status;if(t==="truncated"||t==="unavailable")return t}class o0{api;sessionId;current;enabled;tail;changed;reload;id;entries=[];status;stale=!1;reloading=!1;olderCursor;olderError;requests=new Map;contents=new Map;constructor(e,t,n,r,s,i,o,a){this.api=t;this.sessionId=n;this.current=r;this.enabled=s;this.tail=i;this.changed=o;this.reload=a;this.id=e.id,this.olderCursor=e.olderCursor}invalidate(){for(let e of this.requests.values())e.abort();this.requests.clear()}clearExpansion(){this.invalidate(),this.entries=[],this.status=void 0,this.contents.clear()}render(){let e=(t,n,r)=>({activate:this.stale?this.reload:t,disabled:!this.enabled(),busy:this.reloading||this.requests.has(n),reload:this.stale,error:r});return{older:this.olderCursor||this.stale?e(()=>{this.loadOlder()},this.olderCursor,this.olderError):void 0,content:(t)=>{let n=C(U(t.historyContent).cursor);if(!n)return;let r=this.contents.get(n),s=r?.next??n;return{key:n,chunks:r?.chunks??[],control:s?e(()=>{this.loadContent(n,s)},s,r?.error):void 0}}}}async read(e,t,n,r){if(!e||this.stale||!this.current()||!this.enabled()||this.requests.has(e))return;let s=new AbortController,i=()=>this.current()&&this.requests.get(e)===s&&!s.signal.aborted;this.requests.set(e,s),this.changed();let o;try{let a=`${Ze(this.sessionId)}/transcript${t?"/content":""}`,l=await this.api.request(`${a}?${new URLSearchParams({cursor:e})}`,void 0,AbortSignal.any([s.signal,AbortSignal.timeout(20000)]));if(i())o=n(l)}catch(a){if(!i())return;if(a instanceof Be&&(a.code.includes("cursor")||[400,401,403,404,409,410].includes(a.status)))this.expire();else r(c("读取失败,请重试。","Couldn't load this part. Try again."))}finally{if(i())this.requests.delete(e),this.changed(o)}}expire(){this.stale=!0,this.olderError=c("记录版本已失效,请重新加载。","This transcript page expired. Reload the transcript."),this.invalidate(),this.changed()}async loadOlder(){let e=this.olderCursor;await this.read(e,!1,(t)=>{let n=s0(t.page);if(!n||n.id!==this.id||n.olderCursor===e||!Array.isArray(t.messages)){this.expire();return}let r=new Set([...this.entries,...this.tail()].map((i)=>i.key)),s=we(t.messages).map(U).filter((i)=>Boolean(on(i))).flatMap((i,o)=>{let a=Pr(i),l=r.has(a);if(l&&(a.startsWith("id:")||a.startsWith("result:")))return[];let u=a&&!l?a:`older:${this.entries.length}:${o}`;return r.add(u),[{key:u,message:i}]});return this.entries=[...s,...this.entries],this.olderCursor=n.olderCursor,this.olderError=void 0,this.status=i0(t.transcript)??this.status,s.length},(t)=>{this.olderError=t})}async loadContent(e,t){let n=this.contents.get(e)??{next:e,chunks:[]};if(this.contents.set(e,n),n.next!==t)return;await this.read(t,!0,(r)=>{let s=C(r.nextCursor);if(typeof r.text!=="string"||s===t||s&&s===e){this.expire();return}n.chunks.push(r.text),n.next=s,n.error=void 0;return},(r)=>{n.error=r})}}var jh={pending:c("等待中","Pending"),queued:c("排队中","Queued"),scheduled:c("已调度","Scheduled"),blocked:c("被依赖阻塞","Blocked by dependencies"),paused:c("已暂停","Paused"),running:c("运行中","Running"),completed:c("已完成","Completed"),done:c("已完成","Completed"),success:c("成功","Succeeded"),failed:c("失败","Failed"),error:c("出错","Error"),cancelled:c("已取消","Canceled"),skipped:c("已跳过","Skipped"),interrupted:c("已中断","Interrupted"),lost:c("已失联","Lost contact")},a0=c("未知时间","Unknown time"),Nt=new Intl.NumberFormat(me),br=(e)=>Object.hasOwn(jh,e)?jh[e]:void 0,Po=(e)=>br(e)??e;function ft(e){let t=Ce(e);if(t===void 0)return a0;let n=new Date(t);return Number.isNaN(n.getTime())?a0:n.toLocaleString(me,{hour12:!1})}function v5(e,t){let n=Ce(e),r=Ce(t);if(n===void 0||r===void 0||r<n)return"";let s=Math.round((r-n)/1000);if(s<60)return c(`${Nt.format(s)} 秒`,`${Nt.format(s)} sec`);let i=Math.floor(s/60);if(i<60)return c(`${Nt.format(i)} 分钟`,`${Nt.format(i)} min`);let o=Nt.format(Math.floor(i/60)),a=Nt.format(i%60);return c(`${o} 小时 ${a} 分钟`,`${o} hr ${a} min`)}function y5(e){let t=y("dl","details-list small numerical");for(let[n,r]of e)if(r)t.append(y("dt","",n),y("dd","",r));return t.childElementCount?t:y("p","small muted",c("当前没有可用数据。","No data available."))}function k5(e,t){let n=we(e.nodes).map(U),r=we(e.edges).map(U),s=(o)=>{if(!o)return"";let a=t.get(o),l=a?C(a.description):"";return l?c(`${l}(${o})`,`${l} (${o})`):c(`子任务 ${o}`,`Subtask ${o}`)},i=[];if(n.length)i.push(y5(n.map((o)=>{let a=C(U(o).taskId),l=we(U(o).upstream).map(C).filter(Boolean),u=Nt.format(Ce(U(o).attempt)??0);return[C(U(o).label)||C(U(o).id)||c("节点","Node"),[`${Po(C(U(o).state))}`,c(`尝试 ${u} 次`,`Attempts: ${u}`),a?c(`关联:${s(a)}`,`Task: ${s(a)}`):"",l.length?c(`上游:${l.join("、")}`,`Upstream: ${l.join(", ")}`):""].filter(Boolean).join(" · ")]})));else i.push(y("p","small muted",c("这次运行还没有节点记录。","No nodes were recorded for this run.")));if(r.length){let o=y("ul","inline-list");for(let a of r){let l=C(a.fromLabel)||C(a.from),u=C(a.toLabel)||C(a.to);if(l&&u){let d=y("li","stack stack--tight");d.append(y("p","plain",`${l} → ${u}`)),o.append(d)}}if(o.childElementCount)i.push(Mt(c(`依赖边(${Nt.format(o.childElementCount)})`,`Dependencies (${Nt.format(o.childElementCount)})`),o))}return Mt(`${C(e.name)||c("运行","Run")} · ${Po(C(e.status))}`,...i)}function w5(e){let t=y("ul","inline-list");for(let n of e){let r=U(n),s=[ft(r.startedAt),r.completedAt===void 0?"":ft(r.completedAt)].filter((u)=>u&&u!==a0),i=v5(r.startedAt,r.completedAt),o=Ce(r.turns),a=Ce(r.toolCalls),l=y("li","stack stack--tight");l.append(y("p","plain",C(r.description)||c("子任务","Subtask"))),l.append(y("p","small muted break",[C(r.id)?c(`任务 ID:${C(r.id)}`,`Task ID: ${C(r.id)}`):"",C(r.parentTaskId)?c(`父任务:${C(r.parentTaskId)}`,`Parent task: ${C(r.parentTaskId)}`):"",C(r.agent)?c(`智能体:${C(r.agent)}`,`Agent: ${C(r.agent)}`):"",C(r.model)?c(`模型:${C(r.model)}`,`Model: ${C(r.model)}`):"",C(r.status)?c(`状态:${Po(C(r.status))}`,`Status: ${Po(C(r.status))}`):"",s.length?c(`时间:${s.join(" → ")}${i?`(耗时 ${i})`:""}`,`Time: ${s.join(" → ")}${i?` (${i} elapsed)`:""}`):"",o!==void 0?c(`轮次:${Nt.format(o)}`,`Turns: ${Nt.format(o)}`):"",a!==void 0?c(`工具调用:${Nt.format(a)}`,`Tool calls: ${Nt.format(a)}`):""].filter(Boolean).join(" · "))),t.append(l)}return Mt(c(`子任务(${Nt.format(t.childElementCount)})`,`Subtasks (${Nt.format(t.childElementCount)})`),t)}var x5={"no-agent-dir":c("原生任务快照不可用:未配置原生配置目录,快照入口已关闭。","Native task snapshots are disabled because no native configuration directory is set."),"invalid-id":c("原生任务快照不可用:会话标识无效,无法定位快照。","Could not locate the native task snapshot: the session ID is invalid."),"session-unavailable":c("原生任务快照不可用:会话尚未接入引擎,请先恢复会话。","Resume the session to connect it to the engine before reading its native task snapshot."),"missing-projection":c("原生任务快照不可用:原生暂无此会话的任务快照,并非读取失败。","The native host has no task snapshot for this session. The read did not fail.")};function Gh(e){let t=y("div","stack stack--tight"),n=y("section","subpanel stack stack--tight"),r=y("section","subpanel stack stack--tight");if(n.id="runtime-dag",n.tabIndex=-1,r.id="runtime-subagent",r.tabIndex=-1,n.append(y("h3","",c("DAG 快照","DAG snapshot"))),r.append(y("h3","",c("子代理","Subagents"))),t.append(r,n),C(e.status)!=="ok"){let l=C(e.reason),u=x5[l]??c("原生任务快照不可用。","Native task snapshot unavailable.");return n.append(y("p","small muted",u)),r.append(y("p","small muted",u)),t}let s=[c(`快照时间:${ft(e.updatedAt)}`,`Snapshot time: ${ft(e.updatedAt)}`),e.connected===void 0?c("工作区记录,非实时","Workspace record · Not live"):c(`Herdr 快照,记录时${e.connected===!0?"已连接":"未连接"},非实时`,`Herdr snapshot · ${e.connected===!0?"Connected":"Not connected"} at capture · Not live`)].join(" · ");n.append(y("p","small muted",s)),r.append(y("p","small muted",s));let i=we(e.runs).map(U),o=we(e.tasks).map(U);if(!i.length)n.append(y("p","small muted",c("快照中没有 DAG 记录。","No DAG runs in this snapshot.")));let a=new Map(o.map((l)=>[C(l.id),l]));for(let l of i)n.append(k5(l,a));if(o.length)r.append(w5(o));else r.append(y("p","small muted",c("快照中没有子代理记录。","No subagents in this snapshot.")));return t}function Kh(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)?e:{}}function Vh(e){return typeof e==="number"&&Number.isFinite(e)?e:void 0}function Es(e){let t=Vh(e);return t===void 0||t<0?void 0:t}function As(e){let t=Kh(e),n=Es(t.tokens),r=Es(t.contextWindow??t.window??t.context_window),s=Es(t.percent??t.percentUsed??t.usagePercent);if(n===void 0&&r===void 0&&s===void 0)return{status:"unavailable",reason:"no-data"};return{status:"ok",...n===void 0?{}:{tokens:n},...r===void 0?{}:{window:r},...s===void 0?{}:{percent:s}}}function Uo(e){let t=Kh(e),n=Vh(t.latestCacheHitRate),r=Es(t.input),s=Es(t.cacheRead),i=Es(t.cacheWrite);if(!((s??0)>0||(i??0)>0||(n??0)>0))return{status:"unavailable",reason:"no-data"};let a=n===void 0||n<0||n>100?void 0:n/100,l;if(r!==void 0&&s!==void 0&&i!==void 0){let u=r+i+s;if(u>0&&Number.isFinite(u))l=s/u}if(a===void 0&&l===void 0)return{status:"unavailable",reason:"no-data"};return{status:"ok",...a===void 0?{}:{latest:a},...l===void 0?{}:{cumulative:l}}}var gi={off:c("关闭","Off"),minimal:c("极低","Minimal"),low:c("低","Low"),medium:c("中","Medium"),high:c("高","High"),xhigh:c("极高","Extra high"),max:c("最高","Maximum")};function Jh(e){let t=U(e),n=Ce(t.tokensPerSecond),r=Ce(t.measuredAt);return n!==void 0&&n>0&&r!==void 0&&r>=0?{tokensPerSecond:n,measuredAt:r}:void 0}function Zh(e,t){let n=ve("runtime-instructions",HTMLDetailsElement),r=ve("runtime-instructions-status",HTMLElement),s=ve("runtime-instructions-text",HTMLPreElement),i=c("当前无法读取 AGENTS.md。关闭后可展开重试。","Could not read AGENTS.md. Close and reopen this section to try again."),o;function a(){o?.abort(),o=void 0,s.hidden=!0,s.textContent="",r.textContent=""}return n.addEventListener("toggle",async()=>{a();let l=t();if(!n.open||!l)return;let u=o=new AbortController,d=()=>o===u&&n.open&&t()===l;r.textContent=c("正在读取工作目录中的 AGENTS.md…","Reading AGENTS.md in the working directory…");try{let h=await e.request(`${Ze(l)}/instructions`,void 0,AbortSignal.any([u.signal,AbortSignal.timeout(18000)]));if(!d())return;switch(h.status){case"ok":if(h.file!=="AGENTS.md"||typeof h.content!=="string"){r.textContent=c("未能验证 AGENTS.md 原文。","Could not verify the contents of AGENTS.md.");break}s.textContent=h.content,s.hidden=!h.content,r.textContent=h.content?c("已读取 AGENTS.md 原文。","Showing AGENTS.md as written."):c("AGENTS.md 是空文件。","AGENTS.md is empty.");break;case"missing":r.textContent=c("当前工作目录没有 AGENTS.md。","There is no AGENTS.md in the working directory.");break;case"unsupported":r.textContent=c("当前宿主或连接方式不支持读取项目规则。","The current host or connection does not support reading project rules.");break;case"refused":r.textContent=c("宿主拒绝读取,或无法确认文件属于当前会话。","The host refused the read or could not verify that the file belongs to this session.");break;case"too_large":r.textContent=c("AGENTS.md 超过读取上限,未显示内容。","AGENTS.md exceeds the read limit. Its contents are not shown.");break;case"unavailable":default:r.textContent=i}}catch(h){if(!d())return;r.textContent=h instanceof Be&&[401,403,409].includes(h.status)?c("读取被拒绝,或当前会话连接已变化。","The read was refused or the session connection changed."):h instanceof Be&&h.status===404&&h.code==="not_found"?c("当前 Web 服务不支持读取项目规则。","This Web server does not support reading project rules."):i}finally{if(o===u)o=void 0}}),()=>{n.open=!1,a()}}var St=new Intl.NumberFormat(me,{maximumFractionDigits:2}),E5=new Intl.NumberFormat(me,{style:"currency",currency:"USD",maximumFractionDigits:5}),ct=(e)=>{let t=Ce(e);return t===void 0?"":St.format(t)},Yh=(e)=>typeof e==="boolean"?e?c("开启","On"):c("关闭","Off"):"";function tm(e){let t=y("span","","—");t.setAttribute("aria-hidden","true"),e.append(t,y("span","sr-only",_t))}function nm(e,t=!1){let n=y("dl","details-list small numerical");for(let[r,s]of e)if(s){let o=y("dd",s===_t||s===c0||s===u0?"metric-unreported":"");if(t&&s===_t)tm(o);else o.textContent=s;n.append(y("dt","",r),o)}return n.childElementCount?n:y("p","small muted",c("当前没有可用数据。","No data available."))}function rm(e,...t){let n=y("section","subpanel stack stack--tight");return n.append(y("h3","",e),...t),n}function d0(e,t,...n){let r=Mt(t,...n);return r.dataset.overviewDisclosure=e,r.querySelector("summary")?.setAttribute("data-overview-focus",e),r}function bi(e,t){let n=y("div","metric-group stack");return n.append(y("p","metric-label small",e),nm(t,!0)),n}var _t=c("尚无数据(原生未报告)","Not reported by the native host"),c0=c("未报告","Not reported"),u0=c("已报告,无数值","Reported without a value"),Xh=c("— 表示原生未报告","— means the native host did not report a value");function Qh(e){let t=Ce(e);if(t===void 0)return"";if(t>=1048576)return`${St.format(t/1048576)} MB`;if(t>=1024)return`${St.format(t/1024)} KB`;return`${St.format(t)} B`}function em(e){return e===void 0?"":`${St.format(e*100)}%`}function Ur(e){let t=Ce(e);if(t===void 0)return"";let n=new Date(t);return Number.isNaN(n.getTime())?"":n.toLocaleString(me,{hour12:!1})}function A5(e,t,n){let r=As(e.contextUsage);if(r.status==="ok"&&(r.tokens!==void 0||r.window!==void 0||r.percent===0))return r;if(r.status!=="ok"&&Object.hasOwn(e,"contextUsage"))return r;let s=As(t.contextUsage);if(s.status==="ok")return s;let i=As(n.contextUsage);if(i.status==="ok"&&(!Object.hasOwn(e,"contextUsage")||r.status==="ok"&&i.tokens!==void 0&&i.window!==void 0))return i;return r}function sm(e,t,n){let r=U(e.stats),s=U(e.state),i={...s,...t},o=U(e.sessionMemory),a=U(i.model),l=U(r.tokens??i.usageTotals),u=A5(t,s,r),d=u.status==="ok"?ct(u.tokens):"",h=u.status==="ok"?ct(u.window):"",p=u.status==="ok"?ct(u.percent):"",g=Uo(i.usageTotals),b=g.status==="ok"?g.latest:void 0,x=g.status==="ok"?g.cumulative:void 0,k=Ce(l.input),E=Ce(l.cacheRead),T=Ce(l.cacheWrite),_=(F)=>F!==void 0&&F>=0,A=_(k)&&_(E)&&_(T),D=Ce(r.cost),R=U(r.failures),L=Ce(o.mainHeapBytes),B=Ce(o.kernelHeapBytes),O=Ce(o.kernelCount),H=L!==void 0||B!==void 0||O!==void 0,K=p?d?`${d} (${p}%)`:`${p}%`:d,G=em(b),de=ct(r.toolCalls),ne=D===void 0?"":E5.format(D),ae=y("dl","metric-highlights numerical");for(let[F,X,te]of[["context",c("上下文已用","Context used"),p?`${p}%`:d?c(`${d} token`,`${d} tokens`):""],["cache",c("最新缓存命中率","Latest cache hit rate"),G],["tools",c("工具调用","Tool calls"),de],["cost",c("估算费用","Estimated cost"),ne]]){let xe=y("div","metric-tile");xe.dataset.tone=F;let W=y("dd",te?"":"metric-unreported",te);if(!te)tm(W);xe.append(y("dt","",X),W),ae.append(xe)}let z=C(i.thinkingLevel),j=y("div","row row--between"),Z=y("button","button button--quiet small",c("规则与记忆","Rules and memory"));Z.type="button",Z.id="runtime-open-resources",Z.dataset.overviewFocus="resources",Z.setAttribute("aria-controls","runtime-resources"),j.append(y("h3","",c("运行状态与用量","Runtime and usage")),Z);let Q=y("section","subpanel stack stack--tight runtime-metrics");Q.append(j,ae,bi(c("会话设置","Session settings"),[[c("模型","Model"),[C(a.provider),C(a.name)||C(a.id)].filter(Boolean).join(" · ")||_t],[c("生效思考档","Active thinking level"),(Object.hasOwn(gi,z)?gi[z]:z)||_t],[c("快速模式","Fast mode"),Yh(i.fastMode)||_t],[c("最近流式 · Web 观测","Latest streaming speed (Web)"),n?`${n.tokensPerSecond<0.01?`<${St.format(0.01)}`:St.format(n.tokensPerSecond)} token/s`:c("未测得","Not measured")]]));let oe=d0("metrics",c("完整运行明细","Full runtime details"),bi(c("上下文与缓存","Context and cache"),[[c("上下文已用(原生)","Context used (native)"),K||_t],[c("上下文窗口","Context window"),h?c(`${h} token`,`${h} tokens`):_t],[c("缓存命中率(原生最新)","Latest cache hit rate (native)"),G||(g.status==="ok"?u0:_t)],[c("缓存累计命中率","Cumulative cache hit rate"),em(x)||(g.status==="ok"?u0:_t)]]),bi(c("其他设置","Other settings"),[[c("权限预设","Permission preset"),C(i.effectivePermissionPreset)||C(i.permissionPreset)||_t],[c("自动压缩","Auto-compaction"),Yh(i.autoCompactionEnabled)||_t]]),bi(c("流量与费用","Usage and cost"),[[c("用户消息","User messages"),ct(r.userMessages)],[c("助手消息","Assistant messages"),ct(r.assistantMessages)],[c("工具调用","Tool calls"),de],[c("输入 token(含缓存)","Input tokens (including cache)"),A?ct(k+E+T):_t],[c("未缓存输入 token","Uncached input tokens"),A?ct(k+T):ct(k)],[c("输出 token","Output tokens"),ct(l.output)],[c("缓存读取 token","Cache read tokens"),ct(l.cacheRead)],[c("缓存写入 token","Cache write tokens"),ct(l.cacheWrite)],[c("总 token","Total tokens"),ct(l.total??l.totalTokens)],[c("估算费用","Estimated cost"),ne],[c("失败请求","Failed requests"),ct(R.erroredRequests)]]),bi(c("原生内存","Native memory"),[[c("OmO 宿主主堆(引擎共享)","OmO host heap (shared by the engine)"),L!==void 0?Qh(L):_t],[c("本会话内核堆","Session kernel heap"),B!==void 0?Qh(B):H?c0:_t],[c("本会话内核数","Session kernel count"),O!==void 0?ct(O):H?c0:_t]]));if(oe.classList.add("metric-breakdown"),Q.append(oe),ae.querySelector(".metric-unreported"))ae.after(y("p","metric-key small",Xh));else if(oe.querySelector(".metric-unreported [aria-hidden='true']"))oe.querySelector(".fold-body")?.append(y("p","metric-key small",Xh));return Q}function C5(e){let t=y("ul","inline-list");for(let n of e){let r=U(n),s=C(r.requestedMode),i={queued:c("排队中","Queued"),sending:c("正在发送","Sending"),held:c("等待中","Waiting"),pending:c("等待中","Waiting"),accepted:c("已接收","Accepted")}[C(r.state)]||"",o=[s==="steer"?c("引导","Steer"):s==="followUp"||s==="follow_up"?c("后续","Follow-up"):"",i].filter(Boolean).join(" · "),a=y("li","stack stack--tight");if(o)a.append(y("span","small muted",o));a.append(y("p","plain",C(r.text)||c("(无文本)","(No text)"))),t.append(a)}return t}function im(e,t,n,r,s){let i=y("p","small muted"),o=y("p","small muted");o.setAttribute("role","status");let a=y("div","stack stack--tight"),l=d0("queue",c("预览待处理输入","Preview pending inputs"),o,a),u=Ue(c("清空队列","Clear queue"),s,"button--danger");u.dataset.overviewFocus="queue:clear",u.dataset.write="";let d=y("div","row");d.append(u);let h=rm(c("输入队列","Input queue"),i,d,l),p,g,b=!1,x=!1,k=()=>{let D=!(p!==void 0&&p>0)&&!x;u.toggleAttribute("data-unavailable",D),u.disabled=D||!r()},E=(D="",...R)=>{if(a.contains(document.activeElement))l.querySelector("summary")?.focus({preventScroll:!0});re(o,D),a.replaceChildren(...R)},T=()=>{if(!b)return;g?.abort(),g=void 0,b=x=!1,E(),k()},_=()=>h.isConnected&&l.open&&n(),A=(D=!1)=>{if(!_())return;if(b&&!D)return;g?.abort();let R=g=new AbortController;b=!0,x=!1,k(),E(c("正在读取待处理输入…","Loading pending inputs…"));let L=()=>g===R&&_(),B=(O=!1)=>{E(O?c("队列响应超出读取上限。","The queue response exceeded the read limit."):c("无法读取待处理输入。","Couldn't load pending inputs."),Ue(c("重试队列预览","Retry queue preview"),()=>A(!0),"button--quiet"))};e.request(`${t}/queue`,void 0,R.signal).then((O)=>{if(!L())return;if(!Array.isArray(O.inputs)){B();return}x=O.inputs.length>0,k(),E(O.truncated===!0?c("预览已截断,仅显示部分队列内容。","Preview truncated. Only part of the queue is shown."):x?"":c("没有可预览的待处理输入。","No pending inputs to preview."),...x?[C5(O.inputs)]:[])},(O)=>{if(L())B(O instanceof Be&&O.code==="queue_too_large")}).finally(()=>{if(g===R)g=void 0})};return l.addEventListener("toggle",()=>{if(l.open)A();else T()}),{root:h,activate:A,deactivate:T,update(D){p=D,i.textContent=D===void 0?c("待处理输入数量未知。","Pending input count unknown."):D>0?c(`${St.format(D)} 条待处理输入`,`${St.format(D)} pending ${D===1?"input":"inputs"}`):c("没有排队的输入。","No queued inputs."),k()}}}function _5(e,t){let n=we(e.commands).map(U).filter((i)=>Boolean(C(i.invocation))),r=rm(c("可用命令","Available commands"));if(!n.length)return r.append(y("p","muted small",c("未读取到可用命令。","No commands were returned."))),r;let s=y("ul","command-list");for(let i of n){let o=C(i.invocation),a=Ue(o,()=>t.insertCommand(o),"button--quiet path");a.title=c("插入输入框,不会立即发送","Insert in the input box without sending"),a.setAttribute("aria-label",c(`插入命令:${o}`,`Insert command: ${o}`)),a.dataset.overviewFocus=`command:${o}`;let l=y("li","stack stack--tight");if(l.append(a),C(i.description))l.append(y("p","small muted break",C(i.description)));s.append(l)}return r.append(d0("commands",c(`${St.format(n.length)} 项 · 展开后可插入输入框`,`${St.format(n.length)} ${n.length===1?"command":"commands"} · Expand to insert`),s)),r}var S5={pending:c("待办","Pending"),in_progress:c("进行中","In progress"),completed:c("已完成","Completed"),abandoned:c("已放弃","Abandoned")},l0={"missing-tree":c("快照缺少会话树","The snapshot has no session tree."),"invalid-leaf":c("活动分支标识无效","The active branch ID is invalid."),"unknown-leaf":c("活动分支不在会话树中","The active branch is not in the session tree."),"duplicate-id":c("会话树有重复标识","The session tree contains duplicate IDs."),"broken-ancestry":c("分支链断裂或指向其他分支","The branch chain is broken or points to another branch."),"tree-budget":c("会话树超出读取上限,可能不完整","The session tree exceeds the read limit and may be incomplete."),incomplete:c("分支记录超出读取上限","The branch records exceed the read limit."),ownership_changed:c("会话或活动分支已变化","The session or active branch changed."),binding_unverified:c("无法确认会话归属","The session binding could not be verified."),unsupported:c("当前宿主不支持有界分支读取","The current host does not support bounded branch reads."),malformed:c("原生返回的分支数据格式无效","The native host returned invalid branch data.")};function T5(e){let t=y("section","subpanel stack stack--tight");if(t.append(y("h3","",c("当前待办","Current Todo"))),e.status==="loading"){let s=y("p","small muted",c("正在读取当前分支…","Loading the active branch…"));return s.setAttribute("role","status"),t.append(s),t}if(C(e.status)==="invalid"){let s=l0[C(e.reason)]??c("未知原因","Unknown reason.");return t.append(y("p","small muted",c(`无法确认活动分支(${s}),不显示待办,以免混入其他分支。`,`Could not verify the active branch. ${s} Todo is hidden to avoid showing another branch’s tasks.`))),t}if(C(e.status)!=="ok"){let s=l0[C(e.reason)];return t.append(y("p","small muted",s?c(`分支数据不可用(${s}),待办数量未知。`,`Branch data is unavailable. ${s} The Todo count is unknown.`):c("分支数据不可用,待办数量未知。可刷新重试。","Branch data is unavailable. The Todo count is unknown. Refresh to try again."))),t}let n=C(e.leafId);t.append(y("p","small muted",n?c(`活动分支:${n}`,`Active branch: ${n}`):c("当前没有活动分支。","No branch is active.")));let r=U(e.todo);if(C(r.status)==="ok"){let s=om(r),i=s.childElementCount;if(i){let o=Mt(c(`待办(${St.format(i)} 组)`,`Todo (${St.format(i)} ${i===1?"group":"groups"})`),s);o.open=!0,t.append(o)}}else if(r.status==="none")t.append(y("p","small muted",c("所选分支没有当前待办。","No current Todo on the selected branch.")));else{let s=l0[C(r.reason)]??"";t.append(y("p","small muted",[c("当前待办不可用,数量未知。可刷新重试。","Current Todo is unavailable. The task count is unknown. Refresh to try again."),s].filter(Boolean).join(" ")))}return t}function om(e){let t=y("ul","inline-list");for(let n of we(e.phases).map(U)){let r=y("li","stack stack--tight");r.append(y("p","plain break",C(n.name)||c("待办","Todo")));let s=y("ul","inline-list");for(let i of we(n.tasks).map(U)){let o=y("li");o.append(y("p","small break",`${S5[C(i.status)]??C(i.status)} · ${C(i.content)}`)),s.append(o)}if(s.childElementCount)r.append(s);t.append(r)}return t}function Wo(e){let t=y("p","small muted");if(t.setAttribute("role","status"),!e)return t.textContent=c("正在读取已记录的待办列表…","Loading recorded Todo lists…"),[t];if(e.status!=="ok"||!Array.isArray(e.snapshots)||typeof e.limitReached!=="boolean")return t.textContent=e.status==="ownership_changed"?c("无法核验历史所属分支。可刷新重试。","The branch for this history could not be verified. Refresh to try again."):c("无法读取已记录的待办列表。可刷新重试。","Recorded Todo lists are unavailable. Refresh to try again."),[t];let n=we(e.snapshots).map(U);t.textContent=n.length?c("所选分支已记录的列表,按新到旧排列。","Recorded lists for the selected branch, newest first."):e.limitReached?c("在读取范围内未找到已记录的列表,更早的记录未知。","No recorded lists in the read window. Older records are unknown."):c("所选分支没有已记录的历史列表。","No recorded lists for the selected branch.");let r=y("ol","inline-list");for(let[s,i]of n.entries()){let o=y("li","stack stack--tight");o.append(y("h4","",c(`记录 ${St.format(s+1)}`,`Recorded list ${St.format(s+1)}`)),om(i)),r.append(o)}return[t,...n.length?[r]:[],...n.length&&e.limitReached?[y("p","small muted",c("已达历史读取上限,更早的记录可能未显示。","The read limit was reached. Older records may not appear."))]:[]]}function R5(e){if(e.status==="loading")return[y("p","small muted",c("正在读取当前分支…","Loading the active branch…"))];if(e.status!=="ok")return[y("p","small muted",c("无法确认当前分支,未显示长期记忆计数。","Could not verify the active branch, so long-term memory counts are hidden."))];let t=U(e.memory);if(C(t.status)!=="ok")return[y("p","small muted",c("当前分支没有召回记录;不代表未启用长期记忆。","No recall record for this branch. Long-term memory may still be enabled."))];let n=Ce(t.recalledCount),r=Ur(t.recentRecalledAt),s=U(t.gate),i=U(t.unavailable),o=s.status==="failed"||s.status==="skipped"?c(`${s.status==="failed"?"失败":"跳过"} · 连续 ${ct(s.consecutiveFailures)} 次 · 候选 ${ct(s.candidateCount)}${Ur(s.at)?` · ${Ur(s.at)}`:""}`,`${s.status==="failed"?"Failed":"Skipped"} · Consecutive failures: ${ct(s.consecutiveFailures)} · Candidates: ${ct(s.candidateCount)}${Ur(s.at)?` · ${Ur(s.at)}`:""}`):"",a=Ce(i.count),u=[[c("长期记忆召回条目(累计,仅计数)","Long-term memory recalls (total count)"),n!==void 0?ct(n):""],[c("最近召回时间","Last recall"),r],[c("召回门控","Recall gate"),o],[c("记忆不可用记录(仅计数)","Memory unavailability records (count only)"),a!==void 0?`${ct(a)}${Ur(i.at)?` · ${Ur(i.at)}`:""}`:""]].filter(([,d])=>Boolean(d));return[y("p","small muted",c("仅活动分支的召回计数与状态,不含个人记忆原文、路径、提示词或宿主堆内存。","Recall counts and status for the active branch only. Personal memory text, paths, prompts, and host heap data are not shown.")),u.length?nm(u):y("p","small muted",c("有记忆聚合记录,但暂无可显示的数值。","Memory records exist, but there are no values to show."))]}function am(e,t,n){let r=ve("runtime-metrics",HTMLElement).querySelector(".runtime-metrics");if(!r)return;let s=sm(e,t,n),i=r.querySelector("details"),o=s.querySelector("details"),a=document.activeElement,l=a instanceof HTMLElement&&r.contains(a)?a.dataset.overviewFocus:void 0;if(i&&o)o.open=i.open;if(r.replaceWith(s),l)s.querySelector(`[data-overview-focus="${CSS.escape(l)}"]`)?.focus({preventScroll:!0})}function lm(e,t,n,r,s,i,o){let a=ve("runtime-metrics",HTMLElement),l=document.activeElement,u=l instanceof HTMLElement&&a.contains(l)?l.dataset.overviewFocus:void 0,d=new Set([...a.querySelectorAll("details[open]")].map((h)=>h.dataset.overviewDisclosure));for(let h of[...a.children])if(h!==s&&h!==i)h.remove();if(i.parentElement!==a)a.prepend(i);if(a.prepend(sm(e,t,o)),i.after(_5(n,r)),a.querySelectorAll("details[data-overview-disclosure]").forEach((h)=>{h.open=d.has(h.dataset.overviewDisclosure)}),u!==void 0&&document.activeElement!==l){let h=a.querySelector(`[data-overview-focus="${CSS.escape(u)}"]:not(:disabled)`);((h?.getClientRects().length)?h:a).focus({preventScroll:!0})}}function f0(e){let t=ve("runtime-todo",HTMLElement),n=document.activeElement,r=T5(e),s=t.querySelector("[data-runtime-branch]"),i=s?.querySelector("details"),o=r.querySelector("details");if(i&&o)o.open=i.open;let a=i?.querySelector("summary")===n;if(r.dataset.runtimeBranch="",s)s.replaceWith(r);else t.prepend(r);if(a)(o?.querySelector("summary")??t).focus({preventScroll:!0})}function h0(e){ve("runtime-memory-branch-content",HTMLElement).replaceChildren(...R5(e))}function cm(e,t){let n=new Set([...e.querySelectorAll("details[open]")].map((i)=>i.firstElementChild?.textContent)),r=Gh(t);r.querySelectorAll("details").forEach((i)=>{i.open=n.has(i.firstElementChild?.textContent)});let s=e.querySelectorAll('[role="tabpanel"]');if(!s.length){for(let i of r.children)i.removeAttribute("id");e.replaceChildren(r)}for(let i of s){let o=[...r.children].find((a)=>a.id===i.id);if(!o)continue;o.removeAttribute("id"),o.removeAttribute("tabindex"),i.replaceChildren(o)}}function um(e,t){let n=ve("branch-dialog",HTMLDialogElement),r=ve("branch-message",HTMLSelectElement),s=(x)=>ve(x,HTMLElement),i=(x)=>ve(x,HTMLButtonElement),o={web:c("来源:Web 会话。新会话和原会话可分别继续。","Source: Web session. You can continue the original and the new session separately."),history:c("来源:CLI 最后保存的上下文,不修改 CLI 记录。","Source: Last saved CLI context. The CLI record will not change."),live:c("来源:CLI 当前上下文。无法校验实时位置时不会改用历史记录。","Source: Current CLI context. If the live position cannot be verified, history will not be used instead.")},a,l,u=!1,d=!1,h=new Map;function p(){let x=u||Boolean(l),k=h.get(r.value);r.disabled=x||!h.size,i("branch-fork").disabled=x||k===void 0,i("branch-clone").disabled=x||!d,i("branch-refresh").disabled=x,i("branch-close").disabled=u,re(s("branch-message-preview"),k)}async function g(x){if(u||l)return;let k=l=new AbortController,E=s("branch-status");re(E,c("正在读取可用分支与复制选项…","Loading branch and clone options…")),re(s("branch-error")),p();try{let T=await e.request(`${Ea(x)}/branch-options`,void 0,k.signal);if(k.signal.aborted||!n.open||a!==x)return;d=T.canClone===!0,h=new Map(we(T.forkMessages).map(U).flatMap((A)=>{let D=C(A.entryId);return D&&typeof A.text==="string"?[[D,A.text]]:[]}));let _=r.value;if(r.replaceChildren(ot(c("选择一条用户消息","Choose a user message"),""),...Array.from(h,([A,D],R)=>{let L=D.trim().replace(/\s+/g," ");return ot(`${St.format(R+1)} · ${L.slice(0,100)}${L.length>100?"…":""}`,A)})),h.has(_))r.value=_;re(E,!d&&!h.size?c("此来源没有可分支或复制的上下文。","This source has no context to branch or clone."):"")}catch(T){if(!k.signal.aborted&&n.open&&a===x)d=!1,h.clear(),r.replaceChildren(ot(c("未读取到选项","No options loaded"),"")),re(E),re(s("branch-error"),c(`无法读取分支选项:${Re(T)}`,`Could not load branch options: ${Re(T)}`))}finally{if(l===k)l=void 0;p()}}async function b(x){let k=a;if(!k||u||l)return;u=!0,re(s("branch-error")),re(s("branch-status"),c("正在创建独立的 Web 会话…","Creating a separate Web session…")),p();try{let E=await e.request(`${Ea(k)}/branches`,x);if(E.cancelled===!0){re(s("branch-status"),c("已取消,原会话没有修改。","Canceled. The original session did not change."));return}let T=un(E.session);if(!T?.active)throw new Be(c("没有收到可继续的 Web 会话。请检查会话列表。","No active Web session was returned. Check the session list."),502,"");n.close(),t(T,C(E.editorText),k)}catch(E){re(s("branch-status")),re(s("branch-error"),c(`无法确认新会话:${Re(E)}`,`Could not confirm the new session: ${Re(E)}`))}finally{u=!1,p()}}return r.addEventListener("change",p),ve("branch-form",HTMLFormElement).addEventListener("submit",(x)=>{if(x.preventDefault(),!i("branch-fork").disabled)b({kind:"fork",entryId:r.value})}),i("branch-clone").addEventListener("click",()=>void b({kind:"clone"})),i("branch-close").addEventListener("click",()=>n.close()),i("branch-refresh").addEventListener("click",()=>{if(a)g(a)}),n.addEventListener("cancel",(x)=>{if(u)x.preventDefault()}),n.addEventListener("close",()=>{if(n.open)return;l?.abort(),l=void 0,a=void 0}),(x)=>{if(n.open)return;a=x,d=!1,h.clear(),r.replaceChildren(ot(c("选择一条用户消息","Choose a user message"),"")),s("branch-source").textContent=x.name,s("branch-context").textContent=o[x.kind],n.showModal(),g(x)}}var m0=(e)=>e instanceof Be&&e.status===409&&(e.code==="tree_stale"||e.code==="session_changed"||e.code==="stale_leaf");function M5(e){let{leafId:t,nextCursor:n}=e,r=(a)=>typeof a==="string"&&a.length>0,s=(a)=>a===void 0||typeof a==="string";if(!Array.isArray(e.nodes)||e.nodes.length>40||t!==null&&!r(t)||n!==void 0&&(!r(n)||!e.nodes.length))throw Error("Invalid tree page");let i=new Set;return{nodes:e.nodes.map((a)=>{let{id:l,parentId:u,type:d,role:h,label:p,summary:g}=U(a);if(!r(l)||i.has(l)||u!==null&&!r(u)||!r(d)||!s(h)||!s(p)||!s(g))throw Error("Invalid tree node");return i.add(l),{id:l,parentId:u,type:d,role:h,label:p,summary:g}}),leafId:t,nextCursor:n}}var dm={user:c("你","You"),assistant:c("助手","Assistant"),toolResult:c("工具结果","Tool result"),bashExecution:c("命令输出","Command output"),message:c("消息","Message"),compaction:c("上下文压缩","Context compaction"),branch_summary:c("分支摘要","Branch summary"),model_change:c("模型变更","Model change"),thinking_level_change:c("思考档变更","Thinking level change"),custom:c("会话记录","Session entry"),session_info:c("会话信息","Session info")},fm=c("会话位置已变化,请重新读取会话树。","The session position changed. Reload the session tree.");function hm(e,t,n,r,s){let i=y("section","subpanel stack stack--tight");i.id="runtime-tree";let o=y("p","small muted");o.setAttribute("role","status");let a=y("p","small muted",c("仅显示已加载的节点(最新记录在前),不代表完整的分支结构。选择历史用户消息可将其载入输入框;不会自动发送。","Shows loaded entries (newest first), not the complete branch structure. Select a past user message to load it into the input box without sending it.")),l=y("ul","tree"),u=y("div","row"),d=Ue(c("加载更早节点","Load older"),()=>{if(E)de(E)});d.dataset.treeOlder="";let h=Ue(c("重新读取会话树","Reload session tree"),()=>{de()});h.dataset.treeReload="";let p=Ue(c("切换到空上下文","Switch to an empty context"),()=>O(null));u.append(d,h,p);let g=Mt(c("查看会话节点","View session nodes"),o,a,l,u),b=g.querySelector("summary");i.append(y("h3","",c("会话树","Session tree")),g);let x,k,E,T=[],_=!1,A=!1,D="",R=new Map,L=()=>n()&&g.open;function B(){let z=!r();p.disabled=z;for(let j of R.values())j.disabled=z}function O(z){if(L()&&!_&&k!==void 0&&r())s(z,k)}function H(){let z=document.activeElement;if(o.textContent=D||(k!==void 0&&!R.size?k===null?c("没有可导航的会话节点。","No session nodes to navigate."):c("这一页没有列出活动节点。","This page does not include the active node."):R.size&&k!==null&&k!==void 0&&!R.has(k)?c("活动节点不在已加载的记录中。","The active node is not among the loaded entries."):""),o.classList.toggle("error",_||A),o.hidden=!o.textContent,a.hidden=!R.size,l.hidden=!R.size,d.hidden=_||!E&&z!==d,d.textContent=E?c("加载更早节点","Load older"):c("没有更早的可加载节点","No older entries to load"),h.hidden=!_&&!A&&z!==h,p.hidden=k===void 0||k===null||_,u.hidden=d.hidden&&h.hidden&&p.hidden,d.setAttribute("aria-disabled",String(Boolean(x)||!E)),h.setAttribute("aria-disabled",String(Boolean(x))),B(),L()&&(z===d&&d.hidden||z===p&&p.hidden))(_?h:b).focus({preventScroll:!0})}function K(z,j){let Z=z.nodes.map((F)=>F.id),Q=!j&&k===z.leafId&&Z.length===T.length&&Z.every((F,X)=>F===T[X]);if(!j&&!Q){let F=new Set(Z);for(let[X,te]of R)if(!F.has(X)){if(document.activeElement===te)b.focus({preventScroll:!0});te.parentElement?.remove(),R.delete(X)}}if(k=z.leafId,!Q||R.size===T.length)E=z.nextCursor;if(!j)T=Z;let oe=[];for(let F of[...z.nodes].reverse()){let X=R.get(F.id);if(!X){X=Ue("",()=>O(F.id),"button--quiet break"),R.set(F.id,X);let W=y("li");W.append(X),l.append(W)}let te=F.role||F.type,xe=F.label||(Object.hasOwn(dm,te)?dm[te]:te);if(X.textContent=`${xe} · ${C(F.summary)||F.id.slice(0,12)}`,F.id===k)X.setAttribute("aria-current","true");else X.removeAttribute("aria-current");oe.push(X.parentElement)}if(!j&&!Q){let F=null;for(let X of oe.reverse()){if(X.nextElementSibling!==F&&!X.contains(document.activeElement))l.insertBefore(X,F);F=X}}}function G(){if(ne(),!g.open&&k===void 0)return;if(l.contains(document.activeElement))b.focus({preventScroll:!0});l.replaceChildren(),R.clear(),k=void 0,E=void 0,T=[],_=!0,A=!1,D=fm,H()}async function de(z){if(!L()||x||z!==void 0&&_)return;let j=x=new AbortController,Z=()=>x===j&&L(),Q=z===void 0?"":`?${new URLSearchParams({cursor:z})}`;A=!1,D=z===void 0?c("正在读取会话节点…","Loading session entries…"):c("正在读取更早的节点…","Loading older entries…");let oe=!1;H();try{let F=AbortSignal.any([j.signal,AbortSignal.timeout(12000)]),X=await e.request(`${t}/tree${Q}`,void 0,F);if(!Z())return;let te=M5(X);if(z!==void 0&&te.leafId!==k){G();return}if(z!==void 0&&(te.nextCursor===z||te.nodes.some((xe)=>R.has(xe.id))))throw Error("Overlapping tree page");if(_=!1,D="",K(te,z!==void 0),oe=z!==void 0,document.activeElement===h)b.focus({preventScroll:!0})}catch(F){if(!Z())return;if(m0(F)){G();return}A=!0,D=z===void 0?c("读取会话树失败。请重试。","Could not load the session tree. Try again."):c("读取更早的节点失败。已保留之前的节点。","Could not load older entries. The loaded entries are kept.")}finally{if(x===j){if(x=void 0,L()){if(H(),oe&&document.activeElement===d)d.scrollIntoView({block:"nearest",behavior:"instant"})}}}}function ne(){if(!x)return;x.abort(),x=void 0,D=_?fm:"",H()}let ae=()=>{if(k===void 0&&!_&&!A)de()};return g.addEventListener("toggle",()=>{if(L())ae();else ne()}),H(),{root:i,activate:ae,abort:ne,invalidate:G,syncWrites:B,checkLeaf:(z)=>{if(k!==void 0&&k!==z)G()},refresh:()=>{de()}}}function vi(e){return!(e.defaultPrevented||e.isComposing||e.keyCode===229||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)}function yi(e,t,n,r){let s=n.length-1;if(s<0)return;switch(e){case"ArrowDown":return t===s?0:t+1;case"ArrowUp":return t<=0?s:t-1;case"PageUp":case"PageDown":{let i=e==="PageUp"?-1:1;if(t<0)return i<0?s:0;let o=i<0?0:s;if(t===o)return t;let a=n[t].getBoundingClientRect().top,l=t+i;while(l!==o&&Math.abs(n[l+i].getBoundingClientRect().top-a)<=r.clientHeight)l+=i;return l}}}function ki(e,t){let n=e.getBoundingClientRect().top+e.clientTop,r=n+e.clientHeight,s=t.getBoundingClientRect();if(s.top<n)e.scrollTop-=n-s.top;else if(s.bottom>r)e.scrollTop+=Math.min(s.bottom-r,s.top-n)}function mm(e,t,n){let r=!1;t.addEventListener("compositionstart",()=>{r=!0}),t.addEventListener("compositionend",()=>{r=!1}),t.addEventListener("blur",()=>{r=!1}),e.addEventListener("keydown",(s)=>{if(!e.open||r||!vi(s)||n.hidden)return;let i=s.target===t;if(!i&&!(s.target instanceof Element&&n.contains(s.target)))return;let o=Array.from(n.querySelectorAll("button[data-invocation]:enabled")),a=o.findIndex((u)=>u===s.target);if(!i&&a<0)return;if(i&&s.key==="Enter"&&o[0]){s.preventDefault(),o[0].click();return}let l=yi(s.key,a,o,e);if(l===void 0)return;s.preventDefault(),o[l].focus({preventScroll:!0}),ki(e,o[l])})}var gm=/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/,D5=new Map([["extension",c("扩展","Extension")],["prompt",c("提示模板","Prompt template")],["skill",c("技能","Skill")]]),L5=new Map([["enabled",c("已启用","Enabled")],["disabled",c("已停用","Disabled")],["untrusted",c("不受信任","Untrusted")],["idle",c("空闲","Idle")],["connecting",c("连接中","Connecting")],["connected",c("已连接","Connected")],["degraded",c("降级","Degraded")],["suspended",c("已挂起","Suspended")],["needs_auth",c("需要认证","Authentication required")],["needs_client_registration",c("需要注册客户端","Client registration required")]]),pm=new Intl.NumberFormat(me);function I5(e){let t=C(e.invocation),n=C(e.source),r=D5.get(n);if(!r)return;if(n==="skill"?/^\$[A-Za-z0-9-]{1,64}$/.test(t):/^\/[A-Za-z0-9_-]{1,64}$/.test(t))return{name:t,detail:r}}function N5({name:e,enabled:t,origin:n}){if(typeof e!=="string"||!gm.test(e)||typeof t!=="boolean")return;let r=n==="package"?c(" · 包来源"," · From package"):n==="top-level"?c(" · 顶层来源"," · Top-level"):"";return{name:e,detail:(t?c("已启用","Enabled"):c("已停用","Disabled"))+r}}function B5({name:e,status:t,toolCount:n}){let r=L5.get(C(t));if(!r||typeof e!=="string"||!gm.test(e)||typeof n!=="number"||!Number.isSafeInteger(n)||n<0)return;return{name:e,detail:c(`${r} · ${pm.format(n)} 个工具`,`${r} · ${pm.format(n)} ${n===1?"tool":"tools"}`)}}function p0(e,t){let n=U(e);if(n.status!=="ok"||!Array.isArray(n.rows)||typeof n.incomplete!=="boolean")return{status:"unavailable",reason:n.status==="unavailable"&&n.reason==="rpc-failed"?"rpc-failed":"invalid-response"};let r=n.rows.slice(0,128).flatMap((s)=>t(U(s))??[]);return{status:"ok",rows:r,incomplete:n.incomplete||r.length!==n.rows.length}}function g0(e,t,n){let r=y("section","subpanel stack stack--tight");if(r.append(y("h3","",e)),n.status==="unavailable")return r.append(y("p","small muted",n.reason==="rpc-failed"?c("当前不可用:未能从当前宿主读取。","Unavailable: Could not read from the current host."):c("当前不可用:原生响应格式无效。","Unavailable: The native response was invalid."))),r;if(t)r.append(y("p","small muted",t));if(n.rows.length){let s=y("dl","capability-list small numerical");s.tabIndex=0,s.setAttribute("aria-label",c(`${e} · 只读列表`,`${e} · Read-only list`));for(let i of n.rows){let o=y("div");o.tabIndex=-1;let a=y("dt");a.append(y("code","",i.name)),o.append(a,y("dd","muted",i.detail)),s.append(o)}s.addEventListener("keydown",(i)=>{if(!vi(i))return;let o=s.closest(".details-scroll");if(!o)return;let a=Array.from(s.children),l=a.findIndex((d)=>d===i.target),u=yi(i.key,l,a,o);if(u===void 0)return;i.preventDefault(),a[u].focus({preventScroll:!0}),ki(o,a[u])}),r.append(s)}if(n.incomplete)r.append(y("p","small muted",n.rows.length?c("清单不完整,部分项目未显示。","This list is incomplete. Some entries are not shown."):c("清单不完整,没有可显示的项目。","This list is incomplete. No entries can be shown.")));else if(!n.rows.length)r.append(y("p","small muted",c("原生未报告任何条目。","The native host did not report any entries.")));return r}function bm(e){return[g0(c("已加载扩展","Loaded extensions"),c("这里只显示当前会话的原生报告,不是安装清单。","Shows only what the native host reports for this session, not everything installed."),p0(e.extensions,N5)),g0(c("MCP 服务","MCP servers"),c("状态与工具数由原生报告,不代表工具可立即调用。","The native host reports status and tool counts. Tools may not be ready to use."),p0(e.mcpServers,B5)),b0(),g0(c("注册命令与技能","Registered commands and skills"),c("已注册不代表当前可执行。","Registered commands and skills may not be available to run."),p0(e.commands,I5))]}function b0(){let e=y("section","subpanel stack stack--tight");return e.id="runtime-compatibility",e.append(y("h3","",c("浏览器原生兼容未启用","Native terminal features are unavailable in the browser")),y("p","small muted",c("尚未验证浏览器终端能在各模式下可靠隔离私密交互。","The browser terminal has not been verified to keep private interactions isolated in every mode.")),y("p","small muted",c("账户登录、凭据、私密授权(含 MCP)、直接 shell 或外部编辑器,请在本机 OmO 终端完成。","Use the local OmO terminal for sign-in, credentials, private approvals (including MCP), direct shell access, and external editors.")),y("p","small muted",c("请自行打开本机 OmO,选择对应的工作目录和会话,再手动操作。此提示不会启动终端、执行或重放命令,也不会传送私密内容。","Open OmO locally and select the working directory and session. This notice does not launch a terminal, run or replay commands, or transmit private content.")),y("p","small muted",c("如果要继续同一会话,符合条件的空闲会话可用「会话管理 → 转到 CLI」先释放,再按回执在本机继续。","To continue an eligible idle session, release it with “Manage session → Move to CLI”, then follow the instructions to continue locally."))),e}var jr=64,wi="http://www.w3.org/2000/svg",O5=0,$5=/^[0-9a-f]{64}$/u,jo=(e)=>typeof e==="string"&&$5.test(e)?e:"",Wr=(e)=>{let t=Ce(e);return t!==void 0&&Number.isSafeInteger(t)&&Math.abs(t)<=8640000000000000?t:void 0};function v0(e){return{createdAt:Wr(e.createdAt),startedAt:Wr(e.startedAt),completedAt:Wr(e.completedAt),lastActivityAt:Wr(e.lastActivityAt)}}var vm=new Intl.NumberFormat(me);function y0({createdAt:e,startedAt:t,completedAt:n,lastActivityAt:r}){let s=[];for(let[i,o]of[[c("创建","Created"),e],[c("开始","Started"),t],[c("完成","Completed"),n],[c("最近活动","Last activity"),r]])if(o!==void 0)s.push([i,ft(o)]);if(t!==void 0&&n!==void 0&&n>=t){let i=Math.floor((n-t)/1000),o=vm.format(Math.floor(i/60)),a=vm.format(i%60);s.push([c("耗时","Elapsed"),i<60?c(`${a} 秒`,`${a}s`):c(`${o} 分 ${a} 秒`,`${o}m ${a}s`)])}return s}var jn=(e)=>e.label||c(`节点 ${e.id+1}`,`Node ${e.id+1}`);function ym(e){if(!Array.isArray(e.nodes)||!e.nodes.length||e.nodes.length>jr||!Array.isArray(e.waves)||!e.waves.length||e.waves.length>e.nodes.length)return;let t=e.nodes.length,n=new Map,r=(o)=>typeof o==="number"&&Number.isInteger(o)&&o>=0&&o<t;for(let o of e.nodes){let a=U(o),{id:l,state:u,upstream:d,attempt:h,agent:p,category:g,label:b,configuredModel:x,taskKey:k}=a;if(!r(l)||n.has(l)||!Array.isArray(d)||d.length>=t||!d.every(r)||new Set(d).size!==d.length)return;n.set(l,{id:l,state:C(u),upstream:d,agent:C(p),category:C(g),label:C(b),configuredModel:C(x),taskKey:jo(k),times:v0(a),attempt:typeof h==="number"&&Number.isSafeInteger(h)&&h>=0?h:void 0})}let s=new Map,i=[];for(let[o,a]of e.waves.entries()){let l=U(a);if(l.index!==o||!Array.isArray(l.nodes)||!l.nodes.length||l.nodes.length>n.size)return;let u=[];for(let d of l.nodes){if(!r(d)||s.has(d))return;let h=n.get(d);if(!h)return;s.set(d,o),u.push(h)}i.push(u)}if(s.size!==n.size)return;for(let[o,a]of i.entries())for(let l of a)if(!l.upstream.every((u)=>(s.get(u)??1/0)<o))return;return i}function km(e,t){let l=(L)=>L*104-16,u=l(Math.max(...e.map((L)=>L.length))),d=Math.min(u,l(2)),h=new Map,p=new Map,g=y("div","dag-graph-map");g.tabIndex=0,g.setAttribute("role","region"),g.setAttribute("aria-label",c("可滚动的有向依赖图,完整依赖见节点详情。","Scrollable directed dependency graph. See node details for all dependencies."));let b=y("div","dag-graph-canvas"),x=(L)=>`${L/16}rem`;for(let[L,B]of e.entries()){let O=12+L*96,H=y("div","dag-graph-wave",c(`第 ${L+1} 波`,`Wave ${L+1}`));H.style.top=x(O),b.append(H);for(let[K,G]of B.entries()){let de=12+Math.max(0,(d-l(B.length))/2)+K*104;h.set(G.id,{x:de+44,y:O+21,wave:L});let ne=y("button","dag-graph-node");ne.type="button",ne.dataset.node=String(G.id);let ae=br(G.state);if(ae)ne.dataset.state=G.state;ne.style.left=x(de),ne.style.top=x(O+21),ne.style.width=x(88),ne.style.height=x(46),ne.title=jn(G),ne.addEventListener("click",()=>t(G.id)),ne.append(y("strong","",jn(G)),y("span","",G.state==="blocked"?c("被依赖阻塞","Blocked"):ae??c("状态未知","Unknown"))),b.append(ne)}}let k=document.createElementNS(wi,"svg");k.setAttribute("class","dag-graph-edges"),k.setAttribute("aria-hidden","true"),k.setAttribute("focusable","false");let E=document.createElementNS(wi,"defs"),T=document.createElementNS(wi,"marker"),_=`dag-arrow-${++O5}`;T.setAttribute("id",_),T.setAttribute("viewBox","0 0 6 8"),T.setAttribute("markerWidth","6"),T.setAttribute("markerHeight","8"),T.setAttribute("markerUnits","userSpaceOnUse"),T.setAttribute("refX","6"),T.setAttribute("refY","4"),T.setAttribute("orient","auto");let A=document.createElementNS(wi,"path");A.setAttribute("d","M0 0 L6 4 L0 8 Z"),T.append(A),E.append(T),k.append(E);for(let L of e)for(let B of L){let O=h.get(B.id);for(let H of B.upstream){let K=h.get(H),G=K.y+46,de=O.y-2,ne=document.createElementNS(wi,"path");if(ne.dataset.from=String(H),ne.dataset.to=String(B.id),ne.setAttribute("marker-end",`url(#${_})`),O.wave===K.wave+1){let ae=(G+de)/2;ne.setAttribute("d",`M${K.x} ${G} C${K.x} ${ae} ${O.x} ${ae} ${O.x} ${de}`)}else{let ae=p.get(H)??p.size;p.set(H,ae);let z=12+u+8+5*ae;ne.setAttribute("d",`M${K.x} ${G} V${G+6} H${z} V${de-9} H${O.x} V${de}`)}k.append(ne)}}let D=24+u+p.size*5,R=24+(e.length-1)*96+21+46;return b.style.width=x(D),b.style.height=x(R),k.setAttribute("viewBox",`0 0 ${D} ${R}`),b.prepend(k),g.append(b),g}var Zt=new Intl.NumberFormat(me),Em=[["pending",c("等待","Pending")],["scheduled",c("已调度","Scheduled")],["running",c("运行中","Running")],["paused",c("已暂停","Paused")],["blocked",c("阻塞","Blocked")],["completed",c("已完成","Completed")],["failed",c("失败","Failed")],["cancelled",c("已取消","Canceled")],["skipped",c("已跳过","Skipped")]],wm=new Set(["pending","scheduled","running","paused","blocked"]),z5=new Set(["scheduled","running","paused","blocked","failed"]),k0=(e)=>br(e)??c("状态未知","Unknown status");function w0(e){let t=y("dl","capability-list small numerical break");for(let[n,r]of e){let s=y("div");s.append(y("dt","",n),y("dd",r?"":"muted",r||c("未报告","Not reported"))),t.append(s)}return t}function Am(e){return[[c("生效模型","Effective model"),e?.effectiveModel??""],[c("推理档位","Reasoning"),e?.reasoning??""]]}function x0(e){let t=U(e.effectiveModel),n=C(t.provider),r=C(t.modelId);return{description:C(e.description),configuredModel:C(e.configuredModel),effectiveModel:n&&r?`${n}/${r}`:"",reasoning:n&&r?C(t.reasoning):""}}function Cm(e,t,n){let r=x0(e),s=C(e.agent),i=C(e.category),o=[s?c(`代理:${s}`,`Agent: ${s}`):"",i?c(`类别:${i}`,`Category: ${i}`):""].filter(Boolean),a=n?.openDag?Ue(c("打开 DAG 节点","Open DAG node"),n.openDag,"task-dag-jump"):y("p","small muted",c("没有已核验的 DAG 节点关联。","No verified DAG node link.")),l=y("p","small break",r.description||c("未报告任务描述。","Task description not reported.")),u=w0([[c("路由","Route"),o.join(" · ")],[c("执行方式","Execution mode"),C(e.executionMode)],[c("请求模型","Requested model"),r.configuredModel],...Am(r),[c("创建","Created"),ft(e.createdAt)],[c("更新","Updated"),ft(e.updatedAt)]]),d=Mt("",l,...n?.openDag?[a,u]:[u,a]);if(d.querySelector("summary")?.append(y("strong","",t[0]),` · ${t[1]}`),d.className="task-run",d.name="native-subagent-task",n)d.dataset.taskKey=n.key;return d}function E0(e,t=e){e.focus({preventScroll:!0}),t.scrollIntoView({block:"start",inline:"nearest"})}function A0(e,t,n){let r=e.querySelector(".dag-graph-text"),s=r?.querySelector(`[data-node-detail="${t}"]`),i=s?.querySelector(".runtime-execution"),o=i?.querySelector("summary");if(!r||!s||!i||!o)return;if(r.open=i.open=!0,n)E0(o,s)}function Go(e){let t=Ce(e);return t!==void 0&&Number.isSafeInteger(t)&&t>=0?t:void 0}function _m(e,t){return c(`已完成 ${Zt.format(e)} / ${Zt.format(t)} 个节点`,`${Zt.format(e)} of ${Zt.format(t)} completed`)}function Ko(e){return Em.flatMap(([t,n])=>{let r=e(t);return r===void 0?[]:[`${n} ${Zt.format(r)}`]})}function Sm(e,t){let n=(a)=>{let l=Go(t[a]);return l!==void 0&&l<=e?l:void 0},r=n("completed"),s=Ko((a)=>a==="completed"?void 0:n(a)),i=s.length+Number(r!==void 0),o=[...r===void 0?[]:[y("span","dag-roster-progress",_m(r,e))],...s.length?[y("span","dag-roster-counts",s.join(" · "))]:[]];if(i<Em.length)o.push(y("span","dag-roster-counts",i?c("仅显示宿主报告的状态。","Only reported states are shown."):c("宿主未报告节点状态计数。","The host did not report node status counts.")));return o}function xm(e){let t=new Map;for(let n of e)t.set(n.state,(t.get(n.state)??0)+1);return t}function Tm(e){return c(`第 ${Zt.format(e+1)} 波`,`Wave ${Zt.format(e+1)}`)}function Rm(e){let t=y("section","dag-wave stack stack--tight");return t.append(y("h4","",Tm(e))),t}function F5(e,t,n){let r=y("li","dag-node-detail stack stack--tight");r.dataset.nodeDetail=String(e.id);let s=y("p","small break");s.append(y("strong","",jn(e)),` · ${k0(e.state)}`),r.append(s);let i=e.agent?c(`代理:${e.agent}`,`Agent: ${e.agent}`):e.category?c(`类别:${e.category}`,`Category: ${e.category}`):"",o=e.attempt===void 0?"":c(`尝试次数:${Zt.format(e.attempt)}`,`Attempts: ${Zt.format(e.attempt)}`);if(i||o)r.append(y("p","small muted break",[i,o].filter(Boolean).join(" · ")));let a=e.upstream.flatMap((k)=>{let E=t.get(k);return E?[E]:[]}),l=(k)=>`${jn(k)} (${k0(k.state)})`,u=a.map(jn);r.append(y("p","small muted break",u.length?c(`依赖:${u.join("、")}`,`Depends on: ${u.join(", ")}`):c("无上游依赖","No upstream dependencies")));let d=[[a.filter((k)=>k.state==="failed"),c("失败上游","Failed upstream")],[a.filter((k)=>wm.has(k.state)),c("未结束上游","Unfinished upstream")],[a.filter((k)=>k.state!=="failed"&&!wm.has(k.state)),c("其他上游","Other upstream")]];for(let[k,E]of d)if(k.length)r.append(y("p","small break",`${E}${c(":",": ")}${k.map(l).join(c("、",", "))}`));let h=e.taskKey?n?.task(e.taskKey):void 0,p=w0([[c("配置模型","Configured model"),e.configuredModel],...h?.configuredModel?[[c("任务请求模型","Task requested model"),h.configuredModel]]:[],...Am(h),...y0(e.times)]),g=h&&n?Ue(c("打开子代理任务","Open subagent task"),()=>n.openTask(e.taskKey),"node-task-jump"):y("p","small muted",c("没有已核验的子代理任务关联。","No verified subagent task link.")),b=y("p","small break",h?.description||c("未报告任务描述。","Task description not reported.")),x=Mt(c("执行详情","Execution details"),b,...h?[g,p]:[p,g]);return x.className="runtime-execution",x.querySelector("summary")?.setAttribute("aria-label",c(`${jn(e)}:执行详情`,`${jn(e)}: Execution details`)),r.append(x),r}function q5(e,t){let n=new Map;for(let r of we(e.nodes).slice(0,jr)){let s=U(r),i=Go(s.id);if(i!==void 0&&i<jr)n.set(i,C(s.state))}for(let r of we(e.waves).slice(0,jr)){let s=U(r),i=Go(s.index);if(i===void 0||i>=jr)continue;let o=Rm(i),a=y("ol","inline-list numerical");for(let l of we(s.nodes).slice(0,jr)){let u=Go(l),d=u===void 0?void 0:n.get(u);if(u===void 0||d===void 0)continue;n.delete(u);let h=y("li");h.append(y("p","small",`${jn({id:u,label:""})} · ${k0(d)}`)),a.append(h)}if(a.childElementCount)o.append(a),t.append(o)}if(!t.childElementCount)t.append(y("p","small muted",c("运行未提供可显示的波次。","This run did not report any waves to display.")))}function Mm(e,t,n=""){let r=y("div","dag-graph-view stack stack--tight"),s=y("details","dag-graph-text"),i=y("summary","small",c("节点详情 · 波次与依赖","Node details · Waves and dependencies")),o=y("div","dag-readout stack stack--tight"),a=ym(e),l=a?.flat()??[];if(a){let u=new Map(l.map((k)=>[k.id,k])),d=xm(l),h=c(`${Zt.format(a.length)} 个波次`,`${Zt.format(a.length)} ${a.length===1?"wave":"waves"}`);r.append(y("p","small break dag-verified-roster",[c("已核验快照","Verified snapshot"),h,_m(d.get("completed")??0,l.length)].join(" · ")));let p=Ko((k)=>k==="completed"?void 0:d.get(k));if(p.length)r.append(y("p","small muted break",p.join(" · ")));let g=C(e.name);if(g&&g!==n)r.append(y("p","small metric-label break",g));let b=y0(v0(e));if(b.length)r.append(w0(b));let x=[];for(let[k,E]of a.entries()){let T=Rm(k),_=y("ol","inline-list numerical"),A=xm(E),D=Ko((R)=>z5.has(R)?A.get(R):void 0);if(D.length)x.push(`${Tm(k)}${c(":",": ")}${D.join(" · ")}`);_.append(...E.map((R)=>F5(R,u,t))),T.append(y("p","small muted break",Ko((R)=>A.get(R)).join(" · ")),_),o.append(T)}if(x.length){let k=y("span","dag-wave-preview");for(let E of x.slice(0,3))k.append(y("span","dag-roster-counts",E));if(x.length>3)k.append(y("span","dag-roster-counts",c(`另有 ${Zt.format(x.length-3)} 个波次,展开查看`,`${Zt.format(x.length-3)} more highlighted waves in node details`)));i.append(k)}}else r.append(y("p","small muted",c("无法验证完整拓扑;仅显示可识别的节点,不显示依赖连线。","Could not verify the full graph. Only recognized nodes are shown, without dependency lines."))),q5(e,o);if(s.open=!a||matchMedia("(max-width: 760px)").matches,s.append(i,o),r.append(s),a)r.append(km(a,(u)=>A0(r,u,!0)));return{root:r,nodes:l}}var H5=new Map([["inactive",c("会话尚未接入,或正在交接。","The session is not connected or is being handed off.")],["binding_unverified",c("无法验证当前会话的宿主绑定。","Could not verify which host owns the current session.")],["unsupported",c("当前宿主或连接方式不支持此读取。","The current host or connection does not support this read.")],["native_unavailable",c("宿主未能提供摘要。","The host could not provide a summary.")],["native_window_unverified",c("宿主在读取范围内没有返回匹配的运行。更早的匹配未知。","The host returned no matching runs within its read window. Older matches are unknown.")],["engine_unavailable",c("宿主连接忙碌、已断开或读取超时。","The host is busy, disconnected, or did not respond in time.")],["web_unsupported",c("当前 Web 服务没有实时摘要入口。","This Web server does not support live summaries.")],["read_refused",c("Web 服务未允许此读取,请确认当前会话仍可用。","The Web server refused this read. Check that the session is still available.")],["read_failed",c("读取失败或超时,可手动刷新。","The read failed or timed out. Refresh to try again.")]]),vr=new Intl.NumberFormat(me),P5=new Set(["pending","running","paused"]),U5=new Set(["completed","failed","cancelled"]);function Cs(e){let t=Ce(e);return t!==void 0&&Number.isSafeInteger(t)&&t>=0?t:void 0}function xi(e){switch(e.status){case"unavailable":{let t=H5.get(C(e.reason))??c("没有可用的读取结果。","No results are available.");return c(`不可用:${t}`,`Unavailable: ${t}`)}case"ownership_changed":return c("会话归属已变化,未显示任何宿主数据。","Session ownership changed. No host data is shown.");default:return c("摘要格式无效,未显示宿主数据。","The summary is invalid. No host data is shown.")}}function Vo(e){return e.status==="unavailable"&&e.reason==="unsupported"}function Lm(e,t,n){if(t.status!=="ok")return;let r=we(t.rows).map(U),s=n?U5:P5;if(!r.length||r.length>256||!r.every((i)=>br(C(i.status))&&Wr(i.createdAt)!==void 0&&Wr(i.updatedAt)!==void 0&&(e==="tasks"||Cs(i.nodeCount)!==void 0&&s.has(C(i.status)))))return;if(e==="tasks"?Cs(t.omittedCount)===void 0:t.coverage!=="native_window"||typeof t.limitReached!=="boolean")return;return r}function C0(e){let t=new Map,n=new Set;for(let r of Lm("tasks",e,!1)??[]){let s=jo(r.key);if(!s||n.has(s))continue;if(t.delete(s))n.add(s);else t.set(s,x0(r))}return t}function Dm(e){let t=y("div","dag-readout stack stack--tight");return t.append(y("p","small muted",e.status==="not_found"?c("该运行不在当前列表中,请刷新。","This run is no longer in the list. Refresh to try again."):xi(e))),t}function Im(e,t,n={}){let{dag:r,taskJump:s,taskKeys:i,snapshot:o}=n,a=o!==void 0,l=y("ol","inline-list numerical");for(let[u,d]of t.entries()){let h=y("li","stack stack--tight"),p=e==="dag"?a?we(d.nodes).length:Cs(d.nodeCount):void 0,g=a&&e==="tasks"?d.startedAt:d.createdAt,b=a&&e==="tasks"?d.completedAt:d.updatedAt,x=br(C(d.status))??c("状态未知","Unknown status"),k=!a?C(e==="dag"?d.name:d.title):"",E=k||`${e==="tasks"?c("任务","Task"):c("运行","Run")} ${vr.format(u+1)}`,T=`${E} · ${x}`,_=jo(d.key);if(e==="tasks"&&!a){h.append(Cm(d,[E,x],i?.has(_)?{key:_,openDag:s?.(_)}:void 0)),l.append(h);continue}let A=p===void 0?"":c(`${vr.format(p)} 个节点`,`${vr.format(p)} ${p===1?"node":"nodes"}`),D=p!==void 0&&!a?Sm(p,U(d.counts)):[];if(r&&e==="dag"&&!a&&_){let R=y("details","dag-run");R.dataset.dagKey=_;let L=y("div","dag-content"),B=y("p","small muted",c("正在读取波次与依赖…","Loading waves and dependencies…"));B.setAttribute("role","status");let O=y("summary");O.append(y("strong","",E),` · ${[x,A].filter(Boolean).join(" · ")}`,...D),R.append(O,L);let H,K=!1;R.addEventListener("toggle",()=>{if(!R.open){H?.abort(),H=void 0;return}if(H||K||!R.isConnected)return;let G=H=new AbortController,de=()=>H===G&&R.isConnected&&R.open;L.replaceChildren(B),r.read(_,G.signal).then((ne)=>{if(!de())return;let ae=ne.status==="ok"?Mm(ne,r.links,k):void 0;L.replaceChildren(ae?.root??Dm(ne)),K=ne.status==="ok",r.settled(_,ae?.nodes??[],L)},(ne)=>{if(ne instanceof DOMException&&ne.name==="AbortError")return;if(de())L.replaceChildren(Dm({status:"unavailable",reason:"read_failed"})),r.settled(_,[],L)}).finally(()=>{if(H===G)H=void 0})}),h.append(R)}else{if(h.append(y("p","metric-label small",T)),A)h.append(y("p","small muted",A));if(D.length){let R=y("p","break numerical");R.append(...D),h.append(R)}}if(Ce(g)!==void 0)h.append(y("p","small muted",a&&e==="tasks"?c(`开始:${ft(g)}`,`Started: ${ft(g)}`):c(`创建:${ft(g)}`,`Created: ${ft(g)}`)));if(Ce(b)!==void 0&&b!==g)h.append(y("p","small muted",a&&e==="tasks"?c(`结束:${ft(b)}`,`Ended: ${ft(b)}`):c(`更新:${ft(b)}`,`Updated: ${ft(b)}`)));l.append(h)}return l}function W5(e,t){let n=y("section","subpanel stack stack--tight");if(n.append(y("h4","",c("磁盘快照 · 只读","Saved snapshot · Read-only"))),t==="waiting"){let r=y("p","small muted",c("正在查找已保存的快照…","Looking for a saved snapshot…"));r.setAttribute("role","status"),n.append(r)}else if(t.status==="ok"){let r=we(e==="tasks"?t.tasks:t.runs).map(U);n.append(y("p","small muted",c(`保存时间:${ft(t.updatedAt)} · 非实时`,`Saved: ${ft(t.updatedAt)} · Not live`))),n.append(r.length?Im(e,r,{snapshot:t}):y("p","small muted",c("快照没有此类记录,不代表当前没有。","No matching records in the snapshot. There may still be live activity.")))}else n.append(y("p","small muted",c("没有可读取的快照。","No readable snapshot.")));return n}function wn(e,t,{snapshot:n,dag:r,taskJump:s,history:i=!1}={}){let o=y("section","subpanel stack stack--tight");if(!i)o.append(y("h3","",e==="tasks"?c("子代理任务","Subagent tasks"):c("当前 DAG 运行","Current DAG runs")),y("p","metric-label small",c("实时宿主 · 只读","Live host · Read-only")));let a=y("p","small muted");if(a.setAttribute("role","status"),o.append(a),!t)a.textContent=i?c("正在读取已结束的 DAG 运行…","Loading finished DAG runs…"):c("正在读取宿主摘要…","Loading host summary…");else if(t.status==="empty"&&e==="tasks")a.textContent=c("宿主报告当前没有子代理任务。","The host reports no current subagent tasks.");else if(t.status==="ok"){let l=Lm(e,t,i),u=Cs(t.omittedCount);if(l){if(a.textContent=c(`读到 ${vr.format(l.length)} 条摘要。`,`${vr.format(l.length)} ${l.length===1?"summary":"summaries"} loaded.`),o.append(Im(e,l,{dag:r,taskJump:s,taskKeys:e==="tasks"?C0(t):void 0})),e==="tasks"&&u)o.append(y("p","small muted",c(`宿主另有 ${vr.format(u)} 条未返回。`,`The host omitted ${vr.format(u)} ${u===1?"additional entry":"additional entries"}.`)));if(e==="dag")o.append(y("p","small muted",c("宿主最多检查最近 256 次运行再筛选,更早的匹配可能未显示。","The host checks up to 256 recent runs before filtering. Older matches may not appear.")))}else a.textContent=xi({})}else a.textContent=xi(t);return[o,...t&&n&&Vo(t)?[W5(e,n)]:[]]}function Nm(e){let t=y("section","subpanel stack stack--tight");t.id="runtime-journal",t.append(y("h3","",c("本会话记忆计数","Session memory counts")));let n=y("p","small muted");if(n.setAttribute("role","status"),t.append(n),!e)n.textContent=c("正在读取会话记忆…","Loading session memory…");else if(e.status==="ok"){let r=Cs(e.totalSteps),s=Cs(e.reflectedSteps);if(r!==void 0&&s!==void 0){n.textContent=c("仅当前会话的原生日志计数,不含共享记忆或原文。","Native journal counts for this session only. Shared memory and original text are not shown.");let i=y("dl","capability-list small numerical");for(let[o,a]of[[c("记录步数","Recorded steps"),r],[c("已反思步数","Reflected steps"),s]]){let l=y("div");l.append(y("dt","",o),y("dd","",vr.format(a))),i.append(l)}t.append(i)}else n.textContent=xi({})}else n.textContent=xi(e);return t}var tt=(e)=>ve(e,HTMLElement),Gr=(e)=>ve(e,HTMLButtonElement),j5=new Intl.DateTimeFormat(me,{dateStyle:"medium",timeStyle:"short"}),Bm=(e)=>Number.isFinite(new Date(e).getTime())?j5.format(e):"";function Om(e,t){let n=ve("cli-history-dialog",HTMLDialogElement),r=ve("cli-history-directory",HTMLSelectElement),s=tt("cli-history-directory-hint"),i=Gr("cli-history-browse"),o=ve("cli-history-search",HTMLInputElement),a=tt("cli-history-list"),l=tt("cli-history-list-status"),u=tt("cli-history-list-error"),d=tt("cli-history-index"),h=tt("cli-history-record"),p=tt("cli-history-record-title"),g=tt("cli-history-activity"),b=Gr("cli-history-refresh"),x=Gr("cli-history-refresh-activity"),k=Gr("cli-history-branch"),E=Gr("cli-history-resume"),T=tt("cli-history-resume-status"),_=tt("cli-history-resume-error"),A=new Wn(tt("cli-history-messages"),n,tt("cli-history-empty")),D=[],R,L,B,O,H,K=!1,G=!1,de=new Set,ne=()=>!r.disabled?r:!i.hidden?i:Gr("cli-history-title-close");function ae(){let q=t.resumeUnavailable(),Y=L!==void 0&&de.has(L.id);k.disabled=!K||Y,E.disabled=!L||Y||Boolean(q),x.disabled=!K||H!==void 0,re(T,Y?c("正在尝试打开同一会话…","Opening the same session in Web…"):L?q:"")}function z(){if(!n.open||d.hidden)return;let q=o.value.trim().toLocaleLowerCase(),Y=[...t.bookmarks()].filter((Ae)=>Ae.cwd===r.value&&Ae.name.toLocaleLowerCase().includes(q)).sort((Ae,He)=>He.updatedAt-Ae.updatedAt),ue=tt("cli-history-web-list"),le=JSON.stringify(Y.map(({id:Ae,name:He,archived:Ne})=>[Ae,He,Ne]));if(ue.dataset.rows===le)return;ue.dataset.rows=le;let be=document.activeElement instanceof HTMLButtonElement&&ue.contains(document.activeElement)?document.activeElement.dataset.session:void 0;if(ue.replaceChildren(...Y.map((Ae)=>{let He=y("li"),Ne=Ue("",()=>t.openBookmark(Ae),"button--quiet session-link");if(Ne.dataset.session=Ae.id,Ne.append(y("span","",Ae.name)),Ae.archived)Ne.append(y("small","",c("已归档","Archived")));return He.append(Ne),He})),tt("cli-history-bookmarks").hidden=!Y.length,be)([...ue.querySelectorAll("button")].find((Ae)=>Ae.dataset.session===be)??o).focus({preventScroll:!0})}function j(){let q=o.value.trim().toLocaleLowerCase(),Y=D.filter((le)=>le.name.toLocaleLowerCase().includes(q)),ue=document.activeElement instanceof HTMLButtonElement&&a.contains(document.activeElement)?document.activeElement.dataset.history:void 0;a.replaceChildren();for(let le of Y){let be=y("li"),Ae=Ue("",()=>W(le),"button--quiet session-link");Ae.dataset.history=le.id,Ae.append(y("span","",le.name),y("small","numerical",Bm(le.updatedAt))),be.append(Ae),a.append(be)}if(a.hidden=!Y.length,ue)([...a.querySelectorAll("button")].find((le)=>le.dataset.history===ue)??o).focus({preventScroll:!0});re(l,B?c("正在读取此目录的 CLI 历史…","Loading CLI history for this directory…"):R===!1?c("CLI 历史不可用:未启用或未找到本地历史记录。","CLI history is disabled or no local history records were found."):R&&!Y.length?q?c("没有匹配的 CLI 历史。","No matching CLI history."):c("此目录没有未在 Web 打开的 CLI 会话。","No CLI sessions to add from this directory."):""),z()}async function Z(){let q=r.value;if(!q||B)return;let Y=B=new AbortController,ue=()=>B===Y&&q===r.value;b.setAttribute("aria-disabled","true"),re(u),re(l,c("正在读取此目录的 CLI 历史…","Loading CLI history for this directory…"));try{let le=await e.request(`/api/cli-history?${new URLSearchParams({cwd:q})}`,void 0,AbortSignal.any([Y.signal,AbortSignal.timeout(15000)]));if(!ue())return;if(typeof le.available!=="boolean"||!Array.isArray(le.sessions))throw Error(c("无法核验目录会话列表。","Could not verify the directory session list."));R=le.available,D=we(le.sessions).map(U).flatMap((be)=>{let Ae=C(be.id);return R&&/^[a-f0-9]{64}$/u.test(Ae)&&be.cwd===q&&be.adopted===!1?[{id:Ae,name:C(be.name)||c("未命名 CLI 会话","Untitled CLI session"),cwd:q,updatedAt:Ce(be.updatedAt)??0}]:[]})}catch(le){if(!ue())return;D=[],R=void 0,re(u,c(`无法读取 CLI 历史:${Re(le)}`,`Could not load CLI history: ${Re(le)}`))}finally{if(ue())B=void 0,b.removeAttribute("aria-disabled"),j()}}function Q(q){if(B?.abort(),B=void 0,r.value=q,o.value="",D=[],R=void 0,b.removeAttribute("aria-disabled"),re(u),re(tt("cli-history-directory-path"),r.value),s.hidden=Boolean(r.value),tt("cli-history-results").hidden=!r.value,j(),r.value)t.onDirectory(r.value),Z()}function oe(q=!1){if(!n.open&&!G)return;let{paths:Y,browse:ue}=t.scope(),le=r.value;i.hidden=!ue,r.disabled=!Y.length;let be=JSON.stringify(Y);if(r.dataset.paths!==be)r.dataset.paths=be,r.replaceChildren(ot(c("选择已授权目录","Choose an authorized directory"),""),...Y.map((Ae)=>ot(t.directoryLabel(Ae),Ae))),r.value=Y.includes(le)?le:"";if(q||le&&!r.value){if(xe(),h.hidden=!0,d.hidden=!1,Q(""),n.open)ne().focus()}s.textContent=Y.length?c("先选目录查看会话,不会直接打开。","Choose a directory to list its sessions. This won’t open a session."):ue?c("还没有获准目录。可浏览或输入一个绝对路径。","No directories are authorized. Browse or enter an absolute path."):c("没有获准目录。请检查 Web 服务启动设置。","No directories are authorized. Check the Web server startup settings.")}let F=(q)=>Ki(q.id);async function X(q){H?.abort();let Y=H=new AbortController;ae(),g.querySelector("[data-activity-status]")?.remove();let le=y("p","small muted",c("正在读取原生快照…","Loading native snapshot…"));le.dataset.activityStatus="",le.setAttribute("role","status"),g.append(le);try{let be=await e.request(`${F(q)}/activity`,void 0,AbortSignal.any([Y.signal,AbortSignal.timeout(15000)]));if(Y.signal.aborted||!n.open||L!==q)return;cm(g,be)}catch(be){if(!Y.signal.aborted&&n.open&&L===q)le.textContent=c(`无法读取原生快照:${Re(be)}`,`Could not load the native snapshot: ${Re(be)}`),le.className="notice error small",le.setAttribute("role","alert")}finally{if(H===Y)H=void 0,ae()}}async function te(q){O?.abort();let Y=O=new AbortController,ue=tt("cli-history-record-status");re(ue,c("正在读取对话记录…","Loading conversation…")),re(tt("cli-history-record-error"));try{let le=await e.request(F(q),void 0,AbortSignal.any([Y.signal,AbortSignal.timeout(15000)]));if(Y.signal.aborted||!n.open||L!==q)return;let be=U(le.session);p.textContent=C(be.name)||q.name,K=!0,ae();let Ae=Bm(Ce(be.updatedAt)??q.updatedAt);re(tt("cli-history-record-updated"),Ae&&c(`记录更新:${Ae}`,`Record updated: ${Ae}`));let He=we(le.messages).map(U).map((Ne,Pe)=>{let mt=on(Ne)==="toolResult"&&C(Ne.toolCallId);return{key:mt?`result:${mt}`:`history-${Pe}`,message:Ne}});A.render(He,"",new Map),requestAnimationFrame(()=>{if(!Y.signal.aborted&&n.open&&L===q)n.scrollTop=0})}catch(le){if(Y.signal.aborted||!n.open||L!==q)return;if(le instanceof Be&&(le.code==="history_too_large"||le.code==="history_preview_too_large")){re(tt("cli-history-record-error"),c("这条 CLI 记录过大,无法预览。仍可尝试在 Web 继续。","This CLI record is too large to preview. You can still try to continue in Web."));return}re(tt("cli-history-record-error"),c(`无法读取这条记录:${Re(le)}`,`Could not load this record: ${Re(le)}`))}finally{if(O===Y)O=void 0,re(ue)}}function xe(){O?.abort(),O=void 0,H?.abort(),H=void 0,L=void 0,K=!1,re(_),ae(),A.reset(),g.replaceChildren()}function W(q){if(r.value!==q.cwd)return;xe();let Y=L={...q};d.hidden=!0,h.hidden=!1,p.textContent=Y.name,tt("cli-history-record-meta").textContent=Y.cwd,re(tt("cli-history-record-updated")),tt("cli-history-empty").hidden=!0,p.focus({preventScroll:!0}),n.scrollTop=0,ae(),te(Y)}r.addEventListener("change",()=>Q(r.value)),i.addEventListener("click",()=>{if(G=!0,n.close(),!t.browse(()=>{ge(),i.focus()}))ge()}),o.addEventListener("input",j),b.addEventListener("click",()=>void Z()),x.addEventListener("click",()=>{if(L&&K)X(L)}),k.addEventListener("click",()=>{if(L&&K)t.openBranch({kind:"history",id:L.id,name:L.name})}),E.addEventListener("click",async()=>{let q=L;if(!q||E.disabled)return;let Y=e.token;de.add(q.id);let ue=()=>n.open&&L===q;re(_),ae(),T.focus();try{let le=await e.resumeHistory(q.id);if(Y!==e.token)return;if(le.cwd!==q.cwd)throw Error(c("返回的会话不属于所选目录。","The returned session does not belong to the selected directory."));if(D=D.filter((be)=>be.id!==q.id),t.onResumed(le,ue()),n.open&&!d.hidden)j()}catch(le){if(ue()){if(re(_,c(`无法在 Web 继续:${Re(le)}`,`Could not continue in Web: ${Re(le)}`)),document.activeElement===T)_.focus()}}finally{de.delete(q.id),ae()}}),Gr("cli-history-back").addEventListener("click",()=>{let q=L?.id;xe(),h.hidden=!0,d.hidden=!1,j(),([...a.querySelectorAll("button")].find((Y)=>Y.dataset.history===q)??o).focus()}),n.querySelector("[data-close]")?.addEventListener("click",()=>n.close()),n.addEventListener("close",()=>{if(n.open||G)return;xe(),Q(""),t.onClose()});function ge(q){if(n.open)return;if(!G)xe(),h.hidden=!0,d.hidden=!1,Q("");if(oe(),n.showModal(),oe(),G=!1,q&&t.scope().paths.includes(q))Q(q);else z();ne().focus()}return{open:ge,update:ae,scopeChanged:oe,renderBookmarks:z}}var bt=(e)=>ve(e,HTMLElement),kt=(e)=>ve(e,HTMLButtonElement),_0=c("仅普通文字。命令、权限审批及私密交互请回到 CLI 处理。","Plain text only. Use the CLI for commands, permission approvals, and private interactions."),$m=new Set(["terminal_not_attached","terminal_not_found","terminal_offline"]);function zm(e,t,n,r){let s=ve("cli-live-dialog",HTMLDialogElement),i=ve("cli-live-session",HTMLSelectElement),o=ve("cli-live-input",HTMLTextAreaElement),a=new Wn(bt("cli-live-messages"),bt("cli-live-transcript"),bt("cli-live-empty")),l=new Map,u=new Map,d=new Map,h=[],p=[],g,b="",x="",k,E,T,_,A=!1,D=500,R="waiting",L=!1,B={},O=[],H,K=!0;function G(){let F=p.find((be)=>be.id===i.value),X=F!==void 0&&b===F.id,te=X&&L&&R==="open"&&!T,xe=B.running===!0||B.compacting===!0,W=X||Boolean(F&&x===F.id),ge=Boolean(F&&d.get(F.id)===o.value);i.disabled=Boolean(b||T||k||!p.length),kt("cli-live-close").disabled=Boolean(T),kt("cli-live-connect").hidden=X,kt("cli-live-connect").disabled=!F||!g||!e.token||R!=="open"||Boolean(T||k),kt("cli-live-disconnect").hidden=!X,kt("cli-live-disconnect").disabled=Boolean(T),kt("cli-live-refresh").disabled=Boolean(T||k),kt("cli-live-branch").hidden=!X,kt("cli-live-branch").disabled=!te||xe,kt("cli-live-send").disabled=!te||xe||ge||!o.value.trim();let q=kt("cli-live-stop"),Y=X&&B.running===!0&&Boolean(C(B.turnId));if(!Y&&document.activeElement===q)o.focus({preventScroll:!0});q.hidden=!Y,q.disabled=!te,o.readOnly=T==="input",bt("cli-live-conversation").hidden=!W&&!o.value,re(bt("cli-live-workspace"),F?.cwd);let ue=T==="connect"?c("正在连接 CLI…","Connecting to CLI…"):T==="disconnect"?c("正在释放 Web 连接…","Disconnecting Web…"):R==="lost"?c("实时更新已离线,草稿会保留。连接恢复后只刷新消息,不会重发。","Live updates are offline. Your draft is kept. Reconnecting refreshes messages without resending them."):k?c("正在查找本地 CLI 会话…","Looking for local CLI sessions…"):X?!L?c("正在同步 CLI 对话…","Syncing the CLI conversation…"):B.compacting===!0?c("CLI 正在压缩上下文。","CLI is compacting context."):B.running===!0?c("已连接 · CLI 正在运行","Connected · CLI is running"):c("已连接 · 等待输入","Connected · Waiting for input"):g===!1?c("CLI 实时不可用:未启用或找不到本地终端控制服务。","Live CLI is unavailable. The local terminal service is disabled or could not be found."):!p.length?c("没有发现可连接的 CLI 会话。","No CLI sessions are available to connect."):R==="waiting"?c("正在等待 Web 实时连接…","Waiting for the Web connection…"):x===F?.id?O.length?c("已断开;显示最后一次同步的消息。","Disconnected. Showing the last synced messages."):c("已断开。","Disconnected."):c("选择会话后,点击「连接」读取对话。","Select a session and choose “Connect” to read the conversation."),le=x===F?.id&&(X?L:!T)?H==="unavailable"?c(" · 对话记录暂不可读"," · Conversation history is unavailable"):H==="truncated"?c(" · 仅显示部分近期消息"," · Showing a limited set of recent messages"):"":"";re(bt("cli-live-status"),ue+le),bt("cli-live-hint").textContent=ge?c(`上一次发送的结果未知,请先核对 CLI,不要重发这条消息。${_0}`,`Delivery of your last message is unknown. Check the CLI before trying again. Do not resend this message. ${_0}`):_0}function de(){x="",B={},O=[],H=void 0,a.reset(),o.value=u.get(i.value)??"",re(bt("cli-live-error")),re(bt("cli-live-receipt")),G()}function ne(){let F=i.value,X=b||(T==="connect"?F:"");if(p=h.filter((te)=>te.id===X||r(te.cwd)),i.replaceChildren(ot(c("选择可用会话","Choose a session"),""),...p.map((te)=>ot(te.name,te.id))),i.value=p.some((te)=>te.id===F)?F:p.length===1?p[0]?.id??"":"",i.value!==F)de()}async function ae(){if(b||k||!s.open)return;let F=k=new AbortController;re(bt("cli-live-error")),G();try{let X=await e.request("/api/cli-live",void 0,F.signal);if(!s.open||F.signal.aborted)return;g=X.available===!0,h=we(X.sessions).map(U).flatMap((te)=>{let xe=C(te.id);return xe?[{id:xe,name:C(te.name)||c("未命名 CLI 会话","Untitled CLI session"),cwd:C(te.cwd)}]:[]}),ne()}catch(X){if(!F.signal.aborted&&s.open)g=!1,re(bt("cli-live-error"),c(`无法发现 CLI 会话:${Re(X)}`,`Could not find CLI sessions: ${Re(X)}`))}finally{if(k===F)k=void 0;G()}}function z(F,X){B=U(X.state);let te=U(X.transcript).status;H=te==="truncated"||te==="unavailable"?te:void 0;let xe=O;O=we(X.messages).map(U).map((ge,q)=>({key:`cli-live:${q}`,message:JSON.stringify(xe[q]?.message)===JSON.stringify(ge)?xe[q]?.message??ge:ge}));let W=O.at(-1);if(!W&&H)a.reset();else a.render(O,W?.message.streaming===!0?W.key:"",l,x!==F);bt("cli-live-empty").hidden=Boolean(H)||O.length>0,x=F,L=!0,D=500}function j(){clearTimeout(_),_=void 0,E?.abort(),E=void 0,A=!1}function Z(F=50){if(!s.open||!b||R!=="open")return;if(E||T){A=!0;return}if(_!==void 0&&F!==0)return;clearTimeout(_),_=window.setTimeout(()=>{_=void 0,Q()},F)}async function Q(){let F=b;if(!F||E||!s.open||R!=="open")return;if(T){A=!0;return}let X=E=new AbortController,te=()=>b===F&&s.open&&!X.signal.aborted,xe=0;A=!1;try{let W=await e.request(Vi(F),void 0,AbortSignal.any([X.signal,AbortSignal.timeout(1e4)]));if(te()){if(z(F,W),bt("cli-live-error").dataset.read==="true")re(bt("cli-live-error"))}}catch(W){if(te()){if(L=!1,W instanceof Be&&$m.has(W.code))b="";else xe=D,D=Math.min(D*2,5000);let ge=bt("cli-live-error");if(ge.hidden||ge.dataset.read==="true")ge.dataset.read="true",re(ge,c(`无法同步 CLI 对话:${Re(W)}`,`Could not sync the CLI conversation: ${Re(W)}`))}}finally{if(E===X)E=void 0;if(te()&&(xe||A))Z(xe||50);G()}}async function oe(F,X){if(!F||T)return;T=X.action;let te=bt("cli-live-error");if(delete te.dataset.read,re(te),X.action!=="disconnect")re(bt("cli-live-receipt"));if(X.action==="disconnect")j();G();let xe;try{let W=await e.cliLiveAction(F,X);switch(X.action){case"connect":b=F,z(F,W),xe=o;break;case"disconnect":b="",L=!1,xe=kt("cli-live-connect");break;case"input":u.delete(F),d.delete(F),o.value="",re(bt("cli-live-receipt"),W.disposition==="held"?c("CLI 已暂存消息;请在 CLI 查看,勿重发。","The CLI is holding the message. Check the CLI and do not resend it."):W.disposition==="queued"?c("CLI 已将消息加入队列。","The CLI queued the message."):c("CLI 已接收消息。","The CLI accepted the message."));break;case"stop":re(bt("cli-live-receipt"),c("当前回合已停止。","The current turn stopped.")),xe=o;break}}catch(W){if(X.action==="input"&&(!(W instanceof Be)||W.status>=500||W.code==="terminal_outcome_unknown"))d.set(F,X.message);if(W instanceof Be&&$m.has(W.code))b="",L=!1;re(te,Re(W))}finally{if(T=void 0,!b&&(X.action==="disconnect"||X.action==="connect"))ne();if(G(),s.open)xe?.focus({preventScroll:!0});if(b)Z(0)}}return i.addEventListener("change",de),o.addEventListener("input",()=>{u.set(i.value,o.value),G()}),kt("cli-live-connect").addEventListener("click",()=>void oe(i.value,{action:"connect"})),kt("cli-live-disconnect").addEventListener("click",()=>void oe(b,{action:"disconnect"})),kt("cli-live-refresh").addEventListener("click",()=>{if(b)Z(0);else ae()}),kt("cli-live-stop").addEventListener("click",()=>{let F=C(B.turnId);if(F)oe(b,{action:"stop",expectedTurnId:F})}),kt("cli-live-branch").addEventListener("click",()=>{let F=p.find((X)=>X.id===b);if(F)n({...F,kind:"live"})}),ve("cli-live-form",HTMLFormElement).addEventListener("submit",(F)=>{if(F.preventDefault(),!kt("cli-live-send").disabled)oe(b,{action:"input",mode:"prompt",clientMessageId:crypto.randomUUID(),message:o.value})}),kt("cli-live-close").addEventListener("click",()=>s.close()),s.addEventListener("cancel",(F)=>{if(T)F.preventDefault()}),s.addEventListener("close",()=>{if(s.open)return;if(k?.abort(),k=void 0,j(),b)oe(b,{action:"disconnect"});if(K)t();K=!0}),{open(){if(s.open)return;if(s.showModal(),G(),!b)ae()},scopeChanged(){ne(),G()},closeAfterBranch(){K=!1,s.close()},invalidate(F){if(b&&b===F)Z()},setTransport(F){if(F===R)return;if(R=F,F!=="open")L=!1,j();else if(b)Z(0);else if(!g)ae();G()}}}var G5=2000,Fm=8000,K5={pending:c("正在查找 CLI 会话…","Looking for a CLI session…"),none:c("未发现可跟随的 CLI 会话。","No CLI session to follow."),ambiguous:c("有多个 CLI 会话,无法确认跟随哪一个。","Multiple CLI sessions were found. Could not determine which one to follow."),unavailable:c("无法核验 CLI 会话,暂不显示对话。","Could not verify the CLI session. The conversation is hidden.")};function V5(e,t){switch(e.status){case"none":return{status:"none"};case"ambiguous":return{status:"ambiguous"};case"ok":{let n=U(e.session),r=C(n.id),s=C(n.cwd),i=C(n.name);if(!r||!s||!t(s)||typeof n.name!=="string"||typeof n.running!=="boolean"||!Array.isArray(e.messages))return{status:"unavailable"};let o=U(e.transcript).status,a=[];for(let l of o==="unavailable"?[]:e.messages){let{role:u,content:d,timestamp:h,streaming:p}=U(l);if(u!=="user"&&u!=="assistant"&&u!=="custom"||typeof d!=="string")return{status:"unavailable"};a.push({role:u,content:d,timestamp:Ce(h),streaming:u==="assistant"&&p===!0})}return{status:"ok",target:{id:r,name:i||c("未命名 CLI 会话","Untitled CLI session"),cwd:s,running:n.running},messages:a,...o==="truncated"||o==="unavailable"?{history:o}:{}}}default:return{status:"unavailable"}}}function qm(e,t,n){let r=ve("cli-follow-view",HTMLElement),s=ve("cli-follow-status",HTMLElement),i=ve("cli-follow-empty",HTMLElement),o=new Wn(ve("cli-follow-messages",HTMLElement),r,i),a=new Map,l=!1,u,d="",h,p,g=[];function b(){g=[],o.reset(),i.hidden=!0}function x(A,D=!1,R){let L=A==="ok"?c(`只读跟随 · ${D?"CLI 正在运行":"CLI 未在运行"}`,`Following · Read-only · ${D?"CLI is running":"CLI is idle"}`):K5[A],B=R==="unavailable"?c(" · 对话记录暂不可读"," · Conversation history is unavailable"):R==="truncated"?c(" · 仅显示部分近期消息"," · Showing a limited set of recent messages"):"";if(s.dataset.state!==A)s.dataset.state=A;if(s.textContent!==L+B)s.textContent=L+B}function k(A){let D=u;if(A.status!=="ok"){if(u)b();if(u=void 0,x(A.status),D)n();return}u=A.target,d=u.cwd;let R=!D||D.id!==u.id||D.cwd!==u.cwd;if(R)b();x("ok",u.running,A.history);let L=new Map(g.map((H)=>[H.key,H])),B=new Set,O=A.messages.map((H,K)=>{let G=Pr(H)||`follow:${K}`,de=B.has(G)?`${G}:${K}`:G;B.add(de);let ne=L.get(de);return ne&&JSON.stringify(ne.message)===JSON.stringify(H)?ne:{key:de,message:H}});if(A.history&&O.length===0)b();else if(R||g.length!==O.length||O.some((H,K)=>H!==g[K])){g=O;let H=g.at(-1);o.render(g,H?.message.streaming===!0?H.key:"",a,R)}if(i.hidden=Boolean(A.history)||g.length>0,R||D?.name!==u.name)n()}function E(){clearTimeout(p),p=void 0,h?.abort(),h=void 0}async function T(){if(!l||document.hidden||h)return;let A=h=new AbortController,D=AbortSignal.any([A.signal,AbortSignal.timeout(Fm)]),R=performance.now()+Fm,L=()=>l&&!document.hidden&&h===A;try{let B=await e.request("/api/cli-follow",void 0,D).catch(()=>{return});if(L())k(!B||D.aborted||performance.now()>=R?{status:"unavailable"}:V5(B,t))}finally{if(h===A){if(h=void 0,l&&!document.hidden)p=window.setTimeout(()=>{p=void 0,T()},G5)}}}function _(){if(!l)return;l=!1,E(),u=void 0,d="",b(),n()}return document.addEventListener("visibilitychange",()=>{if(!l)return;if(document.hidden){if(E(),u)b(),u=void 0,n();x("pending")}else T()}),window.addEventListener("pagehide",_),{get active(){return l},get target(){return u},get workspace(){return d},start(){if(l)return;l=!0,x("pending"),n(),T()},stop:_,recheckWorkspace(){if(!d||t(d))return;d="",k({status:"unavailable"})}}}var Hm=1e4,Pm=(e)=>e instanceof DOMException&&e.name==="TimeoutError";function S0(e){return Array.isArray(e)?[...new Set(e.filter((t)=>typeof t==="string"&&Boolean(t)))]:[]}function Um(e,t,n,r){let s=ve("workspace-browser-button",HTMLButtonElement),i=ve("workspace-browser-dialog",HTMLDialogElement),o=ve("workspace-browser-close",HTMLButtonElement),a=ve("workspace-browser-form",HTMLFormElement),l=ve("workspace-browser-path",HTMLInputElement),u=ve("workspace-browser-use",HTMLButtonElement),d=ve("workspace-browser-navigation",HTMLElement),h=ve("workspace-browser-root-field",HTMLElement),p=ve("workspace-browser-root",HTMLSelectElement),g=ve("workspace-browser-up",HTMLButtonElement),b=ve("workspace-browser-current",HTMLElement),x=ve("workspace-browser-status",HTMLElement),k=ve("workspace-browser-entries",HTMLUListElement),E=ve("workspace-browser-feedback",HTMLElement),T=ve("workspace-browser-approval",HTMLElement),_=ve("workspace-browser-approval-title",HTMLElement),A=ve("workspace-browser-approval-path",HTMLElement),D=ve("workspace-browser-confirm",HTMLButtonElement),R=ve("workspace-browser-deny",HTMLButtonElement),L,B,O,H=0,K="",G;function de(q="",Y=!1){E.classList.toggle("error",Y),re(E,q)}function ne(){let q=B?.kind==="decision",Y=B?.kind==="prepare";d.hidden=Boolean(O),T.hidden=!O,A.textContent=O?.path??"",u.disabled=!l.value||Y||q,p.disabled=Y,g.disabled=!K||Y,o.setAttribute("aria-disabled",String(q)),D.setAttribute("aria-disabled",String(q)),R.setAttribute("aria-disabled",String(q))}function ae(q){if(clearTimeout(H),O=q,q)H=window.setTimeout(()=>{if(O===q&&B?.kind!=="decision")z()},q.expiresAt-Date.now());ne()}function z(){ae(),de(c("审批已过期。请重新选择「使用此目录」,发起新的审批。","Approval expired. Choose “Use this directory” to request approval again."),!0),u.focus()}function j(){let q=B;B=void 0,q?.controller.abort()}async function Z(q,Y,ue,le,be){if(!i.open||B?.kind==="decision"||!L)return;j();let Ae={kind:q,controller:new AbortController};B=Ae,ne();let He=performance.now()+Hm,Ne=AbortSignal.any([Ae.controller.signal,AbortSignal.timeout(Hm)]),Pe;try{let mt=new Promise((Te,Mr)=>{Pe=()=>Mr(Ne.reason),Ne.addEventListener("abort",Pe,{once:!0})}),Dn=await Promise.race([e.request(`/api/workspaces/${Y}`,ue,Ne),mt]);if(B!==Ae||!i.open||Ae.controller.signal.aborted)return;if(Ne.throwIfAborted(),performance.now()>=He)throw new DOMException("Workspace request timed out","TimeoutError");B=void 0,ne(),le(Dn)}catch(mt){if(B!==Ae&&B!==void 0||!i.open||Ae.controller.signal.aborted)return;B=void 0,ne(),be(mt)}finally{if(Pe)Ne.removeEventListener("abort",Pe)}}function Q(q=""){K="",b.textContent=q,b.hidden=!q,k.replaceChildren(),k.hidden=!0}function oe(q,Y=!0){if(!q||O||B?.kind==="prepare"||!i.open)return;if(l.value=q,Y)b.textContent=q,b.hidden=!1,b.focus({preventScroll:!0});Q(q),de(),x.textContent=c("正在读取目录…","Reading directory…"),Z("browse","browse",{path:q},(ue)=>{let le=C(ue.path);if(!le||!Array.isArray(ue.entries))throw Error("Invalid browse response");K=C(ue.parent),b.textContent=le,l.value=le,p.value=t().roots.includes(le)?le:"";for(let be of ue.entries){let{name:Ae,path:He,kind:Ne}=U(be);if(typeof Ae!=="string"||!Ae||typeof He!=="string"||!He)continue;if(Ne!=="directory"&&Ne!=="file")continue;let Pe=y("li"),mt=Ne==="directory"?Ue("",()=>oe(He),"button--quiet workspace-entry"):y("div","workspace-entry");mt.append(y("bdi","break",Ae),y("span","small muted",Ne==="directory"?c("目录 ›","Folder ›"):c("文件","File"))),Pe.append(mt),k.append(Pe)}k.hidden=!k.childElementCount,x.textContent=ue.truncated===!0?c("目录条目太多,仅显示部分名称。","This directory has too many entries to show them all."):k.hidden?c("没有可显示的条目。","No entries to show."):"",ne()},(ue)=>{x.textContent="",p.value="",de(Pm(ue)?c("读取目录超时。请重新选择一个已授权工作区。","Reading the directory timed out. Choose an authorized directory and try again."):c("无法读取该目录。只能浏览已授权范围内仍可访问的目录。","Could not read this directory. You can only browse accessible directories within authorized locations."),!0)})}function F(q){let Y=C(q.path),ue=S0(q.workspaces);if(!Y||!ue.includes(Y))throw Error("Invalid workspace selection receipt");let le=G===void 0;G=void 0,i.close(),n(Y,ue,le)}function X(q){if(!q||O||B?.kind==="prepare")return;if(B?.kind==="browse")x.textContent=c("目录读取已取消。","Directory read canceled.");de(c("正在核验目录…","Verifying directory…")),Z("prepare","prepare",{path:q},(Y)=>{if(Y.status==="authorized"){F(Y);return}let ue=C(Y.path),le=C(Y.confirmation),be=Ce(Y.expiresAt);if(Y.status!=="confirmation_required"||!ue||!le||be===void 0)throw Error("Invalid approval response");if(l.value=ue,be<=Date.now()){z();return}de(),ae({token:le,path:ue,expiresAt:be}),_.focus()},(Y)=>{de(Pm(Y)?c("核验目录超时。路径已保留,请重试。","Directory verification timed out. The path is still in the field. Try again."):c("无法核验目录。请检查绝对路径、目录是否仍存在及本机 Web 服务是否可用。","Could not verify the directory. Check the absolute path, whether the directory still exists, and whether the local Web server is running."),!0)})}function te(q,Y=!1){if(!O||B?.kind==="decision")return;let{token:ue,expiresAt:le}=O;if(le<=Date.now()){z();return}clearTimeout(H),de(q?c("正在提交允许决定…","Granting access…"):c("正在提交拒绝决定…","Denying access…")),Z("decision","confirm",{confirmation:ue,allow:q},(be)=>{if(q){F(be);return}if(be.status!=="cancelled")throw Error("Invalid denial receipt");if(ae(),Y)i.close();else de(c("已拒绝。工作区未切换。","Access denied. The selected directory did not change.")),u.focus()},(be)=>{ae();let Ae=be instanceof Be&&(be.code==="workspace_confirmation_stale"||be.status===410);de(Ae?c("审批已失效:可能已过期或目录已变更。请重新核验路径。","Approval expired or the directory changed. Verify the path again."):c("未能确认审批结果,未切换工作区。请重新核验路径。","Could not confirm the approval result. The selected directory did not change. Verify the path again."),!0),u.focus()})}function xe(){if(B?.kind==="decision")return;if(O)te(!1,!0);else j(),i.close()}function W(){let{roots:q}=t(),Y=p.value;p.replaceChildren(ot(c("选择已授权工作区","Choose an authorized directory"),""),...q.map((ue)=>ot(ue,ue))),p.value=q.includes(Y)?Y:"",h.hidden=!q.length}function ge(q){if(!L||document.querySelector("dialog:modal"))return!1;G=q,j(),ae(),de();let{roots:Y,selected:ue}=t(),le=Y.includes(ue)?ue:Y[0]??"";if(W(),p.value=le,l.value=le,x.textContent=le?"":c("没有已授权目录。可手动输入目录的绝对路径。","No directories are authorized. Enter an absolute directory path."),Q(),ne(),i.showModal(),le)oe(le,!1);return!0}return s.addEventListener("click",()=>ge()),a.addEventListener("submit",(q)=>{q.preventDefault(),X(l.value)}),l.addEventListener("input",()=>{if(B?.kind==="browse"||B?.kind==="prepare"){if(B.kind==="browse")x.textContent=c("目录读取已取消。","Directory read canceled.");j()}de(),ne()}),p.addEventListener("change",()=>oe(p.value)),g.addEventListener("click",()=>oe(K)),D.addEventListener("click",()=>te(!0)),R.addEventListener("click",()=>te(!1)),o.addEventListener("click",xe),i.addEventListener("cancel",(q)=>{q.preventDefault(),xe()}),i.addEventListener("close",()=>{if(i.open)return;j(),ae(),de(),Q();let q=G??r;if(G=void 0,!document.querySelector("dialog:modal"))q?.()}),{open:ge,update(q,Y){let ue=U(q).platform,le=ue==="win32"||ue==="posix"?ue:void 0,be=L!==le||Y;if(L=le,s.hidden=!L,l.placeholder=L==="win32"?"C:\\Projects\\OmO":"/home/me/projects/OmO",!i.open)return;if(!L)j(),i.close();else{if(W(),!be)return;j(),ae(),Q(),x.textContent="",de(c("本机 Web 服务连接已更新。请重新选择或核验目录。","The local Web server connection changed. Choose a directory or verify the path again."),!0),l.focus()}}}}var Wm=["scoped-models","favorite-models","task-kill","login","logout","trust","export","import","share","reload","keybindings","changelog","quit","exit","bug","debug"];var Km=120,Vm=6000,Jo=Km.toLocaleString(me),Zo=Vm.toLocaleString(me),T0=[{name:"new",invocation:"/new",label:c("新会话","New session"),description:c("开始一个新会话。","Start a new session.")},{name:"resume",invocation:"/resume",label:c("继续会话","Resume session"),description:c("从历史会话中选择一个继续。","Choose a past session to resume.")},{name:"sessions",invocation:"/sessions",label:c("会话列表","Session list"),description:c("列出历史会话并继续其中一个。","Browse and resume past sessions.")},{name:"rename",invocation:"/rename",label:c("重命名","Rename"),description:c(`重命名当前会话(名称可选,最长 ${Jo} 字)。`,`Rename the current session. The name is optional and can be up to ${Jo} characters.`)},{name:"name",invocation:"/name",label:c("重命名(别名)","Rename (alias)"),description:c("与 /rename 相同:设置会话显示名。","Alias for /rename. Set the session's display name.")},{name:"session",invocation:"/session",label:c("会话信息","Session info"),description:c("查看当前会话的信息与统计。","View details and statistics for this session.")},{name:"tree",invocation:"/tree",label:c("会话树","Session tree"),description:c("查看会话分支树并跳到任意点继续。","Browse session branches and resume from any point.")},{name:"todo",invocation:"/todo",label:c("本会话待办","Session Todo"),description:c("查看当前分支的待办。","View the Todo list for the current branch.")},{name:"tasks",invocation:"/tasks",label:c("本会话任务","Session tasks"),description:c("查看当前会话的原生子代理任务。","View native subagent tasks for this session.")},{name:"dag",invocation:"/dag",label:c("本会话 DAG","Session DAG"),description:c("查看本会话的运行,展开读取波次和依赖。","View workflow runs and expand them to inspect execution waves and dependencies.")},{name:"help",invocation:"/help",label:c("命令帮助","Command help"),description:c("查看 Web 可用的命令和快捷键。","See which commands and keyboard shortcuts are available on the web.")},{name:"hotkeys",invocation:"/hotkeys",label:c("快捷键","Keyboard shortcuts"),description:c("查看此工作台的键盘操作。","View keyboard shortcuts for the workbench.")},{name:"fork",invocation:"/fork",label:c("分支","Fork"),description:c("选择一条用户消息,从该消息之前创建分支。","Choose a user message and start a branch from just before it.")},{name:"clone",invocation:"/clone",label:c("副本","Clone"),description:c("复制当前会话为新会话并切换过去。","Copy the current session and switch to the copy.")},{name:"compact",invocation:"/compact",label:c("压缩上下文","Compact context"),description:c(`手动压缩上下文(指示可选,最长 ${Zo} 字)。`,`Compact context manually. Optional instructions can be up to ${Zo} characters.`)},{name:"settings",invocation:"/settings",label:c("会话设置","Session settings"),description:c("打开当前会话的运行设置;全局配置请在本机终端修改。","Open this session's run settings. Change global configuration in the local terminal.")},{name:"setting",invocation:"/setting",label:c("会话设置(别名)","Session settings (alias)"),description:c("与 /settings 相同。","Alias for /settings.")},{name:"model",invocation:"/model",label:c("模型","Model"),description:c("切换本会话的模型(只对当前会话有效)。","Change the model for this session only.")},{name:"thinking",invocation:"/thinking",label:c("思考档位","Thinking level"),description:c("设置思考档位(可选;档位按实际可选值校验)。","Set a thinking level. If specified, it must be one of the available levels.")},{name:"reasoning",invocation:"/reasoning",label:c("推理状态","Reasoning status"),description:c("查看当前模型是否启用推理。持久设置在本机修改。","Check whether reasoning is enabled for the current model. Change persistent settings in the native client.")},{name:"efforts",invocation:"/efforts",label:c("原生推理档位","Native reasoning levels"),description:c("查看当前档和原生可用档位。持久设置在本机修改。","View the current level and available native levels. Change persistent settings in the native client.")},{name:"fast",invocation:"/fast",label:c("极速模式","Fast mode"),description:c("切换极速模式(开、关或不带参数切换;只影响当前模型)。","Set fast mode to on or off, or omit the argument to toggle it. Applies only to the current model.")},{name:"copy",invocation:"/copy",label:c("复制","Copy"),description:c("复制上一条助手消息。","Copy the last assistant message.")}],J5=T0.map((e)=>e.name);function Jm(e){let t=_s(e);return t.kind==="builtin"&&["session","tree","todo","tasks","dag","help","hotkeys","reasoning","efforts","settings","setting"].includes(t.command.name)}var Z5=/^\/[A-Za-z][A-Za-z0-9_-]*/,jm=/[\0-\b\v\f\x0e-\x1f\x7f]/,Y5=/^[A-Za-z0-9_./:@+-]+$/,Gm=c("命令只能是单行文本,不能包含换行或控制字符。","Commands must be on one line and cannot contain control characters."),Gn=(e)=>({kind:"malformed",message:e});function _s(e){let t=Z5.exec(e)?.[0];if(t===void 0)return{kind:"plain"};let n=e.slice(t.length),r=t.slice(1),s=J5.find((a)=>a===r),i=Wm.find((a)=>a===r);if(s===void 0&&i===void 0)return{kind:"plain"};if(n!==""&&!/^[ \t\r\n]/.test(n))return jm.test(n[0])?Gn(Gm):{kind:"plain"};if(jm.test(e)||e.includes("\r")||e.includes(`
300
+ `))return Gn(Gm);if(i!==void 0)return{kind:"tui-only",name:i};let o=n.trim();switch(s){case"new":case"resume":case"sessions":case"session":case"tree":case"todo":case"tasks":case"dag":case"help":case"hotkeys":case"fork":case"clone":case"copy":case"settings":case"setting":if(o!=="")return Gn(c(`“/${s}”不带参数。`,`/${s} does not take arguments.`));return{kind:"builtin",command:{name:s}};case"reasoning":case"efforts":return o===""?{kind:"builtin",command:{name:s}}:{kind:"tui-only",name:s};case"rename":case"name":if(o.length>Km)return Gn(c(`会话名称不能超过 ${Jo} 字。`,`Session names can be up to ${Jo} characters.`));return{kind:"builtin",command:{name:s,...o===""?{}:{value:o}}};case"compact":if(o.length>Vm)return Gn(c(`压缩指示不能超过 ${Zo} 字。`,`Compaction instructions can be up to ${Zo} characters.`));if(o==="")return{kind:"builtin",command:{name:"compact"}};return{kind:"builtin",command:{name:"compact",instructions:o}};case"model":if(o==="")return{kind:"builtin",command:{name:"model"}};if(/(^|\s)--\S/.test(o))return Gn(c("Web 只接受精确模型引用,不支持 --default 等持久化参数。","The web app accepts exact model references only. Persistent flags such as --default are not supported."));if(!Y5.test(o))return Gn(c("模型引用只能是单个精确引用(如 provider/model)。","Enter one exact model reference, such as provider/model."));return{kind:"builtin",command:{name:"model",reference:o}};case"thinking":if(o==="")return{kind:"builtin",command:{name:"thinking"}};if(!/^[^\s]+$/.test(o))return Gn(c("请输入单个思考档位,例如 high。","Enter a single thinking level, such as high."));return{kind:"builtin",command:{name:"thinking",level:o.toLowerCase()}};case"fast":{if(o==="")return{kind:"builtin",command:{name:"fast"}};let a=o.toLowerCase();return a==="on"||a==="off"?{kind:"builtin",command:{name:s,mode:a}}:Gn(c("“/fast”只接受 on、off 或无参数(切换)。","Use /fast on, /fast off, or /fast to toggle."))}default:return{kind:"plain"}}}var Kr=/^(?:\/(?:[A-Za-z0-9_-]{1,64}|skill:[A-Za-z0-9-]{1,64})|\$[A-Za-z0-9-]{1,64})$/,X5=/^(?:\/(?:[A-Za-z0-9_-]{0,64}|skill:[A-Za-z0-9-]{0,64})|\$[A-Za-z0-9-]{0,64})$/;function Yo(e){return[...T0.map((t)=>({...t,source:"builtin"})),...we(e).map(U).filter((t)=>_s(C(t.invocation)).kind==="plain")]}function Zm(e,t){let n=[],r=-1,s,i=!1;function o(){n=[],r=-1,t.hidden=!0,e.removeAttribute("aria-activedescendant")}function a(l){let u=n[l];if(!u)return;e.value=`${u.invocation} `,e.focus(),e.setSelectionRange(e.value.length,e.value.length),o(),e.dispatchEvent(new Event("input",{bubbles:!0}))}return e.addEventListener("compositionstart",()=>{i=!0,o()}),e.addEventListener("compositionend",()=>{i=!1}),e.addEventListener("blur",o),t.addEventListener("mousedown",(l)=>l.preventDefault()),t.addEventListener("click",(l)=>{let u=l.target;if(!(u instanceof Element))return;let d=Array.from(t.children).findIndex((h)=>h.contains(u));a(d)}),{get composing(){return i},reset(){s=void 0,o()},render(l,u){let d=e.value;if(s!==d)s=void 0;if(!u||i||s===d||document.activeElement!==e||!X5.test(d)||e.selectionStart!==d.length||e.selectionEnd!==d.length){o();return}let h=d.startsWith("$")||d.startsWith("/skill:"),p=d.toLowerCase().replace(/^\/skill:/,"$"),g=new Map;for(let x of Yo(l)){let k=C(x.invocation);if(!Kr.test(k)||k.startsWith("$")!==h)continue;if(k.toLowerCase().startsWith(p)&&!g.has(k))g.set(k,{invocation:k,description:C(x.description)})}let b=[...g.values()].sort((x,k)=>Number(k.invocation===p)-Number(x.invocation===p)||x.invocation.localeCompare(k.invocation));if(!b.length){o();return}if(b.length===n.length&&b.every((x,k)=>x.invocation===n[k]?.invocation&&x.description===n[k]?.description))return;n=b,r=-1,e.removeAttribute("aria-activedescendant"),t.replaceChildren(...b.map((x,k)=>{let E=y("li");return E.id=`inline-command-${k}`,E.setAttribute("role","option"),E.setAttribute("aria-selected","false"),E.append(y("code","",x.invocation),y("span","small muted",x.description)),E})),t.hidden=!1,t.scrollTop=0},key(l){if(i||t.hidden||!vi(l))return!1;switch(l.key){case"Escape":s=e.value,o();break;case"ArrowDown":case"ArrowUp":case"PageDown":case"PageUp":{let u=yi(l.key,r,t.children,t);if(u===void 0)return!1;t.children[r]?.setAttribute("aria-selected","false"),r=u;let d=t.children[r];d.setAttribute("aria-selected","true"),e.setAttribute("aria-activedescendant",d.id),ki(t,d);break}case"Enter":case"Tab":if(r<0)return!1;a(r);break;default:return!1}return l.preventDefault(),!0}}}uc();var P=(e)=>ve(e,HTMLElement),V=(e)=>ve(e,HTMLButtonElement),Ge=(e)=>ve(e,HTMLSelectElement),Ut=(e)=>ve(e,HTMLInputElement),Qo=(e)=>ve(e,HTMLFormElement),Rn=(e)=>ve(e,HTMLDialogElement),Fe=new Aa,zs=new Wn(P("messages"),P("transcript"),P("no-messages")),yr=y("p","notice small");yr.id="transcript-status";yr.setAttribute("role","status");yr.hidden=!0;Qo("composer").prepend(yr);var Di=new Ca(P("interactions")),sa=P("session-trace"),Ss={user:V("trace-jump-user"),assistant:V("trace-jump-assistant"),tool:V("trace-jump-tool"),request:V("jump-to-request")},Ts=new Map,Ke=ve("prompt",HTMLTextAreaElement),Ci=Zm(Ke,P("inline-commands")),Vn=Ge("prompt-mode"),Jn=Ge("model"),ea=Ge("thinking"),Xn=y("button","button button--quiet",c("应用模型","Apply model"));Xn.id="apply-model";Xn.type="button";Xn.hidden=!0;var Sn=y("p","small muted sr-only");Sn.id="model-preview";Sn.setAttribute("role","status");Sn.hidden=!0;Jn.setAttribute("aria-describedby",Sn.id);ea.setAttribute("aria-describedby",Sn.id);Jn.parentElement?.after(Xn);var Ds=P("compose-options"),B0=Ds.parentElement,kr=V("compose-options-button"),op=y("div","row compose-selectors");op.append(...Ds.children);var ap=y("div","stack stack--tight");ap.append(op,Sn);Ds.append(ap);var Ls=Rn("new-dialog"),Ye=Rn("manage-dialog"),Ee=Rn("details-dialog"),jt=Rn("command-dialog"),_i=Rn("branch-dialog"),an=gi,R0={explicit:c("显式指定","Selected"),session:c("会话内记录","Session"),global:c("设备记忆","Saved on this device"),"model-default":c("模型默认","Model default"),default:c("默认设置","Default"),fallback:c("回退档位","Fallback"),clamped:c("按模型能力调整","Adjusted for this model")},M0={ask:c("审批:询问","Ask first"),auto:c("审批:Auto","Auto"),"full-access":c("审批:无审批","No approval")},Ym=[["ask",M0.ask],["auto",M0.auto],["full-access",M0["full-access"]]],N,V0=Zh(Fe,()=>Ee.open&&N?.status==="ready"?N.session.id:void 0),wt={},Li={},it="connecting",Xt="waiting",Tt=!1,Ii=!1,ia=!1,Yr="",Ni="",_r=new Map,yt=[],O0=0,ta=!1,Gt="",Er="",tn=(e)=>yt.includes(e),Q5=(e)=>tn(e)&&(!Gt||e===Gt),Si="omo-web-language-return-session",Tn=!1,En,Ti=0,e6=2000,t6=2000,Zr=0,Ar,D0=0,Bi=0,$0=0,Cn,Ri=!1,An=!1,Xm="omo-web-navigation-collapsed",J0="omo-web-desktop-inspector",wr=!1,Oi=!0,Ot=new Set,nr=new Set,z0=new Map,Oe=new Map,Is=matchMedia("(max-width: 760px)"),Ns=matchMedia("(max-width: 1000px)"),Qm=matchMedia("(prefers-color-scheme: dark)"),L0=new Intl.NumberFormat(me),n6=new Intl.NumberFormat(me,{maximumFractionDigits:2}),Z0=(e)=>V(Is.matches?"open-navigation":wr?"rail-toggle":e).focus(),r6=um(Fe,up),Y0=(e)=>{if(_i.open)return;_i.dataset.sourceKind=e.kind,r6(e)},ht=qm(Fe,tn,()=>{if(ht.active)N?.history?.invalidate();if(er(),Me(),N?.history)Bs(N)}),Fs=zm(Fe,()=>Z0("cli-live-button"),Y0,tn),lp=Um(Fe,()=>({roots:yt,selected:Er||N?.session.cwd||Gt}),l6,()=>{if(Is.matches&&!An)V("open-navigation").focus();else if(V("workspace-browser-button").hidden)Ut("search").focus();else V("workspace-browser-button").focus()}),oa=!1,Vr="cli-history-button";function ep(e,t){if(oa=!0,Rn("cli-history-dialog").close(),Tn=e.archived,Gt&&Gt!==e.cwd)hp("");Pi(e.id,t)}var Hi=Om(Fe,{scope:()=>({paths:yt,browse:!V("workspace-browser-button").hidden}),directoryLabel:zi,bookmarks:()=>_r.values(),onDirectory:(e)=>{Er=e},browse:(e)=>lp.open(e),onClose:()=>{if(!oa&&!document.querySelector("dialog:modal"))if(Vr==="prompt"&&Ke.getClientRects().length)Ke.focus();else Z0(Vr==="workspace-browser-button"&&!V(Vr).hidden?Vr:"cli-history-button");Vr="cli-history-button",oa=!1},openBookmark:(e)=>ep(e,!1),openBranch:Y0,resumeUnavailable:s6,onResumed:(e,t)=>{if(!tn(e.cwd))return;if(Oe.get(e.id)?.status==="pending"&&N?.session.id===e.id)ha(N);if(Oe.delete(e.id),sr(e),t)ep(e,!0)}});function Ei(e){switch(e){case"engine_offline":return c("本机引擎未连接。","The local engine is offline.");case"shared_transport":return c("切换到 CLI 需要私有本机连接。","Switching to the CLI requires a private local connection.");case"missing_capability":return c("此 OmO 版本不支持换端。","This version of OmO does not support handoff.");case"profile_mismatch":return c("本机引擎与 CLI 会话使用不同配置。","The local engine and the CLI session use different profiles.");case"session_busy":return c("等本轮结束后再换端。","Wait for this turn to finish before switching.");case"dialog_pending":return c("先处理会话中的待答事项。","Answer the pending request before switching.");default:return c("这个会话暂时无法换端。","This session cannot be switched right now.")}}function s6(){if(it!=="online")return c("连接断开,只能浏览记录。","Offline. You can still browse the history.");return Li.supported===!0?"":Ei(Li.reason)}function cp(e){if(!e.session.active||e.status!=="ready")return c("先恢复此会话。","Resume this session first.");if(it!=="online")return c("连接断开,无法换端。","Reconnect before switching.");if(Li.supported!==!0)return Ei(Li.reason);if(e.running||e.compacting)return Ei("session_busy");if(e.requests.size)return Ei("dialog_pending");if(e.queue)return c("等队列里的消息发送后再换端。","Wait for queued messages to finish before switching.");if(e.handoff.eligible!==!0)return Ei(e.handoff.reason);if(Ot.has(e.session.id)||nr.has(e.session.id))return c("正在提交,请稍候。","Submitting…");return""}function ha(e){if($i(e),e.optionSync++,e.snapshotRequestChanges=void 0,e.status="inactive",e.running=!1,e.compacting=!1,e.workbench=void 0,e.generationSpeed=void 0,e===N)Cn?.abort()}function $i(e){if(ma(e),e.sync++,e.revision++,e.transcriptRefresh=e.stateRefresh=void 0,e.pendingStateUnknown=e.refreshScheduled=void 0,e.messages=[],e.liveKey="",e.liveMessageKeys.clear(),e.tools.clear(),e.transcript="unavailable",e===N)zs.reset()}function ma(e){e.historyEpoch++,e.history?.invalidate(),e.history=void 0}function pa(e){let t=Boolean(e.history);if(ma(e),e===N)E6();if(t)e.messages=[],e.liveMessageKeys.clear(),e.transcript="unavailable",zs.reset()}function up(e,t,n){if(!yt.includes(e.cwd))return;if(n.kind==="live")Fs.closeAfterBranch();if(n.kind==="history")oa=!0,Rn("cli-history-dialog").close();Tn=!1,Ve(e.id).text=t,sr(e),Pi(e.id,!0)}function Ve(e){let t=z0.get(e);if(!t)t={text:"",mode:"prompt",images:[],reading:0,error:"",commandMode:!1,commandText:"",commandError:""},z0.set(e,t);return t}function dp(e){return _s(e).kind!=="plain"||Kr.test(e.split(/\s/,1)[0]??"")}function i6(){let e=Ge("theme");try{let n=localStorage.getItem("omo-web-theme");if(n==="dark"||n==="light")e.value=n}catch(n){if(!(n instanceof DOMException))throw n}let t=()=>{document.documentElement.dataset.theme=e.value==="system"?Qm.matches?"dark":"light":e.value};e.addEventListener("change",()=>{t();try{localStorage.setItem("omo-web-theme",e.value)}catch(n){if(!(n instanceof DOMException))throw n}}),Qm.addEventListener("change",t),t()}function o6(){let e=Ge("language-select"),t=P("language-feedback");e.value=me,e.addEventListener("change",()=>{let n=e.value;if(n!=="en"&&n!=="zh-CN"||n===me)return;let r=(i)=>{e.value=me,re(t,i)};if([...z0.values()].some((i)=>i.text||i.commandText||i.images.length||i.reading)){r(c("发送或清空草稿后,再切换语言。","Send or clear your drafts before changing the language."));return}if(Ri||nr.size||Ot.size||N?.requests.size){r(c("先完成当前操作,再切换语言。","Finish the current action before changing the language."));return}if(ht.active){r(c("退出 CLI 跟随后,再切换语言。","Stop following the CLI before changing the language."));return}let s=N?.session.id;try{if(s)sessionStorage.setItem(Si,s);else sessionStorage.removeItem(Si)}catch{if(s){r(c("浏览器无法保留当前会话。关闭此会话页面后再切换语言。","The browser could not preserve this session. Change the language from the start screen."));return}}if(!cc(n)){try{sessionStorage.removeItem(Si)}catch{}r(c("浏览器无法保存语言设置。","The browser could not save your language setting."));return}location.reload()})}function a6(){let e;try{e=sessionStorage.getItem(Si),sessionStorage.removeItem(Si)}catch{return}let t=e?_r.get(e):void 0;if(!t||!tn(t.cwd))return;Tn=t.archived,Pi(t.id,!1,!1)}function tp(e){try{return localStorage.getItem(e)}catch(t){if(!(t instanceof DOMException))throw t;return null}}function X0(e,t){try{localStorage.setItem(e,t)}catch(n){if(!(n instanceof DOMException))throw n}}function np(){P("workspace-shell").toggleAttribute("data-rail-collapsed",wr);let e=V("rail-toggle");e.setAttribute("aria-expanded",String(!wr));let t=wr?c("展开会话导航","Expand sessions"):c("收起会话导航","Collapse sessions");e.setAttribute("aria-label",t),e.title=t}function xn(e,t=!1){if(An=e&&Is.matches,P("navigation").classList.toggle("is-open",An),P("nav-scrim").hidden=!An,P("conversation").inert=An,P("skip-link").inert=An,V("open-navigation").setAttribute("aria-expanded",String(An)),An)Ut("search").focus();else if(t&&Is.matches)V("open-navigation").focus()}function rr(){Fs.setTransport(Xt);let e=it==="online";it=Yr||wt.online===!1||Xt==="lost"?"offline":Ii&&Xt==="open"&&!Tt&&wt.online===!0?"online":"connecting",P("connection").dataset.state=it,P("connection-label").textContent={online:c("本机已连接","Connected"),offline:c("连接不可用","Offline"),connecting:c("正在连接","Connecting")}[it];let t=C(wt.version);re(P("engine-version"),t&&c(`引擎 ${t}`,`Engine ${t}`));let n=Yr||(wt.online===!1?C(wt.error)||c("Senpi 引擎未连接。检查引擎后再重连。","The Senpi engine is offline. Check it and reconnect."):Xt==="lost"?c("实时连接已断开。正在重连,草稿会保留。","Connection lost. Reconnecting; your drafts are kept."):Ni);P("banner").toggleAttribute("data-unprotected",ia),P("access-warning").hidden=!ia,V("retry").hidden=!n,re(P("banner-text"),n);let r=it==="online"&&Boolean(yt.length);if(V("new-sidebar").disabled=!r,V("new-welcome").disabled=!r,P("welcome-copy").textContent=Ii&&!yt.length?V("workspace-browser-button").hidden?c("没有可用目录。请检查 OmO Web 的启动配置。","No directories are available. Check your OmO Web startup settings."):c("还没有可用目录。打开侧栏的「目录」添加。","No directories yet. Open Directories in the sidebar to add one."):c("从列表打开会话,或选个目录开始新会话。","Open a session from the list, or choose a directory to start a new one."),V("create").disabled=!r||Ri,Hi.update(),er(),Me(),N?.history)Bs(N);if(!e&&it==="online"&&N&&(N.stateRefresh||N.transcriptRefresh))vt(N)}function fp(e){if(_r=new Map(e.map((t)=>[t.id,t])),N){let t=_r.get(N.session.id);if(t&&t.cwd!==N.session.cwd)$i(N);if(N.session=t??N.session,!yt.includes(N.session.cwd))ec();else if(!N.session.active&&N.status==="ready"&&Oe.get(N.session.id)?.status!=="pending"){if(ha(N),Ye.open)Ye.close()}}er(),Me()}function sr(e){if(Bi++,_r.set(e.id,e),N?.session.id===e.id)N.session=e;er()}async function Xr(){let e=++D0,t=Bi;try{let n=await Fe.request("/api/sessions");if(e!==D0||t!==Bi)return;Ni="",fp(xa(n))}catch(n){if(e===D0)Ni=c(`无法读取会话列表:${Re(n)}`,`Couldn't load sessions: ${Re(n)}`)}rr()}function zi(e){let t=(r)=>ta?r.replaceAll("\\","/"):r,n=t(e).split("/").filter(Boolean);if(ta&&n.length===1)return e;for(let r=1;r<=n.length;r++){let s=n.slice(-r).join("/");if(!yt.some((i)=>i!==e&&t(i).endsWith(`/${s}`)))return ta?s.replaceAll("/","\\"):s}return e}function Q0(){let e=Ge("workspace-select"),t=c("所有目录","All directories");aa(e,yt.map((n)=>[n,zi(n)]),Gt,t),e.title=Gt||t,P("workspace-field").hidden=yt.length<2}function ec(){if(N)ma(N);if(N=void 0,Ar?.(),clearTimeout($0),zs.reset(),Di.reset(),Ke.value="",qs(),Ye.open)Ye.close();if(Rr(!1),Yn(!1),jt.open)xr?.abort(),jt.close();if(_i.open&&_i.dataset.sourceKind==="web")_i.close()}function hp(e){if(e&&!tn(e))return;Gt=e,Q0(),er()}function l6(e,t,n){if(O0++,yt=t,Er=tn(e)?e:"",Gt&&!tn(Gt))Gt="";if(N&&!tn(N.session.cwd))ec();if(ht.recheckWorkspace(),Q0(),Fs.scopeChanged(),Hi.scopeChanged(),n)Vr="workspace-browser-button";oc(e),Xr(),rr()}async function Qn(e=!1){let t=++Zr;Ar?.();let n=Bi,r=O0;try{let s=await Fe.request("/api/bootstrap");if(t!==Zr)return;let i=C(s.token),o=i!==Fe.token;if(o&&N)pa(N);Fe.token=i,wt=U(s.engine),ia=s.unprotected===!0,Li=U(s.handoff);let a=U(s.fileBrowser);if(ta=a.platform==="win32",r===O0||o)yt=S0(s.workspaces);let l=!Ii;if(Gt&&!tn(Gt))Gt="";if(Er&&!tn(Er))Er="";if(lp.update(a,o),Hi.scopeChanged(o),N&&!yt.includes(N.session.cwd))ec();if(ht.recheckWorkspace(),Q0(),Fs.scopeChanged(),Ii=!0,Yr="",Ni="",n===Bi)fp(xa(s));if(!En)pp();if(l)a6();let u=N&&Oe.get(N.session.id);if(e&&Tt==="transport"){if(it==="offline"&&Xt==="open"&&wt.online===!0)rr();await c6(t)}else if(e&&N&&(!u||u.status==="failed")){if(!N.session.active&&N.status!=="loading"&&wt.online===!0)N.status="inactive",N.error="";else if(N.session.active&&wt.online===!0){let d=N;if(await rs(d),d===N)Sr(d)}}}catch(s){if(t===Zr)Yr=c(`无法连接本机 Web 服务:${Re(s)}`,`Couldn't connect to OmO Web: ${Re(s)}`)}if(t!==Zr)return;if(Tt!=="transport"||Xt==="open"&&wt.online===!0&&!Yr)Tt=!1;rr()}async function c6(e){let t=()=>e===Zr&&Tt==="transport"&&Xt==="open"&&wt.online===!0;while(t()){let n=N;if(!n?.session.active)return;let r=Oe.get(n.session.id);if(r&&r.status!=="failed")return;let s=Promise.withResolvers();Ar=s.resolve;let i;try{let o=await Promise.race([n.pendingSnapshot??rs(n,!1,!0),s.promise]);if(t()&&n===N&&Oe.get(n.session.id)===r&&o===n.sync){Sr(n);return}}catch(o){if(!(o instanceof Be||o instanceof TypeError))throw o;if(t()&&n===N&&Oe.get(n.session.id)===r)i=window.setTimeout(s.resolve,t6),await s.promise}finally{if(clearTimeout(i),Ar===s.resolve)Ar=void 0}}}function er(){let e=Ut("search").value.trim().toLocaleLowerCase(),t=P("session-list"),n=document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)?document.activeElement.dataset.session:void 0,r=[..._r.values()].filter((l)=>Q5(l.cwd)&&l.archived===Tn&&(!e||`${l.name} ${l.cwd}`.toLocaleLowerCase().includes(e))).sort((l,u)=>u.updatedAt-l.updatedAt),s=new Map;for(let l of r){let u=s.get(l.cwd);if(u)u.push(l);else s.set(l.cwd,[l])}let i=new Map([...t.querySelectorAll(":scope > .session-group")].map((l)=>[l.dataset.cwd,l])),o=new Map([...t.querySelectorAll("li[data-session]")].map((l)=>[l.dataset.session,l])),a=t.firstElementChild;for(let[l,u]of[...s].sort(([d],[h])=>d.localeCompare(h))){let d=i.get(l)??y("section","session-group"),h=d.querySelector("h2")??y("h2","session-group-heading"),p=d.querySelector("p")??y("p","small muted path session-group-path",l),g=d.querySelector("ul")??y("ul"),b=zi(l);if(h.textContent!==b)h.textContent=b;if(p.hidden=b===l,!d.isConnected)d.dataset.cwd=l,p.dir="ltr",p.title=l,d.append(h,p,g);if(d!==a)t.insertBefore(d,a);a=d.nextElementSibling,i.delete(l);let x=g.firstElementChild;for(let k of u){let E=o.get(k.id)??y("li"),T=E.querySelector("button")??Ue("",()=>Pi(k.id),"button--quiet session-link");if(!T.parentElement)E.dataset.session=T.dataset.session=k.id,T.append(y("span"),y("small")),E.append(T);let _=T.firstElementChild;if(_&&_.textContent!==k.name)_.textContent=T.title=k.name;let A=T.lastElementChild,D=Oe.get(k.id)?.status==="released"?c("已释放","Released"):k.running?c("运行中","Running"):k.settled?c("已结清","Done"):k.active?c("已打开","Open"):c("待恢复","Resume");if(A&&A.textContent!==D)A.textContent=D;if(!ht.active&&k.id===N?.session.id)T.setAttribute("aria-current","true");else T.removeAttribute("aria-current");if(E!==x)g.insertBefore(E,x);x=E.nextElementSibling,o.delete(k.id)}}for(let l of i.values())l.remove();for(let l of o.values())l.remove();if(n&&document.activeElement===document.body)([...t.querySelectorAll("button")].find((l)=>l.dataset.session===n)??Ut("search")).focus({preventScroll:!0});re(P("list-empty"),r.length?"":e?c("没有匹配的会话","No matching sessions"):!Ii?Yr?c("暂时无法读取会话","Couldn't load sessions"):c("正在读取会话…","Loading sessions…"):Tn?c("没有已归档的会话","No archived sessions"):c("还没有最近会话","No recent sessions")),V("recent").setAttribute("aria-pressed",String(!Tn)),V("archived").setAttribute("aria-pressed",String(Tn)),Hi.renderBookmarks()}function Pi(e,t=!1,n=!0){let r=_r.get(e);if(!r||!yt.includes(r.cwd))return;if(ht.stop(),n)xn(!1),P("conversation").focus();if(e===N?.session.id){if(!t)return;if(N.status==="ready"){Ke.focus();return}}if(N)ma(N);if(Ye.open)Ye.close();if(Rr(!1),Yn(!1),jt.open)xr?.abort(),jt.close();if(Cn?.abort(),n)P("conversation").focus({preventScroll:!0});let s=Oe.get(e),i=r.active&&s?.status!=="released"&&s?.status!=="uncertain",o={session:r,status:i?"loading":"inactive",error:"",state:{},messages:[],liveKey:"",liveMessageKeys:new Set,tools:new Map,requests:new Map,options:{},optionsError:"",handoff:{},queue:void 0,revision:0,serial:0,sync:0,optionSync:0,historyEpoch:0,running:r.running,compacting:!1};N=o,Ar?.(),zs.reset(),Di.reset();let a=Ve(e);if(Ke.value=a.commandMode?a.commandText:a.text,Vn.value=a.mode,qs(),er(),Me(),i)rs(o,!0).then(()=>{if(t&&o===N&&o.status==="ready"&&document.activeElement===P("conversation"))Ke.focus()}),Sr(o);else if(n&&s?.status==="released"&&!document.querySelector("dialog:modal"))P("handoff-title").focus()}function Pt(e){return C(e.id)?JSON.stringify([C(e.provider),C(e.id)]):""}function u6(e){let t=C(e.name)||C(e.id);return t?[C(e.provider),t].filter(Boolean).join(" · "):""}function aa(e,t,n,r){let s=JSON.stringify(t);if(e.dataset.options!==s)e.replaceChildren(ot(r,""),...t.map(([i,o])=>ot(o,i))),e.dataset.options=s;if(e.value=n,e.selectedIndex<0)e.value=""}function d6(e,t,n){let r=U(e.state.model),s=Pt(r),i=we(e.options.models).map(U).filter((x)=>Boolean(Pt(x))),o=e.state.pendingModelSwitch!=null;if(!n||o||e.modelSelection===s)e.modelSelection=void 0;let a=i.find((x)=>Pt(x)===e.modelSelection),l=a??i.find((x)=>Pt(x)===s);if(s&&!i.some((x)=>Pt(x)===s))i.unshift(r);aa(Jn,i.map((x)=>[Pt(x),u6(x)]),Pt(a??r),c("模型","Model")),Jn.disabled=t||o||!we(e.options.models).length,Xn.hidden=!a,Xn.disabled=t||o;let u=o?c("正在切换模型。","Changing model…"):"",d;if(n&&!o&&l){let x=JSON.stringify([s,Pt(l),e.state.thinkingLevel]);if(e.modelPreview?.key!==x&&!Ot.has(e.session.id)){let _={key:x,result:void 0};e.modelPreview=_;let A=new URLSearchParams({provider:C(l.provider),modelId:C(l.id)});Fe.request(`${Ze(e.session.id)}/model-preview?${A}`).catch(()=>({})).then((D)=>{if(N!==e||e.modelPreview!==_)return;_.result=D,Me()})}let k=e.modelPreview?.key===x?e.modelPreview.result:void 0,E=C(k?.source),T=C(k?.level);if(k?.status==="ok"&&Object.hasOwn(R0,E)&&Object.hasOwn(an,T)){d=k;let _=we(d.availableLevels).map(C).filter((R)=>Object.hasOwn(an,R)),A=a?c("切换后","After switching"):c("当前","Current"),D=_.map((R)=>an[R]).join(c("、",", "));u=c(`${A}:${an[T]}(来源:${R0[E]}) · 可用:${D}`,`${A}: ${an[T]} (${R0[E]}) · Available: ${D}`)}else u=k?c("无法预览此模型的思考档。","Thinking preview is unavailable for this model."):c("正在读取模型档位…","Loading thinking levels…")}else if(e.modelPreview=void 0,n&&!o&&s&&!e.optionsError&&we(e.options.models).length)u=c("此模型不在可用列表里。","The current model is not available.");if(Sn.textContent!==u)Sn.textContent=u;Sn.classList.toggle("sr-only",!a),Sn.hidden=!u,Jn.title=!a&&u?u:c("模型","Model"),ea.title=!a&&u?u:c("思考档","Thinking level");let h=a?void 0:d,p=C(h?.level??e.state.thinkingLevel),g=we(h?.availableLevels??e.options.levels).map(C).filter((x)=>Object.hasOwn(an,x)),b=g.length>0;if(Object.hasOwn(an,p)&&!g.includes(p))g.unshift(p);aa(ea,g.map((x)=>[x,c(`思考:${an[x]}`,`Thinking: ${an[x]}`)]),p,c("思考档","Thinking")),ea.disabled=t||o||Boolean(a)||!b}function mp(e,t){if(!t||t===Pt(U(e.state.model)))return;e.modelSelection=void 0,e.modelPreview=void 0,e.options={...e.options,levels:[]},Sr(e)}function Mi(e,t){let n=Ts.get(e);if(n===t)return;if(n?.removeAttribute("id"),t){let r=e.getAttribute("aria-controls");if(r)t.id=r;Ts.set(e,t)}else Ts.delete(e);e.hidden=!t,sa.hidden=P("active-session").hidden||!Ts.size}function f6(e){let t=V("sidebar-question"),n=0;for(let i of e.values())if(i.method==="question"&&++n===100)break;if(!n){if(t===document.activeElement)Ee.querySelector('[aria-selected="true"]')?.focus();t.hidden=!0;return}let r=n===100?"99+":String(n),s=c(`Agent 提问 · ${r}`,`Agent questions · ${r}`);if(t.textContent!==s)t.textContent=s,t.setAttribute("aria-label",c(`跳至首个 Agent 提问(${n===100?"超过 99":r} 个待答)`,`Jump to first Agent question (${n===100?"over 99":r} pending)`));t.hidden=!1}function Me(){let e=ht.active;if(P("cli-follow-view").hidden=!e,P("transcript").hidden=e,V("cli-follow-stop").hidden=!e,V("cli-follow-button").setAttribute("aria-pressed",String(e)),P("banner").hidden=!ia&&(e||!P("banner-text").textContent),e){if(N)N.consideredDesktopDock=!1;Ci.reset(),sa.hidden=!0,P("composer-shell").hidden=!0,V("details-button").hidden=!0,V("web-branch-button").hidden=!0,V("manage-button").hidden=!0,rp(ht.target?.name??c("跟随 CLI","Follow CLI"),ht.target?.cwd??"");return}let t=N,n=t?.session,r=n&&Oe.get(n.id),s=r?.status==="pending",i=r?.status==="released"?r:void 0,o=Boolean(t&&t.status==="ready"),a=o?t?.transcript??t?.history?.status:void 0;if(a)yr.dataset.status=a,P("transcript").setAttribute("aria-describedby",yr.id);else delete yr.dataset.status,P("transcript").removeAttribute("aria-describedby");if(P("no-messages").style.display=a?"none":"",re(yr,a==="truncated"?c("部分聊天记录未包含在快照中。","Some chat history was omitted from this snapshot."):a==="unavailable"?c("暂时无法读取聊天记录。新消息仍会显示在这里。","Chat history is unavailable. New messages will still appear here."):""),P("welcome").hidden=Boolean(t),P("inactive-session").hidden=!t||o,P("active-session").hidden=!o,sa.hidden=!o||!Ts.size,!o){Ci.reset();for(let W of Object.values(Ss))Mi(W)}if(P("composer-shell").hidden=!o,Ke.disabled=!o||n?.active!==!0,rp(n?.name??c("会话工作台","Workbench"),n?.cwd??""),V("details-button").hidden=!o,!o)Rr(!1);if(V("web-branch-button").hidden=!n,V("web-branch-button").disabled=s,V("manage-button").hidden=!o,!t)return;let l=Ve(t.session.id);if(Ye.open){let W=s?c("正在释放会话…","Releasing session…"):cp(t);V("manage-handoff").disabled=Boolean(W),re(P("manage-handoff-status"),W),re(P("manage-handoff-error"),r?.status==="failed"?r.error:"")}for(let W of[Ye,Ee])if(W.open)W.querySelectorAll("[data-write]").forEach((ge)=>{ge.disabled=it!=="online"||s||Ot.has(t.session.id)||ge.hasAttribute("data-unavailable")||ge.hasAttribute("data-idle")&&(t.running||t.compacting||nr.has(t.session.id))});$t?.syncWrites();let u=t.status!=="inactive";P("inactive-title").textContent=t.status==="loading"?c("正在读取会话…","Loading session…"):t.status==="failed"?c("无法读取会话","Couldn't load session"):c("继续此会话","Continue this session");let d=Boolean(i&&t.status!=="loading");P("inactive-title").hidden=d,P("inactive-copy").hidden=d,P("inactive-copy").textContent=s?c("等本机引擎确认释放。","Waiting for the local engine to release the session."):t.status==="loading"?"":t.status==="failed"?c("检查连接后重试。","Check the connection and try again."):t.session.archived?c("恢复已归档的会话,继续之前的对话。","Restore this archived session to continue the conversation."):c("恢复后可继续之前的对话。","Resume to pick up where you left off."),P("handoff-receipt").hidden=!d;let h=P("handoff-command").firstElementChild;if(h&&h.textContent!==(i?.command??""))h.textContent=i?.command??"";re(P("handoff-copy-status"),i?.copyStatus),re(P("handoff-draft-note"),!o&&(i||s||r?.status==="uncertain")&&(l.text||l.commandText||l.images.length||l.reading)?c("草稿仍在这页。","Your draft is still on this page."):""),re(P("session-error"),t.error||(r?.status==="uncertain"&&t.status!=="loading"?r.error:""));let p=V("resume");if(p.hidden=o||t.status==="loading",p.disabled=it!=="online"||s||Ot.has(t.session.id),p.classList.toggle("button--primary",!i),p.textContent=!i&&r?.status!=="uncertain"&&u&&t.session.active?c("重试读取","Retry"):c("恢复会话","Resume session"),!o){t.modelSelection=void 0,t.modelPreview=void 0;return}let g=it==="online",b=s||Ot.has(t.session.id),x=nr.has(t.session.id),k=t.session.archived,E=g&&t.session.active&&!k&&!t.compacting,T=Vn.value,_=l.commandMode,A=_||dp(l.text),D=t.running&&(T==="prompt"||k||A);V("stop").hidden=!t.running,V("stop").disabled=!g||b,V("stop").classList.toggle("button--primary",D),V("stop").classList.toggle("button--danger",!D);let R=V("send");R.hidden=A||t.running&&(T==="prompt"||k),R.disabled=!E||b||x||l.reading>0||!l.text.trim()&&!l.images.length;let L=T==="follow_up"?c("排队","Queue"):T==="steer"?c("发送引导","Steer"):c("发送","Send");P("send-label").textContent=R.title=L;let B=V("send-command");B.hidden=!A;let O=_?l.commandText:l.text,H=Jm(O);B.disabled=!g||!t.session.active||b||k&&!H||!H&&(t.running||t.compacting||Boolean(t.queue)||x)||!O.trim(),V("command-mode").setAttribute("aria-pressed",String(_)),V("command-picker").hidden=!_,V("command-picker").disabled=!g||k,P("prompt-label").textContent=_?c("命令及参数","Command and arguments"):c("消息","Message"),Ke.placeholder=_?c("输入 /命令 或 $技能,可加参数…","Enter a /command or $skill…"):c("输入消息…","Write a message…"),V("attach").disabled=_||k||l.images.length+l.reading>=4||b,V("attach").hidden=_,(Vn.closest("label")??Vn).hidden=_,Vn.disabled=k||b,d6(t,!E||t.running||b||x,g&&u&&!s);let K=C(t.state.effectivePermissionPreset)||C(t.state.permissionPreset)||"ask";aa(Ge("approval"),[...Ym],Ym.some(([W])=>W===K)?K:"ask",c("审批","Approval")),Ge("approval").dataset.preset=Ge("approval").value,Ge("approval").disabled=!E||b||x,Ge("approval").title=K==="full-access"?c("无审批:工具默认放行。原生权限规则仍有效,用户问题仍需回答。","Off: Tools are allowed by default. Native permission rules and user questions still apply."):K==="auto"?c("Auto:原生确认安全的项目内操作自动放行,其余询问。","Auto: OmO allows safe project operations and asks about the rest."):c("询问:未被原生权限规则处理的工具操作需要批准。恢复会话会回到此模式。","Ask: Approve tool calls not covered by native rules. Resuming a session returns to Ask.");let G=As(t.state.contextUsage),de=c("上下文","Context");re(P("context-usage"),G.status!=="ok"?"":G.percent!==void 0?`${de} ${L0.format(G.percent)}%`:G.tokens!==void 0&&G.window?`${de} ${L0.format(G.tokens)} / ${L0.format(G.window)}`:"");let ne=Uo(t.state.usageTotals),ae=ne.status==="ok"&&ne.latest!==void 0?n6.format(ne.latest*100):"";re(P("cache-usage"),g&&ae?c(`最新缓存 ${ae}%`,`Latest cache ${ae}%`):"");let z=s?c("正在换端,草稿不会发送。","Switching clients. Your draft won't be sent."):!g?c("离线时可以编辑,重连后再发送。","You can edit offline and send when reconnected."):k?c("先在会话管理里取消归档。","Unarchive this session in Manage session."):l.commandStatus||(A?!H&&(t.running||t.compacting||t.queue)?c("等本轮和队列结束后再执行命令。","Wait for this turn and queue to finish before running a command."):c("Ctrl / ⌘ + Enter 执行命令;开头加空格就按文字发送。","Ctrl / ⌘ + Enter runs the command. Add a leading space to send it as text."):t.compacting?c("等压缩完成后再发送。","Send after compaction finishes."):l.reading?c("正在读取图片…","Loading images…"):t.running&&T==="prompt"?c("停止本轮,或选引导或排队。","Stop this turn, or choose Steer or Queue."):!t.running&&T!=="prompt"?c("当前空闲,这条消息会在下一轮处理。","No turn is running. This message will be handled in the next turn."):c("Ctrl / ⌘ + Enter 发送","Ctrl / ⌘ + Enter to send"));P("composer-hint").textContent=z,P("composer-hint").classList.toggle("sr-only",!l.commandStatus&&g&&!s&&!k&&!l.reading&&!t.compacting&&!A&&(T==="prompt"||t.running));let j=[t.requests.size?c(`待答 ${t.requests.size}`,`Pending ${t.requests.size}`):"",t.running?c("生成中","Generating"):"",t.compacting?c("压缩中","Compacting"):"",t.queue?c(`排队 ${t.queue}`,`Queued ${t.queue}`):""].filter(Boolean).join(" · ");if(P("activity-row").hidden=!j,P("activity-row").dataset.pending=String(t.requests.size>0),P("activity").textContent!==j)P("activity").textContent=j;let Z=V("current-todo"),Q=t.workbench,oe=Q?.status==="ok"?C(Q.currentTodo):"",F=Q?.status==="ok"?Ce(Q.pendingTodo):void 0,X=c("待办","Todo"),te=oe?`${X} · ${oe}`:F?`${X} ${F}`:"";Z.hidden=!g||!te;let xe=P("current-todo-label");if(xe.textContent!==te)xe.textContent=te;Z.title=oe&&F?c(`${te};另有 ${F} 项待处理`,`${te} · ${F} more pending`):te,re(P("compose-error"),(_?l.commandError:l.error)||t.optionsError||(!Ye.open&&r?.status==="failed"?r.error:"")),Di.render(t.requests,g&&!s,(W,ge)=>b6(t,W,ge)),f6(t.requests),Mi(Ss.request,Di.first),Ci.render(t.options.commands,g&&!k&&!s),Ap(t)}function rp(e,t){let n=P("session-title");if(n.textContent!==e)n.textContent=e;n.title=e;let r=P("session-path");if(re(r,t),r.title=t,re(P("session-path-short"),t?zi(t):""),V("session-path-trigger").hidden=!t,ht.active&&t)r.dataset.workspaceLabel=zi(t);else delete r.dataset.workspaceLabel}function h6(e){let t=new Map;for(let n of[...we(e.pendingDialogs),...we(e.pendingQuestions)]){let r=U(n);if(Ji(r))t.set(Hs(r),r)}return t}function Bs(e,t=!1){if(e!==N||e.status!=="ready")return;na(e,t)}function na(e,t=!1,n){let r=e.history,s=r?.entries.length?[...r.entries,...e.messages]:e.messages;zs.render(s,e.liveKey,e.tools,t,r?.render(),n,e.session.id)}function m6(e,t){let n=e.history;if(t&&n?.id===t.id&&!n.reloading)return;if(n?.invalidate(),e.history=void 0,!t)return;let{id:r,cwd:s}=e.session,i=()=>e===N&&e.history===a&&e.session.id===r&&e.session.cwd===s&&tn(s)&&e.session.active&&!ht.active&&(!Oe.has(r)||Oe.get(r)?.status==="failed"),o=()=>i()&&e.status==="ready"&&it==="online"&&!ht.active,a=new o0(t,Fe,r,i,o,()=>e.messages,(l)=>{if(!i())return;Me(),na(e,!1,l)},()=>{if(!o()||a.reloading)return;a.reloading=!0,a.clearExpansion(),Me(),na(e),rs(e).finally(()=>{if(a.reloading=!1,i())na(e)})});e.history=a}async function rs(e,t=!1,n=!1){let r=Oe.get(e.session.id),s=r?.status==="released"||r?.status==="uncertain";if(s&&(e.status!=="loading"||!Ot.has(e.session.id)))return;let i=++e.sync,{historyEpoch:o,session:a,transcriptRefresh:l,stateRefresh:u}=e,d=e.status==="ready"&&e.running&&Boolean(l||u),h=Promise.withResolvers();e.pendingSnapshot=h.promise;let p=e.revision,g=new Set(e.messages),{state:b,generationSpeed:x}=e,k=[];e.snapshotRequestChanges=k;let E=e.liveKey,T=new Set([...e.tools].filter(([,_])=>_.stage==="running").map(([_])=>_));try{let _=await Fe.request(Ze(e.session.id));if(N!==e||i!==e.sync||Oe.get(e.session.id)!==r)return;let A=un(_.session),D=s0(_.page);if(D&&!A||A&&(A.id!==a.id||A.cwd!==a.cwd))throw new Be(c("会话读取响应已失效。","The session read no longer matches this conversation."),409,"stale_session_read");if(e.historyEpoch!==o&&D)return;if(s&&!A?.active)throw Error(c("本机服务未确认已恢复此会话。","The local engine did not confirm the session resumed."));let R=A??e.session;if(s)Oe.delete(R.id);sr(R);let L=U(_.state),B=e.pendingStateUnknown?{...e.state,...L}:L;if(wt.online!==!1)if(_.generationSpeed===void 0&&e.generationSpeed===x)e.generationSpeed=void 0;else tc(e,_.generationSpeed);let O=Pt(U(e.state.model));e.handoff=U(_.handoff);let H=n||!d&&(!e.transcriptRefresh||e.transcriptRefresh===l&&!e.running),K=i0(_.transcript);if(H){if(e.transcript=K,m6(e,K==="unavailable"?void 0:D),e.transcriptRefresh===l)e.transcriptRefresh=void 0}let G=K==="unavailable"?[]:we(_.messages).map(U),de=p!==e.revision,ne=new Map(e.messages.map((Q)=>[Q.key,Q.message])),ae=new Set,z=G.filter((Q)=>Boolean(on(Q))).map((Q,oe)=>{let F=Pr(Q)||`snapshot:${oe}`,X=ae.has(F)?`${F}:${oe}`:F;ae.add(X);let te=ne.get(X);return{key:X,message:te&&JSON.stringify(te)===JSON.stringify(Q)?te:Q}});if(H&&K==="unavailable")e.messages=e.messages.filter((Q)=>e.liveMessageKeys.has(Q.key));if(de){if(H&&K!=="unavailable"){let oe=K==="truncated"||Boolean(l),F=e.messages.filter((te)=>e.liveMessageKeys.has(te.key)&&(!oe||!g.has(te)||e.running&&te.key===e.liveKey)),X=new Map(F.map((te)=>[te.key,te]));e.messages=[...z.map((te)=>X.get(te.key)??te),...F.filter((te)=>!ae.has(te.key))]}if(e.state={...B,...Object.fromEntries(Object.entries(e.state).filter(([oe,F])=>F!==b[oe]))},!(R.running||B.isStreaming===!0)&&!e.running){if(e.liveKey="",H&&K!=="unavailable"&&E&&!ae.has(E))e.messages=e.messages.filter((oe)=>oe.key!==E);for(let oe of T)if(e.tools.get(oe)?.stage==="running")e.tools.delete(oe)}}else{if(H&&K!=="unavailable")e.messages=z;if(e.state=B,!e.pendingStateUnknown||typeof L.isStreaming==="boolean"||R.running)e.running=R.running||B.isStreaming===!0;if(!e.pendingStateUnknown||typeof L.isCompacting==="boolean")e.compacting=B.isCompacting===!0;if(!e.pendingStateUnknown||Ce(L.pendingMessageCount)!==void 0)e.queue=Ce(B.pendingMessageCount);if(!e.running){e.liveKey="";for(let[Q,oe]of e.tools)if(oe.stage==="running")e.tools.delete(Q)}else if(H&&K!=="unavailable"&&e.liveKey&&!ae.has(e.liveKey)){let Q=ne.get(e.liveKey);if(Q)e.messages.push({key:e.liveKey,message:Q})}}e.liveMessageKeys=new Set(e.messages.flatMap((Q)=>e.liveMessageKeys.has(Q.key)?[Q.key]:[]));let j=h6(L);if(e.pendingStateUnknown){let Q=Array.isArray(L.pendingDialogs),oe=Array.isArray(L.pendingQuestions);for(let[F,X]of e.requests)if(!(X.method==="question"?oe:Q)&&!j.has(F))j.set(F,X);if(Q&&oe&&e.stateRefresh===u)e.pendingStateUnknown=void 0}if(e.stateRefresh===u)e.stateRefresh=void 0;if(!H&&!e.running&&e.transcriptRefresh)vt(e);for(let Q of k)gp(j,Q);e.requests=j,mp(e,O);let Z=e.status!=="ready";if(e.status="ready",e.error="",Me(),Bs(e,t),Ai(e),Z||!e.workbench)la(e);return i}catch(_){if(N!==e||i!==e.sync||Oe.get(e.session.id)!==r)return;if(Oe.get(e.session.id)?.status==="pending")return;if(n)throw _;if(e.status!=="ready"||!e.session.active)e.status="failed",e.error=Re(_);else Ve(e.session.id).error=c(`无法刷新会话:${Re(_)}`,`Couldn't refresh the session: ${Re(_)}`);Me()}finally{if(e.pendingSnapshot===h.promise)e.pendingSnapshot=void 0;if(h.resolve(),e.snapshotRequestChanges===k)e.snapshotRequestChanges=void 0;if(e===N&&!e.pendingSnapshot&&e.refreshScheduled)e.refreshScheduled=void 0,vt(e)}}async function la(e){if(e!==N||e.status!=="ready"||!e.session.active||e.session.archived||it!=="online"||ht.active||Oe.get(e.session.id)?.status==="pending")return;Cn?.abort();let t=Cn=new AbortController,n=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);try{let r=await Fe.request(`${Ze(e.session.id)}/workbench-status`,void 0,n);if(t.signal.aborted||Cn!==t||e!==N||e.status!=="ready")return;e.workbench=r}catch(r){if(!(r instanceof Error))throw r;if(t.signal.aborted||Cn!==t||e!==N)return;e.workbench={status:"unavailable"}}finally{if(Cn===t)Cn=void 0}Me()}async function Sr(e){let t=++e.optionSync;try{let n=await Fe.request(`${Ze(e.session.id)}/options`);if(N!==e||t!==e.optionSync)return;e.options=n,e.optionsError=""}catch(n){if(N!==e||t!==e.optionSync)return;e.optionsError=c(`无法读取模型和运行选项:${Re(n)}`,`Couldn't load models and settings: ${Re(n)}`)}Me()}function pp(){if(En)return;let e=new EventSource("/api/events");En=e,e.addEventListener("open",()=>{if(e!==En)return;let t=Xt==="lost";if(t)Tt="transport";if(Xt="open",rr(),t)if(wt.online===!1)Xr();else Qn(!0)}),e.addEventListener("error",()=>{if(e!==En)return;if(Xt!=="lost"&&N)pa(N),N.liveMessageKeys.clear(),N.liveKey="",N.tools.clear();if(Xt="lost",Tt==="transport")Zr++,Ar?.();if(rr(),e.readyState!==EventSource.CLOSED||Ti)return;Ti=window.setTimeout(()=>{if(Ti=0,e!==En)return;En=void 0,pp()},e6)}),e.addEventListener("omo",(t)=>{if(!(t instanceof MessageEvent)||typeof t.data!=="string"||e!==En)return;try{let n=JSON.parse(t.data);g6(U(n))}catch(n){if(!(n instanceof SyntaxError))throw n;if(N?.session.active)vt(N)}})}function p6(e,t,n){let r=U(t.message),s=on(r);if(!s)return;if(s==="toolResult"&&r.toolName==="send_file"&&n!=="message_end")return;let i=e.messages[e.messages.length-1],o=Pr(r),a=s==="assistant"&&e.liveKey,l=n!=="message_start"&&a||o||"";if(!l&&n!=="message_start"&&i&&s===on(i.message))l=i.key;if(!l)l=`live:${++e.serial}`;let u=e.messages.findIndex((d)=>d.key===l);if(u<0)e.messages.push({key:l,message:r});else e.messages[u]={key:l,message:r};if(e.liveMessageKeys.add(l),s==="assistant"){if(e.liveKey=n==="message_end"?"":l,n!=="message_end")e.running=!0}}function vt(e){clearTimeout($0),$0=window.setTimeout(()=>{if(N!==e||!e.session.active||Xt!=="open"||Tt==="transport"||Oe.get(e.session.id)?.status==="pending")return;if(e.transcriptRefresh&&e.running&&!e.stateRefresh)return;if(e.pendingSnapshot){e.refreshScheduled=!0;return}rs(e)},120)}function gp(e,t){if(t.type==="upsert"){e.set(Hs(t.request),t.request);return}for(let[n,r]of e){if(!t.ids.includes(n)&&!t.ids.includes(C(r.requestId)))continue;if(t.type==="resolve")e.delete(n);else if(r.method==="question")e.set(n,{...r,...t.timing})}}function ca(e,t){gp(e.requests,t),e.snapshotRequestChanges?.push(t)}function I0(e,t){let n=U(t);if(Ji(n))ca(e,{type:"upsert",request:n})}function tc(e,t){let n=Jh(t);if(!n||e.generationSpeed&&e.generationSpeed.measuredAt>=n.measuredAt)return!1;return e.generationSpeed=n,!0}function Ai(e){if(Ee.open&&e.detailData)am(e.detailData,e.state,e.generationSpeed)}function g6(e){let t=C(e.type);if(t==="cli-live"){Fs.invalidate(C(e.id));return}if(t==="ready"||t==="engine"){if(t==="engine"){let r=U(e.engine);if(typeof r.online!=="boolean")return;if(Tt!=="transport")Tt=r.online&&wt.online===!1?"engine":!1;if(wt=r,!r.online&&Tt==="transport")Zr++,Ar?.();if(!r.online&&N)pa(N),N.liveMessageKeys.clear(),N.liveKey="",N.tools.clear(),N.generationSpeed=void 0,Ai(N);if(rr(),r.online)Qn(!0);else Xr()}else if(Tt==="transport"){if(wt.online===!1&&U(e.engine).online===!0)Qn(!0)}else if(Tt)return;else if(N&&wt.online!==!1)Qn(!0);else Xr();return}if(t==="sessions"){Xr();return}let n=N;if(!n||e.sessionId!==n.session.id)return;if(n.status!=="ready"&&n.status!=="loading")return;if(t==="generation_speed"){if(tc(n,e.generationSpeed))Ai(n);return}switch(n.revision++,t){case"transcript_refresh_required":if(n.transcriptRefresh={},!n.running)vt(n);return;case"state_refresh_required":n.stateRefresh={},n.pendingStateUnknown=!0,vt(n);return;case"agent_start":n.running=!0;break;case"turn_start":{let r=C(e.turnId);if(r)n.state={...n.state,currentTurnId:r};break}case"agent_end":if(e.willRetry===!0)break;n.liveKey="",vt(n);break;case"agent_settled":if(n.running=!1,n.liveKey="",n.state={...n.state,currentTurnId:void 0},vt(n),la(n),n.status==="ready"&&Ee.open)$t?.invalidate(),ra(n);break;case"agent_idle":if(n.transcriptRefresh)n.running=!1,n.liveKey="";vt(n);break;case"message_start":case"message_update":case"message_end":p6(n,e,t);break;case"tool_execution_start":case"tool_execution_update":case"tool_execution_end":{let r=C(e.toolCallId);if(!r)break;let s=n.tools.get(r),i=U(e.result??e.partialResult);if(n.tools.set(r,{id:r,name:C(e.toolName)||s?.name||"",args:e.args??s?.args,output:i.content??s?.output,stage:e.isError===!0?"error":t==="tool_execution_end"?"done":"running"}),t==="tool_execution_end"&&e.isError!==!0&&/^(?:todo|todowrite)$/u.test(C(e.toolName)||s?.name||""))la(n);break}case"extension_ui_request":I0(n,e);break;case"ui_request_pending":I0(n,e.request);break;case"question_updated":{if(Ji(e))I0(n,e);else{let r=[C(e.id),C(e.requestId)].filter(Boolean),s=Ce(e.deadlineAtMs),i=Ce(e.remainingMs);if(!r.length||s===void 0&&i===void 0)return;ca(n,{type:"timing",ids:r,timing:{...s===void 0?{}:{deadlineAtMs:s},...i===void 0?{}:{remainingMs:i}}})}break}case"question_resolved":case"ui_request_resolved":case"extension_ui_resolved":case"extension_ui_request_resolved":{let r=[e.id,e.requestId,e.uiRequestId].map(C).filter(Boolean);if(r.length)ca(n,{type:"resolve",ids:r});vt(n);break}case"compaction_start":n.compacting=!0;break;case"compaction_end":if(n.compacting=!1,e.aborted!==!0&&C(e.errorMessage))Ve(n.session.id).error=C(e.errorMessage);if(e.aborted!==!0&&e.success!==!1&&!e.errorMessage&&!e.error)$i(n);if(e.aborted!==!0&&!C(e.errorMessage)&&Ee.open)$t?.invalidate(),ra(n);vt(n);break;case"queue_update":if(n.queue=we(e.steering).length+we(e.followUp).length,Ee.open&&ns())G0(n);else Os=!0;Tr?.activate(!0);break;case"pending_input_update":if(vt(n),Ee.open&&ns())G0(n);else Os=!0;Tr?.activate(!0);break;case"model_changed":case"service_tier_changed":{let r=Pt(U(n.state.model));if(e.model)n.state={...n.state,model:e.model};if(typeof e.thinkingLevel==="string")n.state={...n.state,thinkingLevel:e.thinkingLevel};if(typeof e.fastMode==="boolean")n.state={...n.state,fastMode:e.fastMode};if(Ai(n),!r||r===Pt(U(n.state.model)))n.modelPreview=void 0,Sr(n);else mp(n,r);vt(n);break}case"commands_changed":case"loaded_surfaces_changed":Sr(n);break;case"auto_retry_start":n.running=!0;break;case"auto_retry_end":vt(n);break;case"session_replaced":if(ya(),$i(n),n.status="loading",n.running=!1,n.compacting=!1,n.state={},n.requests.clear(),n.queue=void 0,Cn?.abort(),n.workbench=void 0,n.generationSpeed=void 0,V0(),Ai(n),Ee.open)$t?.invalidate(),ra(n);vt(n);break;case"transcript_write_failed":case"extension_error":case"retry_fallback_exhausted":Ve(n.session.id).error=C(e.errorMessage)||C(e.error)||C(e.lastError)||c("本机引擎报告会话错误","The local engine reported a session error.");break;case"session_closed":case"session_parked":case"session_released":if(Oe.get(n.session.id)?.status!=="pending")ha(n);sr({...n.session,active:!1,running:!1});break;default:return}Me(),Bs(n)}async function ga(e,t){if(it!=="online")throw Error(c("连接断开。重连后重试。","Offline. Reconnect and try again."));if(t.action!=="resume"&&(e!==N||e.status!=="ready"||!e.session.active||Oe.get(e.session.id)?.status==="pending"))throw Error(c("恢复会话后再试。","Resume the session and try again."));try{let n=await Fe.action(e.session.id,t),r=un(n.session);if(r)sr(r);return n}catch(n){if(n instanceof Be&&(n.status===401||n.status===403))Qn(!0);throw n}}async function b6(e,t,n){let r=[t,C(e.requests.get(t)?.requestId)].filter(Boolean);if(await ga(e,{action:"answer",requestId:t,...n}),ca(e,{type:"resolve",ids:r}),e===N)Me();vt(e)}function qs(){let e=N,t=P("attachments"),n=e&&Ve(e.session.id);if(t.hidden=!n?.images.length||n.commandMode,t.replaceChildren(),!n)return;for(let r of n.images){let s=y("div","attachment"),i=y("img");i.alt=r.name,i.src=r.url;let o=Ue(c("移除","Remove"),()=>{n.images=n.images.filter((a)=>a!==r),qs(),Me(),(t.querySelector("button")??V("attach")).focus()},"button--quiet");o.setAttribute("aria-label",c(`移除图片:${r.name}`,`Remove image: ${r.name}`)),s.append(i,o),t.append(s)}}async function sp(e){let t=N;if(!t||t.status!=="ready"||t.session.archived||Ve(t.session.id).commandMode)return;let n=Ve(t.session.id),r=[],s=[];for(let o of e){let a=o.type;if(!Gi(a)){r.push(c(`不支持图片格式:${o.name}`,`Unsupported image format: ${o.name}`));continue}if(!o.size||o.size>2100000){r.push(c(`图片为空或超过 2.1 MB:${o.name}`,`Image is empty or larger than 2.1 MB: ${o.name}`));continue}if(n.images.length+n.reading>=4){r.push(c("最多可添加 4 张图片。","You can attach up to 4 images."));break}n.reading++,s.push(new Promise((l,u)=>{let d=new FileReader;d.addEventListener("error",()=>u(Error(c(`无法读取图片:${o.name}`,`Couldn't read image: ${o.name}`))),{once:!0}),d.addEventListener("load",()=>{let h=typeof d.result==="string"?d.result:"",p=h.slice(h.indexOf(",")+1);if(!p||!h.startsWith(`data:${a};base64,`)){u(Error(c(`图片编码无效:${o.name}`,`Invalid image data: ${o.name}`)));return}l({type:"image",mimeType:a,data:p,name:o.name||c("粘贴的图片","Pasted image"),url:h})},{once:!0}),d.readAsDataURL(o)}))}if(t===N)Me();let i=await Promise.allSettled(s);n.reading-=s.length;for(let o of i)if(o.status==="fulfilled")n.images=[...n.images,o.value];else r.push(Re(o.reason));if(n.error=[...new Set(r)].join(" "),t===N)qs(),Me()}async function v6(){let e=N;if(!e||V("send").disabled||V("send").hidden)return;let t=e.session.id,n=Ve(t),{text:r,mode:s,images:i}=n,o=s==="prompt"?"":C(e.state.currentTurnId),a=n.admission,l=a&&a.text===r&&a.mode===s&&a.turn===o&&a.imageList===i?a.id:crypto.randomUUID();n.admission={id:l,text:r,mode:s,turn:o,imageList:i},n.error="",nr.add(t),Me();try{if(await ga(e,{action:"prompt",message:r,mode:s,clientMessageId:l,...o?{expectedTurnId:o}:{},...i.length?{images:i.map(({type:u,mimeType:d,data:h})=>({type:u,mimeType:d,data:h}))}:{}}),n.admission=void 0,n.text===r){if(n.text="",e===N&&!n.commandMode)Ke.value=""}if(n.images=n.images.filter((u)=>!i.includes(u)),e===N)qs();vt(e)}catch(u){if(n.error=c(`未能发送:${Re(u)}`,`Couldn't send: ${Re(u)}`),u instanceof Be&&u.status>=400&&u.status<500)n.admission=void 0;vt(e)}finally{if(nr.delete(t),e===N)Me()}}async function y6(e){if(V("send-command").disabled||V("send-command").hidden)return;let t=e.session.id,n=Ve(t),r=n.commandMode?"commandText":"text",s=n.commandMode?"commandError":"error",i=n[r],o=(p)=>{n[s]=p},a=()=>{if(n[r]!==i)return;if(n[r]="",N?.session.id===t&&n.commandMode===(r==="commandText"))Ke.value=""};n.commandStatus=void 0;let l=_s(i);if(l.kind==="malformed"||l.kind==="tui-only"){o(l.kind==="malformed"?l.message:c(`“/${l.name}”请在本机 OmO 终端重新发起。Web 没有转交输入,也没有发送给模型。`,`Run /${l.name} in the local OmO terminal. The Web app did not forward your input or send it to the model.`)),Me();return}if(l.kind==="builtin"){o("");try{if(await k6(e,l.command,o))a()}catch(p){o(c(`命令失败:${Re(p)}`,`Command failed: ${Re(p)}`))}if(N?.session.id===t)Me();return}let[,u,d]=/^(\S+)(?:[ \t]+([^\r\n]*))?$/.exec(i)??[];if(!u||!Kr.test(u)||/[\r\n]/.test(i)){o(c("请输入单行 /命令 或 $技能,可附加参数。","Enter a /command or $skill on one line. Arguments are optional.")),Me();return}let h=n.commandAdmission?.text===i?n.commandAdmission.id:crypto.randomUUID();n.commandAdmission={text:i,id:h},o(""),nr.add(t),Me();try{await ga(e,{action:"command",invocation:u,...d?{arguments:d}:{},clientMessageId:h}),n.commandAdmission=void 0,a()}catch(p){if(p instanceof Be&&p.status>=400&&p.status<500)n.commandAdmission=void 0;let g=p instanceof Be?p.code:"",b=g==="unknown_command"?c("未知命令","Unknown command"):g==="session_busy"||g==="bridge_busy"?c("会话忙","Session is busy"):g==="invalid_arguments"||g==="invalid_request"?c("命令输入无效","Invalid command input"):c("原生命令失败","Native command failed");o(c(`${b}:${Re(p)}`,`${b}: ${Re(p)}`))}finally{if(nr.delete(t),N?.session.id===t)Me(),vt(N)}}async function k6(e,t,n){let r=e.session.id,s=(i,o)=>ln(e,i,o,n);switch(t.name){case"new":return F0(),Ls.open;case"resume":case"sessions":return Vr="prompt",oc(),Rn("cli-history-dialog").open;case"name":case"rename":if(t.value!==void 0)return s({action:"rename",name:t.value},c("重命名","Rename"));return V("manage-button").click(),Ye.querySelector('[data-key="name"]')?.focus(),Ye.open;case"session":return Jr(),Ee.open;case"settings":case"setting":return V("manage-button").click(),Ye.querySelector('[data-key="run-settings"]')?.focus(),Ye.open;case"tree":return Jr("overview",Ke,"tree"),Ee.open;case"todo":return Jr("todo",Ke,"todo"),Ee.open;case"tasks":return Jr("subagents",Ke),Ee.open;case"dag":return Jr("dag",Ke),Ee.open;case"help":case"hotkeys":return await kp(e,!0),jt.open;case"reasoning":case"efforts":{let i=U(e.state.model),o=C(e.state.thinkingLevel);if(!Pt(i))return n(c("没有已确认的模型。","No model is selected yet.")),!1;if(!o||!Object.hasOwn(an,o))return n(c("当前思考档未知。","The current thinking level is unknown.")),!1;if(t.name==="reasoning")return Ve(r).commandStatus=o==="off"?c("当前模型推理:关闭。","Model reasoning: off."):c(`当前模型推理:开启(${o})。`,`Model reasoning: on (${o}).`),!0;let a=we(e.options.levels).map(C).filter((u)=>Object.hasOwn(an,u)),l=a.filter((u)=>u!=="off");if(!a.length)return n(c("暂时无法读取可用思考档。","Thinking levels are unavailable.")),!1;if(i.reasoning===!1||!l.length)return n(c("当前模型不支持推理。","This model does not support reasoning.")),!1;if(a.includes("off")&&l.length===1)return n(c("此模型只能开启或关闭推理。","This model can only turn reasoning on or off.")),!1;return Ve(r).commandStatus=c(`当前档位:${o}。可用推理档:${l.join("、")}。`,`Thinking: ${o}. Available levels: ${l.join(", ")}.`),!0}case"fork":return V("web-branch-button").click(),Rn("branch-dialog").open;case"compact":{let i=await s({action:"compact",...t.instructions?{instructions:t.instructions}:{}},c("压缩上下文","Compact context"));if(i)Ve(r).commandStatus=c("上下文已压缩。","Context compaction completed.");return i}case"model":{if(!t.reference){if(j0()&&!Ge("model").disabled)Yn(!0);if(Ge("model").focus(),document.activeElement===Ge("model")){try{Ge("model").showPicker?.()}catch(o){if(!(o instanceof DOMException))throw o}return!0}return n(c("没有可选模型。","No models available.")),!1}let i=we(e.options.models).map(U).filter((o)=>[C(o.id),`${C(o.provider)}/${C(o.id)}`].includes(t.reference??""));if(i.length===1)return s({action:"model",provider:C(i[0].provider),modelId:C(i[0].id)},c("切换模型","Change model"));return n(i.length?c("多个模型同名,请用 provider/model。","Multiple models have that name. Use provider/model."):c("找不到此模型。用 /model 查看列表。","Model not found. Use /model to list available models.")),!1}case"thinking":{if(!t.level){if(j0()&&!Ge("thinking").disabled)Yn(!0);if(Ge("thinking").focus(),document.activeElement===Ge("thinking")){try{Ge("thinking").showPicker?.()}catch(i){if(!(i instanceof DOMException))throw i}return!0}return n(c("没有可选思考档。","No thinking levels available.")),!1}if(!we(e.options.levels).includes(t.level))return n(c("此模型不支持这个思考档。","This model does not support that thinking level.")),!1;return s({action:"thinking",level:t.level},c("切换思考档","Change thinking level"))}case"fast":if(typeof e.state.fastMode!=="boolean")return n(c("此模型没有快速模式。","Fast mode is unavailable for this model.")),!1;return s({action:"fast",enabled:t.mode?t.mode==="on":!e.state.fastMode},c("切换快速模式","Change fast mode"));case"clone":case"copy":Ot.add(r),Me();try{if(t.name==="copy"){let{text:a}=await Fe.request(`${Ze(r)}/last-assistant`);if(typeof a!=="string"||!a)return n(c("没有可复制的助手消息。","No assistant message to copy.")),!1;if(!navigator.clipboard)return n(c("浏览器无法访问剪贴板。","The browser can't access the clipboard.")),!1;return await navigator.clipboard.writeText(a),Ve(r).commandStatus=c("已复制上一条助手消息。","Copied the last assistant message."),!0}let i=await Fe.request(`${Ze(r)}/branches`,{kind:"clone"});if(i.cancelled===!0)return n(c("原生引擎取消了复制。","OmO cancelled the clone.")),!1;let o=un(i.session);if(!o)throw Error(c("本机服务没有返回新会话。","The local service did not return a new session."));if(e===N)up(o,"",{kind:"web",id:r,name:e.session.name});else sr(o);return!0}finally{Ot.delete(r)}}}function ip(){if(!N||N.status!=="ready"||!N.session.active||Oe.get(N.session.id)?.status==="pending")return;let e=Ve(N.session.id);if(e.commandMode||dp(e.text))y6(N);else v6()}async function ln(e,t,n,r,s){let i=e.session.id;if(Ot.has(i)||Oe.get(i)?.status==="pending")return!1;Ot.add(i),r(""),Me(),Ye.setAttribute("aria-busy","true"),Ee.setAttribute("aria-busy","true");try{let o=await ga(e,t);if(e!==N)return!0;if(s?.(o),t.action==="navigate"){if(U(o.result).cancelled===!0)return!1;ya(),Bt?.abort(),Bt=void 0,tr=void 0,$s=void 0,$t?.invalidate(),$i(e),Cn?.abort(),e.workbench=void 0;let a=C(U(o.result).editorText);if(a){let l=Ve(i);if(l.text=a,!l.commandMode)Ke.value=a}}if(t.action==="resume")e.status="loading";if(t.action==="model"||t.action==="thinking")e.modelPreview=void 0;if(await rs(e,t.action==="resume"||t.action==="navigate"),e!==N)return!0;if(t.action==="resume")Sr(e);if(Ye.open)bp(e);if(Ee.open&&t.action!=="abort")ra(e);return!0}catch(o){if(e===N)r(c(`${n}失败:${Re(o)}`,`${n} failed: ${Re(o)}`),o);return!1}finally{if(Ot.delete(i),Ye.removeAttribute("aria-busy"),Ee.removeAttribute("aria-busy"),e===N)Me()}}function F0(){if(it!=="online"||!yt.length||Ls.open)return;ht.stop();let e=Ge("new-cwd");e.replaceChildren(...yt.map((n)=>ot(n,n))),e.value=Er||N?.session.cwd||yt[0]||"";let t=yt.length>1;if(P("new-cwd-field").hidden=!t,P("new-cwd-fixed").hidden=t,P("new-cwd-path").textContent=e.value,Ut("new-name").value="",re(P("new-error")),Ls.showModal(),!t)Ut("new-name").focus()}async function w6(){if(Ri||it!=="online")return;let e=Ge("new-cwd").value;if(!yt.includes(e))return;let t=Ut("new-name").value.trim();if(t.length>120){re(P("new-error"),c("会话名称不能超过 120 个字符。","Keep the session name to 120 characters or fewer."));return}Ri=!0,V("create").disabled=!0,re(P("new-error"));try{let n=await Fe.request("/api/sessions",{cwd:e,...t?{name:t}:{}}),r=un(n.session);if(!r)throw Error(c("本机服务没有返回会话。","The local service did not return a session."));if(Er="",sr(r),!ht.active){if(Tn=r.archived,Ls.open)Ls.close();Pi(r.id)}}catch(n){if(re(P("new-error"),c(`创建失败:${Re(n)}`,`Couldn't create session: ${Re(n)}`)),n instanceof Be&&(n.status===401||n.status===403))Qn(!0)}finally{Ri=!1,rr()}}async function x6(e){let t=e.session.id;if(e!==N||!Ye.open||Oe.get(t)?.status==="pending"||cp(e))return;let n={status:"pending"};Oe.set(t,n),e.history?.invalidate(),Me(),Bs(e),P("manage-handoff-status").focus();let r=()=>N?.session.id===t?N:void 0,s=()=>Ye.open||document.activeElement===V("manage-button")||P("composer-shell").contains(document.activeElement),i=(o,a)=>{let l=s();if(ha(o),o.error="",Ye.open)Ye.close();if(Me(),l&&!document.querySelector("dialog:modal"))P(a).focus()};try{let{session:o,command:a}=await Fe.handoff(t);if(Oe.get(t)!==n)return;Oe.set(t,{status:"released",command:a}),sr(o);let l=r();if(l)i(l,"handoff-title")}catch(o){if(Oe.get(t)!==n)return;let a=!(o instanceof Be)||o.status>=500||o.code==="session_not_open",l=c(`无法转到 CLI:${Re(o)}`,`Couldn't switch to the CLI: ${Re(o)}`),u=r();if(a||u&&!u.session.active){Oe.set(t,{status:"uncertain",error:l});let d=u?.session??_r.get(t);if(d)sr({...d,active:!1,running:!1});if(u)i(u,"session-error");Xr()}else if(Oe.set(t,{status:"failed",error:l}),u){if(Me(),Bs(u),Ye.open&&document.activeElement===P("manage-handoff-status"))P("manage-handoff-error").focus()}if(o instanceof Be&&(o.status===401||o.status===403))Qn(!0)}}function bp(e){let t=P("manage-body"),n=document.activeElement,r=n instanceof HTMLElement&&t.contains(n)?n.dataset.key:void 0,s=e.session.id,i=(R)=>re(P("manage-error"),R),o=y("input");o.type="text",o.required=!0,o.maxLength=120,o.value=e.session.name,o.dataset.key="name";let a=y("form","stack stack--tight"),l=y("button","button",c("保存名称","Save name"));l.type="submit",l.dataset.write="",l.dataset.key="save";let u=y("div","row");u.append(l),a.append(ir(c("会话名称","Session name"),o),u),a.addEventListener("submit",(R)=>{R.preventDefault();let L=o.value.trim();if(!L){i(c("请输入会话名称。","Enter a session name."));return}if(L!==e.session.name)ln(e,{action:"rename",name:L},c("重命名","Rename"),i)});let d=(R,L,B,O=!1)=>{let H=Ue(R,()=>void ln(e,B,R,i));return H.dataset.key=L,H.dataset.write="",H.disabled=O||it!=="online",H},h=y("section","subpanel stack stack--tight"),p=y("div","row");p.append(d(e.session.archived?c("取消归档","Unarchive"):c("归档","Archive"),"archive",{action:"archive",enabled:!e.session.archived}),d(e.session.settled?c("重新标为未结清","Mark as open"):c("标为已结清","Mark as done"),"settle",{action:"settle",enabled:!e.session.settled})),h.append(y("h3","",c("会话状态","Session status")),y("p","small muted",e.session.archived?c("已归档","Archived"):c("未归档","Not archived")),p);let g=y("section","subpanel stack stack--tight"),b=y("div","row"),x=e.state.fastMode,k=e.state.autoCompactionEnabled;if(typeof x==="boolean")b.append(d(x?c("关闭快速模式","Turn off fast mode"):c("开启快速模式","Turn on fast mode"),"fast",{action:"fast",enabled:!x}));if(typeof k==="boolean")b.append(d(k?c("关闭自动压缩","Turn off auto-compaction"):c("开启自动压缩","Turn on auto-compaction"),"auto",{action:"autoCompaction",enabled:!k}));let E=y("h3","",c("运行设置","Run settings"));if(E.dataset.key="run-settings",E.tabIndex=-1,g.append(E),b.childElementCount)g.append(b);let T=y("form","stack stack--tight"),_=y("input");_.type="text",_.maxLength=6000,_.dataset.key="instructions";let A=y("button","button",c("压缩上下文","Compact context"));A.type="submit",A.dataset.write="",A.dataset.idle="",A.dataset.key="compact",A.disabled=it!=="online"||e.running||e.compacting;let D=y("div","row");if(D.append(A),T.append(ir(c("压缩说明(选填)","Compaction instructions (optional)"),_),D),T.addEventListener("submit",(R)=>{if(R.preventDefault(),e.running||e.compacting||Ot.has(s)){i(c("等本轮结束后再压缩。","Wait for this turn to finish before compacting."));return}let L=_.value.trim();ln(e,{action:"compact",...L?{instructions:L}:{}},c("压缩上下文","Compact context"),i)}),g.append(T),l.disabled=it!=="online",t.replaceChildren(a,h,g),r)[...t.querySelectorAll("[data-key]")].find((R)=>R.dataset.key===r)?.focus()}var xr,q0=[];function vp(e,t){if(e!==N)return;let n=Ve(e.session.id);n.commandMode=t,Ke.value=t?n.commandText:n.text,qs(),Me(),Ke.focus()}function yp(e,t){if(e!==N||!Kr.test(t))return;let n=Ve(e.session.id),[r=""]=n.commandText.split(/\s/,1),s=Kr.test(r)?n.commandText.slice(r.length):"";if(n.commandText=`${t}${s||" "}`,n.commandError="",jt.open)jt.close();if(Ee.matches(":modal"))Rr(!1);vp(e,!0),Ke.setSelectionRange(t.length+1,t.length+1)}function H0(e){let t=P("command-list"),n=document.activeElement,r=n instanceof HTMLButtonElement&&t.contains(n)?n.dataset.invocation:void 0,s,i=Ut("command-search").value.trim().toLocaleLowerCase(),o=q0.flatMap((a)=>{let l=C(a.invocation),u=C(a.description),d=C(a.source),h=d==="builtin"?c("内置命令","Built-in"):d==="skill"?c("技能","Skill"):d==="prompt"?c("提示模板","Prompt template"):c("扩展","Extension");if(!Kr.test(l)||!`${l} ${u} ${h} ${d}`.toLocaleLowerCase().includes(i))return[];let p=y("li","stack stack--tight"),g=Ue(l,()=>yp(e,l),"button--quiet path");if(g.dataset.invocation=l,l===r)s=g;return g.setAttribute("aria-label",c(`插入命令:${l}`,`Insert command: ${l}`)),p.append(g,y("p","small muted break",[h,u].filter(Boolean).join(" · "))),[p]});t.replaceChildren(...o),t.hidden=!o.length,s?.focus({preventScroll:!0}),re(P("command-status"),o.length?"":i?c("没有匹配的命令。","No matching commands."):c("此会话没有可用命令。","This session has no listed commands."))}async function kp(e,t=!1){if(jt.open||V("command-picker").disabled)return;xr?.abort();let n=xr=new AbortController;q0=Yo([]);let r=Ut("command-search"),s=ve("command-shortcuts",HTMLDetailsElement);if(s.open=t,r.value="",P("command-list").replaceChildren(),P("command-list").hidden=!0,re(P("command-error")),jt.showModal(),H0(e),t)s.querySelector("summary")?.focus();let i=()=>!n.signal.aborted&&jt.open&&e===N;try{let o=await Fe.request(`${Ze(e.session.id)}/options`,void 0,n.signal);if(!i())return;q0=Yo(o.commands),H0(e)}catch(o){if(!i())return;re(P("command-error"),c(`无法读取扩展命令:${Re(o)}。内置命令仍可用。`,`Couldn't load extension commands: ${Re(o)}. Built-in commands remain available.`))}finally{if(xr===n)xr=void 0}}var Zn,Wt,Bt,_n,Mn,Yt,$t,Tr,Os=!1,tr,$s,Rt,Cr={current:new Map,history:new Map},nn,Fi=!1,P0,Rs,Kn,ba=!1,U0=()=>[...Ee.querySelectorAll('[role="tab"]')],nc=()=>!P("runtime-capabilities").hidden,ns=()=>!P("runtime-metrics").hidden,Ui=()=>!P("runtime-todo").hidden,ua=()=>ve("runtime-memory-branch",HTMLDetailsElement),cn=()=>!P("runtime-subagent").hidden?"tasks":!P("runtime-dag").hidden?"dag":Ui()&&ua().open?"memory":void 0,rc=["todo","dag"],Qr={},Wi=(e)=>ve(`runtime-${e}-history`,HTMLDetailsElement),W0=(e)=>Wi(e).querySelector(".fold-body"),qi=(e)=>Ee.open&&!P(`runtime-${e}`).hidden&&Wi(e).open;function va(e){if(e==="dag"&&nn?.scope==="history")nn=void 0;Qr[e]?.abort(),delete Qr[e];let t=Wi(e),n=t.querySelector("summary");if(W0(e).contains(document.activeElement)&&n?.getClientRects().length)n.focus({preventScroll:!0});t.open=!1,W0(e).replaceChildren()}function wp(){if(Cr.current.clear(),Cr.history.clear(),nn=void 0,Fi)re(P("details-error")),Fi=!1}function ya(){for(let e of rc)va(e);wp()}function E6(){if(Wt?.abort(),Mn?.abort(),Yt?.abort(),Wt=Mn=Yt=void 0,Rt=void 0,wp(),!Ee.open)return;va("dag");let e={status:"unavailable",reason:"binding_unverified"};ts(P("runtime-dag-current"),wn("dag",e)),ts(P("runtime-subagent"),wn("tasks",e))}function da(){let e=V("details-refresh");if(nc()&&Kn)e.setAttribute("aria-disabled","true");else e.removeAttribute("aria-disabled")}function xp(){Kn?.abort(),Kn=void 0,ba=!1;let e=P("capabilities-status");e.textContent="",e.className="sr-only",P("capabilities-content").replaceChildren(),da()}function A6(e){if(Kn)return;let t=Kn=new AbortController,n=()=>Kn===t&&Ee.open&&N===e,r=P("capabilities-status"),s=P("capabilities-content"),i=b0();ba=!0,s.replaceChildren(i),r.className="small muted",r.textContent=c("正在读取能力清单…","Loading capabilities…"),da();let o=AbortSignal.any([t.signal,AbortSignal.timeout(1e4)]);Fe.request(`${Ze(e.session.id)}/capabilities`,void 0,o).then((a)=>{if(!n())return;s.replaceChildren(...bm(a)),r.className="sr-only",r.textContent=c("能力清单已加载。","Capabilities loaded.")},(a)=>{if(!n())return;if(r.className="notice error small",a instanceof Be&&a.status===404&&a.code==="not_found")r.textContent=c("此版本的 Web 服务不提供能力清单。","This Web server does not list capabilities.");else if(a instanceof Be&&(a.code==="session_changed"||a.code==="session_not_open"||a.code==="session_not_found"))r.textContent=c("会话已断开。打开会话后重试。","Session disconnected. Open it and try again.");else r.textContent=c("无法读取能力清单。刷新重试。","Couldn't load capabilities. Refresh to try again.")}).finally(()=>{if(Kn!==t)return;Kn=void 0,da()})}function es(e,t=!0){if(e.getAttribute("aria-selected")==="true")return;if(nn=void 0,Fi)re(P("details-error")),Fi=!1;for(let n of U0()){let r=n===e;n.setAttribute("aria-selected",String(r)),n.tabIndex=r?0:-1;let s=n.getAttribute("aria-controls");if(s)P(s).hidden=!r;if(s==="runtime-todo"&&!r)V0()}for(let n of rc)if(P(`runtime-${n}`).hidden)va(n);if(P("details-scroll").scrollTop=0,Rs=void 0,t&&Ee.open&&N?.status==="ready")Ms(N);da()}function ka(){if(!Rs)return;let e=Rs==="todo"?"#runtime-todo [data-runtime-branch]":"#runtime-tree",t=Ee.querySelector(`${e} details`);if(!t)return;Rs=void 0,t.open=!0;let n=t.querySelector("summary");if(document.activeElement===V(e==="#runtime-tree"?"runtime-open-overview":"runtime-open-todo"))n?.focus({preventScroll:!0}),n?.scrollIntoView({block:"start"})}function Jr(e="overview",t=V("details-button"),n){if(N?.status!=="ready")return;let r=V(`runtime-open-${e}`);if(es(r),P0=t,Rs=n,!Ns.matches&&!Oi)Oi=!0,X0(J0,"open");if(!Ee.open)Ep(N);r.focus({preventScroll:!0}),ka()}function Ep(e){re(P("details-error")),Os=!1;for(let s of Ee.querySelectorAll('[role="tabpanel"]:not(#runtime-capabilities, #runtime-todo, #runtime-dag)'))s.replaceChildren();P("runtime-dag-current").replaceChildren(),P("runtime-todo").querySelector("[data-runtime-branch]")?.remove(),P("runtime-memory-journal").replaceChildren(),P("runtime-memory-branch-content").replaceChildren(),ua().open=!1;let t=()=>N===e&&Ee.open&&ns();Tr=im(Fe,Ze(e.session.id),()=>t()&&e.status==="ready",()=>e.session.active&&it==="online"&&!Ot.has(e.session.id)&&Oe.get(e.session.id)?.status!=="pending",()=>{if(window.confirm(c("清空所有尚未发送的排队输入?","Remove all unsent messages from the queue?")))ln(e,{action:"clearQueue"},c("清空队列","Clear queue"),(s)=>re(P("details-error"),s))});let n=()=>e.session.active&&it==="online"&&!e.running&&!e.compacting&&!e.requests.size&&!(e.queue&&e.queue>0)&&!nr.has(e.session.id)&&!Ot.has(e.session.id)&&Oe.get(e.session.id)?.status!=="pending",r=hm(Fe,Ze(e.session.id),t,n,(s,i)=>{let a=Ve(e.session.id).text.trim()?c("切换上下文位置?选中的消息可能替换当前草稿。","Switch context? The selected message may replace your draft."):c("切换上下文位置?原有分支仍会保留。","Switch context? Existing branches are kept."),l=(u,d)=>{if($t!==r)return;let h=m0(d);if(h)r.invalidate();re(P("details-error"),h?"":u)};if(window.confirm(a))ln(e,{action:"navigate",targetId:s,expectedLeafId:i},c("切换上下文","Switch context"),l,(d)=>{if(U(d.result).cancelled===!0)l(c("本次切换已取消。","Context switch cancelled."))})});if($t=r,P("runtime-metrics").append($t.root),Ns.matches)Ee.showModal();else Ee.open=!0;V("details-button").setAttribute("aria-expanded","true"),P("details-scroll").scrollTop=0,Ms(e)}function Ap(e,t=!1){if(!e||e.status!=="ready"||ht.active||e.consideredDesktopDock&&!t)return;if(e.consideredDesktopDock=!0,!Oi||Ns.matches||Ee.open)return;es(V("runtime-open-overview")),Ep(e)}function Rr(e=!0){if(!Ee.open)return;if(Ee.close(),Zn?.abort(),Zn=void 0,Wt?.abort(),Wt=void 0,Bt?.abort(),Bt=void 0,_n?.abort(),_n=void 0,Mn?.abort(),Mn=void 0,Yt?.abort(),Yt=void 0,$t?.abort(),$t=void 0,Tr?.deactivate(),Tr=void 0,tr=void 0,$s=void 0,Rt=void 0,ya(),V0(),N)N.detailData=void 0;Rs=void 0,xp();let t=V("details-button");t.setAttribute("aria-expanded","false");let n=P0??t;if(P0=void 0,e)(n.getClientRects().length?n:t.hidden?P("conversation"):t).focus({preventScroll:!0})}function Xo(){if(!Ee.matches(":modal"))Oi=!1,X0(J0,"closed");Rr()}function N0(){let e=V("details-button");if(Ns.matches){if(e.setAttribute("aria-haspopup","dialog"),Ee.open&&!Ee.matches(":modal"))Rr(Ee.contains(document.activeElement));return}if(e.removeAttribute("aria-haspopup"),!Ee.matches(":modal")||document.querySelector("dialog:modal:not(#details-dialog)"))return;let t=P("details-scroll"),n=t.scrollTop,r=document.activeElement;if(Ee.close(),Ee.open=!0,r instanceof HTMLElement&&Ee.contains(r))r.focus({preventScroll:!0});t.scrollTop=n}function Yn(e){kr.setAttribute("aria-expanded",String(e))}function j0(){return getComputedStyle(B0).getPropertyValue("--compact-options").trim()==="1"}function C6(){let e=j0();if(e===B0.hasAttribute("data-compact"))return;let t=document.activeElement;if(!e)Yn(!1);if(B0.toggleAttribute("data-compact",e),e&&Ds.contains(t)&&kr.getAttribute("aria-expanded")!=="true")kr.focus({preventScroll:!0});else if(!e&&t===kr)(Ds.querySelector("select:enabled:not([hidden] *)")??Ke).focus({preventScroll:!0})}function G0(e){Zn?.abort();let t=Zn=new AbortController,n=$t?.root,r=Tr,s=()=>!t.signal.aborted&&Ee.open&&ns()&&e===N,i=P("runtime-metrics"),o=(l)=>re(P("details-error"),l),a=!i.querySelector(".runtime-metrics")&&!i.querySelector(":scope > p")?y("p","muted",c("正在读取运行详情…","Loading run details…")):void 0;if(a)i.prepend(a);o(""),Fe.request(`${Ze(e.session.id)}/details`,void 0,t.signal).then((l)=>{if(!s()||!n||!r)return;if(e.detailData=l,Os=!1,wt.online!==!1)tc(e,l.generationSpeed);r.update(Ce(U(l.state).pendingMessageCount)),lm(l,e.state,e.options,{insertCommand:(u)=>yp(e,u)},n,r.root,e.generationSpeed),ka()}).catch((l)=>{if(!s())return;i.querySelector(":scope > p")?.remove(),o(c(`无法读取运行详情:${Re(l)}`,`Couldn't load run details: ${Re(l)}`))}).finally(()=>{if(Zn===t)Zn=void 0})}function _6(e){Bt?.abort();let t=Bt=new AbortController;Qr.todo?.abort(),delete Qr.todo;let n=()=>t===Bt&&Ee.open&&Ui()&&N===e;if(!tr)f0({status:"loading"});let r=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);Fe.request(`${Ze(e.session.id)}/branch-runtime?scope=todo`,void 0,r).catch(()=>({status:"unavailable",reason:"read_failed"})).then((s)=>{if(!n())return;Bt=void 0;let i=fa(tr),o=fa(s);if(i!==void 0&&o!==void 0&&i!==o)ya();if(tr=s,o!==void 0)$t?.checkLeaf(o);if(f0(s),ka(),qi("todo"))ic(e,"todo")}).finally(()=>{if(Bt===t)Bt=void 0})}function fa(e){if(e?.status==="ok"&&(typeof e.leafId==="string"||e.leafId===null))return e.leafId}function S6(e){_n?.abort();let t=_n=new AbortController;if(!$s)h0({status:"loading"});let n=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);Fe.request(`${Ze(e.session.id)}/branch-runtime`,void 0,n).catch(()=>({status:"unavailable",reason:"read_failed"})).then((r)=>{if(t!==_n||!Ee.open||cn()!=="memory"||N!==e)return;$s=r,h0(r)}).finally(()=>{if(_n===t)_n=void 0})}function ts(e,t,n=!0){let s=(d)=>d.dataset.dagKey??d.dataset.taskKey,i=new Set([...e.querySelectorAll(".dag-run, .task-run")].filter((d)=>d.open).flatMap((d)=>s(d)||[])),o=document.activeElement,a=e.contains(o)?o?.closest(".dag-run, .task-run"):void 0,l=a&&s(a);e.replaceChildren(...t);let u=null;for(let d of e.querySelectorAll(".dag-run, .task-run")){let h=s(d);if(h&&n&&i.has(h))d.open=!0;if(h&&h===l)u=d.querySelector("summary")}if(a&&document.activeElement===document.body)(u??e.closest("details")?.querySelector("summary")??e.closest('[role="tabpanel"]'))?.focus({preventScroll:!0})}function sc(){nn=void 0,Fi=!0;let e=P("details-error");if(re(e,c("该 DAG 节点关联已无法核验。可打开相应运行查看最新详情。","This DAG node link is no longer verified. Open the run to see its latest details.")),document.activeElement===V("runtime-open-dag"))e.scrollIntoView({block:"start"})}function Cp(e,t){let n=nn;if(!n||n.scope!==t)return;let r=e.querySelector(`.dag-run[data-dag-key="${n.key}"]`);if(!r){sc();return}if(r.open=!0,document.activeElement===V("runtime-open-dag"))r.scrollIntoView({block:"start"})}function T6(e,t){if(N!==e||!Ee.open||cn()!=="tasks"||!Rt?.taskIndex.has(t.taskKey)||!Cr[t.scope].get(t.key)?.includes(t))return;let n=V("runtime-open-dag");if(es(n,!1),nn=t,n.focus({preventScroll:!0}),ji(e),t.scope==="history"){let r=Wi("dag");r.open=!0,r.scrollIntoView({block:"start"})}}function R6(){let e=new Map;for(let t of Object.values(Cr))for(let n of t.values())for(let r of n)e.set(r.taskKey,e.has(r.taskKey)?null:r);return e}function _p(e,t,n){return{read:async(r,s)=>{let i=AbortSignal.any([n,s,AbortSignal.timeout(28000)]);i.throwIfAborted();let o=await Fe.request(`${Ze(e.session.id)}/native-runtime/dag/${r}?scope=${t}`,void 0,i);return i.throwIfAborted(),o},links:{task:(r)=>Rt?.taskIndex.get(r),openTask:(r)=>{if(e!==N||!Ee.open||cn()!=="dag"||!Rt?.taskIndex.has(r))return;if(es(V("runtime-open-subagents")),Wt)ji(e);let s=P("runtime-subagent").querySelector(`.task-run[data-task-key="${r}"]`),i=s?.querySelector("summary");if(s&&i)s.open=!0,E0(i)}},settled:(r,s,i)=>{if(e!==N||!Ee.open||cn()!=="dag"||n.aborted)return;let o=s.flatMap((l)=>l.taskKey&&Rt?.taskIndex.has(l.taskKey)?[{scope:t,key:r,node:l.id,taskKey:l.taskKey}]:[]);if(s.length)Cr[t==="current"?"history":"current"].delete(r);if(o.length)Cr[t].set(r,o);else Cr[t].delete(r);let a=nn;if(a?.scope!==t||a.key!==r)return;if(o.some((l)=>l.node===a.node&&l.taskKey===a.taskKey)){nn=void 0;let l=document.activeElement;A0(i,a.node,l===V("runtime-open-dag")||l===i.previousElementSibling)}else sc()}}}function Sp(e,t){let n=new Set(t.status==="ok"?we(t.rows).map((s)=>U(s).key):[]),r=Cr[e];for(let[s,i]of r){if(!n.has(s)){r.delete(s);continue}let o=i.filter((a)=>Rt?.taskIndex.has(a.taskKey));if(o.length)r.set(s,o);else r.delete(s)}}function K0(e){return{status:"unavailable",reason:e instanceof Be&&e.status===404&&e.code==="not_found"?"web_unsupported":e instanceof Be&&e.status>=400&&e.status<500?"read_refused":"read_failed"}}function ic(e,t){if(e!==N||!qi(t))return;let n=W0(t),r=fa(tr);if(t==="todo"&&(Bt||r===void 0)){n.replaceChildren(...Wo(Bt?void 0:{status:"ownership_changed"}));return}Qr[t]?.abort();let s=Qr[t]=new AbortController,i=()=>Qr[t]===s&&qi(t)&&N===e,o=Ze(e.session.id);if(t==="todo")n.replaceChildren(...Wo());else if(!n.childElementCount)n.replaceChildren(...wn("dag",void 0,{history:!0}));let a=AbortSignal.any([s.signal,AbortSignal.timeout(20000)]),l=t==="todo"?"/todo-history":"/native-runtime/dag-history";Fe.request(`${o}${l}`,void 0,a).catch(K0).then(async(u)=>{if(!i())return;if(t==="todo"){let p=u.status!=="ok"||r===u.leafId&&r===fa(tr);n.replaceChildren(...Wo(p?u:{status:"ownership_changed"}));return}if(Sp("history",u),!Vo(u)){let p=_p(e,"history",s.signal);ts(n,wn("dag",u,{history:!0,dag:p}),nn?.scope!=="history"),Cp(n,"history");return}if(nn?.scope==="history"){ts(n,wn("dag",u,{history:!0})),sc();return}ts(n,wn("dag",u,{history:!0,snapshot:"waiting"}));let d=AbortSignal.any([s.signal,AbortSignal.timeout(8000)]),h=await Fe.request(`${o}/activity`,void 0,d).catch(K0);if(i())n.replaceChildren(...wn("dag",u,{history:!0,snapshot:h}))})}function ji(e){let t=cn();if(!t||!Rt)return;if(t==="memory"){P("runtime-memory-journal").replaceChildren(Nm(Rt.memory));return}let n=Rt;if(t==="dag"){Mn?.abort();let l=Mn=new AbortController,u=P("runtime-dag-current"),d=_p(e,"current",l.signal);ts(u,wn("dag",n.dag,{dag:d}),!nn),Cp(u,"current");return}let r=Vo(n.tasks),s=r?n.snapshot??"waiting":void 0,i=R6();if(ts(P("runtime-subagent"),wn("tasks",n.tasks,{snapshot:s,taskJump:(l)=>{let u=i.get(l);return u?()=>T6(e,u):void 0}})),!r||n.snapshot||Yt)return;let o=Yt=new AbortController,a=AbortSignal.any([o.signal,AbortSignal.timeout(8000)]);Fe.request(`${Ze(e.session.id)}/activity`,void 0,a).catch(()=>({status:"unavailable"})).then((l)=>{if(Yt!==o||!Ee.open||N!==e||Rt!==n)return;if(n.snapshot=l,cn()==="tasks")ji(e)}).finally(()=>{if(Yt===o)Yt=void 0})}function M6(e){Wt?.abort(),Yt?.abort(),Yt=void 0;let t=Wt=new AbortController,n=()=>Wt===t&&Ee.open&&N===e&&Boolean(cn()),r=cn();if(r==="dag")Mn?.abort(),Mn=void 0;let s=P(r==="memory"?"runtime-memory-journal":r==="dag"?"runtime-dag-current":"runtime-subagent");if(!s.childElementCount){let o=y("p","small muted",c("正在读取原生运行信息…","Loading native runtime…"));o.setAttribute("role","status"),s.append(o)}let i=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);Fe.request(`${Ze(e.session.id)}/native-runtime`,void 0,i).catch((o)=>{let a=K0(o);return{tasks:a,dag:a,memory:a}}).then((o)=>{if(!n())return;let a=U(o.tasks);Rt={tasks:a,dag:U(o.dag),memory:U(o.memory),taskIndex:C0(a)},Sp("current",Rt.dag),ji(e)}).finally(()=>{if(Wt===t)Wt=void 0})}function Ms(e,t=!1){if(e!==N||e.status!=="ready"||!Ee.open)return;if(ns()){if(t||!Zn&&(Os||!e.detailData))G0(e);$t?.activate(),Tr?.activate(t)}else Zn?.abort(),Zn=void 0,$t?.abort(),Tr?.deactivate();if(Ui())if(t||!tr&&!Bt)_6(e);else ka();else Bt?.abort(),Bt=void 0;let n=cn();if(n==="memory"){if(t||!$s&&!_n)S6(e)}else _n?.abort(),_n=void 0;if(n){if(t||!Rt&&!Wt)M6(e);else if(Rt&&!Wt)ji(e)}else Wt?.abort(),Wt=void 0;if(n!=="dag")Mn?.abort(),Mn=void 0;if(n!=="tasks")Yt?.abort(),Yt=void 0;if(t&&qi("dag"))ic(e,"dag");if(nc()){if(t||!ba)A6(e)}else if(Kn)xp()}function ra(e){if(!ns())Os=!0;if(!Ui())tr=void 0;if(cn()!=="memory")$s=void 0;if(!cn())Rt=void 0;if(!nc())ba=!1;Ms(e,!0)}function oc(e){xn(!1),Hi.open(e)}function D6(){let e=()=>{ht.stop(),xn(!1),Z0("cli-follow-button")};V("cli-follow-button").addEventListener("click",()=>{if(ht.active){e();return}xn(!1),Rr(!1),Yn(!1),ht.start(),V("cli-follow-stop").focus({preventScroll:!0})}),V("cli-follow-stop").addEventListener("click",e),V("cli-history-button").addEventListener("click",()=>oc()),V("cli-live-button").addEventListener("click",()=>{ht.stop(),xn(!1),Fs.open()}),V("web-branch-button").addEventListener("click",()=>{if(N&&Oe.get(N.session.id)?.status!=="pending")Y0({kind:"web",id:N.session.id,name:N.session.name})}),V("open-navigation").addEventListener("click",()=>xn(!0)),V("close-navigation").addEventListener("click",()=>xn(!1,!0)),V("nav-scrim").addEventListener("click",()=>xn(!1,!0)),wr=tp(Xm)==="true",Oi=tp(J0)!=="closed",np(),V("rail-toggle").addEventListener("click",()=>{wr=!wr,X0(Xm,String(wr)),np()}),Is.addEventListener("change",()=>{let l=document.activeElement,u=An||l===V("open-navigation")||l===V("rail-toggle")||P("navigation").contains(l);if(xn(!1),u&&!document.querySelector("dialog:modal"))V(Is.matches?"open-navigation":"rail-toggle").focus({preventScroll:!0})}),N0(),Ns.addEventListener("change",()=>{if(N0(),!Ns.matches)Ap(N,!0)}),document.addEventListener("close",(l)=>{if(l.target!==Ee)N0()},!0),new ResizeObserver(C6).observe(Qo("composer"));let t=()=>kr.getAttribute("aria-expanded")==="true";kr.addEventListener("click",()=>Yn(!t()));let n=(l)=>{if(t()&&l.target instanceof Node&&!kr.contains(l.target)&&!Ds.contains(l.target))Yn(!1)};document.addEventListener("click",n),document.addEventListener("focusin",n),document.addEventListener("keydown",(l)=>{if(l.key!=="Escape"||l.defaultPrevented||l.isComposing||document.querySelector("dialog:modal"))return;if(An)xn(!1,!0);else if(t())Yn(!1),kr.focus({preventScroll:!0});else if(Ee.open)Xo()}),Ut("search").addEventListener("input",er),Ge("workspace-select").addEventListener("change",()=>hp(Ge("workspace-select").value)),V("recent").addEventListener("click",()=>{Tn=!1,er()}),V("archived").addEventListener("click",()=>{Tn=!0,er()}),document.addEventListener("visibilitychange",()=>{if(document.hidden)return;if(Xr(),N)la(N);if(N&&Ee.open)Ms(N,!0)}),V("new-welcome").addEventListener("click",F0),V("new-sidebar").addEventListener("click",F0),Qo("new-form").addEventListener("submit",(l)=>{l.preventDefault(),w6()});let r=Rn("session-path-dialog");for(let l of[Ls,Ye,jt,r])for(let u of l.querySelectorAll("[data-close]"))u.addEventListener("click",()=>l.close());V("session-path-trigger").addEventListener("click",()=>{let l=P("session-path").textContent;if(!l||r.open)return;P("session-path-full").textContent=l,re(P("session-path-status")),r.showModal()}),V("session-path-copy").addEventListener("click",async()=>{let l=P("session-path-full"),u=l.textContent;if(!u)return;let d=c("已复制路径。","Path copied.");try{await navigator.clipboard.writeText(u)}catch{d=c("剪贴板不可用。可选中路径手动复制。","Clipboard unavailable. Select and copy the path.")}if(r.open&&l.textContent===u)re(P("session-path-status"),d)}),V("manage-button").addEventListener("click",()=>{if(!N||Ye.open)return;re(P("manage-error")),bp(N),Ye.showModal(),Me()}),Ye.addEventListener("close",Me),V("manage-handoff").addEventListener("click",()=>{if(N)x6(N)}),V("handoff-copy").addEventListener("click",async()=>{let l=N;if(!l)return;let u=Oe.get(l.session.id);if(u?.status!=="released")return;try{await navigator.clipboard.writeText(u.command),u.copyStatus=c("已复制命令。","Command copied.")}catch{u.copyStatus=c("剪贴板不可用。可选中命令手动复制。","Clipboard unavailable. Select and copy the command.")}if(N?.session.id===l.session.id&&Oe.get(l.session.id)===u)Me()}),V("details-button").addEventListener("click",()=>{if(Ee.open)Xo();else Jr()}),V("current-todo").addEventListener("click",()=>Jr("todo",V("current-todo"),"todo"));let s=P("runtime-memory-journal");s.classList.add("fold-body"),P("runtime-memory-branch-content").before(s),ua().addEventListener("toggle",()=>{if(N&&Ee.open&&Ui())Ms(N)});for(let l of rc)Wi(l).addEventListener("toggle",()=>{if(N&&qi(l))ic(N,l);else va(l)});P("runtime-metrics").addEventListener("click",(l)=>{if(!(l.target instanceof Element)||!l.target.closest("#runtime-open-resources"))return;es(V("runtime-open-todo")),ua().open=!0;let u=P("runtime-resources-title");u.focus({preventScroll:!0}),u.scrollIntoView({block:"start"})});for(let l of U0())l.addEventListener("click",()=>es(l));P("runtime-shortcuts").addEventListener("keydown",(l)=>{let u=U0(),d=u.findIndex((p)=>p===l.target);if(d<0)return;let h=l.key==="Home"?u[0]:l.key==="End"?u.at(-1):l.key==="ArrowLeft"?u[(d+u.length-1)%u.length]:l.key==="ArrowRight"?u[(d+1)%u.length]:void 0;if(!h)return;l.preventDefault(),es(h),h.focus({preventScroll:!0})}),V("details-refresh").addEventListener("click",()=>{if(!N||!Ee.open)return;if(Ms(N,!0),ns())$t?.refresh()}),Ee.querySelector("[data-close]")?.addEventListener("click",Xo),Ee.addEventListener("cancel",(l)=>{l.preventDefault(),Xo()}),V("command-mode").addEventListener("click",()=>{if(N)vp(N,!Ve(N.session.id).commandMode)}),V("command-picker").addEventListener("click",()=>{if(N)kp(N)}),mm(jt,Ut("command-search"),P("command-list")),jt.addEventListener("close",()=>{if(!jt.open)xr?.abort()}),Ut("command-search").addEventListener("input",()=>{if(N&&!xr&&P("command-error").hidden)H0(N)}),V("retry").addEventListener("click",()=>{if(clearTimeout(Ti),Ti=0,En?.close(),En=void 0,N)pa(N);if(Xt=Tt==="transport"?"lost":"waiting",Tt!=="transport")Tt=!1;Yr="",Ni="",rr(),Qn(!0)}),V("resume").addEventListener("click",()=>{let l=N;if(!l||V("resume").disabled)return;let u=Oe.get(l.session.id),d=u?.status==="released"||u?.status==="uncertain";if(l.session.active&&!d){l.status="loading",l.error="",Me(),rs(l,!0),Sr(l);return}let h=P("conversation");h.focus(),ln(l,{action:"resume"},c("恢复会话","Resume session"),(p)=>{l.error=p,Me()}).then(()=>{if(l!==N||document.activeElement!==h||document.querySelector("dialog:modal"))return;if(l.status==="ready")Ke.focus();else if(!P("session-error").hidden)P("session-error").focus()})}),Qo("composer").addEventListener("submit",(l)=>{l.preventDefault(),ip()}),Ke.addEventListener("input",()=>{if(!N)return;let l=Ve(N.session.id);if(l.commandStatus=void 0,l.commandMode)l.commandText=Ke.value,l.commandError="";else l.text=Ke.value,l.error="";Me()}),Ke.addEventListener("keydown",(l)=>{if(Ci.key(l))return;if(l.key==="Enter"&&!l.isComposing&&!Ci.composing&&(l.ctrlKey||l.metaKey))l.preventDefault(),ip()}),Ke.addEventListener("focus",Me),Ke.maxLength=200000,Ke.addEventListener("paste",(l)=>{let u=[...l.clipboardData?.files??[]].filter((d)=>d.type.startsWith("image/"));if(u.length)sp(u)}),V("attach").addEventListener("click",()=>Ut("files").click()),Ut("files").addEventListener("change",(l)=>{let u=l.currentTarget;if(u instanceof HTMLInputElement)sp([...u.files??[]]),u.value=""}),Vn.addEventListener("change",()=>{if(!N)return;Ve(N.session.id).mode=Vn.value==="steer"||Vn.value==="follow_up"?Vn.value:"prompt",Me()}),V("stop").addEventListener("click",()=>{let l=N;if(l)ln(l,{action:"abort"},c("停止","Stop"),(u)=>{Ve(l.session.id).error=u,Me()})}),zs.observeTrace(({user:l,assistant:u,tool:d})=>{Mi(Ss.user,l),Mi(Ss.assistant,u),Mi(Ss.tool,d)});let i=matchMedia("(prefers-reduced-motion: no-preference) and (forced-colors: none)"),o;i.addEventListener("change",()=>o?.cancel());let a=(l)=>{if(l.tagName!=="SUMMARY")l.tabIndex=-1;if(l.focus({preventScroll:!0}),l.scrollIntoView({block:"nearest",inline:"nearest"}),o?.cancel(),!i.matches)return;let u=l.animate([{backgroundColor:"var(--trace-arrival)"},{}],{duration:460,easing:"ease-out"});o=u,u.onfinish=u.oncancel=()=>{if(o===u)o=void 0}};for(let l of Object.values(Ss))l.addEventListener("click",()=>{let u=Ts.get(l);if(!sa.hidden&&u?.isConnected)a(u)});V("sidebar-question").addEventListener("click",()=>{let l=Di.firstQuestion;if(!l?.isConnected)return;if(Ee.matches(":modal"))Rr(!1);a(l)}),Jn.addEventListener("change",()=>{let l=N;if(!l||Jn.disabled)return;l.modelSelection=Jn.value||void 0,Me()}),Xn.addEventListener("click",async()=>{let l=N,u=we(l?.options.models).map(U).find((d)=>Pt(d)===l?.modelSelection);if(!l||!u||Xn.disabled)return;if(await ln(l,{action:"model",provider:C(u.provider),modelId:C(u.id)},c("切换模型","Change model"),(d)=>{Ve(l.session.id).error=d,Me()}),N!==l)return;if(l.modelSelection=void 0,Me(),document.activeElement===document.body||document.activeElement===Xn)Jn.focus()}),Ge("thinking").addEventListener("change",()=>{let l=N,u=Ge("thinking").value;if(l&&u&&!Ge("thinking").disabled)ln(l,{action:"thinking",level:u},c("切换思考档","Change thinking level"),(d)=>{Ve(l.session.id).error=d,Me()});else Me()}),Ge("approval").addEventListener("change",()=>{let l=N,u=Ge("approval").value;if(!l||u!=="ask"&&u!=="auto"&&u!=="full-access"){Me();return}if(u==="full-access"&&!window.confirm(c("关闭此会话的审批?工具默认放行,包括删除文件或对外发送数据。原生权限规则仍有效,用户问题仍需回答。","Turn off approval for this session? Tools can delete files or send data without asking. Native rules and user questions still apply."))){Me();return}ln(l,{action:"preset",preset:u},c("切换审批模式","Change approval mode"),(d)=>{Ve(l.session.id).error=d,Me()})})}i6();o6();D6();Qn();